@keystrokehq/typeform 0.0.1 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/themes.d.mts CHANGED
@@ -37,7 +37,7 @@ declare const listThemes: _keystrokehq_core0.Operation<z.ZodObject<{
37
37
  totalItems: z.ZodOptional<z.ZodNumber>;
38
38
  pageCount: z.ZodOptional<z.ZodNumber>;
39
39
  }, z.core.$strip>>;
40
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"typeform", z.ZodObject<{
40
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:typeform", z.ZodObject<{
41
41
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
42
42
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
43
43
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
@@ -67,7 +67,7 @@ declare const getTheme: _keystrokehq_core0.Operation<z.ZodObject<{
67
67
  [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
68
68
  }, z.core.$catchall<z.ZodUnknown>>>;
69
69
  font: z.ZodOptional<z.ZodString>;
70
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"typeform", z.ZodObject<{
70
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:typeform", z.ZodObject<{
71
71
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
72
72
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
73
73
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
@@ -115,7 +115,7 @@ declare const createTheme: _keystrokehq_core0.Operation<z.ZodObject<{
115
115
  [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
116
116
  }, z.core.$catchall<z.ZodUnknown>>>;
117
117
  font: z.ZodOptional<z.ZodString>;
118
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"typeform", z.ZodObject<{
118
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:typeform", z.ZodObject<{
119
119
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
120
120
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
121
121
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
@@ -164,7 +164,7 @@ declare const updateTheme: _keystrokehq_core0.Operation<z.ZodObject<{
164
164
  [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
165
165
  }, z.core.$catchall<z.ZodUnknown>>>;
166
166
  font: z.ZodOptional<z.ZodString>;
167
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"typeform", z.ZodObject<{
167
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:typeform", z.ZodObject<{
168
168
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
169
169
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
170
170
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
@@ -207,7 +207,7 @@ declare const patchTheme: _keystrokehq_core0.Operation<z.ZodObject<{
207
207
  [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
208
208
  }, z.core.$catchall<z.ZodUnknown>>>;
209
209
  font: z.ZodOptional<z.ZodString>;
210
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"typeform", z.ZodObject<{
210
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:typeform", z.ZodObject<{
211
211
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
212
212
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
213
213
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
@@ -216,7 +216,7 @@ declare const deleteTheme: _keystrokehq_core0.Operation<z.ZodObject<{
216
216
  themeId: z.ZodString;
217
217
  }, z.core.$strip>, z.ZodObject<{
218
218
  success: z.ZodBoolean;
219
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"typeform", z.ZodObject<{
219
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:typeform", z.ZodObject<{
220
220
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
221
221
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
222
222
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
package/dist/themes.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as mapPagePagination, o as omitUndefined, r as asRecord } from "./shared-D0ONnQL8.mjs";
2
2
  import { createTypeformClient } from "./client.mjs";
3
- import { N as typeformLooseObjectSchema, c as typeformThemeListSchema, k as typeformIdentifierSchema, l as typeformThemeSchema, s as typeformThemeColorsSchema } from "./workspace-C1CCnvgv.mjs";
4
- import { t as typeformOperation } from "./factory-B_dyn39A.mjs";
3
+ import { typeformIdentifierSchema, typeformLooseObjectSchema, typeformThemeColorsSchema, typeformThemeListSchema, typeformThemeSchema } from "./schemas/index.mjs";
4
+ import { t as typeformOperation } from "./factory-C-RzHxwx.mjs";
5
5
  import { z } from "zod";
6
6
 
7
7
  //#region src/themes.ts
package/dist/videos.d.mts CHANGED
@@ -11,7 +11,7 @@ declare const uploadVideo: _keystrokehq_core0.Operation<z.ZodObject<{
11
11
  url: z.ZodOptional<z.ZodString>;
12
12
  source: z.ZodOptional<z.ZodString>;
13
13
  embed_url: z.ZodOptional<z.ZodString>;
14
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"typeform", z.ZodObject<{
14
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:typeform", z.ZodObject<{
15
15
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
16
16
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
17
17
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
package/dist/videos.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { o as omitUndefined } from "./shared-D0ONnQL8.mjs";
2
2
  import { createTypeformClient } from "./client.mjs";
3
- import { o as typeformVideoSchema } from "./workspace-C1CCnvgv.mjs";
4
- import { t as typeformOperation } from "./factory-B_dyn39A.mjs";
3
+ import { typeformVideoSchema } from "./schemas/index.mjs";
4
+ import { t as typeformOperation } from "./factory-C-RzHxwx.mjs";
5
5
  import { z } from "zod";
6
6
 
7
7
  //#region src/videos.ts
@@ -16,7 +16,7 @@ declare const listWebhooks: _keystrokehq_core0.Operation<z.ZodObject<{
16
16
  created_at: z.ZodOptional<z.ZodString>;
17
17
  updated_at: z.ZodOptional<z.ZodString>;
18
18
  }, z.core.$catchall<z.ZodUnknown>>>;
19
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"typeform", z.ZodObject<{
19
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:typeform", z.ZodObject<{
20
20
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
21
21
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
22
22
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
@@ -33,7 +33,7 @@ declare const getWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
33
33
  verify_ssl: z.ZodOptional<z.ZodBoolean>;
34
34
  created_at: z.ZodOptional<z.ZodString>;
35
35
  updated_at: z.ZodOptional<z.ZodString>;
36
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"typeform", z.ZodObject<{
36
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:typeform", z.ZodObject<{
37
37
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
38
38
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
39
39
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
@@ -54,7 +54,7 @@ declare const createOrUpdateWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
54
54
  verify_ssl: z.ZodOptional<z.ZodBoolean>;
55
55
  created_at: z.ZodOptional<z.ZodString>;
56
56
  updated_at: z.ZodOptional<z.ZodString>;
57
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"typeform", z.ZodObject<{
57
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:typeform", z.ZodObject<{
58
58
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
59
59
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
60
60
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
@@ -64,7 +64,7 @@ declare const deleteWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
64
64
  tag: z.ZodString;
65
65
  }, z.core.$strip>, z.ZodObject<{
66
66
  success: z.ZodBoolean;
67
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"typeform", z.ZodObject<{
67
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:typeform", z.ZodObject<{
68
68
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
69
69
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
70
70
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
package/dist/webhooks.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { o as omitUndefined, r as asRecord } from "./shared-D0ONnQL8.mjs";
2
2
  import { createTypeformClient } from "./client.mjs";
3
- import { a as typeformWebhookSchema, i as typeformWebhookListSchema, k as typeformIdentifierSchema } from "./workspace-C1CCnvgv.mjs";
4
- import { t as typeformOperation } from "./factory-B_dyn39A.mjs";
3
+ import { typeformIdentifierSchema, typeformWebhookListSchema, typeformWebhookSchema } from "./schemas/index.mjs";
4
+ import { t as typeformOperation } from "./factory-C-RzHxwx.mjs";
5
5
  import { z } from "zod";
6
6
 
7
7
  //#region src/webhooks.ts
@@ -29,7 +29,7 @@ declare const listWorkspaces: _keystrokehq_core0.Operation<z.ZodObject<{
29
29
  totalItems: z.ZodOptional<z.ZodNumber>;
30
30
  pageCount: z.ZodOptional<z.ZodNumber>;
31
31
  }, z.core.$strip>>;
32
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"typeform", z.ZodObject<{
32
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:typeform", z.ZodObject<{
33
33
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
34
34
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
35
35
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
@@ -50,7 +50,7 @@ declare const getWorkspace: _keystrokehq_core0.Operation<z.ZodObject<{
50
50
  email: z.ZodOptional<z.ZodString>;
51
51
  role: z.ZodOptional<z.ZodString>;
52
52
  }, z.core.$catchall<z.ZodUnknown>>>>;
53
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"typeform", z.ZodObject<{
53
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:typeform", z.ZodObject<{
54
54
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
55
55
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
56
56
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
@@ -71,7 +71,7 @@ declare const createWorkspace: _keystrokehq_core0.Operation<z.ZodObject<{
71
71
  email: z.ZodOptional<z.ZodString>;
72
72
  role: z.ZodOptional<z.ZodString>;
73
73
  }, z.core.$catchall<z.ZodUnknown>>>>;
74
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"typeform", z.ZodObject<{
74
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:typeform", z.ZodObject<{
75
75
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
76
76
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
77
77
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
@@ -93,7 +93,7 @@ declare const createAccountWorkspace: _keystrokehq_core0.Operation<z.ZodObject<{
93
93
  email: z.ZodOptional<z.ZodString>;
94
94
  role: z.ZodOptional<z.ZodString>;
95
95
  }, z.core.$catchall<z.ZodUnknown>>>>;
96
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"typeform", z.ZodObject<{
96
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:typeform", z.ZodObject<{
97
97
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
98
98
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
99
99
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
@@ -127,7 +127,7 @@ declare const updateWorkspace: _keystrokehq_core0.Operation<z.ZodObject<{
127
127
  email: z.ZodOptional<z.ZodString>;
128
128
  role: z.ZodOptional<z.ZodString>;
129
129
  }, z.core.$catchall<z.ZodUnknown>>>>;
130
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"typeform", z.ZodObject<{
130
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:typeform", z.ZodObject<{
131
131
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
132
132
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
133
133
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
@@ -136,7 +136,7 @@ declare const deleteWorkspace: _keystrokehq_core0.Operation<z.ZodObject<{
136
136
  workspaceId: z.ZodString;
137
137
  }, z.core.$strip>, z.ZodObject<{
138
138
  success: z.ZodBoolean;
139
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"typeform", z.ZodObject<{
139
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:typeform", z.ZodObject<{
140
140
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
141
141
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
142
142
  TYPEFORM_ACCESS_TOKEN: z.ZodString;
@@ -1,7 +1,7 @@
1
1
  import { a as mapPagePagination, o as omitUndefined, r as asRecord } from "./shared-D0ONnQL8.mjs";
2
2
  import { createTypeformClient } from "./client.mjs";
3
- import { k as typeformIdentifierSchema, r as typeformWorkspaceSchema, t as typeformWorkspaceListSchema } from "./workspace-C1CCnvgv.mjs";
4
- import { t as typeformOperation } from "./factory-B_dyn39A.mjs";
3
+ import { typeformIdentifierSchema, typeformWorkspaceListSchema, typeformWorkspaceSchema } from "./schemas/index.mjs";
4
+ import { t as typeformOperation } from "./factory-C-RzHxwx.mjs";
5
5
  import { z } from "zod";
6
6
 
7
7
  //#region src/workspaces.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/typeform",
3
- "version": "0.0.1",
3
+ "version": "0.0.5",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -33,10 +33,6 @@
33
33
  "types": "./dist/events.d.mts",
34
34
  "default": "./dist/events.mjs"
35
35
  },
36
- "./triggers": {
37
- "types": "./dist/triggers.d.mts",
38
- "default": "./dist/triggers.mjs"
39
- },
40
36
  "./verification": {
41
37
  "types": "./dist/verification.d.mts",
42
38
  "default": "./dist/verification.mjs"
@@ -87,27 +83,21 @@
87
83
  "README.md",
88
84
  "LICENSE"
89
85
  ],
90
- "scripts": {
91
- "typecheck": "tsgo --build",
92
- "build": "tsdown",
93
- "lint": "biome check .",
94
- "test:unit": "vitest run --passWithNoTests --project unit",
95
- "test:int": "vitest run --passWithNoTests --project int",
96
- "prepublishOnly": "pnpm build && pnpm test:unit",
97
- "lint:fix": "biome check --write ."
98
- },
99
86
  "dependencies": {
100
- "@keystrokehq/integration-authoring": "^0.0.1",
101
- "@keystrokehq/core": "^0.0.5",
87
+ "@keystrokehq/integration-authoring": "^0.0.5",
102
88
  "zod": "^4.3.6"
103
89
  },
90
+ "peerDependencies": {
91
+ "@keystrokehq/core": ">=0.0.7 <0.1.0"
92
+ },
104
93
  "devDependencies": {
105
- "@types/node": "catalog:",
106
- "@keystrokehq/test-utils": "workspace:*",
107
- "@keystrokehq/typescript-config": "workspace:*",
108
- "tsdown": "catalog:",
109
- "typescript": "catalog:",
110
- "vitest": "catalog:"
94
+ "@types/node": "^22.19.11",
95
+ "tsdown": "^0.20.3",
96
+ "typescript": "^5.9.3",
97
+ "vitest": "^4.0.18",
98
+ "@keystrokehq/core": "^0.0.7",
99
+ "@keystrokehq/test-utils": "0.0.0",
100
+ "@keystrokehq/typescript-config": "0.0.0"
111
101
  },
112
102
  "keywords": [
113
103
  "typeform",
@@ -127,5 +117,13 @@
127
117
  "publishConfig": {
128
118
  "access": "public",
129
119
  "registry": "https://registry.npmjs.org/"
120
+ },
121
+ "scripts": {
122
+ "typecheck": "tsgo --build",
123
+ "build": "tsdown",
124
+ "lint": "biome check .",
125
+ "test:unit": "vitest run --passWithNoTests --project unit",
126
+ "test:int": "vitest run --passWithNoTests --project int",
127
+ "lint:fix": "biome check --write ."
130
128
  }
131
- }
129
+ }
@@ -1,35 +0,0 @@
1
- import { z } from "zod";
2
- import { CredentialSet } from "@keystrokehq/core";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
-
5
- //#region src/_official/provider-app.d.ts
6
- declare const typeformAppCredentialSet: CredentialSet<"typeform-app", z.ZodObject<{
7
- clientId: z.ZodString;
8
- clientSecret: z.ZodString;
9
- webhookSecret: z.ZodOptional<z.ZodString>;
10
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
11
- clientId: z.ZodString;
12
- clientSecret: z.ZodString;
13
- webhookSecret: z.ZodOptional<z.ZodString>;
14
- }, z.core.$strip>>[] | undefined>;
15
- declare const typeformPlatformProviderSeed: {
16
- readonly provider: "typeform";
17
- readonly appRef: "typeform-platform";
18
- readonly displayName: "Typeform Platform";
19
- readonly credentialSetName: "Keystroke Typeform Platform App";
20
- readonly envShape: {
21
- readonly KEYSTROKE_PLATFORM_TYPEFORM_CLIENT_ID: z.ZodOptional<z.ZodString>;
22
- readonly KEYSTROKE_PLATFORM_TYPEFORM_CLIENT_SECRET: z.ZodOptional<z.ZodString>;
23
- readonly KEYSTROKE_PLATFORM_TYPEFORM_WEBHOOK_SECRET: z.ZodOptional<z.ZodString>;
24
- };
25
- readonly requiredEnvKeys: readonly ["KEYSTROKE_PLATFORM_TYPEFORM_CLIENT_ID", "KEYSTROKE_PLATFORM_TYPEFORM_CLIENT_SECRET"];
26
- readonly externalAppIdEnvKey: "KEYSTROKE_PLATFORM_TYPEFORM_CLIENT_ID";
27
- readonly buildCredentials: (env: Record<string, string | undefined>) => {
28
- webhookSecret?: string | undefined;
29
- clientId: string | undefined;
30
- clientSecret: string | undefined;
31
- };
32
- };
33
- type TypeformAppCredentials = z.infer<typeof typeformAppCredentialSet.auth>;
34
- //#endregion
35
- export { typeformAppCredentialSet as n, typeformPlatformProviderSeed as r, TypeformAppCredentials as t };
@@ -1,21 +0,0 @@
1
- import { n as typeform } from "./integration-d_VqlGvZ.mjs";
2
- import { n as typeformAppCredentialSet } from "./provider-app-BnLMYj3B.mjs";
3
- import { typeformFormResponseEventSchema, typeformFormResponseWebhookEnvelopeSchema } from "./events.mjs";
4
- import { z } from "zod";
5
- import { BoundTrigger, WebhookRequest } from "@keystrokehq/core";
6
- import { IntegrationTriggerBindingOptions } from "@keystrokehq/integration-authoring";
7
- import { WebhookTriggerManifest } from "@keystrokehq/core/trigger";
8
-
9
- //#region src/triggers.d.ts
10
- type TypeformWebhookCredentialSets = readonly [typeof typeform, typeof typeformAppCredentialSet];
11
- type TypeformFormResponseEvent = z.output<typeof typeformFormResponseEventSchema>;
12
- type TypeformFormResponseEnvelope = z.output<typeof typeformFormResponseWebhookEnvelopeSchema>;
13
- type TypeformWebhookBindingOptions<TPayload, TOutput = TPayload> = IntegrationTriggerBindingOptions<TPayload, TOutput, WebhookRequest>;
14
- type TypeformWebhookBoundTrigger<TPayload, TOutput = TPayload> = BoundTrigger<TypeformFormResponseEnvelope, TypeformWebhookCredentialSets, WebhookTriggerManifest, TOutput, WebhookRequest>;
15
- type TypeformFormResponseBindingSurface = <TOutput = TypeformFormResponseEvent>(options?: TypeformWebhookBindingOptions<TypeformFormResponseEvent, TOutput>) => TypeformWebhookBoundTrigger<TypeformFormResponseEvent, TOutput>;
16
- interface TypeformWebhookNamespace {
17
- readonly formResponseSubmitted: TypeformFormResponseBindingSurface;
18
- }
19
- declare const webhooks: TypeformWebhookNamespace;
20
- //#endregion
21
- export { TypeformWebhookNamespace, webhooks };
package/dist/triggers.mjs DELETED
@@ -1,45 +0,0 @@
1
- import { i as typeformAppCredentialSet, t as typeform } from "./integration-BCzgn7Dm.mjs";
2
- import { typeformFormResponseEventSchema, typeformFormResponseWebhookEnvelopeSchema } from "./events.mjs";
3
- import { verifyTypeformWebhookRequest } from "./verification.mjs";
4
- import { createWebhookTriggerBindingFactory } from "@keystrokehq/integration-authoring";
5
-
6
- //#region src/triggers.ts
7
- function mapFormResponseEvent(payload) {
8
- if (payload.event_type !== "form_response") return null;
9
- const response = payload.form_response;
10
- return typeformFormResponseEventSchema.parse({
11
- eventId: payload.event_id,
12
- eventType: payload.event_type,
13
- formId: response.form_id,
14
- token: response.token,
15
- ...response.landed_at !== void 0 ? { landedAt: response.landed_at } : {},
16
- ...response.submitted_at !== void 0 ? { submittedAt: response.submitted_at } : {},
17
- ...response.answers !== void 0 ? { answers: response.answers } : {},
18
- ...response.hidden !== void 0 ? { hidden: response.hidden } : {},
19
- ...response.calculated !== void 0 ? { calculated: response.calculated } : {},
20
- ...response.variables !== void 0 ? { variables: response.variables } : {},
21
- ...response.ending !== void 0 ? { ending: response.ending } : {},
22
- ...response.definition !== void 0 ? { definition: response.definition } : {}
23
- });
24
- }
25
- const formResponseSubmittedBinding = createWebhookTriggerBindingFactory({
26
- defaultName: "Typeform Form Response Submitted",
27
- defaultDescription: "Fires when a respondent completes and submits a Typeform form.",
28
- path: "/typeform",
29
- method: "POST",
30
- payload: typeformFormResponseWebhookEnvelopeSchema,
31
- credentialSets: [typeform, typeformAppCredentialSet],
32
- verify: (request, ctx) => {
33
- const webhookSecret = ctx.credentials["typeform-app"].webhookSecret;
34
- if (!webhookSecret) throw new Error("Typeform webhook signing secret is not configured. Set KEYSTROKE_PLATFORM_TYPEFORM_WEBHOOK_SECRET on the Typeform App credential set before enabling webhook triggers.");
35
- if (!verifyTypeformWebhookRequest(request, webhookSecret)) throw new Error("Invalid Typeform webhook signature.");
36
- },
37
- definitionFilter: (payload) => payload.event_type === "form_response",
38
- mapPayload: mapFormResponseEvent,
39
- idempotencyKey: (payload) => `form_response:${payload.form_response.form_id}:${payload.form_response.token}`,
40
- response: { successStatus: 200 }
41
- });
42
- const webhooks = Object.freeze({ formResponseSubmitted: (options) => formResponseSubmittedBinding(options) });
43
-
44
- //#endregion
45
- export { webhooks };
@@ -1,271 +0,0 @@
1
- import { z } from "zod";
2
-
3
- //#region src/schemas/shared.ts
4
- const typeformIdentifierSchema = z.string().trim().min(1);
5
- const typeformDateTimeSchema = z.string().trim().min(1);
6
- function typeformLooseObjectSchema(shape = {}) {
7
- return z.object(shape).catchall(z.unknown());
8
- }
9
- const typeformPagePaginationSchema = z.object({
10
- page: z.number().int().nonnegative().optional(),
11
- pageSize: z.number().int().positive().optional(),
12
- totalItems: z.number().int().nonnegative().optional(),
13
- pageCount: z.number().int().nonnegative().optional()
14
- });
15
- const typeformCursorPaginationSchema = z.object({
16
- pageSize: z.number().int().positive().optional(),
17
- totalItems: z.number().int().nonnegative().optional(),
18
- pageCount: z.number().int().nonnegative().optional(),
19
- before: z.string().optional(),
20
- after: z.string().optional()
21
- });
22
- const typeformErrorSchema = z.object({
23
- code: z.string().min(1),
24
- description: z.string().min(1),
25
- details: z.array(z.object({
26
- code: z.string().optional(),
27
- description: z.string().optional(),
28
- field: z.string().optional()
29
- })).optional()
30
- });
31
- const typeformFieldTypeSchema = z.enum([
32
- "date",
33
- "dropdown",
34
- "email",
35
- "file_upload",
36
- "group",
37
- "legal",
38
- "long_text",
39
- "matrix",
40
- "multiple_choice",
41
- "number",
42
- "opinion_scale",
43
- "payment",
44
- "phone_number",
45
- "picture_choice",
46
- "rating",
47
- "ranking",
48
- "short_text",
49
- "statement",
50
- "website",
51
- "yes_no",
52
- "nps",
53
- "ending"
54
- ]);
55
- const typeformThemeFontSchema = z.string().trim().min(1);
56
- const typeformImageSizeSchema = z.enum([
57
- "default",
58
- "thumbnail",
59
- "mobile"
60
- ]);
61
- const typeformImageChoiceSizeSchema = z.enum([
62
- "default",
63
- "thumbnail",
64
- "supersize",
65
- "supermobile",
66
- "supersizefit",
67
- "supermobilefit"
68
- ]);
69
- const typeformImageBackgroundSizeSchema = z.enum([
70
- "default",
71
- "thumbnail",
72
- "mobile",
73
- "tablet"
74
- ]);
75
-
76
- //#endregion
77
- //#region src/schemas/account.ts
78
- const typeformAccountSchema = typeformLooseObjectSchema({
79
- alias: z.string().optional(),
80
- email: z.string().optional(),
81
- language: z.string().optional(),
82
- user_id: z.string().optional()
83
- });
84
-
85
- //#endregion
86
- //#region src/schemas/form.ts
87
- const typeformFormRefSchema = typeformLooseObjectSchema({
88
- id: typeformIdentifierSchema,
89
- title: z.string().optional(),
90
- href: z.string().optional(),
91
- last_updated_at: z.string().optional(),
92
- self: typeformLooseObjectSchema({ href: z.string().optional() }).optional(),
93
- theme: typeformLooseObjectSchema({ href: z.string().optional() }).optional(),
94
- _links: typeformLooseObjectSchema().optional()
95
- });
96
- const typeformFormFieldSchema = typeformLooseObjectSchema({
97
- id: typeformIdentifierSchema,
98
- ref: z.string().optional(),
99
- title: z.string().optional(),
100
- type: typeformFieldTypeSchema,
101
- properties: typeformLooseObjectSchema().optional(),
102
- validations: typeformLooseObjectSchema().optional()
103
- });
104
- const typeformFormSchema = typeformLooseObjectSchema({
105
- id: typeformIdentifierSchema,
106
- title: z.string().optional(),
107
- language: z.string().optional(),
108
- workspace: typeformLooseObjectSchema({ href: z.string().optional() }).optional(),
109
- theme: typeformLooseObjectSchema({ href: z.string().optional() }).optional(),
110
- settings: typeformLooseObjectSchema().optional(),
111
- welcome_screens: z.array(typeformLooseObjectSchema()).optional(),
112
- thankyou_screens: z.array(typeformLooseObjectSchema()).optional(),
113
- fields: z.array(typeformFormFieldSchema).optional(),
114
- hidden: z.array(z.string()).optional(),
115
- variables: typeformLooseObjectSchema().optional(),
116
- logic: z.array(typeformLooseObjectSchema()).optional(),
117
- _links: typeformLooseObjectSchema({ display: z.string().optional() }).optional()
118
- });
119
- const typeformFormListSchema = z.object({
120
- items: z.array(typeformFormRefSchema),
121
- pagination: typeformPagePaginationSchema.optional()
122
- });
123
-
124
- //#endregion
125
- //#region src/schemas/image.ts
126
- const typeformImageSchema = typeformLooseObjectSchema({
127
- id: typeformIdentifierSchema,
128
- file_name: z.string().optional(),
129
- url: z.string().optional(),
130
- width: z.number().int().optional(),
131
- height: z.number().int().optional(),
132
- media_type: z.string().optional(),
133
- has_alpha: z.boolean().optional()
134
- });
135
- const typeformImageListSchema = z.object({ items: z.array(typeformImageSchema) });
136
-
137
- //#endregion
138
- //#region src/schemas/insights.ts
139
- const typeformFormMessagesSchema = typeformLooseObjectSchema();
140
-
141
- //#endregion
142
- //#region src/schemas/response.ts
143
- const typeformHiddenFieldsSchema = z.record(z.string(), z.string());
144
- const typeformAnswerFieldRefSchema = typeformLooseObjectSchema({
145
- id: typeformIdentifierSchema,
146
- ref: z.string().optional(),
147
- type: z.string().optional()
148
- });
149
- const typeformAnswerSchema = typeformLooseObjectSchema({
150
- field: typeformAnswerFieldRefSchema,
151
- type: z.string().optional(),
152
- text: z.string().optional(),
153
- email: z.string().optional(),
154
- url: z.string().optional(),
155
- phone_number: z.string().optional(),
156
- number: z.number().optional(),
157
- boolean: z.boolean().optional(),
158
- date: z.string().optional(),
159
- choice: typeformLooseObjectSchema({
160
- label: z.string().optional(),
161
- other: z.string().optional()
162
- }).optional(),
163
- choices: typeformLooseObjectSchema({
164
- labels: z.array(z.string()).optional(),
165
- other: z.string().optional()
166
- }).optional(),
167
- file_url: z.string().optional(),
168
- payment: typeformLooseObjectSchema().optional()
169
- });
170
- const typeformVariableSchema = typeformLooseObjectSchema({
171
- key: z.string(),
172
- type: z.string().optional(),
173
- number: z.number().optional(),
174
- text: z.string().optional()
175
- });
176
- const typeformCalculatedSchema = typeformLooseObjectSchema({ score: z.number().optional() });
177
- const typeformResponseSchema = typeformLooseObjectSchema({
178
- response_id: z.string().optional(),
179
- token: z.string().optional(),
180
- landed_at: z.string().optional(),
181
- submitted_at: z.string().optional(),
182
- metadata: typeformLooseObjectSchema().optional(),
183
- hidden: typeformHiddenFieldsSchema.optional(),
184
- calculated: typeformCalculatedSchema.optional(),
185
- variables: z.array(typeformVariableSchema).optional(),
186
- answers: z.array(typeformAnswerSchema).optional(),
187
- definition: typeformLooseObjectSchema().optional(),
188
- ending: typeformLooseObjectSchema().optional()
189
- });
190
- const typeformResponseListSchema = z.object({
191
- items: z.array(typeformResponseSchema),
192
- totalItems: z.number().int().nonnegative().optional(),
193
- pageCount: z.number().int().nonnegative().optional(),
194
- pagination: typeformCursorPaginationSchema.optional()
195
- });
196
-
197
- //#endregion
198
- //#region src/schemas/theme.ts
199
- const typeformThemeColorsSchema = z.object({
200
- answer: z.string().optional(),
201
- background: z.string().optional(),
202
- button: z.string().optional(),
203
- question: z.string().optional()
204
- });
205
- const typeformThemeSchema = typeformLooseObjectSchema({
206
- id: typeformIdentifierSchema,
207
- name: z.string().optional(),
208
- visibility: z.enum(["public", "private"]).optional(),
209
- has_transparent_button: z.boolean().optional(),
210
- background: typeformLooseObjectSchema({
211
- brightness: z.number().optional(),
212
- href: z.string().optional(),
213
- layout: z.string().optional()
214
- }).optional(),
215
- colors: typeformThemeColorsSchema.optional(),
216
- fields: typeformLooseObjectSchema().optional(),
217
- font: typeformThemeFontSchema.optional()
218
- });
219
- const typeformThemeListSchema = z.object({
220
- items: z.array(typeformThemeSchema),
221
- pagination: typeformPagePaginationSchema.optional()
222
- });
223
-
224
- //#endregion
225
- //#region src/schemas/video.ts
226
- const typeformVideoSchema = typeformLooseObjectSchema({
227
- id: typeformIdentifierSchema,
228
- url: z.string().optional(),
229
- source: z.string().optional(),
230
- embed_url: z.string().optional()
231
- });
232
-
233
- //#endregion
234
- //#region src/schemas/webhook.ts
235
- const typeformWebhookSchema = typeformLooseObjectSchema({
236
- id: typeformIdentifierSchema,
237
- form_id: z.string().optional(),
238
- tag: z.string().optional(),
239
- url: z.string().optional(),
240
- enabled: z.boolean().optional(),
241
- verify_ssl: z.boolean().optional(),
242
- created_at: z.string().optional(),
243
- updated_at: z.string().optional()
244
- });
245
- const typeformWebhookListSchema = z.object({ items: z.array(typeformWebhookSchema) });
246
-
247
- //#endregion
248
- //#region src/schemas/workspace.ts
249
- const typeformWorkspaceMemberSchema = typeformLooseObjectSchema({
250
- email: z.string().optional(),
251
- role: z.string().optional()
252
- });
253
- const typeformWorkspaceSchema = typeformLooseObjectSchema({
254
- id: typeformIdentifierSchema,
255
- name: z.string().optional(),
256
- default: z.boolean().optional(),
257
- account_id: z.string().optional(),
258
- shared: z.boolean().optional(),
259
- forms: typeformLooseObjectSchema({
260
- count: z.number().int().optional(),
261
- href: z.string().optional()
262
- }).optional(),
263
- members: z.array(typeformWorkspaceMemberSchema).optional()
264
- });
265
- const typeformWorkspaceListSchema = z.object({
266
- items: z.array(typeformWorkspaceSchema),
267
- pagination: typeformPagePaginationSchema.optional()
268
- });
269
-
270
- //#endregion
271
- export { typeformImageBackgroundSizeSchema as A, typeformFormSchema as C, typeformErrorSchema as D, typeformDateTimeSchema as E, typeformThemeFontSchema as F, typeformImageSizeSchema as M, typeformLooseObjectSchema as N, typeformFieldTypeSchema as O, typeformPagePaginationSchema as P, typeformFormRefSchema as S, typeformCursorPaginationSchema as T, typeformFormMessagesSchema as _, typeformWebhookSchema as a, typeformFormFieldSchema as b, typeformThemeListSchema as c, typeformAnswerSchema as d, typeformCalculatedSchema as f, typeformVariableSchema as g, typeformResponseSchema as h, typeformWebhookListSchema as i, typeformImageChoiceSizeSchema as j, typeformIdentifierSchema as k, typeformThemeSchema as l, typeformResponseListSchema as m, typeformWorkspaceMemberSchema as n, typeformVideoSchema as o, typeformHiddenFieldsSchema as p, typeformWorkspaceSchema as r, typeformThemeColorsSchema as s, typeformWorkspaceListSchema as t, typeformAnswerFieldRefSchema as u, typeformImageListSchema as v, typeformAccountSchema as w, typeformFormListSchema as x, typeformImageSchema as y };