zapier-platform-schema
Advanced tools
Comparing version 15.2.0 to 15.3.0
{ | ||
"version": "15.2.0", | ||
"version": "15.3.0", | ||
"schemas": { | ||
@@ -321,24 +321,2 @@ "AppSchema": { | ||
}, | ||
"RedirectRequestSchema": { | ||
"id": "/RedirectRequestSchema", | ||
"description": "A representation of a HTTP redirect - you can use the `{{syntax}}` to inject authentication, field or global variables.", | ||
"type": "object", | ||
"properties": { | ||
"method": { | ||
"description": "The HTTP method for the request.", | ||
"type": "string", | ||
"default": "GET", | ||
"enum": ["GET"] | ||
}, | ||
"url": { | ||
"description": "A URL for the request (we will parse the querystring and merge with params). Keys and values will not be re-encoded.", | ||
"type": "string" | ||
}, | ||
"params": { | ||
"description": "A mapping of the querystring - will get merged with any query params in the URL. Keys and values will be encoded.", | ||
"$ref": "/FlatObjectSchema" | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"RequestSchema": { | ||
@@ -433,2 +411,24 @@ "id": "/RequestSchema", | ||
}, | ||
"RedirectRequestSchema": { | ||
"id": "/RedirectRequestSchema", | ||
"description": "A representation of a HTTP redirect - you can use the `{{syntax}}` to inject authentication, field or global variables.", | ||
"type": "object", | ||
"properties": { | ||
"method": { | ||
"description": "The HTTP method for the request.", | ||
"type": "string", | ||
"default": "GET", | ||
"enum": ["GET"] | ||
}, | ||
"url": { | ||
"description": "A URL for the request (we will parse the querystring and merge with params). Keys and values will not be re-encoded.", | ||
"type": "string" | ||
}, | ||
"params": { | ||
"description": "A mapping of the querystring - will get merged with any query params in the URL. Keys and values will be encoded.", | ||
"$ref": "/FlatObjectSchema" | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"FieldsSchema": { | ||
@@ -453,3 +453,15 @@ "id": "/FieldsSchema", | ||
"type": "object", | ||
"properties": {}, | ||
"properties": { | ||
"sendCode": { | ||
"description": "EXPERIMENTAL: Define the call Zapier should make to send the OTP code.", | ||
"oneOf": [ | ||
{ | ||
"$ref": "/RequestSchema" | ||
}, | ||
{ | ||
"$ref": "/FunctionSchema" | ||
} | ||
] | ||
} | ||
}, | ||
"additionalProperties": false | ||
@@ -456,0 +468,0 @@ }, |
'use strict'; | ||
const makeSchema = require('../utils/makeSchema'); | ||
const FunctionSchema = require('./FunctionSchema'); | ||
const RequestSchema = require('./RequestSchema'); | ||
module.exports = makeSchema({ | ||
id: '/AuthenticationCustomConfigSchema', | ||
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.', | ||
type: 'object', | ||
properties: {}, | ||
additionalProperties: false, | ||
examples: [{}], | ||
antiExamples: [{ example: { foo: true }, reason: 'Invalid key.' }], | ||
}); | ||
module.exports = makeSchema( | ||
{ | ||
id: '/AuthenticationCustomConfigSchema', | ||
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.', | ||
type: 'object', | ||
properties: { | ||
sendCode: { | ||
description: | ||
'EXPERIMENTAL: Define the call Zapier should make to send the OTP code.', | ||
oneOf: [{ $ref: RequestSchema.id }, { $ref: FunctionSchema.id }], | ||
}, | ||
}, | ||
additionalProperties: false, | ||
examples: [ | ||
{}, | ||
{ | ||
sendCode: { | ||
url: 'https://example.com/api/send', | ||
headers: { Authorization: `Bearer {{process.env.API_KEY}}` }, | ||
body: { | ||
to_phone_number: '{{bundle.inputData.phone_number}}', | ||
code: '{{bundle.inputData.code}}', | ||
}, | ||
}, | ||
}, | ||
], | ||
antiExamples: [{ example: { foo: true }, reason: 'Invalid key.' }], | ||
}, | ||
[RequestSchema, FunctionSchema] | ||
); |
{ | ||
"name": "zapier-platform-schema", | ||
"version": "15.2.0", | ||
"version": "15.3.0", | ||
"description": "Schema definition for CLI apps in the Zapier Developer Platform.", | ||
@@ -5,0 +5,0 @@ "repository": "zapier/zapier-platform", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
204765
5842