@jinshuju/cli 0.20.0 → 0.22.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.
@@ -2,6 +2,8 @@
2
2
  // Do not edit: change the spec and run `npm run generate`.
3
3
  /** The path every operation's path is relative to, from `servers`. */
4
4
  export const BASE_PATH = '/api/v1';
5
+ /** The day spec/openapi.yaml was fetched from the API, when scripts/fetch-spec.mjs recorded it. */
6
+ export const SPEC_DATE = '2026-11-05';
5
7
  export const OPERATIONS = {
6
8
  aggregateEntries: {
7
9
  method: 'GET',
@@ -337,6 +339,18 @@ export const OPERATIONS = {
337
339
  parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
338
340
  body: { required: true, content: { 'application/json': { $ref: 'WebhookInput' } } }
339
341
  },
342
+ createMemoryNote: {
343
+ method: 'POST',
344
+ path: '/memory/notes',
345
+ parameters: [],
346
+ body: { required: true, content: { 'application/json': { $ref: 'MemoryNoteInput' } } }
347
+ },
348
+ createMessageChannel: {
349
+ method: 'POST',
350
+ path: '/message_channels',
351
+ parameters: [],
352
+ body: { required: true, content: { 'application/json': { $ref: 'MessageChannelCreateInput' } } }
353
+ },
340
354
  createNotificationRule: {
341
355
  method: 'POST',
342
356
  path: '/forms/{form_token}/notification_rules',
@@ -360,7 +374,18 @@ export const OPERATIONS = {
360
374
  { $ref: 'WxworkNotificationRuleInput' },
361
375
  { $ref: 'DingTalkNotificationRuleInput' },
362
376
  { $ref: 'WebhookNotificationRuleInput' }
363
- ]
377
+ ],
378
+ discriminator: {
379
+ propertyName: 'approach',
380
+ mapping: {
381
+ SMS: 'SMSNotificationRuleInput',
382
+ EMAIL: 'EmailNotificationRuleInput',
383
+ WEIXIN_ONETIME: 'WeixinOnetimeNotificationRuleInput',
384
+ WXWORK: 'WxworkNotificationRuleInput',
385
+ DING_TALK: 'DingTalkNotificationRuleInput',
386
+ WEBHOOK: 'WebhookNotificationRuleInput'
387
+ }
388
+ }
364
389
  }
365
390
  ]
366
391
  }
@@ -498,6 +523,24 @@ export const OPERATIONS = {
498
523
  path: '/forms/{form_token}/webhook',
499
524
  parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }]
500
525
  },
526
+ deleteMemoryNotes: {
527
+ method: 'DELETE',
528
+ path: '/memory/notes/{id}',
529
+ parameters: [
530
+ {
531
+ name: 'id',
532
+ in: 'path',
533
+ required: true,
534
+ schema: { type: 'string', pattern: '^[1-9][0-9]{0,2}(,[1-9][0-9]{0,2})*$' }
535
+ }
536
+ ],
537
+ body: { required: true, content: { 'application/json': { $ref: 'MemoryNotesDeleteInput' } } }
538
+ },
539
+ deleteMessageChannel: {
540
+ method: 'DELETE',
541
+ path: '/message_channels/{id}',
542
+ parameters: [{ name: 'id', in: 'path', required: true, schema: { type: 'string' } }]
543
+ },
501
544
  deleteNotificationRule: {
502
545
  method: 'DELETE',
503
546
  path: '/forms/{form_token}/notification_rules/{id}',
@@ -586,6 +629,12 @@ export const OPERATIONS = {
586
629
  { name: 'view_token', in: 'query', schema: { type: 'string' } }
587
630
  ]
588
631
  },
632
+ estimateMessage: {
633
+ method: 'POST',
634
+ path: '/messages/estimate',
635
+ parameters: [],
636
+ body: { required: true, content: { 'application/json': { $ref: 'MessageInput' } } }
637
+ },
589
638
  estimateSmsTask: {
590
639
  method: 'GET',
591
640
  path: '/forms/{form_token}/sms_tasks/estimate',
@@ -691,7 +740,7 @@ export const OPERATIONS = {
691
740
  method: 'GET',
692
741
  path: '/field_types/{type}',
693
742
  parameters: [
694
- { name: 'type', in: 'path', required: true, schema: { type: 'string', pattern: '^[A-Za-z]+$' } },
743
+ { name: 'type', in: 'path', required: true, schema: { type: 'string', pattern: '^[A-Za-z_]+$' } },
695
744
  { name: 'kind', in: 'query', schema: { type: 'string' } }
696
745
  ]
697
746
  },
@@ -719,6 +768,7 @@ export const OPERATIONS = {
719
768
  { name: 'include_theme', in: 'query', schema: { type: 'boolean' } },
720
769
  { name: 'include_field_rules', in: 'query', schema: { type: 'boolean' } },
721
770
  { name: 'include_extended_attributes', in: 'query', schema: { type: 'boolean' } },
771
+ { name: 'include_exam_setting', in: 'query', schema: { type: 'boolean' } },
722
772
  { name: 'include_transactions', in: 'query', schema: { type: 'boolean' } }
723
773
  ]
724
774
  },
@@ -740,6 +790,17 @@ export const OPERATIONS = {
740
790
  path: '/forms/{form_token}/manually_close_rule',
741
791
  parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }]
742
792
  },
793
+ getMemory: { method: 'GET', path: '/memory', parameters: [] },
794
+ getMessage: {
795
+ method: 'GET',
796
+ path: '/messages/{id}',
797
+ parameters: [{ name: 'id', in: 'path', required: true, schema: { type: 'string' } }]
798
+ },
799
+ getMessageChannel: {
800
+ method: 'GET',
801
+ path: '/message_channels/{id}',
802
+ parameters: [{ name: 'id', in: 'path', required: true, schema: { type: 'string' } }]
803
+ },
743
804
  getNotificationRule: {
744
805
  method: 'GET',
745
806
  path: '/forms/{form_token}/notification_rules/{id}',
@@ -805,6 +866,7 @@ export const OPERATIONS = {
805
866
  { name: 'q', in: 'query', schema: { type: 'string' } },
806
867
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
807
868
  { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
869
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
808
870
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } }
809
871
  ]
810
872
  },
@@ -824,20 +886,30 @@ export const OPERATIONS = {
824
886
  listBillingAccountUsers: {
825
887
  method: 'GET',
826
888
  path: '/billing_account/users',
827
- parameters: [{ name: 'limit', in: 'query', schema: { type: 'integer', minimum: 1, maximum: 100 } }]
889
+ parameters: [
890
+ { name: 'limit', in: 'query', schema: { type: 'integer', minimum: 1, maximum: 100 } },
891
+ { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
892
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } }
893
+ ]
828
894
  },
