@zapier/zapier-sdk 0.13.5 → 0.13.7
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 +15 -0
- package/dist/api/schemas.d.ts +38 -38
- package/dist/index.cjs +1 -1
- package/dist/index.d.mts +170 -177
- package/dist/index.mjs +1 -1
- package/dist/plugins/fetch/schemas.d.ts +4 -4
- package/dist/plugins/getAction/schemas.d.ts +2 -2
- package/dist/plugins/listActions/schemas.d.ts +6 -6
- package/dist/plugins/listApps/schemas.d.ts +6 -6
- package/dist/plugins/listAuthentications/schemas.d.ts +4 -4
- package/dist/plugins/listInputFieldChoices/schemas.d.ts +8 -8
- package/dist/plugins/listInputFields/schemas.d.ts +8 -8
- package/dist/plugins/request/schemas.d.ts +8 -8
- package/dist/plugins/runAction/schemas.d.ts +8 -8
- package/dist/schemas/Action.d.ts +2 -2
- package/dist/schemas/App.d.ts +8 -8
- package/dist/types/sdk.d.ts +2 -8
- package/dist/types/sdk.d.ts.map +1 -1
- package/package.json +8 -3
- package/src/api/auth.ts +0 -28
- package/src/api/client.ts +0 -491
- package/src/api/debug.test.ts +0 -76
- package/src/api/debug.ts +0 -154
- package/src/api/index.ts +0 -90
- package/src/api/polling.test.ts +0 -405
- package/src/api/polling.ts +0 -253
- package/src/api/schemas.ts +0 -465
- package/src/api/types.ts +0 -152
- package/src/auth.ts +0 -72
- package/src/constants.ts +0 -16
- package/src/index.ts +0 -111
- package/src/plugins/api/index.ts +0 -43
- package/src/plugins/apps/index.ts +0 -203
- package/src/plugins/apps/schemas.ts +0 -64
- package/src/plugins/eventEmission/builders.ts +0 -115
- package/src/plugins/eventEmission/index.test.ts +0 -169
- package/src/plugins/eventEmission/index.ts +0 -294
- package/src/plugins/eventEmission/transport.test.ts +0 -214
- package/src/plugins/eventEmission/transport.ts +0 -135
- package/src/plugins/eventEmission/types.ts +0 -58
- package/src/plugins/eventEmission/utils.ts +0 -121
- package/src/plugins/fetch/index.ts +0 -83
- package/src/plugins/fetch/schemas.ts +0 -37
- package/src/plugins/findFirstAuthentication/index.test.ts +0 -209
- package/src/plugins/findFirstAuthentication/index.ts +0 -68
- package/src/plugins/findFirstAuthentication/schemas.ts +0 -47
- package/src/plugins/findUniqueAuthentication/index.test.ts +0 -197
- package/src/plugins/findUniqueAuthentication/index.ts +0 -77
- package/src/plugins/findUniqueAuthentication/schemas.ts +0 -49
- package/src/plugins/getAction/index.test.ts +0 -239
- package/src/plugins/getAction/index.ts +0 -75
- package/src/plugins/getAction/schemas.ts +0 -41
- package/src/plugins/getApp/index.test.ts +0 -181
- package/src/plugins/getApp/index.ts +0 -60
- package/src/plugins/getApp/schemas.ts +0 -33
- package/src/plugins/getAuthentication/index.test.ts +0 -294
- package/src/plugins/getAuthentication/index.ts +0 -95
- package/src/plugins/getAuthentication/schemas.ts +0 -38
- package/src/plugins/getProfile/index.ts +0 -60
- package/src/plugins/getProfile/schemas.ts +0 -24
- package/src/plugins/listActions/index.test.ts +0 -526
- package/src/plugins/listActions/index.ts +0 -132
- package/src/plugins/listActions/schemas.ts +0 -55
- package/src/plugins/listApps/index.test.ts +0 -378
- package/src/plugins/listApps/index.ts +0 -159
- package/src/plugins/listApps/schemas.ts +0 -41
- package/src/plugins/listAuthentications/index.test.ts +0 -739
- package/src/plugins/listAuthentications/index.ts +0 -152
- package/src/plugins/listAuthentications/schemas.ts +0 -77
- package/src/plugins/listInputFieldChoices/index.test.ts +0 -653
- package/src/plugins/listInputFieldChoices/index.ts +0 -173
- package/src/plugins/listInputFieldChoices/schemas.ts +0 -125
- package/src/plugins/listInputFields/index.test.ts +0 -439
- package/src/plugins/listInputFields/index.ts +0 -294
- package/src/plugins/listInputFields/schemas.ts +0 -68
- package/src/plugins/manifest/index.test.ts +0 -776
- package/src/plugins/manifest/index.ts +0 -461
- package/src/plugins/manifest/schemas.ts +0 -60
- package/src/plugins/registry/index.ts +0 -160
- package/src/plugins/request/index.test.ts +0 -333
- package/src/plugins/request/index.ts +0 -105
- package/src/plugins/request/schemas.ts +0 -69
- package/src/plugins/runAction/index.test.ts +0 -388
- package/src/plugins/runAction/index.ts +0 -215
- package/src/plugins/runAction/schemas.ts +0 -60
- package/src/resolvers/actionKey.ts +0 -37
- package/src/resolvers/actionType.ts +0 -34
- package/src/resolvers/appKey.ts +0 -7
- package/src/resolvers/authenticationId.ts +0 -54
- package/src/resolvers/index.ts +0 -11
- package/src/resolvers/inputFieldKey.ts +0 -70
- package/src/resolvers/inputs.ts +0 -69
- package/src/schemas/Action.ts +0 -52
- package/src/schemas/App.ts +0 -45
- package/src/schemas/Auth.ts +0 -59
- package/src/schemas/Field.ts +0 -169
- package/src/schemas/Run.ts +0 -40
- package/src/schemas/UserProfile.ts +0 -60
- package/src/sdk.test.ts +0 -212
- package/src/sdk.ts +0 -178
- package/src/types/domain.test.ts +0 -50
- package/src/types/domain.ts +0 -66
- package/src/types/errors.ts +0 -278
- package/src/types/events.ts +0 -43
- package/src/types/functions.ts +0 -28
- package/src/types/optional-zapier-sdk-cli-login.d.ts +0 -37
- package/src/types/plugin.ts +0 -125
- package/src/types/properties.ts +0 -80
- package/src/types/sdk.ts +0 -117
- package/src/types/telemetry-events.ts +0 -85
- package/src/utils/array-utils.test.ts +0 -131
- package/src/utils/array-utils.ts +0 -41
- package/src/utils/domain-utils.test.ts +0 -433
- package/src/utils/domain-utils.ts +0 -267
- package/src/utils/file-utils.test.ts +0 -73
- package/src/utils/file-utils.ts +0 -94
- package/src/utils/function-utils.test.ts +0 -141
- package/src/utils/function-utils.ts +0 -245
- package/src/utils/pagination-utils.test.ts +0 -620
- package/src/utils/pagination-utils.ts +0 -242
- package/src/utils/schema-utils.ts +0 -207
- package/src/utils/string-utils.test.ts +0 -45
- package/src/utils/string-utils.ts +0 -54
- package/src/utils/validation.test.ts +0 -51
- package/src/utils/validation.ts +0 -44
- package/tsconfig.build.json +0 -18
- package/tsconfig.json +0 -20
- package/tsconfig.tsbuildinfo +0 -1
- package/tsup.config.ts +0 -23
|
@@ -9,17 +9,17 @@ export declare const FetchInitSchema: z.ZodOptional<z.ZodObject<{
|
|
|
9
9
|
authenticationTemplate: z.ZodOptional<z.ZodString>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
11
|
method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
|
|
12
|
-
|
|
12
|
+
headers?: Record<string, string> | undefined;
|
|
13
13
|
body?: string | FormData | URLSearchParams | undefined;
|
|
14
|
+
authenticationId?: number | undefined;
|
|
14
15
|
callbackUrl?: string | undefined;
|
|
15
16
|
authenticationTemplate?: string | undefined;
|
|
16
|
-
headers?: Record<string, string> | undefined;
|
|
17
17
|
}, {
|
|
18
18
|
method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
|
|
19
|
-
|
|
19
|
+
headers?: Record<string, string> | undefined;
|
|
20
20
|
body?: string | FormData | URLSearchParams | undefined;
|
|
21
|
+
authenticationId?: number | undefined;
|
|
21
22
|
callbackUrl?: string | undefined;
|
|
22
23
|
authenticationTemplate?: string | undefined;
|
|
23
|
-
headers?: Record<string, string> | undefined;
|
|
24
24
|
}>>;
|
|
25
25
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -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: "search" | "filter" | "read" | "read_bulk" | "
|
|
12
|
+
actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
|
|
13
13
|
actionKey: string;
|
|
14
14
|
}, {
|
|
15
15
|
appKey: string;
|
|
16
|
-
actionType: "search" | "filter" | "read" | "read_bulk" | "
|
|
16
|
+
actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
|
|
17
17
|
actionKey: string;
|
|
18
18
|
}>;
|
|
19
19
|
export type GetActionOptions = z.infer<typeof GetActionSchema>;
|
|
@@ -12,16 +12,16 @@ export declare const ListActionsSchema: z.ZodObject<{
|
|
|
12
12
|
cursor: z.ZodOptional<z.ZodString>;
|
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
|
14
14
|
appKey: string;
|
|
15
|
-
actionType?: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write" | undefined;
|
|
16
|
-
pageSize?: number | undefined;
|
|
17
|
-
maxItems?: number | undefined;
|
|
18
15
|
cursor?: string | undefined;
|
|
16
|
+
maxItems?: number | undefined;
|
|
17
|
+
pageSize?: number | undefined;
|
|
18
|
+
actionType?: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write" | undefined;
|
|
19
19
|
}, {
|
|
20
20
|
appKey: string;
|
|
21
|
-
actionType?: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write" | undefined;
|
|
22
|
-
pageSize?: number | undefined;
|
|
23
|
-
maxItems?: number | undefined;
|
|
24
21
|
cursor?: string | undefined;
|
|
22
|
+
maxItems?: number | undefined;
|
|
23
|
+
pageSize?: number | undefined;
|
|
24
|
+
actionType?: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write" | undefined;
|
|
25
25
|
}>;
|
|
26
26
|
export type ListActionsOptions = z.infer<typeof ListActionsSchema>;
|
|
27
27
|
export interface ListActionsPage {
|
|
@@ -15,16 +15,16 @@ export declare const ListAppsSchema: z.ZodObject<{
|
|
|
15
15
|
cursor: z.ZodOptional<z.ZodString>;
|
|
16
16
|
}, "strip", z.ZodTypeAny, {
|
|
17
17
|
search?: string | undefined;
|
|
18
|
-
pageSize?: number | undefined;
|
|
19
|
-
maxItems?: number | undefined;
|
|
20
|
-
cursor?: string | undefined;
|
|
21
18
|
appKeys?: string[] | undefined;
|
|
19
|
+
cursor?: string | undefined;
|
|
20
|
+
maxItems?: number | undefined;
|
|
21
|
+
pageSize?: number | undefined;
|
|
22
22
|
}, {
|
|
23
23
|
search?: string | undefined;
|
|
24
|
-
pageSize?: number | undefined;
|
|
25
|
-
maxItems?: number | undefined;
|
|
26
|
-
cursor?: string | undefined;
|
|
27
24
|
appKeys?: string[] | undefined;
|
|
25
|
+
cursor?: string | undefined;
|
|
26
|
+
maxItems?: number | undefined;
|
|
27
|
+
pageSize?: number | undefined;
|
|
28
28
|
}>;
|
|
29
29
|
export type ListAppsOptions = z.infer<typeof ListAppsSchema>;
|
|
30
30
|
export interface ListAppsSdkFunction {
|
|
@@ -18,9 +18,9 @@ export declare const ListAuthenticationsSchema: z.ZodObject<{
|
|
|
18
18
|
search?: string | undefined;
|
|
19
19
|
title?: string | undefined;
|
|
20
20
|
appKey?: string | undefined;
|
|
21
|
-
pageSize?: number | undefined;
|
|
22
|
-
maxItems?: number | undefined;
|
|
23
21
|
cursor?: string | undefined;
|
|
22
|
+
maxItems?: number | undefined;
|
|
23
|
+
pageSize?: number | undefined;
|
|
24
24
|
accountId?: string | undefined;
|
|
25
25
|
owner?: string | undefined;
|
|
26
26
|
authenticationIds?: string[] | undefined;
|
|
@@ -28,9 +28,9 @@ export declare const ListAuthenticationsSchema: z.ZodObject<{
|
|
|
28
28
|
search?: string | undefined;
|
|
29
29
|
title?: string | undefined;
|
|
30
30
|
appKey?: string | undefined;
|
|
31
|
-
pageSize?: number | undefined;
|
|
32
|
-
maxItems?: number | undefined;
|
|
33
31
|
cursor?: string | undefined;
|
|
32
|
+
maxItems?: number | undefined;
|
|
33
|
+
pageSize?: number | undefined;
|
|
34
34
|
accountId?: string | undefined;
|
|
35
35
|
owner?: string | undefined;
|
|
36
36
|
authenticationIds?: string[] | undefined;
|
|
@@ -33,26 +33,26 @@ export declare const ListInputFieldChoicesSchema: z.ZodObject<{
|
|
|
33
33
|
cursor: z.ZodOptional<z.ZodString>;
|
|
34
34
|
}, "strip", z.ZodTypeAny, {
|
|
35
35
|
appKey: string;
|
|
36
|
-
actionType: "search" | "filter" | "read" | "read_bulk" | "
|
|
36
|
+
actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
|
|
37
37
|
actionKey: string;
|
|
38
38
|
inputFieldKey: string;
|
|
39
39
|
page?: number | undefined;
|
|
40
|
+
cursor?: string | undefined;
|
|
41
|
+
maxItems?: number | undefined;
|
|
42
|
+
pageSize?: number | undefined;
|
|
40
43
|
authenticationId?: number | null | undefined;
|
|
41
44
|
inputs?: Record<string, unknown> | undefined;
|
|
42
|
-
pageSize?: number | undefined;
|
|
43
|
-
maxItems?: number | undefined;
|
|
44
|
-
cursor?: string | undefined;
|
|
45
45
|
}, {
|
|
46
46
|
appKey: string;
|
|
47
|
-
actionType: "search" | "filter" | "read" | "read_bulk" | "
|
|
47
|
+
actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
|
|
48
48
|
actionKey: string;
|
|
49
49
|
inputFieldKey: string;
|
|
50
50
|
page?: number | undefined;
|
|
51
|
+
cursor?: string | undefined;
|
|
52
|
+
maxItems?: number | undefined;
|
|
53
|
+
pageSize?: number | undefined;
|
|
51
54
|
authenticationId?: number | null | undefined;
|
|
52
55
|
inputs?: Record<string, unknown> | undefined;
|
|
53
|
-
pageSize?: number | undefined;
|
|
54
|
-
maxItems?: number | undefined;
|
|
55
|
-
cursor?: string | undefined;
|
|
56
56
|
}>;
|
|
57
57
|
export type ListInputFieldChoicesOptions = z.infer<typeof ListInputFieldChoicesSchema>;
|
|
58
58
|
export type ListInputFieldChoicesError = ZapierConfigurationError | ZapierApiError | ZapierAuthenticationError | ZapierAppNotFoundError | ZapierValidationError | ZapierUnknownError;
|
|
@@ -15,22 +15,22 @@ export declare const ListInputFieldsSchema: z.ZodObject<{
|
|
|
15
15
|
cursor: z.ZodOptional<z.ZodString>;
|
|
16
16
|
}, "strip", z.ZodTypeAny, {
|
|
17
17
|
appKey: string;
|
|
18
|
-
actionType: "search" | "filter" | "read" | "read_bulk" | "
|
|
18
|
+
actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
|
|
19
19
|
actionKey: string;
|
|
20
|
+
cursor?: string | undefined;
|
|
21
|
+
maxItems?: number | undefined;
|
|
22
|
+
pageSize?: number | undefined;
|
|
20
23
|
authenticationId?: number | null | undefined;
|
|
21
24
|
inputs?: Record<string, unknown> | undefined;
|
|
22
|
-
pageSize?: number | undefined;
|
|
23
|
-
maxItems?: number | undefined;
|
|
24
|
-
cursor?: string | undefined;
|
|
25
25
|
}, {
|
|
26
26
|
appKey: string;
|
|
27
|
-
actionType: "search" | "filter" | "read" | "read_bulk" | "
|
|
27
|
+
actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
|
|
28
28
|
actionKey: string;
|
|
29
|
+
cursor?: string | undefined;
|
|
30
|
+
maxItems?: number | undefined;
|
|
31
|
+
pageSize?: number | undefined;
|
|
29
32
|
authenticationId?: number | null | undefined;
|
|
30
33
|
inputs?: Record<string, unknown> | undefined;
|
|
31
|
-
pageSize?: number | undefined;
|
|
32
|
-
maxItems?: number | undefined;
|
|
33
|
-
cursor?: string | undefined;
|
|
34
34
|
}>;
|
|
35
35
|
export type ListInputFieldsOptions = z.infer<typeof ListInputFieldsSchema>;
|
|
36
36
|
export type ListInputFieldsError = ZapierConfigurationError | ZapierApiError | ZapierAuthenticationError | ZapierAppNotFoundError | ZapierValidationError | ZapierUnknownError;
|
|
@@ -13,20 +13,20 @@ 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
|
-
|
|
16
|
+
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
17
17
|
body?: any;
|
|
18
|
+
authenticationId?: number | undefined;
|
|
18
19
|
callbackUrl?: string | undefined;
|
|
19
20
|
authenticationTemplate?: string | undefined;
|
|
20
|
-
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
21
21
|
relayBaseUrl?: string | undefined;
|
|
22
22
|
}, {
|
|
23
23
|
url: string;
|
|
24
24
|
method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
|
|
25
|
-
|
|
25
|
+
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
26
26
|
body?: any;
|
|
27
|
+
authenticationId?: number | undefined;
|
|
27
28
|
callbackUrl?: string | undefined;
|
|
28
29
|
authenticationTemplate?: string | undefined;
|
|
29
|
-
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
30
30
|
relayBaseUrl?: string | undefined;
|
|
31
31
|
}>;
|
|
32
32
|
export type RelayRequestOptions = z.infer<typeof RelayRequestSchema>;
|
|
@@ -47,20 +47,20 @@ 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
|
-
|
|
50
|
+
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
51
51
|
body?: any;
|
|
52
|
+
authenticationId?: number | undefined;
|
|
52
53
|
callbackUrl?: string | undefined;
|
|
53
54
|
authenticationTemplate?: string | undefined;
|
|
54
|
-
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
55
55
|
relayBaseUrl?: string | undefined;
|
|
56
56
|
}, {
|
|
57
57
|
url: string;
|
|
58
58
|
method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
|
|
59
|
-
|
|
59
|
+
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
60
60
|
body?: any;
|
|
61
|
+
authenticationId?: number | undefined;
|
|
61
62
|
callbackUrl?: string | undefined;
|
|
62
63
|
authenticationTemplate?: string | undefined;
|
|
63
|
-
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
64
64
|
relayBaseUrl?: string | undefined;
|
|
65
65
|
}>;
|
|
66
66
|
export type RelayFetchOptions = RelayRequestOptions;
|
|
@@ -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" | "
|
|
17
|
+
actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
|
|
18
18
|
actionKey: string;
|
|
19
|
+
cursor?: string | undefined;
|
|
20
|
+
maxItems?: number | undefined;
|
|
21
|
+
pageSize?: number | undefined;
|
|
19
22
|
authenticationId?: number | null | undefined;
|
|
20
23
|
inputs?: Record<string, unknown> | undefined;
|
|
21
|
-
pageSize?: number | undefined;
|
|
22
|
-
maxItems?: number | undefined;
|
|
23
|
-
cursor?: string | undefined;
|
|
24
24
|
}, {
|
|
25
25
|
appKey: string;
|
|
26
|
-
actionType: "search" | "filter" | "read" | "read_bulk" | "
|
|
26
|
+
actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
|
|
27
27
|
actionKey: string;
|
|
28
|
+
cursor?: string | undefined;
|
|
29
|
+
maxItems?: number | undefined;
|
|
30
|
+
pageSize?: number | undefined;
|
|
28
31
|
authenticationId?: number | null | undefined;
|
|
29
32
|
inputs?: Record<string, unknown> | undefined;
|
|
30
|
-
pageSize?: number | undefined;
|
|
31
|
-
maxItems?: number | undefined;
|
|
32
|
-
cursor?: string | undefined;
|
|
33
33
|
}>;
|
|
34
34
|
export type RunActionOptions = z.infer<typeof RunActionSchema>;
|
|
35
35
|
export interface RunActionPage {
|
package/dist/schemas/Action.d.ts
CHANGED
|
@@ -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: "search" | "filter" | "read" | "read_bulk" | "
|
|
23
|
+
action_type: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "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: "search" | "filter" | "read" | "read_bulk" | "
|
|
34
|
+
action_type: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
|
|
35
35
|
id?: string | undefined;
|
|
36
36
|
is_important?: boolean | undefined;
|
|
37
37
|
is_hidden?: boolean | undefined;
|
package/dist/schemas/App.d.ts
CHANGED
|
@@ -67,17 +67,17 @@ export declare const AppItemSchema: z.ZodObject<Omit<{
|
|
|
67
67
|
filter?: number | undefined;
|
|
68
68
|
read?: number | undefined;
|
|
69
69
|
read_bulk?: number | undefined;
|
|
70
|
-
write?: number | undefined;
|
|
71
|
-
search_or_write?: number | undefined;
|
|
72
70
|
search_and_write?: number | undefined;
|
|
71
|
+
search_or_write?: number | undefined;
|
|
72
|
+
write?: number | undefined;
|
|
73
73
|
}, {
|
|
74
74
|
search?: number | undefined;
|
|
75
75
|
filter?: number | undefined;
|
|
76
76
|
read?: number | undefined;
|
|
77
77
|
read_bulk?: number | undefined;
|
|
78
|
-
write?: number | undefined;
|
|
79
|
-
search_or_write?: number | undefined;
|
|
80
78
|
search_and_write?: number | undefined;
|
|
79
|
+
search_or_write?: number | undefined;
|
|
80
|
+
write?: number | undefined;
|
|
81
81
|
}>>;
|
|
82
82
|
description: z.ZodOptional<z.ZodString>;
|
|
83
83
|
primary_color: z.ZodOptional<z.ZodString>;
|
|
@@ -104,9 +104,9 @@ export declare const AppItemSchema: z.ZodObject<Omit<{
|
|
|
104
104
|
filter?: number | undefined;
|
|
105
105
|
read?: number | undefined;
|
|
106
106
|
read_bulk?: number | undefined;
|
|
107
|
-
write?: number | undefined;
|
|
108
|
-
search_or_write?: number | undefined;
|
|
109
107
|
search_and_write?: number | undefined;
|
|
108
|
+
search_or_write?: number | undefined;
|
|
109
|
+
write?: number | undefined;
|
|
110
110
|
} | undefined;
|
|
111
111
|
description?: string | undefined;
|
|
112
112
|
is_hidden?: boolean | undefined;
|
|
@@ -156,9 +156,9 @@ export declare const AppItemSchema: z.ZodObject<Omit<{
|
|
|
156
156
|
filter?: number | undefined;
|
|
157
157
|
read?: number | undefined;
|
|
158
158
|
read_bulk?: number | undefined;
|
|
159
|
-
write?: number | undefined;
|
|
160
|
-
search_or_write?: number | undefined;
|
|
161
159
|
search_and_write?: number | undefined;
|
|
160
|
+
search_or_write?: number | undefined;
|
|
161
|
+
write?: number | undefined;
|
|
162
162
|
} | undefined;
|
|
163
163
|
description?: string | undefined;
|
|
164
164
|
is_hidden?: boolean | undefined;
|
package/dist/types/sdk.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { EventCallback } from "./events";
|
|
5
5
|
import type { EventEmissionConfig } from "../plugins/eventEmission";
|
|
6
|
+
import type { Manifest } from "../plugins/manifest";
|
|
6
7
|
export interface BaseSdkOptions {
|
|
7
8
|
token?: string;
|
|
8
9
|
getToken?: () => Promise<string | undefined>;
|
|
@@ -11,14 +12,7 @@ export interface BaseSdkOptions {
|
|
|
11
12
|
baseUrl?: string;
|
|
12
13
|
debug?: boolean;
|
|
13
14
|
manifestPath?: string;
|
|
14
|
-
manifest?:
|
|
15
|
-
apps: {
|
|
16
|
-
[appKey: string]: {
|
|
17
|
-
implementationName: string;
|
|
18
|
-
version?: string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
};
|
|
15
|
+
manifest?: Manifest;
|
|
22
16
|
eventEmission?: EventEmissionConfig;
|
|
23
17
|
}
|
|
24
18
|
import type { ListInputFieldsSdkFunction } from "../plugins/listInputFields/schemas";
|
package/dist/types/sdk.d.ts.map
CHANGED
|
@@ -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;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;
|
|
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;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAGpD,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACrC;AAGD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,KAAK,EAAE,kCAAkC,EAAE,M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CACnC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zapier/zapier-sdk",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.7",
|
|
4
4
|
"description": "Complete Zapier SDK - combines all Zapier SDK packages",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"README.md",
|
|
23
|
+
"CHANGELOG.md"
|
|
24
|
+
],
|
|
20
25
|
"keywords": [
|
|
21
26
|
"zapier",
|
|
22
27
|
"sdk",
|
|
@@ -28,7 +33,7 @@
|
|
|
28
33
|
"author": "",
|
|
29
34
|
"license": "ISC",
|
|
30
35
|
"publishConfig": {
|
|
31
|
-
"access": "
|
|
36
|
+
"access": "public"
|
|
32
37
|
},
|
|
33
38
|
"dependencies": {
|
|
34
39
|
"zod": "^3.25.67"
|
|
@@ -46,7 +51,7 @@
|
|
|
46
51
|
"tsup": "^8.5.0",
|
|
47
52
|
"typescript": "^5.8.3",
|
|
48
53
|
"vitest": "^3.2.3",
|
|
49
|
-
"@zapier/zapier-sdk-cli-login": "0.3.
|
|
54
|
+
"@zapier/zapier-sdk-cli-login": "0.3.3"
|
|
50
55
|
},
|
|
51
56
|
"scripts": {
|
|
52
57
|
"build": "tsup",
|
package/src/api/auth.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Authentication Utilities
|
|
3
|
-
*
|
|
4
|
-
* This module provides utilities for handling authentication tokens,
|
|
5
|
-
* including JWT detection and authorization header generation.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export function isJwt(token: string): boolean {
|
|
9
|
-
// JWT tokens have exactly 3 parts separated by dots
|
|
10
|
-
const parts = token.split(".");
|
|
11
|
-
if (parts.length !== 3) {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// Each part should be base64url encoded (no padding)
|
|
16
|
-
// Basic validation - each part should be non-empty and contain valid base64url characters
|
|
17
|
-
const base64UrlPattern = /^[A-Za-z0-9_-]+$/;
|
|
18
|
-
return parts.every((part) => part.length > 0 && base64UrlPattern.test(part));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function getAuthorizationHeader(token: string): string {
|
|
22
|
-
// Check if token is a JWT (has 3 parts separated by dots)
|
|
23
|
-
if (isJwt(token)) {
|
|
24
|
-
return `JWT ${token}`;
|
|
25
|
-
}
|
|
26
|
-
// Default to Bearer for other token types
|
|
27
|
-
return `Bearer ${token}`;
|
|
28
|
-
}
|