mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-30 10:19:51 -06:00
remove duplicated question types, update js sdk to 0.1.11
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@formbricks/js",
|
||||
"version": "0.1.10",
|
||||
"version": "0.1.11",
|
||||
"description": "Formbricks-js allows you to connect your app to Formbricks, display surveys and trigger events.",
|
||||
"keywords": [
|
||||
"Formbricks",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { h } from "preact";
|
||||
import { useEffect, useState } from "preact/hooks";
|
||||
import { cn } from "../lib/utils";
|
||||
import type { MultipleChoiceMultiQuestion } from "@formbricks/types/js";
|
||||
import type { MultipleChoiceMultiQuestion } from "@formbricks/types/questions";
|
||||
import Headline from "./Headline";
|
||||
import Subheader from "./Subheader";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { h } from "preact";
|
||||
import { useState } from "preact/hooks";
|
||||
import { cn } from "../lib/utils";
|
||||
import type { MultipleChoiceSingleQuestion } from "@formbricks/types/js";
|
||||
import type { MultipleChoiceSingleQuestion } from "@formbricks/types/questions";
|
||||
import Headline from "./Headline";
|
||||
import Subheader from "./Subheader";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { OpenTextQuestion } from "@formbricks/types/questions";
|
||||
import { h } from "preact";
|
||||
import type { OpenTextQuestion, Question } from "@formbricks/types/js";
|
||||
import Headline from "./Headline";
|
||||
import Subheader from "./Subheader";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { h } from "preact";
|
||||
import type { Question } from "@formbricks/types/js";
|
||||
import type { Question } from "@formbricks/types/questions";
|
||||
import OpenTextQuestion from "./OpenTextQuestion";
|
||||
import MultipleChoiceSingleQuestion from "./MultipleChoiceSingleQuestion";
|
||||
import MultipleChoiceMultiQuestion from "./MultipleChoiceMultiQuestion";
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import { Question } from "./questions";
|
||||
import { ThankYouCard } from "./surveys";
|
||||
|
||||
export interface ResponseCreateRequest {
|
||||
surveyId: string;
|
||||
personId: string;
|
||||
@@ -73,70 +76,6 @@ export interface Survey {
|
||||
thankYouCard: ThankYouCard;
|
||||
}
|
||||
|
||||
export interface ThankYouCard {
|
||||
enabled: boolean;
|
||||
headline?: string;
|
||||
subheader?: string;
|
||||
}
|
||||
|
||||
export interface ThankYouCard {
|
||||
enabled: boolean;
|
||||
headline?: string;
|
||||
subheader?: string;
|
||||
}
|
||||
|
||||
export type Question =
|
||||
| OpenTextQuestion
|
||||
| MultipleChoiceSingleQuestion
|
||||
| MultipleChoiceMultiQuestion
|
||||
| NPSQuestion;
|
||||
|
||||
export interface OpenTextQuestion {
|
||||
id: string;
|
||||
type: "openText";
|
||||
headline: string;
|
||||
subheader?: string;
|
||||
placeholder?: string;
|
||||
buttonLabel?: string;
|
||||
required: boolean;
|
||||
}
|
||||
|
||||
export interface MultipleChoiceSingleQuestion {
|
||||
id: string;
|
||||
type: "multipleChoiceSingle";
|
||||
headline: string;
|
||||
subheader?: string;
|
||||
required: boolean;
|
||||
buttonLabel?: string;
|
||||
choices?: Choice[];
|
||||
}
|
||||
|
||||
export interface MultipleChoiceMultiQuestion {
|
||||
id: string;
|
||||
type: "multipleChoiceMulti";
|
||||
headline: string;
|
||||
subheader?: string;
|
||||
required: boolean;
|
||||
buttonLabel?: string;
|
||||
choices?: Choice[];
|
||||
}
|
||||
|
||||
export interface NPSQuestion {
|
||||
id: string;
|
||||
type: "nps";
|
||||
headline: string;
|
||||
subheader?: string;
|
||||
required: boolean;
|
||||
buttonLabel?: string;
|
||||
lowerLabel: string;
|
||||
upperLabel: string;
|
||||
}
|
||||
|
||||
export interface Choice {
|
||||
id: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
export interface Trigger {
|
||||
id: string;
|
||||
eventClass: {
|
||||
|
||||
Reference in New Issue
Block a user