829
895
  listCheckinCampaigns: {
830
896
  method: 'GET',
831
897
  path: '/plugins/checkin/campaigns',
832
898
  parameters: [
833
899
  { name: 'form_token', in: 'query', schema: { type: 'string' } },
834
- { name: 'limit', in: 'query', schema: { type: 'integer', minimum: 1, maximum: 100 } }
900
+ { name: 'limit', in: 'query', schema: { type: 'integer', minimum: 1, maximum: 100 } },
901
+ { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
902
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } }
835
903
  ]
836
904
  },
837
905
  listContacts: {
838
906
  method: 'GET',
839
907
  path: '/contacts',
840
- parameters: [{ name: 'next', in: 'query', schema: { type: 'string' } }]
908
+ parameters: [
909
+ { name: 'next', in: 'query', schema: { type: 'string' } },
910
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
911
+ { name: 'limit', in: 'query', schema: { type: 'integer' } }
912
+ ]
841
913
  },
842
914
  listEmailTaskActivities: {
843
915
  method: 'GET',
@@ -849,6 +921,7 @@ export const OPERATIONS = {
849
921
  { name: 'email', in: 'query', schema: { type: 'string' } },
850
922
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
851
923
  { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
924
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
852
925
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } }
853
926
  ]
854
927
  },
@@ -866,6 +939,7 @@ export const OPERATIONS = {
866
939
  { name: 'end_date', in: 'query', schema: { type: 'string' } },
867
940
  { name: 'limit', in: 'query', schema: { type: 'integer', minimum: 1, maximum: 100 } },
868
941
  { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
942
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
869
943
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } }
870
944
  ]
871
945
  },
@@ -890,6 +964,7 @@ export const OPERATIONS = {
890
964
  },
891
965
  { name: 'created_at', in: 'query', schema: { type: 'string' } },
892
966
  { name: 'next', in: 'query', schema: { type: ['integer', 'string'] } },
967
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
893
968
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } },
894
969
  { name: 'include_labels', in: 'query', schema: { type: 'boolean' } },
895
970
  { name: 'limit', in: 'query', schema: { type: 'integer' } }
@@ -921,7 +996,11 @@ export const OPERATIONS = {
921
996
  listFolders: {
922
997
  method: 'GET',
923
998
  path: '/folders',
924
- parameters: [{ name: 'limit', in: 'query', schema: { type: 'integer', minimum: 1, maximum: 100 } }]
999
+ parameters: [
1000
+ { name: 'limit', in: 'query', schema: { type: 'integer', minimum: 1, maximum: 100 } },
1001
+ { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
1002
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } }
1003
+ ]
925
1004
  },
926
1005
  listFormConditionTriggerableFields: {
927
1006
  method: 'GET',
@@ -943,6 +1022,8 @@ export const OPERATIONS = {
943
1022
  { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
944
1023
  { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } },
945
1024
  { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
1025
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
1026
+ { name: 'limit', in: 'query', schema: { type: 'integer' } },
946
1027
  { name: 'include_labels', in: 'query', schema: { type: 'boolean' } }
947
1028
  ]
948
1029
  },
@@ -969,17 +1050,47 @@ export const OPERATIONS = {
969
1050
  schema: { type: 'array', items: { $ref: 'FormSortRule' } }
970
1051
  },
971
1052
  { name: 'next', in: 'query', schema: { type: 'string' } },
1053
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
972
1054
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } },
973
1055
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
974
1056
  { name: 'include_transactions', in: 'query', schema: { type: 'boolean' } }
975
1057
  ]
976
1058
  },
1059
+ listMessageChannels: {
1060
+ method: 'GET',
1061
+ path: '/message_channels',
1062
+ parameters: [
1063
+ { name: 'type', in: 'query', schema: { $ref: 'MessageType' } },
1064
+ { name: 'limit', in: 'query', schema: { type: 'integer' } },
1065
+ { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
1066
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
1067
+ { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } }
1068
+ ]
1069
+ },
1070
+ listMessages: {
1071
+ method: 'GET',
1072
+ path: '/messages',
1073
+ parameters: [
1074
+ { name: 'type', in: 'query', schema: { $ref: 'MessageType' } },
1075
+ { name: 'channel_id', in: 'query', schema: { type: 'string' } },
1076
+ { name: 'status', in: 'query', schema: { $ref: 'MessageStatus' } },
1077
+ { name: 'source', in: 'query', schema: { $ref: 'MessageSource' } },
1078
+ { name: 'request_id', in: 'query', schema: { type: 'string' } },
1079
+ { name: 'created_after', in: 'query', schema: { type: 'string' } },
1080
+ { name: 'created_before', in: 'query', schema: { type: 'string' } },
1081
+ { name: 'limit', in: 'query', schema: { type: 'integer' } },
1082
+ { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
1083
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
1084
+ { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } }
1085
+ ]
1086
+ },
977
1087
  listMyFilledForms: {
978
1088
  method: 'GET',
979
1089
  path: '/my/forms',
980
1090
  parameters: [
981
1091
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
982
1092
  { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
1093
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
983
1094
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } }
984
1095
  ]
985
1096
  },
@@ -999,6 +1110,7 @@ export const OPERATIONS = {
999
1110
  { name: 'include_labels', in: 'query', schema: { type: 'boolean' } },
1000
1111
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
1001
1112
  { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
1113
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
1002
1114
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } }
1003
1115
  ]
1004
1116
  },
@@ -1020,6 +1132,7 @@ export const OPERATIONS = {
1020
1132
  },
1021
1133
  { name: 'limit', in: 'query', schema: { type: 'integer', minimum: 1, maximum: 1000 } },
1022
1134
  { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
1135
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
1023
1136
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } }
1024
1137
  ]
1025
1138
  },
@@ -1045,6 +1158,7 @@ export const OPERATIONS = {
1045
1158
  { name: 'routine_id', in: 'path', required: true, schema: { type: 'string' } },
1046
1159
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
1047
1160
  { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
1161
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
1048
1162
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } }
1049
1163
  ]
1050
1164
  },
@@ -1055,6 +1169,7 @@ export const OPERATIONS = {
1055
1169
  { name: 'state', in: 'query', schema: { type: 'string', enum: ['active', 'paused'] } },
1056
1170
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
1057
1171
  { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
1172
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
1058
1173
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } }
1059
1174
  ]
