diff --git a/packages/cli/package.json b/packages/cli/package.json index 58124a7fb..d4ad85f0c 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "zapier-platform-cli", - "version": "8.4.0", + "version": "8.4.1", "description": "The CLI for apps in the Zapier Developer Platform.", "repository": "zapier/zapier-platform-cli", "homepage": "https://zapier.com/", diff --git a/packages/cli/src/constants.js b/packages/cli/src/constants.js index 355de66ad..f5748c309 100644 --- a/packages/cli/src/constants.js +++ b/packages/cli/src/constants.js @@ -40,25 +40,36 @@ const ANALYTICS_MODES = { const PACKAGE_VERSION = require('../package.json').version; const UPDATE_NOTIFICATION_INTERVAL = 1000 * 60 * 60 * 24 * 7; // one week +// can't just read from argv because they could have lots of extra data, such as +// [ '/Users/david/.nvm/versions/node/v10.13.0/bin/node', +// '/Users/david/projects/zapier/platform/node_modules/.bin/mocha', +// 'src/tests' ] +const argvStr = process.argv.join(' '); +const IS_TESTING = + argvStr.includes('mocha') || + argvStr.includes('jest') || + (process.env.NODE_ENV || '').toLowerCase().startsWith('test'); + module.exports = { ANALYTICS_KEY, ANALYTICS_MODES, API_PATH, AUTH_KEY, - AUTH_LOCATION, AUTH_LOCATION_RAW, + AUTH_LOCATION, BASE_ENDPOINT, + BLACKLISTED_PATHS, BUILD_DIR, BUILD_PATH, - SOURCE_PATH, - BLACKLISTED_PATHS, CURRENT_APP_FILE, DEBUG, DEFINITION_PATH, ENDPOINT, + IS_TESTING, LAMBDA_VERSION, PACKAGE_VERSION, PLATFORM_PACKAGE, + SOURCE_PATH, STARTER_REPO, UPDATE_NOTIFICATION_INTERVAL }; diff --git a/packages/cli/src/utils/analytics.js b/packages/cli/src/utils/analytics.js index f1d03cc2e..8924bb39e 100644 --- a/packages/cli/src/utils/analytics.js +++ b/packages/cli/src/utils/analytics.js @@ -2,7 +2,7 @@ const { callAPI } = require('./api'); // const { readFile } = require('./files'); const debug = require('debug')('zapier:analytics'); const pkg = require('../../package.json'); -const { ANALYTICS_KEY, ANALYTICS_MODES } = require('../constants'); +const { ANALYTICS_KEY, ANALYTICS_MODES, IS_TESTING } = require('../constants'); const { readUserConfig, writeUserConfig } = require('./userConfig'); const currentAnalyticsMode = async () => { @@ -15,19 +15,22 @@ const setAnalyticsMode = newMode => { return writeUserConfig({ [ANALYTICS_KEY]: newMode }); }; +const shouldSkipAnalytics = mode => + IS_TESTING || + process.env.DISABLE_ZAPIER_ANALYTICS || + mode === ANALYTICS_MODES.disabled; + const recordAnalytics = async (command, isValidCommand, args, flags) => { const analyticsMode = await currentAnalyticsMode(); - const shouldRecordAnalytics = - process.env.DISABLE_ZAPIER_ANALYTICS || - (process.NODE_ENV !== 'test' && analyticsMode !== ANALYTICS_MODES.disabled); - - if (!shouldRecordAnalytics) { + if (shouldSkipAnalytics(analyticsMode)) { + debug('skipping analytics'); return; } const shouldRecordAnonymously = analyticsMode === ANALYTICS_MODES.anonymous; + // to make this more testable, we should split this out into its own function const analyticsBody = { command, isValidCommand, @@ -41,25 +44,24 @@ const recordAnalytics = async (command, isValidCommand, args, flags) => { }; debug('sending', analyticsBody); - return shouldRecordAnalytics - ? callAPI( - '/analytics', - { - method: 'POST', - body: analyticsBody, - skipDeployKey: shouldRecordAnonymously - }, - true, - false - ) - .then(({ success }) => debug('success:', success)) - .catch(({ errText }) => debug('err:', errText)) - : Promise.resolve(); + return callAPI( + '/analytics', + { + method: 'POST', + body: analyticsBody, + skipDeployKey: shouldRecordAnonymously + }, + true, + false + ) + .then(({ success }) => debug('success:', success)) + .catch(({ errText }) => debug('err:', errText)); }; module.exports = { currentAnalyticsMode, recordAnalytics, + shouldSkipAnalytics, modes: ANALYTICS_MODES, setAnalyticsMode }; diff --git a/packages/core/package.json b/packages/core/package.json index 2efd41ac9..495271922 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "zapier-platform-core", - "version": "8.4.0", + "version": "8.4.1", "description": "The core SDK for CLI apps in the Zapier Developer Platform.", "repository": "zapier/zapier-platform-core", "homepage": "https://zapier.com/", @@ -46,7 +46,7 @@ "node-fetch": "1.7.1", "oauth-sign": "0.9.0", "semver": "5.6.0", - "zapier-platform-schema": "8.4.0" + "zapier-platform-schema": "8.4.1" }, "devDependencies": { "adm-zip": "0.4.13", diff --git a/packages/core/src/http-middlewares/after/throw-for-stale-auth.js b/packages/core/src/http-middlewares/after/throw-for-stale-auth.js index 257dca96c..07d9f1906 100644 --- a/packages/core/src/http-middlewares/after/throw-for-stale-auth.js +++ b/packages/core/src/http-middlewares/after/throw-for-stale-auth.js @@ -1,12 +1,13 @@ 'use strict'; +const { stripQueryFromURL } = require('../../tools/http'); + const errors = require('../../errors'); const throwForStaleAuth = resp => { if (resp.status === 401) { - const message = `Got ${resp.status} calling ${resp.request.method} ${ - resp.request.url - }, triggering auth refresh.`; + const cleanURL = stripQueryFromURL(resp.request.url); + const message = `Got ${resp.status} calling ${resp.request.method} ${cleanURL}, triggering auth refresh.`; throw new errors.RefreshAuthError(message); } diff --git a/packages/core/src/http-middlewares/after/throw-for-status.js b/packages/core/src/http-middlewares/after/throw-for-status.js index f208d89bb..430d9b603 100644 --- a/packages/core/src/http-middlewares/after/throw-for-status.js +++ b/packages/core/src/http-middlewares/after/throw-for-status.js @@ -1,10 +1,11 @@ 'use strict'; +const { stripQueryFromURL } = require('../../tools/http'); + const throwForStatus = resp => { if (resp.status > 300) { - const message = `Got ${resp.status} calling ${resp.request.method} ${ - resp.request.url - }, expected 2xx.`; + const cleanURL = stripQueryFromURL(resp.request.url); + const message = `Got ${resp.status} calling ${resp.request.method} ${cleanURL}, expected 2xx.`; throw new Error(message); } diff --git a/packages/core/src/tools/http.js b/packages/core/src/tools/http.js index c228c2bcc..ab1202615 100644 --- a/packages/core/src/tools/http.js +++ b/packages/core/src/tools/http.js @@ -1,3 +1,5 @@ +const { URL } = require('url'); + const _ = require('lodash'); const fetch = require('node-fetch'); @@ -28,7 +30,7 @@ const parseHttpList = s => { let part = ''; let escape = false; - let quote = false; + let quote = false; for (let i = 0; i < s.length; i++) { const cur = s.charAt(i); @@ -97,11 +99,18 @@ const parseDictHeader = s => { const unheader = h => h instanceof fetch.Headers && _.isFunction(h.toJSON) ? h.toJSON() : h; +const stripQueryFromURL = url => { + // Strip off querystring for any sensitive data + const u = new URL(url); + return u.origin + u.pathname; +}; + module.exports = { FORM_TYPE, JSON_TYPE, JSON_TYPE_UTF8, getContentType, parseDictHeader, + stripQueryFromURL, unheader }; diff --git a/packages/schema/docs/build/schema.md b/packages/schema/docs/build/schema.md index 5a3fce254..ae92e05c5 100644 --- a/packages/schema/docs/build/schema.md +++ b/packages/schema/docs/build/schema.md @@ -1,7 +1,7 @@ # `zapier-platform-schema` Generated Documentation -This is automatically generated by the `npm run docs` command in `zapier-platform-schema` version `8.4.0`. +This is automatically generated by the `npm run docs` command in `zapier-platform-schema` version `8.4.1`. ----- @@ -70,7 +70,7 @@ Codifies high-level options for your app. * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/AppFlagsSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/AppFlagsSchema.js) +* **Source Code** - [lib/schemas/AppFlagsSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/AppFlagsSchema.js) #### Examples @@ -99,7 +99,7 @@ Represents a full app. * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/AppSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/AppSchema.js) +* **Source Code** - [lib/schemas/AppSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/AppSchema.js) @@ -133,7 +133,7 @@ Config for Basic Authentication. No extra properties are required to setup Basic * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/AuthenticationBasicConfigSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/AuthenticationBasicConfigSchema.js) +* **Source Code** - [lib/schemas/AuthenticationBasicConfigSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/AuthenticationBasicConfigSchema.js) ----- @@ -145,7 +145,7 @@ Config for custom authentication (like API keys). No extra properties are requir * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/AuthenticationCustomConfigSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/AuthenticationCustomConfigSchema.js) +* **Source Code** - [lib/schemas/AuthenticationCustomConfigSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/AuthenticationCustomConfigSchema.js) ----- @@ -157,7 +157,7 @@ Config for Digest Authentication. No extra properties are required to setup Dige * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/AuthenticationDigestConfigSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/AuthenticationDigestConfigSchema.js) +* **Source Code** - [lib/schemas/AuthenticationDigestConfigSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/AuthenticationDigestConfigSchema.js) ----- @@ -169,7 +169,7 @@ Config for OAuth1 authentication. * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/AuthenticationOAuth1ConfigSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/AuthenticationOAuth1ConfigSchema.js) +* **Source Code** - [lib/schemas/AuthenticationOAuth1ConfigSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/AuthenticationOAuth1ConfigSchema.js) @@ -191,7 +191,7 @@ Config for OAuth2 authentication. * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/AuthenticationOAuth2ConfigSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/AuthenticationOAuth2ConfigSchema.js) +* **Source Code** - [lib/schemas/AuthenticationOAuth2ConfigSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/AuthenticationOAuth2ConfigSchema.js) @@ -215,7 +215,7 @@ Represents authentication schemes. * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/AuthenticationSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/AuthenticationSchema.js) +* **Source Code** - [lib/schemas/AuthenticationSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/AuthenticationSchema.js) #### Examples @@ -258,7 +258,7 @@ Config for session authentication. * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/AuthenticationSessionConfigSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/AuthenticationSessionConfigSchema.js) +* **Source Code** - [lib/schemas/AuthenticationSessionConfigSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/AuthenticationSessionConfigSchema.js) @@ -278,7 +278,7 @@ Represents the fundamental mechanics of a search/create. * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/BasicActionOperationSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/BasicActionOperationSchema.js) +* **Source Code** - [lib/schemas/BasicActionOperationSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/BasicActionOperationSchema.js) @@ -304,7 +304,7 @@ Represents the fundamental mechanics of a create. * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/BasicCreateActionOperationSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/BasicCreateActionOperationSchema.js) +* **Source Code** - [lib/schemas/BasicCreateActionOperationSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/BasicCreateActionOperationSchema.js) @@ -331,7 +331,7 @@ Represents user information for a trigger, search, or create. * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/BasicDisplaySchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/BasicDisplaySchema.js) +* **Source Code** - [lib/schemas/BasicDisplaySchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/BasicDisplaySchema.js) #### Examples @@ -369,7 +369,7 @@ Represents the inbound mechanics of hooks with optional subscribe/unsubscribe. D * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/BasicHookOperationSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/BasicHookOperationSchema.js) +* **Source Code** - [lib/schemas/BasicHookOperationSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/BasicHookOperationSchema.js) @@ -397,7 +397,7 @@ Represents the fundamental mechanics of triggers, searches, or creates. * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/BasicOperationSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/BasicOperationSchema.js) +* **Source Code** - [lib/schemas/BasicOperationSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/BasicOperationSchema.js) @@ -421,7 +421,7 @@ Represents the fundamental mechanics of a trigger. * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/BasicPollingOperationSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/BasicPollingOperationSchema.js) +* **Source Code** - [lib/schemas/BasicPollingOperationSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/BasicPollingOperationSchema.js) @@ -447,7 +447,7 @@ How will Zapier create a new object? * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/CreateSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/CreateSchema.js) +* **Source Code** - [lib/schemas/CreateSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/CreateSchema.js) #### Examples @@ -505,7 +505,7 @@ Enumerates the creates your app has available for users. * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/CreatesSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/CreatesSchema.js) +* **Source Code** - [lib/schemas/CreatesSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/CreatesSchema.js) @@ -525,7 +525,7 @@ Like [/FieldsSchema](#fieldsschema) but you can provide functions to create dyna * **Type** - [/FieldOrFunctionSchema](#fieldorfunctionschema) * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/DynamicFieldsSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/DynamicFieldsSchema.js) +* **Source Code** - [lib/schemas/DynamicFieldsSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/DynamicFieldsSchema.js) #### Examples @@ -550,7 +550,7 @@ An object describing a labeled choice in a static dropdown. Useful if the value * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/FieldChoiceWithLabelSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/FieldChoiceWithLabelSchema.js) +* **Source Code** - [lib/schemas/FieldChoiceWithLabelSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/FieldChoiceWithLabelSchema.js) #### Examples @@ -584,7 +584,7 @@ Yes | Yes | Array of [FieldChoiceWithLabel](#fieldchoicewithlabelschema) * **Type** - oneOf(`object`, `array`[oneOf(`string`, [/FieldChoiceWithLabelSchema](#fieldchoicewithlabelschema))]) * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/FieldChoicesSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/FieldChoicesSchema.js) +* **Source Code** - [lib/schemas/FieldChoicesSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/FieldChoicesSchema.js) #### Examples @@ -606,7 +606,7 @@ Represents an array of fields or functions. * **Type** - `array`[oneOf([/FieldSchema](#fieldschema), [/FunctionSchema](#functionschema))] * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/FieldOrFunctionSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/FieldOrFunctionSchema.js) +* **Source Code** - [lib/schemas/FieldOrFunctionSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/FieldOrFunctionSchema.js) #### Examples @@ -641,7 +641,7 @@ Defines a field an app either needs as input, or gives as output. In addition to * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/FieldSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/FieldSchema.js) +* **Source Code** - [lib/schemas/FieldSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/FieldSchema.js) #### Examples @@ -697,7 +697,7 @@ An array or collection of fields. * **Type** - `array`[[/FieldSchema](#fieldschema)] * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/FieldsSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/FieldsSchema.js) +* **Source Code** - [lib/schemas/FieldsSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/FieldsSchema.js) ----- @@ -709,7 +709,7 @@ An object whose values can only be primitives * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/FlatObjectSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/FlatObjectSchema.js) +* **Source Code** - [lib/schemas/FlatObjectSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/FlatObjectSchema.js) #### Examples @@ -746,7 +746,7 @@ A path to a file that might have content like `module.exports = (z, bundle) => [ * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/FunctionRequireSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/FunctionRequireSchema.js) +* **Source Code** - [lib/schemas/FunctionRequireSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/FunctionRequireSchema.js) #### Examples @@ -769,7 +769,7 @@ Internal pointer to a function from the original source or the source code itsel * **Type** - oneOf(`string`, [/FunctionRequireSchema](#functionrequireschema), [/FunctionSourceSchema](#functionsourceschema)) * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/FunctionSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/FunctionSchema.js) +* **Source Code** - [lib/schemas/FunctionSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/FunctionSchema.js) #### Examples @@ -794,7 +794,7 @@ Source code like `{source: "return 1 + 2"}` which the system will wrap in a func * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/FunctionSourceSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/FunctionSourceSchema.js) +* **Source Code** - [lib/schemas/FunctionSourceSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/FunctionSourceSchema.js) #### Examples @@ -822,7 +822,7 @@ A bank of named functions that you can use in `z.hydrate('someName')` to lazily * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/HydratorsSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/HydratorsSchema.js) +* **Source Code** - [lib/schemas/HydratorsSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/HydratorsSchema.js) @@ -842,7 +842,7 @@ A unique identifier for this item. * **Type** - `string` * **Pattern** - `^[a-zA-Z]+[a-zA-Z0-9_]*$` -* **Source Code** - [lib/schemas/KeySchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/KeySchema.js) +* **Source Code** - [lib/schemas/KeySchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/KeySchema.js) ----- @@ -854,7 +854,7 @@ List of before or after middlewares. Can be an array of functions or a single fu * **Type** - oneOf(`array`[[/FunctionSchema](#functionschema)], [/FunctionSchema](#functionschema)) * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/MiddlewaresSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/MiddlewaresSchema.js) +* **Source Code** - [lib/schemas/MiddlewaresSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/MiddlewaresSchema.js) ----- @@ -866,7 +866,7 @@ A representation of a HTTP redirect - you can use the `{{syntax}}` to inject aut * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/RedirectRequestSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/RedirectRequestSchema.js) +* **Source Code** - [lib/schemas/RedirectRequestSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/RedirectRequestSchema.js) @@ -888,7 +888,7 @@ Reference a resource by key and the data it returns. In the format of: `{resourc * **Type** - `string` * **Pattern** - `^[a-zA-Z0-9_]+\.[a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+(,[a-zA-Z0-9_]+)*)?$` -* **Source Code** - [lib/schemas/RefResourceSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/RefResourceSchema.js) +* **Source Code** - [lib/schemas/RefResourceSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/RefResourceSchema.js) #### Examples @@ -917,7 +917,7 @@ A representation of a HTTP request - you can use the `{{syntax}}` to inject auth * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/RequestSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/RequestSchema.js) +* **Source Code** - [lib/schemas/RequestSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/RequestSchema.js) @@ -943,7 +943,7 @@ How will we find create a specific object given inputs? Will be turned into a cr * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/ResourceMethodCreateSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/ResourceMethodCreateSchema.js) +* **Source Code** - [lib/schemas/ResourceMethodCreateSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/ResourceMethodCreateSchema.js) #### Examples @@ -980,7 +980,7 @@ How will we get a single object given a unique identifier/id? * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/ResourceMethodGetSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/ResourceMethodGetSchema.js) +* **Source Code** - [lib/schemas/ResourceMethodGetSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/ResourceMethodGetSchema.js) #### Examples @@ -1017,7 +1017,7 @@ How will we get notified of new objects? Will be turned into a trigger automatic * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/ResourceMethodHookSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/ResourceMethodHookSchema.js) +* **Source Code** - [lib/schemas/ResourceMethodHookSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/ResourceMethodHookSchema.js) #### Examples @@ -1054,7 +1054,7 @@ How will we get a list of new objects? Will be turned into a trigger automatical * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/ResourceMethodListSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/ResourceMethodListSchema.js) +* **Source Code** - [lib/schemas/ResourceMethodListSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/ResourceMethodListSchema.js) #### Examples @@ -1096,7 +1096,7 @@ How will we find a specific object given filters or search terms? Will be turned * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/ResourceMethodSearchSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/ResourceMethodSearchSchema.js) +* **Source Code** - [lib/schemas/ResourceMethodSearchSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/ResourceMethodSearchSchema.js) #### Examples @@ -1135,7 +1135,7 @@ Represents a resource, which will in turn power triggers, searches, or creates. * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/ResourceSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/ResourceSchema.js) +* **Source Code** - [lib/schemas/ResourceSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/ResourceSchema.js) #### Examples @@ -1215,7 +1215,7 @@ All the resources that underlie common CRUD methods powering automatically handl * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/ResourcesSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/ResourcesSchema.js) +* **Source Code** - [lib/schemas/ResourcesSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/ResourcesSchema.js) @@ -1235,7 +1235,7 @@ An array of objects suitable for returning in perform calls. * **Type** - `array`[`object`] * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/ResultsSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/ResultsSchema.js) +* **Source Code** - [lib/schemas/ResultsSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/ResultsSchema.js) ----- @@ -1247,7 +1247,7 @@ Pair an existing search and a create to enable "Find or Create" functionality in * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/SearchOrCreateSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/SearchOrCreateSchema.js) +* **Source Code** - [lib/schemas/SearchOrCreateSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/SearchOrCreateSchema.js) @@ -1270,7 +1270,7 @@ Enumerates the search-or-creates your app has available for users. * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/SearchOrCreatesSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/SearchOrCreatesSchema.js) +* **Source Code** - [lib/schemas/SearchOrCreatesSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/SearchOrCreatesSchema.js) @@ -1290,7 +1290,7 @@ How will Zapier search for existing objects? * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/SearchSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/SearchSchema.js) +* **Source Code** - [lib/schemas/SearchSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/SearchSchema.js) #### Examples @@ -1336,7 +1336,7 @@ Enumerates the searches your app has available for users. * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/SearchesSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/SearchesSchema.js) +* **Source Code** - [lib/schemas/SearchesSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/SearchesSchema.js) @@ -1356,7 +1356,7 @@ How will Zapier get notified of new objects? * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/TriggerSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/TriggerSchema.js) +* **Source Code** - [lib/schemas/TriggerSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/TriggerSchema.js) #### Examples @@ -1401,7 +1401,7 @@ Enumerates the triggers your app has available for users. * **Type** - `object` * **Pattern** - _n/a_ -* **Source Code** - [lib/schemas/TriggersSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/TriggersSchema.js) +* **Source Code** - [lib/schemas/TriggersSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/TriggersSchema.js) @@ -1421,7 +1421,7 @@ Represents a simplified semver string, from `0.0.0` to `999.999.999`. * **Type** - `string` * **Pattern** - `^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$` -* **Source Code** - [lib/schemas/VersionSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.0/lib/schemas/VersionSchema.js) +* **Source Code** - [lib/schemas/VersionSchema.js](https://github.com/zapier/zapier-platform-schema/blob/v8.4.1/lib/schemas/VersionSchema.js) #### Examples diff --git a/packages/schema/exported-schema.json b/packages/schema/exported-schema.json index 05c0fdecf..c359adb6c 100644 --- a/packages/schema/exported-schema.json +++ b/packages/schema/exported-schema.json @@ -1,5 +1,5 @@ { - "version": "8.4.0", + "version": "8.4.1", "schemas": { "AppSchema": { "id": "/AppSchema", diff --git a/packages/schema/package.json b/packages/schema/package.json index 771f40b82..b579f8319 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -1,6 +1,6 @@ { "name": "zapier-platform-schema", - "version": "8.4.0", + "version": "8.4.1", "description": "Schema definition for CLI apps in the Zapier Developer Platform.", "repository": "zapier/zapier-platform-schema", "homepage": "https://zapier.com/",