@zapier/zapier-sdk 0.18.3 → 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 +41 -0
- package/README.md +44 -32
- package/dist/index.cjs +658 -693
- package/dist/index.d.mts +272 -138
- package/dist/index.d.ts +2541 -40
- package/dist/index.mjs +638 -692
- 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.integration.test.d.ts +0 -5
- package/dist/api/client.integration.test.d.ts.map +0 -1
- package/dist/api/client.integration.test.js +0 -318
- package/dist/api/client.js +0 -374
- package/dist/api/client.methods.test.d.ts +0 -2
- package/dist/api/client.methods.test.d.ts.map +0 -1
- package/dist/api/client.methods.test.js +0 -158
- 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/router.d.ts +0 -16
- package/dist/api/router.d.ts.map +0 -1
- package/dist/api/router.js +0 -31
- package/dist/api/router.test.d.ts +0 -2
- package/dist/api/router.test.d.ts.map +0 -1
- package/dist/api/router.test.js +0 -103
- package/dist/api/schemas.d.ts +0 -531
- package/dist/api/schemas.d.ts.map +0 -1
- package/dist/api/schemas.js +0 -389
- package/dist/api/types.d.ts +0 -82
- 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 -25
- package/dist/plugins/listApps/index.d.ts.map +0 -1
- package/dist/plugins/listApps/index.js +0 -69
- 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 -141
- package/dist/plugins/listApps/schemas.d.ts +0 -26
- package/dist/plugins/listApps/schemas.d.ts.map +0 -1
- package/dist/plugins/listApps/schemas.js +0 -19
- 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 -832
- 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 -31
- 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 -255
- 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/temporary-internal-core/handlers/listApps.d.ts +0 -67
- package/dist/temporary-internal-core/handlers/listApps.d.ts.map +0 -1
- package/dist/temporary-internal-core/handlers/listApps.js +0 -134
- package/dist/temporary-internal-core/handlers/listApps.test.d.ts +0 -2
- package/dist/temporary-internal-core/handlers/listApps.test.d.ts.map +0 -1
- package/dist/temporary-internal-core/handlers/listApps.test.js +0 -367
- package/dist/temporary-internal-core/index.d.ts +0 -18
- package/dist/temporary-internal-core/index.d.ts.map +0 -1
- package/dist/temporary-internal-core/index.js +0 -18
- package/dist/temporary-internal-core/schemas/apps/index.d.ts +0 -175
- package/dist/temporary-internal-core/schemas/apps/index.d.ts.map +0 -1
- package/dist/temporary-internal-core/schemas/apps/index.js +0 -97
- package/dist/temporary-internal-core/schemas/errors/index.d.ts +0 -139
- package/dist/temporary-internal-core/schemas/errors/index.d.ts.map +0 -1
- package/dist/temporary-internal-core/schemas/errors/index.js +0 -129
- package/dist/temporary-internal-core/schemas/implementations/index.d.ts +0 -127
- package/dist/temporary-internal-core/schemas/implementations/index.d.ts.map +0 -1
- package/dist/temporary-internal-core/schemas/implementations/index.js +0 -79
- package/dist/temporary-internal-core/types/handler.d.ts +0 -51
- package/dist/temporary-internal-core/types/handler.d.ts.map +0 -1
- package/dist/temporary-internal-core/types/handler.js +0 -8
- package/dist/temporary-internal-core/types/index.d.ts +0 -5
- package/dist/temporary-internal-core/types/index.d.ts.map +0 -1
- package/dist/temporary-internal-core/types/index.js +0 -4
- package/dist/temporary-internal-core/utils/app-locators.d.ts +0 -34
- package/dist/temporary-internal-core/utils/app-locators.d.ts.map +0 -1
- package/dist/temporary-internal-core/utils/app-locators.js +0 -39
- package/dist/temporary-internal-core/utils/string-utils.d.ts +0 -28
- package/dist/temporary-internal-core/utils/string-utils.d.ts.map +0 -1
- package/dist/temporary-internal-core/utils/string-utils.js +0 -52
- package/dist/temporary-internal-core/utils/transformations.d.ts +0 -18
- package/dist/temporary-internal-core/utils/transformations.d.ts.map +0 -1
- package/dist/temporary-internal-core/utils/transformations.js +0 -36
- 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
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as zod from 'zod';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { AuthenticationSchema, AuthenticationsResponseSchema, AuthenticationItem as AuthenticationItem$1, GetAuthenticationParam, GetAuthenticationResponse, GetAuthenticationParamSchema } from '@zapier/zapier-sdk-core/v0/schemas/authentications';
|
|
4
|
+
import { AppItem as AppItem$1 } from '@zapier/zapier-sdk-core/v0/schemas/apps';
|
|
4
5
|
import * as zod_v4_core from 'zod/v4/core';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -380,6 +381,71 @@ interface EventEmissionProvides {
|
|
|
380
381
|
context: EventEmissionContext;
|
|
381
382
|
}
|
|
382
383
|
|
|
384
|
+
/**
|
|
385
|
+
* Credentials type definitions
|
|
386
|
+
*
|
|
387
|
+
* The credentials system provides a unified way to authenticate with Zapier APIs.
|
|
388
|
+
* It supports multiple credential types:
|
|
389
|
+
* - String: A token (JWT or API key) used directly
|
|
390
|
+
* - Client credentials: OAuth client ID + secret exchanged for a token
|
|
391
|
+
* - PKCE: OAuth client ID for interactive login (CLI only)
|
|
392
|
+
* - Function: Lazy/dynamic credential resolution
|
|
393
|
+
*/
|
|
394
|
+
/**
|
|
395
|
+
* Client credentials for OAuth client_credentials flow.
|
|
396
|
+
* The SDK will exchange these for an access token.
|
|
397
|
+
*/
|
|
398
|
+
interface ClientCredentialsObject {
|
|
399
|
+
type?: "client_credentials";
|
|
400
|
+
clientId: string;
|
|
401
|
+
clientSecret: string;
|
|
402
|
+
baseUrl?: string;
|
|
403
|
+
scope?: string;
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* PKCE credentials for interactive OAuth flow.
|
|
407
|
+
* Only works when @zapier/zapier-sdk-cli-login is available.
|
|
408
|
+
*/
|
|
409
|
+
interface PkceCredentialsObject {
|
|
410
|
+
type?: "pkce";
|
|
411
|
+
clientId: string;
|
|
412
|
+
baseUrl?: string;
|
|
413
|
+
scope?: string;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Union of all credential object types.
|
|
417
|
+
*/
|
|
418
|
+
type CredentialsObject = ClientCredentialsObject | PkceCredentialsObject;
|
|
419
|
+
/**
|
|
420
|
+
* Resolved credentials - what a credentials function must return.
|
|
421
|
+
* Either a string (token) or a credentials object.
|
|
422
|
+
* Functions are not allowed to return other functions.
|
|
423
|
+
*/
|
|
424
|
+
type ResolvedCredentials = string | CredentialsObject;
|
|
425
|
+
/**
|
|
426
|
+
* Credentials can be:
|
|
427
|
+
* - A string (token or API key)
|
|
428
|
+
* - A credentials object (client_credentials or pkce)
|
|
429
|
+
* - A function that returns credentials (sync or async)
|
|
430
|
+
*/
|
|
431
|
+
type Credentials = ResolvedCredentials | (() => ResolvedCredentials | Promise<ResolvedCredentials>);
|
|
432
|
+
/**
|
|
433
|
+
* Type guard for client credentials objects.
|
|
434
|
+
*/
|
|
435
|
+
declare function isClientCredentials(credentials: ResolvedCredentials): credentials is ClientCredentialsObject;
|
|
436
|
+
/**
|
|
437
|
+
* Type guard for PKCE credentials objects.
|
|
438
|
+
*/
|
|
439
|
+
declare function isPkceCredentials(credentials: ResolvedCredentials): credentials is PkceCredentialsObject;
|
|
440
|
+
/**
|
|
441
|
+
* Type guard for credentials objects (either type).
|
|
442
|
+
*/
|
|
443
|
+
declare function isCredentialsObject(credentials: ResolvedCredentials): credentials is CredentialsObject;
|
|
444
|
+
/**
|
|
445
|
+
* Type guard for credentials functions.
|
|
446
|
+
*/
|
|
447
|
+
declare function isCredentialsFunction(credentials: Credentials): credentials is () => ResolvedCredentials | Promise<ResolvedCredentials>;
|
|
448
|
+
|
|
383
449
|
declare const NeedSchema: z.ZodObject<{
|
|
384
450
|
key: z.ZodString;
|
|
385
451
|
alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
@@ -1012,24 +1078,26 @@ declare const ListInputFieldsSchema: z.ZodObject<{
|
|
|
1012
1078
|
type ListInputFieldsOptions = z.infer<typeof ListInputFieldsSchema>;
|
|
1013
1079
|
|
|
1014
1080
|
declare const FindFirstAuthenticationSchema: z.ZodObject<{
|
|
1081
|
+
search: z.ZodOptional<z.ZodString>;
|
|
1082
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1015
1083
|
appKey: z.ZodOptional<z.ZodString & {
|
|
1016
1084
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
1017
1085
|
}>;
|
|
1018
|
-
search: z.ZodOptional<z.ZodString>;
|
|
1019
|
-
title: z.ZodOptional<z.ZodString>;
|
|
1020
1086
|
accountId: z.ZodOptional<z.ZodString>;
|
|
1021
1087
|
owner: z.ZodOptional<z.ZodString>;
|
|
1088
|
+
isExpired: z.ZodOptional<z.ZodBoolean>;
|
|
1022
1089
|
}, z.core.$strip>;
|
|
1023
1090
|
type FindFirstAuthenticationOptions = z.infer<typeof FindFirstAuthenticationSchema>;
|
|
1024
1091
|
|
|
1025
1092
|
declare const FindUniqueAuthenticationSchema: z.ZodObject<{
|
|
1093
|
+
search: z.ZodOptional<z.ZodString>;
|
|
1094
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1026
1095
|
appKey: z.ZodOptional<z.ZodString & {
|
|
1027
1096
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
1028
1097
|
}>;
|
|
1029
|
-
search: z.ZodOptional<z.ZodString>;
|
|
1030
|
-
title: z.ZodOptional<z.ZodString>;
|
|
1031
1098
|
accountId: z.ZodOptional<z.ZodString>;
|
|
1032
1099
|
owner: z.ZodOptional<z.ZodString>;
|
|
1100
|
+
isExpired: z.ZodOptional<z.ZodBoolean>;
|
|
1033
1101
|
}, z.core.$strip>;
|
|
1034
1102
|
type FindUniqueAuthenticationOptions = z.infer<typeof FindUniqueAuthenticationSchema>;
|
|
1035
1103
|
|
|
@@ -1121,6 +1189,7 @@ interface ApiPluginOptions extends BaseSdkOptions {
|
|
|
1121
1189
|
interface ApiPluginProvides {
|
|
1122
1190
|
context: {
|
|
1123
1191
|
api: ApiClient;
|
|
1192
|
+
resolveCredentials: () => Promise<ResolvedCredentials | undefined>;
|
|
1124
1193
|
};
|
|
1125
1194
|
}
|
|
1126
1195
|
declare const apiPlugin: Plugin<{}, {}, ApiPluginProvides>;
|
|
@@ -1362,23 +1431,29 @@ declare const GetAppSchema: z.ZodObject<{
|
|
|
1362
1431
|
type GetAppOptions = z.infer<typeof GetAppSchema>;
|
|
1363
1432
|
|
|
1364
1433
|
/**
|
|
1365
|
-
*
|
|
1434
|
+
* Plugin schemas for listApps
|
|
1366
1435
|
*
|
|
1367
|
-
*
|
|
1368
|
-
* -
|
|
1369
|
-
*
|
|
1370
|
-
*
|
|
1436
|
+
* Imports base query schema from @zapier/zapier-sdk-core (sdkapi) and extends
|
|
1437
|
+
* with SDK-specific options.
|
|
1438
|
+
*
|
|
1439
|
+
* Note: The sdkapi endpoint uses ListAppsQuerySchema (HTTP query params),
|
|
1440
|
+
* but the SDK exposes ListAppsSchema (user-friendly options):
|
|
1441
|
+
* - ListAppsOptions accepts `appKeys` as array, `cursor`, `maxItems`
|
|
1442
|
+
* - ListAppsQuery accepts `appKeys` as comma-separated string, `offset`
|
|
1443
|
+
* - The plugin transforms between these formats
|
|
1371
1444
|
*/
|
|
1372
1445
|
|
|
1373
1446
|
/**
|
|
1374
|
-
*
|
|
1447
|
+
* SDK user-facing options for listApps
|
|
1375
1448
|
*
|
|
1376
|
-
*
|
|
1377
|
-
*
|
|
1449
|
+
* Extends ListAppsQuerySchema from zapier-sdk-core with SDK-specific options:
|
|
1450
|
+
* - appKeys: array (not comma-separated string)
|
|
1451
|
+
* - cursor: pagination cursor (not offset)
|
|
1452
|
+
* - maxItems: SDK-specific pagination limit
|
|
1378
1453
|
*/
|
|
1379
|
-
declare const
|
|
1380
|
-
appKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1454
|
+
declare const ListAppsSchema: z.ZodObject<{
|
|
1381
1455
|
search: z.ZodOptional<z.ZodString>;
|
|
1456
|
+
appKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1382
1457
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
1383
1458
|
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
1384
1459
|
cursor: z.ZodOptional<z.ZodString>;
|
|
@@ -1386,80 +1461,20 @@ declare const ListAppsOptionsSchema: z.ZodObject<{
|
|
|
1386
1461
|
isNested: z.ZodOptional<z.ZodBoolean>;
|
|
1387
1462
|
}, z.core.$strip>>;
|
|
1388
1463
|
}, z.core.$strip>;
|
|
1389
|
-
type ListAppsOptions = z.infer<typeof
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
declare const AppItemSchema$1: z.ZodObject<{
|
|
1395
|
-
categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1396
|
-
id: z.ZodNumber;
|
|
1397
|
-
name: z.ZodString;
|
|
1398
|
-
slug: z.ZodString;
|
|
1399
|
-
}, z.core.$strip>>>;
|
|
1400
|
-
actions: z.ZodOptional<z.ZodObject<{
|
|
1401
|
-
read: z.ZodOptional<z.ZodNumber>;
|
|
1402
|
-
read_bulk: z.ZodOptional<z.ZodNumber>;
|
|
1403
|
-
write: z.ZodOptional<z.ZodNumber>;
|
|
1404
|
-
search: z.ZodOptional<z.ZodNumber>;
|
|
1405
|
-
search_or_write: z.ZodOptional<z.ZodNumber>;
|
|
1406
|
-
search_and_write: z.ZodOptional<z.ZodNumber>;
|
|
1407
|
-
filter: z.ZodOptional<z.ZodNumber>;
|
|
1408
|
-
}, z.core.$strip>>;
|
|
1409
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1410
|
-
is_hidden: z.ZodOptional<z.ZodBoolean>;
|
|
1411
|
-
age_in_days: z.ZodOptional<z.ZodNumber>;
|
|
1412
|
-
api_docs_url: z.ZodOptional<z.ZodString>;
|
|
1413
|
-
banner: z.ZodOptional<z.ZodString>;
|
|
1414
|
-
image: z.ZodOptional<z.ZodString>;
|
|
1415
|
-
images: z.ZodOptional<z.ZodObject<{
|
|
1416
|
-
url_16x16: z.ZodOptional<z.ZodString>;
|
|
1417
|
-
url_32x32: z.ZodOptional<z.ZodString>;
|
|
1418
|
-
url_64x64: z.ZodOptional<z.ZodString>;
|
|
1419
|
-
url_128x128: z.ZodOptional<z.ZodString>;
|
|
1420
|
-
}, z.core.$strip>>;
|
|
1421
|
-
is_beta: z.ZodOptional<z.ZodBoolean>;
|
|
1422
|
-
is_built_in: z.ZodOptional<z.ZodBoolean>;
|
|
1423
|
-
is_featured: z.ZodOptional<z.ZodBoolean>;
|
|
1424
|
-
is_premium: z.ZodOptional<z.ZodBoolean>;
|
|
1425
|
-
is_public: z.ZodOptional<z.ZodBoolean>;
|
|
1426
|
-
is_upcoming: z.ZodOptional<z.ZodBoolean>;
|
|
1427
|
-
popularity: z.ZodOptional<z.ZodNumber>;
|
|
1428
|
-
primary_color: z.ZodOptional<z.ZodString>;
|
|
1429
|
-
slug: z.ZodString;
|
|
1430
|
-
auth_type: z.ZodOptional<z.ZodString>;
|
|
1431
|
-
is_deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
1432
|
-
secondary_color: z.ZodOptional<z.ZodString>;
|
|
1433
|
-
has_filters: z.ZodOptional<z.ZodBoolean>;
|
|
1434
|
-
has_reads: z.ZodOptional<z.ZodBoolean>;
|
|
1435
|
-
has_searches: z.ZodOptional<z.ZodBoolean>;
|
|
1436
|
-
has_searches_or_writes: z.ZodOptional<z.ZodBoolean>;
|
|
1437
|
-
has_upfront_fields: z.ZodOptional<z.ZodBoolean>;
|
|
1438
|
-
has_writes: z.ZodOptional<z.ZodBoolean>;
|
|
1439
|
-
is_invite: z.ZodOptional<z.ZodBoolean>;
|
|
1440
|
-
visibility: z.ZodOptional<z.ZodString>;
|
|
1441
|
-
classification: z.ZodOptional<z.ZodString>;
|
|
1442
|
-
title: z.ZodString;
|
|
1443
|
-
key: z.ZodString;
|
|
1444
|
-
implementation_id: z.ZodString;
|
|
1445
|
-
version: z.ZodOptional<z.ZodString>;
|
|
1446
|
-
}, z.core.$strip>;
|
|
1447
|
-
type AppItem$1 = z.infer<typeof AppItemSchema$1>;
|
|
1464
|
+
type ListAppsOptions = z.infer<typeof ListAppsSchema>;
|
|
1465
|
+
interface ListAppsPage {
|
|
1466
|
+
data: AppItem$1[];
|
|
1467
|
+
nextCursor?: string;
|
|
1468
|
+
}
|
|
1448
1469
|
|
|
1449
1470
|
interface ListAppsPluginProvides {
|
|
1450
|
-
listApps: (options?: ListAppsOptions) => Promise<{
|
|
1451
|
-
data: AppItem$1[];
|
|
1452
|
-
nextCursor?: string;
|
|
1453
|
-
}> & AsyncIterable<{
|
|
1454
|
-
data: AppItem$1[];
|
|
1455
|
-
nextCursor?: string;
|
|
1456
|
-
}> & {
|
|
1471
|
+
listApps: (options?: ListAppsOptions) => Promise<ListAppsPage> & AsyncIterable<ListAppsPage> & {
|
|
1457
1472
|
items(): AsyncIterable<AppItem$1>;
|
|
1458
1473
|
};
|
|
1459
1474
|
context: {
|
|
1460
1475
|
meta: {
|
|
1461
1476
|
listApps: {
|
|
1462
|
-
inputSchema: typeof
|
|
1477
|
+
inputSchema: typeof ListAppsSchema;
|
|
1463
1478
|
};
|
|
1464
1479
|
};
|
|
1465
1480
|
};
|
|
@@ -1521,6 +1536,7 @@ declare const ListAuthenticationsQuerySchema: z.ZodObject<{
|
|
|
1521
1536
|
title: z.ZodOptional<z.ZodString>;
|
|
1522
1537
|
accountId: z.ZodOptional<z.ZodString>;
|
|
1523
1538
|
owner: z.ZodOptional<z.ZodString>;
|
|
1539
|
+
isExpired: z.ZodOptional<z.ZodBoolean>;
|
|
1524
1540
|
appKey: z.ZodOptional<z.ZodString & {
|
|
1525
1541
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
1526
1542
|
}>;
|
|
@@ -1719,13 +1735,21 @@ interface ListInputFieldChoicesPluginProvides {
|
|
|
1719
1735
|
*/
|
|
1720
1736
|
|
|
1721
1737
|
interface BaseSdkOptions {
|
|
1738
|
+
/**
|
|
1739
|
+
* Authentication credentials. Can be:
|
|
1740
|
+
* - A string (token or API key)
|
|
1741
|
+
* - An object with clientId/clientSecret for client_credentials flow
|
|
1742
|
+
* - An object with clientId (no secret) for PKCE flow
|
|
1743
|
+
* - A function returning any of the above
|
|
1744
|
+
*/
|
|
1745
|
+
credentials?: Credentials;
|
|
1746
|
+
/**
|
|
1747
|
+
* @deprecated Use `credentials` instead.
|
|
1748
|
+
*/
|
|
1722
1749
|
token?: string;
|
|
1723
|
-
getToken?: () => Promise<string | undefined>;
|
|
1724
1750
|
onEvent?: EventCallback;
|
|
1725
1751
|
fetch?: typeof fetch;
|
|
1726
1752
|
baseUrl?: string;
|
|
1727
|
-
authBaseUrl?: string;
|
|
1728
|
-
authClientId?: string;
|
|
1729
1753
|
trackingBaseUrl?: string;
|
|
1730
1754
|
debug?: boolean;
|
|
1731
1755
|
manifestPath?: string;
|
|
@@ -1850,57 +1874,57 @@ interface PositionalMetadata {
|
|
|
1850
1874
|
declare function isPositional(schema: z.ZodType): boolean;
|
|
1851
1875
|
|
|
1852
1876
|
declare const AppItemSchema: z.ZodObject<{
|
|
1877
|
+
slug: z.ZodString;
|
|
1878
|
+
age_in_days: z.ZodOptional<z.ZodNumber>;
|
|
1879
|
+
auth_type: z.ZodOptional<z.ZodString>;
|
|
1880
|
+
banner: z.ZodOptional<z.ZodString>;
|
|
1853
1881
|
categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1854
1882
|
id: z.ZodNumber;
|
|
1855
1883
|
name: z.ZodString;
|
|
1856
1884
|
slug: z.ZodString;
|
|
1857
1885
|
}, z.core.$strip>>>;
|
|
1858
|
-
actions: z.ZodOptional<z.ZodObject<{
|
|
1859
|
-
read: z.ZodOptional<z.ZodNumber>;
|
|
1860
|
-
read_bulk: z.ZodOptional<z.ZodNumber>;
|
|
1861
|
-
write: z.ZodOptional<z.ZodNumber>;
|
|
1862
|
-
search: z.ZodOptional<z.ZodNumber>;
|
|
1863
|
-
search_or_write: z.ZodOptional<z.ZodNumber>;
|
|
1864
|
-
search_and_write: z.ZodOptional<z.ZodNumber>;
|
|
1865
|
-
filter: z.ZodOptional<z.ZodNumber>;
|
|
1866
|
-
}, z.core.$strip>>;
|
|
1867
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1868
|
-
is_hidden: z.ZodOptional<z.ZodBoolean>;
|
|
1869
|
-
age_in_days: z.ZodOptional<z.ZodNumber>;
|
|
1870
|
-
api_docs_url: z.ZodOptional<z.ZodString>;
|
|
1871
|
-
banner: z.ZodOptional<z.ZodString>;
|
|
1872
|
-
image: z.ZodOptional<z.ZodString>;
|
|
1873
1886
|
images: z.ZodOptional<z.ZodObject<{
|
|
1874
1887
|
url_16x16: z.ZodOptional<z.ZodString>;
|
|
1875
1888
|
url_32x32: z.ZodOptional<z.ZodString>;
|
|
1876
1889
|
url_64x64: z.ZodOptional<z.ZodString>;
|
|
1877
1890
|
url_128x128: z.ZodOptional<z.ZodString>;
|
|
1878
1891
|
}, z.core.$strip>>;
|
|
1879
|
-
is_beta: z.ZodOptional<z.ZodBoolean>;
|
|
1880
|
-
is_built_in: z.ZodOptional<z.ZodBoolean>;
|
|
1881
|
-
is_featured: z.ZodOptional<z.ZodBoolean>;
|
|
1882
|
-
is_premium: z.ZodOptional<z.ZodBoolean>;
|
|
1883
|
-
is_public: z.ZodOptional<z.ZodBoolean>;
|
|
1884
|
-
is_upcoming: z.ZodOptional<z.ZodBoolean>;
|
|
1885
1892
|
popularity: z.ZodOptional<z.ZodNumber>;
|
|
1886
|
-
primary_color: z.ZodOptional<z.ZodString>;
|
|
1887
|
-
slug: z.ZodString;
|
|
1888
|
-
auth_type: z.ZodOptional<z.ZodString>;
|
|
1889
|
-
is_deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
1890
|
-
secondary_color: z.ZodOptional<z.ZodString>;
|
|
1891
1893
|
has_filters: z.ZodOptional<z.ZodBoolean>;
|
|
1892
1894
|
has_reads: z.ZodOptional<z.ZodBoolean>;
|
|
1893
1895
|
has_searches: z.ZodOptional<z.ZodBoolean>;
|
|
1894
1896
|
has_searches_or_writes: z.ZodOptional<z.ZodBoolean>;
|
|
1895
1897
|
has_upfront_fields: z.ZodOptional<z.ZodBoolean>;
|
|
1896
1898
|
has_writes: z.ZodOptional<z.ZodBoolean>;
|
|
1899
|
+
is_beta: z.ZodOptional<z.ZodBoolean>;
|
|
1900
|
+
is_built_in: z.ZodOptional<z.ZodBoolean>;
|
|
1901
|
+
is_deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
1902
|
+
is_featured: z.ZodOptional<z.ZodBoolean>;
|
|
1903
|
+
is_hidden: z.ZodOptional<z.ZodBoolean>;
|
|
1897
1904
|
is_invite: z.ZodOptional<z.ZodBoolean>;
|
|
1898
|
-
|
|
1905
|
+
is_premium: z.ZodOptional<z.ZodBoolean>;
|
|
1906
|
+
is_public: z.ZodOptional<z.ZodBoolean>;
|
|
1907
|
+
is_upcoming: z.ZodOptional<z.ZodBoolean>;
|
|
1899
1908
|
visibility: z.ZodOptional<z.ZodString>;
|
|
1909
|
+
actions: z.ZodOptional<z.ZodObject<{
|
|
1910
|
+
read: z.ZodOptional<z.ZodNumber>;
|
|
1911
|
+
read_bulk: z.ZodOptional<z.ZodNumber>;
|
|
1912
|
+
write: z.ZodOptional<z.ZodNumber>;
|
|
1913
|
+
search: z.ZodOptional<z.ZodNumber>;
|
|
1914
|
+
search_or_write: z.ZodOptional<z.ZodNumber>;
|
|
1915
|
+
search_and_write: z.ZodOptional<z.ZodNumber>;
|
|
1916
|
+
filter: z.ZodOptional<z.ZodNumber>;
|
|
1917
|
+
}, z.core.$strip>>;
|
|
1918
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1919
|
+
primary_color: z.ZodOptional<z.ZodString>;
|
|
1920
|
+
secondary_color: z.ZodOptional<z.ZodString>;
|
|
1900
1921
|
classification: z.ZodOptional<z.ZodString>;
|
|
1922
|
+
api_docs_url: z.ZodOptional<z.ZodString>;
|
|
1923
|
+
image: z.ZodOptional<z.ZodString>;
|
|
1901
1924
|
title: z.ZodString;
|
|
1902
1925
|
key: z.ZodString;
|
|
1903
1926
|
implementation_id: z.ZodString;
|
|
1927
|
+
version: z.ZodOptional<z.ZodString>;
|
|
1904
1928
|
}, z.core.$strip>;
|
|
1905
1929
|
|
|
1906
1930
|
declare const AuthenticationItemSchema: z.ZodObject<{
|
|
@@ -2200,52 +2224,147 @@ declare const inputFieldKeyResolver: DynamicResolver<InputFieldItem$1, {
|
|
|
2200
2224
|
* SDK Authentication Utilities
|
|
2201
2225
|
*
|
|
2202
2226
|
* This module provides SDK-level authentication utilities focused
|
|
2203
|
-
*
|
|
2204
|
-
*
|
|
2227
|
+
* on token acquisition. It uses the credentials system for resolution
|
|
2228
|
+
* and handles different credential types appropriately.
|
|
2229
|
+
*
|
|
2230
|
+
* CLI-specific functionality like login/logout is handled by the
|
|
2231
|
+
* @zapier/zapier-sdk-cli-login package.
|
|
2205
2232
|
*/
|
|
2206
2233
|
|
|
2207
|
-
|
|
2234
|
+
/**
|
|
2235
|
+
* Options for resolving auth tokens.
|
|
2236
|
+
*/
|
|
2237
|
+
interface ResolveAuthTokenOptions {
|
|
2238
|
+
credentials?: Credentials;
|
|
2239
|
+
/** @deprecated Use `credentials` instead */
|
|
2240
|
+
token?: string;
|
|
2208
2241
|
onEvent?: EventCallback;
|
|
2209
2242
|
fetch?: typeof globalThis.fetch;
|
|
2210
2243
|
baseUrl?: string;
|
|
2211
|
-
authBaseUrl?: string;
|
|
2212
|
-
authClientId?: string;
|
|
2213
|
-
}
|
|
2214
|
-
interface ResolveAuthTokenOptions extends AuthOptions {
|
|
2215
|
-
token?: string;
|
|
2216
|
-
getToken?: () => Promise<string | undefined> | string | undefined;
|
|
2217
2244
|
}
|
|
2218
2245
|
/**
|
|
2219
|
-
*
|
|
2220
|
-
|
|
2246
|
+
* Clear the token cache. Useful for testing or forcing re-authentication.
|
|
2247
|
+
*/
|
|
2248
|
+
declare function clearTokenCache(): void;
|
|
2249
|
+
/**
|
|
2250
|
+
* Invalidate a cached token. Called when we get a 401 response.
|
|
2221
2251
|
*/
|
|
2222
|
-
declare function
|
|
2252
|
+
declare function invalidateCachedToken(clientId: string): void;
|
|
2253
|
+
/**
|
|
2254
|
+
* Options for getTokenFromCliLogin.
|
|
2255
|
+
*/
|
|
2256
|
+
interface CliLoginOptions {
|
|
2257
|
+
onEvent?: EventCallback;
|
|
2258
|
+
fetch?: typeof globalThis.fetch;
|
|
2259
|
+
credentials?: {
|
|
2260
|
+
type?: "pkce";
|
|
2261
|
+
clientId: string;
|
|
2262
|
+
baseUrl?: string;
|
|
2263
|
+
scope?: string;
|
|
2264
|
+
};
|
|
2265
|
+
}
|
|
2223
2266
|
/**
|
|
2224
2267
|
* Attempts to get a token by optionally importing from CLI login package.
|
|
2225
2268
|
* This provides a graceful fallback when the CLI login package is not available.
|
|
2226
2269
|
*
|
|
2227
2270
|
* Returns undefined if no valid token is found or CLI package is not available.
|
|
2228
2271
|
*/
|
|
2229
|
-
declare function getTokenFromCliLogin(options
|
|
2272
|
+
declare function getTokenFromCliLogin(options: CliLoginOptions): Promise<string | undefined>;
|
|
2230
2273
|
/**
|
|
2231
|
-
*
|
|
2232
|
-
*
|
|
2233
|
-
*
|
|
2274
|
+
* Resolves an auth token from wherever it can be found.
|
|
2275
|
+
*
|
|
2276
|
+
* Resolution order:
|
|
2277
|
+
* 1. Explicit credentials option (or deprecated token option)
|
|
2278
|
+
* 2. Environment variables
|
|
2279
|
+
* 3. CLI login package (if available)
|
|
2280
|
+
*
|
|
2281
|
+
* For different credential types:
|
|
2282
|
+
* - String: Used directly as the token
|
|
2283
|
+
* - Client credentials: Exchanged for an access token (with caching)
|
|
2284
|
+
* - PKCE: Delegates to CLI login (throws if not available)
|
|
2234
2285
|
*
|
|
2235
2286
|
* Returns undefined if no valid token is found.
|
|
2236
2287
|
*/
|
|
2237
|
-
declare function
|
|
2288
|
+
declare function resolveAuthToken(options?: ResolveAuthTokenOptions): Promise<string | undefined>;
|
|
2289
|
+
/**
|
|
2290
|
+
* Invalidate the cached token for the given credentials, if applicable.
|
|
2291
|
+
* This is called when we receive a 401 response, indicating the token
|
|
2292
|
+
* is no longer valid. Only affects client_credentials flow tokens.
|
|
2293
|
+
*/
|
|
2294
|
+
declare function invalidateCredentialsToken(options: {
|
|
2295
|
+
credentials?: Credentials;
|
|
2296
|
+
token?: string;
|
|
2297
|
+
}): Promise<void>;
|
|
2298
|
+
|
|
2238
2299
|
/**
|
|
2239
|
-
*
|
|
2240
|
-
* 1. Explicitly provided token in options
|
|
2241
|
-
* 2. Token from getToken callback in options
|
|
2242
|
-
* 3. ZAPIER_TOKEN environment variable
|
|
2243
|
-
* 4. CLI login package (if available)
|
|
2300
|
+
* Credentials Resolution
|
|
2244
2301
|
*
|
|
2245
|
-
* This
|
|
2246
|
-
*
|
|
2302
|
+
* This module provides the core logic for resolving credentials from various sources:
|
|
2303
|
+
* - Explicit credentials option
|
|
2304
|
+
* - Deprecated token option
|
|
2305
|
+
* - Environment variables (new and deprecated)
|
|
2306
|
+
* - CLI login stored tokens
|
|
2247
2307
|
*/
|
|
2248
|
-
|
|
2308
|
+
|
|
2309
|
+
/**
|
|
2310
|
+
* Options for resolving credentials.
|
|
2311
|
+
*/
|
|
2312
|
+
interface ResolveCredentialsOptions {
|
|
2313
|
+
credentials?: Credentials;
|
|
2314
|
+
/** @deprecated Use `credentials` instead */
|
|
2315
|
+
token?: string;
|
|
2316
|
+
/** SDK base URL - used to derive auth base URL if not specified in credentials */
|
|
2317
|
+
baseUrl?: string;
|
|
2318
|
+
}
|
|
2319
|
+
/**
|
|
2320
|
+
* Resolve credentials from environment variables.
|
|
2321
|
+
*
|
|
2322
|
+
* Precedence:
|
|
2323
|
+
* 1. ZAPIER_CREDENTIALS (string token)
|
|
2324
|
+
* 2. ZAPIER_CREDENTIALS_CLIENT_ID + ZAPIER_CREDENTIALS_CLIENT_SECRET (client credentials)
|
|
2325
|
+
* 3. ZAPIER_CREDENTIALS_CLIENT_ID alone (PKCE)
|
|
2326
|
+
* 4. Deprecated ZAPIER_TOKEN, ZAPIER_AUTH_* vars (with warnings)
|
|
2327
|
+
*
|
|
2328
|
+
* @param sdkBaseUrl - SDK base URL used to derive auth base URL if not specified
|
|
2329
|
+
*/
|
|
2330
|
+
declare function resolveCredentialsFromEnv(sdkBaseUrl?: string): ResolvedCredentials | undefined;
|
|
2331
|
+
/**
|
|
2332
|
+
* Resolve credentials from all possible sources.
|
|
2333
|
+
*
|
|
2334
|
+
* Precedence:
|
|
2335
|
+
* 1. Explicit credentials option
|
|
2336
|
+
* 2. Deprecated token option (with warning)
|
|
2337
|
+
* 3. Environment variables
|
|
2338
|
+
* 4. CLI login stored token (handled separately in auth.ts)
|
|
2339
|
+
*
|
|
2340
|
+
* If credentials is a function, it is called and must return
|
|
2341
|
+
* a string or credentials object (not another function).
|
|
2342
|
+
*
|
|
2343
|
+
* The baseUrl option is used to derive the auth base URL if not
|
|
2344
|
+
* specified in credentials.
|
|
2345
|
+
*/
|
|
2346
|
+
declare function resolveCredentials(options?: ResolveCredentialsOptions): Promise<ResolvedCredentials | undefined>;
|
|
2347
|
+
/**
|
|
2348
|
+
* Extract the base URL from credentials for use in auth flows.
|
|
2349
|
+
*/
|
|
2350
|
+
declare function getBaseUrlFromCredentials(credentials: ResolvedCredentials | undefined): string | undefined;
|
|
2351
|
+
/**
|
|
2352
|
+
* Extract the client ID from credentials for use in auth flows.
|
|
2353
|
+
*/
|
|
2354
|
+
declare function getClientIdFromCredentials(credentials: ResolvedCredentials | undefined): string | undefined;
|
|
2355
|
+
|
|
2356
|
+
/**
|
|
2357
|
+
* Logging utilities for the SDK
|
|
2358
|
+
*/
|
|
2359
|
+
/**
|
|
2360
|
+
* Log a deprecation warning. Each unique message is only logged once per process.
|
|
2361
|
+
*/
|
|
2362
|
+
declare function logDeprecation(message: string): void;
|
|
2363
|
+
/**
|
|
2364
|
+
* Reset the set of logged deprecation warnings.
|
|
2365
|
+
* Useful for testing.
|
|
2366
|
+
*/
|
|
2367
|
+
declare function resetDeprecationWarnings(): void;
|
|
2249
2368
|
|
|
2250
2369
|
/**
|
|
2251
2370
|
* SDK Constants
|
|
@@ -2260,6 +2379,20 @@ declare const ZAPIER_BASE_URL: string;
|
|
|
2260
2379
|
* Maximum number of items that can be requested per page across all paginated functions
|
|
2261
2380
|
*/
|
|
2262
2381
|
declare const MAX_PAGE_LIMIT = 10000;
|
|
2382
|
+
/**
|
|
2383
|
+
* Credentials from environment variables
|
|
2384
|
+
*/
|
|
2385
|
+
declare const ZAPIER_CREDENTIALS: string | undefined;
|
|
2386
|
+
declare const ZAPIER_CREDENTIALS_CLIENT_ID: string | undefined;
|
|
2387
|
+
declare const ZAPIER_CREDENTIALS_CLIENT_SECRET: string | undefined;
|
|
2388
|
+
declare const ZAPIER_CREDENTIALS_BASE_URL: string | undefined;
|
|
2389
|
+
declare const ZAPIER_CREDENTIALS_SCOPE: string | undefined;
|
|
2390
|
+
/**
|
|
2391
|
+
* Deprecated environment variables (kept for backwards compatibility)
|
|
2392
|
+
*/
|
|
2393
|
+
declare const ZAPIER_TOKEN: string | undefined;
|
|
2394
|
+
declare const ZAPIER_AUTH_BASE_URL: string | undefined;
|
|
2395
|
+
declare const ZAPIER_AUTH_CLIENT_ID: string | undefined;
|
|
2263
2396
|
|
|
2264
2397
|
interface ZapierSdkOptions extends BaseSdkOptions {
|
|
2265
2398
|
}
|
|
@@ -2277,6 +2410,7 @@ declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk
|
|
|
2277
2410
|
meta: Record<string, PluginMeta>;
|
|
2278
2411
|
} & EventEmissionContext & {
|
|
2279
2412
|
api: ApiClient;
|
|
2413
|
+
resolveCredentials: () => Promise<ResolvedCredentials | undefined>;
|
|
2280
2414
|
} & {
|
|
2281
2415
|
getVersionedImplementationId: GetVersionedImplementationId;
|
|
2282
2416
|
resolveAppKeys: ResolveAppKeys;
|
|
@@ -2306,7 +2440,7 @@ declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk
|
|
|
2306
2440
|
} & {
|
|
2307
2441
|
meta: {
|
|
2308
2442
|
listApps: {
|
|
2309
|
-
inputSchema: typeof
|
|
2443
|
+
inputSchema: typeof ListAppsSchema;
|
|
2310
2444
|
};
|
|
2311
2445
|
};
|
|
2312
2446
|
} & {
|
|
@@ -2404,4 +2538,4 @@ declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk
|
|
|
2404
2538
|
}>;
|
|
2405
2539
|
declare function createZapierSdk(options?: ZapierSdkOptions): ZapierSdk;
|
|
2406
2540
|
|
|
2407
|
-
export { type Action, type ActionEntry, type ActionExecutionOptions, type ActionExecutionResult, type ActionField, type ActionFieldChoice, type ActionItem$1 as ActionItem, type ActionKeyProperty, ActionKeyPropertySchema, type ActionTypeProperty, ActionTypePropertySchema, type AddActionEntryOptions, type AddActionEntryResult, type ApiError, type ApiEvent, type ApiPluginOptions, type ApiPluginProvides, type App, type AppItem, type AppKeyProperty, AppKeyPropertySchema, type ApplicationLifecycleEventData, type AppsPluginProvides, type AuthEvent, type
|
|
2541
|
+
export { type Action, type ActionEntry, type ActionExecutionOptions, type ActionExecutionResult, type ActionField, type ActionFieldChoice, type ActionItem$1 as ActionItem, type ActionKeyProperty, ActionKeyPropertySchema, type ActionTypeProperty, ActionTypePropertySchema, type AddActionEntryOptions, type AddActionEntryResult, type ApiError, type ApiEvent, type ApiPluginOptions, type ApiPluginProvides, type App, type AppItem, type AppKeyProperty, AppKeyPropertySchema, type ApplicationLifecycleEventData, type AppsPluginProvides, type AuthEvent, type Authentication, type AuthenticationIdProperty, AuthenticationIdPropertySchema, type AuthenticationItem, type AuthenticationsResponse, type BaseEvent, type BatchOptions, type Choice, type ClientCredentialsObject, type Credentials, type CredentialsObject, DEFAULT_CONFIG_PATH, type DebugProperty, DebugPropertySchema, type EnhancedErrorEventData, type ErrorOptions, type EventCallback, type EventContext, type EventEmissionContext, type FetchPluginProvides, type Field, type FieldsetItem, type FindFirstAuthenticationPluginProvides, type FindUniqueAuthenticationPluginProvides, type FormatMetadata, type FormattedItem, type FunctionOptions, type FunctionRegistryEntry, type GetActionPluginProvides, type GetAppPluginProvides, type GetAuthenticationPluginProvides, type GetContextType, type GetProfilePluginProvides, type GetSdkType, type InfoFieldItem, type InputFieldItem, type InputsProperty, InputsPropertySchema, type LimitProperty, LimitPropertySchema, type ListActionsPluginProvides, type ListAppsPluginProvides, type ListAuthenticationsPluginProvides, type ListInputFieldsPluginProvides, type LoadingEvent, MAX_PAGE_LIMIT, type Manifest, type ManifestEntry, type ManifestPluginOptions, type ManifestPluginProvides, type MethodCalledEvent, type MethodCalledEventData, type Need, type NeedsRequest, type NeedsResponse, type OffsetProperty, OffsetPropertySchema, type OutputProperty, OutputPropertySchema, type PaginatedSdkFunction, type ParamsProperty, ParamsPropertySchema, type PkceCredentialsObject, type Plugin, type PluginDependencies, type PluginOptions, type PluginProvides, type PositionalMetadata, RelayFetchSchema, RelayRequestSchema, type RequestPluginProvides, type ResolveAuthTokenOptions, type ResolveCredentialsOptions, type ResolvedCredentials, type RootFieldItem, type RunActionPluginProvides, type Sdk, type SdkEvent, type UpdateManifestEntryOptions, type UpdateManifestEntryResult, type UserProfile, type UserProfileItem, ZAPIER_AUTH_BASE_URL, ZAPIER_AUTH_CLIENT_ID, ZAPIER_BASE_URL, ZAPIER_CREDENTIALS, ZAPIER_CREDENTIALS_BASE_URL, ZAPIER_CREDENTIALS_CLIENT_ID, ZAPIER_CREDENTIALS_CLIENT_SECRET, ZAPIER_CREDENTIALS_SCOPE, ZAPIER_TOKEN, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierError, type ZapierFetchInitOptions, ZapierNotFoundError, ZapierResourceNotFoundError, type ZapierSdk, type ZapierSdkApps, type ZapierSdkOptions, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, appKeyResolver, appsPlugin, authenticationIdGenericResolver, authenticationIdResolver, batch, buildApplicationLifecycleEvent, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, clearTokenCache, createBaseEvent, createFunction, createSdk, createZapierSdk, createZapierSdkWithoutRegistry, fetchPlugin, findFirstAuthenticationPlugin, findManifestEntry, findUniqueAuthenticationPlugin, formatErrorMessage, generateEventId, getActionPlugin, getAppPlugin, getAuthenticationPlugin, getBaseUrlFromCredentials, getCiPlatform, getClientIdFromCredentials, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTokenFromCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isClientCredentials, isCredentialsFunction, isCredentialsObject, isPkceCredentials, isPositional, listActionsPlugin, listAppsPlugin, listAuthenticationsPlugin, listInputFieldsPlugin, logDeprecation, manifestPlugin, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, runActionPlugin, toSnakeCase, toTitleCase };
|