1060
1175
  },
@@ -1066,6 +1181,7 @@ export const OPERATIONS = {
1066
1181
  { name: 'status', in: 'query', schema: { type: 'string', enum: ['CHECKING', 'SUCCESS', 'FAIL'] } },
1067
1182
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
1068
1183
  { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
1184
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
1069
1185
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } }
1070
1186
  ]
1071
1187
  },
@@ -1079,6 +1195,7 @@ export const OPERATIONS = {
1079
1195
  { name: 'mobile', in: 'query', schema: { type: 'string' } },
1080
1196
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
1081
1197
  { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
1198
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
1082
1199
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } }
1083
1200
  ]
1084
1201
  },
@@ -1112,6 +1229,7 @@ export const OPERATIONS = {
1112
1229
  { name: 'end_date', in: 'query', schema: { type: 'string' } },
1113
1230
  { name: 'limit', in: 'query', schema: { type: 'integer', minimum: 1, maximum: 100 } },
1114
1231
  { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
1232
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
1115
1233
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } }
1116
1234
  ]
1117
1235
  },
@@ -1125,6 +1243,7 @@ export const OPERATIONS = {
1125
1243
  { name: 'status', in: 'query', schema: { type: 'string', enum: ['CHECKING', 'SUCCESS', 'FAIL'] } },
1126
1244
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
1127
1245
  { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
1246
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
1128
1247
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } }
1129
1248
  ]
1130
1249
  },
@@ -1158,6 +1277,7 @@ export const OPERATIONS = {
1158
1277
  },
1159
1278
  { name: 'created_at', in: 'query', schema: { type: 'string' } },
1160
1279
  { name: 'next', in: 'query', schema: { type: ['integer', 'string'] } },
1280
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
1161
1281
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } },
1162
1282
  { name: 'include_labels', in: 'query', schema: { type: 'boolean' } },
1163
1283
  { name: 'limit', in: 'query', schema: { type: 'integer' } }
@@ -1178,6 +1298,8 @@ export const OPERATIONS = {
1178
1298
  { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
1179
1299
  { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } },
1180
1300
  { name: 'next', in: 'query', schema: { type: 'integer', minimum: 0 } },
1301
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
1302
+ { name: 'limit', in: 'query', schema: { type: 'integer' } },
1181
1303
  { name: 'include_labels', in: 'query', schema: { type: 'boolean' } }
1182
1304
  ]
1183
1305
  },
@@ -1204,6 +1326,7 @@ export const OPERATIONS = {
1204
1326
  schema: { type: 'array', items: { $ref: 'FormSortRule' } }
1205
1327
  },
1206
1328
  { name: 'next', in: 'query', schema: { type: 'string' } },
1329
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } },
1207
1330
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } },
1208
1331
  { name: 'limit', in: 'query', schema: { type: 'integer' } }
1209
1332
  ]
@@ -1217,7 +1340,8 @@ export const OPERATIONS = {
1217
1340
  { name: 'status', in: 'query', schema: { type: 'string', enum: ['processing', 'success', 'error'] } },
1218
1341
  { name: 'include', in: 'query', schema: { type: 'string', enum: ['both', 'stats', 'records'] } },
1219
1342
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
1220
- { name: 'next', in: 'query', schema: { type: 'integer' } }
1343
+ { name: 'next', in: 'query', schema: { type: 'integer' } },
1344
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } }
1221
1345
  ]
1222
1346
  },
1223
1347
  listTradeRefunds: {
@@ -1230,7 +1354,8 @@ export const OPERATIONS = {
1230
1354
  { name: 'refund_no', in: 'query', schema: { type: 'string' } },
1231
1355
  { name: 'include', in: 'query', schema: { type: 'string', enum: ['both', 'stats', 'records'] } },
1232
1356
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
1233
- { name: 'next', in: 'query', schema: { type: 'integer' } }
1357
+ { name: 'next', in: 'query', schema: { type: 'integer' } },
1358
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } }
1234
1359
  ]
1235
1360
  },
1236
1361
  listTradeTransactions: {
@@ -1252,7 +1377,8 @@ export const OPERATIONS = {
1252
1377
  { name: 'form_token', in: 'query', schema: { type: 'string' } },
1253
1378
  { name: 'order_no', in: 'query', schema: { type: 'string' } },
1254
1379
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
1255
- { name: 'next', in: 'query', schema: { type: 'integer' } }
1380
+ { name: 'next', in: 'query', schema: { type: 'integer' } },
1381
+ { name: 'page', in: 'query', schema: { type: 'integer', minimum: 1 } }
1256
1382
  ]
1257
1383
  },
1258
1384
  moveFormToFolder: {
@@ -1447,6 +1573,12 @@ export const OPERATIONS = {
1447
1573
  { name: 'form_tokens', in: 'query', explode: false, schema: { type: 'array', items: { type: 'string' } } }
1448
1574
  ]
1449
1575
  },
1576
+ sendMessage: {
1577
+ method: 'POST',
1578
+ path: '/messages',
1579
+ parameters: [],
1580
+ body: { required: true, content: { 'application/json': { $ref: 'MessageInput' } } }
1581
+ },
1450
1582
  sendSmsTask: {
1451
1583
  method: 'PATCH',
1452
1584
  path: '/forms/{form_token}/sms_tasks/{id}/auto_send',
@@ -1616,6 +1748,19 @@ export const OPERATIONS = {
1616
1748
  parameters: [{ name: 'form_token', in: 'path', required: true, schema: { type: 'string' } }],
1617
1749
  body: { required: true, content: { 'application/json': { $ref: 'FormManuallyCloseRuleInput' } } }
1618
1750
  },
1751
+ updateMemoryNote: {
1752
+ method: 'PATCH',
1753
+ path: '/memory/notes/{id}',
1754
+ parameters: [
1755
+ {
1756
+ name: 'id',
1757
+ in: 'path',
1758
+ required: true,
1759
+ schema: { type: 'string', pattern: '^[1-9][0-9]{0,2}(,[1-9][0-9]{0,2})*$' }
1760
+ }
1761
+ ],
1762
+ body: { required: true, content: { 'application/json': { $ref: 'MemoryNoteUpdateInput' } } }
1763
+ },
1619
1764
  updateNotificationRule: {
1620
1765
  method: 'PATCH',
1621
1766
  path: '/forms/{form_token}/notification_rules/{id}',
@@ -2105,7 +2250,8 @@ export const SCHEMAS = {
2105
2250
  value: { type: 'string' },
2106
2251
  operand_value: { type: 'number' },
2107
2252
  selected: { type: 'boolean' },
2108
- quota: { type: ['integer', 'null'], minimum: 0 }
2253
+ quota: { type: ['integer', 'null'], minimum: 0 },
2254
+ recover_quota: { type: 'integer', minimum: 1 }
2109
2255
  },
2110
2256
  additionalProperties: false
2111
2257
  }
@@ -2206,6 +2352,17 @@ export const SCHEMAS = {
2206
2352
  choices: { type: 'array', items: { $ref: 'ChoiceInput' } }
2207
2353
  }
2208
2354
  },
