@zapier/zapier-sdk 0.13.3 → 0.13.4

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.
Files changed (71) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/api/schemas.d.ts +174 -174
  3. package/dist/constants.d.ts +4 -0
  4. package/dist/constants.d.ts.map +1 -1
  5. package/dist/constants.js +4 -0
  6. package/dist/index.cjs +436 -5
  7. package/dist/index.d.mts +380 -156
  8. package/dist/index.d.ts +3 -0
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +1 -0
  11. package/dist/index.mjs +407 -9
  12. package/dist/plugins/api/index.d.ts +1 -3
  13. package/dist/plugins/api/index.d.ts.map +1 -1
  14. package/dist/plugins/eventEmission/builders.d.ts +13 -0
  15. package/dist/plugins/eventEmission/builders.d.ts.map +1 -0
  16. package/dist/plugins/eventEmission/builders.js +78 -0
  17. package/dist/plugins/eventEmission/index.d.ts +34 -0
  18. package/dist/plugins/eventEmission/index.d.ts.map +1 -0
  19. package/dist/plugins/eventEmission/index.js +216 -0
  20. package/dist/plugins/eventEmission/index.test.d.ts +5 -0
  21. package/dist/plugins/eventEmission/index.test.d.ts.map +1 -0
  22. package/dist/plugins/eventEmission/index.test.js +143 -0
  23. package/dist/plugins/eventEmission/transport.d.ts +37 -0
  24. package/dist/plugins/eventEmission/transport.d.ts.map +1 -0
  25. package/dist/plugins/eventEmission/transport.js +96 -0
  26. package/dist/plugins/eventEmission/transport.test.d.ts +5 -0
  27. package/dist/plugins/eventEmission/transport.test.d.ts.map +1 -0
  28. package/dist/plugins/eventEmission/transport.test.js +153 -0
  29. package/dist/plugins/eventEmission/types.d.ts +53 -0
  30. package/dist/plugins/eventEmission/types.d.ts.map +1 -0
  31. package/dist/plugins/eventEmission/types.js +1 -0
  32. package/dist/plugins/eventEmission/utils.d.ts +45 -0
  33. package/dist/plugins/eventEmission/utils.d.ts.map +1 -0
  34. package/dist/plugins/eventEmission/utils.js +114 -0
  35. package/dist/plugins/fetch/schemas.d.ts +4 -4
  36. package/dist/plugins/getAction/schemas.d.ts +2 -2
  37. package/dist/plugins/listActions/schemas.d.ts +2 -2
  38. package/dist/plugins/listInputFieldChoices/schemas.d.ts +4 -4
  39. package/dist/plugins/listInputFields/schemas.d.ts +2 -2
  40. package/dist/plugins/request/schemas.d.ts +4 -4
  41. package/dist/plugins/runAction/schemas.d.ts +2 -2
  42. package/dist/resolvers/actionType.d.ts.map +1 -1
  43. package/dist/resolvers/actionType.js +2 -3
  44. package/dist/resolvers/authenticationId.d.ts.map +1 -1
  45. package/dist/schemas/Action.d.ts +2 -2
  46. package/dist/schemas/App.d.ts +30 -30
  47. package/dist/sdk.d.ts +2 -2
  48. package/dist/sdk.d.ts.map +1 -1
  49. package/dist/sdk.js +4 -1
  50. package/dist/types/sdk.d.ts +5 -1
  51. package/dist/types/sdk.d.ts.map +1 -1
  52. package/dist/types/telemetry-events.d.ts +76 -0
  53. package/dist/types/telemetry-events.d.ts.map +1 -0
  54. package/dist/types/telemetry-events.js +8 -0
  55. package/package.json +1 -1
  56. package/src/constants.ts +6 -0
  57. package/src/index.ts +24 -0
  58. package/src/plugins/api/index.ts +1 -5
  59. package/src/plugins/eventEmission/builders.ts +115 -0
  60. package/src/plugins/eventEmission/index.test.ts +169 -0
  61. package/src/plugins/eventEmission/index.ts +294 -0
  62. package/src/plugins/eventEmission/transport.test.ts +214 -0
  63. package/src/plugins/eventEmission/transport.ts +135 -0
  64. package/src/plugins/eventEmission/types.ts +58 -0
  65. package/src/plugins/eventEmission/utils.ts +121 -0
  66. package/src/resolvers/actionType.ts +4 -3
  67. package/src/resolvers/authenticationId.ts +2 -1
  68. package/src/sdk.ts +5 -1
  69. package/src/types/sdk.ts +7 -1
  70. package/src/types/telemetry-events.ts +85 -0
  71. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,53 @@
