@zapier/zapier-sdk 0.45.2 → 0.46.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +24 -7
- package/dist/api/schemas.d.ts +5 -5
- package/dist/api/types.d.ts +17 -0
- package/dist/api/types.d.ts.map +1 -1
- package/dist/auth.d.ts +27 -6
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +130 -92
- package/dist/cache.d.ts +50 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +47 -0
- package/dist/index.cjs +3108 -3695
- package/dist/index.d.mts +6735 -2188
- 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 +3105 -3696
- 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 +4 -6
- 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 +4 -6
- 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 +4 -15
- 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 +4 -6
- 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 +4 -6
- 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 +4 -14
- 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 +21 -23
- 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 +12 -14
- 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 +6 -8
- 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/schemas/Action.d.ts +1 -1
- package/dist/sdk.d.ts +2942 -2
- package/dist/sdk.d.ts.map +1 -1
- package/dist/types/credentials.d.ts +2 -1
- package/dist/types/credentials.d.ts.map +1 -1
- package/dist/types/credentials.js +2 -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/properties.d.ts +1 -1
- package/dist/types/registry.d.ts +1 -1
- package/dist/types/registry.d.ts.map +1 -1
- package/dist/types/sdk.d.ts +2 -0
- package/dist/types/sdk.d.ts.map +1 -1
- package/dist/types/sdk.js +1 -0
- 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 +168 -0
- package/dist/utils/plugin-utils.d.ts.map +1 -0
- package/dist/utils/plugin-utils.js +132 -0
- package/package.json +2 -4
|
@@ -1,35 +1,167 @@
|
|
|
1
|
-
import type { Plugin } from "../../types/plugin";
|
|
2
1
|
import type { ApiClient } from "../../api";
|
|
3
|
-
import type {
|
|
4
|
-
import { ListInputFieldsSchema, type ListInputFieldsOptions } from "./schemas";
|
|
5
|
-
import type { GetAppPluginProvides } from "../getApp";
|
|
6
|
-
import type { GetActionPluginProvides } from "../getAction";
|
|
2
|
+
import type { FieldsetItem } from "../../types/domain";
|
|
7
3
|
import type { GetVersionedImplementationId } from "../manifest/schemas";
|
|
8
|
-
import type { EventEmissionProvides } from "../eventEmission";
|
|
9
4
|
import type { ConnectionsPluginProvides } from "../connections";
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
export declare const listInputFieldsPlugin: (sdk: {
|
|
6
|
+
getApp: (options?: {
|
|
7
|
+
app: string;
|
|
8
|
+
} | {
|
|
9
|
+
appKey: string;
|
|
10
|
+
} | undefined) => Promise<{
|
|
11
|
+
data: {
|
|
12
|
+
slug: string;
|
|
13
|
+
title: string;
|
|
14
|
+
key: string;
|
|
15
|
+
implementation_id: string;
|
|
16
|
+
description?: string | undefined;
|
|
17
|
+
is_hidden?: boolean | undefined;
|
|
18
|
+
auth_type?: string | undefined;
|
|
19
|
+
actions?: {
|
|
20
|
+
read?: number | undefined;
|
|
21
|
+
read_bulk?: number | undefined;
|
|
22
|
+
write?: number | undefined;
|
|
23
|
+
search?: number | undefined;
|
|
24
|
+
search_or_write?: number | undefined;
|
|
25
|
+
search_and_write?: number | undefined;
|
|
26
|
+
filter?: number | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
is_deprecated?: boolean | undefined;
|
|
29
|
+
is_beta?: boolean | undefined;
|
|
30
|
+
is_premium?: boolean | undefined;
|
|
31
|
+
age_in_days?: number | undefined;
|
|
32
|
+
banner?: string | undefined;
|
|
33
|
+
categories?: {
|
|
34
|
+
id: number;
|
|
35
|
+
name: string;
|
|
36
|
+
slug: string;
|
|
37
|
+
}[] | undefined;
|
|
38
|
+
images?: {
|
|
39
|
+
url_16x16?: string | undefined;
|
|
40
|
+
url_32x32?: string | undefined;
|
|
41
|
+
url_64x64?: string | undefined;
|
|
42
|
+
url_128x128?: string | undefined;
|
|
43
|
+
} | undefined;
|
|
44
|
+
popularity?: number | undefined;
|
|
45
|
+
has_filters?: boolean | undefined;
|
|
46
|
+
has_reads?: boolean | undefined;
|
|
47
|
+
has_searches?: boolean | undefined;
|
|
48
|
+
has_searches_or_writes?: boolean | undefined;
|
|
49
|
+
has_upfront_fields?: boolean | undefined;
|
|
50
|
+
has_writes?: boolean | undefined;
|
|
51
|
+
is_built_in?: boolean | undefined;
|
|
52
|
+
is_featured?: boolean | undefined;
|
|
53
|
+
is_invite?: boolean | undefined;
|
|
54
|
+
is_public?: boolean | undefined;
|
|
55
|
+
is_upcoming?: boolean | undefined;
|
|
56
|
+
visibility?: string | undefined;
|
|
57
|
+
primary_color?: string | undefined;
|
|
58
|
+
secondary_color?: string | undefined;
|
|
59
|
+
classification?: string | undefined;
|
|
60
|
+
api_docs_url?: string | undefined;
|
|
61
|
+
image?: string | undefined;
|
|
62
|
+
version?: string | undefined;
|
|
63
|
+
};
|
|
64
|
+
}>;
|
|
65
|
+
} & {
|
|
66
|
+
context: {
|
|
67
|
+
meta: {
|
|
68
|
+
getApp: import("../..").PluginMeta;
|
|
69
|
+
};
|
|
19
70
|
};
|
|
71
|
+
} & {
|
|
72
|
+
getAction: (options?: {
|
|
73
|
+
app: string;
|
|
74
|
+
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
75
|
+
action: string;
|
|
76
|
+
} | {
|
|
77
|
+
appKey: string;
|
|
78
|
+
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
79
|
+
actionKey: string;
|
|
80
|
+
} | undefined) => Promise<{
|
|
81
|
+
data: {
|
|
82
|
+
description: string;
|
|
83
|
+
key: string;
|
|
84
|
+
app_key: string;
|
|
85
|
+
action_type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
86
|
+
title: string;
|
|
87
|
+
type: "action";
|
|
88
|
+
id?: string | undefined;
|
|
89
|
+
is_important?: boolean | undefined;
|
|
90
|
+
is_hidden?: boolean | undefined;
|
|
91
|
+
app_version?: string | undefined;
|
|
92
|
+
};
|
|
93
|
+
}>;
|
|
94
|
+
} & {
|
|
20
95
|
context: {
|
|
21
96
|
meta: {
|
|
22
|
-
|
|
23
|
-
inputSchema: typeof ListInputFieldsSchema;
|
|
24
|
-
};
|
|
97
|
+
getAction: import("../..").PluginMeta;
|
|
25
98
|
};
|
|
26
99
|
};
|
|
27
|
-
}
|
|
28
|
-
export declare const listInputFieldsPlugin: Plugin<GetAppPluginProvides & GetActionPluginProvides & {
|
|
100
|
+
} & {
|
|
29
101
|
context: {
|
|
30
102
|
api: ApiClient;
|
|
31
103
|
getVersionedImplementationId: GetVersionedImplementationId;
|
|
32
104
|
} & ConnectionsPluginProvides["context"];
|
|
33
|
-
} &
|
|
34
|
-
|
|
105
|
+
} & {
|
|
106
|
+
context: import("../eventEmission").EventEmissionContext;
|
|
107
|
+
} & {
|
|
108
|
+
context: {
|
|
109
|
+
meta: Record<string, import("../..").PluginMeta>;
|
|
110
|
+
};
|
|
111
|
+
}) => {
|
|
112
|
+
listInputFields: (options?: (({
|
|
113
|
+
app: string;
|
|
114
|
+
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
115
|
+
action: string;
|
|
116
|
+
connection?: string | number | undefined;
|
|
117
|
+
connectionId?: string | number | null | undefined;
|
|
118
|
+
authenticationId?: string | number | null | undefined;
|
|
119
|
+
inputs?: Record<string, unknown> | undefined;
|
|
120
|
+
pageSize?: number | undefined;
|
|
121
|
+
maxItems?: number | undefined;
|
|
122
|
+
cursor?: string | undefined;
|
|
123
|
+
} | {
|
|
124
|
+
appKey: string;
|
|
125
|
+
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
126
|
+
actionKey: string;
|
|
127
|
+
connection?: string | number | undefined;
|
|
128
|
+
connectionId?: string | number | null | undefined;
|
|
129
|
+
authenticationId?: string | number | null | undefined;
|
|
130
|
+
inputs?: Record<string, unknown> | undefined;
|
|
131
|
+
pageSize?: number | undefined;
|
|
132
|
+
maxItems?: number | undefined;
|
|
133
|
+
cursor?: string | undefined;
|
|
134
|
+
}) & {
|
|
135
|
+
cursor?: string;
|
|
136
|
+
pageSize?: number;
|
|
137
|
+
maxItems?: number;
|
|
138
|
+
}) | undefined) => import("../..").PaginatedSdkResult<{
|
|
139
|
+
key: string;
|
|
140
|
+
type: "input_field";
|
|
141
|
+
default_value: string;
|
|
142
|
+
depends_on: string[];
|
|
143
|
+
description: string;
|
|
144
|
+
invalidates_input_fields: boolean;
|
|
145
|
+
is_required: boolean;
|
|
146
|
+
placeholder: string;
|
|
147
|
+
title: string;
|
|
148
|
+
value_type: string;
|
|
149
|
+
format?: string | undefined;
|
|
150
|
+
items?: {
|
|
151
|
+
type: string;
|
|
152
|
+
} | undefined;
|
|
153
|
+
} | {
|
|
154
|
+
key: string;
|
|
155
|
+
type: "info_field";
|
|
156
|
+
description: string;
|
|
157
|
+
title?: string | undefined;
|
|
158
|
+
} | FieldsetItem>;
|
|
159
|
+
} & {
|
|
160
|
+
context: {
|
|
161
|
+
meta: {
|
|
162
|
+
listInputFields: import("../..").PluginMeta;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
export type ListInputFieldsPluginProvides = ReturnType<typeof listInputFieldsPlugin>;
|
|
35
167
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/listInputFields/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/listInputFields/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,KAAK,EAGV,YAAY,EAEb,MAAM,oBAAoB,CAAC;AAM5B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAYxE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AA4JhE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAIjB;QACP,GAAG,EAAE,SAAS,CAAC;QACf,4BAA4B,EAAE,4BAA4B,CAAC;KAC5D,GAAG,yBAAyB,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+E/C,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,UAAU,CACpD,OAAO,qBAAqB,CAC7B,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { definePlugin } from "../../utils/plugin-utils";
|
|
2
|
+
import { createPaginatedPluginMethod } from "../../utils/plugin-utils";
|
|
3
|
+
import { ListInputFieldsInputSchema } from "./schemas";
|
|
2
4
|
import { ZapierConfigurationError } from "../../types/errors";
|
|
3
|
-
import { createPaginatedFunction } from "../../utils/function-utils";
|
|
4
5
|
import { DEFAULT_PAGE_SIZE } from "../../constants";
|
|
5
6
|
import { appKeyResolver, actionTypeResolver, actionKeyResolver, connectionIdResolver, inputsAllOptionalResolver, } from "../../resolvers";
|
|
6
7
|
import { RootFieldItemSchema } from "../../schemas/Field";
|
|
7
|
-
import { toTitleCase
|
|
8
|
+
import { toTitleCase } from "../../utils/string-utils";
|
|
8
9
|
import { fetchImplementationNeeds } from "../../services/implementations";
|
|
9
|
-
import { createTelemetryCallback } from "../../utils/telemetry-utils";
|
|
10
10
|
import { resolveConnectionId } from "../../utils/domain-utils";
|
|
11
11
|
import { setMethodMetadata } from "../../utils/telemetry-context";
|
|
12
12
|
// Enums for input field transformation
|
|
@@ -147,20 +147,34 @@ function transformNeedsToFields(needs) {
|
|
|
147
147
|
}
|
|
148
148
|
return rootFields;
|
|
149
149
|
}
|
|
150
|
-
export const listInputFieldsPlugin = (sdk) => {
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
export const listInputFieldsPlugin = definePlugin((sdk) => createPaginatedPluginMethod(sdk, {
|
|
151
|
+
name: "listInputFields",
|
|
152
|
+
categories: ["action"],
|
|
153
|
+
type: "list",
|
|
154
|
+
itemType: "RootFieldItem",
|
|
155
|
+
inputSchema: ListInputFieldsInputSchema,
|
|
156
|
+
outputSchema: RootFieldItemSchema,
|
|
157
|
+
defaultPageSize: DEFAULT_PAGE_SIZE,
|
|
158
|
+
resolvers: {
|
|
159
|
+
app: appKeyResolver,
|
|
160
|
+
actionType: actionTypeResolver,
|
|
161
|
+
action: actionKeyResolver,
|
|
162
|
+
connection: connectionIdResolver,
|
|
163
|
+
inputs: inputsAllOptionalResolver,
|
|
164
|
+
},
|
|
165
|
+
handler: async ({ sdk, options, }) => {
|
|
166
|
+
// pageSize/cursor ignored — this endpoint is single-page; pagination
|
|
167
|
+
// helpers around it just yield the one page.
|
|
153
168
|
const { api, getVersionedImplementationId } = sdk.context;
|
|
154
169
|
const appKey = "app" in options ? options.app : options.appKey;
|
|
155
170
|
const actionKey = "action" in options ? options.action : options.actionKey;
|
|
156
|
-
const { actionType, connection, connectionId, authenticationId, inputs } = options;
|
|
171
|
+
const { actionType, connection, connectionId, authenticationId, inputs, } = options;
|
|
157
172
|
const resolvedConnectionId = await resolveConnectionId({
|
|
158
173
|
connection,
|
|
159
174
|
connectionId,
|
|
160
175
|
authenticationId,
|
|
161
176
|
resolveConnection: sdk.context.resolveConnection,
|
|
162
177
|
});
|
|
163
|
-
// Use the manifest plugin
|
|
164
178
|
const selectedApi = await getVersionedImplementationId(appKey);
|
|
165
179
|
if (!selectedApi) {
|
|
166
180
|
throw new ZapierConfigurationError("No current_implementation_id found for app", { configType: "current_implementation_id" });
|
|
@@ -170,14 +184,13 @@ export const listInputFieldsPlugin = (sdk) => {
|
|
|
170
184
|
operationType: actionType,
|
|
171
185
|
operationKey: actionKey,
|
|
172
186
|
});
|
|
173
|
-
//
|
|
174
|
-
//
|
|
187
|
+
// getAction resolves both action.key AND action.id (e.g.
|
|
188
|
+
// `create_report` vs `core:39487493`).
|
|
175
189
|
const { data: action } = await sdk.getAction({
|
|
176
190
|
app: appKey,
|
|
177
191
|
actionType,
|
|
178
192
|
action: actionKey,
|
|
179
193
|
});
|
|
180
|
-
// Use service layer to fetch implementation needs
|
|
181
194
|
const needsData = await fetchImplementationNeeds({
|
|
182
195
|
api,
|
|
183
196
|
selectedApi,
|
|
@@ -186,34 +199,8 @@ export const listInputFieldsPlugin = (sdk) => {
|
|
|
186
199
|
connectionId: resolvedConnectionId ?? null,
|
|
187
200
|
inputs,
|
|
188
201
|
});
|
|
189
|
-
// Transform Need objects to Root Fieldset with proper nesting
|
|
190
|
-
const rootFieldset = transformNeedsToFields(needsData.needs || []);
|
|
191
202
|
return {
|
|
192
|
-
data:
|
|
193
|
-
nextCursor: undefined, // No pagination needed since we return all input fields
|
|
203
|
+
data: transformNeedsToFields(needsData.needs || []),
|
|
194
204
|
};
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
const listInputFieldsDefinition = createPaginatedFunction(listInputFieldsPage, ListInputFieldsInputSchema, createTelemetryCallback(sdk.context.eventEmission.emitMethodCalled, methodName), methodName, DEFAULT_PAGE_SIZE);
|
|
198
|
-
return {
|
|
199
|
-
listInputFields: listInputFieldsDefinition,
|
|
200
|
-
context: {
|
|
201
|
-
meta: {
|
|
202
|
-
listInputFields: {
|
|
203
|
-
categories: ["action"],
|
|
204
|
-
type: "list",
|
|
205
|
-
itemType: "RootFieldItem",
|
|
206
|
-
inputSchema: ListInputFieldsSchema,
|
|
207
|
-
outputSchema: RootFieldItemSchema,
|
|
208
|
-
resolvers: {
|
|
209
|
-
app: appKeyResolver,
|
|
210
|
-
actionType: actionTypeResolver,
|
|
211
|
-
action: actionKeyResolver,
|
|
212
|
-
connection: connectionIdResolver,
|
|
213
|
-
inputs: inputsAllOptionalResolver,
|
|
214
|
-
},
|
|
215
|
-
},
|
|
216
|
-
},
|
|
217
|
-
},
|
|
218
|
-
};
|
|
219
|
-
};
|
|
205
|
+
},
|
|
206
|
+
}));
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { RootFieldItem } from "../../types/domain";
|
|
3
3
|
import type { PaginatedSdkFunction } from "../../types/functions";
|
|
4
|
-
import type { ZapierConfigurationError, ZapierApiError, ZapierAuthenticationError, ZapierAppNotFoundError, ZapierValidationError, ZapierUnknownError } from "../../types/errors";
|
|
5
4
|
export declare const ListInputFieldsSchema: z.ZodObject<{
|
|
6
5
|
app: z.ZodString & {
|
|
7
6
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
8
7
|
};
|
|
9
8
|
actionType: z.ZodEnum<{
|
|
10
|
-
search: "search";
|
|
11
9
|
filter: "filter";
|
|
12
10
|
read: "read";
|
|
13
11
|
read_bulk: "read_bulk";
|
|
14
12
|
run: "run";
|
|
13
|
+
search: "search";
|
|
15
14
|
search_and_write: "search_and_write";
|
|
16
15
|
search_or_write: "search_or_write";
|
|
17
16
|
write: "write";
|
|
@@ -32,11 +31,11 @@ declare const ListInputFieldsSchemaDeprecated: z.ZodObject<{
|
|
|
32
31
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
33
32
|
};
|
|
34
33
|
actionType: z.ZodEnum<{
|
|
35
|
-
search: "search";
|
|
36
34
|
filter: "filter";
|
|
37
35
|
read: "read";
|
|
38
36
|
read_bulk: "read_bulk";
|
|
39
37
|
run: "run";
|
|
38
|
+
search: "search";
|
|
40
39
|
search_and_write: "search_and_write";
|
|
41
40
|
search_or_write: "search_or_write";
|
|
42
41
|
write: "write";
|
|
@@ -55,11 +54,11 @@ export declare const ListInputFieldsInputSchema: z.ZodUnion<readonly [z.ZodObjec
|
|
|
55
54
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
56
55
|
};
|
|
57
56
|
actionType: z.ZodEnum<{
|
|
58
|
-
search: "search";
|
|
59
57
|
filter: "filter";
|
|
60
58
|
read: "read";
|
|
61
59
|
read_bulk: "read_bulk";
|
|
62
60
|
run: "run";
|
|
61
|
+
search: "search";
|
|
63
62
|
search_and_write: "search_and_write";
|
|
64
63
|
search_or_write: "search_or_write";
|
|
65
64
|
write: "write";
|
|
@@ -79,11 +78,11 @@ export declare const ListInputFieldsInputSchema: z.ZodUnion<readonly [z.ZodObjec
|
|
|
79
78
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
80
79
|
};
|
|
81
80
|
actionType: z.ZodEnum<{
|
|
82
|
-
search: "search";
|
|
83
81
|
filter: "filter";
|
|
84
82
|
read: "read";
|
|
85
83
|
read_bulk: "read_bulk";
|
|
86
84
|
run: "run";
|
|
85
|
+
search: "search";
|
|
87
86
|
search_and_write: "search_and_write";
|
|
88
87
|
search_or_write: "search_or_write";
|
|
89
88
|
write: "write";
|
|
@@ -103,7 +102,6 @@ export type ListInputFieldsOptions = z.infer<typeof ListInputFieldsSchema> | (Om
|
|
|
103
102
|
/** @deprecated Use `action` instead. */
|
|
104
103
|
actionKey: z.infer<typeof ListInputFieldsSchemaDeprecated>["actionKey"];
|
|
105
104
|
});
|
|
106
|
-
export type ListInputFieldsError = ZapierConfigurationError | ZapierApiError | ZapierAuthenticationError | ZapierAppNotFoundError | ZapierValidationError | ZapierUnknownError;
|
|
107
105
|
export interface ListInputFieldsPage {
|
|
108
106
|
data: RootFieldItem[];
|
|
109
107
|
nextCursor?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listInputFields/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listInputFields/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAqClE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;iBAe9B,CAAC;AAGL,QAAA,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;iBAMF,CAAC;AAGpC,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAEA,CAAC;AAGxC,MAAM,MAAM,sBAAsB,GAC9B,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,GACrC,CAAC,IAAI,CACH,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,EAC/C,QAAQ,GAAG,WAAW,CACvB,GAAG;IACF,qCAAqC;IACrC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC,QAAQ,CAAC,CAAC;IAClE,wCAAwC;IACxC,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC,WAAW,CAAC,CAAC;CACzE,CAAC,CAAC;AAGP,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,WAAW,0BAA0B;IACzC,eAAe,EAAE,oBAAoB,CACnC,sBAAsB,EACtB,aAAa,EAAE,CAChB,CAAC;CACH"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ConnectionsMap } from "../../types/connections";
|
|
3
|
-
import type { Plugin } from "../../types/plugin";
|
|
1
|
+
import type { Manifest, ManifestEntry, ManifestPluginOptionsSchema, ActionEntry } from "./schemas";
|
|
4
2
|
import type { z } from "zod";
|
|
5
3
|
import type { ApiClient } from "../../api";
|
|
4
|
+
import { type ResolvedAppLocator } from "../../utils/domain-utils";
|
|
6
5
|
export type ManifestPluginOptions = z.infer<typeof ManifestPluginOptionsSchema>;
|
|
7
6
|
export interface UpdateManifestEntryOptions {
|
|
8
7
|
appKey: string;
|
|
@@ -28,37 +27,6 @@ export interface AddActionEntryResult {
|
|
|
28
27
|
entry: ActionEntry;
|
|
29
28
|
manifest: Manifest;
|
|
30
29
|
}
|
|
31
|
-
export interface ManifestPluginProvides {
|
|
32
|
-
context: {
|
|
33
|
-
getResolvedManifest: () => Promise<Manifest | null>;
|
|
34
|
-
getVersionedImplementationId: GetVersionedImplementationId;
|
|
35
|
-
resolveAppKeys: ResolveAppKeys;
|
|
36
|
-
getManifestConnections: () => Promise<ConnectionsMap | null>;
|
|
37
|
-
updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<UpdateManifestEntryResult>;
|
|
38
|
-
addActionEntry: (options: AddActionEntryOptions) => Promise<AddActionEntryResult>;
|
|
39
|
-
findActionEntry: (options: {
|
|
40
|
-
name: string;
|
|
41
|
-
manifest: Manifest;
|
|
42
|
-
}) => ActionEntry | null;
|
|
43
|
-
listActionEntries: (options?: {
|
|
44
|
-
configPath?: string;
|
|
45
|
-
}) => Promise<Array<[string, ActionEntry]>>;
|
|
46
|
-
deleteActionEntry: (options: {
|
|
47
|
-
name: string;
|
|
48
|
-
configPath?: string;
|
|
49
|
-
skipWrite?: boolean;
|
|
50
|
-
}) => Promise<Manifest>;
|
|
51
|
-
hasActionEntry: (options: {
|
|
52
|
-
name: string;
|
|
53
|
-
manifest: Manifest;
|
|
54
|
-
}) => boolean;
|
|
55
|
-
findManifestEntry: (options: {
|
|
56
|
-
appKey: string;
|
|
57
|
-
manifest: Manifest;
|
|
58
|
-
}) => [string, ManifestEntry] | null;
|
|
59
|
-
readManifestFromFile: (filePath: string) => Promise<Manifest | null>;
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
30
|
/**
|
|
63
31
|
* Read manifest from a file path asynchronously
|
|
64
32
|
* Supports local files (Node.js) and browser environments (fallback to global filesystem)
|
|
@@ -81,7 +49,7 @@ export declare function findManifestEntry({ appKey, manifest, }: {
|
|
|
81
49
|
}): [string, ManifestEntry] | null;
|
|
82
50
|
export { DEFAULT_CONFIG_PATH } from "./schemas";
|
|
83
51
|
export type { ManifestEntry, Manifest, ActionEntry } from "./schemas";
|
|
84
|
-
export declare const manifestPlugin:
|
|
52
|
+
export declare const manifestPlugin: (sdk: {
|
|
85
53
|
context: {
|
|
86
54
|
api: ApiClient;
|
|
87
55
|
options?: {
|
|
@@ -89,5 +57,41 @@ export declare const manifestPlugin: Plugin<{
|
|
|
89
57
|
manifest?: Manifest;
|
|
90
58
|
};
|
|
91
59
|
};
|
|
92
|
-
}
|
|
60
|
+
} & {
|
|
61
|
+
context: {
|
|
62
|
+
meta: Record<string, import("../..").PluginMeta>;
|
|
63
|
+
};
|
|
64
|
+
}) => {
|
|
65
|
+
context: {
|
|
66
|
+
getResolvedManifest: () => Promise<Manifest | null>;
|
|
67
|
+
getVersionedImplementationId: (appKey: string) => Promise<string | null>;
|
|
68
|
+
resolveAppKeys: ({ appKeys }: {
|
|
69
|
+
appKeys: string[];
|
|
70
|
+
}) => Promise<ResolvedAppLocator[]>;
|
|
71
|
+
updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<UpdateManifestEntryResult>;
|
|
72
|
+
addActionEntry: (options: AddActionEntryOptions) => Promise<AddActionEntryResult>;
|
|
73
|
+
findActionEntry: ({ name, manifest, }: {
|
|
74
|
+
name: string;
|
|
75
|
+
manifest: Manifest;
|
|
76
|
+
}) => ActionEntry | null;
|
|
77
|
+
listActionEntries: ({ configPath, }?: {
|
|
78
|
+
configPath?: string;
|
|
79
|
+
}) => Promise<Array<[string, ActionEntry]>>;
|
|
80
|
+
deleteActionEntry: ({ name, configPath, skipWrite, }: {
|
|
81
|
+
name: string;
|
|
82
|
+
configPath?: string;
|
|
83
|
+
skipWrite?: boolean;
|
|
84
|
+
}) => Promise<Manifest>;
|
|
85
|
+
hasActionEntry: ({ name, manifest, }: {
|
|
86
|
+
name: string;
|
|
87
|
+
manifest: Manifest;
|
|
88
|
+
}) => boolean;
|
|
89
|
+
findManifestEntry: typeof findManifestEntry;
|
|
90
|
+
readManifestFromFile: typeof readManifestFromFile;
|
|
91
|
+
getManifestConnections: () => Promise<Record<string, {
|
|
92
|
+
connectionId: string | number;
|
|
93
|
+
}> | null>;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
export type ManifestPluginProvides = ReturnType<typeof manifestPlugin>;
|
|
93
97
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/manifest/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/manifest/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { readFile, writeFile, resolve } from "../../utils/file-utils";
|
|
2
2
|
import { ManifestSchema, DEFAULT_CONFIG_PATH } from "./schemas";
|
|
3
|
+
import { definePlugin } from "../../utils/plugin-utils";
|
|
3
4
|
import { normalizeImplementationMetaToAppItem, splitVersionedKey, isSnakeCasedSlug, dashifySnakeCasedSlug, toAppLocator, isResolvedAppLocator, } from "../../utils/domain-utils";
|
|
4
5
|
import { extractCursor } from "../../utils/function-utils";
|
|
5
6
|
import { paginate } from "../../utils/pagination-utils";
|
|
@@ -216,7 +217,7 @@ async function resolveAppKeys({ appKeys, api, manifest, }) {
|
|
|
216
217
|
return slugResolvedLocators.filter(isResolvedAppLocator);
|
|
217
218
|
}
|
|
218
219
|
export { DEFAULT_CONFIG_PATH } from "./schemas";
|
|
219
|
-
export const manifestPlugin = (sdk) => {
|
|
220
|
+
export const manifestPlugin = definePlugin((sdk) => {
|
|
220
221
|
const { api, options } = sdk.context;
|
|
221
222
|
const { manifestPath = DEFAULT_CONFIG_PATH, manifest } = options || {};
|
|
222
223
|
let resolvedManifest;
|
|
@@ -389,4 +390,4 @@ export const manifestPlugin = (sdk) => {
|
|
|
389
390
|
},
|
|
390
391
|
},
|
|
391
392
|
};
|
|
392
|
-
};
|
|
393
|
+
});
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import type { Plugin } from "../../types/plugin";
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated Empty since the plugin no longer provides anything; the
|
|
4
|
-
* `getRegistry` method is now built into every sdk via `WithAddPlugin`.
|
|
5
|
-
* Kept as an export for any code that still references the type.
|
|
6
|
-
*/
|
|
7
|
-
export interface RegistryPluginProvides {
|
|
8
|
-
}
|
|
9
1
|
/**
|
|
10
2
|
* @deprecated `getRegistry` is now built into every sdk produced by
|
|
11
3
|
* `buildSdk`. Adding this plugin is a no-op. Remove the
|
|
12
4
|
* `.addPlugin(registryPlugin)` call.
|
|
13
5
|
*/
|
|
14
|
-
export declare const registryPlugin:
|
|
6
|
+
export declare const registryPlugin: (sdk: {
|
|
7
|
+
context: {
|
|
8
|
+
meta: Record<string, import("../..").PluginMeta>;
|
|
9
|
+
};
|
|
10
|
+
}) => {};
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Empty since the plugin no longer provides anything; the
|
|
13
|
+
* `getRegistry` method is now built into every sdk via `WithAddPlugin`.
|
|
14
|
+
* Kept as an export for any code that still references the type.
|
|
15
|
+
*/
|
|
16
|
+
export type RegistryPluginProvides = ReturnType<typeof registryPlugin>;
|
|
15
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/registry/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/registry/index.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;QAKzB,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { definePlugin } from "../../utils/plugin-utils";
|
|
1
2
|
import { logDeprecation } from "../../utils/logging";
|
|
2
3
|
/**
|
|
3
4
|
* @deprecated `getRegistry` is now built into every sdk produced by
|
|
4
5
|
* `buildSdk`. Adding this plugin is a no-op. Remove the
|
|
5
6
|
* `.addPlugin(registryPlugin)` call.
|
|
6
7
|
*/
|
|
7
|
-
export const registryPlugin = () => {
|
|
8
|
+
export const registryPlugin = definePlugin((_sdk) => {
|
|
8
9
|
logDeprecation("registryPlugin is deprecated and a no-op; getRegistry is now built into every sdk. Remove .addPlugin(registryPlugin).");
|
|
9
10
|
return {};
|
|
10
|
-
};
|
|
11
|
+
});
|