@zapier/zapier-sdk 0.69.2 → 0.70.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 +34 -0
- package/README.md +33 -23
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +10 -1
- package/dist/api/error-classification.d.ts +7 -0
- package/dist/api/error-classification.d.ts.map +1 -1
- package/dist/api/error-classification.js +15 -2
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/sse-parser.d.ts +34 -0
- package/dist/api/sse-parser.d.ts.map +1 -1
- package/dist/api/sse-parser.js +28 -0
- package/dist/api/types.d.ts +9 -1
- package/dist/api/types.d.ts.map +1 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +2 -2
- package/dist/experimental.cjs +174 -35
- package/dist/experimental.d.mts +34 -2
- package/dist/experimental.d.ts +32 -0
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.mjs +174 -35
- package/dist/{index-DuFFW71E.d.mts → index-C0bQ5snd.d.mts} +33 -1
- package/dist/{index-DuFFW71E.d.ts → index-C0bQ5snd.d.ts} +33 -1
- package/dist/index.cjs +32 -5
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +32 -5
- package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts +3 -0
- package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/createWorkflow/index.js +3 -0
- package/dist/plugins/codeSubstrate/createWorkflow/schemas.d.ts +3 -0
- package/dist/plugins/codeSubstrate/createWorkflow/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/createWorkflow/schemas.js +11 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts +13 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.js +9 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.d.ts +13 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.js +52 -0
- package/dist/plugins/triggers/drainTriggerInbox/index.d.ts +4 -2
- package/dist/plugins/triggers/drainTriggerInbox/index.d.ts.map +1 -1
- package/dist/plugins/triggers/drainTriggerInbox/index.js +39 -6
- package/dist/plugins/triggers/watchTriggerInbox/index.d.ts +4 -2
- package/dist/plugins/triggers/watchTriggerInbox/index.d.ts.map +1 -1
- package/dist/plugins/triggers/watchTriggerInbox/index.js +100 -16
- package/dist/plugins/triggers/watchTriggerInbox/sse.d.ts +8 -6
- package/dist/plugins/triggers/watchTriggerInbox/sse.d.ts.map +1 -1
- package/dist/plugins/triggers/watchTriggerInbox/sse.js +11 -13
- package/package.json +1 -1
|
@@ -2071,6 +2071,23 @@ declare function createMemoryCache(): ZapierCache;
|
|
|
2071
2071
|
interface SseMessage {
|
|
2072
2072
|
data: string;
|
|
2073
2073
|
}
|
|
2074
|
+
/**
|
|
2075
|
+
* A streamed SSE frame after JSON parsing, as yielded by
|
|
2076
|
+
* `ApiClient.fetchJsonStream`. Unlike `fetchJson` — which throws on invalid
|
|
2077
|
+
* JSON — a long-lived stream must not die on one malformed frame, so a parse
|
|
2078
|
+
* failure is reported as `{ parsed: false, data: null, raw }` rather than
|
|
2079
|
+
* thrown. Callers skip `parsed: false` frames (and may inspect `raw`) and keep
|
|
2080
|
+
* consuming.
|
|
2081
|
+
*/
|
|
2082
|
+
type JsonSseMessage<T = unknown> = {
|
|
2083
|
+
parsed: true;
|
|
2084
|
+
data: T;
|
|
2085
|
+
raw: string;
|
|
2086
|
+
} | {
|
|
2087
|
+
parsed: false;
|
|
2088
|
+
data: null;
|
|
2089
|
+
raw: string;
|
|
2090
|
+
};
|
|
2074
2091
|
|
|
2075
2092
|
declare const NeedSchema: z.ZodObject<{
|
|
2076
2093
|
key: z.ZodString;
|
|
@@ -2438,6 +2455,14 @@ interface ApiClient {
|
|
|
2438
2455
|
* live (response ok, body present) and before the first frame.
|
|
2439
2456
|
*/
|
|
2440
2457
|
fetchStream: (path: string, init?: FetchStreamInit) => AsyncGenerator<SseMessage>;
|
|
2458
|
+
/**
|
|
2459
|
+
* Like `fetchStream`, but parses each frame's `data` as JSON, yielding
|
|
2460
|
+
* `{ parsed, data, raw }`. Unlike `fetchJson`, a malformed frame is never
|
|
2461
|
+
* thrown — it surfaces as `{ parsed: false, data: null, raw }` so one bad
|
|
2462
|
+
* frame can't kill a long-lived stream. A non-ok response still throws the
|
|
2463
|
+
* shared `ZapierError` subclasses before the first frame.
|
|
2464
|
+
*/
|
|
2465
|
+
fetchJsonStream: <T = unknown>(path: string, init?: FetchStreamInit) => AsyncGenerator<JsonSseMessage<T>>;
|
|
2441
2466
|
}
|
|
2442
2467
|
interface RequestOptions {
|
|
2443
2468
|
headers?: Record<string, string>;
|
|
@@ -2636,6 +2661,13 @@ declare const createZapierApi: (options: ApiClientOptions) => ApiClient;
|
|
|
2636
2661
|
* `api.fetch` already backed off and retried it upstream, so a
|
|
2637
2662
|
* `ZapierRateLimitError` (also a `ZapierError`) that escapes should be retried
|
|
2638
2663
|
* on the normal cadence rather than treated as permanent.
|
|
2664
|
+
*
|
|
2665
|
+
* A `ZapierAuthenticationError` with no `statusCode` is the one carve-out: the
|
|
2666
|
+
* token-exchange / credential-resolution layer throws these for setup problems
|
|
2667
|
+
* (token endpoint rejected the credentials, missing keychain secret, no
|
|
2668
|
+
* credentials at all) that never self-heal, so they are permanent even without
|
|
2669
|
+
* a status. Auth errors that DO carry a status fall through to the rule above,
|
|
2670
|
+
* so a 5xx/429 from the token endpoint still retries.
|
|
2639
2671
|
*/
|
|
2640
2672
|
declare function isPermanentHttpError(err: unknown): boolean;
|
|
2641
2673
|
|
|
@@ -15235,4 +15267,4 @@ declare const registryPlugin: (sdk: {
|
|
|
15235
15267
|
};
|
|
15236
15268
|
}) => {};
|
|
15237
15269
|
|
|
15238
|
-
export { createFunction as $, type ApiClient as A, type BaseSdkOptions as B, type CoreOptions as C, type DrainTriggerInboxOptions as D, type EventEmissionContext as E, type FieldsetItem as F, type GetAuthenticationPluginProvides as G, type Choice as H, type ActionExecutionResult as I, type ActionField as J, type ActionFieldChoice as K, type LeasedTriggerMessageItem as L, type MethodHooks as M, type Need as N, type OutputFormatter as O, type PluginStack as P, type NeedsRequest as Q, type ResolvedAppLocator as R, type NeedsResponse as S, type TriggerMessageStatus as T, type UpdateManifestEntryOptions as U, type Connection as V, type WatchTriggerInboxOptions as W, type ConnectionsResponse as X, type UserProfile as Y, type ZapierSdkOptions as Z, isPositional as _, type PluginMeta as a, InputFieldPropertySchema as a$, createPluginStack as a0, createCorePlugin as a1, addPlugin as a2, type FormattedItem as a3, type Resolver as a4, type ArrayResolver as a5, type ResolverMetadata as a6, type StaticResolver as a7, type DynamicListResolver as a8, type DynamicSearchResolver as a9, definePlugin as aA, createPluginMethod as aB, createPaginatedPluginMethod as aC, composePlugins as aD, type ActionItem as aE, type ActionTypeItem as aF, registryPlugin as aG, type RequestOptions as aH, type PollOptions as aI, createZapierApi as aJ, getOrCreateApiClient as aK, isPermanentHttpError as aL, type SseMessage as aM, type AppItem as aN, type ConnectionItem as aO, type ActionItem$1 as aP, type InputFieldItem as aQ, type InfoFieldItem as aR, type RootFieldItem as aS, type UserProfileItem as aT, type SdkPage as aU, type PaginatedSdkFunction as aV, AppKeyPropertySchema as aW, AppPropertySchema as aX, ActionTypePropertySchema as aY, ActionKeyPropertySchema as aZ, ActionPropertySchema as a_, type FieldsResolver as aa, runInMethodScope as ab, runWithTelemetryContext as ac, toSnakeCase as ad, toTitleCase as ae, batch as af, type BatchOptions as ag, buildCapabilityMessage as ah, logDeprecation as ai, resetDeprecationWarnings as aj, RelayRequestSchema as ak, RelayFetchSchema as al, createZapierSdkWithoutRegistry as am, createSdk as an, createOptionsPlugin as ao, createZapierCoreStack as ap, type FunctionRegistryEntry as aq, type FunctionDeprecation as ar, BaseSdkOptionsSchema as as, isCoreError as at, getCoreErrorCode as au, getCoreErrorCause as av, CORE_ERROR_SYMBOL as aw, CoreErrorCode as ax, type Plugin as ay, type PluginProvides as az, type Manifest as b, ZapierActionError as b$, ConnectionIdPropertySchema as b0, AuthenticationIdPropertySchema as b1, ConnectionPropertySchema as b2, InputsPropertySchema as b3, LimitPropertySchema as b4, OffsetPropertySchema as b5, OutputPropertySchema as b6, DebugPropertySchema as b7, ParamsPropertySchema as b8, ActionTimeoutMsPropertySchema as b9, type ParamsProperty as bA, type ActionTimeoutMsProperty as bB, type TableProperty as bC, type RecordProperty as bD, type RecordsProperty as bE, type FieldsProperty as bF, type AppsProperty as bG, type TablesProperty as bH, type ConnectionsProperty as bI, type TriggerInboxProperty as bJ, type TriggerInboxNameProperty as bK, type LeaseProperty as bL, type LeaseSecondsProperty as bM, type LeaseLimitProperty as bN, type ErrorOptions as bO, ZapierError as bP, ZapierValidationError as bQ, ZapierUnknownError as bR, ZapierAuthenticationError as bS, zapierAdaptError as bT, ZapierApiError as bU, ZapierAppNotFoundError as bV, ZapierNotFoundError as bW, ZapierResourceNotFoundError as bX, ZapierConfigurationError as bY, ZapierBundleError as bZ, ZapierTimeoutError as b_, TablePropertySchema as ba, RecordPropertySchema as bb, RecordsPropertySchema as bc, FieldsPropertySchema as bd, AppsPropertySchema as be, TablesPropertySchema as bf, ConnectionsPropertySchema as bg, TriggerInboxPropertySchema as bh, TriggerInboxNamePropertySchema as bi, LeasePropertySchema as bj, LeaseSecondsPropertySchema as bk, LeaseLimitPropertySchema as bl, type AppKeyProperty as bm, type AppProperty as bn, type ActionTypeProperty as bo, type ActionKeyProperty as bp, type ActionProperty as bq, type InputFieldProperty as br, type ConnectionIdProperty as bs, type ConnectionProperty as bt, type AuthenticationIdProperty as bu, type InputsProperty as bv, type LimitProperty as bw, type OffsetProperty as bx, type OutputProperty as by, type DebugProperty as bz, type UpdateManifestEntryResult as c, connectionIdResolver as c$, ZapierConflictError as c0, type RateLimitInfo as c1, ZapierRateLimitError as c2, type ApprovalStatus as c3, ZapierApprovalError as c4, ZapierRelayError as c5, formatErrorMessage as c6, type ApiError as c7, ZapierSignal as c8, appsPlugin as c9, type GetActionPluginProvides as cA, getConnectionPlugin as cB, type GetConnectionPluginProvides as cC, findFirstConnectionPlugin as cD, type FindFirstConnectionPluginProvides as cE, findUniqueConnectionPlugin as cF, type FindUniqueConnectionPluginProvides as cG, CONTEXT_CACHE_TTL_MS as cH, CONTEXT_CACHE_MAX_SIZE as cI, runActionPlugin as cJ, type RunActionPluginProvides as cK, requestPlugin as cL, type RequestPluginProvides as cM, type ManifestPluginOptions as cN, getPreferredManifestEntryKey as cO, manifestPlugin as cP, type ManifestPluginProvides as cQ, DEFAULT_CONFIG_PATH as cR, type ManifestEntry as cS, getProfilePlugin as cT, type GetProfilePluginProvides as cU, type ApiPluginOptions as cV, apiPlugin as cW, type ApiPluginProvides as cX, appKeyResolver as cY, actionTypeResolver as cZ, actionKeyResolver as c_, type AppsPluginProvides as ca, type ActionExecutionOptions as cb, type AppFactoryInput as cc, fetchPlugin as cd, type FetchPluginProvides as ce, listAppsPlugin as cf, type ListAppsPluginProvides as cg, listActionsPlugin as ch, type ListActionsPluginProvides as ci, listActionInputFieldsPlugin as cj, type ListActionInputFieldsPluginProvides as ck, listActionInputFieldChoicesPlugin as cl, type ListActionInputFieldChoicesPluginProvides as cm, getActionInputFieldsSchemaPlugin as cn, type GetActionInputFieldsSchemaPluginProvides as co, listConnectionsPlugin as cp, type ListConnectionsPluginProvides as cq, listClientCredentialsPlugin as cr, type ListClientCredentialsPluginProvides as cs, createClientCredentialsPlugin as ct, type CreateClientCredentialsPluginProvides as cu, deleteClientCredentialsPlugin as cv, type DeleteClientCredentialsPluginProvides as cw, getAppPlugin as cx, type GetAppPluginProvides as cy, getActionPlugin as cz, type AddActionEntryOptions as d, ConnectionsMapSchema as d$, connectionIdGenericResolver as d0, inputsResolver as d1, inputsAllOptionalResolver as d2, inputFieldKeyResolver as d3, clientCredentialsNameResolver as d4, clientIdResolver as d5, tableIdResolver as d6, triggerInboxResolver as d7, workflowIdResolver as d8, durableRunIdResolver as d9, type AuthEvent as dA, type ApiEvent as dB, type LoadingEvent as dC, type EventCallback as dD, type Credentials as dE, type ResolvedCredentials as dF, type CredentialsObject as dG, type ClientCredentialsObject as dH, type PkceCredentialsObject as dI, isClientCredentials as dJ, isPkceCredentials as dK, isCredentialsObject as dL, isCredentialsFunction as dM, type ResolveCredentialsOptions as dN, resolveCredentialsFromEnv as dO, resolveCredentials as dP, getBaseUrlFromCredentials as dQ, getClientIdFromCredentials as dR, ClientCredentialsObjectSchema as dS, PkceCredentialsObjectSchema as dT, CredentialsObjectSchema as dU, ResolvedCredentialsSchema as dV, CredentialsFunctionSchema as dW, type CredentialsFunction as dX, CredentialsSchema as dY, ConnectionEntrySchema as dZ, type ConnectionEntry as d_, workflowVersionIdResolver as da, workflowRunIdResolver as db, triggerMessagesResolver as dc, tableRecordIdResolver as dd, tableRecordIdsResolver as de, tableFieldIdsResolver as df, tableNameResolver as dg, tableFieldsResolver as dh, tableRecordsResolver as di, tableUpdateRecordsResolver as dj, tableFiltersResolver as dk, tableSortResolver as dl, type ResolveAuthTokenOptions as dm, clearTokenCache as dn, invalidateCachedToken as dp, injectCliLogin as dq, isCliLoginAvailable as dr, getTokenFromCliLogin as ds, resolveAuthToken as dt, invalidateCredentialsToken as du, type ZapierCache as dv, type ZapierCacheEntry as dw, type ZapierCacheSetOptions as dx, createMemoryCache as dy, type SdkEvent as dz, type AddActionEntryResult as e, getMemoryUsage as e$, type ConnectionsMap as e0, connectionsPlugin as e1, type ConnectionsPluginProvides as e2, ZAPIER_BASE_URL as e3, getZapierSdkService as e4, MAX_PAGE_LIMIT as e5, DEFAULT_PAGE_SIZE as e6, DEFAULT_ACTION_TIMEOUT_MS as e7, ZAPIER_MAX_NETWORK_RETRIES as e8, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS as e9, type CreateTableRecordsPluginProvides as eA, deleteTableRecordsPlugin as eB, type DeleteTableRecordsPluginProvides as eC, updateTableRecordsPlugin as eD, type UpdateTableRecordsPluginProvides as eE, cleanupEventListeners as eF, type EventEmissionConfig as eG, eventEmissionPlugin as eH, type EventEmissionProvides as eI, type EventContext as eJ, type ApplicationLifecycleEventData as eK, type EnhancedErrorEventData as eL, type MethodCalledEventData as eM, buildApplicationLifecycleEvent as eN, buildErrorEventWithContext as eO, buildErrorEvent as eP, createBaseEvent as eQ, buildMethodCalledEvent as eR, type BaseEvent as eS, type MethodCalledEvent as eT, generateEventId as eU, getCurrentTimestamp as eV, getReleaseId as eW, getOsInfo as eX, getPlatformVersions as eY, isCi as eZ, getCiPlatform as e_, MAX_CONCURRENCY_LIMIT as ea, parseConcurrencyEnvVar as eb, ZAPIER_MAX_CONCURRENT_REQUESTS as ec, getZapierApprovalMode as ed, getZapierDefaultApprovalMode as ee, DEFAULT_APPROVAL_TIMEOUT_MS as ef, DEFAULT_MAX_APPROVAL_RETRIES as eg, listTablesPlugin as eh, type ListTablesPluginProvides as ei, getTablePlugin as ej, type GetTablePluginProvides as ek, createTablePlugin as el, type CreateTablePluginProvides as em, deleteTablePlugin as en, type DeleteTablePluginProvides as eo, listTableFieldsPlugin as ep, type ListTableFieldsPluginProvides as eq, createTableFieldsPlugin as er, type CreateTableFieldsPluginProvides as es, deleteTableFieldsPlugin as et, type DeleteTableFieldsPluginProvides as eu, getTableRecordPlugin as ev, type GetTableRecordPluginProvides as ew, listTableRecordsPlugin as ex, type ListTableRecordsPluginProvides as ey, createTableRecordsPlugin as ez, type ActionEntry as f, getCpuTime as f0, createZapierSdk as f1, createZapierSdkStack as f2, type ZapierSdk as f3, findManifestEntry as g, type CapabilitiesContext as h, type PaginatedSdkResult as i, type PositionalMetadata as j, type ZapierFetchInitOptions as k, type DynamicResolver as l, type ActionProxy as m, type ZapierSdkApps as n, type WithAddPlugin as o, ZapierAbortDrainSignal as p, ZapierReleaseTriggerMessageSignal as q, readManifestFromFile as r, type DrainTriggerInboxCallback as s, type DrainTriggerInboxErrorObserver as t, type ListAuthenticationsPluginProvides as u, type FindFirstAuthenticationPluginProvides as v, type FindUniqueAuthenticationPluginProvides as w, type Action as x, type App as y, type Field as z };
|
|
15270
|
+
export { createFunction as $, type ApiClient as A, type BaseSdkOptions as B, type CoreOptions as C, type DrainTriggerInboxOptions as D, type EventEmissionContext as E, type FieldsetItem as F, type GetAuthenticationPluginProvides as G, type Choice as H, type ActionExecutionResult as I, type ActionField as J, type ActionFieldChoice as K, type LeasedTriggerMessageItem as L, type MethodHooks as M, type Need as N, type OutputFormatter as O, type PluginStack as P, type NeedsRequest as Q, type ResolvedAppLocator as R, type NeedsResponse as S, type TriggerMessageStatus as T, type UpdateManifestEntryOptions as U, type Connection as V, type WatchTriggerInboxOptions as W, type ConnectionsResponse as X, type UserProfile as Y, type ZapierSdkOptions as Z, isPositional as _, type PluginMeta as a, ActionPropertySchema as a$, createPluginStack as a0, createCorePlugin as a1, addPlugin as a2, type FormattedItem as a3, type Resolver as a4, type ArrayResolver as a5, type ResolverMetadata as a6, type StaticResolver as a7, type DynamicListResolver as a8, type DynamicSearchResolver as a9, definePlugin as aA, createPluginMethod as aB, createPaginatedPluginMethod as aC, composePlugins as aD, type ActionItem as aE, type ActionTypeItem as aF, registryPlugin as aG, type RequestOptions as aH, type PollOptions as aI, createZapierApi as aJ, getOrCreateApiClient as aK, isPermanentHttpError as aL, type SseMessage as aM, type JsonSseMessage as aN, type AppItem as aO, type ConnectionItem as aP, type ActionItem$1 as aQ, type InputFieldItem as aR, type InfoFieldItem as aS, type RootFieldItem as aT, type UserProfileItem as aU, type SdkPage as aV, type PaginatedSdkFunction as aW, AppKeyPropertySchema as aX, AppPropertySchema as aY, ActionTypePropertySchema as aZ, ActionKeyPropertySchema as a_, type FieldsResolver as aa, runInMethodScope as ab, runWithTelemetryContext as ac, toSnakeCase as ad, toTitleCase as ae, batch as af, type BatchOptions as ag, buildCapabilityMessage as ah, logDeprecation as ai, resetDeprecationWarnings as aj, RelayRequestSchema as ak, RelayFetchSchema as al, createZapierSdkWithoutRegistry as am, createSdk as an, createOptionsPlugin as ao, createZapierCoreStack as ap, type FunctionRegistryEntry as aq, type FunctionDeprecation as ar, BaseSdkOptionsSchema as as, isCoreError as at, getCoreErrorCode as au, getCoreErrorCause as av, CORE_ERROR_SYMBOL as aw, CoreErrorCode as ax, type Plugin as ay, type PluginProvides as az, type Manifest as b, ZapierTimeoutError as b$, InputFieldPropertySchema as b0, ConnectionIdPropertySchema as b1, AuthenticationIdPropertySchema as b2, ConnectionPropertySchema as b3, InputsPropertySchema as b4, LimitPropertySchema as b5, OffsetPropertySchema as b6, OutputPropertySchema as b7, DebugPropertySchema as b8, ParamsPropertySchema as b9, type DebugProperty as bA, type ParamsProperty as bB, type ActionTimeoutMsProperty as bC, type TableProperty as bD, type RecordProperty as bE, type RecordsProperty as bF, type FieldsProperty as bG, type AppsProperty as bH, type TablesProperty as bI, type ConnectionsProperty as bJ, type TriggerInboxProperty as bK, type TriggerInboxNameProperty as bL, type LeaseProperty as bM, type LeaseSecondsProperty as bN, type LeaseLimitProperty as bO, type ErrorOptions as bP, ZapierError as bQ, ZapierValidationError as bR, ZapierUnknownError as bS, ZapierAuthenticationError as bT, zapierAdaptError as bU, ZapierApiError as bV, ZapierAppNotFoundError as bW, ZapierNotFoundError as bX, ZapierResourceNotFoundError as bY, ZapierConfigurationError as bZ, ZapierBundleError as b_, ActionTimeoutMsPropertySchema as ba, TablePropertySchema as bb, RecordPropertySchema as bc, RecordsPropertySchema as bd, FieldsPropertySchema as be, AppsPropertySchema as bf, TablesPropertySchema as bg, ConnectionsPropertySchema as bh, TriggerInboxPropertySchema as bi, TriggerInboxNamePropertySchema as bj, LeasePropertySchema as bk, LeaseSecondsPropertySchema as bl, LeaseLimitPropertySchema as bm, type AppKeyProperty as bn, type AppProperty as bo, type ActionTypeProperty as bp, type ActionKeyProperty as bq, type ActionProperty as br, type InputFieldProperty as bs, type ConnectionIdProperty as bt, type ConnectionProperty as bu, type AuthenticationIdProperty as bv, type InputsProperty as bw, type LimitProperty as bx, type OffsetProperty as by, type OutputProperty as bz, type UpdateManifestEntryResult as c, actionKeyResolver as c$, ZapierActionError as c0, ZapierConflictError as c1, type RateLimitInfo as c2, ZapierRateLimitError as c3, type ApprovalStatus as c4, ZapierApprovalError as c5, ZapierRelayError as c6, formatErrorMessage as c7, type ApiError as c8, ZapierSignal as c9, getActionPlugin as cA, type GetActionPluginProvides as cB, getConnectionPlugin as cC, type GetConnectionPluginProvides as cD, findFirstConnectionPlugin as cE, type FindFirstConnectionPluginProvides as cF, findUniqueConnectionPlugin as cG, type FindUniqueConnectionPluginProvides as cH, CONTEXT_CACHE_TTL_MS as cI, CONTEXT_CACHE_MAX_SIZE as cJ, runActionPlugin as cK, type RunActionPluginProvides as cL, requestPlugin as cM, type RequestPluginProvides as cN, type ManifestPluginOptions as cO, getPreferredManifestEntryKey as cP, manifestPlugin as cQ, type ManifestPluginProvides as cR, DEFAULT_CONFIG_PATH as cS, type ManifestEntry as cT, getProfilePlugin as cU, type GetProfilePluginProvides as cV, type ApiPluginOptions as cW, apiPlugin as cX, type ApiPluginProvides as cY, appKeyResolver as cZ, actionTypeResolver as c_, appsPlugin as ca, type AppsPluginProvides as cb, type ActionExecutionOptions as cc, type AppFactoryInput as cd, fetchPlugin as ce, type FetchPluginProvides as cf, listAppsPlugin as cg, type ListAppsPluginProvides as ch, listActionsPlugin as ci, type ListActionsPluginProvides as cj, listActionInputFieldsPlugin as ck, type ListActionInputFieldsPluginProvides as cl, listActionInputFieldChoicesPlugin as cm, type ListActionInputFieldChoicesPluginProvides as cn, getActionInputFieldsSchemaPlugin as co, type GetActionInputFieldsSchemaPluginProvides as cp, listConnectionsPlugin as cq, type ListConnectionsPluginProvides as cr, listClientCredentialsPlugin as cs, type ListClientCredentialsPluginProvides as ct, createClientCredentialsPlugin as cu, type CreateClientCredentialsPluginProvides as cv, deleteClientCredentialsPlugin as cw, type DeleteClientCredentialsPluginProvides as cx, getAppPlugin as cy, type GetAppPluginProvides as cz, type AddActionEntryOptions as d, type ConnectionEntry as d$, connectionIdResolver as d0, connectionIdGenericResolver as d1, inputsResolver as d2, inputsAllOptionalResolver as d3, inputFieldKeyResolver as d4, clientCredentialsNameResolver as d5, clientIdResolver as d6, tableIdResolver as d7, triggerInboxResolver as d8, workflowIdResolver as d9, type SdkEvent as dA, type AuthEvent as dB, type ApiEvent as dC, type LoadingEvent as dD, type EventCallback as dE, type Credentials as dF, type ResolvedCredentials as dG, type CredentialsObject as dH, type ClientCredentialsObject as dI, type PkceCredentialsObject as dJ, isClientCredentials as dK, isPkceCredentials as dL, isCredentialsObject as dM, isCredentialsFunction as dN, type ResolveCredentialsOptions as dO, resolveCredentialsFromEnv as dP, resolveCredentials as dQ, getBaseUrlFromCredentials as dR, getClientIdFromCredentials as dS, ClientCredentialsObjectSchema as dT, PkceCredentialsObjectSchema as dU, CredentialsObjectSchema as dV, ResolvedCredentialsSchema as dW, CredentialsFunctionSchema as dX, type CredentialsFunction as dY, CredentialsSchema as dZ, ConnectionEntrySchema as d_, durableRunIdResolver as da, workflowVersionIdResolver as db, workflowRunIdResolver as dc, triggerMessagesResolver as dd, tableRecordIdResolver as de, tableRecordIdsResolver as df, tableFieldIdsResolver as dg, tableNameResolver as dh, tableFieldsResolver as di, tableRecordsResolver as dj, tableUpdateRecordsResolver as dk, tableFiltersResolver as dl, tableSortResolver as dm, type ResolveAuthTokenOptions as dn, clearTokenCache as dp, invalidateCachedToken as dq, injectCliLogin as dr, isCliLoginAvailable as ds, getTokenFromCliLogin as dt, resolveAuthToken as du, invalidateCredentialsToken as dv, type ZapierCache as dw, type ZapierCacheEntry as dx, type ZapierCacheSetOptions as dy, createMemoryCache as dz, type AddActionEntryResult as e, getCiPlatform as e$, ConnectionsMapSchema as e0, type ConnectionsMap as e1, connectionsPlugin as e2, type ConnectionsPluginProvides as e3, ZAPIER_BASE_URL as e4, getZapierSdkService as e5, MAX_PAGE_LIMIT as e6, DEFAULT_PAGE_SIZE as e7, DEFAULT_ACTION_TIMEOUT_MS as e8, ZAPIER_MAX_NETWORK_RETRIES as e9, createTableRecordsPlugin as eA, type CreateTableRecordsPluginProvides as eB, deleteTableRecordsPlugin as eC, type DeleteTableRecordsPluginProvides as eD, updateTableRecordsPlugin as eE, type UpdateTableRecordsPluginProvides as eF, cleanupEventListeners as eG, type EventEmissionConfig as eH, eventEmissionPlugin as eI, type EventEmissionProvides as eJ, type EventContext as eK, type ApplicationLifecycleEventData as eL, type EnhancedErrorEventData as eM, type MethodCalledEventData as eN, buildApplicationLifecycleEvent as eO, buildErrorEventWithContext as eP, buildErrorEvent as eQ, createBaseEvent as eR, buildMethodCalledEvent as eS, type BaseEvent as eT, type MethodCalledEvent as eU, generateEventId as eV, getCurrentTimestamp as eW, getReleaseId as eX, getOsInfo as eY, getPlatformVersions as eZ, isCi as e_, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS as ea, MAX_CONCURRENCY_LIMIT as eb, parseConcurrencyEnvVar as ec, ZAPIER_MAX_CONCURRENT_REQUESTS as ed, getZapierApprovalMode as ee, getZapierDefaultApprovalMode as ef, DEFAULT_APPROVAL_TIMEOUT_MS as eg, DEFAULT_MAX_APPROVAL_RETRIES as eh, listTablesPlugin as ei, type ListTablesPluginProvides as ej, getTablePlugin as ek, type GetTablePluginProvides as el, createTablePlugin as em, type CreateTablePluginProvides as en, deleteTablePlugin as eo, type DeleteTablePluginProvides as ep, listTableFieldsPlugin as eq, type ListTableFieldsPluginProvides as er, createTableFieldsPlugin as es, type CreateTableFieldsPluginProvides as et, deleteTableFieldsPlugin as eu, type DeleteTableFieldsPluginProvides as ev, getTableRecordPlugin as ew, type GetTableRecordPluginProvides as ex, listTableRecordsPlugin as ey, type ListTableRecordsPluginProvides as ez, type ActionEntry as f, getMemoryUsage as f0, getCpuTime as f1, createZapierSdk as f2, createZapierSdkStack as f3, type ZapierSdk as f4, findManifestEntry as g, type CapabilitiesContext as h, type PaginatedSdkResult as i, type PositionalMetadata as j, type ZapierFetchInitOptions as k, type DynamicResolver as l, type ActionProxy as m, type ZapierSdkApps as n, type WithAddPlugin as o, ZapierAbortDrainSignal as p, ZapierReleaseTriggerMessageSignal as q, readManifestFromFile as r, type DrainTriggerInboxCallback as s, type DrainTriggerInboxErrorObserver as t, type ListAuthenticationsPluginProvides as u, type FindFirstAuthenticationPluginProvides as v, type FindUniqueAuthenticationPluginProvides as w, type Action as x, type App as y, type Field as z };
|
package/dist/index.cjs
CHANGED
|
@@ -6488,13 +6488,16 @@ async function exchangeClientCredentials(options) {
|
|
|
6488
6488
|
},
|
|
6489
6489
|
timestamp: Date.now()
|
|
6490
6490
|
});
|
|
6491
|
-
throw new
|
|
6492
|
-
`Client credentials exchange failed: ${response.status} ${response.statusText}
|
|
6491
|
+
throw new ZapierAuthenticationError(
|
|
6492
|
+
`Client credentials exchange failed: ${response.status} ${response.statusText}`,
|
|
6493
|
+
{ statusCode: response.status }
|
|
6493
6494
|
);
|
|
6494
6495
|
}
|
|
6495
6496
|
const data = await response.json();
|
|
6496
6497
|
if (!data.access_token) {
|
|
6497
|
-
throw new
|
|
6498
|
+
throw new ZapierAuthenticationError(
|
|
6499
|
+
"Client credentials response missing access_token"
|
|
6500
|
+
);
|
|
6498
6501
|
}
|
|
6499
6502
|
onEvent?.({
|
|
6500
6503
|
type: "auth_success",
|
|
@@ -6717,6 +6720,17 @@ async function invalidateCredentialsToken(options) {
|
|
|
6717
6720
|
}
|
|
6718
6721
|
|
|
6719
6722
|
// src/api/sse-parser.ts
|
|
6723
|
+
async function* jsonFrames(source) {
|
|
6724
|
+
for await (const { data } of source) {
|
|
6725
|
+
let frame;
|
|
6726
|
+
try {
|
|
6727
|
+
frame = { parsed: true, data: JSON.parse(data), raw: data };
|
|
6728
|
+
} catch {
|
|
6729
|
+
frame = { parsed: false, data: null, raw: data };
|
|
6730
|
+
}
|
|
6731
|
+
yield frame;
|
|
6732
|
+
}
|
|
6733
|
+
}
|
|
6720
6734
|
function createSseParserStream() {
|
|
6721
6735
|
let buffer = "";
|
|
6722
6736
|
let data = "";
|
|
@@ -6764,7 +6778,7 @@ function createSseParserStream() {
|
|
|
6764
6778
|
}
|
|
6765
6779
|
|
|
6766
6780
|
// src/sdk-version.ts
|
|
6767
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
6781
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.0" : void 0) || "unknown";
|
|
6768
6782
|
|
|
6769
6783
|
// src/utils/open-url.ts
|
|
6770
6784
|
var nodePrefix = "node:";
|
|
@@ -7139,6 +7153,15 @@ var ZapierApiClient = class {
|
|
|
7139
7153
|
* never pins a slot — see `withSemaphore`.
|
|
7140
7154
|
*/
|
|
7141
7155
|
this.fetchStream = (path, init) => this.streamSse(path, init);
|
|
7156
|
+
/**
|
|
7157
|
+
* Like `fetchStream`, but parses each frame's `data` as JSON. Diverges from
|
|
7158
|
+
* `fetchJson` deliberately: that throws on invalid JSON, but a long-lived
|
|
7159
|
+
* stream must survive a single malformed frame, so a parse failure is yielded
|
|
7160
|
+
* as `{ parsed: false, data: null, raw }` rather than thrown. A non-ok
|
|
7161
|
+
* response still throws the shared `ZapierError` (from `fetchStream`, before
|
|
7162
|
+
* any frame), so transport / auth failures surface as usual.
|
|
7163
|
+
*/
|
|
7164
|
+
this.fetchJsonStream = (path, init) => jsonFrames(this.fetchStream(path, init));
|
|
7142
7165
|
this.get = async (path, options = {}) => {
|
|
7143
7166
|
return this.fetchJson("GET", path, void 0, options);
|
|
7144
7167
|
};
|
|
@@ -7704,7 +7727,11 @@ var createZapierApi = (options) => {
|
|
|
7704
7727
|
|
|
7705
7728
|
// src/api/error-classification.ts
|
|
7706
7729
|
function isPermanentHttpError(err) {
|
|
7707
|
-
|
|
7730
|
+
if (!(err instanceof ZapierError)) return false;
|
|
7731
|
+
if (err instanceof ZapierAuthenticationError && err.statusCode === void 0) {
|
|
7732
|
+
return true;
|
|
7733
|
+
}
|
|
7734
|
+
const { statusCode } = err;
|
|
7708
7735
|
return statusCode !== void 0 && statusCode >= 400 && statusCode < 500 && statusCode !== 429;
|
|
7709
7736
|
}
|
|
7710
7737
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { x as Action, f as ActionEntry, cb as ActionExecutionOptions, I as ActionExecutionResult, J as ActionField, K as ActionFieldChoice, aP as ActionItem, bp as ActionKeyProperty, aZ as ActionKeyPropertySchema, bq as ActionProperty, a_ as ActionPropertySchema, aE as ActionResolverItem, bB as ActionTimeoutMsProperty, b9 as ActionTimeoutMsPropertySchema, aF as ActionTypeItem, bo as ActionTypeProperty, aY as ActionTypePropertySchema, d as AddActionEntryOptions, e as AddActionEntryResult, A as ApiClient, c7 as ApiError, dB as ApiEvent, cV as ApiPluginOptions, cX as ApiPluginProvides, y as App, cc as AppFactoryInput, aN as AppItem, bm as AppKeyProperty, aW as AppKeyPropertySchema, bn as AppProperty, aX as AppPropertySchema, eK as ApplicationLifecycleEventData, c3 as ApprovalStatus, ca as AppsPluginProvides, bG as AppsProperty, be as AppsPropertySchema, a5 as ArrayResolver, dA as AuthEvent, bu as AuthenticationIdProperty, b1 as AuthenticationIdPropertySchema, eS as BaseEvent, as as BaseSdkOptionsSchema, ag as BatchOptions, cI as CONTEXT_CACHE_MAX_SIZE, cH as CONTEXT_CACHE_TTL_MS, aw as CORE_ERROR_SYMBOL, H as Choice, dH as ClientCredentialsObject, dS as ClientCredentialsObjectSchema, V as Connection, d_ as ConnectionEntry, dZ as ConnectionEntrySchema, bs as ConnectionIdProperty, b0 as ConnectionIdPropertySchema, aO as ConnectionItem, bt as ConnectionProperty, b2 as ConnectionPropertySchema, e0 as ConnectionsMap, d$ as ConnectionsMapSchema, e2 as ConnectionsPluginProvides, bI as ConnectionsProperty, bg as ConnectionsPropertySchema, X as ConnectionsResponse, ax as CoreErrorCode, cu as CreateClientCredentialsPluginProvides, es as CreateTableFieldsPluginProvides, em as CreateTablePluginProvides, eA as CreateTableRecordsPluginProvides, dE as Credentials, dX as CredentialsFunction, dW as CredentialsFunctionSchema, dG as CredentialsObject, dU as CredentialsObjectSchema, dY as CredentialsSchema, e7 as DEFAULT_ACTION_TIMEOUT_MS, ef as DEFAULT_APPROVAL_TIMEOUT_MS, cR as DEFAULT_CONFIG_PATH, eg as DEFAULT_MAX_APPROVAL_RETRIES, e6 as DEFAULT_PAGE_SIZE, bz as DebugProperty, b7 as DebugPropertySchema, cw as DeleteClientCredentialsPluginProvides, eu as DeleteTableFieldsPluginProvides, eo as DeleteTablePluginProvides, eC as DeleteTableRecordsPluginProvides, s as DrainTriggerInboxCallback, t as DrainTriggerInboxErrorObserver, D as DrainTriggerInboxOptions, a8 as DynamicListResolver, l as DynamicResolver, a9 as DynamicSearchResolver, eL as EnhancedErrorEventData, bO as ErrorOptions, dD as EventCallback, eJ as EventContext, eG as EventEmissionConfig, E as EventEmissionContext, eI as EventEmissionProvides, ce as FetchPluginProvides, z as Field, bF as FieldsProperty, bd as FieldsPropertySchema, aa as FieldsResolver, F as FieldsetItem, v as FindFirstAuthenticationPluginProvides, cE as FindFirstConnectionPluginProvides, w as FindUniqueAuthenticationPluginProvides, cG as FindUniqueConnectionPluginProvides, a3 as FormattedItem, ar as FunctionDeprecation, aq as FunctionRegistryEntry, co as GetActionInputFieldsSchemaPluginProvides, cA as GetActionPluginProvides, cy as GetAppPluginProvides, G as GetAuthenticationPluginProvides, cC as GetConnectionPluginProvides, cU as GetProfilePluginProvides, ek as GetTablePluginProvides, ew as GetTableRecordPluginProvides, aR as InfoFieldItem, aQ as InputFieldItem, br as InputFieldProperty, a$ as InputFieldPropertySchema, bv as InputsProperty, b3 as InputsPropertySchema, bN as LeaseLimitProperty, bl as LeaseLimitPropertySchema, bL as LeaseProperty, bj as LeasePropertySchema, bM as LeaseSecondsProperty, bk as LeaseSecondsPropertySchema, L as LeasedTriggerMessageItem, bw as LimitProperty, b4 as LimitPropertySchema, cm as ListActionInputFieldChoicesPluginProvides, ck as ListActionInputFieldsPluginProvides, ci as ListActionsPluginProvides, cg as ListAppsPluginProvides, u as ListAuthenticationsPluginProvides, cs as ListClientCredentialsPluginProvides, cq as ListConnectionsPluginProvides, eq as ListTableFieldsPluginProvides, ey as ListTableRecordsPluginProvides, ei as ListTablesPluginProvides, dC as LoadingEvent, ea as MAX_CONCURRENCY_LIMIT, e5 as MAX_PAGE_LIMIT, b as Manifest, cS as ManifestEntry, cN as ManifestPluginOptions, cQ as ManifestPluginProvides, eT as MethodCalledEvent, eM as MethodCalledEventData, N as Need, Q as NeedsRequest, S as NeedsResponse, bx as OffsetProperty, b5 as OffsetPropertySchema, O as OutputFormatter, by as OutputProperty, b6 as OutputPropertySchema, aV as PaginatedSdkFunction, i as PaginatedSdkResult, bA as ParamsProperty, b8 as ParamsPropertySchema, dI as PkceCredentialsObject, dT as PkceCredentialsObjectSchema, ay as Plugin, a as PluginMeta, az as PluginProvides, aI as PollOptions, j as PositionalMetadata, c1 as RateLimitInfo, bD as RecordProperty, bb as RecordPropertySchema, bE as RecordsProperty, bc as RecordsPropertySchema, al as RelayFetchSchema, ak as RelayRequestSchema, aH as RequestOptions, cM as RequestPluginProvides, dm as ResolveAuthTokenOptions, dN as ResolveCredentialsOptions, R as ResolvedAppLocator, dF as ResolvedCredentials, dV as ResolvedCredentialsSchema, a4 as Resolver, a6 as ResolverMetadata, aS as RootFieldItem, cK as RunActionPluginProvides, dz as SdkEvent, aU as SdkPage, aM as SseMessage, a7 as StaticResolver, bC as TableProperty, ba as TablePropertySchema, bH as TablesProperty, bf as TablesPropertySchema, bK as TriggerInboxNameProperty, bi as TriggerInboxNamePropertySchema, bJ as TriggerInboxProperty, bh as TriggerInboxPropertySchema, T as TriggerMessageStatus, U as UpdateManifestEntryOptions, c as UpdateManifestEntryResult, eE as UpdateTableRecordsPluginProvides, Y as UserProfile, aT as UserProfileItem, W as WatchTriggerInboxOptions, o as WithAddPlugin, e3 as ZAPIER_BASE_URL, ec as ZAPIER_MAX_CONCURRENT_REQUESTS, e8 as ZAPIER_MAX_NETWORK_RETRIES, e9 as ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, p as ZapierAbortDrainSignal, b$ as ZapierActionError, bU as ZapierApiError, bV as ZapierAppNotFoundError, c4 as ZapierApprovalError, bS as ZapierAuthenticationError, bZ as ZapierBundleError, dv as ZapierCache, dw as ZapierCacheEntry, dx as ZapierCacheSetOptions, bY as ZapierConfigurationError, c0 as ZapierConflictError, bP as ZapierError, k as ZapierFetchInitOptions, bW as ZapierNotFoundError, c2 as ZapierRateLimitError, c5 as ZapierRelayError, q as ZapierReleaseTriggerMessageSignal, bX as ZapierResourceNotFoundError, f3 as ZapierSdk, n as ZapierSdkApps, Z as ZapierSdkOptions, c8 as ZapierSignal, b_ as ZapierTimeoutError, bR as ZapierUnknownError, bQ as ZapierValidationError, c_ as actionKeyResolver, cZ as actionTypeResolver, a2 as addPlugin, cW as apiPlugin, cY as appKeyResolver, c9 as appsPlugin, d0 as authenticationIdGenericResolver, c$ as authenticationIdResolver, af as batch, eN as buildApplicationLifecycleEvent, ah as buildCapabilityMessage, eP as buildErrorEvent, eO as buildErrorEventWithContext, eR as buildMethodCalledEvent, eF as cleanupEventListeners, dn as clearTokenCache, d4 as clientCredentialsNameResolver, d5 as clientIdResolver, aD as composePlugins, d0 as connectionIdGenericResolver, c$ as connectionIdResolver, e1 as connectionsPlugin, eQ as createBaseEvent, ct as createClientCredentialsPlugin, a1 as createCorePlugin, $ as createFunction, dy as createMemoryCache, ao as createOptionsPlugin, aC as createPaginatedPluginMethod, aB as createPluginMethod, a0 as createPluginStack, an as createSdk, er as createTableFieldsPlugin, el as createTablePlugin, ez as createTableRecordsPlugin, aJ as createZapierApi, ap as createZapierCoreStack, f1 as createZapierSdk, f2 as createZapierSdkStack, am as createZapierSdkWithoutRegistry, aA as definePlugin, cv as deleteClientCredentialsPlugin, et as deleteTableFieldsPlugin, en as deleteTablePlugin, eB as deleteTableRecordsPlugin, d9 as durableRunIdResolver, eH as eventEmissionPlugin, cd as fetchPlugin, cD as findFirstConnectionPlugin, g as findManifestEntry, cF as findUniqueConnectionPlugin, c6 as formatErrorMessage, eU as generateEventId, cn as getActionInputFieldsSchemaPlugin, cz as getActionPlugin, cx as getAppPlugin, dQ as getBaseUrlFromCredentials, e_ as getCiPlatform, dR as getClientIdFromCredentials, cB as getConnectionPlugin, av as getCoreErrorCause, au as getCoreErrorCode, f0 as getCpuTime, eV as getCurrentTimestamp, e$ as getMemoryUsage, aK as getOrCreateApiClient, eX as getOsInfo, eY as getPlatformVersions, cO as getPreferredManifestEntryKey, cT as getProfilePlugin, eW as getReleaseId, ej as getTablePlugin, ev as getTableRecordPlugin, ds as getTokenFromCliLogin, ed as getZapierApprovalMode, ee as getZapierDefaultApprovalMode, e4 as getZapierSdkService, dq as injectCliLogin, d3 as inputFieldKeyResolver, d2 as inputsAllOptionalResolver, d1 as inputsResolver, dp as invalidateCachedToken, du as invalidateCredentialsToken, eZ as isCi, dr as isCliLoginAvailable, dJ as isClientCredentials, at as isCoreError, dM as isCredentialsFunction, dL as isCredentialsObject, aL as isPermanentHttpError, dK as isPkceCredentials, _ as isPositional, cl as listActionInputFieldChoicesPlugin, cj as listActionInputFieldsPlugin, ch as listActionsPlugin, cf as listAppsPlugin, cr as listClientCredentialsPlugin, cp as listConnectionsPlugin, ep as listTableFieldsPlugin, ex as listTableRecordsPlugin, eh as listTablesPlugin, ai as logDeprecation, cP as manifestPlugin, eb as parseConcurrencyEnvVar, r as readManifestFromFile, aG as registryPlugin, cL as requestPlugin, aj as resetDeprecationWarnings, dt as resolveAuthToken, dP as resolveCredentials, dO as resolveCredentialsFromEnv, cJ as runActionPlugin, ab as runInMethodScope, ac as runWithTelemetryContext, df as tableFieldIdsResolver, dh as tableFieldsResolver, dk as tableFiltersResolver, d6 as tableIdResolver, dg as tableNameResolver, dd as tableRecordIdResolver, de as tableRecordIdsResolver, di as tableRecordsResolver, dl as tableSortResolver, dj as tableUpdateRecordsResolver, ad as toSnakeCase, ae as toTitleCase, d7 as triggerInboxResolver, dc as triggerMessagesResolver, eD as updateTableRecordsPlugin, d8 as workflowIdResolver, db as workflowRunIdResolver, da as workflowVersionIdResolver, bT as zapierAdaptError } from './index-DuFFW71E.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-C0bQ5snd.mjs';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import 'zod/v4/core';
|
|
4
4
|
import '@zapier/zapier-sdk-core/v0/schemas/connections';
|
package/dist/index.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export { registryPlugin } from "./plugins/registry";
|
|
|
73
73
|
export type { ApiClient, RequestOptions, PollOptions } from "./api/types";
|
|
74
74
|
export { createZapierApi, getOrCreateApiClient } from "./api";
|
|
75
75
|
export { isPermanentHttpError } from "./api";
|
|
76
|
-
export type { SseMessage } from "./api";
|
|
76
|
+
export type { SseMessage, JsonSseMessage } from "./api";
|
|
77
77
|
export type { ZapierSdk } from "./sdk";
|
|
78
78
|
export * from "./plugins/eventEmission";
|
|
79
79
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,sBAAsB,EACtB,iCAAiC,GAClC,MAAM,8CAA8C,CAAC;AACtD,YAAY,EACV,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,8CAA8C,CAAC;AACtD,YAAY,EACV,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cA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BAA2B,EAC3B,cAAc,GACf,MAAM,SAAS,CAAC;AAKjB,YAAY,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC9E,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG/D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC7C,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGxD,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,cAAc,yBAAyB,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -6486,13 +6486,16 @@ async function exchangeClientCredentials(options) {
|
|
|
6486
6486
|
},
|
|
6487
6487
|
timestamp: Date.now()
|
|
6488
6488
|
});
|
|
6489
|
-
throw new
|
|
6490
|
-
`Client credentials exchange failed: ${response.status} ${response.statusText}
|
|
6489
|
+
throw new ZapierAuthenticationError(
|
|
6490
|
+
`Client credentials exchange failed: ${response.status} ${response.statusText}`,
|
|
6491
|
+
{ statusCode: response.status }
|
|
6491
6492
|
);
|
|
6492
6493
|
}
|
|
6493
6494
|
const data = await response.json();
|
|
6494
6495
|
if (!data.access_token) {
|
|
6495
|
-
throw new
|
|
6496
|
+
throw new ZapierAuthenticationError(
|
|
6497
|
+
"Client credentials response missing access_token"
|
|
6498
|
+
);
|
|
6496
6499
|
}
|
|
6497
6500
|
onEvent?.({
|
|
6498
6501
|
type: "auth_success",
|
|
@@ -6715,6 +6718,17 @@ async function invalidateCredentialsToken(options) {
|
|
|
6715
6718
|
}
|
|
6716
6719
|
|
|
6717
6720
|
// src/api/sse-parser.ts
|
|
6721
|
+
async function* jsonFrames(source) {
|
|
6722
|
+
for await (const { data } of source) {
|
|
6723
|
+
let frame;
|
|
6724
|
+
try {
|
|
6725
|
+
frame = { parsed: true, data: JSON.parse(data), raw: data };
|
|
6726
|
+
} catch {
|
|
6727
|
+
frame = { parsed: false, data: null, raw: data };
|
|
6728
|
+
}
|
|
6729
|
+
yield frame;
|
|
6730
|
+
}
|
|
6731
|
+
}
|
|
6718
6732
|
function createSseParserStream() {
|
|
6719
6733
|
let buffer = "";
|
|
6720
6734
|
let data = "";
|
|
@@ -6762,7 +6776,7 @@ function createSseParserStream() {
|
|
|
6762
6776
|
}
|
|
6763
6777
|
|
|
6764
6778
|
// src/sdk-version.ts
|
|
6765
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
6779
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.0" : void 0) || "unknown";
|
|
6766
6780
|
|
|
6767
6781
|
// src/utils/open-url.ts
|
|
6768
6782
|
var nodePrefix = "node:";
|
|
@@ -7137,6 +7151,15 @@ var ZapierApiClient = class {
|
|
|
7137
7151
|
* never pins a slot — see `withSemaphore`.
|
|
7138
7152
|
*/
|
|
7139
7153
|
this.fetchStream = (path, init) => this.streamSse(path, init);
|
|
7154
|
+
/**
|
|
7155
|
+
* Like `fetchStream`, but parses each frame's `data` as JSON. Diverges from
|
|
7156
|
+
* `fetchJson` deliberately: that throws on invalid JSON, but a long-lived
|
|
7157
|
+
* stream must survive a single malformed frame, so a parse failure is yielded
|
|
7158
|
+
* as `{ parsed: false, data: null, raw }` rather than thrown. A non-ok
|
|
7159
|
+
* response still throws the shared `ZapierError` (from `fetchStream`, before
|
|
7160
|
+
* any frame), so transport / auth failures surface as usual.
|
|
7161
|
+
*/
|
|
7162
|
+
this.fetchJsonStream = (path, init) => jsonFrames(this.fetchStream(path, init));
|
|
7140
7163
|
this.get = async (path, options = {}) => {
|
|
7141
7164
|
return this.fetchJson("GET", path, void 0, options);
|
|
7142
7165
|
};
|
|
@@ -7702,7 +7725,11 @@ var createZapierApi = (options) => {
|
|
|
7702
7725
|
|
|
7703
7726
|
// src/api/error-classification.ts
|
|
7704
7727
|
function isPermanentHttpError(err) {
|
|
7705
|
-
|
|
7728
|
+
if (!(err instanceof ZapierError)) return false;
|
|
7729
|
+
if (err instanceof ZapierAuthenticationError && err.statusCode === void 0) {
|
|
7730
|
+
return true;
|
|
7731
|
+
}
|
|
7732
|
+
const { statusCode } = err;
|
|
7706
7733
|
return statusCode !== void 0 && statusCode >= 400 && statusCode < 500 && statusCode !== 429;
|
|
7707
7734
|
}
|
|
7708
7735
|
|
|
@@ -24,6 +24,7 @@ export declare const createWorkflowPlugin: (sdk: {
|
|
|
24
24
|
createWorkflow: (options?: {
|
|
25
25
|
name: string;
|
|
26
26
|
description?: string | undefined;
|
|
27
|
+
is_private?: boolean | undefined;
|
|
27
28
|
} | undefined) => Promise<{
|
|
28
29
|
data: {
|
|
29
30
|
id: string;
|
|
@@ -31,6 +32,8 @@ export declare const createWorkflowPlugin: (sdk: {
|
|
|
31
32
|
description: string | null;
|
|
32
33
|
trigger_url: string;
|
|
33
34
|
enabled: boolean;
|
|
35
|
+
is_private: boolean;
|
|
36
|
+
created_by_user_id: string | null;
|
|
34
37
|
created_at: string;
|
|
35
38
|
};
|
|
36
39
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/createWorkflow/index.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/createWorkflow/index.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBhC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,oBAAoB,CAC5B,CAAC"}
|
|
@@ -13,6 +13,9 @@ export const createWorkflowPlugin = definePlugin((sdk) => createPluginMethod(sdk
|
|
|
13
13
|
if (options.description !== undefined) {
|
|
14
14
|
body.description = options.description;
|
|
15
15
|
}
|
|
16
|
+
if (options.is_private !== undefined) {
|
|
17
|
+
body.is_private = options.is_private;
|
|
18
|
+
}
|
|
16
19
|
const data = await sdk.context.api.post("/durableworkflowzaps/api/v0/workflows", body, { authRequired: true });
|
|
17
20
|
return { data };
|
|
18
21
|
},
|
|
@@ -2,6 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const CreateWorkflowOptionsSchema: z.ZodObject<{
|
|
3
3
|
name: z.ZodString;
|
|
4
4
|
description: z.ZodOptional<z.ZodString>;
|
|
5
|
+
is_private: z.ZodOptional<z.ZodBoolean>;
|
|
5
6
|
}, z.core.$strip>;
|
|
6
7
|
export type CreateWorkflowOptions = z.infer<typeof CreateWorkflowOptionsSchema>;
|
|
7
8
|
export declare const CreateWorkflowResponseSchema: z.ZodObject<{
|
|
@@ -10,6 +11,8 @@ export declare const CreateWorkflowResponseSchema: z.ZodObject<{
|
|
|
10
11
|
description: z.ZodNullable<z.ZodString>;
|
|
11
12
|
trigger_url: z.ZodString;
|
|
12
13
|
enabled: z.ZodBoolean;
|
|
14
|
+
is_private: z.ZodBoolean;
|
|
15
|
+
created_by_user_id: z.ZodNullable<z.ZodString>;
|
|
13
16
|
created_at: z.ZodString;
|
|
14
17
|
}, z.core.$strip>;
|
|
15
18
|
export type CreateWorkflowResponse = z.infer<typeof CreateWorkflowResponseSchema>;
|
|
@@ -1 +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
|
|
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;;;;iBAgBrC,CAAC;AAEJ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,4BAA4B;;;;;;;;;iBA2BvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC"}
|
|
@@ -6,6 +6,10 @@ export const CreateWorkflowOptionsSchema = z
|
|
|
6
6
|
.string()
|
|
7
7
|
.optional()
|
|
8
8
|
.describe("Optional description for the workflow"),
|
|
9
|
+
is_private: z
|
|
10
|
+
.boolean()
|
|
11
|
+
.optional()
|
|
12
|
+
.describe("If true, only the creating user can see or manage this workflow. Defaults to false (account-visible)."),
|
|
9
13
|
})
|
|
10
14
|
.describe("Create a durable workflow container. Starts disabled with no version; publish a version to add code.");
|
|
11
15
|
export const CreateWorkflowResponseSchema = z.object({
|
|
@@ -21,5 +25,12 @@ export const CreateWorkflowResponseSchema = z.object({
|
|
|
21
25
|
enabled: z
|
|
22
26
|
.boolean()
|
|
23
27
|
.describe("Whether the workflow currently accepts triggers. Always false on a new workflow until enabled."),
|
|
28
|
+
is_private: z
|
|
29
|
+
.boolean()
|
|
30
|
+
.describe("Whether the workflow is private to the creating user. False means account-visible."),
|
|
31
|
+
created_by_user_id: z
|
|
32
|
+
.string()
|
|
33
|
+
.nullable()
|
|
34
|
+
.describe("User ID of the workflow creator (null in legacy data)"),
|
|
24
35
|
created_at: z.string().describe("When the workflow was created (ISO-8601)"),
|
|
25
36
|
});
|
|
@@ -52,6 +52,19 @@ export declare const publishWorkflowVersionPlugin: (sdk: {
|
|
|
52
52
|
dependencies?: Record<string, string> | undefined;
|
|
53
53
|
zapier_durable_version?: string | undefined;
|
|
54
54
|
enabled?: boolean | undefined;
|
|
55
|
+
connections?: Record<string, {
|
|
56
|
+
connection_id: string | number;
|
|
57
|
+
}> | null | undefined;
|
|
58
|
+
app_versions?: Record<string, {
|
|
59
|
+
implementation_name: string;
|
|
60
|
+
version?: string | undefined;
|
|
61
|
+
}> | null | undefined;
|
|
62
|
+
trigger?: {
|
|
63
|
+
selected_api: string;
|
|
64
|
+
action: string;
|
|
65
|
+
authentication_id?: string | null | undefined;
|
|
66
|
+
params?: Record<string, unknown> | undefined;
|
|
67
|
+
} | undefined;
|
|
55
68
|
} | undefined) => Promise<{
|
|
56
69
|
data: {
|
|
57
70
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/publishWorkflowVersion/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,4BAA4B
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/publishWorkflowVersion/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDxC,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG,UAAU,CAC3D,OAAO,4BAA4B,CACpC,CAAC"}
|
|
@@ -23,6 +23,15 @@ export const publishWorkflowVersionPlugin = definePlugin((sdk) => createPluginMe
|
|
|
23
23
|
if (options.enabled !== undefined) {
|
|
24
24
|
body.enabled = options.enabled;
|
|
25
25
|
}
|
|
26
|
+
if (options.connections !== undefined) {
|
|
27
|
+
body.connections = options.connections;
|
|
28
|
+
}
|
|
29
|
+
if (options.app_versions !== undefined) {
|
|
30
|
+
body.app_versions = options.app_versions;
|
|
31
|
+
}
|
|
32
|
+
if (options.trigger !== undefined) {
|
|
33
|
+
body.trigger = options.trigger;
|
|
34
|
+
}
|
|
26
35
|
const raw = await sdk.context.api.post(`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/versions`, body, {
|
|
27
36
|
authRequired: true,
|
|
28
37
|
resource: { type: "workflow", id: options.workflow },
|
|
@@ -5,6 +5,19 @@ export declare const PublishWorkflowVersionOptionsSchema: z.ZodObject<{
|
|
|
5
5
|
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
6
6
|
zapier_durable_version: z.ZodOptional<z.ZodString>;
|
|
7
7
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
connections: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
9
|
+
connection_id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
10
|
+
}, z.core.$strip>>>>;
|
|
11
|
+
app_versions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
12
|
+
implementation_name: z.ZodString;
|
|
13
|
+
version: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>>>>;
|
|
15
|
+
trigger: z.ZodOptional<z.ZodObject<{
|
|
16
|
+
selected_api: z.ZodString;
|
|
17
|
+
action: z.ZodString;
|
|
18
|
+
authentication_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
20
|
+
}, z.core.$strip>>;
|
|
8
21
|
}, z.core.$strip>;
|
|
9
22
|
export type PublishWorkflowVersionOptions = z.infer<typeof PublishWorkflowVersionOptionsSchema>;
|
|
10
23
|
export declare const PublishWorkflowVersionResponseSchema: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/publishWorkflowVersion/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/publishWorkflowVersion/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA6DxB,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;iBA2C7C,CAAC;AAEJ,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CACjD,OAAO,mCAAmC,CAC3C,CAAC;AAEF,eAAO,MAAM,oCAAoC;;;;;;;;iBAmB/C,CAAC;AAEH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,oCAAoC,CAC5C,CAAC"}
|
|
@@ -1,4 +1,47 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
// Connection ID accepts the same two forms the backend does:
|
|
3
|
+
// positive integer (legacy) or UUID string (newer). Matches the regex
|
|
4
|
+
// on durableworkflowzaps's CreateWorkflowVersionRequest schema.
|
|
5
|
+
const CONNECTION_ID_PATTERN = /^([1-9][0-9]*|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
|
|
6
|
+
const ConnectionBindingSchema = z
|
|
7
|
+
.object({
|
|
8
|
+
connection_id: z
|
|
9
|
+
.union([
|
|
10
|
+
z.number().int().positive(),
|
|
11
|
+
z
|
|
12
|
+
.string()
|
|
13
|
+
.regex(CONNECTION_ID_PATTERN, "connection_id must be a positive integer string or UUID"),
|
|
14
|
+
])
|
|
15
|
+
.describe("Zapier connection ID. Positive integer (legacy) or UUID string (newer)."),
|
|
16
|
+
})
|
|
17
|
+
.describe("Connection binding: maps a single alias to a concrete connection.");
|
|
18
|
+
const AppVersionBindingSchema = z
|
|
19
|
+
.object({
|
|
20
|
+
implementation_name: z
|
|
21
|
+
.string()
|
|
22
|
+
.describe("App implementation identifier (e.g. 'SlackCLIAPI')"),
|
|
23
|
+
version: z
|
|
24
|
+
.string()
|
|
25
|
+
.optional()
|
|
26
|
+
.describe("App implementation version (e.g. '1.27.1')"),
|
|
27
|
+
})
|
|
28
|
+
.describe("App-version binding: maps a single alias to an app version.");
|
|
29
|
+
const TriggerConfigSchema = z
|
|
30
|
+
.object({
|
|
31
|
+
selected_api: z
|
|
32
|
+
.string()
|
|
33
|
+
.describe("Zapier app/API identifier (e.g. 'GoogleSheetsAPI')"),
|
|
34
|
+
action: z.string().describe("Trigger action key (e.g. 'new_row')"),
|
|
35
|
+
authentication_id: z
|
|
36
|
+
.string()
|
|
37
|
+
.nullish()
|
|
38
|
+
.describe("Connection ID for the trigger source. Omit or pass null for no-auth triggers (e.g. Schedule by Zapier)."),
|
|
39
|
+
params: z
|
|
40
|
+
.record(z.string(), z.unknown())
|
|
41
|
+
.optional()
|
|
42
|
+
.describe("Trigger parameters as a JSON object"),
|
|
43
|
+
})
|
|
44
|
+
.describe("Zapier trigger configuration. When set, the workflow subscribes to trigger events.");
|
|
2
45
|
export const PublishWorkflowVersionOptionsSchema = z
|
|
3
46
|
.object({
|
|
4
47
|
workflow: z.string().uuid().describe("Durable workflow ID"),
|
|
@@ -20,6 +63,15 @@ export const PublishWorkflowVersionOptionsSchema = z
|
|
|
20
63
|
.boolean()
|
|
21
64
|
.optional()
|
|
22
65
|
.describe("Enable the workflow after publishing. Defaults to true; pass false to publish without enabling."),
|
|
66
|
+
connections: z
|
|
67
|
+
.record(z.string(), ConnectionBindingSchema)
|
|
68
|
+
.nullish()
|
|
69
|
+
.describe("Map of connection aliases to Zapier connections used by the workflow. Pass `null` to clear an existing binding."),
|
|
70
|
+
app_versions: z
|
|
71
|
+
.record(z.string(), AppVersionBindingSchema)
|
|
72
|
+
.nullish()
|
|
73
|
+
.describe("Map of app keys to pinned app implementation/version used by the workflow. Pass `null` to clear an existing binding."),
|
|
74
|
+
trigger: TriggerConfigSchema.optional().describe("Trigger configuration. When provided, the workflow subscribes to a Zapier trigger; omit for webhook-only workflows."),
|
|
23
75
|
})
|
|
24
76
|
.describe("Publish a new version of a durable workflow. Enables the workflow by default.");
|
|
25
77
|
export const PublishWorkflowVersionResponseSchema = z.object({
|
|
@@ -5,6 +5,8 @@ import type { AckTriggerInboxMessagesPluginProvides } from "../ackTriggerInboxMe
|
|
|
5
5
|
import type { ReleaseTriggerInboxMessagesPluginProvides } from "../releaseTriggerInboxMessages";
|
|
6
6
|
import type { LeasedTriggerMessageItem } from "../../../schemas/TriggerMessage";
|
|
7
7
|
export { ZapierAbortDrainSignal, ZapierReleaseTriggerMessageSignal, } from "./schemas";
|
|
8
|
+
export declare function markNonRetryableDrainError<E>(err: E): E;
|
|
9
|
+
export declare function isNonRetryableDrainError(err: unknown): boolean;
|
|
8
10
|
interface RunDrainPassOptions {
|
|
9
11
|
sdk: ApiPluginProvides & LeaseTriggerInboxMessagesPluginProvides & AckTriggerInboxMessagesPluginProvides & ReleaseTriggerInboxMessagesPluginProvides;
|
|
10
12
|
inboxId: string;
|
|
@@ -28,8 +30,8 @@ export interface RunDrainPassOutcome {
|
|
|
28
30
|
/**
|
|
29
31
|
* One drain pass through `runBatchedDrainPipeline`. Used directly by
|
|
30
32
|
* `drainTriggerInbox` (single pass) and as the inner loop body of
|
|
31
|
-
* `watchTriggerInbox` (called
|
|
32
|
-
*
|
|
33
|
+
* `watchTriggerInbox` (called once per drain request, with bounded error
|
|
34
|
+
* backoff between passes that fail with a transient error).
|
|
33
35
|
*/
|
|
34
36
|
export declare function runDrainPass(options: RunDrainPassOptions): Promise<RunDrainPassOutcome>;
|
|
35
37
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/triggers/drainTriggerInbox/index.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC9B,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE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