@zapier/zapier-sdk 0.18.4 → 0.19.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 +35 -0
- package/README.md +43 -31
- package/dist/index.cjs +365 -64
- package/dist/index.d.mts +220 -33
- package/dist/index.d.ts +2541 -40
- package/dist/index.mjs +345 -63
- package/package.json +14 -13
- package/dist/api/auth.d.ts +0 -19
- package/dist/api/auth.d.ts.map +0 -1
- package/dist/api/auth.js +0 -70
- package/dist/api/auth.test.d.ts +0 -2
- package/dist/api/auth.test.d.ts.map +0 -1
- package/dist/api/auth.test.js +0 -220
- package/dist/api/client.d.ts +0 -9
- package/dist/api/client.d.ts.map +0 -1
- package/dist/api/client.js +0 -356
- package/dist/api/client.test.d.ts +0 -2
- package/dist/api/client.test.d.ts.map +0 -1
- package/dist/api/client.test.js +0 -96
- package/dist/api/debug.d.ts +0 -14
- package/dist/api/debug.d.ts.map +0 -1
- package/dist/api/debug.js +0 -131
- package/dist/api/debug.test.d.ts +0 -2
- package/dist/api/debug.test.d.ts.map +0 -1
- package/dist/api/debug.test.js +0 -59
- package/dist/api/index.d.ts +0 -30
- package/dist/api/index.d.ts.map +0 -1
- package/dist/api/index.js +0 -43
- package/dist/api/polling.d.ts +0 -46
- package/dist/api/polling.d.ts.map +0 -1
- package/dist/api/polling.js +0 -139
- package/dist/api/polling.test.d.ts +0 -2
- package/dist/api/polling.test.d.ts.map +0 -1
- package/dist/api/polling.test.js +0 -318
- package/dist/api/schemas.d.ts +0 -422
- package/dist/api/schemas.d.ts.map +0 -1
- package/dist/api/schemas.js +0 -322
- package/dist/api/types.d.ts +0 -83
- package/dist/api/types.d.ts.map +0 -1
- package/dist/api/types.js +0 -1
- package/dist/auth.d.ts +0 -52
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js +0 -72
- package/dist/auth.test.d.ts +0 -2
- package/dist/auth.test.d.ts.map +0 -1
- package/dist/auth.test.js +0 -102
- package/dist/constants.d.ts +0 -14
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -13
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -42
- package/dist/plugins/api/index.d.ts +0 -12
- package/dist/plugins/api/index.d.ts.map +0 -1
- package/dist/plugins/api/index.js +0 -24
- package/dist/plugins/apps/index.d.ts +0 -15
- package/dist/plugins/apps/index.d.ts.map +0 -1
- package/dist/plugins/apps/index.js +0 -112
- package/dist/plugins/apps/schemas.d.ts +0 -42
- package/dist/plugins/apps/schemas.d.ts.map +0 -1
- package/dist/plugins/apps/schemas.js +0 -14
- package/dist/plugins/eventEmission/builders.d.ts +0 -14
- package/dist/plugins/eventEmission/builders.d.ts.map +0 -1
- package/dist/plugins/eventEmission/builders.js +0 -109
- package/dist/plugins/eventEmission/index.d.ts +0 -38
- package/dist/plugins/eventEmission/index.d.ts.map +0 -1
- package/dist/plugins/eventEmission/index.js +0 -336
- package/dist/plugins/eventEmission/index.test.d.ts +0 -5
- package/dist/plugins/eventEmission/index.test.d.ts.map +0 -1
- package/dist/plugins/eventEmission/index.test.js +0 -581
- package/dist/plugins/eventEmission/transport.d.ts +0 -27
- package/dist/plugins/eventEmission/transport.d.ts.map +0 -1
- package/dist/plugins/eventEmission/transport.js +0 -104
- package/dist/plugins/eventEmission/transport.test.d.ts +0 -5
- package/dist/plugins/eventEmission/transport.test.d.ts.map +0 -1
- package/dist/plugins/eventEmission/transport.test.js +0 -164
- package/dist/plugins/eventEmission/types.d.ts +0 -63
- package/dist/plugins/eventEmission/types.d.ts.map +0 -1
- package/dist/plugins/eventEmission/types.js +0 -1
- package/dist/plugins/eventEmission/utils.d.ts +0 -45
- package/dist/plugins/eventEmission/utils.d.ts.map +0 -1
- package/dist/plugins/eventEmission/utils.js +0 -114
- package/dist/plugins/fetch/index.d.ts +0 -36
- package/dist/plugins/fetch/index.d.ts.map +0 -1
- package/dist/plugins/fetch/index.js +0 -62
- package/dist/plugins/fetch/schemas.d.ts +0 -19
- package/dist/plugins/fetch/schemas.d.ts.map +0 -1
- package/dist/plugins/fetch/schemas.js +0 -31
- package/dist/plugins/findFirstAuthentication/index.d.ts +0 -21
- package/dist/plugins/findFirstAuthentication/index.d.ts.map +0 -1
- package/dist/plugins/findFirstAuthentication/index.js +0 -36
- package/dist/plugins/findFirstAuthentication/index.test.d.ts +0 -2
- package/dist/plugins/findFirstAuthentication/index.test.d.ts.map +0 -1
- package/dist/plugins/findFirstAuthentication/index.test.js +0 -177
- package/dist/plugins/findFirstAuthentication/schemas.d.ts +0 -20
- package/dist/plugins/findFirstAuthentication/schemas.d.ts.map +0 -1
- package/dist/plugins/findFirstAuthentication/schemas.js +0 -18
- package/dist/plugins/findUniqueAuthentication/index.d.ts +0 -21
- package/dist/plugins/findUniqueAuthentication/index.d.ts.map +0 -1
- package/dist/plugins/findUniqueAuthentication/index.js +0 -39
- package/dist/plugins/findUniqueAuthentication/index.test.d.ts +0 -2
- package/dist/plugins/findUniqueAuthentication/index.test.d.ts.map +0 -1
- package/dist/plugins/findUniqueAuthentication/index.test.js +0 -159
- package/dist/plugins/findUniqueAuthentication/schemas.d.ts +0 -20
- package/dist/plugins/findUniqueAuthentication/schemas.d.ts.map +0 -1
- package/dist/plugins/findUniqueAuthentication/schemas.js +0 -18
- package/dist/plugins/getAction/index.d.ts +0 -25
- package/dist/plugins/getAction/index.d.ts.map +0 -1
- package/dist/plugins/getAction/index.js +0 -42
- package/dist/plugins/getAction/index.test.d.ts +0 -2
- package/dist/plugins/getAction/index.test.d.ts.map +0 -1
- package/dist/plugins/getAction/index.test.js +0 -211
- package/dist/plugins/getAction/schemas.d.ts +0 -30
- package/dist/plugins/getAction/schemas.d.ts.map +0 -1
- package/dist/plugins/getAction/schemas.js +0 -12
- package/dist/plugins/getApp/index.d.ts +0 -21
- package/dist/plugins/getApp/index.d.ts.map +0 -1
- package/dist/plugins/getApp/index.js +0 -44
- package/dist/plugins/getApp/index.test.d.ts +0 -2
- package/dist/plugins/getApp/index.test.d.ts.map +0 -1
- package/dist/plugins/getApp/index.test.js +0 -157
- package/dist/plugins/getApp/schemas.d.ts +0 -16
- package/dist/plugins/getApp/schemas.d.ts.map +0 -1
- package/dist/plugins/getApp/schemas.js +0 -8
- package/dist/plugins/getAuthentication/index.d.ts +0 -21
- package/dist/plugins/getAuthentication/index.d.ts.map +0 -1
- package/dist/plugins/getAuthentication/index.js +0 -29
- package/dist/plugins/getAuthentication/index.test.d.ts +0 -2
- package/dist/plugins/getAuthentication/index.test.d.ts.map +0 -1
- package/dist/plugins/getAuthentication/index.test.js +0 -106
- package/dist/plugins/getAuthentication/schemas.d.ts +0 -7
- package/dist/plugins/getAuthentication/schemas.d.ts.map +0 -1
- package/dist/plugins/getAuthentication/schemas.js +0 -1
- package/dist/plugins/getInputFieldsSchema/index.d.ts +0 -23
- package/dist/plugins/getInputFieldsSchema/index.d.ts.map +0 -1
- package/dist/plugins/getInputFieldsSchema/index.js +0 -53
- package/dist/plugins/getInputFieldsSchema/index.test.d.ts +0 -2
- package/dist/plugins/getInputFieldsSchema/index.test.d.ts.map +0 -1
- package/dist/plugins/getInputFieldsSchema/index.test.js +0 -291
- package/dist/plugins/getInputFieldsSchema/schemas.d.ts +0 -28
- package/dist/plugins/getInputFieldsSchema/schemas.d.ts.map +0 -1
- package/dist/plugins/getInputFieldsSchema/schemas.js +0 -13
- package/dist/plugins/getProfile/index.d.ts +0 -25
- package/dist/plugins/getProfile/index.d.ts.map +0 -1
- package/dist/plugins/getProfile/index.js +0 -39
- package/dist/plugins/getProfile/schemas.d.ts +0 -13
- package/dist/plugins/getProfile/schemas.d.ts.map +0 -1
- package/dist/plugins/getProfile/schemas.js +0 -6
- package/dist/plugins/listActions/index.d.ts +0 -30
- package/dist/plugins/listActions/index.d.ts.map +0 -1
- package/dist/plugins/listActions/index.js +0 -75
- package/dist/plugins/listActions/index.test.d.ts +0 -2
- package/dist/plugins/listActions/index.test.d.ts.map +0 -1
- package/dist/plugins/listActions/index.test.js +0 -453
- package/dist/plugins/listActions/schemas.d.ts +0 -35
- package/dist/plugins/listActions/schemas.d.ts.map +0 -1
- package/dist/plugins/listActions/schemas.js +0 -22
- package/dist/plugins/listApps/index.d.ts +0 -19
- package/dist/plugins/listApps/index.d.ts.map +0 -1
- package/dist/plugins/listApps/index.js +0 -67
- package/dist/plugins/listApps/index.test.d.ts +0 -2
- package/dist/plugins/listApps/index.test.d.ts.map +0 -1
- package/dist/plugins/listApps/index.test.js +0 -121
- package/dist/plugins/listApps/schemas.d.ts +0 -47
- package/dist/plugins/listApps/schemas.d.ts.map +0 -1
- package/dist/plugins/listApps/schemas.js +0 -49
- package/dist/plugins/listAuthentications/index.d.ts +0 -24
- package/dist/plugins/listAuthentications/index.d.ts.map +0 -1
- package/dist/plugins/listAuthentications/index.js +0 -77
- package/dist/plugins/listAuthentications/index.test.d.ts +0 -2
- package/dist/plugins/listAuthentications/index.test.d.ts.map +0 -1
- package/dist/plugins/listAuthentications/index.test.js +0 -848
- package/dist/plugins/listAuthentications/schemas.d.ts +0 -30
- package/dist/plugins/listAuthentications/schemas.d.ts.map +0 -1
- package/dist/plugins/listAuthentications/schemas.js +0 -32
- package/dist/plugins/listInputFieldChoices/index.d.ts +0 -33
- package/dist/plugins/listInputFieldChoices/index.d.ts.map +0 -1
- package/dist/plugins/listInputFieldChoices/index.js +0 -115
- package/dist/plugins/listInputFieldChoices/index.test.d.ts +0 -2
- package/dist/plugins/listInputFieldChoices/index.test.d.ts.map +0 -1
- package/dist/plugins/listInputFieldChoices/index.test.js +0 -717
- package/dist/plugins/listInputFieldChoices/schemas.d.ts +0 -43
- package/dist/plugins/listInputFieldChoices/schemas.d.ts.map +0 -1
- package/dist/plugins/listInputFieldChoices/schemas.js +0 -65
- package/dist/plugins/listInputFields/index.d.ts +0 -34
- package/dist/plugins/listInputFields/index.d.ts.map +0 -1
- package/dist/plugins/listInputFields/index.js +0 -204
- package/dist/plugins/listInputFields/index.test.d.ts +0 -2
- package/dist/plugins/listInputFields/index.test.d.ts.map +0 -1
- package/dist/plugins/listInputFields/index.test.js +0 -359
- package/dist/plugins/listInputFields/schemas.d.ts +0 -35
- package/dist/plugins/listInputFields/schemas.d.ts.map +0 -1
- package/dist/plugins/listInputFields/schemas.js +0 -23
- package/dist/plugins/manifest/index.d.ts +0 -85
- package/dist/plugins/manifest/index.d.ts.map +0 -1
- package/dist/plugins/manifest/index.js +0 -376
- package/dist/plugins/manifest/index.test.d.ts +0 -2
- package/dist/plugins/manifest/index.test.d.ts.map +0 -1
- package/dist/plugins/manifest/index.test.js +0 -1139
- package/dist/plugins/manifest/schemas.d.ts +0 -57
- package/dist/plugins/manifest/schemas.d.ts.map +0 -1
- package/dist/plugins/manifest/schemas.js +0 -50
- package/dist/plugins/registry/index.d.ts +0 -21
- package/dist/plugins/registry/index.d.ts.map +0 -1
- package/dist/plugins/registry/index.js +0 -117
- package/dist/plugins/request/index.d.ts +0 -21
- package/dist/plugins/request/index.d.ts.map +0 -1
- package/dist/plugins/request/index.js +0 -76
- package/dist/plugins/request/index.test.d.ts +0 -2
- package/dist/plugins/request/index.test.d.ts.map +0 -1
- package/dist/plugins/request/index.test.js +0 -337
- package/dist/plugins/request/schemas.d.ts +0 -54
- package/dist/plugins/request/schemas.d.ts.map +0 -1
- package/dist/plugins/request/schemas.js +0 -41
- package/dist/plugins/runAction/index.d.ts +0 -33
- package/dist/plugins/runAction/index.d.ts.map +0 -1
- package/dist/plugins/runAction/index.js +0 -108
- package/dist/plugins/runAction/index.test.d.ts +0 -2
- package/dist/plugins/runAction/index.test.d.ts.map +0 -1
- package/dist/plugins/runAction/index.test.js +0 -333
- package/dist/plugins/runAction/schemas.d.ts +0 -34
- package/dist/plugins/runAction/schemas.d.ts.map +0 -1
- package/dist/plugins/runAction/schemas.js +0 -23
- package/dist/resolvers/actionKey.d.ts +0 -15
- package/dist/resolvers/actionKey.d.ts.map +0 -1
- package/dist/resolvers/actionKey.js +0 -19
- package/dist/resolvers/actionType.d.ts +0 -10
- package/dist/resolvers/actionType.d.ts.map +0 -1
- package/dist/resolvers/actionType.js +0 -21
- package/dist/resolvers/appKey.d.ts +0 -3
- package/dist/resolvers/appKey.d.ts.map +0 -1
- package/dist/resolvers/appKey.js +0 -5
- package/dist/resolvers/authenticationId.d.ts +0 -9
- package/dist/resolvers/authenticationId.d.ts.map +0 -1
- package/dist/resolvers/authenticationId.js +0 -42
- package/dist/resolvers/index.d.ts +0 -8
- package/dist/resolvers/index.d.ts.map +0 -1
- package/dist/resolvers/index.js +0 -8
- package/dist/resolvers/inputFieldKey.d.ts +0 -11
- package/dist/resolvers/inputFieldKey.d.ts.map +0 -1
- package/dist/resolvers/inputFieldKey.js +0 -47
- package/dist/resolvers/inputs.d.ts +0 -17
- package/dist/resolvers/inputs.d.ts.map +0 -1
- package/dist/resolvers/inputs.js +0 -50
- package/dist/schemas/Action.d.ts +0 -24
- package/dist/schemas/Action.d.ts.map +0 -1
- package/dist/schemas/Action.js +0 -40
- package/dist/schemas/App.d.ts +0 -57
- package/dist/schemas/App.d.ts.map +0 -1
- package/dist/schemas/App.js +0 -26
- package/dist/schemas/Auth.d.ts +0 -55
- package/dist/schemas/Auth.d.ts.map +0 -1
- package/dist/schemas/Auth.js +0 -33
- package/dist/schemas/Field.d.ts +0 -61
- package/dist/schemas/Field.d.ts.map +0 -1
- package/dist/schemas/Field.js +0 -116
- package/dist/schemas/Run.d.ts +0 -3
- package/dist/schemas/Run.d.ts.map +0 -1
- package/dist/schemas/Run.js +0 -31
- package/dist/schemas/UserProfile.d.ts +0 -13
- package/dist/schemas/UserProfile.d.ts.map +0 -1
- package/dist/schemas/UserProfile.js +0 -32
- package/dist/sdk.d.ts +0 -146
- package/dist/sdk.d.ts.map +0 -1
- package/dist/sdk.js +0 -112
- package/dist/sdk.test.d.ts +0 -2
- package/dist/sdk.test.d.ts.map +0 -1
- package/dist/sdk.test.js +0 -258
- package/dist/services/implementations.d.ts +0 -63
- package/dist/services/implementations.d.ts.map +0 -1
- package/dist/services/implementations.js +0 -80
- package/dist/types/domain.d.ts +0 -52
- package/dist/types/domain.d.ts.map +0 -1
- package/dist/types/domain.js +0 -1
- package/dist/types/domain.test.d.ts +0 -2
- package/dist/types/domain.test.d.ts.map +0 -1
- package/dist/types/domain.test.js +0 -39
- package/dist/types/errors.d.ts +0 -143
- package/dist/types/errors.d.ts.map +0 -1
- package/dist/types/errors.js +0 -187
- package/dist/types/events.d.ts +0 -38
- package/dist/types/events.d.ts.map +0 -1
- package/dist/types/events.js +0 -7
- package/dist/types/functions.d.ts +0 -27
- package/dist/types/functions.d.ts.map +0 -1
- package/dist/types/functions.js +0 -1
- package/dist/types/plugin.d.ts +0 -75
- package/dist/types/plugin.d.ts.map +0 -1
- package/dist/types/plugin.js +0 -9
- package/dist/types/properties.d.ts +0 -33
- package/dist/types/properties.d.ts.map +0 -1
- package/dist/types/properties.js +0 -52
- package/dist/types/sdk.d.ts +0 -69
- package/dist/types/sdk.d.ts.map +0 -1
- package/dist/types/sdk.js +0 -4
- package/dist/types/telemetry-events.d.ts +0 -105
- package/dist/types/telemetry-events.d.ts.map +0 -1
- package/dist/types/telemetry-events.js +0 -8
- package/dist/utils/array-utils.d.ts +0 -31
- package/dist/utils/array-utils.d.ts.map +0 -1
- package/dist/utils/array-utils.js +0 -36
- package/dist/utils/array-utils.test.d.ts +0 -2
- package/dist/utils/array-utils.test.d.ts.map +0 -1
- package/dist/utils/array-utils.test.js +0 -107
- package/dist/utils/batch-utils.d.ts +0 -72
- package/dist/utils/batch-utils.d.ts.map +0 -1
- package/dist/utils/batch-utils.js +0 -162
- package/dist/utils/batch-utils.test.d.ts +0 -2
- package/dist/utils/batch-utils.test.d.ts.map +0 -1
- package/dist/utils/batch-utils.test.js +0 -476
- package/dist/utils/domain-utils.d.ts +0 -66
- package/dist/utils/domain-utils.d.ts.map +0 -1
- package/dist/utils/domain-utils.js +0 -164
- package/dist/utils/domain-utils.test.d.ts +0 -2
- package/dist/utils/domain-utils.test.d.ts.map +0 -1
- package/dist/utils/domain-utils.test.js +0 -346
- package/dist/utils/file-utils.d.ts +0 -4
- package/dist/utils/file-utils.d.ts.map +0 -1
- package/dist/utils/file-utils.js +0 -74
- package/dist/utils/file-utils.test.d.ts +0 -2
- package/dist/utils/file-utils.test.d.ts.map +0 -1
- package/dist/utils/file-utils.test.js +0 -51
- package/dist/utils/function-utils.d.ts +0 -73
- package/dist/utils/function-utils.d.ts.map +0 -1
- package/dist/utils/function-utils.js +0 -245
- package/dist/utils/function-utils.test.d.ts +0 -2
- package/dist/utils/function-utils.test.d.ts.map +0 -1
- package/dist/utils/function-utils.test.js +0 -110
- package/dist/utils/id-utils.d.ts +0 -13
- package/dist/utils/id-utils.d.ts.map +0 -1
- package/dist/utils/id-utils.js +0 -22
- package/dist/utils/id-utils.test.d.ts +0 -2
- package/dist/utils/id-utils.test.d.ts.map +0 -1
- package/dist/utils/id-utils.test.js +0 -22
- package/dist/utils/pagination-utils.d.ts +0 -37
- package/dist/utils/pagination-utils.d.ts.map +0 -1
- package/dist/utils/pagination-utils.js +0 -165
- package/dist/utils/pagination-utils.test.d.ts +0 -17
- package/dist/utils/pagination-utils.test.d.ts.map +0 -1
- package/dist/utils/pagination-utils.test.js +0 -461
- package/dist/utils/retry-utils.d.ts +0 -45
- package/dist/utils/retry-utils.d.ts.map +0 -1
- package/dist/utils/retry-utils.js +0 -51
- package/dist/utils/retry-utils.test.d.ts +0 -2
- package/dist/utils/retry-utils.test.d.ts.map +0 -1
- package/dist/utils/retry-utils.test.js +0 -90
- package/dist/utils/schema-utils.d.ts +0 -69
- package/dist/utils/schema-utils.d.ts.map +0 -1
- package/dist/utils/schema-utils.js +0 -72
- package/dist/utils/string-utils.d.ts +0 -40
- package/dist/utils/string-utils.d.ts.map +0 -1
- package/dist/utils/string-utils.js +0 -69
- package/dist/utils/string-utils.test.d.ts +0 -2
- package/dist/utils/string-utils.test.d.ts.map +0 -1
- package/dist/utils/string-utils.test.js +0 -59
- package/dist/utils/telemetry-utils.d.ts +0 -44
- package/dist/utils/telemetry-utils.d.ts.map +0 -1
- package/dist/utils/telemetry-utils.js +0 -55
- package/dist/utils/telemetry-utils.test.d.ts +0 -2
- package/dist/utils/telemetry-utils.test.d.ts.map +0 -1
- package/dist/utils/telemetry-utils.test.js +0 -94
- package/dist/utils/url-utils.d.ts +0 -19
- package/dist/utils/url-utils.d.ts.map +0 -1
- package/dist/utils/url-utils.js +0 -62
- package/dist/utils/url-utils.test.d.ts +0 -2
- package/dist/utils/url-utils.test.d.ts.map +0 -1
- package/dist/utils/url-utils.test.js +0 -103
- package/dist/utils/validation.d.ts +0 -4
- package/dist/utils/validation.d.ts.map +0 -1
- package/dist/utils/validation.js +0 -30
- package/dist/utils/validation.test.d.ts +0 -2
- package/dist/utils/validation.test.d.ts.map +0 -1
- package/dist/utils/validation.test.js +0 -44
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import type { ResolvedAppLocator } from "../../utils/domain-utils";
|
|
3
|
-
import type { AppItem } from "../../types/domain";
|
|
4
|
-
export declare const DEFAULT_CONFIG_PATH: ".zapierrc";
|
|
5
|
-
export type ManifestEntry = {
|
|
6
|
-
implementationName: string;
|
|
7
|
-
version?: string;
|
|
8
|
-
};
|
|
9
|
-
export type GetVersionedImplementationId = (appKey: string) => Promise<string | null>;
|
|
10
|
-
export type GetImplementation = (appKey: string) => Promise<AppItem | null>;
|
|
11
|
-
/**
|
|
12
|
-
* Action entry for storing saved action configurations
|
|
13
|
-
* The key in the actions record IS the user-provided name
|
|
14
|
-
*/
|
|
15
|
-
export declare const ActionEntrySchema: z.ZodObject<{
|
|
16
|
-
appKey: z.ZodString;
|
|
17
|
-
actionKey: z.ZodString;
|
|
18
|
-
actionType: z.ZodString;
|
|
19
|
-
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
20
|
-
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
21
|
-
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
22
|
-
createdAt: z.ZodString;
|
|
23
|
-
}, z.core.$strip>;
|
|
24
|
-
export type ActionEntry = z.infer<typeof ActionEntrySchema>;
|
|
25
|
-
export type Manifest = {
|
|
26
|
-
apps: Record<string, ManifestEntry>;
|
|
27
|
-
actions?: Record<string, ActionEntry>;
|
|
28
|
-
};
|
|
29
|
-
export type ResolveAppKeys = ({ appKeys, }: {
|
|
30
|
-
appKeys: string[];
|
|
31
|
-
}) => Promise<ResolvedAppLocator[]>;
|
|
32
|
-
/**
|
|
33
|
-
* Manifest schema for version locking and saved action configurations
|
|
34
|
-
*/
|
|
35
|
-
export declare const ManifestSchema: z.ZodObject<{
|
|
36
|
-
apps: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
37
|
-
implementationName: z.ZodString;
|
|
38
|
-
version: z.ZodString;
|
|
39
|
-
}, z.core.$strip>>;
|
|
40
|
-
actions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
41
|
-
appKey: z.ZodString;
|
|
42
|
-
actionKey: z.ZodString;
|
|
43
|
-
actionType: z.ZodString;
|
|
44
|
-
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
45
|
-
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
46
|
-
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
47
|
-
createdAt: z.ZodString;
|
|
48
|
-
}, z.core.$strip>>>;
|
|
49
|
-
}, z.core.$strip>;
|
|
50
|
-
export declare const ManifestPluginOptionsSchema: z.ZodObject<{
|
|
51
|
-
manifestPath: z.ZodOptional<z.ZodString>;
|
|
52
|
-
manifest: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
53
|
-
implementationName: z.ZodString;
|
|
54
|
-
version: z.ZodOptional<z.ZodString>;
|
|
55
|
-
}, z.core.$strip>>>;
|
|
56
|
-
}, z.core.$strip>;
|
|
57
|
-
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/manifest/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,eAAO,MAAM,mBAAmB,EAAG,WAAoB,CAAC;AAExD,MAAM,MAAM,aAAa,GAAG;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,CACzC,MAAM,EAAE,MAAM,KACX,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;AAE5B,MAAM,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;AAE5E;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;iBAiB5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,EAC5B,OAAO,GACR,EAAE;IACD,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,KAAK,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;AAEpC;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;iBAkB8C,CAAC;AAE1E,eAAO,MAAM,2BAA2B;;;;;;iBAYtC,CAAC"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { AuthenticationIdPropertySchema } from "../../types/properties";
|
|
3
|
-
export const DEFAULT_CONFIG_PATH = ".zapierrc";
|
|
4
|
-
/**
|
|
5
|
-
* Action entry for storing saved action configurations
|
|
6
|
-
* The key in the actions record IS the user-provided name
|
|
7
|
-
*/
|
|
8
|
-
export const ActionEntrySchema = z.object({
|
|
9
|
-
appKey: z.string().describe("App key (slug or implementation name)"),
|
|
10
|
-
actionKey: z.string().describe("Action key identifier"),
|
|
11
|
-
actionType: z
|
|
12
|
-
.string()
|
|
13
|
-
.describe("Action type (e.g., 'read', 'write', 'search')"),
|
|
14
|
-
authenticationId: AuthenticationIdPropertySchema.nullable().optional(),
|
|
15
|
-
inputs: z
|
|
16
|
-
.record(z.string(), z.unknown())
|
|
17
|
-
.optional()
|
|
18
|
-
.describe("Resolved input values"),
|
|
19
|
-
schema: z
|
|
20
|
-
.record(z.string(), z.unknown())
|
|
21
|
-
.describe("Complete JSON Schema from getInputFieldsSchema (includes $schema, type, properties, required, etc.)"),
|
|
22
|
-
createdAt: z.string().describe("ISO 8601 timestamp when created"),
|
|
23
|
-
});
|
|
24
|
-
/**
|
|
25
|
-
* Manifest schema for version locking and saved action configurations
|
|
26
|
-
*/
|
|
27
|
-
export const ManifestSchema = z
|
|
28
|
-
.object({
|
|
29
|
-
apps: z.record(z.string(), z.object({
|
|
30
|
-
implementationName: z
|
|
31
|
-
.string()
|
|
32
|
-
.describe("Base implementation name without version (e.g., 'SlackCLIAPI')"),
|
|
33
|
-
version: z.string().describe("Version string (e.g., '1.21.1')"),
|
|
34
|
-
})),
|
|
35
|
-
actions: z
|
|
36
|
-
.record(z.string(), ActionEntrySchema)
|
|
37
|
-
.optional()
|
|
38
|
-
.describe("Saved action configurations with their schemas"),
|
|
39
|
-
})
|
|
40
|
-
.describe("Manifest for app version locking and action configurations");
|
|
41
|
-
export const ManifestPluginOptionsSchema = z.object({
|
|
42
|
-
manifestPath: z.string().optional().describe("Path to manifest file"),
|
|
43
|
-
manifest: z
|
|
44
|
-
.record(z.string(), z.object({
|
|
45
|
-
implementationName: z.string(),
|
|
46
|
-
version: z.string().optional(),
|
|
47
|
-
}))
|
|
48
|
-
.optional()
|
|
49
|
-
.describe("Direct manifest object"),
|
|
50
|
-
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Plugin } from "../../types/plugin";
|
|
2
|
-
import type { FunctionRegistryEntry } from "../../types/sdk";
|
|
3
|
-
export interface RegisterPluginFunctionOptions {
|
|
4
|
-
}
|
|
5
|
-
export interface RegistryPluginProvides {
|
|
6
|
-
getRegistry: (options?: {
|
|
7
|
-
package?: string;
|
|
8
|
-
}) => {
|
|
9
|
-
functions: FunctionRegistryEntry[];
|
|
10
|
-
categories: {
|
|
11
|
-
key: string;
|
|
12
|
-
title: string;
|
|
13
|
-
titlePlural: string;
|
|
14
|
-
functions: string[];
|
|
15
|
-
}[];
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export declare const registryPlugin: Plugin<{}, // accepts any SDK shape
|
|
19
|
-
{}, // requires no context
|
|
20
|
-
RegistryPluginProvides>;
|
|
21
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/registry/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,6BAA6B;CAAG;AAEjD,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK;QAC/C,SAAS,EAAE,qBAAqB,EAAE,CAAC;QACnC,UAAU,EAAE;YACV,GAAG,EAAE,MAAM,CAAC;YACZ,KAAK,EAAE,MAAM,CAAC;YACd,WAAW,EAAE,MAAM,CAAC;YACpB,SAAS,EAAE,MAAM,EAAE,CAAC;SACrB,EAAE,CAAC;KACL,CAAC;CACH;AAGD,eAAO,MAAM,cAAc,EAAE,MAAM,CACjC,EAAE,EAAE,wBAAwB;AAC5B,EAAE,EAAE,sBAAsB;AAC1B,sBAAsB,CA0IvB,CAAC"}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
// Registry plugin requires no context but collects SDK metadata
|
|
2
|
-
export const registryPlugin = ({ sdk, context }) => {
|
|
3
|
-
const metaKeys = Object.keys(context.meta || {});
|
|
4
|
-
const categoryDefinitions = {
|
|
5
|
-
account: {
|
|
6
|
-
title: "Account",
|
|
7
|
-
},
|
|
8
|
-
app: {
|
|
9
|
-
title: "App",
|
|
10
|
-
titlePlural: "Apps",
|
|
11
|
-
},
|
|
12
|
-
authentication: {
|
|
13
|
-
title: "Authentication",
|
|
14
|
-
},
|
|
15
|
-
action: {
|
|
16
|
-
title: "Action",
|
|
17
|
-
},
|
|
18
|
-
http: {
|
|
19
|
-
title: "HTTP Request",
|
|
20
|
-
},
|
|
21
|
-
utility: {
|
|
22
|
-
title: "Utility",
|
|
23
|
-
titlePlural: "Utilities",
|
|
24
|
-
},
|
|
25
|
-
other: {
|
|
26
|
-
title: "Other",
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
const functions = metaKeys
|
|
30
|
-
.filter((key) => {
|
|
31
|
-
const property = sdk[key];
|
|
32
|
-
if (typeof property === "function") {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
const [rootKey] = key.split(".");
|
|
36
|
-
const rootProperty = sdk[rootKey];
|
|
37
|
-
if (typeof rootProperty === "object" && rootProperty !== null) {
|
|
38
|
-
return true;
|
|
39
|
-
}
|
|
40
|
-
return false;
|
|
41
|
-
})
|
|
42
|
-
.map((key) => {
|
|
43
|
-
const meta = context.meta[key];
|
|
44
|
-
return {
|
|
45
|
-
name: key,
|
|
46
|
-
type: meta.type,
|
|
47
|
-
itemType: meta.itemType,
|
|
48
|
-
returnType: meta.returnType,
|
|
49
|
-
inputSchema: meta.inputSchema,
|
|
50
|
-
inputParameters: meta.inputParameters,
|
|
51
|
-
outputSchema: meta.outputSchema,
|
|
52
|
-
categories: meta.categories || [],
|
|
53
|
-
resolvers: meta.resolvers,
|
|
54
|
-
packages: meta.packages,
|
|
55
|
-
};
|
|
56
|
-
})
|
|
57
|
-
.sort((a, b) => a.name.localeCompare(b.name));
|
|
58
|
-
const knownCategories = Object.keys(categoryDefinitions);
|
|
59
|
-
// Cache the entire registry result for each package
|
|
60
|
-
const registryCache = new Map();
|
|
61
|
-
function getRegistry(options) {
|
|
62
|
-
const packageFilter = options?.package;
|
|
63
|
-
const cacheKey = packageFilter || "__all__";
|
|
64
|
-
// Return cached result if available
|
|
65
|
-
if (registryCache.has(cacheKey)) {
|
|
66
|
-
return registryCache.get(cacheKey);
|
|
67
|
-
}
|
|
68
|
-
// Filter functions by package if specified
|
|
69
|
-
const filteredFunctions = packageFilter
|
|
70
|
-
? functions.filter((f) =>
|
|
71
|
-
// Include if packages is undefined (belongs to all packages) or includes the specified package
|
|
72
|
-
!f.packages || f.packages.includes(packageFilter))
|
|
73
|
-
: functions;
|
|
74
|
-
// Build categories with filtered functions
|
|
75
|
-
const filteredCategories = knownCategories
|
|
76
|
-
.sort((a, b) => {
|
|
77
|
-
// Keep "other" category last
|
|
78
|
-
if (a === "other")
|
|
79
|
-
return 1;
|
|
80
|
-
if (b === "other")
|
|
81
|
-
return -1;
|
|
82
|
-
// Alphabetize by title, not key
|
|
83
|
-
const titleA = categoryDefinitions[a].title;
|
|
84
|
-
const titleB = categoryDefinitions[b].title;
|
|
85
|
-
return titleA.localeCompare(titleB);
|
|
86
|
-
})
|
|
87
|
-
.map((categoryKey) => {
|
|
88
|
-
// Find the functions that are in this category and match the package filter
|
|
89
|
-
const categoryFunctions = filteredFunctions
|
|
90
|
-
.filter((f) => f.categories.includes(categoryKey) ||
|
|
91
|
-
// If the category is "other" and the function is not in any other category, include it
|
|
92
|
-
(categoryKey === "other" &&
|
|
93
|
-
!f.categories.some((c) => knownCategories.includes(c))))
|
|
94
|
-
.map((f) => f.name)
|
|
95
|
-
.sort(); // Alphabetize functions within each category
|
|
96
|
-
const definition = categoryDefinitions[categoryKey];
|
|
97
|
-
const title = definition.title;
|
|
98
|
-
return {
|
|
99
|
-
key: categoryKey,
|
|
100
|
-
title,
|
|
101
|
-
titlePlural: definition.titlePlural ?? `${title}s`,
|
|
102
|
-
functions: categoryFunctions,
|
|
103
|
-
};
|
|
104
|
-
})
|
|
105
|
-
.filter((category) => category.functions.length > 0); // Only include categories with functions
|
|
106
|
-
const result = {
|
|
107
|
-
functions: filteredFunctions,
|
|
108
|
-
categories: filteredCategories,
|
|
109
|
-
};
|
|
110
|
-
// Cache the result
|
|
111
|
-
registryCache.set(cacheKey, result);
|
|
112
|
-
return result;
|
|
113
|
-
}
|
|
114
|
-
return {
|
|
115
|
-
getRegistry,
|
|
116
|
-
};
|
|
117
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Plugin } from "../../types/plugin";
|
|
2
|
-
import type { ApiClient } from "../../api";
|
|
3
|
-
import { RelayRequestSchema, type RelayRequestOptions } from "./schemas";
|
|
4
|
-
import type { EventEmissionContext } from "../eventEmission";
|
|
5
|
-
export interface RequestPluginProvides {
|
|
6
|
-
request: (options: RelayRequestOptions) => Promise<Response>;
|
|
7
|
-
context: {
|
|
8
|
-
meta: {
|
|
9
|
-
request: {
|
|
10
|
-
inputSchema: typeof RelayRequestSchema;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export declare const requestPlugin: Plugin<{}, // no SDK dependencies
|
|
16
|
-
// no SDK dependencies
|
|
17
|
-
{
|
|
18
|
-
api: ApiClient;
|
|
19
|
-
} & EventEmissionContext, // requires api in context
|
|
20
|
-
RequestPluginProvides>;
|
|
21
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/request/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAoB7D,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7D,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,OAAO,EAAE;gBACP,WAAW,EAAE,OAAO,kBAAkB,CAAC;aACxC,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,aAAa,EAAE,MAAM,CAChC,EAAE,EAAE,sBAAsB;AAC1B,AADI,sBAAsB;AAC1B;IAAE,GAAG,EAAE,SAAS,CAAA;CAAE,GAAG,oBAAoB,EAAE,0BAA0B;AACrE,qBAAqB,CA2FtB,CAAC"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { RelayRequestSchema } from "./schemas";
|
|
2
|
-
import { createFunction } from "../../utils/function-utils";
|
|
3
|
-
import { createTelemetryCallback } from "../../utils/telemetry-utils";
|
|
4
|
-
import { coerceToNumericId } from "../../utils/id-utils";
|
|
5
|
-
/**
|
|
6
|
-
* Transforms full URLs into Relay format: /relay/{domain}/{path}
|
|
7
|
-
*
|
|
8
|
-
* @param url - The full URL to transform (e.g., "https://api.github.com/user")
|
|
9
|
-
* @returns The relay path format (e.g., "/relay/api.github.com/user")
|
|
10
|
-
*/
|
|
11
|
-
function transformUrlToRelayPath(url) {
|
|
12
|
-
const targetUrl = new URL(url);
|
|
13
|
-
// Build the Relay path: /relay/{host}{pathname}{search}{hash}
|
|
14
|
-
// Use host instead of hostname to include port if present
|
|
15
|
-
const relayPath = `/relay/${targetUrl.host}${targetUrl.pathname}${targetUrl.search}${targetUrl.hash}`;
|
|
16
|
-
return relayPath;
|
|
17
|
-
}
|
|
18
|
-
export const requestPlugin = ({ context }) => {
|
|
19
|
-
async function request(options) {
|
|
20
|
-
const { api } = context;
|
|
21
|
-
const { url, method = "GET", body, headers: optionsHeaders, authenticationId, callbackUrl, authenticationTemplate, } = options;
|
|
22
|
-
// Transform full URL to relay path format
|
|
23
|
-
const relayPath = transformUrlToRelayPath(url);
|
|
24
|
-
// Build headers for the request
|
|
25
|
-
const headers = {};
|
|
26
|
-
// Copy existing headers
|
|
27
|
-
if (optionsHeaders) {
|
|
28
|
-
const headerEntries = optionsHeaders instanceof Headers
|
|
29
|
-
? Array.from(optionsHeaders.entries())
|
|
30
|
-
: Array.isArray(optionsHeaders)
|
|
31
|
-
? optionsHeaders
|
|
32
|
-
: Object.entries(optionsHeaders);
|
|
33
|
-
for (const [key, value] of headerEntries) {
|
|
34
|
-
headers[key] = value;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
// Auto-set Content-Type for JSON bodies if not already specified
|
|
38
|
-
const hasContentType = Object.keys(headers).some((k) => k.toLowerCase() === "content-type");
|
|
39
|
-
if (body && !hasContentType) {
|
|
40
|
-
const bodyStr = typeof body === "string" ? body : JSON.stringify(body);
|
|
41
|
-
const trimmed = bodyStr.trimStart();
|
|
42
|
-
if (trimmed.startsWith("{") || trimmed.startsWith("[")) {
|
|
43
|
-
headers["Content-Type"] = "application/json; charset=utf-8";
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
// Add Relay-specific headers
|
|
47
|
-
if (authenticationId) {
|
|
48
|
-
headers["X-Relay-Authentication-Id"] = coerceToNumericId("authenticationId", authenticationId).toString();
|
|
49
|
-
}
|
|
50
|
-
if (callbackUrl) {
|
|
51
|
-
headers["X-Relay-Callback-Url"] = callbackUrl;
|
|
52
|
-
}
|
|
53
|
-
if (authenticationTemplate) {
|
|
54
|
-
headers["X-Authentication-Template"] = authenticationTemplate;
|
|
55
|
-
}
|
|
56
|
-
// Use the API client's fetch method directly - let it handle auth automatically
|
|
57
|
-
return await api.fetch(relayPath, {
|
|
58
|
-
method,
|
|
59
|
-
body,
|
|
60
|
-
headers,
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
const requestDefinition = createFunction(request, RelayRequestSchema, createTelemetryCallback(context.eventEmission.emitMethodCalled, request.name));
|
|
64
|
-
return {
|
|
65
|
-
request: requestDefinition,
|
|
66
|
-
context: {
|
|
67
|
-
meta: {
|
|
68
|
-
request: {
|
|
69
|
-
categories: ["http"],
|
|
70
|
-
returnType: "Response",
|
|
71
|
-
inputSchema: RelayRequestSchema,
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
};
|
|
76
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../src/plugins/request/index.test.ts"],"names":[],"mappings":""}
|