@zapier/zapier-sdk 0.112.6 → 0.114.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 +33 -0
- package/README.md +22 -3
- package/dist/beta.cjs +1112 -0
- package/dist/beta.d.mts +10939 -0
- package/dist/beta.d.ts +10939 -0
- package/dist/beta.mjs +3 -0
- package/dist/{chunk-GDSXM2EN.cjs → chunk-I4PUUHD3.cjs} +90 -50
- package/dist/{chunk-HI3KXWXJ.mjs → chunk-IAKIS53P.mjs} +80 -53
- package/dist/chunk-LSSH3DUG.mjs +18 -0
- package/dist/chunk-POX5WPI5.cjs +21 -0
- package/dist/experimental.cjs +401 -383
- package/dist/experimental.d.mts +39 -19
- package/dist/experimental.d.ts +39 -19
- package/dist/experimental.mjs +10 -8
- package/dist/{index-BrxiLlQi.d.mts → index-BCJAutN8.d.mts} +41 -19
- package/dist/{index-BrxiLlQi.d.ts → index-BCJAutN8.d.ts} +41 -19
- package/dist/index.cjs +288 -272
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/package.json +13 -2
package/dist/beta.mjs
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { createZapierSdk, zapierBetaSdkPlugin } from './chunk-LSSH3DUG.mjs';
|
|
2
|
+
export { ACTION_RUNS_PATH, API_ID, ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMillisecondsPropertySchema, ActionTimeoutSecondsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthMechanism, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONNECTIONS_ID, CONTEXT, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MILLISECONDS, CORE_ERROR_SYMBOL, CORE_OPTIONS_ID, CORE_SIGNAL_SYMBOL, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CoreCancelledSignal, CoreDisposeError, CoreErrorCode, CoreSignal, 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, 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, STABILITY_DEFINITIONS, STABILITY_LEVELS, STABILITY_TITLES, TablePropertySchema, TablesPropertySchema, TriggerInboxKeyPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, 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, addPlugin, apiPlugin, apiPluginRef, appKeyResolver, applyStabilityLabel, appsPlugin, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, cleanupEventListeners, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, connectionsPluginRef, createActionRunPlugin, createBaseEvent, createClientCredentialsPlugin, createController, createMemoryCache, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdkWithoutRegistry, declareMethod, declareOptionalProperty, declarePlugin, declareProperty, defineFormatter, defineMethod, defineMethodOverride, defineOverride, definePlugin, defineProperty, defineResolver, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, disposeSdk, durableRunIdResolver, eventEmissionHookPlugin, eventEmissionPlugin, eventEmissionPluginRef, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, formatExtensionPluginFailure, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getActionRunPlugin, getAgent, getAppPlugin, getBaseUrlFromCredentials, getCallerContext, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getContext, getCoreErrorCause, getCoreErrorCode, getCpuTime, getCurrentTimestamp, getMemoryUsage, getNegatable, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getRegistry, getRegistryPlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getTtyContext, getZapierApprovalMode, getZapierCausationId, getZapierCorrelationId, getZapierDefaultApprovalMode, getZapierOpenAutoModeApprovalsInBrowser, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCoreCancelledSignal, isCoreError, isCoreSignal, isCredentialsFunction, isCredentialsObject, isPermanentHttpError, isPkceCredentials, isPositional, 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, omitExports, operationAnnotatorPlugin, parseConcurrencyEnvVar, readManifestFromFile, requestPlugin, resetDeprecationWarnings, resolveAuth, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, resolveCredentialsPlugin, resolveCredentialsPluginRef, resolvePlugin, runActionPlugin, runInMethodScope, runWithCallerContext, runWithTelemetryContext, sdkOptionsPluginRef, selectExports, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, triggerMessagesResolver, updateTableRecordsPlugin, workflowDraftIdResolver, workflowDraftRevisionResolver, workflowIdResolver, workflowRunIdResolver, workflowVersionIdResolver, zapierAdaptError, zapierCoreOptions, zapierSdkPlugin } from './chunk-IAKIS53P.mjs';
|
|
3
|
+
import './chunk-Y6FXYEAI.mjs';
|
|
@@ -1230,6 +1230,7 @@ function emitOnce(onEvent, event) {
|
|
|
1230
1230
|
}
|
|
1231
1231
|
}
|
|
1232
1232
|
var { logDeprecation, resetDeprecationWarnings } = kitcore.createDeprecationLogger("zapier-sdk");
|
|
1233
|
+
var { logStabilityNotice, resetStabilityNotices } = kitcore.createStabilityNoticeLogger("zapier-sdk");
|
|
1233
1234
|
|
|
1234
1235
|
// src/utils/url-utils.ts
|
|
1235
1236
|
function withSearchParams({
|
|
@@ -2818,7 +2819,7 @@ function logRouteOverride({
|
|
|
2818
2819
|
}
|
|
2819
2820
|
|
|
2820
2821
|
// src/sdk-version.ts
|
|
2821
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
2822
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.114.0" : void 0) || "unknown";
|
|
2822
2823
|
|
|
2823
2824
|
// src/utils/open-url.ts
|
|
2824
2825
|
var nodePrefix = "node:";
|
|
@@ -5429,7 +5430,7 @@ var actionKeyResolver = kitcore.defineResolver({
|
|
|
5429
5430
|
const page = await imports.listActions({ app: input.app, cursor });
|
|
5430
5431
|
return {
|
|
5431
5432
|
data: page.data.filter(
|
|
5432
|
-
(action) => action.action_type === input.actionType
|
|
5433
|
+
(action) => action.action_type === input.actionType
|
|
5433
5434
|
),
|
|
5434
5435
|
nextCursor: page.nextCursor
|
|
5435
5436
|
};
|
|
@@ -6942,6 +6943,45 @@ var actionItemFormatter = kitcore.defineFormatter({
|
|
|
6942
6943
|
format: ({ item }) => formatActionItem(item)
|
|
6943
6944
|
});
|
|
6944
6945
|
|
|
6946
|
+
// src/plugins/listActions/fetch.ts
|
|
6947
|
+
async function fetchAppActions({
|
|
6948
|
+
imports,
|
|
6949
|
+
app
|
|
6950
|
+
}) {
|
|
6951
|
+
const selectedApi = await imports.manifest.getVersionedImplementationId(app);
|
|
6952
|
+
if (!selectedApi) {
|
|
6953
|
+
throw new ZapierConfigurationError(
|
|
6954
|
+
"No current_implementation_id found for app",
|
|
6955
|
+
{ configType: "current_implementation_id" }
|
|
6956
|
+
);
|
|
6957
|
+
}
|
|
6958
|
+
const data = await imports.api.get(
|
|
6959
|
+
"/zapier/api/v4/implementations/",
|
|
6960
|
+
{
|
|
6961
|
+
searchParams: {
|
|
6962
|
+
global: "true",
|
|
6963
|
+
// Include private/unlisted implementations the caller has access to.
|
|
6964
|
+
// With public_only the API drops actions on private apps, so they
|
|
6965
|
+
// surface as "unknown action" downstream (COSUB-562).
|
|
6966
|
+
public_only: "false",
|
|
6967
|
+
selected_apis: selectedApi
|
|
6968
|
+
}
|
|
6969
|
+
}
|
|
6970
|
+
);
|
|
6971
|
+
const actions = [];
|
|
6972
|
+
for (const implementation of data.results || []) {
|
|
6973
|
+
for (const action of implementation.actions ?? []) {
|
|
6974
|
+
actions.push(
|
|
6975
|
+
normalizeActionItem({
|
|
6976
|
+
...action,
|
|
6977
|
+
selected_api: action.selected_api || implementation.selected_api
|
|
6978
|
+
})
|
|
6979
|
+
);
|
|
6980
|
+
}
|
|
6981
|
+
}
|
|
6982
|
+
return { selectedApi, actions };
|
|
6983
|
+
}
|
|
6984
|
+
|
|
6945
6985
|
// src/plugins/listActions/index.ts
|
|
6946
6986
|
var listActionsPlugin = kitcore.defineMethod({
|
|
6947
6987
|
name: "listActions",
|
|
@@ -6961,56 +7001,26 @@ var listActionsPlugin = kitcore.defineMethod({
|
|
|
6961
7001
|
// the resolver.
|
|
6962
7002
|
resolvers: { app: appKeyResolver },
|
|
6963
7003
|
run: async ({ imports, input, annotate }) => {
|
|
6964
|
-
const api = imports.api;
|
|
6965
|
-
const getVersionedImplementationId = imports.manifest.getVersionedImplementationId;
|
|
6966
7004
|
const appKey = "app" in input ? input.app : input.appKey;
|
|
6967
|
-
const selectedApi = await
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
{ configType: "current_implementation_id" }
|
|
6972
|
-
);
|
|
6973
|
-
}
|
|
7005
|
+
const { selectedApi, actions } = await fetchAppActions({
|
|
7006
|
+
imports,
|
|
7007
|
+
app: appKey
|
|
7008
|
+
});
|
|
6974
7009
|
annotate({ selectedApi });
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
// Include private/unlisted implementations the caller has access to.
|
|
6981
|
-
// With public_only the API drops actions on private apps, so they
|
|
6982
|
-
// surface as "unknown action" downstream (COSUB-562).
|
|
6983
|
-
public_only: "false",
|
|
6984
|
-
selected_apis: selectedApi
|
|
6985
|
-
}
|
|
6986
|
-
}
|
|
6987
|
-
);
|
|
6988
|
-
let allActions = [];
|
|
6989
|
-
for (const implementation of data.results || []) {
|
|
6990
|
-
if (implementation.actions) {
|
|
6991
|
-
for (const action of implementation.actions) {
|
|
6992
|
-
allActions.push(
|
|
6993
|
-
normalizeActionItem({
|
|
6994
|
-
...action,
|
|
6995
|
-
selected_api: action.selected_api || implementation.selected_api
|
|
6996
|
-
})
|
|
6997
|
-
);
|
|
6998
|
-
}
|
|
6999
|
-
}
|
|
7000
|
-
}
|
|
7001
|
-
if (input.actionType) {
|
|
7002
|
-
allActions = allActions.filter(
|
|
7003
|
-
(action) => action.action_type === input.actionType
|
|
7004
|
-
);
|
|
7005
|
-
}
|
|
7006
|
-
return { data: allActions };
|
|
7010
|
+
return {
|
|
7011
|
+
data: actions.filter(
|
|
7012
|
+
(action) => !action.is_hidden && (!input.actionType || action.action_type === input.actionType)
|
|
7013
|
+
)
|
|
7014
|
+
};
|
|
7007
7015
|
}
|
|
7008
7016
|
});
|
|
7009
7017
|
|
|
7010
7018
|
// src/plugins/getAction/index.ts
|
|
7011
7019
|
var getActionPlugin = kitcore.defineMethod({
|
|
7012
7020
|
name: "getAction",
|
|
7013
|
-
|
|
7021
|
+
// `listActionsPlugin` is here for the action-type and action-key resolvers,
|
|
7022
|
+
// which reach it through a stand-in; the lookup itself doesn't use it.
|
|
7023
|
+
imports: [listActionsPlugin, manifestPluginRef, apiPluginRef],
|
|
7014
7024
|
categories: ["action"],
|
|
7015
7025
|
itemType: "Action",
|
|
7016
7026
|
inputSchema: GetActionInputSchema,
|
|
@@ -7027,11 +7037,11 @@ var getActionPlugin = kitcore.defineMethod({
|
|
|
7027
7037
|
const appKey = "app" in input ? input.app : input.appKey;
|
|
7028
7038
|
const actionKey = "action" in input ? input.action : input.actionKey;
|
|
7029
7039
|
const { actionType } = input;
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
}
|
|
7040
|
+
const { actions } = await fetchAppActions({ imports, app: appKey });
|
|
7041
|
+
const action = actions.find(
|
|
7042
|
+
(candidate) => (candidate.key === actionKey || candidate.id === actionKey) && candidate.action_type === actionType
|
|
7043
|
+
);
|
|
7044
|
+
if (action) return { data: action };
|
|
7035
7045
|
throw new ZapierResourceNotFoundError(
|
|
7036
7046
|
`Action not found: ${actionKey} with type ${actionType}`,
|
|
7037
7047
|
{ resourceType: "Action", resourceId: `${actionKey} (${actionType})` }
|
|
@@ -9196,12 +9206,29 @@ var getProfilePlugin = kitcore.defineMethod({
|
|
|
9196
9206
|
}
|
|
9197
9207
|
});
|
|
9198
9208
|
|
|
9209
|
+
// src/stability.ts
|
|
9210
|
+
var STABILITY_DEFINITIONS = {
|
|
9211
|
+
stable: "The surface we intend to keep. While the SDK is in Open Beta (0.x), a breaking change can still land in a minor release; we deprecate first where we can, and every one is called out in the changelog with a migration note.",
|
|
9212
|
+
beta: "Functionally complete and ready to build against, but the shape may still change as it settles. Changes land in minor releases with a changelog migration note, without a deprecation period.",
|
|
9213
|
+
experimental: "Still being designed; may change shape or disappear in any release, without notice."
|
|
9214
|
+
};
|
|
9215
|
+
|
|
9199
9216
|
// src/core-options.ts
|
|
9200
9217
|
var zapierCoreOptions = {
|
|
9201
9218
|
adaptError: zapierAdaptError,
|
|
9202
9219
|
// Every deprecated-method hit is signalled; the zapier-sdk deduping logger
|
|
9203
9220
|
// is the policy (once per process) and the brand.
|
|
9204
|
-
logDeprecation: ({ methodName, deprecation }) => logDeprecation(`${methodName}() is deprecated. ${deprecation.message}`)
|
|
9221
|
+
logDeprecation: ({ methodName, deprecation }) => logDeprecation(`${methodName}() is deprecated. ${deprecation.message}`),
|
|
9222
|
+
// The stability sibling: every surface call of a beta / experimental
|
|
9223
|
+
// method warns, once per process, through the same branded channel. The
|
|
9224
|
+
// detail sentence is the tier's consumer contract (STABILITY_DEFINITIONS),
|
|
9225
|
+
// so the runtime warning matches the docs and README notes verbatim.
|
|
9226
|
+
logStabilityNotice: ({ methodName, stability }) => {
|
|
9227
|
+
if (stability === "stable") return;
|
|
9228
|
+
logStabilityNotice(
|
|
9229
|
+
`${methodName}() is marked ${stability}. ${STABILITY_DEFINITIONS[stability]}`
|
|
9230
|
+
);
|
|
9231
|
+
}
|
|
9205
9232
|
};
|
|
9206
9233
|
var GetConnectionStartUrlSchema = zod.z.object({
|
|
9207
9234
|
app: AppPropertySchema
|
|
@@ -13271,10 +13298,22 @@ Object.defineProperty(exports, "CoreSignal", {
|
|
|
13271
13298
|
enumerable: true,
|
|
13272
13299
|
get: function () { return kitcore.CoreSignal; }
|
|
13273
13300
|
});
|
|
13301
|
+
Object.defineProperty(exports, "STABILITY_LEVELS", {
|
|
13302
|
+
enumerable: true,
|
|
13303
|
+
get: function () { return kitcore.STABILITY_LEVELS; }
|
|
13304
|
+
});
|
|
13305
|
+
Object.defineProperty(exports, "STABILITY_TITLES", {
|
|
13306
|
+
enumerable: true,
|
|
13307
|
+
get: function () { return kitcore.STABILITY_TITLES; }
|
|
13308
|
+
});
|
|
13274
13309
|
Object.defineProperty(exports, "addPlugin", {
|
|
13275
13310
|
enumerable: true,
|
|
13276
13311
|
get: function () { return kitcore.addPlugin; }
|
|
13277
13312
|
});
|
|
13313
|
+
Object.defineProperty(exports, "applyStabilityLabel", {
|
|
13314
|
+
enumerable: true,
|
|
13315
|
+
get: function () { return kitcore.applyStabilityLabel; }
|
|
13316
|
+
});
|
|
13278
13317
|
Object.defineProperty(exports, "createController", {
|
|
13279
13318
|
enumerable: true,
|
|
13280
13319
|
get: function () { return kitcore.createController; }
|
|
@@ -13455,6 +13494,7 @@ exports.RelayRequestSchema = RelayRequestSchema;
|
|
|
13455
13494
|
exports.ResolvedCredentialsSchema = ResolvedCredentialsSchema;
|
|
13456
13495
|
exports.SDK_OPTIONS_ID = SDK_OPTIONS_ID;
|
|
13457
13496
|
exports.SDK_VERSION = SDK_VERSION;
|
|
13497
|
+
exports.STABILITY_DEFINITIONS = STABILITY_DEFINITIONS;
|
|
13458
13498
|
exports.TablePropertySchema = TablePropertySchema;
|
|
13459
13499
|
exports.TablesPropertySchema = TablesPropertySchema;
|
|
13460
13500
|
exports.TriggerInboxKeyPropertySchema = TriggerInboxKeyPropertySchema;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __require } from './chunk-Y6FXYEAI.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
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, 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';
|
|
3
|
+
import { withPositional, createDeprecationLogger, createStabilityNoticeLogger, 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, STABILITY_LEVELS, STABILITY_TITLES, addPlugin, applyStabilityLabel, 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 { ConnectionItemSchema as ConnectionItemSchema$1, ConnectionSchema, ConnectionsResponseSchema, ListConnectionsQuerySchema as ListConnectionsQuerySchema$1 } 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';
|
|
@@ -1229,6 +1229,7 @@ function emitOnce(onEvent, event) {
|
|
|
1229
1229
|
}
|
|
1230
1230
|
}
|
|
1231
1231
|
var { logDeprecation, resetDeprecationWarnings } = createDeprecationLogger("zapier-sdk");
|
|
1232
|
+
var { logStabilityNotice, resetStabilityNotices } = createStabilityNoticeLogger("zapier-sdk");
|
|
1232
1233
|
|
|
1233
1234
|
// src/utils/url-utils.ts
|
|
1234
1235
|
function withSearchParams({
|
|
@@ -2817,7 +2818,7 @@ function logRouteOverride({
|
|
|
2817
2818
|
}
|
|
2818
2819
|
|
|
2819
2820
|
// src/sdk-version.ts
|
|
2820
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
2821
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.114.0" : void 0) || "unknown";
|
|
2821
2822
|
|
|
2822
2823
|
// src/utils/open-url.ts
|
|
2823
2824
|
var nodePrefix = "node:";
|
|
@@ -5428,7 +5429,7 @@ var actionKeyResolver = defineResolver({
|
|
|
5428
5429
|
const page = await imports.listActions({ app: input.app, cursor });
|
|
5429
5430
|
return {
|
|
5430
5431
|
data: page.data.filter(
|
|
5431
|
-
(action) => action.action_type === input.actionType
|
|
5432
|
+
(action) => action.action_type === input.actionType
|
|
5432
5433
|
),
|
|
5433
5434
|
nextCursor: page.nextCursor
|
|
5434
5435
|
};
|
|
@@ -6941,6 +6942,45 @@ var actionItemFormatter = defineFormatter({
|
|
|
6941
6942
|
format: ({ item }) => formatActionItem(item)
|
|
6942
6943
|
});
|
|
6943
6944
|
|
|
6945
|
+
// src/plugins/listActions/fetch.ts
|
|
6946
|
+
async function fetchAppActions({
|
|
6947
|
+
imports,
|
|
6948
|
+
app
|
|
6949
|
+
}) {
|
|
6950
|
+
const selectedApi = await imports.manifest.getVersionedImplementationId(app);
|
|
6951
|
+
if (!selectedApi) {
|
|
6952
|
+
throw new ZapierConfigurationError(
|
|
6953
|
+
"No current_implementation_id found for app",
|
|
6954
|
+
{ configType: "current_implementation_id" }
|
|
6955
|
+
);
|
|
6956
|
+
}
|
|
6957
|
+
const data = await imports.api.get(
|
|
6958
|
+
"/zapier/api/v4/implementations/",
|
|
6959
|
+
{
|
|
6960
|
+
searchParams: {
|
|
6961
|
+
global: "true",
|
|
6962
|
+
// Include private/unlisted implementations the caller has access to.
|
|
6963
|
+
// With public_only the API drops actions on private apps, so they
|
|
6964
|
+
// surface as "unknown action" downstream (COSUB-562).
|
|
6965
|
+
public_only: "false",
|
|
6966
|
+
selected_apis: selectedApi
|
|
6967
|
+
}
|
|
6968
|
+
}
|
|
6969
|
+
);
|
|
6970
|
+
const actions = [];
|
|
6971
|
+
for (const implementation of data.results || []) {
|
|
6972
|
+
for (const action of implementation.actions ?? []) {
|
|
6973
|
+
actions.push(
|
|
6974
|
+
normalizeActionItem({
|
|
6975
|
+
...action,
|
|
6976
|
+
selected_api: action.selected_api || implementation.selected_api
|
|
6977
|
+
})
|
|
6978
|
+
);
|
|
6979
|
+
}
|
|
6980
|
+
}
|
|
6981
|
+
return { selectedApi, actions };
|
|
6982
|
+
}
|
|
6983
|
+
|
|
6944
6984
|
// src/plugins/listActions/index.ts
|
|
6945
6985
|
var listActionsPlugin = defineMethod({
|
|
6946
6986
|
name: "listActions",
|
|
@@ -6960,56 +7000,26 @@ var listActionsPlugin = defineMethod({
|
|
|
6960
7000
|
// the resolver.
|
|
6961
7001
|
resolvers: { app: appKeyResolver },
|
|
6962
7002
|
run: async ({ imports, input, annotate }) => {
|
|
6963
|
-
const api = imports.api;
|
|
6964
|
-
const getVersionedImplementationId = imports.manifest.getVersionedImplementationId;
|
|
6965
7003
|
const appKey = "app" in input ? input.app : input.appKey;
|
|
6966
|
-
const selectedApi = await
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
{ configType: "current_implementation_id" }
|
|
6971
|
-
);
|
|
6972
|
-
}
|
|
7004
|
+
const { selectedApi, actions } = await fetchAppActions({
|
|
7005
|
+
imports,
|
|
7006
|
+
app: appKey
|
|
7007
|
+
});
|
|
6973
7008
|
annotate({ selectedApi });
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
// Include private/unlisted implementations the caller has access to.
|
|
6980
|
-
// With public_only the API drops actions on private apps, so they
|
|
6981
|
-
// surface as "unknown action" downstream (COSUB-562).
|
|
6982
|
-
public_only: "false",
|
|
6983
|
-
selected_apis: selectedApi
|
|
6984
|
-
}
|
|
6985
|
-
}
|
|
6986
|
-
);
|
|
6987
|
-
let allActions = [];
|
|
6988
|
-
for (const implementation of data.results || []) {
|
|
6989
|
-
if (implementation.actions) {
|
|
6990
|
-
for (const action of implementation.actions) {
|
|
6991
|
-
allActions.push(
|
|
6992
|
-
normalizeActionItem({
|
|
6993
|
-
...action,
|
|
6994
|
-
selected_api: action.selected_api || implementation.selected_api
|
|
6995
|
-
})
|
|
6996
|
-
);
|
|
6997
|
-
}
|
|
6998
|
-
}
|
|
6999
|
-
}
|
|
7000
|
-
if (input.actionType) {
|
|
7001
|
-
allActions = allActions.filter(
|
|
7002
|
-
(action) => action.action_type === input.actionType
|
|
7003
|
-
);
|
|
7004
|
-
}
|
|
7005
|
-
return { data: allActions };
|
|
7009
|
+
return {
|
|
7010
|
+
data: actions.filter(
|
|
7011
|
+
(action) => !action.is_hidden && (!input.actionType || action.action_type === input.actionType)
|
|
7012
|
+
)
|
|
7013
|
+
};
|
|
7006
7014
|
}
|
|
7007
7015
|
});
|
|
7008
7016
|
|
|
7009
7017
|
// src/plugins/getAction/index.ts
|
|
7010
7018
|
var getActionPlugin = defineMethod({
|
|
7011
7019
|
name: "getAction",
|
|
7012
|
-
|
|
7020
|
+
// `listActionsPlugin` is here for the action-type and action-key resolvers,
|
|
7021
|
+
// which reach it through a stand-in; the lookup itself doesn't use it.
|
|
7022
|
+
imports: [listActionsPlugin, manifestPluginRef, apiPluginRef],
|
|
7013
7023
|
categories: ["action"],
|
|
7014
7024
|
itemType: "Action",
|
|
7015
7025
|
inputSchema: GetActionInputSchema,
|
|
@@ -7026,11 +7036,11 @@ var getActionPlugin = defineMethod({
|
|
|
7026
7036
|
const appKey = "app" in input ? input.app : input.appKey;
|
|
7027
7037
|
const actionKey = "action" in input ? input.action : input.actionKey;
|
|
7028
7038
|
const { actionType } = input;
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
}
|
|
7039
|
+
const { actions } = await fetchAppActions({ imports, app: appKey });
|
|
7040
|
+
const action = actions.find(
|
|
7041
|
+
(candidate) => (candidate.key === actionKey || candidate.id === actionKey) && candidate.action_type === actionType
|
|
7042
|
+
);
|
|
7043
|
+
if (action) return { data: action };
|
|
7034
7044
|
throw new ZapierResourceNotFoundError(
|
|
7035
7045
|
`Action not found: ${actionKey} with type ${actionType}`,
|
|
7036
7046
|
{ resourceType: "Action", resourceId: `${actionKey} (${actionType})` }
|
|
@@ -9195,12 +9205,29 @@ var getProfilePlugin = defineMethod({
|
|
|
9195
9205
|
}
|
|
9196
9206
|
});
|
|
9197
9207
|
|
|
9208
|
+
// src/stability.ts
|
|
9209
|
+
var STABILITY_DEFINITIONS = {
|
|
9210
|
+
stable: "The surface we intend to keep. While the SDK is in Open Beta (0.x), a breaking change can still land in a minor release; we deprecate first where we can, and every one is called out in the changelog with a migration note.",
|
|
9211
|
+
beta: "Functionally complete and ready to build against, but the shape may still change as it settles. Changes land in minor releases with a changelog migration note, without a deprecation period.",
|
|
9212
|
+
experimental: "Still being designed; may change shape or disappear in any release, without notice."
|
|
9213
|
+
};
|
|
9214
|
+
|
|
9198
9215
|
// src/core-options.ts
|
|
9199
9216
|
var zapierCoreOptions = {
|
|
9200
9217
|
adaptError: zapierAdaptError,
|
|
9201
9218
|
// Every deprecated-method hit is signalled; the zapier-sdk deduping logger
|
|
9202
9219
|
// is the policy (once per process) and the brand.
|
|
9203
|
-
logDeprecation: ({ methodName, deprecation }) => logDeprecation(`${methodName}() is deprecated. ${deprecation.message}`)
|
|
9220
|
+
logDeprecation: ({ methodName, deprecation }) => logDeprecation(`${methodName}() is deprecated. ${deprecation.message}`),
|
|
9221
|
+
// The stability sibling: every surface call of a beta / experimental
|
|
9222
|
+
// method warns, once per process, through the same branded channel. The
|
|
9223
|
+
// detail sentence is the tier's consumer contract (STABILITY_DEFINITIONS),
|
|
9224
|
+
// so the runtime warning matches the docs and README notes verbatim.
|
|
9225
|
+
logStabilityNotice: ({ methodName, stability }) => {
|
|
9226
|
+
if (stability === "stable") return;
|
|
9227
|
+
logStabilityNotice(
|
|
9228
|
+
`${methodName}() is marked ${stability}. ${STABILITY_DEFINITIONS[stability]}`
|
|
9229
|
+
);
|
|
9230
|
+
}
|
|
9204
9231
|
};
|
|
9205
9232
|
var GetConnectionStartUrlSchema = z.object({
|
|
9206
9233
|
app: AppPropertySchema
|
|
@@ -13238,4 +13265,4 @@ function describeThrown(error) {
|
|
|
13238
13265
|
}
|
|
13239
13266
|
}
|
|
13240
13267
|
|
|
13241
|
-
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 };
|
|
13268
|
+
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, STABILITY_DEFINITIONS, 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 };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { zapierSdkPlugin, zapierCoreOptions, SDK_OPTIONS_ID } from './chunk-IAKIS53P.mjs';
|
|
2
|
+
import { definePlugin, createSdk, CORE_OPTIONS_ID } from '@zapier/kitcore';
|
|
3
|
+
|
|
4
|
+
var zapierBetaSdkPlugin = definePlugin({
|
|
5
|
+
namespace: "zapier",
|
|
6
|
+
name: "beta-sdk",
|
|
7
|
+
exports: [zapierSdkPlugin]
|
|
8
|
+
});
|
|
9
|
+
function createZapierSdk(options = {}) {
|
|
10
|
+
return createSdk(zapierBetaSdkPlugin, {
|
|
11
|
+
configuration: {
|
|
12
|
+
[SDK_OPTIONS_ID]: options,
|
|
13
|
+
[CORE_OPTIONS_ID]: zapierCoreOptions
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { createZapierSdk, zapierBetaSdkPlugin };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkI4PUUHD3_cjs = require('./chunk-I4PUUHD3.cjs');
|
|
4
|
+
var kitcore = require('@zapier/kitcore');
|
|
5
|
+
|
|
6
|
+
var zapierBetaSdkPlugin = kitcore.definePlugin({
|
|
7
|
+
namespace: "zapier",
|
|
8
|
+
name: "beta-sdk",
|
|
9
|
+
exports: [chunkI4PUUHD3_cjs.zapierSdkPlugin]
|
|
10
|
+
});
|
|
11
|
+
function createZapierSdk(options = {}) {
|
|
12
|
+
return kitcore.createSdk(zapierBetaSdkPlugin, {
|
|
13
|
+
configuration: {
|
|
14
|
+
[chunkI4PUUHD3_cjs.SDK_OPTIONS_ID]: options,
|
|
15
|
+
[kitcore.CORE_OPTIONS_ID]: chunkI4PUUHD3_cjs.zapierCoreOptions
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
exports.createZapierSdk = createZapierSdk;
|
|
21
|
+
exports.zapierBetaSdkPlugin = zapierBetaSdkPlugin;
|