@zapier/zapier-sdk 0.98.1 → 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 CHANGED
@@ -1,5 +1,30 @@
1
1
  # @zapier/zapier-sdk
2
2
 
3
+ ## 0.100.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 22a885c: Added `validateWorkflow` (experimental) to check durable workflow source without publishing it. Pass `sourceFiles` (absolute logical path → TypeScript source) and an optional `entrypointFile`, which defaults to `/workflow.ts`. The response carries an `issues` array that is empty when the source is valid; each issue has a `kind`, a `message`, a `severity` (`error`, `warning`, `info`, or `hint`), an optional `suggestion`, and usually the `source` location it points at. New `kind` values are added over time, so treat an unfamiliar one as a diagnostic rather than an error.
8
+
9
+ ## 0.99.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 9cde1f6: Item and list methods accept `skipOutputDataValidation: true` alongside their
14
+ input, bypassing output validation for that one call. Most methods here opt out
15
+ of validation at authoring time, where a caller's flag does nothing, so it
16
+ applies to `createActionRun` and `getActionRun`. Both build their response field
17
+ by field, so nothing is stripped either way, and the visible difference is a
18
+ `meta.outputDataValidation` sidecar on a call that passes it.
19
+
20
+ `ResponseMeta` gains `outputDataValidation`, a union discriminated on `skipped`,
21
+ which supersedes the deprecated `outputValidation`. That field is still written,
22
+ with the same `{ droppedPaths }` shape.
23
+
24
+ `defineOverride` is re-exported, so a head can patch how a surface presents an
25
+ SDK method without importing kitcore. `defineMethodOverride` is deprecated in
26
+ its favour and still works.
27
+
3
28
  ## 0.98.1
4
29
 
5
30
  ### Patch Changes
package/README.md CHANGED
@@ -53,6 +53,7 @@
53
53
  - [`triggerWorkflow`](#triggerworkflow--experimental)
54
54
  - [`updateWorkflow`](#updateworkflow--experimental)
55
55
  - [`updateWorkflowDraft`](#updateworkflowdraft--experimental)
56
+ - [`validateWorkflow`](#validateworkflow--experimental)
56
57
  - [Connections](#connections)
57
58
  - [`createConnection`](#createconnection)
58
59
  - [`findFirstConnection`](#findfirstconnection)
@@ -2213,6 +2214,48 @@ const { data: workflowDraft } = await zapier.updateWorkflowDraft({
2213
2214
  });
2214
2215
  ```
2215
2216
 
2217
+ #### `validateWorkflow` 🧪 _experimental_
2218
+
2219
+ Validate durable workflow source without publishing it. Returns source diagnostics; issue kinds are extensible and may be unfamiliar to the client.
2220
+
2221
+ **Parameters:**
2222
+
2223
+ | Name | Type | Required | Default | Possible Values | Description |
2224
+ | -------------------- | -------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------- |
2225
+ | `options` | `object` | ✅ | — | — | |
2226
+ | ​ ↳ `sourceFiles` | `object` | ✅ | — | — | Exact TypeScript sources keyed by absolute logical path. |
2227
+ | ​ ↳ `entrypointFile` | `string` | ❌ | — | — | Absolute logical path of the entry file in sourceFiles. Defaults to /workflow.ts. |
2228
+
2229
+ **Returns:** `Promise<WorkflowValidationItem>`
2230
+
2231
+ | Name | Type | Required | Possible Values | Description |
2232
+ | ---------------------- | ---------- | -------- | ---------------------------------- | ----------------------------------------------------------------------------------- |
2233
+ | `data` | `object` | ✅ | — | |
2234
+ | ​ ↳ `issues[]` | `object[]` | ✅ | — | Source diagnostics, or an empty array when validation passes. |
2235
+ | ​   ↳ `kind` | `string` | ✅ | — | Extensible diagnostic category; clients must accept unfamiliar values. |
2236
+ | ​   ↳ `message` | `string` | ✅ | — | Safe human-readable explanation. |
2237
+ | ​   ↳ `severity` | `string` | ✅ | `error`, `warning`, `info`, `hint` | Diagnostic severity. |
2238
+ | ​   ↳ `suggestion` | `string` | ❌ | — | Actionable fix hint. |
2239
+ | ​   ↳ `source` | `object` | ❌ | — | Affected source location. |
2240
+ | ​     ↳ `file_id` | `string` | ✅ | — | Source file containing the diagnostic. |
2241
+ | ​     ↳ `start_line` | `number` | ✅ | — | Inclusive 1-based start line. |
2242
+ | ​     ↳ `start_column` | `number` | ✅ | — | Inclusive 1-based start column. |
2243
+ | ​     ↳ `end_line` | `number` | ✅ | — | Inclusive 1-based end line. |
2244
+ | ​     ↳ `end_column` | `number` | ✅ | — | Inclusive 1-based end column. |
2245
+ | ​   ↳ `source_excerpt` | `string` | ❌ | — | Source text the diagnostic was raised against, truncated to 240 characters. |
2246
+ | ​   ↳ `syntax_kind` | `string` | ❌ | — | TypeScript AST node kind the diagnostic was raised against (e.g. `CallExpression`). |
2247
+
2248
+ **Example:**
2249
+
2250
+ ```typescript
2251
+ const { data: workflowValidation } = await zapier.validateWorkflow({
2252
+ sourceFiles: {
2253
+ "/workflow.ts":
2254
+ 'import { defineDurable } from "@zapier/zapier-durable"; export default defineDurable("hello-world", async (ctx, input) => { return ctx.step("greet", async () => "Hello, world!"); });',
2255
+ },
2256
+ });
2257
+ ```
2258
+
2216
2259
  ### Connections
2217
2260
 
2218
2261
  #### `createConnection`