@zapier/zapier-sdk 0.119.6 → 0.121.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 +30 -0
- package/README.md +205 -187
- package/dist/beta.cjs +287 -287
- package/dist/beta.d.mts +162 -34
- package/dist/beta.d.ts +162 -34
- package/dist/beta.mjs +2 -2
- package/dist/{chunk-FXUI47PZ.cjs → chunk-C7DJO3NC.cjs} +1 -1
- package/dist/{chunk-CQ3C7UWQ.mjs → chunk-FEGI2THT.mjs} +1 -1
- package/dist/{chunk-5FVYDLIN.cjs → chunk-KHOLWDHF.cjs} +269 -109
- package/dist/{chunk-2XVA36IO.mjs → chunk-UGG7545M.mjs} +182 -22
- package/dist/experimental.cjs +318 -318
- package/dist/experimental.d.mts +202 -74
- package/dist/experimental.d.ts +202 -74
- package/dist/experimental.mjs +4 -4
- package/dist/index.cjs +281 -281
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { taxonomy, DEFAULT_PAGE_SIZE, apiPluginRef, workflowIdResolver, extractErrorDetail, ZapierApiError, durableRunIdResolver, ZapierConflictError, workflowVersionIdResolver, workflowDraftIdResolver, workflowRunIdResolver, workflowDraftRevisionResolver, isZapierNotFoundError, ZapierTimeoutError, zapierSdkPlugin, SDK_VERSION, ZapierValidationError, sleep, zapierCoreOptions, SDK_OPTIONS_ID } from './chunk-
|
|
1
|
+
import { taxonomy, DEFAULT_PAGE_SIZE, apiPluginRef, workflowIdResolver, extractErrorDetail, ZapierApiError, durableRunIdResolver, ZapierConflictError, workflowVersionIdResolver, workflowDraftIdResolver, workflowRunIdResolver, workflowDraftRevisionResolver, isZapierNotFoundError, ZapierTimeoutError, zapierSdkPlugin, SDK_VERSION, ZapierValidationError, sleep, zapierCoreOptions, SDK_OPTIONS_ID } from './chunk-FEGI2THT.mjs';
|
|
2
2
|
import { defineMethod, openEnum, defineResolver, definePlugin, createSdk, CORE_OPTIONS_ID } from '@zapier/kitcore';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
@@ -282,8 +282,12 @@ var WorkflowItemSchema = z.object({
|
|
|
282
282
|
disabled_reason: WorkflowDisabledReasonSchema.nullable().optional().describe(
|
|
283
283
|
"Why the workflow is off, when system-disabled. Null when not system-disabled."
|
|
284
284
|
),
|
|
285
|
-
|
|
286
|
-
|
|
285
|
+
// No `.meta({ deprecated: true })`: that flag drops a field from the
|
|
286
|
+
// generated README, and the API still returns this one, so it stays
|
|
287
|
+
// documented while deprecated.
|
|
288
|
+
/** @deprecated May be removed from the API in a future release. No replacement; do not rely on this value. */
|
|
289
|
+
is_private: z.boolean().nullish().describe(
|
|
290
|
+
"Whether the workflow is private to the creating user. False means account-visible. Deprecated: may be removed from the API in a future release. There is no replacement field; do not rely on it. An absent or null value means unknown, not false."
|
|
287
291
|
),
|
|
288
292
|
created_by_user_id: z.string().nullable().describe("User ID of the workflow creator (null in legacy data)"),
|
|
289
293
|
current_version_id: z.string().nullable().describe(
|
|
@@ -383,8 +387,12 @@ var GetWorkflowResponseSchema = z.object({
|
|
|
383
387
|
disabled_reason: WorkflowDisabledReasonSchema.nullable().optional().describe(
|
|
384
388
|
"Why the workflow is off, when system-disabled. Null when not system-disabled. Independent of per-trigger claim status: an enabled workflow can still have a failed trigger."
|
|
385
389
|
),
|
|
386
|
-
|
|
387
|
-
|
|
390
|
+
// No `.meta({ deprecated: true })`: that flag drops a field from the
|
|
391
|
+
// generated README, and the API still returns this one, so it stays
|
|
392
|
+
// documented while deprecated.
|
|
393
|
+
/** @deprecated May be removed from the API in a future release. No replacement; do not rely on this value. */
|
|
394
|
+
is_private: z.boolean().nullish().describe(
|
|
395
|
+
"Whether the workflow is private to the creating user. False means account-visible. Deprecated: may be removed from the API in a future release. There is no replacement field; do not rely on it. An absent or null value means unknown, not false."
|
|
388
396
|
),
|
|
389
397
|
created_by_user_id: z.string().nullable().describe("User ID of the workflow creator (null in legacy data)"),
|
|
390
398
|
current_version: WorkflowVersionSchema2.optional().describe(
|
|
@@ -444,8 +452,12 @@ var CreateWorkflowResponseSchema = z.object({
|
|
|
444
452
|
enabled: z.boolean().describe(
|
|
445
453
|
"Whether the workflow currently accepts triggers. Always false on a new workflow until enabled."
|
|
446
454
|
),
|
|
447
|
-
|
|
448
|
-
|
|
455
|
+
// No `.meta({ deprecated: true })`: that flag drops a field from the
|
|
456
|
+
// generated README, and the API still returns this one, so it stays
|
|
457
|
+
// documented while deprecated.
|
|
458
|
+
/** @deprecated May be removed from the API in a future release. No replacement; do not rely on this value. */
|
|
459
|
+
is_private: z.boolean().nullish().describe(
|
|
460
|
+
"Whether the workflow is private to the creating user. False means account-visible. Deprecated: may be removed from the API in a future release. There is no replacement field; do not rely on it. An absent or null value means unknown, not false."
|
|
449
461
|
),
|
|
450
462
|
created_by_user_id: z.string().nullable().describe("User ID of the workflow creator (null in legacy data)"),
|
|
451
463
|
created_at: z.string().describe("When the workflow was created (ISO-8601)"),
|
|
@@ -525,8 +537,12 @@ var ImportedWorkflowSchema = z.object({
|
|
|
525
537
|
"Whether the workflow accepts triggers. An import always lands disabled."
|
|
526
538
|
),
|
|
527
539
|
disabled_reason: WorkflowDisabledReasonSchema.nullable().optional().describe("Why the workflow is off, when system-disabled."),
|
|
528
|
-
|
|
529
|
-
|
|
540
|
+
// No `.meta({ deprecated: true })`: that flag drops a field from the
|
|
541
|
+
// generated README, and the API still returns this one, so it stays
|
|
542
|
+
// documented while deprecated.
|
|
543
|
+
/** @deprecated May be removed from the API in a future release. No replacement; do not rely on this value. */
|
|
544
|
+
is_private: z.boolean().nullish().describe(
|
|
545
|
+
"Whether the workflow is private to the creating user. False means account-visible. Deprecated: may be removed from the API in a future release. There is no replacement field; do not rely on it. An absent or null value means unknown, not false."
|
|
530
546
|
),
|
|
531
547
|
source_zap_id: z.string().nullable().optional().describe("The Zap this workflow was imported from."),
|
|
532
548
|
created_by_user_id: z.string(),
|
|
@@ -611,8 +627,12 @@ var UpdateWorkflowResponseSchema = z.object({
|
|
|
611
627
|
trigger_url: WorkflowTriggerUrlSchema,
|
|
612
628
|
editor_url: WorkflowEditorUrlSchema,
|
|
613
629
|
enabled: z.boolean().describe("Whether the workflow currently accepts triggers"),
|
|
614
|
-
|
|
615
|
-
|
|
630
|
+
// No `.meta({ deprecated: true })`: that flag drops a field from the
|
|
631
|
+
// generated README, and the API still returns this one, so it stays
|
|
632
|
+
// documented while deprecated.
|
|
633
|
+
/** @deprecated May be removed from the API in a future release. No replacement; do not rely on this value. */
|
|
634
|
+
is_private: z.boolean().nullish().describe(
|
|
635
|
+
"Whether the workflow is private to the creating user. False means account-visible. Deprecated: may be removed from the API in a future release. There is no replacement field; do not rely on it. An absent or null value means unknown, not false."
|
|
616
636
|
),
|
|
617
637
|
created_by_user_id: z.string().nullable().describe("User ID of the workflow creator (null in legacy data)"),
|
|
618
638
|
created_at: z.string().describe("When the workflow was created (ISO-8601)"),
|
|
@@ -775,8 +795,12 @@ var RunItemSchema = z.object({
|
|
|
775
795
|
execution_id: z.string().nullable().describe(
|
|
776
796
|
"Linked execution ID. Null until the run leaves the `initialized` state."
|
|
777
797
|
),
|
|
778
|
-
|
|
779
|
-
|
|
798
|
+
// No `.meta({ deprecated: true })`: that flag drops a field from the
|
|
799
|
+
// generated README, and the API still returns this one, so it stays
|
|
800
|
+
// documented while deprecated.
|
|
801
|
+
/** @deprecated May be removed from the API in a future release. No replacement; do not rely on this value. */
|
|
802
|
+
is_private: z.boolean().nullish().describe(
|
|
803
|
+
"When true, the run is visible only to the creating user; when false, it is visible across the account. Deprecated: may be removed from the API in a future release. There is no replacement field; do not rely on it. An absent or null value means unknown, not false."
|
|
780
804
|
),
|
|
781
805
|
created_at: z.string().describe("When the run was created (ISO-8601)"),
|
|
782
806
|
updated_at: z.string().describe("When the run was last updated (ISO-8601)")
|
|
@@ -918,8 +942,12 @@ var GetDurableRunResponseSchema = z.object({
|
|
|
918
942
|
execution: ExecutionSummarySchema.nullable().describe(
|
|
919
943
|
"Linked execution, including the operations journal. Null while the run is still in `initialized` state."
|
|
920
944
|
),
|
|
921
|
-
|
|
922
|
-
|
|
945
|
+
// No `.meta({ deprecated: true })`: that flag drops a field from the
|
|
946
|
+
// generated README, and the API still returns this one, so it stays
|
|
947
|
+
// documented while deprecated.
|
|
948
|
+
/** @deprecated May be removed from the API in a future release. No replacement; do not rely on this value. */
|
|
949
|
+
is_private: z.boolean().nullish().describe(
|
|
950
|
+
"When true, the run is visible only to the creating user; when false, it is visible across the account. Deprecated: may be removed from the API in a future release. There is no replacement field; do not rely on it. An absent or null value means unknown, not false."
|
|
923
951
|
),
|
|
924
952
|
created_at: z.string().describe("When the run was created (ISO-8601)"),
|
|
925
953
|
updated_at: z.string().describe("When the run was last updated (ISO-8601)")
|
|
@@ -1001,8 +1029,12 @@ var RunDurableResponseSchema = z.object({
|
|
|
1001
1029
|
status: z.literal("initialized").describe(
|
|
1002
1030
|
"Always `initialized` on creation. Poll via getDurableRun to observe the run advancing to `started` / `finished` / `failed` / `cancelled`."
|
|
1003
1031
|
),
|
|
1004
|
-
|
|
1005
|
-
|
|
1032
|
+
// No `.meta({ deprecated: true })`: that flag drops a field from the
|
|
1033
|
+
// generated README, and the API still returns this one, so it stays
|
|
1034
|
+
// documented while deprecated.
|
|
1035
|
+
/** @deprecated May be removed from the API in a future release. No replacement; do not rely on this value. */
|
|
1036
|
+
is_private: z.boolean().nullish().describe(
|
|
1037
|
+
"When true, the run is visible only to the creating user; when false, it is visible across the account. Deprecated: may be removed from the API in a future release. There is no replacement field; do not rely on it. An absent or null value means unknown, not false."
|
|
1006
1038
|
),
|
|
1007
1039
|
created_at: z.string().describe("When the run was created (ISO-8601)")
|
|
1008
1040
|
});
|
|
@@ -2283,7 +2315,10 @@ var runWorkflowPlugin = defineMethod({
|
|
|
2283
2315
|
});
|
|
2284
2316
|
var MAX_SOURCE_FILES_COUNT = 50;
|
|
2285
2317
|
var MAX_SOURCE_FILE_LENGTH = 2e5;
|
|
2318
|
+
var MAX_TRIGGER_CONFIGURATIONS_COUNT = 20;
|
|
2319
|
+
var MAX_CONNECTIONS_COUNT = 100;
|
|
2286
2320
|
var DEFAULT_ENTRYPOINT_FILE = "/workflow.ts";
|
|
2321
|
+
var TRIGGER_NODE_ID_PATTERN = /^workflow-trigger-[0-9]+$/;
|
|
2287
2322
|
var EXAMPLE_SOURCE_FILES = {
|
|
2288
2323
|
[DEFAULT_ENTRYPOINT_FILE]: 'import { defineDurable } from "@zapier/zapier-durable"; export default defineDurable({ name: "hello-world", run: async (ctx) => { return ctx.step("greet", async () => "Hello, world!"); } });'
|
|
2289
2324
|
};
|
|
@@ -2295,10 +2330,65 @@ var WorkflowValidationSourceFilesSchema = z.record(
|
|
|
2295
2330
|
}).refine((files) => Object.keys(files).length <= MAX_SOURCE_FILES_COUNT, {
|
|
2296
2331
|
message: `sourceFiles must contain at most ${MAX_SOURCE_FILES_COUNT} files`
|
|
2297
2332
|
}).describe("Exact TypeScript sources keyed by absolute logical path.").meta({ example: EXAMPLE_SOURCE_FILES });
|
|
2333
|
+
var WorkflowCheckGroupSchema = z.enum(["source", "access"]).describe(
|
|
2334
|
+
"`source` runs checks that read only the request. `access` looks up the app, action, connection, and trigger references against Zapier and the caller's account."
|
|
2335
|
+
);
|
|
2336
|
+
var WorkflowIssueSeveritySchema = z.enum(["error", "warning", "info", "hint"]).describe("Diagnostic severity.");
|
|
2337
|
+
var WorkflowValidationTriggerSchema = z.object({
|
|
2338
|
+
selectedApi: z.string().optional().describe(
|
|
2339
|
+
"Zapier implementation id the trigger is published with, e.g. `ScheduleCLIAPI@1.6.0`. Checked for a version pin and, with `action`, that the trigger exists."
|
|
2340
|
+
),
|
|
2341
|
+
app: z.string().optional().describe("Key of the app the trigger belongs to."),
|
|
2342
|
+
appTitle: z.string().optional().describe("Display name of the app the trigger belongs to."),
|
|
2343
|
+
action: z.string().optional().describe("Trigger action key on the app."),
|
|
2344
|
+
actionTitle: z.string().optional().describe("Display name of the trigger action."),
|
|
2345
|
+
params: z.record(z.string(), z.unknown()).optional().describe(
|
|
2346
|
+
"Trigger settings keyed by field key. When set, checked against the trigger's fields."
|
|
2347
|
+
)
|
|
2348
|
+
}).describe("Trigger configuration for one trigger node.");
|
|
2298
2349
|
var ValidateWorkflowOptionsSchema = z.object({
|
|
2299
2350
|
sourceFiles: WorkflowValidationSourceFilesSchema,
|
|
2300
2351
|
entrypointFile: z.string().regex(/^\//, "entrypointFile must start with /").optional().describe(
|
|
2301
2352
|
"Absolute logical path of the entry file in sourceFiles. Defaults to /workflow.ts."
|
|
2353
|
+
),
|
|
2354
|
+
zapierDurableVersion: z.string().min(1).optional().describe(
|
|
2355
|
+
'Version of @zapier/zapier-durable the workflow will run on, e.g. "1.2.3". Version checks are skipped when omitted or "latest".'
|
|
2356
|
+
),
|
|
2357
|
+
dependencies: z.record(z.string(), z.string()).optional().describe(
|
|
2358
|
+
"npm package dependencies keyed by package name. Dependency checks are skipped when omitted."
|
|
2359
|
+
),
|
|
2360
|
+
checkGroups: z.array(WorkflowCheckGroupSchema).min(1).refine((groups) => new Set(groups).size === groups.length, {
|
|
2361
|
+
message: "checkGroups must not repeat a group"
|
|
2362
|
+
}).optional().describe(
|
|
2363
|
+
"Check groups to run. Runs every group when omitted. Pass only `source` to skip the account lookups, e.g. while code is being edited."
|
|
2364
|
+
),
|
|
2365
|
+
severity: WorkflowIssueSeveritySchema.optional().describe(
|
|
2366
|
+
"Return only issues with exactly this severity, and skip checks that only report other severities. Returns every issue when omitted."
|
|
2367
|
+
),
|
|
2368
|
+
triggerConfigurations: z.record(z.string(), WorkflowValidationTriggerSchema).superRefine((triggers, ctx) => {
|
|
2369
|
+
for (const key of Object.keys(triggers)) {
|
|
2370
|
+
if (!TRIGGER_NODE_ID_PATTERN.test(key)) {
|
|
2371
|
+
ctx.addIssue({
|
|
2372
|
+
code: "custom",
|
|
2373
|
+
message: `triggerConfigurations keys must be trigger node ids like workflow-trigger-0; got '${key}'`
|
|
2374
|
+
});
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
}).refine(
|
|
2378
|
+
(triggers) => Object.keys(triggers).length <= MAX_TRIGGER_CONFIGURATIONS_COUNT,
|
|
2379
|
+
{
|
|
2380
|
+
message: `triggerConfigurations must contain at most ${MAX_TRIGGER_CONFIGURATIONS_COUNT} triggers`
|
|
2381
|
+
}
|
|
2382
|
+
).optional().describe(
|
|
2383
|
+
'Trigger configurations keyed by trigger node id (`workflow-trigger-{i}`). The trigger isn\'t in the source, so it\'s only checked when sent, e.g. `{ "workflow-trigger-0": { "selectedApi": "ScheduleCLIAPI@1.6.0", "action": "everyDay" } }`.'
|
|
2384
|
+
),
|
|
2385
|
+
connections: z.record(z.string(), ConnectionBindingSchema).refine(
|
|
2386
|
+
(connections) => Object.keys(connections).length <= MAX_CONNECTIONS_COUNT,
|
|
2387
|
+
{
|
|
2388
|
+
message: `connections must contain at most ${MAX_CONNECTIONS_COUNT} aliases`
|
|
2389
|
+
}
|
|
2390
|
+
).optional().describe(
|
|
2391
|
+
'Named connection aliases the source uses. Maps each alias to its Zapier connection ID, e.g. `{ "slack": { "connectionId": 123 } }`. Aliases are only checked when sent.'
|
|
2302
2392
|
)
|
|
2303
2393
|
}).refine(
|
|
2304
2394
|
({ sourceFiles, entrypointFile }) => (entrypointFile ?? DEFAULT_ENTRYPOINT_FILE) in sourceFiles,
|
|
@@ -2321,11 +2411,29 @@ var WorkflowValidationIssueSchema = z.object({
|
|
|
2321
2411
|
"Extensible diagnostic category; clients must accept unfamiliar values."
|
|
2322
2412
|
),
|
|
2323
2413
|
message: z.string().describe("Safe human-readable explanation."),
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
severity:
|
|
2414
|
+
title: z.string().optional().describe(
|
|
2415
|
+
"Short label for the issue, safe to show in place of `message` where space is short. Omitted for kinds with no title yet; fall back to `message`."
|
|
2416
|
+
),
|
|
2417
|
+
severity: WorkflowIssueSeveritySchema,
|
|
2328
2418
|
suggestion: z.string().optional().describe("Actionable fix hint."),
|
|
2419
|
+
fix: z.string().optional().describe(
|
|
2420
|
+
"Extensible: what resolves the issue. Known values are `agent` (change the source), `upgrade` (change the account's plan) and `retry` (a lookup failed; validate again). Omitted or unknown means `agent`."
|
|
2421
|
+
),
|
|
2422
|
+
incomplete: z.boolean().optional().describe(
|
|
2423
|
+
"`true` when the issue means the workflow isn't finished yet rather than wrong, e.g. no steps yet. Still blocks publish."
|
|
2424
|
+
),
|
|
2425
|
+
app_key: z.string().optional().describe(
|
|
2426
|
+
"Implementation id of the app the issue is about, e.g. `SlackCLIAPI`. Set on `admin-restricted-app`."
|
|
2427
|
+
),
|
|
2428
|
+
connection_id: z.string().optional().describe(
|
|
2429
|
+
"Zapier connection id the issue is about, as a string. Set on connection issues."
|
|
2430
|
+
),
|
|
2431
|
+
connection_alias: z.string().optional().describe(
|
|
2432
|
+
"Connection alias the source used, a key of the request's `connections`. Set on connection issues when the source named the connection by alias."
|
|
2433
|
+
),
|
|
2434
|
+
unchecked_kind: z.string().optional().describe(
|
|
2435
|
+
"On `check-unavailable`, the issue kind whose check couldn't run because a lookup failed. Validating again retries it."
|
|
2436
|
+
),
|
|
2329
2437
|
source: WorkflowValidationSourceLocationSchema.optional().describe(
|
|
2330
2438
|
"Affected source location."
|
|
2331
2439
|
),
|
|
@@ -2334,6 +2442,19 @@ var WorkflowValidationIssueSchema = z.object({
|
|
|
2334
2442
|
),
|
|
2335
2443
|
syntax_kind: z.string().optional().describe(
|
|
2336
2444
|
"TypeScript AST node kind the diagnostic was raised against (e.g. `CallExpression`)."
|
|
2445
|
+
),
|
|
2446
|
+
state_path: z.string().optional().describe("Workflow state path the issue is about."),
|
|
2447
|
+
projection_node_id: z.string().optional().describe(
|
|
2448
|
+
"Diagram node the issue is about. Validation sets it only on trigger issues, to the trigger node id (`workflow-trigger-{i}`)."
|
|
2449
|
+
),
|
|
2450
|
+
configuration_id: z.string().optional().describe(
|
|
2451
|
+
"Canonical configuration reference. Validation currently leaves it unset."
|
|
2452
|
+
),
|
|
2453
|
+
operation_id: z.string().optional().describe(
|
|
2454
|
+
"Canonical operation that owns the issue, when unambiguous. Match against diagram nodes' `operation_ids` for the same source."
|
|
2455
|
+
),
|
|
2456
|
+
region_id: z.string().optional().describe(
|
|
2457
|
+
"Immediate canonical parent region of the owning operation. May have no visible container in the diagram."
|
|
2337
2458
|
)
|
|
2338
2459
|
});
|
|
2339
2460
|
var ValidateWorkflowResponseSchema = z.object({
|
|
@@ -2341,6 +2462,24 @@ var ValidateWorkflowResponseSchema = z.object({
|
|
|
2341
2462
|
});
|
|
2342
2463
|
|
|
2343
2464
|
// src/plugins/codeSubstrate/validateWorkflow/index.ts
|
|
2465
|
+
function toWireTriggerConfigurations(triggers) {
|
|
2466
|
+
return Object.fromEntries(
|
|
2467
|
+
Object.entries(triggers).map(([nodeId, trigger]) => {
|
|
2468
|
+
const wire = {};
|
|
2469
|
+
if (trigger.selectedApi !== void 0) {
|
|
2470
|
+
wire.selected_api = trigger.selectedApi;
|
|
2471
|
+
}
|
|
2472
|
+
if (trigger.app !== void 0) wire.app_key = trigger.app;
|
|
2473
|
+
if (trigger.appTitle !== void 0) wire.app_title = trigger.appTitle;
|
|
2474
|
+
if (trigger.action !== void 0) wire.action_key = trigger.action;
|
|
2475
|
+
if (trigger.actionTitle !== void 0) {
|
|
2476
|
+
wire.action_title = trigger.actionTitle;
|
|
2477
|
+
}
|
|
2478
|
+
if (trigger.params !== void 0) wire.params = trigger.params;
|
|
2479
|
+
return [nodeId, wire];
|
|
2480
|
+
})
|
|
2481
|
+
);
|
|
2482
|
+
}
|
|
2344
2483
|
var validateWorkflowPlugin = defineMethod({
|
|
2345
2484
|
...codeSubstrateDefaults,
|
|
2346
2485
|
name: "validateWorkflow",
|
|
@@ -2358,10 +2497,31 @@ var validateWorkflowPlugin = defineMethod({
|
|
|
2358
2497
|
if (input.entrypointFile !== void 0) {
|
|
2359
2498
|
body.entrypoint_file = input.entrypointFile;
|
|
2360
2499
|
}
|
|
2500
|
+
if (input.zapierDurableVersion !== void 0) {
|
|
2501
|
+
body.zapier_durable_version = input.zapierDurableVersion;
|
|
2502
|
+
}
|
|
2503
|
+
if (input.dependencies !== void 0) {
|
|
2504
|
+
body.dependencies = input.dependencies;
|
|
2505
|
+
}
|
|
2506
|
+
if (input.checkGroups !== void 0) {
|
|
2507
|
+
body.check_groups = input.checkGroups;
|
|
2508
|
+
}
|
|
2509
|
+
if (input.triggerConfigurations !== void 0) {
|
|
2510
|
+
body.trigger_configurations = toWireTriggerConfigurations(
|
|
2511
|
+
input.triggerConfigurations
|
|
2512
|
+
);
|
|
2513
|
+
}
|
|
2514
|
+
if (input.connections !== void 0) {
|
|
2515
|
+
body.connections = toWireConnections(input.connections);
|
|
2516
|
+
}
|
|
2361
2517
|
const raw = await imports.api.post(
|
|
2362
2518
|
`${CODE_SUBSTRATE_ANALYZER_API}/validations`,
|
|
2363
2519
|
body,
|
|
2364
|
-
{
|
|
2520
|
+
{
|
|
2521
|
+
authRequired: true,
|
|
2522
|
+
// The analyzer rejects `severity` in the body; it is a query parameter.
|
|
2523
|
+
...input.severity === void 0 ? {} : { searchParams: { severity: input.severity } }
|
|
2524
|
+
}
|
|
2365
2525
|
);
|
|
2366
2526
|
return { data: ValidateWorkflowResponseSchema.parse(raw) };
|
|
2367
2527
|
}
|