zapier-platform-schema 15.0.1 → 15.2.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.0
|
|
2
|
+
"version": "15.2.0",
|
|
3
3
|
"schemas": {
|
|
4
4
|
"AppSchema": {
|
|
5
5
|
"id": "/AppSchema",
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
"type": "boolean"
|
|
227
227
|
},
|
|
228
228
|
"computed": {
|
|
229
|
-
"description": "Is this field automatically populated (and hidden from the user)?",
|
|
229
|
+
"description": "Is this field automatically populated (and hidden from the user)? Note: Only OAuth and Session Auth support fields with this key.",
|
|
230
230
|
"type": "boolean"
|
|
231
231
|
},
|
|
232
232
|
"altersDynamicFields": {
|
|
@@ -605,6 +605,32 @@
|
|
|
605
605
|
"minLength": 2,
|
|
606
606
|
"pattern": "^[a-zA-Z]+[a-zA-Z0-9_]*$"
|
|
607
607
|
},
|
|
608
|
+
"LockObjectSchema": {
|
|
609
|
+
"id": "/LockObjectSchema",
|
|
610
|
+
"description": "**INTERNAL USE ONLY**. Zapier uses this configuration for internal operation locking.",
|
|
611
|
+
"type": "object",
|
|
612
|
+
"required": ["key"],
|
|
613
|
+
"properties": {
|
|
614
|
+
"key": {
|
|
615
|
+
"description": "The key to use for locking. This should be unique to the operation. While actions of different integrations with the same key and scope will never lock each other out, actions of the same integration with the same key and scope will do. User data provided for the input fields can be used in the key with the use of the curly braces referencing. For example, to access the user data provided for the input field \"test_field\", use `{{bundle.inputData.test_field}}`. Note that a required input field should be referenced to get user data always.",
|
|
616
|
+
"type": "string",
|
|
617
|
+
"minLength": 1
|
|
618
|
+
},
|
|
619
|
+
"scope": {
|
|
620
|
+
"description": "By default, locks are scoped to the app. That is, all users of the app will share the same locks. If you want to restrict serial access to a specific user, auth, or account, you can set the scope to one or more of the following: 'user' - Locks based on user ids. 'auth' - Locks based on unique auth ids. 'account' - Locks for all users under a single account. You may also combine scopes. Note that \"app\" is included, always, in the scope provided. For example, a scope of ['account', 'auth'] would result to ['app', 'account', 'auth'].",
|
|
621
|
+
"type": "array",
|
|
622
|
+
"items": {
|
|
623
|
+
"enum": ["user", "auth", "account"],
|
|
624
|
+
"type": "string"
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
"timeout": {
|
|
628
|
+
"description": "The number of seconds to hold the lock before releasing it to become accessible to other task invokes that need it. If not provided, the default set by the app will be used. It cannot be more than 180.",
|
|
629
|
+
"type": "integer"
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
"additionalProperties": false
|
|
633
|
+
},
|
|
608
634
|
"ResultsSchema": {
|
|
609
635
|
"id": "/ResultsSchema",
|
|
610
636
|
"description": "An array of objects suitable for returning in perform calls.",
|
|
@@ -695,6 +721,10 @@
|
|
|
695
721
|
"value": "**yes** (with exceptions, see description)"
|
|
696
722
|
}
|
|
697
723
|
}
|
|
724
|
+
},
|
|
725
|
+
"lock": {
|
|
726
|
+
"description": "**INTERNAL USE ONLY**. Zapier uses this configuration for internal operation locking.",
|
|
727
|
+
"$ref": "/LockObjectSchema"
|
|
698
728
|
}
|
|
699
729
|
},
|
|
700
730
|
"additionalProperties": false
|
|
@@ -908,6 +938,10 @@
|
|
|
908
938
|
"value": "**yes** (with exceptions, see description)"
|
|
909
939
|
}
|
|
910
940
|
}
|
|
941
|
+
},
|
|
942
|
+
"lock": {
|
|
943
|
+
"description": "**INTERNAL USE ONLY**. Zapier uses this configuration for internal operation locking.",
|
|
944
|
+
"$ref": "/LockObjectSchema"
|
|
911
945
|
}
|
|
912
946
|
},
|
|
913
947
|
"additionalProperties": false
|
|
@@ -1268,6 +1302,10 @@
|
|
|
1268
1302
|
}
|
|
1269
1303
|
}
|
|
1270
1304
|
},
|
|
1305
|
+
"lock": {
|
|
1306
|
+
"description": "**INTERNAL USE ONLY**. Zapier uses this configuration for internal operation locking.",
|
|
1307
|
+
"$ref": "/LockObjectSchema"
|
|
1308
|
+
},
|
|
1271
1309
|
"shouldLock": {
|
|
1272
1310
|
"description": "Should this action be performed one at a time (avoid concurrency)?",
|
|
1273
1311
|
"type": "boolean"
|
|
@@ -33,6 +33,7 @@ BasicActionOperationSchema.properties = {
|
|
|
33
33
|
inputFields: BasicActionOperationSchema.properties.inputFields,
|
|
34
34
|
outputFields: BasicActionOperationSchema.properties.outputFields,
|
|
35
35
|
sample: BasicActionOperationSchema.properties.sample,
|
|
36
|
+
lock: BasicActionOperationSchema.properties.lock,
|
|
36
37
|
};
|
|
37
38
|
|
|
38
39
|
BasicActionOperationSchema.examples = [
|
|
@@ -8,6 +8,7 @@ const FunctionSchema = require('./FunctionSchema');
|
|
|
8
8
|
const RequestSchema = require('./RequestSchema');
|
|
9
9
|
const ResultsSchema = require('./ResultsSchema');
|
|
10
10
|
const KeySchema = require('./KeySchema');
|
|
11
|
+
const LockObjectSchema = require('./LockObjectSchema');
|
|
11
12
|
|
|
12
13
|
module.exports = makeSchema(
|
|
13
14
|
{
|
|
@@ -50,6 +51,11 @@ module.exports = makeSchema(
|
|
|
50
51
|
},
|
|
51
52
|
},
|
|
52
53
|
},
|
|
54
|
+
lock: {
|
|
55
|
+
description:
|
|
56
|
+
'**INTERNAL USE ONLY**. Zapier uses this configuration for internal operation locking.',
|
|
57
|
+
$ref: LockObjectSchema.id,
|
|
58
|
+
},
|
|
53
59
|
},
|
|
54
60
|
examples: [
|
|
55
61
|
{
|
|
@@ -69,5 +75,5 @@ module.exports = makeSchema(
|
|
|
69
75
|
],
|
|
70
76
|
additionalProperties: false,
|
|
71
77
|
},
|
|
72
|
-
[DynamicFieldsSchema, FunctionSchema, KeySchema, RequestSchema, ResultsSchema]
|
|
78
|
+
[DynamicFieldsSchema, FunctionSchema, KeySchema, LockObjectSchema, RequestSchema, ResultsSchema]
|
|
73
79
|
);
|
|
@@ -112,7 +112,7 @@ module.exports = makeSchema(
|
|
|
112
112
|
},
|
|
113
113
|
computed: {
|
|
114
114
|
description:
|
|
115
|
-
'Is this field automatically populated (and hidden from the user)?',
|
|
115
|
+
'Is this field automatically populated (and hidden from the user)? Note: Only OAuth and Session Auth support fields with this key.',
|
|
116
116
|
type: 'boolean',
|
|
117
117
|
},
|
|
118
118
|
altersDynamicFields: {
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const makeSchema = require('../utils/makeSchema');
|
|
4
|
+
|
|
5
|
+
module.exports = makeSchema({
|
|
6
|
+
id: '/LockObjectSchema',
|
|
7
|
+
description:
|
|
8
|
+
'**INTERNAL USE ONLY**. Zapier uses this configuration for internal operation locking.',
|
|
9
|
+
type: 'object',
|
|
10
|
+
required: ['key'],
|
|
11
|
+
properties: {
|
|
12
|
+
key: {
|
|
13
|
+
description:
|
|
14
|
+
'The key to use for locking. This should be unique to the operation. While actions of different integrations with the same key and scope will never lock each other out, actions of the same integration with the same key and scope will do. User data provided for the input fields can be used in the key with the use of the curly braces referencing. For example, to access the user data provided for the input field "test_field", use `{{bundle.inputData.test_field}}`. Note that a required input field should be referenced to get user data always.',
|
|
15
|
+
type: 'string',
|
|
16
|
+
minLength: 1,
|
|
17
|
+
},
|
|
18
|
+
scope: {
|
|
19
|
+
description: `By default, locks are scoped to the app. That is, all users of the app will share the same locks. If you want to restrict serial access to a specific user, auth, or account, you can set the scope to one or more of the following: 'user' - Locks based on user ids. 'auth' - Locks based on unique auth ids. 'account' - Locks for all users under a single account. You may also combine scopes. Note that "app" is included, always, in the scope provided. For example, a scope of ['account', 'auth'] would result to ['app', 'account', 'auth'].`,
|
|
20
|
+
type: 'array',
|
|
21
|
+
items: {
|
|
22
|
+
enum: ['user', 'auth', 'account'],
|
|
23
|
+
type: 'string',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
timeout: {
|
|
27
|
+
description:
|
|
28
|
+
'The number of seconds to hold the lock before releasing it to become accessible to other task invokes that need it. If not provided, the default set by the app will be used. It cannot be more than 180.',
|
|
29
|
+
type: 'integer',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
examples: [
|
|
33
|
+
{
|
|
34
|
+
key: 'random_key',
|
|
35
|
+
scope: ['account', 'user'],
|
|
36
|
+
timeout: 30,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
key: '{{bundle.inputData.test_field}}',
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
antiExamples: [
|
|
43
|
+
{
|
|
44
|
+
example: {
|
|
45
|
+
key: 'random_key',
|
|
46
|
+
scope: ['zap'],
|
|
47
|
+
},
|
|
48
|
+
reason: 'Invalid scope provided: `zap`.',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
example: {},
|
|
52
|
+
reason: 'Missing required key: `key`.',
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
additionalProperties: false,
|
|
56
|
+
});
|
package/package.json
CHANGED