@zapier/zapier-sdk 0.6.2 → 0.6.4
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 +18 -18
- package/dist/index.cjs +1666 -1638
- package/dist/index.d.mts +241 -2
- package/dist/index.d.ts +18 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -1
- package/dist/index.mjs +1649 -1640
- package/dist/plugins/getProfile/index.js +1 -1
- package/dist/plugins/manifest/index.d.ts +0 -1
- package/dist/plugins/manifest/index.d.ts.map +1 -1
- package/dist/plugins/manifest/index.js +11 -5
- package/dist/plugins/manifest/index.test.js +46 -16
- package/dist/plugins/registry/index.js +3 -3
- package/dist/sdk.d.ts +87 -0
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +5 -2
- package/package.json +1 -1
- package/src/index.ts +25 -1
- package/src/plugins/getProfile/index.ts +1 -1
- package/src/plugins/manifest/index.test.ts +49 -17
- package/src/plugins/manifest/index.ts +14 -6
- package/src/plugins/registry/index.ts +3 -3
- package/src/sdk.ts +6 -1
- package/tsconfig.tsbuildinfo +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2185,6 +2185,35 @@ declare const NeedsResponseSchema: z.ZodObject<{
|
|
|
2185
2185
|
* to ensure a single source of truth and eliminate duplication.
|
|
2186
2186
|
*/
|
|
2187
2187
|
|
|
2188
|
+
interface ApiClient {
|
|
2189
|
+
get: <T = unknown>(path: string, options?: RequestOptions) => Promise<T>;
|
|
2190
|
+
post: <T = unknown>(path: string, data?: unknown, options?: RequestOptions) => Promise<T>;
|
|
2191
|
+
put: <T = unknown>(path: string, data?: unknown, options?: RequestOptions) => Promise<T>;
|
|
2192
|
+
delete: <T = unknown>(path: string, options?: RequestOptions) => Promise<T>;
|
|
2193
|
+
poll: <T = unknown>(path: string, options?: PollOptions) => Promise<T>;
|
|
2194
|
+
fetch: (path: string, init?: RequestInit & {
|
|
2195
|
+
searchParams?: Record<string, string>;
|
|
2196
|
+
authRequired?: boolean;
|
|
2197
|
+
}) => Promise<Response>;
|
|
2198
|
+
}
|
|
2199
|
+
interface RequestOptions {
|
|
2200
|
+
headers?: Record<string, string>;
|
|
2201
|
+
searchParams?: Record<string, string>;
|
|
2202
|
+
authRequired?: boolean;
|
|
2203
|
+
customErrorHandler?: (errorInfo: {
|
|
2204
|
+
status: number;
|
|
2205
|
+
statusText: string;
|
|
2206
|
+
data: unknown;
|
|
2207
|
+
}) => Error | undefined;
|
|
2208
|
+
}
|
|
2209
|
+
interface PollOptions extends RequestOptions {
|
|
2210
|
+
maxAttempts?: number;
|
|
2211
|
+
initialDelay?: number;
|
|
2212
|
+
maxDelay?: number;
|
|
2213
|
+
successStatus?: number;
|
|
2214
|
+
pendingStatus?: number;
|
|
2215
|
+
resultExtractor?: (response: unknown) => unknown;
|
|
2216
|
+
}
|
|
2188
2217
|
type Need = z.infer<typeof NeedSchema>;
|
|
2189
2218
|
type Action = z.infer<typeof ActionSchema>;
|
|
2190
2219
|
type Choice = z.infer<typeof ChoiceSchema>;
|
|
@@ -2234,6 +2263,11 @@ interface ListAppsPluginProvides {
|
|
|
2234
2263
|
};
|
|
2235
2264
|
};
|
|
2236
2265
|
}
|
|
2266
|
+
declare const listAppsPlugin: Plugin<{}, // no SDK dependencies
|
|
2267
|
+
{
|
|
2268
|
+
api: ApiClient;
|
|
2269
|
+
}, // requires api in context
|
|
2270
|
+
ListAppsPluginProvides>;
|
|
2237
2271
|
|
|
2238
2272
|
interface LockVersionPluginProvides {
|
|
2239
2273
|
lockVersion: (options: LockVersionOptions & {
|
|
@@ -2250,6 +2284,9 @@ interface LockVersionPluginProvides {
|
|
|
2250
2284
|
};
|
|
2251
2285
|
};
|
|
2252
2286
|
}
|
|
2287
|
+
declare const lockVersionPlugin: Plugin<GetSdkType<ListAppsPluginProvides>, // requires getApp in SDK
|
|
2288
|
+
{}, // requires manifest context
|
|
2289
|
+
LockVersionPluginProvides>;
|
|
2253
2290
|
|
|
2254
2291
|
interface RegistryPluginProvides {
|
|
2255
2292
|
getRegistry: () => {
|
|
@@ -2262,6 +2299,9 @@ interface RegistryPluginProvides {
|
|
|
2262
2299
|
}[];
|
|
2263
2300
|
};
|
|
2264
2301
|
}
|
|
2302
|
+
declare const registryPlugin: Plugin<{}, // accepts any SDK shape
|
|
2303
|
+
{}, // requires no context
|
|
2304
|
+
RegistryPluginProvides>;
|
|
2265
2305
|
|
|
2266
2306
|
declare const GetProfileSchema: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
2267
2307
|
type GetProfileOptions = z.infer<typeof GetProfileSchema> & FunctionOptions;
|
|
@@ -2278,6 +2318,11 @@ interface GetProfilePluginProvides {
|
|
|
2278
2318
|
};
|
|
2279
2319
|
};
|
|
2280
2320
|
}
|
|
2321
|
+
declare const getProfilePlugin: Plugin<{}, // no SDK dependencies
|
|
2322
|
+
{
|
|
2323
|
+
api: ApiClient;
|
|
2324
|
+
}, // requires api in context
|
|
2325
|
+
GetProfilePluginProvides>;
|
|
2281
2326
|
|
|
2282
2327
|
interface RequestPluginProvides {
|
|
2283
2328
|
request: (options: RelayRequestOptions) => Promise<Response>;
|
|
@@ -2289,6 +2334,11 @@ interface RequestPluginProvides {
|
|
|
2289
2334
|
};
|
|
2290
2335
|
};
|
|
2291
2336
|
}
|
|
2337
|
+
declare const requestPlugin: Plugin<{}, // no SDK dependencies
|
|
2338
|
+
{
|
|
2339
|
+
api: ApiClient;
|
|
2340
|
+
}, // requires api in context
|
|
2341
|
+
RequestPluginProvides>;
|
|
2292
2342
|
|
|
2293
2343
|
interface FetchPluginProvides {
|
|
2294
2344
|
fetch: (url: string | URL, init?: RequestInit & {
|
|
@@ -2328,15 +2378,48 @@ type GetImplementation = (appKey: string) => Promise<AppItem | null>;
|
|
|
2328
2378
|
type Manifest = {
|
|
2329
2379
|
apps: Record<string, ManifestEntry>;
|
|
2330
2380
|
};
|
|
2381
|
+
declare const ManifestPluginOptionsSchema: z.ZodObject<{
|
|
2382
|
+
manifestPath: z.ZodOptional<z.ZodString>;
|
|
2383
|
+
manifest: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2384
|
+
implementationName: z.ZodString;
|
|
2385
|
+
version: z.ZodOptional<z.ZodString>;
|
|
2386
|
+
}, "strip", z.ZodTypeAny, {
|
|
2387
|
+
implementationName: string;
|
|
2388
|
+
version?: string | undefined;
|
|
2389
|
+
}, {
|
|
2390
|
+
implementationName: string;
|
|
2391
|
+
version?: string | undefined;
|
|
2392
|
+
}>>>;
|
|
2393
|
+
}, "strip", z.ZodTypeAny, {
|
|
2394
|
+
manifestPath?: string | undefined;
|
|
2395
|
+
manifest?: Record<string, {
|
|
2396
|
+
implementationName: string;
|
|
2397
|
+
version?: string | undefined;
|
|
2398
|
+
}> | undefined;
|
|
2399
|
+
}, {
|
|
2400
|
+
manifestPath?: string | undefined;
|
|
2401
|
+
manifest?: Record<string, {
|
|
2402
|
+
implementationName: string;
|
|
2403
|
+
version?: string | undefined;
|
|
2404
|
+
}> | undefined;
|
|
2405
|
+
}>;
|
|
2331
2406
|
|
|
2407
|
+
type ManifestPluginOptions = z.infer<typeof ManifestPluginOptionsSchema>;
|
|
2332
2408
|
interface ManifestPluginProvides {
|
|
2333
2409
|
context: {
|
|
2334
|
-
manifest: Manifest | null;
|
|
2335
2410
|
getVersionedImplementationId: GetVersionedImplementationId;
|
|
2336
2411
|
getManifestEntry: GetManifestEntry;
|
|
2337
2412
|
getImplementation: GetImplementation;
|
|
2338
2413
|
};
|
|
2339
2414
|
}
|
|
2415
|
+
/**
|
|
2416
|
+
* Load manifest from a file path synchronously
|
|
2417
|
+
* Supports local files (Node.js only)
|
|
2418
|
+
*/
|
|
2419
|
+
declare function loadManifestFromFile(filePath: string): Manifest | null;
|
|
2420
|
+
declare const manifestPlugin: Plugin<GetSdkType<ListAppsPluginProvides>, {
|
|
2421
|
+
api: ApiClient;
|
|
2422
|
+
}, ManifestPluginProvides>;
|
|
2340
2423
|
|
|
2341
2424
|
interface GetAppPluginProvides {
|
|
2342
2425
|
getApp: (options: GetAppOptions) => Promise<{
|
|
@@ -2350,6 +2433,11 @@ interface GetAppPluginProvides {
|
|
|
2350
2433
|
};
|
|
2351
2434
|
};
|
|
2352
2435
|
}
|
|
2436
|
+
declare const getAppPlugin: Plugin<GetSdkType<ManifestPluginProvides>, // depends on manifest plugin with getImplementation in context
|
|
2437
|
+
{
|
|
2438
|
+
getImplementation: GetImplementation;
|
|
2439
|
+
}, //
|
|
2440
|
+
GetAppPluginProvides>;
|
|
2353
2441
|
|
|
2354
2442
|
declare const ListActionsSchema: z.ZodObject<{
|
|
2355
2443
|
appKey: z.ZodString;
|
|
@@ -2386,6 +2474,12 @@ interface ListActionsPluginProvides {
|
|
|
2386
2474
|
};
|
|
2387
2475
|
};
|
|
2388
2476
|
}
|
|
2477
|
+
declare const listActionsPlugin: Plugin<GetSdkType<ManifestPluginProvides>, // requires getApp in SDK
|
|
2478
|
+
{
|
|
2479
|
+
api: ApiClient;
|
|
2480
|
+
getVersionedImplementationId: GetVersionedImplementationId;
|
|
2481
|
+
}, // requires api and getVersionedImplementationId in context
|
|
2482
|
+
ListActionsPluginProvides>;
|
|
2389
2483
|
|
|
2390
2484
|
declare const GetActionSchema: z.ZodObject<{
|
|
2391
2485
|
appKey: z.ZodString;
|
|
@@ -2414,6 +2508,11 @@ interface GetActionPluginProvides {
|
|
|
2414
2508
|
};
|
|
2415
2509
|
};
|
|
2416
2510
|
}
|
|
2511
|
+
declare const getActionPlugin: Plugin<GetSdkType<ListActionsPluginProvides>, // requires listActions in SDK
|
|
2512
|
+
{
|
|
2513
|
+
api: ApiClient;
|
|
2514
|
+
}, // requires api in context
|
|
2515
|
+
GetActionPluginProvides>;
|
|
2417
2516
|
|
|
2418
2517
|
declare const RunActionSchema: z.ZodObject<{
|
|
2419
2518
|
appKey: z.ZodString;
|
|
@@ -2459,6 +2558,12 @@ interface RunActionPluginProvides {
|
|
|
2459
2558
|
};
|
|
2460
2559
|
};
|
|
2461
2560
|
}
|
|
2561
|
+
declare const runActionPlugin: Plugin<GetSdkType<GetActionPluginProvides & GetAppPluginProvides>, // requires getAction and getApp in SDK
|
|
2562
|
+
{
|
|
2563
|
+
api: ApiClient;
|
|
2564
|
+
getVersionedImplementationId: GetVersionedImplementationId;
|
|
2565
|
+
}, // requires api in context
|
|
2566
|
+
RunActionPluginProvides>;
|
|
2462
2567
|
|
|
2463
2568
|
declare const ListAuthenticationsSchema: z.ZodObject<{
|
|
2464
2569
|
appKey: z.ZodOptional<z.ZodString>;
|
|
@@ -2504,6 +2609,12 @@ interface ListAuthenticationsPluginProvides {
|
|
|
2504
2609
|
};
|
|
2505
2610
|
};
|
|
2506
2611
|
}
|
|
2612
|
+
declare const listAuthenticationsPlugin: Plugin<GetSdkType<ManifestPluginProvides>, // requires getApp in SDK
|
|
2613
|
+
{
|
|
2614
|
+
api: ApiClient;
|
|
2615
|
+
getVersionedImplementationId: GetVersionedImplementationId;
|
|
2616
|
+
}, // requires api in context
|
|
2617
|
+
ListAuthenticationsPluginProvides>;
|
|
2507
2618
|
|
|
2508
2619
|
interface GetAuthenticationPluginProvides {
|
|
2509
2620
|
getAuthentication: (options: GetAuthenticationOptions) => Promise<{
|
|
@@ -2517,6 +2628,11 @@ interface GetAuthenticationPluginProvides {
|
|
|
2517
2628
|
};
|
|
2518
2629
|
};
|
|
2519
2630
|
}
|
|
2631
|
+
declare const getAuthenticationPlugin: Plugin<{}, // no SDK dependencies
|
|
2632
|
+
{
|
|
2633
|
+
api: ApiClient;
|
|
2634
|
+
}, // requires api in context
|
|
2635
|
+
GetAuthenticationPluginProvides>;
|
|
2520
2636
|
|
|
2521
2637
|
interface FindFirstAuthenticationPluginProvides {
|
|
2522
2638
|
findFirstAuthentication: (options?: FindFirstAuthenticationOptions) => Promise<{
|
|
@@ -2530,6 +2646,9 @@ interface FindFirstAuthenticationPluginProvides {
|
|
|
2530
2646
|
};
|
|
2531
2647
|
};
|
|
2532
2648
|
}
|
|
2649
|
+
declare const findFirstAuthenticationPlugin: Plugin<GetSdkType<ListAuthenticationsPluginProvides>, // requires listAuthentications in SDK
|
|
2650
|
+
{}, // no context requirements
|
|
2651
|
+
FindFirstAuthenticationPluginProvides>;
|
|
2533
2652
|
|
|
2534
2653
|
interface FindUniqueAuthenticationPluginProvides {
|
|
2535
2654
|
findUniqueAuthentication: (options?: FindUniqueAuthenticationOptions) => Promise<{
|
|
@@ -2543,6 +2662,9 @@ interface FindUniqueAuthenticationPluginProvides {
|
|
|
2543
2662
|
};
|
|
2544
2663
|
};
|
|
2545
2664
|
}
|
|
2665
|
+
declare const findUniqueAuthenticationPlugin: Plugin<GetSdkType<ListAuthenticationsPluginProvides>, // requires listAuthentications in SDK
|
|
2666
|
+
{}, // no context requirements
|
|
2667
|
+
FindUniqueAuthenticationPluginProvides>;
|
|
2546
2668
|
|
|
2547
2669
|
interface ListInputFieldsPluginProvides {
|
|
2548
2670
|
listInputFields: (options?: ListInputFieldsOptions) => Promise<{
|
|
@@ -2561,6 +2683,12 @@ interface ListInputFieldsPluginProvides {
|
|
|
2561
2683
|
};
|
|
2562
2684
|
};
|
|
2563
2685
|
}
|
|
2686
|
+
declare const listInputFieldsPlugin: Plugin<GetSdkType<GetAppPluginProvides>, // requires getApp in SDK
|
|
2687
|
+
{
|
|
2688
|
+
api: ApiClient;
|
|
2689
|
+
getVersionedImplementationId: GetVersionedImplementationId;
|
|
2690
|
+
}, // requires api and getVersionedImplementationId in context
|
|
2691
|
+
ListInputFieldsPluginProvides>;
|
|
2564
2692
|
|
|
2565
2693
|
/**
|
|
2566
2694
|
* SDK-related types and interfaces
|
|
@@ -2665,6 +2793,17 @@ declare const appsPlugin: Plugin<GetSdkType<FetchPluginProvides & RunActionPlugi
|
|
|
2665
2793
|
{}, // no context requirements
|
|
2666
2794
|
AppsPluginProvides>;
|
|
2667
2795
|
|
|
2796
|
+
interface ApiPluginOptions extends BaseSdkOptions {
|
|
2797
|
+
}
|
|
2798
|
+
interface ApiPluginProvides {
|
|
2799
|
+
context: {
|
|
2800
|
+
api: ApiClient;
|
|
2801
|
+
};
|
|
2802
|
+
}
|
|
2803
|
+
declare const apiPlugin: Plugin<{}, // no SDK dependencies
|
|
2804
|
+
{}, // requires no context
|
|
2805
|
+
ApiPluginProvides>;
|
|
2806
|
+
|
|
2668
2807
|
interface InputsResolver {
|
|
2669
2808
|
type: "fields";
|
|
2670
2809
|
depends: readonly string[];
|
|
@@ -2738,6 +2877,19 @@ declare function getResolutionOrder(paramName: string, resolved?: Set<string>):
|
|
|
2738
2877
|
*/
|
|
2739
2878
|
declare function getResolutionOrderForParams(paramNames: string[]): string[];
|
|
2740
2879
|
|
|
2880
|
+
/**
|
|
2881
|
+
* Generic utility functions for creating paginated SDK functions
|
|
2882
|
+
*/
|
|
2883
|
+
|
|
2884
|
+
/**
|
|
2885
|
+
* Higher-order function that creates a function from a core function
|
|
2886
|
+
*
|
|
2887
|
+
* @param coreFn - Function that returns T directly or throws errors
|
|
2888
|
+
* @param schema - Optional Zod schema for validation
|
|
2889
|
+
* @returns A function that normalizes and rethrows errors
|
|
2890
|
+
*/
|
|
2891
|
+
declare function createFunction<TOptions, TResult, TSchemaOptions extends TOptions = TOptions>(coreFn: (options: TOptions) => Promise<TResult>, schema?: z.ZodSchema<TSchemaOptions>): (options?: TOptions) => Promise<TResult>;
|
|
2892
|
+
|
|
2741
2893
|
/**
|
|
2742
2894
|
* SDK Authentication Utilities
|
|
2743
2895
|
*
|
|
@@ -2776,6 +2928,93 @@ interface ZapierSdkOptions extends BaseSdkOptions {
|
|
|
2776
2928
|
declare function createSdk<TCurrentSdk = {}, TCurrentContext = {
|
|
2777
2929
|
meta: Record<string, PluginMeta>;
|
|
2778
2930
|
}>(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>, {
|
|
2932
|
+
meta: Record<string, PluginMeta>;
|
|
2933
|
+
} & {
|
|
2934
|
+
api: ApiClient;
|
|
2935
|
+
} & {
|
|
2936
|
+
meta: {
|
|
2937
|
+
listApps: {
|
|
2938
|
+
inputSchema: typeof ListAppsSchema;
|
|
2939
|
+
};
|
|
2940
|
+
};
|
|
2941
|
+
} & {
|
|
2942
|
+
getVersionedImplementationId: GetVersionedImplementationId;
|
|
2943
|
+
getManifestEntry: GetManifestEntry;
|
|
2944
|
+
getImplementation: GetImplementation;
|
|
2945
|
+
} & {
|
|
2946
|
+
meta: {
|
|
2947
|
+
getApp: {
|
|
2948
|
+
inputSchema: typeof GetAppSchema;
|
|
2949
|
+
};
|
|
2950
|
+
};
|
|
2951
|
+
} & {
|
|
2952
|
+
meta: {
|
|
2953
|
+
listActions: {
|
|
2954
|
+
inputSchema: typeof ListActionsSchema;
|
|
2955
|
+
};
|
|
2956
|
+
};
|
|
2957
|
+
} & {
|
|
2958
|
+
meta: {
|
|
2959
|
+
getAction: {
|
|
2960
|
+
inputSchema: typeof GetActionSchema;
|
|
2961
|
+
};
|
|
2962
|
+
};
|
|
2963
|
+
} & {
|
|
2964
|
+
meta: {
|
|
2965
|
+
listInputFields: {
|
|
2966
|
+
inputSchema: typeof ListInputFieldsSchema;
|
|
2967
|
+
};
|
|
2968
|
+
};
|
|
2969
|
+
} & {
|
|
2970
|
+
meta: {
|
|
2971
|
+
runAction: {
|
|
2972
|
+
inputSchema: typeof RunActionSchema;
|
|
2973
|
+
};
|
|
2974
|
+
};
|
|
2975
|
+
} & {
|
|
2976
|
+
meta: {
|
|
2977
|
+
lockVersion: {
|
|
2978
|
+
inputSchema: typeof LockVersionSchema;
|
|
2979
|
+
};
|
|
2980
|
+
};
|
|
2981
|
+
} & {
|
|
2982
|
+
meta: {
|
|
2983
|
+
listAuthentications: {
|
|
2984
|
+
inputSchema: typeof ListAuthenticationsSchema;
|
|
2985
|
+
};
|
|
2986
|
+
};
|
|
2987
|
+
} & {
|
|
2988
|
+
meta: {
|
|
2989
|
+
getAuthentication: {
|
|
2990
|
+
inputSchema: typeof GetAuthenticationSchema;
|
|
2991
|
+
};
|
|
2992
|
+
};
|
|
2993
|
+
} & {
|
|
2994
|
+
meta: {
|
|
2995
|
+
findFirstAuthentication: {
|
|
2996
|
+
inputSchema: typeof FindFirstAuthenticationSchema;
|
|
2997
|
+
};
|
|
2998
|
+
};
|
|
2999
|
+
} & {
|
|
3000
|
+
meta: {
|
|
3001
|
+
findUniqueAuthentication: {
|
|
3002
|
+
inputSchema: typeof FindUniqueAuthenticationSchema;
|
|
3003
|
+
};
|
|
3004
|
+
};
|
|
3005
|
+
} & {
|
|
3006
|
+
meta: {
|
|
3007
|
+
request: {
|
|
3008
|
+
inputSchema: typeof RelayRequestSchema;
|
|
3009
|
+
};
|
|
3010
|
+
};
|
|
3011
|
+
} & {
|
|
3012
|
+
meta: {
|
|
3013
|
+
getProfile: {
|
|
3014
|
+
inputSchema: typeof GetProfileSchema;
|
|
3015
|
+
};
|
|
3016
|
+
};
|
|
3017
|
+
}>;
|
|
2779
3018
|
declare function createZapierSdk(options?: ZapierSdkOptions): ZapierSdk;
|
|
2780
3019
|
|
|
2781
|
-
export { type Action, type ActionExecutionResult, type ActionField, type ActionFieldChoice, type ActionItem, type ActionKeyProperty, ActionKeyPropertySchema, type ActionTypeProperty, ActionTypePropertySchema, type ApiError, type ApiEvent, type App, type AppItem, type AppKeyProperty, AppKeyPropertySchema, type AppsPluginProvides, type AuthEvent, type AuthOptions, type Authentication, type AuthenticationIdProperty, AuthenticationIdPropertySchema, type AuthenticationItem, type AuthenticationsResponse, type Choice, type DebugProperty, DebugPropertySchema, type ErrorOptions, type EventCallback, type FetchPluginProvides, type Field, type FunctionOptions, type FunctionRegistryEntry, type GetSdkType, type InputFieldItem, type InputsProperty, InputsPropertySchema, type LimitProperty, LimitPropertySchema, type LoadingEvent, type Need, type NeedsRequest, type NeedsResponse, type OffsetProperty, OffsetPropertySchema, type OutputProperty, OutputPropertySchema, type PaginatedSdkFunction, type ParamsProperty, ParamsPropertySchema, type Plugin, type PluginDependencies, type PluginOptions, type PluginProvides, RelayFetchSchema, RelayRequestSchema, type ResolverName, type ResolverType, type Sdk, type SdkEvent, type UserProfile, type UserProfileItem, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierError, type ZapierFetchInitOptions, ZapierNotFoundError, ZapierResourceNotFoundError, type ZapierSdk, type ZapierSdkOptions, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, appKeyResolver, appsPlugin, authenticationIdResolver, createSdk, createZapierSdk, fetchPlugin, formatErrorMessage, getResolutionOrder, getResolutionOrderForParams, getResolvableParams, getResolver, getResolversForMissingParams, getTokenFromCliLogin, getTokenFromEnv, getTokenFromEnvOrConfig, hasResolver, inputsResolver, isPositional, resolverRegistry };
|
|
3020
|
+
export { type Action, type ActionExecutionResult, type ActionField, type ActionFieldChoice, type ActionItem, type ActionKeyProperty, ActionKeyPropertySchema, type ActionTypeProperty, ActionTypePropertySchema, type ApiError, type ApiEvent, type ApiPluginOptions, type ApiPluginProvides, type App, type AppItem, type AppKeyProperty, AppKeyPropertySchema, type AppsPluginProvides, type AuthEvent, type AuthOptions, type Authentication, type AuthenticationIdProperty, AuthenticationIdPropertySchema, type AuthenticationItem, type AuthenticationsResponse, type Choice, type DebugProperty, DebugPropertySchema, type ErrorOptions, type EventCallback, type FetchPluginProvides, type Field, type FindFirstAuthenticationPluginProvides, type FindUniqueAuthenticationPluginProvides, type FunctionOptions, type FunctionRegistryEntry, type GetActionPluginProvides, type GetAppPluginProvides, type GetAuthenticationPluginProvides, type GetProfilePluginProvides, type GetSdkType, type InputFieldItem, type InputsProperty, InputsPropertySchema, type LimitProperty, LimitPropertySchema, type ListActionsPluginProvides, type ListAppsPluginProvides, type ListAuthenticationsPluginProvides, type ListInputFieldsPluginProvides, type LoadingEvent, type LockVersionPluginProvides, type ManifestPluginOptions, type ManifestPluginProvides, type Need, type NeedsRequest, type NeedsResponse, type OffsetProperty, OffsetPropertySchema, type OutputProperty, OutputPropertySchema, type PaginatedSdkFunction, type ParamsProperty, ParamsPropertySchema, type Plugin, type PluginDependencies, type PluginOptions, type PluginProvides, RelayFetchSchema, RelayRequestSchema, type RequestPluginProvides, type ResolverName, type ResolverType, type RunActionPluginProvides, type Sdk, type SdkEvent, type UserProfile, type UserProfileItem, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierError, type ZapierFetchInitOptions, ZapierNotFoundError, ZapierResourceNotFoundError, type ZapierSdk, type ZapierSdkOptions, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, appKeyResolver, appsPlugin, authenticationIdResolver, createFunction, createSdk, createZapierSdk, createZapierSdkWithoutRegistry, fetchPlugin, findFirstAuthenticationPlugin, findUniqueAuthenticationPlugin, formatErrorMessage, getActionPlugin, getAppPlugin, getAuthenticationPlugin, getProfilePlugin, getResolutionOrder, getResolutionOrderForParams, getResolvableParams, getResolver, getResolversForMissingParams, getTokenFromCliLogin, getTokenFromEnv, getTokenFromEnvOrConfig, hasResolver, inputsResolver, isPositional, listActionsPlugin, listAppsPlugin, listAuthenticationsPlugin, listInputFieldsPlugin, loadManifestFromFile, lockVersionPlugin, manifestPlugin, registryPlugin, requestPlugin, resolverRegistry, runActionPlugin };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,14 +4,31 @@ export * from "./types/properties";
|
|
|
4
4
|
export * from "./types/errors";
|
|
5
5
|
export * from "./plugins/apps";
|
|
6
6
|
export * from "./plugins/fetch";
|
|
7
|
+
export * from "./plugins/listApps";
|
|
8
|
+
export * from "./plugins/listActions";
|
|
9
|
+
export * from "./plugins/listInputFields";
|
|
10
|
+
export * from "./plugins/listAuthentications";
|
|
11
|
+
export * from "./plugins/getApp";
|
|
12
|
+
export * from "./plugins/getAction";
|
|
13
|
+
export * from "./plugins/getAuthentication";
|
|
14
|
+
export * from "./plugins/findFirstAuthentication";
|
|
15
|
+
export * from "./plugins/findUniqueAuthentication";
|
|
16
|
+
export * from "./plugins/runAction";
|
|
17
|
+
export * from "./plugins/request";
|
|
18
|
+
export * from "./plugins/manifest";
|
|
19
|
+
export * from "./plugins/lockVersion";
|
|
20
|
+
export * from "./plugins/getProfile";
|
|
21
|
+
export * from "./plugins/api";
|
|
7
22
|
export type { Action, App, Need, Field, Choice, ActionExecutionResult, ActionField, ActionFieldChoice, NeedsRequest, NeedsResponse, Authentication, AuthenticationsResponse, UserProfile, } from "./api/types";
|
|
8
23
|
export { isPositional } from "./utils/schema-utils";
|
|
9
24
|
export { hasResolver } from "./resolvers";
|
|
25
|
+
export { createFunction } from "./utils/function-utils";
|
|
10
26
|
export * from "./auth";
|
|
11
27
|
export * from "./resolvers";
|
|
12
28
|
export { RelayRequestSchema, RelayFetchSchema, } from "./plugins/request/schemas";
|
|
13
|
-
export { createZapierSdk, createSdk, ZapierSdkOptions } from "./sdk";
|
|
29
|
+
export { createZapierSdk, createZapierSdkWithoutRegistry, createSdk, ZapierSdkOptions, } from "./sdk";
|
|
14
30
|
export type { FunctionRegistryEntry } from "./types/sdk";
|
|
15
31
|
export type { Plugin, PluginProvides, PluginDependencies, PluginOptions, GetSdkType, Sdk, } from "./types/plugin";
|
|
32
|
+
export { registryPlugin } from "./plugins/registry";
|
|
16
33
|
export type { ZapierSdk } from "./types/sdk";
|
|
17
34
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAG9B,YAAY,EACV,MAAM,EACN,GAAG,EACH,IAAI,EACJ,KAAK,EACL,MAAM,EACN,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,WAAW,GACZ,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,cAAc,QAAQ,CAAC;AAGvB,cAAc,aAAa,CAAC;AAI5B,OAAO,EACL,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACL,eAAe,EACf,8BAA8B,EAC9B,SAAS,EACT,gBAAgB,GACjB,MAAM,OAAO,CAAC;AAGf,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGzD,YAAY,EACV,MAAM,EACN,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,GAAG,GACJ,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,9 +5,25 @@ export * from "./types/properties";
|
|
|
5
5
|
export * from "./types/errors";
|
|
6
6
|
export * from "./plugins/apps";
|
|
7
7
|
export * from "./plugins/fetch";
|
|
8
|
+
export * from "./plugins/listApps";
|
|
9
|
+
export * from "./plugins/listActions";
|
|
10
|
+
export * from "./plugins/listInputFields";
|
|
11
|
+
export * from "./plugins/listAuthentications";
|
|
12
|
+
export * from "./plugins/getApp";
|
|
13
|
+
export * from "./plugins/getAction";
|
|
14
|
+
export * from "./plugins/getAuthentication";
|
|
15
|
+
export * from "./plugins/findFirstAuthentication";
|
|
16
|
+
export * from "./plugins/findUniqueAuthentication";
|
|
17
|
+
export * from "./plugins/runAction";
|
|
18
|
+
export * from "./plugins/request";
|
|
19
|
+
export * from "./plugins/manifest";
|
|
20
|
+
export * from "./plugins/lockVersion";
|
|
21
|
+
export * from "./plugins/getProfile";
|
|
22
|
+
export * from "./plugins/api";
|
|
8
23
|
// Export schema utilities for CLI
|
|
9
24
|
export { isPositional } from "./utils/schema-utils";
|
|
10
25
|
export { hasResolver } from "./resolvers";
|
|
26
|
+
export { createFunction } from "./utils/function-utils";
|
|
11
27
|
// Export auth utilities for CLI use
|
|
12
28
|
export * from "./auth";
|
|
13
29
|
// Export resolvers for CLI use
|
|
@@ -16,4 +32,6 @@ export * from "./resolvers";
|
|
|
16
32
|
// Export plugin schemas for external use
|
|
17
33
|
export { RelayRequestSchema, RelayFetchSchema, } from "./plugins/request/schemas";
|
|
18
34
|
// Export the main combined SDK and new flexible SDK creator
|
|
19
|
-
export { createZapierSdk, createSdk } from "./sdk";
|
|
35
|
+
export { createZapierSdk, createZapierSdkWithoutRegistry, createSdk, } from "./sdk";
|
|
36
|
+
// Export registry plugin for manual use
|
|
37
|
+
export { registryPlugin } from "./plugins/registry";
|