2355
+ DingTalkMessageChannelInput: {
2356
+ type: 'object',
2357
+ additionalProperties: false,
2358
+ required: ['type', 'name', 'url'],
2359
+ properties: {
2360
+ type: { type: 'string', enum: ['ding_talk'] },
2361
+ name: { $ref: 'MessageChannelName' },
2362
+ url: { type: 'string' },
2363
+ secret: { type: 'string' }
2364
+ }
2365
+ },
2209
2366
  DingTalkNotificationRuleInput: {
2210
2367
  type: 'object',
2211
2368
  properties: {
@@ -2310,6 +2467,29 @@ export const SCHEMAS = {
2310
2467
  placeholder: { type: 'string' }
2311
2468
  }
2312
2469
  },
2470
+ EmailMessageChannelInput: {
2471
+ type: 'object',
2472
+ additionalProperties: false,
2473
+ required: ['type', 'name', 'smtp_account_id'],
2474
+ properties: {
2475
+ type: { type: 'string', enum: ['email'] },
2476
+ name: { $ref: 'MessageChannelName' },
2477
+ smtp_account_id: { type: 'string' }
2478
+ }
2479
+ },
2480
+ EmailMessageInput: {
2481
+ type: 'object',
2482
+ additionalProperties: false,
2483
+ required: ['type', 'to', 'content'],
2484
+ properties: {
2485
+ type: { type: 'string', enum: ['email'] },
2486
+ channel_id: { type: 'string' },
2487
+ to: { $ref: 'MessageRecipients' },
2488
+ title: { type: 'string', maxLength: 200 },
2489
+ content: { type: 'string', maxLength: 20000 },
2490
+ idempotency_key: { type: 'string', maxLength: 255 }
2491
+ }
2492
+ },
2313
2493
  EmailNotificationRuleInput: {
2314
2494
  type: 'object',
2315
2495
  properties: {
@@ -2447,6 +2627,57 @@ export const SCHEMAS = {
2447
2627
  },
2448
2628
  label: { type: 'string' }
2449
2629
  },
2630
+ discriminator: {
2631
+ propertyName: 'type',
2632
+ mapping: {
2633
+ TextField: 'TextFieldInput',
2634
+ TextArea: 'TextAreaInput',
2635
+ NumberField: 'NumberFieldInput',
2636
+ EmailField: 'EmailFieldInput',
2637
+ MobileField: 'MobileFieldInput',
2638
+ IdCardField: 'IdCardFieldInput',
2639
+ NameField: 'NameFieldInput',
2640
+ RadioButton: 'RadioButtonInput',
2641
+ CheckBox: 'CheckBoxInput',
2642
+ DropDown: 'DropDownInput',
2643
+ DateTimeField: 'DateTimeFieldInput',
2644
+ RatingField: 'RatingFieldInput',
2645
+ TableField: 'TableFieldInput',
2646
+ TelephoneField: 'TelephoneFieldInput',
2647
+ AddressField: 'AddressFieldInput',
2648
+ AttachmentField: 'AttachmentFieldInput',
2649
+ GeoField: 'GeoFieldInput',
2650
+ LinkField: 'LinkFieldInput',
2651
+ NpsField: 'NpsFieldInput',
2652
+ TimeField: 'TimeFieldInput',
2653
+ SortField: 'SortFieldInput',
2654
+ ESignatureField: 'ESignatureFieldInput',
2655
+ AudioField: 'AudioFieldInput',
2656
+ CascadeDropDown: 'CascadeDropDownInput',
2657
+ LikertField: 'LikertFieldInput',
2658
+ MatrixField: 'MatrixFieldInput',
2659
+ MatrixScaleField: 'MatrixScaleFieldInput',
2660
+ GoodsField: 'GoodsFieldInput',
2661
+ FormulaField: 'FormulaFieldInput',
2662
+ ReservationField: 'ReservationFieldInput',
2663
+ FormAssociation: 'FormAssociationInput',
2664
+ ImageRadioButton: 'ImageRadioButtonInput',
2665
+ ImageCheckBox: 'ImageCheckBoxInput',
2666
+ SectionBreak: 'SectionBreakInput',
2667
+ PageBreak: 'PageBreakInput',
2668
+ WidgetButton: 'WidgetButtonInput',
2669
+ WidgetContact: 'WidgetContactInput',
2670
+ WidgetMap: 'WidgetMapInput',
2671
+ WidgetMarquee: 'WidgetMarqueeInput',
2672
+ SingleSelect: 'SingleSelectInput',
2673
+ MultiSelect: 'MultiSelectInput',
2674
+ ImageSingleSelect: 'ImageSingleSelectInput',
2675
+ ImageMultiSelect: 'ImageMultiSelectInput',
2676
+ DropDownSelect: 'DropDownSelectInput',
2677
+ Rating: 'RatingInput',
2678
+ Nps: 'NpsInput'
2679
+ }
2680
+ },
2450
2681
  oneOf: [
2451
2682
  { $ref: 'TextFieldInput' },
2452
2683
  { $ref: 'TextAreaInput' },
@@ -2608,6 +2839,61 @@ export const SCHEMAS = {
2608
2839
  },
2609
2840
  label: { type: 'string' }
2610
2841
  },
2842
+ discriminator: {
2843
+ propertyName: 'type',
2844
+ mapping: {
2845
+ TextField: 'TextFieldInput',
2846
+ TextArea: 'TextAreaInput',
2847
+ NumberField: 'NumberFieldInput',
2848
+ EmailField: 'EmailFieldInput',
2849
+ MobileField: 'MobileFieldInput',
2850
+ IdCardField: 'IdCardFieldInput',
2851
+ NameField: 'NameFieldInput',
2852
+ RadioButton: 'RadioButtonInput',
2853
+ CheckBox: 'CheckBoxInput',
2854
+ DropDown: 'DropDownInput',
2855
+ DateTimeField: 'DateTimeFieldInput',
2856
+ RatingField: 'RatingFieldInput',
2857
+ TableField: 'TableFieldInput',
2858
+ TelephoneField: 'TelephoneFieldInput',
2859
+ AddressField: 'AddressFieldInput',
2860
+ AttachmentField: 'AttachmentFieldInput',
2861
+ GeoField: 'GeoFieldInput',
2862
+ LinkField: 'LinkFieldInput',
2863
+ NpsField: 'NpsFieldInput',
2864
+ TimeField: 'TimeFieldInput',
2865
+ SortField: 'SortFieldInput',
2866
+ ESignatureField: 'ESignatureFieldInput',
2867
+ AudioField: 'AudioFieldInput',
2868
+ CascadeDropDown: 'CascadeDropDownInput',
2869
+ LikertField: 'LikertFieldInput',
2870
+ MatrixField: 'MatrixFieldInput',
2871
+ MatrixScaleField: 'MatrixScaleFieldInput',
2872
+ GoodsField: 'GoodsFieldInput',
2873
+ FormulaField: 'FormulaFieldInput',
2874
+ ReservationField: 'ReservationFieldInput',
2875
+ FormAssociation: 'FormAssociationInput',
2876
+ ImageRadioButton: 'ImageRadioButtonInput',
2877
+ ImageCheckBox: 'ImageCheckBoxInput',
2878
+ SectionBreak: 'SectionBreakInput',
2879
+ PageBreak: 'PageBreakInput',
2880
+ WidgetButton: 'WidgetButtonInput',
2881
+ WidgetContact: 'WidgetContactInput',
2882
+ WidgetMap: 'WidgetMapInput',
2883
+ WidgetMarquee: 'WidgetMarqueeInput',
2884
+ SingleSelect: 'SingleSelectInput',
2885
+ MultiSelect: 'MultiSelectInput',
2886
+ ImageSingleSelect: 'ImageSingleSelectInput',
2887
+ ImageMultiSelect: 'ImageMultiSelectInput',
2888
+ TrueOrFalse: 'TrueOrFalseInput',
2889
+ DropDownSelect: 'DropDownSelectInput',
2890
+ FillInBlank: 'FillInBlankInput',
2891
+ ShortAnswer: 'ShortAnswerInput',
2892
+ FillInNumber: 'FillInNumberInput',
2893
+ Department: 'DepartmentInput',
2894
+ Grade: 'GradeInput'
2895
+ }
2896
+ },
2611
2897
  oneOf: [
2612
2898
  { $ref: 'TextFieldInput' },
2613
2899
  { $ref: 'TextAreaInput' },
@@ -2669,7 +2955,47 @@ export const SCHEMAS = {
2669
2955
  limited_time: { type: 'integer', minimum: 1, maximum: 9999 },
2670
2956
  need_attention: { type: 'string' },
2671
2957
  success_message_rich_text: { type: 'string' },
2672
- interval_comments: { type: 'array', items: { $ref: 'FormIntervalCommentInput' } }
2958
+ interval_comments: { type: 'array', items: { $ref: 'FormIntervalCommentInput' } },
2959
+ random_questions: {
2960
+ type: 'object',
2961
+ properties: {
2962
+ enabled: { type: 'boolean' },
2963
+ mode: { type: 'string', enum: ['by_type', 'from_all'] },
2964
+ count: { type: 'integer', minimum: 1 },
2965
+ question_types: {
2966
+ type: 'array',
2967
+ minItems: 1,
2968
+ items: {
2969
+ type: 'object',
2970
+ required: ['question_type', 'count'],
2971
+ properties: {
2972
+ question_type: {
2973
+ type: 'string',
2974
+ enum: [
2975
+ 'single_select_only_fields',
2976
+ 'multi_select_fields',
2977
+ 'true_or_false_fields',
2978
+ 'simple_text_fields',
2979
+ 'multi_text_fields'
2980
+ ]
2981
+ },
2982
+ count: { type: 'integer', minimum: 0 }
2983
+ },
2984
+ additionalProperties: false
2985
+ }
2986
+ },
2987
+ shuffle: { type: 'boolean' }
2988
+ },
2989
+ additionalProperties: false,
2990
+ allOf: [
2991
+ { if: { properties: { enabled: { const: true } }, required: ['enabled'] }, then: { required: ['mode'] } },
2992
+ {
2993
+ if: { properties: { mode: { const: 'by_type' } }, required: ['mode'] },
2994
+ then: { required: ['question_types'] }
2995
+ },
2996
+ { if: { properties: { mode: { const: 'from_all' } }, required: ['mode'] }, then: { required: ['count'] } }
2997
+ ]
2998
+ }
2673
2999
  },
2674
3000
  additionalProperties: false
2675
3001
  },
@@ -2738,6 +3064,50 @@ export const SCHEMAS = {
2738
3064
  },
2739
3065
  label: { type: 'string' }
2740
3066
  },
3067
+ discriminator: {
3068
+ propertyName: 'type',
3069
+ mapping: {
3070
+ TextField: 'TextFieldInput',
3071
+ TextArea: 'TextAreaInput',
3072
+ NumberField: 'NumberFieldInput',
3073
+ EmailField: 'EmailFieldInput',
3074
+ MobileField: 'MobileFieldInput',
3075
+ IdCardField: 'IdCardFieldInput',
3076
+ NameField: 'NameFieldInput',
3077
+ RadioButton: 'RadioButtonInput',
3078
+ CheckBox: 'CheckBoxInput',
3079
+ DropDown: 'DropDownInput',
3080
+ DateTimeField: 'DateTimeFieldInput',
3081
+ RatingField: 'RatingFieldInput',
3082
+ TableField: 'TableFieldInput',
3083
+ TelephoneField: 'TelephoneFieldInput',
3084
+ AddressField: 'AddressFieldInput',
3085
+ AttachmentField: 'AttachmentFieldInput',
3086
+ GeoField: 'GeoFieldInput',
3087
+ LinkField: 'LinkFieldInput',
3088
+ NpsField: 'NpsFieldInput',
3089
+ TimeField: 'TimeFieldInput',
3090
+ SortField: 'SortFieldInput',
3091
+ ESignatureField: 'ESignatureFieldInput',
3092
+ AudioField: 'AudioFieldInput',
3093
+ CascadeDropDown: 'CascadeDropDownInput',
3094
+ LikertField: 'LikertFieldInput',
3095
+ MatrixField: 'MatrixFieldInput',
3096
+ MatrixScaleField: 'MatrixScaleFieldInput',
3097
+ GoodsField: 'GoodsFieldInput',
3098
+ FormulaField: 'FormulaFieldInput',
3099
+ ReservationField: 'ReservationFieldInput',
3100
+ FormAssociation: 'FormAssociationInput',
3101
+ ImageRadioButton: 'ImageRadioButtonInput',
3102
+ ImageCheckBox: 'ImageCheckBoxInput',
3103
+ SectionBreak: 'SectionBreakInput',
3104
+ PageBreak: 'PageBreakInput',
3105
+ WidgetButton: 'WidgetButtonInput',
3106
+ WidgetContact: 'WidgetContactInput',
3107
+ WidgetMap: 'WidgetMapInput',
3108
+ WidgetMarquee: 'WidgetMarqueeInput'
3109
+ }
3110
+ },
2741
3111
  oneOf: [
2742
3112
  { $ref: 'TextFieldInput' },
2743
3113
  { $ref: 'TextAreaInput' },
@@ -2937,8 +3307,9 @@ export const SCHEMAS = {
2937
3307
  unit: { type: 'string', maxLength: 2 },
2938
3308
  collapse_on_mobile: { type: 'boolean' },
2939
3309
  columns_on_mobile: { type: 'integer', minimum: 1 },
3310
+ formula: { type: 'string' },
2940
3311
  formula_display: { type: 'string' },
2941
- result_display_type: { type: 'string', enum: ['string', 'numeric', 'datetime'] },
3312
+ result_display_type: { type: 'string', enum: ['string', 'numeric', 'datetime', 'boolean'] },
2942
3313
  result_display_as_date: { type: 'boolean' },
2943
3314
  allow_multiple_items: { type: 'boolean' },
2944
3315
  item_allow_multiple_reservations: { type: 'boolean' },
@@ -3200,7 +3571,8 @@ export const SCHEMAS = {
3200
3571
  cycles_per_period: { type: 'integer', minimum: 1, maximum: 1000 },
3201
3572
  limited_time: { type: 'integer', minimum: 1 },
3202
3573
  limited_field_api_codes: { type: 'array', items: { type: 'string' } }
3203
- }
3574
+ },
3575
+ additionalProperties: false
3204
3576
  },
3205
3577
  FormFolderMoveInput: {
3206
3578
  type: 'object',
@@ -3257,6 +3629,7 @@ export const SCHEMAS = {
3257
3629
  ]
3258
3630
  },
3259
3631
  weixin_limited: { type: 'boolean' },
3632
+ locale: { type: 'string', enum: ['zh-CN', 'zh-TW', 'en'] },
3260
3633
  entry_post_url: { type: 'string' },
3261
3634
  post_new_entry: { type: 'boolean' },
3262
3635
  post_updated_entry: { type: 'boolean' },
@@ -3340,6 +3713,7 @@ export const SCHEMAS = {
3340
3713
  weixin_limited: { type: 'boolean' },
3341
3714
  submission_region_limited: { type: 'boolean' },
3342
3715
  submission_regions: { type: 'array', items: { type: 'string' } },
3716
+ locale: { type: 'string', enum: ['zh-CN', 'zh-TW', 'en'] },
3343
3717
  merchant_account_id: { type: ['string', 'null'] },
3344
3718
  wxpay_account_id: { type: ['string', 'null'] },
3345
3719
  alipay_account_id: { type: ['string', 'null'] },
@@ -3399,7 +3773,12 @@ export const SCHEMAS = {
3399
3773
  FormViewFilterCondition: {
3400
3774
  type: 'object',
3401
3775
  required: ['field', 'operator'],
3402
- properties: { field: { type: 'string' }, operator: { type: 'string' }, value: {} }
3776
+ properties: {
3777
+ field: { type: 'string' },
3778
+ operator: { type: 'string' },
3779
+ value: {},
3780
+ scope_attr: { type: 'string', enum: ['date_time'] }
3781
+ }
3403
3782
  },
3404
3783
  FormViewInput: {
3405
3784
  type: 'object',
@@ -3454,8 +3833,9 @@ export const SCHEMAS = {
3454
3833
  private: { type: 'boolean' },
3455
3834
  required: { type: 'boolean' },
3456
3835
  position: { type: 'integer', minimum: 0 },
3836
+ formula: { type: 'string' },
3457
3837
  formula_display: { type: 'string' },
3458
- result_display_type: { type: 'string', enum: ['string', 'numeric', 'datetime'] },
3838
+ result_display_type: { type: 'string', enum: ['string', 'numeric', 'datetime', 'boolean'] },
3459
3839
  result_display_as_date: { type: 'boolean' },
3460
3840
  precision: { type: 'integer', minimum: 0, maximum: 14 },
3461
3841
  display_precision: { type: 'integer', minimum: 0 },
@@ -3954,6 +4334,111 @@ export const SCHEMAS = {
3954
4334
  horizontal_on_mobile: { type: 'boolean' }
3955
4335
  }
3956
4336
  },
4337
+ MemoryCallId: { type: 'string', minLength: 1, maxLength: 100 },
4338
+ MemoryKind: { type: 'string', enum: ['background', 'preference'] },
4339
+ MemoryListedScope: { type: ['string', 'null'] },
4340
+ MemoryListedText: { type: 'string', pattern: '\\S' },
4341
+ MemoryNoteContent: {
4342
+ type: 'object',
4343
+ additionalProperties: false,
4344
+ required: ['text'],
4345
+ properties: { text: { $ref: 'MemoryListedText' }, scope: { $ref: 'MemoryListedScope' } }
4346
+ },
4347
+ MemoryNoteInput: {
4348
+ type: 'object',
4349
+ additionalProperties: false,
4350
+ required: ['call_id', 'kind', 'text', 'quote', 'source'],
4351
+ properties: {
4352
+ call_id: { $ref: 'MemoryCallId' },
4353
+ kind: { $ref: 'MemoryKind' },
4354
+ text: { $ref: 'MemoryNoteText' },
4355
+ scope: { $ref: 'MemoryNoteScope' },
4356
+ quote: { $ref: 'MemoryNoteQuote' },
4357
+ source: { $ref: 'MemorySource' }
4358
+ }
4359
+ },
4360
+ MemoryNoteQuote: { type: 'string', minLength: 1, maxLength: 120 },
4361
+ MemoryNoteScope: { type: ['string', 'null'], maxLength: 20 },
4362
+ MemoryNoteText: { type: 'string', minLength: 1, maxLength: 40 },
4363
+ MemoryNoteUpdateInput: {
4364
+ type: 'object',
4365
+ additionalProperties: false,
4366
+ required: ['call_id', 'current', 'kind', 'text', 'quote'],
4367
+ properties: {
4368
+ call_id: { $ref: 'MemoryCallId' },
4369
+ current: { $ref: 'MemoryNoteContent' },
4370
+ kind: { $ref: 'MemoryKind' },
4371
+ text: { $ref: 'MemoryNoteText' },
4372
+ scope: { $ref: 'MemoryNoteScope' },
4373
+ quote: { $ref: 'MemoryNoteQuote' }
4374
+ }
4375
+ },
4376
+ MemoryNotesDeleteInput: {
4377
+ type: 'object',
4378
+ additionalProperties: false,
4379
+ required: ['call_id', 'notes'],
4380
+ properties: {
4381
+ call_id: { $ref: 'MemoryCallId' },
4382
+ notes: {
4383
+ type: 'array',
4384
+ minItems: 1,
4385
+ maxItems: 20,
4386
+ items: {
4387
+ type: 'object',
4388
+ additionalProperties: false,
4389
+ required: ['number', 'text'],
4390
+ properties: {
4391
+ number: { type: 'integer', minimum: 1 },
4392
+ text: { $ref: 'MemoryListedText' },
4393
+ scope: { $ref: 'MemoryListedScope' }
4394
+ }
4395
+ }
4396
+ }
4397
+ }
4398
+ },
4399
+ MemorySource: { type: 'string', enum: ['asked', 'inferred'] },
4400
+ MessageChannelCreateInput: {
4401
+ oneOf: [
4402
+ { $ref: 'EmailMessageChannelInput' },
4403
+ { $ref: 'SMSMessageChannelInput' },
4404
+ { $ref: 'DingTalkMessageChannelInput' },
4405
+ { $ref: 'WxworkMessageChannelInput' },
4406
+ { $ref: 'WebhookMessageChannelInput' }
4407
+ ],
4408
+ discriminator: {
4409
+ propertyName: 'type',
4410
+ mapping: {
4411
+ email: 'EmailMessageChannelInput',
4412
+ sms: 'SMSMessageChannelInput',
4413
+ ding_talk: 'DingTalkMessageChannelInput',
4414
+ wxwork: 'WxworkMessageChannelInput',
4415
+ webhook: 'WebhookMessageChannelInput'
4416
+ }
4417
+ }
4418
+ },
4419
+ MessageChannelName: { type: 'string', maxLength: 50 },
4420
+ MessageInput: {
4421
+ oneOf: [
4422
+ { $ref: 'EmailMessageInput' },
4423
+ { $ref: 'SMSMessageInput' },
4424
+ { $ref: 'RobotMessageInput' },
4425
+ { $ref: 'WebhookMessageInput' }
4426
+ ],
4427
+ discriminator: {
4428
+ propertyName: 'type',
4429
+ mapping: {
4430
+ email: 'EmailMessageInput',
4431
+ sms: 'SMSMessageInput',
4432
+ ding_talk: 'RobotMessageInput',
4433
+ wxwork: 'RobotMessageInput',
4434
+ webhook: 'WebhookMessageInput'
4435
+ }
4436
+ }
4437
+ },
4438
+ MessageRecipients: { type: 'array', minItems: 1, maxItems: 50, uniqueItems: true, items: { type: 'string' } },
4439
+ MessageSource: { type: 'string', enum: ['api', 'jiri', 'routine'] },
4440
+ MessageStatus: { type: 'string', enum: ['queued', 'sending', 'succeeded', 'failed'] },
4441
+ MessageType: { type: 'string', enum: ['email', 'sms', 'ding_talk', 'wxwork', 'webhook'] },
3957
4442
  MobileFieldInput: {
3958
4443
  type: 'object',
3959
4444
  additionalProperties: false,
@@ -4092,7 +4577,8 @@ export const SCHEMAS = {
4092
4577
  ]
4093
4578
  },
4094
4579
  value: {},
4095
- group_index: { type: 'integer' }
4580
+ group_index: { type: 'integer' },
4581
+ scope_attr: { type: ['string', 'null'], enum: ['date_time', null] }
4096
4582
  },
4097
4583
  additionalProperties: false
4098
4584
  },
@@ -4536,10 +5022,39 @@ export const SCHEMAS = {
4536
5022
  type: 'object',
4537
5023
  required: ['type'],
4538
5024
  properties: { type: { type: 'string', enum: ['by_day_repeat_weekly', 'by_time_range_repeat_daily'] } },
5025
+ discriminator: {
5026
+ propertyName: 'type',
5027
+ mapping: {
5028
+ by_day_repeat_weekly: 'ReservationByDayQuotaInput',
5029
+ by_time_range_repeat_daily: 'ReservationByTimeRangeQuotaInput'
5030
+ }
5031
+ },
4539
5032
  oneOf: [{ $ref: 'ReservationByDayQuotaInput' }, { $ref: 'ReservationByTimeRangeQuotaInput' }]
4540
5033
  }
4541
5034
  }
4542
5035
  },
