@jinshuju/cli 0.12.0 → 0.14.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.
@@ -8,10 +8,25 @@ export const OPERATIONS = {
8
8
  path: '/forms/{form_token}/entries/aggregate',
9
9
  parameters: [
10
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' } },
11
+ {
12
+ name: 'metrics',
13
+ in: 'query',
14
+ content: 'application/json',
15
+ schema: { type: 'array', items: { $ref: 'AggregateMetric' } }
16
+ },
17
+ {
18
+ name: 'dimensions',
19
+ in: 'query',
20
+ content: 'application/json',
21
+ schema: { type: 'array', items: { $ref: 'AggregateDimension' } }
22
+ },
13
23
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
14
- { name: 'filters', in: 'query', schema: { type: 'string' } },
24
+ {
25
+ name: 'filters',
26
+ in: 'query',
27
+ content: 'application/json',
28
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
29
+ },
15
30
  { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
16
31
  ]
17
32
  },
@@ -21,10 +36,25 @@ export const OPERATIONS = {
21
36
  parameters: [
22
37
  { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
23
38
  { 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' } },
39
+ {
40
+ name: 'metrics',
41
+ in: 'query',
42
+ content: 'application/json',
43
+ schema: { type: 'array', items: { $ref: 'AggregateMetric' } }
44
+ },
45
+ {
46
+ name: 'dimensions',
47
+ in: 'query',
48
+ content: 'application/json',
49
+ schema: { type: 'array', items: { $ref: 'AggregateDimension' } }
50
+ },
26
51
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
27
- { name: 'filters', in: 'query', schema: { type: 'string' } },
52
+ {
53
+ name: 'filters',
54
+ in: 'query',
55
+ content: 'application/json',
56
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
57
+ },
28
58
  { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
29
59
  ]
30
60
  },
@@ -33,10 +63,25 @@ export const OPERATIONS = {
33
63
  path: '/tables/{table_token}/entries/aggregate',
34
64
  parameters: [
35
65
  { 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' } },
66
+ {
67
+ name: 'metrics',
68
+ in: 'query',
69
+ content: 'application/json',
70
+ schema: { type: 'array', items: { $ref: 'AggregateMetric' } }
71
+ },
72
+ {
73
+ name: 'dimensions',
74
+ in: 'query',
75
+ content: 'application/json',
76
+ schema: { type: 'array', items: { $ref: 'AggregateDimension' } }
77
+ },
38
78
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
39
- { name: 'filters', in: 'query', schema: { type: 'string' } },
79
+ {
80
+ name: 'filters',
81
+ in: 'query',
82
+ content: 'application/json',
83
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
84
+ },
40
85
  { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
41
86
  ]
42
87
  },
@@ -46,10 +91,25 @@ export const OPERATIONS = {
46
91
  parameters: [
47
92
  { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
48
93
  { 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' } },
94
+ {
95
+ name: 'metrics',
96
+ in: 'query',
97
+ content: 'application/json',
98
+ schema: { type: 'array', items: { $ref: 'AggregateMetric' } }
99
+ },
100
+ {
101
+ name: 'dimensions',
102
+ in: 'query',
103
+ content: 'application/json',
104
+ schema: { type: 'array', items: { $ref: 'AggregateDimension' } }
105
+ },
51
106
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
52
- { name: 'filters', in: 'query', schema: { type: 'string' } },
107
+ {
108
+ name: 'filters',
109
+ in: 'query',
110
+ content: 'application/json',
111
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
112
+ },
53
113
  { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
54
114
  ]
55
115
  },
@@ -78,7 +138,13 @@ export const OPERATIONS = {
78
138
  path: '/forms/{form_token}/fields/check',
79
139
  parameters: [
80
140
  { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
81
- { name: 'checks', in: 'query', required: true, schema: { type: 'string' } }
141
+ {
142
+ name: 'checks',
143
+ in: 'query',
144
+ required: true,
145
+ content: 'application/json',
146
+ schema: { type: 'array', items: { $ref: 'FieldDataCheck' } }
147
+ }
82
148
  ]
83
149
  },
84
150
  checkTableFieldData: {
@@ -86,7 +152,13 @@ export const OPERATIONS = {
86
152
  path: '/tables/{table_token}/fields/check',
87
153
  parameters: [
88
154
  { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
89
- { name: 'checks', in: 'query', required: true, schema: { type: 'string' } }
155
+ {
156
+ name: 'checks',
157
+ in: 'query',
158
+ required: true,
159
+ content: 'application/json',
160
+ schema: { type: 'array', items: { $ref: 'FieldDataCheck' } }
161
+ }
90
162
  ]
91
163
  },
92
164
  copyForm: {
@@ -100,7 +172,12 @@ export const OPERATIONS = {
100
172
  path: '/forms/{form_token}/entries/count',
101
173
  parameters: [
102
174
  { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
103
- { name: 'filters', in: 'query', schema: { type: 'string' } },
175
+ {
176
+ name: 'filters',
177
+ in: 'query',
178
+ content: 'application/json',
179
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
180
+ },
104
181
  { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
105
182
  ]
106
183
  },
@@ -108,8 +185,13 @@ export const OPERATIONS = {
108
185
  method: 'GET',
109
186
  path: '/entries/count',
110
187
  parameters: [
111
- { name: 'form_tokens', in: 'query', schema: { type: 'string' } },
112
- { name: 'filters', in: 'query', schema: { type: 'string' } }
188
+ { name: 'form_tokens', in: 'query', explode: false, schema: { type: 'array', items: { type: 'string' } } },
189
+ {
190
+ name: 'filters',
191
+ in: 'query',
192
+ content: 'application/json',
193
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
194
+ }
113
195
  ]
114
196
  },
115
197
  countFormViewEntries: {
@@ -118,7 +200,12 @@ export const OPERATIONS = {
118
200
  parameters: [
119
201
  { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
120
202
  { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } },
121
- { name: 'filters', in: 'query', schema: { type: 'string' } },
203
+ {
204
+ name: 'filters',
205
+ in: 'query',
206
+ content: 'application/json',
207
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
208
+ },
122
209
  { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
123
210
  ]
124
211
  },
@@ -127,7 +214,12 @@ export const OPERATIONS = {
127
214
  path: '/tables/{table_token}/entries/count',
128
215
  parameters: [
129
216
  { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
130
- { name: 'filters', in: 'query', schema: { type: 'string' } },
217
+ {
218
+ name: 'filters',
219
+ in: 'query',
220
+ content: 'application/json',
221
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
222
+ },
131
223
  { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
132
224
  ]
133
225
  },
@@ -137,7 +229,12 @@ export const OPERATIONS = {
137
229
  parameters: [
138
230
  { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
139
231
  { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } },
140
- { name: 'filters', in: 'query', schema: { type: 'string' } },
232
+ {
233
+ name: 'filters',
234
+ in: 'query',
235
+ content: 'application/json',
236
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
237
+ },
141
238
  { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
142
239
  ]
143
240
  },
@@ -400,7 +497,7 @@ export const OPERATIONS = {
400
497
  parameters: [
401
498
  { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
402
499
  { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } },
403
- { name: 'fields', in: 'query', schema: { type: 'string' } },
500
+ { name: 'fields', in: 'query', explode: false, schema: { type: 'array', items: { type: 'string' } } },
404
501
  { name: 'include_labels', in: 'query', schema: { type: 'boolean' } }
405
502
  ]
406
503
  },
@@ -500,7 +597,7 @@ export const OPERATIONS = {
500
597
  parameters: [
501
598
  { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
502
599
  { name: 'serial_number', in: 'path', required: true, schema: { type: 'integer' } },
503
- { name: 'fields', in: 'query', schema: { type: 'string' } },
600
+ { name: 'fields', in: 'query', explode: false, schema: { type: 'array', items: { type: 'string' } } },
504
601
  { name: 'include_labels', in: 'query', schema: { type: 'boolean' } }
505
602
  ]
506
603
  },
@@ -548,10 +645,20 @@ export const OPERATIONS = {
548
645
  path: '/forms/{form_token}/entries',
549
646
  parameters: [
550
647
  { 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' } },
648
+ { name: 'fields', in: 'query', explode: false, schema: { type: 'array', items: { type: 'string' } } },
649
+ {
650
+ name: 'filters',
651
+ in: 'query',
652
+ content: 'application/json',
653
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
654
+ },
553
655
  { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } },
554
- { name: 'sort', in: 'query', schema: { type: 'string' } },
656
+ {
657
+ name: 'sort',
658
+ in: 'query',
659
+ content: 'application/json',
660
+ schema: { type: 'array', items: { $ref: 'SortRule' } }
661
+ },
555
662
  { name: 'created_at', in: 'query', schema: { type: 'string' } },
556
663
  { name: 'next', in: 'query', schema: { type: ['integer', 'string'] } },
557
664
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } },
@@ -612,8 +719,18 @@ export const OPERATIONS = {
612
719
  path: '/forms',
613
720
  parameters: [
614
721
  { name: 'q', in: 'query', schema: { type: 'string' } },
615
- { name: 'filters', in: 'query', schema: { type: 'string' } },
616
- { name: 'sort', in: 'query', schema: { type: 'string' } },
722
+ {
723
+ name: 'filters',
724
+ in: 'query',
725
+ content: 'application/json',
726
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
727
+ },
728
+ {
729
+ name: 'sort',
730
+ in: 'query',
731
+ content: 'application/json',
732
+ schema: { type: 'array', items: { $ref: 'FormSortRule' } }
733
+ },
617
734
  { name: 'next', in: 'query', schema: { type: 'string' } },
618
735
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } },
619
736
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
@@ -634,8 +751,13 @@ export const OPERATIONS = {
634
751
  path: '/my/forms/{form_token}/entries',
635
752
  parameters: [
636
753
  { 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' } },
754
+ { name: 'fields', in: 'query', explode: false, schema: { type: 'array', items: { type: 'string' } } },
755
+ {
756
+ name: 'filters',
757
+ in: 'query',
758
+ content: 'application/json',
759
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
760
+ },
639
761
  { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } },
640
762
  { name: 'include_labels', in: 'query', schema: { type: 'boolean' } },
641
763
  { name: 'limit', in: 'query', schema: { type: 'integer' } },
@@ -660,10 +782,20 @@ export const OPERATIONS = {
660
782
  path: '/tables/{table_token}/entries',
661
783
  parameters: [
662
784
  { 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' } },
785
+ { name: 'fields', in: 'query', explode: false, schema: { type: 'array', items: { type: 'string' } } },
786
+ {
787
+ name: 'filters',
788
+ in: 'query',
789
+ content: 'application/json',
790
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
791
+ },
665
792
  { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } },
666
- { name: 'sort', in: 'query', schema: { type: 'string' } },
793
+ {
794
+ name: 'sort',
795
+ in: 'query',
796
+ content: 'application/json',
797
+ schema: { type: 'array', items: { $ref: 'SortRule' } }
798
+ },
667
799
  { name: 'created_at', in: 'query', schema: { type: 'string' } },
668
800
  { name: 'next', in: 'query', schema: { type: ['integer', 'string'] } },
669
801
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } },
@@ -699,8 +831,18 @@ export const OPERATIONS = {
699
831
  path: '/tables',
700
832
  parameters: [
701
833
  { name: 'q', in: 'query', schema: { type: 'string' } },
702
- { name: 'filters', in: 'query', schema: { type: 'string' } },
703
- { name: 'sort', in: 'query', schema: { type: 'string' } },
834
+ {
835
+ name: 'filters',
836
+ in: 'query',
837
+ content: 'application/json',
838
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
839
+ },
840
+ {
841
+ name: 'sort',
842
+ in: 'query',
843
+ content: 'application/json',
844
+ schema: { type: 'array', items: { $ref: 'FormSortRule' } }
845
+ },
704
846
  { name: 'next', in: 'query', schema: { type: 'string' } },
705
847
  { name: 'skip', in: 'query', schema: { type: 'integer', minimum: 0, maximum: 10000 } },
706
848
  { name: 'limit', in: 'query', schema: { type: 'integer' } }
@@ -798,7 +940,13 @@ export const OPERATIONS = {
798
940
  path: '/forms/{form_token}/fields/preview_convert',
799
941
  parameters: [
800
942
  { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
801
- { name: 'checks', in: 'query', required: true, schema: { type: 'string' } }
943
+ {
944
+ name: 'checks',
945
+ in: 'query',
946
+ required: true,
947
+ content: 'application/json',
948
+ schema: { type: 'array', items: { $ref: 'FieldTypeChangeCheck' } }
949
+ }
802
950
  ]
803
951
  },
804
952
  previewTableFieldTypeChange: {
@@ -806,7 +954,13 @@ export const OPERATIONS = {
806
954
  path: '/tables/{table_token}/fields/preview_convert',
807
955
  parameters: [
808
956
  { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
809
- { name: 'checks', in: 'query', required: true, schema: { type: 'string' } }
957
+ {
958
+ name: 'checks',
959
+ in: 'query',
960
+ required: true,
961
+ content: 'application/json',
962
+ schema: { type: 'array', items: { $ref: 'FieldTypeChangeCheck' } }
963
+ }
810
964
  ]
811
965
  },
812
966
  replaceEntry: {
@@ -832,8 +986,13 @@ export const OPERATIONS = {
832
986
  path: '/entries/search',
833
987
  parameters: [
834
988
  { 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' } }
989
+ { name: 'form_tokens', in: 'query', explode: false, schema: { type: 'array', items: { type: 'string' } } },
990
+ {
991
+ name: 'filters',
992
+ in: 'query',
993
+ content: 'application/json',
994
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
995
+ }
837
996
  ]
838
997
  },
839
998
  searchMySubmittedEntries: {
@@ -841,7 +1000,7 @@ export const OPERATIONS = {
841
1000
  path: '/my/search',
842
1001
  parameters: [
843
1002
  { name: 'keyword', in: 'query', required: true, schema: { type: 'string', minLength: 1 } },
844
- { name: 'form_tokens', in: 'query', schema: { type: 'string' } }
1003
+ { name: 'form_tokens', in: 'query', explode: false, schema: { type: 'array', items: { type: 'string' } } }
845
1004
  ]
846
1005
  },
847
1006
  summarizeEntries: {
@@ -849,9 +1008,14 @@ export const OPERATIONS = {
849
1008
  path: '/forms/{form_token}/entries/summary',
850
1009
  parameters: [
851
1010
  { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
852
- { name: 'fields', in: 'query', schema: { type: 'string' } },
1011
+ { name: 'fields', in: 'query', explode: false, schema: { type: 'array', items: { type: 'string' } } },
853
1012
  { name: 'include_overview', in: 'query', schema: { type: 'boolean' } },
854
- { name: 'filters', in: 'query', schema: { type: 'string' } },
1013
+ {
1014
+ name: 'filters',
1015
+ in: 'query',
1016
+ content: 'application/json',
1017
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
1018
+ },
855
1019
  { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
856
1020
  ]
857
1021
  },
@@ -861,9 +1025,14 @@ export const OPERATIONS = {
861
1025
  parameters: [
862
1026
  { name: 'form_token', in: 'path', required: true, schema: { type: 'string' } },
863
1027
  { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } },
864
- { name: 'fields', in: 'query', schema: { type: 'string' } },
1028
+ { name: 'fields', in: 'query', explode: false, schema: { type: 'array', items: { type: 'string' } } },
865
1029
  { name: 'include_overview', in: 'query', schema: { type: 'boolean' } },
866
- { name: 'filters', in: 'query', schema: { type: 'string' } },
1030
+ {
1031
+ name: 'filters',
1032
+ in: 'query',
1033
+ content: 'application/json',
1034
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
1035
+ },
867
1036
  { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
868
1037
  ]
869
1038
  },
@@ -872,9 +1041,14 @@ export const OPERATIONS = {
872
1041
  path: '/tables/{table_token}/entries/summary',
873
1042
  parameters: [
874
1043
  { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
875
- { name: 'fields', in: 'query', schema: { type: 'string' } },
1044
+ { name: 'fields', in: 'query', explode: false, schema: { type: 'array', items: { type: 'string' } } },
876
1045
  { name: 'include_overview', in: 'query', schema: { type: 'boolean' } },
877
- { name: 'filters', in: 'query', schema: { type: 'string' } },
1046
+ {
1047
+ name: 'filters',
1048
+ in: 'query',
1049
+ content: 'application/json',
1050
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
1051
+ },
878
1052
  { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
879
1053
  ]
880
1054
  },
@@ -884,9 +1058,14 @@ export const OPERATIONS = {
884
1058
  parameters: [
885
1059
  { name: 'table_token', in: 'path', required: true, schema: { type: 'string' } },
886
1060
  { name: 'view_token', in: 'path', required: true, schema: { type: 'string' } },
887
- { name: 'fields', in: 'query', schema: { type: 'string' } },
1061
+ { name: 'fields', in: 'query', explode: false, schema: { type: 'array', items: { type: 'string' } } },
888
1062
  { name: 'include_overview', in: 'query', schema: { type: 'boolean' } },
889
- { name: 'filters', in: 'query', schema: { type: 'string' } },
1063
+ {
1064
+ name: 'filters',
1065
+ in: 'query',
1066
+ content: 'application/json',
1067
+ schema: { type: 'array', items: { $ref: 'ScopeCondition' } }
1068
+ },
890
1069
  { name: 'keyword', in: 'query', schema: { type: 'string', maxLength: 200 } }
891
1070
  ]
892
1071
  },
@@ -1159,6 +1338,36 @@ export const SCHEMAS = {
1159
1338
  enable_auto_position: { type: 'boolean' }
1160
1339
  }
1161
1340
  },
1341
+ AggregateDimension: {
1342
+ type: 'object',
1343
+ required: ['field'],
1344
+ properties: { field: { type: 'string' }, bucket: { type: 'string', enum: ['day', 'week', 'month'] } }
1345
+ },
1346
+ AggregateMetric: {
1347
+ type: 'object',
1348
+ required: ['func', 'field'],
1349
+ properties: {
1350
+ func: {
1351
+ type: 'string',
1352
+ enum: [
1353
+ 'count',
1354
+ 'count_non_empty',
1355
+ 'count_empty',
1356
+ 'count_unique',
1357
+ 'sum',
1358
+ 'avg',
1359
+ 'min',
1360
+ 'max',
1361
+ 'stddev',
1362
+ 'median',
1363
+ 'p25',
1364
+ 'p75',
1365
+ 'p90'
1366
+ ]
1367
+ },
1368
+ field: { type: 'string' }
1369
+ }
1370
+ },
1162
1371
  AnswerInput: {
1163
1372
  type: 'object',
1164
1373
  additionalProperties: false,
@@ -1392,7 +1601,11 @@ export const SCHEMAS = {
1392
1601
  },
1393
1602
  CopyFormInput: {
1394
1603
  type: 'object',
1395
- properties: { name: { type: 'string' }, folder_token: { type: 'string' } },
1604
+ properties: {
1605
+ name: { type: 'string' },
1606
+ folder_token: { type: 'string' },
1607
+ with_notification_rules: { type: 'boolean' }
1608
+ },
1396
1609
  additionalProperties: false
1397
1610
  },
1398
1611
  DailyRepeatCloseRuleInput: {
@@ -1675,6 +1888,21 @@ export const SCHEMAS = {
1675
1888
  },
1676
1889
  additionalProperties: false
1677
1890
  },
1891
+ FieldDataCheck: {
1892
+ type: 'object',
1893
+ required: ['field_api_code'],
1894
+ properties: {
1895
+ field_api_code: { type: 'string' },
1896
+ choice_value: { type: 'string' },
1897
+ choice_type: {
1898
+ type: 'string',
1899
+ enum: ['choice', 'statement', 'dimension', 'level_1', 'level_2', 'level_3', 'level_4']
1900
+ },
1901
+ parent_field: { type: 'string' },
1902
+ check_extended_text: { type: 'boolean' },
1903
+ goods_item_dimension_options: { type: 'object' }
1904
+ }
1905
+ },
1678
1906
  FieldInput: {
1679
1907
  type: 'object',
1680
1908
  required: ['type', 'label'],
@@ -1821,6 +2049,15 @@ export const SCHEMAS = {
1821
2049
  },
1822
2050
  additionalProperties: false
1823
2051
  },
2052
+ FieldTypeChangeCheck: {
2053
+ type: 'object',
2054
+ required: ['field_api_code', 'target_type'],
2055
+ properties: {
2056
+ field_api_code: { type: 'string' },
2057
+ target_type: { type: 'string' },
2058
+ target_precision: { type: 'string', enum: ['month', 'day', 'minute', 'second'] }
2059
+ }
2060
+ },
1824
2061
  FieldUpdateInput: {
1825
2062
  type: 'object',
1826
2063
  additionalProperties: false,
@@ -2119,16 +2356,7 @@ export const SCHEMAS = {
2119
2356
  items: {
2120
2357
  properties: {
2121
2358
  type: {
2122
- not: {
2123
- enum: [
2124
- 'PageBreak',
2125
- 'GoodsField',
2126
- 'MultipleBlanksField',
2127
- 'WidgetContact',
2128
- 'WidgetVideo',
2129
- 'WidgetButton'
2130
- ]
2131
- }
2359
+ not: { enum: ['PageBreak', 'MultipleBlanksField', 'WidgetContact', 'WidgetVideo', 'WidgetButton'] }
2132
2360
  }
2133
2361
  }
2134
2362
  }
@@ -2328,10 +2556,10 @@ export const SCHEMAS = {
2328
2556
  success_message: { type: 'string' },
2329
2557
  success_message_rich_text: { type: 'string' },
2330
2558
  success_message_style: { type: 'string', enum: ['text', 'rich_text'] },
2331
- entry_submit_mode: { type: 'string' },
2559
+ entry_submit_mode: { type: 'string', enum: ['show_message', 'redirect', 'reports', 'exam_score'] },
2332
2560
  success_redirect_url: { type: 'string' },
2333
2561
  success_redirect_fields: { type: 'array', items: { type: 'string' } },
2334
- open_entry_action: { type: 'string' },
2562
+ open_entry_action: { type: 'string', enum: ['hide', 'view', 'edit'] },
2335
2563
  open_entry_message: { type: 'string' },
2336
2564
  open_entry_cancel_reservation: { type: 'boolean' },
2337
2565
  show_serial_number_on_success: { type: 'boolean' },
@@ -2372,7 +2600,18 @@ export const SCHEMAS = {
2372
2600
  show_field_number: { type: 'boolean' },
2373
2601
  password_required: { type: 'boolean' },
2374
2602
  access_password: { type: 'string' },
2375
- allowed_audience: { type: 'string' },
2603
+ allowed_audience: {
2604
+ type: 'string',
2605
+ enum: [
2606
+ 'public',
2607
+ 'internal',
2608
+ 'private',
2609
+ 'weixin_qiye_followers_only',
2610
+ 'weixin_followers_only',
2611
+ 'submitter_only',
2612
+ 'gd_user_only'
2613
+ ]
2614
+ },
2376
2615
  weixin_limited: { type: 'boolean' },
2377
2616
  submission_region_limited: { type: 'boolean' },
2378
2617
  submission_regions: { type: 'array', items: { type: 'string' } },
@@ -2384,6 +2623,14 @@ export const SCHEMAS = {
2384
2623
  },
2385
2624
  additionalProperties: false
2386
2625
  },
2626
+ FormSortRule: {
2627
+ type: 'object',
2628
+ required: ['field'],
2629
+ properties: {
2630
+ field: { type: 'string', enum: ['created_at', 'last_entry_created_at', 'entries_count'] },
2631
+ order: { type: 'string', enum: ['asc', 'desc'] }
2632
+ }
2633
+ },
2387
2634
  FormUpdateInput: {
2388
2635
  type: 'object',
2389
2636
  properties: {
@@ -3506,6 +3753,40 @@ export const SCHEMAS = {
3506
3753
  }
3507
3754
  }
3508
3755
  },
3756
+ ScopeCondition: {
3757
+ type: 'object',
3758
+ required: ['operator'],
3759
+ properties: {
3760
+ field: { type: 'string' },
3761
+ api_code: { type: 'string' },
3762
+ trigger: { type: 'string' },
3763
+ operator: {
3764
+ type: 'string',
3765
+ enum: [
3766
+ 'eq',
3767
+ 'ne',
3768
+ 'any_in',
3769
+ 'none_in',
3770
+ 'between',
3771
+ 'not_between',
3772
+ 'null',
3773
+ 'not_null',
3774
+ 'gte',
3775
+ 'gt',
3776
+ 'lte',
3777
+ 'lt',
3778
+ 'like',
3779
+ 'not_like',
3780
+ 'within_last',
3781
+ 'equal',
3782
+ 'not_equal',
3783
+ 'start',
3784
+ 'end'
3785
+ ]
3786
+ },
3787
+ value: {}
3788
+ }
3789
+ },
3509
3790
  SectionBreakInput: {
3510
3791
  type: 'object',
3511
3792
  additionalProperties: false,
@@ -3606,6 +3887,11 @@ export const SCHEMAS = {
3606
3887
  random_choices: { type: 'boolean' }
3607
3888
  }
3608
3889
  },
3890
+ SortRule: {
3891
+ type: 'object',
3892
+ required: ['api_code'],
3893
+ properties: { api_code: { type: 'string' }, order: { type: 'string', enum: ['asc', 'desc'] } }
3894
+ },
3609
3895
  StatementInput: {
3610
3896
  type: 'object',
3611
3897
  additionalProperties: false,
package/dist/help.js CHANGED
@@ -38,7 +38,7 @@ export function rootHelp(commands = COMMANDS, style = PLAIN) {
38
38
  `${EXIT_CODES.unexpected} unexpected, ${EXIT_CODES.usage} usage, ${EXIT_CODES.auth} authentication, ` +
39
39
  `${EXIT_CODES.not_found} not found, ${EXIT_CODES.refused} refused by the API, ${EXIT_CODES.server} server failure, ` +
40
40
  `${EXIT_CODES.transport} no connection or timed out, ${EXIT_CODES.rate_limited} rate limited (wait and retry; ` +
41
- '--output json carries retry_after).',
41
+ `--output json carries retry_after), ${EXIT_CODES.pending} a device login still waiting for approval.`,
42
42
  ''
43
43
  ].join('\n');
44
44
  }