@zapier/zapier-sdk 0.8.3 → 0.10.0
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 +18 -0
- package/README.md +17 -40
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +14 -0
- package/dist/api/debug.d.ts +1 -0
- package/dist/api/debug.d.ts.map +1 -1
- package/dist/api/debug.js +42 -1
- package/dist/api/debug.test.d.ts +2 -0
- package/dist/api/debug.test.d.ts.map +1 -0
- package/dist/api/debug.test.js +59 -0
- package/dist/api/schemas.d.ts +451 -251
- package/dist/api/schemas.d.ts.map +1 -1
- package/dist/api/schemas.js +51 -29
- package/dist/index.cjs +1149 -751
- package/dist/index.d.mts +2359 -2161
- package/dist/index.d.ts +3 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -4
- package/dist/index.mjs +1143 -743
- package/dist/plugins/apps/index.d.ts +4 -0
- package/dist/plugins/apps/index.d.ts.map +1 -1
- package/dist/plugins/findFirstAuthentication/index.d.ts +1 -1
- package/dist/plugins/findFirstAuthentication/index.d.ts.map +1 -1
- package/dist/plugins/findFirstAuthentication/index.js +9 -1
- package/dist/plugins/findFirstAuthentication/index.test.js +3 -4
- package/dist/plugins/findFirstAuthentication/schemas.d.ts +5 -3
- package/dist/plugins/findFirstAuthentication/schemas.d.ts.map +1 -1
- package/dist/plugins/findUniqueAuthentication/index.d.ts.map +1 -1
- package/dist/plugins/findUniqueAuthentication/index.js +4 -0
- package/dist/plugins/findUniqueAuthentication/schemas.d.ts +5 -3
- package/dist/plugins/findUniqueAuthentication/schemas.d.ts.map +1 -1
- package/dist/plugins/getAction/index.d.ts.map +1 -1
- package/dist/plugins/getAction/index.js +10 -0
- package/dist/plugins/getAction/schemas.d.ts +5 -3
- package/dist/plugins/getAction/schemas.d.ts.map +1 -1
- package/dist/plugins/getApp/index.d.ts +2 -7
- package/dist/plugins/getApp/index.d.ts.map +1 -1
- package/dist/plugins/getApp/index.js +17 -9
- package/dist/plugins/getApp/index.test.js +3 -3
- package/dist/plugins/getApp/schemas.d.ts +3 -1
- package/dist/plugins/getApp/schemas.d.ts.map +1 -1
- package/dist/plugins/getApp/schemas.js +2 -4
- package/dist/plugins/getAuthentication/index.d.ts.map +1 -1
- package/dist/plugins/getAuthentication/index.js +8 -0
- package/dist/plugins/getAuthentication/index.test.js +1 -1
- package/dist/plugins/getProfile/index.d.ts.map +1 -1
- package/dist/plugins/getProfile/index.js +4 -0
- package/dist/plugins/getProfile/schemas.d.ts.map +1 -1
- package/dist/plugins/getProfile/schemas.js +4 -3
- package/dist/plugins/listActions/index.d.ts +2 -4
- package/dist/plugins/listActions/index.d.ts.map +1 -1
- package/dist/plugins/listActions/index.js +10 -1
- package/dist/plugins/listActions/index.test.js +4 -4
- package/dist/plugins/listActions/schemas.d.ts +5 -3
- package/dist/plugins/listActions/schemas.d.ts.map +1 -1
- package/dist/plugins/listActions/schemas.js +2 -4
- package/dist/plugins/listApps/index.d.ts +4 -7
- package/dist/plugins/listApps/index.d.ts.map +1 -1
- package/dist/plugins/listApps/index.js +37 -17
- package/dist/plugins/listApps/index.test.js +23 -3
- package/dist/plugins/listApps/schemas.d.ts.map +1 -1
- package/dist/plugins/listApps/schemas.js +3 -9
- package/dist/plugins/listAuthentications/index.d.ts +2 -4
- package/dist/plugins/listAuthentications/index.d.ts.map +1 -1
- package/dist/plugins/listAuthentications/index.js +12 -0
- package/dist/plugins/listAuthentications/index.test.js +39 -13
- package/dist/plugins/listAuthentications/schemas.d.ts +8 -3
- package/dist/plugins/listAuthentications/schemas.d.ts.map +1 -1
- package/dist/plugins/listAuthentications/schemas.js +4 -0
- package/dist/plugins/listInputFieldChoices/index.d.ts.map +1 -1
- package/dist/plugins/listInputFieldChoices/index.js +14 -2
- package/dist/plugins/listInputFieldChoices/schemas.d.ts +5 -3
- package/dist/plugins/listInputFieldChoices/schemas.d.ts.map +1 -1
- package/dist/plugins/listInputFieldChoices/schemas.js +10 -19
- package/dist/plugins/listInputFields/index.d.ts.map +1 -1
- package/dist/plugins/listInputFields/index.js +14 -2
- package/dist/plugins/listInputFields/index.test.js +5 -9
- package/dist/plugins/listInputFields/schemas.d.ts +5 -3
- package/dist/plugins/listInputFields/schemas.d.ts.map +1 -1
- package/dist/plugins/manifest/index.d.ts +25 -9
- package/dist/plugins/manifest/index.d.ts.map +1 -1
- package/dist/plugins/manifest/index.js +239 -67
- package/dist/plugins/manifest/index.test.js +426 -171
- package/dist/plugins/manifest/schemas.d.ts +5 -1
- package/dist/plugins/manifest/schemas.d.ts.map +1 -1
- package/dist/plugins/manifest/schemas.js +1 -0
- package/dist/plugins/registry/index.d.ts.map +1 -1
- package/dist/plugins/registry/index.js +8 -2
- package/dist/plugins/request/index.d.ts.map +1 -1
- package/dist/plugins/request/index.js +1 -0
- package/dist/plugins/runAction/index.d.ts.map +1 -1
- package/dist/plugins/runAction/index.js +12 -0
- package/dist/plugins/runAction/schemas.d.ts +5 -3
- package/dist/plugins/runAction/schemas.d.ts.map +1 -1
- package/dist/resolvers/actionKey.d.ts +13 -7
- package/dist/resolvers/actionKey.d.ts.map +1 -1
- package/dist/resolvers/actionType.d.ts +8 -7
- package/dist/resolvers/actionType.d.ts.map +1 -1
- package/dist/resolvers/appKey.d.ts +2 -6
- package/dist/resolvers/appKey.d.ts.map +1 -1
- package/dist/resolvers/authenticationId.d.ts +7 -7
- package/dist/resolvers/authenticationId.d.ts.map +1 -1
- package/dist/resolvers/authenticationId.js +16 -7
- package/dist/resolvers/index.d.ts +3 -35
- package/dist/resolvers/index.d.ts.map +1 -1
- package/dist/resolvers/index.js +4 -87
- package/dist/resolvers/inputFieldKey.d.ts +11 -0
- package/dist/resolvers/inputFieldKey.d.ts.map +1 -0
- package/dist/resolvers/inputFieldKey.js +23 -0
- package/dist/resolvers/inputs.d.ts +11 -6
- package/dist/resolvers/inputs.d.ts.map +1 -1
- package/dist/resolvers/inputs.js +17 -0
- package/dist/schemas/Action.d.ts +8 -8
- package/dist/schemas/Action.d.ts.map +1 -1
- package/dist/schemas/Action.js +8 -3
- package/dist/schemas/App.d.ts +183 -11
- package/dist/schemas/App.d.ts.map +1 -1
- package/dist/schemas/App.js +7 -9
- package/dist/schemas/Auth.d.ts +12 -12
- package/dist/schemas/Auth.js +1 -1
- package/dist/schemas/Field.d.ts +5 -98
- package/dist/schemas/Field.d.ts.map +1 -1
- package/dist/schemas/Field.js +24 -52
- package/dist/schemas/Run.d.ts +3 -0
- package/dist/schemas/Run.d.ts.map +1 -0
- package/dist/schemas/Run.js +31 -0
- package/dist/schemas/UserProfile.d.ts +11 -11
- package/dist/schemas/UserProfile.d.ts.map +1 -1
- package/dist/schemas/UserProfile.js +21 -7
- package/dist/sdk.d.ts +15 -14
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +1 -4
- package/dist/types/plugin.d.ts +6 -0
- package/dist/types/plugin.d.ts.map +1 -1
- package/dist/types/properties.d.ts +3 -1
- package/dist/types/properties.d.ts.map +1 -1
- package/dist/types/sdk.d.ts +11 -3
- package/dist/types/sdk.d.ts.map +1 -1
- package/dist/utils/domain-utils.d.ts +17 -16
- package/dist/utils/domain-utils.d.ts.map +1 -1
- package/dist/utils/domain-utils.js +53 -78
- package/dist/utils/domain-utils.test.js +157 -3
- package/dist/utils/file-utils.d.ts +4 -0
- package/dist/utils/file-utils.d.ts.map +1 -0
- package/dist/utils/file-utils.js +74 -0
- package/dist/utils/file-utils.test.d.ts +2 -0
- package/dist/utils/file-utils.test.d.ts.map +1 -0
- package/dist/utils/file-utils.test.js +51 -0
- package/dist/utils/schema-utils.d.ts +44 -21
- package/dist/utils/schema-utils.d.ts.map +1 -1
- package/dist/utils/schema-utils.js +17 -11
- package/package.json +1 -1
- package/src/api/client.ts +12 -0
- package/src/api/debug.test.ts +76 -0
- package/src/api/debug.ts +46 -2
- package/src/api/schemas.ts +51 -29
- package/src/index.ts +5 -6
- package/src/plugins/apps/index.ts +9 -2
- package/src/plugins/findFirstAuthentication/index.test.ts +8 -5
- package/src/plugins/findFirstAuthentication/index.ts +14 -2
- package/src/plugins/findUniqueAuthentication/index.ts +4 -0
- package/src/plugins/getAction/index.ts +14 -0
- package/src/plugins/getApp/index.test.ts +3 -3
- package/src/plugins/getApp/index.ts +20 -14
- package/src/plugins/getApp/schemas.ts +7 -12
- package/src/plugins/getAuthentication/index.test.ts +1 -1
- package/src/plugins/getAuthentication/index.ts +8 -0
- package/src/plugins/getProfile/index.ts +4 -0
- package/src/plugins/getProfile/schemas.ts +4 -6
- package/src/plugins/listActions/index.test.ts +8 -7
- package/src/plugins/listActions/index.ts +12 -3
- package/src/plugins/listActions/schemas.ts +20 -25
- package/src/plugins/listApps/index.test.ts +24 -3
- package/src/plugins/listApps/index.ts +50 -25
- package/src/plugins/listApps/schemas.ts +17 -26
- package/src/plugins/listAuthentications/index.test.ts +52 -15
- package/src/plugins/listAuthentications/index.ts +15 -2
- package/src/plugins/listAuthentications/schemas.ts +4 -0
- package/src/plugins/listInputFieldChoices/index.ts +21 -1
- package/src/plugins/listInputFieldChoices/schemas.ts +61 -76
- package/src/plugins/listInputFields/index.test.ts +5 -9
- package/src/plugins/listInputFields/index.ts +20 -2
- package/src/plugins/manifest/index.test.ts +503 -197
- package/src/plugins/manifest/index.ts +338 -82
- package/src/plugins/manifest/schemas.ts +9 -2
- package/src/plugins/registry/index.ts +8 -2
- package/src/plugins/request/index.ts +1 -0
- package/src/plugins/runAction/index.ts +18 -0
- package/src/resolvers/actionKey.ts +15 -13
- package/src/resolvers/actionType.ts +10 -12
- package/src/resolvers/appKey.ts +2 -6
- package/src/resolvers/authenticationId.ts +25 -19
- package/src/resolvers/index.ts +7 -113
- package/src/resolvers/inputFieldKey.ts +38 -0
- package/src/resolvers/inputs.ts +28 -10
- package/src/schemas/Action.ts +8 -3
- package/src/schemas/App.ts +7 -9
- package/src/schemas/Auth.ts +1 -1
- package/src/schemas/Field.ts +24 -57
- package/src/schemas/Run.ts +40 -0
- package/src/schemas/UserProfile.ts +24 -7
- package/src/sdk.ts +18 -12
- package/src/types/plugin.ts +8 -0
- package/src/types/sdk.ts +31 -21
- package/src/utils/domain-utils.test.ts +196 -2
- package/src/utils/domain-utils.ts +77 -102
- package/src/utils/file-utils.test.ts +73 -0
- package/src/utils/file-utils.ts +94 -0
- package/src/utils/schema-utils.ts +96 -44
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/plugins/lockVersion/index.d.ts +0 -24
- package/dist/plugins/lockVersion/index.d.ts.map +0 -1
- package/dist/plugins/lockVersion/index.js +0 -72
- package/dist/plugins/lockVersion/index.test.d.ts +0 -2
- package/dist/plugins/lockVersion/index.test.d.ts.map +0 -1
- package/dist/plugins/lockVersion/index.test.js +0 -129
- package/dist/plugins/lockVersion/schemas.d.ts +0 -10
- package/dist/plugins/lockVersion/schemas.d.ts.map +0 -1
- package/dist/plugins/lockVersion/schemas.js +0 -6
- package/src/plugins/lockVersion/index.test.ts +0 -176
- package/src/plugins/lockVersion/index.ts +0 -112
- package/src/plugins/lockVersion/schemas.ts +0 -9
package/dist/index.d.mts
CHANGED
|
@@ -1,111 +1,148 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* SDK Event System
|
|
5
|
+
*
|
|
6
|
+
* This module provides common event type definitions for the SDK's
|
|
7
|
+
* event system, including authentication, API, and loading events.
|
|
8
|
+
*/
|
|
9
|
+
interface SdkEvent {
|
|
10
|
+
type: string;
|
|
11
|
+
payload?: Record<string, unknown>;
|
|
12
|
+
timestamp?: number;
|
|
13
|
+
}
|
|
14
|
+
interface AuthEvent extends SdkEvent {
|
|
15
|
+
type: "auth_refreshing" | "auth_success" | "auth_error" | "auth_logout";
|
|
16
|
+
payload?: {
|
|
17
|
+
message?: string;
|
|
18
|
+
error?: string;
|
|
19
|
+
operation?: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
interface ApiEvent extends SdkEvent {
|
|
23
|
+
type: "api_request" | "api_response" | "api_error";
|
|
24
|
+
payload?: {
|
|
25
|
+
url?: string;
|
|
26
|
+
method?: string;
|
|
27
|
+
status?: number;
|
|
28
|
+
duration?: number;
|
|
29
|
+
error?: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
interface LoadingEvent extends SdkEvent {
|
|
33
|
+
type: "loading_start" | "loading_end";
|
|
34
|
+
payload?: {
|
|
35
|
+
operation?: string;
|
|
36
|
+
resource?: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
type EventCallback = (event: SdkEvent) => void;
|
|
4
40
|
|
|
5
|
-
declare const
|
|
6
|
-
title: z.ZodString;
|
|
41
|
+
declare const NeedSchema: z.ZodObject<{
|
|
7
42
|
key: z.ZodString;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
43
|
+
alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
44
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
45
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
46
|
+
key: z.ZodOptional<z.ZodString>;
|
|
47
|
+
label: z.ZodOptional<z.ZodString>;
|
|
48
|
+
sample: z.ZodOptional<z.ZodString>;
|
|
49
|
+
value: z.ZodOptional<z.ZodString>;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
value?: string | undefined;
|
|
52
|
+
key?: string | undefined;
|
|
53
|
+
label?: string | undefined;
|
|
54
|
+
sample?: string | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
value?: string | undefined;
|
|
57
|
+
key?: string | undefined;
|
|
58
|
+
label?: string | undefined;
|
|
59
|
+
sample?: string | undefined;
|
|
60
|
+
}>, "many">>;
|
|
61
|
+
computed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
62
|
+
custom_field: z.ZodOptional<z.ZodBoolean>;
|
|
63
|
+
default: z.ZodOptional<z.ZodString>;
|
|
64
|
+
depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
65
|
+
format: z.ZodOptional<z.ZodLiteral<"SELECT">>;
|
|
66
|
+
from_search: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
+
from_write: z.ZodOptional<z.ZodBoolean>;
|
|
68
|
+
help_text: z.ZodOptional<z.ZodString>;
|
|
69
|
+
help_text_html: z.ZodOptional<z.ZodString>;
|
|
70
|
+
input_format: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
71
|
+
label: z.ZodOptional<z.ZodString>;
|
|
72
|
+
language: z.ZodOptional<z.ZodString>;
|
|
73
|
+
parent_key: z.ZodOptional<z.ZodString>;
|
|
74
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
75
|
+
prefill: z.ZodOptional<z.ZodString>;
|
|
76
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
77
|
+
searchfill: z.ZodOptional<z.ZodString>;
|
|
78
|
+
send_in_json: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
+
regex: z.ZodOptional<z.ZodString>;
|
|
80
|
+
type: z.ZodOptional<z.ZodEnum<["integer", "string", "text", "datetime", "boolean", "file", "decimal", "copy", "password", "dict", "code", "filter", "json"]>>;
|
|
81
|
+
list: z.ZodOptional<z.ZodBoolean>;
|
|
12
82
|
}, "strip", z.ZodTypeAny, {
|
|
13
83
|
key: string;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
84
|
+
type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
|
|
85
|
+
label?: string | undefined;
|
|
86
|
+
alters_custom_fields?: boolean | null | undefined;
|
|
87
|
+
capabilities?: string[] | undefined;
|
|
88
|
+
choices?: {
|
|
89
|
+
value?: string | undefined;
|
|
90
|
+
key?: string | undefined;
|
|
91
|
+
label?: string | undefined;
|
|
92
|
+
sample?: string | undefined;
|
|
93
|
+
}[] | undefined;
|
|
94
|
+
computed?: boolean | null | undefined;
|
|
95
|
+
custom_field?: boolean | undefined;
|
|
96
|
+
default?: string | undefined;
|
|
97
|
+
depends_on?: string[] | undefined;
|
|
98
|
+
format?: "SELECT" | undefined;
|
|
99
|
+
from_search?: boolean | undefined;
|
|
100
|
+
from_write?: boolean | undefined;
|
|
101
|
+
help_text?: string | undefined;
|
|
102
|
+
help_text_html?: string | undefined;
|
|
103
|
+
input_format?: string[] | undefined;
|
|
104
|
+
language?: string | undefined;
|
|
105
|
+
parent_key?: string | undefined;
|
|
106
|
+
placeholder?: string | undefined;
|
|
107
|
+
prefill?: string | undefined;
|
|
108
|
+
required?: boolean | undefined;
|
|
109
|
+
searchfill?: string | undefined;
|
|
110
|
+
send_in_json?: boolean | undefined;
|
|
111
|
+
regex?: string | undefined;
|
|
112
|
+
list?: boolean | undefined;
|
|
19
113
|
}, {
|
|
20
114
|
key: string;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
implementation_id: z.ZodOptional<z.ZodString>;
|
|
51
|
-
is_expired: z.ZodOptional<z.ZodString>;
|
|
52
|
-
expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
|
-
app_key: z.ZodOptional<z.ZodString>;
|
|
54
|
-
version: z.ZodOptional<z.ZodString>;
|
|
55
|
-
user_id: z.ZodOptional<z.ZodNumber>;
|
|
56
|
-
}, "strip", z.ZodTypeAny, {
|
|
57
|
-
date: string;
|
|
58
|
-
id: number;
|
|
59
|
-
account_id: number;
|
|
60
|
-
is_invite_only: boolean;
|
|
61
|
-
is_private: boolean;
|
|
62
|
-
shared_with_all: boolean;
|
|
63
|
-
title?: string | null | undefined;
|
|
64
|
-
version?: string | undefined;
|
|
65
|
-
label?: string | null | undefined;
|
|
66
|
-
permissions?: Record<string, boolean> | undefined;
|
|
67
|
-
lastchanged?: string | undefined;
|
|
68
|
-
destination_selected_api?: string | null | undefined;
|
|
69
|
-
is_stale?: string | undefined;
|
|
70
|
-
is_shared?: string | undefined;
|
|
71
|
-
marked_stale_at?: string | null | undefined;
|
|
72
|
-
identifier?: string | null | undefined;
|
|
73
|
-
url?: string | undefined;
|
|
74
|
-
groups?: string | undefined;
|
|
75
|
-
members?: string | undefined;
|
|
76
|
-
user_id?: number | undefined;
|
|
77
|
-
implementation_id?: string | undefined;
|
|
78
|
-
is_expired?: string | undefined;
|
|
79
|
-
expired_at?: string | null | undefined;
|
|
80
|
-
app_key?: string | undefined;
|
|
81
|
-
}, {
|
|
82
|
-
date: string;
|
|
83
|
-
id: number;
|
|
84
|
-
account_id: number;
|
|
85
|
-
is_invite_only: boolean;
|
|
86
|
-
is_private: boolean;
|
|
87
|
-
shared_with_all: boolean;
|
|
88
|
-
title?: string | null | undefined;
|
|
89
|
-
version?: string | undefined;
|
|
90
|
-
label?: string | null | undefined;
|
|
91
|
-
permissions?: Record<string, boolean> | undefined;
|
|
92
|
-
lastchanged?: string | undefined;
|
|
93
|
-
destination_selected_api?: string | null | undefined;
|
|
94
|
-
is_stale?: string | undefined;
|
|
95
|
-
is_shared?: string | undefined;
|
|
96
|
-
marked_stale_at?: string | null | undefined;
|
|
97
|
-
identifier?: string | null | undefined;
|
|
98
|
-
url?: string | undefined;
|
|
99
|
-
groups?: string | undefined;
|
|
100
|
-
members?: string | undefined;
|
|
101
|
-
user_id?: number | undefined;
|
|
102
|
-
implementation_id?: string | undefined;
|
|
103
|
-
is_expired?: string | undefined;
|
|
104
|
-
expired_at?: string | null | undefined;
|
|
105
|
-
app_key?: string | undefined;
|
|
115
|
+
type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
|
|
116
|
+
label?: string | undefined;
|
|
117
|
+
alters_custom_fields?: boolean | null | undefined;
|
|
118
|
+
capabilities?: string[] | undefined;
|
|
119
|
+
choices?: {
|
|
120
|
+
value?: string | undefined;
|
|
121
|
+
key?: string | undefined;
|
|
122
|
+
label?: string | undefined;
|
|
123
|
+
sample?: string | undefined;
|
|
124
|
+
}[] | undefined;
|
|
125
|
+
computed?: boolean | null | undefined;
|
|
126
|
+
custom_field?: boolean | undefined;
|
|
127
|
+
default?: string | undefined;
|
|
128
|
+
depends_on?: string[] | undefined;
|
|
129
|
+
format?: "SELECT" | undefined;
|
|
130
|
+
from_search?: boolean | undefined;
|
|
131
|
+
from_write?: boolean | undefined;
|
|
132
|
+
help_text?: string | undefined;
|
|
133
|
+
help_text_html?: string | undefined;
|
|
134
|
+
input_format?: string[] | undefined;
|
|
135
|
+
language?: string | undefined;
|
|
136
|
+
parent_key?: string | undefined;
|
|
137
|
+
placeholder?: string | undefined;
|
|
138
|
+
prefill?: string | undefined;
|
|
139
|
+
required?: boolean | undefined;
|
|
140
|
+
searchfill?: string | undefined;
|
|
141
|
+
send_in_json?: boolean | undefined;
|
|
142
|
+
regex?: string | undefined;
|
|
143
|
+
list?: boolean | undefined;
|
|
106
144
|
}>;
|
|
107
|
-
|
|
108
|
-
declare const ActionItemSchema: z.ZodObject<Omit<{
|
|
145
|
+
declare const ActionSchema: z.ZodObject<{
|
|
109
146
|
id: z.ZodOptional<z.ZodString>;
|
|
110
147
|
type: z.ZodEnum<["filter", "read", "read_bulk", "run", "search", "search_and_write", "search_or_write", "write"]>;
|
|
111
148
|
key: z.ZodString;
|
|
@@ -158,7 +195,7 @@ declare const ActionItemSchema: z.ZodObject<Omit<{
|
|
|
158
195
|
list: z.ZodOptional<z.ZodBoolean>;
|
|
159
196
|
}, "strip", z.ZodTypeAny, {
|
|
160
197
|
key: string;
|
|
161
|
-
type?: "string" | "boolean" | "
|
|
198
|
+
type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
|
|
162
199
|
label?: string | undefined;
|
|
163
200
|
alters_custom_fields?: boolean | null | undefined;
|
|
164
201
|
capabilities?: string[] | undefined;
|
|
@@ -189,7 +226,7 @@ declare const ActionItemSchema: z.ZodObject<Omit<{
|
|
|
189
226
|
list?: boolean | undefined;
|
|
190
227
|
}, {
|
|
191
228
|
key: string;
|
|
192
|
-
type?: "string" | "boolean" | "
|
|
229
|
+
type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
|
|
193
230
|
label?: string | undefined;
|
|
194
231
|
alters_custom_fields?: boolean | null | undefined;
|
|
195
232
|
capabilities?: string[] | undefined;
|
|
@@ -235,18 +272,11 @@ declare const ActionItemSchema: z.ZodObject<Omit<{
|
|
|
235
272
|
}, {
|
|
236
273
|
can_use?: boolean | undefined;
|
|
237
274
|
}>>;
|
|
238
|
-
}, "type" | "name"> & {
|
|
239
|
-
app_key: z.ZodString;
|
|
240
|
-
action_type: z.ZodEnum<["filter", "read", "read_bulk", "run", "search", "search_and_write", "search_or_write", "write"]>;
|
|
241
|
-
title: z.ZodString;
|
|
242
|
-
type: z.ZodLiteral<"action">;
|
|
243
275
|
}, "strip", z.ZodTypeAny, {
|
|
244
|
-
type: "
|
|
276
|
+
type: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
|
|
245
277
|
key: string;
|
|
246
|
-
|
|
278
|
+
name: string;
|
|
247
279
|
description: string;
|
|
248
|
-
app_key: string;
|
|
249
|
-
action_type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
250
280
|
id?: string | undefined;
|
|
251
281
|
noun?: string | undefined;
|
|
252
282
|
description_html?: string | undefined;
|
|
@@ -254,7 +284,7 @@ declare const ActionItemSchema: z.ZodObject<Omit<{
|
|
|
254
284
|
is_hidden?: boolean | undefined;
|
|
255
285
|
needs?: {
|
|
256
286
|
key: string;
|
|
257
|
-
type?: "string" | "boolean" | "
|
|
287
|
+
type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
|
|
258
288
|
label?: string | undefined;
|
|
259
289
|
alters_custom_fields?: boolean | null | undefined;
|
|
260
290
|
capabilities?: string[] | undefined;
|
|
@@ -293,12 +323,10 @@ declare const ActionItemSchema: z.ZodObject<Omit<{
|
|
|
293
323
|
can_use?: boolean | undefined;
|
|
294
324
|
} | undefined;
|
|
295
325
|
}, {
|
|
296
|
-
type: "
|
|
326
|
+
type: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
|
|
297
327
|
key: string;
|
|
298
|
-
|
|
328
|
+
name: string;
|
|
299
329
|
description: string;
|
|
300
|
-
app_key: string;
|
|
301
|
-
action_type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
302
330
|
id?: string | undefined;
|
|
303
331
|
noun?: string | undefined;
|
|
304
332
|
description_html?: string | undefined;
|
|
@@ -306,7 +334,7 @@ declare const ActionItemSchema: z.ZodObject<Omit<{
|
|
|
306
334
|
is_hidden?: boolean | undefined;
|
|
307
335
|
needs?: {
|
|
308
336
|
key: string;
|
|
309
|
-
type?: "string" | "boolean" | "
|
|
337
|
+
type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
|
|
310
338
|
label?: string | undefined;
|
|
311
339
|
alters_custom_fields?: boolean | null | undefined;
|
|
312
340
|
capabilities?: string[] | undefined;
|
|
@@ -345,217 +373,384 @@ declare const ActionItemSchema: z.ZodObject<Omit<{
|
|
|
345
373
|
can_use?: boolean | undefined;
|
|
346
374
|
} | undefined;
|
|
347
375
|
}>;
|
|
348
|
-
|
|
349
|
-
|
|
376
|
+
declare const ChoiceSchema: z.ZodObject<{
|
|
377
|
+
value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
378
|
+
label: z.ZodString;
|
|
379
|
+
}, "strip", z.ZodTypeAny, {
|
|
380
|
+
value: string | number;
|
|
381
|
+
label: string;
|
|
382
|
+
}, {
|
|
383
|
+
value: string | number;
|
|
384
|
+
label: string;
|
|
385
|
+
}>;
|
|
386
|
+
declare const FieldSchema: z.ZodObject<{
|
|
350
387
|
key: z.ZodString;
|
|
351
|
-
|
|
352
|
-
|
|
388
|
+
label: z.ZodString;
|
|
389
|
+
type: z.ZodEnum<["string", "number", "boolean", "datetime", "file", "object", "array"]>;
|
|
390
|
+
required: z.ZodBoolean;
|
|
391
|
+
description: z.ZodOptional<z.ZodString>;
|
|
353
392
|
choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
354
|
-
|
|
355
|
-
label: z.
|
|
356
|
-
sample: z.ZodOptional<z.ZodString>;
|
|
357
|
-
value: z.ZodOptional<z.ZodString>;
|
|
393
|
+
value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
394
|
+
label: z.ZodString;
|
|
358
395
|
}, "strip", z.ZodTypeAny, {
|
|
359
|
-
value
|
|
360
|
-
|
|
361
|
-
label?: string | undefined;
|
|
362
|
-
sample?: string | undefined;
|
|
396
|
+
value: string | number;
|
|
397
|
+
label: string;
|
|
363
398
|
}, {
|
|
364
|
-
value
|
|
365
|
-
|
|
366
|
-
label?: string | undefined;
|
|
367
|
-
sample?: string | undefined;
|
|
399
|
+
value: string | number;
|
|
400
|
+
label: string;
|
|
368
401
|
}>, "many">>;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
402
|
+
}, "strip", z.ZodTypeAny, {
|
|
403
|
+
type: "string" | "number" | "boolean" | "object" | "datetime" | "file" | "array";
|
|
404
|
+
key: string;
|
|
405
|
+
label: string;
|
|
406
|
+
required: boolean;
|
|
407
|
+
choices?: {
|
|
408
|
+
value: string | number;
|
|
409
|
+
label: string;
|
|
410
|
+
}[] | undefined;
|
|
411
|
+
description?: string | undefined;
|
|
412
|
+
}, {
|
|
413
|
+
type: "string" | "number" | "boolean" | "object" | "datetime" | "file" | "array";
|
|
414
|
+
key: string;
|
|
415
|
+
label: string;
|
|
416
|
+
required: boolean;
|
|
417
|
+
choices?: {
|
|
418
|
+
value: string | number;
|
|
419
|
+
label: string;
|
|
420
|
+
}[] | undefined;
|
|
421
|
+
description?: string | undefined;
|
|
422
|
+
}>;
|
|
423
|
+
declare const ActionExecutionResultSchema: z.ZodObject<{
|
|
424
|
+
data: z.ZodArray<z.ZodUnknown, "many">;
|
|
425
|
+
}, "strip", z.ZodTypeAny, {
|
|
426
|
+
data: unknown[];
|
|
427
|
+
}, {
|
|
428
|
+
data: unknown[];
|
|
429
|
+
}>;
|
|
430
|
+
declare const ActionFieldChoiceSchema: z.ZodObject<{
|
|
431
|
+
value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
432
|
+
label: z.ZodString;
|
|
433
|
+
}, "strip", z.ZodTypeAny, {
|
|
434
|
+
value: string | number;
|
|
435
|
+
label: string;
|
|
436
|
+
}, {
|
|
437
|
+
value: string | number;
|
|
438
|
+
label: string;
|
|
439
|
+
}>;
|
|
440
|
+
declare const ActionFieldSchema: z.ZodObject<{
|
|
441
|
+
key: z.ZodString;
|
|
379
442
|
label: z.ZodOptional<z.ZodString>;
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
regex: z.ZodOptional<z.ZodString>;
|
|
388
|
-
type: z.ZodOptional<z.ZodEnum<["integer", "string", "text", "datetime", "boolean", "file", "decimal", "copy", "password", "dict", "code", "filter", "json"]>>;
|
|
389
|
-
list: z.ZodOptional<z.ZodBoolean>;
|
|
390
|
-
}, "depends_on" | "format" | "placeholder" | "required"> & {
|
|
391
|
-
id: z.ZodString;
|
|
392
|
-
default_value: z.ZodString;
|
|
393
|
-
depends_on: z.ZodArray<z.ZodString, "many">;
|
|
394
|
-
description: z.ZodString;
|
|
395
|
-
invalidates_input_fields: z.ZodBoolean;
|
|
396
|
-
is_required: z.ZodBoolean;
|
|
397
|
-
placeholder: z.ZodString;
|
|
398
|
-
title: z.ZodString;
|
|
399
|
-
value_type: z.ZodString;
|
|
400
|
-
format: z.ZodOptional<z.ZodString>;
|
|
401
|
-
items: z.ZodOptional<z.ZodObject<{
|
|
402
|
-
type: z.ZodString;
|
|
443
|
+
required: z.ZodBoolean;
|
|
444
|
+
type: z.ZodOptional<z.ZodString>;
|
|
445
|
+
helpText: z.ZodOptional<z.ZodString>;
|
|
446
|
+
helpTextHtml: z.ZodOptional<z.ZodString>;
|
|
447
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
448
|
+
value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
449
|
+
label: z.ZodString;
|
|
403
450
|
}, "strip", z.ZodTypeAny, {
|
|
404
|
-
|
|
451
|
+
value: string | number;
|
|
452
|
+
label: string;
|
|
405
453
|
}, {
|
|
406
|
-
|
|
407
|
-
|
|
454
|
+
value: string | number;
|
|
455
|
+
label: string;
|
|
456
|
+
}>, "many">>;
|
|
457
|
+
default: z.ZodOptional<z.ZodString>;
|
|
458
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
459
|
+
computed: z.ZodOptional<z.ZodBoolean>;
|
|
460
|
+
customField: z.ZodOptional<z.ZodBoolean>;
|
|
461
|
+
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
462
|
+
format: z.ZodOptional<z.ZodString>;
|
|
463
|
+
inputFormat: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
408
464
|
}, "strip", z.ZodTypeAny, {
|
|
409
465
|
key: string;
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
depends_on: string[];
|
|
413
|
-
placeholder: string;
|
|
414
|
-
id: string;
|
|
415
|
-
default_value: string;
|
|
416
|
-
invalidates_input_fields: boolean;
|
|
417
|
-
is_required: boolean;
|
|
418
|
-
value_type: string;
|
|
419
|
-
type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
|
|
466
|
+
required: boolean;
|
|
467
|
+
type?: string | undefined;
|
|
420
468
|
label?: string | undefined;
|
|
421
|
-
alters_custom_fields?: boolean | null | undefined;
|
|
422
|
-
capabilities?: string[] | undefined;
|
|
423
469
|
choices?: {
|
|
424
|
-
value
|
|
425
|
-
|
|
426
|
-
label?: string | undefined;
|
|
427
|
-
sample?: string | undefined;
|
|
470
|
+
value: string | number;
|
|
471
|
+
label: string;
|
|
428
472
|
}[] | undefined;
|
|
429
|
-
computed?: boolean |
|
|
430
|
-
custom_field?: boolean | undefined;
|
|
473
|
+
computed?: boolean | undefined;
|
|
431
474
|
default?: string | undefined;
|
|
432
475
|
format?: string | undefined;
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
parent_key?: string | undefined;
|
|
440
|
-
prefill?: string | undefined;
|
|
441
|
-
searchfill?: string | undefined;
|
|
442
|
-
send_in_json?: boolean | undefined;
|
|
443
|
-
regex?: string | undefined;
|
|
444
|
-
list?: boolean | undefined;
|
|
445
|
-
items?: {
|
|
446
|
-
type: string;
|
|
447
|
-
} | undefined;
|
|
476
|
+
placeholder?: string | undefined;
|
|
477
|
+
helpText?: string | undefined;
|
|
478
|
+
helpTextHtml?: string | undefined;
|
|
479
|
+
customField?: boolean | undefined;
|
|
480
|
+
dependsOn?: string[] | undefined;
|
|
481
|
+
inputFormat?: string[] | undefined;
|
|
448
482
|
}, {
|
|
449
483
|
key: string;
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
depends_on: string[];
|
|
453
|
-
placeholder: string;
|
|
454
|
-
id: string;
|
|
455
|
-
default_value: string;
|
|
456
|
-
invalidates_input_fields: boolean;
|
|
457
|
-
is_required: boolean;
|
|
458
|
-
value_type: string;
|
|
459
|
-
type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
|
|
484
|
+
required: boolean;
|
|
485
|
+
type?: string | undefined;
|
|
460
486
|
label?: string | undefined;
|
|
461
|
-
alters_custom_fields?: boolean | null | undefined;
|
|
462
|
-
capabilities?: string[] | undefined;
|
|
463
487
|
choices?: {
|
|
464
|
-
value
|
|
465
|
-
|
|
466
|
-
label?: string | undefined;
|
|
467
|
-
sample?: string | undefined;
|
|
488
|
+
value: string | number;
|
|
489
|
+
label: string;
|
|
468
490
|
}[] | undefined;
|
|
469
|
-
computed?: boolean |
|
|
470
|
-
custom_field?: boolean | undefined;
|
|
491
|
+
computed?: boolean | undefined;
|
|
471
492
|
default?: string | undefined;
|
|
472
493
|
format?: string | undefined;
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
parent_key?: string | undefined;
|
|
480
|
-
prefill?: string | undefined;
|
|
481
|
-
searchfill?: string | undefined;
|
|
482
|
-
send_in_json?: boolean | undefined;
|
|
483
|
-
regex?: string | undefined;
|
|
484
|
-
list?: boolean | undefined;
|
|
485
|
-
items?: {
|
|
486
|
-
type: string;
|
|
487
|
-
} | undefined;
|
|
494
|
+
placeholder?: string | undefined;
|
|
495
|
+
helpText?: string | undefined;
|
|
496
|
+
helpTextHtml?: string | undefined;
|
|
497
|
+
customField?: boolean | undefined;
|
|
498
|
+
dependsOn?: string[] | undefined;
|
|
499
|
+
inputFormat?: string[] | undefined;
|
|
488
500
|
}>;
|
|
489
|
-
|
|
490
|
-
declare const UserProfileItemSchema: z.ZodObject<Omit<{
|
|
501
|
+
declare const AuthenticationSchema: z.ZodObject<{
|
|
491
502
|
id: z.ZodNumber;
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
503
|
+
date: z.ZodString;
|
|
504
|
+
lastchanged: z.ZodOptional<z.ZodString>;
|
|
505
|
+
account_id: z.ZodNumber;
|
|
506
|
+
customuser_id: z.ZodOptional<z.ZodNumber>;
|
|
507
|
+
selected_api: z.ZodString;
|
|
508
|
+
destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
509
|
+
is_invite_only: z.ZodBoolean;
|
|
510
|
+
is_private: z.ZodBoolean;
|
|
511
|
+
shared_with_all: z.ZodBoolean;
|
|
512
|
+
is_stale: z.ZodOptional<z.ZodString>;
|
|
513
|
+
is_shared: z.ZodOptional<z.ZodString>;
|
|
514
|
+
marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
515
|
+
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
516
|
+
identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
517
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
518
|
+
url: z.ZodOptional<z.ZodString>;
|
|
519
|
+
groups: z.ZodOptional<z.ZodString>;
|
|
520
|
+
members: z.ZodOptional<z.ZodString>;
|
|
521
|
+
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
522
|
+
}, "strip", z.ZodTypeAny, {
|
|
523
|
+
id: number;
|
|
524
|
+
date: string;
|
|
525
|
+
selected_api: string;
|
|
526
|
+
account_id: number;
|
|
527
|
+
is_invite_only: boolean;
|
|
528
|
+
is_private: boolean;
|
|
529
|
+
shared_with_all: boolean;
|
|
530
|
+
url?: string | undefined;
|
|
531
|
+
label?: string | null | undefined;
|
|
532
|
+
permissions?: Record<string, boolean> | undefined;
|
|
533
|
+
lastchanged?: string | undefined;
|
|
534
|
+
customuser_id?: number | undefined;
|
|
535
|
+
destination_selected_api?: string | null | undefined;
|
|
536
|
+
is_stale?: string | undefined;
|
|
537
|
+
is_shared?: string | undefined;
|
|
538
|
+
marked_stale_at?: string | null | undefined;
|
|
539
|
+
identifier?: string | null | undefined;
|
|
540
|
+
title?: string | null | undefined;
|
|
541
|
+
groups?: string | undefined;
|
|
542
|
+
members?: string | undefined;
|
|
543
|
+
}, {
|
|
544
|
+
id: number;
|
|
545
|
+
date: string;
|
|
546
|
+
selected_api: string;
|
|
547
|
+
account_id: number;
|
|
548
|
+
is_invite_only: boolean;
|
|
549
|
+
is_private: boolean;
|
|
550
|
+
shared_with_all: boolean;
|
|
551
|
+
url?: string | undefined;
|
|
552
|
+
label?: string | null | undefined;
|
|
553
|
+
permissions?: Record<string, boolean> | undefined;
|
|
554
|
+
lastchanged?: string | undefined;
|
|
555
|
+
customuser_id?: number | undefined;
|
|
556
|
+
destination_selected_api?: string | null | undefined;
|
|
557
|
+
is_stale?: string | undefined;
|
|
558
|
+
is_shared?: string | undefined;
|
|
559
|
+
marked_stale_at?: string | null | undefined;
|
|
560
|
+
identifier?: string | null | undefined;
|
|
561
|
+
title?: string | null | undefined;
|
|
562
|
+
groups?: string | undefined;
|
|
563
|
+
members?: string | undefined;
|
|
564
|
+
}>;
|
|
565
|
+
declare const AuthenticationsResponseSchema: z.ZodObject<{
|
|
566
|
+
count: z.ZodNumber;
|
|
567
|
+
next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
568
|
+
previous: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
569
|
+
results: z.ZodArray<z.ZodObject<{
|
|
570
|
+
id: z.ZodNumber;
|
|
571
|
+
date: z.ZodString;
|
|
572
|
+
lastchanged: z.ZodOptional<z.ZodString>;
|
|
573
|
+
account_id: z.ZodNumber;
|
|
574
|
+
customuser_id: z.ZodOptional<z.ZodNumber>;
|
|
575
|
+
selected_api: z.ZodString;
|
|
576
|
+
destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
577
|
+
is_invite_only: z.ZodBoolean;
|
|
578
|
+
is_private: z.ZodBoolean;
|
|
579
|
+
shared_with_all: z.ZodBoolean;
|
|
580
|
+
is_stale: z.ZodOptional<z.ZodString>;
|
|
581
|
+
is_shared: z.ZodOptional<z.ZodString>;
|
|
582
|
+
marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
583
|
+
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
584
|
+
identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
585
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
586
|
+
url: z.ZodOptional<z.ZodString>;
|
|
587
|
+
groups: z.ZodOptional<z.ZodString>;
|
|
588
|
+
members: z.ZodOptional<z.ZodString>;
|
|
589
|
+
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
590
|
+
}, "strip", z.ZodTypeAny, {
|
|
591
|
+
id: number;
|
|
592
|
+
date: string;
|
|
593
|
+
selected_api: string;
|
|
594
|
+
account_id: number;
|
|
595
|
+
is_invite_only: boolean;
|
|
596
|
+
is_private: boolean;
|
|
597
|
+
shared_with_all: boolean;
|
|
598
|
+
url?: string | undefined;
|
|
599
|
+
label?: string | null | undefined;
|
|
600
|
+
permissions?: Record<string, boolean> | undefined;
|
|
601
|
+
lastchanged?: string | undefined;
|
|
602
|
+
customuser_id?: number | undefined;
|
|
603
|
+
destination_selected_api?: string | null | undefined;
|
|
604
|
+
is_stale?: string | undefined;
|
|
605
|
+
is_shared?: string | undefined;
|
|
606
|
+
marked_stale_at?: string | null | undefined;
|
|
607
|
+
identifier?: string | null | undefined;
|
|
608
|
+
title?: string | null | undefined;
|
|
609
|
+
groups?: string | undefined;
|
|
610
|
+
members?: string | undefined;
|
|
611
|
+
}, {
|
|
612
|
+
id: number;
|
|
613
|
+
date: string;
|
|
614
|
+
selected_api: string;
|
|
615
|
+
account_id: number;
|
|
616
|
+
is_invite_only: boolean;
|
|
617
|
+
is_private: boolean;
|
|
618
|
+
shared_with_all: boolean;
|
|
619
|
+
url?: string | undefined;
|
|
620
|
+
label?: string | null | undefined;
|
|
621
|
+
permissions?: Record<string, boolean> | undefined;
|
|
622
|
+
lastchanged?: string | undefined;
|
|
623
|
+
customuser_id?: number | undefined;
|
|
624
|
+
destination_selected_api?: string | null | undefined;
|
|
625
|
+
is_stale?: string | undefined;
|
|
626
|
+
is_shared?: string | undefined;
|
|
627
|
+
marked_stale_at?: string | null | undefined;
|
|
628
|
+
identifier?: string | null | undefined;
|
|
629
|
+
title?: string | null | undefined;
|
|
630
|
+
groups?: string | undefined;
|
|
631
|
+
members?: string | undefined;
|
|
632
|
+
}>, "many">;
|
|
633
|
+
}, "strip", z.ZodTypeAny, {
|
|
634
|
+
count: number;
|
|
635
|
+
results: {
|
|
636
|
+
id: number;
|
|
637
|
+
date: string;
|
|
638
|
+
selected_api: string;
|
|
639
|
+
account_id: number;
|
|
640
|
+
is_invite_only: boolean;
|
|
641
|
+
is_private: boolean;
|
|
642
|
+
shared_with_all: boolean;
|
|
643
|
+
url?: string | undefined;
|
|
644
|
+
label?: string | null | undefined;
|
|
645
|
+
permissions?: Record<string, boolean> | undefined;
|
|
646
|
+
lastchanged?: string | undefined;
|
|
647
|
+
customuser_id?: number | undefined;
|
|
648
|
+
destination_selected_api?: string | null | undefined;
|
|
649
|
+
is_stale?: string | undefined;
|
|
650
|
+
is_shared?: string | undefined;
|
|
651
|
+
marked_stale_at?: string | null | undefined;
|
|
652
|
+
identifier?: string | null | undefined;
|
|
653
|
+
title?: string | null | undefined;
|
|
654
|
+
groups?: string | undefined;
|
|
655
|
+
members?: string | undefined;
|
|
656
|
+
}[];
|
|
657
|
+
next?: string | null | undefined;
|
|
658
|
+
previous?: string | null | undefined;
|
|
659
|
+
}, {
|
|
660
|
+
count: number;
|
|
661
|
+
results: {
|
|
662
|
+
id: number;
|
|
663
|
+
date: string;
|
|
664
|
+
selected_api: string;
|
|
665
|
+
account_id: number;
|
|
666
|
+
is_invite_only: boolean;
|
|
667
|
+
is_private: boolean;
|
|
668
|
+
shared_with_all: boolean;
|
|
669
|
+
url?: string | undefined;
|
|
670
|
+
label?: string | null | undefined;
|
|
671
|
+
permissions?: Record<string, boolean> | undefined;
|
|
672
|
+
lastchanged?: string | undefined;
|
|
673
|
+
customuser_id?: number | undefined;
|
|
674
|
+
destination_selected_api?: string | null | undefined;
|
|
675
|
+
is_stale?: string | undefined;
|
|
676
|
+
is_shared?: string | undefined;
|
|
677
|
+
marked_stale_at?: string | null | undefined;
|
|
678
|
+
identifier?: string | null | undefined;
|
|
679
|
+
title?: string | null | undefined;
|
|
680
|
+
groups?: string | undefined;
|
|
681
|
+
members?: string | undefined;
|
|
682
|
+
}[];
|
|
683
|
+
next?: string | null | undefined;
|
|
684
|
+
previous?: string | null | undefined;
|
|
685
|
+
}>;
|
|
686
|
+
declare const UserProfileSchema: z.ZodObject<{
|
|
687
|
+
id: z.ZodNumber;
|
|
688
|
+
code: z.ZodString;
|
|
689
|
+
user_id: z.ZodNumber;
|
|
690
|
+
auto_provisioned: z.ZodBoolean;
|
|
691
|
+
first_name: z.ZodString;
|
|
692
|
+
last_name: z.ZodString;
|
|
693
|
+
username: z.ZodString;
|
|
694
|
+
personas: z.ZodString;
|
|
695
|
+
user_generated_personas: z.ZodString;
|
|
696
|
+
last_login: z.ZodString;
|
|
697
|
+
email: z.ZodString;
|
|
698
|
+
email_hash: z.ZodString;
|
|
699
|
+
email_confirmed: z.ZodBoolean;
|
|
700
|
+
timezone: z.ZodString;
|
|
701
|
+
photo_url: z.ZodString;
|
|
702
|
+
has_seen_notifications: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodBoolean>>;
|
|
703
|
+
signup: z.ZodString;
|
|
704
|
+
since_signup: z.ZodString;
|
|
705
|
+
has_activated: z.ZodBoolean;
|
|
706
|
+
enable_gz_creator: z.ZodBoolean;
|
|
707
|
+
should_see_nps_survey: z.ZodBoolean;
|
|
708
|
+
is_developer: z.ZodBoolean;
|
|
709
|
+
is_expert: z.ZodBoolean;
|
|
710
|
+
tos_agreement: z.ZodBoolean;
|
|
711
|
+
should_renew_tos: z.ZodBoolean;
|
|
712
|
+
is_gdpr_consented: z.ZodBoolean;
|
|
713
|
+
disable_ssl_check: z.ZodBoolean;
|
|
714
|
+
identity: z.ZodNumber;
|
|
715
|
+
summary_schedule: z.ZodString;
|
|
716
|
+
alert_triggers: z.ZodString;
|
|
717
|
+
alert_actions: z.ZodString;
|
|
718
|
+
is_staff: z.ZodBoolean;
|
|
719
|
+
is_zt_reviewer: z.ZodBoolean;
|
|
720
|
+
is_high_value: z.ZodBoolean;
|
|
721
|
+
is_temporary: z.ZodBoolean;
|
|
722
|
+
banner_message: z.ZodString;
|
|
723
|
+
enable_totp_2fa: z.ZodBoolean;
|
|
724
|
+
viewed_help: z.ZodRecord<z.ZodString, z.ZodBoolean>;
|
|
725
|
+
show_editor_migration_mesaging: z.ZodBoolean;
|
|
726
|
+
switches: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
727
|
+
organizations: z.ZodArray<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>, "many">;
|
|
728
|
+
primary_organization: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
729
|
+
has_active_zaps: z.ZodBoolean;
|
|
730
|
+
has_google_sso: z.ZodBoolean;
|
|
731
|
+
auth_realm: z.ZodString;
|
|
732
|
+
roles: z.ZodArray<z.ZodObject<{
|
|
733
|
+
account_id: z.ZodNumber;
|
|
734
|
+
role: z.ZodString;
|
|
735
|
+
}, "strip", z.ZodTypeAny, {
|
|
736
|
+
account_id: number;
|
|
737
|
+
role: string;
|
|
738
|
+
}, {
|
|
739
|
+
account_id: number;
|
|
740
|
+
role: string;
|
|
741
|
+
}>, "many">;
|
|
742
|
+
}, "strip", z.ZodTypeAny, {
|
|
743
|
+
code: string;
|
|
744
|
+
id: number;
|
|
745
|
+
user_id: number;
|
|
746
|
+
auto_provisioned: boolean;
|
|
553
747
|
first_name: string;
|
|
554
748
|
last_name: string;
|
|
555
749
|
username: string;
|
|
556
750
|
personas: string;
|
|
557
751
|
user_generated_personas: string;
|
|
558
752
|
last_login: string;
|
|
753
|
+
email: string;
|
|
559
754
|
email_hash: string;
|
|
560
755
|
email_confirmed: boolean;
|
|
561
756
|
timezone: string;
|
|
@@ -584,8 +779,9 @@ declare const UserProfileItemSchema: z.ZodObject<Omit<{
|
|
|
584
779
|
enable_totp_2fa: boolean;
|
|
585
780
|
viewed_help: Record<string, boolean>;
|
|
586
781
|
show_editor_migration_mesaging: boolean;
|
|
587
|
-
switches: Record<string,
|
|
588
|
-
organizations:
|
|
782
|
+
switches: Record<string, unknown>;
|
|
783
|
+
organizations: (Record<string, unknown> | null)[];
|
|
784
|
+
primary_organization: Record<string, unknown> | null;
|
|
589
785
|
has_active_zaps: boolean;
|
|
590
786
|
has_google_sso: boolean;
|
|
591
787
|
auth_realm: string;
|
|
@@ -593,12 +789,10 @@ declare const UserProfileItemSchema: z.ZodObject<Omit<{
|
|
|
593
789
|
account_id: number;
|
|
594
790
|
role: string;
|
|
595
791
|
}[];
|
|
596
|
-
full_name: string;
|
|
597
|
-
primary_organization?: any;
|
|
598
792
|
}, {
|
|
599
|
-
email: string;
|
|
600
793
|
code: string;
|
|
601
794
|
id: number;
|
|
795
|
+
user_id: number;
|
|
602
796
|
auto_provisioned: boolean;
|
|
603
797
|
first_name: string;
|
|
604
798
|
last_name: string;
|
|
@@ -606,6 +800,7 @@ declare const UserProfileItemSchema: z.ZodObject<Omit<{
|
|
|
606
800
|
personas: string;
|
|
607
801
|
user_generated_personas: string;
|
|
608
802
|
last_login: string;
|
|
803
|
+
email: string;
|
|
609
804
|
email_hash: string;
|
|
610
805
|
email_confirmed: boolean;
|
|
611
806
|
timezone: string;
|
|
@@ -634,8 +829,9 @@ declare const UserProfileItemSchema: z.ZodObject<Omit<{
|
|
|
634
829
|
enable_totp_2fa: boolean;
|
|
635
830
|
viewed_help: Record<string, boolean>;
|
|
636
831
|
show_editor_migration_mesaging: boolean;
|
|
637
|
-
switches: Record<string,
|
|
638
|
-
organizations:
|
|
832
|
+
switches: Record<string, unknown>;
|
|
833
|
+
organizations: (Record<string, unknown> | null)[];
|
|
834
|
+
primary_organization: Record<string, unknown> | null;
|
|
639
835
|
has_active_zaps: boolean;
|
|
640
836
|
has_google_sso: boolean;
|
|
641
837
|
auth_realm: string;
|
|
@@ -643,263 +839,197 @@ declare const UserProfileItemSchema: z.ZodObject<Omit<{
|
|
|
643
839
|
account_id: number;
|
|
644
840
|
role: string;
|
|
645
841
|
}[];
|
|
646
|
-
full_name: string;
|
|
647
|
-
primary_organization?: any;
|
|
648
842
|
}>;
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
843
|
+
declare const AppSchema: z.ZodObject<{
|
|
844
|
+
age_in_days: z.ZodOptional<z.ZodString>;
|
|
845
|
+
api_docs_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
846
|
+
app_profile_url: z.ZodString;
|
|
847
|
+
banner: z.ZodOptional<z.ZodString>;
|
|
848
|
+
categories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
849
|
+
canonical_id: z.ZodOptional<z.ZodString>;
|
|
850
|
+
current_implementation_id: z.ZodString;
|
|
851
|
+
days_since_last_update: z.ZodOptional<z.ZodString>;
|
|
852
|
+
description: z.ZodString;
|
|
853
|
+
external_url: z.ZodString;
|
|
854
|
+
hashtag: z.ZodOptional<z.ZodString>;
|
|
855
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
856
|
+
image: z.ZodOptional<z.ZodString>;
|
|
857
|
+
images: z.ZodOptional<z.ZodString>;
|
|
858
|
+
integration_overview_html: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
859
|
+
internal_id: z.ZodString;
|
|
860
|
+
invite_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
861
|
+
is_beta: z.ZodOptional<z.ZodString>;
|
|
862
|
+
is_built_in: z.ZodOptional<z.ZodString>;
|
|
863
|
+
is_featured: z.ZodOptional<z.ZodString>;
|
|
864
|
+
is_premium: z.ZodOptional<z.ZodBoolean>;
|
|
865
|
+
is_public: z.ZodOptional<z.ZodString>;
|
|
866
|
+
is_upcoming: z.ZodOptional<z.ZodString>;
|
|
867
|
+
learn_more_url: z.ZodString;
|
|
868
|
+
name: z.ZodString;
|
|
869
|
+
popularity: z.ZodNumber;
|
|
870
|
+
primary_color: z.ZodString;
|
|
871
|
+
request_count: z.ZodOptional<z.ZodString>;
|
|
872
|
+
slug: z.ZodString;
|
|
873
|
+
zap_usage_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
874
|
+
}, "strip", z.ZodTypeAny, {
|
|
875
|
+
name: string;
|
|
876
|
+
description: string;
|
|
877
|
+
app_profile_url: string;
|
|
878
|
+
current_implementation_id: string;
|
|
879
|
+
external_url: string;
|
|
880
|
+
internal_id: string;
|
|
881
|
+
learn_more_url: string;
|
|
882
|
+
popularity: number;
|
|
883
|
+
primary_color: string;
|
|
884
|
+
slug: string;
|
|
885
|
+
id?: number | undefined;
|
|
886
|
+
age_in_days?: string | undefined;
|
|
887
|
+
api_docs_url?: string | null | undefined;
|
|
888
|
+
banner?: string | undefined;
|
|
889
|
+
categories?: string[] | undefined;
|
|
890
|
+
canonical_id?: string | undefined;
|
|
891
|
+
days_since_last_update?: string | undefined;
|
|
892
|
+
hashtag?: string | undefined;
|
|
893
|
+
image?: string | undefined;
|
|
894
|
+
images?: string | undefined;
|
|
895
|
+
integration_overview_html?: string | null | undefined;
|
|
896
|
+
invite_url?: string | null | undefined;
|
|
897
|
+
is_beta?: string | undefined;
|
|
898
|
+
is_built_in?: string | undefined;
|
|
899
|
+
is_featured?: string | undefined;
|
|
900
|
+
is_premium?: boolean | undefined;
|
|
901
|
+
is_public?: string | undefined;
|
|
902
|
+
is_upcoming?: string | undefined;
|
|
903
|
+
request_count?: string | undefined;
|
|
904
|
+
zap_usage_count?: number | null | undefined;
|
|
905
|
+
}, {
|
|
906
|
+
name: string;
|
|
907
|
+
description: string;
|
|
908
|
+
app_profile_url: string;
|
|
909
|
+
current_implementation_id: string;
|
|
910
|
+
external_url: string;
|
|
911
|
+
internal_id: string;
|
|
912
|
+
learn_more_url: string;
|
|
913
|
+
popularity: number;
|
|
914
|
+
primary_color: string;
|
|
915
|
+
slug: string;
|
|
916
|
+
id?: number | undefined;
|
|
917
|
+
age_in_days?: string | undefined;
|
|
918
|
+
api_docs_url?: string | null | undefined;
|
|
919
|
+
banner?: string | undefined;
|
|
920
|
+
categories?: string[] | undefined;
|
|
921
|
+
canonical_id?: string | undefined;
|
|
922
|
+
days_since_last_update?: string | undefined;
|
|
923
|
+
hashtag?: string | undefined;
|
|
924
|
+
image?: string | undefined;
|
|
925
|
+
images?: string | undefined;
|
|
926
|
+
integration_overview_html?: string | null | undefined;
|
|
927
|
+
invite_url?: string | null | undefined;
|
|
928
|
+
is_beta?: string | undefined;
|
|
929
|
+
is_built_in?: string | undefined;
|
|
930
|
+
is_featured?: string | undefined;
|
|
931
|
+
is_premium?: boolean | undefined;
|
|
932
|
+
is_public?: string | undefined;
|
|
933
|
+
is_upcoming?: string | undefined;
|
|
934
|
+
request_count?: string | undefined;
|
|
935
|
+
zap_usage_count?: number | null | undefined;
|
|
936
|
+
}>;
|
|
937
|
+
declare const NeedsRequestSchema: z.ZodObject<{
|
|
938
|
+
selected_api: z.ZodString;
|
|
939
|
+
action: z.ZodString;
|
|
940
|
+
type_of: z.ZodString;
|
|
941
|
+
authentication_id: z.ZodOptional<z.ZodNumber>;
|
|
942
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
943
|
+
}, "strip", z.ZodTypeAny, {
|
|
944
|
+
selected_api: string;
|
|
945
|
+
action: string;
|
|
946
|
+
type_of: string;
|
|
947
|
+
params?: Record<string, unknown> | undefined;
|
|
948
|
+
authentication_id?: number | undefined;
|
|
949
|
+
}, {
|
|
950
|
+
selected_api: string;
|
|
951
|
+
action: string;
|
|
952
|
+
type_of: string;
|
|
953
|
+
params?: Record<string, unknown> | undefined;
|
|
954
|
+
authentication_id?: number | undefined;
|
|
955
|
+
}>;
|
|
956
|
+
declare const NeedsResponseSchema: z.ZodObject<{
|
|
957
|
+
success: z.ZodBoolean;
|
|
958
|
+
needs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
959
|
+
key: z.ZodString;
|
|
960
|
+
alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
961
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
962
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
963
|
+
key: z.ZodOptional<z.ZodString>;
|
|
964
|
+
label: z.ZodOptional<z.ZodString>;
|
|
965
|
+
sample: z.ZodOptional<z.ZodString>;
|
|
966
|
+
value: z.ZodOptional<z.ZodString>;
|
|
967
|
+
}, "strip", z.ZodTypeAny, {
|
|
968
|
+
value?: string | undefined;
|
|
969
|
+
key?: string | undefined;
|
|
970
|
+
label?: string | undefined;
|
|
971
|
+
sample?: string | undefined;
|
|
972
|
+
}, {
|
|
973
|
+
value?: string | undefined;
|
|
974
|
+
key?: string | undefined;
|
|
975
|
+
label?: string | undefined;
|
|
976
|
+
sample?: string | undefined;
|
|
977
|
+
}>, "many">>;
|
|
978
|
+
computed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
979
|
+
custom_field: z.ZodOptional<z.ZodBoolean>;
|
|
980
|
+
default: z.ZodOptional<z.ZodString>;
|
|
981
|
+
depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
982
|
+
format: z.ZodOptional<z.ZodLiteral<"SELECT">>;
|
|
983
|
+
from_search: z.ZodOptional<z.ZodBoolean>;
|
|
984
|
+
from_write: z.ZodOptional<z.ZodBoolean>;
|
|
985
|
+
help_text: z.ZodOptional<z.ZodString>;
|
|
986
|
+
help_text_html: z.ZodOptional<z.ZodString>;
|
|
987
|
+
input_format: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
720
988
|
label: z.ZodOptional<z.ZodString>;
|
|
721
|
-
|
|
722
|
-
|
|
989
|
+
language: z.ZodOptional<z.ZodString>;
|
|
990
|
+
parent_key: z.ZodOptional<z.ZodString>;
|
|
991
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
992
|
+
prefill: z.ZodOptional<z.ZodString>;
|
|
993
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
994
|
+
searchfill: z.ZodOptional<z.ZodString>;
|
|
995
|
+
send_in_json: z.ZodOptional<z.ZodBoolean>;
|
|
996
|
+
regex: z.ZodOptional<z.ZodString>;
|
|
997
|
+
type: z.ZodOptional<z.ZodEnum<["integer", "string", "text", "datetime", "boolean", "file", "decimal", "copy", "password", "dict", "code", "filter", "json"]>>;
|
|
998
|
+
list: z.ZodOptional<z.ZodBoolean>;
|
|
723
999
|
}, "strip", z.ZodTypeAny, {
|
|
724
|
-
|
|
725
|
-
|
|
1000
|
+
key: string;
|
|
1001
|
+
type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
|
|
726
1002
|
label?: string | undefined;
|
|
727
|
-
|
|
1003
|
+
alters_custom_fields?: boolean | null | undefined;
|
|
1004
|
+
capabilities?: string[] | undefined;
|
|
1005
|
+
choices?: {
|
|
1006
|
+
value?: string | undefined;
|
|
1007
|
+
key?: string | undefined;
|
|
1008
|
+
label?: string | undefined;
|
|
1009
|
+
sample?: string | undefined;
|
|
1010
|
+
}[] | undefined;
|
|
1011
|
+
computed?: boolean | null | undefined;
|
|
1012
|
+
custom_field?: boolean | undefined;
|
|
1013
|
+
default?: string | undefined;
|
|
1014
|
+
depends_on?: string[] | undefined;
|
|
1015
|
+
format?: "SELECT" | undefined;
|
|
1016
|
+
from_search?: boolean | undefined;
|
|
1017
|
+
from_write?: boolean | undefined;
|
|
1018
|
+
help_text?: string | undefined;
|
|
1019
|
+
help_text_html?: string | undefined;
|
|
1020
|
+
input_format?: string[] | undefined;
|
|
1021
|
+
language?: string | undefined;
|
|
1022
|
+
parent_key?: string | undefined;
|
|
1023
|
+
placeholder?: string | undefined;
|
|
1024
|
+
prefill?: string | undefined;
|
|
1025
|
+
required?: boolean | undefined;
|
|
1026
|
+
searchfill?: string | undefined;
|
|
1027
|
+
send_in_json?: boolean | undefined;
|
|
1028
|
+
regex?: string | undefined;
|
|
1029
|
+
list?: boolean | undefined;
|
|
728
1030
|
}, {
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
label?: string | undefined;
|
|
732
|
-
sample?: string | undefined;
|
|
733
|
-
}>, "many">>;
|
|
734
|
-
computed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
735
|
-
custom_field: z.ZodOptional<z.ZodBoolean>;
|
|
736
|
-
default: z.ZodOptional<z.ZodString>;
|
|
737
|
-
depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
738
|
-
format: z.ZodOptional<z.ZodLiteral<"SELECT">>;
|
|
739
|
-
from_search: z.ZodOptional<z.ZodBoolean>;
|
|
740
|
-
from_write: z.ZodOptional<z.ZodBoolean>;
|
|
741
|
-
help_text: z.ZodOptional<z.ZodString>;
|
|
742
|
-
help_text_html: z.ZodOptional<z.ZodString>;
|
|
743
|
-
input_format: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
744
|
-
label: z.ZodOptional<z.ZodString>;
|
|
745
|
-
language: z.ZodOptional<z.ZodString>;
|
|
746
|
-
parent_key: z.ZodOptional<z.ZodString>;
|
|
747
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
748
|
-
prefill: z.ZodOptional<z.ZodString>;
|
|
749
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
750
|
-
searchfill: z.ZodOptional<z.ZodString>;
|
|
751
|
-
send_in_json: z.ZodOptional<z.ZodBoolean>;
|
|
752
|
-
regex: z.ZodOptional<z.ZodString>;
|
|
753
|
-
type: z.ZodOptional<z.ZodEnum<["integer", "string", "text", "datetime", "boolean", "file", "decimal", "copy", "password", "dict", "code", "filter", "json"]>>;
|
|
754
|
-
list: z.ZodOptional<z.ZodBoolean>;
|
|
755
|
-
}, "strip", z.ZodTypeAny, {
|
|
756
|
-
key: string;
|
|
757
|
-
type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
|
|
758
|
-
label?: string | undefined;
|
|
759
|
-
alters_custom_fields?: boolean | null | undefined;
|
|
760
|
-
capabilities?: string[] | undefined;
|
|
761
|
-
choices?: {
|
|
762
|
-
value?: string | undefined;
|
|
763
|
-
key?: string | undefined;
|
|
764
|
-
label?: string | undefined;
|
|
765
|
-
sample?: string | undefined;
|
|
766
|
-
}[] | undefined;
|
|
767
|
-
computed?: boolean | null | undefined;
|
|
768
|
-
custom_field?: boolean | undefined;
|
|
769
|
-
default?: string | undefined;
|
|
770
|
-
depends_on?: string[] | undefined;
|
|
771
|
-
format?: "SELECT" | undefined;
|
|
772
|
-
from_search?: boolean | undefined;
|
|
773
|
-
from_write?: boolean | undefined;
|
|
774
|
-
help_text?: string | undefined;
|
|
775
|
-
help_text_html?: string | undefined;
|
|
776
|
-
input_format?: string[] | undefined;
|
|
777
|
-
language?: string | undefined;
|
|
778
|
-
parent_key?: string | undefined;
|
|
779
|
-
placeholder?: string | undefined;
|
|
780
|
-
prefill?: string | undefined;
|
|
781
|
-
required?: boolean | undefined;
|
|
782
|
-
searchfill?: string | undefined;
|
|
783
|
-
send_in_json?: boolean | undefined;
|
|
784
|
-
regex?: string | undefined;
|
|
785
|
-
list?: boolean | undefined;
|
|
786
|
-
}, {
|
|
787
|
-
key: string;
|
|
788
|
-
type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
|
|
789
|
-
label?: string | undefined;
|
|
790
|
-
alters_custom_fields?: boolean | null | undefined;
|
|
791
|
-
capabilities?: string[] | undefined;
|
|
792
|
-
choices?: {
|
|
793
|
-
value?: string | undefined;
|
|
794
|
-
key?: string | undefined;
|
|
795
|
-
label?: string | undefined;
|
|
796
|
-
sample?: string | undefined;
|
|
797
|
-
}[] | undefined;
|
|
798
|
-
computed?: boolean | null | undefined;
|
|
799
|
-
custom_field?: boolean | undefined;
|
|
800
|
-
default?: string | undefined;
|
|
801
|
-
depends_on?: string[] | undefined;
|
|
802
|
-
format?: "SELECT" | undefined;
|
|
803
|
-
from_search?: boolean | undefined;
|
|
804
|
-
from_write?: boolean | undefined;
|
|
805
|
-
help_text?: string | undefined;
|
|
806
|
-
help_text_html?: string | undefined;
|
|
807
|
-
input_format?: string[] | undefined;
|
|
808
|
-
language?: string | undefined;
|
|
809
|
-
parent_key?: string | undefined;
|
|
810
|
-
placeholder?: string | undefined;
|
|
811
|
-
prefill?: string | undefined;
|
|
812
|
-
required?: boolean | undefined;
|
|
813
|
-
searchfill?: string | undefined;
|
|
814
|
-
send_in_json?: boolean | undefined;
|
|
815
|
-
regex?: string | undefined;
|
|
816
|
-
list?: boolean | undefined;
|
|
817
|
-
}>;
|
|
818
|
-
declare const ActionSchema: z.ZodObject<{
|
|
819
|
-
id: z.ZodOptional<z.ZodString>;
|
|
820
|
-
type: z.ZodEnum<["filter", "read", "read_bulk", "run", "search", "search_and_write", "search_or_write", "write"]>;
|
|
821
|
-
key: z.ZodString;
|
|
822
|
-
name: z.ZodString;
|
|
823
|
-
noun: z.ZodOptional<z.ZodString>;
|
|
824
|
-
description: z.ZodString;
|
|
825
|
-
description_html: z.ZodOptional<z.ZodString>;
|
|
826
|
-
is_important: z.ZodOptional<z.ZodBoolean>;
|
|
827
|
-
is_hidden: z.ZodOptional<z.ZodBoolean>;
|
|
828
|
-
needs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
829
|
-
key: z.ZodString;
|
|
830
|
-
alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
831
|
-
capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
832
|
-
choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
833
|
-
key: z.ZodOptional<z.ZodString>;
|
|
834
|
-
label: z.ZodOptional<z.ZodString>;
|
|
835
|
-
sample: z.ZodOptional<z.ZodString>;
|
|
836
|
-
value: z.ZodOptional<z.ZodString>;
|
|
837
|
-
}, "strip", z.ZodTypeAny, {
|
|
838
|
-
value?: string | undefined;
|
|
839
|
-
key?: string | undefined;
|
|
840
|
-
label?: string | undefined;
|
|
841
|
-
sample?: string | undefined;
|
|
842
|
-
}, {
|
|
843
|
-
value?: string | undefined;
|
|
844
|
-
key?: string | undefined;
|
|
845
|
-
label?: string | undefined;
|
|
846
|
-
sample?: string | undefined;
|
|
847
|
-
}>, "many">>;
|
|
848
|
-
computed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
849
|
-
custom_field: z.ZodOptional<z.ZodBoolean>;
|
|
850
|
-
default: z.ZodOptional<z.ZodString>;
|
|
851
|
-
depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
852
|
-
format: z.ZodOptional<z.ZodLiteral<"SELECT">>;
|
|
853
|
-
from_search: z.ZodOptional<z.ZodBoolean>;
|
|
854
|
-
from_write: z.ZodOptional<z.ZodBoolean>;
|
|
855
|
-
help_text: z.ZodOptional<z.ZodString>;
|
|
856
|
-
help_text_html: z.ZodOptional<z.ZodString>;
|
|
857
|
-
input_format: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
858
|
-
label: z.ZodOptional<z.ZodString>;
|
|
859
|
-
language: z.ZodOptional<z.ZodString>;
|
|
860
|
-
parent_key: z.ZodOptional<z.ZodString>;
|
|
861
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
862
|
-
prefill: z.ZodOptional<z.ZodString>;
|
|
863
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
864
|
-
searchfill: z.ZodOptional<z.ZodString>;
|
|
865
|
-
send_in_json: z.ZodOptional<z.ZodBoolean>;
|
|
866
|
-
regex: z.ZodOptional<z.ZodString>;
|
|
867
|
-
type: z.ZodOptional<z.ZodEnum<["integer", "string", "text", "datetime", "boolean", "file", "decimal", "copy", "password", "dict", "code", "filter", "json"]>>;
|
|
868
|
-
list: z.ZodOptional<z.ZodBoolean>;
|
|
869
|
-
}, "strip", z.ZodTypeAny, {
|
|
870
|
-
key: string;
|
|
871
|
-
type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
|
|
872
|
-
label?: string | undefined;
|
|
873
|
-
alters_custom_fields?: boolean | null | undefined;
|
|
874
|
-
capabilities?: string[] | undefined;
|
|
875
|
-
choices?: {
|
|
876
|
-
value?: string | undefined;
|
|
877
|
-
key?: string | undefined;
|
|
878
|
-
label?: string | undefined;
|
|
879
|
-
sample?: string | undefined;
|
|
880
|
-
}[] | undefined;
|
|
881
|
-
computed?: boolean | null | undefined;
|
|
882
|
-
custom_field?: boolean | undefined;
|
|
883
|
-
default?: string | undefined;
|
|
884
|
-
depends_on?: string[] | undefined;
|
|
885
|
-
format?: "SELECT" | undefined;
|
|
886
|
-
from_search?: boolean | undefined;
|
|
887
|
-
from_write?: boolean | undefined;
|
|
888
|
-
help_text?: string | undefined;
|
|
889
|
-
help_text_html?: string | undefined;
|
|
890
|
-
input_format?: string[] | undefined;
|
|
891
|
-
language?: string | undefined;
|
|
892
|
-
parent_key?: string | undefined;
|
|
893
|
-
placeholder?: string | undefined;
|
|
894
|
-
prefill?: string | undefined;
|
|
895
|
-
required?: boolean | undefined;
|
|
896
|
-
searchfill?: string | undefined;
|
|
897
|
-
send_in_json?: boolean | undefined;
|
|
898
|
-
regex?: string | undefined;
|
|
899
|
-
list?: boolean | undefined;
|
|
900
|
-
}, {
|
|
901
|
-
key: string;
|
|
902
|
-
type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
|
|
1031
|
+
key: string;
|
|
1032
|
+
type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
|
|
903
1033
|
label?: string | undefined;
|
|
904
1034
|
alters_custom_fields?: boolean | null | undefined;
|
|
905
1035
|
capabilities?: string[] | undefined;
|
|
@@ -929,35 +1059,13 @@ declare const ActionSchema: z.ZodObject<{
|
|
|
929
1059
|
regex?: string | undefined;
|
|
930
1060
|
list?: boolean | undefined;
|
|
931
1061
|
}>, "many">>;
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
links: z.ZodOptional<z.ZodObject<{
|
|
935
|
-
action_url: z.ZodOptional<z.ZodString>;
|
|
936
|
-
}, "strip", z.ZodTypeAny, {
|
|
937
|
-
action_url?: string | undefined;
|
|
938
|
-
}, {
|
|
939
|
-
action_url?: string | undefined;
|
|
940
|
-
}>>;
|
|
941
|
-
permissions: z.ZodOptional<z.ZodObject<{
|
|
942
|
-
can_use: z.ZodOptional<z.ZodBoolean>;
|
|
943
|
-
}, "strip", z.ZodTypeAny, {
|
|
944
|
-
can_use?: boolean | undefined;
|
|
945
|
-
}, {
|
|
946
|
-
can_use?: boolean | undefined;
|
|
947
|
-
}>>;
|
|
1062
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1063
|
+
last_fetched_at: z.ZodOptional<z.ZodString>;
|
|
948
1064
|
}, "strip", z.ZodTypeAny, {
|
|
949
|
-
|
|
950
|
-
key: string;
|
|
951
|
-
description: string;
|
|
952
|
-
name: string;
|
|
953
|
-
id?: string | undefined;
|
|
954
|
-
noun?: string | undefined;
|
|
955
|
-
description_html?: string | undefined;
|
|
956
|
-
is_important?: boolean | undefined;
|
|
957
|
-
is_hidden?: boolean | undefined;
|
|
1065
|
+
success: boolean;
|
|
958
1066
|
needs?: {
|
|
959
1067
|
key: string;
|
|
960
|
-
type?: "string" | "boolean" | "
|
|
1068
|
+
type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
|
|
961
1069
|
label?: string | undefined;
|
|
962
1070
|
alters_custom_fields?: boolean | null | undefined;
|
|
963
1071
|
capabilities?: string[] | undefined;
|
|
@@ -987,27 +1095,13 @@ declare const ActionSchema: z.ZodObject<{
|
|
|
987
1095
|
regex?: string | undefined;
|
|
988
1096
|
list?: boolean | undefined;
|
|
989
1097
|
}[] | undefined;
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
links?: {
|
|
993
|
-
action_url?: string | undefined;
|
|
994
|
-
} | undefined;
|
|
995
|
-
permissions?: {
|
|
996
|
-
can_use?: boolean | undefined;
|
|
997
|
-
} | undefined;
|
|
1098
|
+
errors?: string[] | undefined;
|
|
1099
|
+
last_fetched_at?: string | undefined;
|
|
998
1100
|
}, {
|
|
999
|
-
|
|
1000
|
-
key: string;
|
|
1001
|
-
description: string;
|
|
1002
|
-
name: string;
|
|
1003
|
-
id?: string | undefined;
|
|
1004
|
-
noun?: string | undefined;
|
|
1005
|
-
description_html?: string | undefined;
|
|
1006
|
-
is_important?: boolean | undefined;
|
|
1007
|
-
is_hidden?: boolean | undefined;
|
|
1101
|
+
success: boolean;
|
|
1008
1102
|
needs?: {
|
|
1009
1103
|
key: string;
|
|
1010
|
-
type?: "string" | "boolean" | "
|
|
1104
|
+
type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
|
|
1011
1105
|
label?: string | undefined;
|
|
1012
1106
|
alters_custom_fields?: boolean | null | undefined;
|
|
1013
1107
|
capabilities?: string[] | undefined;
|
|
@@ -1037,1051 +1131,553 @@ declare const ActionSchema: z.ZodObject<{
|
|
|
1037
1131
|
regex?: string | undefined;
|
|
1038
1132
|
list?: boolean | undefined;
|
|
1039
1133
|
}[] | undefined;
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
links?: {
|
|
1043
|
-
action_url?: string | undefined;
|
|
1044
|
-
} | undefined;
|
|
1045
|
-
permissions?: {
|
|
1046
|
-
can_use?: boolean | undefined;
|
|
1047
|
-
} | undefined;
|
|
1048
|
-
}>;
|
|
1049
|
-
declare const ChoiceSchema: z.ZodObject<{
|
|
1050
|
-
value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
1051
|
-
label: z.ZodString;
|
|
1052
|
-
}, "strip", z.ZodTypeAny, {
|
|
1053
|
-
value: string | number;
|
|
1054
|
-
label: string;
|
|
1055
|
-
}, {
|
|
1056
|
-
value: string | number;
|
|
1057
|
-
label: string;
|
|
1134
|
+
errors?: string[] | undefined;
|
|
1135
|
+
last_fetched_at?: string | undefined;
|
|
1058
1136
|
}>;
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1137
|
+
|
|
1138
|
+
/**
|
|
1139
|
+
* API Client Type Definitions
|
|
1140
|
+
*
|
|
1141
|
+
* This module contains all type definitions related to the Zapier API client,
|
|
1142
|
+
* including configuration options, client interfaces, request/response types,
|
|
1143
|
+
* and API response models.
|
|
1144
|
+
*
|
|
1145
|
+
* API response model types are inferred from Zod schemas defined in api/schemas.ts
|
|
1146
|
+
* to ensure a single source of truth and eliminate duplication.
|
|
1147
|
+
*/
|
|
1148
|
+
|
|
1149
|
+
interface ApiClient {
|
|
1150
|
+
get: <T = unknown>(path: string, options?: RequestOptions) => Promise<T>;
|
|
1151
|
+
post: <T = unknown>(path: string, data?: unknown, options?: RequestOptions) => Promise<T>;
|
|
1152
|
+
put: <T = unknown>(path: string, data?: unknown, options?: RequestOptions) => Promise<T>;
|
|
1153
|
+
delete: <T = unknown>(path: string, options?: RequestOptions) => Promise<T>;
|
|
1154
|
+
poll: <T = unknown>(path: string, options?: PollOptions) => Promise<T>;
|
|
1155
|
+
fetch: (path: string, init?: RequestInit & {
|
|
1156
|
+
searchParams?: Record<string, string>;
|
|
1157
|
+
authRequired?: boolean;
|
|
1158
|
+
}) => Promise<Response>;
|
|
1159
|
+
}
|
|
1160
|
+
interface RequestOptions {
|
|
1161
|
+
headers?: Record<string, string>;
|
|
1162
|
+
searchParams?: Record<string, string>;
|
|
1163
|
+
authRequired?: boolean;
|
|
1164
|
+
customErrorHandler?: (errorInfo: {
|
|
1165
|
+
status: number;
|
|
1166
|
+
statusText: string;
|
|
1167
|
+
data: unknown;
|
|
1168
|
+
}) => Error | undefined;
|
|
1169
|
+
}
|
|
1170
|
+
interface PollOptions extends RequestOptions {
|
|
1171
|
+
initialDelay?: number;
|
|
1172
|
+
timeoutMs?: number;
|
|
1173
|
+
successStatus?: number;
|
|
1174
|
+
pendingStatus?: number;
|
|
1175
|
+
resultExtractor?: (response: unknown) => unknown;
|
|
1176
|
+
}
|
|
1177
|
+
type Need = z.infer<typeof NeedSchema>;
|
|
1178
|
+
type Action = z.infer<typeof ActionSchema>;
|
|
1179
|
+
type Choice = z.infer<typeof ChoiceSchema>;
|
|
1180
|
+
type Field = z.infer<typeof FieldSchema>;
|
|
1181
|
+
type ActionExecutionResult = z.infer<typeof ActionExecutionResultSchema>;
|
|
1182
|
+
type ActionFieldChoice = z.infer<typeof ActionFieldChoiceSchema>;
|
|
1183
|
+
type ActionField = z.infer<typeof ActionFieldSchema>;
|
|
1184
|
+
type Authentication = z.infer<typeof AuthenticationSchema>;
|
|
1185
|
+
type AuthenticationsResponse = z.infer<typeof AuthenticationsResponseSchema>;
|
|
1186
|
+
type UserProfile = z.infer<typeof UserProfileSchema>;
|
|
1187
|
+
type App = z.infer<typeof AppSchema>;
|
|
1188
|
+
type NeedsRequest = z.infer<typeof NeedsRequestSchema>;
|
|
1189
|
+
type NeedsResponse = z.infer<typeof NeedsResponseSchema>;
|
|
1190
|
+
|
|
1191
|
+
/**
|
|
1192
|
+
* Function-related types and interfaces
|
|
1193
|
+
*/
|
|
1194
|
+
interface FunctionOptions {
|
|
1195
|
+
/** Base URL for Zapier API */
|
|
1196
|
+
baseUrl?: string;
|
|
1197
|
+
/** Authentication token */
|
|
1198
|
+
token?: string;
|
|
1199
|
+
/** Function to dynamically resolve authentication token */
|
|
1200
|
+
getToken?: () => Promise<string | undefined>;
|
|
1201
|
+
/** Optional pre-instantiated API client */
|
|
1202
|
+
api?: ApiClient;
|
|
1203
|
+
/** Enable debug logging */
|
|
1204
|
+
debug?: boolean;
|
|
1205
|
+
/** Custom fetch implementation */
|
|
1206
|
+
fetch?: typeof globalThis.fetch;
|
|
1207
|
+
}
|
|
1208
|
+
type PaginatedSdkFunction<TOptions, TItem> = (options: TOptions) => Promise<{
|
|
1209
|
+
data: TItem[];
|
|
1210
|
+
}> & AsyncIterable<{
|
|
1211
|
+
data: TItem[];
|
|
1212
|
+
nextCursor?: string;
|
|
1213
|
+
}> & {
|
|
1214
|
+
items(): AsyncIterable<TItem>;
|
|
1215
|
+
};
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
* Standard error format returned by the Zapier API
|
|
1219
|
+
*/
|
|
1220
|
+
interface ApiError {
|
|
1221
|
+
status: number;
|
|
1222
|
+
code: string;
|
|
1223
|
+
title: string;
|
|
1224
|
+
detail: string;
|
|
1225
|
+
source?: unknown;
|
|
1226
|
+
meta?: unknown;
|
|
1227
|
+
}
|
|
1228
|
+
/**
|
|
1229
|
+
* Base options for all error constructors
|
|
1230
|
+
*/
|
|
1231
|
+
interface ErrorOptions {
|
|
1232
|
+
statusCode?: number;
|
|
1233
|
+
errors?: ApiError[];
|
|
1234
|
+
cause?: unknown;
|
|
1235
|
+
response?: unknown;
|
|
1236
|
+
}
|
|
1237
|
+
/**
|
|
1238
|
+
* Base class for all Zapier SDK errors
|
|
1239
|
+
* Use instanceof ZapierError to check if an error is from the SDK
|
|
1240
|
+
*/
|
|
1241
|
+
declare abstract class ZapierError extends Error {
|
|
1242
|
+
abstract readonly name: string;
|
|
1243
|
+
statusCode?: number;
|
|
1244
|
+
errors?: ApiError[];
|
|
1245
|
+
cause?: unknown;
|
|
1246
|
+
response?: unknown;
|
|
1247
|
+
constructor(message: string, options?: ErrorOptions);
|
|
1248
|
+
}
|
|
1249
|
+
/**
|
|
1250
|
+
* Error thrown when API requests fail
|
|
1251
|
+
*/
|
|
1252
|
+
declare class ZapierApiError extends ZapierError {
|
|
1253
|
+
readonly name = "ZapierApiError";
|
|
1254
|
+
constructor(message: string, options?: ErrorOptions);
|
|
1255
|
+
}
|
|
1256
|
+
/**
|
|
1257
|
+
* Error thrown when an app is not found
|
|
1258
|
+
*/
|
|
1259
|
+
declare class ZapierAppNotFoundError extends ZapierError {
|
|
1260
|
+
readonly name = "ZapierAppNotFoundError";
|
|
1261
|
+
appKey?: string;
|
|
1262
|
+
constructor(message: string, options?: ErrorOptions & {
|
|
1263
|
+
appKey?: string;
|
|
1264
|
+
});
|
|
1265
|
+
}
|
|
1266
|
+
/**
|
|
1267
|
+
* Error thrown when validation fails (e.g., invalid parameters)
|
|
1268
|
+
*/
|
|
1269
|
+
declare class ZapierValidationError extends ZapierError {
|
|
1270
|
+
readonly name = "ZapierValidationError";
|
|
1271
|
+
details?: unknown;
|
|
1272
|
+
constructor(message: string, options?: ErrorOptions & {
|
|
1273
|
+
details?: unknown;
|
|
1274
|
+
});
|
|
1275
|
+
}
|
|
1276
|
+
/**
|
|
1277
|
+
* Error for unrecognized/unknown errors that get wrapped by safe functions
|
|
1278
|
+
*/
|
|
1279
|
+
declare class ZapierUnknownError extends ZapierError {
|
|
1280
|
+
readonly name = "ZapierUnknownError";
|
|
1281
|
+
constructor(message: string, options?: ErrorOptions);
|
|
1282
|
+
}
|
|
1283
|
+
/**
|
|
1284
|
+
* Error thrown for authentication and authorization failures (401/403)
|
|
1285
|
+
*/
|
|
1286
|
+
declare class ZapierAuthenticationError extends ZapierError {
|
|
1287
|
+
readonly name = "ZapierAuthenticationError";
|
|
1288
|
+
constructor(message: string, options?: ErrorOptions);
|
|
1289
|
+
}
|
|
1290
|
+
/**
|
|
1291
|
+
* Error thrown when a requested resource is not found
|
|
1292
|
+
*/
|
|
1293
|
+
declare class ZapierResourceNotFoundError extends ZapierError {
|
|
1294
|
+
readonly name = "ZapierResourceNotFoundError";
|
|
1295
|
+
resourceType?: string;
|
|
1296
|
+
resourceId?: string;
|
|
1297
|
+
constructor(message: string, options?: ErrorOptions & {
|
|
1298
|
+
resourceType?: string;
|
|
1299
|
+
resourceId?: string;
|
|
1300
|
+
});
|
|
1301
|
+
}
|
|
1302
|
+
/**
|
|
1303
|
+
* Error thrown when required app or implementation configuration is missing
|
|
1304
|
+
*/
|
|
1305
|
+
declare class ZapierConfigurationError extends ZapierError {
|
|
1306
|
+
readonly name = "ZapierConfigurationError";
|
|
1307
|
+
configType?: string;
|
|
1308
|
+
constructor(message: string, options?: ErrorOptions & {
|
|
1309
|
+
configType?: string;
|
|
1310
|
+
});
|
|
1311
|
+
}
|
|
1312
|
+
/**
|
|
1313
|
+
* Error thrown when code bundling or compilation fails
|
|
1314
|
+
*/
|
|
1315
|
+
declare class ZapierBundleError extends ZapierError {
|
|
1316
|
+
readonly name = "ZapierBundleError";
|
|
1317
|
+
buildErrors?: string[];
|
|
1318
|
+
constructor(message: string, options?: ErrorOptions & {
|
|
1319
|
+
buildErrors?: string[];
|
|
1320
|
+
});
|
|
1321
|
+
}
|
|
1322
|
+
/**
|
|
1323
|
+
* Error thrown when operations timeout or exceed retry limits
|
|
1324
|
+
*/
|
|
1325
|
+
declare class ZapierTimeoutError extends ZapierError {
|
|
1326
|
+
readonly name = "ZapierTimeoutError";
|
|
1327
|
+
attempts?: number;
|
|
1328
|
+
maxAttempts?: number;
|
|
1329
|
+
constructor(message: string, options?: ErrorOptions & {
|
|
1330
|
+
attempts?: number;
|
|
1331
|
+
maxAttempts?: number;
|
|
1332
|
+
});
|
|
1333
|
+
}
|
|
1334
|
+
/**
|
|
1335
|
+
* Error thrown when action execution fails due to errors returned from the third-party service
|
|
1336
|
+
* This happens when the Actions API returns a 200 status but includes errors in the response
|
|
1337
|
+
*/
|
|
1338
|
+
declare class ZapierActionError extends ZapierError {
|
|
1339
|
+
readonly name = "ZapierActionError";
|
|
1340
|
+
appKey?: string;
|
|
1341
|
+
actionKey?: string;
|
|
1342
|
+
constructor(message: string, options?: ErrorOptions & {
|
|
1343
|
+
appKey?: string;
|
|
1344
|
+
actionKey?: string;
|
|
1345
|
+
});
|
|
1346
|
+
get actionErrors(): ApiError[] | undefined;
|
|
1347
|
+
}
|
|
1348
|
+
/**
|
|
1349
|
+
* Error thrown when a resource is not found (404)
|
|
1350
|
+
*/
|
|
1351
|
+
declare class ZapierNotFoundError extends ZapierError {
|
|
1352
|
+
readonly name = "ZapierNotFoundError";
|
|
1353
|
+
constructor(message: string, options?: ErrorOptions);
|
|
1354
|
+
}
|
|
1355
|
+
/**
|
|
1356
|
+
* Utility function to format error messages for display
|
|
1357
|
+
*/
|
|
1358
|
+
declare function formatErrorMessage(error: ZapierError): string;
|
|
1359
|
+
|
|
1360
|
+
declare const ListInputFieldsSchema: z.ZodObject<{
|
|
1361
|
+
appKey: z.ZodString & {
|
|
1362
|
+
_def: z.ZodStringDef & PositionalMetadata;
|
|
1363
|
+
};
|
|
1364
|
+
actionType: z.ZodEnum<["read", "read_bulk", "write", "run", "search", "search_or_write", "search_and_write", "filter"]>;
|
|
1365
|
+
actionKey: z.ZodString;
|
|
1366
|
+
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1367
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1368
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
1369
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
1098
1370
|
}, "strip", z.ZodTypeAny, {
|
|
1099
|
-
|
|
1371
|
+
appKey: string;
|
|
1372
|
+
actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
|
|
1373
|
+
actionKey: string;
|
|
1374
|
+
authenticationId?: number | null | undefined;
|
|
1375
|
+
inputs?: Record<string, unknown> | undefined;
|
|
1376
|
+
pageSize?: number | undefined;
|
|
1377
|
+
maxItems?: number | undefined;
|
|
1100
1378
|
}, {
|
|
1101
|
-
|
|
1379
|
+
appKey: string;
|
|
1380
|
+
actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
|
|
1381
|
+
actionKey: string;
|
|
1382
|
+
authenticationId?: number | null | undefined;
|
|
1383
|
+
inputs?: Record<string, unknown> | undefined;
|
|
1384
|
+
pageSize?: number | undefined;
|
|
1385
|
+
maxItems?: number | undefined;
|
|
1102
1386
|
}>;
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1387
|
+
type ListInputFieldsOptions = z.infer<typeof ListInputFieldsSchema>;
|
|
1388
|
+
|
|
1389
|
+
declare const GetAuthenticationSchema: z.ZodObject<{
|
|
1390
|
+
authenticationId: z.ZodNumber;
|
|
1106
1391
|
}, "strip", z.ZodTypeAny, {
|
|
1107
|
-
|
|
1108
|
-
label: string;
|
|
1392
|
+
authenticationId: number;
|
|
1109
1393
|
}, {
|
|
1110
|
-
|
|
1111
|
-
label: string;
|
|
1394
|
+
authenticationId: number;
|
|
1112
1395
|
}>;
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
}, "strip", z.ZodTypeAny, {
|
|
1124
|
-
value: string | number;
|
|
1125
|
-
label: string;
|
|
1126
|
-
}, {
|
|
1127
|
-
value: string | number;
|
|
1128
|
-
label: string;
|
|
1129
|
-
}>, "many">>;
|
|
1130
|
-
default: z.ZodOptional<z.ZodString>;
|
|
1131
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
1132
|
-
computed: z.ZodOptional<z.ZodBoolean>;
|
|
1133
|
-
customField: z.ZodOptional<z.ZodBoolean>;
|
|
1134
|
-
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1135
|
-
format: z.ZodOptional<z.ZodString>;
|
|
1136
|
-
inputFormat: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1396
|
+
type GetAuthenticationOptions = z.infer<typeof GetAuthenticationSchema>;
|
|
1397
|
+
|
|
1398
|
+
declare const FindFirstAuthenticationSchema: z.ZodObject<{
|
|
1399
|
+
appKey: z.ZodOptional<z.ZodString & {
|
|
1400
|
+
_def: z.ZodStringDef & PositionalMetadata;
|
|
1401
|
+
}>;
|
|
1402
|
+
search: z.ZodOptional<z.ZodString>;
|
|
1403
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1404
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
1405
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
1137
1406
|
}, "strip", z.ZodTypeAny, {
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
value: string | number;
|
|
1144
|
-
label: string;
|
|
1145
|
-
}[] | undefined;
|
|
1146
|
-
computed?: boolean | undefined;
|
|
1147
|
-
default?: string | undefined;
|
|
1148
|
-
format?: string | undefined;
|
|
1149
|
-
placeholder?: string | undefined;
|
|
1150
|
-
helpText?: string | undefined;
|
|
1151
|
-
helpTextHtml?: string | undefined;
|
|
1152
|
-
customField?: boolean | undefined;
|
|
1153
|
-
dependsOn?: string[] | undefined;
|
|
1154
|
-
inputFormat?: string[] | undefined;
|
|
1407
|
+
search?: string | undefined;
|
|
1408
|
+
title?: string | undefined;
|
|
1409
|
+
appKey?: string | undefined;
|
|
1410
|
+
accountId?: string | undefined;
|
|
1411
|
+
owner?: string | undefined;
|
|
1155
1412
|
}, {
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
value: string | number;
|
|
1162
|
-
label: string;
|
|
1163
|
-
}[] | undefined;
|
|
1164
|
-
computed?: boolean | undefined;
|
|
1165
|
-
default?: string | undefined;
|
|
1166
|
-
format?: string | undefined;
|
|
1167
|
-
placeholder?: string | undefined;
|
|
1168
|
-
helpText?: string | undefined;
|
|
1169
|
-
helpTextHtml?: string | undefined;
|
|
1170
|
-
customField?: boolean | undefined;
|
|
1171
|
-
dependsOn?: string[] | undefined;
|
|
1172
|
-
inputFormat?: string[] | undefined;
|
|
1413
|
+
search?: string | undefined;
|
|
1414
|
+
title?: string | undefined;
|
|
1415
|
+
appKey?: string | undefined;
|
|
1416
|
+
accountId?: string | undefined;
|
|
1417
|
+
owner?: string | undefined;
|
|
1173
1418
|
}>;
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
shared_with_all: z.ZodBoolean;
|
|
1185
|
-
is_stale: z.ZodOptional<z.ZodString>;
|
|
1186
|
-
is_shared: z.ZodOptional<z.ZodString>;
|
|
1187
|
-
marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1188
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1189
|
-
identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1190
|
-
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1191
|
-
url: z.ZodOptional<z.ZodString>;
|
|
1192
|
-
groups: z.ZodOptional<z.ZodString>;
|
|
1193
|
-
members: z.ZodOptional<z.ZodString>;
|
|
1194
|
-
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1419
|
+
type FindFirstAuthenticationOptions = z.infer<typeof FindFirstAuthenticationSchema>;
|
|
1420
|
+
|
|
1421
|
+
declare const FindUniqueAuthenticationSchema: z.ZodObject<{
|
|
1422
|
+
appKey: z.ZodOptional<z.ZodString & {
|
|
1423
|
+
_def: z.ZodStringDef & PositionalMetadata;
|
|
1424
|
+
}>;
|
|
1425
|
+
search: z.ZodOptional<z.ZodString>;
|
|
1426
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1427
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
1428
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
1195
1429
|
}, "strip", z.ZodTypeAny, {
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
is_private: boolean;
|
|
1202
|
-
shared_with_all: boolean;
|
|
1203
|
-
title?: string | null | undefined;
|
|
1204
|
-
label?: string | null | undefined;
|
|
1205
|
-
permissions?: Record<string, boolean> | undefined;
|
|
1206
|
-
lastchanged?: string | undefined;
|
|
1207
|
-
customuser_id?: number | undefined;
|
|
1208
|
-
destination_selected_api?: string | null | undefined;
|
|
1209
|
-
is_stale?: string | undefined;
|
|
1210
|
-
is_shared?: string | undefined;
|
|
1211
|
-
marked_stale_at?: string | null | undefined;
|
|
1212
|
-
identifier?: string | null | undefined;
|
|
1213
|
-
url?: string | undefined;
|
|
1214
|
-
groups?: string | undefined;
|
|
1215
|
-
members?: string | undefined;
|
|
1430
|
+
search?: string | undefined;
|
|
1431
|
+
title?: string | undefined;
|
|
1432
|
+
appKey?: string | undefined;
|
|
1433
|
+
accountId?: string | undefined;
|
|
1434
|
+
owner?: string | undefined;
|
|
1216
1435
|
}, {
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
is_private: boolean;
|
|
1223
|
-
shared_with_all: boolean;
|
|
1224
|
-
title?: string | null | undefined;
|
|
1225
|
-
label?: string | null | undefined;
|
|
1226
|
-
permissions?: Record<string, boolean> | undefined;
|
|
1227
|
-
lastchanged?: string | undefined;
|
|
1228
|
-
customuser_id?: number | undefined;
|
|
1229
|
-
destination_selected_api?: string | null | undefined;
|
|
1230
|
-
is_stale?: string | undefined;
|
|
1231
|
-
is_shared?: string | undefined;
|
|
1232
|
-
marked_stale_at?: string | null | undefined;
|
|
1233
|
-
identifier?: string | null | undefined;
|
|
1234
|
-
url?: string | undefined;
|
|
1235
|
-
groups?: string | undefined;
|
|
1236
|
-
members?: string | undefined;
|
|
1436
|
+
search?: string | undefined;
|
|
1437
|
+
title?: string | undefined;
|
|
1438
|
+
appKey?: string | undefined;
|
|
1439
|
+
accountId?: string | undefined;
|
|
1440
|
+
owner?: string | undefined;
|
|
1237
1441
|
}>;
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
is_invite_only: z.ZodBoolean;
|
|
1251
|
-
is_private: z.ZodBoolean;
|
|
1252
|
-
shared_with_all: z.ZodBoolean;
|
|
1253
|
-
is_stale: z.ZodOptional<z.ZodString>;
|
|
1254
|
-
is_shared: z.ZodOptional<z.ZodString>;
|
|
1255
|
-
marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1256
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1257
|
-
identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1258
|
-
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1259
|
-
url: z.ZodOptional<z.ZodString>;
|
|
1260
|
-
groups: z.ZodOptional<z.ZodString>;
|
|
1261
|
-
members: z.ZodOptional<z.ZodString>;
|
|
1262
|
-
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1263
|
-
}, "strip", z.ZodTypeAny, {
|
|
1264
|
-
date: string;
|
|
1265
|
-
id: number;
|
|
1266
|
-
selected_api: string;
|
|
1267
|
-
account_id: number;
|
|
1268
|
-
is_invite_only: boolean;
|
|
1269
|
-
is_private: boolean;
|
|
1270
|
-
shared_with_all: boolean;
|
|
1271
|
-
title?: string | null | undefined;
|
|
1272
|
-
label?: string | null | undefined;
|
|
1273
|
-
permissions?: Record<string, boolean> | undefined;
|
|
1274
|
-
lastchanged?: string | undefined;
|
|
1275
|
-
customuser_id?: number | undefined;
|
|
1276
|
-
destination_selected_api?: string | null | undefined;
|
|
1277
|
-
is_stale?: string | undefined;
|
|
1278
|
-
is_shared?: string | undefined;
|
|
1279
|
-
marked_stale_at?: string | null | undefined;
|
|
1280
|
-
identifier?: string | null | undefined;
|
|
1281
|
-
url?: string | undefined;
|
|
1282
|
-
groups?: string | undefined;
|
|
1283
|
-
members?: string | undefined;
|
|
1284
|
-
}, {
|
|
1285
|
-
date: string;
|
|
1286
|
-
id: number;
|
|
1287
|
-
selected_api: string;
|
|
1288
|
-
account_id: number;
|
|
1289
|
-
is_invite_only: boolean;
|
|
1290
|
-
is_private: boolean;
|
|
1291
|
-
shared_with_all: boolean;
|
|
1292
|
-
title?: string | null | undefined;
|
|
1293
|
-
label?: string | null | undefined;
|
|
1294
|
-
permissions?: Record<string, boolean> | undefined;
|
|
1295
|
-
lastchanged?: string | undefined;
|
|
1296
|
-
customuser_id?: number | undefined;
|
|
1297
|
-
destination_selected_api?: string | null | undefined;
|
|
1298
|
-
is_stale?: string | undefined;
|
|
1299
|
-
is_shared?: string | undefined;
|
|
1300
|
-
marked_stale_at?: string | null | undefined;
|
|
1301
|
-
identifier?: string | null | undefined;
|
|
1302
|
-
url?: string | undefined;
|
|
1303
|
-
groups?: string | undefined;
|
|
1304
|
-
members?: string | undefined;
|
|
1305
|
-
}>, "many">;
|
|
1442
|
+
type FindUniqueAuthenticationOptions = z.infer<typeof FindUniqueAuthenticationSchema>;
|
|
1443
|
+
|
|
1444
|
+
declare const RelayRequestSchema: z.ZodObject<{
|
|
1445
|
+
url: z.ZodString;
|
|
1446
|
+
method: z.ZodOptional<z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]>>;
|
|
1447
|
+
body: z.ZodOptional<z.ZodAny>;
|
|
1448
|
+
authenticationId: z.ZodOptional<z.ZodNumber>;
|
|
1449
|
+
callbackUrl: z.ZodOptional<z.ZodString>;
|
|
1450
|
+
authenticationTemplate: z.ZodOptional<z.ZodString>;
|
|
1451
|
+
headers: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodType<Headers, z.ZodTypeDef, Headers>, z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">]>>;
|
|
1452
|
+
} & {
|
|
1453
|
+
relayBaseUrl: z.ZodOptional<z.ZodString>;
|
|
1306
1454
|
}, "strip", z.ZodTypeAny, {
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
shared_with_all: boolean;
|
|
1316
|
-
title?: string | null | undefined;
|
|
1317
|
-
label?: string | null | undefined;
|
|
1318
|
-
permissions?: Record<string, boolean> | undefined;
|
|
1319
|
-
lastchanged?: string | undefined;
|
|
1320
|
-
customuser_id?: number | undefined;
|
|
1321
|
-
destination_selected_api?: string | null | undefined;
|
|
1322
|
-
is_stale?: string | undefined;
|
|
1323
|
-
is_shared?: string | undefined;
|
|
1324
|
-
marked_stale_at?: string | null | undefined;
|
|
1325
|
-
identifier?: string | null | undefined;
|
|
1326
|
-
url?: string | undefined;
|
|
1327
|
-
groups?: string | undefined;
|
|
1328
|
-
members?: string | undefined;
|
|
1329
|
-
}[];
|
|
1330
|
-
next?: string | null | undefined;
|
|
1331
|
-
previous?: string | null | undefined;
|
|
1455
|
+
url: string;
|
|
1456
|
+
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
|
|
1457
|
+
authenticationId?: number | undefined;
|
|
1458
|
+
body?: any;
|
|
1459
|
+
callbackUrl?: string | undefined;
|
|
1460
|
+
authenticationTemplate?: string | undefined;
|
|
1461
|
+
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
1462
|
+
relayBaseUrl?: string | undefined;
|
|
1332
1463
|
}, {
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
shared_with_all: boolean;
|
|
1342
|
-
title?: string | null | undefined;
|
|
1343
|
-
label?: string | null | undefined;
|
|
1344
|
-
permissions?: Record<string, boolean> | undefined;
|
|
1345
|
-
lastchanged?: string | undefined;
|
|
1346
|
-
customuser_id?: number | undefined;
|
|
1347
|
-
destination_selected_api?: string | null | undefined;
|
|
1348
|
-
is_stale?: string | undefined;
|
|
1349
|
-
is_shared?: string | undefined;
|
|
1350
|
-
marked_stale_at?: string | null | undefined;
|
|
1351
|
-
identifier?: string | null | undefined;
|
|
1352
|
-
url?: string | undefined;
|
|
1353
|
-
groups?: string | undefined;
|
|
1354
|
-
members?: string | undefined;
|
|
1355
|
-
}[];
|
|
1356
|
-
next?: string | null | undefined;
|
|
1357
|
-
previous?: string | null | undefined;
|
|
1464
|
+
url: string;
|
|
1465
|
+
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
|
|
1466
|
+
authenticationId?: number | undefined;
|
|
1467
|
+
body?: any;
|
|
1468
|
+
callbackUrl?: string | undefined;
|
|
1469
|
+
authenticationTemplate?: string | undefined;
|
|
1470
|
+
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
1471
|
+
relayBaseUrl?: string | undefined;
|
|
1358
1472
|
}>;
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
email: z.ZodString;
|
|
1371
|
-
email_hash: z.ZodString;
|
|
1372
|
-
email_confirmed: z.ZodBoolean;
|
|
1373
|
-
timezone: z.ZodString;
|
|
1374
|
-
photo_url: z.ZodString;
|
|
1375
|
-
has_seen_notifications: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodBoolean>>;
|
|
1376
|
-
signup: z.ZodString;
|
|
1377
|
-
since_signup: z.ZodString;
|
|
1378
|
-
has_activated: z.ZodBoolean;
|
|
1379
|
-
enable_gz_creator: z.ZodBoolean;
|
|
1380
|
-
should_see_nps_survey: z.ZodBoolean;
|
|
1381
|
-
is_developer: z.ZodBoolean;
|
|
1382
|
-
is_expert: z.ZodBoolean;
|
|
1383
|
-
tos_agreement: z.ZodBoolean;
|
|
1384
|
-
should_renew_tos: z.ZodBoolean;
|
|
1385
|
-
is_gdpr_consented: z.ZodBoolean;
|
|
1386
|
-
disable_ssl_check: z.ZodBoolean;
|
|
1387
|
-
identity: z.ZodNumber;
|
|
1388
|
-
summary_schedule: z.ZodString;
|
|
1389
|
-
alert_triggers: z.ZodString;
|
|
1390
|
-
alert_actions: z.ZodString;
|
|
1391
|
-
is_staff: z.ZodBoolean;
|
|
1392
|
-
is_zt_reviewer: z.ZodBoolean;
|
|
1393
|
-
is_high_value: z.ZodBoolean;
|
|
1394
|
-
is_temporary: z.ZodBoolean;
|
|
1395
|
-
banner_message: z.ZodString;
|
|
1396
|
-
enable_totp_2fa: z.ZodBoolean;
|
|
1397
|
-
viewed_help: z.ZodRecord<z.ZodString, z.ZodBoolean>;
|
|
1398
|
-
show_editor_migration_mesaging: z.ZodBoolean;
|
|
1399
|
-
switches: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1400
|
-
organizations: z.ZodArray<z.ZodNullable<z.ZodAny>, "many">;
|
|
1401
|
-
primary_organization: z.ZodNullable<z.ZodAny>;
|
|
1402
|
-
has_active_zaps: z.ZodBoolean;
|
|
1403
|
-
has_google_sso: z.ZodBoolean;
|
|
1404
|
-
auth_realm: z.ZodString;
|
|
1405
|
-
roles: z.ZodArray<z.ZodObject<{
|
|
1406
|
-
account_id: z.ZodNumber;
|
|
1407
|
-
role: z.ZodString;
|
|
1408
|
-
}, "strip", z.ZodTypeAny, {
|
|
1409
|
-
account_id: number;
|
|
1410
|
-
role: string;
|
|
1411
|
-
}, {
|
|
1412
|
-
account_id: number;
|
|
1413
|
-
role: string;
|
|
1414
|
-
}>, "many">;
|
|
1473
|
+
type RelayRequestOptions = z.infer<typeof RelayRequestSchema>;
|
|
1474
|
+
declare const RelayFetchSchema: z.ZodObject<{
|
|
1475
|
+
url: z.ZodString;
|
|
1476
|
+
method: z.ZodOptional<z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]>>;
|
|
1477
|
+
body: z.ZodOptional<z.ZodAny>;
|
|
1478
|
+
authenticationId: z.ZodOptional<z.ZodNumber>;
|
|
1479
|
+
callbackUrl: z.ZodOptional<z.ZodString>;
|
|
1480
|
+
authenticationTemplate: z.ZodOptional<z.ZodString>;
|
|
1481
|
+
headers: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodType<Headers, z.ZodTypeDef, Headers>, z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">]>>;
|
|
1482
|
+
} & {
|
|
1483
|
+
relayBaseUrl: z.ZodOptional<z.ZodString>;
|
|
1415
1484
|
}, "strip", z.ZodTypeAny, {
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
personas: string;
|
|
1425
|
-
user_generated_personas: string;
|
|
1426
|
-
last_login: string;
|
|
1427
|
-
email_hash: string;
|
|
1428
|
-
email_confirmed: boolean;
|
|
1429
|
-
timezone: string;
|
|
1430
|
-
photo_url: string;
|
|
1431
|
-
has_seen_notifications: Record<string, boolean | null>;
|
|
1432
|
-
signup: string;
|
|
1433
|
-
since_signup: string;
|
|
1434
|
-
has_activated: boolean;
|
|
1435
|
-
enable_gz_creator: boolean;
|
|
1436
|
-
should_see_nps_survey: boolean;
|
|
1437
|
-
is_developer: boolean;
|
|
1438
|
-
is_expert: boolean;
|
|
1439
|
-
tos_agreement: boolean;
|
|
1440
|
-
should_renew_tos: boolean;
|
|
1441
|
-
is_gdpr_consented: boolean;
|
|
1442
|
-
disable_ssl_check: boolean;
|
|
1443
|
-
identity: number;
|
|
1444
|
-
summary_schedule: string;
|
|
1445
|
-
alert_triggers: string;
|
|
1446
|
-
alert_actions: string;
|
|
1447
|
-
is_staff: boolean;
|
|
1448
|
-
is_zt_reviewer: boolean;
|
|
1449
|
-
is_high_value: boolean;
|
|
1450
|
-
is_temporary: boolean;
|
|
1451
|
-
banner_message: string;
|
|
1452
|
-
enable_totp_2fa: boolean;
|
|
1453
|
-
viewed_help: Record<string, boolean>;
|
|
1454
|
-
show_editor_migration_mesaging: boolean;
|
|
1455
|
-
switches: Record<string, any>;
|
|
1456
|
-
organizations: any[];
|
|
1457
|
-
has_active_zaps: boolean;
|
|
1458
|
-
has_google_sso: boolean;
|
|
1459
|
-
auth_realm: string;
|
|
1460
|
-
roles: {
|
|
1461
|
-
account_id: number;
|
|
1462
|
-
role: string;
|
|
1463
|
-
}[];
|
|
1464
|
-
primary_organization?: any;
|
|
1485
|
+
url: string;
|
|
1486
|
+
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
|
|
1487
|
+
authenticationId?: number | undefined;
|
|
1488
|
+
body?: any;
|
|
1489
|
+
callbackUrl?: string | undefined;
|
|
1490
|
+
authenticationTemplate?: string | undefined;
|
|
1491
|
+
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
1492
|
+
relayBaseUrl?: string | undefined;
|
|
1465
1493
|
}, {
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
personas: string;
|
|
1475
|
-
user_generated_personas: string;
|
|
1476
|
-
last_login: string;
|
|
1477
|
-
email_hash: string;
|
|
1478
|
-
email_confirmed: boolean;
|
|
1479
|
-
timezone: string;
|
|
1480
|
-
photo_url: string;
|
|
1481
|
-
has_seen_notifications: Record<string, boolean | null>;
|
|
1482
|
-
signup: string;
|
|
1483
|
-
since_signup: string;
|
|
1484
|
-
has_activated: boolean;
|
|
1485
|
-
enable_gz_creator: boolean;
|
|
1486
|
-
should_see_nps_survey: boolean;
|
|
1487
|
-
is_developer: boolean;
|
|
1488
|
-
is_expert: boolean;
|
|
1489
|
-
tos_agreement: boolean;
|
|
1490
|
-
should_renew_tos: boolean;
|
|
1491
|
-
is_gdpr_consented: boolean;
|
|
1492
|
-
disable_ssl_check: boolean;
|
|
1493
|
-
identity: number;
|
|
1494
|
-
summary_schedule: string;
|
|
1495
|
-
alert_triggers: string;
|
|
1496
|
-
alert_actions: string;
|
|
1497
|
-
is_staff: boolean;
|
|
1498
|
-
is_zt_reviewer: boolean;
|
|
1499
|
-
is_high_value: boolean;
|
|
1500
|
-
is_temporary: boolean;
|
|
1501
|
-
banner_message: string;
|
|
1502
|
-
enable_totp_2fa: boolean;
|
|
1503
|
-
viewed_help: Record<string, boolean>;
|
|
1504
|
-
show_editor_migration_mesaging: boolean;
|
|
1505
|
-
switches: Record<string, any>;
|
|
1506
|
-
organizations: any[];
|
|
1507
|
-
has_active_zaps: boolean;
|
|
1508
|
-
has_google_sso: boolean;
|
|
1509
|
-
auth_realm: string;
|
|
1510
|
-
roles: {
|
|
1511
|
-
account_id: number;
|
|
1512
|
-
role: string;
|
|
1513
|
-
}[];
|
|
1514
|
-
primary_organization?: any;
|
|
1515
|
-
}>;
|
|
1516
|
-
declare const AppSchema: z.ZodObject<{
|
|
1517
|
-
age_in_days: z.ZodOptional<z.ZodString>;
|
|
1518
|
-
api_docs_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1519
|
-
app_profile_url: z.ZodString;
|
|
1520
|
-
banner: z.ZodOptional<z.ZodString>;
|
|
1521
|
-
categories: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
1522
|
-
canonical_id: z.ZodOptional<z.ZodString>;
|
|
1523
|
-
current_implementation_id: z.ZodString;
|
|
1524
|
-
days_since_last_update: z.ZodOptional<z.ZodString>;
|
|
1525
|
-
description: z.ZodString;
|
|
1526
|
-
external_url: z.ZodString;
|
|
1527
|
-
hashtag: z.ZodOptional<z.ZodString>;
|
|
1528
|
-
id: z.ZodOptional<z.ZodNumber>;
|
|
1529
|
-
image: z.ZodOptional<z.ZodString>;
|
|
1530
|
-
images: z.ZodOptional<z.ZodString>;
|
|
1531
|
-
integration_overview_html: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1532
|
-
internal_id: z.ZodString;
|
|
1533
|
-
invite_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1534
|
-
is_beta: z.ZodOptional<z.ZodString>;
|
|
1535
|
-
is_built_in: z.ZodOptional<z.ZodString>;
|
|
1536
|
-
is_featured: z.ZodOptional<z.ZodString>;
|
|
1537
|
-
is_premium: z.ZodOptional<z.ZodBoolean>;
|
|
1538
|
-
is_public: z.ZodOptional<z.ZodString>;
|
|
1539
|
-
is_upcoming: z.ZodOptional<z.ZodString>;
|
|
1540
|
-
learn_more_url: z.ZodString;
|
|
1541
|
-
name: z.ZodString;
|
|
1542
|
-
popularity: z.ZodNumber;
|
|
1543
|
-
primary_color: z.ZodString;
|
|
1544
|
-
request_count: z.ZodOptional<z.ZodString>;
|
|
1545
|
-
slug: z.ZodString;
|
|
1546
|
-
zap_usage_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1547
|
-
}, "strip", z.ZodTypeAny, {
|
|
1548
|
-
current_implementation_id: string;
|
|
1549
|
-
description: string;
|
|
1550
|
-
slug: string;
|
|
1551
|
-
name: string;
|
|
1552
|
-
app_profile_url: string;
|
|
1553
|
-
external_url: string;
|
|
1554
|
-
internal_id: string;
|
|
1555
|
-
learn_more_url: string;
|
|
1556
|
-
popularity: number;
|
|
1557
|
-
primary_color: string;
|
|
1558
|
-
id?: number | undefined;
|
|
1559
|
-
age_in_days?: string | undefined;
|
|
1560
|
-
api_docs_url?: string | null | undefined;
|
|
1561
|
-
banner?: string | undefined;
|
|
1562
|
-
categories?: any[] | undefined;
|
|
1563
|
-
canonical_id?: string | undefined;
|
|
1564
|
-
days_since_last_update?: string | undefined;
|
|
1565
|
-
hashtag?: string | undefined;
|
|
1566
|
-
image?: string | undefined;
|
|
1567
|
-
images?: string | undefined;
|
|
1568
|
-
integration_overview_html?: string | null | undefined;
|
|
1569
|
-
invite_url?: string | null | undefined;
|
|
1570
|
-
is_beta?: string | undefined;
|
|
1571
|
-
is_built_in?: string | undefined;
|
|
1572
|
-
is_featured?: string | undefined;
|
|
1573
|
-
is_premium?: boolean | undefined;
|
|
1574
|
-
is_public?: string | undefined;
|
|
1575
|
-
is_upcoming?: string | undefined;
|
|
1576
|
-
request_count?: string | undefined;
|
|
1577
|
-
zap_usage_count?: number | null | undefined;
|
|
1578
|
-
}, {
|
|
1579
|
-
current_implementation_id: string;
|
|
1580
|
-
description: string;
|
|
1581
|
-
slug: string;
|
|
1582
|
-
name: string;
|
|
1583
|
-
app_profile_url: string;
|
|
1584
|
-
external_url: string;
|
|
1585
|
-
internal_id: string;
|
|
1586
|
-
learn_more_url: string;
|
|
1587
|
-
popularity: number;
|
|
1588
|
-
primary_color: string;
|
|
1589
|
-
id?: number | undefined;
|
|
1590
|
-
age_in_days?: string | undefined;
|
|
1591
|
-
api_docs_url?: string | null | undefined;
|
|
1592
|
-
banner?: string | undefined;
|
|
1593
|
-
categories?: any[] | undefined;
|
|
1594
|
-
canonical_id?: string | undefined;
|
|
1595
|
-
days_since_last_update?: string | undefined;
|
|
1596
|
-
hashtag?: string | undefined;
|
|
1597
|
-
image?: string | undefined;
|
|
1598
|
-
images?: string | undefined;
|
|
1599
|
-
integration_overview_html?: string | null | undefined;
|
|
1600
|
-
invite_url?: string | null | undefined;
|
|
1601
|
-
is_beta?: string | undefined;
|
|
1602
|
-
is_built_in?: string | undefined;
|
|
1603
|
-
is_featured?: string | undefined;
|
|
1604
|
-
is_premium?: boolean | undefined;
|
|
1605
|
-
is_public?: string | undefined;
|
|
1606
|
-
is_upcoming?: string | undefined;
|
|
1607
|
-
request_count?: string | undefined;
|
|
1608
|
-
zap_usage_count?: number | null | undefined;
|
|
1609
|
-
}>;
|
|
1610
|
-
declare const NeedsRequestSchema: z.ZodObject<{
|
|
1611
|
-
selected_api: z.ZodString;
|
|
1612
|
-
action: z.ZodString;
|
|
1613
|
-
type_of: z.ZodString;
|
|
1614
|
-
authentication_id: z.ZodOptional<z.ZodNumber>;
|
|
1615
|
-
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1616
|
-
}, "strip", z.ZodTypeAny, {
|
|
1617
|
-
selected_api: string;
|
|
1618
|
-
action: string;
|
|
1619
|
-
type_of: string;
|
|
1620
|
-
params?: Record<string, any> | undefined;
|
|
1621
|
-
authentication_id?: number | undefined;
|
|
1622
|
-
}, {
|
|
1623
|
-
selected_api: string;
|
|
1624
|
-
action: string;
|
|
1625
|
-
type_of: string;
|
|
1626
|
-
params?: Record<string, any> | undefined;
|
|
1627
|
-
authentication_id?: number | undefined;
|
|
1628
|
-
}>;
|
|
1629
|
-
declare const NeedsResponseSchema: z.ZodObject<{
|
|
1630
|
-
success: z.ZodBoolean;
|
|
1631
|
-
needs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1632
|
-
key: z.ZodString;
|
|
1633
|
-
alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1634
|
-
capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1635
|
-
choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1636
|
-
key: z.ZodOptional<z.ZodString>;
|
|
1637
|
-
label: z.ZodOptional<z.ZodString>;
|
|
1638
|
-
sample: z.ZodOptional<z.ZodString>;
|
|
1639
|
-
value: z.ZodOptional<z.ZodString>;
|
|
1640
|
-
}, "strip", z.ZodTypeAny, {
|
|
1641
|
-
value?: string | undefined;
|
|
1642
|
-
key?: string | undefined;
|
|
1643
|
-
label?: string | undefined;
|
|
1644
|
-
sample?: string | undefined;
|
|
1645
|
-
}, {
|
|
1646
|
-
value?: string | undefined;
|
|
1647
|
-
key?: string | undefined;
|
|
1648
|
-
label?: string | undefined;
|
|
1649
|
-
sample?: string | undefined;
|
|
1650
|
-
}>, "many">>;
|
|
1651
|
-
computed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1652
|
-
custom_field: z.ZodOptional<z.ZodBoolean>;
|
|
1653
|
-
default: z.ZodOptional<z.ZodString>;
|
|
1654
|
-
depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1655
|
-
format: z.ZodOptional<z.ZodLiteral<"SELECT">>;
|
|
1656
|
-
from_search: z.ZodOptional<z.ZodBoolean>;
|
|
1657
|
-
from_write: z.ZodOptional<z.ZodBoolean>;
|
|
1658
|
-
help_text: z.ZodOptional<z.ZodString>;
|
|
1659
|
-
help_text_html: z.ZodOptional<z.ZodString>;
|
|
1660
|
-
input_format: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1661
|
-
label: z.ZodOptional<z.ZodString>;
|
|
1662
|
-
language: z.ZodOptional<z.ZodString>;
|
|
1663
|
-
parent_key: z.ZodOptional<z.ZodString>;
|
|
1664
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
1665
|
-
prefill: z.ZodOptional<z.ZodString>;
|
|
1666
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
1667
|
-
searchfill: z.ZodOptional<z.ZodString>;
|
|
1668
|
-
send_in_json: z.ZodOptional<z.ZodBoolean>;
|
|
1669
|
-
regex: z.ZodOptional<z.ZodString>;
|
|
1670
|
-
type: z.ZodOptional<z.ZodEnum<["integer", "string", "text", "datetime", "boolean", "file", "decimal", "copy", "password", "dict", "code", "filter", "json"]>>;
|
|
1671
|
-
list: z.ZodOptional<z.ZodBoolean>;
|
|
1672
|
-
}, "strip", z.ZodTypeAny, {
|
|
1673
|
-
key: string;
|
|
1674
|
-
type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
|
|
1675
|
-
label?: string | undefined;
|
|
1676
|
-
alters_custom_fields?: boolean | null | undefined;
|
|
1677
|
-
capabilities?: string[] | undefined;
|
|
1678
|
-
choices?: {
|
|
1679
|
-
value?: string | undefined;
|
|
1680
|
-
key?: string | undefined;
|
|
1681
|
-
label?: string | undefined;
|
|
1682
|
-
sample?: string | undefined;
|
|
1683
|
-
}[] | undefined;
|
|
1684
|
-
computed?: boolean | null | undefined;
|
|
1685
|
-
custom_field?: boolean | undefined;
|
|
1686
|
-
default?: string | undefined;
|
|
1687
|
-
depends_on?: string[] | undefined;
|
|
1688
|
-
format?: "SELECT" | undefined;
|
|
1689
|
-
from_search?: boolean | undefined;
|
|
1690
|
-
from_write?: boolean | undefined;
|
|
1691
|
-
help_text?: string | undefined;
|
|
1692
|
-
help_text_html?: string | undefined;
|
|
1693
|
-
input_format?: string[] | undefined;
|
|
1694
|
-
language?: string | undefined;
|
|
1695
|
-
parent_key?: string | undefined;
|
|
1696
|
-
placeholder?: string | undefined;
|
|
1697
|
-
prefill?: string | undefined;
|
|
1698
|
-
required?: boolean | undefined;
|
|
1699
|
-
searchfill?: string | undefined;
|
|
1700
|
-
send_in_json?: boolean | undefined;
|
|
1701
|
-
regex?: string | undefined;
|
|
1702
|
-
list?: boolean | undefined;
|
|
1703
|
-
}, {
|
|
1704
|
-
key: string;
|
|
1705
|
-
type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
|
|
1706
|
-
label?: string | undefined;
|
|
1707
|
-
alters_custom_fields?: boolean | null | undefined;
|
|
1708
|
-
capabilities?: string[] | undefined;
|
|
1709
|
-
choices?: {
|
|
1710
|
-
value?: string | undefined;
|
|
1711
|
-
key?: string | undefined;
|
|
1712
|
-
label?: string | undefined;
|
|
1713
|
-
sample?: string | undefined;
|
|
1714
|
-
}[] | undefined;
|
|
1715
|
-
computed?: boolean | null | undefined;
|
|
1716
|
-
custom_field?: boolean | undefined;
|
|
1717
|
-
default?: string | undefined;
|
|
1718
|
-
depends_on?: string[] | undefined;
|
|
1719
|
-
format?: "SELECT" | undefined;
|
|
1720
|
-
from_search?: boolean | undefined;
|
|
1721
|
-
from_write?: boolean | undefined;
|
|
1722
|
-
help_text?: string | undefined;
|
|
1723
|
-
help_text_html?: string | undefined;
|
|
1724
|
-
input_format?: string[] | undefined;
|
|
1725
|
-
language?: string | undefined;
|
|
1726
|
-
parent_key?: string | undefined;
|
|
1727
|
-
placeholder?: string | undefined;
|
|
1728
|
-
prefill?: string | undefined;
|
|
1729
|
-
required?: boolean | undefined;
|
|
1730
|
-
searchfill?: string | undefined;
|
|
1731
|
-
send_in_json?: boolean | undefined;
|
|
1732
|
-
regex?: string | undefined;
|
|
1733
|
-
list?: boolean | undefined;
|
|
1734
|
-
}>, "many">>;
|
|
1735
|
-
errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1736
|
-
last_fetched_at: z.ZodOptional<z.ZodString>;
|
|
1737
|
-
}, "strip", z.ZodTypeAny, {
|
|
1738
|
-
success: boolean;
|
|
1739
|
-
needs?: {
|
|
1740
|
-
key: string;
|
|
1741
|
-
type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
|
|
1742
|
-
label?: string | undefined;
|
|
1743
|
-
alters_custom_fields?: boolean | null | undefined;
|
|
1744
|
-
capabilities?: string[] | undefined;
|
|
1745
|
-
choices?: {
|
|
1746
|
-
value?: string | undefined;
|
|
1747
|
-
key?: string | undefined;
|
|
1748
|
-
label?: string | undefined;
|
|
1749
|
-
sample?: string | undefined;
|
|
1750
|
-
}[] | undefined;
|
|
1751
|
-
computed?: boolean | null | undefined;
|
|
1752
|
-
custom_field?: boolean | undefined;
|
|
1753
|
-
default?: string | undefined;
|
|
1754
|
-
depends_on?: string[] | undefined;
|
|
1755
|
-
format?: "SELECT" | undefined;
|
|
1756
|
-
from_search?: boolean | undefined;
|
|
1757
|
-
from_write?: boolean | undefined;
|
|
1758
|
-
help_text?: string | undefined;
|
|
1759
|
-
help_text_html?: string | undefined;
|
|
1760
|
-
input_format?: string[] | undefined;
|
|
1761
|
-
language?: string | undefined;
|
|
1762
|
-
parent_key?: string | undefined;
|
|
1763
|
-
placeholder?: string | undefined;
|
|
1764
|
-
prefill?: string | undefined;
|
|
1765
|
-
required?: boolean | undefined;
|
|
1766
|
-
searchfill?: string | undefined;
|
|
1767
|
-
send_in_json?: boolean | undefined;
|
|
1768
|
-
regex?: string | undefined;
|
|
1769
|
-
list?: boolean | undefined;
|
|
1770
|
-
}[] | undefined;
|
|
1771
|
-
errors?: string[] | undefined;
|
|
1772
|
-
last_fetched_at?: string | undefined;
|
|
1773
|
-
}, {
|
|
1774
|
-
success: boolean;
|
|
1775
|
-
needs?: {
|
|
1776
|
-
key: string;
|
|
1777
|
-
type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
|
|
1778
|
-
label?: string | undefined;
|
|
1779
|
-
alters_custom_fields?: boolean | null | undefined;
|
|
1780
|
-
capabilities?: string[] | undefined;
|
|
1781
|
-
choices?: {
|
|
1782
|
-
value?: string | undefined;
|
|
1783
|
-
key?: string | undefined;
|
|
1784
|
-
label?: string | undefined;
|
|
1785
|
-
sample?: string | undefined;
|
|
1786
|
-
}[] | undefined;
|
|
1787
|
-
computed?: boolean | null | undefined;
|
|
1788
|
-
custom_field?: boolean | undefined;
|
|
1789
|
-
default?: string | undefined;
|
|
1790
|
-
depends_on?: string[] | undefined;
|
|
1791
|
-
format?: "SELECT" | undefined;
|
|
1792
|
-
from_search?: boolean | undefined;
|
|
1793
|
-
from_write?: boolean | undefined;
|
|
1794
|
-
help_text?: string | undefined;
|
|
1795
|
-
help_text_html?: string | undefined;
|
|
1796
|
-
input_format?: string[] | undefined;
|
|
1797
|
-
language?: string | undefined;
|
|
1798
|
-
parent_key?: string | undefined;
|
|
1799
|
-
placeholder?: string | undefined;
|
|
1800
|
-
prefill?: string | undefined;
|
|
1801
|
-
required?: boolean | undefined;
|
|
1802
|
-
searchfill?: string | undefined;
|
|
1803
|
-
send_in_json?: boolean | undefined;
|
|
1804
|
-
regex?: string | undefined;
|
|
1805
|
-
list?: boolean | undefined;
|
|
1806
|
-
}[] | undefined;
|
|
1807
|
-
errors?: string[] | undefined;
|
|
1808
|
-
last_fetched_at?: string | undefined;
|
|
1494
|
+
url: string;
|
|
1495
|
+
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
|
|
1496
|
+
authenticationId?: number | undefined;
|
|
1497
|
+
body?: any;
|
|
1498
|
+
callbackUrl?: string | undefined;
|
|
1499
|
+
authenticationTemplate?: string | undefined;
|
|
1500
|
+
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
1501
|
+
relayBaseUrl?: string | undefined;
|
|
1809
1502
|
}>;
|
|
1810
1503
|
|
|
1811
1504
|
/**
|
|
1812
|
-
*
|
|
1505
|
+
* ------------------------------
|
|
1506
|
+
* Plugin Type System with Explicit Context Dependencies
|
|
1507
|
+
* ------------------------------
|
|
1813
1508
|
*
|
|
1814
|
-
* This
|
|
1815
|
-
*
|
|
1816
|
-
* and API response models.
|
|
1817
|
-
*
|
|
1818
|
-
* API response model types are inferred from Zod schemas defined in api/schemas.ts
|
|
1819
|
-
* to ensure a single source of truth and eliminate duplication.
|
|
1509
|
+
* This system makes context dependencies explicit to restore TypeScript's
|
|
1510
|
+
* ability to catch missing context at compile time.
|
|
1820
1511
|
*/
|
|
1821
1512
|
|
|
1822
|
-
interface
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
put: <T = unknown>(path: string, data?: unknown, options?: RequestOptions) => Promise<T>;
|
|
1826
|
-
delete: <T = unknown>(path: string, options?: RequestOptions) => Promise<T>;
|
|
1827
|
-
poll: <T = unknown>(path: string, options?: PollOptions) => Promise<T>;
|
|
1828
|
-
fetch: (path: string, init?: RequestInit & {
|
|
1829
|
-
searchParams?: Record<string, string>;
|
|
1830
|
-
authRequired?: boolean;
|
|
1831
|
-
}) => Promise<Response>;
|
|
1513
|
+
interface PluginDependencies<TSdk = {}, TContext = {}> {
|
|
1514
|
+
sdk: TSdk;
|
|
1515
|
+
context: TContext;
|
|
1832
1516
|
}
|
|
1833
|
-
interface
|
|
1834
|
-
|
|
1835
|
-
searchParams?: Record<string, string>;
|
|
1836
|
-
authRequired?: boolean;
|
|
1837
|
-
customErrorHandler?: (errorInfo: {
|
|
1838
|
-
status: number;
|
|
1839
|
-
statusText: string;
|
|
1840
|
-
data: unknown;
|
|
1841
|
-
}) => Error | undefined;
|
|
1517
|
+
interface PluginProvides extends Record<string, any> {
|
|
1518
|
+
context?: Record<string, any>;
|
|
1842
1519
|
}
|
|
1843
|
-
interface
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1520
|
+
interface PluginMeta {
|
|
1521
|
+
categories: string[];
|
|
1522
|
+
type?: "list" | "item";
|
|
1523
|
+
itemType?: string;
|
|
1524
|
+
returnType?: string;
|
|
1525
|
+
inputSchema: z.ZodSchema;
|
|
1526
|
+
outputSchema?: z.ZodSchema;
|
|
1527
|
+
resolvers?: Record<string, any>;
|
|
1528
|
+
[key: string]: any;
|
|
1849
1529
|
}
|
|
1850
|
-
type
|
|
1851
|
-
type
|
|
1852
|
-
type
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
type
|
|
1856
|
-
type
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
type NeedsResponse = z.infer<typeof NeedsResponseSchema>;
|
|
1863
|
-
|
|
1530
|
+
type ExtractSdkProperties<T extends Record<string, any>> = Omit<T, "context">;
|
|
1531
|
+
type ExtractContextProperties<T extends PluginProvides> = T["context"];
|
|
1532
|
+
type GetSdkType<TPluginProvides extends PluginProvides> = ExtractSdkProperties<TPluginProvides> & {
|
|
1533
|
+
getContext(): NonNullable<ExtractContextProperties<TPluginProvides>>;
|
|
1534
|
+
};
|
|
1535
|
+
type GetContextType<TPluginProvides extends PluginProvides> = NonNullable<ExtractContextProperties<TPluginProvides>>;
|
|
1536
|
+
type PluginOptions<TSdk = {}, TContext = {}> = {
|
|
1537
|
+
sdk: TSdk;
|
|
1538
|
+
context: TContext & {
|
|
1539
|
+
meta: Record<string, any>;
|
|
1540
|
+
};
|
|
1541
|
+
};
|
|
1864
1542
|
/**
|
|
1865
|
-
*
|
|
1543
|
+
* Plugin interface — now has 3 type params:
|
|
1544
|
+
*
|
|
1545
|
+
* TRequiresContext = what this plugin *needs* in context
|
|
1546
|
+
* TProvides = what this plugin *returns* (sdk + context)
|
|
1547
|
+
* TSdk = current sdk shape when plugin runs
|
|
1866
1548
|
*/
|
|
1867
|
-
interface
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
api?: ApiClient;
|
|
1876
|
-
/** Enable debug logging */
|
|
1877
|
-
debug?: boolean;
|
|
1878
|
-
/** Custom fetch implementation */
|
|
1879
|
-
fetch?: typeof globalThis.fetch;
|
|
1549
|
+
interface Plugin<TSdk = {}, TRequiresContext = {}, TProvides extends PluginProvides = PluginProvides> {
|
|
1550
|
+
(params: {
|
|
1551
|
+
sdk: TSdk;
|
|
1552
|
+
context: TRequiresContext & {
|
|
1553
|
+
meta: Record<string, PluginMeta>;
|
|
1554
|
+
options: BaseSdkOptions;
|
|
1555
|
+
};
|
|
1556
|
+
}): TProvides;
|
|
1880
1557
|
}
|
|
1881
|
-
type
|
|
1882
|
-
|
|
1883
|
-
}
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1558
|
+
type MissingContextKeys<TRequired, TCurrent> = TRequired extends Record<string, any> ? TCurrent extends Record<string, any> ? {
|
|
1559
|
+
[K in keyof TRequired]: K extends keyof TCurrent ? never : K;
|
|
1560
|
+
}[keyof TRequired] : keyof TRequired : never;
|
|
1561
|
+
type ContextError<TRequired, TCurrent> = MissingContextKeys<TRequired, TCurrent> extends never ? never : MissingContextKeys<TRequired, TCurrent> extends infer Missing ? Missing extends string ? `❌ Missing required context: { ${Missing}: any }` : Missing extends number ? `❌ Missing required context: { ${Missing}: any }` : `❌ Missing required context properties. Required: ${keyof TRequired extends string ? keyof TRequired : "unknown"}, Available: ${keyof TCurrent extends string ? keyof TCurrent : "unknown"}` : "❌ Context requirement not satisfied";
|
|
1562
|
+
/**
|
|
1563
|
+
* SDK interface — result of createSdk()
|
|
1564
|
+
*
|
|
1565
|
+
* addPlugin now enforces that TRequiresContext is assignable to TCurrentContext.
|
|
1566
|
+
* If not, TypeScript will emit a detailed error showing missing properties.
|
|
1567
|
+
*/
|
|
1568
|
+
type Sdk<TCurrentSdk = {}, TCurrentContext = {
|
|
1569
|
+
meta: Record<string, PluginMeta>;
|
|
1570
|
+
}> = TCurrentSdk & {
|
|
1571
|
+
addPlugin<TRequiresContext, TProvides extends PluginProvides>(plugin: Plugin<TCurrentSdk & {
|
|
1572
|
+
getContext(): TCurrentContext;
|
|
1573
|
+
}, TRequiresContext, TProvides>, options?: any): TCurrentContext extends TRequiresContext ? Sdk<TCurrentSdk & ExtractSdkProperties<TProvides>, TCurrentContext & NonNullable<ExtractContextProperties<TProvides>>> : ContextError<TRequiresContext, TCurrentContext>;
|
|
1574
|
+
getContext(): TCurrentContext;
|
|
1888
1575
|
};
|
|
1889
1576
|
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
type InputsProperty = z.infer<typeof InputsPropertySchema>;
|
|
1905
|
-
type LimitProperty = z.infer<typeof LimitPropertySchema>;
|
|
1906
|
-
type OffsetProperty = z.infer<typeof OffsetPropertySchema>;
|
|
1907
|
-
type OutputProperty = z.infer<typeof OutputPropertySchema>;
|
|
1908
|
-
type DebugProperty = z.infer<typeof DebugPropertySchema>;
|
|
1909
|
-
type ParamsProperty = z.infer<typeof ParamsPropertySchema>;
|
|
1577
|
+
interface RegistryPluginProvides {
|
|
1578
|
+
getRegistry: () => {
|
|
1579
|
+
functions: FunctionRegistryEntry[];
|
|
1580
|
+
categories: {
|
|
1581
|
+
key: string;
|
|
1582
|
+
title: string;
|
|
1583
|
+
titlePlural: string;
|
|
1584
|
+
functions: string[];
|
|
1585
|
+
}[];
|
|
1586
|
+
};
|
|
1587
|
+
}
|
|
1588
|
+
declare const registryPlugin: Plugin<{}, // accepts any SDK shape
|
|
1589
|
+
{}, // requires no context
|
|
1590
|
+
RegistryPluginProvides>;
|
|
1910
1591
|
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
interface
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1592
|
+
declare const GetProfileSchema: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
1593
|
+
type GetProfileOptions = z.infer<typeof GetProfileSchema> & FunctionOptions;
|
|
1594
|
+
|
|
1595
|
+
interface GetProfilePluginProvides {
|
|
1596
|
+
getProfile: (options?: GetProfileOptions) => Promise<{
|
|
1597
|
+
data: UserProfileItem;
|
|
1598
|
+
}>;
|
|
1599
|
+
context: {
|
|
1600
|
+
meta: {
|
|
1601
|
+
getProfile: {
|
|
1602
|
+
inputSchema: typeof GetProfileSchema;
|
|
1603
|
+
};
|
|
1604
|
+
};
|
|
1605
|
+
};
|
|
1921
1606
|
}
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1607
|
+
declare const getProfilePlugin: Plugin<{}, // no SDK dependencies
|
|
1608
|
+
{
|
|
1609
|
+
api: ApiClient;
|
|
1610
|
+
}, // requires api in context
|
|
1611
|
+
GetProfilePluginProvides>;
|
|
1612
|
+
|
|
1613
|
+
interface ActionExecutionOptions {
|
|
1614
|
+
inputs?: Record<string, any>;
|
|
1615
|
+
authenticationId?: number;
|
|
1930
1616
|
}
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
* Use instanceof ZapierError to check if an error is from the SDK
|
|
1934
|
-
*/
|
|
1935
|
-
declare abstract class ZapierError extends Error {
|
|
1936
|
-
abstract readonly name: string;
|
|
1937
|
-
statusCode?: number;
|
|
1938
|
-
errors?: ApiError[];
|
|
1939
|
-
cause?: unknown;
|
|
1940
|
-
response?: unknown;
|
|
1941
|
-
constructor(message: string, options?: ErrorOptions);
|
|
1617
|
+
interface AppFactoryOptions {
|
|
1618
|
+
authenticationId: number;
|
|
1942
1619
|
}
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
*/
|
|
1946
|
-
declare class ZapierApiError extends ZapierError {
|
|
1947
|
-
readonly name = "ZapierApiError";
|
|
1948
|
-
constructor(message: string, options?: ErrorOptions);
|
|
1620
|
+
interface BaseActionTypeProxy {
|
|
1621
|
+
[action: string]: (options?: ActionExecutionOptions) => unknown;
|
|
1949
1622
|
}
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
constructor(message: string, options?: ErrorOptions & {
|
|
1957
|
-
appKey?: string;
|
|
1958
|
-
});
|
|
1623
|
+
interface FetchActionType {
|
|
1624
|
+
fetch: (url: string | URL, init?: RequestInit & {
|
|
1625
|
+
authenticationId?: number;
|
|
1626
|
+
callbackUrl?: string;
|
|
1627
|
+
authenticationTemplate?: string;
|
|
1628
|
+
}) => Promise<Response>;
|
|
1959
1629
|
}
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
declare class ZapierValidationError extends ZapierError {
|
|
1964
|
-
readonly name = "ZapierValidationError";
|
|
1965
|
-
details?: unknown;
|
|
1966
|
-
constructor(message: string, options?: ErrorOptions & {
|
|
1967
|
-
details?: unknown;
|
|
1968
|
-
});
|
|
1630
|
+
type ActionTypeProxy = BaseActionTypeProxy & Partial<FetchActionType>;
|
|
1631
|
+
interface AppProxy {
|
|
1632
|
+
[type: string]: ActionTypeProxy;
|
|
1969
1633
|
}
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
*/
|
|
1973
|
-
declare class ZapierUnknownError extends ZapierError {
|
|
1974
|
-
readonly name = "ZapierUnknownError";
|
|
1975
|
-
constructor(message: string, options?: ErrorOptions);
|
|
1634
|
+
interface AppFactory {
|
|
1635
|
+
(options: AppFactoryOptions): AppProxy;
|
|
1976
1636
|
}
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
declare class ZapierAuthenticationError extends ZapierError {
|
|
1981
|
-
readonly name = "ZapierAuthenticationError";
|
|
1982
|
-
constructor(message: string, options?: ErrorOptions);
|
|
1637
|
+
type AppProxyWithFactory = AppFactory & AppProxy;
|
|
1638
|
+
interface ActionProxy {
|
|
1639
|
+
[app: string]: AppProxyWithFactory;
|
|
1983
1640
|
}
|
|
1984
|
-
/**
|
|
1985
|
-
* Error thrown when a requested resource is not found
|
|
1986
|
-
*/
|
|
1987
|
-
declare class ZapierResourceNotFoundError extends ZapierError {
|
|
1988
|
-
readonly name = "ZapierResourceNotFoundError";
|
|
1989
|
-
resourceType?: string;
|
|
1990
|
-
resourceId?: string;
|
|
1991
|
-
constructor(message: string, options?: ErrorOptions & {
|
|
1992
|
-
resourceType?: string;
|
|
1993
|
-
resourceId?: string;
|
|
1994
|
-
});
|
|
1995
|
-
}
|
|
1996
|
-
/**
|
|
1997
|
-
* Error thrown when required app or implementation configuration is missing
|
|
1998
|
-
*/
|
|
1999
|
-
declare class ZapierConfigurationError extends ZapierError {
|
|
2000
|
-
readonly name = "ZapierConfigurationError";
|
|
2001
|
-
configType?: string;
|
|
2002
|
-
constructor(message: string, options?: ErrorOptions & {
|
|
2003
|
-
configType?: string;
|
|
2004
|
-
});
|
|
2005
|
-
}
|
|
2006
|
-
/**
|
|
2007
|
-
* Error thrown when code bundling or compilation fails
|
|
2008
|
-
*/
|
|
2009
|
-
declare class ZapierBundleError extends ZapierError {
|
|
2010
|
-
readonly name = "ZapierBundleError";
|
|
2011
|
-
buildErrors?: string[];
|
|
2012
|
-
constructor(message: string, options?: ErrorOptions & {
|
|
2013
|
-
buildErrors?: string[];
|
|
2014
|
-
});
|
|
2015
|
-
}
|
|
2016
|
-
/**
|
|
2017
|
-
* Error thrown when operations timeout or exceed retry limits
|
|
2018
|
-
*/
|
|
2019
|
-
declare class ZapierTimeoutError extends ZapierError {
|
|
2020
|
-
readonly name = "ZapierTimeoutError";
|
|
2021
|
-
attempts?: number;
|
|
2022
|
-
maxAttempts?: number;
|
|
2023
|
-
constructor(message: string, options?: ErrorOptions & {
|
|
2024
|
-
attempts?: number;
|
|
2025
|
-
maxAttempts?: number;
|
|
2026
|
-
});
|
|
2027
|
-
}
|
|
2028
|
-
/**
|
|
2029
|
-
* Error thrown when action execution fails due to errors returned from the third-party service
|
|
2030
|
-
* This happens when the Actions API returns a 200 status but includes errors in the response
|
|
2031
|
-
*/
|
|
2032
|
-
declare class ZapierActionError extends ZapierError {
|
|
2033
|
-
readonly name = "ZapierActionError";
|
|
2034
|
-
appKey?: string;
|
|
2035
|
-
actionKey?: string;
|
|
2036
|
-
constructor(message: string, options?: ErrorOptions & {
|
|
2037
|
-
appKey?: string;
|
|
2038
|
-
actionKey?: string;
|
|
2039
|
-
});
|
|
2040
|
-
get actionErrors(): ApiError[] | undefined;
|
|
2041
|
-
}
|
|
2042
|
-
/**
|
|
2043
|
-
* Error thrown when a resource is not found (404)
|
|
2044
|
-
*/
|
|
2045
|
-
declare class ZapierNotFoundError extends ZapierError {
|
|
2046
|
-
readonly name = "ZapierNotFoundError";
|
|
2047
|
-
constructor(message: string, options?: ErrorOptions);
|
|
2048
|
-
}
|
|
2049
|
-
/**
|
|
2050
|
-
* Utility function to format error messages for display
|
|
2051
|
-
*/
|
|
2052
|
-
declare function formatErrorMessage(error: ZapierError): string;
|
|
2053
1641
|
|
|
2054
|
-
interface
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
}
|
|
2061
|
-
|
|
2062
|
-
|
|
1642
|
+
interface RequestPluginProvides {
|
|
1643
|
+
request: (options: RelayRequestOptions) => Promise<Response>;
|
|
1644
|
+
context: {
|
|
1645
|
+
meta: {
|
|
1646
|
+
request: {
|
|
1647
|
+
inputSchema: typeof RelayRequestSchema;
|
|
1648
|
+
};
|
|
1649
|
+
};
|
|
1650
|
+
};
|
|
2063
1651
|
}
|
|
2064
|
-
|
|
1652
|
+
declare const requestPlugin: Plugin<{}, // no SDK dependencies
|
|
1653
|
+
{
|
|
1654
|
+
api: ApiClient;
|
|
1655
|
+
}, // requires api in context
|
|
1656
|
+
RequestPluginProvides>;
|
|
1657
|
+
|
|
1658
|
+
interface FetchPluginProvides {
|
|
2065
1659
|
fetch: (url: string | URL, init?: RequestInit & {
|
|
2066
1660
|
authenticationId?: number;
|
|
2067
1661
|
callbackUrl?: string;
|
|
2068
1662
|
authenticationTemplate?: string;
|
|
2069
1663
|
}) => Promise<Response>;
|
|
2070
1664
|
}
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
}
|
|
1665
|
+
/**
|
|
1666
|
+
* Direct plugin function - takes options + sdk + context in one object
|
|
1667
|
+
*/
|
|
1668
|
+
declare const fetchPlugin: Plugin<GetSdkType<RequestPluginProvides>, // requires request in SDK
|
|
1669
|
+
{}, // requires no context (uses SDK methods)
|
|
1670
|
+
FetchPluginProvides>;
|
|
1671
|
+
type ZapierFetchInitOptions = RequestInit & {
|
|
1672
|
+
authenticationId?: number;
|
|
1673
|
+
callbackUrl?: string;
|
|
1674
|
+
authenticationTemplate?: string;
|
|
1675
|
+
};
|
|
2082
1676
|
|
|
2083
|
-
declare const
|
|
2084
|
-
appKey: z.ZodString
|
|
1677
|
+
declare const RunActionSchema: z.ZodObject<{
|
|
1678
|
+
appKey: z.ZodString & {
|
|
1679
|
+
_def: z.ZodStringDef & PositionalMetadata;
|
|
1680
|
+
};
|
|
2085
1681
|
actionType: z.ZodEnum<["read", "read_bulk", "write", "run", "search", "search_or_write", "search_and_write", "filter"]>;
|
|
2086
1682
|
actionKey: z.ZodString;
|
|
2087
1683
|
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -2090,7 +1686,7 @@ declare const ListInputFieldsSchema: z.ZodObject<{
|
|
|
2090
1686
|
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
2091
1687
|
}, "strip", z.ZodTypeAny, {
|
|
2092
1688
|
appKey: string;
|
|
2093
|
-
actionType: "filter" | "read" | "read_bulk" | "
|
|
1689
|
+
actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
|
|
2094
1690
|
actionKey: string;
|
|
2095
1691
|
authenticationId?: number | null | undefined;
|
|
2096
1692
|
inputs?: Record<string, unknown> | undefined;
|
|
@@ -2098,285 +1694,78 @@ declare const ListInputFieldsSchema: z.ZodObject<{
|
|
|
2098
1694
|
maxItems?: number | undefined;
|
|
2099
1695
|
}, {
|
|
2100
1696
|
appKey: string;
|
|
2101
|
-
actionType: "filter" | "read" | "read_bulk" | "
|
|
1697
|
+
actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
|
|
2102
1698
|
actionKey: string;
|
|
2103
1699
|
authenticationId?: number | null | undefined;
|
|
2104
1700
|
inputs?: Record<string, unknown> | undefined;
|
|
2105
1701
|
pageSize?: number | undefined;
|
|
2106
1702
|
maxItems?: number | undefined;
|
|
2107
1703
|
}>;
|
|
2108
|
-
type
|
|
2109
|
-
|
|
2110
|
-
declare const GetAuthenticationSchema: z.ZodObject<{
|
|
2111
|
-
authenticationId: z.ZodNumber;
|
|
2112
|
-
}, "strip", z.ZodTypeAny, {
|
|
2113
|
-
authenticationId: number;
|
|
2114
|
-
}, {
|
|
2115
|
-
authenticationId: number;
|
|
2116
|
-
}>;
|
|
2117
|
-
type GetAuthenticationOptions = z.infer<typeof GetAuthenticationSchema>;
|
|
2118
|
-
|
|
2119
|
-
declare const FindFirstAuthenticationSchema: z.ZodObject<{
|
|
2120
|
-
appKey: z.ZodOptional<z.ZodString>;
|
|
2121
|
-
search: z.ZodOptional<z.ZodString>;
|
|
2122
|
-
title: z.ZodOptional<z.ZodString>;
|
|
2123
|
-
accountId: z.ZodOptional<z.ZodString>;
|
|
2124
|
-
owner: z.ZodOptional<z.ZodString>;
|
|
2125
|
-
}, "strip", z.ZodTypeAny, {
|
|
2126
|
-
title?: string | undefined;
|
|
2127
|
-
search?: string | undefined;
|
|
2128
|
-
appKey?: string | undefined;
|
|
2129
|
-
accountId?: string | undefined;
|
|
2130
|
-
owner?: string | undefined;
|
|
2131
|
-
}, {
|
|
2132
|
-
title?: string | undefined;
|
|
2133
|
-
search?: string | undefined;
|
|
2134
|
-
appKey?: string | undefined;
|
|
2135
|
-
accountId?: string | undefined;
|
|
2136
|
-
owner?: string | undefined;
|
|
2137
|
-
}>;
|
|
2138
|
-
type FindFirstAuthenticationOptions = z.infer<typeof FindFirstAuthenticationSchema>;
|
|
2139
|
-
|
|
2140
|
-
declare const FindUniqueAuthenticationSchema: z.ZodObject<{
|
|
2141
|
-
appKey: z.ZodOptional<z.ZodString>;
|
|
2142
|
-
search: z.ZodOptional<z.ZodString>;
|
|
2143
|
-
title: z.ZodOptional<z.ZodString>;
|
|
2144
|
-
accountId: z.ZodOptional<z.ZodString>;
|
|
2145
|
-
owner: z.ZodOptional<z.ZodString>;
|
|
2146
|
-
}, "strip", z.ZodTypeAny, {
|
|
2147
|
-
title?: string | undefined;
|
|
2148
|
-
search?: string | undefined;
|
|
2149
|
-
appKey?: string | undefined;
|
|
2150
|
-
accountId?: string | undefined;
|
|
2151
|
-
owner?: string | undefined;
|
|
2152
|
-
}, {
|
|
2153
|
-
title?: string | undefined;
|
|
2154
|
-
search?: string | undefined;
|
|
2155
|
-
appKey?: string | undefined;
|
|
2156
|
-
accountId?: string | undefined;
|
|
2157
|
-
owner?: string | undefined;
|
|
2158
|
-
}>;
|
|
2159
|
-
type FindUniqueAuthenticationOptions = z.infer<typeof FindUniqueAuthenticationSchema>;
|
|
2160
|
-
|
|
2161
|
-
declare const RelayRequestSchema: z.ZodObject<{
|
|
2162
|
-
url: z.ZodString;
|
|
2163
|
-
method: z.ZodOptional<z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]>>;
|
|
2164
|
-
body: z.ZodOptional<z.ZodAny>;
|
|
2165
|
-
authenticationId: z.ZodOptional<z.ZodNumber>;
|
|
2166
|
-
callbackUrl: z.ZodOptional<z.ZodString>;
|
|
2167
|
-
authenticationTemplate: z.ZodOptional<z.ZodString>;
|
|
2168
|
-
headers: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodType<Headers, z.ZodTypeDef, Headers>, z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">]>>;
|
|
2169
|
-
} & {
|
|
2170
|
-
relayBaseUrl: z.ZodOptional<z.ZodString>;
|
|
2171
|
-
}, "strip", z.ZodTypeAny, {
|
|
2172
|
-
url: string;
|
|
2173
|
-
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
|
|
2174
|
-
authenticationId?: number | undefined;
|
|
2175
|
-
body?: any;
|
|
2176
|
-
callbackUrl?: string | undefined;
|
|
2177
|
-
authenticationTemplate?: string | undefined;
|
|
2178
|
-
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
2179
|
-
relayBaseUrl?: string | undefined;
|
|
2180
|
-
}, {
|
|
2181
|
-
url: string;
|
|
2182
|
-
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
|
|
2183
|
-
authenticationId?: number | undefined;
|
|
2184
|
-
body?: any;
|
|
2185
|
-
callbackUrl?: string | undefined;
|
|
2186
|
-
authenticationTemplate?: string | undefined;
|
|
2187
|
-
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
2188
|
-
relayBaseUrl?: string | undefined;
|
|
2189
|
-
}>;
|
|
2190
|
-
type RelayRequestOptions = z.infer<typeof RelayRequestSchema>;
|
|
2191
|
-
declare const RelayFetchSchema: z.ZodObject<{
|
|
2192
|
-
url: z.ZodString;
|
|
2193
|
-
method: z.ZodOptional<z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]>>;
|
|
2194
|
-
body: z.ZodOptional<z.ZodAny>;
|
|
2195
|
-
authenticationId: z.ZodOptional<z.ZodNumber>;
|
|
2196
|
-
callbackUrl: z.ZodOptional<z.ZodString>;
|
|
2197
|
-
authenticationTemplate: z.ZodOptional<z.ZodString>;
|
|
2198
|
-
headers: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodType<Headers, z.ZodTypeDef, Headers>, z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">]>>;
|
|
2199
|
-
} & {
|
|
2200
|
-
relayBaseUrl: z.ZodOptional<z.ZodString>;
|
|
2201
|
-
}, "strip", z.ZodTypeAny, {
|
|
2202
|
-
url: string;
|
|
2203
|
-
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
|
|
2204
|
-
authenticationId?: number | undefined;
|
|
2205
|
-
body?: any;
|
|
2206
|
-
callbackUrl?: string | undefined;
|
|
2207
|
-
authenticationTemplate?: string | undefined;
|
|
2208
|
-
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
2209
|
-
relayBaseUrl?: string | undefined;
|
|
2210
|
-
}, {
|
|
2211
|
-
url: string;
|
|
2212
|
-
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
|
|
2213
|
-
authenticationId?: number | undefined;
|
|
2214
|
-
body?: any;
|
|
2215
|
-
callbackUrl?: string | undefined;
|
|
2216
|
-
authenticationTemplate?: string | undefined;
|
|
2217
|
-
headers?: Record<string, string> | [string, string][] | Headers | undefined;
|
|
2218
|
-
relayBaseUrl?: string | undefined;
|
|
2219
|
-
}>;
|
|
1704
|
+
type RunActionOptions = z.infer<typeof RunActionSchema>;
|
|
2220
1705
|
|
|
2221
|
-
declare const
|
|
2222
|
-
appKey: z.ZodString
|
|
1706
|
+
declare const GetActionSchema: z.ZodObject<{
|
|
1707
|
+
appKey: z.ZodString & {
|
|
1708
|
+
_def: z.ZodStringDef & PositionalMetadata;
|
|
1709
|
+
};
|
|
1710
|
+
actionType: z.ZodEnum<["read", "read_bulk", "write", "run", "search", "search_or_write", "search_and_write", "filter"]>;
|
|
1711
|
+
actionKey: z.ZodString;
|
|
2223
1712
|
}, "strip", z.ZodTypeAny, {
|
|
2224
1713
|
appKey: string;
|
|
1714
|
+
actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
|
|
1715
|
+
actionKey: string;
|
|
2225
1716
|
}, {
|
|
2226
1717
|
appKey: string;
|
|
1718
|
+
actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
|
|
1719
|
+
actionKey: string;
|
|
2227
1720
|
}>;
|
|
2228
|
-
type
|
|
1721
|
+
type GetActionOptions = z.infer<typeof GetActionSchema>;
|
|
2229
1722
|
|
|
2230
|
-
declare const
|
|
2231
|
-
|
|
2232
|
-
|
|
1723
|
+
declare const ListActionsSchema: z.ZodObject<{
|
|
1724
|
+
appKey: z.ZodString & {
|
|
1725
|
+
_def: z.ZodStringDef & PositionalMetadata;
|
|
1726
|
+
};
|
|
1727
|
+
actionType: z.ZodOptional<z.ZodEnum<["read", "read_bulk", "write", "run", "search", "search_or_write", "search_and_write", "filter"]>>;
|
|
2233
1728
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
2234
1729
|
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
2235
1730
|
}, "strip", z.ZodTypeAny, {
|
|
2236
|
-
|
|
1731
|
+
appKey: string;
|
|
1732
|
+
actionType?: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write" | undefined;
|
|
2237
1733
|
pageSize?: number | undefined;
|
|
2238
1734
|
maxItems?: number | undefined;
|
|
2239
|
-
appKeys?: string[] | undefined;
|
|
2240
1735
|
}, {
|
|
2241
|
-
|
|
1736
|
+
appKey: string;
|
|
1737
|
+
actionType?: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write" | undefined;
|
|
2242
1738
|
pageSize?: number | undefined;
|
|
2243
1739
|
maxItems?: number | undefined;
|
|
2244
|
-
appKeys?: string[] | undefined;
|
|
2245
1740
|
}>;
|
|
2246
|
-
type
|
|
1741
|
+
type ListActionsOptions = z.infer<typeof ListActionsSchema>;
|
|
2247
1742
|
|
|
2248
|
-
interface ListAppsPluginProvides {
|
|
2249
|
-
listApps: (options?: ListAppsOptions) => Promise<{
|
|
2250
|
-
data: AppItem[];
|
|
2251
|
-
}> & AsyncIterable<{
|
|
2252
|
-
data: AppItem[];
|
|
2253
|
-
nextCursor?: string;
|
|
2254
|
-
}> & {
|
|
2255
|
-
items(): AsyncIterable<AppItem>;
|
|
2256
|
-
};
|
|
2257
|
-
context: {
|
|
2258
|
-
meta: {
|
|
2259
|
-
listApps: {
|
|
2260
|
-
inputSchema: typeof ListAppsSchema;
|
|
2261
|
-
};
|
|
2262
|
-
};
|
|
2263
|
-
};
|
|
2264
|
-
}
|
|
2265
|
-
declare const listAppsPlugin: Plugin<{}, // no SDK dependencies
|
|
2266
|
-
{
|
|
2267
|
-
api: ApiClient;
|
|
2268
|
-
}, // requires api in context
|
|
2269
|
-
ListAppsPluginProvides>;
|
|
2270
|
-
|
|
2271
|
-
interface LockVersionPluginProvides {
|
|
2272
|
-
lockVersion: (options: LockVersionOptions & {
|
|
2273
|
-
configPath?: string;
|
|
2274
|
-
}) => Promise<{
|
|
2275
|
-
data: AppItem;
|
|
2276
|
-
configPath: string;
|
|
2277
|
-
}>;
|
|
2278
|
-
context: {
|
|
2279
|
-
meta: {
|
|
2280
|
-
lockVersion: {
|
|
2281
|
-
inputSchema: typeof LockVersionSchema;
|
|
2282
|
-
};
|
|
2283
|
-
};
|
|
2284
|
-
};
|
|
2285
|
-
}
|
|
2286
|
-
declare const lockVersionPlugin: Plugin<GetSdkType<ListAppsPluginProvides>, // requires getApp in SDK
|
|
2287
|
-
{}, // requires manifest context
|
|
2288
|
-
LockVersionPluginProvides>;
|
|
2289
|
-
|
|
2290
|
-
interface RegistryPluginProvides {
|
|
2291
|
-
getRegistry: () => {
|
|
2292
|
-
functions: FunctionRegistryEntry[];
|
|
2293
|
-
categories: {
|
|
2294
|
-
key: string;
|
|
2295
|
-
title: string;
|
|
2296
|
-
titlePlural: string;
|
|
2297
|
-
functions: string[];
|
|
2298
|
-
}[];
|
|
2299
|
-
};
|
|
2300
|
-
}
|
|
2301
|
-
declare const registryPlugin: Plugin<{}, // accepts any SDK shape
|
|
2302
|
-
{}, // requires no context
|
|
2303
|
-
RegistryPluginProvides>;
|
|
2304
|
-
|
|
2305
|
-
declare const GetProfileSchema: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
2306
|
-
type GetProfileOptions = z.infer<typeof GetProfileSchema> & FunctionOptions;
|
|
2307
|
-
|
|
2308
|
-
interface GetProfilePluginProvides {
|
|
2309
|
-
getProfile: (options?: GetProfileOptions) => Promise<{
|
|
2310
|
-
data: UserProfileItem;
|
|
2311
|
-
}>;
|
|
2312
|
-
context: {
|
|
2313
|
-
meta: {
|
|
2314
|
-
getProfile: {
|
|
2315
|
-
inputSchema: typeof GetProfileSchema;
|
|
2316
|
-
};
|
|
2317
|
-
};
|
|
2318
|
-
};
|
|
2319
|
-
}
|
|
2320
|
-
declare const getProfilePlugin: Plugin<{}, // no SDK dependencies
|
|
2321
|
-
{
|
|
2322
|
-
api: ApiClient;
|
|
2323
|
-
}, // requires api in context
|
|
2324
|
-
GetProfilePluginProvides>;
|
|
2325
|
-
|
|
2326
|
-
interface RequestPluginProvides {
|
|
2327
|
-
request: (options: RelayRequestOptions) => Promise<Response>;
|
|
2328
|
-
context: {
|
|
2329
|
-
meta: {
|
|
2330
|
-
request: {
|
|
2331
|
-
inputSchema: typeof RelayRequestSchema;
|
|
2332
|
-
};
|
|
2333
|
-
};
|
|
2334
|
-
};
|
|
2335
|
-
}
|
|
2336
|
-
declare const requestPlugin: Plugin<{}, // no SDK dependencies
|
|
2337
|
-
{
|
|
2338
|
-
api: ApiClient;
|
|
2339
|
-
}, // requires api in context
|
|
2340
|
-
RequestPluginProvides>;
|
|
2341
|
-
|
|
2342
|
-
interface FetchPluginProvides {
|
|
2343
|
-
fetch: (url: string | URL, init?: RequestInit & {
|
|
2344
|
-
authenticationId?: number;
|
|
2345
|
-
callbackUrl?: string;
|
|
2346
|
-
authenticationTemplate?: string;
|
|
2347
|
-
}) => Promise<Response>;
|
|
2348
|
-
}
|
|
2349
1743
|
/**
|
|
2350
|
-
*
|
|
1744
|
+
* Domain utility functions for working with app identifiers and data normalization
|
|
2351
1745
|
*/
|
|
2352
|
-
declare const fetchPlugin: Plugin<GetSdkType<RequestPluginProvides>, // requires request in SDK
|
|
2353
|
-
{}, // requires no context (uses SDK methods)
|
|
2354
|
-
FetchPluginProvides>;
|
|
2355
|
-
type ZapierFetchInitOptions = RequestInit & {
|
|
2356
|
-
authenticationId?: number;
|
|
2357
|
-
callbackUrl?: string;
|
|
2358
|
-
authenticationTemplate?: string;
|
|
2359
|
-
};
|
|
2360
1746
|
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
1747
|
+
interface AppLocator {
|
|
1748
|
+
lookupAppKey: string;
|
|
1749
|
+
slug?: string;
|
|
1750
|
+
implementationName?: string;
|
|
1751
|
+
version?: string;
|
|
1752
|
+
}
|
|
1753
|
+
interface ResolvedAppLocator extends AppLocator {
|
|
1754
|
+
implementationName: string;
|
|
1755
|
+
}
|
|
2369
1756
|
|
|
1757
|
+
declare const DEFAULT_CONFIG_PATH: ".zapierrc";
|
|
2370
1758
|
type ManifestEntry = {
|
|
2371
1759
|
implementationName: string;
|
|
2372
1760
|
version?: string;
|
|
2373
1761
|
};
|
|
2374
|
-
type GetManifestEntry = (appKey: string) => ManifestEntry | null;
|
|
2375
1762
|
type GetVersionedImplementationId = (appKey: string) => Promise<string | null>;
|
|
2376
|
-
type GetImplementation = (appKey: string) => Promise<AppItem | null>;
|
|
2377
1763
|
type Manifest = {
|
|
2378
1764
|
apps: Record<string, ManifestEntry>;
|
|
2379
1765
|
};
|
|
1766
|
+
type ResolveAppKeys = ({ appKeys, }: {
|
|
1767
|
+
appKeys: string[];
|
|
1768
|
+
}) => Promise<ResolvedAppLocator[]>;
|
|
2380
1769
|
declare const ManifestPluginOptionsSchema: z.ZodObject<{
|
|
2381
1770
|
manifestPath: z.ZodOptional<z.ZodString>;
|
|
2382
1771
|
manifest: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -2407,63 +1796,44 @@ type ManifestPluginOptions = z.infer<typeof ManifestPluginOptionsSchema>;
|
|
|
2407
1796
|
interface ManifestPluginProvides {
|
|
2408
1797
|
context: {
|
|
2409
1798
|
getVersionedImplementationId: GetVersionedImplementationId;
|
|
2410
|
-
|
|
2411
|
-
|
|
1799
|
+
resolveAppKeys: ResolveAppKeys;
|
|
1800
|
+
updateManifestEntry: (appKey: string, entry: ManifestEntry, configPath?: string) => Promise<[string, ManifestEntry]>;
|
|
2412
1801
|
};
|
|
2413
1802
|
}
|
|
2414
1803
|
/**
|
|
2415
|
-
*
|
|
2416
|
-
* Supports local files (Node.js
|
|
1804
|
+
* Read manifest from a file path asynchronously
|
|
1805
|
+
* Supports local files (Node.js) and browser environments (fallback to global filesystem)
|
|
1806
|
+
*/
|
|
1807
|
+
declare function readManifestFromFile(filePath: string): Promise<Manifest | null>;
|
|
1808
|
+
/**
|
|
1809
|
+
* Get the preferred key for storing an app in the manifest
|
|
1810
|
+
* Extracted from plugin to make it easier to test
|
|
2417
1811
|
*/
|
|
2418
|
-
declare function
|
|
2419
|
-
|
|
1812
|
+
declare function getPreferredManifestEntryKey({ appKey, api, }: {
|
|
1813
|
+
appKey: string;
|
|
2420
1814
|
api: ApiClient;
|
|
2421
|
-
}
|
|
1815
|
+
}): Promise<string>;
|
|
1816
|
+
/**
|
|
1817
|
+
* Find a manifest entry by any app key (implementation name, slug, etc.).
|
|
1818
|
+
*/
|
|
1819
|
+
declare function findManifestEntry({ appKey, manifest, }: {
|
|
1820
|
+
appKey: string;
|
|
1821
|
+
manifest: Manifest;
|
|
1822
|
+
}): [string, ManifestEntry] | null;
|
|
2422
1823
|
|
|
2423
|
-
|
|
2424
|
-
getApp: (options: GetAppOptions) => Promise<{
|
|
2425
|
-
data: AppItem;
|
|
2426
|
-
}>;
|
|
2427
|
-
context: {
|
|
2428
|
-
meta: {
|
|
2429
|
-
getApp: {
|
|
2430
|
-
inputSchema: typeof GetAppSchema;
|
|
2431
|
-
};
|
|
2432
|
-
};
|
|
2433
|
-
};
|
|
2434
|
-
}
|
|
2435
|
-
declare const getAppPlugin: Plugin<GetSdkType<ManifestPluginProvides>, // depends on manifest plugin with getImplementation in context
|
|
1824
|
+
declare const manifestPlugin: Plugin<{}, // no SDK dependencies
|
|
2436
1825
|
{
|
|
2437
|
-
|
|
2438
|
-
},
|
|
2439
|
-
GetAppPluginProvides>;
|
|
2440
|
-
|
|
2441
|
-
declare const ListActionsSchema: z.ZodObject<{
|
|
2442
|
-
appKey: z.ZodString;
|
|
2443
|
-
actionType: z.ZodOptional<z.ZodEnum<["read", "read_bulk", "write", "run", "search", "search_or_write", "search_and_write", "filter"]>>;
|
|
2444
|
-
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
2445
|
-
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
2446
|
-
}, "strip", z.ZodTypeAny, {
|
|
2447
|
-
appKey: string;
|
|
2448
|
-
actionType?: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write" | undefined;
|
|
2449
|
-
pageSize?: number | undefined;
|
|
2450
|
-
maxItems?: number | undefined;
|
|
2451
|
-
}, {
|
|
2452
|
-
appKey: string;
|
|
2453
|
-
actionType?: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write" | undefined;
|
|
2454
|
-
pageSize?: number | undefined;
|
|
2455
|
-
maxItems?: number | undefined;
|
|
2456
|
-
}>;
|
|
2457
|
-
type ListActionsOptions = z.infer<typeof ListActionsSchema>;
|
|
1826
|
+
api: ApiClient;
|
|
1827
|
+
}, ManifestPluginProvides>;
|
|
2458
1828
|
|
|
2459
1829
|
interface ListActionsPluginProvides {
|
|
2460
1830
|
listActions: (options?: ListActionsOptions) => Promise<{
|
|
2461
|
-
data: ActionItem[];
|
|
1831
|
+
data: ActionItem$1[];
|
|
2462
1832
|
}> & AsyncIterable<{
|
|
2463
|
-
data: ActionItem[];
|
|
1833
|
+
data: ActionItem$1[];
|
|
2464
1834
|
nextCursor?: string;
|
|
2465
1835
|
}> & {
|
|
2466
|
-
items(): AsyncIterable<ActionItem>;
|
|
1836
|
+
items(): AsyncIterable<ActionItem$1>;
|
|
2467
1837
|
};
|
|
2468
1838
|
context: {
|
|
2469
1839
|
meta: {
|
|
@@ -2473,31 +1843,14 @@ interface ListActionsPluginProvides {
|
|
|
2473
1843
|
};
|
|
2474
1844
|
};
|
|
2475
1845
|
}
|
|
2476
|
-
declare const listActionsPlugin: Plugin<GetSdkType<ManifestPluginProvides>,
|
|
2477
|
-
{
|
|
1846
|
+
declare const listActionsPlugin: Plugin<GetSdkType<ManifestPluginProvides>, {
|
|
2478
1847
|
api: ApiClient;
|
|
2479
1848
|
getVersionedImplementationId: GetVersionedImplementationId;
|
|
2480
|
-
},
|
|
2481
|
-
ListActionsPluginProvides>;
|
|
2482
|
-
|
|
2483
|
-
declare const GetActionSchema: z.ZodObject<{
|
|
2484
|
-
appKey: z.ZodString;
|
|
2485
|
-
actionType: z.ZodEnum<["read", "read_bulk", "write", "run", "search", "search_or_write", "search_and_write", "filter"]>;
|
|
2486
|
-
actionKey: z.ZodString;
|
|
2487
|
-
}, "strip", z.ZodTypeAny, {
|
|
2488
|
-
appKey: string;
|
|
2489
|
-
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
2490
|
-
actionKey: string;
|
|
2491
|
-
}, {
|
|
2492
|
-
appKey: string;
|
|
2493
|
-
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
2494
|
-
actionKey: string;
|
|
2495
|
-
}>;
|
|
2496
|
-
type GetActionOptions = z.infer<typeof GetActionSchema>;
|
|
1849
|
+
}, ListActionsPluginProvides>;
|
|
2497
1850
|
|
|
2498
1851
|
interface GetActionPluginProvides {
|
|
2499
1852
|
getAction: (options: GetActionOptions) => Promise<{
|
|
2500
|
-
data: ActionItem;
|
|
1853
|
+
data: ActionItem$1;
|
|
2501
1854
|
}>;
|
|
2502
1855
|
context: {
|
|
2503
1856
|
meta: {
|
|
@@ -2513,32 +1866,78 @@ declare const getActionPlugin: Plugin<GetSdkType<ListActionsPluginProvides>, //
|
|
|
2513
1866
|
}, // requires api in context
|
|
2514
1867
|
GetActionPluginProvides>;
|
|
2515
1868
|
|
|
2516
|
-
declare const
|
|
2517
|
-
appKey: z.ZodString
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
1869
|
+
declare const GetAppSchema: z.ZodObject<{
|
|
1870
|
+
appKey: z.ZodString & {
|
|
1871
|
+
_def: z.ZodStringDef & PositionalMetadata;
|
|
1872
|
+
};
|
|
1873
|
+
}, "strip", z.ZodTypeAny, {
|
|
1874
|
+
appKey: string;
|
|
1875
|
+
}, {
|
|
1876
|
+
appKey: string;
|
|
1877
|
+
}>;
|
|
1878
|
+
type GetAppOptions = z.infer<typeof GetAppSchema>;
|
|
1879
|
+
|
|
1880
|
+
declare const ListAppsSchema: z.ZodObject<{
|
|
1881
|
+
appKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1882
|
+
search: z.ZodOptional<z.ZodString>;
|
|
2522
1883
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
2523
1884
|
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
2524
1885
|
}, "strip", z.ZodTypeAny, {
|
|
2525
|
-
|
|
2526
|
-
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
2527
|
-
actionKey: string;
|
|
2528
|
-
authenticationId?: number | null | undefined;
|
|
2529
|
-
inputs?: Record<string, unknown> | undefined;
|
|
1886
|
+
search?: string | undefined;
|
|
2530
1887
|
pageSize?: number | undefined;
|
|
2531
1888
|
maxItems?: number | undefined;
|
|
1889
|
+
appKeys?: string[] | undefined;
|
|
2532
1890
|
}, {
|
|
2533
|
-
|
|
2534
|
-
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
2535
|
-
actionKey: string;
|
|
2536
|
-
authenticationId?: number | null | undefined;
|
|
2537
|
-
inputs?: Record<string, unknown> | undefined;
|
|
1891
|
+
search?: string | undefined;
|
|
2538
1892
|
pageSize?: number | undefined;
|
|
2539
1893
|
maxItems?: number | undefined;
|
|
1894
|
+
appKeys?: string[] | undefined;
|
|
2540
1895
|
}>;
|
|
2541
|
-
type
|
|
1896
|
+
type ListAppsOptions = z.infer<typeof ListAppsSchema>;
|
|
1897
|
+
|
|
1898
|
+
interface ApiPluginOptions extends BaseSdkOptions {
|
|
1899
|
+
}
|
|
1900
|
+
interface ApiPluginProvides {
|
|
1901
|
+
context: {
|
|
1902
|
+
api: ApiClient;
|
|
1903
|
+
};
|
|
1904
|
+
}
|
|
1905
|
+
declare const apiPlugin: Plugin<{}, // no SDK dependencies
|
|
1906
|
+
{}, // requires no context
|
|
1907
|
+
ApiPluginProvides>;
|
|
1908
|
+
|
|
1909
|
+
interface ListAppsPluginProvides {
|
|
1910
|
+
listApps: (options?: ListAppsOptions) => Promise<{
|
|
1911
|
+
data: AppItem[];
|
|
1912
|
+
}> & AsyncIterable<{
|
|
1913
|
+
data: AppItem[];
|
|
1914
|
+
nextCursor?: string;
|
|
1915
|
+
}> & {
|
|
1916
|
+
items(): AsyncIterable<AppItem>;
|
|
1917
|
+
};
|
|
1918
|
+
context: {
|
|
1919
|
+
meta: {
|
|
1920
|
+
listApps: {
|
|
1921
|
+
inputSchema: typeof ListAppsSchema;
|
|
1922
|
+
};
|
|
1923
|
+
};
|
|
1924
|
+
};
|
|
1925
|
+
}
|
|
1926
|
+
declare const listAppsPlugin: Plugin<{}, GetContextType<ApiPluginProvides & ManifestPluginProvides>, ListAppsPluginProvides>;
|
|
1927
|
+
|
|
1928
|
+
interface GetAppPluginProvides {
|
|
1929
|
+
getApp: (options: GetAppOptions) => Promise<{
|
|
1930
|
+
data: AppItem;
|
|
1931
|
+
}>;
|
|
1932
|
+
context: {
|
|
1933
|
+
meta: {
|
|
1934
|
+
getApp: {
|
|
1935
|
+
inputSchema: typeof GetAppSchema;
|
|
1936
|
+
};
|
|
1937
|
+
};
|
|
1938
|
+
};
|
|
1939
|
+
}
|
|
1940
|
+
declare const getAppPlugin: Plugin<GetSdkType<ListAppsPluginProvides>, {}, GetAppPluginProvides>;
|
|
2542
1941
|
|
|
2543
1942
|
interface RunActionPluginProvides {
|
|
2544
1943
|
runAction: (options?: RunActionOptions) => Promise<{
|
|
@@ -2564,8 +1963,21 @@ declare const runActionPlugin: Plugin<GetSdkType<GetActionPluginProvides & GetAp
|
|
|
2564
1963
|
}, // requires api in context
|
|
2565
1964
|
RunActionPluginProvides>;
|
|
2566
1965
|
|
|
1966
|
+
interface AppsPluginProvides {
|
|
1967
|
+
apps: ActionProxy;
|
|
1968
|
+
}
|
|
1969
|
+
declare const appsPlugin: Plugin<GetSdkType<FetchPluginProvides & RunActionPluginProvides>, // requires fetch + runAction in SDK
|
|
1970
|
+
{}, // no context requirements
|
|
1971
|
+
AppsPluginProvides>;
|
|
1972
|
+
|
|
1973
|
+
interface ZapierSdkApps {
|
|
1974
|
+
}
|
|
1975
|
+
|
|
2567
1976
|
declare const ListAuthenticationsSchema: z.ZodObject<{
|
|
2568
|
-
appKey: z.ZodOptional<z.ZodString
|
|
1977
|
+
appKey: z.ZodOptional<z.ZodString & {
|
|
1978
|
+
_def: z.ZodStringDef & PositionalMetadata;
|
|
1979
|
+
}>;
|
|
1980
|
+
authenticationIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2569
1981
|
search: z.ZodOptional<z.ZodString>;
|
|
2570
1982
|
title: z.ZodOptional<z.ZodString>;
|
|
2571
1983
|
accountId: z.ZodOptional<z.ZodString>;
|
|
@@ -2573,21 +1985,23 @@ declare const ListAuthenticationsSchema: z.ZodObject<{
|
|
|
2573
1985
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
2574
1986
|
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
2575
1987
|
}, "strip", z.ZodTypeAny, {
|
|
2576
|
-
title?: string | undefined;
|
|
2577
1988
|
search?: string | undefined;
|
|
1989
|
+
title?: string | undefined;
|
|
2578
1990
|
appKey?: string | undefined;
|
|
2579
1991
|
pageSize?: number | undefined;
|
|
2580
1992
|
maxItems?: number | undefined;
|
|
2581
1993
|
accountId?: string | undefined;
|
|
2582
1994
|
owner?: string | undefined;
|
|
1995
|
+
authenticationIds?: string[] | undefined;
|
|
2583
1996
|
}, {
|
|
2584
|
-
title?: string | undefined;
|
|
2585
1997
|
search?: string | undefined;
|
|
1998
|
+
title?: string | undefined;
|
|
2586
1999
|
appKey?: string | undefined;
|
|
2587
2000
|
pageSize?: number | undefined;
|
|
2588
2001
|
maxItems?: number | undefined;
|
|
2589
2002
|
accountId?: string | undefined;
|
|
2590
2003
|
owner?: string | undefined;
|
|
2004
|
+
authenticationIds?: string[] | undefined;
|
|
2591
2005
|
}>;
|
|
2592
2006
|
type ListAuthenticationsOptions = z.infer<typeof ListAuthenticationsSchema>;
|
|
2593
2007
|
|
|
@@ -2608,12 +2022,10 @@ interface ListAuthenticationsPluginProvides {
|
|
|
2608
2022
|
};
|
|
2609
2023
|
};
|
|
2610
2024
|
}
|
|
2611
|
-
declare const listAuthenticationsPlugin: Plugin<GetSdkType<ManifestPluginProvides>,
|
|
2612
|
-
{
|
|
2025
|
+
declare const listAuthenticationsPlugin: Plugin<GetSdkType<ManifestPluginProvides>, {
|
|
2613
2026
|
api: ApiClient;
|
|
2614
2027
|
getVersionedImplementationId: GetVersionedImplementationId;
|
|
2615
|
-
},
|
|
2616
|
-
ListAuthenticationsPluginProvides>;
|
|
2028
|
+
}, ListAuthenticationsPluginProvides>;
|
|
2617
2029
|
|
|
2618
2030
|
interface GetAuthenticationPluginProvides {
|
|
2619
2031
|
getAuthentication: (options: GetAuthenticationOptions) => Promise<{
|
|
@@ -2635,7 +2047,7 @@ GetAuthenticationPluginProvides>;
|
|
|
2635
2047
|
|
|
2636
2048
|
interface FindFirstAuthenticationPluginProvides {
|
|
2637
2049
|
findFirstAuthentication: (options?: FindFirstAuthenticationOptions) => Promise<{
|
|
2638
|
-
data: AuthenticationItem
|
|
2050
|
+
data: AuthenticationItem;
|
|
2639
2051
|
}>;
|
|
2640
2052
|
context: {
|
|
2641
2053
|
meta: {
|
|
@@ -2689,19 +2101,89 @@ declare const listInputFieldsPlugin: Plugin<GetSdkType<GetAppPluginProvides>, //
|
|
|
2689
2101
|
}, // requires api and getVersionedImplementationId in context
|
|
2690
2102
|
ListInputFieldsPluginProvides>;
|
|
2691
2103
|
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2104
|
+
declare const InputFieldChoiceItemSchema: z.ZodObject<{
|
|
2105
|
+
key: z.ZodOptional<z.ZodString>;
|
|
2106
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2107
|
+
sample: z.ZodOptional<z.ZodString>;
|
|
2108
|
+
value: z.ZodOptional<z.ZodString>;
|
|
2109
|
+
}, "strip", z.ZodTypeAny, {
|
|
2110
|
+
value?: string | undefined;
|
|
2111
|
+
key?: string | undefined;
|
|
2112
|
+
label?: string | undefined;
|
|
2113
|
+
sample?: string | undefined;
|
|
2114
|
+
}, {
|
|
2115
|
+
value?: string | undefined;
|
|
2116
|
+
key?: string | undefined;
|
|
2117
|
+
label?: string | undefined;
|
|
2118
|
+
sample?: string | undefined;
|
|
2119
|
+
}>;
|
|
2120
|
+
type InputFieldChoiceItem = z.infer<typeof InputFieldChoiceItemSchema>;
|
|
2121
|
+
declare const ListInputFieldChoicesSchema: z.ZodObject<{
|
|
2122
|
+
appKey: z.ZodString & {
|
|
2123
|
+
_def: z.ZodStringDef & PositionalMetadata;
|
|
2124
|
+
};
|
|
2125
|
+
actionType: z.ZodEnum<["read", "read_bulk", "write", "run", "search", "search_or_write", "search_and_write", "filter"]>;
|
|
2126
|
+
actionKey: z.ZodString;
|
|
2127
|
+
inputFieldKey: z.ZodString;
|
|
2128
|
+
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2129
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2130
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
2131
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
2132
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
2133
|
+
}, "strip", z.ZodTypeAny, {
|
|
2134
|
+
appKey: string;
|
|
2135
|
+
actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
|
|
2136
|
+
actionKey: string;
|
|
2137
|
+
inputFieldKey: string;
|
|
2138
|
+
page?: number | undefined;
|
|
2139
|
+
authenticationId?: number | null | undefined;
|
|
2140
|
+
inputs?: Record<string, unknown> | undefined;
|
|
2141
|
+
pageSize?: number | undefined;
|
|
2142
|
+
maxItems?: number | undefined;
|
|
2143
|
+
}, {
|
|
2144
|
+
appKey: string;
|
|
2145
|
+
actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
|
|
2146
|
+
actionKey: string;
|
|
2147
|
+
inputFieldKey: string;
|
|
2148
|
+
page?: number | undefined;
|
|
2149
|
+
authenticationId?: number | null | undefined;
|
|
2150
|
+
inputs?: Record<string, unknown> | undefined;
|
|
2151
|
+
pageSize?: number | undefined;
|
|
2152
|
+
maxItems?: number | undefined;
|
|
2153
|
+
}>;
|
|
2154
|
+
type ListInputFieldChoicesOptions = z.infer<typeof ListInputFieldChoicesSchema>;
|
|
2155
|
+
|
|
2156
|
+
interface ListInputFieldChoicesPluginProvides {
|
|
2157
|
+
listInputFieldChoices: (options: ListInputFieldChoicesOptions) => Promise<{
|
|
2158
|
+
data: InputFieldChoiceItem[];
|
|
2159
|
+
}> & AsyncIterable<{
|
|
2160
|
+
data: InputFieldChoiceItem[];
|
|
2161
|
+
nextCursor?: string;
|
|
2162
|
+
}> & {
|
|
2163
|
+
items(): AsyncIterable<InputFieldChoiceItem>;
|
|
2164
|
+
};
|
|
2165
|
+
context: {
|
|
2166
|
+
meta: {
|
|
2167
|
+
listInputFieldChoices: {
|
|
2168
|
+
inputSchema: typeof ListInputFieldChoicesSchema;
|
|
2169
|
+
};
|
|
2170
|
+
};
|
|
2171
|
+
};
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
/**
|
|
2175
|
+
* SDK-related types and interfaces
|
|
2176
|
+
*/
|
|
2177
|
+
|
|
2178
|
+
interface BaseSdkOptions {
|
|
2179
|
+
token?: string;
|
|
2180
|
+
getToken?: () => Promise<string | undefined>;
|
|
2181
|
+
onEvent?: EventCallback;
|
|
2182
|
+
fetch?: typeof fetch;
|
|
2183
|
+
baseUrl?: string;
|
|
2184
|
+
debug?: boolean;
|
|
2185
|
+
manifestPath?: string;
|
|
2186
|
+
manifest?: {
|
|
2705
2187
|
apps: {
|
|
2706
2188
|
[appKey: string]: {
|
|
2707
2189
|
implementationName: string;
|
|
@@ -2713,168 +2195,905 @@ interface BaseSdkOptions {
|
|
|
2713
2195
|
|
|
2714
2196
|
interface FunctionRegistryEntry {
|
|
2715
2197
|
name: string;
|
|
2198
|
+
type?: "list" | "item";
|
|
2199
|
+
itemType?: string;
|
|
2200
|
+
returnType?: string;
|
|
2716
2201
|
inputSchema: z.ZodSchema;
|
|
2202
|
+
outputSchema?: z.ZodSchema;
|
|
2717
2203
|
categories: string[];
|
|
2204
|
+
resolvers?: Record<string, any>;
|
|
2718
2205
|
}
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
/**
|
|
2722
|
-
* ------------------------------
|
|
2723
|
-
* Plugin Type System with Explicit Context Dependencies
|
|
2724
|
-
* ------------------------------
|
|
2725
|
-
*
|
|
2726
|
-
* This system makes context dependencies explicit to restore TypeScript's
|
|
2727
|
-
* ability to catch missing context at compile time.
|
|
2728
|
-
*/
|
|
2729
|
-
|
|
2730
|
-
interface PluginDependencies<TSdk = {}, TContext = {}> {
|
|
2731
|
-
sdk: TSdk;
|
|
2732
|
-
context: TContext;
|
|
2733
|
-
}
|
|
2734
|
-
interface PluginProvides extends Record<string, any> {
|
|
2735
|
-
context?: Record<string, any>;
|
|
2736
|
-
}
|
|
2737
|
-
interface PluginMeta {
|
|
2738
|
-
categories: string[];
|
|
2739
|
-
inputSchema: z.ZodSchema;
|
|
2740
|
-
[key: string]: any;
|
|
2741
|
-
}
|
|
2742
|
-
type ExtractSdkProperties<T extends Record<string, any>> = Omit<T, "context">;
|
|
2743
|
-
type ExtractContextProperties<T extends PluginProvides> = T["context"];
|
|
2744
|
-
type GetSdkType<TPluginProvides extends PluginProvides> = ExtractSdkProperties<TPluginProvides> & {
|
|
2745
|
-
getContext(): NonNullable<ExtractContextProperties<TPluginProvides>>;
|
|
2746
|
-
};
|
|
2747
|
-
type PluginOptions<TSdk = {}, TContext = {}> = {
|
|
2748
|
-
sdk: TSdk;
|
|
2749
|
-
context: TContext & {
|
|
2750
|
-
meta: Record<string, any>;
|
|
2751
|
-
};
|
|
2752
|
-
};
|
|
2753
|
-
/**
|
|
2754
|
-
* Plugin interface — now has 3 type params:
|
|
2755
|
-
*
|
|
2756
|
-
* TRequiresContext = what this plugin *needs* in context
|
|
2757
|
-
* TProvides = what this plugin *returns* (sdk + context)
|
|
2758
|
-
* TSdk = current sdk shape when plugin runs
|
|
2759
|
-
*/
|
|
2760
|
-
interface Plugin<TSdk = {}, TRequiresContext = {}, TProvides extends PluginProvides = PluginProvides> {
|
|
2761
|
-
(params: {
|
|
2762
|
-
sdk: TSdk;
|
|
2763
|
-
context: TRequiresContext & {
|
|
2764
|
-
meta: Record<string, PluginMeta>;
|
|
2765
|
-
options: BaseSdkOptions;
|
|
2766
|
-
};
|
|
2767
|
-
}): TProvides;
|
|
2206
|
+
interface ZapierSdk extends GetSdkType<RegistryPluginProvides & FetchPluginProvides & AppsPluginProvides & ListAppsPluginProvides & ManifestPluginProvides & GetAppPluginProvides & ListActionsPluginProvides & GetActionPluginProvides & RunActionPluginProvides & ListAuthenticationsPluginProvides & GetAuthenticationPluginProvides & FindFirstAuthenticationPluginProvides & FindUniqueAuthenticationPluginProvides & ListInputFieldsPluginProvides & ListInputFieldChoicesPluginProvides & RequestPluginProvides & GetProfilePluginProvides> {
|
|
2207
|
+
apps: ActionProxy & ZapierSdkApps;
|
|
2768
2208
|
}
|
|
2769
|
-
type MissingContextKeys<TRequired, TCurrent> = TRequired extends Record<string, any> ? TCurrent extends Record<string, any> ? {
|
|
2770
|
-
[K in keyof TRequired]: K extends keyof TCurrent ? never : K;
|
|
2771
|
-
}[keyof TRequired] : keyof TRequired : never;
|
|
2772
|
-
type ContextError<TRequired, TCurrent> = MissingContextKeys<TRequired, TCurrent> extends never ? never : MissingContextKeys<TRequired, TCurrent> extends infer Missing ? Missing extends string ? `❌ Missing required context: { ${Missing}: any }` : Missing extends number ? `❌ Missing required context: { ${Missing}: any }` : `❌ Missing required context properties. Required: ${keyof TRequired extends string ? keyof TRequired : "unknown"}, Available: ${keyof TCurrent extends string ? keyof TCurrent : "unknown"}` : "❌ Context requirement not satisfied";
|
|
2773
|
-
/**
|
|
2774
|
-
* SDK interface — result of createSdk()
|
|
2775
|
-
*
|
|
2776
|
-
* addPlugin now enforces that TRequiresContext is assignable to TCurrentContext.
|
|
2777
|
-
* If not, TypeScript will emit a detailed error showing missing properties.
|
|
2778
|
-
*/
|
|
2779
|
-
type Sdk<TCurrentSdk = {}, TCurrentContext = {
|
|
2780
|
-
meta: Record<string, PluginMeta>;
|
|
2781
|
-
}> = TCurrentSdk & {
|
|
2782
|
-
addPlugin<TRequiresContext, TProvides extends PluginProvides>(plugin: Plugin<TCurrentSdk & {
|
|
2783
|
-
getContext(): TCurrentContext;
|
|
2784
|
-
}, TRequiresContext, TProvides>, options?: any): TCurrentContext extends TRequiresContext ? Sdk<TCurrentSdk & ExtractSdkProperties<TProvides>, TCurrentContext & NonNullable<ExtractContextProperties<TProvides>>> : ContextError<TRequiresContext, TCurrentContext>;
|
|
2785
|
-
getContext(): TCurrentContext;
|
|
2786
|
-
};
|
|
2787
2209
|
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2210
|
+
declare const InputFieldItemSchema: z.ZodObject<{
|
|
2211
|
+
key: z.ZodString;
|
|
2212
|
+
default_value: z.ZodString;
|
|
2213
|
+
depends_on: z.ZodArray<z.ZodString, "many">;
|
|
2214
|
+
description: z.ZodString;
|
|
2215
|
+
invalidates_input_fields: z.ZodBoolean;
|
|
2216
|
+
is_required: z.ZodBoolean;
|
|
2217
|
+
placeholder: z.ZodString;
|
|
2218
|
+
title: z.ZodString;
|
|
2219
|
+
value_type: z.ZodString;
|
|
2220
|
+
format: z.ZodOptional<z.ZodString>;
|
|
2221
|
+
items: z.ZodOptional<z.ZodObject<{
|
|
2222
|
+
type: z.ZodString;
|
|
2223
|
+
}, "strip", z.ZodTypeAny, {
|
|
2224
|
+
type: string;
|
|
2225
|
+
}, {
|
|
2226
|
+
type: string;
|
|
2227
|
+
}>>;
|
|
2228
|
+
}, "strip", z.ZodTypeAny, {
|
|
2229
|
+
key: string;
|
|
2230
|
+
depends_on: string[];
|
|
2231
|
+
placeholder: string;
|
|
2232
|
+
description: string;
|
|
2233
|
+
title: string;
|
|
2234
|
+
default_value: string;
|
|
2235
|
+
invalidates_input_fields: boolean;
|
|
2236
|
+
is_required: boolean;
|
|
2237
|
+
value_type: string;
|
|
2238
|
+
format?: string | undefined;
|
|
2239
|
+
items?: {
|
|
2240
|
+
type: string;
|
|
2241
|
+
} | undefined;
|
|
2242
|
+
}, {
|
|
2243
|
+
key: string;
|
|
2244
|
+
depends_on: string[];
|
|
2245
|
+
placeholder: string;
|
|
2246
|
+
description: string;
|
|
2247
|
+
title: string;
|
|
2248
|
+
default_value: string;
|
|
2249
|
+
invalidates_input_fields: boolean;
|
|
2250
|
+
is_required: boolean;
|
|
2251
|
+
value_type: string;
|
|
2252
|
+
format?: string | undefined;
|
|
2253
|
+
items?: {
|
|
2254
|
+
type: string;
|
|
2255
|
+
} | undefined;
|
|
2256
|
+
}>;
|
|
2257
|
+
type InputFieldItem$1 = z.infer<typeof InputFieldItemSchema>;
|
|
2794
2258
|
|
|
2795
|
-
interface
|
|
2259
|
+
interface PromptConfig {
|
|
2260
|
+
type: "list";
|
|
2261
|
+
name: string;
|
|
2262
|
+
message: string;
|
|
2263
|
+
choices: Array<{
|
|
2264
|
+
name: string;
|
|
2265
|
+
value: unknown;
|
|
2266
|
+
}>;
|
|
2796
2267
|
}
|
|
2797
|
-
interface
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
};
|
|
2268
|
+
interface Resolver {
|
|
2269
|
+
type: string;
|
|
2270
|
+
depends?: readonly string[] | string[];
|
|
2801
2271
|
}
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
interface InputsResolver {
|
|
2807
|
-
type: "fields";
|
|
2808
|
-
depends: readonly string[];
|
|
2809
|
-
fetch: (sdk: ZapierSdk, resolvedParams: Record<string, any>) => Promise<any[]>;
|
|
2272
|
+
interface StaticResolver extends Resolver {
|
|
2273
|
+
type: "static";
|
|
2274
|
+
inputType?: "text" | "password" | "email";
|
|
2275
|
+
placeholder?: string;
|
|
2810
2276
|
}
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
interface AuthenticationIdResolver {
|
|
2277
|
+
interface DynamicResolver<TItem = unknown, TParams = Record<string, unknown>> extends Resolver {
|
|
2814
2278
|
type: "dynamic";
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
prompt: (items: any[], params: Record<string, any>) => any;
|
|
2279
|
+
fetch: (sdk: ZapierSdk, resolvedParams: TParams) => Promise<TItem[]>;
|
|
2280
|
+
prompt: (items: TItem[], params: TParams) => PromptConfig;
|
|
2818
2281
|
}
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
type: "dynamic";
|
|
2823
|
-
depends: readonly string[];
|
|
2824
|
-
fetch: (sdk: ZapierSdk, resolvedParams: Record<string, any>) => Promise<any[]>;
|
|
2825
|
-
prompt: (items: any[], params: Record<string, any>) => any;
|
|
2282
|
+
interface FieldsResolver<TParams = Record<string, unknown>> extends Resolver {
|
|
2283
|
+
type: "fields";
|
|
2284
|
+
fetch: (sdk: ZapierSdk, resolvedParams: TParams) => Promise<InputFieldItem$1[]>;
|
|
2826
2285
|
}
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
depends: readonly string[];
|
|
2832
|
-
fetch: (sdk: ZapierSdk, resolvedParams: Record<string, any>) => Promise<any[]>;
|
|
2833
|
-
prompt: (items: any[], params: Record<string, any>) => any;
|
|
2286
|
+
interface PositionalMetadata {
|
|
2287
|
+
positionalMeta: {
|
|
2288
|
+
positional: true;
|
|
2289
|
+
};
|
|
2834
2290
|
}
|
|
2835
|
-
declare
|
|
2291
|
+
declare function isPositional(schema: z.ZodType): boolean;
|
|
2836
2292
|
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2293
|
+
declare const AppItemSchema: z.ZodObject<Omit<{
|
|
2294
|
+
id: z.ZodString;
|
|
2295
|
+
name: z.ZodString;
|
|
2296
|
+
slug: z.ZodString;
|
|
2297
|
+
age_in_days: z.ZodOptional<z.ZodNumber>;
|
|
2298
|
+
auth_type: z.ZodOptional<z.ZodString>;
|
|
2299
|
+
banner: z.ZodOptional<z.ZodString>;
|
|
2300
|
+
categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2301
|
+
id: z.ZodNumber;
|
|
2302
|
+
name: z.ZodString;
|
|
2303
|
+
slug: z.ZodString;
|
|
2304
|
+
}, "strip", z.ZodTypeAny, {
|
|
2305
|
+
id: number;
|
|
2306
|
+
name: string;
|
|
2307
|
+
slug: string;
|
|
2308
|
+
}, {
|
|
2309
|
+
id: number;
|
|
2310
|
+
name: string;
|
|
2311
|
+
slug: string;
|
|
2312
|
+
}>, "many">>;
|
|
2313
|
+
images: z.ZodOptional<z.ZodObject<{
|
|
2314
|
+
url_16x16: z.ZodOptional<z.ZodString>;
|
|
2315
|
+
url_32x32: z.ZodOptional<z.ZodString>;
|
|
2316
|
+
url_64x64: z.ZodOptional<z.ZodString>;
|
|
2317
|
+
url_128x128: z.ZodOptional<z.ZodString>;
|
|
2318
|
+
}, "strip", z.ZodTypeAny, {
|
|
2319
|
+
url_16x16?: string | undefined;
|
|
2320
|
+
url_32x32?: string | undefined;
|
|
2321
|
+
url_64x64?: string | undefined;
|
|
2322
|
+
url_128x128?: string | undefined;
|
|
2323
|
+
}, {
|
|
2324
|
+
url_16x16?: string | undefined;
|
|
2325
|
+
url_32x32?: string | undefined;
|
|
2326
|
+
url_64x64?: string | undefined;
|
|
2327
|
+
url_128x128?: string | undefined;
|
|
2328
|
+
}>>;
|
|
2329
|
+
popularity: z.ZodOptional<z.ZodNumber>;
|
|
2330
|
+
has_filters: z.ZodOptional<z.ZodBoolean>;
|
|
2331
|
+
has_reads: z.ZodOptional<z.ZodBoolean>;
|
|
2332
|
+
has_searches: z.ZodOptional<z.ZodBoolean>;
|
|
2333
|
+
has_searches_or_writes: z.ZodOptional<z.ZodBoolean>;
|
|
2334
|
+
has_upfront_fields: z.ZodOptional<z.ZodBoolean>;
|
|
2335
|
+
has_writes: z.ZodOptional<z.ZodBoolean>;
|
|
2336
|
+
is_beta: z.ZodOptional<z.ZodBoolean>;
|
|
2337
|
+
is_built_in: z.ZodOptional<z.ZodBoolean>;
|
|
2338
|
+
is_deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
2339
|
+
is_featured: z.ZodOptional<z.ZodBoolean>;
|
|
2340
|
+
is_hidden: z.ZodOptional<z.ZodBoolean>;
|
|
2341
|
+
is_invite: z.ZodOptional<z.ZodBoolean>;
|
|
2342
|
+
is_premium: z.ZodOptional<z.ZodBoolean>;
|
|
2343
|
+
is_public: z.ZodOptional<z.ZodBoolean>;
|
|
2344
|
+
is_upcoming: z.ZodOptional<z.ZodBoolean>;
|
|
2345
|
+
version: z.ZodOptional<z.ZodString>;
|
|
2346
|
+
visibility: z.ZodOptional<z.ZodString>;
|
|
2347
|
+
actions: z.ZodOptional<z.ZodObject<{
|
|
2348
|
+
read: z.ZodOptional<z.ZodNumber>;
|
|
2349
|
+
read_bulk: z.ZodOptional<z.ZodNumber>;
|
|
2350
|
+
write: z.ZodOptional<z.ZodNumber>;
|
|
2351
|
+
search: z.ZodOptional<z.ZodNumber>;
|
|
2352
|
+
search_or_write: z.ZodOptional<z.ZodNumber>;
|
|
2353
|
+
search_and_write: z.ZodOptional<z.ZodNumber>;
|
|
2354
|
+
filter: z.ZodOptional<z.ZodNumber>;
|
|
2355
|
+
}, "strip", z.ZodTypeAny, {
|
|
2356
|
+
filter?: number | undefined;
|
|
2357
|
+
read?: number | undefined;
|
|
2358
|
+
read_bulk?: number | undefined;
|
|
2359
|
+
write?: number | undefined;
|
|
2360
|
+
search?: number | undefined;
|
|
2361
|
+
search_or_write?: number | undefined;
|
|
2362
|
+
search_and_write?: number | undefined;
|
|
2363
|
+
}, {
|
|
2364
|
+
filter?: number | undefined;
|
|
2365
|
+
read?: number | undefined;
|
|
2366
|
+
read_bulk?: number | undefined;
|
|
2367
|
+
write?: number | undefined;
|
|
2368
|
+
search?: number | undefined;
|
|
2369
|
+
search_or_write?: number | undefined;
|
|
2370
|
+
search_and_write?: number | undefined;
|
|
2371
|
+
}>>;
|
|
2372
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2373
|
+
primary_color: z.ZodOptional<z.ZodString>;
|
|
2374
|
+
secondary_color: z.ZodOptional<z.ZodString>;
|
|
2375
|
+
classification: z.ZodOptional<z.ZodString>;
|
|
2376
|
+
api_docs_url: z.ZodOptional<z.ZodString>;
|
|
2377
|
+
image: z.ZodOptional<z.ZodString>;
|
|
2378
|
+
}, "id" | "name"> & {
|
|
2379
|
+
title: z.ZodString;
|
|
2380
|
+
key: z.ZodString;
|
|
2381
|
+
implementation_id: z.ZodString;
|
|
2382
|
+
}, "strip", z.ZodTypeAny, {
|
|
2383
|
+
key: string;
|
|
2384
|
+
title: string;
|
|
2385
|
+
slug: string;
|
|
2386
|
+
implementation_id: string;
|
|
2387
|
+
description?: string | undefined;
|
|
2388
|
+
is_hidden?: boolean | undefined;
|
|
2389
|
+
age_in_days?: number | undefined;
|
|
2390
|
+
api_docs_url?: string | undefined;
|
|
2391
|
+
banner?: string | undefined;
|
|
2392
|
+
categories?: {
|
|
2393
|
+
id: number;
|
|
2394
|
+
name: string;
|
|
2395
|
+
slug: string;
|
|
2396
|
+
}[] | undefined;
|
|
2397
|
+
image?: string | undefined;
|
|
2398
|
+
images?: {
|
|
2399
|
+
url_16x16?: string | undefined;
|
|
2400
|
+
url_32x32?: string | undefined;
|
|
2401
|
+
url_64x64?: string | undefined;
|
|
2402
|
+
url_128x128?: string | undefined;
|
|
2403
|
+
} | undefined;
|
|
2404
|
+
is_beta?: boolean | undefined;
|
|
2405
|
+
is_built_in?: boolean | undefined;
|
|
2406
|
+
is_featured?: boolean | undefined;
|
|
2407
|
+
is_premium?: boolean | undefined;
|
|
2408
|
+
is_public?: boolean | undefined;
|
|
2409
|
+
is_upcoming?: boolean | undefined;
|
|
2410
|
+
popularity?: number | undefined;
|
|
2411
|
+
primary_color?: string | undefined;
|
|
2412
|
+
auth_type?: string | undefined;
|
|
2413
|
+
actions?: {
|
|
2414
|
+
filter?: number | undefined;
|
|
2415
|
+
read?: number | undefined;
|
|
2416
|
+
read_bulk?: number | undefined;
|
|
2417
|
+
write?: number | undefined;
|
|
2418
|
+
search?: number | undefined;
|
|
2419
|
+
search_or_write?: number | undefined;
|
|
2420
|
+
search_and_write?: number | undefined;
|
|
2421
|
+
} | undefined;
|
|
2422
|
+
is_deprecated?: boolean | undefined;
|
|
2423
|
+
secondary_color?: string | undefined;
|
|
2424
|
+
has_filters?: boolean | undefined;
|
|
2425
|
+
has_reads?: boolean | undefined;
|
|
2426
|
+
has_searches?: boolean | undefined;
|
|
2427
|
+
has_searches_or_writes?: boolean | undefined;
|
|
2428
|
+
has_upfront_fields?: boolean | undefined;
|
|
2429
|
+
has_writes?: boolean | undefined;
|
|
2430
|
+
is_invite?: boolean | undefined;
|
|
2431
|
+
version?: string | undefined;
|
|
2432
|
+
visibility?: string | undefined;
|
|
2433
|
+
classification?: string | undefined;
|
|
2434
|
+
}, {
|
|
2435
|
+
key: string;
|
|
2436
|
+
title: string;
|
|
2437
|
+
slug: string;
|
|
2438
|
+
implementation_id: string;
|
|
2439
|
+
description?: string | undefined;
|
|
2440
|
+
is_hidden?: boolean | undefined;
|
|
2441
|
+
age_in_days?: number | undefined;
|
|
2442
|
+
api_docs_url?: string | undefined;
|
|
2443
|
+
banner?: string | undefined;
|
|
2444
|
+
categories?: {
|
|
2445
|
+
id: number;
|
|
2446
|
+
name: string;
|
|
2447
|
+
slug: string;
|
|
2448
|
+
}[] | undefined;
|
|
2449
|
+
image?: string | undefined;
|
|
2450
|
+
images?: {
|
|
2451
|
+
url_16x16?: string | undefined;
|
|
2452
|
+
url_32x32?: string | undefined;
|
|
2453
|
+
url_64x64?: string | undefined;
|
|
2454
|
+
url_128x128?: string | undefined;
|
|
2455
|
+
} | undefined;
|
|
2456
|
+
is_beta?: boolean | undefined;
|
|
2457
|
+
is_built_in?: boolean | undefined;
|
|
2458
|
+
is_featured?: boolean | undefined;
|
|
2459
|
+
is_premium?: boolean | undefined;
|
|
2460
|
+
is_public?: boolean | undefined;
|
|
2461
|
+
is_upcoming?: boolean | undefined;
|
|
2462
|
+
popularity?: number | undefined;
|
|
2463
|
+
primary_color?: string | undefined;
|
|
2464
|
+
auth_type?: string | undefined;
|
|
2465
|
+
actions?: {
|
|
2466
|
+
filter?: number | undefined;
|
|
2467
|
+
read?: number | undefined;
|
|
2468
|
+
read_bulk?: number | undefined;
|
|
2469
|
+
write?: number | undefined;
|
|
2470
|
+
search?: number | undefined;
|
|
2471
|
+
search_or_write?: number | undefined;
|
|
2472
|
+
search_and_write?: number | undefined;
|
|
2473
|
+
} | undefined;
|
|
2474
|
+
is_deprecated?: boolean | undefined;
|
|
2475
|
+
secondary_color?: string | undefined;
|
|
2476
|
+
has_filters?: boolean | undefined;
|
|
2477
|
+
has_reads?: boolean | undefined;
|
|
2478
|
+
has_searches?: boolean | undefined;
|
|
2479
|
+
has_searches_or_writes?: boolean | undefined;
|
|
2480
|
+
has_upfront_fields?: boolean | undefined;
|
|
2481
|
+
has_writes?: boolean | undefined;
|
|
2482
|
+
is_invite?: boolean | undefined;
|
|
2483
|
+
version?: string | undefined;
|
|
2484
|
+
visibility?: string | undefined;
|
|
2485
|
+
classification?: string | undefined;
|
|
2486
|
+
}>;
|
|
2487
|
+
|
|
2488
|
+
declare const AuthenticationItemSchema: z.ZodObject<Omit<{
|
|
2489
|
+
id: z.ZodNumber;
|
|
2490
|
+
date: z.ZodString;
|
|
2491
|
+
lastchanged: z.ZodOptional<z.ZodString>;
|
|
2492
|
+
account_id: z.ZodNumber;
|
|
2493
|
+
customuser_id: z.ZodOptional<z.ZodNumber>;
|
|
2494
|
+
selected_api: z.ZodString;
|
|
2495
|
+
destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2496
|
+
is_invite_only: z.ZodBoolean;
|
|
2497
|
+
is_private: z.ZodBoolean;
|
|
2498
|
+
shared_with_all: z.ZodBoolean;
|
|
2499
|
+
is_stale: z.ZodOptional<z.ZodString>;
|
|
2500
|
+
is_shared: z.ZodOptional<z.ZodString>;
|
|
2501
|
+
marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2502
|
+
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2503
|
+
identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2504
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2505
|
+
url: z.ZodOptional<z.ZodString>;
|
|
2506
|
+
groups: z.ZodOptional<z.ZodString>;
|
|
2507
|
+
members: z.ZodOptional<z.ZodString>;
|
|
2508
|
+
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
2509
|
+
}, "selected_api" | "customuser_id"> & {
|
|
2510
|
+
implementation_id: z.ZodOptional<z.ZodString>;
|
|
2511
|
+
is_expired: z.ZodOptional<z.ZodString>;
|
|
2512
|
+
expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2513
|
+
app_key: z.ZodOptional<z.ZodString>;
|
|
2514
|
+
version: z.ZodOptional<z.ZodString>;
|
|
2515
|
+
user_id: z.ZodOptional<z.ZodNumber>;
|
|
2516
|
+
}, "strip", z.ZodTypeAny, {
|
|
2517
|
+
id: number;
|
|
2518
|
+
date: string;
|
|
2519
|
+
account_id: number;
|
|
2520
|
+
is_invite_only: boolean;
|
|
2521
|
+
is_private: boolean;
|
|
2522
|
+
shared_with_all: boolean;
|
|
2523
|
+
url?: string | undefined;
|
|
2524
|
+
label?: string | null | undefined;
|
|
2525
|
+
permissions?: Record<string, boolean> | undefined;
|
|
2526
|
+
lastchanged?: string | undefined;
|
|
2527
|
+
destination_selected_api?: string | null | undefined;
|
|
2528
|
+
is_stale?: string | undefined;
|
|
2529
|
+
is_shared?: string | undefined;
|
|
2530
|
+
marked_stale_at?: string | null | undefined;
|
|
2531
|
+
identifier?: string | null | undefined;
|
|
2532
|
+
title?: string | null | undefined;
|
|
2533
|
+
groups?: string | undefined;
|
|
2534
|
+
members?: string | undefined;
|
|
2535
|
+
user_id?: number | undefined;
|
|
2536
|
+
version?: string | undefined;
|
|
2537
|
+
implementation_id?: string | undefined;
|
|
2538
|
+
is_expired?: string | undefined;
|
|
2539
|
+
expired_at?: string | null | undefined;
|
|
2540
|
+
app_key?: string | undefined;
|
|
2541
|
+
}, {
|
|
2542
|
+
id: number;
|
|
2543
|
+
date: string;
|
|
2544
|
+
account_id: number;
|
|
2545
|
+
is_invite_only: boolean;
|
|
2546
|
+
is_private: boolean;
|
|
2547
|
+
shared_with_all: boolean;
|
|
2548
|
+
url?: string | undefined;
|
|
2549
|
+
label?: string | null | undefined;
|
|
2550
|
+
permissions?: Record<string, boolean> | undefined;
|
|
2551
|
+
lastchanged?: string | undefined;
|
|
2552
|
+
destination_selected_api?: string | null | undefined;
|
|
2553
|
+
is_stale?: string | undefined;
|
|
2554
|
+
is_shared?: string | undefined;
|
|
2555
|
+
marked_stale_at?: string | null | undefined;
|
|
2556
|
+
identifier?: string | null | undefined;
|
|
2557
|
+
title?: string | null | undefined;
|
|
2558
|
+
groups?: string | undefined;
|
|
2559
|
+
members?: string | undefined;
|
|
2560
|
+
user_id?: number | undefined;
|
|
2561
|
+
version?: string | undefined;
|
|
2562
|
+
implementation_id?: string | undefined;
|
|
2563
|
+
is_expired?: string | undefined;
|
|
2564
|
+
expired_at?: string | null | undefined;
|
|
2565
|
+
app_key?: string | undefined;
|
|
2566
|
+
}>;
|
|
2567
|
+
declare const AuthItemSchema: z.ZodObject<Omit<{
|
|
2568
|
+
id: z.ZodNumber;
|
|
2569
|
+
date: z.ZodString;
|
|
2570
|
+
lastchanged: z.ZodOptional<z.ZodString>;
|
|
2571
|
+
account_id: z.ZodNumber;
|
|
2572
|
+
customuser_id: z.ZodOptional<z.ZodNumber>;
|
|
2573
|
+
selected_api: z.ZodString;
|
|
2574
|
+
destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2575
|
+
is_invite_only: z.ZodBoolean;
|
|
2576
|
+
is_private: z.ZodBoolean;
|
|
2577
|
+
shared_with_all: z.ZodBoolean;
|
|
2578
|
+
is_stale: z.ZodOptional<z.ZodString>;
|
|
2579
|
+
is_shared: z.ZodOptional<z.ZodString>;
|
|
2580
|
+
marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2581
|
+
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2582
|
+
identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2583
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2584
|
+
url: z.ZodOptional<z.ZodString>;
|
|
2585
|
+
groups: z.ZodOptional<z.ZodString>;
|
|
2586
|
+
members: z.ZodOptional<z.ZodString>;
|
|
2587
|
+
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
2588
|
+
}, "selected_api" | "customuser_id"> & {
|
|
2589
|
+
implementation_id: z.ZodOptional<z.ZodString>;
|
|
2590
|
+
is_expired: z.ZodOptional<z.ZodString>;
|
|
2591
|
+
expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2592
|
+
app_key: z.ZodOptional<z.ZodString>;
|
|
2593
|
+
version: z.ZodOptional<z.ZodString>;
|
|
2594
|
+
user_id: z.ZodOptional<z.ZodNumber>;
|
|
2595
|
+
}, "strip", z.ZodTypeAny, {
|
|
2596
|
+
id: number;
|
|
2597
|
+
date: string;
|
|
2598
|
+
account_id: number;
|
|
2599
|
+
is_invite_only: boolean;
|
|
2600
|
+
is_private: boolean;
|
|
2601
|
+
shared_with_all: boolean;
|
|
2602
|
+
url?: string | undefined;
|
|
2603
|
+
label?: string | null | undefined;
|
|
2604
|
+
permissions?: Record<string, boolean> | undefined;
|
|
2605
|
+
lastchanged?: string | undefined;
|
|
2606
|
+
destination_selected_api?: string | null | undefined;
|
|
2607
|
+
is_stale?: string | undefined;
|
|
2608
|
+
is_shared?: string | undefined;
|
|
2609
|
+
marked_stale_at?: string | null | undefined;
|
|
2610
|
+
identifier?: string | null | undefined;
|
|
2611
|
+
title?: string | null | undefined;
|
|
2612
|
+
groups?: string | undefined;
|
|
2613
|
+
members?: string | undefined;
|
|
2614
|
+
user_id?: number | undefined;
|
|
2615
|
+
version?: string | undefined;
|
|
2616
|
+
implementation_id?: string | undefined;
|
|
2617
|
+
is_expired?: string | undefined;
|
|
2618
|
+
expired_at?: string | null | undefined;
|
|
2619
|
+
app_key?: string | undefined;
|
|
2620
|
+
}, {
|
|
2621
|
+
id: number;
|
|
2622
|
+
date: string;
|
|
2623
|
+
account_id: number;
|
|
2624
|
+
is_invite_only: boolean;
|
|
2625
|
+
is_private: boolean;
|
|
2626
|
+
shared_with_all: boolean;
|
|
2627
|
+
url?: string | undefined;
|
|
2628
|
+
label?: string | null | undefined;
|
|
2629
|
+
permissions?: Record<string, boolean> | undefined;
|
|
2630
|
+
lastchanged?: string | undefined;
|
|
2631
|
+
destination_selected_api?: string | null | undefined;
|
|
2632
|
+
is_stale?: string | undefined;
|
|
2633
|
+
is_shared?: string | undefined;
|
|
2634
|
+
marked_stale_at?: string | null | undefined;
|
|
2635
|
+
identifier?: string | null | undefined;
|
|
2636
|
+
title?: string | null | undefined;
|
|
2637
|
+
groups?: string | undefined;
|
|
2638
|
+
members?: string | undefined;
|
|
2639
|
+
user_id?: number | undefined;
|
|
2640
|
+
version?: string | undefined;
|
|
2641
|
+
implementation_id?: string | undefined;
|
|
2642
|
+
is_expired?: string | undefined;
|
|
2643
|
+
expired_at?: string | null | undefined;
|
|
2644
|
+
app_key?: string | undefined;
|
|
2645
|
+
}>;
|
|
2646
|
+
type AuthItem = z.infer<typeof AuthItemSchema>;
|
|
2647
|
+
|
|
2648
|
+
declare const ActionItemSchema: z.ZodObject<Omit<{
|
|
2649
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2650
|
+
type: z.ZodEnum<["filter", "read", "read_bulk", "run", "search", "search_and_write", "search_or_write", "write"]>;
|
|
2651
|
+
key: z.ZodString;
|
|
2652
|
+
name: z.ZodString;
|
|
2653
|
+
noun: z.ZodOptional<z.ZodString>;
|
|
2654
|
+
description: z.ZodString;
|
|
2655
|
+
description_html: z.ZodOptional<z.ZodString>;
|
|
2656
|
+
is_important: z.ZodOptional<z.ZodBoolean>;
|
|
2657
|
+
is_hidden: z.ZodOptional<z.ZodBoolean>;
|
|
2658
|
+
needs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2659
|
+
key: z.ZodString;
|
|
2660
|
+
alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
2661
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2662
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2663
|
+
key: z.ZodOptional<z.ZodString>;
|
|
2664
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2665
|
+
sample: z.ZodOptional<z.ZodString>;
|
|
2666
|
+
value: z.ZodOptional<z.ZodString>;
|
|
2667
|
+
}, "strip", z.ZodTypeAny, {
|
|
2668
|
+
value?: string | undefined;
|
|
2669
|
+
key?: string | undefined;
|
|
2670
|
+
label?: string | undefined;
|
|
2671
|
+
sample?: string | undefined;
|
|
2672
|
+
}, {
|
|
2673
|
+
value?: string | undefined;
|
|
2674
|
+
key?: string | undefined;
|
|
2675
|
+
label?: string | undefined;
|
|
2676
|
+
sample?: string | undefined;
|
|
2677
|
+
}>, "many">>;
|
|
2678
|
+
computed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
2679
|
+
custom_field: z.ZodOptional<z.ZodBoolean>;
|
|
2680
|
+
default: z.ZodOptional<z.ZodString>;
|
|
2681
|
+
depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2682
|
+
format: z.ZodOptional<z.ZodLiteral<"SELECT">>;
|
|
2683
|
+
from_search: z.ZodOptional<z.ZodBoolean>;
|
|
2684
|
+
from_write: z.ZodOptional<z.ZodBoolean>;
|
|
2685
|
+
help_text: z.ZodOptional<z.ZodString>;
|
|
2686
|
+
help_text_html: z.ZodOptional<z.ZodString>;
|
|
2687
|
+
input_format: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2688
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2689
|
+
language: z.ZodOptional<z.ZodString>;
|
|
2690
|
+
parent_key: z.ZodOptional<z.ZodString>;
|
|
2691
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
2692
|
+
prefill: z.ZodOptional<z.ZodString>;
|
|
2693
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
2694
|
+
searchfill: z.ZodOptional<z.ZodString>;
|
|
2695
|
+
send_in_json: z.ZodOptional<z.ZodBoolean>;
|
|
2696
|
+
regex: z.ZodOptional<z.ZodString>;
|
|
2697
|
+
type: z.ZodOptional<z.ZodEnum<["integer", "string", "text", "datetime", "boolean", "file", "decimal", "copy", "password", "dict", "code", "filter", "json"]>>;
|
|
2698
|
+
list: z.ZodOptional<z.ZodBoolean>;
|
|
2699
|
+
}, "strip", z.ZodTypeAny, {
|
|
2700
|
+
key: string;
|
|
2701
|
+
type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
|
|
2702
|
+
label?: string | undefined;
|
|
2703
|
+
alters_custom_fields?: boolean | null | undefined;
|
|
2704
|
+
capabilities?: string[] | undefined;
|
|
2705
|
+
choices?: {
|
|
2706
|
+
value?: string | undefined;
|
|
2707
|
+
key?: string | undefined;
|
|
2708
|
+
label?: string | undefined;
|
|
2709
|
+
sample?: string | undefined;
|
|
2710
|
+
}[] | undefined;
|
|
2711
|
+
computed?: boolean | null | undefined;
|
|
2712
|
+
custom_field?: boolean | undefined;
|
|
2713
|
+
default?: string | undefined;
|
|
2714
|
+
depends_on?: string[] | undefined;
|
|
2715
|
+
format?: "SELECT" | undefined;
|
|
2716
|
+
from_search?: boolean | undefined;
|
|
2717
|
+
from_write?: boolean | undefined;
|
|
2718
|
+
help_text?: string | undefined;
|
|
2719
|
+
help_text_html?: string | undefined;
|
|
2720
|
+
input_format?: string[] | undefined;
|
|
2721
|
+
language?: string | undefined;
|
|
2722
|
+
parent_key?: string | undefined;
|
|
2723
|
+
placeholder?: string | undefined;
|
|
2724
|
+
prefill?: string | undefined;
|
|
2725
|
+
required?: boolean | undefined;
|
|
2726
|
+
searchfill?: string | undefined;
|
|
2727
|
+
send_in_json?: boolean | undefined;
|
|
2728
|
+
regex?: string | undefined;
|
|
2729
|
+
list?: boolean | undefined;
|
|
2730
|
+
}, {
|
|
2731
|
+
key: string;
|
|
2732
|
+
type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
|
|
2733
|
+
label?: string | undefined;
|
|
2734
|
+
alters_custom_fields?: boolean | null | undefined;
|
|
2735
|
+
capabilities?: string[] | undefined;
|
|
2736
|
+
choices?: {
|
|
2737
|
+
value?: string | undefined;
|
|
2738
|
+
key?: string | undefined;
|
|
2739
|
+
label?: string | undefined;
|
|
2740
|
+
sample?: string | undefined;
|
|
2741
|
+
}[] | undefined;
|
|
2742
|
+
computed?: boolean | null | undefined;
|
|
2743
|
+
custom_field?: boolean | undefined;
|
|
2744
|
+
default?: string | undefined;
|
|
2745
|
+
depends_on?: string[] | undefined;
|
|
2746
|
+
format?: "SELECT" | undefined;
|
|
2747
|
+
from_search?: boolean | undefined;
|
|
2748
|
+
from_write?: boolean | undefined;
|
|
2749
|
+
help_text?: string | undefined;
|
|
2750
|
+
help_text_html?: string | undefined;
|
|
2751
|
+
input_format?: string[] | undefined;
|
|
2752
|
+
language?: string | undefined;
|
|
2753
|
+
parent_key?: string | undefined;
|
|
2754
|
+
placeholder?: string | undefined;
|
|
2755
|
+
prefill?: string | undefined;
|
|
2756
|
+
required?: boolean | undefined;
|
|
2757
|
+
searchfill?: string | undefined;
|
|
2758
|
+
send_in_json?: boolean | undefined;
|
|
2759
|
+
regex?: string | undefined;
|
|
2760
|
+
list?: boolean | undefined;
|
|
2761
|
+
}>, "many">>;
|
|
2762
|
+
meta: z.ZodOptional<z.ZodString>;
|
|
2763
|
+
selected_api: z.ZodOptional<z.ZodString>;
|
|
2764
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
2765
|
+
action_url: z.ZodOptional<z.ZodString>;
|
|
2766
|
+
}, "strip", z.ZodTypeAny, {
|
|
2767
|
+
action_url?: string | undefined;
|
|
2768
|
+
}, {
|
|
2769
|
+
action_url?: string | undefined;
|
|
2770
|
+
}>>;
|
|
2771
|
+
permissions: z.ZodOptional<z.ZodObject<{
|
|
2772
|
+
can_use: z.ZodOptional<z.ZodBoolean>;
|
|
2773
|
+
}, "strip", z.ZodTypeAny, {
|
|
2774
|
+
can_use?: boolean | undefined;
|
|
2775
|
+
}, {
|
|
2776
|
+
can_use?: boolean | undefined;
|
|
2777
|
+
}>>;
|
|
2778
|
+
}, "type" | "name"> & {
|
|
2779
|
+
app_key: z.ZodString;
|
|
2780
|
+
action_type: z.ZodEnum<["filter", "read", "read_bulk", "run", "search", "search_and_write", "search_or_write", "write"]>;
|
|
2781
|
+
title: z.ZodString;
|
|
2782
|
+
type: z.ZodLiteral<"action">;
|
|
2783
|
+
}, "strip", z.ZodTypeAny, {
|
|
2784
|
+
type: "action";
|
|
2785
|
+
key: string;
|
|
2786
|
+
description: string;
|
|
2787
|
+
title: string;
|
|
2788
|
+
app_key: string;
|
|
2789
|
+
action_type: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
|
|
2790
|
+
id?: string | undefined;
|
|
2791
|
+
noun?: string | undefined;
|
|
2792
|
+
description_html?: string | undefined;
|
|
2793
|
+
is_important?: boolean | undefined;
|
|
2794
|
+
is_hidden?: boolean | undefined;
|
|
2795
|
+
needs?: {
|
|
2796
|
+
key: string;
|
|
2797
|
+
type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
|
|
2798
|
+
label?: string | undefined;
|
|
2799
|
+
alters_custom_fields?: boolean | null | undefined;
|
|
2800
|
+
capabilities?: string[] | undefined;
|
|
2801
|
+
choices?: {
|
|
2802
|
+
value?: string | undefined;
|
|
2803
|
+
key?: string | undefined;
|
|
2804
|
+
label?: string | undefined;
|
|
2805
|
+
sample?: string | undefined;
|
|
2806
|
+
}[] | undefined;
|
|
2807
|
+
computed?: boolean | null | undefined;
|
|
2808
|
+
custom_field?: boolean | undefined;
|
|
2809
|
+
default?: string | undefined;
|
|
2810
|
+
depends_on?: string[] | undefined;
|
|
2811
|
+
format?: "SELECT" | undefined;
|
|
2812
|
+
from_search?: boolean | undefined;
|
|
2813
|
+
from_write?: boolean | undefined;
|
|
2814
|
+
help_text?: string | undefined;
|
|
2815
|
+
help_text_html?: string | undefined;
|
|
2816
|
+
input_format?: string[] | undefined;
|
|
2817
|
+
language?: string | undefined;
|
|
2818
|
+
parent_key?: string | undefined;
|
|
2819
|
+
placeholder?: string | undefined;
|
|
2820
|
+
prefill?: string | undefined;
|
|
2821
|
+
required?: boolean | undefined;
|
|
2822
|
+
searchfill?: string | undefined;
|
|
2823
|
+
send_in_json?: boolean | undefined;
|
|
2824
|
+
regex?: string | undefined;
|
|
2825
|
+
list?: boolean | undefined;
|
|
2826
|
+
}[] | undefined;
|
|
2827
|
+
meta?: string | undefined;
|
|
2828
|
+
selected_api?: string | undefined;
|
|
2829
|
+
links?: {
|
|
2830
|
+
action_url?: string | undefined;
|
|
2831
|
+
} | undefined;
|
|
2832
|
+
permissions?: {
|
|
2833
|
+
can_use?: boolean | undefined;
|
|
2834
|
+
} | undefined;
|
|
2835
|
+
}, {
|
|
2836
|
+
type: "action";
|
|
2837
|
+
key: string;
|
|
2838
|
+
description: string;
|
|
2839
|
+
title: string;
|
|
2840
|
+
app_key: string;
|
|
2841
|
+
action_type: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
|
|
2842
|
+
id?: string | undefined;
|
|
2843
|
+
noun?: string | undefined;
|
|
2844
|
+
description_html?: string | undefined;
|
|
2845
|
+
is_important?: boolean | undefined;
|
|
2846
|
+
is_hidden?: boolean | undefined;
|
|
2847
|
+
needs?: {
|
|
2848
|
+
key: string;
|
|
2849
|
+
type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
|
|
2850
|
+
label?: string | undefined;
|
|
2851
|
+
alters_custom_fields?: boolean | null | undefined;
|
|
2852
|
+
capabilities?: string[] | undefined;
|
|
2853
|
+
choices?: {
|
|
2854
|
+
value?: string | undefined;
|
|
2855
|
+
key?: string | undefined;
|
|
2856
|
+
label?: string | undefined;
|
|
2857
|
+
sample?: string | undefined;
|
|
2858
|
+
}[] | undefined;
|
|
2859
|
+
computed?: boolean | null | undefined;
|
|
2860
|
+
custom_field?: boolean | undefined;
|
|
2861
|
+
default?: string | undefined;
|
|
2862
|
+
depends_on?: string[] | undefined;
|
|
2863
|
+
format?: "SELECT" | undefined;
|
|
2864
|
+
from_search?: boolean | undefined;
|
|
2865
|
+
from_write?: boolean | undefined;
|
|
2866
|
+
help_text?: string | undefined;
|
|
2867
|
+
help_text_html?: string | undefined;
|
|
2868
|
+
input_format?: string[] | undefined;
|
|
2869
|
+
language?: string | undefined;
|
|
2870
|
+
parent_key?: string | undefined;
|
|
2871
|
+
placeholder?: string | undefined;
|
|
2872
|
+
prefill?: string | undefined;
|
|
2873
|
+
required?: boolean | undefined;
|
|
2874
|
+
searchfill?: string | undefined;
|
|
2875
|
+
send_in_json?: boolean | undefined;
|
|
2876
|
+
regex?: string | undefined;
|
|
2877
|
+
list?: boolean | undefined;
|
|
2878
|
+
}[] | undefined;
|
|
2879
|
+
meta?: string | undefined;
|
|
2880
|
+
selected_api?: string | undefined;
|
|
2881
|
+
links?: {
|
|
2882
|
+
action_url?: string | undefined;
|
|
2883
|
+
} | undefined;
|
|
2884
|
+
permissions?: {
|
|
2885
|
+
can_use?: boolean | undefined;
|
|
2886
|
+
} | undefined;
|
|
2887
|
+
}>;
|
|
2888
|
+
|
|
2889
|
+
declare const UserProfileItemSchema: z.ZodObject<Omit<{
|
|
2890
|
+
id: z.ZodNumber;
|
|
2891
|
+
code: z.ZodString;
|
|
2892
|
+
user_id: z.ZodNumber;
|
|
2893
|
+
auto_provisioned: z.ZodBoolean;
|
|
2894
|
+
first_name: z.ZodString;
|
|
2895
|
+
last_name: z.ZodString;
|
|
2896
|
+
username: z.ZodString;
|
|
2897
|
+
personas: z.ZodString;
|
|
2898
|
+
user_generated_personas: z.ZodString;
|
|
2899
|
+
last_login: z.ZodString;
|
|
2900
|
+
email: z.ZodString;
|
|
2901
|
+
email_hash: z.ZodString;
|
|
2902
|
+
email_confirmed: z.ZodBoolean;
|
|
2903
|
+
timezone: z.ZodString;
|
|
2904
|
+
photo_url: z.ZodString;
|
|
2905
|
+
has_seen_notifications: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodBoolean>>;
|
|
2906
|
+
signup: z.ZodString;
|
|
2907
|
+
since_signup: z.ZodString;
|
|
2908
|
+
has_activated: z.ZodBoolean;
|
|
2909
|
+
enable_gz_creator: z.ZodBoolean;
|
|
2910
|
+
should_see_nps_survey: z.ZodBoolean;
|
|
2911
|
+
is_developer: z.ZodBoolean;
|
|
2912
|
+
is_expert: z.ZodBoolean;
|
|
2913
|
+
tos_agreement: z.ZodBoolean;
|
|
2914
|
+
should_renew_tos: z.ZodBoolean;
|
|
2915
|
+
is_gdpr_consented: z.ZodBoolean;
|
|
2916
|
+
disable_ssl_check: z.ZodBoolean;
|
|
2917
|
+
identity: z.ZodNumber;
|
|
2918
|
+
summary_schedule: z.ZodString;
|
|
2919
|
+
alert_triggers: z.ZodString;
|
|
2920
|
+
alert_actions: z.ZodString;
|
|
2921
|
+
is_staff: z.ZodBoolean;
|
|
2922
|
+
is_zt_reviewer: z.ZodBoolean;
|
|
2923
|
+
is_high_value: z.ZodBoolean;
|
|
2924
|
+
is_temporary: z.ZodBoolean;
|
|
2925
|
+
banner_message: z.ZodString;
|
|
2926
|
+
enable_totp_2fa: z.ZodBoolean;
|
|
2927
|
+
viewed_help: z.ZodRecord<z.ZodString, z.ZodBoolean>;
|
|
2928
|
+
show_editor_migration_mesaging: z.ZodBoolean;
|
|
2929
|
+
switches: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2930
|
+
organizations: z.ZodArray<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>, "many">;
|
|
2931
|
+
primary_organization: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2932
|
+
has_active_zaps: z.ZodBoolean;
|
|
2933
|
+
has_google_sso: z.ZodBoolean;
|
|
2934
|
+
auth_realm: z.ZodString;
|
|
2935
|
+
roles: z.ZodArray<z.ZodObject<{
|
|
2936
|
+
account_id: z.ZodNumber;
|
|
2937
|
+
role: z.ZodString;
|
|
2938
|
+
}, "strip", z.ZodTypeAny, {
|
|
2939
|
+
account_id: number;
|
|
2940
|
+
role: string;
|
|
2941
|
+
}, {
|
|
2942
|
+
account_id: number;
|
|
2943
|
+
role: string;
|
|
2944
|
+
}>, "many">;
|
|
2945
|
+
}, "user_id"> & {
|
|
2946
|
+
full_name: z.ZodString;
|
|
2947
|
+
}, "strip", z.ZodTypeAny, {
|
|
2948
|
+
code: string;
|
|
2949
|
+
id: number;
|
|
2950
|
+
auto_provisioned: boolean;
|
|
2951
|
+
first_name: string;
|
|
2952
|
+
last_name: string;
|
|
2953
|
+
username: string;
|
|
2954
|
+
personas: string;
|
|
2955
|
+
user_generated_personas: string;
|
|
2956
|
+
last_login: string;
|
|
2957
|
+
email: string;
|
|
2958
|
+
email_hash: string;
|
|
2959
|
+
email_confirmed: boolean;
|
|
2960
|
+
timezone: string;
|
|
2961
|
+
photo_url: string;
|
|
2962
|
+
has_seen_notifications: Record<string, boolean | null>;
|
|
2963
|
+
signup: string;
|
|
2964
|
+
since_signup: string;
|
|
2965
|
+
has_activated: boolean;
|
|
2966
|
+
enable_gz_creator: boolean;
|
|
2967
|
+
should_see_nps_survey: boolean;
|
|
2968
|
+
is_developer: boolean;
|
|
2969
|
+
is_expert: boolean;
|
|
2970
|
+
tos_agreement: boolean;
|
|
2971
|
+
should_renew_tos: boolean;
|
|
2972
|
+
is_gdpr_consented: boolean;
|
|
2973
|
+
disable_ssl_check: boolean;
|
|
2974
|
+
identity: number;
|
|
2975
|
+
summary_schedule: string;
|
|
2976
|
+
alert_triggers: string;
|
|
2977
|
+
alert_actions: string;
|
|
2978
|
+
is_staff: boolean;
|
|
2979
|
+
is_zt_reviewer: boolean;
|
|
2980
|
+
is_high_value: boolean;
|
|
2981
|
+
is_temporary: boolean;
|
|
2982
|
+
banner_message: string;
|
|
2983
|
+
enable_totp_2fa: boolean;
|
|
2984
|
+
viewed_help: Record<string, boolean>;
|
|
2985
|
+
show_editor_migration_mesaging: boolean;
|
|
2986
|
+
switches: Record<string, unknown>;
|
|
2987
|
+
organizations: (Record<string, unknown> | null)[];
|
|
2988
|
+
primary_organization: Record<string, unknown> | null;
|
|
2989
|
+
has_active_zaps: boolean;
|
|
2990
|
+
has_google_sso: boolean;
|
|
2991
|
+
auth_realm: string;
|
|
2992
|
+
roles: {
|
|
2993
|
+
account_id: number;
|
|
2994
|
+
role: string;
|
|
2995
|
+
}[];
|
|
2996
|
+
full_name: string;
|
|
2997
|
+
}, {
|
|
2998
|
+
code: string;
|
|
2999
|
+
id: number;
|
|
3000
|
+
auto_provisioned: boolean;
|
|
3001
|
+
first_name: string;
|
|
3002
|
+
last_name: string;
|
|
3003
|
+
username: string;
|
|
3004
|
+
personas: string;
|
|
3005
|
+
user_generated_personas: string;
|
|
3006
|
+
last_login: string;
|
|
3007
|
+
email: string;
|
|
3008
|
+
email_hash: string;
|
|
3009
|
+
email_confirmed: boolean;
|
|
3010
|
+
timezone: string;
|
|
3011
|
+
photo_url: string;
|
|
3012
|
+
has_seen_notifications: Record<string, boolean | null>;
|
|
3013
|
+
signup: string;
|
|
3014
|
+
since_signup: string;
|
|
3015
|
+
has_activated: boolean;
|
|
3016
|
+
enable_gz_creator: boolean;
|
|
3017
|
+
should_see_nps_survey: boolean;
|
|
3018
|
+
is_developer: boolean;
|
|
3019
|
+
is_expert: boolean;
|
|
3020
|
+
tos_agreement: boolean;
|
|
3021
|
+
should_renew_tos: boolean;
|
|
3022
|
+
is_gdpr_consented: boolean;
|
|
3023
|
+
disable_ssl_check: boolean;
|
|
3024
|
+
identity: number;
|
|
3025
|
+
summary_schedule: string;
|
|
3026
|
+
alert_triggers: string;
|
|
3027
|
+
alert_actions: string;
|
|
3028
|
+
is_staff: boolean;
|
|
3029
|
+
is_zt_reviewer: boolean;
|
|
3030
|
+
is_high_value: boolean;
|
|
3031
|
+
is_temporary: boolean;
|
|
3032
|
+
banner_message: string;
|
|
3033
|
+
enable_totp_2fa: boolean;
|
|
3034
|
+
viewed_help: Record<string, boolean>;
|
|
3035
|
+
show_editor_migration_mesaging: boolean;
|
|
3036
|
+
switches: Record<string, unknown>;
|
|
3037
|
+
organizations: (Record<string, unknown> | null)[];
|
|
3038
|
+
primary_organization: Record<string, unknown> | null;
|
|
3039
|
+
has_active_zaps: boolean;
|
|
3040
|
+
has_google_sso: boolean;
|
|
3041
|
+
auth_realm: string;
|
|
3042
|
+
roles: {
|
|
3043
|
+
account_id: number;
|
|
3044
|
+
role: string;
|
|
3045
|
+
}[];
|
|
3046
|
+
full_name: string;
|
|
3047
|
+
}>;
|
|
2843
3048
|
|
|
2844
|
-
declare const resolverRegistry: {
|
|
2845
|
-
readonly appKey: AppKeyResolver;
|
|
2846
|
-
readonly actionType: ActionTypeResolver;
|
|
2847
|
-
readonly actionKey: ActionKeyResolver;
|
|
2848
|
-
readonly authenticationId: AuthenticationIdResolver;
|
|
2849
|
-
readonly inputs: InputsResolver;
|
|
2850
|
-
};
|
|
2851
|
-
type ResolverName = keyof typeof resolverRegistry;
|
|
2852
|
-
type ResolverType = (typeof resolverRegistry)[ResolverName];
|
|
2853
|
-
/**
|
|
2854
|
-
* Get a resolver by name
|
|
2855
|
-
*/
|
|
2856
|
-
declare function getResolver(name: string): ResolverType | undefined;
|
|
2857
3049
|
/**
|
|
2858
|
-
*
|
|
3050
|
+
* Represents an app item returned by getApp and listApps functions
|
|
3051
|
+
* Inferred from AppItemSchema which extends the base App API schema
|
|
2859
3052
|
*/
|
|
2860
|
-
|
|
3053
|
+
type AppItem = z.infer<typeof AppItemSchema>;
|
|
2861
3054
|
/**
|
|
2862
|
-
*
|
|
3055
|
+
* Represents an authentication item returned by listAuthentications functions
|
|
3056
|
+
* Inferred from AuthenticationItemSchema which extends the base Authentication API schema
|
|
2863
3057
|
*/
|
|
2864
|
-
|
|
3058
|
+
type AuthenticationItem = z.infer<typeof AuthenticationItemSchema>;
|
|
2865
3059
|
/**
|
|
2866
|
-
*
|
|
3060
|
+
* Represents an action item returned by listActions functions
|
|
3061
|
+
* Inferred from ActionItemSchema which extends the base Action API schema
|
|
2867
3062
|
*/
|
|
2868
|
-
|
|
3063
|
+
type ActionItem$1 = z.infer<typeof ActionItemSchema>;
|
|
2869
3064
|
/**
|
|
2870
|
-
*
|
|
2871
|
-
*
|
|
3065
|
+
* Represents an input field item returned by listInputFields functions
|
|
3066
|
+
* Inferred from InputFieldItemSchema which extends the base Need API schema
|
|
2872
3067
|
*/
|
|
2873
|
-
|
|
3068
|
+
type InputFieldItem = z.infer<typeof InputFieldItemSchema>;
|
|
2874
3069
|
/**
|
|
2875
|
-
*
|
|
3070
|
+
* Represents a user profile item returned by getProfile function
|
|
3071
|
+
* Inferred from UserProfileItemSchema which extends the base UserProfile API schema
|
|
2876
3072
|
*/
|
|
2877
|
-
|
|
3073
|
+
type UserProfileItem = z.infer<typeof UserProfileItemSchema>;
|
|
3074
|
+
|
|
3075
|
+
declare const AppKeyPropertySchema: z.ZodString & {
|
|
3076
|
+
_def: z.ZodStringDef & PositionalMetadata;
|
|
3077
|
+
};
|
|
3078
|
+
declare const ActionTypePropertySchema: z.ZodEnum<["read", "read_bulk", "write", "run", "search", "search_or_write", "search_and_write", "filter"]>;
|
|
3079
|
+
declare const ActionKeyPropertySchema: z.ZodString;
|
|
3080
|
+
declare const AuthenticationIdPropertySchema: z.ZodNumber;
|
|
3081
|
+
declare const InputsPropertySchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3082
|
+
declare const LimitPropertySchema: z.ZodDefault<z.ZodNumber>;
|
|
3083
|
+
declare const OffsetPropertySchema: z.ZodDefault<z.ZodNumber>;
|
|
3084
|
+
declare const OutputPropertySchema: z.ZodString;
|
|
3085
|
+
declare const DebugPropertySchema: z.ZodDefault<z.ZodBoolean>;
|
|
3086
|
+
declare const ParamsPropertySchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3087
|
+
type AppKeyProperty = z.infer<typeof AppKeyPropertySchema>;
|
|
3088
|
+
type ActionTypeProperty = z.infer<typeof ActionTypePropertySchema>;
|
|
3089
|
+
type ActionKeyProperty = z.infer<typeof ActionKeyPropertySchema>;
|
|
3090
|
+
type AuthenticationIdProperty = z.infer<typeof AuthenticationIdPropertySchema>;
|
|
3091
|
+
type InputsProperty = z.infer<typeof InputsPropertySchema>;
|
|
3092
|
+
type LimitProperty = z.infer<typeof LimitPropertySchema>;
|
|
3093
|
+
type OffsetProperty = z.infer<typeof OffsetPropertySchema>;
|
|
3094
|
+
type OutputProperty = z.infer<typeof OutputPropertySchema>;
|
|
3095
|
+
type DebugProperty = z.infer<typeof DebugPropertySchema>;
|
|
3096
|
+
type ParamsProperty = z.infer<typeof ParamsPropertySchema>;
|
|
2878
3097
|
|
|
2879
3098
|
/**
|
|
2880
3099
|
* Generic utility functions for creating paginated SDK functions
|
|
@@ -2889,6 +3108,52 @@ declare function getResolutionOrderForParams(paramNames: string[]): string[];
|
|
|
2889
3108
|
*/
|
|
2890
3109
|
declare function createFunction<TOptions, TResult, TSchemaOptions extends TOptions = TOptions>(coreFn: (options: TOptions) => Promise<TResult>, schema?: z.ZodSchema<TSchemaOptions>): (options?: TOptions) => Promise<TResult>;
|
|
2891
3110
|
|
|
3111
|
+
declare const appKeyResolver: StaticResolver;
|
|
3112
|
+
|
|
3113
|
+
interface ActionTypeItem {
|
|
3114
|
+
key: string;
|
|
3115
|
+
name: string;
|
|
3116
|
+
}
|
|
3117
|
+
declare const actionTypeResolver: DynamicResolver<ActionTypeItem, {
|
|
3118
|
+
appKey: string;
|
|
3119
|
+
}>;
|
|
3120
|
+
|
|
3121
|
+
interface ActionItem {
|
|
3122
|
+
key: string;
|
|
3123
|
+
title?: string;
|
|
3124
|
+
name?: string;
|
|
3125
|
+
description?: string;
|
|
3126
|
+
action_type: string;
|
|
3127
|
+
}
|
|
3128
|
+
declare const actionKeyResolver: DynamicResolver<ActionItem, {
|
|
3129
|
+
appKey: string;
|
|
3130
|
+
actionType: ActionTypeProperty;
|
|
3131
|
+
}>;
|
|
3132
|
+
|
|
3133
|
+
type AuthenticationIdResolver = DynamicResolver<AuthItem, {
|
|
3134
|
+
appKey?: string;
|
|
3135
|
+
}>;
|
|
3136
|
+
declare const authenticationIdResolver: AuthenticationIdResolver;
|
|
3137
|
+
declare const authenticationIdGenericResolver: AuthenticationIdResolver;
|
|
3138
|
+
|
|
3139
|
+
type InputsResolver = FieldsResolver<{
|
|
3140
|
+
appKey: string;
|
|
3141
|
+
actionKey: string;
|
|
3142
|
+
actionType: ActionTypeProperty;
|
|
3143
|
+
authenticationId: number;
|
|
3144
|
+
inputs?: Record<string, unknown>;
|
|
3145
|
+
}>;
|
|
3146
|
+
declare const inputsResolver: InputsResolver;
|
|
3147
|
+
declare const inputsAllOptionalResolver: InputsResolver;
|
|
3148
|
+
|
|
3149
|
+
declare const inputFieldKeyResolver: DynamicResolver<InputFieldItem$1, {
|
|
3150
|
+
appKey: string;
|
|
3151
|
+
actionKey: string;
|
|
3152
|
+
actionType: ActionTypeProperty;
|
|
3153
|
+
authenticationId: number;
|
|
3154
|
+
inputs?: Record<string, unknown>;
|
|
3155
|
+
}>;
|
|
3156
|
+
|
|
2892
3157
|
/**
|
|
2893
3158
|
* SDK Authentication Utilities
|
|
2894
3159
|
*
|
|
@@ -2922,93 +3187,32 @@ declare function getTokenFromCliLogin(options?: AuthOptions): Promise<string | u
|
|
|
2922
3187
|
*/
|
|
2923
3188
|
declare function getTokenFromEnvOrConfig(options?: AuthOptions): Promise<string | undefined>;
|
|
2924
3189
|
|
|
2925
|
-
declare const InputFieldChoiceItemSchema: z.ZodObject<{
|
|
2926
|
-
key: z.ZodOptional<z.ZodString>;
|
|
2927
|
-
label: z.ZodOptional<z.ZodString>;
|
|
2928
|
-
sample: z.ZodOptional<z.ZodString>;
|
|
2929
|
-
value: z.ZodOptional<z.ZodString>;
|
|
2930
|
-
}, "strip", z.ZodTypeAny, {
|
|
2931
|
-
value?: string | undefined;
|
|
2932
|
-
key?: string | undefined;
|
|
2933
|
-
label?: string | undefined;
|
|
2934
|
-
sample?: string | undefined;
|
|
2935
|
-
}, {
|
|
2936
|
-
value?: string | undefined;
|
|
2937
|
-
key?: string | undefined;
|
|
2938
|
-
label?: string | undefined;
|
|
2939
|
-
sample?: string | undefined;
|
|
2940
|
-
}>;
|
|
2941
|
-
type InputFieldChoiceItem = z.infer<typeof InputFieldChoiceItemSchema>;
|
|
2942
|
-
declare const ListInputFieldChoicesSchema: z.ZodObject<{
|
|
2943
|
-
appKey: z.ZodString;
|
|
2944
|
-
actionType: z.ZodEnum<["read", "read_bulk", "write", "run", "search", "search_or_write", "search_and_write", "filter"]>;
|
|
2945
|
-
actionKey: z.ZodString;
|
|
2946
|
-
inputFieldKey: z.ZodString;
|
|
2947
|
-
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2948
|
-
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2949
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
2950
|
-
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
2951
|
-
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
2952
|
-
}, "strip", z.ZodTypeAny, {
|
|
2953
|
-
appKey: string;
|
|
2954
|
-
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
2955
|
-
actionKey: string;
|
|
2956
|
-
inputFieldKey: string;
|
|
2957
|
-
page?: number | undefined;
|
|
2958
|
-
authenticationId?: number | null | undefined;
|
|
2959
|
-
inputs?: Record<string, unknown> | undefined;
|
|
2960
|
-
pageSize?: number | undefined;
|
|
2961
|
-
maxItems?: number | undefined;
|
|
2962
|
-
}, {
|
|
2963
|
-
appKey: string;
|
|
2964
|
-
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
2965
|
-
actionKey: string;
|
|
2966
|
-
inputFieldKey: string;
|
|
2967
|
-
page?: number | undefined;
|
|
2968
|
-
authenticationId?: number | null | undefined;
|
|
2969
|
-
inputs?: Record<string, unknown> | undefined;
|
|
2970
|
-
pageSize?: number | undefined;
|
|
2971
|
-
maxItems?: number | undefined;
|
|
2972
|
-
}>;
|
|
2973
|
-
type ListInputFieldChoicesOptions = z.infer<typeof ListInputFieldChoicesSchema>;
|
|
2974
|
-
|
|
2975
|
-
interface ListInputFieldChoicesPluginProvides {
|
|
2976
|
-
listInputFieldChoices: (options: ListInputFieldChoicesOptions) => Promise<{
|
|
2977
|
-
data: InputFieldChoiceItem[];
|
|
2978
|
-
}> & AsyncIterable<{
|
|
2979
|
-
data: InputFieldChoiceItem[];
|
|
2980
|
-
nextCursor?: string;
|
|
2981
|
-
}> & {
|
|
2982
|
-
items(): AsyncIterable<InputFieldChoiceItem>;
|
|
2983
|
-
};
|
|
2984
|
-
context: {
|
|
2985
|
-
meta: {
|
|
2986
|
-
listInputFieldChoices: {
|
|
2987
|
-
inputSchema: typeof ListInputFieldChoicesSchema;
|
|
2988
|
-
};
|
|
2989
|
-
};
|
|
2990
|
-
};
|
|
2991
|
-
}
|
|
2992
|
-
|
|
2993
3190
|
interface ZapierSdkOptions extends BaseSdkOptions {
|
|
2994
3191
|
}
|
|
2995
|
-
declare function createSdk<TCurrentSdk = {}, TCurrentContext
|
|
3192
|
+
declare function createSdk<TCurrentSdk = {}, TCurrentContext extends {
|
|
2996
3193
|
meta: Record<string, PluginMeta>;
|
|
2997
|
-
}
|
|
2998
|
-
|
|
3194
|
+
} = {
|
|
3195
|
+
meta: Record<string, PluginMeta>;
|
|
3196
|
+
}>(options?: ZapierSdkOptions, initialSdk?: TCurrentSdk, initialContext?: TCurrentContext): TCurrentSdk & {
|
|
3197
|
+
getContext: () => TCurrentContext;
|
|
3198
|
+
addPlugin<TRequiresContext, TProvides extends PluginProvides>(plugin: Plugin<TCurrentSdk & {
|
|
3199
|
+
getContext(): TCurrentContext;
|
|
3200
|
+
}, TRequiresContext, TProvides>, addPluginOptions?: Record<string, unknown>): Sdk<TCurrentSdk & ExtractSdkProperties<TProvides>, TCurrentContext & NonNullable<ExtractContextProperties<TProvides>>>;
|
|
3201
|
+
};
|
|
3202
|
+
declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk<ExtractSdkProperties<ApiPluginProvides> & ExtractSdkProperties<ManifestPluginProvides> & ExtractSdkProperties<ListAppsPluginProvides> & ExtractSdkProperties<GetAppPluginProvides> & ExtractSdkProperties<ListActionsPluginProvides> & ExtractSdkProperties<GetActionPluginProvides> & ExtractSdkProperties<ListInputFieldsPluginProvides> & ExtractSdkProperties<ListInputFieldChoicesPluginProvides> & ExtractSdkProperties<RunActionPluginProvides> & ExtractSdkProperties<ListAuthenticationsPluginProvides> & ExtractSdkProperties<GetAuthenticationPluginProvides> & ExtractSdkProperties<FindFirstAuthenticationPluginProvides> & ExtractSdkProperties<FindUniqueAuthenticationPluginProvides> & ExtractSdkProperties<RequestPluginProvides> & ExtractSdkProperties<FetchPluginProvides> & ExtractSdkProperties<AppsPluginProvides> & ExtractSdkProperties<GetProfilePluginProvides>, {
|
|
2999
3203
|
meta: Record<string, PluginMeta>;
|
|
3000
3204
|
} & {
|
|
3001
3205
|
api: ApiClient;
|
|
3206
|
+
} & {
|
|
3207
|
+
getVersionedImplementationId: GetVersionedImplementationId;
|
|
3208
|
+
resolveAppKeys: ResolveAppKeys;
|
|
3209
|
+
updateManifestEntry: (appKey: string, entry: ManifestEntry, configPath?: string) => Promise<[string, ManifestEntry]>;
|
|
3002
3210
|
} & {
|
|
3003
3211
|
meta: {
|
|
3004
3212
|
listApps: {
|
|
3005
3213
|
inputSchema: typeof ListAppsSchema;
|
|
3006
3214
|
};
|
|
3007
3215
|
};
|
|
3008
|
-
} & {
|
|
3009
|
-
getVersionedImplementationId: GetVersionedImplementationId;
|
|
3010
|
-
getManifestEntry: GetManifestEntry;
|
|
3011
|
-
getImplementation: GetImplementation;
|
|
3012
3216
|
} & {
|
|
3013
3217
|
meta: {
|
|
3014
3218
|
getApp: {
|
|
@@ -3045,12 +3249,6 @@ declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk
|
|
|
3045
3249
|
inputSchema: typeof RunActionSchema;
|
|
3046
3250
|
};
|
|
3047
3251
|
};
|
|
3048
|
-
} & {
|
|
3049
|
-
meta: {
|
|
3050
|
-
lockVersion: {
|
|
3051
|
-
inputSchema: typeof LockVersionSchema;
|
|
3052
|
-
};
|
|
3053
|
-
};
|
|
3054
3252
|
} & {
|
|
3055
3253
|
meta: {
|
|
3056
3254
|
listAuthentications: {
|
|
@@ -3090,4 +3288,4 @@ declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk
|
|
|
3090
3288
|
}>;
|
|
3091
3289
|
declare function createZapierSdk(options?: ZapierSdkOptions): ZapierSdk;
|
|
3092
3290
|
|
|
3093
|
-
export { type Action, type ActionExecutionResult, type ActionField, type ActionFieldChoice, type ActionItem, type ActionKeyProperty, ActionKeyPropertySchema, type ActionTypeProperty, ActionTypePropertySchema, type ApiError, type ApiEvent, type ApiPluginOptions, type ApiPluginProvides, type App, type AppItem, type AppKeyProperty, AppKeyPropertySchema, type AppsPluginProvides, type AuthEvent, type AuthOptions, type Authentication, type AuthenticationIdProperty, AuthenticationIdPropertySchema, type AuthenticationItem, type AuthenticationsResponse, type Choice, type DebugProperty, DebugPropertySchema, type ErrorOptions, type EventCallback, type FetchPluginProvides, type Field, type FindFirstAuthenticationPluginProvides, type FindUniqueAuthenticationPluginProvides, type FunctionOptions, type FunctionRegistryEntry, type GetActionPluginProvides, type GetAppPluginProvides, type GetAuthenticationPluginProvides, type GetProfilePluginProvides, type GetSdkType, type InputFieldItem, type InputsProperty, InputsPropertySchema, type LimitProperty, LimitPropertySchema, type ListActionsPluginProvides, type ListAppsPluginProvides, type ListAuthenticationsPluginProvides, type ListInputFieldsPluginProvides, type LoadingEvent, type
|
|
3291
|
+
export { type Action, type ActionExecutionOptions, type ActionExecutionResult, type ActionField, type ActionFieldChoice, type ActionItem$1 as ActionItem, type ActionKeyProperty, ActionKeyPropertySchema, type ActionTypeProperty, ActionTypePropertySchema, type ApiError, type ApiEvent, type ApiPluginOptions, type ApiPluginProvides, type App, type AppItem, type AppKeyProperty, AppKeyPropertySchema, type AppsPluginProvides, type AuthEvent, type AuthOptions, type Authentication, type AuthenticationIdProperty, AuthenticationIdPropertySchema, type AuthenticationItem, type AuthenticationsResponse, type Choice, DEFAULT_CONFIG_PATH, type DebugProperty, DebugPropertySchema, type ErrorOptions, type EventCallback, type FetchPluginProvides, type Field, type FindFirstAuthenticationPluginProvides, type FindUniqueAuthenticationPluginProvides, type FunctionOptions, type FunctionRegistryEntry, type GetActionPluginProvides, type GetAppPluginProvides, type GetAuthenticationPluginProvides, type GetContextType, type GetProfilePluginProvides, type GetSdkType, type InputFieldItem, type InputsProperty, InputsPropertySchema, type LimitProperty, LimitPropertySchema, type ListActionsPluginProvides, type ListAppsPluginProvides, type ListAuthenticationsPluginProvides, type ListInputFieldsPluginProvides, type LoadingEvent, type ManifestPluginOptions, type ManifestPluginProvides, type Need, type NeedsRequest, type NeedsResponse, type OffsetProperty, OffsetPropertySchema, type OutputProperty, OutputPropertySchema, type PaginatedSdkFunction, type ParamsProperty, ParamsPropertySchema, type Plugin, type PluginDependencies, type PluginOptions, type PluginProvides, type PositionalMetadata, RelayFetchSchema, RelayRequestSchema, type RequestPluginProvides, type RunActionPluginProvides, type Sdk, type SdkEvent, type UserProfile, type UserProfileItem, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierError, type ZapierFetchInitOptions, ZapierNotFoundError, ZapierResourceNotFoundError, type ZapierSdk, type ZapierSdkApps, type ZapierSdkOptions, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, appKeyResolver, appsPlugin, authenticationIdGenericResolver, authenticationIdResolver, createFunction, createSdk, createZapierSdk, createZapierSdkWithoutRegistry, fetchPlugin, findFirstAuthenticationPlugin, findManifestEntry, findUniqueAuthenticationPlugin, formatErrorMessage, getActionPlugin, getAppPlugin, getAuthenticationPlugin, getPreferredManifestEntryKey, getProfilePlugin, getTokenFromCliLogin, getTokenFromEnv, getTokenFromEnvOrConfig, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, isPositional, listActionsPlugin, listAppsPlugin, listAuthenticationsPlugin, listInputFieldsPlugin, manifestPlugin, readManifestFromFile, registryPlugin, requestPlugin, runActionPlugin };
|