1
+ export interface EventContext {
2
+ customuser_id?: number | null;
3
+ account_id?: number | null;
4
+ identity_id?: number | null;
5
+ visitor_id?: string | null;
6
+ correlation_id?: string | null;
7
+ selected_api?: string | null;
8
+ app_id?: number | null;
9
+ app_version_id?: number | null;
10
+ zap_id?: number | null;
11
+ node_id?: number | null;
12
+ environment?: string | null;
13
+ sdk_version?: string | null;
14
+ operation_type?: string | null;
15
+ }
16
+ export interface ErrorEventData {
17
+ error_message: string;
18
+ is_user_facing: boolean;
19
+ error_type?: string | null;
20
+ error_status_code?: number | null;
21
+ error_stack_trace?: string | null;
22
+ error_source_method?: string | null;
23
+ error_source_file?: string | null;
24
+ error_line_number?: number | null;
25
+ operation_type?: string | null;
26
+ operation_key?: string | null;
27
+ error_severity?: string | null;
28
+ is_recoverable?: boolean | null;
29
+ error_metadata?: Record<string, string | null> | null;
30
+ parent_error_id?: string | null;
31
+ error_occurred_timestamp_ms?: number | null;
32
+ error_code?: string | null;
33
+ recovery_attempted?: boolean | null;
34
+ recovery_action?: string | null;
35
+ recovery_successful?: boolean | null;
36
+ execution_time_before_error_ms?: number | null;
37
+ }
38
+ export interface EnhancedErrorEventData extends ErrorEventData {
39
+ execution_start_time?: number | null;
40
+ }
41
+ export interface ApplicationLifecycleEventData {
42
+ lifecycle_event_type: "startup" | "exit" | "signal_termination";
43
+ exit_code?: number | null;
44
+ signal_name?: string | null;
45
+ uptime_ms?: number | null;
46
+ is_graceful_shutdown?: boolean | null;
47
+ shutdown_duration_ms?: number | null;
48
+ memory_usage_bytes?: number | null;
49
+ peak_memory_usage_bytes?: number | null;
50
+ cpu_time_ms?: number | null;
51
+ active_requests_count?: number | null;
52
+ }
53
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/plugins/eventEmission/types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,YAAY;IAC3B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,W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,MAAM,GAAG,IAAI,CAAC;IAChC,2BAA2B,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACpC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,mBAAmB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACrC,8BAA8B,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChD;AAGD,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,WAAW,6BAA6B;IAC5C,oBAAoB,EAAE,SAAS,GAAG,MAAM,GAAG,oBAAoB,CAAC;IAChE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,oBAAoB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,uBAAuB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Simple utility functions for event emission
3
+ * These are pure functions that can be used to populate common event fields
4
+ */
5
+ /**
6
+ * Generate a unique event ID
7
+ */
8
+ export declare function generateEventId(): string;
9
+ /**
10
+ * Get current timestamp in milliseconds since epoch
11
+ */
12
+ export declare function getCurrentTimestamp(): number;
13
+ /**
14
+ * Get release ID (git SHA) - in production this would come from build process
15
+ */
16
+ export declare function getReleaseId(): string;
17
+ /**
18
+ * Get operating system information
19
+ */
20
+ export declare function getOsInfo(): {
21
+ platform: string | null;
22
+ release: string | null;
23
+ architecture: string | null;
24
+ };
25
+ /**
26
+ * Get platform versions (Node.js, npm, etc.)
27
+ */
28
+ export declare function getPlatformVersions(): Record<string, string | null>;
29
+ /**
30
+ * Check if running in CI environment
31
+ */
32
+ export declare function isCi(): boolean;
33
+ /**
34
+ * Get CI platform name if running in CI
35
+ */
36
+ export declare function getCiPlatform(): string | null;
37
+ /**
38
+ * Get memory usage in bytes
39
+ */
40
+ export declare function getMemoryUsage(): number | null;
41
+ /**
42
+ * Get CPU time in milliseconds
43
+ */
44
+ export declare function getCpuTime(): number | null;
45
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/plugins/eventEmission/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI;IAC3B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,CAeA;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAQnE;AAED;;GAEG;AACH,wBAAgB,IAAI,IAAI,OAAO,CAa9B;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,GAAG,IAAI,CAY7C;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,GAAG,IAAI,CAM9C;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,GAAG,IAAI,CAM1C"}
@@ -0,0 +1,114 @@
1
+ /**
2
+ * Simple utility functions for event emission
3
+ * These are pure functions that can be used to populate common event fields
4
+ */
5
+ import * as os from "os";
6
+ /**
7
+ * Generate a unique event ID
8
+ */
9
+ export function generateEventId() {
10
+ return crypto.randomUUID();
11
+ }
12
+ /**
13
+ * Get current timestamp in milliseconds since epoch
14
+ */
15
+ export function getCurrentTimestamp() {
16
+ return Date.now();
17
+ }
18
+ /**
19
+ * Get release ID (git SHA) - in production this would come from build process
20
+ */
21
+ export function getReleaseId() {
22
+ return process?.env?.SDK_RELEASE_ID || "development";
23
+ }
24
+ /**
25
+ * Get operating system information
26
+ */
27
+ export function getOsInfo() {
28
+ try {
29
+ return {
30
+ platform: os.platform() || null,
31
+ release: os.release() || null,
32
+ architecture: os.arch() || null,
33
+ };
34
+ }
35
+ catch {
36
+ // Browser environment - os module not available
37
+ return {
38
+ platform: null,
39
+ release: null,
40
+ architecture: null,
41
+ };
42
+ }
43
+ }
44
+ /**
45
+ * Get platform versions (Node.js, npm, etc.)
46
+ */
47
+ export function getPlatformVersions() {
48
+ const versions = {};
49
+ if (typeof process?.versions === "object") {
50
+ for (const [key, value] of Object.entries(process.versions)) {
51
+ versions[key] = value || null;
52
+ }
53
+ }
54
+ return versions;
55
+ }
56
+ /**
57
+ * Check if running in CI environment
58
+ */
59
+ export function isCi() {
60
+ return !!(process?.env?.CI ||
61
+ process?.env?.CONTINUOUS_INTEGRATION ||
62
+ process?.env?.GITHUB_ACTIONS ||
63
+ process?.env?.JENKINS_URL ||
64
+ process?.env?.GITLAB_CI ||
65
+ process?.env?.CIRCLECI ||
66
+ process?.env?.TRAVIS ||
67
+ process?.env?.BUILDKITE ||
68
+ process?.env?.DRONE ||
69
+ process?.env?.BITBUCKET_PIPELINES_UUID);
70
+ }
71
+ /**
72
+ * Get CI platform name if running in CI
73
+ */
74
+ export function getCiPlatform() {
75
+ if (process?.env?.GITHUB_ACTIONS)
76
+ return "github-actions";
77
+ if (process?.env?.JENKINS_URL)
78
+ return "jenkins";
79
+ if (process?.env?.GITLAB_CI)
80
+ return "gitlab-ci";
81
+ if (process?.env?.CIRCLECI)
82
+ return "circleci";
83
+ if (process?.env?.TRAVIS)
84
+ return "travis";
85
+ if (process?.env?.BUILDKITE)
86
+ return "buildkite";
87
+ if (process?.env?.DRONE)
88
+ return "drone";
89
+ if (process?.env?.BITBUCKET_PIPELINES_UUID)
90
+ return "bitbucket-pipelines";
91
+ if (process?.env?.CI || process?.env?.CONTINUOUS_INTEGRATION)
92
+ return "unknown-ci";
93
+ return null;
94
+ }
95
+ /**
96
+ * Get memory usage in bytes
97
+ */
98
+ export function getMemoryUsage() {
99
+ if (process?.memoryUsage) {
100
+ const usage = process.memoryUsage();
101
+ return usage.rss || null; // Resident Set Size
102
+ }
103
+ return null;
104
+ }
105
+ /**
106
+ * Get CPU time in milliseconds
107
+ */
108
+ export function getCpuTime() {
109
+ if (process?.cpuUsage) {
110
+ const usage = process.cpuUsage();
111
+ return Math.round((usage.user + usage.system) / 1000); // Convert to milliseconds
112
+ }
113
+ return null;
114
+ }
@@ -8,16 +8,16 @@ export declare const FetchInitSchema: z.ZodOptional<z.ZodObject<{
8
8
  callbackUrl: z.ZodOptional<z.ZodString>;
9
9
  authenticationTemplate: z.ZodOptional<z.ZodString>;
10
10
  }, "strip", z.ZodTypeAny, {
11
- method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
11
+ method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
12
12
  authenticationId?: number | undefined;
13
- body?: string | URLSearchParams | FormData | undefined;
13
+ body?: string | FormData | URLSearchParams | undefined;
14
14
  callbackUrl?: string | undefined;
15
15
  authenticationTemplate?: string | undefined;
16
16
  headers?: Record<string, string> | undefined;
17
17
  }, {
18
- method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
18
+ method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
19
19
  authenticationId?: number | undefined;
20
- body?: string | URLSearchParams | FormData | undefined;
20
+ body?: string | FormData | URLSearchParams | undefined;
21
21
  callbackUrl?: string | undefined;
22
22
  authenticationTemplate?: string | undefined;
23
23
  headers?: Record<string, string> | undefined;
@@ -9,11 +9,11 @@ export declare const GetActionSchema: z.ZodObject<{
9
9
  actionKey: z.ZodString;
10
10
  }, "strip", z.ZodTypeAny, {
11
11
  appKey: string;
12
- actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
12
+ actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
13
13
  actionKey: string;
14
14
  }, {
15
15
  appKey: string;
16
- actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
16
+ actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
17
17
  actionKey: string;
18
18
  }>;
19
19
  export type GetActionOptions = z.infer<typeof GetActionSchema>;
@@ -12,13 +12,13 @@ export declare const ListActionsSchema: z.ZodObject<{
12
12
  cursor: z.ZodOptional<z.ZodString>;
13
13
  }, "strip", z.ZodTypeAny, {
14
14
  appKey: string;
15
- actionType?: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write" | undefined;
15
+ actionType?: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write" | undefined;
16
16
  pageSize?: number | undefined;
17
17
  maxItems?: number | undefined;
18
18
  cursor?: string | undefined;
19
19
  }, {
20
20
  appKey: string;
21
- actionType?: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write" | undefined;
21
+ actionType?: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write" | undefined;
22
22
  pageSize?: number | undefined;
23
23
  maxItems?: number | undefined;
24
24
  cursor?: string | undefined;
@@ -7,13 +7,13 @@ export declare const InputFieldChoiceItemSchema: z.ZodObject<{
7
7
  sample: z.ZodOptional<z.ZodString>;
8
8
  value: z.ZodOptional<z.ZodString>;
9
9
  }, "strip", z.ZodTypeAny, {
10
- value?: string | undefined;
11
10
  key?: string | undefined;
11
+ value?: string | undefined;
12
12
  label?: string | undefined;
13
13
  sample?: string | undefined;
14
14
  }, {
15
- value?: string | undefined;
16
15
  key?: string | undefined;
16
+ value?: string | undefined;
17
17
  label?: string | undefined;
18
18
  sample?: string | undefined;
19
19
  }>;
@@ -33,7 +33,7 @@ export declare const ListInputFieldChoicesSchema: z.ZodObject<{
33
33
  cursor: z.ZodOptional<z.ZodString>;
34
34
  }, "strip", z.ZodTypeAny, {
35
35
  appKey: string;
36
- actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
36
+ actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
37
37
  actionKey: string;
38
38
  inputFieldKey: string;
39
39
  page?: number | undefined;
@@ -44,7 +44,7 @@ export declare const ListInputFieldChoicesSchema: z.ZodObject<{
44
44
  cursor?: string | undefined;
45
45
  }, {
46
46
  appKey: string;
47
- actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
47
+ actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
48
48
  actionKey: string;
49
49
  inputFieldKey: string;
50
50
  page?: number | undefined;
@@ -15,7 +15,7 @@ export declare const ListInputFieldsSchema: z.ZodObject<{
15
15
  cursor: z.ZodOptional<z.ZodString>;
16
16
  }, "strip", z.ZodTypeAny, {
17
17
  appKey: string;
18
- actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
18
+ actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
19
19
  actionKey: string;
20
20
  authenticationId?: number | null | undefined;
21
21
  inputs?: Record<string, unknown> | undefined;
@@ -24,7 +24,7 @@ export declare const ListInputFieldsSchema: z.ZodObject<{
24
24
  cursor?: string | undefined;
25
25
  }, {
26
26
  appKey: string;
27
- actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
27
+ actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
28
28
  actionKey: string;
29
29
  authenticationId?: number | null | undefined;
30
30
  inputs?: Record<string, unknown> | undefined;
@@ -12,7 +12,7 @@ export declare const RelayRequestSchema: z.ZodObject<{
12
12
  relayBaseUrl: z.ZodOptional<z.ZodString>;
13
13
  }, "strip", z.ZodTypeAny, {
14
14
  url: string;
15
- method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
15
+ method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
16
16
  authenticationId?: number | undefined;
17
17
  body?: any;
18
18
  callbackUrl?: string | undefined;
@@ -21,7 +21,7 @@ export declare const RelayRequestSchema: z.ZodObject<{
21
21
  relayBaseUrl?: string | undefined;
22
22
  }, {
23
23
  url: string;
24
- method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
24
+ method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
25
25
  authenticationId?: number | undefined;
26
26
  body?: any;
27
27
  callbackUrl?: string | undefined;
@@ -46,7 +46,7 @@ export declare const RelayFetchSchema: z.ZodObject<{
46
46
  relayBaseUrl: z.ZodOptional<z.ZodString>;
47
47
  }, "strip", z.ZodTypeAny, {
48
48
  url: string;
49
- method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
49
+ method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
50
50
  authenticationId?: number | undefined;
51
51
  body?: any;
52
52
  callbackUrl?: string | undefined;
@@ -55,7 +55,7 @@ export declare const RelayFetchSchema: z.ZodObject<{
55
55
  relayBaseUrl?: string | undefined;
56
56
  }, {
57
57
  url: string;
58
- method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
58
+ method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
59
59
  authenticationId?: number | undefined;
60
60
  body?: any;
61
61
  callbackUrl?: string | undefined;
@@ -14,7 +14,7 @@ export declare const RunActionSchema: z.ZodObject<{
14
14
  cursor: z.ZodOptional<z.ZodString>;
15
15
  }, "strip", z.ZodTypeAny, {
16
16
  appKey: string;
17
- actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
17
+ actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
18
18
  actionKey: string;
19
19
  authenticationId?: number | null | undefined;
20
20
  inputs?: Record<string, unknown> | undefined;
@@ -23,7 +23,7 @@ export declare const RunActionSchema: z.ZodObject<{
23
23
  cursor?: string | undefined;
24
24
  }, {
25
25
  appKey: string;
26
- actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
26
+ actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
27
27
  actionKey: string;
28
28
  authenticationId?: number | null | undefined;
29
29
  inputs?: Record<string, unknown> | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"actionType.d.ts","sourceRoot":"","sources":["../../src/resolvers/actionType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,UAAU,cAAc;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAC9C,cAAc,EACd;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAuBnB,CAAC"}
1
+ {"version":3,"file":"actionType.d.ts","sourceRoot":"","sources":["../../src/resolvers/actionType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,UAAU,cAAc;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAC9C,cAAc,EACd;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAwBnB,CAAC"}
@@ -5,9 +5,8 @@ export const actionTypeResolver = {
5
5
  const actionsResponse = await sdk.listActions({
6
6
  appKey: resolvedParams.appKey,
7
7
  });
8
- const types = [
9
- ...new Set(actionsResponse.data.map((action) => action.action_type)),
10
- ];
8
+ const actionTypes = actionsResponse.data.map((action) => action.action_type);
9
+ const types = [...new Set(actionTypes)];
11
10
  return types.map((type) => ({ key: type, name: type }));
12
11
  },
13
12
  prompt: (types) => ({
@@ -1 +1 @@
1
- {"version":3,"file":"authenticationId.d.ts","sourceRoot":"","sources":["../../src/resolvers/authenticationId.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,KAAK,wBAAwB,GAAG,eAAe,CAAC,QAAQ,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE/E,eAAO,MAAM,wBAAwB,EAAE,wBAyCtC,CAAC;AAGF,eAAO,MAAM,+BAA+B,EAAE,wBAG7C,CAAC"}
1
+ {"version":3,"file":"authenticationId.d.ts","sourceRoot":"","sources":["../../src/resolvers/authenticationId.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,KAAK,wBAAwB,GAAG,eAAe,CAAC,QAAQ,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE/E,eAAO,MAAM,wBAAwB,EAAE,wBA0CtC,CAAC;AAGF,eAAO,MAAM,+BAA+B,EAAE,wBAG7C,CAAC"}
@@ -20,7 +20,7 @@ export declare const ActionItemSchema: z.ZodObject<Omit<{
20
20
  description: string;
21
21
  title: string;
22
22
  app_key: string;
23
- action_type: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
23
+ action_type: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
24
24
  id?: string | undefined;
25
25
  is_important?: boolean | undefined;
26
26
  is_hidden?: boolean | undefined;
@@ -31,7 +31,7 @@ export declare const ActionItemSchema: z.ZodObject<Omit<{
31
31
  description: string;
32
32
  title: string;
33
33
  app_key: string;
34
- action_type: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
34
+ action_type: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
35
35
  id?: string | undefined;
36
36
  is_important?: boolean | undefined;
37
37
  is_hidden?: boolean | undefined;
@@ -63,19 +63,19 @@ export declare const AppItemSchema: z.ZodObject<Omit<{
63
63
  search_and_write: z.ZodOptional<z.ZodNumber>;
64
64
  filter: z.ZodOptional<z.ZodNumber>;
65
65
  }, "strip", z.ZodTypeAny, {
66
+ search?: number | undefined;
66
67
  filter?: number | undefined;
67
68
  read?: number | undefined;
68
69
  read_bulk?: number | undefined;
69
70
  write?: number | undefined;
70
- search?: number | undefined;
71
71
  search_or_write?: number | undefined;
72
72
  search_and_write?: number | undefined;
73
73
  }, {
74
+ search?: number | undefined;
74
75
  filter?: number | undefined;
75
76
  read?: number | undefined;
76
77
  read_bulk?: number | undefined;
77
78
  write?: number | undefined;
78
- search?: number | undefined;
79
79
  search_or_write?: number | undefined;
80
80
  search_and_write?: number | undefined;
81
81
  }>>;
@@ -94,16 +94,25 @@ export declare const AppItemSchema: z.ZodObject<Omit<{
94
94
  title: string;
95
95
  slug: string;
96
96
  implementation_id: string;
97
- description?: string | undefined;
98
- is_hidden?: boolean | undefined;
99
- age_in_days?: number | undefined;
100
- api_docs_url?: string | undefined;
101
- banner?: string | undefined;
102
97
  categories?: {
103
98
  id: number;
104
99
  name: string;
105
100
  slug: string;
106
101
  }[] | undefined;
102
+ actions?: {
103
+ search?: number | undefined;
104
+ filter?: number | undefined;
105
+ read?: number | undefined;
106
+ read_bulk?: number | undefined;
107
+ write?: number | undefined;
108
+ search_or_write?: number | undefined;
109
+ search_and_write?: number | undefined;
110
+ } | undefined;
111
+ description?: string | undefined;
112
+ is_hidden?: boolean | undefined;
113
+ age_in_days?: number | undefined;
114
+ api_docs_url?: string | undefined;
115
+ banner?: string | undefined;
107
116
  image?: string | undefined;
108
117
  images?: {
109
118
  url_16x16?: string | undefined;
@@ -120,15 +129,6 @@ export declare const AppItemSchema: z.ZodObject<Omit<{
120
129
  popularity?: number | undefined;
121
130
  primary_color?: string | undefined;
122
131
  auth_type?: string | undefined;
123
- actions?: {
124
- filter?: number | undefined;
125
- read?: number | undefined;
126
- read_bulk?: number | undefined;
127
- write?: number | undefined;
128
- search?: number | undefined;
129
- search_or_write?: number | undefined;
130
- search_and_write?: number | undefined;
131
- } | undefined;
132
132
  is_deprecated?: boolean | undefined;
133
133
  secondary_color?: string | undefined;
134
134
  has_filters?: boolean | undefined;
@@ -146,16 +146,25 @@ export declare const AppItemSchema: z.ZodObject<Omit<{
146
146
  title: string;
147
147
  slug: string;
148
148
  implementation_id: string;
149
- description?: string | undefined;
150
- is_hidden?: boolean | undefined;
151
- age_in_days?: number | undefined;
152
- api_docs_url?: string | undefined;
153
- banner?: string | undefined;
154
149
  categories?: {
155
150
  id: number;
156
151
  name: string;
157
152
  slug: string;
158
153
  }[] | undefined;
154
+ actions?: {
155
+ search?: number | undefined;
156
+ filter?: number | undefined;
157
+ read?: number | undefined;
158
+ read_bulk?: number | undefined;
159
+ write?: number | undefined;
160
+ search_or_write?: number | undefined;
161
+ search_and_write?: number | undefined;
162
+ } | undefined;
163
+ description?: string | undefined;
164
+ is_hidden?: boolean | undefined;
165
+ age_in_days?: number | undefined;
166
+ api_docs_url?: string | undefined;
167
+ banner?: string | undefined;
159
168
  image?: string | undefined;
160
169
  images?: {
161
170
  url_16x16?: string | undefined;
@@ -172,15 +181,6 @@ export declare const AppItemSchema: z.ZodObject<Omit<{
172
181
  popularity?: number | undefined;
173
182
  primary_color?: string | undefined;
174
183
  auth_type?: string | undefined;
175
- actions?: {
176
- filter?: number | undefined;
177
- read?: number | undefined;
178
- read_bulk?: number | undefined;
179
- write?: number | undefined;
180
- search?: number | undefined;
181
- search_or_write?: number | undefined;
182
- search_and_write?: number | undefined;
183
- } | undefined;
184
184
  is_deprecated?: boolean | undefined;
185
185
  secondary_color?: string | undefined;
186
186
  has_filters?: boolean | undefined;
package/dist/sdk.d.ts CHANGED
@@ -13,9 +13,9 @@ export declare function createSdk<TCurrentSdk = {}, TCurrentContext extends {
13
13
  getContext(): TCurrentContext;
14
14
  }, TRequiresContext, TProvides>, addPluginOptions?: Record<string, unknown>): Sdk<TCurrentSdk & ExtractSdkProperties<TProvides>, TCurrentContext & NonNullable<ExtractContextProperties<TProvides>>>;
15
15
  };
16
- export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk<ExtractSdkProperties<import(".").ApiPluginProvides> & ExtractSdkProperties<import(".").ManifestPluginProvides> & ExtractSdkProperties<import(".").ListAppsPluginProvides> & ExtractSdkProperties<import(".").GetAppPluginProvides> & ExtractSdkProperties<import(".").ListActionsPluginProvides> & ExtractSdkProperties<import(".").GetActionPluginProvides> & ExtractSdkProperties<import(".").ListInputFieldsPluginProvides> & ExtractSdkProperties<import("./plugins/listInputFieldChoices").ListInputFieldChoicesPluginProvides> & ExtractSdkProperties<import(".").RunActionPluginProvides> & ExtractSdkProperties<import(".").ListAuthenticationsPluginProvides> & ExtractSdkProperties<import(".").GetAuthenticationPluginProvides> & ExtractSdkProperties<import(".").FindFirstAuthenticationPluginProvides> & ExtractSdkProperties<import(".").FindUniqueAuthenticationPluginProvides> & ExtractSdkProperties<import(".").RequestPluginProvides> & ExtractSdkProperties<import(".").FetchPluginProvides> & ExtractSdkProperties<import(".").AppsPluginProvides> & ExtractSdkProperties<import(".").GetProfilePluginProvides>, {
16
+ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk<ExtractSdkProperties<import("./plugins/eventEmission").EventEmissionProvides> & ExtractSdkProperties<import(".").ApiPluginProvides> & ExtractSdkProperties<import(".").ManifestPluginProvides> & ExtractSdkProperties<import(".").ListAppsPluginProvides> & ExtractSdkProperties<import(".").GetAppPluginProvides> & ExtractSdkProperties<import(".").ListActionsPluginProvides> & ExtractSdkProperties<import(".").GetActionPluginProvides> & ExtractSdkProperties<import(".").ListInputFieldsPluginProvides> & ExtractSdkProperties<import("./plugins/listInputFieldChoices").ListInputFieldChoicesPluginProvides> & ExtractSdkProperties<import(".").RunActionPluginProvides> & ExtractSdkProperties<import(".").ListAuthenticationsPluginProvides> & ExtractSdkProperties<import(".").GetAuthenticationPluginProvides> & ExtractSdkProperties<import(".").FindFirstAuthenticationPluginProvides> & ExtractSdkProperties<import(".").FindUniqueAuthenticationPluginProvides> & ExtractSdkProperties<import(".").RequestPluginProvides> & ExtractSdkProperties<import(".").FetchPluginProvides> & ExtractSdkProperties<import(".").AppsPluginProvides> & ExtractSdkProperties<import(".").GetProfilePluginProvides>, {
17
17
  meta: Record<string, PluginMeta>;
18
- } & {
18
+ } & import(".").EventEmissionContext & {
19
19
  api: import("./api").ApiClient;
20
20
  } & {
21
21
  getVersionedImplementationId: import("./plugins/manifest/schemas").GetVersionedImplementationId;
package/dist/sdk.d.ts.map CHANGED
@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AAqB,GAAG,SAAS,CAMzE"}
package/dist/sdk.js CHANGED
@@ -17,6 +17,7 @@ import { listInputFieldsPlugin } from "./plugins/listInputFields";
17
17
  import { listInputFieldChoicesPlugin } from "./plugins/listInputFieldChoices";
18
18
  import { requestPlugin } from "./plugins/request";
19
19
  import { manifestPlugin } from "./plugins/manifest";
20
+ import { eventEmissionPlugin } from "./plugins/eventEmission";
20
21
  // Create SDK that supports flat plugins - returns an SDK, not a builder
21
22
  export function createSdk(options = {}, initialSdk = {}, initialContext = { meta: {} }) {
22
23
  return {
@@ -74,9 +75,11 @@ export function createSdk(options = {}, initialSdk = {}, initialContext = { meta
74
75
  }
75
76
  export function createZapierSdkWithoutRegistry(options = {}) {
76
77
  return (createSdk(options)
78
+ // Event emission (must be first to be available to other plugins)
79
+ .addPlugin(eventEmissionPlugin)
77
80
  // Provides the API client in context
78
81
  .addPlugin(apiPlugin)
79
- // Manifest plugin (provides version locking context)
82
+ // Manifest plugin (provides version locking context) - must come after apiPlugin
80
83
  .addPlugin(manifestPlugin)
81
84
  // Apps/actions/fields
82
85
  .addPlugin(listAppsPlugin)
@@ -2,6 +2,7 @@
2
2
  * SDK-related types and interfaces
3
3
  */
4
4
  import type { EventCallback } from "./events";
5
+ import type { EventEmissionConfig } from "../plugins/eventEmission";
5
6
  export interface BaseSdkOptions {
6
7
  token?: string;
7
8
  getToken?: () => Promise<string | undefined>;
@@ -18,6 +19,7 @@ export interface BaseSdkOptions {
18
19
  };
19
20
  };
20
21
  };
22
+ eventEmission?: EventEmissionConfig;
21
23
  }
22
24
  import type { ListInputFieldsSdkFunction } from "../plugins/listInputFields/schemas";
23
25
  import type { GetAuthenticationSdkFunction } from "../plugins/getAuthentication/schemas";
@@ -27,6 +29,8 @@ import type { RelayRequestSdkFunction } from "../plugins/request/schemas";
27
29
  import type { z } from "zod";
28
30
  import type { RegistryPluginProvides } from "../plugins/registry";
29
31
  import type { GetProfilePluginProvides } from "../plugins/getProfile";
32
+ import type { EventEmissionProvides } from "../plugins/eventEmission";
33
+ import type { ApiPluginProvides } from "../plugins/api";
30
34
  import type { AppsPluginProvides, ZapierSdkApps } from "../plugins/apps";
31
35
  import type { ActionProxy } from "../plugins/apps/schemas";
32
36
  import type { FetchPluginProvides } from "../plugins/fetch";
@@ -61,7 +65,7 @@ export interface FunctionRegistryEntry {
61
65
  }
62
66
  export interface ZapierSdkFunctions extends ListInputFieldsSdkFunction, GetAuthenticationSdkFunction, FindFirstAuthenticationSdkFunction, FindUniqueAuthenticationSdkFunction, RelayRequestSdkFunction {
63
67
  }
64
- export interface ZapierSdk extends GetSdkType<RegistryPluginProvides & FetchPluginProvides & AppsPluginProvides & ListAppsPluginProvides & ManifestPluginProvides & GetAppPluginProvides & ListActionsPluginProvides & GetActionPluginProvides & RunActionPluginProvides & ListAuthenticationsPluginProvides & GetAuthenticationPluginProvides & FindFirstAuthenticationPluginProvides & FindUniqueAuthenticationPluginProvides & ListInputFieldsPluginProvides & ListInputFieldChoicesPluginProvides & RequestPluginProvides & GetProfilePluginProvides> {
68
+ export interface ZapierSdk extends GetSdkType<RegistryPluginProvides & FetchPluginProvides & AppsPluginProvides & ListAppsPluginProvides & ManifestPluginProvides & GetAppPluginProvides & ListActionsPluginProvides & GetActionPluginProvides & RunActionPluginProvides & ListAuthenticationsPluginProvides & GetAuthenticationPluginProvides & FindFirstAuthenticationPluginProvides & FindUniqueAuthenticationPluginProvides & ListInputFieldsPluginProvides & ListInputFieldChoicesPluginProvides & RequestPluginProvides & GetProfilePluginProvides & EventEmissionProvides & ApiPluginProvides> {
65
69
  apps: ActionProxy & ZapierSdkApps;
66
70
  }
67
71
  //# sourceMappingURL=sdk.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/types/sdk.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,MAAM,WAAW,cAAc;IAC7B,KAAK,C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