5036
+ RobotMessageInput: {
5037
+ type: 'object',
5038
+ additionalProperties: false,
5039
+ required: ['type', 'channel_id', 'content'],
5040
+ properties: {
5041
+ type: { type: 'string', enum: ['ding_talk', 'wxwork'] },
5042
+ channel_id: { type: 'string' },
5043
+ title: { type: 'string', maxLength: 200 },
5044
+ content: { type: 'string' },
5045
+ mentioned_mobile_list: { type: 'array', maxItems: 50, uniqueItems: true, items: { type: 'string' } },
5046
+ idempotency_key: { type: 'string', maxLength: 255 }
5047
+ }
5048
+ },
5049
+ RoutineDataConditionInput: {
5050
+ type: 'object',
5051
+ required: ['scope_conditions'],
5052
+ properties: {
5053
+ source_kind: { type: 'string' },
5054
+ source_token: { type: 'string' },
5055
+ scope_conditions: { type: 'array', items: { $ref: 'RoutineScopeCondition' } }
5056
+ }
5057
+ },
4543
5058
  RoutineEventInput: {
4544
5059
  type: 'object',
4545
5060
  properties: {
@@ -4547,19 +5062,7 @@ export const SCHEMAS = {
4547
5062
  source_token: { type: 'string' },
4548
5063
  on: { type: 'string' },
4549
5064
  field_codes: { type: 'array', items: { type: 'string' } },
4550
- scope_conditions: {
4551
- type: 'array',
4552
- items: {
4553
- type: 'object',
4554
- properties: {
4555
- trigger: { type: 'string' },
4556
- operator: { type: 'string' },
4557
- value: {},
4558
- group_index: { type: 'integer' },
4559
- scope_attr: { type: 'string' }
4560
- }
4561
- }
4562
- },
5065
+ scope_conditions: { type: 'array', items: { $ref: 'RoutineScopeCondition' } },
4563
5066
  include_bulk: { type: 'boolean' }
4564
5067
  }
4565
5068
  },
@@ -4577,6 +5080,7 @@ export const SCHEMAS = {
4577
5080
  trigger_kind: { type: ['string', 'null'] },
4578
5081
  schedule: { oneOf: [{ $ref: 'RoutineScheduleInput' }, { type: 'null' }] },
4579
5082
  event: { oneOf: [{ $ref: 'RoutineEventInput' }, { type: 'null' }] },
5083
+ data_condition: { oneOf: [{ $ref: 'RoutineDataConditionInput' }, { type: 'null' }] },
4580
5084
  delete_authorized: {}
4581
5085
  }
4582
5086
  },
