@zapier/zapier-sdk-core 0.12.0 → 0.13.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 +17 -0
- package/openapi.yaml +54 -27
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @zapier/zapier-sdk-core
|
|
2
2
|
|
|
3
|
+
## 0.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- eb48f58: Adopt canonical resource-shaped `ActionRunContext` for the
|
|
8
|
+
`POST /api/v0/approvals` request body.
|
|
9
|
+
|
|
10
|
+
The inline `RequestContext` / `ActionRunContext` / `HttpRequestContext`
|
|
11
|
+
Zod mirrors in `create-approval.ts` are deleted in favor of importing
|
|
12
|
+
the canonical `RequestContextSchema` directly from `@zapier/policy-context`
|
|
13
|
+
(now a runtime dependency). Action identity is now carried in a single
|
|
14
|
+
canonical `resource` field of the form
|
|
15
|
+
`action/{selected_api}/{action_type}/{action_key}`; the legacy
|
|
16
|
+
`{selected_api, action_type, action_key}` triple is still accepted on
|
|
17
|
+
input during the migration window and normalized to the canonical shape
|
|
18
|
+
before storage. No wire-level breaking change for existing callers.
|
|
19
|
+
|
|
3
20
|
## 0.12.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/openapi.yaml
CHANGED
|
@@ -230,30 +230,30 @@ components:
|
|
|
230
230
|
properties:
|
|
231
231
|
scheme:
|
|
232
232
|
type: string
|
|
233
|
-
description: URL scheme
|
|
233
|
+
description: URL scheme, e.g. "https"
|
|
234
234
|
host:
|
|
235
235
|
type: string
|
|
236
|
-
description: Hostname
|
|
236
|
+
description: Hostname, e.g. "api.example.com"
|
|
237
237
|
port:
|
|
238
|
-
type:
|
|
239
|
-
description: Port number
|
|
238
|
+
type: integer
|
|
239
|
+
description: Port number (defaults to 443 for https, 80 for http)
|
|
240
240
|
path:
|
|
241
241
|
type: string
|
|
242
|
-
description: URL path
|
|
242
|
+
description: URL path, e.g. "/v1/foo"
|
|
243
243
|
query:
|
|
244
244
|
type: object
|
|
245
245
|
additionalProperties:
|
|
246
246
|
type: array
|
|
247
247
|
items:
|
|
248
248
|
type: string
|
|
249
|
-
description: Query parameters
|
|
249
|
+
description: Query parameters as key to string array mapping
|
|
250
250
|
required:
|
|
251
251
|
- scheme
|
|
252
252
|
- host
|
|
253
253
|
- port
|
|
254
254
|
- path
|
|
255
255
|
- query
|
|
256
|
-
description: Parsed URL components
|
|
256
|
+
description: Parsed URL components for policy condition matching
|
|
257
257
|
HttpRequestContext:
|
|
258
258
|
type: object
|
|
259
259
|
properties:
|
|
@@ -264,6 +264,7 @@ components:
|
|
|
264
264
|
description: Context type discriminator
|
|
265
265
|
method:
|
|
266
266
|
type: string
|
|
267
|
+
maxLength: 10
|
|
267
268
|
description: HTTP method
|
|
268
269
|
url:
|
|
269
270
|
$ref: "#/components/schemas/ParsedUrl"
|
|
@@ -276,21 +277,38 @@ components:
|
|
|
276
277
|
type:
|
|
277
278
|
- string
|
|
278
279
|
- "null"
|
|
280
|
+
maxLength: 65536
|
|
279
281
|
description: Raw body string
|
|
280
282
|
body_json:
|
|
281
|
-
description: Parsed JSON body
|
|
283
|
+
description: Parsed JSON body (if applicable)
|
|
282
284
|
connection_id:
|
|
283
285
|
type: string
|
|
286
|
+
maxLength: 255
|
|
284
287
|
description: Zapier connection ID used for this request
|
|
285
288
|
reason:
|
|
286
289
|
type: string
|
|
287
|
-
|
|
290
|
+
maxLength: 1024
|
|
291
|
+
description: Optional human-readable reason for the request
|
|
288
292
|
required:
|
|
289
293
|
- request_type
|
|
290
294
|
- method
|
|
291
295
|
- url
|
|
292
296
|
- headers
|
|
293
297
|
- body
|
|
298
|
+
- body_json
|
|
299
|
+
action_type:
|
|
300
|
+
type: string
|
|
301
|
+
enum:
|
|
302
|
+
- filter
|
|
303
|
+
- read
|
|
304
|
+
- read_bulk
|
|
305
|
+
- run
|
|
306
|
+
- search
|
|
307
|
+
- search_and_write
|
|
308
|
+
- search_or_write
|
|
309
|
+
- write
|
|
310
|
+
description: "Legacy: canonical Zapier action type. Prefer `resource`."
|
|
311
|
+
deprecated: true
|
|
294
312
|
ActionRunContext:
|
|
295
313
|
type: object
|
|
296
314
|
properties:
|
|
@@ -299,41 +317,50 @@ components:
|
|
|
299
317
|
enum:
|
|
300
318
|
- action_run
|
|
301
319
|
description: Context type discriminator
|
|
320
|
+
resource:
|
|
321
|
+
type: string
|
|
322
|
+
maxLength: 1024
|
|
323
|
+
description: Canonical action resource, e.g. action/Slack@1.0.0/write/send_message
|
|
302
324
|
selected_api:
|
|
303
325
|
type: string
|
|
304
|
-
|
|
326
|
+
maxLength: 255
|
|
327
|
+
deprecated: true
|
|
328
|
+
description: "Legacy: app identifier, e.g. Slack@1.0.0. Prefer `resource`."
|
|
305
329
|
action_type:
|
|
306
|
-
|
|
307
|
-
description: Action type
|
|
330
|
+
$ref: "#/components/schemas/action_type"
|
|
308
331
|
action_key:
|
|
309
332
|
type: string
|
|
310
|
-
|
|
333
|
+
maxLength: 255
|
|
334
|
+
deprecated: true
|
|
335
|
+
description: "Legacy: action key, e.g. send_message. Prefer `resource`."
|
|
311
336
|
connection_id:
|
|
312
337
|
type: string
|
|
313
|
-
|
|
338
|
+
maxLength: 255
|
|
339
|
+
description: Zapier connection ID used for this request
|
|
314
340
|
inputs:
|
|
315
341
|
description: Action input parameters
|
|
316
342
|
reason:
|
|
317
343
|
type: string
|
|
318
|
-
|
|
344
|
+
maxLength: 1024
|
|
345
|
+
description: Optional human-readable reason for the request
|
|
319
346
|
required:
|
|
320
347
|
- request_type
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
348
|
+
description: Action run context. The canonical shape carries the action identity in a single `resource` field of the form `action/{selected_api}/{action_type}/{action_key}`. The legacy `{selected_api, action_type, action_key}` shape is also accepted on input during the migration window — approvalsapi normalizes it to the canonical form before storage.
|
|
349
|
+
RequestContext:
|
|
350
|
+
anyOf:
|
|
351
|
+
- $ref: "#/components/schemas/HttpRequestContext"
|
|
352
|
+
- $ref: "#/components/schemas/ActionRunContext"
|
|
353
|
+
description: Union of request context shapes, keyed on `request_type`.
|
|
354
|
+
discriminator:
|
|
355
|
+
propertyName: request_type
|
|
356
|
+
mapping:
|
|
357
|
+
http_request: "#/components/schemas/HttpRequestContext"
|
|
358
|
+
action_run: "#/components/schemas/ActionRunContext"
|
|
324
359
|
CreateApprovalBody:
|
|
325
360
|
type: object
|
|
326
361
|
properties:
|
|
327
362
|
context:
|
|
328
|
-
|
|
329
|
-
- $ref: "#/components/schemas/HttpRequestContext"
|
|
330
|
-
- $ref: "#/components/schemas/ActionRunContext"
|
|
331
|
-
discriminator:
|
|
332
|
-
propertyName: request_type
|
|
333
|
-
mapping:
|
|
334
|
-
http_request: "#/components/schemas/HttpRequestContext"
|
|
335
|
-
action_run: "#/components/schemas/ActionRunContext"
|
|
336
|
-
description: The request context for the approval — either an HTTP request context or an action run context
|
|
363
|
+
$ref: "#/components/schemas/RequestContext"
|
|
337
364
|
required:
|
|
338
365
|
- context
|
|
339
366
|
CreateClientCredentialsResponse:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zapier/zapier-sdk-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Core schemas and TypeScript types for the Zapier SDK API",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Zapier, Inc.",
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
"LICENSE"
|
|
89
89
|
],
|
|
90
90
|
"dependencies": {
|
|
91
|
+
"@zapier/policy-context": "1.1.0",
|
|
91
92
|
"zod": "4.3.6"
|
|
92
93
|
},
|
|
93
94
|
"devDependencies": {
|