@zapier/zapier-sdk 0.96.0 → 0.97.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 +6 -0
- package/README.md +21 -19
- package/dist/{chunk-MGWFLOHA.cjs → chunk-H24FJYFA.cjs} +1 -1
- package/dist/{chunk-MLSC6GO6.mjs → chunk-RTT7PDNL.mjs} +1 -1
- package/dist/experimental.cjs +400 -385
- package/dist/experimental.d.mts +4 -0
- package/dist/experimental.d.ts +4 -0
- package/dist/experimental.mjs +18 -3
- package/dist/index.cjs +276 -276
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/experimental.d.mts
CHANGED
|
@@ -3387,6 +3387,7 @@ declare const zapierExperimentalSdkPlugin: AggregatePlugin<"experimental-sdk", {
|
|
|
3387
3387
|
implementation_name?: string | undefined;
|
|
3388
3388
|
version?: string | undefined;
|
|
3389
3389
|
}> | null | undefined;
|
|
3390
|
+
manual?: boolean | undefined;
|
|
3390
3391
|
}, Promise<{
|
|
3391
3392
|
data: {
|
|
3392
3393
|
id: string;
|
|
@@ -3463,6 +3464,7 @@ declare const zapierExperimentalSdkPlugin: AggregatePlugin<"experimental-sdk", {
|
|
|
3463
3464
|
draft: string;
|
|
3464
3465
|
enabled?: boolean | undefined;
|
|
3465
3466
|
draftRevision?: number | undefined;
|
|
3467
|
+
manual?: boolean | undefined;
|
|
3466
3468
|
}, Promise<{
|
|
3467
3469
|
data: {
|
|
3468
3470
|
draft: {
|
|
@@ -5725,6 +5727,7 @@ declare function createZapierSdk(options?: ZapierSdkOptions): {
|
|
|
5725
5727
|
implementation_name?: string | undefined;
|
|
5726
5728
|
version?: string | undefined;
|
|
5727
5729
|
}> | null | undefined;
|
|
5730
|
+
manual?: boolean | undefined;
|
|
5728
5731
|
}) => Promise<{
|
|
5729
5732
|
data: {
|
|
5730
5733
|
id: string;
|
|
@@ -5799,6 +5802,7 @@ declare function createZapierSdk(options?: ZapierSdkOptions): {
|
|
|
5799
5802
|
draft: string;
|
|
5800
5803
|
enabled?: boolean | undefined;
|
|
5801
5804
|
draftRevision?: number | undefined;
|
|
5805
|
+
manual?: boolean | undefined;
|
|
5802
5806
|
}) => Promise<{
|
|
5803
5807
|
data: {
|
|
5804
5808
|
draft: {
|
package/dist/experimental.d.ts
CHANGED
|
@@ -3387,6 +3387,7 @@ declare const zapierExperimentalSdkPlugin: AggregatePlugin<"experimental-sdk", {
|
|
|
3387
3387
|
implementation_name?: string | undefined;
|
|
3388
3388
|
version?: string | undefined;
|
|
3389
3389
|
}> | null | undefined;
|
|
3390
|
+
manual?: boolean | undefined;
|
|
3390
3391
|
}, Promise<{
|
|
3391
3392
|
data: {
|
|
3392
3393
|
id: string;
|
|
@@ -3463,6 +3464,7 @@ declare const zapierExperimentalSdkPlugin: AggregatePlugin<"experimental-sdk", {
|
|
|
3463
3464
|
draft: string;
|
|
3464
3465
|
enabled?: boolean | undefined;
|
|
3465
3466
|
draftRevision?: number | undefined;
|
|
3467
|
+
manual?: boolean | undefined;
|
|
3466
3468
|
}, Promise<{
|
|
3467
3469
|
data: {
|
|
3468
3470
|
draft: {
|
|
@@ -5725,6 +5727,7 @@ declare function createZapierSdk(options?: ZapierSdkOptions): {
|
|
|
5725
5727
|
implementation_name?: string | undefined;
|
|
5726
5728
|
version?: string | undefined;
|
|
5727
5729
|
}> | null | undefined;
|
|
5730
|
+
manual?: boolean | undefined;
|
|
5728
5731
|
}) => Promise<{
|
|
5729
5732
|
data: {
|
|
5730
5733
|
id: string;
|
|
@@ -5799,6 +5802,7 @@ declare function createZapierSdk(options?: ZapierSdkOptions): {
|
|
|
5799
5802
|
draft: string;
|
|
5800
5803
|
enabled?: boolean | undefined;
|
|
5801
5804
|
draftRevision?: number | undefined;
|
|
5805
|
+
manual?: boolean | undefined;
|
|
5802
5806
|
}) => Promise<{
|
|
5803
5807
|
data: {
|
|
5804
5808
|
draft: {
|
package/dist/experimental.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineMethod, DEFAULT_PAGE_SIZE, apiPluginRef, workflowIdResolver, openEnum, durableRunIdResolver, defineResolver, ZapierConflictError, extractErrorDetail, workflowVersionIdResolver, workflowDraftIdResolver, ZapierApiError, workflowRunIdResolver, definePlugin, zapierSdkPlugin, ZapierValidationError, ZapierConfigurationError, createSdk, zapierCoreOptions, CORE_OPTIONS_ID, SDK_OPTIONS_ID } from './chunk-
|
|
2
|
-
export { ACTION_RUNS_PATH, API_ID, ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMillisecondsPropertySchema, ActionTimeoutSecondsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthMechanism, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONNECTIONS_ID, CONTEXT, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MILLISECONDS, CORE_ERROR_SYMBOL, CORE_OPTIONS_ID, CORE_SIGNAL_SYMBOL, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CoreCancelledSignal, CoreDisposeError, CoreErrorCode, CoreSignal, CredentialsFunctionSchema, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MILLISECONDS, DEFAULT_APPROVAL_TIMEOUT_MILLISECONDS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, DEPRECATION_NOTICE_EVENT, DebugPropertySchema, DrainTriggerInboxSchema, EVENT_EMISSION_ID, FieldsPropertySchema, InputFieldPropertySchema, InputsPropertySchema, LeaseLimitPropertySchema, LeasePropertySchema, LeaseSecondsPropertySchema, LimitPropertySchema, MANIFEST_ID, MAX_CONCURRENCY_LIMIT, MAX_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RESOLVE_CREDENTIALS_ID, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, SDK_OPTIONS_ID, TablePropertySchema, TablesPropertySchema, TriggerInboxKeyPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, WatchTriggerInboxSchema, ZAPIER_BASE_URL, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MILLISECONDS, ZapierAbortDrainSignal, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierConflictError, ZapierError, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierReleaseTriggerMessageSignal, ZapierResourceNotFoundError, ZapierSignal, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, addPlugin, apiPlugin, apiPluginRef, appKeyResolver, appsPlugin, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, cleanupEventListeners, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, composePlugins, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, connectionsPluginRef, createActionRunPlugin, createBaseEvent, createClientCredentialsPlugin, createController, createCorePlugin, createFunction, createMemoryCache, createPaginatedFunction, createPaginatedPluginMethod, createPluginMethod, createPluginStack, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdkWithoutRegistry, declareMethod, declareOptionalProperty, declarePlugin, declareProperty, defineFormatter, defineLegacyMerge, defineMethod, defineMethodOverride, definePlugin, defineProperty, defineResolver, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, disposeSdk, durableRunIdResolver, eventEmissionHookPlugin, eventEmissionPlugin, eventEmissionPluginRef, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, fromFunctionPlugin, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getActionRunPlugin, getAgent, getAppPlugin, getBaseUrlFromCredentials, getCallerContext, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getContext, getCoreErrorCause, getCoreErrorCode, getCpuTime, getCurrentTimestamp, getMemoryUsage, getNegatable, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getRegistryPlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getTtyContext, getZapierApprovalMode, getZapierDefaultApprovalMode, getZapierOpenAutoModeApprovalsInBrowser, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCoreCancelledSignal, isCoreError, isCoreSignal, isCredentialsFunction, isCredentialsObject, isPermanentHttpError, isPkceCredentials, isPositional, isZapierAbortDrainSignal, isZapierActionError, isZapierAppNotFoundError, isZapierApprovalError, isZapierAuthenticationError, isZapierBundleError, isZapierConflictError, isZapierError, isZapierNotFoundError, isZapierRateLimitError, isZapierReleaseTriggerMessageSignal, isZapierResourceNotFoundError, isZapierSignal, isZapierTimeoutError, isZapierValidationError, listActionInputFieldChoicesPlugin, listActionInputFieldsPlugin, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation, manifestPlugin, manifestPluginRef, omitExports, operationAnnotatorPlugin, parseConcurrencyEnvVar, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings, resolveAuth, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, resolveCredentialsPlugin, resolveCredentialsPluginRef, resolvePlugin, runActionPlugin, runInMethodScope, runWithCallerContext, runWithTelemetryContext, sdkOptionsPluginRef, selectExports, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, triggerMessagesResolver, updateTableRecordsPlugin, workflowDraftIdResolver, workflowIdResolver, workflowRunIdResolver, workflowVersionIdResolver, zapierAdaptError, zapierCoreOptions, zapierSdkPlugin } from './chunk-
|
|
1
|
+
import { defineMethod, DEFAULT_PAGE_SIZE, apiPluginRef, workflowIdResolver, openEnum, durableRunIdResolver, defineResolver, ZapierConflictError, extractErrorDetail, workflowVersionIdResolver, workflowDraftIdResolver, ZapierApiError, workflowRunIdResolver, definePlugin, zapierSdkPlugin, ZapierValidationError, ZapierConfigurationError, createSdk, zapierCoreOptions, CORE_OPTIONS_ID, SDK_OPTIONS_ID } from './chunk-RTT7PDNL.mjs';
|
|
2
|
+
export { ACTION_RUNS_PATH, API_ID, ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMillisecondsPropertySchema, ActionTimeoutSecondsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthMechanism, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONNECTIONS_ID, CONTEXT, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MILLISECONDS, CORE_ERROR_SYMBOL, CORE_OPTIONS_ID, CORE_SIGNAL_SYMBOL, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CoreCancelledSignal, CoreDisposeError, CoreErrorCode, CoreSignal, CredentialsFunctionSchema, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MILLISECONDS, DEFAULT_APPROVAL_TIMEOUT_MILLISECONDS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, DEPRECATION_NOTICE_EVENT, DebugPropertySchema, DrainTriggerInboxSchema, EVENT_EMISSION_ID, FieldsPropertySchema, InputFieldPropertySchema, InputsPropertySchema, LeaseLimitPropertySchema, LeasePropertySchema, LeaseSecondsPropertySchema, LimitPropertySchema, MANIFEST_ID, MAX_CONCURRENCY_LIMIT, MAX_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RESOLVE_CREDENTIALS_ID, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, SDK_OPTIONS_ID, TablePropertySchema, TablesPropertySchema, TriggerInboxKeyPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, WatchTriggerInboxSchema, ZAPIER_BASE_URL, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MILLISECONDS, ZapierAbortDrainSignal, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierConflictError, ZapierError, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierReleaseTriggerMessageSignal, ZapierResourceNotFoundError, ZapierSignal, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, addPlugin, apiPlugin, apiPluginRef, appKeyResolver, appsPlugin, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, cleanupEventListeners, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, composePlugins, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, connectionsPluginRef, createActionRunPlugin, createBaseEvent, createClientCredentialsPlugin, createController, createCorePlugin, createFunction, createMemoryCache, createPaginatedFunction, createPaginatedPluginMethod, createPluginMethod, createPluginStack, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdkWithoutRegistry, declareMethod, declareOptionalProperty, declarePlugin, declareProperty, defineFormatter, defineLegacyMerge, defineMethod, defineMethodOverride, definePlugin, defineProperty, defineResolver, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, disposeSdk, durableRunIdResolver, eventEmissionHookPlugin, eventEmissionPlugin, eventEmissionPluginRef, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, fromFunctionPlugin, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getActionRunPlugin, getAgent, getAppPlugin, getBaseUrlFromCredentials, getCallerContext, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getContext, getCoreErrorCause, getCoreErrorCode, getCpuTime, getCurrentTimestamp, getMemoryUsage, getNegatable, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getRegistryPlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getTtyContext, getZapierApprovalMode, getZapierDefaultApprovalMode, getZapierOpenAutoModeApprovalsInBrowser, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCoreCancelledSignal, isCoreError, isCoreSignal, isCredentialsFunction, isCredentialsObject, isPermanentHttpError, isPkceCredentials, isPositional, isZapierAbortDrainSignal, isZapierActionError, isZapierAppNotFoundError, isZapierApprovalError, isZapierAuthenticationError, isZapierBundleError, isZapierConflictError, isZapierError, isZapierNotFoundError, isZapierRateLimitError, isZapierReleaseTriggerMessageSignal, isZapierResourceNotFoundError, isZapierSignal, isZapierTimeoutError, isZapierValidationError, listActionInputFieldChoicesPlugin, listActionInputFieldsPlugin, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation, manifestPlugin, manifestPluginRef, omitExports, operationAnnotatorPlugin, parseConcurrencyEnvVar, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings, resolveAuth, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, resolveCredentialsPlugin, resolveCredentialsPluginRef, resolvePlugin, runActionPlugin, runInMethodScope, runWithCallerContext, runWithTelemetryContext, sdkOptionsPluginRef, selectExports, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, triggerMessagesResolver, updateTableRecordsPlugin, workflowDraftIdResolver, workflowIdResolver, workflowRunIdResolver, workflowVersionIdResolver, zapierAdaptError, zapierCoreOptions, zapierSdkPlugin } from './chunk-RTT7PDNL.mjs';
|
|
3
3
|
import './chunk-Y6FXYEAI.mjs';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
@@ -1370,6 +1370,7 @@ var createWorkflowDraftPlugin = defineMethod({
|
|
|
1370
1370
|
return { data: CreateWorkflowDraftResponseSchema.parse(raw) };
|
|
1371
1371
|
}
|
|
1372
1372
|
});
|
|
1373
|
+
var TRIGGER_MANUAL_CONFLICT_MESSAGE2 = "Provide `trigger` or `manual: true`, not both \u2014 a trigger together with manual: true is a contradiction.";
|
|
1373
1374
|
var UpdateWorkflowDraftOptionsSchema = z.object({
|
|
1374
1375
|
workflow: z.string().uuid().describe("Durable workflow ID"),
|
|
1375
1376
|
draft: z.string().uuid().describe("Workflow draft ID"),
|
|
@@ -1382,14 +1383,19 @@ var UpdateWorkflowDraftOptionsSchema = z.object({
|
|
|
1382
1383
|
"Expected draft revision for optimistic concurrency. Pass the revision from the last read; the server rejects the save with a conflict if the draft has changed since. Omit to skip the check."
|
|
1383
1384
|
),
|
|
1384
1385
|
trigger: TriggerConfigSchema.nullish().describe(
|
|
1385
|
-
"Trigger configuration. Omit to leave the stored trigger unchanged, pass null to clear it, or pass an object to replace it."
|
|
1386
|
+
"Trigger configuration. Omit to leave the stored trigger unchanged, pass null to clear it, or pass an object to replace it; for an on-demand, triggerless workflow, clear this and pass `manual: true` instead."
|
|
1386
1387
|
),
|
|
1387
1388
|
connections: z.record(z.string(), ConnectionBindingSchema).nullish().describe(
|
|
1388
1389
|
"Map of connection aliases to Zapier connections used by the workflow. Pass `null` to clear an existing binding."
|
|
1389
1390
|
),
|
|
1390
1391
|
appVersions: z.record(z.string(), AppVersionBindingSchema).nullish().describe(
|
|
1391
1392
|
"Map of app keys to pinned app implementation/version used by the workflow. Pass `null` to clear an existing binding."
|
|
1393
|
+
),
|
|
1394
|
+
manual: z.boolean().optional().describe(
|
|
1395
|
+
"Declare this draft on-demand and triggerless. Pass `manual: true` only when omitting `trigger` (or clearing it with `trigger: null`); passing both is a contradiction the API rejects with a 400. Setting a `trigger` later clears a previously stored `manual: true`."
|
|
1392
1396
|
)
|
|
1397
|
+
}).refine(({ trigger, manual }) => manual !== true || trigger == null, {
|
|
1398
|
+
message: TRIGGER_MANUAL_CONFLICT_MESSAGE2
|
|
1393
1399
|
}).describe("Update (autosave) an open workflow draft");
|
|
1394
1400
|
var UpdateWorkflowDraftResponseSchema = WorkflowDraftSchema;
|
|
1395
1401
|
|
|
@@ -1436,6 +1442,9 @@ var updateWorkflowDraftPlugin = defineMethod({
|
|
|
1436
1442
|
} else if (input.appVersions !== void 0) {
|
|
1437
1443
|
body.app_versions = toWireAppVersions(input.appVersions);
|
|
1438
1444
|
}
|
|
1445
|
+
if (input.manual !== void 0) {
|
|
1446
|
+
body.manual = input.manual;
|
|
1447
|
+
}
|
|
1439
1448
|
const raw = await api.put(
|
|
1440
1449
|
`${CODE_SUBSTRATE_WORKFLOWS_API}/workflows/${encodeURIComponent(input.workflow)}/drafts/${encodeURIComponent(input.draft)}`,
|
|
1441
1450
|
body,
|
|
@@ -1511,6 +1520,9 @@ var PublishWorkflowDraftOptionsSchema = z.object({
|
|
|
1511
1520
|
).meta({ negatable: "disabled" }),
|
|
1512
1521
|
draftRevision: z.number().int().min(0).optional().describe(
|
|
1513
1522
|
"Expected draft revision for optimistic concurrency. Pass the revision from the last read; the server rejects the publish with a conflict if the draft has changed since. Omit to skip the check."
|
|
1523
|
+
),
|
|
1524
|
+
manual: z.boolean().optional().describe(
|
|
1525
|
+
"Declare this publish on-demand and triggerless, overriding the draft's stored intent for this publish only. Pass `manual: true` only when the draft has no trigger configured; the API rejects a draft with a trigger published as `manual: true` as a contradiction (400)."
|
|
1514
1526
|
)
|
|
1515
1527
|
}).describe(
|
|
1516
1528
|
"Publish an open draft as a new immutable workflow version. Advances the workflow's live pointer and discards the draft \u2014 publish consumes it, so an open draft always means unpublished work. Continue editing by creating a new draft, which forks from the just-published version."
|
|
@@ -1551,6 +1563,9 @@ var publishWorkflowDraftPlugin = defineMethod({
|
|
|
1551
1563
|
if (input.draftRevision !== void 0) {
|
|
1552
1564
|
body.draft_revision = input.draftRevision;
|
|
1553
1565
|
}
|
|
1566
|
+
if (input.manual !== void 0) {
|
|
1567
|
+
body.manual = input.manual;
|
|
1568
|
+
}
|
|
1554
1569
|
const raw = await api.post(
|
|
1555
1570
|
`${CODE_SUBSTRATE_WORKFLOWS_API}/workflows/${encodeURIComponent(input.workflow)}/drafts/${encodeURIComponent(input.draft)}/publish`,
|
|
1556
1571
|
body,
|