@jinshuju/cli 0.11.0 → 0.12.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.
@@ -0,0 +1,4003 @@
1
+ // Generated by scripts/generate.mjs from spec/openapi.yaml (Jinshuju API v1 1.0).
2
+ // Do not edit: change the spec and run `npm run generate`.
3
+ /** The path every operation's path is relative to, from `servers`. */
4
+ export const BASE_PATH = '/api/v1';
5
+ export const OPERATIONS = {
6
+ aggregateEntries: {
7
+ method: 'GET',
8
+ path: '/forms/{form_token}/entries/aggregate',
9
+ parameters: [
10
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
11
+ { name: 'metrics', in: 'query', schema: { type: 'string' } },
12
+ { name: 'dimensions', in: 'query', schema: { type: 'string' } },
13
+ { name: 'limit', in: 'query', schema: { type: 'integer' } },
14
+ { name: 'filters', in: 'query', schema: { type: 'string' } },
15
+ { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
16
+ ]
17
+ },
18
+ aggregateFormViewEntries: {
19
+ method: 'GET',
20
+ path: '/forms/{form_token}/views/{view_token}/entries/aggregate',
21
+ parameters: [
22
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
23
+ { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } },
24
+ { name: 'metrics', in: 'query', schema: { type: 'string' } },
25
+ { name: 'dimensions', in: 'query', schema: { type: 'string' } },
26
+ { name: 'limit', in: 'query', schema: { type: 'integer' } },
27
+ { name: 'filters', in: 'query', schema: { type: 'string' } },
28
+ { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
29
+ ]
30
+ },
31
+ aggregateTableEntries: {
32
+ method: 'GET',
33
+ path: '/tables/{table_token}/entries/aggregate',
34
+ parameters: [
35
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
36
+ { name: 'metrics', in: 'query', schema: { type: 'string' } },
37
+ { name: 'dimensions', in: 'query', schema: { type: 'string' } },
38
+ { name: 'limit', in: 'query', schema: { type: 'integer' } },
39
+ { name: 'filters', in: 'query', schema: { type: 'string' } },
40
+ { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
41
+ ]
42
+ },
43
+ aggregateTableViewEntries: {
44
+ method: 'GET',
45
+ path: '/tables/{table_token}/views/{view_token}/entries/aggregate',
46
+ parameters: [
47
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
48
+ { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } },
49
+ { name: 'metrics', in: 'query', schema: { type: 'string' } },
50
+ { name: 'dimensions', in: 'query', schema: { type: 'string' } },
51
+ { name: 'limit', in: 'query', schema: { type: 'integer' } },
52
+ { name: 'filters', in: 'query', schema: { type: 'string' } },
53
+ { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
54
+ ]
55
+ },
56
+ aggregateTradeTransactions: {
57
+ method: 'GET',
58
+ path: '/trade/transactions/aggregate',
59
+ parameters: [
60
+ { name: 'start_date', in: 'query', schema: { type: 'string' } },
61
+ { name: 'end_date', in: 'query', schema: { type: 'string' } },
62
+ { name: 'group_by', in: 'query', schema: { type: 'string', enum: ['time', 'paid_status', 'payment_channel'] } },
63
+ {
64
+ name: 'paid_status',
65
+ in: 'query',
66
+ explode: false,
67
+ schema: {
68
+ type: 'array',
69
+ items: { type: 'string', enum: ['paid', 'unpaid', 'refunded', 'refunding', 'partial_refunded'] }
70
+ }
71
+ },
72
+ { name: 'payment_channel', in: 'query', schema: { type: 'string', enum: ['wxpay', 'alipay'] } },
73
+ { name: 'form_token', in: 'query', schema: { type: 'string' } }
74
+ ]
75
+ },
76
+ checkFormFieldData: {
77
+ method: 'GET',
78
+ path: '/forms/{form_token}/fields/check',
79
+ parameters: [
80
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
81
+ { name: 'checks', in: 'query', required: true, schema: { type: 'string' } }
82
+ ]
83
+ },
84
+ checkTableFieldData: {
85
+ method: 'GET',
86
+ path: '/tables/{table_token}/fields/check',
87
+ parameters: [
88
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
89
+ { name: 'checks', in: 'query', required: true, schema: { type: 'string' } }
90
+ ]
91
+ },
92
+ copyForm: {
93
+ method: 'POST',
94
+ path: '/forms/{form_token}/copy',
95
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
96
+ body: { content: { 'application/json': { $ref: 'CopyFormInput' } } }
97
+ },
98
+ countEntries: {
99
+ method: 'GET',
100
+ path: '/forms/{form_token}/entries/count',
101
+ parameters: [
102
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
103
+ { name: 'filters', in: 'query', schema: { type: 'string' } },
104
+ { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
105
+ ]
106
+ },
107
+ countEntriesAcrossForms: {
108
+ method: 'GET',
109
+ path: '/entries/count',
110
+ parameters: [
111
+ { name: 'form_tokens', in: 'query', schema: { type: 'string' } },
112
+ { name: 'filters', in: 'query', schema: { type: 'string' } }
113
+ ]
114
+ },
115
+ countFormViewEntries: {
116
+ method: 'GET',
117
+ path: '/forms/{form_token}/views/{view_token}/entries/count',
118
+ parameters: [
119
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
120
+ { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } },
121
+ { name: 'filters', in: 'query', schema: { type: 'string' } },
122
+ { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
123
+ ]
124
+ },
125
+ countTableEntries: {
126
+ method: 'GET',
127
+ path: '/tables/{table_token}/entries/count',
128
+ parameters: [
129
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
130
+ { name: 'filters', in: 'query', schema: { type: 'string' } },
131
+ { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
132
+ ]
133
+ },
134
+ countTableViewEntries: {
135
+ method: 'GET',
136
+ path: '/tables/{table_token}/views/{view_token}/entries/count',
137
+ parameters: [
138
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
139
+ { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } },
140
+ { name: 'filters', in: 'query', schema: { type: 'string' } },
141
+ { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
142
+ ]
143
+ },
144
+ createCheckinCampaign: {
145
+ method: 'POST',
146
+ path: '/plugins/checkin/campaigns',
147
+ parameters: [],
148
+ body: { required: true, content: { 'application/json': { $ref: 'CheckinCampaignCreateInput' } } }
149
+ },
150
+ createEntriesBatch: {
151
+ method: 'POST',
152
+ path: '/forms/{form_token}/entries/batch',
153
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
154
+ body: {
155
+ required: true,
156
+ content: {
157
+ 'application/json': {
158
+ type: 'object',
159
+ required: ['entries'],
160
+ properties: { entries: { type: 'array', minItems: 1, maxItems: 200, items: { $ref: 'EntryInput' } } },
161
+ additionalProperties: false
162
+ }
163
+ }
164
+ }
165
+ },
166
+ createEntry: {
167
+ method: 'POST',
168
+ path: '/forms/{form_token}/entries',
169
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
170
+ body: { required: true, content: { 'application/json': { $ref: 'EntryInput' } } }
171
+ },
172
+ createEntryComment: {
173
+ method: 'POST',
174
+ path: '/forms/{form_token}/entries/{serial_number}/comments',
175
+ parameters: [
176
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
177
+ { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } }
178
+ ],
179
+ body: {
180
+ required: true,
181
+ content: {
182
+ 'application/json': { allOf: [{ $ref: 'EntryCommentInput' }, { type: 'object', required: ['content'] }] }
183
+ }
184
+ }
185
+ },
186
+ createEntryImport: {
187
+ method: 'POST',
188
+ path: '/forms/{form_token}/entry_imports',
189
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
190
+ body: { required: true, content: { 'application/json': { $ref: 'EntryImportInput' } } }
191
+ },
192
+ createEntryLegacy: {
193
+ method: 'POST',
194
+ path: '/forms/{form_token}',
195
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
196
+ body: { required: true, content: { 'application/json': { $ref: 'EntryInput' } } }
197
+ },
198
+ createFillFormEntry: {
199
+ method: 'POST',
200
+ path: '/fill/f/{form_token}/entries',
201
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
202
+ body: { required: true, content: { 'application/json': { $ref: 'FillEntryRequest' } } }
203
+ },
204
+ createFillViewEntry: {
205
+ method: 'POST',
206
+ path: '/fill/v/{view_token}/entries',
207
+ parameters: [{ name: 'view_token', in: 'path', required: true, schema: { type: 'string' } }],
208
+ body: { required: true, content: { 'application/json': { $ref: 'FillEntryRequest' } } }
209
+ },
210
+ createFolder: {
211
+ method: 'POST',
212
+ path: '/folders',
213
+ parameters: [],
214
+ body: { required: true, content: { 'application/json': { $ref: 'FolderInput' } } }
215
+ },
216
+ createForm: {
217
+ method: 'POST',
218
+ path: '/forms',
219
+ parameters: [],
220
+ body: { required: true, content: { 'application/json': { $ref: 'FormCreateInput' } } }
221
+ },
222
+ createFormView: {
223
+ method: 'POST',
224
+ path: '/forms/{form_token}/views',
225
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
226
+ body: {
227
+ required: true,
228
+ content: { 'application/json': { allOf: [{ $ref: 'FormViewInput' }, { type: 'object', required: ['name'] }] } }
229
+ }
230
+ },
231
+ createFormWebhook: {
232
+ method: 'POST',
233
+ path: '/forms/{form_token}/webhook',
234
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
235
+ body: { required: true, content: { 'application/json': { $ref: 'WebhookInput' } } }
236
+ },
237
+ createOpensearchQuery: {
238
+ method: 'POST',
239
+ path: '/opensearch/queries',
240
+ parameters: [],
241
+ body: {
242
+ required: true,
243
+ content: {
244
+ 'application/json': {
245
+ allOf: [
246
+ { $ref: 'OpensearchQueryInput' },
247
+ {
248
+ type: 'object',
249
+ required: ['form_token', 'name', 'display_field_rules'],
250
+ properties: { form_token: { type: 'string' } }
251
+ }
252
+ ]
253
+ }
254
+ }
255
+ }
256
+ },
257
+ createPredefinedChoicesSet: {
258
+ method: 'POST',
259
+ path: '/predefined_choices_sets',
260
+ parameters: [],
261
+ body: {
262
+ required: true,
263
+ content: {
264
+ 'application/json': {
265
+ type: 'object',
266
+ required: ['predefined_choices_set'],
267
+ properties: { predefined_choices_set: { $ref: 'PredefinedChoicesSetInput' } },
268
+ additionalProperties: false
269
+ }
270
+ }
271
+ }
272
+ },
273
+ createTable: {
274
+ method: 'POST',
275
+ path: '/tables',
276
+ parameters: [],
277
+ body: { required: true, content: { 'application/json': { $ref: 'TableCreateInput' } } }
278
+ },
279
+ createTableEntry: {
280
+ method: 'POST',
281
+ path: '/tables/{table_token}/entries',
282
+ parameters: [{ name: 'table_token', in: 'path', required: true, schema: { type: 'string' } }],
283
+ body: { required: true, content: { 'application/json': { $ref: 'EntryInput' } } }
284
+ },
285
+ createTableEntryComment: {
286
+ method: 'POST',
287
+ path: '/tables/{table_token}/entries/{serial_number}/comments',
288
+ parameters: [
289
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
290
+ { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } }
291
+ ],
292
+ body: {
293
+ required: true,
294
+ content: {
295
+ 'application/json': { allOf: [{ $ref: 'EntryCommentInput' }, { type: 'object', required: ['content'] }] }
296
+ }
297
+ }
298
+ },
299
+ createTableView: {
300
+ method: 'POST',
301
+ path: '/tables/{table_token}/views',
302
+ parameters: [{ name: 'table_token', in: 'path', required: true, schema: { type: 'string' } }],
303
+ body: {
304
+ required: true,
305
+ content: { 'application/json': { allOf: [{ $ref: 'FormViewInput' }, { type: 'object', required: ['name'] }] } }
306
+ }
307
+ },
308
+ createTemplateUsage: {
309
+ method: 'POST',
310
+ path: '/template_usages',
311
+ parameters: [],
312
+ body: { required: true, content: { 'application/json': { $ref: 'TemplateUsageInput' } } }
313
+ },
314
+ createWeixinOauthSession: {
315
+ method: 'POST',
316
+ path: '/forms/{form_token}/weixin_oauth_session',
317
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
318
+ body: { required: true, content: { 'application/json': { $ref: 'FormWeixinOauthSessionInput' } } }
319
+ },
320
+ deleteCheckinCampaign: {
321
+ method: 'DELETE',
322
+ path: '/plugins/checkin/campaigns/{id}',
323
+ parameters: [{ name: 'id', in: 'path', required: true, schema: { type: 'integer' } }]
324
+ },
325
+ deleteEntry: {
326
+ method: 'DELETE',
327
+ path: '/forms/{form_token}/entries/{serial_number}',
328
+ parameters: [
329
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
330
+ { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } }
331
+ ]
332
+ },
333
+ deleteEntryComment: {
334
+ method: 'DELETE',
335
+ path: '/forms/{form_token}/entries/{serial_number}/comments/{comment_id}',
336
+ parameters: [
337
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
338
+ { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } },
339
+ { name: 'comment_id', in: 'path', required: true, schema: { type: 'string' } }
340
+ ]
341
+ },
342
+ deleteFormView: {
343
+ method: 'DELETE',
344
+ path: '/forms/{form_token}/views/{view_token}',
345
+ parameters: [
346
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
347
+ { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } }
348
+ ]
349
+ },
350
+ deleteFormWebhook: {
351
+ method: 'DELETE',
352
+ path: '/forms/{form_token}/webhook',
353
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }]
354
+ },
355
+ deletePredefinedChoicesSet: {
356
+ method: 'DELETE',
357
+ path: '/predefined_choices_sets/{id}',
358
+ parameters: [{ name: 'id', in: 'path', required: true, schema: { type: 'string' } }]
359
+ },
360
+ deleteTable: {
361
+ method: 'DELETE',
362
+ path: '/tables/{table_token}',
363
+ parameters: [{ name: 'table_token', in: 'path', required: true, schema: { type: 'string' } }]
364
+ },
365
+ deleteTableEntry: {
366
+ method: 'DELETE',
367
+ path: '/tables/{table_token}/entries/{serial_number}',
368
+ parameters: [
369
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
370
+ { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } }
371
+ ]
372
+ },
373
+ deleteTableEntryComment: {
374
+ method: 'DELETE',
375
+ path: '/tables/{table_token}/entries/{serial_number}/comments/{comment_id}',
376
+ parameters: [
377
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
378
+ { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } },
379
+ { name: 'comment_id', in: 'path', required: true, schema: { type: 'string' } }
380
+ ]
381
+ },
382
+ deleteTableView: {
383
+ method: 'DELETE',
384
+ path: '/tables/{table_token}/views/{view_token}',
385
+ parameters: [
386
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
387
+ { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } }
388
+ ]
389
+ },
390
+ getBillingAccount: { method: 'GET', path: '/billing_account', parameters: [] },
391
+ getCheckinCampaign: {
392
+ method: 'GET',
393
+ path: '/plugins/checkin/campaigns/{id}',
394
+ parameters: [{ name: 'id', in: 'path', required: true, schema: { type: 'integer' } }]
395
+ },
396
+ getCurrentUser: { method: 'GET', path: '/me', parameters: [] },
397
+ getEntry: {
398
+ method: 'GET',
399
+ path: '/forms/{form_token}/entries/{serial_number}',
400
+ parameters: [
401
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
402
+ { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } },
403
+ { name: 'fields', in: 'query', schema: { type: 'string' } },
404
+ { name: 'include_labels', in: 'query', schema: { type: 'boolean' } }
405
+ ]
406
+ },
407
+ getEntryImport: {
408
+ method: 'GET',
409
+ path: '/forms/{form_token}/entry_imports/{id}',
410
+ parameters: [
411
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
412
+ { name: 'id', in: 'path', required: true, schema: { type: 'string' } }
413
+ ]
414
+ },
415
+ getEntryStats: {
416
+ method: 'GET',
417
+ path: '/entries/stats',
418
+ parameters: [
419
+ { name: 'from', in: 'query', required: true, schema: { type: 'string' } },
420
+ { name: 'to', in: 'query', schema: { type: 'string' } },
421
+ { name: 'kind', in: 'query', schema: { type: 'string', enum: ['form', 'table'] } },
422
+ { name: 'by', in: 'query', schema: { type: 'string', enum: ['day', 'week', 'month'] } },
423
+ { name: 'limit', in: 'query', schema: { type: 'integer' } }
424
+ ]
425
+ },
426
+ getEvaluationSetting: {
427
+ method: 'GET',
428
+ path: '/forms/{form_token}/evaluation_setting',
429
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }]
430
+ },
431
+ getExamSetting: {
432
+ method: 'GET',
433
+ path: '/forms/{form_token}/exam_setting',
434
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }]
435
+ },
436
+ getFieldType: {
437
+ method: 'GET',
438
+ path: '/field_types/{type}',
439
+ parameters: [
440
+ { name: 'type', in: 'path', required: true, schema: { type: 'string', pattern: '^[A-Za-z]+$' } },
441
+ { name: 'kind', in: 'query', schema: { type: 'string' } }
442
+ ]
443
+ },
444
+ getFillFormPage: {
445
+ method: 'GET',
446
+ path: '/fill/f/{form_token}',
447
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }]
448
+ },
449
+ getFillViewPage: {
450
+ method: 'GET',
451
+ path: '/fill/v/{view_token}',
452
+ parameters: [{ name: 'view_token', in: 'path', required: true, schema: { type: 'string' } }]
453
+ },
454
+ getForm: {
455
+ method: 'GET',
456
+ path: '/forms/{form_token}',
457
+ parameters: [
458
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
459
+ { name: 'include_analytics', in: 'query', schema: { type: 'boolean' } },
460
+ { name: 'include_theme', in: 'query', schema: { type: 'boolean' } },
461
+ { name: 'include_field_rules', in: 'query', schema: { type: 'boolean' } },
462
+ { name: 'include_extended_attributes', in: 'query', schema: { type: 'boolean' } },
463
+ { name: 'include_transactions', in: 'query', schema: { type: 'boolean' } }
464
+ ]
465
+ },
466
+ getFormSetting: {
467
+ method: 'GET',
468
+ path: '/forms/{form_token}/setting',
469
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }]
470
+ },
471
+ getFormView: {
472
+ method: 'GET',
473
+ path: '/forms/{form_token}/views/{view_token}',
474
+ parameters: [
475
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
476
+ { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } }
477
+ ]
478
+ },
479
+ getManuallyCloseRule: {
480
+ method: 'GET',
481
+ path: '/forms/{form_token}/manually_close_rule',
482
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }]
483
+ },
484
+ getOpensearchQuery: {
485
+ method: 'GET',
486
+ path: '/opensearch/queries/{query_token}',
487
+ parameters: [{ name: 'query_token', in: 'path', required: true, schema: { type: 'string' } }]
488
+ },
489
+ getTable: {
490
+ method: 'GET',
491
+ path: '/tables/{table_token}',
492
+ parameters: [
493
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
494
+ { name: 'include_analytics', in: 'query', schema: { type: 'boolean' } }
495
+ ]
496
+ },
497
+ getTableEntry: {
498
+ method: 'GET',
499
+ path: '/tables/{table_token}/entries/{serial_number}',
500
+ parameters: [
501
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
502
+ { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } },
503
+ { name: 'fields', in: 'query', schema: { type: 'string' } },
504
+ { name: 'include_labels', in: 'query', schema: { type: 'boolean' } }
505
+ ]
506
+ },
507
+ getTableView: {
508
+ method: 'GET',
509
+ path: '/tables/{table_token}/views/{view_token}',
510
+ parameters: [
511
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
512
+ { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } }
513
+ ]
514
+ },
515
+ getTradeMerchant: { method: 'GET', path: '/trade/merchant', parameters: [] },
516
+ listBillingAccountInvoices: { method: 'GET', path: '/billing_account/invoices', parameters: [] },
517
+ listBillingAccountPaymentHistories: {
518
+ method: 'GET',
519
+ path: '/billing_account/payment_histories',
520
+ parameters: [
521
+ { name: 'start_date', in: 'query', schema: { type: 'string' } },
522
+ { name: 'end_date', in: 'query', schema: { type: 'string' } },
523
+ { name: 'verb', in: 'query', schema: { type: 'string' } },
524
+ { name: 'limit', in: 'query', schema: { type: 'integer' } },
525
+ { name: 'include_balance', in: 'query', schema: { type: 'boolean' } }
526
+ ]
527
+ },
528
+ listBillingAccountUsers: {
529
+ method: 'GET',
530
+ path: '/billing_account/users',
531
+ parameters: [{ name: 'limit', in: 'query', schema: { type: 'integer', minimum: 1, maximum: 100 } }]
532
+ },
533
+ listCheckinCampaigns: {
534
+ method: 'GET',
535
+ path: '/plugins/checkin/campaigns',
536
+ parameters: [
537
+ { name: 'form_token', in: 'query', schema: { type: 'string' } },
538
+ { name: 'limit', in: 'query', schema: { type: 'integer', minimum: 1, maximum: 100 } }
539
+ ]
540
+ },
541
+ listContacts: {
542
+ method: 'GET',
543
+ path: '/contacts',
544
+ parameters: [{ name: 'next', in: 'query', schema: { type: 'string' } }]
545
+ },
546
+ listEntries: {
547
+ method: 'GET',
548
+ path: '/forms/{form_token}/entries',
549
+ parameters: [
550
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
551
+ { name: 'fields', in: 'query', schema: { type: 'string' } },
552
+ { name: 'filters', in: 'query', schema: { type: 'string' } },
553
+ { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } },
554
+ { name: 'sort', in: 'query', schema: { type: 'string' } },
555
+ { name: 'created_at', in: 'query', schema: { type: 'string' } },
556
+ { name: 'next', in: 'query', schema: { type: ['integer', 'string'] } },
557
+ { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } },
558
+ { name: 'include_labels', in: 'query', schema: { type: 'boolean' } },
559
+ { name: 'limit', in: 'query', schema: { type: 'integer' } }
560
+ ]
561
+ },
562
+ listEntryComments: {
563
+ method: 'GET',
564
+ path: '/forms/{form_token}/entries/{serial_number}/comments',
565
+ parameters: [
566
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
567
+ { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } }
568
+ ]
569
+ },
570
+ listExtendedAttributes: {
571
+ method: 'GET',
572
+ path: '/forms/{form_token}/extended_attributes',
573
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }]
574
+ },
575
+ listFieldRules: {
576
+ method: 'GET',
577
+ path: '/forms/{form_token}/field_rules',
578
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }]
579
+ },
580
+ listFieldTypes: {
581
+ method: 'GET',
582
+ path: '/field_types',
583
+ parameters: [{ name: 'kind', in: 'query', schema: { type: 'string' } }]
584
+ },
585
+ listFolders: {
586
+ method: 'GET',
587
+ path: '/folders',
588
+ parameters: [{ name: 'limit', in: 'query', schema: { type: 'integer', minimum: 1, maximum: 100 } }]
589
+ },
590
+ listFormCooperators: {
591
+ method: 'GET',
592
+ path: '/forms/{form_token}/cooperators',
593
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }]
594
+ },
595
+ listFormViewEntries: {
596
+ method: 'GET',
597
+ path: '/forms/{form_token}/views/{view_token}/entries',
598
+ parameters: [
599
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
600
+ { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } },
601
+ { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
602
+ { name: 'include_labels', in: 'query', schema: { type: 'boolean' } }
603
+ ]
604
+ },
605
+ listFormViews: {
606
+ method: 'GET',
607
+ path: '/forms/{form_token}/views',
608
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }]
609
+ },
610
+ listForms: {
611
+ method: 'GET',
612
+ path: '/forms',
613
+ parameters: [
614
+ { name: 'q', in: 'query', schema: { type: 'string' } },
615
+ { name: 'filters', in: 'query', schema: { type: 'string' } },
616
+ { name: 'sort', in: 'query', schema: { type: 'string' } },
617
+ { name: 'next', in: 'query', schema: { type: 'string' } },
618
+ { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } },
619
+ { name: 'limit', in: 'query', schema: { type: 'integer' } },
620
+ { name: 'include_transactions', in: 'query', schema: { type: 'boolean' } }
621
+ ]
622
+ },
623
+ listMyFilledForms: {
624
+ method: 'GET',
625
+ path: '/my/forms',
626
+ parameters: [
627
+ { name: 'limit', in: 'query', schema: { type: 'integer' } },
628
+ { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
629
+ { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } }
630
+ ]
631
+ },
632
+ listMySubmittedEntries: {
633
+ method: 'GET',
634
+ path: '/my/forms/{form_token}/entries',
635
+ parameters: [
636
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
637
+ { name: 'fields', in: 'query', schema: { type: 'string' } },
638
+ { name: 'filters', in: 'query', schema: { type: 'string' } },
639
+ { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } },
640
+ { name: 'include_labels', in: 'query', schema: { type: 'boolean' } },
641
+ { name: 'limit', in: 'query', schema: { type: 'integer' } },
642
+ { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
643
+ { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } }
644
+ ]
645
+ },
646
+ listOpensearchQueries: {
647
+ method: 'GET',
648
+ path: '/opensearch/queries',
649
+ parameters: [{ name: 'form_token', in: 'query', schema: { type: 'string' } }]
650
+ },
651
+ listOpensearchQuerySuggestions: {
652
+ method: 'GET',
653
+ path: '/opensearch/query_suggestions',
654
+ parameters: [{ name: 'form_token', in: 'query', required: true, schema: { type: 'string' } }]
655
+ },
656
+ listPredefinedChoicesSets: { method: 'GET', path: '/predefined_choices_sets', parameters: [] },
657
+ listSmsAuditStatuses: { method: 'GET', path: '/sms/audit_statuses', parameters: [] },
658
+ listTableEntries: {
659
+ method: 'GET',
660
+ path: '/tables/{table_token}/entries',
661
+ parameters: [
662
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
663
+ { name: 'fields', in: 'query', schema: { type: 'string' } },
664
+ { name: 'filters', in: 'query', schema: { type: 'string' } },
665
+ { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } },
666
+ { name: 'sort', in: 'query', schema: { type: 'string' } },
667
+ { name: 'created_at', in: 'query', schema: { type: 'string' } },
668
+ { name: 'next', in: 'query', schema: { type: ['integer', 'string'] } },
669
+ { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } },
670
+ { name: 'include_labels', in: 'query', schema: { type: 'boolean' } },
671
+ { name: 'limit', in: 'query', schema: { type: 'integer' } }
672
+ ]
673
+ },
674
+ listTableEntryComments: {
675
+ method: 'GET',
676
+ path: '/tables/{table_token}/entries/{serial_number}/comments',
677
+ parameters: [
678
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
679
+ { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } }
680
+ ]
681
+ },
682
+ listTableViewEntries: {
683
+ method: 'GET',
684
+ path: '/tables/{table_token}/views/{view_token}/entries',
685
+ parameters: [
686
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
687
+ { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } },
688
+ { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
689
+ { name: 'include_labels', in: 'query', schema: { type: 'boolean' } }
690
+ ]
691
+ },
692
+ listTableViews: {
693
+ method: 'GET',
694
+ path: '/tables/{table_token}/views',
695
+ parameters: [{ name: 'table_token', in: 'path', required: true, schema: { type: 'string' } }]
696
+ },
697
+ listTables: {
698
+ method: 'GET',
699
+ path: '/tables',
700
+ parameters: [
701
+ { name: 'q', in: 'query', schema: { type: 'string' } },
702
+ { name: 'filters', in: 'query', schema: { type: 'string' } },
703
+ { name: 'sort', in: 'query', schema: { type: 'string' } },
704
+ { name: 'next', in: 'query', schema: { type: 'string' } },
705
+ { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } },
706
+ { name: 'limit', in: 'query', schema: { type: 'integer' } }
707
+ ]
708
+ },
709
+ listTradePayouts: {
710
+ method: 'GET',
711
+ path: '/trade/payouts',
712
+ parameters: [
713
+ { name: 'start_date', in: 'query', schema: { type: 'string' } },
714
+ { name: 'end_date', in: 'query', schema: { type: 'string' } },
715
+ { name: 'status', in: 'query', schema: { type: 'string', enum: ['processing', 'success', 'error'] } },
716
+ { name: 'include', in: 'query', schema: { type: 'string', enum: ['both', 'stats', 'records'] } },
717
+ { name: 'limit', in: 'query', schema: { type: 'integer' } },
718
+ { name: 'next', in: 'query', schema: { type: 'integer' } }
719
+ ]
720
+ },
721
+ listTradeRefunds: {
722
+ method: 'GET',
723
+ path: '/trade/refunds',
724
+ parameters: [
725
+ { name: 'start_date', in: 'query', schema: { type: 'string' } },
726
+ { name: 'end_date', in: 'query', schema: { type: 'string' } },
727
+ { name: 'status', in: 'query', schema: { type: 'string', enum: ['processing', 'success', 'error'] } },
728
+ { name: 'refund_no', in: 'query', schema: { type: 'string' } },
729
+ { name: 'include', in: 'query', schema: { type: 'string', enum: ['both', 'stats', 'records'] } },
730
+ { name: 'limit', in: 'query', schema: { type: 'integer' } },
731
+ { name: 'next', in: 'query', schema: { type: 'integer' } }
732
+ ]
733
+ },
734
+ listTradeTransactions: {
735
+ method: 'GET',
736
+ path: '/trade/transactions',
737
+ parameters: [
738
+ { name: 'start_date', in: 'query', schema: { type: 'string' } },
739
+ { name: 'end_date', in: 'query', schema: { type: 'string' } },
740
+ {
741
+ name: 'paid_status',
742
+ in: 'query',
743
+ explode: false,
744
+ schema: {
745
+ type: 'array',
746
+ items: { type: 'string', enum: ['paid', 'unpaid', 'refunded', 'refunding', 'partial_refunded'] }
747
+ }
748
+ },
749
+ { name: 'payment_channel', in: 'query', schema: { type: 'string', enum: ['wxpay', 'alipay'] } },
750
+ { name: 'form_token', in: 'query', schema: { type: 'string' } },
751
+ { name: 'order_no', in: 'query', schema: { type: 'string' } },
752
+ { name: 'limit', in: 'query', schema: { type: 'integer' } },
753
+ { name: 'next', in: 'query', schema: { type: 'integer' } }
754
+ ]
755
+ },
756
+ moveFormToFolder: {
757
+ method: 'PATCH',
758
+ path: '/forms/{form_token}/folder',
759
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
760
+ body: { required: true, content: { 'application/json': { $ref: 'FormFolderMoveInput' } } }
761
+ },
762
+ moveTableToFolder: {
763
+ method: 'PATCH',
764
+ path: '/tables/{table_token}/folder',
765
+ parameters: [{ name: 'table_token', in: 'path', required: true, schema: { type: 'string' } }],
766
+ body: { required: true, content: { 'application/json': { $ref: 'FormFolderMoveInput' } } }
767
+ },
768
+ patchEntriesBatch: {
769
+ method: 'PATCH',
770
+ path: '/forms/{form_token}/entries/batch',
771
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
772
+ body: {
773
+ required: true,
774
+ content: {
775
+ 'application/json': {
776
+ type: 'object',
777
+ required: ['entries'],
778
+ properties: {
779
+ entries: {
780
+ type: 'array',
781
+ minItems: 1,
782
+ maxItems: 200,
783
+ items: {
784
+ type: 'object',
785
+ required: ['serial_number', 'entry'],
786
+ properties: { serial_number: { type: 'integer' }, entry: { $ref: 'EntryInput' } },
787
+ additionalProperties: false
788
+ }
789
+ }
790
+ },
791
+ additionalProperties: false
792
+ }
793
+ }
794
+ }
795
+ },
796
+ previewFormFieldTypeChange: {
797
+ method: 'GET',
798
+ path: '/forms/{form_token}/fields/preview_convert',
799
+ parameters: [
800
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
801
+ { name: 'checks', in: 'query', required: true, schema: { type: 'string' } }
802
+ ]
803
+ },
804
+ previewTableFieldTypeChange: {
805
+ method: 'GET',
806
+ path: '/tables/{table_token}/fields/preview_convert',
807
+ parameters: [
808
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
809
+ { name: 'checks', in: 'query', required: true, schema: { type: 'string' } }
810
+ ]
811
+ },
812
+ replaceEntry: {
813
+ method: 'PUT',
814
+ path: '/forms/{form_token}/entries/{serial_number}',
815
+ parameters: [
816
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
817
+ { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } }
818
+ ],
819
+ body: { required: true, content: { 'application/json': { $ref: 'EntryInput' } } }
820
+ },
821
+ replaceTableEntry: {
822
+ method: 'PUT',
823
+ path: '/tables/{table_token}/entries/{serial_number}',
824
+ parameters: [
825
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
826
+ { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } }
827
+ ],
828
+ body: { required: true, content: { 'application/json': { $ref: 'EntryInput' } } }
829
+ },
830
+ searchEntriesAcrossForms: {
831
+ method: 'GET',
832
+ path: '/entries/search',
833
+ parameters: [
834
+ { name: 'keyword', in: 'query', required: true, schema: { type: 'string', maxLength: 200 } },
835
+ { name: 'form_tokens', in: 'query', schema: { type: 'string' } },
836
+ { name: 'filters', in: 'query', schema: { type: 'string' } }
837
+ ]
838
+ },
839
+ searchMySubmittedEntries: {
840
+ method: 'GET',
841
+ path: '/my/search',
842
+ parameters: [
843
+ { name: 'keyword', in: 'query', required: true, schema: { type: 'string', minLength: 1 } },
844
+ { name: 'form_tokens', in: 'query', schema: { type: 'string' } }
845
+ ]
846
+ },
847
+ summarizeEntries: {
848
+ method: 'GET',
849
+ path: '/forms/{form_token}/entries/summary',
850
+ parameters: [
851
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
852
+ { name: 'fields', in: 'query', schema: { type: 'string' } },
853
+ { name: 'include_overview', in: 'query', schema: { type: 'boolean' } },
854
+ { name: 'filters', in: 'query', schema: { type: 'string' } },
855
+ { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
856
+ ]
857
+ },
858
+ summarizeFormViewEntries: {
859
+ method: 'GET',
860
+ path: '/forms/{form_token}/views/{view_token}/entries/summary',
861
+ parameters: [
862
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
863
+ { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } },
864
+ { name: 'fields', in: 'query', schema: { type: 'string' } },
865
+ { name: 'include_overview', in: 'query', schema: { type: 'boolean' } },
866
+ { name: 'filters', in: 'query', schema: { type: 'string' } },
867
+ { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
868
+ ]
869
+ },
870
+ summarizeTableEntries: {
871
+ method: 'GET',
872
+ path: '/tables/{table_token}/entries/summary',
873
+ parameters: [
874
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
875
+ { name: 'fields', in: 'query', schema: { type: 'string' } },
876
+ { name: 'include_overview', in: 'query', schema: { type: 'boolean' } },
877
+ { name: 'filters', in: 'query', schema: { type: 'string' } },
878
+ { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
879
+ ]
880
+ },
881
+ summarizeTableViewEntries: {
882
+ method: 'GET',
883
+ path: '/tables/{table_token}/views/{view_token}/entries/summary',
884
+ parameters: [
885
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
886
+ { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } },
887
+ { name: 'fields', in: 'query', schema: { type: 'string' } },
888
+ { name: 'include_overview', in: 'query', schema: { type: 'boolean' } },
889
+ { name: 'filters', in: 'query', schema: { type: 'string' } },
890
+ { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
891
+ ]
892
+ },
893
+ updateAccessPolicy: {
894
+ method: 'PATCH',
895
+ path: '/forms/{form_token}/access_policy',
896
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
897
+ body: { required: true, content: { 'application/json': { $ref: 'AccessPolicyInput' } } }
898
+ },
899
+ updateCheckinCampaign: {
900
+ method: 'PATCH',
901
+ path: '/plugins/checkin/campaigns/{id}',
902
+ parameters: [{ name: 'id', in: 'path', required: true, schema: { type: 'integer' } }],
903
+ body: { required: true, content: { 'application/json': { $ref: 'CheckinCampaignUpdateInput' } } }
904
+ },
905
+ updateEntry: {
906
+ method: 'PATCH',
907
+ path: '/forms/{form_token}/entries/{serial_number}',
908
+ parameters: [
909
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
910
+ { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } }
911
+ ],
912
+ body: { required: true, content: { 'application/json': { $ref: 'EntryInput' } } }
913
+ },
914
+ updateEntryComment: {
915
+ method: 'PATCH',
916
+ path: '/forms/{form_token}/entries/{serial_number}/comments/{comment_id}',
917
+ parameters: [
918
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
919
+ { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } },
920
+ { name: 'comment_id', in: 'path', required: true, schema: { type: 'string' } }
921
+ ],
922
+ body: {
923
+ required: true,
924
+ content: {
925
+ 'application/json': {
926
+ type: 'object',
927
+ required: ['content'],
928
+ properties: { content: { type: 'string', maxLength: 2000 } },
929
+ additionalProperties: false
930
+ }
931
+ }
932
+ }
933
+ },
934
+ updateEntryViaPost: {
935
+ method: 'POST',
936
+ path: '/forms/{form_token}/entries/{serial_number}',
937
+ parameters: [
938
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
939
+ { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } }
940
+ ],
941
+ body: { required: true, content: { 'application/json': { $ref: 'EntryInput' } } }
942
+ },
943
+ updateEvaluationSetting: {
944
+ method: 'PATCH',
945
+ path: '/forms/{form_token}/evaluation_setting',
946
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
947
+ body: { required: true, content: { 'application/json': { $ref: 'EvaluationSettingInput' } } }
948
+ },
949
+ updateExamSetting: {
950
+ method: 'PATCH',
951
+ path: '/forms/{form_token}/exam_setting',
952
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
953
+ body: { required: true, content: { 'application/json': { $ref: 'ExamSettingInput' } } }
954
+ },
955
+ updateForm: {
956
+ method: 'PATCH',
957
+ path: '/forms/{form_token}',
958
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
959
+ body: { required: true, content: { 'application/json': { $ref: 'FormUpdateInput' } } }
960
+ },
961
+ updateFormSetting: {
962
+ method: 'PATCH',
963
+ path: '/forms/{form_token}/setting',
964
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
965
+ body: { required: true, content: { 'application/json': { $ref: 'FormSettingInput' } } }
966
+ },
967
+ updateFormTheme: {
968
+ method: 'PATCH',
969
+ path: '/forms/{form_token}/theme',
970
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
971
+ body: { required: true, content: { 'application/json': { $ref: 'ThemeInput' } } }
972
+ },
973
+ updateFormView: {
974
+ method: 'PATCH',
975
+ path: '/forms/{form_token}/views/{view_token}',
976
+ parameters: [
977
+ { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
978
+ { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } }
979
+ ],
980
+ body: { required: true, content: { 'application/json': { $ref: 'FormViewInput' } } }
981
+ },
982
+ updateManuallyCloseRule: {
983
+ method: 'PATCH',
984
+ path: '/forms/{form_token}/manually_close_rule',
985
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
986
+ body: { required: true, content: { 'application/json': { $ref: 'FormManuallyCloseRuleInput' } } }
987
+ },
988
+ updateOpensearchQuery: {
989
+ method: 'PATCH',
990
+ path: '/opensearch/queries/{query_token}',
991
+ parameters: [{ name: 'query_token', in: 'path', required: true, schema: { type: 'string' } }],
992
+ body: { required: true, content: { 'application/json': { $ref: 'OpensearchQueryInput' } } }
993
+ },
994
+ updatePredefinedChoicesSet: {
995
+ method: 'PATCH',
996
+ path: '/predefined_choices_sets/{id}',
997
+ parameters: [{ name: 'id', in: 'path', required: true, schema: { type: 'string' } }],
998
+ body: {
999
+ required: true,
1000
+ content: {
1001
+ 'application/json': {
1002
+ type: 'object',
1003
+ required: ['predefined_choices_set'],
1004
+ properties: { predefined_choices_set: { $ref: 'PredefinedChoicesSetInput' } },
1005
+ additionalProperties: false
1006
+ }
1007
+ }
1008
+ }
1009
+ },
1010
+ updateTable: {
1011
+ method: 'PATCH',
1012
+ path: '/tables/{table_token}',
1013
+ parameters: [{ name: 'table_token', in: 'path', required: true, schema: { type: 'string' } }],
1014
+ body: { required: true, content: { 'application/json': { $ref: 'FormUpdateInput' } } }
1015
+ },
1016
+ updateTableEntry: {
1017
+ method: 'PATCH',
1018
+ path: '/tables/{table_token}/entries/{serial_number}',
1019
+ parameters: [
1020
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
1021
+ { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } }
1022
+ ],
1023
+ body: { required: true, content: { 'application/json': { $ref: 'EntryInput' } } }
1024
+ },
1025
+ updateTableEntryComment: {
1026
+ method: 'PATCH',
1027
+ path: '/tables/{table_token}/entries/{serial_number}/comments/{comment_id}',
1028
+ parameters: [
1029
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
1030
+ { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } },
1031
+ { name: 'comment_id', in: 'path', required: true, schema: { type: 'string' } }
1032
+ ],
1033
+ body: {
1034
+ required: true,
1035
+ content: {
1036
+ 'application/json': {
1037
+ type: 'object',
1038
+ required: ['content'],
1039
+ properties: { content: { type: 'string', maxLength: 2000 } },
1040
+ additionalProperties: false
1041
+ }
1042
+ }
1043
+ }
1044
+ },
1045
+ updateTableEntryViaPost: {
1046
+ method: 'POST',
1047
+ path: '/tables/{table_token}/entries/{serial_number}',
1048
+ parameters: [
1049
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
1050
+ { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } }
1051
+ ],
1052
+ body: { required: true, content: { 'application/json': { $ref: 'EntryInput' } } }
1053
+ },
1054
+ updateTableView: {
1055
+ method: 'PATCH',
1056
+ path: '/tables/{table_token}/views/{view_token}',
1057
+ parameters: [
1058
+ { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
1059
+ { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } }
1060
+ ],
1061
+ body: { required: true, content: { 'application/json': { $ref: 'FormViewInput' } } }
1062
+ },
1063
+ uploadEntryAttachment: {
1064
+ method: 'POST',
1065
+ path: '/forms/{form_token}/entry_attachments',
1066
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
1067
+ body: {
1068
+ required: true,
1069
+ content: {
1070
+ 'multipart/form-data': {
1071
+ type: 'object',
1072
+ required: ['field_api_code'],
1073
+ properties: {
1074
+ field_api_code: { type: 'string' },
1075
+ dimension_api_code: { type: 'string' },
1076
+ attachment_token: { type: 'string' },
1077
+ file: { type: 'string' },
1078
+ base64: { type: 'string' },
1079
+ data: { type: 'string' },
1080
+ file_name: { type: 'string' },
1081
+ filename: { type: 'string' },
1082
+ content_type: { type: 'string' }
1083
+ },
1084
+ additionalProperties: false
1085
+ },
1086
+ 'application/json': { $ref: 'EntryAttachmentBase64Input' }
1087
+ }
1088
+ }
1089
+ },
1090
+ uploadFormImage: {
1091
+ method: 'POST',
1092
+ path: '/form_image_attachments',
1093
+ parameters: [],
1094
+ body: {
1095
+ required: true,
1096
+ content: {
1097
+ 'multipart/form-data': {
1098
+ type: 'object',
1099
+ required: ['file'],
1100
+ properties: {
1101
+ image_type: {
1102
+ type: 'string',
1103
+ enum: ['field_choice', 'header', 'wallpaper', 'carousel', 'opensearch_header', 'description']
1104
+ },
1105
+ form_image_token: { type: 'string' },
1106
+ file: { type: 'string' }
1107
+ },
1108
+ additionalProperties: false
1109
+ }
1110
+ }
1111
+ }
1112
+ },
1113
+ uploadImportFile: {
1114
+ method: 'POST',
1115
+ path: '/forms/{form_token}/import_files',
1116
+ parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
1117
+ body: {
1118
+ required: true,
1119
+ content: {
1120
+ 'multipart/form-data': {
1121
+ type: 'object',
1122
+ required: ['file'],
1123
+ properties: { import_file_token: { type: 'string' }, file: { type: 'string' } },
1124
+ additionalProperties: false
1125
+ }
1126
+ }
1127
+ }
1128
+ },
1129
+ verifyRedirectParams: {
1130
+ method: 'GET',
1131
+ path: '/jamr_v',
1132
+ parameters: [
1133
+ { name: 'jamr_h', in: 'query', required: true, schema: { type: 'string' } },
1134
+ { name: 'serial_number', in: 'query', schema: { type: 'string' } }
1135
+ ]
1136
+ }
1137
+ };
1138
+ /** The named schemas a parameter or a request body refers to. */
1139
+ export const SCHEMAS = {
1140
+ AccessPolicyInput: {
1141
+ type: 'object',
1142
+ properties: { fill_frequency: { $ref: 'FormFillFrequencyInput' } },
1143
+ additionalProperties: false
1144
+ },
1145
+ AddressFieldInput: {
1146
+ type: 'object',
1147
+ additionalProperties: false,
1148
+ required: ['type', 'label'],
1149
+ properties: {
1150
+ type: { const: 'AddressField' },
1151
+ label: { type: 'string' },
1152
+ cid: { type: 'string' },
1153
+ notes: { type: 'string' },
1154
+ private: { type: 'boolean' },
1155
+ required: { type: 'boolean' },
1156
+ position: { type: 'integer', minimum: 0 },
1157
+ predefined_value: { type: 'object' },
1158
+ changeable: { type: 'object', additionalProperties: { type: 'boolean' } },
1159
+ enable_auto_position: { type: 'boolean' }
1160
+ }
1161
+ },
1162
+ AnswerInput: {
1163
+ type: 'object',
1164
+ additionalProperties: false,
1165
+ required: ['value', 'score'],
1166
+ properties: { value: {}, score: { type: 'number' } }
1167
+ },
1168
+ AttachmentFieldInput: {
1169
+ type: 'object',
1170
+ additionalProperties: false,
1171
+ required: ['type', 'label'],
1172
+ properties: {
1173
+ type: { const: 'AttachmentField' },
1174
+ label: { type: 'string' },
1175
+ cid: { type: 'string' },
1176
+ notes: { type: 'string' },
1177
+ private: { type: 'boolean' },
1178
+ required: { type: 'boolean' },
1179
+ position: { type: 'integer', minimum: 0 },
1180
+ max_size: { type: 'integer', minimum: 1, maximum: 500 },
1181
+ max_file_quantity: { type: 'integer', minimum: 1 },
1182
+ media_type: {
1183
+ type: 'object',
1184
+ additionalProperties: false,
1185
+ properties: {
1186
+ type: { type: 'string', enum: ['unlimited', 'doc', 'image', 'video', 'audio', 'compress', 'custom'] },
1187
+ value: { type: 'array', items: { type: 'string' } }
1188
+ },
1189
+ if: { properties: { type: { const: 'custom' } }, required: ['type'] },
1190
+ then: { required: ['value'], properties: { value: { minItems: 1 } } }
1191
+ },
1192
+ mobile_camera_only: { type: 'boolean' }
1193
+ }
1194
+ },
1195
+ AudioFieldInput: {
1196
+ type: 'object',
1197
+ additionalProperties: false,
1198
+ required: ['type', 'label'],
1199
+ properties: {
1200
+ type: { const: 'AudioField' },
1201
+ label: { type: 'string' },
1202
+ cid: { type: 'string' },
1203
+ notes: { type: 'string' },
1204
+ private: { type: 'boolean' },
1205
+ required: { type: 'boolean' },
1206
+ position: { type: 'integer', minimum: 0 },
1207
+ max_duration: { type: 'integer', minimum: 1, maximum: 5 }
1208
+ }
1209
+ },
1210
+ BooleanFieldInput: {
1211
+ type: 'object',
1212
+ additionalProperties: false,
1213
+ required: ['type', 'label'],
1214
+ properties: {
1215
+ type: { const: 'BooleanField' },
1216
+ label: { type: 'string' },
1217
+ cid: { type: 'string' },
1218
+ notes: { type: 'string' },
1219
+ private: { type: 'boolean' },
1220
+ required: { type: 'boolean' },
1221
+ position: { type: 'integer', minimum: 0 }
1222
+ }
1223
+ },
1224
+ CascadeChoiceInput: {
1225
+ type: 'object',
1226
+ additionalProperties: false,
1227
+ anyOf: [{ required: ['value'] }, { required: ['name'] }],
1228
+ properties: {
1229
+ value: { type: 'string' },
1230
+ name: { type: 'string' },
1231
+ api_code: { type: 'string' },
1232
+ quota: { type: 'integer', minimum: 1 },
1233
+ operand_value: { type: 'number' },
1234
+ selected: { type: 'boolean' },
1235
+ sub_choices: { type: 'array', items: { $ref: 'CascadeChoiceInput' } }
1236
+ }
1237
+ },
1238
+ CascadeDropDownInput: {
1239
+ type: 'object',
1240
+ additionalProperties: false,
1241
+ required: ['type', 'label'],
1242
+ properties: {
1243
+ type: { const: 'CascadeDropDown' },
1244
+ label: { type: 'string' },
1245
+ cid: { type: 'string' },
1246
+ notes: { type: 'string' },
1247
+ private: { type: 'boolean' },
1248
+ required: { type: 'boolean' },
1249
+ position: { type: 'integer', minimum: 0 },
1250
+ choices: { type: 'array', minItems: 1, items: { $ref: 'CascadeChoiceInput' } },
1251
+ levels: { type: 'integer', minimum: 2 },
1252
+ choice_filterable: { type: 'boolean' },
1253
+ random_choices: { type: 'boolean' },
1254
+ calculable: { type: 'boolean' }
1255
+ }
1256
+ },
1257
+ CheckBoxInput: {
1258
+ type: 'object',
1259
+ additionalProperties: false,
1260
+ required: ['type', 'label'],
1261
+ properties: {
1262
+ type: { const: 'CheckBox' },
1263
+ label: { type: 'string' },
1264
+ cid: { type: 'string' },
1265
+ notes: { type: 'string' },
1266
+ private: { type: 'boolean' },
1267
+ required: { type: 'boolean' },
1268
+ position: { type: 'integer', minimum: 0 },
1269
+ other_choice_required: { type: 'boolean' },
1270
+ choices: { type: 'array', minItems: 1, items: { $ref: 'ChoiceInput' } },
1271
+ calculable: { type: 'boolean' },
1272
+ choices_layout: { type: 'string' },
1273
+ random_choices: { type: 'boolean' },
1274
+ minimum_length: { type: 'integer', minimum: 0 },
1275
+ maximum_length: { type: 'integer', minimum: 0 }
1276
+ },
1277
+ allOf: [
1278
+ {
1279
+ if: { properties: { calculable: { const: true } }, required: ['calculable'] },
1280
+ then: { properties: { choices: { items: { required: ['operand_value'] } } } }
1281
+ }
1282
+ ]
1283
+ },
1284
+ CheckinCampaignCreateInput: {
1285
+ type: 'object',
1286
+ required: ['form_token'],
1287
+ properties: {
1288
+ form_token: { type: 'string' },
1289
+ checkin_field_api_code: { type: 'string' },
1290
+ name: { type: 'string', minLength: 1 },
1291
+ display_field_api_code: { type: ['string', 'null'] },
1292
+ enable_checkin_code: { type: 'boolean' },
1293
+ checkin_field_required_unique: { type: 'boolean' },
1294
+ date_settings: { type: 'array', items: { $ref: 'CheckinDateSetting' } },
1295
+ geo_location: { oneOf: [{ type: 'null' }, { $ref: 'CheckinGeoLocation' }] }
1296
+ },
1297
+ additionalProperties: false
1298
+ },
1299
+ CheckinCampaignUpdateInput: {
1300
+ type: 'object',
1301
+ properties: {
1302
+ enabled: { type: 'boolean' },
1303
+ name: { type: 'string', minLength: 1 },
1304
+ display_field_api_code: { type: ['string', 'null'] },
1305
+ enable_checkin_code: { type: 'boolean' },
1306
+ checkin_field_required_unique: { type: 'boolean' },
1307
+ date_settings: { type: 'array', items: { $ref: 'CheckinDateSetting' } },
1308
+ geo_location: { oneOf: [{ type: 'null' }, { $ref: 'CheckinGeoLocation' }] }
1309
+ },
1310
+ additionalProperties: false
1311
+ },
1312
+ CheckinDateSetting: {
1313
+ type: 'object',
1314
+ required: ['start_date', 'end_date', 'periods', 'durations'],
1315
+ properties: {
1316
+ start_date: { type: 'string' },
1317
+ end_date: { type: 'string' },
1318
+ periods: {
1319
+ type: 'array',
1320
+ minItems: 1,
1321
+ items: { type: 'string', enum: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] }
1322
+ },
1323
+ durations: {
1324
+ type: 'array',
1325
+ minItems: 1,
1326
+ maxItems: 1,
1327
+ items: {
1328
+ type: 'object',
1329
+ required: ['start', 'end'],
1330
+ properties: {
1331
+ start: { type: 'string', pattern: '^([01][0-9]|2[0-3]):[0-5][0-9]$' },
1332
+ end: { type: 'string', pattern: '^([01][0-9]|2[0-3]):[0-5][0-9]$' }
1333
+ },
1334
+ additionalProperties: false
1335
+ }
1336
+ }
1337
+ },
1338
+ additionalProperties: false
1339
+ },
1340
+ CheckinGeoLocation: {
1341
+ type: 'object',
1342
+ required: ['longitude', 'latitude', 'range'],
1343
+ properties: {
1344
+ location_name: { type: 'string' },
1345
+ address: { type: 'string' },
1346
+ longitude: { type: 'number' },
1347
+ latitude: { type: 'number' },
1348
+ range: { type: 'integer', minimum: 1 }
1349
+ },
1350
+ additionalProperties: false
1351
+ },
1352
+ ChoiceInput: {
1353
+ type: 'object',
1354
+ additionalProperties: false,
1355
+ anyOf: [{ required: ['value'] }, { required: ['name'] }],
1356
+ properties: {
1357
+ value: { type: 'string' },
1358
+ name: { type: 'string' },
1359
+ api_code: { type: 'string' },
1360
+ quota: { type: 'integer', minimum: 1 },
1361
+ operand_value: { type: 'number' },
1362
+ selected: { type: 'boolean' },
1363
+ is_other: { type: 'boolean' }
1364
+ }
1365
+ },
1366
+ ChoiceUpdateInput: {
1367
+ type: 'object',
1368
+ required: ['field_api_code'],
1369
+ properties: {
1370
+ field_api_code: { type: 'string' },
1371
+ add: { type: 'array', items: { $ref: 'ChoiceInput' } },
1372
+ remove: {
1373
+ type: 'array',
1374
+ items: { oneOf: [{ type: 'string' }, { type: 'object', properties: { api_code: { type: 'string' } } }] }
1375
+ },
1376
+ update: {
1377
+ type: 'array',
1378
+ items: {
1379
+ type: 'object',
1380
+ required: ['api_code'],
1381
+ properties: {
1382
+ api_code: { type: 'string' },
1383
+ value: { type: 'string' },
1384
+ operand_value: { type: 'number' },
1385
+ selected: { type: 'boolean' }
1386
+ },
1387
+ additionalProperties: false
1388
+ }
1389
+ }
1390
+ },
1391
+ additionalProperties: false
1392
+ },
1393
+ CopyFormInput: {
1394
+ type: 'object',
1395
+ properties: { name: { type: 'string' }, folder_token: { type: 'string' } },
1396
+ additionalProperties: false
1397
+ },
1398
+ DailyRepeatCloseRuleInput: {
1399
+ type: ['object', 'null'],
1400
+ properties: {
1401
+ enabled: { type: 'boolean' },
1402
+ time_periods: {
1403
+ type: 'array',
1404
+ items: {
1405
+ type: 'object',
1406
+ required: ['start_time', 'end_time'],
1407
+ properties: { start_time: { $ref: 'TimeOfDay' }, end_time: { $ref: 'TimeOfDay' } },
1408
+ additionalProperties: false
1409
+ }
1410
+ }
1411
+ },
1412
+ additionalProperties: false
1413
+ },
1414
+ DateTimeFieldInput: {
1415
+ type: 'object',
1416
+ additionalProperties: false,
1417
+ required: ['type', 'label'],
1418
+ properties: {
1419
+ type: { const: 'DateTimeField' },
1420
+ label: { type: 'string' },
1421
+ cid: { type: 'string' },
1422
+ notes: { type: 'string' },
1423
+ private: { type: 'boolean' },
1424
+ required: { type: 'boolean' },
1425
+ position: { type: 'integer', minimum: 0 },
1426
+ predefined_value: { type: 'string' },
1427
+ precision: { type: 'string', enum: ['month', 'day', 'minute', 'second'] }
1428
+ }
1429
+ },
1430
+ DepartmentInput: {
1431
+ type: 'object',
1432
+ additionalProperties: false,
1433
+ required: ['type', 'label'],
1434
+ properties: {
1435
+ type: { const: 'Department' },
1436
+ label: { type: 'string' },
1437
+ cid: { type: 'string' },
1438
+ notes: { type: 'string' },
1439
+ private: { type: 'boolean' },
1440
+ required: { type: 'boolean' },
1441
+ position: { type: 'integer', minimum: 0 },
1442
+ other_choice_required: { type: 'boolean' },
1443
+ choices: { type: 'array', minItems: 1, items: { $ref: 'ChoiceInput' } },
1444
+ calculable: { type: 'boolean' },
1445
+ choices_layout: { type: 'string' },
1446
+ random_choices: { type: 'boolean' }
1447
+ },
1448
+ allOf: [
1449
+ {
1450
+ if: { properties: { calculable: { const: true } }, required: ['calculable'] },
1451
+ then: { properties: { choices: { items: { required: ['operand_value'] } } } }
1452
+ }
1453
+ ]
1454
+ },
1455
+ DimensionInput: {
1456
+ type: 'object',
1457
+ additionalProperties: false,
1458
+ required: ['type', 'label'],
1459
+ properties: {
1460
+ type: {
1461
+ type: 'string',
1462
+ enum: [
1463
+ 'TextField',
1464
+ 'TextArea',
1465
+ 'MobileField',
1466
+ 'CheckBox',
1467
+ 'DropDown',
1468
+ 'NumberField',
1469
+ 'DateTimeField',
1470
+ 'TimeField',
1471
+ 'AttachmentField',
1472
+ 'IdCardField',
1473
+ 'EmailField'
1474
+ ]
1475
+ },
1476
+ label: { type: 'string', pattern: '\\S' },
1477
+ api_code: { type: 'string' },
1478
+ cid: { type: 'string' },
1479
+ required: { type: 'boolean' },
1480
+ choices: { type: 'array', items: { $ref: 'ChoiceInput' } }
1481
+ }
1482
+ },
1483
+ DropDownInput: {
1484
+ type: 'object',
1485
+ additionalProperties: false,
1486
+ required: ['type', 'label'],
1487
+ properties: {
1488
+ type: { const: 'DropDown' },
1489
+ label: { type: 'string' },
1490
+ cid: { type: 'string' },
1491
+ notes: { type: 'string' },
1492
+ private: { type: 'boolean' },
1493
+ required: { type: 'boolean' },
1494
+ position: { type: 'integer', minimum: 0 },
1495
+ other_choice_required: { type: 'boolean' },
1496
+ choices: { type: 'array', minItems: 1, items: { $ref: 'ChoiceInput' } },
1497
+ calculable: { type: 'boolean' },
1498
+ random_choices: { type: 'boolean' }
1499
+ },
1500
+ allOf: [
1501
+ {
1502
+ if: { properties: { calculable: { const: true } }, required: ['calculable'] },
1503
+ then: { properties: { choices: { items: { required: ['operand_value'] } } } }
1504
+ }
1505
+ ]
1506
+ },
1507
+ DropDownSelectInput: {
1508
+ type: 'object',
1509
+ additionalProperties: false,
1510
+ required: ['type', 'label', 'choices', 'answers'],
1511
+ properties: {
1512
+ type: { const: 'DropDownSelect' },
1513
+ label: { type: 'string' },
1514
+ cid: { type: 'string' },
1515
+ notes: { type: 'string' },
1516
+ private: { type: 'boolean' },
1517
+ required: { type: 'boolean' },
1518
+ position: { type: 'integer', minimum: 0 },
1519
+ other_choice_required: { type: 'boolean' },
1520
+ choices: { type: 'array', minItems: 1, items: { $ref: 'ChoiceInput' } },
1521
+ calculable: { type: 'boolean' },
1522
+ random_choices: { type: 'boolean' },
1523
+ answers: { type: 'array', minItems: 1, items: { $ref: 'AnswerInput' } },
1524
+ answer_setting_mode: { type: 'string', enum: ['absolute', 'relative'] },
1525
+ answer_explanation: { type: 'string' }
1526
+ },
1527
+ allOf: [
1528
+ {
1529
+ if: { properties: { calculable: { const: true } }, required: ['calculable'] },
1530
+ then: { properties: { choices: { items: { required: ['operand_value'] } } } }
1531
+ },
1532
+ {
1533
+ if: {
1534
+ anyOf: [
1535
+ { not: { required: ['answer_setting_mode'] } },
1536
+ { properties: { answer_setting_mode: { const: 'absolute' } } }
1537
+ ]
1538
+ },
1539
+ then: { properties: { answers: { maxItems: 1 } } }
1540
+ }
1541
+ ]
1542
+ },
1543
+ ESignatureFieldInput: {
1544
+ type: 'object',
1545
+ additionalProperties: false,
1546
+ required: ['type', 'label'],
1547
+ properties: {
1548
+ type: { const: 'ESignatureField' },
1549
+ label: { type: 'string' },
1550
+ cid: { type: 'string' },
1551
+ notes: { type: 'string' },
1552
+ private: { type: 'boolean' },
1553
+ required: { type: 'boolean' },
1554
+ position: { type: 'integer', minimum: 0 }
1555
+ }
1556
+ },
1557
+ EmailFieldInput: {
1558
+ type: 'object',
1559
+ additionalProperties: false,
1560
+ required: ['type', 'label'],
1561
+ properties: {
1562
+ type: { const: 'EmailField' },
1563
+ label: { type: 'string' },
1564
+ cid: { type: 'string' },
1565
+ notes: { type: 'string' },
1566
+ private: { type: 'boolean' },
1567
+ required: { type: 'boolean' },
1568
+ position: { type: 'integer', minimum: 0 },
1569
+ unique: { type: 'boolean' },
1570
+ placeholder: { type: 'string' }
1571
+ }
1572
+ },
1573
+ EntryAttachmentBase64Input: {
1574
+ type: 'object',
1575
+ required: ['field_api_code', 'base64'],
1576
+ properties: {
1577
+ field_api_code: { type: 'string' },
1578
+ dimension_api_code: { type: 'string' },
1579
+ attachment_token: { type: 'string' },
1580
+ base64: { type: 'string' },
1581
+ data: { type: 'string' },
1582
+ file_name: { type: 'string' },
1583
+ filename: { type: 'string' },
1584
+ content_type: { type: 'string' }
1585
+ },
1586
+ additionalProperties: false
1587
+ },
1588
+ EntryCommentInput: {
1589
+ type: 'object',
1590
+ properties: { content: { type: 'string', maxLength: 2000 }, parent_id: { type: 'string' } },
1591
+ additionalProperties: false
1592
+ },
1593
+ EntryImportColumnInput: {
1594
+ type: 'object',
1595
+ required: ['field_api_code'],
1596
+ properties: {
1597
+ field_api_code: { type: 'string' },
1598
+ column_label: { type: 'string' },
1599
+ sheet_column_index: { type: ['integer', 'string'], pattern: '^[0-9]+$' }
1600
+ },
1601
+ additionalProperties: false
1602
+ },
1603
+ EntryImportInput: {
1604
+ type: 'object',
1605
+ required: ['attachment_id', 'columns'],
1606
+ properties: {
1607
+ attachment_id: { type: 'string' },
1608
+ columns: { type: 'array', minItems: 1, items: { $ref: 'EntryImportColumnInput' } },
1609
+ header_row_index: { type: ['integer', 'string', 'null'], pattern: '^[0-9]+$' },
1610
+ unique_field_code: { type: ['string', 'null'] }
1611
+ },
1612
+ additionalProperties: false
1613
+ },
1614
+ EntryInput: { type: 'object', additionalProperties: true },
1615
+ EvaluationSettingInput: {
1616
+ type: 'object',
1617
+ properties: {
1618
+ notice_after_filling_mode: { type: 'string', enum: ['reports', 'customize', 'none'] },
1619
+ show_report_score: { type: 'boolean' },
1620
+ show_report_radar: { type: 'boolean' },
1621
+ show_indicator_comments: { type: 'boolean' },
1622
+ show_comments: { type: 'boolean' },
1623
+ need_attention: { type: 'string' },
1624
+ success_message_rich_text: { type: 'string' },
1625
+ evaluation_comments: { type: 'array', items: { $ref: 'FormEvaluationCommentInput' } },
1626
+ indicator_setting: {
1627
+ type: 'object',
1628
+ properties: {
1629
+ enabled: { type: 'boolean' },
1630
+ indicators_scoring_mode: { type: 'string', enum: ['summation', 'average', 'customization'] },
1631
+ indicators: {
1632
+ type: 'array',
1633
+ maxItems: 200,
1634
+ items: {
1635
+ type: 'object',
1636
+ required: ['name'],
1637
+ properties: {
1638
+ api_code: { type: 'string' },
1639
+ name: { type: 'string', maxLength: 20 },
1640
+ standard_score: { type: 'number' },
1641
+ field_api_codes: { type: 'array', items: { type: 'string' } },
1642
+ field_cids: { type: 'array', items: { oneOf: [{ type: 'string' }, { type: 'integer' }] } },
1643
+ indicator_comments: {
1644
+ type: 'array',
1645
+ maxItems: 20,
1646
+ items: {
1647
+ type: 'object',
1648
+ properties: {
1649
+ start_point: { type: 'number' },
1650
+ end_point: { type: 'number' },
1651
+ comment: { type: 'string' }
1652
+ },
1653
+ additionalProperties: false
1654
+ }
1655
+ }
1656
+ },
1657
+ additionalProperties: false
1658
+ }
1659
+ }
1660
+ },
1661
+ additionalProperties: false
1662
+ }
1663
+ },
1664
+ additionalProperties: false
1665
+ },
1666
+ ExamSettingInput: {
1667
+ type: 'object',
1668
+ properties: {
1669
+ notice_after_filling_mode: { type: 'string', enum: ['appreciation', 'grade', 'explaination', 'none', 'answer'] },
1670
+ show_timeout: { type: 'boolean' },
1671
+ limited_time: { type: 'integer', minimum: 1, maximum: 9999 },
1672
+ need_attention: { type: 'string' },
1673
+ success_message_rich_text: { type: 'string' },
1674
+ interval_comments: { type: 'array', items: { $ref: 'FormIntervalCommentInput' } }
1675
+ },
1676
+ additionalProperties: false
1677
+ },
1678
+ FieldInput: {
1679
+ type: 'object',
1680
+ required: ['type', 'label'],
1681
+ properties: {
1682
+ type: {
1683
+ type: 'string',
1684
+ enum: [
1685
+ 'TextField',
1686
+ 'TextArea',
1687
+ 'NumberField',
1688
+ 'EmailField',
1689
+ 'MobileField',
1690
+ 'IdCardField',
1691
+ 'NameField',
1692
+ 'RadioButton',
1693
+ 'CheckBox',
1694
+ 'DropDown',
1695
+ 'DateTimeField',
1696
+ 'RatingField',
1697
+ 'TableField',
1698
+ 'TelephoneField',
1699
+ 'AddressField',
1700
+ 'AttachmentField',
1701
+ 'GeoField',
1702
+ 'LinkField',
1703
+ 'NpsField',
1704
+ 'TimeField',
1705
+ 'SortField',
1706
+ 'ESignatureField',
1707
+ 'AudioField',
1708
+ 'CascadeDropDown',
1709
+ 'LikertField',
1710
+ 'MatrixField',
1711
+ 'MatrixScaleField',
1712
+ 'GoodsField',
1713
+ 'FormulaField',
1714
+ 'ReservationField',
1715
+ 'FormAssociation',
1716
+ 'ImageRadioButton',
1717
+ 'ImageCheckBox',
1718
+ 'SectionBreak',
1719
+ 'PageBreak',
1720
+ 'WidgetButton',
1721
+ 'WidgetContact',
1722
+ 'WidgetMap',
1723
+ 'WidgetMarquee',
1724
+ 'SingleSelect',
1725
+ 'MultiSelect',
1726
+ 'ImageSingleSelect',
1727
+ 'ImageMultiSelect',
1728
+ 'TrueOrFalse',
1729
+ 'DropDownSelect',
1730
+ 'FillInBlank',
1731
+ 'ShortAnswer',
1732
+ 'FillInNumber',
1733
+ 'Rating',
1734
+ 'Nps',
1735
+ 'Department',
1736
+ 'Grade'
1737
+ ]
1738
+ },
1739
+ label: { type: 'string' }
1740
+ },
1741
+ oneOf: [
1742
+ { $ref: 'TextFieldInput' },
1743
+ { $ref: 'TextAreaInput' },
1744
+ { $ref: 'NumberFieldInput' },
1745
+ { $ref: 'EmailFieldInput' },
1746
+ { $ref: 'MobileFieldInput' },
1747
+ { $ref: 'IdCardFieldInput' },
1748
+ { $ref: 'NameFieldInput' },
1749
+ { $ref: 'RadioButtonInput' },
1750
+ { $ref: 'CheckBoxInput' },
1751
+ { $ref: 'DropDownInput' },
1752
+ { $ref: 'DateTimeFieldInput' },
1753
+ { $ref: 'RatingFieldInput' },
1754
+ { $ref: 'TableFieldInput' },
1755
+ { $ref: 'TelephoneFieldInput' },
1756
+ { $ref: 'AddressFieldInput' },
1757
+ { $ref: 'AttachmentFieldInput' },
1758
+ { $ref: 'GeoFieldInput' },
1759
+ { $ref: 'LinkFieldInput' },
1760
+ { $ref: 'NpsFieldInput' },
1761
+ { $ref: 'TimeFieldInput' },
1762
+ { $ref: 'SortFieldInput' },
1763
+ { $ref: 'ESignatureFieldInput' },
1764
+ { $ref: 'AudioFieldInput' },
1765
+ { $ref: 'CascadeDropDownInput' },
1766
+ { $ref: 'LikertFieldInput' },
1767
+ { $ref: 'MatrixFieldInput' },
1768
+ { $ref: 'MatrixScaleFieldInput' },
1769
+ { $ref: 'GoodsFieldInput' },
1770
+ { $ref: 'FormulaFieldInput' },
1771
+ { $ref: 'ReservationFieldInput' },
1772
+ { $ref: 'FormAssociationInput' },
1773
+ { $ref: 'ImageRadioButtonInput' },
1774
+ { $ref: 'ImageCheckBoxInput' },
1775
+ { $ref: 'SectionBreakInput' },
1776
+ { $ref: 'PageBreakInput' },
1777
+ { $ref: 'WidgetButtonInput' },
1778
+ { $ref: 'WidgetContactInput' },
1779
+ { $ref: 'WidgetMapInput' },
1780
+ { $ref: 'WidgetMarqueeInput' },
1781
+ { $ref: 'SingleSelectInput' },
1782
+ { $ref: 'MultiSelectInput' },
1783
+ { $ref: 'ImageSingleSelectInput' },
1784
+ { $ref: 'ImageMultiSelectInput' },
1785
+ { $ref: 'TrueOrFalseInput' },
1786
+ { $ref: 'DropDownSelectInput' },
1787
+ { $ref: 'FillInBlankInput' },
1788
+ { $ref: 'ShortAnswerInput' },
1789
+ { $ref: 'FillInNumberInput' },
1790
+ { $ref: 'RatingInput' },
1791
+ { $ref: 'NpsInput' },
1792
+ { $ref: 'DepartmentInput' },
1793
+ { $ref: 'GradeInput' }
1794
+ ]
1795
+ },
1796
+ FieldRuleOperations: {
1797
+ type: 'object',
1798
+ properties: {
1799
+ add: { type: 'array', items: { $ref: 'FieldRuleWriteInput' } },
1800
+ remove: { type: 'array', items: { type: 'integer' } },
1801
+ update: { type: 'array', items: { $ref: 'FieldRuleWriteInput' } }
1802
+ },
1803
+ additionalProperties: false
1804
+ },
1805
+ FieldRuleWriteInput: {
1806
+ type: 'object',
1807
+ properties: {
1808
+ index: { type: 'integer' },
1809
+ targets: { type: 'array', items: { type: 'string' } },
1810
+ targets_display_mode: { type: 'string', enum: ['show', 'abort'] },
1811
+ operator: { type: 'string', enum: ['or', 'and'] },
1812
+ conditions: {
1813
+ type: 'array',
1814
+ items: {
1815
+ type: 'object',
1816
+ required: ['trigger'],
1817
+ properties: { trigger: { type: 'string' }, comparator: { type: 'string' }, value: {} },
1818
+ additionalProperties: false
1819
+ }
1820
+ }
1821
+ },
1822
+ additionalProperties: false
1823
+ },
1824
+ FieldUpdateInput: {
1825
+ type: 'object',
1826
+ additionalProperties: false,
1827
+ required: ['api_code'],
1828
+ properties: {
1829
+ api_code: { type: 'string' },
1830
+ type: {
1831
+ type: 'string',
1832
+ enum: [
1833
+ 'TextField',
1834
+ 'TextArea',
1835
+ 'NumberField',
1836
+ 'EmailField',
1837
+ 'MobileField',
1838
+ 'IdCardField',
1839
+ 'NameField',
1840
+ 'RadioButton',
1841
+ 'CheckBox',
1842
+ 'DropDown',
1843
+ 'DateTimeField',
1844
+ 'RatingField',
1845
+ 'TableField',
1846
+ 'TelephoneField',
1847
+ 'AddressField',
1848
+ 'AttachmentField',
1849
+ 'GeoField',
1850
+ 'LinkField',
1851
+ 'NpsField',
1852
+ 'TimeField',
1853
+ 'SortField',
1854
+ 'ESignatureField',
1855
+ 'AudioField',
1856
+ 'CascadeDropDown',
1857
+ 'LikertField',
1858
+ 'MatrixField',
1859
+ 'MatrixScaleField',
1860
+ 'GoodsField',
1861
+ 'FormulaField',
1862
+ 'ReservationField',
1863
+ 'FormAssociation',
1864
+ 'ImageRadioButton',
1865
+ 'ImageCheckBox',
1866
+ 'SectionBreak',
1867
+ 'PageBreak',
1868
+ 'WidgetButton',
1869
+ 'WidgetContact',
1870
+ 'WidgetMap',
1871
+ 'WidgetMarquee'
1872
+ ]
1873
+ },
1874
+ confirm_data_loss: { type: 'boolean' },
1875
+ label: { type: 'string' },
1876
+ notes: { type: ['string', 'null'] },
1877
+ private: { type: 'boolean' },
1878
+ required: { type: 'boolean' },
1879
+ unique: { type: 'boolean' },
1880
+ other_choice_required: { type: 'boolean' },
1881
+ position: { type: 'integer', minimum: 0 },
1882
+ rating_max: { type: 'integer', minimum: 1 },
1883
+ choices: { type: 'array', items: { $ref: 'CascadeChoiceInput' } },
1884
+ dimensions: { type: 'array', items: { $ref: 'DimensionInput' } },
1885
+ statements: { type: 'array', items: { $ref: 'StatementInput' } },
1886
+ goods_items: { type: 'array', items: { $ref: 'GoodsItemUpdateInput' } },
1887
+ reservation_items: { type: 'array', items: { $ref: 'ReservationItemInput' } },
1888
+ display_field_api_codes: { type: 'array', maxItems: 20, items: { type: 'string' } },
1889
+ answers: { type: 'array', minItems: 1, items: { $ref: 'AnswerInput' } },
1890
+ answer_setting_mode: { type: 'string', enum: ['absolute', 'partial_absolute', 'relative'] },
1891
+ answer_explanation: { type: 'string' },
1892
+ calculable: { type: 'boolean' },
1893
+ choices_layout: { type: 'string' },
1894
+ random_choices: { type: 'boolean' },
1895
+ minimum_length: { type: 'integer', minimum: 0 },
1896
+ maximum_length: { type: 'integer', minimum: 0 },
1897
+ predefined_value: {},
1898
+ placeholder: { type: 'string' },
1899
+ sms_verification: { type: 'boolean' },
1900
+ range_min: { type: 'number' },
1901
+ range_max: { type: 'number' },
1902
+ precision: {
1903
+ anyOf: [
1904
+ { type: 'integer', minimum: 0, maximum: 14 },
1905
+ { type: 'string', enum: ['month', 'day', 'minute', 'second'] }
1906
+ ]
1907
+ },
1908
+ display_precision: { type: 'integer', minimum: 0 },
1909
+ display_as_percentage: { type: 'boolean' },
1910
+ thousands_separator: { type: 'boolean' },
1911
+ currency_symbol: { type: 'string' },
1912
+ currency_symbol_position: { type: 'string', enum: ['prefix', 'suffix'] },
1913
+ icon_type: {
1914
+ type: 'string',
1915
+ enum: ['none', 'number-2', 'dollar1', 'cny1', 'formula-2', 'date-2', 'sum', 'text', 'text2']
1916
+ },
1917
+ changeable: { type: 'object', additionalProperties: { type: 'boolean' } },
1918
+ enable_auto_position: { type: 'boolean' },
1919
+ max_size: { type: 'integer', minimum: 1, maximum: 500 },
1920
+ max_file_quantity: { type: 'integer', minimum: 1 },
1921
+ media_type: {
1922
+ type: 'object',
1923
+ additionalProperties: false,
1924
+ properties: {
1925
+ type: { type: 'string', enum: ['unlimited', 'doc', 'image', 'video', 'audio', 'compress', 'custom'] },
1926
+ value: { type: 'array', items: { type: 'string' } }
1927
+ },
1928
+ if: { properties: { type: { const: 'custom' } }, required: ['type'] },
1929
+ then: { required: ['value'], properties: { value: { minItems: 1 } } }
1930
+ },
1931
+ mobile_camera_only: { type: 'boolean' },
1932
+ minimum_ratings_display_text: { type: 'string' },
1933
+ maximum_ratings_display_text: { type: 'string' },
1934
+ include_second: { type: 'boolean' },
1935
+ max_duration: { type: 'integer', minimum: 1, maximum: 5 },
1936
+ levels: { type: 'integer', minimum: 2 },
1937
+ choice_filterable: { type: 'boolean' },
1938
+ horizontal_on_mobile: { type: 'boolean' },
1939
+ likert_choice_style: { type: 'string', enum: ['single', 'multiple'] },
1940
+ advanced_feature: { type: 'boolean' },
1941
+ unit: { type: 'string', maxLength: 2 },
1942
+ collapse_on_mobile: { type: 'boolean' },
1943
+ columns_on_mobile: { type: 'integer', minimum: 1 },
1944
+ formula_display: { type: 'string' },
1945
+ result_display_type: { type: 'string', enum: ['string', 'numeric', 'datetime'] },
1946
+ result_display_as_date: { type: 'boolean' },
1947
+ allow_multiple_items: { type: 'boolean' },
1948
+ item_allow_multiple_reservations: { type: 'boolean' },
1949
+ allow_multiple_number: { type: 'boolean' },
1950
+ use_daily_time_range: { type: 'boolean' },
1951
+ associated_form_token: { type: 'string' },
1952
+ associated_field_api_codes: { type: 'array', minItems: 1, maxItems: 4, items: { type: 'string' } },
1953
+ privacy_safe: { type: 'boolean' },
1954
+ allow_reverse_association: { type: 'boolean' },
1955
+ reverse_display_field_api_codes: { type: 'array', items: { type: 'string' } },
1956
+ related_form_token: { type: 'string' },
1957
+ paired: { type: 'boolean' },
1958
+ related_label: { type: 'string' },
1959
+ show_split_line: { type: 'boolean' },
1960
+ show_part_description: { type: 'boolean' },
1961
+ disable_previous_page: { type: 'boolean' },
1962
+ previous_page_text: { type: 'string' },
1963
+ next_page_text: { type: 'string' },
1964
+ count_down: { type: 'integer', minimum: 0 },
1965
+ buttons_number: { type: 'integer', minimum: 1 },
1966
+ fixed_to_bottom: { type: 'boolean' },
1967
+ widget_max_images_number: { type: 'integer', minimum: 1 },
1968
+ phones: {
1969
+ type: 'array',
1970
+ items: {
1971
+ type: 'object',
1972
+ required: ['phone'],
1973
+ additionalProperties: false,
1974
+ properties: { phone: { type: 'string' } }
1975
+ }
1976
+ },
1977
+ nav_address: { type: 'string' },
1978
+ longitude: { type: 'number' },
1979
+ latitude: { type: 'number' },
1980
+ value: { type: 'string' },
1981
+ localizable_on_mobile: { type: 'boolean' },
1982
+ lines: { type: 'integer', minimum: 1 },
1983
+ entries_init_number: { type: 'integer', minimum: 0 },
1984
+ entries_number_visible: { type: 'boolean' },
1985
+ marquee_data_type: { type: 'string', enum: ['fake', 'real'] }
1986
+ },
1987
+ allOf: [
1988
+ {
1989
+ not: {
1990
+ properties: { display_as_percentage: { const: true }, thousands_separator: { const: true } },
1991
+ required: ['display_as_percentage', 'thousands_separator']
1992
+ }
1993
+ },
1994
+ {
1995
+ if: { properties: { calculable: { const: true } }, required: ['calculable'] },
1996
+ then: { properties: { choices: { items: { required: ['operand_value'] } } } }
1997
+ }
1998
+ ]
1999
+ },
2000
+ FillEntryRequest: {
2001
+ type: 'object',
2002
+ required: ['entry'],
2003
+ properties: { entry: { type: 'object' }, password: { type: 'string' } }
2004
+ },
2005
+ FillInBlankInput: {
2006
+ type: 'object',
2007
+ additionalProperties: false,
2008
+ required: ['type', 'label', 'answers'],
2009
+ properties: {
2010
+ type: { const: 'FillInBlank' },
2011
+ label: { type: 'string' },
2012
+ cid: { type: 'string' },
2013
+ notes: { type: 'string' },
2014
+ private: { type: 'boolean' },
2015
+ required: { type: 'boolean' },
2016
+ position: { type: 'integer', minimum: 0 },
2017
+ unique: { type: 'boolean' },
2018
+ predefined_value: { type: 'string' },
2019
+ placeholder: { type: 'string' },
2020
+ answers: { type: 'array', minItems: 1, items: { $ref: 'AnswerInput' } },
2021
+ answer_setting_mode: { type: 'string', enum: ['absolute', 'relative'] },
2022
+ answer_explanation: { type: 'string' }
2023
+ },
2024
+ allOf: [
2025
+ {
2026
+ if: {
2027
+ anyOf: [
2028
+ { not: { required: ['answer_setting_mode'] } },
2029
+ { properties: { answer_setting_mode: { const: 'absolute' } } }
2030
+ ]
2031
+ },
2032
+ then: { properties: { answers: { maxItems: 1 } } }
2033
+ }
2034
+ ]
2035
+ },
2036
+ FillInNumberInput: {
2037
+ type: 'object',
2038
+ additionalProperties: false,
2039
+ required: ['type', 'label', 'answers'],
2040
+ properties: {
2041
+ type: { const: 'FillInNumber' },
2042
+ label: { type: 'string' },
2043
+ cid: { type: 'string' },
2044
+ notes: { type: 'string' },
2045
+ private: { type: 'boolean' },
2046
+ required: { type: 'boolean' },
2047
+ position: { type: 'integer', minimum: 0 },
2048
+ unique: { type: 'boolean' },
2049
+ predefined_value: { type: ['number', 'string'] },
2050
+ placeholder: { type: 'string' },
2051
+ range_min: { type: 'number' },
2052
+ range_max: { type: 'number' },
2053
+ precision: { type: 'integer', minimum: 0, maximum: 14 },
2054
+ display_precision: { type: 'integer', minimum: 0 },
2055
+ display_as_percentage: { type: 'boolean' },
2056
+ thousands_separator: { type: 'boolean' },
2057
+ currency_symbol: { type: 'string' },
2058
+ currency_symbol_position: { type: 'string', enum: ['prefix', 'suffix'] },
2059
+ icon_type: { type: 'string', enum: ['none', 'number-2', 'dollar1', 'cny1'] },
2060
+ answers: { type: 'array', minItems: 1, items: { $ref: 'AnswerInput' } },
2061
+ answer_setting_mode: { type: 'string', enum: ['absolute', 'relative'] },
2062
+ answer_explanation: { type: 'string' }
2063
+ },
2064
+ allOf: [
2065
+ {
2066
+ not: {
2067
+ properties: { display_as_percentage: { const: true }, thousands_separator: { const: true } },
2068
+ required: ['display_as_percentage', 'thousands_separator']
2069
+ }
2070
+ },
2071
+ {
2072
+ if: {
2073
+ anyOf: [
2074
+ { not: { required: ['answer_setting_mode'] } },
2075
+ { properties: { answer_setting_mode: { const: 'absolute' } } }
2076
+ ]
2077
+ },
2078
+ then: { properties: { answers: { maxItems: 1 } } }
2079
+ }
2080
+ ]
2081
+ },
2082
+ FolderInput: {
2083
+ type: 'object',
2084
+ required: ['name'],
2085
+ properties: {
2086
+ name: { type: 'string', minLength: 1 },
2087
+ kind: { type: ['string', 'null'], enum: ['form', 'table', null] }
2088
+ },
2089
+ additionalProperties: false
2090
+ },
2091
+ FormAssociationInput: {
2092
+ type: 'object',
2093
+ additionalProperties: false,
2094
+ required: ['type', 'label', 'associated_form_token', 'associated_field_api_codes'],
2095
+ properties: {
2096
+ type: { const: 'FormAssociation' },
2097
+ label: { type: 'string' },
2098
+ cid: { type: 'string' },
2099
+ notes: { type: 'string' },
2100
+ private: { type: 'boolean' },
2101
+ required: { type: 'boolean' },
2102
+ position: { type: 'integer', minimum: 0 },
2103
+ unique: { type: 'boolean' },
2104
+ display_field_api_codes: { type: 'array', maxItems: 20, items: { type: 'string' } },
2105
+ associated_form_token: { type: 'string' },
2106
+ associated_field_api_codes: { type: 'array', minItems: 1, maxItems: 4, items: { type: 'string' } },
2107
+ privacy_safe: { type: 'boolean' },
2108
+ allow_reverse_association: { type: 'boolean' },
2109
+ reverse_display_field_api_codes: { type: 'array', items: { type: 'string' } }
2110
+ }
2111
+ },
2112
+ FormCreateConstraints: {
2113
+ allOf: [
2114
+ {
2115
+ if: { properties: { layout: { const: 'card' } }, required: ['layout'] },
2116
+ then: {
2117
+ properties: {
2118
+ fields: {
2119
+ items: {
2120
+ properties: {
2121
+ type: {
2122
+ not: {
2123
+ enum: [
2124
+ 'PageBreak',
2125
+ 'GoodsField',
2126
+ 'MultipleBlanksField',
2127
+ 'WidgetContact',
2128
+ 'WidgetVideo',
2129
+ 'WidgetButton'
2130
+ ]
2131
+ }
2132
+ }
2133
+ }
2134
+ }
2135
+ }
2136
+ }
2137
+ }
2138
+ },
2139
+ {
2140
+ if: {
2141
+ properties: {
2142
+ fields: {
2143
+ type: 'array',
2144
+ contains: {
2145
+ properties: {
2146
+ type: {
2147
+ enum: ['SingleSelect', 'MultiSelect', 'ImageSingleSelect', 'ImageMultiSelect', 'DropDownSelect']
2148
+ }
2149
+ },
2150
+ required: ['type']
2151
+ }
2152
+ }
2153
+ },
2154
+ required: ['fields']
2155
+ },
2156
+ then: { properties: { scene: { enum: ['exam', 'evaluation'] } }, required: ['scene'] }
2157
+ },
2158
+ {
2159
+ if: {
2160
+ properties: {
2161
+ fields: {
2162
+ type: 'array',
2163
+ contains: {
2164
+ properties: { type: { enum: ['TrueOrFalse', 'FillInBlank', 'ShortAnswer', 'FillInNumber'] } },
2165
+ required: ['type']
2166
+ }
2167
+ }
2168
+ },
2169
+ required: ['fields']
2170
+ },
2171
+ then: { properties: { scene: { enum: ['exam'] } }, required: ['scene'] }
2172
+ },
2173
+ {
2174
+ if: {
2175
+ properties: {
2176
+ fields: {
2177
+ type: 'array',
2178
+ contains: { properties: { type: { enum: ['Rating', 'Nps'] } }, required: ['type'] }
2179
+ }
2180
+ },
2181
+ required: ['fields']
2182
+ },
2183
+ then: { properties: { scene: { enum: ['evaluation'] } }, required: ['scene'] }
2184
+ }
2185
+ ]
2186
+ },
2187
+ FormCreateInput: {
2188
+ type: 'object',
2189
+ additionalProperties: false,
2190
+ required: ['name', 'fields'],
2191
+ properties: {
2192
+ name: { type: 'string' },
2193
+ description: { type: 'string' },
2194
+ fields: { type: 'array', minItems: 1, items: { $ref: 'FieldInput' } },
2195
+ setting: { $ref: 'FormSettingWriteInput' },
2196
+ folder_token: { type: 'string' },
2197
+ scene: {
2198
+ type: 'string',
2199
+ enum: [
2200
+ 'form',
2201
+ 'survey',
2202
+ 'registry',
2203
+ 'vote',
2204
+ 'exam',
2205
+ 'reservation',
2206
+ 'customer_acquisition',
2207
+ 'evaluation',
2208
+ 'online_payment',
2209
+ 'quickpay'
2210
+ ]
2211
+ },
2212
+ layout: { type: 'string', enum: ['classic', 'card'] }
2213
+ },
2214
+ allOf: [{ $ref: 'FormCreateConstraints' }]
2215
+ },
2216
+ FormEvaluationCommentInput: {
2217
+ type: 'object',
2218
+ properties: {
2219
+ id: { type: 'string' },
2220
+ conditions: {
2221
+ type: 'array',
2222
+ items: {
2223
+ type: 'object',
2224
+ properties: {
2225
+ trigger: { type: 'string' },
2226
+ operator: { type: 'string' },
2227
+ value: {},
2228
+ group_index: { type: 'integer' }
2229
+ }
2230
+ }
2231
+ },
2232
+ start_point: { type: 'number' },
2233
+ end_point: { type: 'number' },
2234
+ comment: { type: 'string' },
2235
+ retry: { type: 'boolean' }
2236
+ }
2237
+ },
2238
+ FormFillFrequencyInput: {
2239
+ type: 'object',
2240
+ properties: {
2241
+ fill_type: {
2242
+ type: 'string',
2243
+ enum: ['unlimited', 'once', 'repeatable', 'repeatable_by_day', 'custom_repeatable']
2244
+ },
2245
+ condition: { type: 'string', enum: ['by_weixin', 'by_ip', 'by_device', 'by_fields'] },
2246
+ cycle_period: { type: 'string', enum: ['every_hour', 'every_day', 'every_week', 'every_month'] },
2247
+ cycles_per_period: { type: 'integer', minimum: 1, maximum: 1000 },
2248
+ limited_time: { type: 'integer', minimum: 1 },
2249
+ limited_field_api_codes: { type: 'array', items: { type: 'string' } }
2250
+ }
2251
+ },
2252
+ FormFolderMoveInput: {
2253
+ type: 'object',
2254
+ required: ['folder_token'],
2255
+ properties: { folder_token: { type: ['string', 'null'] } },
2256
+ additionalProperties: false
2257
+ },
2258
+ FormIntervalCommentInput: {
2259
+ type: 'object',
2260
+ properties: {
2261
+ start_point: { type: 'number' },
2262
+ end_point: { type: 'number' },
2263
+ comment: { type: 'string' },
2264
+ retry: { type: 'boolean' }
2265
+ }
2266
+ },
2267
+ FormManuallyCloseRuleInput: {
2268
+ type: 'object',
2269
+ required: ['open'],
2270
+ properties: { open: { oneOf: [{ type: 'boolean' }, { type: 'string', enum: ['true', 'false'] }] } },
2271
+ additionalProperties: false
2272
+ },
2273
+ FormSettingInput: {
2274
+ type: 'object',
2275
+ properties: {
2276
+ success_message: { type: 'string', maxLength: 2000 },
2277
+ success_message_rich_text: { type: 'string' },
2278
+ success_message_style: { type: 'string', enum: ['text', 'rich_text', 'distribution_poster', 'certificate'] },
2279
+ enable_qrcode: { type: 'boolean' },
2280
+ entry_submit_mode: { type: 'string', enum: ['show_message', 'redirect', 'reports', 'exam_score'] },
2281
+ success_redirect_url: { type: 'string' },
2282
+ success_redirect_fields: { type: 'array', items: { type: 'string' } },
2283
+ show_entry_on_success: { type: 'boolean' },
2284
+ show_entry_on_success_button_text: { type: 'string' },
2285
+ edit_entry_on_success: { type: 'boolean' },
2286
+ show_serial_number_on_success: { type: 'boolean' },
2287
+ show_submit_again: { type: 'boolean' },
2288
+ hide_login_and_signup: { type: 'boolean' },
2289
+ show_close_count_down: { type: 'boolean' },
2290
+ show_form_before_open: { type: 'boolean' },
2291
+ show_field_number: { type: 'boolean' },
2292
+ password_required: { type: 'boolean' },
2293
+ access_password: { type: 'string' },
2294
+ allowed_audience: {
2295
+ type: 'string',
2296
+ enum: [
2297
+ 'public',
2298
+ 'internal',
2299
+ 'private',
2300
+ 'weixin_qiye_followers_only',
2301
+ 'weixin_followers_only',
2302
+ 'submitter_only',
2303
+ 'gd_user_only'
2304
+ ]
2305
+ },
2306
+ weixin_limited: { type: 'boolean' },
2307
+ entry_post_url: { type: 'string' },
2308
+ post_new_entry: { type: 'boolean' },
2309
+ post_updated_entry: { type: 'boolean' },
2310
+ manually_close_rule: { type: 'object', properties: { closed: { type: 'boolean' } }, additionalProperties: false },
2311
+ by_time_range_close_rule: {
2312
+ type: 'object',
2313
+ properties: { start_time: { type: ['string', 'null'] }, end_time: { type: ['string', 'null'] } },
2314
+ additionalProperties: false
2315
+ },
2316
+ by_entries_close_rule: {
2317
+ type: 'object',
2318
+ properties: { limit: { type: 'integer' } },
2319
+ additionalProperties: false
2320
+ },
2321
+ fill_frequency: { $ref: 'FormFillFrequencyInput' }
2322
+ },
2323
+ additionalProperties: false
2324
+ },
2325
+ FormSettingWriteInput: {
2326
+ type: 'object',
2327
+ properties: {
2328
+ success_message: { type: 'string' },
2329
+ success_message_rich_text: { type: 'string' },
2330
+ success_message_style: { type: 'string', enum: ['text', 'rich_text'] },
2331
+ entry_submit_mode: { type: 'string' },
2332
+ success_redirect_url: { type: 'string' },
2333
+ success_redirect_fields: { type: 'array', items: { type: 'string' } },
2334
+ open_entry_action: { type: 'string' },
2335
+ open_entry_message: { type: 'string' },
2336
+ open_entry_cancel_reservation: { type: 'boolean' },
2337
+ show_serial_number_on_success: { type: 'boolean' },
2338
+ show_submit_again: { type: 'boolean' },
2339
+ hide_login_and_signup: { type: 'boolean' },
2340
+ show_close_count_down: { type: 'boolean' },
2341
+ show_form_before_open: { type: 'boolean' },
2342
+ manually_close_rule: {
2343
+ type: ['object', 'null'],
2344
+ properties: { closed: { type: 'boolean' } },
2345
+ additionalProperties: false
2346
+ },
2347
+ by_time_range_close_rule: {
2348
+ type: ['object', 'null'],
2349
+ properties: { start_time: { type: 'string' }, end_time: { type: 'string' } },
2350
+ additionalProperties: false
2351
+ },
2352
+ by_entries_close_rule: {
2353
+ type: ['object', 'null'],
2354
+ properties: { limit: { type: 'integer' } },
2355
+ additionalProperties: false
2356
+ },
2357
+ fill_frequency: {
2358
+ type: ['object', 'null'],
2359
+ properties: {
2360
+ fill_type: {
2361
+ type: 'string',
2362
+ enum: ['unlimited', 'once', 'repeatable', 'repeatable_by_day', 'custom_repeatable']
2363
+ },
2364
+ condition: { type: 'string', enum: ['by_weixin', 'by_ip', 'by_device', 'by_fields'] },
2365
+ cycle_period: { type: 'string', enum: ['every_hour', 'every_day', 'every_week', 'every_month'] },
2366
+ cycles_per_period: { type: 'integer', minimum: 1, maximum: 1000 },
2367
+ limited_time: { type: 'integer' },
2368
+ limited_field_api_codes: { type: 'array', items: { type: 'string' } }
2369
+ },
2370
+ additionalProperties: false
2371
+ },
2372
+ show_field_number: { type: 'boolean' },
2373
+ password_required: { type: 'boolean' },
2374
+ access_password: { type: 'string' },
2375
+ allowed_audience: { type: 'string' },
2376
+ weixin_limited: { type: 'boolean' },
2377
+ submission_region_limited: { type: 'boolean' },
2378
+ submission_regions: { type: 'array', items: { type: 'string' } },
2379
+ merchant_account_id: { type: ['string', 'null'] },
2380
+ wxpay_account_id: { type: ['string', 'null'] },
2381
+ alipay_account_id: { type: ['string', 'null'] },
2382
+ notification_rules: { type: 'array', items: { $ref: 'NotificationRuleInput' } },
2383
+ daily_repeat_close_rule: { $ref: 'DailyRepeatCloseRuleInput' }
2384
+ },
2385
+ additionalProperties: false
2386
+ },
2387
+ FormUpdateInput: {
2388
+ type: 'object',
2389
+ properties: {
2390
+ name: { type: 'string' },
2391
+ description: { type: ['string', 'null'] },
2392
+ setting: { $ref: 'FormSettingWriteInput' },
2393
+ fields: {
2394
+ type: 'object',
2395
+ properties: {
2396
+ add: { type: 'array', items: { anyOf: [{ $ref: 'FieldInput' }, { $ref: 'TableColumnInput' }] } },
2397
+ remove: { type: 'array', items: { type: 'string' } },
2398
+ update: { type: 'array', items: { $ref: 'FieldUpdateInput' } },
2399
+ update_choices: { type: 'array', items: { $ref: 'ChoiceUpdateInput' } }
2400
+ },
2401
+ additionalProperties: false
2402
+ },
2403
+ field_rules: { $ref: 'FieldRuleOperations' }
2404
+ },
2405
+ additionalProperties: false
2406
+ },
2407
+ FormViewFieldOverrideInput: {
2408
+ type: 'object',
2409
+ required: ['field_api_code'],
2410
+ properties: {
2411
+ field_api_code: { type: 'string' },
2412
+ label: { type: ['string', 'null'] },
2413
+ notes: { type: ['string', 'null'] },
2414
+ private: { type: ['boolean', 'null'] },
2415
+ position: { type: ['integer', 'null'] },
2416
+ validations: { type: 'array', items: { type: 'string' } }
2417
+ },
2418
+ additionalProperties: false
2419
+ },
2420
+ FormViewFilterCondition: {
2421
+ type: 'object',
2422
+ required: ['field', 'operator'],
2423
+ properties: { field: { type: 'string' }, operator: { type: 'string' }, value: {} }
2424
+ },
2425
+ FormViewInput: {
2426
+ type: 'object',
2427
+ properties: {
2428
+ name: { type: 'string', maxLength: 120 },
2429
+ view_type: { type: 'string', enum: ['grid', 'kanban', 'stats', 'form'] },
2430
+ visibility: { type: 'string', enum: ['cooperators', 'personal'] },
2431
+ prefer_columns: { type: 'array', items: { type: 'string' } },
2432
+ kanban_group_by_api_code: { type: 'string' },
2433
+ kanban_card_title_api_code: { type: 'string' },
2434
+ kanban_group_order: { type: 'array', items: { type: 'string' } },
2435
+ kanban_hidden_groups: { type: 'array', items: { type: 'string' } },
2436
+ sort: { type: 'array', items: { $ref: 'FormViewSortRule' } },
2437
+ sorted_columns: {
2438
+ type: 'array',
2439
+ items: {
2440
+ type: 'object',
2441
+ required: ['api_code'],
2442
+ properties: { api_code: { type: 'string' } },
2443
+ additionalProperties: false
2444
+ }
2445
+ },
2446
+ filter: { type: 'array', items: { $ref: 'FormViewFilterCondition' } },
2447
+ title: { type: 'string', maxLength: 120 },
2448
+ description: { type: ['string', 'null'] },
2449
+ published: { type: 'boolean' },
2450
+ field_overrides: { type: 'array', items: { $ref: 'FormViewFieldOverrideInput' } },
2451
+ cid: { type: 'string' }
2452
+ },
2453
+ additionalProperties: false
2454
+ },
2455
+ FormViewSortRule: {
2456
+ type: 'object',
2457
+ required: ['api_code'],
2458
+ properties: { api_code: { type: 'string' }, order: { type: 'string', enum: ['asc', 'desc'] } }
2459
+ },
2460
+ FormWeixinOauthSessionInput: {
2461
+ type: 'object',
2462
+ required: ['code'],
2463
+ properties: { code: { type: 'string' } },
2464
+ additionalProperties: false
2465
+ },
2466
+ FormulaFieldInput: {
2467
+ type: 'object',
2468
+ additionalProperties: false,
2469
+ required: ['type', 'label'],
2470
+ properties: {
2471
+ type: { const: 'FormulaField' },
2472
+ label: { type: 'string' },
2473
+ cid: { type: 'string' },
2474
+ notes: { type: 'string' },
2475
+ private: { type: 'boolean' },
2476
+ required: { type: 'boolean' },
2477
+ position: { type: 'integer', minimum: 0 },
2478
+ formula_display: { type: 'string' },
2479
+ result_display_type: { type: 'string', enum: ['string', 'numeric', 'datetime'] },
2480
+ result_display_as_date: { type: 'boolean' },
2481
+ precision: { type: 'integer', minimum: 0, maximum: 14 },
2482
+ display_precision: { type: 'integer', minimum: 0 },
2483
+ display_as_percentage: { type: 'boolean' },
2484
+ thousands_separator: { type: 'boolean' },
2485
+ currency_symbol: { type: 'string' },
2486
+ currency_symbol_position: { type: 'string', enum: ['prefix', 'suffix'] },
2487
+ icon_type: {
2488
+ type: 'string',
2489
+ enum: ['none', 'formula-2', 'date-2', 'number-2', 'dollar1', 'cny1', 'sum', 'text', 'text2']
2490
+ }
2491
+ },
2492
+ allOf: [
2493
+ {
2494
+ not: {
2495
+ properties: { display_as_percentage: { const: true }, thousands_separator: { const: true } },
2496
+ required: ['display_as_percentage', 'thousands_separator']
2497
+ }
2498
+ }
2499
+ ]
2500
+ },
2501
+ GeoFieldInput: {
2502
+ type: 'object',
2503
+ additionalProperties: false,
2504
+ required: ['type', 'label'],
2505
+ properties: {
2506
+ type: { const: 'GeoField' },
2507
+ label: { type: 'string' },
2508
+ cid: { type: 'string' },
2509
+ notes: { type: 'string' },
2510
+ private: { type: 'boolean' },
2511
+ required: { type: 'boolean' },
2512
+ position: { type: 'integer', minimum: 0 }
2513
+ }
2514
+ },
2515
+ GoodsFieldInput: {
2516
+ type: 'object',
2517
+ additionalProperties: false,
2518
+ required: ['type', 'label'],
2519
+ properties: {
2520
+ type: { const: 'GoodsField' },
2521
+ label: { type: 'string' },
2522
+ cid: { type: 'string' },
2523
+ notes: { type: 'string' },
2524
+ private: { type: 'boolean' },
2525
+ required: { type: 'boolean' },
2526
+ position: { type: 'integer', minimum: 0 },
2527
+ goods_items: { type: 'array', minItems: 1, items: { $ref: 'GoodsItemInput' } },
2528
+ unit: { type: 'string', maxLength: 2 },
2529
+ collapse_on_mobile: { type: 'boolean' },
2530
+ columns_on_mobile: { type: 'integer', minimum: 1 }
2531
+ }
2532
+ },
2533
+ GoodsItemInput: {
2534
+ type: 'object',
2535
+ additionalProperties: false,
2536
+ required: ['name', 'layout'],
2537
+ properties: {
2538
+ name: { type: 'string' },
2539
+ layout: { type: 'string', enum: ['without_images', 'price_only', 'images', 'text_options'] },
2540
+ api_code: { type: 'string' },
2541
+ description: { type: 'string' },
2542
+ position: { type: 'integer', minimum: 0 },
2543
+ hidden: { type: 'boolean' },
2544
+ price: { type: 'number', minimum: 0 },
2545
+ original_price: { type: 'number', minimum: 0 },
2546
+ predefined_number: { type: 'integer', minimum: 0 },
2547
+ fixed_number: { type: 'boolean' },
2548
+ inventory: { type: 'integer', minimum: 0 },
2549
+ inventory_reset: { type: 'boolean' },
2550
+ min_purchase_quantity: { type: 'integer', minimum: 0 },
2551
+ max_purchase_quantity: { type: 'integer', minimum: 0 },
2552
+ dimensions: {
2553
+ type: 'array',
2554
+ minItems: 1,
2555
+ items: {
2556
+ type: 'object',
2557
+ additionalProperties: false,
2558
+ required: ['label', 'options'],
2559
+ properties: {
2560
+ api_code: { type: 'string' },
2561
+ label: { type: 'string' },
2562
+ options: {
2563
+ type: 'array',
2564
+ minItems: 1,
2565
+ items: {
2566
+ type: 'object',
2567
+ additionalProperties: false,
2568
+ required: ['label'],
2569
+ properties: { label: { type: 'string' }, value: { type: 'string' } }
2570
+ }
2571
+ }
2572
+ }
2573
+ }
2574
+ },
2575
+ skus: {
2576
+ type: 'array',
2577
+ minItems: 1,
2578
+ items: {
2579
+ type: 'object',
2580
+ additionalProperties: false,
2581
+ required: ['specification'],
2582
+ properties: {
2583
+ specification: { type: 'object', additionalProperties: { type: 'string' } },
2584
+ price: { type: 'number', minimum: 0 },
2585
+ original_price: { type: 'number', minimum: 0 },
2586
+ inventory: { type: 'integer', minimum: 0 },
2587
+ inventory_reset: { type: 'boolean' },
2588
+ min_purchase_quantity: { type: 'integer', minimum: 0 },
2589
+ max_purchase_quantity: { type: 'integer', minimum: 0 }
2590
+ }
2591
+ }
2592
+ },
2593
+ image_urls: { type: 'array', items: { type: 'string' } },
2594
+ image_base64s: { type: 'array', items: { type: 'string' } }
2595
+ },
2596
+ dependentRequired: { dimensions: ['skus'], skus: ['dimensions'] },
2597
+ allOf: [
2598
+ {
2599
+ if: { properties: { layout: { enum: ['price_only', 'text_options'] } } },
2600
+ then: { required: ['dimensions', 'skus'] }
2601
+ },
2602
+ {
2603
+ if: { properties: { layout: { const: 'images' } } },
2604
+ then: {
2605
+ anyOf: [
2606
+ { required: ['image_urls'], properties: { image_urls: { minItems: 1 } } },
2607
+ { required: ['image_base64s'], properties: { image_base64s: { minItems: 1 } } }
2608
+ ]
2609
+ }
2610
+ }
2611
+ ]
2612
+ },
2613
+ GoodsItemUpdateInput: {
2614
+ type: 'object',
2615
+ additionalProperties: false,
2616
+ properties: {
2617
+ name: { type: 'string' },
2618
+ layout: { type: 'string', enum: ['without_images', 'price_only', 'images', 'text_options'] },
2619
+ api_code: { type: 'string' },
2620
+ description: { type: 'string' },
2621
+ position: { type: 'integer', minimum: 0 },
2622
+ hidden: { type: 'boolean' },
2623
+ price: { type: 'number', minimum: 0 },
2624
+ original_price: { type: 'number', minimum: 0 },
2625
+ predefined_number: { type: 'integer', minimum: 0 },
2626
+ fixed_number: { type: 'boolean' },
2627
+ inventory: { type: 'integer', minimum: 0 },
2628
+ inventory_reset: { type: 'boolean' },
2629
+ min_purchase_quantity: { type: 'integer', minimum: 0 },
2630
+ max_purchase_quantity: { type: 'integer', minimum: 0 },
2631
+ dimensions: {
2632
+ type: 'array',
2633
+ minItems: 1,
2634
+ items: {
2635
+ type: 'object',
2636
+ additionalProperties: false,
2637
+ required: ['label', 'options'],
2638
+ properties: {
2639
+ api_code: { type: 'string' },
2640
+ label: { type: 'string' },
2641
+ options: {
2642
+ type: 'array',
2643
+ minItems: 1,
2644
+ items: {
2645
+ type: 'object',
2646
+ additionalProperties: false,
2647
+ required: ['label'],
2648
+ properties: { label: { type: 'string' }, value: { type: 'string' } }
2649
+ }
2650
+ }
2651
+ }
2652
+ }
2653
+ },
2654
+ skus: {
2655
+ type: 'array',
2656
+ minItems: 1,
2657
+ items: {
2658
+ type: 'object',
2659
+ additionalProperties: false,
2660
+ required: ['specification'],
2661
+ properties: {
2662
+ specification: { type: 'object', additionalProperties: { type: 'string' } },
2663
+ price: { type: 'number', minimum: 0 },
2664
+ original_price: { type: 'number', minimum: 0 },
2665
+ inventory: { type: 'integer', minimum: 0 },
2666
+ inventory_reset: { type: 'boolean' },
2667
+ min_purchase_quantity: { type: 'integer', minimum: 0 },
2668
+ max_purchase_quantity: { type: 'integer', minimum: 0 }
2669
+ }
2670
+ }
2671
+ },
2672
+ image_urls: { type: 'array', items: { type: 'string' } },
2673
+ image_base64s: { type: 'array', items: { type: 'string' } }
2674
+ },
2675
+ dependentRequired: { dimensions: ['skus'], skus: ['dimensions'] },
2676
+ if: { not: { required: ['api_code'] } },
2677
+ then: {
2678
+ required: ['name', 'layout'],
2679
+ allOf: [
2680
+ {
2681
+ if: { properties: { layout: { enum: ['price_only', 'text_options'] } } },
2682
+ then: { required: ['dimensions', 'skus'] }
2683
+ },
2684
+ {
2685
+ if: { properties: { layout: { const: 'images' } } },
2686
+ then: {
2687
+ anyOf: [
2688
+ { required: ['image_urls'], properties: { image_urls: { minItems: 1 } } },
2689
+ { required: ['image_base64s'], properties: { image_base64s: { minItems: 1 } } }
2690
+ ]
2691
+ }
2692
+ }
2693
+ ]
2694
+ }
2695
+ },
2696
+ GradeInput: {
2697
+ type: 'object',
2698
+ additionalProperties: false,
2699
+ required: ['type', 'label'],
2700
+ properties: {
2701
+ type: { const: 'Grade' },
2702
+ label: { type: 'string' },
2703
+ cid: { type: 'string' },
2704
+ notes: { type: 'string' },
2705
+ private: { type: 'boolean' },
2706
+ required: { type: 'boolean' },
2707
+ position: { type: 'integer', minimum: 0 },
2708
+ other_choice_required: { type: 'boolean' },
2709
+ choices: { type: 'array', minItems: 1, items: { $ref: 'ChoiceInput' } },
2710
+ calculable: { type: 'boolean' },
2711
+ choices_layout: { type: 'string' },
2712
+ random_choices: { type: 'boolean' }
2713
+ },
2714
+ allOf: [
2715
+ {
2716
+ if: { properties: { calculable: { const: true } }, required: ['calculable'] },
2717
+ then: { properties: { choices: { items: { required: ['operand_value'] } } } }
2718
+ }
2719
+ ]
2720
+ },
2721
+ IdCardFieldInput: {
2722
+ type: 'object',
2723
+ additionalProperties: false,
2724
+ required: ['type', 'label'],
2725
+ properties: {
2726
+ type: { const: 'IdCardField' },
2727
+ label: { type: 'string' },
2728
+ cid: { type: 'string' },
2729
+ notes: { type: 'string' },
2730
+ private: { type: 'boolean' },
2731
+ required: { type: 'boolean' },
2732
+ position: { type: 'integer', minimum: 0 },
2733
+ unique: { type: 'boolean' }
2734
+ }
2735
+ },
2736
+ ImageCheckBoxInput: {
2737
+ type: 'object',
2738
+ additionalProperties: false,
2739
+ required: ['type', 'label'],
2740
+ properties: {
2741
+ type: { const: 'ImageCheckBox' },
2742
+ label: { type: 'string' },
2743
+ cid: { type: 'string' },
2744
+ notes: { type: 'string' },
2745
+ private: { type: 'boolean' },
2746
+ required: { type: 'boolean' },
2747
+ position: { type: 'integer', minimum: 0 },
2748
+ choices: { type: 'array', minItems: 1, items: { $ref: 'ImageChoiceInput' } },
2749
+ calculable: { type: 'boolean' },
2750
+ choices_layout: { type: 'string' },
2751
+ random_choices: { type: 'boolean' },
2752
+ minimum_length: { type: 'integer', minimum: 0 },
2753
+ maximum_length: { type: 'integer', minimum: 0 }
2754
+ },
2755
+ allOf: [
2756
+ {
2757
+ if: { properties: { calculable: { const: true } }, required: ['calculable'] },
2758
+ then: { properties: { choices: { items: { required: ['operand_value'] } } } }
2759
+ }
2760
+ ]
2761
+ },
2762
+ ImageChoiceInput: {
2763
+ type: 'object',
2764
+ additionalProperties: false,
2765
+ allOf: [
2766
+ { anyOf: [{ required: ['value'] }, { required: ['name'] }] },
2767
+ { anyOf: [{ required: ['image_url'] }, { required: ['image_base64'] }, { required: ['image_upload_token'] }] }
2768
+ ],
2769
+ properties: {
2770
+ value: { type: 'string' },
2771
+ name: { type: 'string' },
2772
+ api_code: { type: 'string' },
2773
+ operand_value: { type: 'number' },
2774
+ selected: { type: 'boolean' },
2775
+ image_url: { type: 'string' },
2776
+ image_base64: { type: 'string' },
2777
+ image_upload_token: { type: 'string' }
2778
+ }
2779
+ },
2780
+ ImageMultiSelectInput: {
2781
+ type: 'object',
2782
+ additionalProperties: false,
2783
+ required: ['type', 'label', 'choices', 'answers'],
2784
+ properties: {
2785
+ type: { const: 'ImageMultiSelect' },
2786
+ label: { type: 'string' },
2787
+ cid: { type: 'string' },
2788
+ notes: { type: 'string' },
2789
+ private: { type: 'boolean' },
2790
+ required: { type: 'boolean' },
2791
+ position: { type: 'integer', minimum: 0 },
2792
+ choices: { type: 'array', minItems: 1, items: { $ref: 'ImageChoiceInput' } },
2793
+ calculable: { type: 'boolean' },
2794
+ choices_layout: { type: 'string' },
2795
+ random_choices: { type: 'boolean' },
2796
+ minimum_length: { type: 'integer', minimum: 0 },
2797
+ maximum_length: { type: 'integer', minimum: 0 },
2798
+ answers: { type: 'array', minItems: 1, items: { $ref: 'AnswerInput' } },
2799
+ answer_setting_mode: { type: 'string', enum: ['absolute', 'partial_absolute', 'relative'] },
2800
+ answer_explanation: { type: 'string' }
2801
+ },
2802
+ allOf: [
2803
+ {
2804
+ if: { properties: { calculable: { const: true } }, required: ['calculable'] },
2805
+ then: { properties: { choices: { items: { required: ['operand_value'] } } } }
2806
+ },
2807
+ {
2808
+ if: {
2809
+ anyOf: [
2810
+ { not: { required: ['answer_setting_mode'] } },
2811
+ { properties: { answer_setting_mode: { const: 'absolute' } } }
2812
+ ]
2813
+ },
2814
+ then: { properties: { answers: { maxItems: 1 } } }
2815
+ },
2816
+ {
2817
+ if: {
2818
+ anyOf: [
2819
+ { not: { required: ['answer_setting_mode'] } },
2820
+ { properties: { answer_setting_mode: { const: 'absolute' } } }
2821
+ ]
2822
+ },
2823
+ then: {
2824
+ properties: {
2825
+ answers: { items: { properties: { value: { type: 'array', items: { type: 'string' }, minItems: 1 } } } }
2826
+ }
2827
+ }
2828
+ }
2829
+ ]
2830
+ },
2831
+ ImageRadioButtonInput: {
2832
+ type: 'object',
2833
+ additionalProperties: false,
2834
+ required: ['type', 'label'],
2835
+ properties: {
2836
+ type: { const: 'ImageRadioButton' },
2837
+ label: { type: 'string' },
2838
+ cid: { type: 'string' },
2839
+ notes: { type: 'string' },
2840
+ private: { type: 'boolean' },
2841
+ required: { type: 'boolean' },
2842
+ position: { type: 'integer', minimum: 0 },
2843
+ choices: { type: 'array', minItems: 1, items: { $ref: 'ImageChoiceInput' } },
2844
+ calculable: { type: 'boolean' },
2845
+ choices_layout: { type: 'string' },
2846
+ random_choices: { type: 'boolean' }
2847
+ },
2848
+ allOf: [
2849
+ {
2850
+ if: { properties: { calculable: { const: true } }, required: ['calculable'] },
2851
+ then: { properties: { choices: { items: { required: ['operand_value'] } } } }
2852
+ }
2853
+ ]
2854
+ },
2855
+ ImageSingleSelectInput: {
2856
+ type: 'object',
2857
+ additionalProperties: false,
2858
+ required: ['type', 'label', 'choices', 'answers'],
2859
+ properties: {
2860
+ type: { const: 'ImageSingleSelect' },
2861
+ label: { type: 'string' },
2862
+ cid: { type: 'string' },
2863
+ notes: { type: 'string' },
2864
+ private: { type: 'boolean' },
2865
+ required: { type: 'boolean' },
2866
+ position: { type: 'integer', minimum: 0 },
2867
+ choices: { type: 'array', minItems: 1, items: { $ref: 'ImageChoiceInput' } },
2868
+ calculable: { type: 'boolean' },
2869
+ choices_layout: { type: 'string' },
2870
+ random_choices: { type: 'boolean' },
2871
+ answers: { type: 'array', minItems: 1, items: { $ref: 'AnswerInput' } },
2872
+ answer_setting_mode: { type: 'string', enum: ['absolute', 'relative'] },
2873
+ answer_explanation: { type: 'string' }
2874
+ },
2875
+ allOf: [
2876
+ {
2877
+ if: { properties: { calculable: { const: true } }, required: ['calculable'] },
2878
+ then: { properties: { choices: { items: { required: ['operand_value'] } } } }
2879
+ },
2880
+ {
2881
+ if: {
2882
+ anyOf: [
2883
+ { not: { required: ['answer_setting_mode'] } },
2884
+ { properties: { answer_setting_mode: { const: 'absolute' } } }
2885
+ ]
2886
+ },
2887
+ then: { properties: { answers: { maxItems: 1 } } }
2888
+ }
2889
+ ]
2890
+ },
2891
+ LikertFieldInput: {
2892
+ type: 'object',
2893
+ additionalProperties: false,
2894
+ required: ['type', 'label'],
2895
+ properties: {
2896
+ type: { const: 'LikertField' },
2897
+ label: { type: 'string' },
2898
+ cid: { type: 'string' },
2899
+ notes: { type: 'string' },
2900
+ private: { type: 'boolean' },
2901
+ required: { type: 'boolean' },
2902
+ position: { type: 'integer', minimum: 0 },
2903
+ choices: { type: 'array', minItems: 1, items: { $ref: 'ChoiceInput' } },
2904
+ statements: { type: 'array', minItems: 1, items: { $ref: 'StatementInput' } },
2905
+ horizontal_on_mobile: { type: 'boolean' },
2906
+ likert_choice_style: { type: 'string', enum: ['single', 'multiple'] },
2907
+ minimum_length: { type: 'integer', minimum: 0 },
2908
+ maximum_length: { type: 'integer', minimum: 0 },
2909
+ calculable: { type: 'boolean' }
2910
+ },
2911
+ allOf: [
2912
+ {
2913
+ if: { not: { properties: { likert_choice_style: { const: 'multiple' } }, required: ['likert_choice_style'] } },
2914
+ then: { not: { anyOf: [{ required: ['minimum_length'] }, { required: ['maximum_length'] }] } }
2915
+ },
2916
+ {
2917
+ if: { properties: { calculable: { const: true } }, required: ['calculable'] },
2918
+ then: { properties: { choices: { items: { required: ['operand_value'] } } } }
2919
+ }
2920
+ ]
2921
+ },
2922
+ LinkFieldInput: {
2923
+ type: 'object',
2924
+ additionalProperties: false,
2925
+ required: ['type', 'label'],
2926
+ properties: {
2927
+ type: { const: 'LinkField' },
2928
+ label: { type: 'string' },
2929
+ cid: { type: 'string' },
2930
+ notes: { type: 'string' },
2931
+ private: { type: 'boolean' },
2932
+ required: { type: 'boolean' },
2933
+ position: { type: 'integer', minimum: 0 },
2934
+ unique: { type: 'boolean' },
2935
+ predefined_value: { type: 'string' },
2936
+ placeholder: { type: 'string' }
2937
+ }
2938
+ },
2939
+ MatrixFieldInput: {
2940
+ type: 'object',
2941
+ additionalProperties: false,
2942
+ required: ['type', 'label'],
2943
+ properties: {
2944
+ type: { const: 'MatrixField' },
2945
+ label: { type: 'string' },
2946
+ cid: { type: 'string' },
2947
+ notes: { type: 'string' },
2948
+ private: { type: 'boolean' },
2949
+ required: { type: 'boolean' },
2950
+ position: { type: 'integer', minimum: 0 },
2951
+ dimensions: { type: 'array', minItems: 1, items: { $ref: 'DimensionInput' } },
2952
+ statements: { type: 'array', minItems: 1, items: { $ref: 'StatementInput' } },
2953
+ horizontal_on_mobile: { type: 'boolean' },
2954
+ advanced_feature: { type: 'boolean' }
2955
+ }
2956
+ },
2957
+ MatrixScaleFieldInput: {
2958
+ type: 'object',
2959
+ additionalProperties: false,
2960
+ required: ['type', 'label'],
2961
+ properties: {
2962
+ type: { const: 'MatrixScaleField' },
2963
+ label: { type: 'string' },
2964
+ cid: { type: 'string' },
2965
+ notes: { type: 'string' },
2966
+ private: { type: 'boolean' },
2967
+ required: { type: 'boolean' },
2968
+ position: { type: 'integer', minimum: 0 },
2969
+ rating_max: { type: 'integer', minimum: 1 },
2970
+ statements: { type: 'array', minItems: 1, items: { $ref: 'StatementInput' } },
2971
+ horizontal_on_mobile: { type: 'boolean' }
2972
+ }
2973
+ },
2974
+ MobileFieldInput: {
2975
+ type: 'object',
2976
+ additionalProperties: false,
2977
+ required: ['type', 'label'],
2978
+ properties: {
2979
+ type: { const: 'MobileField' },
2980
+ label: { type: 'string' },
2981
+ cid: { type: 'string' },
2982
+ notes: { type: 'string' },
2983
+ private: { type: 'boolean' },
2984
+ required: { type: 'boolean' },
2985
+ position: { type: 'integer', minimum: 0 },
2986
+ unique: { type: 'boolean' },
2987
+ predefined_value: { type: 'string' },
2988
+ placeholder: { type: 'string' },
2989
+ sms_verification: { type: 'boolean' }
2990
+ }
2991
+ },
2992
+ MultiSelectInput: {
2993
+ type: 'object',
2994
+ additionalProperties: false,
2995
+ required: ['type', 'label', 'choices', 'answers'],
2996
+ properties: {
2997
+ type: { const: 'MultiSelect' },
2998
+ label: { type: 'string' },
2999
+ cid: { type: 'string' },
3000
+ notes: { type: 'string' },
3001
+ private: { type: 'boolean' },
3002
+ required: { type: 'boolean' },
3003
+ position: { type: 'integer', minimum: 0 },
3004
+ other_choice_required: { type: 'boolean' },
3005
+ choices: { type: 'array', minItems: 1, items: { $ref: 'ChoiceInput' } },
3006
+ calculable: { type: 'boolean' },
3007
+ choices_layout: { type: 'string' },
3008
+ random_choices: { type: 'boolean' },
3009
+ minimum_length: { type: 'integer', minimum: 0 },
3010
+ maximum_length: { type: 'integer', minimum: 0 },
3011
+ answers: { type: 'array', minItems: 1, items: { $ref: 'AnswerInput' } },
3012
+ answer_setting_mode: { type: 'string', enum: ['absolute', 'partial_absolute', 'relative'] },
3013
+ answer_explanation: { type: 'string' }
3014
+ },
3015
+ allOf: [
3016
+ {
3017
+ if: { properties: { calculable: { const: true } }, required: ['calculable'] },
3018
+ then: { properties: { choices: { items: { required: ['operand_value'] } } } }
3019
+ },
3020
+ {
3021
+ if: {
3022
+ anyOf: [
3023
+ { not: { required: ['answer_setting_mode'] } },
3024
+ { properties: { answer_setting_mode: { const: 'absolute' } } }
3025
+ ]
3026
+ },
3027
+ then: { properties: { answers: { maxItems: 1 } } }
3028
+ },
3029
+ {
3030
+ if: {
3031
+ anyOf: [
3032
+ { not: { required: ['answer_setting_mode'] } },
3033
+ { properties: { answer_setting_mode: { const: 'absolute' } } }
3034
+ ]
3035
+ },
3036
+ then: {
3037
+ properties: {
3038
+ answers: { items: { properties: { value: { type: 'array', items: { type: 'string' }, minItems: 1 } } } }
3039
+ }
3040
+ }
3041
+ }
3042
+ ]
3043
+ },
3044
+ NameFieldInput: {
3045
+ type: 'object',
3046
+ additionalProperties: false,
3047
+ required: ['type', 'label'],
3048
+ properties: {
3049
+ type: { const: 'NameField' },
3050
+ label: { type: 'string' },
3051
+ cid: { type: 'string' },
3052
+ notes: { type: 'string' },
3053
+ private: { type: 'boolean' },
3054
+ required: { type: 'boolean' },
3055
+ position: { type: 'integer', minimum: 0 },
3056
+ unique: { type: 'boolean' }
3057
+ }
3058
+ },
3059
+ NotificationRuleInput: {
3060
+ type: 'object',
3061
+ required: ['approach', 'url'],
3062
+ properties: {
3063
+ approach: { type: 'string', enum: ['WXWORK', 'DING_TALK', 'WEBHOOK'] },
3064
+ url: { type: 'string' },
3065
+ content: { type: 'string' },
3066
+ trigger_scope: { type: 'string' },
3067
+ mentioned_mobile_list: { type: 'array', items: { type: 'string' } },
3068
+ enabled: { type: 'boolean' }
3069
+ },
3070
+ additionalProperties: false
3071
+ },
3072
+ NpsFieldInput: {
3073
+ type: 'object',
3074
+ additionalProperties: false,
3075
+ required: ['type', 'label'],
3076
+ properties: {
3077
+ type: { const: 'NpsField' },
3078
+ label: { type: 'string' },
3079
+ cid: { type: 'string' },
3080
+ notes: { type: 'string' },
3081
+ private: { type: 'boolean' },
3082
+ required: { type: 'boolean' },
3083
+ position: { type: 'integer', minimum: 0 },
3084
+ minimum_ratings_display_text: { type: 'string' },
3085
+ maximum_ratings_display_text: { type: 'string' }
3086
+ }
3087
+ },
3088
+ NpsInput: {
3089
+ type: 'object',
3090
+ additionalProperties: false,
3091
+ required: ['type', 'label', 'answers'],
3092
+ properties: {
3093
+ type: { const: 'Nps' },
3094
+ label: { type: 'string' },
3095
+ cid: { type: 'string' },
3096
+ notes: { type: 'string' },
3097
+ private: { type: 'boolean' },
3098
+ required: { type: 'boolean' },
3099
+ position: { type: 'integer', minimum: 0 },
3100
+ minimum_ratings_display_text: { type: 'string' },
3101
+ maximum_ratings_display_text: { type: 'string' },
3102
+ answers: { type: 'array', minItems: 1, items: { $ref: 'AnswerInput' } },
3103
+ answer_setting_mode: { type: 'string', enum: ['absolute', 'relative'] },
3104
+ answer_explanation: { type: 'string' }
3105
+ },
3106
+ allOf: [
3107
+ {
3108
+ if: {
3109
+ anyOf: [
3110
+ { not: { required: ['answer_setting_mode'] } },
3111
+ { properties: { answer_setting_mode: { const: 'absolute' } } }
3112
+ ]
3113
+ },
3114
+ then: { properties: { answers: { maxItems: 1 } } }
3115
+ }
3116
+ ]
3117
+ },
3118
+ NumberFieldInput: {
3119
+ type: 'object',
3120
+ additionalProperties: false,
3121
+ required: ['type', 'label'],
3122
+ properties: {
3123
+ type: { const: 'NumberField' },
3124
+ label: { type: 'string' },
3125
+ cid: { type: 'string' },
3126
+ notes: { type: 'string' },
3127
+ private: { type: 'boolean' },
3128
+ required: { type: 'boolean' },
3129
+ position: { type: 'integer', minimum: 0 },
3130
+ unique: { type: 'boolean' },
3131
+ predefined_value: { type: ['number', 'string'] },
3132
+ placeholder: { type: 'string' },
3133
+ range_min: { type: 'number' },
3134
+ range_max: { type: 'number' },
3135
+ precision: { type: 'integer', minimum: 0, maximum: 14 },
3136
+ display_precision: { type: 'integer', minimum: 0 },
3137
+ display_as_percentage: { type: 'boolean' },
3138
+ thousands_separator: { type: 'boolean' },
3139
+ currency_symbol: { type: 'string' },
3140
+ currency_symbol_position: { type: 'string', enum: ['prefix', 'suffix'] },
3141
+ icon_type: { type: 'string', enum: ['none', 'number-2', 'dollar1', 'cny1'] }
3142
+ },
3143
+ allOf: [
3144
+ {
3145
+ not: {
3146
+ properties: { display_as_percentage: { const: true }, thousands_separator: { const: true } },
3147
+ required: ['display_as_percentage', 'thousands_separator']
3148
+ }
3149
+ }
3150
+ ]
3151
+ },
3152
+ OpensearchDisplayFieldRule: {
3153
+ type: 'object',
3154
+ required: ['field_api_code'],
3155
+ properties: {
3156
+ field_api_code: { type: 'string' },
3157
+ field_label: { type: ['string', 'null'] },
3158
+ editable: { type: 'boolean' },
3159
+ protected: { type: 'boolean' },
3160
+ highlight: {
3161
+ type: ['object', 'null'],
3162
+ properties: { color: { type: ['string', 'null'] }, position: { type: 'integer' } }
3163
+ }
3164
+ }
3165
+ },
3166
+ OpensearchQueryInput: {
3167
+ type: 'object',
3168
+ properties: {
3169
+ form_token: { type: 'string' },
3170
+ name: { type: 'string' },
3171
+ description: { type: 'string' },
3172
+ enabled: { type: 'boolean' },
3173
+ search_field_rules: { type: 'array', minItems: 1, items: { $ref: 'OpensearchSearchFieldRule' } },
3174
+ display_field_rules: { type: 'array', minItems: 1, items: { $ref: 'OpensearchDisplayFieldRule' } },
3175
+ search_button: {
3176
+ type: 'object',
3177
+ properties: { text: { type: 'string' }, color: { type: 'string' } },
3178
+ additionalProperties: false
3179
+ },
3180
+ messages: {
3181
+ type: 'object',
3182
+ properties: { has_result: { type: 'string' }, no_result: { type: 'string' } },
3183
+ additionalProperties: false
3184
+ },
3185
+ allow_to_export_results: { type: 'boolean' },
3186
+ header: {
3187
+ type: 'object',
3188
+ properties: {
3189
+ background_image: {
3190
+ type: 'object',
3191
+ properties: {
3192
+ attachment_id: { type: 'string' },
3193
+ image_upload_token: { type: 'string' },
3194
+ position_x: { type: 'number' },
3195
+ position_y: { type: 'number' }
3196
+ },
3197
+ additionalProperties: false
3198
+ }
3199
+ },
3200
+ additionalProperties: false
3201
+ },
3202
+ extra_configurable_setting: {
3203
+ type: 'object',
3204
+ properties: { show_exam_correct_answer: { type: 'boolean' }, show_exam_explanation: { type: 'boolean' } },
3205
+ additionalProperties: false
3206
+ },
3207
+ scope_conditions: {
3208
+ type: 'array',
3209
+ items: {
3210
+ type: 'object',
3211
+ properties: {
3212
+ trigger: { type: 'string' },
3213
+ operator: { type: 'string' },
3214
+ value: {},
3215
+ group_index: { type: 'integer' },
3216
+ scope_attr: { type: 'string' }
3217
+ },
3218
+ additionalProperties: false
3219
+ }
3220
+ }
3221
+ },
3222
+ additionalProperties: false
3223
+ },
3224
+ OpensearchSearchFieldRule: {
3225
+ type: 'object',
3226
+ required: ['search_field_settings'],
3227
+ properties: {
3228
+ operand: { type: 'string', enum: ['and', 'or'] },
3229
+ search_field_settings: { type: 'array', minItems: 1, items: { $ref: 'OpensearchSearchFieldSetting' } }
3230
+ }
3231
+ },
3232
+ OpensearchSearchFieldSetting: {
3233
+ type: 'object',
3234
+ required: ['field_api_code'],
3235
+ properties: {
3236
+ field_api_code: { type: 'string' },
3237
+ field_label: { type: ['string', 'null'] },
3238
+ fuzzy: { type: 'boolean' },
3239
+ sms_verification: { type: 'boolean' }
3240
+ }
3241
+ },
3242
+ PageBreakInput: {
3243
+ type: 'object',
3244
+ additionalProperties: false,
3245
+ required: ['type', 'label'],
3246
+ properties: {
3247
+ type: { const: 'PageBreak' },
3248
+ label: { type: 'string' },
3249
+ cid: { type: 'string' },
3250
+ notes: { type: 'string' },
3251
+ private: { type: 'boolean' },
3252
+ required: { type: 'boolean' },
3253
+ position: { type: 'integer', minimum: 0 },
3254
+ disable_previous_page: { type: 'boolean' },
3255
+ previous_page_text: { type: 'string' },
3256
+ next_page_text: { type: 'string' },
3257
+ count_down: { type: 'integer', minimum: 0 }
3258
+ }
3259
+ },
3260
+ PredefinedChoicesSetInput: {
3261
+ type: 'object',
3262
+ required: ['label', 'choices'],
3263
+ properties: { label: { type: 'string' }, choices: { type: 'array', items: { type: 'string' } } },
3264
+ additionalProperties: false
3265
+ },
3266
+ RadioButtonInput: {
3267
+ type: 'object',
3268
+ additionalProperties: false,
3269
+ required: ['type', 'label'],
3270
+ properties: {
3271
+ type: { const: 'RadioButton' },
3272
+ label: { type: 'string' },
3273
+ cid: { type: 'string' },
3274
+ notes: { type: 'string' },
3275
+ private: { type: 'boolean' },
3276
+ required: { type: 'boolean' },
3277
+ position: { type: 'integer', minimum: 0 },
3278
+ other_choice_required: { type: 'boolean' },
3279
+ choices: { type: 'array', minItems: 1, items: { $ref: 'ChoiceInput' } },
3280
+ calculable: { type: 'boolean' },
3281
+ choices_layout: { type: 'string' },
3282
+ random_choices: { type: 'boolean' }
3283
+ },
3284
+ allOf: [
3285
+ {
3286
+ if: { properties: { calculable: { const: true } }, required: ['calculable'] },
3287
+ then: { properties: { choices: { items: { required: ['operand_value'] } } } }
3288
+ }
3289
+ ]
3290
+ },
3291
+ RatingFieldInput: {
3292
+ type: 'object',
3293
+ additionalProperties: false,
3294
+ required: ['type', 'label'],
3295
+ properties: {
3296
+ type: { const: 'RatingField' },
3297
+ label: { type: 'string' },
3298
+ cid: { type: 'string' },
3299
+ notes: { type: 'string' },
3300
+ private: { type: 'boolean' },
3301
+ required: { type: 'boolean' },
3302
+ position: { type: 'integer', minimum: 0 },
3303
+ rating_max: { type: 'integer', minimum: 1 }
3304
+ }
3305
+ },
3306
+ RatingInput: {
3307
+ type: 'object',
3308
+ additionalProperties: false,
3309
+ required: ['type', 'label', 'answers'],
3310
+ properties: {
3311
+ type: { const: 'Rating' },
3312
+ label: { type: 'string' },
3313
+ cid: { type: 'string' },
3314
+ notes: { type: 'string' },
3315
+ private: { type: 'boolean' },
3316
+ required: { type: 'boolean' },
3317
+ position: { type: 'integer', minimum: 0 },
3318
+ rating_max: { type: 'integer', minimum: 1 },
3319
+ answers: { type: 'array', minItems: 1, items: { $ref: 'AnswerInput' } },
3320
+ answer_setting_mode: { type: 'string', enum: ['absolute', 'relative'] },
3321
+ answer_explanation: { type: 'string' }
3322
+ },
3323
+ allOf: [
3324
+ {
3325
+ if: {
3326
+ anyOf: [
3327
+ { not: { required: ['answer_setting_mode'] } },
3328
+ { properties: { answer_setting_mode: { const: 'absolute' } } }
3329
+ ]
3330
+ },
3331
+ then: { properties: { answers: { maxItems: 1 } } }
3332
+ }
3333
+ ]
3334
+ },
3335
+ RelationFieldInput: {
3336
+ type: 'object',
3337
+ additionalProperties: false,
3338
+ required: ['type', 'label'],
3339
+ properties: {
3340
+ type: { const: 'RelationField' },
3341
+ label: { type: 'string' },
3342
+ cid: { type: 'string' },
3343
+ notes: { type: 'string' },
3344
+ private: { type: 'boolean' },
3345
+ required: { type: 'boolean' },
3346
+ position: { type: 'integer', minimum: 0 },
3347
+ related_form_token: { type: 'string' },
3348
+ paired: { type: 'boolean' },
3349
+ related_label: { type: 'string' }
3350
+ }
3351
+ },
3352
+ ReservationByDayQuotaInput: {
3353
+ type: 'object',
3354
+ additionalProperties: false,
3355
+ required: ['type'],
3356
+ properties: {
3357
+ type: { const: 'by_day_repeat_weekly' },
3358
+ available_days_of_week: {
3359
+ type: 'array',
3360
+ items: { type: 'string', enum: ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'] }
3361
+ },
3362
+ show_left_quota: { type: 'boolean' },
3363
+ start_time_offset: {
3364
+ type: 'object',
3365
+ additionalProperties: false,
3366
+ properties: { offset_number: { type: 'integer', minimum: 0 }, unit: { type: 'string', enum: ['day', 'hour'] } }
3367
+ },
3368
+ end_time_offset: {
3369
+ type: 'object',
3370
+ additionalProperties: false,
3371
+ properties: { offset_number: { type: 'integer', minimum: 0 }, unit: { type: 'string', enum: ['day', 'hour'] } }
3372
+ },
3373
+ daily_time_range_quotas: {
3374
+ type: 'array',
3375
+ items: {
3376
+ type: 'object',
3377
+ additionalProperties: false,
3378
+ properties: {
3379
+ for_wday: {
3380
+ type: 'string',
3381
+ enum: ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']
3382
+ },
3383
+ quota: { type: 'integer', minimum: 0 },
3384
+ price: { type: 'number', minimum: 0 },
3385
+ position: { type: 'integer', minimum: 0 },
3386
+ daily_time_range_token: { type: 'string' }
3387
+ }
3388
+ }
3389
+ },
3390
+ non_reservable_rules: {
3391
+ type: 'array',
3392
+ items: {
3393
+ type: 'object',
3394
+ additionalProperties: false,
3395
+ properties: { start_time: { type: 'string' }, end_time: { type: 'string' } }
3396
+ }
3397
+ }
3398
+ }
3399
+ },
3400
+ ReservationByTimeRangeQuotaInput: {
3401
+ type: 'object',
3402
+ additionalProperties: false,
3403
+ required: ['type'],
3404
+ properties: {
3405
+ type: { const: 'by_time_range_repeat_daily' },
3406
+ available_days_of_week: {
3407
+ type: 'array',
3408
+ items: { type: 'string', enum: ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'] }
3409
+ },
3410
+ show_left_quota: { type: 'boolean' },
3411
+ start_time_offset: {
3412
+ type: 'object',
3413
+ additionalProperties: false,
3414
+ properties: { offset_number: { type: 'integer', minimum: 0 }, unit: { type: 'string', enum: ['day', 'hour'] } }
3415
+ },
3416
+ end_time_offset: {
3417
+ type: 'object',
3418
+ additionalProperties: false,
3419
+ properties: { offset_number: { type: 'integer', minimum: 0 }, unit: { type: 'string', enum: ['day', 'hour'] } }
3420
+ },
3421
+ daily_time_range_quotas: {
3422
+ type: 'array',
3423
+ items: {
3424
+ type: 'object',
3425
+ additionalProperties: false,
3426
+ required: ['start_time', 'end_time'],
3427
+ properties: {
3428
+ for_wday: {
3429
+ type: 'string',
3430
+ enum: ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']
3431
+ },
3432
+ quota: { type: 'integer', minimum: 0 },
3433
+ price: { type: 'number', minimum: 0 },
3434
+ position: { type: 'integer', minimum: 0 },
3435
+ daily_time_range_token: { type: 'string' },
3436
+ start_time: {
3437
+ type: 'object',
3438
+ additionalProperties: false,
3439
+ properties: {
3440
+ hour: { type: 'integer', minimum: 0, maximum: 23 },
3441
+ minute: { type: 'integer', minimum: 0, maximum: 59 }
3442
+ }
3443
+ },
3444
+ end_time: {
3445
+ type: 'object',
3446
+ additionalProperties: false,
3447
+ properties: {
3448
+ hour: { type: 'integer', minimum: 0, maximum: 23 },
3449
+ minute: { type: 'integer', minimum: 0, maximum: 59 }
3450
+ }
3451
+ }
3452
+ }
3453
+ }
3454
+ },
3455
+ non_reservable_rules: {
3456
+ type: 'array',
3457
+ items: {
3458
+ type: 'object',
3459
+ additionalProperties: false,
3460
+ properties: { start_time: { type: 'string' }, end_time: { type: 'string' } }
3461
+ }
3462
+ },
3463
+ time_range_mode: { type: 'string', enum: ['same_by_wday', 'different_by_wday'] }
3464
+ },
3465
+ if: { properties: { time_range_mode: { const: 'different_by_wday' } }, required: ['time_range_mode'] },
3466
+ then: { properties: { daily_time_range_quotas: { items: { required: ['for_wday'] } } } }
3467
+ },
3468
+ ReservationFieldInput: {
3469
+ type: 'object',
3470
+ additionalProperties: false,
3471
+ required: ['type', 'label'],
3472
+ properties: {
3473
+ type: { const: 'ReservationField' },
3474
+ label: { type: 'string' },
3475
+ cid: { type: 'string' },
3476
+ notes: { type: 'string' },
3477
+ private: { type: 'boolean' },
3478
+ required: { type: 'boolean' },
3479
+ position: { type: 'integer', minimum: 0 },
3480
+ reservation_items: { type: 'array', minItems: 1, items: { $ref: 'ReservationItemInput' } },
3481
+ allow_multiple_items: { type: 'boolean' },
3482
+ item_allow_multiple_reservations: { type: 'boolean' },
3483
+ allow_multiple_number: { type: 'boolean' },
3484
+ use_daily_time_range: { type: 'boolean' }
3485
+ }
3486
+ },
3487
+ ReservationItemInput: {
3488
+ type: 'object',
3489
+ additionalProperties: false,
3490
+ required: ['name'],
3491
+ properties: {
3492
+ name: { type: 'string' },
3493
+ api_code: { type: 'string' },
3494
+ description: { type: 'string' },
3495
+ position: { type: 'integer', minimum: 0 },
3496
+ hidden: { type: 'boolean' },
3497
+ selected: { type: 'boolean' },
3498
+ payable: { type: 'boolean' },
3499
+ start_date: { type: 'string' },
3500
+ end_date: { type: 'string' },
3501
+ quota_setting: {
3502
+ type: 'object',
3503
+ required: ['type'],
3504
+ properties: { type: { type: 'string', enum: ['by_day_repeat_weekly', 'by_time_range_repeat_daily'] } },
3505
+ oneOf: [{ $ref: 'ReservationByDayQuotaInput' }, { $ref: 'ReservationByTimeRangeQuotaInput' }]
3506
+ }
3507
+ }
3508
+ },
3509
+ SectionBreakInput: {
3510
+ type: 'object',
3511
+ additionalProperties: false,
3512
+ required: ['type', 'label'],
3513
+ properties: {
3514
+ type: { const: 'SectionBreak' },
3515
+ label: { type: 'string' },
3516
+ cid: { type: 'string' },
3517
+ notes: { type: 'string' },
3518
+ private: { type: 'boolean' },
3519
+ required: { type: 'boolean' },
3520
+ position: { type: 'integer', minimum: 0 },
3521
+ show_split_line: { type: 'boolean' },
3522
+ show_part_description: { type: 'boolean' }
3523
+ }
3524
+ },
3525
+ ShortAnswerInput: {
3526
+ type: 'object',
3527
+ additionalProperties: false,
3528
+ required: ['type', 'label', 'answers'],
3529
+ properties: {
3530
+ type: { const: 'ShortAnswer' },
3531
+ label: { type: 'string' },
3532
+ cid: { type: 'string' },
3533
+ notes: { type: 'string' },
3534
+ private: { type: 'boolean' },
3535
+ required: { type: 'boolean' },
3536
+ position: { type: 'integer', minimum: 0 },
3537
+ unique: { type: 'boolean' },
3538
+ predefined_value: { type: 'string' },
3539
+ placeholder: { type: 'string' },
3540
+ answers: { type: 'array', minItems: 1, items: { $ref: 'AnswerInput' } },
3541
+ answer_setting_mode: { type: 'string', enum: ['absolute', 'relative'] },
3542
+ answer_explanation: { type: 'string' }
3543
+ },
3544
+ allOf: [
3545
+ {
3546
+ if: {
3547
+ anyOf: [
3548
+ { not: { required: ['answer_setting_mode'] } },
3549
+ { properties: { answer_setting_mode: { const: 'absolute' } } }
3550
+ ]
3551
+ },
3552
+ then: { properties: { answers: { maxItems: 1 } } }
3553
+ }
3554
+ ]
3555
+ },
3556
+ SingleSelectInput: {
3557
+ type: 'object',
3558
+ additionalProperties: false,
3559
+ required: ['type', 'label', 'choices', 'answers'],
3560
+ properties: {
3561
+ type: { const: 'SingleSelect' },
3562
+ label: { type: 'string' },
3563
+ cid: { type: 'string' },
3564
+ notes: { type: 'string' },
3565
+ private: { type: 'boolean' },
3566
+ required: { type: 'boolean' },
3567
+ position: { type: 'integer', minimum: 0 },
3568
+ other_choice_required: { type: 'boolean' },
3569
+ choices: { type: 'array', minItems: 1, items: { $ref: 'ChoiceInput' } },
3570
+ calculable: { type: 'boolean' },
3571
+ choices_layout: { type: 'string' },
3572
+ random_choices: { type: 'boolean' },
3573
+ answers: { type: 'array', minItems: 1, items: { $ref: 'AnswerInput' } },
3574
+ answer_setting_mode: { type: 'string', enum: ['absolute', 'relative'] },
3575
+ answer_explanation: { type: 'string' }
3576
+ },
3577
+ allOf: [
3578
+ {
3579
+ if: { properties: { calculable: { const: true } }, required: ['calculable'] },
3580
+ then: { properties: { choices: { items: { required: ['operand_value'] } } } }
3581
+ },
3582
+ {
3583
+ if: {
3584
+ anyOf: [
3585
+ { not: { required: ['answer_setting_mode'] } },
3586
+ { properties: { answer_setting_mode: { const: 'absolute' } } }
3587
+ ]
3588
+ },
3589
+ then: { properties: { answers: { maxItems: 1 } } }
3590
+ }
3591
+ ]
3592
+ },
3593
+ SortFieldInput: {
3594
+ type: 'object',
3595
+ additionalProperties: false,
3596
+ required: ['type', 'label'],
3597
+ properties: {
3598
+ type: { const: 'SortField' },
3599
+ label: { type: 'string' },
3600
+ cid: { type: 'string' },
3601
+ notes: { type: 'string' },
3602
+ private: { type: 'boolean' },
3603
+ required: { type: 'boolean' },
3604
+ position: { type: 'integer', minimum: 0 },
3605
+ choices: { type: 'array', minItems: 1, items: { $ref: 'ChoiceInput' } },
3606
+ random_choices: { type: 'boolean' }
3607
+ }
3608
+ },
3609
+ StatementInput: {
3610
+ type: 'object',
3611
+ additionalProperties: false,
3612
+ required: ['label'],
3613
+ properties: { label: { type: 'string', pattern: '\\S' }, api_code: { type: 'string' } }
3614
+ },
3615
+ TableColumnInput: {
3616
+ type: 'object',
3617
+ required: ['type', 'label'],
3618
+ properties: {
3619
+ type: {
3620
+ type: 'string',
3621
+ enum: [
3622
+ 'TextArea',
3623
+ 'RadioButton',
3624
+ 'CheckBox',
3625
+ 'BooleanField',
3626
+ 'MobileField',
3627
+ 'NumberField',
3628
+ 'DateTimeField',
3629
+ 'EmailField',
3630
+ 'LinkField',
3631
+ 'AttachmentField',
3632
+ 'FormulaField',
3633
+ 'RelationField'
3634
+ ]
3635
+ },
3636
+ label: { type: 'string' }
3637
+ },
3638
+ oneOf: [
3639
+ { $ref: 'TextAreaInput' },
3640
+ { $ref: 'RadioButtonInput' },
3641
+ { $ref: 'CheckBoxInput' },
3642
+ { $ref: 'BooleanFieldInput' },
3643
+ { $ref: 'MobileFieldInput' },
3644
+ { $ref: 'NumberFieldInput' },
3645
+ { $ref: 'DateTimeFieldInput' },
3646
+ { $ref: 'EmailFieldInput' },
3647
+ { $ref: 'LinkFieldInput' },
3648
+ { $ref: 'AttachmentFieldInput' },
3649
+ { $ref: 'FormulaFieldInput' },
3650
+ { $ref: 'RelationFieldInput' }
3651
+ ]
3652
+ },
3653
+ TableCreateInput: {
3654
+ type: 'object',
3655
+ additionalProperties: false,
3656
+ required: ['name', 'fields'],
3657
+ properties: {
3658
+ name: { type: 'string' },
3659
+ description: { type: 'string' },
3660
+ fields: { type: 'array', minItems: 1, items: { $ref: 'TableColumnInput' } },
3661
+ setting: { $ref: 'FormSettingWriteInput' },
3662
+ folder_token: { type: 'string' },
3663
+ with_default_entries: { type: 'boolean' },
3664
+ scene: {
3665
+ type: 'string',
3666
+ enum: [
3667
+ 'form',
3668
+ 'survey',
3669
+ 'registry',
3670
+ 'vote',
3671
+ 'exam',
3672
+ 'reservation',
3673
+ 'customer_acquisition',
3674
+ 'evaluation',
3675
+ 'online_payment',
3676
+ 'quickpay'
3677
+ ]
3678
+ }
3679
+ }
3680
+ },
3681
+ TableFieldInput: {
3682
+ type: 'object',
3683
+ additionalProperties: false,
3684
+ required: ['type', 'label'],
3685
+ properties: {
3686
+ type: { const: 'TableField' },
3687
+ label: { type: 'string' },
3688
+ cid: { type: 'string' },
3689
+ notes: { type: 'string' },
3690
+ private: { type: 'boolean' },
3691
+ required: { type: 'boolean' },
3692
+ position: { type: 'integer', minimum: 0 },
3693
+ dimensions: { type: 'array', minItems: 1, items: { $ref: 'DimensionInput' } },
3694
+ init_row_length: { type: 'integer', minimum: 1 }
3695
+ }
3696
+ },
3697
+ TelephoneFieldInput: {
3698
+ type: 'object',
3699
+ additionalProperties: false,
3700
+ required: ['type', 'label'],
3701
+ properties: {
3702
+ type: { const: 'TelephoneField' },
3703
+ label: { type: 'string' },
3704
+ cid: { type: 'string' },
3705
+ notes: { type: 'string' },
3706
+ private: { type: 'boolean' },
3707
+ required: { type: 'boolean' },
3708
+ position: { type: 'integer', minimum: 0 },
3709
+ unique: { type: 'boolean' },
3710
+ predefined_value: { type: 'string' },
3711
+ placeholder: { type: 'string' }
3712
+ }
3713
+ },
3714
+ TemplateUsageInput: {
3715
+ type: 'object',
3716
+ required: ['id'],
3717
+ properties: {
3718
+ id: { type: 'string' },
3719
+ template_id: { type: 'string' },
3720
+ tags: { oneOf: [{ type: 'array', items: { type: 'string' } }, { type: 'string' }] },
3721
+ tag_id: { type: 'string' },
3722
+ folder_id: { type: 'string' },
3723
+ scene: { type: 'string' },
3724
+ frm: { type: 'string' },
3725
+ create_source: { type: 'string' },
3726
+ group_id: { type: 'string' },
3727
+ form_app_trial_alert: { type: 'boolean' },
3728
+ confirm_unbind_form_app: { type: 'boolean' },
3729
+ confirm_form_app_trial: { type: 'boolean' }
3730
+ }
3731
+ },
3732
+ TextAreaInput: {
3733
+ type: 'object',
3734
+ additionalProperties: false,
3735
+ required: ['type', 'label'],
3736
+ properties: {
3737
+ type: { const: 'TextArea' },
3738
+ label: { type: 'string' },
3739
+ cid: { type: 'string' },
3740
+ notes: { type: 'string' },
3741
+ private: { type: 'boolean' },
3742
+ required: { type: 'boolean' },
3743
+ position: { type: 'integer', minimum: 0 },
3744
+ unique: { type: 'boolean' },
3745
+ predefined_value: { type: 'string' },
3746
+ placeholder: { type: 'string' }
3747
+ }
3748
+ },
3749
+ TextFieldInput: {
3750
+ type: 'object',
3751
+ additionalProperties: false,
3752
+ required: ['type', 'label'],
3753
+ properties: {
3754
+ type: { const: 'TextField' },
3755
+ label: { type: 'string' },
3756
+ cid: { type: 'string' },
3757
+ notes: { type: 'string' },
3758
+ private: { type: 'boolean' },
3759
+ required: { type: 'boolean' },
3760
+ position: { type: 'integer', minimum: 0 },
3761
+ unique: { type: 'boolean' },
3762
+ predefined_value: { type: 'string' },
3763
+ placeholder: { type: 'string' }
3764
+ }
3765
+ },
3766
+ ThemeInput: {
3767
+ type: 'object',
3768
+ properties: {
3769
+ primary_color: { type: 'string' },
3770
+ secondary_color: { type: 'string' },
3771
+ wallpaper: {
3772
+ type: 'object',
3773
+ properties: {
3774
+ background_color: { type: 'string' },
3775
+ background_image_url: { type: 'string' },
3776
+ background_image_upload_token: { type: 'string' },
3777
+ background_image_attachment_id: { type: ['string', 'null'] }
3778
+ },
3779
+ additionalProperties: false
3780
+ },
3781
+ header: {
3782
+ type: 'object',
3783
+ properties: {
3784
+ type: { type: 'string', enum: ['none', 'text', 'image', 'carousel'] },
3785
+ text: { type: 'string' },
3786
+ background_color: { type: 'string' },
3787
+ text_style: { type: 'object', additionalProperties: { type: 'string' } },
3788
+ header_image_url: { type: 'string' },
3789
+ header_image_base64: { type: 'string' },
3790
+ header_image_upload_token: { type: 'string' },
3791
+ carousel_images: {
3792
+ type: 'array',
3793
+ minItems: 1,
3794
+ maxItems: 5,
3795
+ items: {
3796
+ type: 'object',
3797
+ properties: {
3798
+ image_upload_token: { type: 'string' },
3799
+ image_url: { type: 'string' },
3800
+ attachment_id: { type: 'string' }
3801
+ },
3802
+ additionalProperties: false
3803
+ }
3804
+ },
3805
+ header_image_attachment_id: { type: ['string', 'null'] }
3806
+ },
3807
+ additionalProperties: false
3808
+ },
3809
+ typography: {
3810
+ type: 'object',
3811
+ properties: {
3812
+ form_header: { type: 'object', additionalProperties: { type: 'string' } },
3813
+ field_label: { type: 'object', additionalProperties: { type: 'string' } },
3814
+ choice_style: { type: 'object', additionalProperties: { type: 'string' } }
3815
+ },
3816
+ additionalProperties: false
3817
+ },
3818
+ form_container: {
3819
+ type: 'object',
3820
+ properties: {
3821
+ background_color: { type: 'string' },
3822
+ border_color: { type: 'string' },
3823
+ border_width: { type: 'string' }
3824
+ },
3825
+ additionalProperties: false
3826
+ },
3827
+ submit_button: {
3828
+ type: 'object',
3829
+ properties: { background_color: { type: 'string' }, color: { type: 'string' }, font_size: { type: 'string' } },
3830
+ additionalProperties: false
3831
+ },
3832
+ generate_header_image: { type: 'object', properties: { prompt: { type: 'string' } }, additionalProperties: false }
3833
+ },
3834
+ additionalProperties: false
3835
+ },
3836
+ TimeFieldInput: {
3837
+ type: 'object',
3838
+ additionalProperties: false,
3839
+ required: ['type', 'label'],
3840
+ properties: {
3841
+ type: { const: 'TimeField' },
3842
+ label: { type: 'string' },
3843
+ cid: { type: 'string' },
3844
+ notes: { type: 'string' },
3845
+ private: { type: 'boolean' },
3846
+ required: { type: 'boolean' },
3847
+ position: { type: 'integer', minimum: 0 },
3848
+ predefined_value: {
3849
+ type: 'object',
3850
+ properties: { hour: { type: 'integer' }, minute: { type: 'integer' }, second: { type: 'integer' } }
3851
+ },
3852
+ include_second: { type: 'boolean' }
3853
+ }
3854
+ },
3855
+ TimeOfDay: {
3856
+ type: 'object',
3857
+ required: ['hour', 'minute'],
3858
+ properties: {
3859
+ hour: { type: 'integer', minimum: 0, maximum: 23 },
3860
+ minute: { type: 'integer', minimum: 0, maximum: 59 }
3861
+ },
3862
+ additionalProperties: false
3863
+ },
3864
+ TrueOrFalseInput: {
3865
+ type: 'object',
3866
+ additionalProperties: false,
3867
+ required: ['type', 'label', 'choices', 'answers'],
3868
+ properties: {
3869
+ type: { const: 'TrueOrFalse' },
3870
+ label: { type: 'string' },
3871
+ cid: { type: 'string' },
3872
+ notes: { type: 'string' },
3873
+ private: { type: 'boolean' },
3874
+ required: { type: 'boolean' },
3875
+ position: { type: 'integer', minimum: 0 },
3876
+ other_choice_required: { type: 'boolean' },
3877
+ choices: { type: 'array', minItems: 1, items: { $ref: 'ChoiceInput' } },
3878
+ calculable: { type: 'boolean' },
3879
+ choices_layout: { type: 'string' },
3880
+ random_choices: { type: 'boolean' },
3881
+ answers: { type: 'array', minItems: 1, items: { $ref: 'AnswerInput' } },
3882
+ answer_setting_mode: { type: 'string', enum: ['absolute', 'relative'] },
3883
+ answer_explanation: { type: 'string' }
3884
+ },
3885
+ allOf: [
3886
+ {
3887
+ if: { properties: { calculable: { const: true } }, required: ['calculable'] },
3888
+ then: { properties: { choices: { items: { required: ['operand_value'] } } } }
3889
+ },
3890
+ {
3891
+ if: {
3892
+ anyOf: [
3893
+ { not: { required: ['answer_setting_mode'] } },
3894
+ { properties: { answer_setting_mode: { const: 'absolute' } } }
3895
+ ]
3896
+ },
3897
+ then: { properties: { answers: { maxItems: 1 } } }
3898
+ }
3899
+ ]
3900
+ },
3901
+ WebhookInput: { type: 'object', properties: { entry_post_url: { type: 'string' } }, additionalProperties: false },
3902
+ WidgetButtonInput: {
3903
+ type: 'object',
3904
+ additionalProperties: false,
3905
+ required: ['type', 'label'],
3906
+ properties: {
3907
+ type: { const: 'WidgetButton' },
3908
+ label: { type: 'string' },
3909
+ cid: { type: 'string' },
3910
+ notes: { type: 'string' },
3911
+ private: { type: 'boolean' },
3912
+ required: { type: 'boolean' },
3913
+ position: { type: 'integer', minimum: 0 },
3914
+ buttons: { type: 'array', minItems: 1, items: { $ref: 'WidgetButtonItemInput' } },
3915
+ buttons_number: { type: 'integer', minimum: 1 },
3916
+ fixed_to_bottom: { type: 'boolean' }
3917
+ }
3918
+ },
3919
+ WidgetButtonItemInput: {
3920
+ type: 'object',
3921
+ additionalProperties: false,
3922
+ required: ['text'],
3923
+ properties: {
3924
+ text: { type: 'string' },
3925
+ position: { type: 'integer', minimum: 0 },
3926
+ link_type: { type: 'string', enum: ['normal', 'miniapp', 'phone', 'qrcode'] },
3927
+ link_attrs: { type: 'object' },
3928
+ url: { type: 'string' }
3929
+ }
3930
+ },
3931
+ WidgetContactInput: {
3932
+ type: 'object',
3933
+ additionalProperties: false,
3934
+ required: ['type', 'label'],
3935
+ properties: {
3936
+ type: { const: 'WidgetContact' },
3937
+ label: { type: 'string' },
3938
+ cid: { type: 'string' },
3939
+ notes: { type: 'string' },
3940
+ private: { type: 'boolean' },
3941
+ required: { type: 'boolean' },
3942
+ position: { type: 'integer', minimum: 0 },
3943
+ widget_images: { type: 'array', items: { $ref: 'WidgetImageInput' } },
3944
+ widget_max_images_number: { type: 'integer', minimum: 1 },
3945
+ phones: {
3946
+ type: 'array',
3947
+ items: {
3948
+ type: 'object',
3949
+ required: ['phone'],
3950
+ additionalProperties: false,
3951
+ properties: { phone: { type: 'string' } }
3952
+ }
3953
+ }
3954
+ }
3955
+ },
3956
+ WidgetImageInput: {
3957
+ type: 'object',
3958
+ additionalProperties: false,
3959
+ anyOf: [{ required: ['image_url'] }, { required: ['image_base64'] }, { required: ['image_upload_token'] }],
3960
+ properties: {
3961
+ image_url: { type: 'string' },
3962
+ image_base64: { type: 'string' },
3963
+ image_upload_token: { type: 'string' }
3964
+ }
3965
+ },
3966
+ WidgetMapInput: {
3967
+ type: 'object',
3968
+ additionalProperties: false,
3969
+ required: ['type', 'label'],
3970
+ properties: {
3971
+ type: { const: 'WidgetMap' },
3972
+ label: { type: 'string' },
3973
+ cid: { type: 'string' },
3974
+ notes: { type: 'string' },
3975
+ private: { type: 'boolean' },
3976
+ required: { type: 'boolean' },
3977
+ position: { type: 'integer', minimum: 0 },
3978
+ nav_address: { type: 'string' },
3979
+ longitude: { type: 'number' },
3980
+ latitude: { type: 'number' },
3981
+ value: { type: 'string' },
3982
+ localizable_on_mobile: { type: 'boolean' }
3983
+ }
3984
+ },
3985
+ WidgetMarqueeInput: {
3986
+ type: 'object',
3987
+ additionalProperties: false,
3988
+ required: ['type', 'label'],
3989
+ properties: {
3990
+ type: { const: 'WidgetMarquee' },
3991
+ label: { type: 'string' },
3992
+ cid: { type: 'string' },
3993
+ notes: { type: 'string' },
3994
+ private: { type: 'boolean' },
3995
+ required: { type: 'boolean' },
3996
+ position: { type: 'integer', minimum: 0 },
3997
+ lines: { type: 'integer', minimum: 1 },
3998
+ entries_init_number: { type: 'integer', minimum: 0 },
3999
+ entries_number_visible: { type: 'boolean' },
4000
+ marquee_data_type: { type: 'string', enum: ['fake', 'real'] }
4001
+ }
4002
+ }
4003
+ };