@zapier/zapier-sdk 0.111.1 → 0.112.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 +53 -0
- package/dist/{chunk-PEPMWTX3.cjs → chunk-22F3PGAC.cjs} +37 -52
- package/dist/{chunk-GVGPB4RI.mjs → chunk-PQB6IXXA.mjs} +34 -17
- package/dist/experimental.cjs +382 -414
- package/dist/experimental.d.mts +40 -40
- package/dist/experimental.d.ts +40 -40
- package/dist/experimental.mjs +2 -2
- package/dist/{index-bCGYDrTW.d.mts → index-BxH1lsFT.d.mts} +15 -18
- package/dist/{index-bCGYDrTW.d.ts → index-BxH1lsFT.d.ts} +15 -18
- package/dist/index.cjs +276 -308
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.112.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2102c00: **Removed the legacy function-plugin surface.** A plugin is now always a
|
|
8
|
+
descriptor built by `define*` / `declare*`, never a `(sdk) => provides`
|
|
9
|
+
function. These exports shipped deprecated with runtime warnings and are now
|
|
10
|
+
gone:
|
|
11
|
+
|
|
12
|
+
| Removed | Use instead |
|
|
13
|
+
| ---------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
14
|
+
| `createPluginStack`, `composePlugins` | `definePlugin({ name, exports })` and `createSdk(root)` |
|
|
15
|
+
| `createPluginMethod`, `createPaginatedPluginMethod` | `defineMethod({ output: "item" })` / `defineMethod({ output: "list" })` |
|
|
16
|
+
| `createCorePlugin(options)` | `createSdk(root, { configuration: { [CORE_OPTIONS_ID]: options } })` |
|
|
17
|
+
| `fromFunctionPlugin`, `defineLegacyMerge` | `createSdk(root)` on a descriptor root |
|
|
18
|
+
| `definePlugin(fn)` (the function form) | `defineMethod` / `defineProperty` / `definePlugin({ ... })` |
|
|
19
|
+
| `registryPlugin` | nothing: `createZapierSdk` already surfaces `getRegistry` |
|
|
20
|
+
| `Plugin<TSdk, TProvides>` (the function-plugin type) | `Plugin` now names the descriptor a `define*` call returns |
|
|
21
|
+
| `PluginProvides` type | `PluginSurface<typeof plugin>` for a plugin's own surface |
|
|
22
|
+
| `OutputFormatter` type | `defineFormatter`, whose result is a `Formatter` |
|
|
23
|
+
|
|
24
|
+
Also removed, with no deprecation warning: `createFunction` and
|
|
25
|
+
`createPaginatedFunction`. Only a function plugin could use their output. Author
|
|
26
|
+
with `defineMethod({ output: "item" })` or `defineMethod({ output: "list" })`
|
|
27
|
+
instead.
|
|
28
|
+
- `addPlugin(sdk, plugin)` refuses a function argument.
|
|
29
|
+
- `sdk.context.meta` is gone. Read `sdk.getRegistry()` instead.
|
|
30
|
+
- `sdk.context` has no index signature, so `sdk.context.anything` no longer
|
|
31
|
+
typechecks.
|
|
32
|
+
|
|
33
|
+
`sdk.getRegistry()` is unchanged.
|
|
34
|
+
|
|
35
|
+
Added `getRegistry(sdk, packageFilter?)`, a free function that reads the same
|
|
36
|
+
registry without the accessor being on the surface, and its `RegistryResult`
|
|
37
|
+
type. Added `formatExtensionPluginFailure(error)`, the message a host shows when
|
|
38
|
+
`addPlugin` refuses an extension. Re-exported `Plugin` from kitcore, the type of any `define*` result.
|
|
39
|
+
|
|
40
|
+
Re-exported `MethodMeta` and `PropertyMeta`, the description fields a method
|
|
41
|
+
or a property carries. `PluginMeta` stays as a deprecated alias of `MethodMeta`,
|
|
42
|
+
now an exact field list with no index signature, so a `satisfies
|
|
43
|
+
Partial<PluginMeta>` that sets a field outside it no longer compiles.
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- Updated dependencies [2102c00]
|
|
48
|
+
- @zapier/kitcore@0.21.0
|
|
49
|
+
|
|
50
|
+
## 0.111.2
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- 0535d52: Approval-flow requests now use an updated internal endpoint. No caller-visible behavior has changed.
|
|
55
|
+
|
|
3
56
|
## 0.111.1
|
|
4
57
|
|
|
5
58
|
### Patch Changes
|
|
@@ -2265,6 +2265,14 @@ var pathConfig = {
|
|
|
2265
2265
|
"/vfs": {
|
|
2266
2266
|
authHeader: "Authorization",
|
|
2267
2267
|
subdomain: "api"
|
|
2268
|
+
},
|
|
2269
|
+
// e.g. /approvals/v0/approvals -> https://api.zapier.com/approvals/v0/approvals
|
|
2270
|
+
// ApprovalsAPI is registered on the Public API Gateway, so it goes straight
|
|
2271
|
+
// there. Old callers using "/api/v0/approvals" match the /api/v0 entry above and
|
|
2272
|
+
// remain routed through sdkapi.
|
|
2273
|
+
"/approvals": {
|
|
2274
|
+
authHeader: "Authorization",
|
|
2275
|
+
subdomain: "api"
|
|
2268
2276
|
}
|
|
2269
2277
|
};
|
|
2270
2278
|
|
|
@@ -2799,7 +2807,7 @@ function logRouteOverride({
|
|
|
2799
2807
|
}
|
|
2800
2808
|
|
|
2801
2809
|
// src/sdk-version.ts
|
|
2802
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
2810
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.112.0" : void 0) || "unknown";
|
|
2803
2811
|
|
|
2804
2812
|
// src/utils/open-url.ts
|
|
2805
2813
|
var nodePrefix = "node:";
|
|
@@ -3691,7 +3699,7 @@ var ZapierApiClient = class {
|
|
|
3691
3699
|
const context = buildContext();
|
|
3692
3700
|
let approvalResponse;
|
|
3693
3701
|
try {
|
|
3694
|
-
approvalResponse = await this.rawFetch("/
|
|
3702
|
+
approvalResponse = await this.rawFetch("/approvals/v0/approvals", {
|
|
3695
3703
|
method: "POST",
|
|
3696
3704
|
headers: {
|
|
3697
3705
|
"Content-Type": "application/json",
|
|
@@ -3737,7 +3745,12 @@ var ZapierApiClient = class {
|
|
|
3737
3745
|
response: body
|
|
3738
3746
|
});
|
|
3739
3747
|
}
|
|
3740
|
-
const sdkapiOrigin = new URL(
|
|
3748
|
+
const sdkapiOrigin = new URL(
|
|
3749
|
+
this.buildUrl(`/api/v0/rulebook/decision/${approval.id}/stream`).url
|
|
3750
|
+
).origin;
|
|
3751
|
+
const approvalsOrigin = new URL(
|
|
3752
|
+
this.buildUrl("/approvals/v0/approvals").url
|
|
3753
|
+
).origin;
|
|
3741
3754
|
const browserOrigin = getZapierBaseUrl(this.options.baseUrl) ?? sdkapiOrigin;
|
|
3742
3755
|
const assertApprovalOrigin = (url, expectedOrigin, label) => {
|
|
3743
3756
|
let parsed;
|
|
@@ -3757,7 +3770,7 @@ var ZapierApiClient = class {
|
|
|
3757
3770
|
}
|
|
3758
3771
|
};
|
|
3759
3772
|
if (!isLocalhostBaseUrl(this.options.baseUrl)) {
|
|
3760
|
-
assertApprovalOrigin(approval.poll_url,
|
|
3773
|
+
assertApprovalOrigin(approval.poll_url, approvalsOrigin, "poll_url");
|
|
3761
3774
|
if (approval.stream_url) {
|
|
3762
3775
|
assertApprovalOrigin(approval.stream_url, sdkapiOrigin, "stream_url");
|
|
3763
3776
|
}
|
|
@@ -7465,8 +7478,7 @@ var appsPlugin = kitcore.defineProperty({
|
|
|
7465
7478
|
type: "list",
|
|
7466
7479
|
inputSchema: ActionExecutionInputSchema,
|
|
7467
7480
|
itemType: "ActionResult",
|
|
7468
|
-
outputSchema: ActionResultItemSchema
|
|
7469
|
-
skipOutputValidation: true
|
|
7481
|
+
outputSchema: ActionResultItemSchema
|
|
7470
7482
|
}
|
|
7471
7483
|
]
|
|
7472
7484
|
});
|
|
@@ -12932,8 +12944,8 @@ var zapierSdkPlugin = kitcore.definePlugin({
|
|
|
12932
12944
|
operationAnnotatorPlugin
|
|
12933
12945
|
],
|
|
12934
12946
|
exports: [
|
|
12935
|
-
// The registry reporter
|
|
12936
|
-
//
|
|
12947
|
+
// The registry reporter. A re-exportable built-in, so it is listed here
|
|
12948
|
+
// rather than added by the framework.
|
|
12937
12949
|
kitcore.getRegistryPlugin,
|
|
12938
12950
|
getProfilePlugin,
|
|
12939
12951
|
listAppsPlugin,
|
|
@@ -13182,13 +13194,18 @@ var BaseSdkOptionsSchema = zod.z.object({
|
|
|
13182
13194
|
// Use credentials instead
|
|
13183
13195
|
});
|
|
13184
13196
|
|
|
13185
|
-
// src/
|
|
13186
|
-
|
|
13187
|
-
|
|
13188
|
-
|
|
13189
|
-
|
|
13190
|
-
|
|
13191
|
-
|
|
13197
|
+
// src/utils/extension-failure.ts
|
|
13198
|
+
function formatExtensionPluginFailure(error) {
|
|
13199
|
+
const message = describeThrown(error);
|
|
13200
|
+
return `Extension plugin failed to construct: ${message}. Skipping this plugin: nothing it declared was added, and any \`dispose\` it registered was invoked. Plugins the same package already loaded stay loaded. Cleanup after an \`await\` inside a \`dispose\` is not guaranteed, and a side effect from the part that threw cannot be undone, so fix or remove the extension.`;
|
|
13201
|
+
}
|
|
13202
|
+
function describeThrown(error) {
|
|
13203
|
+
try {
|
|
13204
|
+
return error instanceof Error ? error.message : String(error);
|
|
13205
|
+
} catch {
|
|
13206
|
+
return "a thrown value that could not be read";
|
|
13207
|
+
}
|
|
13208
|
+
}
|
|
13192
13209
|
|
|
13193
13210
|
Object.defineProperty(exports, "CONTEXT", {
|
|
13194
13211
|
enumerable: true,
|
|
@@ -13226,38 +13243,10 @@ Object.defineProperty(exports, "addPlugin", {
|
|
|
13226
13243
|
enumerable: true,
|
|
13227
13244
|
get: function () { return kitcore.addPlugin; }
|
|
13228
13245
|
});
|
|
13229
|
-
Object.defineProperty(exports, "composePlugins", {
|
|
13230
|
-
enumerable: true,
|
|
13231
|
-
get: function () { return kitcore.composePlugins; }
|
|
13232
|
-
});
|
|
13233
13246
|
Object.defineProperty(exports, "createController", {
|
|
13234
13247
|
enumerable: true,
|
|
13235
13248
|
get: function () { return kitcore.createController; }
|
|
13236
13249
|
});
|
|
13237
|
-
Object.defineProperty(exports, "createCorePlugin", {
|
|
13238
|
-
enumerable: true,
|
|
13239
|
-
get: function () { return kitcore.createCorePlugin; }
|
|
13240
|
-
});
|
|
13241
|
-
Object.defineProperty(exports, "createFunction", {
|
|
13242
|
-
enumerable: true,
|
|
13243
|
-
get: function () { return kitcore.createFunction; }
|
|
13244
|
-
});
|
|
13245
|
-
Object.defineProperty(exports, "createPaginatedFunction", {
|
|
13246
|
-
enumerable: true,
|
|
13247
|
-
get: function () { return kitcore.createPaginatedFunction; }
|
|
13248
|
-
});
|
|
13249
|
-
Object.defineProperty(exports, "createPaginatedPluginMethod", {
|
|
13250
|
-
enumerable: true,
|
|
13251
|
-
get: function () { return kitcore.createPaginatedPluginMethod; }
|
|
13252
|
-
});
|
|
13253
|
-
Object.defineProperty(exports, "createPluginMethod", {
|
|
13254
|
-
enumerable: true,
|
|
13255
|
-
get: function () { return kitcore.createPluginMethod; }
|
|
13256
|
-
});
|
|
13257
|
-
Object.defineProperty(exports, "createPluginStack", {
|
|
13258
|
-
enumerable: true,
|
|
13259
|
-
get: function () { return kitcore.createPluginStack; }
|
|
13260
|
-
});
|
|
13261
13250
|
Object.defineProperty(exports, "createSdk", {
|
|
13262
13251
|
enumerable: true,
|
|
13263
13252
|
get: function () { return kitcore.createSdk; }
|
|
@@ -13282,10 +13271,6 @@ Object.defineProperty(exports, "defineFormatter", {
|
|
|
13282
13271
|
enumerable: true,
|
|
13283
13272
|
get: function () { return kitcore.defineFormatter; }
|
|
13284
13273
|
});
|
|
13285
|
-
Object.defineProperty(exports, "defineLegacyMerge", {
|
|
13286
|
-
enumerable: true,
|
|
13287
|
-
get: function () { return kitcore.defineLegacyMerge; }
|
|
13288
|
-
});
|
|
13289
13274
|
Object.defineProperty(exports, "defineMethod", {
|
|
13290
13275
|
enumerable: true,
|
|
13291
13276
|
get: function () { return kitcore.defineMethod; }
|
|
@@ -13314,10 +13299,6 @@ Object.defineProperty(exports, "disposeSdk", {
|
|
|
13314
13299
|
enumerable: true,
|
|
13315
13300
|
get: function () { return kitcore.disposeSdk; }
|
|
13316
13301
|
});
|
|
13317
|
-
Object.defineProperty(exports, "fromFunctionPlugin", {
|
|
13318
|
-
enumerable: true,
|
|
13319
|
-
get: function () { return kitcore.fromFunctionPlugin; }
|
|
13320
|
-
});
|
|
13321
13302
|
Object.defineProperty(exports, "getContext", {
|
|
13322
13303
|
enumerable: true,
|
|
13323
13304
|
get: function () { return kitcore.getContext; }
|
|
@@ -13334,6 +13315,10 @@ Object.defineProperty(exports, "getNegatable", {
|
|
|
13334
13315
|
enumerable: true,
|
|
13335
13316
|
get: function () { return kitcore.getNegatable; }
|
|
13336
13317
|
});
|
|
13318
|
+
Object.defineProperty(exports, "getRegistry", {
|
|
13319
|
+
enumerable: true,
|
|
13320
|
+
get: function () { return kitcore.getRegistry; }
|
|
13321
|
+
});
|
|
13337
13322
|
Object.defineProperty(exports, "getRegistryPlugin", {
|
|
13338
13323
|
enumerable: true,
|
|
13339
13324
|
get: function () { return kitcore.getRegistryPlugin; }
|
|
@@ -13511,6 +13496,7 @@ exports.findFirstConnectionPlugin = findFirstConnectionPlugin;
|
|
|
13511
13496
|
exports.findManifestEntry = findManifestEntry;
|
|
13512
13497
|
exports.findUniqueConnectionPlugin = findUniqueConnectionPlugin;
|
|
13513
13498
|
exports.formatErrorMessage = formatErrorMessage;
|
|
13499
|
+
exports.formatExtensionPluginFailure = formatExtensionPluginFailure;
|
|
13514
13500
|
exports.generateEventId = generateEventId;
|
|
13515
13501
|
exports.getActionInputFieldsSchemaPlugin = getActionInputFieldsSchemaPlugin;
|
|
13516
13502
|
exports.getActionPlugin = getActionPlugin;
|
|
@@ -13584,7 +13570,6 @@ exports.manifestPluginRef = manifestPluginRef;
|
|
|
13584
13570
|
exports.operationAnnotatorPlugin = operationAnnotatorPlugin;
|
|
13585
13571
|
exports.parseConcurrencyEnvVar = parseConcurrencyEnvVar;
|
|
13586
13572
|
exports.readManifestFromFile = readManifestFromFile;
|
|
13587
|
-
exports.registryPlugin = registryPlugin;
|
|
13588
13573
|
exports.requestPlugin = requestPlugin;
|
|
13589
13574
|
exports.resetDeprecationWarnings = resetDeprecationWarnings;
|
|
13590
13575
|
exports.resolveAuth = resolveAuth;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __require } from './chunk-Y6FXYEAI.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { withPositional, createDeprecationLogger, createAsyncContext, declareOptionalProperty, defineProperty, definePlugin, sendHttpRequestPlugin, retryHttpRequestPlugin, declareProperty, defineMethod, coreOptionsPluginRef, createValidator, defineFormatter, declareMethod, defineResolver, concatLists, openEnum, defineHook, getRegistryPlugin, paginate, toSnakeCase, isCoreError, toTitleCase, CORE_ERROR_SYMBOL, CoreErrorCode, CORE_SIGNAL_SYMBOL, isCoreSignal, createSdk, CORE_OPTIONS_ID, resolvePlugin } from '@zapier/kitcore';
|
|
4
|
-
export { CONTEXT, CORE_ERROR_SYMBOL, CORE_OPTIONS_ID, CORE_SIGNAL_SYMBOL, CoreCancelledSignal, CoreDisposeError, CoreErrorCode, CoreSignal, addPlugin,
|
|
4
|
+
export { CONTEXT, CORE_ERROR_SYMBOL, CORE_OPTIONS_ID, CORE_SIGNAL_SYMBOL, CoreCancelledSignal, CoreDisposeError, CoreErrorCode, CoreSignal, addPlugin, createController, createSdk, declareMethod, declareOptionalProperty, declarePlugin, declareProperty, defineFormatter, defineMethod, defineMethodOverride, defineOverride, definePlugin, defineProperty, defineResolver, disposeSdk, getContext, getCoreErrorCause, getCoreErrorCode, getNegatable, getRegistry, getRegistryPlugin, isCoreCancelledSignal, isCoreError, isCoreSignal, isPositional, omitExports, resolvePlugin, runInMethodScope, runWithTelemetryContext, selectExports, toSnakeCase, toTitleCase } from '@zapier/kitcore';
|
|
5
5
|
import { ConnectionSchema, ConnectionsResponseSchema, ListConnectionsQuerySchema as ListConnectionsQuerySchema$1, ConnectionItemSchema } from '@zapier/zapier-sdk-core/v0/schemas/connections';
|
|
6
6
|
import { buildHttpRequestContext, buildActionRunContext } from '@zapier/policy-context';
|
|
7
7
|
import { ListAppsQuerySchema, AppItemSchema as AppItemSchema$1 } from '@zapier/zapier-sdk-core/v0/schemas/apps';
|
|
@@ -2264,6 +2264,14 @@ var pathConfig = {
|
|
|
2264
2264
|
"/vfs": {
|
|
2265
2265
|
authHeader: "Authorization",
|
|
2266
2266
|
subdomain: "api"
|
|
2267
|
+
},
|
|
2268
|
+
// e.g. /approvals/v0/approvals -> https://api.zapier.com/approvals/v0/approvals
|
|
2269
|
+
// ApprovalsAPI is registered on the Public API Gateway, so it goes straight
|
|
2270
|
+
// there. Old callers using "/api/v0/approvals" match the /api/v0 entry above and
|
|
2271
|
+
// remain routed through sdkapi.
|
|
2272
|
+
"/approvals": {
|
|
2273
|
+
authHeader: "Authorization",
|
|
2274
|
+
subdomain: "api"
|
|
2267
2275
|
}
|
|
2268
2276
|
};
|
|
2269
2277
|
|
|
@@ -2798,7 +2806,7 @@ function logRouteOverride({
|
|
|
2798
2806
|
}
|
|
2799
2807
|
|
|
2800
2808
|
// src/sdk-version.ts
|
|
2801
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
2809
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.112.0" : void 0) || "unknown";
|
|
2802
2810
|
|
|
2803
2811
|
// src/utils/open-url.ts
|
|
2804
2812
|
var nodePrefix = "node:";
|
|
@@ -3690,7 +3698,7 @@ var ZapierApiClient = class {
|
|
|
3690
3698
|
const context = buildContext();
|
|
3691
3699
|
let approvalResponse;
|
|
3692
3700
|
try {
|
|
3693
|
-
approvalResponse = await this.rawFetch("/
|
|
3701
|
+
approvalResponse = await this.rawFetch("/approvals/v0/approvals", {
|
|
3694
3702
|
method: "POST",
|
|
3695
3703
|
headers: {
|
|
3696
3704
|
"Content-Type": "application/json",
|
|
@@ -3736,7 +3744,12 @@ var ZapierApiClient = class {
|
|
|
3736
3744
|
response: body
|
|
3737
3745
|
});
|
|
3738
3746
|
}
|
|
3739
|
-
const sdkapiOrigin = new URL(
|
|
3747
|
+
const sdkapiOrigin = new URL(
|
|
3748
|
+
this.buildUrl(`/api/v0/rulebook/decision/${approval.id}/stream`).url
|
|
3749
|
+
).origin;
|
|
3750
|
+
const approvalsOrigin = new URL(
|
|
3751
|
+
this.buildUrl("/approvals/v0/approvals").url
|
|
3752
|
+
).origin;
|
|
3740
3753
|
const browserOrigin = getZapierBaseUrl(this.options.baseUrl) ?? sdkapiOrigin;
|
|
3741
3754
|
const assertApprovalOrigin = (url, expectedOrigin, label) => {
|
|
3742
3755
|
let parsed;
|
|
@@ -3756,7 +3769,7 @@ var ZapierApiClient = class {
|
|
|
3756
3769
|
}
|
|
3757
3770
|
};
|
|
3758
3771
|
if (!isLocalhostBaseUrl(this.options.baseUrl)) {
|
|
3759
|
-
assertApprovalOrigin(approval.poll_url,
|
|
3772
|
+
assertApprovalOrigin(approval.poll_url, approvalsOrigin, "poll_url");
|
|
3760
3773
|
if (approval.stream_url) {
|
|
3761
3774
|
assertApprovalOrigin(approval.stream_url, sdkapiOrigin, "stream_url");
|
|
3762
3775
|
}
|
|
@@ -7464,8 +7477,7 @@ var appsPlugin = defineProperty({
|
|
|
7464
7477
|
type: "list",
|
|
7465
7478
|
inputSchema: ActionExecutionInputSchema,
|
|
7466
7479
|
itemType: "ActionResult",
|
|
7467
|
-
outputSchema: ActionResultItemSchema
|
|
7468
|
-
skipOutputValidation: true
|
|
7480
|
+
outputSchema: ActionResultItemSchema
|
|
7469
7481
|
}
|
|
7470
7482
|
]
|
|
7471
7483
|
});
|
|
@@ -12931,8 +12943,8 @@ var zapierSdkPlugin = definePlugin({
|
|
|
12931
12943
|
operationAnnotatorPlugin
|
|
12932
12944
|
],
|
|
12933
12945
|
exports: [
|
|
12934
|
-
// The registry reporter
|
|
12935
|
-
//
|
|
12946
|
+
// The registry reporter. A re-exportable built-in, so it is listed here
|
|
12947
|
+
// rather than added by the framework.
|
|
12936
12948
|
getRegistryPlugin,
|
|
12937
12949
|
getProfilePlugin,
|
|
12938
12950
|
listAppsPlugin,
|
|
@@ -13181,12 +13193,17 @@ var BaseSdkOptionsSchema = z.object({
|
|
|
13181
13193
|
// Use credentials instead
|
|
13182
13194
|
});
|
|
13183
13195
|
|
|
13184
|
-
// src/
|
|
13185
|
-
|
|
13186
|
-
|
|
13187
|
-
|
|
13188
|
-
|
|
13189
|
-
|
|
13190
|
-
|
|
13196
|
+
// src/utils/extension-failure.ts
|
|
13197
|
+
function formatExtensionPluginFailure(error) {
|
|
13198
|
+
const message = describeThrown(error);
|
|
13199
|
+
return `Extension plugin failed to construct: ${message}. Skipping this plugin: nothing it declared was added, and any \`dispose\` it registered was invoked. Plugins the same package already loaded stay loaded. Cleanup after an \`await\` inside a \`dispose\` is not guaranteed, and a side effect from the part that threw cannot be undone, so fix or remove the extension.`;
|
|
13200
|
+
}
|
|
13201
|
+
function describeThrown(error) {
|
|
13202
|
+
try {
|
|
13203
|
+
return error instanceof Error ? error.message : String(error);
|
|
13204
|
+
} catch {
|
|
13205
|
+
return "a thrown value that could not be read";
|
|
13206
|
+
}
|
|
13207
|
+
}
|
|
13191
13208
|
|
|
13192
|
-
export { ACTION_RUNS_PATH, API_ID, ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMillisecondsPropertySchema, ActionTimeoutSecondsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthMechanism, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONNECTIONS_ID, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MILLISECONDS, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CredentialsFunctionSchema, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MILLISECONDS, DEFAULT_APPROVAL_TIMEOUT_MILLISECONDS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, DEPRECATION_NOTICE_EVENT, DebugPropertySchema, DrainTriggerInboxSchema, EVENT_EMISSION_ID, FieldsPropertySchema, InputFieldPropertySchema, InputsPropertySchema, LeaseLimitPropertySchema, LeasePropertySchema, LeaseSecondsPropertySchema, LimitPropertySchema, MANIFEST_ID, MAX_CONCURRENCY_LIMIT, MAX_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RESOLVE_CREDENTIALS_ID, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, SDK_OPTIONS_ID, SDK_VERSION, TablePropertySchema, TablesPropertySchema, TriggerInboxKeyPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, WatchTriggerInboxSchema, ZAPIER_BASE_URL, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MILLISECONDS, ZapierAbortDrainSignal, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierConflictError, ZapierError, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierReleaseTriggerMessageSignal, ZapierResourceNotFoundError, ZapierSignal, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, apiPluginRef, appKeyResolver, appsPlugin, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, cleanupEventListeners, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, connectionsPluginRef, createActionRunPlugin, createBaseEvent, createClientCredentialsPlugin, createMemoryCache, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdk, createZapierSdkWithoutRegistry, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, durableRunIdResolver, eventEmissionHookPlugin, eventEmissionPlugin, eventEmissionPluginRef, extractErrorDetail, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getActionRunPlugin, getAgent, getAppPlugin, getBaseUrlFromCredentials, getCallerContext, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getTtyContext, getZapierApprovalMode, getZapierCausationId, getZapierCorrelationId, getZapierDefaultApprovalMode, getZapierOpenAutoModeApprovalsInBrowser, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCredentialsFunction, isCredentialsObject, isPermanentHttpError, isPkceCredentials, isZapierAbortDrainSignal, isZapierActionError, isZapierAppNotFoundError, isZapierApprovalError, isZapierAuthenticationError, isZapierBundleError, isZapierConflictError, isZapierError, isZapierNotFoundError, isZapierRateLimitError, isZapierReleaseTriggerMessageSignal, isZapierResourceNotFoundError, isZapierSignal, isZapierTimeoutError, isZapierValidationError, listActionInputFieldChoicesPlugin, listActionInputFieldsPlugin, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation, manifestPlugin, manifestPluginRef, operationAnnotatorPlugin, parseConcurrencyEnvVar, readManifestFromFile,
|
|
13209
|
+
export { ACTION_RUNS_PATH, API_ID, ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMillisecondsPropertySchema, ActionTimeoutSecondsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthMechanism, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONNECTIONS_ID, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MILLISECONDS, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CredentialsFunctionSchema, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MILLISECONDS, DEFAULT_APPROVAL_TIMEOUT_MILLISECONDS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, DEPRECATION_NOTICE_EVENT, DebugPropertySchema, DrainTriggerInboxSchema, EVENT_EMISSION_ID, FieldsPropertySchema, InputFieldPropertySchema, InputsPropertySchema, LeaseLimitPropertySchema, LeasePropertySchema, LeaseSecondsPropertySchema, LimitPropertySchema, MANIFEST_ID, MAX_CONCURRENCY_LIMIT, MAX_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RESOLVE_CREDENTIALS_ID, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, SDK_OPTIONS_ID, SDK_VERSION, TablePropertySchema, TablesPropertySchema, TriggerInboxKeyPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, WatchTriggerInboxSchema, ZAPIER_BASE_URL, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MILLISECONDS, ZapierAbortDrainSignal, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierConflictError, ZapierError, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierReleaseTriggerMessageSignal, ZapierResourceNotFoundError, ZapierSignal, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, apiPluginRef, appKeyResolver, appsPlugin, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, cleanupEventListeners, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, connectionsPluginRef, createActionRunPlugin, createBaseEvent, createClientCredentialsPlugin, createMemoryCache, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdk, createZapierSdkWithoutRegistry, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, durableRunIdResolver, eventEmissionHookPlugin, eventEmissionPlugin, eventEmissionPluginRef, extractErrorDetail, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, formatExtensionPluginFailure, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getActionRunPlugin, getAgent, getAppPlugin, getBaseUrlFromCredentials, getCallerContext, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getTtyContext, getZapierApprovalMode, getZapierCausationId, getZapierCorrelationId, getZapierDefaultApprovalMode, getZapierOpenAutoModeApprovalsInBrowser, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCredentialsFunction, isCredentialsObject, isPermanentHttpError, isPkceCredentials, isZapierAbortDrainSignal, isZapierActionError, isZapierAppNotFoundError, isZapierApprovalError, isZapierAuthenticationError, isZapierBundleError, isZapierConflictError, isZapierError, isZapierNotFoundError, isZapierRateLimitError, isZapierReleaseTriggerMessageSignal, isZapierResourceNotFoundError, isZapierSignal, isZapierTimeoutError, isZapierValidationError, listActionInputFieldChoicesPlugin, listActionInputFieldsPlugin, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation, manifestPlugin, manifestPluginRef, operationAnnotatorPlugin, parseConcurrencyEnvVar, readManifestFromFile, requestPlugin, resetDeprecationWarnings, resolveAuth, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, resolveCredentialsPlugin, resolveCredentialsPluginRef, runActionPlugin, runWithCallerContext, sdkOptionsPluginRef, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, triggerInboxResolver, triggerMessagesResolver, updateTableRecordsPlugin, workflowDraftIdResolver, workflowDraftRevisionResolver, workflowIdResolver, workflowRunIdResolver, workflowVersionIdResolver, zapierAdaptError, zapierCoreOptions, zapierSdkPlugin };
|