@jinshuju/cli 0.18.0 → 0.20.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/README.md +24 -0
- package/dist/commands/field.js +76 -1
- package/dist/commands/notification.js +3 -1
- package/dist/commands/routine.js +20 -15
- package/dist/commands/sms.js +32 -5
- package/dist/generated/operations.d.ts +1 -1
- package/dist/generated/operations.js +274 -119
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -463,6 +463,23 @@ jinshuju field preview-convert --form Kp7mQ2 field_1 --to RadioButton
|
|
|
463
463
|
it takes that data along, so it is worth asking first. `preview-convert` reports
|
|
464
464
|
how much a type conversion would keep and how much it would clear.
|
|
465
465
|
|
|
466
|
+
## Writing a condition
|
|
467
|
+
|
|
468
|
+
```bash
|
|
469
|
+
jinshuju field filterable --form Kp7mQ2
|
|
470
|
+
jinshuju field filterable --form Kp7mQ2 --for routine field_5 --output json
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
A routine's or a notification rule's `scope_conditions` test fields, and a
|
|
474
|
+
condition's value is not the value the field takes in an entry: a goods field
|
|
475
|
+
is tested with `[{"api_code": …}]`, a choice by its code. `field filterable`
|
|
476
|
+
lists the fields a condition can test, the operators each takes, and for each
|
|
477
|
+
operator the value it takes, with examples written in the field's own codes;
|
|
478
|
+
`--for routine` narrows it to the fields a routine's data trigger can test.
|
|
479
|
+
Copy an example's shape. Creating or updating a routine with conditions
|
|
480
|
+
answers with `preview_condition_matches`: which of the latest entries meet each
|
|
481
|
+
group, the quickest way to see that a condition means what it was meant to.
|
|
482
|
+
|
|
466
483
|
## SMS signatures and templates
|
|
467
484
|
|
|
468
485
|
An SMS notification needs a signature and a template, and both wait on a
|
|
@@ -482,10 +499,17 @@ with it.
|
|
|
482
499
|
While your own are under review, `sms template list --scope official` lists the official
|
|
483
500
|
templates, which are approved already and can be sent right away.
|
|
484
501
|
|
|
502
|
+
A template's variables are written `$(var_1)`, `$(var_2)` and so on, each once,
|
|
503
|
+
and each is declared with a `--variable <label>:<type>:<example>`;
|
|
504
|
+
the reviewer sees the examples, which take 6 characters or more. A notification or `sms send --placeholder` then
|
|
505
|
+
fills them from form fields in the order the content uses them.
|
|
506
|
+
|
|
485
507
|
```bash
|
|
486
508
|
jinshuju sms signature create 小金培训 --license ./license.jpg --company-name 小金培训有限公司 --company-id 91110000MA00000000 \
|
|
487
509
|
--id-card-front ./front.jpg --id-card-back ./back.jpg --id-card-name 张三 --id-card-number 110101199001011234 --mobile 13800000000
|
|
488
510
|
jinshuju sms template create --signature 小金培训 --content "你报名的课程明天上午 9 点开课,请准时参加。"
|
|
511
|
+
jinshuju sms template create --signature 小金培训 --content '$(var_1),你好,套餐 $(var_2) 到期。' \
|
|
512
|
+
--variable 姓名:name:姓名,示例:张三 --variable 到期日期:time:2026-10-25
|
|
489
513
|
jinshuju sms status
|
|
490
514
|
jinshuju sms signature list --status FAIL
|
|
491
515
|
jinshuju sms template list --keyword 开课 --scope owned
|
package/dist/commands/field.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CONTAINER_OPTIONS, JSON_OPTION, UsageError } from '../options.js';
|
|
2
|
-
import { call } from '../spec.js';
|
|
2
|
+
import { call, choices } from '../spec.js';
|
|
3
3
|
import { YES_OPTION, confirmed, onContainer, one, payload, requiredOption } from './shared.js';
|
|
4
4
|
/** One field, or a list of them — the same objects `fields` holds above. */
|
|
5
5
|
const FIELD_PAYLOAD = [
|
|
@@ -77,6 +77,38 @@ function labelsOf(payload) {
|
|
|
77
77
|
return typeof label === 'string' ? [label] : [];
|
|
78
78
|
}));
|
|
79
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* A listing is for finding the field, so each row names its operators and no
|
|
82
|
+
* more. One field is for writing its condition, and a table of formats loses
|
|
83
|
+
* whatever a narrow terminal has no room for, so each operator becomes its own
|
|
84
|
+
* block: the format, its description, and every example as the JSON to send.
|
|
85
|
+
* A reservation field is listed once for its items and once for its date, so
|
|
86
|
+
* one field may be two rows, told apart by scope_attr (none, and date_time).
|
|
87
|
+
*/
|
|
88
|
+
function conditionFieldsForReading(body) {
|
|
89
|
+
const rows = body.data ?? [];
|
|
90
|
+
const operatorsOf = (row) => Array.isArray(row.operators) ? row.operators : [];
|
|
91
|
+
const oneField = rows.length > 0 && rows.every((row) => row.trigger === rows[0].trigger);
|
|
92
|
+
if (!oneField) {
|
|
93
|
+
return {
|
|
94
|
+
data: rows.map((row) => ({
|
|
95
|
+
...row,
|
|
96
|
+
operators: operatorsOf(row)
|
|
97
|
+
.map((operator) => operator.operator)
|
|
98
|
+
.join(' ')
|
|
99
|
+
}))
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
return Object.fromEntries(rows.map((row) => {
|
|
103
|
+
const { operators: _operators, ...rest } = row;
|
|
104
|
+
const heading = row.scope_attr ? `${row.trigger} scope_attr=${row.scope_attr}` : String(row.trigger);
|
|
105
|
+
const operators = Object.fromEntries(operatorsOf(row).map(({ operator, examples, ...format }) => [
|
|
106
|
+
operator,
|
|
107
|
+
{ ...format, examples: Array.isArray(examples) ? examples.map((example) => JSON.stringify(example)) : [] }
|
|
108
|
+
]));
|
|
109
|
+
return [heading, { ...rest, operators }];
|
|
110
|
+
}));
|
|
111
|
+
}
|
|
80
112
|
const KIND_OPTION = {
|
|
81
113
|
name: '--kind',
|
|
82
114
|
type: 'string',
|
|
@@ -136,6 +168,49 @@ export const FIELD = [
|
|
|
136
168
|
request: (input) => onContainer(input, 'getForm', 'getTable'),
|
|
137
169
|
select: (body) => ({ data: selectFields(body) })
|
|
138
170
|
},
|
|
171
|
+
{
|
|
172
|
+
path: ['field', 'filterable'],
|
|
173
|
+
summary: 'List the fields a condition can test, with the operators and values each takes',
|
|
174
|
+
description: 'The fields the scope_conditions of a routine or a notification rule can name, and for each the ' +
|
|
175
|
+
'operators it takes and the value each operator takes: value_format names the shape, ' +
|
|
176
|
+
"value_description says it, and examples are values written with the field's own codes. " +
|
|
177
|
+
'Write a condition {trigger, operator, value} as an example shows; an operator or a field not ' +
|
|
178
|
+
'listed is not one a condition can use. A row with a scope_attr needs it in the condition too: a ' +
|
|
179
|
+
'reservation field is listed once for its items, without one, and once for its date, with date_time. ' +
|
|
180
|
+
"A routine's data trigger tests fewer fields than a notification rule: ask with --for routine. " +
|
|
181
|
+
'Name a trigger to read one field in full; text clips long descriptions, --output json keeps them whole.',
|
|
182
|
+
args: [{ name: 'trigger', required: false, description: 'One field, as a condition names it, e.g. field_3' }],
|
|
183
|
+
options: [
|
|
184
|
+
...CONTAINER_OPTIONS,
|
|
185
|
+
{
|
|
186
|
+
name: '--for',
|
|
187
|
+
type: 'string',
|
|
188
|
+
choices: choices('listFormConditionTriggerableFields', 'fields_context'),
|
|
189
|
+
placeholder: '<context>',
|
|
190
|
+
description: "Only the fields a condition there can test; routine is a routine's data trigger"
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
request: (input) => onContainer(input, 'listFormConditionTriggerableFields', 'listTableConditionTriggerableFields', {
|
|
194
|
+
query: { fields_context: input.options.for }
|
|
195
|
+
}),
|
|
196
|
+
select: (body, input) => {
|
|
197
|
+
const rows = body.condition_triggerable_fields ?? [];
|
|
198
|
+
const trigger = input.args.trigger;
|
|
199
|
+
if (trigger === undefined)
|
|
200
|
+
return { data: rows };
|
|
201
|
+
const picked = rows.filter((row) => row.trigger === trigger);
|
|
202
|
+
if (picked.length === 0) {
|
|
203
|
+
throw new UsageError(`${trigger} is not a field a condition can test here; run without it to list them`);
|
|
204
|
+
}
|
|
205
|
+
return { data: picked };
|
|
206
|
+
},
|
|
207
|
+
render: conditionFieldsForReading,
|
|
208
|
+
examples: [
|
|
209
|
+
'jinshuju field filterable --form Kp7mQ2',
|
|
210
|
+
'jinshuju field filterable --form Kp7mQ2 --for routine',
|
|
211
|
+
'jinshuju field filterable --table Vn4xR8'
|
|
212
|
+
]
|
|
213
|
+
},
|
|
139
214
|
{
|
|
140
215
|
path: ['field', 'add'],
|
|
141
216
|
summary: 'Add fields to a form or table',
|
|
@@ -78,7 +78,9 @@ export const NOTIFICATION = [
|
|
|
78
78
|
'Each approach takes its own keys: SMS --recipients --template-id --placeholder; ' +
|
|
79
79
|
'EMAIL --recipients --subject --content; WEIXIN_ONETIME --subject --content; ' +
|
|
80
80
|
'WXWORK and DING_TALK --url --content; WEBHOOK --url. ' +
|
|
81
|
-
'scope_conditions, schedule_time_rule, smtp_account_id, weixin_onetime_url and mentioned_mobile_list go through --json.'
|
|
81
|
+
'scope_conditions, schedule_time_rule, smtp_account_id, weixin_onetime_url and mentioned_mobile_list go through --json. ' +
|
|
82
|
+
'Each condition in scope_conditions takes the operators and values `jinshuju field filterable --form <token>` ' +
|
|
83
|
+
'lists for its field, written as its examples are.',
|
|
82
84
|
options: [
|
|
83
85
|
FORM_OPTION,
|
|
84
86
|
{
|
package/dist/commands/routine.js
CHANGED
|
@@ -44,8 +44,8 @@ const ROUTINE_PAYLOAD = [
|
|
|
44
44
|
' { "source_kind": "form" | "table", "source_token": "Kp7mQ2",',
|
|
45
45
|
' "on": "created" | "updated" | "matched",',
|
|
46
46
|
' "field_codes": ["field_3"],',
|
|
47
|
-
' "scope_conditions": [{ "trigger": "field_5", "operator": "
|
|
48
|
-
' "value": "code_vip", "group_index": 0 }],',
|
|
47
|
+
' "scope_conditions": [{ "trigger": "field_5", "operator": "any_in",',
|
|
48
|
+
' "value": ["code_vip"], "group_index": 0 }],',
|
|
49
49
|
' "include_bulk": false }',
|
|
50
50
|
' on created runs for each new entry',
|
|
51
51
|
' on updated runs when one of field_codes changes: 1 to 10 api_codes;',
|
|
@@ -55,20 +55,23 @@ const ROUTINE_PAYLOAD = [
|
|
|
55
55
|
' after the change. The source joins objects by itself.',
|
|
56
56
|
' include_bulk: imports and batch edits trigger as well, as one run.',
|
|
57
57
|
'',
|
|
58
|
-
'A condition
|
|
59
|
-
'
|
|
60
|
-
'
|
|
61
|
-
'
|
|
62
|
-
'
|
|
63
|
-
'
|
|
64
|
-
'
|
|
65
|
-
|
|
66
|
-
'
|
|
67
|
-
' yesterday, tomorrow, this_week, last_week, this_month,',
|
|
68
|
-
' last_month, next_month, last_1, last_3, last_7, last_30',
|
|
58
|
+
'A condition names a field and what to test it for. Its value is not shaped',
|
|
59
|
+
'as the field takes it in an entry: `jinshuju field filterable --form <token>',
|
|
60
|
+
'--for routine` lists the fields a routine can test, the operators each takes',
|
|
61
|
+
"and the value each operator takes, with examples in the field's own codes.",
|
|
62
|
+
' trigger the field as that list names it; a subtable column is',
|
|
63
|
+
' field_3.field_1',
|
|
64
|
+
' operator one the field lists there',
|
|
65
|
+
" value shaped as that operator's examples: a choice is its code,",
|
|
66
|
+
' never its label',
|
|
69
67
|
' group_index conditions sharing an index must all hold; a negative index',
|
|
70
68
|
' makes its group any-of; separate groups are alternatives',
|
|
71
|
-
' scope_attr
|
|
69
|
+
' scope_attr when the field lists one: date_time tests a reservation',
|
|
70
|
+
' field by its date; its items are listed without one',
|
|
71
|
+
'',
|
|
72
|
+
"The answer's preview_condition_matches says which of the source's latest 20",
|
|
73
|
+
'entries meet each group as the conditions stand. When those are not the',
|
|
74
|
+
'entries the instruction means, the conditions are wrong: fix them with update.',
|
|
72
75
|
'',
|
|
73
76
|
'Keys the API does not read are ignored, so `routine get --output json` can be',
|
|
74
77
|
'edited and sent back, once delete_authorized is taken out of it.',
|
|
@@ -256,6 +259,7 @@ export const ROUTINE = [
|
|
|
256
259
|
description: "trigger_text says when it runs in the 自动任务 page's words; next_runs holds the next five times of an " +
|
|
257
260
|
'active schedule, and is empty otherwise. A data trigger has its conditions in words under ' +
|
|
258
261
|
'event.conditions, and as stored under event.scope_conditions, which is what update takes back. ' +
|
|
262
|
+
"preview_condition_matches says which of the source's latest 20 entries meet each condition group. " +
|
|
259
263
|
'last_run is the latest run, and url opens the routine on the page.',
|
|
260
264
|
args: [ROUTINE_ARG],
|
|
261
265
|
request: (input) => call('getRoutine', { path: { id: input.args.routine } }),
|
|
@@ -265,7 +269,8 @@ export const ROUTINE = [
|
|
|
265
269
|
path: ['routine', 'create'],
|
|
266
270
|
summary: 'Create a routine; it is active at once',
|
|
267
271
|
description: 'The flags cover a scheduled routine in one command; an event trigger and its conditions go in --json, ' +
|
|
268
|
-
'and the flags still apply on top of it. The answer is the routine as `routine get` shows it, url included
|
|
272
|
+
'and the flags still apply on top of it. The answer is the routine as `routine get` shows it, url included; ' +
|
|
273
|
+
'for a data trigger with conditions, read its preview_condition_matches before saying the routine is right. ' +
|
|
269
274
|
"A routine against the page's rules is refused with every reason the page gives.",
|
|
270
275
|
options: ROUTINE_OPTIONS,
|
|
271
276
|
payload: ROUTINE_PAYLOAD,
|
package/dist/commands/sms.js
CHANGED
|
@@ -55,6 +55,23 @@ const TEMPLATE_DESCRIPTION_OPTION = {
|
|
|
55
55
|
placeholder: '<text>',
|
|
56
56
|
description: 'What the SMS is for, shown to the reviewer'
|
|
57
57
|
};
|
|
58
|
+
const TEMPLATE_VARIABLE_OPTION = {
|
|
59
|
+
name: '--variable',
|
|
60
|
+
type: 'string',
|
|
61
|
+
repeatable: true,
|
|
62
|
+
placeholder: '<label>:<type>:<example>',
|
|
63
|
+
description: 'Declare the next of $(var_1), $(var_2)... the content uses, repeatable in that order; type is one of ' +
|
|
64
|
+
'code, nickname, name, address, amount, link, time, other, e.g. 姓名:name:姓名,示例:张三; the example takes 6 characters or more'
|
|
65
|
+
};
|
|
66
|
+
const VARIABLE_SHAPE = "--variable must be '<label>:<type>:<example>'";
|
|
67
|
+
/** `姓名:name:姓名,示例:张三`; the example keeps any further `:`, as a time or a link has. */
|
|
68
|
+
function parseVariable(input) {
|
|
69
|
+
const [label, type, ...rest] = input.split(':');
|
|
70
|
+
const example = rest.join(':');
|
|
71
|
+
if (!label || !type || !example)
|
|
72
|
+
throw new UsageError(`${VARIABLE_SHAPE}, got ${JSON.stringify(input)}`);
|
|
73
|
+
return { label, type, example };
|
|
74
|
+
}
|
|
58
75
|
function requiredOption(input, key, flag) {
|
|
59
76
|
const value = input.options[key];
|
|
60
77
|
if (!value)
|
|
@@ -175,6 +192,9 @@ function templateBody(input) {
|
|
|
175
192
|
body.content = input.options.content;
|
|
176
193
|
if (input.options.description !== undefined)
|
|
177
194
|
body.apply_description = input.options.description;
|
|
195
|
+
const variables = input.options.variable;
|
|
196
|
+
if (variables?.length)
|
|
197
|
+
body.variables = variables.map(parseVariable);
|
|
178
198
|
return body;
|
|
179
199
|
}
|
|
180
200
|
/**
|
|
@@ -362,7 +382,8 @@ export const SMS = [
|
|
|
362
382
|
path: ['sms', 'template', 'create'],
|
|
363
383
|
summary: 'Submit an SMS template for review',
|
|
364
384
|
description: 'The signature must have been applied for, though it need not be approved yet. Review takes a while: ' +
|
|
365
|
-
'follow it with `sms status`. Once approved, the template id is what a notification sends.'
|
|
385
|
+
'follow it with `sms status`. Once approved, the template id is what a notification sends. Variables are ' +
|
|
386
|
+
'written $(var_1), $(var_2)... in the content, each once, and each declared with --variable.',
|
|
366
387
|
options: [
|
|
367
388
|
{ name: '--signature', type: 'string', placeholder: '<signature>', description: 'Signature to send it under' },
|
|
368
389
|
{
|
|
@@ -371,7 +392,8 @@ export const SMS = [
|
|
|
371
392
|
placeholder: '<text>',
|
|
372
393
|
description: 'Template content, without the signature'
|
|
373
394
|
},
|
|
374
|
-
TEMPLATE_DESCRIPTION_OPTION
|
|
395
|
+
TEMPLATE_DESCRIPTION_OPTION,
|
|
396
|
+
TEMPLATE_VARIABLE_OPTION
|
|
375
397
|
],
|
|
376
398
|
request: (input) => {
|
|
377
399
|
requiredOption(input, 'signature', '--signature <signature>');
|
|
@@ -379,14 +401,18 @@ export const SMS = [
|
|
|
379
401
|
return call('createSmsTemplate', { body: templateBody(input) });
|
|
380
402
|
},
|
|
381
403
|
examples: [
|
|
382
|
-
'jinshuju sms template create --signature 小金培训 --content "你报名的课程明天上午 9 点开课,请准时参加。"'
|
|
404
|
+
'jinshuju sms template create --signature 小金培训 --content "你报名的课程明天上午 9 点开课,请准时参加。"',
|
|
405
|
+
"jinshuju sms template create --signature 小金培训 --content '$(var_1),你好,套餐 $(var_2) 到期。' " +
|
|
406
|
+
'--variable 姓名:name:姓名,示例:张三 --variable 到期日期:time:2026-10-25'
|
|
383
407
|
]
|
|
384
408
|
},
|
|
385
409
|
{
|
|
386
410
|
path: ['sms', 'template', 'update'],
|
|
387
411
|
summary: 'Change an SMS template and submit it for review again',
|
|
388
412
|
description: 'Not while it is under review. Only the flags given change; with none, it is submitted again as it is. ' +
|
|
389
|
-
'An approved template goes back to review and cannot be sent until approved again.'
|
|
413
|
+
'An approved template goes back to review and cannot be sent until approved again. Changing the variables ' +
|
|
414
|
+
'of the content takes a --variable for each; while a notification or an SMS task sends the template, only ' +
|
|
415
|
+
'the text around them can change.',
|
|
390
416
|
args: [{ name: 'id', required: true, description: 'Template id, from `sms template list`' }],
|
|
391
417
|
options: [
|
|
392
418
|
{
|
|
@@ -396,7 +422,8 @@ export const SMS = [
|
|
|
396
422
|
description: 'Send it under this signature instead'
|
|
397
423
|
},
|
|
398
424
|
{ name: '--content', type: 'string', placeholder: '<text>', description: 'New content, without the signature' },
|
|
399
|
-
TEMPLATE_DESCRIPTION_OPTION
|
|
425
|
+
TEMPLATE_DESCRIPTION_OPTION,
|
|
426
|
+
TEMPLATE_VARIABLE_OPTION
|
|
400
427
|
],
|
|
401
428
|
request: (input) => call('updateSmsTemplate', { path: { id: input.args.id }, body: templateBody(input) }),
|
|
402
429
|
examples: ['jinshuju sms template update 6512a1c2d3e4f5a6b7c8d9e0 --content "你报名的课程后天上午 9 点开课。"']
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Operation, Schema } from '../spec.js';
|
|
2
2
|
/** The path every operation's path is relative to, from `servers`. */
|
|
3
3
|
export declare const BASE_PATH = "/api/v1";
|
|
4
|
-
export type OperationId = 'aggregateEntries' | 'aggregateFormViewEntries' | 'aggregateTableEntries' | 'aggregateTableViewEntries' | 'aggregateTradeTransactions' | 'checkFormFieldData' | 'checkTableFieldData' | 'copyForm' | 'countEntries' | 'countEntriesAcrossForms' | 'countFormViewEntries' | 'countTableEntries' | 'countTableViewEntries' | 'createCheckinCampaign' | 'createEmailTask' | 'createEntriesBatch' | 'createEntry' | 'createEntryComment' | 'createEntryImport' | 'createEntryLegacy' | 'createFillFormEntry' | 'createFillViewEntry' | 'createFolder' | 'createForm' | 'createFormView' | 'createFormWebhook' | 'createNotificationRule' | 'createOpensearchQuery' | '
|
|
4
|
+
export type OperationId = 'aggregateEntries' | 'aggregateFormViewEntries' | 'aggregateTableEntries' | 'aggregateTableViewEntries' | 'aggregateTradeTransactions' | 'checkFormFieldData' | 'checkTableFieldData' | 'copyForm' | 'countEntries' | 'countEntriesAcrossForms' | 'countFormViewEntries' | 'countTableEntries' | 'countTableViewEntries' | 'createCheckinCampaign' | 'createEmailTask' | 'createEntriesBatch' | 'createEntry' | 'createEntryComment' | 'createEntryImport' | 'createEntryLegacy' | 'createFillFormEntry' | 'createFillViewEntry' | 'createFolder' | 'createForm' | 'createFormView' | 'createFormWebhook' | 'createNotificationRule' | 'createOpensearchQuery' | 'createRoutine' | 'createSmsSignature' | 'createSmsTask' | 'createSmsTemplate' | 'createTable' | 'createTableEntry' | 'createTableEntryComment' | 'createTableView' | 'createTemplateUsage' | 'createWeixinOauthSession' | 'deleteCheckinCampaign' | 'deleteEntry' | 'deleteEntryComment' | 'deleteForm' | 'deleteFormView' | 'deleteFormWebhook' | 'deleteNotificationRule' | 'deleteRoutine' | 'deleteSmsSignature' | 'deleteSmsTemplate' | 'deleteTable' | 'deleteTableEntry' | 'deleteTableEntryComment' | 'deleteTableView' | 'estimateEmailTask' | 'estimateEmailTaskResend' | 'estimateSmsTask' | 'estimateSmsTaskChange' | 'estimateSmsTaskResend' | 'getBillingAccount' | 'getCheckinCampaign' | 'getCurrentUser' | 'getEmailTask' | 'getEntry' | 'getEntryImport' | 'getEntryStats' | 'getEvaluationSetting' | 'getExamSetting' | 'getFieldType' | 'getFillFormPage' | 'getFillViewPage' | 'getFolder' | 'getForm' | 'getFormSetting' | 'getFormView' | 'getManuallyCloseRule' | 'getNotificationRule' | 'getOpensearchQuery' | 'getPublishedArtifact' | 'getRoutine' | 'getSmsTask' | 'getTable' | 'getTableEntry' | 'getTableView' | 'getTradeMerchant' | 'listArtifacts' | 'listBillingAccountInvoices' | 'listBillingAccountPaidFeatures' | 'listBillingAccountPaymentHistories' | 'listBillingAccountUsers' | 'listCheckinCampaigns' | 'listContacts' | 'listEmailTaskActivities' | 'listEmailTasks' | 'listEntries' | 'listEntryComments' | 'listExtendedAttributes' | 'listFieldRules' | 'listFieldTypes' | 'listFolders' | 'listFormConditionTriggerableFields' | 'listFormCooperators' | 'listFormViewEntries' | 'listFormViews' | 'listForms' | 'listMyFilledForms' | 'listMySubmittedEntries' | 'listNotificationRuleNotifications' | 'listNotificationRules' | 'listOpensearchQueries' | 'listOpensearchQuerySuggestions' | 'listRoutineRuns' | 'listRoutines' | 'listSmsAuditStatuses' | 'listSmsSignatures' | 'listSmsTaskActivities' | 'listSmsTasks' | 'listSmsTemplates' | 'listSmtpAccounts' | 'listTableConditionTriggerableFields' | 'listTableEntries' | 'listTableEntryComments' | 'listTableViewEntries' | 'listTableViews' | 'listTables' | 'listTradePayouts' | 'listTradeRefunds' | 'listTradeTransactions' | 'moveFormToFolder' | 'moveTableToFolder' | 'patchEntriesBatch' | 'pauseRoutine' | 'prepareEntryAttachmentUpload' | 'prepareFormImageUpload' | 'prepareImportFileUpload' | 'previewFormFieldTypeChange' | 'previewTableFieldTypeChange' | 'replaceEntry' | 'replaceTableEntry' | 'resendEmailTask' | 'resendSmsTask' | 'resumeRoutine' | 'runRoutine' | 'searchEntriesAcrossForms' | 'searchMySubmittedEntries' | 'sendSmsTask' | 'summarizeEntries' | 'summarizeFormViewEntries' | 'summarizeTableEntries' | 'summarizeTableViewEntries' | 'updateAccessPolicy' | 'updateCheckinCampaign' | 'updateEntry' | 'updateEntryComment' | 'updateEntryViaPost' | 'updateEvaluationSetting' | 'updateExamSetting' | 'updateForm' | 'updateFormSetting' | 'updateFormTheme' | 'updateFormView' | 'updateManuallyCloseRule' | 'updateNotificationRule' | 'updateOpensearchQuery' | 'updatePublishedArtifact' | 'updateRoutine' | 'updateSmsSignature' | 'updateSmsTask' | 'updateSmsTemplate' | 'updateTable' | 'updateTableEntry' | 'updateTableEntryComment' | 'updateTableEntryViaPost' | 'updateTableView' | 'uploadEntryAttachment' | 'uploadFormImage' | 'uploadImportFile' | 'uploadUserLicenseAttachment' | 'verifyRedirectParams';
|
|
5
5
|
export declare const OPERATIONS: {
|
|
6
6
|
readonly [id in OperationId]: Operation;
|
|
7
7
|
};
|
|
@@ -387,22 +387,6 @@ export const OPERATIONS = {
|
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
},
|
|
390
|
-
createPredefinedChoicesSet: {
|
|
391
|
-
method: 'POST',
|
|
392
|
-
path: '/predefined_choices_sets',
|
|
393
|
-
parameters: [],
|
|
394
|
-
body: {
|
|
395
|
-
required: true,
|
|
396
|
-
content: {
|
|
397
|
-
'application/json': {
|
|
398
|
-
type: 'object',
|
|
399
|
-
required: ['predefined_choices_set'],
|
|
400
|
-
properties: { predefined_choices_set: { $ref: 'PredefinedChoicesSetInput' } },
|
|
401
|
-
additionalProperties: false
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
},
|
|
406
390
|
createRoutine: {
|
|
407
391
|
method: 'POST',
|
|
408
392
|
path: '/routines',
|
|
@@ -522,11 +506,6 @@ export const OPERATIONS = {
|
|
|
522
506
|
{ name: 'id', in: 'path', required: true, schema: { type: 'string' } }
|
|
523
507
|
]
|
|
524
508
|
},
|
|
525
|
-
deletePredefinedChoicesSet: {
|
|
526
|
-
method: 'DELETE',
|
|
527
|
-
path: '/predefined_choices_sets/{id}',
|
|
528
|
-
parameters: [{ name: 'id', in: 'path', required: true, schema: { type: 'string' } }]
|
|
529
|
-
},
|
|
530
509
|
deleteRoutine: {
|
|
531
510
|
method: 'DELETE',
|
|
532
511
|
path: '/routines/{id}',
|
|
@@ -944,6 +923,14 @@ export const OPERATIONS = {
|
|
|
944
923
|
path: '/folders',
|
|
945
924
|
parameters: [{ name: 'limit', in: 'query', schema: { type: 'integer', minimum: 1, maximum: 100 } }]
|
|
946
925
|
},
|
|
926
|
+
listFormConditionTriggerableFields: {
|
|
927
|
+
method: 'GET',
|
|
928
|
+
path: '/forms/{form_token}/condition_triggerable_fields',
|
|
929
|
+
parameters: [
|
|
930
|
+
{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
|
|
931
|
+
{ name: 'fields_context', in: 'query', schema: { type: 'string', enum: ['routine'] } }
|
|
932
|
+
]
|
|
933
|
+
},
|
|
947
934
|
listFormCooperators: {
|
|
948
935
|
method: 'GET',
|
|
949
936
|
path: '/forms/{form_token}/cooperators',
|
|
@@ -1051,7 +1038,6 @@ export const OPERATIONS = {
|
|
|
1051
1038
|
path: '/opensearch/query_suggestions',
|
|
1052
1039
|
parameters: [{ name: 'form_token', in: 'query', required: true, schema: { type: 'string' } }]
|
|
1053
1040
|
},
|
|
1054
|
-
listPredefinedChoicesSets: { method: 'GET', path: '/predefined_choices_sets', parameters: [] },
|
|
1055
1041
|
listRoutineRuns: {
|
|
1056
1042
|
method: 'GET',
|
|
1057
1043
|
path: '/routines/{routine_id}/runs',
|
|
@@ -1143,6 +1129,14 @@ export const OPERATIONS = {
|
|
|
1143
1129
|
]
|
|
1144
1130
|
},
|
|
1145
1131
|
listSmtpAccounts: { method: 'GET', path: '/smtp_accounts', parameters: [] },
|
|
1132
|
+
listTableConditionTriggerableFields: {
|
|
1133
|
+
method: 'GET',
|
|
1134
|
+
path: '/tables/{table_token}/condition_triggerable_fields',
|
|
1135
|
+
parameters: [
|
|
1136
|
+
{ name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
|
|
1137
|
+
{ name: 'fields_context', in: 'query', schema: { type: 'string', enum: ['routine'] } }
|
|
1138
|
+
]
|
|
1139
|
+
},
|
|
1146
1140
|
listTableEntries: {
|
|
1147
1141
|
method: 'GET',
|
|
1148
1142
|
path: '/tables/{table_token}/entries',
|
|
@@ -1651,22 +1645,6 @@ export const OPERATIONS = {
|
|
|
1651
1645
|
parameters: [{ name: 'query_token', in: 'path', required: true, schema: { type: 'string' } }],
|
|
1652
1646
|
body: { required: true, content: { 'application/json': { $ref: 'OpensearchQueryInput' } } }
|
|
1653
1647
|
},
|
|
1654
|
-
updatePredefinedChoicesSet: {
|
|
1655
|
-
method: 'PATCH',
|
|
1656
|
-
path: '/predefined_choices_sets/{id}',
|
|
1657
|
-
parameters: [{ name: 'id', in: 'path', required: true, schema: { type: 'string' } }],
|
|
1658
|
-
body: {
|
|
1659
|
-
required: true,
|
|
1660
|
-
content: {
|
|
1661
|
-
'application/json': {
|
|
1662
|
-
type: 'object',
|
|
1663
|
-
required: ['predefined_choices_set'],
|
|
1664
|
-
properties: { predefined_choices_set: { $ref: 'PredefinedChoicesSetInput' } },
|
|
1665
|
-
additionalProperties: false
|
|
1666
|
-
}
|
|
1667
|
-
}
|
|
1668
|
-
}
|
|
1669
|
-
},
|
|
1670
1648
|
updatePublishedArtifact: {
|
|
1671
1649
|
method: 'PATCH',
|
|
1672
1650
|
path: '/artifacts/{artifact_id}/published_artifact',
|
|
@@ -2126,7 +2104,8 @@ export const SCHEMAS = {
|
|
|
2126
2104
|
api_code: { type: 'string' },
|
|
2127
2105
|
value: { type: 'string' },
|
|
2128
2106
|
operand_value: { type: 'number' },
|
|
2129
|
-
selected: { type: 'boolean' }
|
|
2107
|
+
selected: { type: 'boolean' },
|
|
2108
|
+
quota: { type: ['integer', 'null'], minimum: 0 }
|
|
2130
2109
|
},
|
|
2131
2110
|
additionalProperties: false
|
|
2132
2111
|
}
|
|
@@ -2411,6 +2390,112 @@ export const SCHEMAS = {
|
|
|
2411
2390
|
},
|
|
2412
2391
|
additionalProperties: false
|
|
2413
2392
|
},
|
|
2393
|
+
EvaluationFieldInput: {
|
|
2394
|
+
type: 'object',
|
|
2395
|
+
required: ['type', 'label'],
|
|
2396
|
+
properties: {
|
|
2397
|
+
type: {
|
|
2398
|
+
type: 'string',
|
|
2399
|
+
enum: [
|
|
2400
|
+
'TextField',
|
|
2401
|
+
'TextArea',
|
|
2402
|
+
'NumberField',
|
|
2403
|
+
'EmailField',
|
|
2404
|
+
'MobileField',
|
|
2405
|
+
'IdCardField',
|
|
2406
|
+
'NameField',
|
|
2407
|
+
'RadioButton',
|
|
2408
|
+
'CheckBox',
|
|
2409
|
+
'DropDown',
|
|
2410
|
+
'DateTimeField',
|
|
2411
|
+
'RatingField',
|
|
2412
|
+
'TableField',
|
|
2413
|
+
'TelephoneField',
|
|
2414
|
+
'AddressField',
|
|
2415
|
+
'AttachmentField',
|
|
2416
|
+
'GeoField',
|
|
2417
|
+
'LinkField',
|
|
2418
|
+
'NpsField',
|
|
2419
|
+
'TimeField',
|
|
2420
|
+
'SortField',
|
|
2421
|
+
'ESignatureField',
|
|
2422
|
+
'AudioField',
|
|
2423
|
+
'CascadeDropDown',
|
|
2424
|
+
'LikertField',
|
|
2425
|
+
'MatrixField',
|
|
2426
|
+
'MatrixScaleField',
|
|
2427
|
+
'GoodsField',
|
|
2428
|
+
'FormulaField',
|
|
2429
|
+
'ReservationField',
|
|
2430
|
+
'FormAssociation',
|
|
2431
|
+
'ImageRadioButton',
|
|
2432
|
+
'ImageCheckBox',
|
|
2433
|
+
'SectionBreak',
|
|
2434
|
+
'PageBreak',
|
|
2435
|
+
'WidgetButton',
|
|
2436
|
+
'WidgetContact',
|
|
2437
|
+
'WidgetMap',
|
|
2438
|
+
'WidgetMarquee',
|
|
2439
|
+
'SingleSelect',
|
|
2440
|
+
'MultiSelect',
|
|
2441
|
+
'ImageSingleSelect',
|
|
2442
|
+
'ImageMultiSelect',
|
|
2443
|
+
'DropDownSelect',
|
|
2444
|
+
'Rating',
|
|
2445
|
+
'Nps'
|
|
2446
|
+
]
|
|
2447
|
+
},
|
|
2448
|
+
label: { type: 'string' }
|
|
2449
|
+
},
|
|
2450
|
+
oneOf: [
|
|
2451
|
+
{ $ref: 'TextFieldInput' },
|
|
2452
|
+
{ $ref: 'TextAreaInput' },
|
|
2453
|
+
{ $ref: 'NumberFieldInput' },
|
|
2454
|
+
{ $ref: 'EmailFieldInput' },
|
|
2455
|
+
{ $ref: 'MobileFieldInput' },
|
|
2456
|
+
{ $ref: 'IdCardFieldInput' },
|
|
2457
|
+
{ $ref: 'NameFieldInput' },
|
|
2458
|
+
{ $ref: 'RadioButtonInput' },
|
|
2459
|
+
{ $ref: 'CheckBoxInput' },
|
|
2460
|
+
{ $ref: 'DropDownInput' },
|
|
2461
|
+
{ $ref: 'DateTimeFieldInput' },
|
|
2462
|
+
{ $ref: 'RatingFieldInput' },
|
|
2463
|
+
{ $ref: 'TableFieldInput' },
|
|
2464
|
+
{ $ref: 'TelephoneFieldInput' },
|
|
2465
|
+
{ $ref: 'AddressFieldInput' },
|
|
2466
|
+
{ $ref: 'AttachmentFieldInput' },
|
|
2467
|
+
{ $ref: 'GeoFieldInput' },
|
|
2468
|
+
{ $ref: 'LinkFieldInput' },
|
|
2469
|
+
{ $ref: 'NpsFieldInput' },
|
|
2470
|
+
{ $ref: 'TimeFieldInput' },
|
|
2471
|
+
{ $ref: 'SortFieldInput' },
|
|
2472
|
+
{ $ref: 'ESignatureFieldInput' },
|
|
2473
|
+
{ $ref: 'AudioFieldInput' },
|
|
2474
|
+
{ $ref: 'CascadeDropDownInput' },
|
|
2475
|
+
{ $ref: 'LikertFieldInput' },
|
|
2476
|
+
{ $ref: 'MatrixFieldInput' },
|
|
2477
|
+
{ $ref: 'MatrixScaleFieldInput' },
|
|
2478
|
+
{ $ref: 'GoodsFieldInput' },
|
|
2479
|
+
{ $ref: 'FormulaFieldInput' },
|
|
2480
|
+
{ $ref: 'ReservationFieldInput' },
|
|
2481
|
+
{ $ref: 'FormAssociationInput' },
|
|
2482
|
+
{ $ref: 'ImageRadioButtonInput' },
|
|
2483
|
+
{ $ref: 'ImageCheckBoxInput' },
|
|
2484
|
+
{ $ref: 'SectionBreakInput' },
|
|
2485
|
+
{ $ref: 'PageBreakInput' },
|
|
2486
|
+
{ $ref: 'WidgetButtonInput' },
|
|
2487
|
+
{ $ref: 'WidgetContactInput' },
|
|
2488
|
+
{ $ref: 'WidgetMapInput' },
|
|
2489
|
+
{ $ref: 'WidgetMarqueeInput' },
|
|
2490
|
+
{ $ref: 'SingleSelectInput' },
|
|
2491
|
+
{ $ref: 'MultiSelectInput' },
|
|
2492
|
+
{ $ref: 'ImageSingleSelectInput' },
|
|
2493
|
+
{ $ref: 'ImageMultiSelectInput' },
|
|
2494
|
+
{ $ref: 'DropDownSelectInput' },
|
|
2495
|
+
{ $ref: 'RatingInput' },
|
|
2496
|
+
{ $ref: 'NpsInput' }
|
|
2497
|
+
]
|
|
2498
|
+
},
|
|
2414
2499
|
EvaluationSettingInput: {
|
|
2415
2500
|
type: 'object',
|
|
2416
2501
|
properties: {
|
|
@@ -2462,6 +2547,120 @@ export const SCHEMAS = {
|
|
|
2462
2547
|
},
|
|
2463
2548
|
additionalProperties: false
|
|
2464
2549
|
},
|
|
2550
|
+
ExamFieldInput: {
|
|
2551
|
+
type: 'object',
|
|
2552
|
+
required: ['type', 'label'],
|
|
2553
|
+
properties: {
|
|
2554
|
+
type: {
|
|
2555
|
+
type: 'string',
|
|
2556
|
+
enum: [
|
|
2557
|
+
'TextField',
|
|
2558
|
+
'TextArea',
|
|
2559
|
+
'NumberField',
|
|
2560
|
+
'EmailField',
|
|
2561
|
+
'MobileField',
|
|
2562
|
+
'IdCardField',
|
|
2563
|
+
'NameField',
|
|
2564
|
+
'RadioButton',
|
|
2565
|
+
'CheckBox',
|
|
2566
|
+
'DropDown',
|
|
2567
|
+
'DateTimeField',
|
|
2568
|
+
'RatingField',
|
|
2569
|
+
'TableField',
|
|
2570
|
+
'TelephoneField',
|
|
2571
|
+
'AddressField',
|
|
2572
|
+
'AttachmentField',
|
|
2573
|
+
'GeoField',
|
|
2574
|
+
'LinkField',
|
|
2575
|
+
'NpsField',
|
|
2576
|
+
'TimeField',
|
|
2577
|
+
'SortField',
|
|
2578
|
+
'ESignatureField',
|
|
2579
|
+
'AudioField',
|
|
2580
|
+
'CascadeDropDown',
|
|
2581
|
+
'LikertField',
|
|
2582
|
+
'MatrixField',
|
|
2583
|
+
'MatrixScaleField',
|
|
2584
|
+
'GoodsField',
|
|
2585
|
+
'FormulaField',
|
|
2586
|
+
'ReservationField',
|
|
2587
|
+
'FormAssociation',
|
|
2588
|
+
'ImageRadioButton',
|
|
2589
|
+
'ImageCheckBox',
|
|
2590
|
+
'SectionBreak',
|
|
2591
|
+
'PageBreak',
|
|
2592
|
+
'WidgetButton',
|
|
2593
|
+
'WidgetContact',
|
|
2594
|
+
'WidgetMap',
|
|
2595
|
+
'WidgetMarquee',
|
|
2596
|
+
'SingleSelect',
|
|
2597
|
+
'MultiSelect',
|
|
2598
|
+
'ImageSingleSelect',
|
|
2599
|
+
'ImageMultiSelect',
|
|
2600
|
+
'TrueOrFalse',
|
|
2601
|
+
'DropDownSelect',
|
|
2602
|
+
'FillInBlank',
|
|
2603
|
+
'ShortAnswer',
|
|
2604
|
+
'FillInNumber',
|
|
2605
|
+
'Department',
|
|
2606
|
+
'Grade'
|
|
2607
|
+
]
|
|
2608
|
+
},
|
|
2609
|
+
label: { type: 'string' }
|
|
2610
|
+
},
|
|
2611
|
+
oneOf: [
|
|
2612
|
+
{ $ref: 'TextFieldInput' },
|
|
2613
|
+
{ $ref: 'TextAreaInput' },
|
|
2614
|
+
{ $ref: 'NumberFieldInput' },
|
|
2615
|
+
{ $ref: 'EmailFieldInput' },
|
|
2616
|
+
{ $ref: 'MobileFieldInput' },
|
|
2617
|
+
{ $ref: 'IdCardFieldInput' },
|
|
2618
|
+
{ $ref: 'NameFieldInput' },
|
|
2619
|
+
{ $ref: 'RadioButtonInput' },
|
|
2620
|
+
{ $ref: 'CheckBoxInput' },
|
|
2621
|
+
{ $ref: 'DropDownInput' },
|
|
2622
|
+
{ $ref: 'DateTimeFieldInput' },
|
|
2623
|
+
{ $ref: 'RatingFieldInput' },
|
|
2624
|
+
{ $ref: 'TableFieldInput' },
|
|
2625
|
+
{ $ref: 'TelephoneFieldInput' },
|
|
2626
|
+
{ $ref: 'AddressFieldInput' },
|
|
2627
|
+
{ $ref: 'AttachmentFieldInput' },
|
|
2628
|
+
{ $ref: 'GeoFieldInput' },
|
|
2629
|
+
{ $ref: 'LinkFieldInput' },
|
|
2630
|
+
{ $ref: 'NpsFieldInput' },
|
|
2631
|
+
{ $ref: 'TimeFieldInput' },
|
|
2632
|
+
{ $ref: 'SortFieldInput' },
|
|
2633
|
+
{ $ref: 'ESignatureFieldInput' },
|
|
2634
|
+
{ $ref: 'AudioFieldInput' },
|
|
2635
|
+
{ $ref: 'CascadeDropDownInput' },
|
|
2636
|
+
{ $ref: 'LikertFieldInput' },
|
|
2637
|
+
{ $ref: 'MatrixFieldInput' },
|
|
2638
|
+
{ $ref: 'MatrixScaleFieldInput' },
|
|
2639
|
+
{ $ref: 'GoodsFieldInput' },
|
|
2640
|
+
{ $ref: 'FormulaFieldInput' },
|
|
2641
|
+
{ $ref: 'ReservationFieldInput' },
|
|
2642
|
+
{ $ref: 'FormAssociationInput' },
|
|
2643
|
+
{ $ref: 'ImageRadioButtonInput' },
|
|
2644
|
+
{ $ref: 'ImageCheckBoxInput' },
|
|
2645
|
+
{ $ref: 'SectionBreakInput' },
|
|
2646
|
+
{ $ref: 'PageBreakInput' },
|
|
2647
|
+
{ $ref: 'WidgetButtonInput' },
|
|
2648
|
+
{ $ref: 'WidgetContactInput' },
|
|
2649
|
+
{ $ref: 'WidgetMapInput' },
|
|
2650
|
+
{ $ref: 'WidgetMarqueeInput' },
|
|
2651
|
+
{ $ref: 'SingleSelectInput' },
|
|
2652
|
+
{ $ref: 'MultiSelectInput' },
|
|
2653
|
+
{ $ref: 'ImageSingleSelectInput' },
|
|
2654
|
+
{ $ref: 'ImageMultiSelectInput' },
|
|
2655
|
+
{ $ref: 'TrueOrFalseInput' },
|
|
2656
|
+
{ $ref: 'DropDownSelectInput' },
|
|
2657
|
+
{ $ref: 'FillInBlankInput' },
|
|
2658
|
+
{ $ref: 'ShortAnswerInput' },
|
|
2659
|
+
{ $ref: 'FillInNumberInput' },
|
|
2660
|
+
{ $ref: 'DepartmentInput' },
|
|
2661
|
+
{ $ref: 'GradeInput' }
|
|
2662
|
+
]
|
|
2663
|
+
},
|
|
2465
2664
|
ExamSettingInput: {
|
|
2466
2665
|
type: 'object',
|
|
2467
2666
|
properties: {
|
|
@@ -2534,20 +2733,7 @@ export const SCHEMAS = {
|
|
|
2534
2733
|
'WidgetButton',
|
|
2535
2734
|
'WidgetContact',
|
|
2536
2735
|
'WidgetMap',
|
|
2537
|
-
'WidgetMarquee'
|
|
2538
|
-
'SingleSelect',
|
|
2539
|
-
'MultiSelect',
|
|
2540
|
-
'ImageSingleSelect',
|
|
2541
|
-
'ImageMultiSelect',
|
|
2542
|
-
'TrueOrFalse',
|
|
2543
|
-
'DropDownSelect',
|
|
2544
|
-
'FillInBlank',
|
|
2545
|
-
'ShortAnswer',
|
|
2546
|
-
'FillInNumber',
|
|
2547
|
-
'Rating',
|
|
2548
|
-
'Nps',
|
|
2549
|
-
'Department',
|
|
2550
|
-
'Grade'
|
|
2736
|
+
'WidgetMarquee'
|
|
2551
2737
|
]
|
|
2552
2738
|
},
|
|
2553
2739
|
label: { type: 'string' }
|
|
@@ -2591,20 +2777,7 @@ export const SCHEMAS = {
|
|
|
2591
2777
|
{ $ref: 'WidgetButtonInput' },
|
|
2592
2778
|
{ $ref: 'WidgetContactInput' },
|
|
2593
2779
|
{ $ref: 'WidgetMapInput' },
|
|
2594
|
-
{ $ref: 'WidgetMarqueeInput' }
|
|
2595
|
-
{ $ref: 'SingleSelectInput' },
|
|
2596
|
-
{ $ref: 'MultiSelectInput' },
|
|
2597
|
-
{ $ref: 'ImageSingleSelectInput' },
|
|
2598
|
-
{ $ref: 'ImageMultiSelectInput' },
|
|
2599
|
-
{ $ref: 'TrueOrFalseInput' },
|
|
2600
|
-
{ $ref: 'DropDownSelectInput' },
|
|
2601
|
-
{ $ref: 'FillInBlankInput' },
|
|
2602
|
-
{ $ref: 'ShortAnswerInput' },
|
|
2603
|
-
{ $ref: 'FillInNumberInput' },
|
|
2604
|
-
{ $ref: 'RatingInput' },
|
|
2605
|
-
{ $ref: 'NpsInput' },
|
|
2606
|
-
{ $ref: 'DepartmentInput' },
|
|
2607
|
-
{ $ref: 'GradeInput' }
|
|
2780
|
+
{ $ref: 'WidgetMarqueeInput' }
|
|
2608
2781
|
]
|
|
2609
2782
|
},
|
|
2610
2783
|
FieldRuleOperations: {
|
|
@@ -2951,50 +3124,16 @@ export const SCHEMAS = {
|
|
|
2951
3124
|
}
|
|
2952
3125
|
},
|
|
2953
3126
|
{
|
|
2954
|
-
if: {
|
|
2955
|
-
|
|
2956
|
-
fields: {
|
|
2957
|
-
type: 'array',
|
|
2958
|
-
contains: {
|
|
2959
|
-
properties: {
|
|
2960
|
-
type: {
|
|
2961
|
-
enum: ['SingleSelect', 'MultiSelect', 'ImageSingleSelect', 'ImageMultiSelect', 'DropDownSelect']
|
|
2962
|
-
}
|
|
2963
|
-
},
|
|
2964
|
-
required: ['type']
|
|
2965
|
-
}
|
|
2966
|
-
}
|
|
2967
|
-
},
|
|
2968
|
-
required: ['fields']
|
|
2969
|
-
},
|
|
2970
|
-
then: { properties: { scene: { enum: ['exam', 'evaluation'] } }, required: ['scene'] }
|
|
3127
|
+
if: { properties: { scene: { const: 'exam' } }, required: ['scene'] },
|
|
3128
|
+
then: { properties: { fields: { items: { $ref: 'ExamFieldInput' } } } }
|
|
2971
3129
|
},
|
|
2972
3130
|
{
|
|
2973
|
-
if: {
|
|
2974
|
-
|
|
2975
|
-
fields: {
|
|
2976
|
-
type: 'array',
|
|
2977
|
-
contains: {
|
|
2978
|
-
properties: { type: { enum: ['TrueOrFalse', 'FillInBlank', 'ShortAnswer', 'FillInNumber'] } },
|
|
2979
|
-
required: ['type']
|
|
2980
|
-
}
|
|
2981
|
-
}
|
|
2982
|
-
},
|
|
2983
|
-
required: ['fields']
|
|
2984
|
-
},
|
|
2985
|
-
then: { properties: { scene: { enum: ['exam'] } }, required: ['scene'] }
|
|
3131
|
+
if: { properties: { scene: { const: 'evaluation' } }, required: ['scene'] },
|
|
3132
|
+
then: { properties: { fields: { items: { $ref: 'EvaluationFieldInput' } } } }
|
|
2986
3133
|
},
|
|
2987
3134
|
{
|
|
2988
|
-
if: {
|
|
2989
|
-
|
|
2990
|
-
fields: {
|
|
2991
|
-
type: 'array',
|
|
2992
|
-
contains: { properties: { type: { enum: ['Rating', 'Nps'] } }, required: ['type'] }
|
|
2993
|
-
}
|
|
2994
|
-
},
|
|
2995
|
-
required: ['fields']
|
|
2996
|
-
},
|
|
2997
|
-
then: { properties: { scene: { enum: ['evaluation'] } }, required: ['scene'] }
|
|
3135
|
+
if: { properties: { scene: { enum: ['exam', 'evaluation'] } }, required: ['scene'] },
|
|
3136
|
+
else: { properties: { fields: { items: { $ref: 'FieldInput' } } } }
|
|
2998
3137
|
}
|
|
2999
3138
|
]
|
|
3000
3139
|
},
|
|
@@ -3005,7 +3144,7 @@ export const SCHEMAS = {
|
|
|
3005
3144
|
properties: {
|
|
3006
3145
|
name: { type: 'string' },
|
|
3007
3146
|
description: { type: 'string' },
|
|
3008
|
-
fields: { type: 'array', minItems: 1
|
|
3147
|
+
fields: { type: 'array', minItems: 1 },
|
|
3009
3148
|
setting: { $ref: 'FormSettingWriteInput' },
|
|
3010
3149
|
folder_token: { type: 'string' },
|
|
3011
3150
|
scene: {
|
|
@@ -3204,6 +3343,8 @@ export const SCHEMAS = {
|
|
|
3204
3343
|
merchant_account_id: { type: ['string', 'null'] },
|
|
3205
3344
|
wxpay_account_id: { type: ['string', 'null'] },
|
|
3206
3345
|
alipay_account_id: { type: ['string', 'null'] },
|
|
3346
|
+
payment_expirable: { type: 'boolean' },
|
|
3347
|
+
payment_expiration_time: { type: 'integer', minimum: 3, maximum: 30 },
|
|
3207
3348
|
notification_rules: { type: 'array', items: { $ref: 'NotificationRuleInput' } },
|
|
3208
3349
|
daily_repeat_close_rule: { $ref: 'DailyRepeatCloseRuleInput' }
|
|
3209
3350
|
},
|
|
@@ -3226,7 +3367,12 @@ export const SCHEMAS = {
|
|
|
3226
3367
|
fields: {
|
|
3227
3368
|
type: 'object',
|
|
3228
3369
|
properties: {
|
|
3229
|
-
add: {
|
|
3370
|
+
add: {
|
|
3371
|
+
type: 'array',
|
|
3372
|
+
items: {
|
|
3373
|
+
anyOf: [{ $ref: 'ExamFieldInput' }, { $ref: 'EvaluationFieldInput' }, { $ref: 'TableColumnInput' }]
|
|
3374
|
+
}
|
|
3375
|
+
},
|
|
3230
3376
|
remove: { type: 'array', items: { type: 'string' } },
|
|
3231
3377
|
update: { type: 'array', items: { $ref: 'FieldUpdateInput' } },
|
|
3232
3378
|
update_choices: { type: 'array', items: { $ref: 'ChoiceUpdateInput' } }
|
|
@@ -4141,12 +4287,6 @@ export const SCHEMAS = {
|
|
|
4141
4287
|
count_down: { type: 'integer', minimum: 0 }
|
|
4142
4288
|
}
|
|
4143
4289
|
},
|
|
4144
|
-
PredefinedChoicesSetInput: {
|
|
4145
|
-
type: 'object',
|
|
4146
|
-
required: ['label', 'choices'],
|
|
4147
|
-
properties: { label: { type: 'string' }, choices: { type: 'array', items: { type: 'string' } } },
|
|
4148
|
-
additionalProperties: false
|
|
4149
|
-
},
|
|
4150
4290
|
PublishedArtifactInput: {
|
|
4151
4291
|
type: 'object',
|
|
4152
4292
|
additionalProperties: false,
|
|
@@ -4244,11 +4384,12 @@ export const SCHEMAS = {
|
|
|
4244
4384
|
ReservationByDayQuotaInput: {
|
|
4245
4385
|
type: 'object',
|
|
4246
4386
|
additionalProperties: false,
|
|
4247
|
-
required: ['type'],
|
|
4387
|
+
required: ['type', 'available_days_of_week'],
|
|
4248
4388
|
properties: {
|
|
4249
4389
|
type: { const: 'by_day_repeat_weekly' },
|
|
4250
4390
|
available_days_of_week: {
|
|
4251
4391
|
type: 'array',
|
|
4392
|
+
minItems: 1,
|
|
4252
4393
|
items: { type: 'string', enum: ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'] }
|
|
4253
4394
|
},
|
|
4254
4395
|
show_left_quota: { type: 'boolean' },
|
|
@@ -4292,11 +4433,12 @@ export const SCHEMAS = {
|
|
|
4292
4433
|
ReservationByTimeRangeQuotaInput: {
|
|
4293
4434
|
type: 'object',
|
|
4294
4435
|
additionalProperties: false,
|
|
4295
|
-
required: ['type'],
|
|
4436
|
+
required: ['type', 'available_days_of_week'],
|
|
4296
4437
|
properties: {
|
|
4297
4438
|
type: { const: 'by_time_range_repeat_daily' },
|
|
4298
4439
|
available_days_of_week: {
|
|
4299
4440
|
type: 'array',
|
|
4441
|
+
minItems: 1,
|
|
4300
4442
|
items: { type: 'string', enum: ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'] }
|
|
4301
4443
|
},
|
|
4302
4444
|
show_left_quota: { type: 'boolean' },
|
|
@@ -4539,7 +4681,8 @@ export const SCHEMAS = {
|
|
|
4539
4681
|
properties: {
|
|
4540
4682
|
signature: { type: 'string' },
|
|
4541
4683
|
content: { type: 'string' },
|
|
4542
|
-
apply_description: { type: 'string', maxLength: 200 }
|
|
4684
|
+
apply_description: { type: 'string', maxLength: 200 },
|
|
4685
|
+
variables: { type: 'array', minItems: 1, items: { $ref: 'SMSTemplateVariableInput' } }
|
|
4543
4686
|
},
|
|
4544
4687
|
additionalProperties: false
|
|
4545
4688
|
},
|
|
@@ -4548,7 +4691,18 @@ export const SCHEMAS = {
|
|
|
4548
4691
|
properties: {
|
|
4549
4692
|
signature: { type: 'string' },
|
|
4550
4693
|
content: { type: 'string' },
|
|
4551
|
-
apply_description: { type: 'string', maxLength: 200 }
|
|
4694
|
+
apply_description: { type: 'string', maxLength: 200 },
|
|
4695
|
+
variables: { type: 'array', minItems: 1, items: { $ref: 'SMSTemplateVariableInput' } }
|
|
4696
|
+
},
|
|
4697
|
+
additionalProperties: false
|
|
4698
|
+
},
|
|
4699
|
+
SMSTemplateVariableInput: {
|
|
4700
|
+
type: 'object',
|
|
4701
|
+
required: ['label', 'type', 'example'],
|
|
4702
|
+
properties: {
|
|
4703
|
+
label: { type: 'string', pattern: '\\S' },
|
|
4704
|
+
type: { type: 'string', enum: ['code', 'nickname', 'name', 'address', 'amount', 'link', 'time', 'other'] },
|
|
4705
|
+
example: { type: 'string', minLength: 6, pattern: '\\S' }
|
|
4552
4706
|
},
|
|
4553
4707
|
additionalProperties: false
|
|
4554
4708
|
},
|
|
@@ -4890,6 +5044,7 @@ export const SCHEMAS = {
|
|
|
4890
5044
|
properties: {
|
|
4891
5045
|
primary_color: { type: 'string' },
|
|
4892
5046
|
secondary_color: { type: 'string' },
|
|
5047
|
+
dominant_color: { type: 'string', pattern: '^#[0-9a-fA-F]{6}$' },
|
|
4893
5048
|
wallpaper: {
|
|
4894
5049
|
type: 'object',
|
|
4895
5050
|
properties: {
|