@@ -4591,6 +5095,38 @@ export const SCHEMAS = {
4591
5095
  month_days: { type: 'array', items: { type: 'integer' } }
4592
5096
  }
4593
5097
  },
5098
+ RoutineScopeCondition: {
5099
+ type: 'object',
5100
+ properties: {
5101
+ trigger: { type: 'string' },
5102
+ operator: { type: 'string' },
5103
+ value: {},
5104
+ group_index: { type: 'integer' },
5105
+ scope_attr: { type: 'string' }
5106
+ }
5107
+ },
5108
+ SMSMessageChannelInput: {
5109
+ type: 'object',
5110
+ additionalProperties: false,
5111
+ required: ['type', 'name', 'sms_template_id'],
5112
+ properties: {
5113
+ type: { type: 'string', enum: ['sms'] },
5114
+ name: { $ref: 'MessageChannelName' },
5115
+ sms_template_id: { type: 'string' }
5116
+ }
5117
+ },
5118
+ SMSMessageInput: {
5119
+ type: 'object',
5120
+ additionalProperties: false,
5121
+ required: ['type', 'channel_id', 'to'],
5122
+ properties: {
5123
+ type: { type: 'string', enum: ['sms'] },
5124
+ channel_id: { type: 'string' },
5125
+ to: { $ref: 'MessageRecipients' },
5126
+ variables: { type: 'object', additionalProperties: { type: 'string', maxLength: 100 } },
5127
+ idempotency_key: { type: 'string', maxLength: 255 }
5128
+ }
5129
+ },
4594
5130
  SMSNotificationRuleInput: {
4595
5131
  type: 'object',
4596
5132
  properties: {
@@ -4713,6 +5249,7 @@ export const SCHEMAS = {
4713
5249
  field: { type: 'string' },
4714
5250
  api_code: { type: 'string' },
4715
5251
  trigger: { type: 'string' },
5252
+ scope_attr: { type: 'string', enum: ['date_time'] },
4716
5253
  operator: {
4717
5254
  type: 'string',
4718
5255
  enum: [
@@ -4910,6 +5447,24 @@ export const SCHEMAS = {
4910
5447
  },
4911
5448
  label: { type: 'string' }
4912
5449
  },
5450
+ discriminator: {
5451
+ propertyName: 'type',
5452
+ mapping: {
5453
+ TextArea: 'TextAreaInput',
5454
+ RadioButton: 'RadioButtonInput',
5455
+ CheckBox: 'CheckBoxInput',
5456
+ BooleanField: 'BooleanFieldInput',
5457
+ MobileField: 'MobileFieldInput',
5458
+ NumberField: 'NumberFieldInput',
5459
+ DateTimeField: 'DateTimeFieldInput',
5460
+ EmailField: 'EmailFieldInput',
5461
+ LinkField: 'LinkFieldInput',
5462
+ AttachmentField: 'AttachmentFieldInput',
5463
+ FormulaField: 'FormulaFieldInput',
5464
+ RelationField: 'RelationFieldInput',
5465
+ SequenceField: 'SequenceFieldInput'
5466
+ }
5467
+ },
4913
5468
  oneOf: [
4914
5469
  { $ref: 'TextAreaInput' },
4915
5470
  { $ref: 'RadioButtonInput' },
@@ -5170,6 +5725,28 @@ export const SCHEMAS = {
5170
5725
  ]
5171
5726
  },
5172
5727
  WebhookInput: { type: 'object', properties: { entry_post_url: { type: 'string' } }, additionalProperties: false },
5728
+ WebhookMessageChannelInput: {
5729
+ type: 'object',
5730
+ additionalProperties: false,
5731
+ required: ['type', 'name', 'url'],
5732
+ properties: {
5733
+ type: { type: 'string', enum: ['webhook'] },
5734
+ name: { $ref: 'MessageChannelName' },
5735
+ url: { type: 'string', maxLength: 2000 }
5736
+ }
5737
+ },
5738
+ WebhookMessageInput: {
5739
+ type: 'object',
5740
+ additionalProperties: false,
5741
+ required: ['type', 'channel_id', 'content'],
5742
+ properties: {
5743
+ type: { type: 'string', enum: ['webhook'] },
5744
+ channel_id: { type: 'string' },
5745
+ title: { type: 'string', maxLength: 200 },
5746
+ content: { type: 'string' },
5747
+ idempotency_key: { type: 'string', maxLength: 255 }
5748
+ }
5749
+ },
5173
5750
  WebhookNotificationRuleInput: {
5174
5751
  type: 'object',
5175
5752
  properties: {
@@ -5293,6 +5870,16 @@ export const SCHEMAS = {
5293
5870
  marquee_data_type: { type: 'string', enum: ['fake', 'real'] }
5294
5871
  }
5295
5872
  },
5873
+ WxworkMessageChannelInput: {
5874
+ type: 'object',
5875
+ additionalProperties: false,
5876
+ required: ['type', 'name', 'url'],
5877
+ properties: {
5878
+ type: { type: 'string', enum: ['wxwork'] },
5879
+ name: { $ref: 'MessageChannelName' },
5880
+ url: { type: 'string' }
5881
+ }
5882
+ },
5296
5883
  WxworkNotificationRuleInput: {
5297
5884
  type: 'object',
5298
5885
  properties: {