@zapier/zapier-sdk 0.15.2 → 0.15.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.
- package/CHANGELOG.md +12 -0
- package/dist/api/auth.d.ts +10 -0
- package/dist/api/auth.d.ts.map +1 -1
- package/dist/api/auth.js +35 -0
- package/dist/api/schemas.d.ts +38 -38
- package/dist/index.cjs +209 -27
- package/dist/index.d.mts +151 -59
- package/dist/index.mjs +209 -27
- package/dist/plugins/eventEmission/index.d.ts +1 -1
- package/dist/plugins/eventEmission/index.d.ts.map +1 -1
- package/dist/plugins/eventEmission/index.js +90 -22
- package/dist/plugins/eventEmission/index.test.js +179 -2
- package/dist/plugins/fetch/schemas.d.ts +2 -2
- package/dist/plugins/getAction/schemas.d.ts +2 -2
- package/dist/plugins/getInputFieldsSchema/schemas.d.ts +2 -2
- package/dist/plugins/listActions/index.test.js +25 -0
- package/dist/plugins/listActions/schemas.d.ts +2 -2
- package/dist/plugins/listAuthentications/index.test.js +20 -0
- package/dist/plugins/listInputFieldChoices/schemas.d.ts +6 -6
- package/dist/plugins/listInputFields/schemas.d.ts +6 -6
- package/dist/plugins/manifest/index.d.ts +42 -3
- package/dist/plugins/manifest/index.d.ts.map +1 -1
- package/dist/plugins/manifest/index.js +68 -1
- package/dist/plugins/manifest/index.test.js +513 -1
- package/dist/plugins/manifest/schemas.d.ts +75 -2
- package/dist/plugins/manifest/schemas.d.ts.map +1 -1
- package/dist/plugins/manifest/schemas.js +27 -3
- package/dist/plugins/request/schemas.d.ts +4 -4
- package/dist/plugins/runAction/schemas.d.ts +6 -6
- package/dist/schemas/Action.d.ts +1 -1
- package/dist/schemas/Auth.d.ts +6 -6
- package/dist/sdk.d.ts +23 -1
- package/dist/sdk.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -13,18 +13,18 @@ export declare const RelayRequestSchema: z.ZodObject<{
|
|
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
|
14
14
|
url: string;
|
|
15
15
|
method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
|
|
16
|
+
authenticationId?: number | undefined;
|
|
16
17
|
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
17
18
|
body?: any;
|
|
18
|
-
authenticationId?: number | undefined;
|
|
19
19
|
callbackUrl?: string | undefined;
|
|
20
20
|
authenticationTemplate?: string | undefined;
|
|
21
21
|
relayBaseUrl?: string | undefined;
|
|
22
22
|
}, {
|
|
23
23
|
url: string;
|
|
24
24
|
method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
|
|
25
|
+
authenticationId?: number | undefined;
|
|
25
26
|
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
26
27
|
body?: any;
|
|
27
|
-
authenticationId?: number | undefined;
|
|
28
28
|
callbackUrl?: string | undefined;
|
|
29
29
|
authenticationTemplate?: string | undefined;
|
|
30
30
|
relayBaseUrl?: string | undefined;
|
|
@@ -47,18 +47,18 @@ export declare const RelayFetchSchema: z.ZodObject<{
|
|
|
47
47
|
}, "strip", z.ZodTypeAny, {
|
|
48
48
|
url: string;
|
|
49
49
|
method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
|
|
50
|
+
authenticationId?: number | undefined;
|
|
50
51
|
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
51
52
|
body?: any;
|
|
52
|
-
authenticationId?: number | undefined;
|
|
53
53
|
callbackUrl?: string | undefined;
|
|
54
54
|
authenticationTemplate?: string | undefined;
|
|
55
55
|
relayBaseUrl?: string | undefined;
|
|
56
56
|
}, {
|
|
57
57
|
url: string;
|
|
58
58
|
method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
|
|
59
|
+
authenticationId?: number | undefined;
|
|
59
60
|
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
60
61
|
body?: any;
|
|
61
|
-
authenticationId?: number | undefined;
|
|
62
62
|
callbackUrl?: string | undefined;
|
|
63
63
|
authenticationTemplate?: string | undefined;
|
|
64
64
|
relayBaseUrl?: string | undefined;
|
|
@@ -14,22 +14,22 @@ export declare const RunActionSchema: z.ZodObject<{
|
|
|
14
14
|
cursor: z.ZodOptional<z.ZodString>;
|
|
15
15
|
}, "strip", z.ZodTypeAny, {
|
|
16
16
|
appKey: string;
|
|
17
|
-
actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
|
|
18
17
|
actionKey: string;
|
|
18
|
+
actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
|
|
19
|
+
authenticationId?: number | null | undefined;
|
|
20
|
+
inputs?: Record<string, unknown> | undefined;
|
|
19
21
|
pageSize?: number | undefined;
|
|
20
22
|
maxItems?: number | undefined;
|
|
21
23
|
cursor?: string | undefined;
|
|
22
|
-
authenticationId?: number | null | undefined;
|
|
23
|
-
inputs?: Record<string, unknown> | undefined;
|
|
24
24
|
}, {
|
|
25
25
|
appKey: string;
|
|
26
|
-
actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
|
|
27
26
|
actionKey: string;
|
|
27
|
+
actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
|
|
28
|
+
authenticationId?: number | null | undefined;
|
|
29
|
+
inputs?: Record<string, unknown> | undefined;
|
|
28
30
|
pageSize?: number | undefined;
|
|
29
31
|
maxItems?: number | undefined;
|
|
30
32
|
cursor?: string | undefined;
|
|
31
|
-
authenticationId?: number | null | undefined;
|
|
32
|
-
inputs?: Record<string, unknown> | undefined;
|
|
33
33
|
}>;
|
|
34
34
|
export type RunActionOptions = z.infer<typeof RunActionSchema>;
|
|
35
35
|
export interface RunActionPage {
|
package/dist/schemas/Action.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare const ActionItemSchema: z.ZodObject<Omit<{
|
|
|
8
8
|
is_important: z.ZodOptional<z.ZodBoolean>;
|
|
9
9
|
is_hidden: z.ZodOptional<z.ZodBoolean>;
|
|
10
10
|
selected_api: z.ZodOptional<z.ZodString>;
|
|
11
|
-
}, "type" | "
|
|
11
|
+
}, "type" | "selected_api" | "name"> & {
|
|
12
12
|
app_key: z.ZodString;
|
|
13
13
|
app_version: z.ZodOptional<z.ZodString>;
|
|
14
14
|
action_type: z.ZodEnum<["filter", "read", "read_bulk", "run", "search", "search_and_write", "search_or_write", "write"]>;
|
package/dist/schemas/Auth.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare const AuthenticationItemSchema: z.ZodObject<Omit<{
|
|
|
20
20
|
groups: z.ZodOptional<z.ZodString>;
|
|
21
21
|
members: z.ZodOptional<z.ZodString>;
|
|
22
22
|
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
23
|
-
}, "
|
|
23
|
+
}, "customuser_id" | "selected_api"> & {
|
|
24
24
|
implementation_id: z.ZodOptional<z.ZodString>;
|
|
25
25
|
is_expired: z.ZodOptional<z.ZodString>;
|
|
26
26
|
expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -28,9 +28,9 @@ export declare const AuthenticationItemSchema: z.ZodObject<Omit<{
|
|
|
28
28
|
app_version: z.ZodOptional<z.ZodString>;
|
|
29
29
|
user_id: z.ZodOptional<z.ZodNumber>;
|
|
30
30
|
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
account_id: number;
|
|
31
32
|
id: number;
|
|
32
33
|
date: string;
|
|
33
|
-
account_id: number;
|
|
34
34
|
is_invite_only: boolean;
|
|
35
35
|
is_private: boolean;
|
|
36
36
|
shared_with_all: boolean;
|
|
@@ -53,9 +53,9 @@ export declare const AuthenticationItemSchema: z.ZodObject<Omit<{
|
|
|
53
53
|
app_key?: string | undefined;
|
|
54
54
|
app_version?: string | undefined;
|
|
55
55
|
}, {
|
|
56
|
+
account_id: number;
|
|
56
57
|
id: number;
|
|
57
58
|
date: string;
|
|
58
|
-
account_id: number;
|
|
59
59
|
is_invite_only: boolean;
|
|
60
60
|
is_private: boolean;
|
|
61
61
|
shared_with_all: boolean;
|
|
@@ -99,7 +99,7 @@ export declare const AuthItemSchema: z.ZodObject<Omit<{
|
|
|
99
99
|
groups: z.ZodOptional<z.ZodString>;
|
|
100
100
|
members: z.ZodOptional<z.ZodString>;
|
|
101
101
|
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
102
|
-
}, "
|
|
102
|
+
}, "customuser_id" | "selected_api"> & {
|
|
103
103
|
implementation_id: z.ZodOptional<z.ZodString>;
|
|
104
104
|
is_expired: z.ZodOptional<z.ZodString>;
|
|
105
105
|
expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -107,9 +107,9 @@ export declare const AuthItemSchema: z.ZodObject<Omit<{
|
|
|
107
107
|
app_version: z.ZodOptional<z.ZodString>;
|
|
108
108
|
user_id: z.ZodOptional<z.ZodNumber>;
|
|
109
109
|
}, "strip", z.ZodTypeAny, {
|
|
110
|
+
account_id: number;
|
|
110
111
|
id: number;
|
|
111
112
|
date: string;
|
|
112
|
-
account_id: number;
|
|
113
113
|
is_invite_only: boolean;
|
|
114
114
|
is_private: boolean;
|
|
115
115
|
shared_with_all: boolean;
|
|
@@ -132,9 +132,9 @@ export declare const AuthItemSchema: z.ZodObject<Omit<{
|
|
|
132
132
|
app_key?: string | undefined;
|
|
133
133
|
app_version?: string | undefined;
|
|
134
134
|
}, {
|
|
135
|
+
account_id: number;
|
|
135
136
|
id: number;
|
|
136
137
|
date: string;
|
|
137
|
-
account_id: number;
|
|
138
138
|
is_invite_only: boolean;
|
|
139
139
|
is_private: boolean;
|
|
140
140
|
shared_with_all: boolean;
|
package/dist/sdk.d.ts
CHANGED
|
@@ -20,7 +20,29 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
|
|
|
20
20
|
} & {
|
|
21
21
|
getVersionedImplementationId: import("./plugins/manifest/schemas").GetVersionedImplementationId;
|
|
22
22
|
resolveAppKeys: import("./plugins/manifest/schemas").ResolveAppKeys;
|
|
23
|
-
updateManifestEntry: (options: import(".").UpdateManifestEntryOptions) => Promise<
|
|
23
|
+
updateManifestEntry: (options: import(".").UpdateManifestEntryOptions) => Promise<import(".").UpdateManifestEntryResult>;
|
|
24
|
+
addActionEntry: (options: import(".").AddActionEntryOptions) => Promise<import(".").AddActionEntryResult>;
|
|
25
|
+
findActionEntry: (options: {
|
|
26
|
+
name: string;
|
|
27
|
+
manifest: import(".").Manifest;
|
|
28
|
+
}) => import(".").ActionEntry | null;
|
|
29
|
+
listActionEntries: (options?: {
|
|
30
|
+
configPath?: string;
|
|
31
|
+
}) => Promise<Array<[string, import(".").ActionEntry]>>;
|
|
32
|
+
deleteActionEntry: (options: {
|
|
33
|
+
name: string;
|
|
34
|
+
configPath?: string;
|
|
35
|
+
skipWrite?: boolean;
|
|
36
|
+
}) => Promise<import(".").Manifest>;
|
|
37
|
+
hasActionEntry: (options: {
|
|
38
|
+
name: string;
|
|
39
|
+
manifest: import(".").Manifest;
|
|
40
|
+
}) => boolean;
|
|
41
|
+
findManifestEntry: (options: {
|
|
42
|
+
appKey: string;
|
|
43
|
+
manifest: import(".").Manifest;
|
|
44
|
+
}) => [string, import(".").ManifestEntry] | null;
|
|
45
|
+
readManifestFromFile: (filePath: string) => Promise<import(".").Manifest | null>;
|
|
24
46
|
} & {
|
|
25
47
|
meta: {
|
|
26
48
|
listApps: {
|
package/dist/sdk.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAMlD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EACV,GAAG,EACH,MAAM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