@zapier/zapier-sdk 0.120.0 → 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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # @zapier/zapier-sdk
2
2
 
3
+ ## 0.121.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f208d30: Added options to `validateWorkflow` so it can check everything a workflow is published with, not just its source:
8
+ - `zapierDurableVersion` and `dependencies`: run the version and dependency checks.
9
+ - `triggerConfigurations`: check the trigger, keyed by trigger node id (`workflow-trigger-0`), with its `selectedApi`, `app`, `appTitle`, `action`, `actionTitle`, and `params`.
10
+ - `connections`: check the connection aliases the source uses, as `{ alias: { connectionId } }`.
11
+ - `checkGroups`: run only some checks, for example `["source"]` to skip the account lookups.
12
+ - `severity`: return only issues of one severity, for example `"error"`, and skip checks that only report other severities.
13
+
14
+ All are optional. Checks that need a value you leave out are skipped.
15
+
16
+ Each issue in the response can now also carry:
17
+ - `title`: a short label to show in place of `message`.
18
+ - `fix`: what resolves it (`agent`, `upgrade`, or `retry`; treat unknown values as `agent`).
19
+ - `incomplete`: `true` when the workflow isn't finished yet rather than wrong.
20
+ - `app_key`, `connection_id`, `connection_alias`, and `unchecked_kind`: the app, connection, or skipped check the issue is about.
21
+ - `state_path`, `projection_node_id`, `configuration_id`, `operation_id`, and `region_id`: where the issue sits in the workflow and its diagram.
22
+
3
23
  ## 0.120.0
4
24
 
5
25
  ### Minor Changes
package/README.md CHANGED
@@ -2956,30 +2956,48 @@ Validate durable workflow source without publishing it. Returns source diagnosti
2956
2956
 
2957
2957
  **Parameters:**
2958
2958
 
2959
- | Name | Type | Required | Default | Possible Values | Description |
2960
- | -------------------- | -------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------- |
2961
- | `options` | `object` | ✅ | — | — | |
2962
- | ​ ↳ `sourceFiles` | `object` | ✅ | — | — | Exact TypeScript sources keyed by absolute logical path. |
2963
- | ​ ↳ `entrypointFile` | `string` | ❌ | — | — | Absolute logical path of the entry file in sourceFiles. Defaults to /workflow.ts. |
2959
+ | Name | Type | Required | Default | Possible Values | Description |
2960
+ | --------------------------- | -------- | -------- | ------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2961
+ | `options` | `object` | ✅ | — | — | |
2962
+ | ​ ↳ `sourceFiles` | `object` | ✅ | — | — | Exact TypeScript sources keyed by absolute logical path. |
2963
+ | ​ ↳ `entrypointFile` | `string` | ❌ | — | — | Absolute logical path of the entry file in sourceFiles. Defaults to /workflow.ts. |
2964
+ | ​ ↳ `zapierDurableVersion` | `string` | ❌ | — | — | Version of @zapier/zapier-durable the workflow will run on, e.g. "1.2.3". Version checks are skipped when omitted or "latest". |
2965
+ | ​ ↳ `dependencies` | `object` | ❌ | — | — | npm package dependencies keyed by package name. Dependency checks are skipped when omitted. |
2966
+ | ​ ↳ `checkGroups` | `array` | ❌ | — | — | Check groups to run. Runs every group when omitted. Pass only `source` to skip the account lookups, e.g. while code is being edited. |
2967
+ | ​ ↳ `severity` | `string` | ❌ | — | `error`, `warning`, `info`, `hint` | Return only issues with exactly this severity, and skip checks that only report other severities. Returns every issue when omitted. |
2968
+ | ​ ↳ `triggerConfigurations` | `object` | ❌ | — | — | 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" } }`. |
2969
+ | ​ ↳ `connections` | `object` | ❌ | — | — | 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. |
2964
2970
 
2965
2971
  **Returns:** `Promise<WorkflowValidationItem>`
2966
2972
 
