@zapier/zapier-sdk 0.114.1 → 0.114.3
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 +16 -0
- package/README.md +1 -1
- package/dist/beta.cjs +278 -278
- package/dist/beta.mjs +2 -2
- package/dist/{chunk-D25G6MHC.mjs → chunk-E3I5TDS2.mjs} +38 -10
- package/dist/{chunk-77ZQIJTO.mjs → chunk-KBRCEMCW.mjs} +1 -1
- package/dist/{chunk-C5EU6GM6.cjs → chunk-NWVMI6M7.cjs} +38 -10
- package/dist/{chunk-AMFRFORO.cjs → chunk-Q5MBCDFL.cjs} +4 -4
- package/dist/experimental.cjs +383 -383
- package/dist/experimental.d.mts +266 -266
- package/dist/experimental.d.ts +266 -266
- package/dist/experimental.mjs +3 -3
- package/dist/index.cjs +276 -276
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/beta.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createZapierSdk, zapierBetaSdkPlugin } from './chunk-
|
|
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-
|
|
1
|
+
export { createZapierSdk, zapierBetaSdkPlugin } from './chunk-KBRCEMCW.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-E3I5TDS2.mjs';
|
|
3
3
|
import './chunk-Y6FXYEAI.mjs';
|
|
@@ -2818,7 +2818,7 @@ function logRouteOverride({
|
|
|
2818
2818
|
}
|
|
2819
2819
|
|
|
2820
2820
|
// src/sdk-version.ts
|
|
2821
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.114.
|
|
2821
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.114.3" : void 0) || "unknown";
|
|
2822
2822
|
|
|
2823
2823
|
// src/utils/open-url.ts
|
|
2824
2824
|
var nodePrefix = "node:";
|
|
@@ -4627,6 +4627,13 @@ function normalizeConnectionItem({
|
|
|
4627
4627
|
}
|
|
4628
4628
|
|
|
4629
4629
|
// src/utils/pagination.ts
|
|
4630
|
+
function toSdkPageInput({ data, nextCursor, meta }) {
|
|
4631
|
+
return {
|
|
4632
|
+
data,
|
|
4633
|
+
nextCursor,
|
|
4634
|
+
...meta?.id !== void 0 ? { meta: { id: meta.id } } : {}
|
|
4635
|
+
};
|
|
4636
|
+
}
|
|
4630
4637
|
function extractCursorFromUrl(url) {
|
|
4631
4638
|
try {
|
|
4632
4639
|
const params = new URL(url).searchParams;
|
|
@@ -5279,7 +5286,7 @@ var fetchPlugin = defineMethod({
|
|
|
5279
5286
|
{
|
|
5280
5287
|
status: result.status,
|
|
5281
5288
|
code: relayErrorCode,
|
|
5282
|
-
title: "API
|
|
5289
|
+
title: "Proxy API Error",
|
|
5283
5290
|
detail: relayError
|
|
5284
5291
|
}
|
|
5285
5292
|
] : void 0
|
|
@@ -5297,7 +5304,7 @@ var fetchPlugin = defineMethod({
|
|
|
5297
5304
|
}
|
|
5298
5305
|
}
|
|
5299
5306
|
});
|
|
5300
|
-
var RunActionDescription = "Execute an action with the given inputs";
|
|
5307
|
+
var RunActionDescription = "Execute an action with the given inputs and wait for its results. Each result page includes the action run ID in meta.id.";
|
|
5301
5308
|
var RunActionBaseSchema = z.object({
|
|
5302
5309
|
connection: ConnectionPropertySchema.optional().describe(
|
|
5303
5310
|
"Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."
|
|
@@ -7316,6 +7323,7 @@ var runActionPlugin = defineMethod({
|
|
|
7316
7323
|
}
|
|
7317
7324
|
return {
|
|
7318
7325
|
data: run.results ?? [],
|
|
7326
|
+
meta: { id: started.id },
|
|
7319
7327
|
// Coerce to a string: the API returns a numeric page index, but
|
|
7320
7328
|
// `SdkPage.nextCursor` is a string (and the page guard enforces it).
|
|
7321
7329
|
nextCursor: run.next_page != null ? String(run.next_page) : void 0
|
|
@@ -9511,7 +9519,7 @@ var listAuthenticationsPlugin = defineMethod({
|
|
|
9511
9519
|
// would lose `.items()` / async iteration. Awaiting the delegate inside a
|
|
9512
9520
|
// list method's `run` yields one page; this method's own paginator restores
|
|
9513
9521
|
// the full paginated surface.
|
|
9514
|
-
output: "list",
|
|
9522
|
+
output: { type: "list", adaptPage: toSdkPageInput },
|
|
9515
9523
|
inputSchema: ListConnectionsQuerySchema,
|
|
9516
9524
|
packages: ["cli", "mcp"],
|
|
9517
9525
|
categories: ["connection"],
|
|
@@ -9592,7 +9600,11 @@ var listInputFieldsDeprecatedPlugin = defineMethod({
|
|
|
9592
9600
|
// would lose `.items()` / async iteration. Awaiting the delegate inside a
|
|
9593
9601
|
// list method's `run` yields one page; this method's own paginator restores
|
|
9594
9602
|
// the full paginated surface.
|
|
9595
|
-
output: {
|
|
9603
|
+
output: {
|
|
9604
|
+
type: "list",
|
|
9605
|
+
adaptPage: toSdkPageInput,
|
|
9606
|
+
defaultPageSize: DEFAULT_PAGE_SIZE
|
|
9607
|
+
},
|
|
9596
9608
|
inputSchema: ListActionInputFieldsInputSchema,
|
|
9597
9609
|
categories: ["action"],
|
|
9598
9610
|
deprecation: { message: "Use listActionInputFields instead." },
|
|
@@ -9610,7 +9622,11 @@ var listInputFieldsDeprecatedPlugin = defineMethod({
|
|
|
9610
9622
|
var listInputFieldChoicesDeprecatedPlugin = defineMethod({
|
|
9611
9623
|
name: "listInputFieldChoices",
|
|
9612
9624
|
imports: [listActionInputFieldChoicesPlugin],
|
|
9613
|
-
output: {
|
|
9625
|
+
output: {
|
|
9626
|
+
type: "list",
|
|
9627
|
+
adaptPage: toSdkPageInput,
|
|
9628
|
+
defaultPageSize: DEFAULT_PAGE_SIZE
|
|
9629
|
+
},
|
|
9614
9630
|
inputSchema: ListActionInputFieldChoicesInputSchema,
|
|
9615
9631
|
categories: ["action"],
|
|
9616
9632
|
deprecation: { message: "Use listActionInputFieldChoices instead." },
|
|
@@ -11277,7 +11293,11 @@ var listTriggersPlugin = defineMethod({
|
|
|
11277
11293
|
inputSchema: ListTriggersSchema,
|
|
11278
11294
|
outputSchema: ActionItemSchema,
|
|
11279
11295
|
skipOutputValidation: true,
|
|
11280
|
-
output: {
|
|
11296
|
+
output: {
|
|
11297
|
+
type: "list",
|
|
11298
|
+
adaptPage: toSdkPageInput,
|
|
11299
|
+
defaultPageSize: DEFAULT_PAGE_SIZE
|
|
11300
|
+
},
|
|
11281
11301
|
formatter: actionItemFormatter,
|
|
11282
11302
|
resolvers: { app: appKeyResolver },
|
|
11283
11303
|
run: async ({ imports, input }) => {
|
|
@@ -11311,7 +11331,11 @@ var listTriggerInputFieldsPlugin = defineMethod({
|
|
|
11311
11331
|
inputSchema: ListTriggerInputFieldsSchema,
|
|
11312
11332
|
outputSchema: RootFieldItemSchema,
|
|
11313
11333
|
skipOutputValidation: true,
|
|
11314
|
-
output: {
|
|
11334
|
+
output: {
|
|
11335
|
+
type: "list",
|
|
11336
|
+
adaptPage: toSdkPageInput,
|
|
11337
|
+
defaultPageSize: DEFAULT_PAGE_SIZE
|
|
11338
|
+
},
|
|
11315
11339
|
formatter: rootFieldItemFormatter,
|
|
11316
11340
|
annotator: deriveReadOperation,
|
|
11317
11341
|
// actionKeyResolver and inputsAllOptionalResolver depend on actionType. Pin it
|
|
@@ -11359,7 +11383,11 @@ var listTriggerInputFieldChoicesPlugin = defineMethod({
|
|
|
11359
11383
|
inputSchema: ListTriggerInputFieldChoicesSchema,
|
|
11360
11384
|
outputSchema: InputFieldChoiceItemSchema,
|
|
11361
11385
|
skipOutputValidation: true,
|
|
11362
|
-
output: {
|
|
11386
|
+
output: {
|
|
11387
|
+
type: "list",
|
|
11388
|
+
adaptPage: toSdkPageInput,
|
|
11389
|
+
defaultPageSize: DEFAULT_PAGE_SIZE
|
|
11390
|
+
},
|
|
11363
11391
|
formatter: inputFieldChoiceItemFormatter,
|
|
11364
11392
|
annotator: deriveReadOperation,
|
|
11365
11393
|
resolvers: {
|
|
@@ -11545,7 +11573,7 @@ var listTablesPlugin = defineMethod({
|
|
|
11545
11573
|
inputSchema: ListTablesOptionsSchema,
|
|
11546
11574
|
outputSchema: TableItemSchema,
|
|
11547
11575
|
skipOutputValidation: true,
|
|
11548
|
-
output: "list",
|
|
11576
|
+
output: { type: "list", adaptPage: toSdkPageInput },
|
|
11549
11577
|
run: async ({ imports, input }) => {
|
|
11550
11578
|
return await imports.listTablesInternal({
|
|
11551
11579
|
...input,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { zapierSdkPlugin, zapierCoreOptions, SDK_OPTIONS_ID } from './chunk-
|
|
1
|
+
import { zapierSdkPlugin, zapierCoreOptions, SDK_OPTIONS_ID } from './chunk-E3I5TDS2.mjs';
|
|
2
2
|
import { definePlugin, createSdk, CORE_OPTIONS_ID } from '@zapier/kitcore';
|
|
3
3
|
|
|
4
4
|
var zapierBetaSdkPlugin = definePlugin({
|
|
@@ -2819,7 +2819,7 @@ function logRouteOverride({
|
|
|
2819
2819
|
}
|
|
2820
2820
|
|
|
2821
2821
|
// src/sdk-version.ts
|
|
2822
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.114.
|
|
2822
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.114.3" : void 0) || "unknown";
|
|
2823
2823
|
|
|
2824
2824
|
// src/utils/open-url.ts
|
|
2825
2825
|
var nodePrefix = "node:";
|
|
@@ -4628,6 +4628,13 @@ function normalizeConnectionItem({
|
|
|
4628
4628
|
}
|
|
4629
4629
|
|
|
4630
4630
|
// src/utils/pagination.ts
|
|
4631
|
+
function toSdkPageInput({ data, nextCursor, meta }) {
|
|
4632
|
+
return {
|
|
4633
|
+
data,
|
|
4634
|
+
nextCursor,
|
|
4635
|
+
...meta?.id !== void 0 ? { meta: { id: meta.id } } : {}
|
|
4636
|
+
};
|
|
4637
|
+
}
|
|
4631
4638
|
function extractCursorFromUrl(url) {
|
|
4632
4639
|
try {
|
|
4633
4640
|
const params = new URL(url).searchParams;
|
|
@@ -5280,7 +5287,7 @@ var fetchPlugin = kitcore.defineMethod({
|
|
|
5280
5287
|
{
|
|
5281
5288
|
status: result.status,
|
|
5282
5289
|
code: relayErrorCode,
|
|
5283
|
-
title: "API
|
|
5290
|
+
title: "Proxy API Error",
|
|
5284
5291
|
detail: relayError
|
|
5285
5292
|
}
|
|
5286
5293
|
] : void 0
|
|
@@ -5298,7 +5305,7 @@ var fetchPlugin = kitcore.defineMethod({
|
|
|
5298
5305
|
}
|
|
5299
5306
|
}
|
|
5300
5307
|
});
|
|
5301
|
-
var RunActionDescription = "Execute an action with the given inputs";
|
|
5308
|
+
var RunActionDescription = "Execute an action with the given inputs and wait for its results. Each result page includes the action run ID in meta.id.";
|
|
5302
5309
|
var RunActionBaseSchema = zod.z.object({
|
|
5303
5310
|
connection: ConnectionPropertySchema.optional().describe(
|
|
5304
5311
|
"Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."
|
|
@@ -7317,6 +7324,7 @@ var runActionPlugin = kitcore.defineMethod({
|
|
|
7317
7324
|
}
|
|
7318
7325
|
return {
|
|
7319
7326
|
data: run.results ?? [],
|
|
7327
|
+
meta: { id: started.id },
|
|
7320
7328
|
// Coerce to a string: the API returns a numeric page index, but
|
|
7321
7329
|
// `SdkPage.nextCursor` is a string (and the page guard enforces it).
|
|
7322
7330
|
nextCursor: run.next_page != null ? String(run.next_page) : void 0
|
|
@@ -9512,7 +9520,7 @@ var listAuthenticationsPlugin = kitcore.defineMethod({
|
|
|
9512
9520
|
// would lose `.items()` / async iteration. Awaiting the delegate inside a
|
|
9513
9521
|
// list method's `run` yields one page; this method's own paginator restores
|
|
9514
9522
|
// the full paginated surface.
|
|
9515
|
-
output: "list",
|
|
9523
|
+
output: { type: "list", adaptPage: toSdkPageInput },
|
|
9516
9524
|
inputSchema: ListConnectionsQuerySchema,
|
|
9517
9525
|
packages: ["cli", "mcp"],
|
|
9518
9526
|
categories: ["connection"],
|
|
@@ -9593,7 +9601,11 @@ var listInputFieldsDeprecatedPlugin = kitcore.defineMethod({
|
|
|
9593
9601
|
// would lose `.items()` / async iteration. Awaiting the delegate inside a
|
|
9594
9602
|
// list method's `run` yields one page; this method's own paginator restores
|
|
9595
9603
|
// the full paginated surface.
|
|
9596
|
-
output: {
|
|
9604
|
+
output: {
|
|
9605
|
+
type: "list",
|
|
9606
|
+
adaptPage: toSdkPageInput,
|
|
9607
|
+
defaultPageSize: DEFAULT_PAGE_SIZE
|
|
9608
|
+
},
|
|
9597
9609
|
inputSchema: ListActionInputFieldsInputSchema,
|
|
9598
9610
|
categories: ["action"],
|
|
9599
9611
|
deprecation: { message: "Use listActionInputFields instead." },
|
|
@@ -9611,7 +9623,11 @@ var listInputFieldsDeprecatedPlugin = kitcore.defineMethod({
|
|
|
9611
9623
|
var listInputFieldChoicesDeprecatedPlugin = kitcore.defineMethod({
|
|
9612
9624
|
name: "listInputFieldChoices",
|
|
9613
9625
|
imports: [listActionInputFieldChoicesPlugin],
|
|
9614
|
-
output: {
|
|
9626
|
+
output: {
|
|
9627
|
+
type: "list",
|
|
9628
|
+
adaptPage: toSdkPageInput,
|
|
9629
|
+
defaultPageSize: DEFAULT_PAGE_SIZE
|
|
9630
|
+
},
|
|
9615
9631
|
inputSchema: ListActionInputFieldChoicesInputSchema,
|
|
9616
9632
|
categories: ["action"],
|
|
9617
9633
|
deprecation: { message: "Use listActionInputFieldChoices instead." },
|
|
@@ -11278,7 +11294,11 @@ var listTriggersPlugin = kitcore.defineMethod({
|
|
|
11278
11294
|
inputSchema: ListTriggersSchema,
|
|
11279
11295
|
outputSchema: ActionItemSchema,
|
|
11280
11296
|
skipOutputValidation: true,
|
|
11281
|
-
output: {
|
|
11297
|
+
output: {
|
|
11298
|
+
type: "list",
|
|
11299
|
+
adaptPage: toSdkPageInput,
|
|
11300
|
+
defaultPageSize: DEFAULT_PAGE_SIZE
|
|
11301
|
+
},
|
|
11282
11302
|
formatter: actionItemFormatter,
|
|
11283
11303
|
resolvers: { app: appKeyResolver },
|
|
11284
11304
|
run: async ({ imports, input }) => {
|
|
@@ -11312,7 +11332,11 @@ var listTriggerInputFieldsPlugin = kitcore.defineMethod({
|
|
|
11312
11332
|
inputSchema: ListTriggerInputFieldsSchema,
|
|
11313
11333
|
outputSchema: RootFieldItemSchema,
|
|
11314
11334
|
skipOutputValidation: true,
|
|
11315
|
-
output: {
|
|
11335
|
+
output: {
|
|
11336
|
+
type: "list",
|
|
11337
|
+
adaptPage: toSdkPageInput,
|
|
11338
|
+
defaultPageSize: DEFAULT_PAGE_SIZE
|
|
11339
|
+
},
|
|
11316
11340
|
formatter: rootFieldItemFormatter,
|
|
11317
11341
|
annotator: deriveReadOperation,
|
|
11318
11342
|
// actionKeyResolver and inputsAllOptionalResolver depend on actionType. Pin it
|
|
@@ -11360,7 +11384,11 @@ var listTriggerInputFieldChoicesPlugin = kitcore.defineMethod({
|
|
|
11360
11384
|
inputSchema: ListTriggerInputFieldChoicesSchema,
|
|
11361
11385
|
outputSchema: InputFieldChoiceItemSchema,
|
|
11362
11386
|
skipOutputValidation: true,
|
|
11363
|
-
output: {
|
|
11387
|
+
output: {
|
|
11388
|
+
type: "list",
|
|
11389
|
+
adaptPage: toSdkPageInput,
|
|
11390
|
+
defaultPageSize: DEFAULT_PAGE_SIZE
|
|
11391
|
+
},
|
|
11364
11392
|
formatter: inputFieldChoiceItemFormatter,
|
|
11365
11393
|
annotator: deriveReadOperation,
|
|
11366
11394
|
resolvers: {
|
|
@@ -11546,7 +11574,7 @@ var listTablesPlugin = kitcore.defineMethod({
|
|
|
11546
11574
|
inputSchema: ListTablesOptionsSchema,
|
|
11547
11575
|
outputSchema: TableItemSchema,
|
|
11548
11576
|
skipOutputValidation: true,
|
|
11549
|
-
output: "list",
|
|
11577
|
+
output: { type: "list", adaptPage: toSdkPageInput },
|
|
11550
11578
|
run: async ({ imports, input }) => {
|
|
11551
11579
|
return await imports.listTablesInternal({
|
|
11552
11580
|
...input,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkNWVMI6M7_cjs = require('./chunk-NWVMI6M7.cjs');
|
|
4
4
|
var kitcore = require('@zapier/kitcore');
|
|
5
5
|
|
|
6
6
|
var zapierBetaSdkPlugin = kitcore.definePlugin({
|
|
7
7
|
namespace: "zapier",
|
|
8
8
|
name: "beta-sdk",
|
|
9
|
-
exports: [
|
|
9
|
+
exports: [chunkNWVMI6M7_cjs.zapierSdkPlugin]
|
|
10
10
|
});
|
|
11
11
|
function createZapierSdk(options = {}) {
|
|
12
12
|
return kitcore.createSdk(zapierBetaSdkPlugin, {
|
|
13
13
|
configuration: {
|
|
14
|
-
[
|
|
15
|
-
[kitcore.CORE_OPTIONS_ID]:
|
|
14
|
+
[chunkNWVMI6M7_cjs.SDK_OPTIONS_ID]: options,
|
|
15
|
+
[kitcore.CORE_OPTIONS_ID]: chunkNWVMI6M7_cjs.zapierCoreOptions
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
}
|