zapier-platform-schema 15.2.0 → 15.3.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/exported-schema.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "15.
|
|
2
|
+
"version": "15.3.0",
|
|
3
3
|
"schemas": {
|
|
4
4
|
"AppSchema": {
|
|
5
5
|
"id": "/AppSchema",
|
|
@@ -318,28 +318,6 @@
|
|
|
318
318
|
}
|
|
319
319
|
]
|
|
320
320
|
},
|
|
321
|
-
"RedirectRequestSchema": {
|
|
322
|
-
"id": "/RedirectRequestSchema",
|
|
323
|
-
"description": "A representation of a HTTP redirect - you can use the `{{syntax}}` to inject authentication, field or global variables.",
|
|
324
|
-
"type": "object",
|
|
325
|
-
"properties": {
|
|
326
|
-
"method": {
|
|
327
|
-
"description": "The HTTP method for the request.",
|
|
328
|
-
"type": "string",
|
|
329
|
-
"default": "GET",
|
|
330
|
-
"enum": ["GET"]
|
|
331
|
-
},
|
|
332
|
-
"url": {
|
|
333
|
-
"description": "A URL for the request (we will parse the querystring and merge with params). Keys and values will not be re-encoded.",
|
|
334
|
-
"type": "string"
|
|
335
|
-
},
|
|
336
|
-
"params": {
|
|
337
|
-
"description": "A mapping of the querystring - will get merged with any query params in the URL. Keys and values will be encoded.",
|
|
338
|
-
"$ref": "/FlatObjectSchema"
|
|
339
|
-
}
|
|
340
|
-
},
|
|
341
|
-
"additionalProperties": false
|
|
342
|
-
},
|
|
343
321
|
"RequestSchema": {
|
|
344
322
|
"id": "/RequestSchema",
|
|
345
323
|
"description": "A representation of a HTTP request - you can use the `{{syntax}}` to inject authentication, field or global variables.",
|
|
@@ -429,6 +407,28 @@
|
|
|
429
407
|
},
|
|
430
408
|
"additionalProperties": false
|
|
431
409
|
},
|
|
410
|
+
"RedirectRequestSchema": {
|
|
411
|
+
"id": "/RedirectRequestSchema",
|
|
412
|
+
"description": "A representation of a HTTP redirect - you can use the `{{syntax}}` to inject authentication, field or global variables.",
|
|
413
|
+
"type": "object",
|
|
414
|
+
"properties": {
|
|
415
|
+
"method": {
|
|
416
|
+
"description": "The HTTP method for the request.",
|
|
417
|
+
"type": "string",
|
|
418
|
+
"default": "GET",
|
|
419
|
+
"enum": ["GET"]
|
|
420
|
+
},
|
|
421
|
+
"url": {
|
|
422
|
+
"description": "A URL for the request (we will parse the querystring and merge with params). Keys and values will not be re-encoded.",
|
|
423
|
+
"type": "string"
|
|
424
|
+
},
|
|
425
|
+
"params": {
|
|
426
|
+
"description": "A mapping of the querystring - will get merged with any query params in the URL. Keys and values will be encoded.",
|
|
427
|
+
"$ref": "/FlatObjectSchema"
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
"additionalProperties": false
|
|
431
|
+
},
|
|
432
432
|
"FieldsSchema": {
|
|
433
433
|
"id": "/FieldsSchema",
|
|
434
434
|
"description": "An array or collection of fields.",
|
|
@@ -448,7 +448,19 @@
|
|
|
448
448
|
"id": "/AuthenticationCustomConfigSchema",
|
|
449
449
|
"description": "Config for custom authentication (like API keys). No extra properties are required to setup this auth type, so you can leave this empty if your app uses a custom auth method.",
|
|
450
450
|
"type": "object",
|
|
451
|
-
"properties": {
|
|
451
|
+
"properties": {
|
|
452
|
+
"sendCode": {
|
|
453
|
+
"description": "EXPERIMENTAL: Define the call Zapier should make to send the OTP code.",
|
|
454
|
+
"oneOf": [
|
|
455
|
+
{
|
|
456
|
+
"$ref": "/RequestSchema"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"$ref": "/FunctionSchema"
|
|
460
|
+
}
|
|
461
|
+
]
|
|
462
|
+
}
|
|
463
|
+
},
|
|
452
464
|
"additionalProperties": false
|
|
453
465
|
},
|
|
454
466
|
"AuthenticationDigestConfigSchema": {
|
|
@@ -1,14 +1,37 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const makeSchema = require('../utils/makeSchema');
|
|
4
|
+
const FunctionSchema = require('./FunctionSchema');
|
|
5
|
+
const RequestSchema = require('./RequestSchema');
|
|
4
6
|
|
|
5
|
-
module.exports = makeSchema(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
module.exports = makeSchema(
|
|
8
|
+
{
|
|
9
|
+
id: '/AuthenticationCustomConfigSchema',
|
|
10
|
+
description:
|
|
11
|
+
'Config for custom authentication (like API keys). No extra properties are required to setup this auth type, so you can leave this empty if your app uses a custom auth method.',
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {
|
|
14
|
+
sendCode: {
|
|
15
|
+
description:
|
|
16
|
+
'EXPERIMENTAL: Define the call Zapier should make to send the OTP code.',
|
|
17
|
+
oneOf: [{ $ref: RequestSchema.id }, { $ref: FunctionSchema.id }],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
additionalProperties: false,
|
|
21
|
+
examples: [
|
|
22
|
+
{},
|
|
23
|
+
{
|
|
24
|
+
sendCode: {
|
|
25
|
+
url: 'https://example.com/api/send',
|
|
26
|
+
headers: { Authorization: `Bearer {{process.env.API_KEY}}` },
|
|
27
|
+
body: {
|
|
28
|
+
to_phone_number: '{{bundle.inputData.phone_number}}',
|
|
29
|
+
code: '{{bundle.inputData.code}}',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
antiExamples: [{ example: { foo: true }, reason: 'Invalid key.' }],
|
|
35
|
+
},
|
|
36
|
+
[RequestSchema, FunctionSchema]
|
|
37
|
+
);
|
package/package.json
CHANGED