@zapier/zapier-sdk 0.59.0 → 0.61.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 +24 -0
- package/README.md +239 -1
- package/dist/experimental.cjs +329 -10
- package/dist/experimental.d.mts +142 -2
- package/dist/experimental.d.ts +140 -0
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +15 -0
- package/dist/experimental.mjs +329 -11
- package/dist/{index-eliz1Uq3.d.mts → index-iKbnOz6r.d.mts} +15 -1
- package/dist/{index-eliz1Uq3.d.ts → index-iKbnOz6r.d.ts} +15 -1
- package/dist/index.cjs +23 -9
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +23 -10
- package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts +45 -0
- package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/createWorkflow/index.js +19 -0
- package/dist/plugins/codeSubstrate/createWorkflow/schemas.d.ts +16 -0
- package/dist/plugins/codeSubstrate/createWorkflow/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/createWorkflow/schemas.js +25 -0
- package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts +39 -0
- package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/deleteWorkflow/index.js +27 -0
- package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.d.ts +6 -0
- package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.js +6 -0
- package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts +40 -0
- package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/disableWorkflow/index.js +20 -0
- package/dist/plugins/codeSubstrate/disableWorkflow/schemas.d.ts +11 -0
- package/dist/plugins/codeSubstrate/disableWorkflow/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/disableWorkflow/schemas.js +12 -0
- package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts +40 -0
- package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/enableWorkflow/index.js +20 -0
- package/dist/plugins/codeSubstrate/enableWorkflow/schemas.d.ts +11 -0
- package/dist/plugins/codeSubstrate/enableWorkflow/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/enableWorkflow/schemas.js +12 -0
- package/dist/plugins/codeSubstrate/getWorkflow/index.d.ts +54 -0
- package/dist/plugins/codeSubstrate/getWorkflow/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/getWorkflow/index.js +21 -0
- package/dist/plugins/codeSubstrate/getWorkflow/schemas.d.ts +35 -0
- package/dist/plugins/codeSubstrate/getWorkflow/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/getWorkflow/schemas.js +45 -0
- package/dist/plugins/codeSubstrate/listWorkflows/index.d.ts +50 -0
- package/dist/plugins/codeSubstrate/listWorkflows/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/listWorkflows/index.js +29 -0
- package/dist/plugins/codeSubstrate/listWorkflows/schemas.d.ts +40 -0
- package/dist/plugins/codeSubstrate/listWorkflows/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/listWorkflows/schemas.js +54 -0
- package/dist/plugins/codeSubstrate/shared.d.ts +16 -0
- package/dist/plugins/codeSubstrate/shared.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/shared.js +15 -0
- package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts +47 -0
- package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/updateWorkflow/index.js +27 -0
- package/dist/plugins/codeSubstrate/updateWorkflow/schemas.d.ts +18 -0
- package/dist/plugins/codeSubstrate/updateWorkflow/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/updateWorkflow/schemas.js +30 -0
- package/dist/plugins/deleteClientCredentials/index.d.ts.map +1 -1
- package/dist/plugins/deleteClientCredentials/index.js +1 -4
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +4 -0
- package/dist/resolvers/clientId.d.ts.map +1 -1
- package/dist/resolvers/clientId.js +2 -4
- package/dist/resolvers/index.d.ts +1 -0
- package/dist/resolvers/index.d.ts.map +1 -1
- package/dist/resolvers/index.js +1 -0
- package/dist/resolvers/workflowId.d.ts +4 -0
- package/dist/resolvers/workflowId.d.ts.map +1 -0
- package/dist/resolvers/workflowId.js +14 -0
- package/package.json +1 -1
|
@@ -8582,6 +8582,20 @@ type TriggerInboxItem = z.infer<typeof TriggerInboxItemSchema>;
|
|
|
8582
8582
|
|
|
8583
8583
|
declare const triggerInboxResolver: DynamicResolver<TriggerInboxItem, {}>;
|
|
8584
8584
|
|
|
8585
|
+
declare const WorkflowItemSchema: z.ZodObject<{
|
|
8586
|
+
id: z.ZodString;
|
|
8587
|
+
name: z.ZodString;
|
|
8588
|
+
description: z.ZodNullable<z.ZodString>;
|
|
8589
|
+
trigger_url: z.ZodString;
|
|
8590
|
+
enabled: z.ZodBoolean;
|
|
8591
|
+
current_version_id: z.ZodNullable<z.ZodString>;
|
|
8592
|
+
created_at: z.ZodString;
|
|
8593
|
+
updated_at: z.ZodString;
|
|
8594
|
+
}, z.core.$strip>;
|
|
8595
|
+
type WorkflowItem = z.infer<typeof WorkflowItemSchema>;
|
|
8596
|
+
|
|
8597
|
+
declare const workflowIdResolver: DynamicResolver<WorkflowItem, {}>;
|
|
8598
|
+
|
|
8585
8599
|
declare const triggerMessagesResolver: DynamicResolver<TriggerMessageItem, {
|
|
8586
8600
|
inbox: string;
|
|
8587
8601
|
}>;
|
|
@@ -9815,4 +9829,4 @@ declare const registryPlugin: (sdk: {
|
|
|
9815
9829
|
};
|
|
9816
9830
|
}) => {};
|
|
9817
9831
|
|
|
9818
|
-
export { type Resolver as $, type ApiClient as A, type BaseSdkOptions as B, type CapabilitiesContext as C, type DrainTriggerInboxOptions as D, type EventEmissionContext as E, type FieldsetItem as F, type GetAuthenticationPluginProvides as G, type ActionFieldChoice as H, type NeedsRequest as I, type NeedsResponse as J, type Connection as K, type LeasedTriggerMessageItem as L, type Manifest as M, type Need as N, type ConnectionsResponse as O, type PluginMeta as P, type UserProfile as Q, type ResolvedAppLocator as R, isPositional as S, type TriggerMessageStatus as T, type UpdateManifestEntryOptions as U, createFunction as V, type WithAddPlugin as W, type FormattedItem as X, type FormatMetadata as Y, type ZapierSdkOptions as Z, type OutputFormatter as _, type UpdateManifestEntryResult as a, RecordsPropertySchema as a$, type ArrayResolver as a0, type ResolverMetadata as a1, type StaticResolver as a2, type DynamicListResolver as a3, type DynamicSearchResolver as a4, type FieldsResolver as a5, runWithTelemetryContext as a6, toSnakeCase as a7, toTitleCase as a8, batch as a9, type ConnectionItem as aA, type ActionItem$1 as aB, type InputFieldItem as aC, type InfoFieldItem as aD, type RootFieldItem as aE, type UserProfileItem as aF, type FunctionOptions as aG, type SdkPage as aH, type PaginatedSdkFunction as aI, AppKeyPropertySchema as aJ, AppPropertySchema as aK, ActionTypePropertySchema as aL, ActionKeyPropertySchema as aM, ActionPropertySchema as aN, InputFieldPropertySchema as aO, ConnectionIdPropertySchema as aP, AuthenticationIdPropertySchema as aQ, ConnectionPropertySchema as aR, InputsPropertySchema as aS, LimitPropertySchema as aT, OffsetPropertySchema as aU, OutputPropertySchema as aV, DebugPropertySchema as aW, ParamsPropertySchema as aX, ActionTimeoutMsPropertySchema as aY, TablePropertySchema as aZ, RecordPropertySchema as a_, type BatchOptions as aa, buildCapabilityMessage as ab, logDeprecation as ac, resetDeprecationWarnings as ad, RelayRequestSchema as ae, RelayFetchSchema as af, createZapierSdkWithoutRegistry as ag, createSdk as ah, createOptionsPlugin as ai, type FunctionRegistryEntry as aj, type FunctionDeprecation as ak, BaseSdkOptionsSchema as al, type Plugin as am, type PluginProvides as an, definePlugin as ao, createPluginMethod as ap, createPaginatedPluginMethod as aq, composePlugins as ar, type ActionItem as as, type ActionTypeItem as at, registryPlugin as au, type RequestOptions as av, type PollOptions as aw, createZapierApi as ax, getOrCreateApiClient as ay, type AppItem as az, type AddActionEntryOptions as b, fetchPlugin as b$, FieldsPropertySchema as b0, AppsPropertySchema as b1, TablesPropertySchema as b2, ConnectionsPropertySchema as b3, TriggerInboxPropertySchema as b4, TriggerInboxNamePropertySchema as b5, LeasePropertySchema as b6, LeaseSecondsPropertySchema as b7, LeaseLimitPropertySchema as b8, type AppKeyProperty as b9, type LeaseLimitProperty as bA, type ApiError as bB, type ErrorOptions as bC, ZapierError as bD, ZapierApiError as bE, ZapierAppNotFoundError as bF, ZapierValidationError as bG, ZapierUnknownError as bH, ZapierAuthenticationError as bI, ZapierNotFoundError as bJ, ZapierResourceNotFoundError as bK, ZapierConfigurationError as bL, ZapierBundleError as bM, ZapierTimeoutError as bN, ZapierActionError as bO, ZapierConflictError as bP, type RateLimitInfo as bQ, ZapierRateLimitError as bR, type ApprovalStatus as bS, ZapierApprovalError as bT, ZapierRelayError as bU, formatErrorMessage as bV, ZapierSignal as bW, appsPlugin as bX, type AppsPluginProvides as bY, type ActionExecutionOptions as bZ, type AppFactoryInput as b_, type AppProperty as ba, type ActionTypeProperty as bb, type ActionKeyProperty as bc, type ActionProperty as bd, type InputFieldProperty as be, type ConnectionIdProperty as bf, type ConnectionProperty as bg, type AuthenticationIdProperty as bh, type InputsProperty as bi, type LimitProperty as bj, type OffsetProperty as bk, type OutputProperty as bl, type DebugProperty as bm, type ParamsProperty as bn, type ActionTimeoutMsProperty as bo, type TableProperty as bp, type RecordProperty as bq, type RecordsProperty as br, type FieldsProperty as bs, type AppsProperty as bt, type TablesProperty as bu, type ConnectionsProperty as bv, type TriggerInboxProperty as bw, type TriggerInboxNameProperty as bx, type LeaseProperty as by, type LeaseSecondsProperty as bz, type AddActionEntryResult as c, tableFieldsResolver as c$, type FetchPluginProvides as c0, listAppsPlugin as c1, type ListAppsPluginProvides as c2, listActionsPlugin as c3, type ListActionsPluginProvides as c4, listActionInputFieldsPlugin as c5, type ListActionInputFieldsPluginProvides as c6, listActionInputFieldChoicesPlugin as c7, type ListActionInputFieldChoicesPluginProvides as c8, getActionInputFieldsSchemaPlugin as c9, getPreferredManifestEntryKey as cA, manifestPlugin as cB, type ManifestPluginProvides as cC, DEFAULT_CONFIG_PATH as cD, type ManifestEntry as cE, getProfilePlugin as cF, type GetProfilePluginProvides as cG, type ApiPluginOptions as cH, apiPlugin as cI, type ApiPluginProvides as cJ, appKeyResolver as cK, actionTypeResolver as cL, actionKeyResolver as cM, connectionIdResolver as cN, connectionIdGenericResolver as cO, inputsResolver as cP, inputsAllOptionalResolver as cQ, inputFieldKeyResolver as cR, clientCredentialsNameResolver as cS, clientIdResolver as cT, tableIdResolver as cU, triggerInboxResolver as cV, triggerMessagesResolver as cW, tableRecordIdResolver as cX, tableRecordIdsResolver as cY, tableFieldIdsResolver as cZ, tableNameResolver as c_, type GetActionInputFieldsSchemaPluginProvides as ca, listConnectionsPlugin as cb, type ListConnectionsPluginProvides as cc, listClientCredentialsPlugin as cd, type ListClientCredentialsPluginProvides as ce, createClientCredentialsPlugin as cf, type CreateClientCredentialsPluginProvides as cg, deleteClientCredentialsPlugin as ch, type DeleteClientCredentialsPluginProvides as ci, getAppPlugin as cj, type GetAppPluginProvides as ck, getActionPlugin as cl, type GetActionPluginProvides as cm, getConnectionPlugin as cn, type GetConnectionPluginProvides as co, findFirstConnectionPlugin as cp, type FindFirstConnectionPluginProvides as cq, findUniqueConnectionPlugin as cr, type FindUniqueConnectionPluginProvides as cs, CONTEXT_CACHE_TTL_MS as ct, CONTEXT_CACHE_MAX_SIZE as cu, runActionPlugin as cv, type RunActionPluginProvides as cw, requestPlugin as cx, type RequestPluginProvides as cy, type ManifestPluginOptions as cz, type ActionEntry as d, listTablesPlugin as d$, tableRecordsResolver as d0, tableUpdateRecordsResolver as d1, tableFiltersResolver as d2, tableSortResolver as d3, type ResolveAuthTokenOptions as d4, clearTokenCache as d5, invalidateCachedToken as d6, injectCliLogin as d7, isCliLoginAvailable as d8, getTokenFromCliLogin as d9, ClientCredentialsObjectSchema as dA, PkceCredentialsObjectSchema as dB, CredentialsObjectSchema as dC, ResolvedCredentialsSchema as dD, CredentialsFunctionSchema as dE, type CredentialsFunction as dF, CredentialsSchema as dG, ConnectionEntrySchema as dH, type ConnectionEntry as dI, ConnectionsMapSchema as dJ, type ConnectionsMap as dK, connectionsPlugin as dL, type ConnectionsPluginProvides as dM, ZAPIER_BASE_URL as dN, getZapierSdkService as dO, MAX_PAGE_LIMIT as dP, DEFAULT_PAGE_SIZE as dQ, DEFAULT_ACTION_TIMEOUT_MS as dR, ZAPIER_MAX_NETWORK_RETRIES as dS, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS as dT, MAX_CONCURRENCY_LIMIT as dU, parseConcurrencyEnvVar as dV, ZAPIER_MAX_CONCURRENT_REQUESTS as dW, getZapierApprovalMode as dX, getZapierDefaultApprovalMode as dY, DEFAULT_APPROVAL_TIMEOUT_MS as dZ, DEFAULT_MAX_APPROVAL_RETRIES as d_, resolveAuthToken as da, invalidateCredentialsToken as db, type ZapierCache as dc, type ZapierCacheEntry as dd, type ZapierCacheSetOptions as de, createMemoryCache as df, type SdkEvent as dg, type AuthEvent as dh, type ApiEvent as di, type LoadingEvent as dj, type EventCallback as dk, type Credentials as dl, type ResolvedCredentials as dm, type CredentialsObject as dn, type ClientCredentialsObject as dp, type PkceCredentialsObject as dq, isClientCredentials as dr, isPkceCredentials as ds, isCredentialsObject as dt, isCredentialsFunction as du, type ResolveCredentialsOptions as dv, resolveCredentialsFromEnv as dw, resolveCredentials as dx, getBaseUrlFromCredentials as dy, getClientIdFromCredentials as dz, type PaginatedSdkResult as e, type ListTablesPluginProvides as e0, getTablePlugin as e1, type GetTablePluginProvides as e2, createTablePlugin as e3, type CreateTablePluginProvides as e4, deleteTablePlugin as e5, type DeleteTablePluginProvides as e6, listTableFieldsPlugin as e7, type ListTableFieldsPluginProvides as e8, createTableFieldsPlugin as e9, type BaseEvent as eA, type MethodCalledEvent as eB, generateEventId as eC, getCurrentTimestamp as eD, getReleaseId as eE, getOsInfo as eF, getPlatformVersions as eG, isCi as eH, getCiPlatform as eI, getMemoryUsage as eJ, getCpuTime as eK, createZapierSdk as eL, type ZapierSdk as eM, type CreateTableFieldsPluginProvides as ea, deleteTableFieldsPlugin as eb, type DeleteTableFieldsPluginProvides as ec, getTableRecordPlugin as ed, type GetTableRecordPluginProvides as ee, listTableRecordsPlugin as ef, type ListTableRecordsPluginProvides as eg, createTableRecordsPlugin as eh, type CreateTableRecordsPluginProvides as ei, deleteTableRecordsPlugin as ej, type DeleteTableRecordsPluginProvides as ek, updateTableRecordsPlugin as el, type UpdateTableRecordsPluginProvides as em, cleanupEventListeners as en, type EventEmissionConfig as eo, eventEmissionPlugin as ep, type EventEmissionProvides as eq, type EventContext as er, type ApplicationLifecycleEventData as es, type EnhancedErrorEventData as et, type MethodCalledEventData as eu, buildApplicationLifecycleEvent as ev, buildErrorEventWithContext as ew, buildErrorEvent as ex, createBaseEvent as ey, buildMethodCalledEvent as ez, findManifestEntry as f, type PositionalMetadata as g, type ZapierFetchInitOptions as h, type DynamicResolver as i, type WatchTriggerInboxOptions as j, type ActionProxy as k, type ZapierSdkApps as l, ZapierAbortDrainSignal as m, ZapierReleaseTriggerMessageSignal as n, type DrainTriggerInboxCallback as o, type DrainTriggerInboxErrorObserver as p, type ListAuthenticationsPluginProvides as q, readManifestFromFile as r, type FindFirstAuthenticationPluginProvides as s, type FindUniqueAuthenticationPluginProvides as t, type Action as u, type App as v, type Field as w, type Choice as x, type ActionExecutionResult as y, type ActionField as z };
|
|
9832
|
+
export { type Resolver as $, type ApiClient as A, type BaseSdkOptions as B, type CapabilitiesContext as C, type DrainTriggerInboxOptions as D, type EventEmissionContext as E, type FieldsetItem as F, type GetAuthenticationPluginProvides as G, type ActionFieldChoice as H, type NeedsRequest as I, type NeedsResponse as J, type Connection as K, type LeasedTriggerMessageItem as L, type Manifest as M, type Need as N, type ConnectionsResponse as O, type PluginMeta as P, type UserProfile as Q, type ResolvedAppLocator as R, isPositional as S, type TriggerMessageStatus as T, type UpdateManifestEntryOptions as U, createFunction as V, type WithAddPlugin as W, type FormattedItem as X, type FormatMetadata as Y, type ZapierSdkOptions as Z, type OutputFormatter as _, type UpdateManifestEntryResult as a, RecordsPropertySchema as a$, type ArrayResolver as a0, type ResolverMetadata as a1, type StaticResolver as a2, type DynamicListResolver as a3, type DynamicSearchResolver as a4, type FieldsResolver as a5, runWithTelemetryContext as a6, toSnakeCase as a7, toTitleCase as a8, batch as a9, type ConnectionItem as aA, type ActionItem$1 as aB, type InputFieldItem as aC, type InfoFieldItem as aD, type RootFieldItem as aE, type UserProfileItem as aF, type FunctionOptions as aG, type SdkPage as aH, type PaginatedSdkFunction as aI, AppKeyPropertySchema as aJ, AppPropertySchema as aK, ActionTypePropertySchema as aL, ActionKeyPropertySchema as aM, ActionPropertySchema as aN, InputFieldPropertySchema as aO, ConnectionIdPropertySchema as aP, AuthenticationIdPropertySchema as aQ, ConnectionPropertySchema as aR, InputsPropertySchema as aS, LimitPropertySchema as aT, OffsetPropertySchema as aU, OutputPropertySchema as aV, DebugPropertySchema as aW, ParamsPropertySchema as aX, ActionTimeoutMsPropertySchema as aY, TablePropertySchema as aZ, RecordPropertySchema as a_, type BatchOptions as aa, buildCapabilityMessage as ab, logDeprecation as ac, resetDeprecationWarnings as ad, RelayRequestSchema as ae, RelayFetchSchema as af, createZapierSdkWithoutRegistry as ag, createSdk as ah, createOptionsPlugin as ai, type FunctionRegistryEntry as aj, type FunctionDeprecation as ak, BaseSdkOptionsSchema as al, type Plugin as am, type PluginProvides as an, definePlugin as ao, createPluginMethod as ap, createPaginatedPluginMethod as aq, composePlugins as ar, type ActionItem as as, type ActionTypeItem as at, registryPlugin as au, type RequestOptions as av, type PollOptions as aw, createZapierApi as ax, getOrCreateApiClient as ay, type AppItem as az, type AddActionEntryOptions as b, fetchPlugin as b$, FieldsPropertySchema as b0, AppsPropertySchema as b1, TablesPropertySchema as b2, ConnectionsPropertySchema as b3, TriggerInboxPropertySchema as b4, TriggerInboxNamePropertySchema as b5, LeasePropertySchema as b6, LeaseSecondsPropertySchema as b7, LeaseLimitPropertySchema as b8, type AppKeyProperty as b9, type LeaseLimitProperty as bA, type ApiError as bB, type ErrorOptions as bC, ZapierError as bD, ZapierApiError as bE, ZapierAppNotFoundError as bF, ZapierValidationError as bG, ZapierUnknownError as bH, ZapierAuthenticationError as bI, ZapierNotFoundError as bJ, ZapierResourceNotFoundError as bK, ZapierConfigurationError as bL, ZapierBundleError as bM, ZapierTimeoutError as bN, ZapierActionError as bO, ZapierConflictError as bP, type RateLimitInfo as bQ, ZapierRateLimitError as bR, type ApprovalStatus as bS, ZapierApprovalError as bT, ZapierRelayError as bU, formatErrorMessage as bV, ZapierSignal as bW, appsPlugin as bX, type AppsPluginProvides as bY, type ActionExecutionOptions as bZ, type AppFactoryInput as b_, type AppProperty as ba, type ActionTypeProperty as bb, type ActionKeyProperty as bc, type ActionProperty as bd, type InputFieldProperty as be, type ConnectionIdProperty as bf, type ConnectionProperty as bg, type AuthenticationIdProperty as bh, type InputsProperty as bi, type LimitProperty as bj, type OffsetProperty as bk, type OutputProperty as bl, type DebugProperty as bm, type ParamsProperty as bn, type ActionTimeoutMsProperty as bo, type TableProperty as bp, type RecordProperty as bq, type RecordsProperty as br, type FieldsProperty as bs, type AppsProperty as bt, type TablesProperty as bu, type ConnectionsProperty as bv, type TriggerInboxProperty as bw, type TriggerInboxNameProperty as bx, type LeaseProperty as by, type LeaseSecondsProperty as bz, type AddActionEntryResult as c, tableNameResolver as c$, type FetchPluginProvides as c0, listAppsPlugin as c1, type ListAppsPluginProvides as c2, listActionsPlugin as c3, type ListActionsPluginProvides as c4, listActionInputFieldsPlugin as c5, type ListActionInputFieldsPluginProvides as c6, listActionInputFieldChoicesPlugin as c7, type ListActionInputFieldChoicesPluginProvides as c8, getActionInputFieldsSchemaPlugin as c9, getPreferredManifestEntryKey as cA, manifestPlugin as cB, type ManifestPluginProvides as cC, DEFAULT_CONFIG_PATH as cD, type ManifestEntry as cE, getProfilePlugin as cF, type GetProfilePluginProvides as cG, type ApiPluginOptions as cH, apiPlugin as cI, type ApiPluginProvides as cJ, appKeyResolver as cK, actionTypeResolver as cL, actionKeyResolver as cM, connectionIdResolver as cN, connectionIdGenericResolver as cO, inputsResolver as cP, inputsAllOptionalResolver as cQ, inputFieldKeyResolver as cR, clientCredentialsNameResolver as cS, clientIdResolver as cT, tableIdResolver as cU, triggerInboxResolver as cV, workflowIdResolver as cW, triggerMessagesResolver as cX, tableRecordIdResolver as cY, tableRecordIdsResolver as cZ, tableFieldIdsResolver as c_, type GetActionInputFieldsSchemaPluginProvides as ca, listConnectionsPlugin as cb, type ListConnectionsPluginProvides as cc, listClientCredentialsPlugin as cd, type ListClientCredentialsPluginProvides as ce, createClientCredentialsPlugin as cf, type CreateClientCredentialsPluginProvides as cg, deleteClientCredentialsPlugin as ch, type DeleteClientCredentialsPluginProvides as ci, getAppPlugin as cj, type GetAppPluginProvides as ck, getActionPlugin as cl, type GetActionPluginProvides as cm, getConnectionPlugin as cn, type GetConnectionPluginProvides as co, findFirstConnectionPlugin as cp, type FindFirstConnectionPluginProvides as cq, findUniqueConnectionPlugin as cr, type FindUniqueConnectionPluginProvides as cs, CONTEXT_CACHE_TTL_MS as ct, CONTEXT_CACHE_MAX_SIZE as cu, runActionPlugin as cv, type RunActionPluginProvides as cw, requestPlugin as cx, type RequestPluginProvides as cy, type ManifestPluginOptions as cz, type ActionEntry as d, DEFAULT_MAX_APPROVAL_RETRIES as d$, tableFieldsResolver as d0, tableRecordsResolver as d1, tableUpdateRecordsResolver as d2, tableFiltersResolver as d3, tableSortResolver as d4, type ResolveAuthTokenOptions as d5, clearTokenCache as d6, invalidateCachedToken as d7, injectCliLogin as d8, isCliLoginAvailable as d9, getClientIdFromCredentials as dA, ClientCredentialsObjectSchema as dB, PkceCredentialsObjectSchema as dC, CredentialsObjectSchema as dD, ResolvedCredentialsSchema as dE, CredentialsFunctionSchema as dF, type CredentialsFunction as dG, CredentialsSchema as dH, ConnectionEntrySchema as dI, type ConnectionEntry as dJ, ConnectionsMapSchema as dK, type ConnectionsMap as dL, connectionsPlugin as dM, type ConnectionsPluginProvides as dN, ZAPIER_BASE_URL as dO, getZapierSdkService as dP, MAX_PAGE_LIMIT as dQ, DEFAULT_PAGE_SIZE as dR, DEFAULT_ACTION_TIMEOUT_MS as dS, ZAPIER_MAX_NETWORK_RETRIES as dT, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS as dU, MAX_CONCURRENCY_LIMIT as dV, parseConcurrencyEnvVar as dW, ZAPIER_MAX_CONCURRENT_REQUESTS as dX, getZapierApprovalMode as dY, getZapierDefaultApprovalMode as dZ, DEFAULT_APPROVAL_TIMEOUT_MS as d_, getTokenFromCliLogin as da, resolveAuthToken as db, invalidateCredentialsToken as dc, type ZapierCache as dd, type ZapierCacheEntry as de, type ZapierCacheSetOptions as df, createMemoryCache as dg, type SdkEvent as dh, type AuthEvent as di, type ApiEvent as dj, type LoadingEvent as dk, type EventCallback as dl, type Credentials as dm, type ResolvedCredentials as dn, type CredentialsObject as dp, type ClientCredentialsObject as dq, type PkceCredentialsObject as dr, isClientCredentials as ds, isPkceCredentials as dt, isCredentialsObject as du, isCredentialsFunction as dv, type ResolveCredentialsOptions as dw, resolveCredentialsFromEnv as dx, resolveCredentials as dy, getBaseUrlFromCredentials as dz, type PaginatedSdkResult as e, listTablesPlugin as e0, type ListTablesPluginProvides as e1, getTablePlugin as e2, type GetTablePluginProvides as e3, createTablePlugin as e4, type CreateTablePluginProvides as e5, deleteTablePlugin as e6, type DeleteTablePluginProvides as e7, listTableFieldsPlugin as e8, type ListTableFieldsPluginProvides as e9, buildMethodCalledEvent as eA, type BaseEvent as eB, type MethodCalledEvent as eC, generateEventId as eD, getCurrentTimestamp as eE, getReleaseId as eF, getOsInfo as eG, getPlatformVersions as eH, isCi as eI, getCiPlatform as eJ, getMemoryUsage as eK, getCpuTime as eL, createZapierSdk as eM, type ZapierSdk as eN, createTableFieldsPlugin as ea, type CreateTableFieldsPluginProvides as eb, deleteTableFieldsPlugin as ec, type DeleteTableFieldsPluginProvides as ed, getTableRecordPlugin as ee, type GetTableRecordPluginProvides as ef, listTableRecordsPlugin as eg, type ListTableRecordsPluginProvides as eh, createTableRecordsPlugin as ei, type CreateTableRecordsPluginProvides as ej, deleteTableRecordsPlugin as ek, type DeleteTableRecordsPluginProvides as el, updateTableRecordsPlugin as em, type UpdateTableRecordsPluginProvides as en, cleanupEventListeners as eo, type EventEmissionConfig as ep, eventEmissionPlugin as eq, type EventEmissionProvides as er, type EventContext as es, type ApplicationLifecycleEventData as et, type EnhancedErrorEventData as eu, type MethodCalledEventData as ev, buildApplicationLifecycleEvent as ew, buildErrorEventWithContext as ex, buildErrorEvent as ey, createBaseEvent as ez, findManifestEntry as f, type PositionalMetadata as g, type ZapierFetchInitOptions as h, type DynamicResolver as i, type WatchTriggerInboxOptions as j, type ActionProxy as k, type ZapierSdkApps as l, ZapierAbortDrainSignal as m, ZapierReleaseTriggerMessageSignal as n, type DrainTriggerInboxCallback as o, type DrainTriggerInboxErrorObserver as p, type ListAuthenticationsPluginProvides as q, readManifestFromFile as r, type FindFirstAuthenticationPluginProvides as s, type FindUniqueAuthenticationPluginProvides as t, type Action as u, type App as v, type Field as w, type Choice as x, type ActionExecutionResult as y, type ActionField as z };
|
package/dist/index.cjs
CHANGED
|
@@ -2512,10 +2512,7 @@ var clientCredentialsNameResolver = {
|
|
|
2512
2512
|
// src/resolvers/clientId.ts
|
|
2513
2513
|
var clientIdResolver = {
|
|
2514
2514
|
type: "dynamic",
|
|
2515
|
-
fetch: async (sdk) => {
|
|
2516
|
-
const result = await sdk.listClientCredentials({ maxItems: 100 });
|
|
2517
|
-
return result.data;
|
|
2518
|
-
},
|
|
2515
|
+
fetch: async (sdk) => toIterable(sdk.listClientCredentials({})),
|
|
2519
2516
|
prompt: (credentials) => ({
|
|
2520
2517
|
type: "list",
|
|
2521
2518
|
name: "clientId",
|
|
@@ -2578,6 +2575,21 @@ var triggerInboxResolver = {
|
|
|
2578
2575
|
})
|
|
2579
2576
|
};
|
|
2580
2577
|
|
|
2578
|
+
// src/resolvers/workflowId.ts
|
|
2579
|
+
var workflowIdResolver = {
|
|
2580
|
+
type: "dynamic",
|
|
2581
|
+
fetch: async (sdk) => toIterable(sdk.listWorkflows()),
|
|
2582
|
+
prompt: (workflows) => ({
|
|
2583
|
+
type: "list",
|
|
2584
|
+
name: "workflow",
|
|
2585
|
+
message: "Select a workflow:",
|
|
2586
|
+
choices: workflows.map((workflow) => ({
|
|
2587
|
+
name: workflow.enabled ? workflow.name : `${workflow.name} (disabled)`,
|
|
2588
|
+
value: workflow.id
|
|
2589
|
+
}))
|
|
2590
|
+
})
|
|
2591
|
+
};
|
|
2592
|
+
|
|
2581
2593
|
// src/resolvers/triggerMessages.ts
|
|
2582
2594
|
var triggerMessagesResolver = {
|
|
2583
2595
|
type: "dynamic",
|
|
@@ -4259,10 +4271,7 @@ var deleteClientCredentialsPlugin = definePlugin(
|
|
|
4259
4271
|
{
|
|
4260
4272
|
authRequired: true,
|
|
4261
4273
|
requiredScopes: ["credentials"],
|
|
4262
|
-
resource: {
|
|
4263
|
-
type: "client-credential",
|
|
4264
|
-
id: options.clientId
|
|
4265
|
-
}
|
|
4274
|
+
resource: { type: "client-credential", id: options.clientId }
|
|
4266
4275
|
}
|
|
4267
4276
|
);
|
|
4268
4277
|
return { success: true };
|
|
@@ -6330,7 +6339,7 @@ async function invalidateCredentialsToken(options) {
|
|
|
6330
6339
|
}
|
|
6331
6340
|
|
|
6332
6341
|
// src/sdk-version.ts
|
|
6333
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
6342
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.61.0" : void 0) || "unknown";
|
|
6334
6343
|
|
|
6335
6344
|
// src/utils/open-url.ts
|
|
6336
6345
|
var nodePrefix = "node:";
|
|
@@ -8243,6 +8252,10 @@ var categoryDefinitions = {
|
|
|
8243
8252
|
},
|
|
8244
8253
|
table: { title: "Table" },
|
|
8245
8254
|
trigger: { title: "Trigger" },
|
|
8255
|
+
"code-workflow": {
|
|
8256
|
+
title: "Code Workflow",
|
|
8257
|
+
titlePlural: "Code Workflows"
|
|
8258
|
+
},
|
|
8246
8259
|
http: { title: "HTTP Request" },
|
|
8247
8260
|
utility: { title: "Utility", titlePlural: "Utilities" },
|
|
8248
8261
|
other: { title: "Other" }
|
|
@@ -9377,3 +9390,4 @@ exports.toTitleCase = toTitleCase;
|
|
|
9377
9390
|
exports.triggerInboxResolver = triggerInboxResolver;
|
|
9378
9391
|
exports.triggerMessagesResolver = triggerMessagesResolver;
|
|
9379
9392
|
exports.updateTableRecordsPlugin = updateTableRecordsPlugin;
|
|
9393
|
+
exports.workflowIdResolver = workflowIdResolver;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { u as Action, d as ActionEntry, bZ as ActionExecutionOptions, y as ActionExecutionResult, z as ActionField, H as ActionFieldChoice, aB as ActionItem, bc as ActionKeyProperty, aM as ActionKeyPropertySchema, bd as ActionProperty, aN as ActionPropertySchema, as as ActionResolverItem, bo as ActionTimeoutMsProperty, aY as ActionTimeoutMsPropertySchema, at as ActionTypeItem, bb as ActionTypeProperty, aL as ActionTypePropertySchema, b as AddActionEntryOptions, c as AddActionEntryResult, A as ApiClient, bB as ApiError,
|
|
1
|
+
export { u as Action, d as ActionEntry, bZ as ActionExecutionOptions, y as ActionExecutionResult, z as ActionField, H as ActionFieldChoice, aB as ActionItem, bc as ActionKeyProperty, aM as ActionKeyPropertySchema, bd as ActionProperty, aN as ActionPropertySchema, as as ActionResolverItem, bo as ActionTimeoutMsProperty, aY as ActionTimeoutMsPropertySchema, at as ActionTypeItem, bb as ActionTypeProperty, aL as ActionTypePropertySchema, b as AddActionEntryOptions, c as AddActionEntryResult, A as ApiClient, bB as ApiError, dj as ApiEvent, cH as ApiPluginOptions, cJ as ApiPluginProvides, v as App, b_ as AppFactoryInput, az as AppItem, b9 as AppKeyProperty, aJ as AppKeyPropertySchema, ba as AppProperty, aK as AppPropertySchema, et as ApplicationLifecycleEventData, bS as ApprovalStatus, bY as AppsPluginProvides, bt as AppsProperty, b1 as AppsPropertySchema, a0 as ArrayResolver, di as AuthEvent, bh as AuthenticationIdProperty, aQ as AuthenticationIdPropertySchema, eB as BaseEvent, al as BaseSdkOptionsSchema, aa as BatchOptions, cu as CONTEXT_CACHE_MAX_SIZE, ct as CONTEXT_CACHE_TTL_MS, x as Choice, dq as ClientCredentialsObject, dB as ClientCredentialsObjectSchema, K as Connection, dJ as ConnectionEntry, dI as ConnectionEntrySchema, bf as ConnectionIdProperty, aP as ConnectionIdPropertySchema, aA as ConnectionItem, bg as ConnectionProperty, aR as ConnectionPropertySchema, dL as ConnectionsMap, dK as ConnectionsMapSchema, dN as ConnectionsPluginProvides, bv as ConnectionsProperty, b3 as ConnectionsPropertySchema, O as ConnectionsResponse, cg as CreateClientCredentialsPluginProvides, eb as CreateTableFieldsPluginProvides, e5 as CreateTablePluginProvides, ej as CreateTableRecordsPluginProvides, dm as Credentials, dG as CredentialsFunction, dF as CredentialsFunctionSchema, dp as CredentialsObject, dD as CredentialsObjectSchema, dH as CredentialsSchema, dS as DEFAULT_ACTION_TIMEOUT_MS, d_ as DEFAULT_APPROVAL_TIMEOUT_MS, cD as DEFAULT_CONFIG_PATH, d$ as DEFAULT_MAX_APPROVAL_RETRIES, dR as DEFAULT_PAGE_SIZE, bm as DebugProperty, aW as DebugPropertySchema, ci as DeleteClientCredentialsPluginProvides, ed as DeleteTableFieldsPluginProvides, e7 as DeleteTablePluginProvides, el as DeleteTableRecordsPluginProvides, o as DrainTriggerInboxCallback, p as DrainTriggerInboxErrorObserver, D as DrainTriggerInboxOptions, a3 as DynamicListResolver, i as DynamicResolver, a4 as DynamicSearchResolver, eu as EnhancedErrorEventData, bC as ErrorOptions, dl as EventCallback, es as EventContext, ep as EventEmissionConfig, E as EventEmissionContext, er as EventEmissionProvides, c0 as FetchPluginProvides, w as Field, bs as FieldsProperty, b0 as FieldsPropertySchema, a5 as FieldsResolver, F as FieldsetItem, s as FindFirstAuthenticationPluginProvides, cq as FindFirstConnectionPluginProvides, t as FindUniqueAuthenticationPluginProvides, cs as FindUniqueConnectionPluginProvides, Y as FormatMetadata, X as FormattedItem, ak as FunctionDeprecation, aG as FunctionOptions, aj as FunctionRegistryEntry, ca as GetActionInputFieldsSchemaPluginProvides, cm as GetActionPluginProvides, ck as GetAppPluginProvides, G as GetAuthenticationPluginProvides, co as GetConnectionPluginProvides, cG as GetProfilePluginProvides, e3 as GetTablePluginProvides, ef as GetTableRecordPluginProvides, aD as InfoFieldItem, aC as InputFieldItem, be as InputFieldProperty, aO as InputFieldPropertySchema, bi as InputsProperty, aS as InputsPropertySchema, bA as LeaseLimitProperty, b8 as LeaseLimitPropertySchema, by as LeaseProperty, b6 as LeasePropertySchema, bz as LeaseSecondsProperty, b7 as LeaseSecondsPropertySchema, L as LeasedTriggerMessageItem, bj as LimitProperty, aT as LimitPropertySchema, c8 as ListActionInputFieldChoicesPluginProvides, c6 as ListActionInputFieldsPluginProvides, c4 as ListActionsPluginProvides, c2 as ListAppsPluginProvides, q as ListAuthenticationsPluginProvides, ce as ListClientCredentialsPluginProvides, cc as ListConnectionsPluginProvides, e9 as ListTableFieldsPluginProvides, eh as ListTableRecordsPluginProvides, e1 as ListTablesPluginProvides, dk as LoadingEvent, dV as MAX_CONCURRENCY_LIMIT, dQ as MAX_PAGE_LIMIT, M as Manifest, cE as ManifestEntry, cz as ManifestPluginOptions, cC as ManifestPluginProvides, eC as MethodCalledEvent, ev as MethodCalledEventData, N as Need, I as NeedsRequest, J as NeedsResponse, bk as OffsetProperty, aU as OffsetPropertySchema, _ as OutputFormatter, bl as OutputProperty, aV as OutputPropertySchema, aI as PaginatedSdkFunction, e as PaginatedSdkResult, bn as ParamsProperty, aX as ParamsPropertySchema, dr as PkceCredentialsObject, dC as PkceCredentialsObjectSchema, am as Plugin, P as PluginMeta, an as PluginProvides, aw as PollOptions, g as PositionalMetadata, bQ as RateLimitInfo, bq as RecordProperty, a_ as RecordPropertySchema, br as RecordsProperty, a$ as RecordsPropertySchema, af as RelayFetchSchema, ae as RelayRequestSchema, av as RequestOptions, cy as RequestPluginProvides, d5 as ResolveAuthTokenOptions, dw as ResolveCredentialsOptions, R as ResolvedAppLocator, dn as ResolvedCredentials, dE as ResolvedCredentialsSchema, $ as Resolver, a1 as ResolverMetadata, aE as RootFieldItem, cw as RunActionPluginProvides, dh as SdkEvent, aH as SdkPage, a2 as StaticResolver, bp as TableProperty, aZ as TablePropertySchema, bu as TablesProperty, b2 as TablesPropertySchema, bx as TriggerInboxNameProperty, b5 as TriggerInboxNamePropertySchema, bw as TriggerInboxProperty, b4 as TriggerInboxPropertySchema, T as TriggerMessageStatus, U as UpdateManifestEntryOptions, a as UpdateManifestEntryResult, en as UpdateTableRecordsPluginProvides, Q as UserProfile, aF as UserProfileItem, j as WatchTriggerInboxOptions, W as WithAddPlugin, dO as ZAPIER_BASE_URL, dX as ZAPIER_MAX_CONCURRENT_REQUESTS, dT as ZAPIER_MAX_NETWORK_RETRIES, dU as ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, m as ZapierAbortDrainSignal, bO as ZapierActionError, bE as ZapierApiError, bF as ZapierAppNotFoundError, bT as ZapierApprovalError, bI as ZapierAuthenticationError, bM as ZapierBundleError, dd as ZapierCache, de as ZapierCacheEntry, df as ZapierCacheSetOptions, bL as ZapierConfigurationError, bP as ZapierConflictError, bD as ZapierError, h as ZapierFetchInitOptions, bJ as ZapierNotFoundError, bR as ZapierRateLimitError, bU as ZapierRelayError, n as ZapierReleaseTriggerMessageSignal, bK as ZapierResourceNotFoundError, eN as ZapierSdk, l as ZapierSdkApps, Z as ZapierSdkOptions, bW as ZapierSignal, bN as ZapierTimeoutError, bH as ZapierUnknownError, bG as ZapierValidationError, cM as actionKeyResolver, cL as actionTypeResolver, cI as apiPlugin, cK as appKeyResolver, bX as appsPlugin, cO as authenticationIdGenericResolver, cN as authenticationIdResolver, a9 as batch, ew as buildApplicationLifecycleEvent, ab as buildCapabilityMessage, ey as buildErrorEvent, ex as buildErrorEventWithContext, eA as buildMethodCalledEvent, eo as cleanupEventListeners, d6 as clearTokenCache, cS as clientCredentialsNameResolver, cT as clientIdResolver, ar as composePlugins, cO as connectionIdGenericResolver, cN as connectionIdResolver, dM as connectionsPlugin, ez as createBaseEvent, cf as createClientCredentialsPlugin, V as createFunction, dg as createMemoryCache, ai as createOptionsPlugin, aq as createPaginatedPluginMethod, ap as createPluginMethod, ah as createSdk, ea as createTableFieldsPlugin, e4 as createTablePlugin, ei as createTableRecordsPlugin, ax as createZapierApi, eM as createZapierSdk, ag as createZapierSdkWithoutRegistry, ao as definePlugin, ch as deleteClientCredentialsPlugin, ec as deleteTableFieldsPlugin, e6 as deleteTablePlugin, ek as deleteTableRecordsPlugin, eq as eventEmissionPlugin, b$ as fetchPlugin, cp as findFirstConnectionPlugin, f as findManifestEntry, cr as findUniqueConnectionPlugin, bV as formatErrorMessage, eD as generateEventId, c9 as getActionInputFieldsSchemaPlugin, cl as getActionPlugin, cj as getAppPlugin, dz as getBaseUrlFromCredentials, eJ as getCiPlatform, dA as getClientIdFromCredentials, cn as getConnectionPlugin, eL as getCpuTime, eE as getCurrentTimestamp, eK as getMemoryUsage, ay as getOrCreateApiClient, eG as getOsInfo, eH as getPlatformVersions, cA as getPreferredManifestEntryKey, cF as getProfilePlugin, eF as getReleaseId, e2 as getTablePlugin, ee as getTableRecordPlugin, da as getTokenFromCliLogin, dY as getZapierApprovalMode, dZ as getZapierDefaultApprovalMode, dP as getZapierSdkService, d8 as injectCliLogin, cR as inputFieldKeyResolver, cQ as inputsAllOptionalResolver, cP as inputsResolver, d7 as invalidateCachedToken, dc as invalidateCredentialsToken, eI as isCi, d9 as isCliLoginAvailable, ds as isClientCredentials, dv as isCredentialsFunction, du as isCredentialsObject, dt as isPkceCredentials, S as isPositional, c7 as listActionInputFieldChoicesPlugin, c5 as listActionInputFieldsPlugin, c3 as listActionsPlugin, c1 as listAppsPlugin, cd as listClientCredentialsPlugin, cb as listConnectionsPlugin, e8 as listTableFieldsPlugin, eg as listTableRecordsPlugin, e0 as listTablesPlugin, ac as logDeprecation, cB as manifestPlugin, dW as parseConcurrencyEnvVar, r as readManifestFromFile, au as registryPlugin, cx as requestPlugin, ad as resetDeprecationWarnings, db as resolveAuthToken, dy as resolveCredentials, dx as resolveCredentialsFromEnv, cv as runActionPlugin, a6 as runWithTelemetryContext, c_ as tableFieldIdsResolver, d0 as tableFieldsResolver, d3 as tableFiltersResolver, cU as tableIdResolver, c$ as tableNameResolver, cY as tableRecordIdResolver, cZ as tableRecordIdsResolver, d1 as tableRecordsResolver, d4 as tableSortResolver, d2 as tableUpdateRecordsResolver, a7 as toSnakeCase, a8 as toTitleCase, cV as triggerInboxResolver, cX as triggerMessagesResolver, em as updateTableRecordsPlugin, cW as workflowIdResolver } from './index-iKbnOz6r.mjs';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import '@zapier/zapier-sdk-core/v0/schemas/connections';
|
|
4
4
|
import '@zapier/policy-context';
|
package/dist/index.mjs
CHANGED
|
@@ -2510,10 +2510,7 @@ var clientCredentialsNameResolver = {
|
|
|
2510
2510
|
// src/resolvers/clientId.ts
|
|
2511
2511
|
var clientIdResolver = {
|
|
2512
2512
|
type: "dynamic",
|
|
2513
|
-
fetch: async (sdk) => {
|
|
2514
|
-
const result = await sdk.listClientCredentials({ maxItems: 100 });
|
|
2515
|
-
return result.data;
|
|
2516
|
-
},
|
|
2513
|
+
fetch: async (sdk) => toIterable(sdk.listClientCredentials({})),
|
|
2517
2514
|
prompt: (credentials) => ({
|
|
2518
2515
|
type: "list",
|
|
2519
2516
|
name: "clientId",
|
|
@@ -2576,6 +2573,21 @@ var triggerInboxResolver = {
|
|
|
2576
2573
|
})
|
|
2577
2574
|
};
|
|
2578
2575
|
|
|
2576
|
+
// src/resolvers/workflowId.ts
|
|
2577
|
+
var workflowIdResolver = {
|
|
2578
|
+
type: "dynamic",
|
|
2579
|
+
fetch: async (sdk) => toIterable(sdk.listWorkflows()),
|
|
2580
|
+
prompt: (workflows) => ({
|
|
2581
|
+
type: "list",
|
|
2582
|
+
name: "workflow",
|
|
2583
|
+
message: "Select a workflow:",
|
|
2584
|
+
choices: workflows.map((workflow) => ({
|
|
2585
|
+
name: workflow.enabled ? workflow.name : `${workflow.name} (disabled)`,
|
|
2586
|
+
value: workflow.id
|
|
2587
|
+
}))
|
|
2588
|
+
})
|
|
2589
|
+
};
|
|
2590
|
+
|
|
2579
2591
|
// src/resolvers/triggerMessages.ts
|
|
2580
2592
|
var triggerMessagesResolver = {
|
|
2581
2593
|
type: "dynamic",
|
|
@@ -4257,10 +4269,7 @@ var deleteClientCredentialsPlugin = definePlugin(
|
|
|
4257
4269
|
{
|
|
4258
4270
|
authRequired: true,
|
|
4259
4271
|
requiredScopes: ["credentials"],
|
|
4260
|
-
resource: {
|
|
4261
|
-
type: "client-credential",
|
|
4262
|
-
id: options.clientId
|
|
4263
|
-
}
|
|
4272
|
+
resource: { type: "client-credential", id: options.clientId }
|
|
4264
4273
|
}
|
|
4265
4274
|
);
|
|
4266
4275
|
return { success: true };
|
|
@@ -6328,7 +6337,7 @@ async function invalidateCredentialsToken(options) {
|
|
|
6328
6337
|
}
|
|
6329
6338
|
|
|
6330
6339
|
// src/sdk-version.ts
|
|
6331
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
6340
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.61.0" : void 0) || "unknown";
|
|
6332
6341
|
|
|
6333
6342
|
// src/utils/open-url.ts
|
|
6334
6343
|
var nodePrefix = "node:";
|
|
@@ -8241,6 +8250,10 @@ var categoryDefinitions = {
|
|
|
8241
8250
|
},
|
|
8242
8251
|
table: { title: "Table" },
|
|
8243
8252
|
trigger: { title: "Trigger" },
|
|
8253
|
+
"code-workflow": {
|
|
8254
|
+
title: "Code Workflow",
|
|
8255
|
+
titlePlural: "Code Workflows"
|
|
8256
|
+
},
|
|
8244
8257
|
http: { title: "HTTP Request" },
|
|
8245
8258
|
utility: { title: "Utility", titlePlural: "Utilities" },
|
|
8246
8259
|
other: { title: "Other" }
|
|
@@ -9186,4 +9199,4 @@ var registryPlugin = definePlugin((_sdk) => {
|
|
|
9186
9199
|
return {};
|
|
9187
9200
|
});
|
|
9188
9201
|
|
|
9189
|
-
export { ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MS, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CredentialsFunctionSchema, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MS, DEFAULT_APPROVAL_TIMEOUT_MS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, DebugPropertySchema, FieldsPropertySchema, InputFieldPropertySchema, InputsPropertySchema, LeaseLimitPropertySchema, LeasePropertySchema, LeaseSecondsPropertySchema, LimitPropertySchema, MAX_CONCURRENCY_LIMIT, MAX_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, TablePropertySchema, TablesPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, ZAPIER_BASE_URL, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, ZapierAbortDrainSignal, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierConflictError, ZapierError, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierReleaseTriggerMessageSignal, ZapierResourceNotFoundError, ZapierSignal, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, appKeyResolver, appsPlugin, connectionIdGenericResolver as authenticationIdGenericResolver, connectionIdResolver as authenticationIdResolver, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, cleanupEventListeners, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, composePlugins, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, createBaseEvent, createClientCredentialsPlugin, createFunction, createMemoryCache, createOptionsPlugin, createPaginatedPluginMethod, createPluginMethod, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdk, createZapierSdkWithoutRegistry, definePlugin, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, eventEmissionPlugin, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getAppPlugin, getBaseUrlFromCredentials, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getZapierApprovalMode, getZapierDefaultApprovalMode, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCredentialsFunction, isCredentialsObject, isPkceCredentials, isPositional, listActionInputFieldChoicesPlugin, listActionInputFieldsPlugin, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation, manifestPlugin, parseConcurrencyEnvVar, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, runActionPlugin, runWithTelemetryContext, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, triggerMessagesResolver, updateTableRecordsPlugin };
|
|
9202
|
+
export { ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MS, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CredentialsFunctionSchema, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MS, DEFAULT_APPROVAL_TIMEOUT_MS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, DebugPropertySchema, FieldsPropertySchema, InputFieldPropertySchema, InputsPropertySchema, LeaseLimitPropertySchema, LeasePropertySchema, LeaseSecondsPropertySchema, LimitPropertySchema, MAX_CONCURRENCY_LIMIT, MAX_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, TablePropertySchema, TablesPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, ZAPIER_BASE_URL, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, ZapierAbortDrainSignal, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierConflictError, ZapierError, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierReleaseTriggerMessageSignal, ZapierResourceNotFoundError, ZapierSignal, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, appKeyResolver, appsPlugin, connectionIdGenericResolver as authenticationIdGenericResolver, connectionIdResolver as authenticationIdResolver, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, cleanupEventListeners, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, composePlugins, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, createBaseEvent, createClientCredentialsPlugin, createFunction, createMemoryCache, createOptionsPlugin, createPaginatedPluginMethod, createPluginMethod, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdk, createZapierSdkWithoutRegistry, definePlugin, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, eventEmissionPlugin, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getAppPlugin, getBaseUrlFromCredentials, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getZapierApprovalMode, getZapierDefaultApprovalMode, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCredentialsFunction, isCredentialsObject, isPkceCredentials, isPositional, listActionInputFieldChoicesPlugin, listActionInputFieldsPlugin, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation, manifestPlugin, parseConcurrencyEnvVar, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, runActionPlugin, runWithTelemetryContext, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, triggerMessagesResolver, updateTableRecordsPlugin, workflowIdResolver };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare const createWorkflowPlugin: (sdk: {
|
|
2
|
+
context: {
|
|
3
|
+
api: import("../../..").ApiClient;
|
|
4
|
+
resolveCredentials: () => Promise<string | {
|
|
5
|
+
clientId: string;
|
|
6
|
+
clientSecret: string;
|
|
7
|
+
type?: "client_credentials" | undefined;
|
|
8
|
+
baseUrl?: string | undefined;
|
|
9
|
+
scope?: string | undefined;
|
|
10
|
+
} | {
|
|
11
|
+
clientId: string;
|
|
12
|
+
type?: "pkce" | undefined;
|
|
13
|
+
baseUrl?: string | undefined;
|
|
14
|
+
scope?: string | undefined;
|
|
15
|
+
} | undefined>;
|
|
16
|
+
};
|
|
17
|
+
} & {
|
|
18
|
+
context: import("../../eventEmission").EventEmissionContext;
|
|
19
|
+
} & {
|
|
20
|
+
context: {
|
|
21
|
+
meta: Record<string, import("../../..").PluginMeta>;
|
|
22
|
+
};
|
|
23
|
+
}) => {
|
|
24
|
+
createWorkflow: (options?: {
|
|
25
|
+
name: string;
|
|
26
|
+
description?: string | undefined;
|
|
27
|
+
} | undefined) => Promise<{
|
|
28
|
+
data: {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
description: string | null;
|
|
32
|
+
trigger_url: string;
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
created_at: string;
|
|
35
|
+
};
|
|
36
|
+
}>;
|
|
37
|
+
} & {
|
|
38
|
+
context: {
|
|
39
|
+
meta: {
|
|
40
|
+
createWorkflow: import("../../..").PluginMeta;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export type CreateWorkflowPluginProvides = ReturnType<typeof createWorkflowPlugin>;
|
|
45
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/createWorkflow/index.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBhC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,oBAAoB,CAC5B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { definePlugin, createPluginMethod } from "../../../utils/plugin-utils";
|
|
2
|
+
import { codeSubstrateDefaults } from "../shared";
|
|
3
|
+
import { CreateWorkflowOptionsSchema, CreateWorkflowResponseSchema, } from "./schemas";
|
|
4
|
+
export const createWorkflowPlugin = definePlugin((sdk) => createPluginMethod(sdk, {
|
|
5
|
+
...codeSubstrateDefaults,
|
|
6
|
+
name: "createWorkflow",
|
|
7
|
+
type: "create",
|
|
8
|
+
itemType: "Workflow",
|
|
9
|
+
inputSchema: CreateWorkflowOptionsSchema,
|
|
10
|
+
outputSchema: CreateWorkflowResponseSchema,
|
|
11
|
+
handler: async ({ sdk, options }) => {
|
|
12
|
+
const body = { name: options.name };
|
|
13
|
+
if (options.description !== undefined) {
|
|
14
|
+
body.description = options.description;
|
|
15
|
+
}
|
|
16
|
+
const data = await sdk.context.api.post("/durableworkflowzaps/api/v0/workflows", body, { authRequired: true });
|
|
17
|
+
return { data };
|
|
18
|
+
},
|
|
19
|
+
}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const CreateWorkflowOptionsSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
description: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type CreateWorkflowOptions = z.infer<typeof CreateWorkflowOptionsSchema>;
|
|
7
|
+
export declare const CreateWorkflowResponseSchema: z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
name: z.ZodString;
|
|
10
|
+
description: z.ZodNullable<z.ZodString>;
|
|
11
|
+
trigger_url: z.ZodString;
|
|
12
|
+
enabled: z.ZodBoolean;
|
|
13
|
+
created_at: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type CreateWorkflowResponse = z.infer<typeof CreateWorkflowResponseSchema>;
|
|
16
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/createWorkflow/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,2BAA2B;;;iBAUrC,CAAC;AAEJ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,4BAA4B;;;;;;;iBAkBvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const CreateWorkflowOptionsSchema = z
|
|
3
|
+
.object({
|
|
4
|
+
name: z.string().min(1).describe("Workflow name"),
|
|
5
|
+
description: z
|
|
6
|
+
.string()
|
|
7
|
+
.optional()
|
|
8
|
+
.describe("Optional description for the workflow"),
|
|
9
|
+
})
|
|
10
|
+
.describe("Create a durable workflow container. Starts disabled with no version; publish a version to add code.");
|
|
11
|
+
export const CreateWorkflowResponseSchema = z.object({
|
|
12
|
+
id: z.string().describe("Workflow ID (UUID)"),
|
|
13
|
+
name: z.string().describe("Workflow name"),
|
|
14
|
+
description: z
|
|
15
|
+
.string()
|
|
16
|
+
.nullable()
|
|
17
|
+
.describe("Workflow description (null if unset)"),
|
|
18
|
+
trigger_url: z
|
|
19
|
+
.string()
|
|
20
|
+
.describe("Public webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path — treat as sensitive."),
|
|
21
|
+
enabled: z
|
|
22
|
+
.boolean()
|
|
23
|
+
.describe("Whether the workflow currently accepts triggers. Always false on a new workflow until enabled."),
|
|
24
|
+
created_at: z.string().describe("When the workflow was created (ISO-8601)"),
|
|
25
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const deleteWorkflowPlugin: (sdk: {
|
|
2
|
+
context: {
|
|
3
|
+
api: import("../../..").ApiClient;
|
|
4
|
+
resolveCredentials: () => Promise<string | {
|
|
5
|
+
clientId: string;
|
|
6
|
+
clientSecret: string;
|
|
7
|
+
type?: "client_credentials" | undefined;
|
|
8
|
+
baseUrl?: string | undefined;
|
|
9
|
+
scope?: string | undefined;
|
|
10
|
+
} | {
|
|
11
|
+
clientId: string;
|
|
12
|
+
type?: "pkce" | undefined;
|
|
13
|
+
baseUrl?: string | undefined;
|
|
14
|
+
scope?: string | undefined;
|
|
15
|
+
} | undefined>;
|
|
16
|
+
};
|
|
17
|
+
} & {
|
|
18
|
+
context: import("../../eventEmission").EventEmissionContext;
|
|
19
|
+
} & {
|
|
20
|
+
context: {
|
|
21
|
+
meta: Record<string, import("../../..").PluginMeta>;
|
|
22
|
+
};
|
|
23
|
+
}) => {
|
|
24
|
+
deleteWorkflow: (options?: {
|
|
25
|
+
workflow: string;
|
|
26
|
+
} | undefined) => Promise<{
|
|
27
|
+
data: {
|
|
28
|
+
id: string;
|
|
29
|
+
};
|
|
30
|
+
}>;
|
|
31
|
+
} & {
|
|
32
|
+
context: {
|
|
33
|
+
meta: {
|
|
34
|
+
deleteWorkflow: import("../../..").PluginMeta;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export type DeleteWorkflowPluginProvides = ReturnType<typeof deleteWorkflowPlugin>;
|
|
39
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/deleteWorkflow/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BhC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,oBAAoB,CAC5B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { definePlugin, createPluginMethod } from "../../../utils/plugin-utils";
|
|
2
|
+
import { workflowIdResolver } from "../../../resolvers/workflowId";
|
|
3
|
+
import { codeSubstrateDefaults } from "../shared";
|
|
4
|
+
import { DeleteWorkflowOptionsSchema } from "./schemas";
|
|
5
|
+
export const deleteWorkflowPlugin = definePlugin((sdk) => createPluginMethod(sdk, {
|
|
6
|
+
...codeSubstrateDefaults,
|
|
7
|
+
name: "deleteWorkflow",
|
|
8
|
+
type: "delete",
|
|
9
|
+
itemType: "Workflow",
|
|
10
|
+
confirm: "delete",
|
|
11
|
+
inputSchema: DeleteWorkflowOptionsSchema,
|
|
12
|
+
resolvers: { workflow: workflowIdResolver },
|
|
13
|
+
handler: async ({ sdk, options }) => {
|
|
14
|
+
// Backend returns 204 on success. 404 (workflow missing) propagates
|
|
15
|
+
// as ZapierNotFoundError. We intentionally don't fold 404 into a
|
|
16
|
+
// synthesized "already-deleted" outcome — the resource hint is
|
|
17
|
+
// caller-supplied (the SDK tagged the request itself), so an
|
|
18
|
+
// upstream / proxy / gateway 404 would falsely tell the caller
|
|
19
|
+
// the workflow was deleted. Callers wanting idempotency can
|
|
20
|
+
// catch ZapierNotFoundError themselves.
|
|
21
|
+
await sdk.context.api.delete(`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}`, undefined, {
|
|
22
|
+
authRequired: true,
|
|
23
|
+
resource: { type: "workflow", id: options.workflow },
|
|
24
|
+
});
|
|
25
|
+
return { data: { id: options.workflow } };
|
|
26
|
+
},
|
|
27
|
+
}));
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const DeleteWorkflowOptionsSchema = z
|
|
3
|
+
.object({
|
|
4
|
+
workflow: z.string().uuid().describe("Durable workflow ID"),
|
|
5
|
+
})
|
|
6
|
+
.describe("Delete a durable workflow. Throws `ZapierNotFoundError` if the workflow doesn't exist; callers wanting idempotency should catch that themselves.");
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const disableWorkflowPlugin: (sdk: {
|
|
2
|
+
context: {
|
|
3
|
+
api: import("../../..").ApiClient;
|
|
4
|
+
resolveCredentials: () => Promise<string | {
|
|
5
|
+
clientId: string;
|
|
6
|
+
clientSecret: string;
|
|
7
|
+
type?: "client_credentials" | undefined;
|
|
8
|
+
baseUrl?: string | undefined;
|
|
9
|
+
scope?: string | undefined;
|
|
10
|
+
} | {
|
|
11
|
+
clientId: string;
|
|
12
|
+
type?: "pkce" | undefined;
|
|
13
|
+
baseUrl?: string | undefined;
|
|
14
|
+
scope?: string | undefined;
|
|
15
|
+
} | undefined>;
|
|
16
|
+
};
|
|
17
|
+
} & {
|
|
18
|
+
context: import("../../eventEmission").EventEmissionContext;
|
|
19
|
+
} & {
|
|
20
|
+
context: {
|
|
21
|
+
meta: Record<string, import("../../..").PluginMeta>;
|
|
22
|
+
};
|
|
23
|
+
}) => {
|
|
24
|
+
disableWorkflow: (options?: {
|
|
25
|
+
workflow: string;
|
|
26
|
+
} | undefined) => Promise<{
|
|
27
|
+
data: {
|
|
28
|
+
id: string;
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
};
|
|
31
|
+
}>;
|
|
32
|
+
} & {
|
|
33
|
+
context: {
|
|
34
|
+
meta: {
|
|
35
|
+
disableWorkflow: import("../../..").PluginMeta;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export type DisableWorkflowPluginProvides = ReturnType<typeof disableWorkflowPlugin>;
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/disableWorkflow/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBjC,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,UAAU,CACpD,OAAO,qBAAqB,CAC7B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { definePlugin, createPluginMethod } from "../../../utils/plugin-utils";
|
|
2
|
+
import { workflowIdResolver } from "../../../resolvers/workflowId";
|
|
3
|
+
import { codeSubstrateDefaults } from "../shared";
|
|
4
|
+
import { DisableWorkflowOptionsSchema, DisableWorkflowResponseSchema, } from "./schemas";
|
|
5
|
+
export const disableWorkflowPlugin = definePlugin((sdk) => createPluginMethod(sdk, {
|
|
6
|
+
...codeSubstrateDefaults,
|
|
7
|
+
name: "disableWorkflow",
|
|
8
|
+
type: "update",
|
|
9
|
+
itemType: "Workflow",
|
|
10
|
+
inputSchema: DisableWorkflowOptionsSchema,
|
|
11
|
+
outputSchema: DisableWorkflowResponseSchema,
|
|
12
|
+
resolvers: { workflow: workflowIdResolver },
|
|
13
|
+
handler: async ({ sdk, options }) => {
|
|
14
|
+
const data = await sdk.context.api.post(`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/disable`, undefined, {
|
|
15
|
+
authRequired: true,
|
|
16
|
+
resource: { type: "workflow", id: options.workflow },
|
|
17
|
+
});
|
|
18
|
+
return { data };
|
|
19
|
+
},
|
|
20
|
+
}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const DisableWorkflowOptionsSchema: z.ZodObject<{
|
|
3
|
+
workflow: z.ZodString;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export type DisableWorkflowOptions = z.infer<typeof DisableWorkflowOptionsSchema>;
|
|
6
|
+
export declare const DisableWorkflowResponseSchema: z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
enabled: z.ZodBoolean;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type DisableWorkflowResponse = z.infer<typeof DisableWorkflowResponseSchema>;
|
|
11
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/disableWorkflow/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,4BAA4B;;iBAI+B,CAAC;AAEzE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;iBAOxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const DisableWorkflowOptionsSchema = z
|
|
3
|
+
.object({
|
|
4
|
+
workflow: z.string().uuid().describe("Durable workflow ID"),
|
|
5
|
+
})
|
|
6
|
+
.describe("Disable a durable workflow so it stops accepting triggers");
|
|
7
|
+
export const DisableWorkflowResponseSchema = z.object({
|
|
8
|
+
id: z.string().describe("Workflow ID (UUID)"),
|
|
9
|
+
enabled: z
|
|
10
|
+
.boolean()
|
|
11
|
+
.describe("Workflow's enabled state after the operation. Typically false; mirrors the row's true state in case a concurrent enable raced with this call."),
|
|
12
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const enableWorkflowPlugin: (sdk: {
|
|
2
|
+
context: {
|
|
3
|
+
api: import("../../..").ApiClient;
|
|
4
|
+
resolveCredentials: () => Promise<string | {
|
|
5
|
+
clientId: string;
|
|
6
|
+
clientSecret: string;
|
|
7
|
+
type?: "client_credentials" | undefined;
|
|
8
|
+
baseUrl?: string | undefined;
|
|
9
|
+
scope?: string | undefined;
|
|
10
|
+
} | {
|
|
11
|
+
clientId: string;
|
|
12
|
+
type?: "pkce" | undefined;
|
|
13
|
+
baseUrl?: string | undefined;
|
|
14
|
+
scope?: string | undefined;
|
|
15
|
+
} | undefined>;
|
|
16
|
+
};
|
|
17
|
+
} & {
|
|
18
|
+
context: import("../../eventEmission").EventEmissionContext;
|
|
19
|
+
} & {
|
|
20
|
+
context: {
|
|
21
|
+
meta: Record<string, import("../../..").PluginMeta>;
|
|
22
|
+
};
|
|
23
|
+
}) => {
|
|
24
|
+
enableWorkflow: (options?: {
|
|
25
|
+
workflow: string;
|
|
26
|
+
} | undefined) => Promise<{
|
|
27
|
+
data: {
|
|
28
|
+
id: string;
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
};
|
|
31
|
+
}>;
|
|
32
|
+
} & {
|
|
33
|
+
context: {
|
|
34
|
+
meta: {
|
|
35
|
+
enableWorkflow: import("../../..").PluginMeta;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export type EnableWorkflowPluginProvides = ReturnType<typeof enableWorkflowPlugin>;
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/enableWorkflow/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBhC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,oBAAoB,CAC5B,CAAC"}
|