@formbricks/js
Advanced tools
Comparing version
@@ -1,3 +0,1 @@ | ||
import { TJsState } from "@formbricks/types/v1/js"; | ||
import { NetworkError, Result } from "./errors"; | ||
export declare const sync: () => Promise<Result<TJsState, NetworkError>>; | ||
export declare const sync: () => Promise<void>; |
@@ -157,1 +157,92 @@ import z from "zod"; | ||
export type TActionClass = z.infer<typeof ZActionClass>; | ||
export declare const ZActionClassInput: z.ZodObject<{ | ||
name: z.ZodString; | ||
description: z.ZodUnion<[z.ZodString, z.ZodNull]>; | ||
noCodeConfig: z.ZodUnion<[z.ZodObject<{ | ||
type: z.ZodUnion<[z.ZodLiteral<"innerHtml">, z.ZodLiteral<"pageUrl">, z.ZodLiteral<"cssSelector">]>; | ||
pageUrl: z.ZodOptional<z.ZodObject<{ | ||
value: z.ZodString; | ||
rule: z.ZodUnion<[z.ZodLiteral<"exactMatch">, z.ZodLiteral<"contains">, z.ZodLiteral<"startsWith">, z.ZodLiteral<"endsWith">, z.ZodLiteral<"notMatch">, z.ZodLiteral<"notContains">]>; | ||
}, "strip", z.ZodTypeAny, { | ||
value?: string; | ||
rule?: "exactMatch" | "contains" | "startsWith" | "endsWith" | "notMatch" | "notContains"; | ||
}, { | ||
value?: string; | ||
rule?: "exactMatch" | "contains" | "startsWith" | "endsWith" | "notMatch" | "notContains"; | ||
}>>; | ||
innerHtml: z.ZodOptional<z.ZodObject<{ | ||
value: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
value?: string; | ||
}, { | ||
value?: string; | ||
}>>; | ||
cssSelector: z.ZodOptional<z.ZodObject<{ | ||
value: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
value?: string; | ||
}, { | ||
value?: string; | ||
}>>; | ||
}, "strip", z.ZodTypeAny, { | ||
type?: "innerHtml" | "pageUrl" | "cssSelector"; | ||
pageUrl?: { | ||
value?: string; | ||
rule?: "exactMatch" | "contains" | "startsWith" | "endsWith" | "notMatch" | "notContains"; | ||
}; | ||
innerHtml?: { | ||
value?: string; | ||
}; | ||
cssSelector?: { | ||
value?: string; | ||
}; | ||
}, { | ||
type?: "innerHtml" | "pageUrl" | "cssSelector"; | ||
pageUrl?: { | ||
value?: string; | ||
rule?: "exactMatch" | "contains" | "startsWith" | "endsWith" | "notMatch" | "notContains"; | ||
}; | ||
innerHtml?: { | ||
value?: string; | ||
}; | ||
cssSelector?: { | ||
value?: string; | ||
}; | ||
}>, z.ZodNull]>; | ||
type: z.ZodEnum<["code", "noCode", "automatic"]>; | ||
}, "strip", z.ZodTypeAny, { | ||
name?: string; | ||
description?: string; | ||
noCodeConfig?: { | ||
type?: "innerHtml" | "pageUrl" | "cssSelector"; | ||
pageUrl?: { | ||
value?: string; | ||
rule?: "exactMatch" | "contains" | "startsWith" | "endsWith" | "notMatch" | "notContains"; | ||
}; | ||
innerHtml?: { | ||
value?: string; | ||
}; | ||
cssSelector?: { | ||
value?: string; | ||
}; | ||
}; | ||
type?: "code" | "noCode" | "automatic"; | ||
}, { | ||
name?: string; | ||
description?: string; | ||
noCodeConfig?: { | ||
type?: "innerHtml" | "pageUrl" | "cssSelector"; | ||
pageUrl?: { | ||
value?: string; | ||
rule?: "exactMatch" | "contains" | "startsWith" | "endsWith" | "notMatch" | "notContains"; | ||
}; | ||
innerHtml?: { | ||
value?: string; | ||
}; | ||
cssSelector?: { | ||
value?: string; | ||
}; | ||
}; | ||
type?: "code" | "noCode" | "automatic"; | ||
}>; | ||
export type TActionClassInput = z.infer<typeof ZActionClassInput>; |
import { z } from "zod"; | ||
export declare const ZPipelineTrigger: z.ZodEnum<["responseFinished", "responseCreated", "responseUpdated"]>; | ||
export type TPipelineTrigger = z.infer<typeof ZPipelineTrigger>; | ||
export declare const ZPipelineInput: z.ZodObject<{ | ||
event: z.ZodEnum<["responseFinished", "responseCreated", "responseUpdated"]>; | ||
response: z.ZodObject<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodDate; | ||
updatedAt: z.ZodDate; | ||
surveyId: z.ZodString; | ||
person: z.ZodNullable<z.ZodObject<{ | ||
id: z.ZodString; | ||
attributes: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>>; | ||
createdAt: z.ZodDate; | ||
updatedAt: z.ZodDate; | ||
}, "strip", z.ZodTypeAny, { | ||
id?: string; | ||
attributes?: Record<string, string | number>; | ||
createdAt?: Date; | ||
updatedAt?: Date; | ||
}, { | ||
id?: string; | ||
attributes?: Record<string, string | number>; | ||
createdAt?: Date; | ||
updatedAt?: Date; | ||
}>>; | ||
personAttributes: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>>>; | ||
finished: z.ZodBoolean; | ||
data: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodArray<z.ZodString, "many">]>>; | ||
notes: z.ZodArray<z.ZodObject<{ | ||
updatedAt: z.ZodDate; | ||
createdAt: z.ZodDate; | ||
id: z.ZodString; | ||
text: z.ZodString; | ||
user: z.ZodObject<{ | ||
id: z.ZodString; | ||
name: z.ZodNullable<z.ZodString>; | ||
}, "strip", z.ZodTypeAny, { | ||
id?: string; | ||
name?: string; | ||
}, { | ||
id?: string; | ||
name?: string; | ||
}>; | ||
}, "strip", z.ZodTypeAny, { | ||
updatedAt?: Date; | ||
createdAt?: Date; | ||
id?: string; | ||
text?: string; | ||
user?: { | ||
id?: string; | ||
name?: string; | ||
}; | ||
}, { | ||
updatedAt?: Date; | ||
createdAt?: Date; | ||
id?: string; | ||
text?: string; | ||
user?: { | ||
id?: string; | ||
name?: string; | ||
}; | ||
}>, "many">; | ||
tags: z.ZodArray<z.ZodObject<{ | ||
id: z.ZodString; | ||
createdAt: z.ZodDate; | ||
updatedAt: z.ZodDate; | ||
name: z.ZodString; | ||
environmentId: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
id?: string; | ||
createdAt?: Date; | ||
updatedAt?: Date; | ||
name?: string; | ||
environmentId?: string; | ||
}, { | ||
id?: string; | ||
createdAt?: Date; | ||
updatedAt?: Date; | ||
name?: string; | ||
environmentId?: string; | ||
}>, "many">; | ||
meta: z.ZodNullable<z.ZodObject<{ | ||
url: z.ZodString; | ||
userAgent: z.ZodObject<{ | ||
browser: z.ZodOptional<z.ZodString>; | ||
os: z.ZodOptional<z.ZodString>; | ||
device: z.ZodOptional<z.ZodString>; | ||
}, "strip", z.ZodTypeAny, { | ||
browser?: string; | ||
os?: string; | ||
device?: string; | ||
}, { | ||
browser?: string; | ||
os?: string; | ||
device?: string; | ||
}>; | ||
}, "strip", z.ZodTypeAny, { | ||
url?: string; | ||
userAgent?: { | ||
browser?: string; | ||
os?: string; | ||
device?: string; | ||
}; | ||
}, { | ||
url?: string; | ||
userAgent?: { | ||
browser?: string; | ||
os?: string; | ||
device?: string; | ||
}; | ||
}>>; | ||
}, "strip", z.ZodTypeAny, { | ||
id?: string; | ||
createdAt?: Date; | ||
updatedAt?: Date; | ||
surveyId?: string; | ||
person?: { | ||
id?: string; | ||
attributes?: Record<string, string | number>; | ||
createdAt?: Date; | ||
updatedAt?: Date; | ||
}; | ||
personAttributes?: Record<string, string | number>; | ||
finished?: boolean; | ||
data?: Record<string, string | number | string[]>; | ||
notes?: { | ||
updatedAt?: Date; | ||
createdAt?: Date; | ||
id?: string; | ||
text?: string; | ||
user?: { | ||
id?: string; | ||
name?: string; | ||
}; | ||
}[]; | ||
tags?: { | ||
id?: string; | ||
createdAt?: Date; | ||
updatedAt?: Date; | ||
name?: string; | ||
environmentId?: string; | ||
}[]; | ||
meta?: { | ||
url?: string; | ||
userAgent?: { | ||
browser?: string; | ||
os?: string; | ||
device?: string; | ||
}; | ||
}; | ||
}, { | ||
id?: string; | ||
createdAt?: Date; | ||
updatedAt?: Date; | ||
surveyId?: string; | ||
person?: { | ||
id?: string; | ||
attributes?: Record<string, string | number>; | ||
createdAt?: Date; | ||
updatedAt?: Date; | ||
}; | ||
personAttributes?: Record<string, string | number>; | ||
finished?: boolean; | ||
data?: Record<string, string | number | string[]>; | ||
notes?: { | ||
updatedAt?: Date; | ||
createdAt?: Date; | ||
id?: string; | ||
text?: string; | ||
user?: { | ||
id?: string; | ||
name?: string; | ||
}; | ||
}[]; | ||
tags?: { | ||
id?: string; | ||
createdAt?: Date; | ||
updatedAt?: Date; | ||
name?: string; | ||
environmentId?: string; | ||
}[]; | ||
meta?: { | ||
url?: string; | ||
userAgent?: { | ||
browser?: string; | ||
os?: string; | ||
device?: string; | ||
}; | ||
}; | ||
}>; | ||
environmentId: z.ZodString; | ||
surveyId: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
event?: "responseFinished" | "responseCreated" | "responseUpdated"; | ||
response?: { | ||
id?: string; | ||
createdAt?: Date; | ||
updatedAt?: Date; | ||
surveyId?: string; | ||
person?: { | ||
id?: string; | ||
attributes?: Record<string, string | number>; | ||
createdAt?: Date; | ||
updatedAt?: Date; | ||
}; | ||
personAttributes?: Record<string, string | number>; | ||
finished?: boolean; | ||
data?: Record<string, string | number | string[]>; | ||
notes?: { | ||
updatedAt?: Date; | ||
createdAt?: Date; | ||
id?: string; | ||
text?: string; | ||
user?: { | ||
id?: string; | ||
name?: string; | ||
}; | ||
}[]; | ||
tags?: { | ||
id?: string; | ||
createdAt?: Date; | ||
updatedAt?: Date; | ||
name?: string; | ||
environmentId?: string; | ||
}[]; | ||
meta?: { | ||
url?: string; | ||
userAgent?: { | ||
browser?: string; | ||
os?: string; | ||
device?: string; | ||
}; | ||
}; | ||
}; | ||
environmentId?: string; | ||
surveyId?: string; | ||
}, { | ||
event?: "responseFinished" | "responseCreated" | "responseUpdated"; | ||
response?: { | ||
id?: string; | ||
createdAt?: Date; | ||
updatedAt?: Date; | ||
surveyId?: string; | ||
person?: { | ||
id?: string; | ||
attributes?: Record<string, string | number>; | ||
createdAt?: Date; | ||
updatedAt?: Date; | ||
}; | ||
personAttributes?: Record<string, string | number>; | ||
finished?: boolean; | ||
data?: Record<string, string | number | string[]>; | ||
notes?: { | ||
updatedAt?: Date; | ||
createdAt?: Date; | ||
id?: string; | ||
text?: string; | ||
user?: { | ||
id?: string; | ||
name?: string; | ||
}; | ||
}[]; | ||
tags?: { | ||
id?: string; | ||
createdAt?: Date; | ||
updatedAt?: Date; | ||
name?: string; | ||
environmentId?: string; | ||
}[]; | ||
meta?: { | ||
url?: string; | ||
userAgent?: { | ||
browser?: string; | ||
os?: string; | ||
device?: string; | ||
}; | ||
}; | ||
}; | ||
environmentId?: string; | ||
surveyId?: string; | ||
}>; | ||
export type TPipelineInput = z.infer<typeof ZPipelineInput>; |
@@ -52,3 +52,34 @@ import { z } from "zod"; | ||
export type TResponseNote = z.infer<typeof ZResponseNote>; | ||
declare const ZResponse: z.ZodObject<{ | ||
export declare const ZResponseMeta: z.ZodObject<{ | ||
url: z.ZodString; | ||
userAgent: z.ZodObject<{ | ||
browser: z.ZodOptional<z.ZodString>; | ||
os: z.ZodOptional<z.ZodString>; | ||
device: z.ZodOptional<z.ZodString>; | ||
}, "strip", z.ZodTypeAny, { | ||
browser?: string; | ||
os?: string; | ||
device?: string; | ||
}, { | ||
browser?: string; | ||
os?: string; | ||
device?: string; | ||
}>; | ||
}, "strip", z.ZodTypeAny, { | ||
url?: string; | ||
userAgent?: { | ||
browser?: string; | ||
os?: string; | ||
device?: string; | ||
}; | ||
}, { | ||
url?: string; | ||
userAgent?: { | ||
browser?: string; | ||
os?: string; | ||
device?: string; | ||
}; | ||
}>; | ||
export type TResponseMeta = z.infer<typeof ZResponseMeta>; | ||
export declare const ZResponse: z.ZodObject<{ | ||
id: z.ZodString; | ||
@@ -130,2 +161,32 @@ createdAt: z.ZodDate; | ||
}>, "many">; | ||
meta: z.ZodNullable<z.ZodObject<{ | ||
url: z.ZodString; | ||
userAgent: z.ZodObject<{ | ||
browser: z.ZodOptional<z.ZodString>; | ||
os: z.ZodOptional<z.ZodString>; | ||
device: z.ZodOptional<z.ZodString>; | ||
}, "strip", z.ZodTypeAny, { | ||
browser?: string; | ||
os?: string; | ||
device?: string; | ||
}, { | ||
browser?: string; | ||
os?: string; | ||
device?: string; | ||
}>; | ||
}, "strip", z.ZodTypeAny, { | ||
url?: string; | ||
userAgent?: { | ||
browser?: string; | ||
os?: string; | ||
device?: string; | ||
}; | ||
}, { | ||
url?: string; | ||
userAgent?: { | ||
browser?: string; | ||
os?: string; | ||
device?: string; | ||
}; | ||
}>>; | ||
}, "strip", z.ZodTypeAny, { | ||
@@ -162,2 +223,10 @@ id?: string; | ||
}[]; | ||
meta?: { | ||
url?: string; | ||
userAgent?: { | ||
browser?: string; | ||
os?: string; | ||
device?: string; | ||
}; | ||
}; | ||
}, { | ||
@@ -194,2 +263,10 @@ id?: string; | ||
}[]; | ||
meta?: { | ||
url?: string; | ||
userAgent?: { | ||
browser?: string; | ||
os?: string; | ||
device?: string; | ||
}; | ||
}; | ||
}>; | ||
@@ -203,2 +280,3 @@ export type TResponse = z.infer<typeof ZResponse>; | ||
meta: z.ZodOptional<z.ZodObject<{ | ||
url: z.ZodOptional<z.ZodString>; | ||
userAgent: z.ZodOptional<z.ZodObject<{ | ||
@@ -218,2 +296,3 @@ browser: z.ZodOptional<z.ZodString>; | ||
}, "strip", z.ZodTypeAny, { | ||
url?: string; | ||
userAgent?: { | ||
@@ -225,2 +304,3 @@ browser?: string; | ||
}, { | ||
url?: string; | ||
userAgent?: { | ||
@@ -238,2 +318,3 @@ browser?: string; | ||
meta?: { | ||
url?: string; | ||
userAgent?: { | ||
@@ -251,2 +332,3 @@ browser?: string; | ||
meta?: { | ||
url?: string; | ||
userAgent?: { | ||
@@ -253,0 +335,0 @@ browser?: string; |
{ | ||
"name": "@formbricks/js", | ||
"license": "MIT", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Formbricks-js allows you to connect your app to Formbricks, display surveys and trigger events.", | ||
@@ -43,21 +43,21 @@ "keywords": [ | ||
"@types/jest": "^29.5.3", | ||
"@typescript-eslint/eslint-plugin": "^6.0.0", | ||
"@typescript-eslint/parser": "^6.0.0", | ||
"@typescript-eslint/eslint-plugin": "^6.2.0", | ||
"@typescript-eslint/parser": "^6.2.0", | ||
"autoprefixer": "^10.4.14", | ||
"babel-jest": "^29.6.1", | ||
"babel-jest": "^29.6.2", | ||
"cross-env": "^7.0.3", | ||
"eslint-config-preact": "^1.3.0", | ||
"isomorphic-fetch": "^3.0.0", | ||
"jest": "^29.6.1", | ||
"jest-environment-jsdom": "^29.6.1", | ||
"jest": "^29.6.2", | ||
"jest-environment-jsdom": "^29.6.2", | ||
"jest-fetch-mock": "^3.0.3", | ||
"jest-preset-preact": "^4.0.5", | ||
"jest-preset-preact": "^4.1.0", | ||
"microbundle": "^0.15.1", | ||
"preact": "10.16.0", | ||
"preact-cli": "^3.4.6", | ||
"preact-cli": "^3.5.0", | ||
"preact-render-to-string": "^6.2.0", | ||
"regenerator-runtime": "^0.13.11", | ||
"@formbricks/api": "0.1.0", | ||
"@formbricks/types": "0.0.0", | ||
"eslint-config-formbricks": "1.0.0" | ||
"eslint-config-formbricks": "1.0.0", | ||
"@formbricks/api": "0.1.0" | ||
}, | ||
@@ -64,0 +64,0 @@ "jest": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1646505
1.28%72
1.41%10521
5.76%