-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ This is automatically generated by the `npm run docs` command in `zapier-platfor | |
* [/DynamicFieldsSchema](#dynamicfieldsschema) | ||
* [/FieldChoiceWithLabelSchema](#fieldchoicewithlabelschema) | ||
* [/FieldChoicesSchema](#fieldchoicesschema) | ||
* [/FieldMetaSchema](#fieldmetaschema) | ||
* [/FieldOrFunctionSchema](#fieldorfunctionschema) | ||
* [/FieldSchema](#fieldschema) | ||
* [/FieldsSchema](#fieldsschema) | ||
|
@@ -931,6 +932,27 @@ Yes | Yes | Array of [FieldChoiceWithLabel](#fieldchoicewithlabelschema) | |
|
||
----- | ||
|
||
## /FieldMetaSchema | ||
|
||
Allows for additional metadata to be stored on the field. Only simple values are allowed (no objects or arrays) | ||
|
||
#### Details | ||
|
||
* **Type** - `object` | ||
* [**Source Code**](https://github.com/zapier/zapier-platform/blob/[email protected]/packages/schema/lib/schemas/FieldMetaSchema.js) | ||
|
||
|
||
#### Examples | ||
|
||
* `{ shouldCapitalize: true }` | ||
* `{ shouldCapitalize: true, internalType: 'datetime' }` | ||
|
||
#### Anti-Examples | ||
|
||
* `{ databank: { primaryContact: 'abc' } }` - _No complex values allowed_ | ||
|
||
----- | ||
|
||
## /FieldOrFunctionSchema | ||
|
||
Represents an array of fields or functions. | ||
|
@@ -997,6 +1019,7 @@ Key | Required | Type | Description | |
`altersDynamicFields` | no | `boolean` | Does the value of this field affect the definitions of other fields in the set? | ||
`steadyState` | no | `boolean` | Prevents triggering on new output until all values for fields with this property remain unchanged for 2 polls. It can be used to, e.g., not trigger on a new contact until the contact has completed typing their name. NOTE that this only applies to the `outputFields` of polling triggers. | ||
`inputFormat` | no | `string` | Useful when you expect the input to be part of a longer string. Put "{{input}}" in place of the user's input (IE: "https://{{input}}.yourdomain.com"). | ||
`meta` | no | [/FieldChoicesSchema](#fieldchoicesschema) | Allows for additional metadata to be stored on the field. Supports simple key-values only (no sub-objects or arrays). | ||
|
||
#### Examples | ||
|
||
|
@@ -1006,6 +1029,7 @@ Key | Required | Type | Description | |
* `{ key: 'abc', choices: [ { label: 'Red', sample: '#f00', value: '#f00' } ] }` | ||
* `{ key: 'abc', children: [ { key: 'abc' } ] }` | ||
* `{ key: 'abc', type: 'integer', helpText: 'neat' }` | ||
* `{ key: 'abc', type: 'integer', meta: { internalType: 'numeric', shouldRetry: true } }` | ||
|
||
#### Anti-Examples | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use strict'; | ||
|
||
const makeSchema = require('../utils/makeSchema'); | ||
|
||
module.exports = makeSchema({ | ||
id: '/FieldMetaSchema', | ||
type: 'object', | ||
description: | ||
'Allows for additional metadata to be stored on the field. Only simple values are allowed (no objects or arrays)', | ||
additionalProperties: { | ||
type: ['string', 'number', 'boolean', 'null'], | ||
}, | ||
examples: [ | ||
{ shouldCapitalize: true }, | ||
{ shouldCapitalize: true, internalType: 'datetime' }, | ||
], | ||
antiExamples: [ | ||
{ | ||
example: { databank: { primaryContact: 'abc' } }, | ||
reason: 'No complex values allowed', | ||
}, | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters