@zapier/zapier-sdk 0.70.0 → 0.70.1
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 +6 -0
- package/README.md +11 -0
- package/dist/experimental.cjs +36 -17
- package/dist/experimental.d.mts +12 -12
- package/dist/experimental.d.ts +10 -10
- package/dist/experimental.mjs +36 -17
- package/dist/{index-C0bQ5snd.d.mts → index-DjLMJ3w8.d.mts} +3 -3
- package/dist/{index-C0bQ5snd.d.ts → index-DjLMJ3w8.d.ts} +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/plugins/codeSubstrate/cancelDurableRun/index.d.ts +1 -1
- package/dist/plugins/codeSubstrate/cancelDurableRun/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/cancelDurableRun/index.js +2 -1
- package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/createWorkflow/index.js +2 -1
- package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/deleteWorkflow/index.js +2 -1
- package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.d.ts +4 -0
- package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.js +7 -0
- package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/disableWorkflow/index.js +2 -1
- package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/enableWorkflow/index.js +2 -1
- package/dist/plugins/codeSubstrate/getDurableRun/index.d.ts +5 -5
- package/dist/plugins/codeSubstrate/getDurableRun/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/getDurableRun/index.js +2 -1
- package/dist/plugins/codeSubstrate/getDurableRun/schemas.d.ts +24 -24
- package/dist/plugins/codeSubstrate/getDurableRun/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/getDurableRun/schemas.js +4 -9
- package/dist/plugins/codeSubstrate/listDurableRuns/index.d.ts +1 -1
- package/dist/plugins/codeSubstrate/listDurableRuns/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/listDurableRuns/index.js +6 -2
- package/dist/plugins/codeSubstrate/listDurableRuns/schemas.d.ts +6 -6
- package/dist/plugins/codeSubstrate/listDurableRuns/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/listDurableRuns/schemas.js +2 -3
- package/dist/plugins/codeSubstrate/runDurable/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/runDurable/index.js +3 -2
- package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/updateWorkflow/index.js +2 -1
- package/package.json +1 -1
|
@@ -7529,7 +7529,7 @@ declare const listDurableRunsPlugin: (sdk: {
|
|
|
7529
7529
|
maxItems?: number;
|
|
7530
7530
|
}) | undefined) => PaginatedSdkResult<{
|
|
7531
7531
|
id: string;
|
|
7532
|
-
status:
|
|
7532
|
+
status: string;
|
|
7533
7533
|
input: unknown;
|
|
7534
7534
|
output: unknown;
|
|
7535
7535
|
error: {
|
|
@@ -7553,13 +7553,13 @@ type ListDurableRunsPluginProvides = ReturnType<typeof listDurableRunsPlugin>;
|
|
|
7553
7553
|
|
|
7554
7554
|
declare const RunItemSchema: z.ZodObject<{
|
|
7555
7555
|
id: z.ZodString;
|
|
7556
|
-
status: z.ZodEnum<{
|
|
7556
|
+
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
7557
7557
|
initialized: "initialized";
|
|
7558
7558
|
started: "started";
|
|
7559
7559
|
finished: "finished";
|
|
7560
7560
|
failed: "failed";
|
|
7561
7561
|
cancelled: "cancelled";
|
|
7562
|
-
}>;
|
|
7562
|
+
}>, z.ZodString]>;
|
|
7563
7563
|
input: z.ZodUnknown;
|
|
7564
7564
|
output: z.ZodNullable<z.ZodUnknown>;
|
|
7565
7565
|
error: z.ZodNullable<z.ZodObject<{
|
|
@@ -7529,7 +7529,7 @@ declare const listDurableRunsPlugin: (sdk: {
|
|
|
7529
7529
|
maxItems?: number;
|
|
7530
7530
|
}) | undefined) => PaginatedSdkResult<{
|
|
7531
7531
|
id: string;
|
|
7532
|
-
status:
|
|
7532
|
+
status: string;
|
|
7533
7533
|
input: unknown;
|
|
7534
7534
|
output: unknown;
|
|
7535
7535
|
error: {
|
|
@@ -7553,13 +7553,13 @@ type ListDurableRunsPluginProvides = ReturnType<typeof listDurableRunsPlugin>;
|
|
|
7553
7553
|
|
|
7554
7554
|
declare const RunItemSchema: z.ZodObject<{
|
|
7555
7555
|
id: z.ZodString;
|
|
7556
|
-
status: z.ZodEnum<{
|
|
7556
|
+
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
7557
7557
|
initialized: "initialized";
|
|
7558
7558
|
started: "started";
|
|
7559
7559
|
finished: "finished";
|
|
7560
7560
|
failed: "failed";
|
|
7561
7561
|
cancelled: "cancelled";
|
|
7562
|
-
}>;
|
|
7562
|
+
}>, z.ZodString]>;
|
|
7563
7563
|
input: z.ZodUnknown;
|
|
7564
7564
|
output: z.ZodNullable<z.ZodUnknown>;
|
|
7565
7565
|
error: z.ZodNullable<z.ZodObject<{
|
package/dist/index.cjs
CHANGED
|
@@ -6778,7 +6778,7 @@ function createSseParserStream() {
|
|
|
6778
6778
|
}
|
|
6779
6779
|
|
|
6780
6780
|
// src/sdk-version.ts
|
|
6781
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.
|
|
6781
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.1" : void 0) || "unknown";
|
|
6782
6782
|
|
|
6783
6783
|
// src/utils/open-url.ts
|
|
6784
6784
|
var nodePrefix = "node:";
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { x as Action, f as ActionEntry, cc as ActionExecutionOptions, I as ActionExecutionResult, J as ActionField, K as ActionFieldChoice, aQ as ActionItem, bq as ActionKeyProperty, a_ as ActionKeyPropertySchema, br as ActionProperty, a$ as ActionPropertySchema, aE as ActionResolverItem, bC as ActionTimeoutMsProperty, ba as ActionTimeoutMsPropertySchema, aF as ActionTypeItem, bp as ActionTypeProperty, aZ as ActionTypePropertySchema, d as AddActionEntryOptions, e as AddActionEntryResult, A as ApiClient, c8 as ApiError, dC as ApiEvent, cW as ApiPluginOptions, cY as ApiPluginProvides, y as App, cd as AppFactoryInput, aO as AppItem, bn as AppKeyProperty, aX as AppKeyPropertySchema, bo as AppProperty, aY as AppPropertySchema, eL as ApplicationLifecycleEventData, c4 as ApprovalStatus, cb as AppsPluginProvides, bH as AppsProperty, bf as AppsPropertySchema, a5 as ArrayResolver, dB as AuthEvent, bv as AuthenticationIdProperty, b2 as AuthenticationIdPropertySchema, eT as BaseEvent, as as BaseSdkOptionsSchema, ag as BatchOptions, cJ as CONTEXT_CACHE_MAX_SIZE, cI as CONTEXT_CACHE_TTL_MS, aw as CORE_ERROR_SYMBOL, H as Choice, dI as ClientCredentialsObject, dT as ClientCredentialsObjectSchema, V as Connection, d$ as ConnectionEntry, d_ as ConnectionEntrySchema, bt as ConnectionIdProperty, b1 as ConnectionIdPropertySchema, aP as ConnectionItem, bu as ConnectionProperty, b3 as ConnectionPropertySchema, e1 as ConnectionsMap, e0 as ConnectionsMapSchema, e3 as ConnectionsPluginProvides, bJ as ConnectionsProperty, bh as ConnectionsPropertySchema, X as ConnectionsResponse, ax as CoreErrorCode, cv as CreateClientCredentialsPluginProvides, et as CreateTableFieldsPluginProvides, en as CreateTablePluginProvides, eB as CreateTableRecordsPluginProvides, dF as Credentials, dY as CredentialsFunction, dX as CredentialsFunctionSchema, dH as CredentialsObject, dV as CredentialsObjectSchema, dZ as CredentialsSchema, e8 as DEFAULT_ACTION_TIMEOUT_MS, eg as DEFAULT_APPROVAL_TIMEOUT_MS, cS as DEFAULT_CONFIG_PATH, eh as DEFAULT_MAX_APPROVAL_RETRIES, e7 as DEFAULT_PAGE_SIZE, bA as DebugProperty, b8 as DebugPropertySchema, cx as DeleteClientCredentialsPluginProvides, ev as DeleteTableFieldsPluginProvides, ep as DeleteTablePluginProvides, eD as DeleteTableRecordsPluginProvides, s as DrainTriggerInboxCallback, t as DrainTriggerInboxErrorObserver, D as DrainTriggerInboxOptions, a8 as DynamicListResolver, l as DynamicResolver, a9 as DynamicSearchResolver, eM as EnhancedErrorEventData, bP as ErrorOptions, dE as EventCallback, eK as EventContext, eH as EventEmissionConfig, E as EventEmissionContext, eJ as EventEmissionProvides, cf as FetchPluginProvides, z as Field, bG as FieldsProperty, be as FieldsPropertySchema, aa as FieldsResolver, F as FieldsetItem, v as FindFirstAuthenticationPluginProvides, cF as FindFirstConnectionPluginProvides, w as FindUniqueAuthenticationPluginProvides, cH as FindUniqueConnectionPluginProvides, a3 as FormattedItem, ar as FunctionDeprecation, aq as FunctionRegistryEntry, cp as GetActionInputFieldsSchemaPluginProvides, cB as GetActionPluginProvides, cz as GetAppPluginProvides, G as GetAuthenticationPluginProvides, cD as GetConnectionPluginProvides, cV as GetProfilePluginProvides, el as GetTablePluginProvides, ex as GetTableRecordPluginProvides, aS as InfoFieldItem, aR as InputFieldItem, bs as InputFieldProperty, b0 as InputFieldPropertySchema, bw as InputsProperty, b4 as InputsPropertySchema, aN as JsonSseMessage, bO as LeaseLimitProperty, bm as LeaseLimitPropertySchema, bM as LeaseProperty, bk as LeasePropertySchema, bN as LeaseSecondsProperty, bl as LeaseSecondsPropertySchema, L as LeasedTriggerMessageItem, bx as LimitProperty, b5 as LimitPropertySchema, cn as ListActionInputFieldChoicesPluginProvides, cl as ListActionInputFieldsPluginProvides, cj as ListActionsPluginProvides, ch as ListAppsPluginProvides, u as ListAuthenticationsPluginProvides, ct as ListClientCredentialsPluginProvides, cr as ListConnectionsPluginProvides, er as ListTableFieldsPluginProvides, ez as ListTableRecordsPluginProvides, ej as ListTablesPluginProvides, dD as LoadingEvent, eb as MAX_CONCURRENCY_LIMIT, e6 as MAX_PAGE_LIMIT, b as Manifest, cT as ManifestEntry, cO as ManifestPluginOptions, cR as ManifestPluginProvides, eU as MethodCalledEvent, eN as MethodCalledEventData, N as Need, Q as NeedsRequest, S as NeedsResponse, by as OffsetProperty, b6 as OffsetPropertySchema, O as OutputFormatter, bz as OutputProperty, b7 as OutputPropertySchema, aW as PaginatedSdkFunction, i as PaginatedSdkResult, bB as ParamsProperty, b9 as ParamsPropertySchema, dJ as PkceCredentialsObject, dU as PkceCredentialsObjectSchema, ay as Plugin, a as PluginMeta, az as PluginProvides, aI as PollOptions, j as PositionalMetadata, c2 as RateLimitInfo, bE as RecordProperty, bc as RecordPropertySchema, bF as RecordsProperty, bd as RecordsPropertySchema, al as RelayFetchSchema, ak as RelayRequestSchema, aH as RequestOptions, cN as RequestPluginProvides, dn as ResolveAuthTokenOptions, dO as ResolveCredentialsOptions, R as ResolvedAppLocator, dG as ResolvedCredentials, dW as ResolvedCredentialsSchema, a4 as Resolver, a6 as ResolverMetadata, aT as RootFieldItem, cL as RunActionPluginProvides, dA as SdkEvent, aV as SdkPage, aM as SseMessage, a7 as StaticResolver, bD as TableProperty, bb as TablePropertySchema, bI as TablesProperty, bg as TablesPropertySchema, bL as TriggerInboxNameProperty, bj as TriggerInboxNamePropertySchema, bK as TriggerInboxProperty, bi as TriggerInboxPropertySchema, T as TriggerMessageStatus, U as UpdateManifestEntryOptions, c as UpdateManifestEntryResult, eF as UpdateTableRecordsPluginProvides, Y as UserProfile, aU as UserProfileItem, W as WatchTriggerInboxOptions, o as WithAddPlugin, e4 as ZAPIER_BASE_URL, ed as ZAPIER_MAX_CONCURRENT_REQUESTS, e9 as ZAPIER_MAX_NETWORK_RETRIES, ea as ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, p as ZapierAbortDrainSignal, c0 as ZapierActionError, bV as ZapierApiError, bW as ZapierAppNotFoundError, c5 as ZapierApprovalError, bT as ZapierAuthenticationError, b_ as ZapierBundleError, dw as ZapierCache, dx as ZapierCacheEntry, dy as ZapierCacheSetOptions, bZ as ZapierConfigurationError, c1 as ZapierConflictError, bQ as ZapierError, k as ZapierFetchInitOptions, bX as ZapierNotFoundError, c3 as ZapierRateLimitError, c6 as ZapierRelayError, q as ZapierReleaseTriggerMessageSignal, bY as ZapierResourceNotFoundError, f4 as ZapierSdk, n as ZapierSdkApps, Z as ZapierSdkOptions, c9 as ZapierSignal, b$ as ZapierTimeoutError, bS as ZapierUnknownError, bR as ZapierValidationError, c$ as actionKeyResolver, c_ as actionTypeResolver, a2 as addPlugin, cX as apiPlugin, cZ as appKeyResolver, ca as appsPlugin, d1 as authenticationIdGenericResolver, d0 as authenticationIdResolver, af as batch, eO as buildApplicationLifecycleEvent, ah as buildCapabilityMessage, eQ as buildErrorEvent, eP as buildErrorEventWithContext, eS as buildMethodCalledEvent, eG as cleanupEventListeners, dp as clearTokenCache, d5 as clientCredentialsNameResolver, d6 as clientIdResolver, aD as composePlugins, d1 as connectionIdGenericResolver, d0 as connectionIdResolver, e2 as connectionsPlugin, eR as createBaseEvent, cu as createClientCredentialsPlugin, a1 as createCorePlugin, $ as createFunction, dz as createMemoryCache, ao as createOptionsPlugin, aC as createPaginatedPluginMethod, aB as createPluginMethod, a0 as createPluginStack, an as createSdk, es as createTableFieldsPlugin, em as createTablePlugin, eA as createTableRecordsPlugin, aJ as createZapierApi, ap as createZapierCoreStack, f2 as createZapierSdk, f3 as createZapierSdkStack, am as createZapierSdkWithoutRegistry, aA as definePlugin, cw as deleteClientCredentialsPlugin, eu as deleteTableFieldsPlugin, eo as deleteTablePlugin, eC as deleteTableRecordsPlugin, da as durableRunIdResolver, eI as eventEmissionPlugin, ce as fetchPlugin, cE as findFirstConnectionPlugin, g as findManifestEntry, cG as findUniqueConnectionPlugin, c7 as formatErrorMessage, eV as generateEventId, co as getActionInputFieldsSchemaPlugin, cA as getActionPlugin, cy as getAppPlugin, dR as getBaseUrlFromCredentials, e$ as getCiPlatform, dS as getClientIdFromCredentials, cC as getConnectionPlugin, av as getCoreErrorCause, au as getCoreErrorCode, f1 as getCpuTime, eW as getCurrentTimestamp, f0 as getMemoryUsage, aK as getOrCreateApiClient, eY as getOsInfo, eZ as getPlatformVersions, cP as getPreferredManifestEntryKey, cU as getProfilePlugin, eX as getReleaseId, ek as getTablePlugin, ew as getTableRecordPlugin, dt as getTokenFromCliLogin, ee as getZapierApprovalMode, ef as getZapierDefaultApprovalMode, e5 as getZapierSdkService, dr as injectCliLogin, d4 as inputFieldKeyResolver, d3 as inputsAllOptionalResolver, d2 as inputsResolver, dq as invalidateCachedToken, dv as invalidateCredentialsToken, e_ as isCi, ds as isCliLoginAvailable, dK as isClientCredentials, at as isCoreError, dN as isCredentialsFunction, dM as isCredentialsObject, aL as isPermanentHttpError, dL as isPkceCredentials, _ as isPositional, cm as listActionInputFieldChoicesPlugin, ck as listActionInputFieldsPlugin, ci as listActionsPlugin, cg as listAppsPlugin, cs as listClientCredentialsPlugin, cq as listConnectionsPlugin, eq as listTableFieldsPlugin, ey as listTableRecordsPlugin, ei as listTablesPlugin, ai as logDeprecation, cQ as manifestPlugin, ec as parseConcurrencyEnvVar, r as readManifestFromFile, aG as registryPlugin, cM as requestPlugin, aj as resetDeprecationWarnings, du as resolveAuthToken, dQ as resolveCredentials, dP as resolveCredentialsFromEnv, cK as runActionPlugin, ab as runInMethodScope, ac as runWithTelemetryContext, dg as tableFieldIdsResolver, di as tableFieldsResolver, dl as tableFiltersResolver, d7 as tableIdResolver, dh as tableNameResolver, de as tableRecordIdResolver, df as tableRecordIdsResolver, dj as tableRecordsResolver, dm as tableSortResolver, dk as tableUpdateRecordsResolver, ad as toSnakeCase, ae as toTitleCase, d8 as triggerInboxResolver, dd as triggerMessagesResolver, eE as updateTableRecordsPlugin, d9 as workflowIdResolver, dc as workflowRunIdResolver, db as workflowVersionIdResolver, bU as zapierAdaptError } from './index-C0bQ5snd.mjs';
|
|
1
|
+
export { x as Action, f as ActionEntry, cc as ActionExecutionOptions, I as ActionExecutionResult, J as ActionField, K as ActionFieldChoice, aQ as ActionItem, bq as ActionKeyProperty, a_ as ActionKeyPropertySchema, br as ActionProperty, a$ as ActionPropertySchema, aE as ActionResolverItem, bC as ActionTimeoutMsProperty, ba as ActionTimeoutMsPropertySchema, aF as ActionTypeItem, bp as ActionTypeProperty, aZ as ActionTypePropertySchema, d as AddActionEntryOptions, e as AddActionEntryResult, A as ApiClient, c8 as ApiError, dC as ApiEvent, cW as ApiPluginOptions, cY as ApiPluginProvides, y as App, cd as AppFactoryInput, aO as AppItem, bn as AppKeyProperty, aX as AppKeyPropertySchema, bo as AppProperty, aY as AppPropertySchema, eL as ApplicationLifecycleEventData, c4 as ApprovalStatus, cb as AppsPluginProvides, bH as AppsProperty, bf as AppsPropertySchema, a5 as ArrayResolver, dB as AuthEvent, bv as AuthenticationIdProperty, b2 as AuthenticationIdPropertySchema, eT as BaseEvent, as as BaseSdkOptionsSchema, ag as BatchOptions, cJ as CONTEXT_CACHE_MAX_SIZE, cI as CONTEXT_CACHE_TTL_MS, aw as CORE_ERROR_SYMBOL, H as Choice, dI as ClientCredentialsObject, dT as ClientCredentialsObjectSchema, V as Connection, d$ as ConnectionEntry, d_ as ConnectionEntrySchema, bt as ConnectionIdProperty, b1 as ConnectionIdPropertySchema, aP as ConnectionItem, bu as ConnectionProperty, b3 as ConnectionPropertySchema, e1 as ConnectionsMap, e0 as ConnectionsMapSchema, e3 as ConnectionsPluginProvides, bJ as ConnectionsProperty, bh as ConnectionsPropertySchema, X as ConnectionsResponse, ax as CoreErrorCode, cv as CreateClientCredentialsPluginProvides, et as CreateTableFieldsPluginProvides, en as CreateTablePluginProvides, eB as CreateTableRecordsPluginProvides, dF as Credentials, dY as CredentialsFunction, dX as CredentialsFunctionSchema, dH as CredentialsObject, dV as CredentialsObjectSchema, dZ as CredentialsSchema, e8 as DEFAULT_ACTION_TIMEOUT_MS, eg as DEFAULT_APPROVAL_TIMEOUT_MS, cS as DEFAULT_CONFIG_PATH, eh as DEFAULT_MAX_APPROVAL_RETRIES, e7 as DEFAULT_PAGE_SIZE, bA as DebugProperty, b8 as DebugPropertySchema, cx as DeleteClientCredentialsPluginProvides, ev as DeleteTableFieldsPluginProvides, ep as DeleteTablePluginProvides, eD as DeleteTableRecordsPluginProvides, s as DrainTriggerInboxCallback, t as DrainTriggerInboxErrorObserver, D as DrainTriggerInboxOptions, a8 as DynamicListResolver, l as DynamicResolver, a9 as DynamicSearchResolver, eM as EnhancedErrorEventData, bP as ErrorOptions, dE as EventCallback, eK as EventContext, eH as EventEmissionConfig, E as EventEmissionContext, eJ as EventEmissionProvides, cf as FetchPluginProvides, z as Field, bG as FieldsProperty, be as FieldsPropertySchema, aa as FieldsResolver, F as FieldsetItem, v as FindFirstAuthenticationPluginProvides, cF as FindFirstConnectionPluginProvides, w as FindUniqueAuthenticationPluginProvides, cH as FindUniqueConnectionPluginProvides, a3 as FormattedItem, ar as FunctionDeprecation, aq as FunctionRegistryEntry, cp as GetActionInputFieldsSchemaPluginProvides, cB as GetActionPluginProvides, cz as GetAppPluginProvides, G as GetAuthenticationPluginProvides, cD as GetConnectionPluginProvides, cV as GetProfilePluginProvides, el as GetTablePluginProvides, ex as GetTableRecordPluginProvides, aS as InfoFieldItem, aR as InputFieldItem, bs as InputFieldProperty, b0 as InputFieldPropertySchema, bw as InputsProperty, b4 as InputsPropertySchema, aN as JsonSseMessage, bO as LeaseLimitProperty, bm as LeaseLimitPropertySchema, bM as LeaseProperty, bk as LeasePropertySchema, bN as LeaseSecondsProperty, bl as LeaseSecondsPropertySchema, L as LeasedTriggerMessageItem, bx as LimitProperty, b5 as LimitPropertySchema, cn as ListActionInputFieldChoicesPluginProvides, cl as ListActionInputFieldsPluginProvides, cj as ListActionsPluginProvides, ch as ListAppsPluginProvides, u as ListAuthenticationsPluginProvides, ct as ListClientCredentialsPluginProvides, cr as ListConnectionsPluginProvides, er as ListTableFieldsPluginProvides, ez as ListTableRecordsPluginProvides, ej as ListTablesPluginProvides, dD as LoadingEvent, eb as MAX_CONCURRENCY_LIMIT, e6 as MAX_PAGE_LIMIT, b as Manifest, cT as ManifestEntry, cO as ManifestPluginOptions, cR as ManifestPluginProvides, eU as MethodCalledEvent, eN as MethodCalledEventData, N as Need, Q as NeedsRequest, S as NeedsResponse, by as OffsetProperty, b6 as OffsetPropertySchema, O as OutputFormatter, bz as OutputProperty, b7 as OutputPropertySchema, aW as PaginatedSdkFunction, i as PaginatedSdkResult, bB as ParamsProperty, b9 as ParamsPropertySchema, dJ as PkceCredentialsObject, dU as PkceCredentialsObjectSchema, ay as Plugin, a as PluginMeta, az as PluginProvides, aI as PollOptions, j as PositionalMetadata, c2 as RateLimitInfo, bE as RecordProperty, bc as RecordPropertySchema, bF as RecordsProperty, bd as RecordsPropertySchema, al as RelayFetchSchema, ak as RelayRequestSchema, aH as RequestOptions, cN as RequestPluginProvides, dn as ResolveAuthTokenOptions, dO as ResolveCredentialsOptions, R as ResolvedAppLocator, dG as ResolvedCredentials, dW as ResolvedCredentialsSchema, a4 as Resolver, a6 as ResolverMetadata, aT as RootFieldItem, cL as RunActionPluginProvides, dA as SdkEvent, aV as SdkPage, aM as SseMessage, a7 as StaticResolver, bD as TableProperty, bb as TablePropertySchema, bI as TablesProperty, bg as TablesPropertySchema, bL as TriggerInboxNameProperty, bj as TriggerInboxNamePropertySchema, bK as TriggerInboxProperty, bi as TriggerInboxPropertySchema, T as TriggerMessageStatus, U as UpdateManifestEntryOptions, c as UpdateManifestEntryResult, eF as UpdateTableRecordsPluginProvides, Y as UserProfile, aU as UserProfileItem, W as WatchTriggerInboxOptions, o as WithAddPlugin, e4 as ZAPIER_BASE_URL, ed as ZAPIER_MAX_CONCURRENT_REQUESTS, e9 as ZAPIER_MAX_NETWORK_RETRIES, ea as ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, p as ZapierAbortDrainSignal, c0 as ZapierActionError, bV as ZapierApiError, bW as ZapierAppNotFoundError, c5 as ZapierApprovalError, bT as ZapierAuthenticationError, b_ as ZapierBundleError, dw as ZapierCache, dx as ZapierCacheEntry, dy as ZapierCacheSetOptions, bZ as ZapierConfigurationError, c1 as ZapierConflictError, bQ as ZapierError, k as ZapierFetchInitOptions, bX as ZapierNotFoundError, c3 as ZapierRateLimitError, c6 as ZapierRelayError, q as ZapierReleaseTriggerMessageSignal, bY as ZapierResourceNotFoundError, f4 as ZapierSdk, n as ZapierSdkApps, Z as ZapierSdkOptions, c9 as ZapierSignal, b$ as ZapierTimeoutError, bS as ZapierUnknownError, bR as ZapierValidationError, c$ as actionKeyResolver, c_ as actionTypeResolver, a2 as addPlugin, cX as apiPlugin, cZ as appKeyResolver, ca as appsPlugin, d1 as authenticationIdGenericResolver, d0 as authenticationIdResolver, af as batch, eO as buildApplicationLifecycleEvent, ah as buildCapabilityMessage, eQ as buildErrorEvent, eP as buildErrorEventWithContext, eS as buildMethodCalledEvent, eG as cleanupEventListeners, dp as clearTokenCache, d5 as clientCredentialsNameResolver, d6 as clientIdResolver, aD as composePlugins, d1 as connectionIdGenericResolver, d0 as connectionIdResolver, e2 as connectionsPlugin, eR as createBaseEvent, cu as createClientCredentialsPlugin, a1 as createCorePlugin, $ as createFunction, dz as createMemoryCache, ao as createOptionsPlugin, aC as createPaginatedPluginMethod, aB as createPluginMethod, a0 as createPluginStack, an as createSdk, es as createTableFieldsPlugin, em as createTablePlugin, eA as createTableRecordsPlugin, aJ as createZapierApi, ap as createZapierCoreStack, f2 as createZapierSdk, f3 as createZapierSdkStack, am as createZapierSdkWithoutRegistry, aA as definePlugin, cw as deleteClientCredentialsPlugin, eu as deleteTableFieldsPlugin, eo as deleteTablePlugin, eC as deleteTableRecordsPlugin, da as durableRunIdResolver, eI as eventEmissionPlugin, ce as fetchPlugin, cE as findFirstConnectionPlugin, g as findManifestEntry, cG as findUniqueConnectionPlugin, c7 as formatErrorMessage, eV as generateEventId, co as getActionInputFieldsSchemaPlugin, cA as getActionPlugin, cy as getAppPlugin, dR as getBaseUrlFromCredentials, e$ as getCiPlatform, dS as getClientIdFromCredentials, cC as getConnectionPlugin, av as getCoreErrorCause, au as getCoreErrorCode, f1 as getCpuTime, eW as getCurrentTimestamp, f0 as getMemoryUsage, aK as getOrCreateApiClient, eY as getOsInfo, eZ as getPlatformVersions, cP as getPreferredManifestEntryKey, cU as getProfilePlugin, eX as getReleaseId, ek as getTablePlugin, ew as getTableRecordPlugin, dt as getTokenFromCliLogin, ee as getZapierApprovalMode, ef as getZapierDefaultApprovalMode, e5 as getZapierSdkService, dr as injectCliLogin, d4 as inputFieldKeyResolver, d3 as inputsAllOptionalResolver, d2 as inputsResolver, dq as invalidateCachedToken, dv as invalidateCredentialsToken, e_ as isCi, ds as isCliLoginAvailable, dK as isClientCredentials, at as isCoreError, dN as isCredentialsFunction, dM as isCredentialsObject, aL as isPermanentHttpError, dL as isPkceCredentials, _ as isPositional, cm as listActionInputFieldChoicesPlugin, ck as listActionInputFieldsPlugin, ci as listActionsPlugin, cg as listAppsPlugin, cs as listClientCredentialsPlugin, cq as listConnectionsPlugin, eq as listTableFieldsPlugin, ey as listTableRecordsPlugin, ei as listTablesPlugin, ai as logDeprecation, cQ as manifestPlugin, ec as parseConcurrencyEnvVar, r as readManifestFromFile, aG as registryPlugin, cM as requestPlugin, aj as resetDeprecationWarnings, du as resolveAuthToken, dQ as resolveCredentials, dP as resolveCredentialsFromEnv, cK as runActionPlugin, ab as runInMethodScope, ac as runWithTelemetryContext, dg as tableFieldIdsResolver, di as tableFieldsResolver, dl as tableFiltersResolver, d7 as tableIdResolver, dh as tableNameResolver, de as tableRecordIdResolver, df as tableRecordIdsResolver, dj as tableRecordsResolver, dm as tableSortResolver, dk as tableUpdateRecordsResolver, ad as toSnakeCase, ae as toTitleCase, d8 as triggerInboxResolver, dd as triggerMessagesResolver, eE as updateTableRecordsPlugin, d9 as workflowIdResolver, dc as workflowRunIdResolver, db as workflowVersionIdResolver, bU as zapierAdaptError } from './index-DjLMJ3w8.mjs';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import 'zod/v4/core';
|
|
4
4
|
import '@zapier/zapier-sdk-core/v0/schemas/connections';
|
package/dist/index.mjs
CHANGED
|
@@ -6776,7 +6776,7 @@ function createSseParserStream() {
|
|
|
6776
6776
|
}
|
|
6777
6777
|
|
|
6778
6778
|
// src/sdk-version.ts
|
|
6779
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.
|
|
6779
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.1" : void 0) || "unknown";
|
|
6780
6780
|
|
|
6781
6781
|
// src/utils/open-url.ts
|
|
6782
6782
|
var nodePrefix = "node:";
|
|
@@ -27,7 +27,7 @@ export declare const cancelDurableRunPlugin: (sdk: {
|
|
|
27
27
|
maxItems?: number;
|
|
28
28
|
}) | undefined) => import("kitcore").PaginatedSdkResult<{
|
|
29
29
|
id: string;
|
|
30
|
-
status:
|
|
30
|
+
status: string;
|
|
31
31
|
input: unknown;
|
|
32
32
|
output: unknown;
|
|
33
33
|
error: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/cancelDurableRun/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/cancelDurableRun/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkClC,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,UAAU,CACrD,OAAO,sBAAsB,CAC9B,CAAC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { definePlugin, createPluginMethod } from "kitcore";
|
|
2
2
|
import { durableRunIdResolver } from "../../../resolvers/durableRunId";
|
|
3
3
|
import { codeSubstrateDefaults } from "../shared";
|
|
4
|
-
import { CancelDurableRunOptionsSchema } from "./schemas";
|
|
4
|
+
import { CancelDurableRunOptionsSchema, CancelDurableRunResponseSchema, } from "./schemas";
|
|
5
5
|
export const cancelDurableRunPlugin = definePlugin((sdk) => createPluginMethod(sdk, {
|
|
6
6
|
...codeSubstrateDefaults,
|
|
7
7
|
name: "cancelDurableRun",
|
|
8
8
|
type: "update",
|
|
9
9
|
itemType: "DurableRun",
|
|
10
10
|
inputSchema: CancelDurableRunOptionsSchema,
|
|
11
|
+
outputSchema: CancelDurableRunResponseSchema,
|
|
11
12
|
resolvers: { run: durableRunIdResolver },
|
|
12
13
|
handler: async ({ sdk, options }) => {
|
|
13
14
|
// Backend returns 204 on success. 404 (run missing) and 409 (run
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/createWorkflow/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/createWorkflow/index.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BhC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,oBAAoB,CAC5B,CAAC"}
|
|
@@ -16,7 +16,8 @@ export const createWorkflowPlugin = definePlugin((sdk) => createPluginMethod(sdk
|
|
|
16
16
|
if (options.is_private !== undefined) {
|
|
17
17
|
body.is_private = options.is_private;
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const raw = await sdk.context.api.post("/durableworkflowzaps/api/v0/workflows", body, { authRequired: true });
|
|
20
|
+
const data = CreateWorkflowResponseSchema.parse(raw);
|
|
20
21
|
return { data };
|
|
21
22
|
},
|
|
22
23
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/deleteWorkflow/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/deleteWorkflow/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkChC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,oBAAoB,CAC5B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { definePlugin, createPluginMethod } from "kitcore";
|
|
2
2
|
import { workflowIdResolver } from "../../../resolvers/workflowId";
|
|
3
3
|
import { codeSubstrateDefaults } from "../shared";
|
|
4
|
-
import { DeleteWorkflowOptionsSchema } from "./schemas";
|
|
4
|
+
import { DeleteWorkflowOptionsSchema, DeleteWorkflowResponseSchema, } from "./schemas";
|
|
5
5
|
export const deleteWorkflowPlugin = definePlugin((sdk) => createPluginMethod(sdk, {
|
|
6
6
|
...codeSubstrateDefaults,
|
|
7
7
|
name: "deleteWorkflow",
|
|
@@ -9,6 +9,7 @@ export const deleteWorkflowPlugin = definePlugin((sdk) => createPluginMethod(sdk
|
|
|
9
9
|
itemType: "Workflow",
|
|
10
10
|
confirm: "delete",
|
|
11
11
|
inputSchema: DeleteWorkflowOptionsSchema,
|
|
12
|
+
outputSchema: DeleteWorkflowResponseSchema,
|
|
12
13
|
resolvers: { workflow: workflowIdResolver },
|
|
13
14
|
handler: async ({ sdk, options }) => {
|
|
14
15
|
// Backend returns 204 on success. 404 (workflow missing) propagates
|
|
@@ -3,4 +3,8 @@ export declare const DeleteWorkflowOptionsSchema: z.ZodObject<{
|
|
|
3
3
|
workflow: z.ZodString;
|
|
4
4
|
}, z.core.$strip>;
|
|
5
5
|
export type DeleteWorkflowOptions = z.infer<typeof DeleteWorkflowOptionsSchema>;
|
|
6
|
+
export declare const DeleteWorkflowResponseSchema: z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export type DeleteWorkflowResponse = z.infer<typeof DeleteWorkflowResponseSchema>;
|
|
6
10
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/deleteWorkflow/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,2BAA2B;;iBAMrC,CAAC;AAEJ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/deleteWorkflow/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,2BAA2B;;iBAMrC,CAAC;AAEJ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAMhF,eAAO,MAAM,4BAA4B;;iBAEvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC"}
|
|
@@ -4,3 +4,10 @@ export const DeleteWorkflowOptionsSchema = z
|
|
|
4
4
|
workflow: z.string().uuid().describe("Durable workflow ID"),
|
|
5
5
|
})
|
|
6
6
|
.describe("Delete a durable workflow. Throws `ZapierNotFoundError` if the workflow doesn't exist; callers wanting idempotency should catch that themselves.");
|
|
7
|
+
// Synthesized client-side — the backend returns 204 with no body. We
|
|
8
|
+
// echo the targeted workflow id so callers don't lose the handle across
|
|
9
|
+
// the call. Wired as `outputSchema` so the framework can validate the
|
|
10
|
+
// handler's contract.
|
|
11
|
+
export const DeleteWorkflowResponseSchema = z.object({
|
|
12
|
+
id: z.string().describe("Workflow ID that was targeted for deletion"),
|
|
13
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/disableWorkflow/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/disableWorkflow/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BjC,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,UAAU,CACpD,OAAO,qBAAqB,CAC7B,CAAC"}
|
|
@@ -11,10 +11,11 @@ export const disableWorkflowPlugin = definePlugin((sdk) => createPluginMethod(sd
|
|
|
11
11
|
outputSchema: DisableWorkflowResponseSchema,
|
|
12
12
|
resolvers: { workflow: workflowIdResolver },
|
|
13
13
|
handler: async ({ sdk, options }) => {
|
|
14
|
-
const
|
|
14
|
+
const raw = await sdk.context.api.post(`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/disable`, undefined, {
|
|
15
15
|
authRequired: true,
|
|
16
16
|
resource: { type: "workflow", id: options.workflow },
|
|
17
17
|
});
|
|
18
|
+
const data = DisableWorkflowResponseSchema.parse(raw);
|
|
18
19
|
return { data };
|
|
19
20
|
},
|
|
20
21
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/enableWorkflow/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/enableWorkflow/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BhC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,oBAAoB,CAC5B,CAAC"}
|
|
@@ -11,10 +11,11 @@ export const enableWorkflowPlugin = definePlugin((sdk) => createPluginMethod(sdk
|
|
|
11
11
|
outputSchema: EnableWorkflowResponseSchema,
|
|
12
12
|
resolvers: { workflow: workflowIdResolver },
|
|
13
13
|
handler: async ({ sdk, options }) => {
|
|
14
|
-
const
|
|
14
|
+
const raw = await sdk.context.api.post(`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/enable`, undefined, {
|
|
15
15
|
authRequired: true,
|
|
16
16
|
resource: { type: "workflow", id: options.workflow },
|
|
17
17
|
});
|
|
18
|
+
const data = EnableWorkflowResponseSchema.parse(raw);
|
|
18
19
|
return { data };
|
|
19
20
|
},
|
|
20
21
|
}));
|
|
@@ -27,7 +27,7 @@ export declare const getDurableRunPlugin: (sdk: {
|
|
|
27
27
|
maxItems?: number;
|
|
28
28
|
}) | undefined) => import("kitcore").PaginatedSdkResult<{
|
|
29
29
|
id: string;
|
|
30
|
-
status:
|
|
30
|
+
status: string;
|
|
31
31
|
input: unknown;
|
|
32
32
|
output: unknown;
|
|
33
33
|
error: {
|
|
@@ -56,7 +56,7 @@ export declare const getDurableRunPlugin: (sdk: {
|
|
|
56
56
|
} | undefined) => Promise<{
|
|
57
57
|
data: {
|
|
58
58
|
id: string;
|
|
59
|
-
status:
|
|
59
|
+
status: string;
|
|
60
60
|
input: unknown;
|
|
61
61
|
output: unknown;
|
|
62
62
|
error: {
|
|
@@ -67,7 +67,7 @@ export declare const getDurableRunPlugin: (sdk: {
|
|
|
67
67
|
execution: {
|
|
68
68
|
id: string;
|
|
69
69
|
name: string;
|
|
70
|
-
status:
|
|
70
|
+
status: string;
|
|
71
71
|
input: unknown;
|
|
72
72
|
created_at: string;
|
|
73
73
|
output?: unknown;
|
|
@@ -87,8 +87,8 @@ export declare const getDurableRunPlugin: (sdk: {
|
|
|
87
87
|
id: string;
|
|
88
88
|
execution_id: string;
|
|
89
89
|
name: string;
|
|
90
|
-
type:
|
|
91
|
-
status:
|
|
90
|
+
type: string;
|
|
91
|
+
status: string;
|
|
92
92
|
retry_count: number;
|
|
93
93
|
created_at: string;
|
|
94
94
|
result?: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/getDurableRun/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/getDurableRun/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B/B,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAClD,OAAO,mBAAmB,CAC3B,CAAC"}
|
|
@@ -11,10 +11,11 @@ export const getDurableRunPlugin = definePlugin((sdk) => createPluginMethod(sdk,
|
|
|
11
11
|
outputSchema: GetDurableRunResponseSchema,
|
|
12
12
|
resolvers: { run: durableRunIdResolver },
|
|
13
13
|
handler: async ({ sdk, options }) => {
|
|
14
|
-
const
|
|
14
|
+
const raw = await sdk.context.api.get(`/sdkdurableapi/api/v0/runs/${encodeURIComponent(options.run)}`, {
|
|
15
15
|
authRequired: true,
|
|
16
16
|
resource: { type: "run", id: options.run },
|
|
17
17
|
});
|
|
18
|
+
const data = GetDurableRunResponseSchema.parse(raw);
|
|
18
19
|
return { data };
|
|
19
20
|
},
|
|
20
21
|
}));
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const OperationTypeSchema: z.ZodEnum<{
|
|
2
|
+
export declare const OperationTypeSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
3
3
|
step: "step";
|
|
4
4
|
wait: "wait";
|
|
5
5
|
callback: "callback";
|
|
6
|
-
}>;
|
|
6
|
+
}>, z.ZodString]>;
|
|
7
7
|
export type OperationType = z.infer<typeof OperationTypeSchema>;
|
|
8
|
-
export declare const OperationStatusSchema: z.ZodEnum<{
|
|
8
|
+
export declare const OperationStatusSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
9
9
|
pending: "pending";
|
|
10
10
|
failed: "failed";
|
|
11
11
|
exhausted: "exhausted";
|
|
12
12
|
completed: "completed";
|
|
13
|
-
}>;
|
|
13
|
+
}>, z.ZodString]>;
|
|
14
14
|
export type OperationStatus = z.infer<typeof OperationStatusSchema>;
|
|
15
15
|
export declare const OperationSchema: z.ZodObject<{
|
|
16
16
|
id: z.ZodString;
|
|
17
17
|
execution_id: z.ZodString;
|
|
18
18
|
name: z.ZodString;
|
|
19
|
-
type: z.ZodEnum<{
|
|
19
|
+
type: z.ZodUnion<readonly [z.ZodEnum<{
|
|
20
20
|
step: "step";
|
|
21
21
|
wait: "wait";
|
|
22
22
|
callback: "callback";
|
|
23
|
-
}>;
|
|
24
|
-
status: z.ZodEnum<{
|
|
23
|
+
}>, z.ZodString]>;
|
|
24
|
+
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
25
25
|
pending: "pending";
|
|
26
26
|
failed: "failed";
|
|
27
27
|
exhausted: "exhausted";
|
|
28
28
|
completed: "completed";
|
|
29
|
-
}>;
|
|
29
|
+
}>, z.ZodString]>;
|
|
30
30
|
result: z.ZodOptional<z.ZodUnknown>;
|
|
31
31
|
error: z.ZodOptional<z.ZodUnknown>;
|
|
32
32
|
retry_count: z.ZodNumber;
|
|
@@ -41,22 +41,22 @@ export declare const OperationSchema: z.ZodObject<{
|
|
|
41
41
|
created_at: z.ZodString;
|
|
42
42
|
}, z.core.$strip>;
|
|
43
43
|
export type Operation = z.infer<typeof OperationSchema>;
|
|
44
|
-
export declare const ExecutionStatusSchema: z.ZodEnum<{
|
|
44
|
+
export declare const ExecutionStatusSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
45
45
|
failed: "failed";
|
|
46
46
|
waiting: "waiting";
|
|
47
47
|
completed: "completed";
|
|
48
48
|
running: "running";
|
|
49
|
-
}>;
|
|
49
|
+
}>, z.ZodString]>;
|
|
50
50
|
export type ExecutionStatus = z.infer<typeof ExecutionStatusSchema>;
|
|
51
51
|
export declare const ExecutionSummarySchema: z.ZodObject<{
|
|
52
52
|
id: z.ZodString;
|
|
53
53
|
name: z.ZodString;
|
|
54
|
-
status: z.ZodEnum<{
|
|
54
|
+
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
55
55
|
failed: "failed";
|
|
56
56
|
waiting: "waiting";
|
|
57
57
|
completed: "completed";
|
|
58
58
|
running: "running";
|
|
59
|
-
}>;
|
|
59
|
+
}>, z.ZodString]>;
|
|
60
60
|
input: z.ZodUnknown;
|
|
61
61
|
output: z.ZodOptional<z.ZodUnknown>;
|
|
62
62
|
error: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -74,17 +74,17 @@ export declare const ExecutionSummarySchema: z.ZodObject<{
|
|
|
74
74
|
id: z.ZodString;
|
|
75
75
|
execution_id: z.ZodString;
|
|
76
76
|
name: z.ZodString;
|
|
77
|
-
type: z.ZodEnum<{
|
|
77
|
+
type: z.ZodUnion<readonly [z.ZodEnum<{
|
|
78
78
|
step: "step";
|
|
79
79
|
wait: "wait";
|
|
80
80
|
callback: "callback";
|
|
81
|
-
}>;
|
|
82
|
-
status: z.ZodEnum<{
|
|
81
|
+
}>, z.ZodString]>;
|
|
82
|
+
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
83
83
|
pending: "pending";
|
|
84
84
|
failed: "failed";
|
|
85
85
|
exhausted: "exhausted";
|
|
86
86
|
completed: "completed";
|
|
87
|
-
}>;
|
|
87
|
+
}>, z.ZodString]>;
|
|
88
88
|
result: z.ZodOptional<z.ZodUnknown>;
|
|
89
89
|
error: z.ZodOptional<z.ZodUnknown>;
|
|
90
90
|
retry_count: z.ZodNumber;
|
|
@@ -106,13 +106,13 @@ export declare const GetDurableRunOptionsSchema: z.ZodObject<{
|
|
|
106
106
|
export type GetDurableRunOptions = z.infer<typeof GetDurableRunOptionsSchema>;
|
|
107
107
|
export declare const GetDurableRunResponseSchema: z.ZodObject<{
|
|
108
108
|
id: z.ZodString;
|
|
109
|
-
status: z.ZodEnum<{
|
|
109
|
+
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
110
110
|
initialized: "initialized";
|
|
111
111
|
started: "started";
|
|
112
112
|
finished: "finished";
|
|
113
113
|
failed: "failed";
|
|
114
114
|
cancelled: "cancelled";
|
|
115
|
-
}>;
|
|
115
|
+
}>, z.ZodString]>;
|
|
116
116
|
input: z.ZodUnknown;
|
|
117
117
|
output: z.ZodNullable<z.ZodUnknown>;
|
|
118
118
|
error: z.ZodNullable<z.ZodObject<{
|
|
@@ -122,12 +122,12 @@ export declare const GetDurableRunResponseSchema: z.ZodObject<{
|
|
|
122
122
|
execution: z.ZodNullable<z.ZodObject<{
|
|
123
123
|
id: z.ZodString;
|
|
124
124
|
name: z.ZodString;
|
|
125
|
-
status: z.ZodEnum<{
|
|
125
|
+
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
126
126
|
failed: "failed";
|
|
127
127
|
waiting: "waiting";
|
|
128
128
|
completed: "completed";
|
|
129
129
|
running: "running";
|
|
130
|
-
}>;
|
|
130
|
+
}>, z.ZodString]>;
|
|
131
131
|
input: z.ZodUnknown;
|
|
132
132
|
output: z.ZodOptional<z.ZodUnknown>;
|
|
133
133
|
error: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -145,17 +145,17 @@ export declare const GetDurableRunResponseSchema: z.ZodObject<{
|
|
|
145
145
|
id: z.ZodString;
|
|
146
146
|
execution_id: z.ZodString;
|
|
147
147
|
name: z.ZodString;
|
|
148
|
-
type: z.ZodEnum<{
|
|
148
|
+
type: z.ZodUnion<readonly [z.ZodEnum<{
|
|
149
149
|
step: "step";
|
|
150
150
|
wait: "wait";
|
|
151
151
|
callback: "callback";
|
|
152
|
-
}>;
|
|
153
|
-
status: z.ZodEnum<{
|
|
152
|
+
}>, z.ZodString]>;
|
|
153
|
+
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
154
154
|
pending: "pending";
|
|
155
155
|
failed: "failed";
|
|
156
156
|
exhausted: "exhausted";
|
|
157
157
|
completed: "completed";
|
|
158
|
-
}>;
|
|
158
|
+
}>, z.ZodString]>;
|
|
159
159
|
result: z.ZodOptional<z.ZodUnknown>;
|
|
160
160
|
error: z.ZodOptional<z.ZodUnknown>;
|
|
161
161
|
retry_count: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/getDurableRun/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/getDurableRun/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,mBAAmB;;;;iBAG/B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,qBAAqB;;;;;iBAGjC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyD1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,qBAAqB;;;;;iBAGjC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqDjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,0BAA0B;;iBAMpC,CAAC;AAEJ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqBtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { RunErrorSchema, RunStatusSchema } from "../listDurableRuns/schemas";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export const OperationStatusSchema = z
|
|
7
|
-
.enum(["pending", "completed", "failed", "exhausted"])
|
|
8
|
-
.describe("Operation lifecycle status. `exhausted` means retries were exceeded.");
|
|
3
|
+
import { openEnum } from "kitcore";
|
|
4
|
+
export const OperationTypeSchema = openEnum(["step", "wait", "callback"], "Operation kind: `step` is a journaled function call; `wait` is a time-based suspension; `callback` is a wait on an external callback.");
|
|
5
|
+
export const OperationStatusSchema = openEnum(["pending", "completed", "failed", "exhausted"], "Operation lifecycle status. `exhausted` means retries were exceeded.");
|
|
9
6
|
export const OperationSchema = z.object({
|
|
10
7
|
id: z.string().describe("Operation ID (UUID)"),
|
|
11
8
|
execution_id: z.string().describe("Parent execution ID"),
|
|
@@ -58,9 +55,7 @@ export const OperationSchema = z.object({
|
|
|
58
55
|
.describe("When the operation reached a terminal state (ISO-8601)"),
|
|
59
56
|
created_at: z.string().describe("When the operation was created (ISO-8601)"),
|
|
60
57
|
});
|
|
61
|
-
export const ExecutionStatusSchema =
|
|
62
|
-
.enum(["running", "waiting", "completed", "failed"])
|
|
63
|
-
.describe("Execution lifecycle status. `waiting` means blocked on a wait or callback operation.");
|
|
58
|
+
export const ExecutionStatusSchema = openEnum(["running", "waiting", "completed", "failed"], "Execution lifecycle status. `waiting` means blocked on a wait or callback operation.");
|
|
64
59
|
export const ExecutionSummarySchema = z.object({
|
|
65
60
|
id: z.string().describe("Execution ID (UUID)"),
|
|
66
61
|
name: z.string().describe("Durable function name"),
|
|
@@ -31,7 +31,7 @@ export declare const listDurableRunsPlugin: (sdk: {
|
|
|
31
31
|
maxItems?: number;
|
|
32
32
|
}) | undefined) => import("kitcore").PaginatedSdkResult<{
|
|
33
33
|
id: string;
|
|
34
|
-
status:
|
|
34
|
+
status: string;
|
|
35
35
|
input: unknown;
|
|
36
36
|
output: unknown;
|
|
37
37
|
error: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/listDurableRuns/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/listDurableRuns/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BjC,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,UAAU,CACpD,OAAO,qBAAqB,CAC7B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { definePlugin, createPaginatedPluginMethod } from "kitcore";
|
|
2
2
|
import { DEFAULT_PAGE_SIZE } from "../../../constants";
|
|
3
3
|
import { codeSubstrateDefaults } from "../shared";
|
|
4
|
-
import { ListDurableRunsOptionsSchema, RunItemSchema, } from "./schemas";
|
|
4
|
+
import { ListDurableRunsApiResponseSchema, ListDurableRunsOptionsSchema, RunItemSchema, } from "./schemas";
|
|
5
5
|
export const listDurableRunsPlugin = definePlugin((sdk) => createPaginatedPluginMethod(sdk, {
|
|
6
6
|
...codeSubstrateDefaults,
|
|
7
7
|
name: "listDurableRuns",
|
|
@@ -18,7 +18,11 @@ export const listDurableRunsPlugin = definePlugin((sdk) => createPaginatedPlugin
|
|
|
18
18
|
if (options.cursor) {
|
|
19
19
|
searchParams.cursor = options.cursor;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const raw = await sdk.context.api.get("/sdkdurableapi/api/v0/runs", {
|
|
22
|
+
searchParams,
|
|
23
|
+
authRequired: true,
|
|
24
|
+
});
|
|
25
|
+
const response = ListDurableRunsApiResponseSchema.parse(raw);
|
|
22
26
|
return {
|
|
23
27
|
data: response.results,
|
|
24
28
|
nextCursor: response.meta.next_cursor ?? undefined,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const RunStatusSchema: z.ZodEnum<{
|
|
2
|
+
export declare const RunStatusSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
3
3
|
initialized: "initialized";
|
|
4
4
|
started: "started";
|
|
5
5
|
finished: "finished";
|
|
6
6
|
failed: "failed";
|
|
7
7
|
cancelled: "cancelled";
|
|
8
|
-
}>;
|
|
8
|
+
}>, z.ZodString]>;
|
|
9
9
|
export type RunStatus = z.infer<typeof RunStatusSchema>;
|
|
10
10
|
export declare const RunErrorSchema: z.ZodObject<{
|
|
11
11
|
code: z.ZodString;
|
|
@@ -14,13 +14,13 @@ export declare const RunErrorSchema: z.ZodObject<{
|
|
|
14
14
|
export type RunError = z.infer<typeof RunErrorSchema>;
|
|
15
15
|
export declare const RunItemSchema: z.ZodObject<{
|
|
16
16
|
id: z.ZodString;
|
|
17
|
-
status: z.ZodEnum<{
|
|
17
|
+
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
18
18
|
initialized: "initialized";
|
|
19
19
|
started: "started";
|
|
20
20
|
finished: "finished";
|
|
21
21
|
failed: "failed";
|
|
22
22
|
cancelled: "cancelled";
|
|
23
|
-
}>;
|
|
23
|
+
}>, z.ZodString]>;
|
|
24
24
|
input: z.ZodUnknown;
|
|
25
25
|
output: z.ZodNullable<z.ZodUnknown>;
|
|
26
26
|
error: z.ZodNullable<z.ZodObject<{
|
|
@@ -42,13 +42,13 @@ export type ListDurableRunsOptions = z.infer<typeof ListDurableRunsOptionsSchema
|
|
|
42
42
|
export declare const ListDurableRunsApiResponseSchema: z.ZodObject<{
|
|
43
43
|
results: z.ZodArray<z.ZodObject<{
|
|
44
44
|
id: z.ZodString;
|
|
45
|
-
status: z.ZodEnum<{
|
|
45
|
+
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
46
46
|
initialized: "initialized";
|
|
47
47
|
started: "started";
|
|
48
48
|
finished: "finished";
|
|
49
49
|
failed: "failed";
|
|
50
50
|
cancelled: "cancelled";
|
|
51
|
-
}>;
|
|
51
|
+
}>, z.ZodString]>;
|
|
52
52
|
input: z.ZodUnknown;
|
|
53
53
|
output: z.ZodNullable<z.ZodUnknown>;
|
|
54
54
|
error: z.ZodNullable<z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/listDurableRuns/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/listDurableRuns/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,eAAe;;;;;;iBAG3B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,cAAc;;;iBAQxB,CAAC;AAEJ,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;iBAwBxB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,eAAO,MAAM,4BAA4B;;;;iBAiBtC,CAAC;AAEJ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAY3C,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
.describe("Run lifecycle status. `finished` / `failed` / `cancelled` are terminal.");
|
|
2
|
+
import { openEnum } from "kitcore";
|
|
3
|
+
export const RunStatusSchema = openEnum(["initialized", "started", "finished", "failed", "cancelled"], "Run lifecycle status. `finished` / `failed` / `cancelled` are terminal.");
|
|
5
4
|
export const RunErrorSchema = z
|
|
6
5
|
.object({
|
|
7
6
|
code: z.string().describe("Machine-readable error category"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/runDurable/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/runDurable/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyC5B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|