@zapier/zapier-sdk 0.99.0 → 0.100.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 +43 -0
- package/dist/{chunk-BUAAO3AY.cjs → chunk-7MVYZYCM.cjs} +8 -1
- package/dist/{chunk-VXVMVORI.mjs → chunk-BSSVO2VM.mjs} +8 -1
- package/dist/experimental.cjs +472 -385
- package/dist/experimental.d.mts +55 -1
- package/dist/experimental.d.ts +55 -1
- package/dist/experimental.mjs +89 -2
- package/dist/index.cjs +277 -277
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/experimental.d.mts
CHANGED
|
@@ -5129,6 +5129,35 @@ declare const zapierExperimentalSdkPlugin: AggregatePlugin<"experimental-sdk", {
|
|
|
5129
5129
|
}>, readonly [], {
|
|
5130
5130
|
trigger: string;
|
|
5131
5131
|
}> & LeafSummary<"", "getTriggerRun", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never> & StandInId<"zapier/api">]>;
|
|
5132
|
+
} & {
|
|
5133
|
+
validateWorkflow: MethodPlugin<"validateWorkflow", {
|
|
5134
|
+
sourceFiles: Record<string, string>;
|
|
5135
|
+
entrypointFile?: string | undefined;
|
|
5136
|
+
} & {
|
|
5137
|
+
skipOutputDataValidation?: boolean;
|
|
5138
|
+
}, Promise<{
|
|
5139
|
+
data: {
|
|
5140
|
+
issues: {
|
|
5141
|
+
kind: string;
|
|
5142
|
+
message: string;
|
|
5143
|
+
severity: "error" | "warning" | "hint" | "info";
|
|
5144
|
+
suggestion?: string | undefined;
|
|
5145
|
+
source?: {
|
|
5146
|
+
file_id: string;
|
|
5147
|
+
start_line: number;
|
|
5148
|
+
start_column: number;
|
|
5149
|
+
end_line: number;
|
|
5150
|
+
end_column: number;
|
|
5151
|
+
} | undefined;
|
|
5152
|
+
source_excerpt?: string | undefined;
|
|
5153
|
+
syntax_kind?: string | undefined;
|
|
5154
|
+
}[];
|
|
5155
|
+
};
|
|
5156
|
+
meta?: ResponseMeta;
|
|
5157
|
+
}>, readonly [], {
|
|
5158
|
+
sourceFiles: Record<string, string>;
|
|
5159
|
+
entrypointFile?: string | undefined;
|
|
5160
|
+
}> & LeafSummary<"", "validateWorkflow", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never> & StandInId<"zapier/api">]>;
|
|
5132
5161
|
} & {
|
|
5133
5162
|
createForm: MethodPlugin<"createForm", {
|
|
5134
5163
|
title: string;
|
|
@@ -5241,7 +5270,7 @@ declare const zapierExperimentalSdkPlugin: AggregatePlugin<"experimental-sdk", {
|
|
|
5241
5270
|
children?: unknown[] | undefined;
|
|
5242
5271
|
} | undefined;
|
|
5243
5272
|
}> & LeafSummary<"", "createForm", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never> & StandInId<"zapier/api">]>;
|
|
5244
|
-
}> & PluginSummary<never, "fetch" | "zapier/api" | "zapier/manifest" | "zapier/eventEmission" | "zapier/resolveCredentials" | "zapier/connections" | "zapier/capabilities" | "getProfile" | "listApps" | "apps" | "getApp" | "listActions" | "getAction" | "listConnections" | "getConnection" | "findFirstConnection" | "findUniqueConnection" | "listAuthentications" | "getAuthentication" | "findFirstAuthentication" | "findUniqueAuthentication" | "listClientCredentials" | "createClientCredentials" | "deleteClientCredentials" | "getConnectionStartUrl" | "waitForNewConnection" | "createConnection" | "listActionInputFields" | "getActionInputFieldsSchema" | "listActionInputFieldChoices" | "listInputFields" | "getInputFieldsSchema" | "listInputFieldChoices" | "createActionRun" | "getActionRun" | "runAction" | "request" | "listTriggerInboxes" | "createTriggerInbox" | "ensureTriggerInbox" | "getTriggerInbox" | "updateTriggerInbox" | "deleteTriggerInbox" | "pauseTriggerInbox" | "resumeTriggerInbox" | "listTriggerInboxMessages" | "leaseTriggerInboxMessages" | "ackTriggerInboxMessages" | "releaseTriggerInboxMessages" | "drainTriggerInbox" | "watchTriggerInbox" | "listTriggers" | "listTriggerInputFields" | "listTriggerInputFieldChoices" | "getTriggerInputFieldsSchema" | "listTables" | "listTablesInternal" | "getTable" | "deleteTable" | "createTable" | "listTableFields" | "createTableFields" | "deleteTableFields" | "listTableRecords" | "getTableRecord" | "createTableRecords" | "deleteTableRecords" | "updateTableRecords" | "kitcore/getRegistry" | "listWorkflows" | "getWorkflow" | "createWorkflow" | "updateWorkflow" | "enableWorkflow" | "disableWorkflow" | "deleteWorkflow" | "listWorkflowVersions" | "getWorkflowVersion" | "publishWorkflowVersion" | "listWorkflowDrafts" | "getWorkflowDraft" | "createWorkflowDraft" | "updateWorkflowDraft" | "discardWorkflowDraft" | "publishWorkflowDraft" | "listWorkflowRuns" | "getWorkflowRun" | "listDurableRuns" | "getDurableRun" | "runDurable" | "cancelDurableRun" | "triggerWorkflow" | "getTriggerRun" | "createForm" | "zapier/sdk" | "zapier/experimental-sdk">;
|
|
5273
|
+
}> & PluginSummary<never, "fetch" | "zapier/api" | "zapier/manifest" | "zapier/eventEmission" | "zapier/resolveCredentials" | "zapier/connections" | "zapier/capabilities" | "getProfile" | "listApps" | "apps" | "getApp" | "listActions" | "getAction" | "listConnections" | "getConnection" | "findFirstConnection" | "findUniqueConnection" | "listAuthentications" | "getAuthentication" | "findFirstAuthentication" | "findUniqueAuthentication" | "listClientCredentials" | "createClientCredentials" | "deleteClientCredentials" | "getConnectionStartUrl" | "waitForNewConnection" | "createConnection" | "listActionInputFields" | "getActionInputFieldsSchema" | "listActionInputFieldChoices" | "listInputFields" | "getInputFieldsSchema" | "listInputFieldChoices" | "createActionRun" | "getActionRun" | "runAction" | "request" | "listTriggerInboxes" | "createTriggerInbox" | "ensureTriggerInbox" | "getTriggerInbox" | "updateTriggerInbox" | "deleteTriggerInbox" | "pauseTriggerInbox" | "resumeTriggerInbox" | "listTriggerInboxMessages" | "leaseTriggerInboxMessages" | "ackTriggerInboxMessages" | "releaseTriggerInboxMessages" | "drainTriggerInbox" | "watchTriggerInbox" | "listTriggers" | "listTriggerInputFields" | "listTriggerInputFieldChoices" | "getTriggerInputFieldsSchema" | "listTables" | "listTablesInternal" | "getTable" | "deleteTable" | "createTable" | "listTableFields" | "createTableFields" | "deleteTableFields" | "listTableRecords" | "getTableRecord" | "createTableRecords" | "deleteTableRecords" | "updateTableRecords" | "kitcore/getRegistry" | "listWorkflows" | "getWorkflow" | "createWorkflow" | "updateWorkflow" | "enableWorkflow" | "disableWorkflow" | "deleteWorkflow" | "listWorkflowVersions" | "getWorkflowVersion" | "publishWorkflowVersion" | "listWorkflowDrafts" | "getWorkflowDraft" | "createWorkflowDraft" | "updateWorkflowDraft" | "discardWorkflowDraft" | "publishWorkflowDraft" | "listWorkflowRuns" | "getWorkflowRun" | "listDurableRuns" | "getDurableRun" | "runDurable" | "cancelDurableRun" | "triggerWorkflow" | "getTriggerRun" | "validateWorkflow" | "createForm" | "zapier/sdk" | "zapier/experimental-sdk">;
|
|
5245
5274
|
declare function createZapierSdk(options?: ZapierSdkOptions): {
|
|
5246
5275
|
getRegistry: (input?: {
|
|
5247
5276
|
package?: string | undefined;
|
|
@@ -7723,6 +7752,31 @@ declare function createZapierSdk(options?: ZapierSdkOptions): {
|
|
|
7723
7752
|
};
|
|
7724
7753
|
meta?: ResponseMeta;
|
|
7725
7754
|
}>;
|
|
7755
|
+
validateWorkflow: (input: {
|
|
7756
|
+
sourceFiles: Record<string, string>;
|
|
7757
|
+
entrypointFile?: string | undefined;
|
|
7758
|
+
} & {
|
|
7759
|
+
skipOutputDataValidation?: boolean;
|
|
7760
|
+
}) => Promise<{
|
|
7761
|
+
data: {
|
|
7762
|
+
issues: {
|
|
7763
|
+
kind: string;
|
|
7764
|
+
message: string;
|
|
7765
|
+
severity: "error" | "warning" | "hint" | "info";
|
|
7766
|
+
suggestion?: string | undefined;
|
|
7767
|
+
source?: {
|
|
7768
|
+
file_id: string;
|
|
7769
|
+
start_line: number;
|
|
7770
|
+
start_column: number;
|
|
7771
|
+
end_line: number;
|
|
7772
|
+
end_column: number;
|
|
7773
|
+
} | undefined;
|
|
7774
|
+
source_excerpt?: string | undefined;
|
|
7775
|
+
syntax_kind?: string | undefined;
|
|
7776
|
+
}[];
|
|
7777
|
+
};
|
|
7778
|
+
meta?: ResponseMeta;
|
|
7779
|
+
}>;
|
|
7726
7780
|
createForm: (input: {
|
|
7727
7781
|
title: string;
|
|
7728
7782
|
description?: string | undefined;
|
package/dist/experimental.d.ts
CHANGED
|
@@ -5129,6 +5129,35 @@ declare const zapierExperimentalSdkPlugin: AggregatePlugin<"experimental-sdk", {
|
|
|
5129
5129
|
}>, readonly [], {
|
|
5130
5130
|
trigger: string;
|
|
5131
5131
|
}> & LeafSummary<"", "getTriggerRun", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never> & StandInId<"zapier/api">]>;
|
|
5132
|
+
} & {
|
|
5133
|
+
validateWorkflow: MethodPlugin<"validateWorkflow", {
|
|
5134
|
+
sourceFiles: Record<string, string>;
|
|
5135
|
+
entrypointFile?: string | undefined;
|
|
5136
|
+
} & {
|
|
5137
|
+
skipOutputDataValidation?: boolean;
|
|
5138
|
+
}, Promise<{
|
|
5139
|
+
data: {
|
|
5140
|
+
issues: {
|
|
5141
|
+
kind: string;
|
|
5142
|
+
message: string;
|
|
5143
|
+
severity: "error" | "warning" | "hint" | "info";
|
|
5144
|
+
suggestion?: string | undefined;
|
|
5145
|
+
source?: {
|
|
5146
|
+
file_id: string;
|
|
5147
|
+
start_line: number;
|
|
5148
|
+
start_column: number;
|
|
5149
|
+
end_line: number;
|
|
5150
|
+
end_column: number;
|
|
5151
|
+
} | undefined;
|
|
5152
|
+
source_excerpt?: string | undefined;
|
|
5153
|
+
syntax_kind?: string | undefined;
|
|
5154
|
+
}[];
|
|
5155
|
+
};
|
|
5156
|
+
meta?: ResponseMeta;
|
|
5157
|
+
}>, readonly [], {
|
|
5158
|
+
sourceFiles: Record<string, string>;
|
|
5159
|
+
entrypointFile?: string | undefined;
|
|
5160
|
+
}> & LeafSummary<"", "validateWorkflow", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never> & StandInId<"zapier/api">]>;
|
|
5132
5161
|
} & {
|
|
5133
5162
|
createForm: MethodPlugin<"createForm", {
|
|
5134
5163
|
title: string;
|
|
@@ -5241,7 +5270,7 @@ declare const zapierExperimentalSdkPlugin: AggregatePlugin<"experimental-sdk", {
|
|
|
5241
5270
|
children?: unknown[] | undefined;
|
|
5242
5271
|
} | undefined;
|
|
5243
5272
|
}> & LeafSummary<"", "createForm", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never> & StandInId<"zapier/api">]>;
|
|
5244
|
-
}> & PluginSummary<never, "fetch" | "zapier/api" | "zapier/manifest" | "zapier/eventEmission" | "zapier/resolveCredentials" | "zapier/connections" | "zapier/capabilities" | "getProfile" | "listApps" | "apps" | "getApp" | "listActions" | "getAction" | "listConnections" | "getConnection" | "findFirstConnection" | "findUniqueConnection" | "listAuthentications" | "getAuthentication" | "findFirstAuthentication" | "findUniqueAuthentication" | "listClientCredentials" | "createClientCredentials" | "deleteClientCredentials" | "getConnectionStartUrl" | "waitForNewConnection" | "createConnection" | "listActionInputFields" | "getActionInputFieldsSchema" | "listActionInputFieldChoices" | "listInputFields" | "getInputFieldsSchema" | "listInputFieldChoices" | "createActionRun" | "getActionRun" | "runAction" | "request" | "listTriggerInboxes" | "createTriggerInbox" | "ensureTriggerInbox" | "getTriggerInbox" | "updateTriggerInbox" | "deleteTriggerInbox" | "pauseTriggerInbox" | "resumeTriggerInbox" | "listTriggerInboxMessages" | "leaseTriggerInboxMessages" | "ackTriggerInboxMessages" | "releaseTriggerInboxMessages" | "drainTriggerInbox" | "watchTriggerInbox" | "listTriggers" | "listTriggerInputFields" | "listTriggerInputFieldChoices" | "getTriggerInputFieldsSchema" | "listTables" | "listTablesInternal" | "getTable" | "deleteTable" | "createTable" | "listTableFields" | "createTableFields" | "deleteTableFields" | "listTableRecords" | "getTableRecord" | "createTableRecords" | "deleteTableRecords" | "updateTableRecords" | "kitcore/getRegistry" | "listWorkflows" | "getWorkflow" | "createWorkflow" | "updateWorkflow" | "enableWorkflow" | "disableWorkflow" | "deleteWorkflow" | "listWorkflowVersions" | "getWorkflowVersion" | "publishWorkflowVersion" | "listWorkflowDrafts" | "getWorkflowDraft" | "createWorkflowDraft" | "updateWorkflowDraft" | "discardWorkflowDraft" | "publishWorkflowDraft" | "listWorkflowRuns" | "getWorkflowRun" | "listDurableRuns" | "getDurableRun" | "runDurable" | "cancelDurableRun" | "triggerWorkflow" | "getTriggerRun" | "createForm" | "zapier/sdk" | "zapier/experimental-sdk">;
|
|
5273
|
+
}> & PluginSummary<never, "fetch" | "zapier/api" | "zapier/manifest" | "zapier/eventEmission" | "zapier/resolveCredentials" | "zapier/connections" | "zapier/capabilities" | "getProfile" | "listApps" | "apps" | "getApp" | "listActions" | "getAction" | "listConnections" | "getConnection" | "findFirstConnection" | "findUniqueConnection" | "listAuthentications" | "getAuthentication" | "findFirstAuthentication" | "findUniqueAuthentication" | "listClientCredentials" | "createClientCredentials" | "deleteClientCredentials" | "getConnectionStartUrl" | "waitForNewConnection" | "createConnection" | "listActionInputFields" | "getActionInputFieldsSchema" | "listActionInputFieldChoices" | "listInputFields" | "getInputFieldsSchema" | "listInputFieldChoices" | "createActionRun" | "getActionRun" | "runAction" | "request" | "listTriggerInboxes" | "createTriggerInbox" | "ensureTriggerInbox" | "getTriggerInbox" | "updateTriggerInbox" | "deleteTriggerInbox" | "pauseTriggerInbox" | "resumeTriggerInbox" | "listTriggerInboxMessages" | "leaseTriggerInboxMessages" | "ackTriggerInboxMessages" | "releaseTriggerInboxMessages" | "drainTriggerInbox" | "watchTriggerInbox" | "listTriggers" | "listTriggerInputFields" | "listTriggerInputFieldChoices" | "getTriggerInputFieldsSchema" | "listTables" | "listTablesInternal" | "getTable" | "deleteTable" | "createTable" | "listTableFields" | "createTableFields" | "deleteTableFields" | "listTableRecords" | "getTableRecord" | "createTableRecords" | "deleteTableRecords" | "updateTableRecords" | "kitcore/getRegistry" | "listWorkflows" | "getWorkflow" | "createWorkflow" | "updateWorkflow" | "enableWorkflow" | "disableWorkflow" | "deleteWorkflow" | "listWorkflowVersions" | "getWorkflowVersion" | "publishWorkflowVersion" | "listWorkflowDrafts" | "getWorkflowDraft" | "createWorkflowDraft" | "updateWorkflowDraft" | "discardWorkflowDraft" | "publishWorkflowDraft" | "listWorkflowRuns" | "getWorkflowRun" | "listDurableRuns" | "getDurableRun" | "runDurable" | "cancelDurableRun" | "triggerWorkflow" | "getTriggerRun" | "validateWorkflow" | "createForm" | "zapier/sdk" | "zapier/experimental-sdk">;
|
|
5245
5274
|
declare function createZapierSdk(options?: ZapierSdkOptions): {
|
|
5246
5275
|
getRegistry: (input?: {
|
|
5247
5276
|
package?: string | undefined;
|
|
@@ -7723,6 +7752,31 @@ declare function createZapierSdk(options?: ZapierSdkOptions): {
|
|
|
7723
7752
|
};
|
|
7724
7753
|
meta?: ResponseMeta;
|
|
7725
7754
|
}>;
|
|
7755
|
+
validateWorkflow: (input: {
|
|
7756
|
+
sourceFiles: Record<string, string>;
|
|
7757
|
+
entrypointFile?: string | undefined;
|
|
7758
|
+
} & {
|
|
7759
|
+
skipOutputDataValidation?: boolean;
|
|
7760
|
+
}) => Promise<{
|
|
7761
|
+
data: {
|
|
7762
|
+
issues: {
|
|
7763
|
+
kind: string;
|
|
7764
|
+
message: string;
|
|
7765
|
+
severity: "error" | "warning" | "hint" | "info";
|
|
7766
|
+
suggestion?: string | undefined;
|
|
7767
|
+
source?: {
|
|
7768
|
+
file_id: string;
|
|
7769
|
+
start_line: number;
|
|
7770
|
+
start_column: number;
|
|
7771
|
+
end_line: number;
|
|
7772
|
+
end_column: number;
|
|
7773
|
+
} | undefined;
|
|
7774
|
+
source_excerpt?: string | undefined;
|
|
7775
|
+
syntax_kind?: string | undefined;
|
|
7776
|
+
}[];
|
|
7777
|
+
};
|
|
7778
|
+
meta?: ResponseMeta;
|
|
7779
|
+
}>;
|
|
7726
7780
|
createForm: (input: {
|
|
7727
7781
|
title: string;
|
|
7728
7782
|
description?: string | undefined;
|
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, defineOverride, 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-BSSVO2VM.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, defineOverride, 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-BSSVO2VM.mjs';
|
|
3
3
|
import './chunk-Y6FXYEAI.mjs';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
@@ -7,6 +7,7 @@ var codeSubstrateDefaults = {
|
|
|
7
7
|
categories: ["code-workflow"],
|
|
8
8
|
experimental: true
|
|
9
9
|
};
|
|
10
|
+
var CODE_SUBSTRATE_ANALYZER_API = "/code-substrate-analyzer";
|
|
10
11
|
var CODE_SUBSTRATE_RUNNER_API = "/code-substrate-runner/api/v0";
|
|
11
12
|
var CODE_SUBSTRATE_WORKFLOWS_API = "/code-substrate-workflows/api/v0";
|
|
12
13
|
var JsonPayloadSchema = z.preprocess((val) => {
|
|
@@ -1844,6 +1845,91 @@ var triggerWorkflowPlugin = defineMethod({
|
|
|
1844
1845
|
return { data: TriggerWorkflowResponseSchema.parse(raw) };
|
|
1845
1846
|
}
|
|
1846
1847
|
});
|
|
1848
|
+
var MAX_SOURCE_FILES_COUNT = 50;
|
|
1849
|
+
var MAX_SOURCE_FILE_LENGTH = 2e5;
|
|
1850
|
+
var DEFAULT_ENTRYPOINT_FILE = "/workflow.ts";
|
|
1851
|
+
var EXAMPLE_SOURCE_FILES = {
|
|
1852
|
+
[DEFAULT_ENTRYPOINT_FILE]: 'import { defineDurable } from "@zapier/zapier-durable"; export default defineDurable("hello-world", async (ctx, input) => { return ctx.step("greet", async () => "Hello, world!"); });'
|
|
1853
|
+
};
|
|
1854
|
+
var WorkflowValidationSourceFilesSchema = z.record(
|
|
1855
|
+
z.string().regex(/^\//, "source file paths must start with /"),
|
|
1856
|
+
z.string().max(MAX_SOURCE_FILE_LENGTH)
|
|
1857
|
+
).refine((files) => Object.keys(files).length > 0, {
|
|
1858
|
+
message: "sourceFiles must contain at least one file"
|
|
1859
|
+
}).refine((files) => Object.keys(files).length <= MAX_SOURCE_FILES_COUNT, {
|
|
1860
|
+
message: `sourceFiles must contain at most ${MAX_SOURCE_FILES_COUNT} files`
|
|
1861
|
+
}).describe("Exact TypeScript sources keyed by absolute logical path.").meta({ example: EXAMPLE_SOURCE_FILES });
|
|
1862
|
+
var ValidateWorkflowOptionsSchema = z.object({
|
|
1863
|
+
sourceFiles: WorkflowValidationSourceFilesSchema,
|
|
1864
|
+
entrypointFile: z.string().regex(/^\//, "entrypointFile must start with /").optional().describe(
|
|
1865
|
+
"Absolute logical path of the entry file in sourceFiles. Defaults to /workflow.ts."
|
|
1866
|
+
)
|
|
1867
|
+
}).refine(
|
|
1868
|
+
({ sourceFiles, entrypointFile }) => (entrypointFile ?? DEFAULT_ENTRYPOINT_FILE) in sourceFiles,
|
|
1869
|
+
{
|
|
1870
|
+
path: ["entrypointFile"],
|
|
1871
|
+
message: "entrypointFile must identify a file in sourceFiles"
|
|
1872
|
+
}
|
|
1873
|
+
).describe(
|
|
1874
|
+
"Validate durable workflow source without publishing it. Returns source diagnostics; issue kinds are extensible and may be unfamiliar to the client."
|
|
1875
|
+
);
|
|
1876
|
+
var WorkflowValidationSourceLocationSchema = z.object({
|
|
1877
|
+
file_id: z.string().describe("Source file containing the diagnostic."),
|
|
1878
|
+
start_line: z.number().int().positive().describe("Inclusive 1-based start line."),
|
|
1879
|
+
start_column: z.number().int().positive().describe("Inclusive 1-based start column."),
|
|
1880
|
+
end_line: z.number().int().positive().describe("Inclusive 1-based end line."),
|
|
1881
|
+
end_column: z.number().int().positive().describe("Inclusive 1-based end column.")
|
|
1882
|
+
}).describe("1-based source coordinates within a single sourceFiles entry.");
|
|
1883
|
+
var WorkflowValidationIssueSchema = z.object({
|
|
1884
|
+
kind: z.string().describe(
|
|
1885
|
+
"Extensible diagnostic category; clients must accept unfamiliar values."
|
|
1886
|
+
),
|
|
1887
|
+
message: z.string().describe("Safe human-readable explanation."),
|
|
1888
|
+
// Unlike `kind`, severity is a closed vocabulary on the analyzer side: a
|
|
1889
|
+
// new value requires a new API version, and every issue carries one, so
|
|
1890
|
+
// callers can rank findings without a missing-severity branch.
|
|
1891
|
+
severity: z.enum(["error", "warning", "info", "hint"]).describe("Diagnostic severity."),
|
|
1892
|
+
suggestion: z.string().optional().describe("Actionable fix hint."),
|
|
1893
|
+
source: WorkflowValidationSourceLocationSchema.optional().describe(
|
|
1894
|
+
"Affected source location."
|
|
1895
|
+
),
|
|
1896
|
+
source_excerpt: z.string().optional().describe(
|
|
1897
|
+
"Source text the diagnostic was raised against, truncated to 240 characters."
|
|
1898
|
+
),
|
|
1899
|
+
syntax_kind: z.string().optional().describe(
|
|
1900
|
+
"TypeScript AST node kind the diagnostic was raised against (e.g. `CallExpression`)."
|
|
1901
|
+
)
|
|
1902
|
+
});
|
|
1903
|
+
var ValidateWorkflowResponseSchema = z.object({
|
|
1904
|
+
issues: z.array(WorkflowValidationIssueSchema).describe("Source diagnostics, or an empty array when validation passes.")
|
|
1905
|
+
});
|
|
1906
|
+
|
|
1907
|
+
// src/plugins/codeSubstrate/validateWorkflow/index.ts
|
|
1908
|
+
var validateWorkflowPlugin = defineMethod({
|
|
1909
|
+
...codeSubstrateDefaults,
|
|
1910
|
+
name: "validateWorkflow",
|
|
1911
|
+
imports: [apiPluginRef],
|
|
1912
|
+
itemType: "WorkflowValidation",
|
|
1913
|
+
inputSchema: ValidateWorkflowOptionsSchema,
|
|
1914
|
+
outputSchema: ValidateWorkflowResponseSchema,
|
|
1915
|
+
skipOutputValidation: true,
|
|
1916
|
+
output: "item",
|
|
1917
|
+
resolvers: { sourceFiles: sourceFilesResolver },
|
|
1918
|
+
run: async ({ imports, input }) => {
|
|
1919
|
+
const body = {
|
|
1920
|
+
source_files: input.sourceFiles
|
|
1921
|
+
};
|
|
1922
|
+
if (input.entrypointFile !== void 0) {
|
|
1923
|
+
body.entrypoint_file = input.entrypointFile;
|
|
1924
|
+
}
|
|
1925
|
+
const raw = await imports.api.post(
|
|
1926
|
+
`${CODE_SUBSTRATE_ANALYZER_API}/validations`,
|
|
1927
|
+
body,
|
|
1928
|
+
{ authRequired: true }
|
|
1929
|
+
);
|
|
1930
|
+
return { data: ValidateWorkflowResponseSchema.parse(raw) };
|
|
1931
|
+
}
|
|
1932
|
+
});
|
|
1847
1933
|
|
|
1848
1934
|
// src/plugins/humanInput/shared.ts
|
|
1849
1935
|
var humanInputDefaults = {
|
|
@@ -2213,6 +2299,7 @@ var zapierExperimentalSdkPlugin = definePlugin({
|
|
|
2213
2299
|
cancelDurableRunPlugin,
|
|
2214
2300
|
triggerWorkflowPlugin,
|
|
2215
2301
|
getTriggerRunPlugin,
|
|
2302
|
+
validateWorkflowPlugin,
|
|
2216
2303
|
// Human input (experimental). Routed through the Public API Gateway
|
|
2217
2304
|
// rather than the sdkapi proxy — see the `/forms` entry in api/client.ts.
|
|
2218
2305
|
createFormPlugin
|