2967
- | Name | Type | Required | Possible Values | Description |
2968
- | ---------------------- | ---------- | -------- | ---------------------------------- | ----------------------------------------------------------------------------------- |
2969
- | `data` | `object` | ✅ | — | |
2970
- | ​ ↳ `issues[]` | `object[]` | ✅ | — | Source diagnostics, or an empty array when validation passes. |
2971
- | ​   ↳ `kind` | `string` | ✅ | — | Extensible diagnostic category; clients must accept unfamiliar values. |
2972
- | ​   ↳ `message` | `string` | ✅ | — | Safe human-readable explanation. |
2973
- | ​   ↳ `severity` | `string` | ✅ | `error`, `warning`, `info`, `hint` | Diagnostic severity. |
2974
- | ​   ↳ `suggestion` | `string` | ❌ | — | Actionable fix hint. |
2975
- | ​   ↳ `source` | `object` | ❌ | — | Affected source location. |
2976
- | ​     ↳ `file_id` | `string` | ✅ | — | Source file containing the diagnostic. |
2977
- | ​     ↳ `start_line` | `number` | ✅ | — | Inclusive 1-based start line. |
2978
- | ​     ↳ `start_column` | `number` | ✅ | — | Inclusive 1-based start column. |
2979
- | ​     ↳ `end_line` | `number` | ✅ | — | Inclusive 1-based end line. |
2980
- | ​     ↳ `end_column` | `number` | ✅ | — | Inclusive 1-based end column. |
2981
- | ​   ↳ `source_excerpt` | `string` | ❌ | — | Source text the diagnostic was raised against, truncated to 240 characters. |
2982
- | ​   ↳ `syntax_kind` | `string` | ❌ | — | TypeScript AST node kind the diagnostic was raised against (e.g. `CallExpression`). |
2973
+ | Name | Type | Required | Possible Values | Description |
2974
+ | -------------------------- | ---------- | -------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2975
+ | `data` | `object` | ✅ | — | |
2976
+ | ​ ↳ `issues[]` | `object[]` | ✅ | — | Source diagnostics, or an empty array when validation passes. |
2977
+ | ​   ↳ `kind` | `string` | ✅ | — | Extensible diagnostic category; clients must accept unfamiliar values. |
2978
+ | ​   ↳ `message` | `string` | ✅ | — | Safe human-readable explanation. |
2979
+ | ​   ↳ `title` | `string` | ❌ | — | 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`. |
2980
+ | ​   ↳ `severity` | `string` | ✅ | `error`, `warning`, `info`, `hint` | Diagnostic severity. |
2981
+ | ​   ↳ `suggestion` | `string` | ❌ | — | Actionable fix hint. |
2982
+ | ​   ↳ `fix` | `string` | ❌ | — | 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`. |
2983
+ | ​   ↳ `incomplete` | `boolean` | ❌ | — | `true` when the issue means the workflow isn't finished yet rather than wrong, e.g. no steps yet. Still blocks publish. |
2984
+ | ​   ↳ `app_key` | `string` | ❌ | — | Implementation id of the app the issue is about, e.g. `SlackCLIAPI`. Set on `admin-restricted-app`. |
2985
+ | ​   ↳ `connection_id` | `string` | ❌ | — | Zapier connection id the issue is about, as a string. Set on connection issues. |
2986
+ | ​   ↳ `connection_alias` | `string` | ❌ | — | Connection alias the source used, a key of the request's `connections`. Set on connection issues when the source named the connection by alias. |
2987
+ | ​   ↳ `unchecked_kind` | `string` | ❌ | — | On `check-unavailable`, the issue kind whose check couldn't run because a lookup failed. Validating again retries it. |
2988
+ | ​   ↳ `source` | `object` | ❌ | — | Affected source location. |
2989
+ | ​     ↳ `file_id` | `string` | ✅ | — | Source file containing the diagnostic. |
2990
+ | ​     ↳ `start_line` | `number` | ✅ | — | Inclusive 1-based start line. |
2991
+ | ​     ↳ `start_column` | `number` | ✅ | — | Inclusive 1-based start column. |
2992
+ | ​     ↳ `end_line` | `number` | ✅ | — | Inclusive 1-based end line. |
2993
+ | ​     ↳ `end_column` | `number` | ✅ | — | Inclusive 1-based end column. |
2994
+ | ​   ↳ `source_excerpt` | `string` | ❌ | — | Source text the diagnostic was raised against, truncated to 240 characters. |
2995
+ | ​   ↳ `syntax_kind` | `string` | ❌ | — | TypeScript AST node kind the diagnostic was raised against (e.g. `CallExpression`). |
2996
+ | ​   ↳ `state_path` | `string` | ❌ | — | Workflow state path the issue is about. |
2997
+ | ​   ↳ `projection_node_id` | `string` | ❌ | — | Diagram node the issue is about. Validation sets it only on trigger issues, to the trigger node id (`workflow-trigger-{i}`). |
2998
+ | ​   ↳ `configuration_id` | `string` | ❌ | — | Canonical configuration reference. Validation currently leaves it unset. |
2999
+ | ​   ↳ `operation_id` | `string` | ❌ | — | Canonical operation that owns the issue, when unambiguous. Match against diagram nodes' `operation_ids` for the same source. |
3000
+ | ​   ↳ `region_id` | `string` | ❌ | — | Immediate canonical parent region of the owning operation. May have no visible container in the diagram. |
2983
3001
 
2984
3002
  **Example:**
2985
3003