@zapier/zapier-sdk 0.46.0 → 0.47.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/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +17 -6
- package/dist/api/types.d.ts +11 -0
- package/dist/api/types.d.ts.map +1 -1
- package/dist/index.cjs +3048 -3629
- package/dist/index.d.mts +6700 -2148
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.mjs +3045 -3630
- package/dist/plugins/api/index.d.ts +22 -10
- package/dist/plugins/api/index.d.ts.map +1 -1
- package/dist/plugins/api/index.js +4 -4
- package/dist/plugins/apps/index.d.ts +108 -7
- package/dist/plugins/apps/index.d.ts.map +1 -1
- package/dist/plugins/apps/index.js +3 -4
- package/dist/plugins/capabilities/index.d.ts +9 -6
- package/dist/plugins/capabilities/index.d.ts.map +1 -1
- package/dist/plugins/capabilities/index.js +3 -2
- package/dist/plugins/connections/index.d.ts +15 -9
- package/dist/plugins/connections/index.d.ts.map +1 -1
- package/dist/plugins/connections/index.js +3 -2
- package/dist/plugins/createClientCredentials/index.d.ts +26 -14
- package/dist/plugins/createClientCredentials/index.d.ts.map +1 -1
- package/dist/plugins/createClientCredentials/index.js +16 -39
- package/dist/plugins/createClientCredentials/schemas.d.ts +0 -2
- package/dist/plugins/createClientCredentials/schemas.d.ts.map +1 -1
- package/dist/plugins/deleteClientCredentials/index.d.ts +20 -14
- package/dist/plugins/deleteClientCredentials/index.d.ts.map +1 -1
- package/dist/plugins/deleteClientCredentials/index.js +18 -37
- package/dist/plugins/deleteClientCredentials/schemas.d.ts +0 -2
- package/dist/plugins/deleteClientCredentials/schemas.d.ts.map +1 -1
- package/dist/plugins/deprecated/authentications.d.ts +597 -41
- package/dist/plugins/deprecated/authentications.d.ts.map +1 -1
- package/dist/plugins/deprecated/authentications.js +9 -8
- package/dist/plugins/eventEmission/index.d.ts +9 -6
- package/dist/plugins/eventEmission/index.d.ts.map +1 -1
- package/dist/plugins/eventEmission/index.js +3 -2
- package/dist/plugins/fetch/index.d.ts +40 -17
- package/dist/plugins/fetch/index.d.ts.map +1 -1
- package/dist/plugins/fetch/index.js +6 -4
- package/dist/plugins/findFirstConnection/index.d.ts +109 -14
- package/dist/plugins/findFirstConnection/index.d.ts.map +1 -1
- package/dist/plugins/findFirstConnection/index.js +14 -26
- package/dist/plugins/findFirstConnection/schemas.d.ts +0 -2
- package/dist/plugins/findFirstConnection/schemas.d.ts.map +1 -1
- package/dist/plugins/findUniqueConnection/index.d.ts +109 -14
- package/dist/plugins/findUniqueConnection/index.d.ts.map +1 -1
- package/dist/plugins/findUniqueConnection/index.js +14 -26
- package/dist/plugins/findUniqueConnection/schemas.d.ts +0 -2
- package/dist/plugins/findUniqueConnection/schemas.d.ts.map +1 -1
- package/dist/plugins/getAction/index.d.ts +68 -15
- package/dist/plugins/getAction/index.d.ts.map +1 -1
- package/dist/plugins/getAction/index.js +21 -31
- package/dist/plugins/getAction/schemas.d.ts +0 -2
- package/dist/plugins/getAction/schemas.d.ts.map +1 -1
- package/dist/plugins/getApp/index.d.ts +140 -14
- package/dist/plugins/getApp/index.d.ts.map +1 -1
- package/dist/plugins/getApp/index.js +16 -38
- package/dist/plugins/getApp/schemas.d.ts +0 -2
- package/dist/plugins/getApp/schemas.d.ts.map +1 -1
- package/dist/plugins/getConnection/index.d.ts +50 -16
- package/dist/plugins/getConnection/index.d.ts.map +1 -1
- package/dist/plugins/getConnection/index.js +22 -29
- package/dist/plugins/getConnection/schemas.d.ts +0 -2
- package/dist/plugins/getConnection/schemas.d.ts.map +1 -1
- package/dist/plugins/getInputFieldsSchema/index.d.ts +59 -13
- package/dist/plugins/getInputFieldsSchema/index.d.ts.map +1 -1
- package/dist/plugins/getInputFieldsSchema/index.js +21 -32
- package/dist/plugins/getInputFieldsSchema/schemas.d.ts +0 -2
- package/dist/plugins/getInputFieldsSchema/schemas.d.ts.map +1 -1
- package/dist/plugins/getProfile/index.d.ts +25 -18
- package/dist/plugins/getProfile/index.d.ts.map +1 -1
- package/dist/plugins/getProfile/index.js +13 -26
- package/dist/plugins/getProfile/schemas.d.ts +0 -8
- package/dist/plugins/getProfile/schemas.d.ts.map +1 -1
- package/dist/plugins/getProfile/schemas.js +0 -1
- package/dist/plugins/listActions/index.d.ts +73 -23
- package/dist/plugins/listActions/index.d.ts.map +1 -1
- package/dist/plugins/listActions/index.js +25 -53
- package/dist/plugins/listActions/schemas.d.ts +0 -11
- package/dist/plugins/listActions/schemas.d.ts.map +1 -1
- package/dist/plugins/listApps/index.d.ts +121 -13
- package/dist/plugins/listApps/index.d.ts.map +1 -1
- package/dist/plugins/listApps/index.js +22 -31
- package/dist/plugins/listApps/schemas.d.ts +0 -2
- package/dist/plugins/listApps/schemas.d.ts.map +1 -1
- package/dist/plugins/listClientCredentials/index.d.ts +29 -16
- package/dist/plugins/listClientCredentials/index.d.ts.map +1 -1
- package/dist/plugins/listClientCredentials/index.js +17 -37
- package/dist/plugins/listClientCredentials/schemas.d.ts +0 -2
- package/dist/plugins/listClientCredentials/schemas.d.ts.map +1 -1
- package/dist/plugins/listConnections/index.d.ts +95 -17
- package/dist/plugins/listConnections/index.d.ts.map +1 -1
- package/dist/plugins/listConnections/index.js +25 -49
- package/dist/plugins/listConnections/schemas.d.ts +0 -2
- package/dist/plugins/listConnections/schemas.d.ts.map +1 -1
- package/dist/plugins/listInputFieldChoices/index.d.ts +77 -22
- package/dist/plugins/listInputFieldChoices/index.d.ts.map +1 -1
- package/dist/plugins/listInputFieldChoices/index.js +27 -50
- package/dist/plugins/listInputFieldChoices/schemas.d.ts +0 -2
- package/dist/plugins/listInputFieldChoices/schemas.d.ts.map +1 -1
- package/dist/plugins/listInputFields/index.d.ts +154 -22
- package/dist/plugins/listInputFields/index.d.ts.map +1 -1
- package/dist/plugins/listInputFields/index.js +28 -41
- package/dist/plugins/listInputFields/schemas.d.ts +0 -2
- package/dist/plugins/listInputFields/schemas.d.ts.map +1 -1
- package/dist/plugins/manifest/index.d.ts +40 -36
- package/dist/plugins/manifest/index.d.ts.map +1 -1
- package/dist/plugins/manifest/index.js +3 -2
- package/dist/plugins/registry/index.d.ts +11 -9
- package/dist/plugins/registry/index.d.ts.map +1 -1
- package/dist/plugins/registry/index.js +3 -2
- package/dist/plugins/request/index.d.ts +61 -15
- package/dist/plugins/request/index.d.ts.map +1 -1
- package/dist/plugins/request/index.js +14 -22
- package/dist/plugins/request/schemas.d.ts +0 -2
- package/dist/plugins/request/schemas.d.ts.map +1 -1
- package/dist/plugins/runAction/index.d.ts +137 -23
- package/dist/plugins/runAction/index.d.ts.map +1 -1
- package/dist/plugins/runAction/index.js +65 -78
- package/dist/plugins/runAction/schemas.d.ts +0 -10
- package/dist/plugins/runAction/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/createTable/index.d.ts +43 -11
- package/dist/plugins/tables/createTable/index.d.ts.map +1 -1
- package/dist/plugins/tables/createTable/index.js +16 -44
- package/dist/plugins/tables/createTable/schemas.d.ts +0 -2
- package/dist/plugins/tables/createTable/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/createTableFields/index.d.ts +54 -11
- package/dist/plugins/tables/createTableFields/index.d.ts.map +1 -1
- package/dist/plugins/tables/createTableFields/index.js +17 -41
- package/dist/plugins/tables/createTableFields/schemas.d.ts +0 -2
- package/dist/plugins/tables/createTableFields/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/createTableRecords/index.d.ts +47 -11
- package/dist/plugins/tables/createTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/createTableRecords/index.js +17 -43
- package/dist/plugins/tables/createTableRecords/schemas.d.ts +0 -2
- package/dist/plugins/tables/createTableRecords/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTable/index.d.ts +36 -13
- package/dist/plugins/tables/deleteTable/index.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTable/index.js +18 -40
- package/dist/plugins/tables/deleteTable/schemas.d.ts +0 -2
- package/dist/plugins/tables/deleteTable/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTableFields/index.d.ts +36 -11
- package/dist/plugins/tables/deleteTableFields/index.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTableFields/index.js +17 -39
- package/dist/plugins/tables/deleteTableFields/schemas.d.ts +0 -2
- package/dist/plugins/tables/deleteTableFields/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTableRecords/index.d.ts +36 -11
- package/dist/plugins/tables/deleteTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTableRecords/index.js +18 -41
- package/dist/plugins/tables/deleteTableRecords/schemas.d.ts +0 -2
- package/dist/plugins/tables/deleteTableRecords/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/getTable/index.d.ts +43 -12
- package/dist/plugins/tables/getTable/index.d.ts.map +1 -1
- package/dist/plugins/tables/getTable/index.js +18 -43
- package/dist/plugins/tables/getTable/schemas.d.ts +0 -2
- package/dist/plugins/tables/getTable/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/getTableRecord/index.d.ts +43 -11
- package/dist/plugins/tables/getTableRecord/index.d.ts.map +1 -1
- package/dist/plugins/tables/getTableRecord/index.js +18 -42
- package/dist/plugins/tables/getTableRecord/schemas.d.ts +0 -2
- package/dist/plugins/tables/getTableRecord/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/listTableFields/index.d.ts +46 -11
- package/dist/plugins/tables/listTableFields/index.d.ts.map +1 -1
- package/dist/plugins/tables/listTableFields/index.js +17 -41
- package/dist/plugins/tables/listTableFields/schemas.d.ts +0 -2
- package/dist/plugins/tables/listTableFields/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/listTableRecords/index.d.ts +66 -18
- package/dist/plugins/tables/listTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/listTableRecords/index.js +27 -50
- package/dist/plugins/tables/listTableRecords/schemas.d.ts +0 -2
- package/dist/plugins/tables/listTableRecords/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/listTables/index.d.ts +53 -20
- package/dist/plugins/tables/listTables/index.d.ts.map +1 -1
- package/dist/plugins/tables/listTables/index.js +24 -51
- package/dist/plugins/tables/listTables/schemas.d.ts +0 -2
- package/dist/plugins/tables/listTables/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/shared.d.ts +10 -0
- package/dist/plugins/tables/shared.d.ts.map +1 -0
- package/dist/plugins/tables/shared.js +9 -0
- package/dist/plugins/tables/updateTableRecords/index.d.ts +49 -11
- package/dist/plugins/tables/updateTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/updateTableRecords/index.js +20 -43
- package/dist/plugins/tables/updateTableRecords/schemas.d.ts +0 -2
- package/dist/plugins/tables/updateTableRecords/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/utils.d.ts.map +1 -1
- package/dist/plugins/tables/utils.js +1 -0
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +21 -1
- package/dist/resolvers/actionKey.d.ts +1 -2
- package/dist/resolvers/actionKey.d.ts.map +1 -1
- package/dist/resolvers/actionType.d.ts +1 -2
- package/dist/resolvers/actionType.d.ts.map +1 -1
- package/dist/sdk.d.ts +2942 -2
- package/dist/sdk.d.ts.map +1 -1
- package/dist/types/errors.d.ts +13 -10
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +15 -12
- package/dist/types/functions.d.ts +18 -2
- package/dist/types/functions.d.ts.map +1 -1
- package/dist/types/plugin.d.ts +1 -1
- package/dist/types/plugin.d.ts.map +1 -1
- package/dist/types/registry.d.ts +1 -1
- package/dist/types/registry.d.ts.map +1 -1
- package/dist/utils/function-utils.d.ts +11 -12
- package/dist/utils/function-utils.d.ts.map +1 -1
- package/dist/utils/plugin-utils.d.ts +243 -0
- package/dist/utils/plugin-utils.d.ts.map +1 -0
- package/dist/utils/plugin-utils.js +232 -0
- package/package.json +2 -1
|
@@ -1,36 +1,150 @@
|
|
|
1
|
-
import type { Plugin } from "../../types/plugin";
|
|
2
1
|
import type { ApiClient } from "../../api";
|
|
3
|
-
import { RunActionSchema, type RunActionOptions } from "./schemas";
|
|
4
|
-
import type { GetActionPluginProvides } from "../getAction";
|
|
5
|
-
import type { GetAppPluginProvides } from "../getApp";
|
|
6
2
|
import type { GetVersionedImplementationId } from "../manifest/schemas";
|
|
7
3
|
import type { ConnectionsPluginProvides } from "../connections";
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
export declare const CONTEXT_CACHE_TTL_MS = 60000;
|
|
5
|
+
export declare const CONTEXT_CACHE_MAX_SIZE = 500;
|
|
6
|
+
export declare const runActionPlugin: (sdk: {
|
|
7
|
+
getAction: (options?: {
|
|
8
|
+
app: string;
|
|
9
|
+
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
10
|
+
action: string;
|
|
11
|
+
} | {
|
|
12
|
+
appKey: string;
|
|
13
|
+
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
14
|
+
actionKey: string;
|
|
15
|
+
} | undefined) => Promise<{
|
|
16
|
+
data: {
|
|
17
|
+
description: string;
|
|
18
|
+
key: string;
|
|
19
|
+
app_key: string;
|
|
20
|
+
action_type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
21
|
+
title: string;
|
|
22
|
+
type: "action";
|
|
23
|
+
id?: string | undefined;
|
|
24
|
+
is_important?: boolean | undefined;
|
|
25
|
+
is_hidden?: boolean | undefined;
|
|
26
|
+
app_version?: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
}>;
|
|
29
|
+
} & {
|
|
30
|
+
context: {
|
|
31
|
+
meta: {
|
|
32
|
+
getAction: import("../..").PluginMeta;
|
|
33
|
+
};
|
|
18
34
|
};
|
|
35
|
+
} & {
|
|
36
|
+
getApp: (options?: {
|
|
37
|
+
app: string;
|
|
38
|
+
} | {
|
|
39
|
+
appKey: string;
|
|
40
|
+
} | undefined) => Promise<{
|
|
41
|
+
data: {
|
|
42
|
+
slug: string;
|
|
43
|
+
title: string;
|
|
44
|
+
key: string;
|
|
45
|
+
implementation_id: string;
|
|
46
|
+
description?: string | undefined;
|
|
47
|
+
is_hidden?: boolean | undefined;
|
|
48
|
+
auth_type?: string | undefined;
|
|
49
|
+
actions?: {
|
|
50
|
+
read?: number | undefined;
|
|
51
|
+
read_bulk?: number | undefined;
|
|
52
|
+
write?: number | undefined;
|
|
53
|
+
search?: number | undefined;
|
|
54
|
+
search_or_write?: number | undefined;
|
|
55
|
+
search_and_write?: number | undefined;
|
|
56
|
+
filter?: number | undefined;
|
|
57
|
+
} | undefined;
|
|
58
|
+
is_deprecated?: boolean | undefined;
|
|
59
|
+
is_beta?: boolean | undefined;
|
|
60
|
+
is_premium?: boolean | undefined;
|
|
61
|
+
age_in_days?: number | undefined;
|
|
62
|
+
banner?: string | undefined;
|
|
63
|
+
categories?: {
|
|
64
|
+
id: number;
|
|
65
|
+
name: string;
|
|
66
|
+
slug: string;
|
|
67
|
+
}[] | undefined;
|
|
68
|
+
images?: {
|
|
69
|
+
url_16x16?: string | undefined;
|
|
70
|
+
url_32x32?: string | undefined;
|
|
71
|
+
url_64x64?: string | undefined;
|
|
72
|
+
url_128x128?: string | undefined;
|
|
73
|
+
} | undefined;
|
|
74
|
+
popularity?: number | undefined;
|
|
75
|
+
has_filters?: boolean | undefined;
|
|
76
|
+
has_reads?: boolean | undefined;
|
|
77
|
+
has_searches?: boolean | undefined;
|
|
78
|
+
has_searches_or_writes?: boolean | undefined;
|
|
79
|
+
has_upfront_fields?: boolean | undefined;
|
|
80
|
+
has_writes?: boolean | undefined;
|
|
81
|
+
is_built_in?: boolean | undefined;
|
|
82
|
+
is_featured?: boolean | undefined;
|
|
83
|
+
is_invite?: boolean | undefined;
|
|
84
|
+
is_public?: boolean | undefined;
|
|
85
|
+
is_upcoming?: boolean | undefined;
|
|
86
|
+
visibility?: string | undefined;
|
|
87
|
+
primary_color?: string | undefined;
|
|
88
|
+
secondary_color?: string | undefined;
|
|
89
|
+
classification?: string | undefined;
|
|
90
|
+
api_docs_url?: string | undefined;
|
|
91
|
+
image?: string | undefined;
|
|
92
|
+
version?: string | undefined;
|
|
93
|
+
};
|
|
94
|
+
}>;
|
|
95
|
+
} & {
|
|
19
96
|
context: {
|
|
20
97
|
meta: {
|
|
21
|
-
|
|
22
|
-
inputSchema: typeof RunActionSchema;
|
|
23
|
-
};
|
|
98
|
+
getApp: import("../..").PluginMeta;
|
|
24
99
|
};
|
|
25
100
|
};
|
|
26
|
-
}
|
|
27
|
-
export declare const CONTEXT_CACHE_TTL_MS = 60000;
|
|
28
|
-
export declare const CONTEXT_CACHE_MAX_SIZE = 500;
|
|
29
|
-
export declare const runActionPlugin: Plugin<GetActionPluginProvides & GetAppPluginProvides & {
|
|
101
|
+
} & {
|
|
30
102
|
context: {
|
|
31
103
|
api: ApiClient;
|
|
32
104
|
getVersionedImplementationId: GetVersionedImplementationId;
|
|
33
105
|
} & ConnectionsPluginProvides["context"];
|
|
34
|
-
} &
|
|
35
|
-
|
|
106
|
+
} & {
|
|
107
|
+
context: import("../eventEmission").EventEmissionContext;
|
|
108
|
+
} & {
|
|
109
|
+
context: {
|
|
110
|
+
meta: Record<string, import("../..").PluginMeta>;
|
|
111
|
+
};
|
|
112
|
+
}) => {
|
|
113
|
+
runAction: (options?: (({
|
|
114
|
+
app: string;
|
|
115
|
+
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
116
|
+
action: string;
|
|
117
|
+
connection?: string | number | undefined;
|
|
118
|
+
connectionId?: string | number | null | undefined;
|
|
119
|
+
authenticationId?: string | number | null | undefined;
|
|
120
|
+
inputs?: Record<string, unknown> | undefined;
|
|
121
|
+
timeoutMs?: number | undefined;
|
|
122
|
+
pageSize?: number | undefined;
|
|
123
|
+
maxItems?: number | undefined;
|
|
124
|
+
cursor?: string | undefined;
|
|
125
|
+
} | {
|
|
126
|
+
appKey: string;
|
|
127
|
+
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
128
|
+
actionKey: string;
|
|
129
|
+
connection?: string | number | undefined;
|
|
130
|
+
connectionId?: string | number | null | undefined;
|
|
131
|
+
authenticationId?: string | number | null | undefined;
|
|
132
|
+
inputs?: Record<string, unknown> | undefined;
|
|
133
|
+
timeoutMs?: number | undefined;
|
|
134
|
+
pageSize?: number | undefined;
|
|
135
|
+
maxItems?: number | undefined;
|
|
136
|
+
cursor?: string | undefined;
|
|
137
|
+
}) & {
|
|
138
|
+
cursor?: string;
|
|
139
|
+
pageSize?: number;
|
|
140
|
+
maxItems?: number;
|
|
141
|
+
}) | undefined) => import("../..").PaginatedSdkResult<unknown>;
|
|
142
|
+
} & {
|
|
143
|
+
context: {
|
|
144
|
+
meta: {
|
|
145
|
+
runAction: import("../..").PluginMeta;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
export type RunActionPluginProvides = ReturnType<typeof runActionPlugin>;
|
|
36
150
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/runAction/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/runAction/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAiB3C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AA0GhE,eAAO,MAAM,oBAAoB,QAAS,CAAC;AAC3C,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAIX;QACP,GAAG,EAAE,SAAS,CAAC;QACf,4BAA4B,EAAE,4BAA4B,CAAC;KAC5D,GAAG,yBAAyB,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuL/C,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { definePlugin } from "../../utils/plugin-utils";
|
|
2
|
+
import { createPaginatedPluginMethod } from "../../utils/plugin-utils";
|
|
3
|
+
import { RunActionInputSchema } from "./schemas";
|
|
2
4
|
import { ActionResultItemSchema } from "../../schemas/Run";
|
|
3
5
|
import { ZapierValidationError, ZapierConfigurationError, ZapierActionError, } from "../../types/errors";
|
|
4
|
-
import { createPaginatedFunction } from "../../utils/function-utils";
|
|
5
6
|
import { appKeyResolver, actionTypeResolver, actionKeyResolver, connectionIdResolver, inputsResolver, } from "../../resolvers";
|
|
6
|
-
import { createTelemetryCallback } from "../../utils/telemetry-utils";
|
|
7
7
|
import { resolveConnectionId } from "../../utils/domain-utils";
|
|
8
|
-
import { stripPageSuffix } from "../../utils/string-utils";
|
|
9
8
|
import { DEFAULT_ACTION_TIMEOUT_MS } from "../../constants";
|
|
10
9
|
import { setMethodMetadata } from "../../utils/telemetry-context";
|
|
11
10
|
import { buildActionRunContext } from "@zapier/policy-context";
|
|
@@ -46,6 +45,7 @@ async function executeAction(actionOptions) {
|
|
|
46
45
|
successStatus: 200,
|
|
47
46
|
pendingStatus: 202,
|
|
48
47
|
timeoutMs: timeoutMs ?? DEFAULT_ACTION_TIMEOUT_MS,
|
|
48
|
+
resource: { type: "run", id: runId },
|
|
49
49
|
isPending: (result) => {
|
|
50
50
|
const data = result?.data;
|
|
51
51
|
return data?.status === "waiting";
|
|
@@ -55,7 +55,7 @@ async function executeAction(actionOptions) {
|
|
|
55
55
|
}
|
|
56
56
|
export const CONTEXT_CACHE_TTL_MS = 60000;
|
|
57
57
|
export const CONTEXT_CACHE_MAX_SIZE = 500;
|
|
58
|
-
export const runActionPlugin = (sdk) => {
|
|
58
|
+
export const runActionPlugin = definePlugin((sdk) => {
|
|
59
59
|
// Intentionally kept inline — only this plugin needs this pattern today.
|
|
60
60
|
// If a second plugin needs a bounded TTL cache, extract to a shared utility.
|
|
61
61
|
const runActionContextCache = new Map();
|
|
@@ -119,80 +119,67 @@ export const runActionPlugin = (sdk) => {
|
|
|
119
119
|
}
|
|
120
120
|
return { selectedApi, actionId: actionData.data.id };
|
|
121
121
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
actionType,
|
|
152
|
-
executionOptions: { inputs },
|
|
153
|
-
cursor,
|
|
154
|
-
connectionId: resolvedConnectionId,
|
|
155
|
-
timeoutMs,
|
|
156
|
-
});
|
|
157
|
-
// Check for errors in the result and throw if present
|
|
158
|
-
if (result.errors && result.errors.length > 0) {
|
|
159
|
-
const errorMessage = result.errors
|
|
160
|
-
.map((error) => error.detail || error.title || "Unknown error")
|
|
161
|
-
.join("; ");
|
|
162
|
-
throw new ZapierActionError(`Action execution failed: ${errorMessage}`, {
|
|
122
|
+
// No defaultPageSize — we leave the default to the Actions API rather
|
|
123
|
+
// than eagerly running more actions than the user intends to (and avoid
|
|
124
|
+
// hitting app rate limits).
|
|
125
|
+
return createPaginatedPluginMethod(sdk, {
|
|
126
|
+
name: "runAction",
|
|
127
|
+
categories: ["action"],
|
|
128
|
+
type: "list",
|
|
129
|
+
itemType: "ActionResult",
|
|
130
|
+
inputSchema: RunActionInputSchema,
|
|
131
|
+
outputSchema: ActionResultItemSchema,
|
|
132
|
+
resolvers: {
|
|
133
|
+
app: appKeyResolver,
|
|
134
|
+
actionType: actionTypeResolver,
|
|
135
|
+
action: actionKeyResolver,
|
|
136
|
+
connection: connectionIdResolver,
|
|
137
|
+
inputs: inputsResolver,
|
|
138
|
+
},
|
|
139
|
+
handler: async ({ sdk, options, }) => {
|
|
140
|
+
const { api } = sdk.context;
|
|
141
|
+
const appKey = "app" in options ? options.app : options.appKey;
|
|
142
|
+
const actionKey = "action" in options ? options.action : options.actionKey;
|
|
143
|
+
const { actionType, connectionId, connection, authenticationId, inputs = {}, cursor, timeoutMs, } = options;
|
|
144
|
+
const resolvedConnectionId = await resolveConnectionId({
|
|
145
|
+
connectionId,
|
|
146
|
+
connection,
|
|
147
|
+
authenticationId,
|
|
148
|
+
resolveConnection: sdk.context.resolveConnection,
|
|
149
|
+
});
|
|
150
|
+
const { selectedApi, actionId } = await getRunActionContext({
|
|
163
151
|
appKey,
|
|
164
152
|
actionKey,
|
|
153
|
+
actionType,
|
|
165
154
|
});
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
},
|
|
195
|
-
},
|
|
155
|
+
setMethodMetadata({
|
|
156
|
+
selectedApi,
|
|
157
|
+
operationType: actionType,
|
|
158
|
+
operationKey: actionKey,
|
|
159
|
+
});
|
|
160
|
+
const result = await executeAction({
|
|
161
|
+
api,
|
|
162
|
+
selectedApi,
|
|
163
|
+
// Some actions require the action ID, but it's not guaranteed
|
|
164
|
+
// available at retrieval time (legacy), so pass everything through.
|
|
165
|
+
actionId,
|
|
166
|
+
actionKey,
|
|
167
|
+
actionType,
|
|
168
|
+
executionOptions: { inputs },
|
|
169
|
+
cursor,
|
|
170
|
+
connectionId: resolvedConnectionId,
|
|
171
|
+
timeoutMs,
|
|
172
|
+
});
|
|
173
|
+
if (result.errors && result.errors.length > 0) {
|
|
174
|
+
const errorMessage = result.errors
|
|
175
|
+
.map((error) => error.detail || error.title || "Unknown error")
|
|
176
|
+
.join("; ");
|
|
177
|
+
throw new ZapierActionError(`Action execution failed: ${errorMessage}`, { appKey, actionKey });
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
data: result.results || [],
|
|
181
|
+
nextCursor: result.next_page,
|
|
182
|
+
};
|
|
196
183
|
},
|
|
197
|
-
};
|
|
198
|
-
};
|
|
184
|
+
});
|
|
185
|
+
});
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type { PaginatedSdkFunction } from "../../types/functions";
|
|
3
|
-
import type { ZapierActionError, ZapierValidationError, ZapierConfigurationError, ZapierUnknownError } from "../../types/errors";
|
|
4
2
|
export declare const RunActionSchema: z.ZodObject<{
|
|
5
3
|
app: z.ZodString & {
|
|
6
4
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
@@ -106,13 +104,5 @@ export type RunActionOptions = z.infer<typeof RunActionSchema> | (Omit<z.infer<t
|
|
|
106
104
|
/** @deprecated Use `action` instead. */
|
|
107
105
|
actionKey: z.infer<typeof RunActionSchemaDeprecated>["actionKey"];
|
|
108
106
|
});
|
|
109
|
-
export interface RunActionPage {
|
|
110
|
-
data: unknown[];
|
|
111
|
-
nextCursor?: string;
|
|
112
|
-
}
|
|
113
|
-
export type RunActionError = ZapierActionError | ZapierValidationError | ZapierConfigurationError | ZapierUnknownError;
|
|
114
|
-
export interface RunActionSdkFunction {
|
|
115
|
-
runAction: PaginatedSdkFunction<RunActionOptions, unknown>;
|
|
116
|
-
}
|
|
117
107
|
export {};
|
|
118
108
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/runAction/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/runAction/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA6CxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;iBAexB,CAAC;AAGL,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;iBAMF,CAAC;AAG9B,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAEA,CAAC;AAGlC,MAAM,MAAM,gBAAgB,GACxB,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,GAC/B,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAC,GAAG;IACzE,qCAAqC;IACrC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC5D,wCAAwC;IACxC,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC,WAAW,CAAC,CAAC;CACnE,CAAC,CAAC"}
|
|
@@ -1,16 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export declare const createTablePlugin: (sdk: {
|
|
2
|
+
context: {
|
|
3
|
+
api: import("../../../api").ApiClient;
|
|
4
|
+
resolveCredentials: () => Promise<string | {
|
|
5
|
+
clientId: string;
|
|
6
|
+
clientSecret: string;
|
|
7
|
+
type?: "client_credentials" | undefined;
|
|
8
|
+
baseUrl?: string | undefined;
|
|
9
|
+
scope?: string | undefined;
|
|
10
|
+
} | {
|
|
11
|
+
clientId: string;
|
|
12
|
+
type?: "pkce" | undefined;
|
|
13
|
+
baseUrl?: string | undefined;
|
|
14
|
+
scope?: string | undefined;
|
|
15
|
+
} | undefined>;
|
|
16
|
+
};
|
|
17
|
+
} & {
|
|
18
|
+
context: import("../../eventEmission").EventEmissionContext;
|
|
19
|
+
} & {
|
|
20
|
+
context: {
|
|
21
|
+
meta: Record<string, import("../../..").PluginMeta>;
|
|
22
|
+
};
|
|
23
|
+
}) => {
|
|
24
|
+
createTable: (options?: {
|
|
25
|
+
name: string;
|
|
26
|
+
description?: string | undefined;
|
|
27
|
+
} | undefined) => Promise<{
|
|
28
|
+
data: {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
created_at: string;
|
|
32
|
+
edited_at: string;
|
|
33
|
+
kind: "table" | "virtual_table";
|
|
34
|
+
account_id: string;
|
|
35
|
+
profile_id: string;
|
|
36
|
+
description?: string | undefined;
|
|
37
|
+
parent_table_id?: string | undefined;
|
|
38
|
+
};
|
|
39
|
+
}>;
|
|
40
|
+
} & {
|
|
7
41
|
context: {
|
|
8
42
|
meta: {
|
|
9
|
-
createTable:
|
|
10
|
-
inputSchema: typeof CreateTableOptionsSchema;
|
|
11
|
-
};
|
|
43
|
+
createTable: import("../../..").PluginMeta;
|
|
12
44
|
};
|
|
13
45
|
};
|
|
14
|
-
}
|
|
15
|
-
export
|
|
46
|
+
};
|
|
47
|
+
export type CreateTablePluginProvides = ReturnType<typeof createTablePlugin>;
|
|
16
48
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/createTable/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/createTable/index.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoB7B,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -1,48 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { definePlugin } from "../../../utils/plugin-utils";
|
|
2
|
+
import { createPluginMethod } from "../../../utils/plugin-utils";
|
|
2
3
|
import { CreateTableOptionsSchema, CreateTableApiResponseSchema, TableItemSchema, } from "./schemas";
|
|
3
|
-
import { createTelemetryCallback } from "../../../utils/telemetry-utils";
|
|
4
|
-
import { ZapierAuthenticationError } from "../../../types/errors";
|
|
5
4
|
import { tableNameResolver } from "../../../resolvers";
|
|
6
5
|
import { transformTableItem } from "../utils";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (status === 403) {
|
|
19
|
-
return new ZapierAuthenticationError(`Access forbidden. Your token may not have the required scopes to create tables. (HTTP ${status})`, { statusCode: status });
|
|
20
|
-
}
|
|
21
|
-
return undefined;
|
|
22
|
-
},
|
|
23
|
-
authRequired: true,
|
|
24
|
-
});
|
|
6
|
+
import { tablesDefaults } from "../shared";
|
|
7
|
+
export const createTablePlugin = definePlugin((sdk) => createPluginMethod(sdk, {
|
|
8
|
+
...tablesDefaults,
|
|
9
|
+
name: "createTable",
|
|
10
|
+
type: "create",
|
|
11
|
+
itemType: "Table",
|
|
12
|
+
inputSchema: CreateTableOptionsSchema,
|
|
13
|
+
outputSchema: TableItemSchema,
|
|
14
|
+
resolvers: { name: tableNameResolver },
|
|
15
|
+
handler: async ({ sdk, options }) => {
|
|
16
|
+
const rawResponse = await sdk.context.api.post("/tables/api/v1/tables", { name: options.name, description: options.description }, { authRequired: true });
|
|
25
17
|
const response = CreateTableApiResponseSchema.parse(rawResponse);
|
|
26
|
-
return {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
const createTableDefinition = createFunction(createTable, CreateTableOptionsSchema, createTelemetryCallback(sdk.context.eventEmission.emitMethodCalled, createTable.name));
|
|
31
|
-
return {
|
|
32
|
-
createTable: createTableDefinition,
|
|
33
|
-
context: {
|
|
34
|
-
meta: {
|
|
35
|
-
createTable: {
|
|
36
|
-
categories: ["table"],
|
|
37
|
-
type: "create",
|
|
38
|
-
itemType: "Table",
|
|
39
|
-
inputSchema: CreateTableOptionsSchema,
|
|
40
|
-
outputSchema: TableItemSchema,
|
|
41
|
-
resolvers: {
|
|
42
|
-
name: tableNameResolver,
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
};
|
|
18
|
+
return { data: transformTableItem(response.data) };
|
|
19
|
+
},
|
|
20
|
+
}));
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { FunctionOptions } from "../../../types/functions";
|
|
3
|
-
import type { ZapierAuthenticationError, ZapierApiError, ZapierValidationError, ZapierUnknownError } from "../../../types/errors";
|
|
4
3
|
import { TableItemSchema, TableApiItemSchema, type TableItem, type TableApiItem } from "../listTables/schemas";
|
|
5
4
|
export { TableItemSchema, TableApiItemSchema };
|
|
6
5
|
export type { TableItem, TableApiItem };
|
|
@@ -32,7 +31,6 @@ export type CreateTableOptions = z.infer<typeof CreateTableOptionsSchema> & Func
|
|
|
32
31
|
export interface CreateTableResult {
|
|
33
32
|
data: TableItem;
|
|
34
33
|
}
|
|
35
|
-
export type CreateTableError = ZapierAuthenticationError | ZapierApiError | ZapierValidationError | ZapierUnknownError;
|
|
36
34
|
export interface CreateTableSdkFunction {
|
|
37
35
|
createTable: (options: CreateTableOptions) => Promise<CreateTableResult>;
|
|
38
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/createTable/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/createTable/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,KAAK,SAAS,EACd,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,CAAC;AAC/C,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;AAExC,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;iBAEvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;iBAQJ,CAAC;AAElC,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,GACvE,eAAe,CAAC;AAGlB,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,SAAS,CAAC;CACjB;AAGD,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC1E"}
|
|
@@ -1,16 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export declare const createTableFieldsPlugin: (sdk: {
|
|
2
|
+
context: {
|
|
3
|
+
api: import("../../../api").ApiClient;
|
|
4
|
+
resolveCredentials: () => Promise<string | {
|
|
5
|
+
clientId: string;
|
|
6
|
+
clientSecret: string;
|
|
7
|
+
type?: "client_credentials" | undefined;
|
|
8
|
+
baseUrl?: string | undefined;
|
|
9
|
+
scope?: string | undefined;
|
|
10
|
+
} | {
|
|
11
|
+
clientId: string;
|
|
12
|
+
type?: "pkce" | undefined;
|
|
13
|
+
baseUrl?: string | undefined;
|
|
14
|
+
scope?: string | undefined;
|
|
15
|
+
} | undefined>;
|
|
16
|
+
};
|
|
17
|
+
} & {
|
|
18
|
+
context: import("../../eventEmission").EventEmissionContext;
|
|
19
|
+
} & {
|
|
20
|
+
context: {
|
|
21
|
+
meta: Record<string, import("../../..").PluginMeta>;
|
|
22
|
+
};
|
|
23
|
+
}) => {
|
|
24
|
+
createTableFields: (options?: {
|
|
25
|
+
table: string;
|
|
26
|
+
fields: {
|
|
27
|
+
type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
|
|
28
|
+
name: string;
|
|
29
|
+
options?: Record<string, unknown> | undefined;
|
|
30
|
+
config?: Record<string, unknown> | undefined;
|
|
31
|
+
}[];
|
|
32
|
+
} | {
|
|
33
|
+
tableId: string;
|
|
34
|
+
fields: {
|
|
35
|
+
type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
|
|
36
|
+
name: string;
|
|
37
|
+
options?: Record<string, unknown> | undefined;
|
|
38
|
+
config?: Record<string, unknown> | undefined;
|
|
39
|
+
}[];
|
|
40
|
+
} | undefined) => Promise<{
|
|
41
|
+
data: {
|
|
42
|
+
id: string;
|
|
43
|
+
type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
|
|
44
|
+
name: string;
|
|
45
|
+
created_at?: string | undefined;
|
|
46
|
+
edited_at?: string | undefined;
|
|
47
|
+
options?: Record<string, unknown> | undefined;
|
|
48
|
+
config?: Record<string, unknown> | undefined;
|
|
49
|
+
}[];
|
|
50
|
+
}>;
|
|
51
|
+
} & {
|
|
7
52
|
context: {
|
|
8
53
|
meta: {
|
|
9
|
-
createTableFields:
|
|
10
|
-
inputSchema: typeof CreateTableFieldsOptionsSchema;
|
|
11
|
-
};
|
|
54
|
+
createTableFields: import("../../..").PluginMeta;
|
|
12
55
|
};
|
|
13
56
|
};
|
|
14
|
-
}
|
|
15
|
-
export
|
|
57
|
+
};
|
|
58
|
+
export type CreateTableFieldsPluginProvides = ReturnType<typeof createTableFieldsPlugin>;
|
|
16
59
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/createTableFields/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/createTableFields/index.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BnC,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG,UAAU,CACtD,OAAO,uBAAuB,CAC/B,CAAC"}
|