@zapier/zapier-sdk 0.6.4 → 0.8.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 +12 -0
- package/README.md +55 -23
- package/dist/api/schemas.d.ts +114 -0
- package/dist/api/schemas.d.ts.map +1 -1
- package/dist/api/schemas.js +45 -0
- package/dist/api/types.d.ts +5 -1
- package/dist/api/types.d.ts.map +1 -1
- package/dist/index.cjs +171 -7
- package/dist/index.d.mts +84 -10
- package/dist/index.mjs +171 -7
- package/dist/plugins/findFirstAuthentication/index.test.js +3 -3
- package/dist/plugins/findFirstAuthentication/schemas.d.ts +3 -3
- package/dist/plugins/findFirstAuthentication/schemas.js +1 -1
- package/dist/plugins/findUniqueAuthentication/index.test.js +3 -3
- package/dist/plugins/findUniqueAuthentication/schemas.d.ts +3 -3
- package/dist/plugins/findUniqueAuthentication/schemas.js +1 -1
- package/dist/plugins/listAuthentications/index.d.ts.map +1 -1
- package/dist/plugins/listAuthentications/index.js +2 -3
- package/dist/plugins/listAuthentications/index.test.js +5 -5
- package/dist/plugins/listAuthentications/schemas.d.ts +3 -3
- package/dist/plugins/listAuthentications/schemas.js +1 -1
- package/dist/plugins/listInputFieldChoices/index.d.ts +28 -0
- package/dist/plugins/listInputFieldChoices/index.d.ts.map +1 -0
- package/dist/plugins/listInputFieldChoices/index.js +78 -0
- package/dist/plugins/listInputFieldChoices/index.test.d.ts +2 -0
- package/dist/plugins/listInputFieldChoices/index.test.d.ts.map +1 -0
- package/dist/plugins/listInputFieldChoices/index.test.js +537 -0
- package/dist/plugins/listInputFieldChoices/schemas.d.ts +61 -0
- package/dist/plugins/listInputFieldChoices/schemas.d.ts.map +1 -0
- package/dist/plugins/listInputFieldChoices/schemas.js +73 -0
- package/dist/sdk.d.ts +7 -1
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +2 -0
- package/package.json +1 -1
- package/src/api/schemas.ts +62 -0
- package/src/api/types.ts +14 -0
- package/src/plugins/findFirstAuthentication/index.test.ts +3 -3
- package/src/plugins/findFirstAuthentication/schemas.ts +1 -1
- package/src/plugins/findUniqueAuthentication/index.test.ts +3 -3
- package/src/plugins/findUniqueAuthentication/schemas.ts +1 -1
- package/src/plugins/listAuthentications/index.test.ts +5 -5
- package/src/plugins/listAuthentications/index.ts +2 -3
- package/src/plugins/listAuthentications/schemas.ts +1 -1
- package/src/plugins/listInputFieldChoices/index.test.ts +653 -0
- package/src/plugins/listInputFieldChoices/index.ts +152 -0
- package/src/plugins/listInputFieldChoices/schemas.ts +139 -0
- package/src/sdk.ts +2 -0
- package/tsconfig.tsbuildinfo +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -970,19 +970,19 @@ declare const FindFirstAuthenticationSchema: z.ZodObject<{
|
|
|
970
970
|
appKey: z.ZodOptional<z.ZodString>;
|
|
971
971
|
search: z.ZodOptional<z.ZodString>;
|
|
972
972
|
title: z.ZodOptional<z.ZodString>;
|
|
973
|
-
|
|
973
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
974
974
|
owner: z.ZodOptional<z.ZodString>;
|
|
975
975
|
}, "strip", z.ZodTypeAny, {
|
|
976
976
|
title?: string | undefined;
|
|
977
977
|
search?: string | undefined;
|
|
978
|
-
account_id?: string | undefined;
|
|
979
978
|
appKey?: string | undefined;
|
|
979
|
+
accountId?: string | undefined;
|
|
980
980
|
owner?: string | undefined;
|
|
981
981
|
}, {
|
|
982
982
|
title?: string | undefined;
|
|
983
983
|
search?: string | undefined;
|
|
984
|
-
account_id?: string | undefined;
|
|
985
984
|
appKey?: string | undefined;
|
|
985
|
+
accountId?: string | undefined;
|
|
986
986
|
owner?: string | undefined;
|
|
987
987
|
}>;
|
|
988
988
|
type FindFirstAuthenticationOptions = z.infer<typeof FindFirstAuthenticationSchema>;
|
|
@@ -991,19 +991,19 @@ declare const FindUniqueAuthenticationSchema: z.ZodObject<{
|
|
|
991
991
|
appKey: z.ZodOptional<z.ZodString>;
|
|
992
992
|
search: z.ZodOptional<z.ZodString>;
|
|
993
993
|
title: z.ZodOptional<z.ZodString>;
|
|
994
|
-
|
|
994
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
995
995
|
owner: z.ZodOptional<z.ZodString>;
|
|
996
996
|
}, "strip", z.ZodTypeAny, {
|
|
997
997
|
title?: string | undefined;
|
|
998
998
|
search?: string | undefined;
|
|
999
|
-
account_id?: string | undefined;
|
|
1000
999
|
appKey?: string | undefined;
|
|
1000
|
+
accountId?: string | undefined;
|
|
1001
1001
|
owner?: string | undefined;
|
|
1002
1002
|
}, {
|
|
1003
1003
|
title?: string | undefined;
|
|
1004
1004
|
search?: string | undefined;
|
|
1005
|
-
account_id?: string | undefined;
|
|
1006
1005
|
appKey?: string | undefined;
|
|
1006
|
+
accountId?: string | undefined;
|
|
1007
1007
|
owner?: string | undefined;
|
|
1008
1008
|
}>;
|
|
1009
1009
|
type FindUniqueAuthenticationOptions = z.infer<typeof FindUniqueAuthenticationSchema>;
|
|
@@ -2569,25 +2569,25 @@ declare const ListAuthenticationsSchema: z.ZodObject<{
|
|
|
2569
2569
|
appKey: z.ZodOptional<z.ZodString>;
|
|
2570
2570
|
search: z.ZodOptional<z.ZodString>;
|
|
2571
2571
|
title: z.ZodOptional<z.ZodString>;
|
|
2572
|
-
|
|
2572
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
2573
2573
|
owner: z.ZodOptional<z.ZodString>;
|
|
2574
2574
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
2575
2575
|
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
2576
2576
|
}, "strip", z.ZodTypeAny, {
|
|
2577
2577
|
title?: string | undefined;
|
|
2578
2578
|
search?: string | undefined;
|
|
2579
|
-
account_id?: string | undefined;
|
|
2580
2579
|
appKey?: string | undefined;
|
|
2581
2580
|
pageSize?: number | undefined;
|
|
2582
2581
|
maxItems?: number | undefined;
|
|
2582
|
+
accountId?: string | undefined;
|
|
2583
2583
|
owner?: string | undefined;
|
|
2584
2584
|
}, {
|
|
2585
2585
|
title?: string | undefined;
|
|
2586
2586
|
search?: string | undefined;
|
|
2587
|
-
account_id?: string | undefined;
|
|
2588
2587
|
appKey?: string | undefined;
|
|
2589
2588
|
pageSize?: number | undefined;
|
|
2590
2589
|
maxItems?: number | undefined;
|
|
2590
|
+
accountId?: string | undefined;
|
|
2591
2591
|
owner?: string | undefined;
|
|
2592
2592
|
}>;
|
|
2593
2593
|
type ListAuthenticationsOptions = z.infer<typeof ListAuthenticationsSchema>;
|
|
@@ -2923,12 +2923,80 @@ declare function getTokenFromCliLogin(options?: AuthOptions): Promise<string | u
|
|
|
2923
2923
|
*/
|
|
2924
2924
|
declare function getTokenFromEnvOrConfig(options?: AuthOptions): Promise<string | undefined>;
|
|
2925
2925
|
|
|
2926
|
+
declare const InputFieldChoiceItemSchema: z.ZodObject<{
|
|
2927
|
+
key: z.ZodOptional<z.ZodString>;
|
|
2928
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2929
|
+
sample: z.ZodOptional<z.ZodString>;
|
|
2930
|
+
value: z.ZodOptional<z.ZodString>;
|
|
2931
|
+
}, "strip", z.ZodTypeAny, {
|
|
2932
|
+
value?: string | undefined;
|
|
2933
|
+
key?: string | undefined;
|
|
2934
|
+
label?: string | undefined;
|
|
2935
|
+
sample?: string | undefined;
|
|
2936
|
+
}, {
|
|
2937
|
+
value?: string | undefined;
|
|
2938
|
+
key?: string | undefined;
|
|
2939
|
+
label?: string | undefined;
|
|
2940
|
+
sample?: string | undefined;
|
|
2941
|
+
}>;
|
|
2942
|
+
type InputFieldChoiceItem = z.infer<typeof InputFieldChoiceItemSchema>;
|
|
2943
|
+
declare const ListInputFieldChoicesSchema: z.ZodObject<{
|
|
2944
|
+
appKey: z.ZodString;
|
|
2945
|
+
actionType: z.ZodEnum<["read", "read_bulk", "write", "run", "search", "search_or_write", "search_and_write", "filter"]>;
|
|
2946
|
+
actionKey: z.ZodString;
|
|
2947
|
+
inputFieldKey: z.ZodString;
|
|
2948
|
+
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2949
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2950
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
2951
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
2952
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
2953
|
+
}, "strip", z.ZodTypeAny, {
|
|
2954
|
+
appKey: string;
|
|
2955
|
+
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
2956
|
+
actionKey: string;
|
|
2957
|
+
inputFieldKey: string;
|
|
2958
|
+
page?: number | undefined;
|
|
2959
|
+
authenticationId?: number | null | undefined;
|
|
2960
|
+
inputs?: Record<string, any> | undefined;
|
|
2961
|
+
pageSize?: number | undefined;
|
|
2962
|
+
maxItems?: number | undefined;
|
|
2963
|
+
}, {
|
|
2964
|
+
appKey: string;
|
|
2965
|
+
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
2966
|
+
actionKey: string;
|
|
2967
|
+
inputFieldKey: string;
|
|
2968
|
+
page?: number | undefined;
|
|
2969
|
+
authenticationId?: number | null | undefined;
|
|
2970
|
+
inputs?: Record<string, any> | undefined;
|
|
2971
|
+
pageSize?: number | undefined;
|
|
2972
|
+
maxItems?: number | undefined;
|
|
2973
|
+
}>;
|
|
2974
|
+
type ListInputFieldChoicesOptions = z.infer<typeof ListInputFieldChoicesSchema>;
|
|
2975
|
+
|
|
2976
|
+
interface ListInputFieldChoicesPluginProvides {
|
|
2977
|
+
listInputFieldChoices: (options: ListInputFieldChoicesOptions) => Promise<{
|
|
2978
|
+
data: InputFieldChoiceItem[];
|
|
2979
|
+
}> & AsyncIterable<{
|
|
2980
|
+
data: InputFieldChoiceItem[];
|
|
2981
|
+
nextCursor?: string;
|
|
2982
|
+
}> & {
|
|
2983
|
+
items(): AsyncIterable<InputFieldChoiceItem>;
|
|
2984
|
+
};
|
|
2985
|
+
context: {
|
|
2986
|
+
meta: {
|
|
2987
|
+
listInputFieldChoices: {
|
|
2988
|
+
inputSchema: typeof ListInputFieldChoicesSchema;
|
|
2989
|
+
};
|
|
2990
|
+
};
|
|
2991
|
+
};
|
|
2992
|
+
}
|
|
2993
|
+
|
|
2926
2994
|
interface ZapierSdkOptions extends BaseSdkOptions {
|
|
2927
2995
|
}
|
|
2928
2996
|
declare function createSdk<TCurrentSdk = {}, TCurrentContext = {
|
|
2929
2997
|
meta: Record<string, PluginMeta>;
|
|
2930
2998
|
}>(options?: ZapierSdkOptions, initialSdk?: TCurrentSdk, initialContext?: TCurrentContext): Sdk<TCurrentSdk, TCurrentContext>;
|
|
2931
|
-
declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk<ExtractSdkProperties<ApiPluginProvides> & ExtractSdkProperties<ListAppsPluginProvides> & ExtractSdkProperties<ManifestPluginProvides> & ExtractSdkProperties<GetAppPluginProvides> & ExtractSdkProperties<ListActionsPluginProvides> & ExtractSdkProperties<GetActionPluginProvides> & ExtractSdkProperties<ListInputFieldsPluginProvides> & ExtractSdkProperties<RunActionPluginProvides> & ExtractSdkProperties<LockVersionPluginProvides> & ExtractSdkProperties<ListAuthenticationsPluginProvides> & ExtractSdkProperties<GetAuthenticationPluginProvides> & ExtractSdkProperties<FindFirstAuthenticationPluginProvides> & ExtractSdkProperties<FindUniqueAuthenticationPluginProvides> & ExtractSdkProperties<RequestPluginProvides> & ExtractSdkProperties<FetchPluginProvides> & ExtractSdkProperties<AppsPluginProvides> & ExtractSdkProperties<GetProfilePluginProvides>, {
|
|
2999
|
+
declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk<ExtractSdkProperties<ApiPluginProvides> & ExtractSdkProperties<ListAppsPluginProvides> & ExtractSdkProperties<ManifestPluginProvides> & ExtractSdkProperties<GetAppPluginProvides> & ExtractSdkProperties<ListActionsPluginProvides> & ExtractSdkProperties<GetActionPluginProvides> & ExtractSdkProperties<ListInputFieldsPluginProvides> & ExtractSdkProperties<ListInputFieldChoicesPluginProvides> & ExtractSdkProperties<RunActionPluginProvides> & ExtractSdkProperties<LockVersionPluginProvides> & ExtractSdkProperties<ListAuthenticationsPluginProvides> & ExtractSdkProperties<GetAuthenticationPluginProvides> & ExtractSdkProperties<FindFirstAuthenticationPluginProvides> & ExtractSdkProperties<FindUniqueAuthenticationPluginProvides> & ExtractSdkProperties<RequestPluginProvides> & ExtractSdkProperties<FetchPluginProvides> & ExtractSdkProperties<AppsPluginProvides> & ExtractSdkProperties<GetProfilePluginProvides>, {
|
|
2932
3000
|
meta: Record<string, PluginMeta>;
|
|
2933
3001
|
} & {
|
|
2934
3002
|
api: ApiClient;
|
|
@@ -2966,6 +3034,12 @@ declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk
|
|
|
2966
3034
|
inputSchema: typeof ListInputFieldsSchema;
|
|
2967
3035
|
};
|
|
2968
3036
|
};
|
|
3037
|
+
} & {
|
|
3038
|
+
meta: {
|
|
3039
|
+
listInputFieldChoices: {
|
|
3040
|
+
inputSchema: typeof ListInputFieldChoicesSchema;
|
|
3041
|
+
};
|
|
3042
|
+
};
|
|
2969
3043
|
} & {
|
|
2970
3044
|
meta: {
|
|
2971
3045
|
runAction: {
|
package/dist/index.mjs
CHANGED
|
@@ -1187,6 +1187,42 @@ z.object({
|
|
|
1187
1187
|
previous: z.string().nullable().optional(),
|
|
1188
1188
|
results: z.array(ImplementationMetaSchema)
|
|
1189
1189
|
});
|
|
1190
|
+
var NeedChoicesResponseMetaSchema = z.object({
|
|
1191
|
+
page: z.string().nullable().optional()
|
|
1192
|
+
});
|
|
1193
|
+
var NeedChoicesResponseLinksSchema = z.object({
|
|
1194
|
+
next: z.string().nullable().optional(),
|
|
1195
|
+
prev: z.string().nullable().optional()
|
|
1196
|
+
});
|
|
1197
|
+
z.object({
|
|
1198
|
+
selected_api: z.string().optional().describe(
|
|
1199
|
+
"Something like `SlackAPI` (for Python apps) or `SplitwiseCLIAPI@1.0.0` (for CLI apps). Non-public apps are fine as long as the authed user can access them."
|
|
1200
|
+
),
|
|
1201
|
+
authentication_id: z.number().optional().describe(
|
|
1202
|
+
"If the app needs auth, provide an `authentication_id` that has the `selected_api` of the app you want to run. Can be any auth visible to the user (including shared)."
|
|
1203
|
+
),
|
|
1204
|
+
params: z.record(z.any()).optional().describe(
|
|
1205
|
+
"Object that matches the input the node would normally get. Has all the same keys/types as the `needs` of the action."
|
|
1206
|
+
),
|
|
1207
|
+
page: z.number().optional().default(0),
|
|
1208
|
+
prefill: z.string().optional().describe(
|
|
1209
|
+
"The prefill string to indicate what we're fetching choices for. Likely something like `spreadsheet.id.title`. Must be provided alongside `selected_api` if both `action_id` and `input_field_id` are not."
|
|
1210
|
+
),
|
|
1211
|
+
action_id: z.string().optional().describe(
|
|
1212
|
+
"The id that will be used to lookup the Action for prefill lookup. If provided, `input_field_id` is required, else `prefill` must be provided."
|
|
1213
|
+
),
|
|
1214
|
+
input_field_id: z.string().optional().describe(
|
|
1215
|
+
"The id (key) of the input field (Need) that dynamic choices are being retrieved for. If provided, `action_id` is required, else `prefill` must be provided."
|
|
1216
|
+
)
|
|
1217
|
+
});
|
|
1218
|
+
z.object({
|
|
1219
|
+
success: z.boolean(),
|
|
1220
|
+
choices: z.array(NeedChoicesSchema).optional(),
|
|
1221
|
+
next_page: z.number().optional(),
|
|
1222
|
+
errors: z.array(z.string()).optional(),
|
|
1223
|
+
meta: NeedChoicesResponseMetaSchema.optional(),
|
|
1224
|
+
links: NeedChoicesResponseLinksSchema.optional()
|
|
1225
|
+
});
|
|
1190
1226
|
|
|
1191
1227
|
// src/schemas/Action.ts
|
|
1192
1228
|
var ActionItemSchema = withFormatter(
|
|
@@ -1440,7 +1476,7 @@ var ListAuthenticationsSchema = z.object({
|
|
|
1440
1476
|
),
|
|
1441
1477
|
search: z.string().optional().describe("Search term to filter authentications by title"),
|
|
1442
1478
|
title: z.string().optional().describe("Filter authentications by exact title match"),
|
|
1443
|
-
|
|
1479
|
+
accountId: z.string().optional().describe("Filter by account ID"),
|
|
1444
1480
|
owner: z.string().optional().describe("Filter by owner"),
|
|
1445
1481
|
pageSize: z.number().min(1).optional().describe("Number of authentications per page"),
|
|
1446
1482
|
maxItems: z.number().min(1).optional().describe("Maximum total items to return across all pages")
|
|
@@ -1466,8 +1502,8 @@ var listAuthenticationsPlugin = ({ context }) => {
|
|
|
1466
1502
|
} else if (options.title) {
|
|
1467
1503
|
searchParams.search = options.title;
|
|
1468
1504
|
}
|
|
1469
|
-
if (options.
|
|
1470
|
-
searchParams.account_id = options.
|
|
1505
|
+
if (options.accountId) {
|
|
1506
|
+
searchParams.account_id = options.accountId;
|
|
1471
1507
|
}
|
|
1472
1508
|
if (options.owner) {
|
|
1473
1509
|
searchParams.owner = options.owner;
|
|
@@ -1476,7 +1512,6 @@ var listAuthenticationsPlugin = ({ context }) => {
|
|
|
1476
1512
|
if (options.cursor) {
|
|
1477
1513
|
searchParams.offset = options.cursor;
|
|
1478
1514
|
}
|
|
1479
|
-
console.log({ searchParams });
|
|
1480
1515
|
const data = await api.get(
|
|
1481
1516
|
"/api/v4/authentications/",
|
|
1482
1517
|
{
|
|
@@ -1652,7 +1687,7 @@ var FindFirstAuthenticationSchema = z.object({
|
|
|
1652
1687
|
),
|
|
1653
1688
|
search: z.string().optional().describe("Search term to filter authentications by title"),
|
|
1654
1689
|
title: z.string().optional().describe("Filter authentications by exact title match"),
|
|
1655
|
-
|
|
1690
|
+
accountId: z.string().optional().describe("Filter by account ID"),
|
|
1656
1691
|
owner: z.string().optional().describe("Filter by owner")
|
|
1657
1692
|
}).describe("Find the first authentication matching the criteria");
|
|
1658
1693
|
|
|
@@ -1688,7 +1723,7 @@ var FindUniqueAuthenticationSchema = z.object({
|
|
|
1688
1723
|
),
|
|
1689
1724
|
search: z.string().optional().describe("Search term to filter authentications by title"),
|
|
1690
1725
|
title: z.string().optional().describe("Filter authentications by exact title match"),
|
|
1691
|
-
|
|
1726
|
+
accountId: z.string().optional().describe("Filter by account ID"),
|
|
1692
1727
|
owner: z.string().optional().describe("Filter by owner")
|
|
1693
1728
|
}).describe("Find a unique authentication matching the criteria");
|
|
1694
1729
|
|
|
@@ -2871,6 +2906,135 @@ var registryPlugin = ({ sdk, context }) => {
|
|
|
2871
2906
|
getRegistry
|
|
2872
2907
|
};
|
|
2873
2908
|
};
|
|
2909
|
+
var InputFieldChoiceItemSchema = withFormatter(
|
|
2910
|
+
z.object({
|
|
2911
|
+
key: z.string().optional().describe("Unique key/value for the choice"),
|
|
2912
|
+
label: z.string().optional().describe("Human readable label for the choice"),
|
|
2913
|
+
sample: z.string().optional().describe("Sample value for the choice"),
|
|
2914
|
+
value: z.string().optional().describe("Value to be submitted when selected")
|
|
2915
|
+
}),
|
|
2916
|
+
{
|
|
2917
|
+
format: (item) => {
|
|
2918
|
+
const title = item.label || item.key || "Choice";
|
|
2919
|
+
const subtitle = item.label && item.key && item.label !== item.key ? `(${item.key})` : void 0;
|
|
2920
|
+
const details = [];
|
|
2921
|
+
if (item.sample && item.sample !== item.key) {
|
|
2922
|
+
details.push({ text: `Sample: ${item.sample}`, style: "dim" });
|
|
2923
|
+
}
|
|
2924
|
+
if (item.value && item.value !== item.key) {
|
|
2925
|
+
details.push({ text: `Value: ${item.value}`, style: "normal" });
|
|
2926
|
+
}
|
|
2927
|
+
return {
|
|
2928
|
+
title,
|
|
2929
|
+
subtitle,
|
|
2930
|
+
details
|
|
2931
|
+
};
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2934
|
+
);
|
|
2935
|
+
var ListInputFieldChoicesSchema = withOutputSchema(
|
|
2936
|
+
z.object({
|
|
2937
|
+
// Required action identification
|
|
2938
|
+
appKey: AppKeyPropertySchema,
|
|
2939
|
+
actionType: ActionTypePropertySchema,
|
|
2940
|
+
actionKey: ActionKeyPropertySchema,
|
|
2941
|
+
// Input field specification
|
|
2942
|
+
inputFieldKey: z.string().min(1).describe("Input field key to get choices for."),
|
|
2943
|
+
// Common parameters
|
|
2944
|
+
authenticationId: AuthenticationIdPropertySchema.nullable().optional(),
|
|
2945
|
+
inputs: InputsPropertySchema.optional().describe(
|
|
2946
|
+
"Current input values that may affect available choices"
|
|
2947
|
+
),
|
|
2948
|
+
page: z.number().int().min(0).optional().describe("Page number for paginated results"),
|
|
2949
|
+
// Pagination options (SDK-level)
|
|
2950
|
+
pageSize: z.number().min(1).optional().describe("Number of choices per page"),
|
|
2951
|
+
maxItems: z.number().min(1).optional().describe("Maximum total items to return across all pages")
|
|
2952
|
+
}).describe("Get the available choices for a dynamic dropdown input field"),
|
|
2953
|
+
InputFieldChoiceItemSchema
|
|
2954
|
+
);
|
|
2955
|
+
|
|
2956
|
+
// src/plugins/listInputFieldChoices/index.ts
|
|
2957
|
+
function transformNeedChoicesToInputFieldChoiceItem(choice) {
|
|
2958
|
+
return {
|
|
2959
|
+
key: choice.key,
|
|
2960
|
+
label: choice.label,
|
|
2961
|
+
sample: choice.sample,
|
|
2962
|
+
value: choice.value
|
|
2963
|
+
};
|
|
2964
|
+
}
|
|
2965
|
+
var listInputFieldChoicesPlugin = ({ context, sdk }) => {
|
|
2966
|
+
const listInputFieldChoices = createPaginatedFunction(async function listInputFieldChoicesPage(options) {
|
|
2967
|
+
const { api } = context;
|
|
2968
|
+
const {
|
|
2969
|
+
appKey,
|
|
2970
|
+
actionType,
|
|
2971
|
+
actionKey,
|
|
2972
|
+
inputFieldKey,
|
|
2973
|
+
authenticationId,
|
|
2974
|
+
inputs,
|
|
2975
|
+
page,
|
|
2976
|
+
cursor
|
|
2977
|
+
} = options;
|
|
2978
|
+
const actionResult = await sdk.getAction({ appKey, actionType, actionKey });
|
|
2979
|
+
const actionId = actionResult.data.id;
|
|
2980
|
+
if (!actionId) {
|
|
2981
|
+
throw new ZapierApiError(
|
|
2982
|
+
`Action ${actionKey} does not have an ID - cannot retrieve input field choices`
|
|
2983
|
+
);
|
|
2984
|
+
}
|
|
2985
|
+
const requestPage = cursor ? parseInt(cursor, 10) : page ?? 0;
|
|
2986
|
+
const choicesRequest = {
|
|
2987
|
+
action_id: actionId,
|
|
2988
|
+
input_field_id: inputFieldKey,
|
|
2989
|
+
page: requestPage,
|
|
2990
|
+
params: inputs || {}
|
|
2991
|
+
};
|
|
2992
|
+
if (authenticationId !== null) {
|
|
2993
|
+
choicesRequest.authentication_id = authenticationId;
|
|
2994
|
+
}
|
|
2995
|
+
const choicesData = await api.post(
|
|
2996
|
+
"/api/v4/implementations/choices/",
|
|
2997
|
+
choicesRequest
|
|
2998
|
+
);
|
|
2999
|
+
if (!choicesData.success) {
|
|
3000
|
+
throw new ZapierApiError(
|
|
3001
|
+
`Failed to get input field choices: ${choicesData.errors?.join(", ") || "Unknown error"}`
|
|
3002
|
+
);
|
|
3003
|
+
}
|
|
3004
|
+
const choices = (choicesData.choices || []).map(
|
|
3005
|
+
transformNeedChoicesToInputFieldChoiceItem
|
|
3006
|
+
);
|
|
3007
|
+
let nextCursor;
|
|
3008
|
+
if (choicesData.next_page !== void 0) {
|
|
3009
|
+
nextCursor = choicesData.next_page.toString();
|
|
3010
|
+
} else if (choicesData.links?.next) {
|
|
3011
|
+
try {
|
|
3012
|
+
const nextUrl = new URL(choicesData.links.next);
|
|
3013
|
+
const nextPage = nextUrl.searchParams.get("page");
|
|
3014
|
+
if (nextPage) {
|
|
3015
|
+
nextCursor = nextPage;
|
|
3016
|
+
}
|
|
3017
|
+
} catch {
|
|
3018
|
+
nextCursor = void 0;
|
|
3019
|
+
}
|
|
3020
|
+
}
|
|
3021
|
+
return {
|
|
3022
|
+
data: choices,
|
|
3023
|
+
nextCursor
|
|
3024
|
+
};
|
|
3025
|
+
}, ListInputFieldChoicesSchema);
|
|
3026
|
+
return {
|
|
3027
|
+
listInputFieldChoices,
|
|
3028
|
+
context: {
|
|
3029
|
+
meta: {
|
|
3030
|
+
listInputFieldChoices: {
|
|
3031
|
+
categories: ["action"],
|
|
3032
|
+
inputSchema: ListInputFieldChoicesSchema
|
|
3033
|
+
}
|
|
3034
|
+
}
|
|
3035
|
+
}
|
|
3036
|
+
};
|
|
3037
|
+
};
|
|
2874
3038
|
|
|
2875
3039
|
// src/sdk.ts
|
|
2876
3040
|
function createSdk(options = {}, initialSdk = {}, initialContext = { meta: {} }) {
|
|
@@ -2921,7 +3085,7 @@ function createSdk(options = {}, initialSdk = {}, initialContext = { meta: {} })
|
|
|
2921
3085
|
};
|
|
2922
3086
|
}
|
|
2923
3087
|
function createZapierSdkWithoutRegistry(options = {}) {
|
|
2924
|
-
return createSdk(options).addPlugin(apiPlugin).addPlugin(listAppsPlugin).addPlugin(manifestPlugin).addPlugin(getAppPlugin).addPlugin(listActionsPlugin).addPlugin(getActionPlugin).addPlugin(listInputFieldsPlugin).addPlugin(runActionPlugin).addPlugin(lockVersionPlugin).addPlugin(listAuthenticationsPlugin).addPlugin(getAuthenticationPlugin).addPlugin(findFirstAuthenticationPlugin).addPlugin(findUniqueAuthenticationPlugin).addPlugin(requestPlugin).addPlugin(fetchPlugin).addPlugin(appsPlugin).addPlugin(getProfilePlugin);
|
|
3088
|
+
return createSdk(options).addPlugin(apiPlugin).addPlugin(listAppsPlugin).addPlugin(manifestPlugin).addPlugin(getAppPlugin).addPlugin(listActionsPlugin).addPlugin(getActionPlugin).addPlugin(listInputFieldsPlugin).addPlugin(listInputFieldChoicesPlugin).addPlugin(runActionPlugin).addPlugin(lockVersionPlugin).addPlugin(listAuthenticationsPlugin).addPlugin(getAuthenticationPlugin).addPlugin(findFirstAuthenticationPlugin).addPlugin(findUniqueAuthenticationPlugin).addPlugin(requestPlugin).addPlugin(fetchPlugin).addPlugin(appsPlugin).addPlugin(getProfilePlugin);
|
|
2925
3089
|
}
|
|
2926
3090
|
function createZapierSdk(options = {}) {
|
|
2927
3091
|
return createZapierSdkWithoutRegistry(options).addPlugin(registryPlugin);
|
|
@@ -81,7 +81,7 @@ describe("findFirstAuthentication plugin", () => {
|
|
|
81
81
|
const sdk = createTestSdk();
|
|
82
82
|
await expect(sdk.findFirstAuthentication({
|
|
83
83
|
title: 123,
|
|
84
|
-
|
|
84
|
+
accountId: 456,
|
|
85
85
|
owner: true,
|
|
86
86
|
})).rejects.toThrow(ZapierValidationError);
|
|
87
87
|
});
|
|
@@ -91,7 +91,7 @@ describe("findFirstAuthentication plugin", () => {
|
|
|
91
91
|
appKey: "slack",
|
|
92
92
|
search: "workspace",
|
|
93
93
|
title: "My Slack Workspace",
|
|
94
|
-
|
|
94
|
+
accountId: "acc_123",
|
|
95
95
|
owner: "me",
|
|
96
96
|
});
|
|
97
97
|
expect(result.data).toBeDefined();
|
|
@@ -138,7 +138,7 @@ describe("findFirstAuthentication plugin", () => {
|
|
|
138
138
|
appKey: "slack",
|
|
139
139
|
search: "workspace",
|
|
140
140
|
title: "My Slack Workspace",
|
|
141
|
-
|
|
141
|
+
accountId: "acc_123",
|
|
142
142
|
owner: "me",
|
|
143
143
|
};
|
|
144
144
|
await sdk.findFirstAuthentication(options);
|
|
@@ -4,19 +4,19 @@ export declare const FindFirstAuthenticationSchema: z.ZodObject<{
|
|
|
4
4
|
appKey: z.ZodOptional<z.ZodString>;
|
|
5
5
|
search: z.ZodOptional<z.ZodString>;
|
|
6
6
|
title: z.ZodOptional<z.ZodString>;
|
|
7
|
-
|
|
7
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
8
8
|
owner: z.ZodOptional<z.ZodString>;
|
|
9
9
|
}, "strip", z.ZodTypeAny, {
|
|
10
10
|
title?: string | undefined;
|
|
11
11
|
search?: string | undefined;
|
|
12
|
-
account_id?: string | undefined;
|
|
13
12
|
appKey?: string | undefined;
|
|
13
|
+
accountId?: string | undefined;
|
|
14
14
|
owner?: string | undefined;
|
|
15
15
|
}, {
|
|
16
16
|
title?: string | undefined;
|
|
17
17
|
search?: string | undefined;
|
|
18
|
-
account_id?: string | undefined;
|
|
19
18
|
appKey?: string | undefined;
|
|
19
|
+
accountId?: string | undefined;
|
|
20
20
|
owner?: string | undefined;
|
|
21
21
|
}>;
|
|
22
22
|
export type FindFirstAuthenticationOptions = z.infer<typeof FindFirstAuthenticationSchema>;
|
|
@@ -12,7 +12,7 @@ export const FindFirstAuthenticationSchema = z
|
|
|
12
12
|
.string()
|
|
13
13
|
.optional()
|
|
14
14
|
.describe("Filter authentications by exact title match"),
|
|
15
|
-
|
|
15
|
+
accountId: z.string().optional().describe("Filter by account ID"),
|
|
16
16
|
owner: z.string().optional().describe("Filter by owner"),
|
|
17
17
|
})
|
|
18
18
|
.describe("Find the first authentication matching the criteria");
|
|
@@ -72,7 +72,7 @@ describe("findUniqueAuthentication plugin", () => {
|
|
|
72
72
|
await expect(sdk.findUniqueAuthentication({
|
|
73
73
|
search: 123,
|
|
74
74
|
title: 456,
|
|
75
|
-
|
|
75
|
+
accountId: 789,
|
|
76
76
|
owner: false,
|
|
77
77
|
})).rejects.toThrow(ZapierValidationError);
|
|
78
78
|
});
|
|
@@ -82,7 +82,7 @@ describe("findUniqueAuthentication plugin", () => {
|
|
|
82
82
|
appKey: "slack",
|
|
83
83
|
search: "Workspace",
|
|
84
84
|
title: "My Slack",
|
|
85
|
-
|
|
85
|
+
accountId: "acc_123",
|
|
86
86
|
owner: "me",
|
|
87
87
|
});
|
|
88
88
|
expect(result.data).toBeDefined();
|
|
@@ -131,7 +131,7 @@ describe("findUniqueAuthentication plugin", () => {
|
|
|
131
131
|
appKey: "slack",
|
|
132
132
|
search: "workspace",
|
|
133
133
|
title: "My Slack Workspace",
|
|
134
|
-
|
|
134
|
+
accountId: "acc_123",
|
|
135
135
|
owner: "me",
|
|
136
136
|
};
|
|
137
137
|
await sdk.findUniqueAuthentication(options);
|
|
@@ -4,19 +4,19 @@ export declare const FindUniqueAuthenticationSchema: z.ZodObject<{
|
|
|
4
4
|
appKey: z.ZodOptional<z.ZodString>;
|
|
5
5
|
search: z.ZodOptional<z.ZodString>;
|
|
6
6
|
title: z.ZodOptional<z.ZodString>;
|
|
7
|
-
|
|
7
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
8
8
|
owner: z.ZodOptional<z.ZodString>;
|
|
9
9
|
}, "strip", z.ZodTypeAny, {
|
|
10
10
|
title?: string | undefined;
|
|
11
11
|
search?: string | undefined;
|
|
12
|
-
account_id?: string | undefined;
|
|
13
12
|
appKey?: string | undefined;
|
|
13
|
+
accountId?: string | undefined;
|
|
14
14
|
owner?: string | undefined;
|
|
15
15
|
}, {
|
|
16
16
|
title?: string | undefined;
|
|
17
17
|
search?: string | undefined;
|
|
18
|
-
account_id?: string | undefined;
|
|
19
18
|
appKey?: string | undefined;
|
|
19
|
+
accountId?: string | undefined;
|
|
20
20
|
owner?: string | undefined;
|
|
21
21
|
}>;
|
|
22
22
|
export type FindUniqueAuthenticationOptions = z.infer<typeof FindUniqueAuthenticationSchema>;
|
|
@@ -12,7 +12,7 @@ export const FindUniqueAuthenticationSchema = z
|
|
|
12
12
|
.string()
|
|
13
13
|
.optional()
|
|
14
14
|
.describe("Filter authentications by exact title match"),
|
|
15
|
-
|
|
15
|
+
accountId: z.string().optional().describe("Filter by account ID"),
|
|
16
16
|
owner: z.string().optional().describe("Filter by owner"),
|
|
17
17
|
})
|
|
18
18
|
.describe("Find a unique authentication matching the criteria");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/listAuthentications/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EACL,yBAAyB,EACzB,KAAK,0BAA0B,EAEhC,MAAM,WAAW,CAAC;AAUnB,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,WAAW,iCAAiC;IAChD,mBAAmB,EAAE,CAAC,OAAO,CAAC,EAAE,0BAA0B,KAAK,OAAO,CAAC;QACrE,IAAI,EAAE,kBAAkB,EAAE,CAAC;KAC5B,CAAC,GACA,aAAa,CAAC;QAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QACnE,KAAK,IAAI,aAAa,CAAC,kBAAkB,CAAC,CAAC;KAC5C,CAAC;IACJ,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,mBAAmB,EAAE;gBACnB,WAAW,EAAE,OAAO,yBAAyB,CAAC;aAC/C,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAC5C,UAAU,CAAC,sBAAsB,CAAC,EAAE,yBAAyB;AAC7D;IACE,GAAG,EAAE,SAAS,CAAC;IACf,4BAA4B,EAAE,4BAA4B,CAAC;CAC5D,EAAE,0BAA0B;AAC7B,iCAAiC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/listAuthentications/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EACL,yBAAyB,EACzB,KAAK,0BAA0B,EAEhC,MAAM,WAAW,CAAC;AAUnB,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,WAAW,iCAAiC;IAChD,mBAAmB,EAAE,CAAC,OAAO,CAAC,EAAE,0BAA0B,KAAK,OAAO,CAAC;QACrE,IAAI,EAAE,kBAAkB,EAAE,CAAC;KAC5B,CAAC,GACA,aAAa,CAAC;QAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QACnE,KAAK,IAAI,aAAa,CAAC,kBAAkB,CAAC,CAAC;KAC5C,CAAC;IACJ,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,mBAAmB,EAAE;gBACnB,WAAW,EAAE,OAAO,yBAAyB,CAAC;aAC/C,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAC5C,UAAU,CAAC,sBAAsB,CAAC,EAAE,yBAAyB;AAC7D;IACE,GAAG,EAAE,SAAS,CAAC;IACf,4BAA4B,EAAE,4BAA4B,CAAC;CAC5D,EAAE,0BAA0B;AAC7B,iCAAiC,CA8FlC,CAAC"}
|
|
@@ -23,8 +23,8 @@ export const listAuthenticationsPlugin = ({ context }) => {
|
|
|
23
23
|
else if (options.title) {
|
|
24
24
|
searchParams.search = options.title;
|
|
25
25
|
}
|
|
26
|
-
if (options.
|
|
27
|
-
searchParams.account_id = options.
|
|
26
|
+
if (options.accountId) {
|
|
27
|
+
searchParams.account_id = options.accountId;
|
|
28
28
|
}
|
|
29
29
|
if (options.owner) {
|
|
30
30
|
searchParams.owner = options.owner;
|
|
@@ -35,7 +35,6 @@ export const listAuthenticationsPlugin = ({ context }) => {
|
|
|
35
35
|
// Convert cursor back to offset for the API
|
|
36
36
|
searchParams.offset = options.cursor;
|
|
37
37
|
}
|
|
38
|
-
console.log({ searchParams });
|
|
39
38
|
const data = await api.get("/api/v4/authentications/", {
|
|
40
39
|
searchParams,
|
|
41
40
|
customErrorHandler: ({ status }) => {
|
|
@@ -115,11 +115,11 @@ describe("listAuthentications plugin", () => {
|
|
|
115
115
|
});
|
|
116
116
|
}).toThrow(ZapierValidationError);
|
|
117
117
|
});
|
|
118
|
-
it("should throw validation error for invalid
|
|
118
|
+
it("should throw validation error for invalid accountId type", () => {
|
|
119
119
|
const sdk = createTestSdk();
|
|
120
120
|
expect(() => {
|
|
121
121
|
sdk.listAuthentications({
|
|
122
|
-
|
|
122
|
+
accountId: 123,
|
|
123
123
|
});
|
|
124
124
|
}).toThrow(ZapierValidationError);
|
|
125
125
|
});
|
|
@@ -163,7 +163,7 @@ describe("listAuthentications plugin", () => {
|
|
|
163
163
|
appKey: "slack",
|
|
164
164
|
search: "workspace",
|
|
165
165
|
title: "My Slack Workspace",
|
|
166
|
-
|
|
166
|
+
accountId: "acc_123",
|
|
167
167
|
owner: "me",
|
|
168
168
|
pageSize: 10,
|
|
169
169
|
maxItems: 50,
|
|
@@ -255,9 +255,9 @@ describe("listAuthentications plugin", () => {
|
|
|
255
255
|
}),
|
|
256
256
|
}));
|
|
257
257
|
});
|
|
258
|
-
it("should pass
|
|
258
|
+
it("should pass accountId filter to API", async () => {
|
|
259
259
|
const sdk = createTestSdk();
|
|
260
|
-
await sdk.listAuthentications({
|
|
260
|
+
await sdk.listAuthentications({ accountId: "acc_123" });
|
|
261
261
|
expect(mockApiClient.get).toHaveBeenCalledWith("/api/v4/authentications/", expect.objectContaining({
|
|
262
262
|
searchParams: expect.objectContaining({
|
|
263
263
|
account_id: "acc_123",
|
|
@@ -5,25 +5,25 @@ export declare const ListAuthenticationsSchema: z.ZodObject<{
|
|
|
5
5
|
appKey: z.ZodOptional<z.ZodString>;
|
|
6
6
|
search: z.ZodOptional<z.ZodString>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
|
|
8
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
9
9
|
owner: z.ZodOptional<z.ZodString>;
|
|
10
10
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
11
11
|
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
13
|
title?: string | undefined;
|
|
14
14
|
search?: string | undefined;
|
|
15
|
-
account_id?: string | undefined;
|
|
16
15
|
appKey?: string | undefined;
|
|
17
16
|
pageSize?: number | undefined;
|
|
18
17
|
maxItems?: number | undefined;
|
|
18
|
+
accountId?: string | undefined;
|
|
19
19
|
owner?: string | undefined;
|
|
20
20
|
}, {
|
|
21
21
|
title?: string | undefined;
|
|
22
22
|
search?: string | undefined;
|
|
23
|
-
account_id?: string | undefined;
|
|
24
23
|
appKey?: string | undefined;
|
|
25
24
|
pageSize?: number | undefined;
|
|
26
25
|
maxItems?: number | undefined;
|
|
26
|
+
accountId?: string | undefined;
|
|
27
27
|
owner?: string | undefined;
|
|
28
28
|
}>;
|
|
29
29
|
export type ListAuthenticationsOptions = z.infer<typeof ListAuthenticationsSchema>;
|
|
@@ -12,7 +12,7 @@ export const ListAuthenticationsSchema = z
|
|
|
12
12
|
.string()
|
|
13
13
|
.optional()
|
|
14
14
|
.describe("Filter authentications by exact title match"),
|
|
15
|
-
|
|
15
|
+
accountId: z.string().optional().describe("Filter by account ID"),
|
|
16
16
|
owner: z.string().optional().describe("Filter by owner"),
|
|
17
17
|
pageSize: z
|
|
18
18
|
.number()
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Plugin, GetSdkType } from "../../types/plugin";
|
|
2
|
+
import type { ApiClient } from "../../api";
|
|
3
|
+
import type { InputFieldChoiceItem } from "./schemas";
|
|
4
|
+
import { ListInputFieldChoicesSchema, type ListInputFieldChoicesOptions } from "./schemas";
|
|
5
|
+
import type { GetActionPluginProvides } from "../getAction";
|
|
6
|
+
export interface ListInputFieldChoicesPluginProvides {
|
|
7
|
+
listInputFieldChoices: (options: ListInputFieldChoicesOptions) => Promise<{
|
|
8
|
+
data: InputFieldChoiceItem[];
|
|
9
|
+
}> & AsyncIterable<{
|
|
10
|
+
data: InputFieldChoiceItem[];
|
|
11
|
+
nextCursor?: string;
|
|
12
|
+
}> & {
|
|
13
|
+
items(): AsyncIterable<InputFieldChoiceItem>;
|
|
14
|
+
};
|
|
15
|
+
context: {
|
|
16
|
+
meta: {
|
|
17
|
+
listInputFieldChoices: {
|
|
18
|
+
inputSchema: typeof ListInputFieldChoicesSchema;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export declare const listInputFieldChoicesPlugin: Plugin<GetSdkType<GetActionPluginProvides>, // requires getAction in SDK
|
|
24
|
+
{
|
|
25
|
+
api: ApiClient;
|
|
26
|
+
}, // requires api in context
|
|
27
|
+
ListInputFieldChoicesPluginProvides>;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/listInputFieldChoices/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAM3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EACL,2BAA2B,EAC3B,KAAK,4BAA4B,EAElC,MAAM,WAAW,CAAC;AAGnB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAc5D,MAAM,WAAW,mCAAmC;IAClD,qBAAqB,EAAE,CAAC,OAAO,EAAE,4BAA4B,KAAK,OAAO,CAAC;QACxE,IAAI,EAAE,oBAAoB,EAAE,CAAC;KAC9B,CAAC,GACA,aAAa,CAAC;QAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QACrE,KAAK,IAAI,aAAa,CAAC,oBAAoB,CAAC,CAAC;KAC9C,CAAC;IACJ,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,qBAAqB,EAAE;gBACrB,WAAW,EAAE,OAAO,2BAA2B,CAAC;aACjD,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAC9C,UAAU,CAAC,uBAAuB,CAAC,EAAE,4BAA4B;AACjE;IAAE,GAAG,EAAE,SAAS,CAAA;CAAE,EAAE,0BAA0B;AAC9C,mCAAmC,CAuGpC,CAAC"}
|