quickbase-js 1.0.1-beta.0 → 1.1.0-beta.1

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/{quickbaseClient.d.ts → quickbase.d.ts} +344 -339
  3. package/dist/{quickbaseClient.js → quickbase.js} +350 -266
  4. package/dist/quickbase.js.map +1 -0
  5. package/examples/react.js +42 -16
  6. package/examples/vanillajs.html +32 -8
  7. package/log-gen.yaml +3513 -0
  8. package/package.json +13 -9
  9. package/rollup.config.js +2 -2
  10. package/src/code-generation/fix-spec-definitions.ts +473 -66
  11. package/src/code-generation/fix-spec-paths.ts +210 -18
  12. package/src/code-generation/generate-unified-interface.ts +1 -8
  13. package/src/code-generation/output/quickbase-fixed.json +783 -1138
  14. package/src/generated-unified/QuickbaseClient.ts +10 -9
  15. package/src/log-gen.ts +82 -35
  16. package/src/quickbaseClient.ts +39 -42
  17. package/test-artifacts/test-results.json +173 -1145
  18. package/tests/playwright/qb/auth/cacheSwitching.test.ts +4 -4
  19. package/tests/playwright/qb/auth/fetchTempToken401.test.ts +2 -2
  20. package/tests/playwright/qb/auth/getAppWithUserToken.test.ts +2 -2
  21. package/tests/playwright/qb/auth/getTempToken.test.ts +2 -2
  22. package/tests/playwright/qb/auth/tokenPrefetch.test.ts +2 -2
  23. package/tests/playwright/qb/auth/tokenRenewal.test.ts +2 -2
  24. package/tests/setup.ts +37 -9
  25. package/tests/vitest/qb/apps/getApp.test.ts +37 -43
  26. package/tests/vitest/qb/fields/getFields.test.ts +3 -5
  27. package/tests/vitest/qb/records/deleteRecords.test.ts +78 -0
  28. package/tests/vitest/qb/records/runQuery.test.ts +82 -0
  29. package/tests/vitest/qb/records/upsert.test.ts +72 -0
  30. package/tests/vitest/qb/tables/createTable.test.ts +55 -0
  31. package/tests/vitest/qb/tables/deleteTable.test.ts +50 -0
  32. package/tests/vitest/qb/tables/getAppTables.test.ts +43 -64
  33. package/tests/vitest/qb/tables/getTable.test.ts +26 -0
  34. package/tests/vitest/qb/tables/updateTable.test.ts +48 -0
  35. package/tests/vitest/unit/apps/getApp.test.ts +17 -12
  36. package/tests/vitest/unit/auth/fetchTempToken401.test.ts +32 -6
  37. package/tests/vitest/unit/auth/getTempToken.test.ts +36 -24
  38. package/tests/vitest/unit/auth/retryOn401.test.ts +39 -5
  39. package/tests/vitest/unit/auth/two401s.test.ts +1 -1
  40. package/tests/vitest/unit/fields/getFields.test.ts +14 -7
  41. package/tests/vitest/unit/records/deleteRecords.test.ts +112 -0
  42. package/tests/vitest/unit/records/runQuery.test.ts +102 -0
  43. package/tests/vitest/unit/records/upsert.test.ts +218 -0
  44. package/tests/vitest/unit/tables/createTable.test.ts +70 -0
  45. package/tests/vitest/unit/tables/deleteTable.test.ts +77 -0
  46. package/tests/vitest/unit/tables/getAppTables.test.ts +41 -28
  47. package/tests/vitest/unit/tables/getTable.test.ts +233 -0
  48. package/tests/vitest/unit/tables/updateTable.test.ts +80 -0
  49. package/tsconfig.json +3 -2
  50. package/vitest.config.ts +8 -2
  51. package/dist/quickbaseClient.js.map +0 -1
  52. package/logGen.yaml +0 -1820
  53. package/src/utils.ts +0 -5
@@ -12,297 +12,29 @@
12
12
  "paths": {
13
13
  "/apps": {
14
14
  "post": {
15
- "description": "Creates an application in an account. You must have application creation rights in the respective account. Main properties and application variables can be set with this API.",
16
- "summary": "Create an app",
17
15
  "operationId": "createApp",
18
- "consumes": [
19
- "application/json"
20
- ],
21
- "produces": [
22
- "application/json"
16
+ "summary": "Create a new application",
17
+ "tags": [
18
+ "Apps"
23
19
  ],
24
20
  "parameters": [
25
21
  {
26
- "x-amf-mediaType": "application/json",
22
+ "name": "body",
27
23
  "in": "body",
28
- "name": "generated",
24
+ "required": true,
29
25
  "schema": {
30
- "description": "The example below shows all the properties that can be set with this request. Additional properties that you can see, with the corresponding GET request, cannot be set through this API. See individual property descriptions below for details on how to set or change each.",
31
- "example": {
32
- "value": {
33
- "name": "My App",
34
- "description": "My first app",
35
- "assignToken": true,
36
- "securityProperties": {
37
- "allowClone": false,
38
- "allowExport": false,
39
- "enableAppTokens": false,
40
- "hideFromPublic": false,
41
- "mustBeRealmApproved": true,
42
- "useIPFilter": true
43
- },
44
- "variables": [
45
- {
46
- "name": "Variable1",
47
- "value": "Value1"
48
- }
49
- ]
50
- }
51
- },
52
- "type": "object",
53
- "additionalProperties": false,
54
- "required": [
55
- "name"
56
- ],
57
- "properties": {
58
- "assignToken": {
59
- "description": "Set to true if you would like to assign the app to the user token you used to create the application. The default is false.",
60
- "example": false,
61
- "type": "boolean"
62
- },
63
- "variables": {
64
- "description": "The app variables. A maximum of 10 variables can be inserted at a time. See [About Application Variables](https://help.quickbase.com/user-assistance/variables.html)",
65
- "type": "array",
66
- "items": {
67
- "type": "object",
68
- "additionalProperties": false,
69
- "required": [
70
- "name",
71
- "value"
72
- ],
73
- "properties": {
74
- "name": {
75
- "description": "The name for the variable.",
76
- "type": "string"
77
- },
78
- "value": {
79
- "description": "The value for the variable.",
80
- "type": "string"
81
- }
82
- }
83
- }
84
- },
85
- "name": {
86
- "description": "The app name. You are allowed to create multiple apps with the same name, in the same realm, because they will have different dbid values. We urge you to be careful about doing this.",
87
- "type": "string"
88
- },
89
- "securityProperties": {
90
- "description": "Application security properties.",
91
- "type": "object",
92
- "additionalProperties": false,
93
- "properties": {
94
- "hideFromPublic": {
95
- "description": "Hide from public application searches",
96
- "type": "boolean"
97
- },
98
- "mustBeRealmApproved": {
99
- "description": "Only \"approved\" users may access this application",
100
- "type": "boolean"
101
- },
102
- "allowClone": {
103
- "description": "Allow users who are not administrators to copy",
104
- "type": "boolean"
105
- },
106
- "useIPFilter": {
107
- "description": "Only users logging in from \"approved\" IP addresses may access this application",
108
- "type": "boolean"
109
- },
110
- "allowExport": {
111
- "description": "Allow users who are not administrators to export data",
112
- "type": "boolean"
113
- },
114
- "enableAppTokens": {
115
- "description": "Require Application Tokens",
116
- "type": "boolean"
117
- }
118
- }
119
- },
120
- "description": {
121
- "description": "The description for the app. If this property is left out, the app description will be blank.",
122
- "type": "string"
123
- }
124
- }
26
+ "$ref": "#/definitions/CreateAppRequest"
125
27
  }
126
28
  }
127
29
  ],
128
30
  "responses": {
129
31
  "200": {
130
- "description": "Success",
131
- "x-amf-mediaType": "application/json",
32
+ "description": "Success - application created",
132
33
  "schema": {
133
- "x-amf-examples": {
134
- "Simple Application": {
135
- "created": "2020-03-27T18:34:12Z",
136
- "dateFormat": "MM-DD-YYYY",
137
- "description": "My testing app",
138
- "hasEveryoneOnTheInternet": true,
139
- "id": "bpqe82s1",
140
- "memoryInfo": {
141
- "estMemory": 1,
142
- "estMemoryInclDependentApps": 2
143
- },
144
- "name": "Testing App",
145
- "securityProperties": {
146
- "allowClone": false,
147
- "allowExport": false,
148
- "enableAppTokens": false,
149
- "hideFromPublic": false,
150
- "mustBeRealmApproved": true,
151
- "useIPFilter": true
152
- },
153
- "timeZone": "(UTC-08:00) Pacific Time (US & Canada)",
154
- "updated": "2020-04-03T19:12:20Z",
155
- "dataClassification": "Confidential"
156
- },
157
- "Application with defined variables": {
158
- "description": "This examples shows the response of an application that contains one or more variables.",
159
- "value": {
160
- "created": "2020-03-27T18:34:12Z",
161
- "dateFormat": "MM-DD-YYYY",
162
- "description": "My testing app",
163
- "hasEveryoneOnTheInternet": true,
164
- "id": "bpqe82s1",
165
- "memoryInfo": {
166
- "estMemory": 1,
167
- "estMemoryInclDependentApps": 2
168
- },
169
- "name": "Testing App",
170
- "securityProperties": {
171
- "allowClone": false,
172
- "allowExport": false,
173
- "enableAppTokens": false,
174
- "hideFromPublic": false,
175
- "mustBeRealmApproved": true,
176
- "useIPFilter": true
177
- },
178
- "timeZone": "(UTC-08:00) Pacific Time (US & Canada)",
179
- "variables": [
180
- {
181
- "name": "Project End Date",
182
- "value": "7-16-2025"
183
- },
184
- {
185
- "name": "Project Manager Email",
186
- "value": "p.diaz@company.com"
187
- }
188
- ],
189
- "updated": "2020-04-03T19:12:20Z"
190
- }
191
- }
192
- },
193
- "type": "object",
194
- "additionalProperties": true,
195
- "required": [
196
- "name"
197
- ],
198
- "properties": {
199
- "name": {
200
- "description": "The app name. You are allowed to create multiple apps with the same name, in the same realm, because they will have different dbid values. We urge you to be careful about doing this.",
201
- "type": "string"
202
- },
203
- "description": {
204
- "description": "The description for the app. If this property is left out, the app description will be blank.",
205
- "type": "string"
206
- },
207
- "created": {
208
- "description": "The time and date the app was created, in the ISO 8601 time format YYYY-MM-DDThh:mm:ss.sssZ (in UTC time zone).",
209
- "type": "string"
210
- },
211
- "updated": {
212
- "description": "The time and date the app was last updated, in the ISO 8601 time format YYYY-MM-DDThh:mm:ss.sssZ (in UTC time zone).",
213
- "type": "string"
214
- },
215
- "dateFormat": {
216
- "description": "A description of the format used when displaying date values in this app. Note that this is a browser-only parameter - see the [Field type details](../fieldInfo) page in the API Guide for how time values are returned in API calls. See [About Localizing Dates](https://help.quickbase.com/user-assistance/about_localizing_dates_numbers.html) to set the app’s date format.",
217
- "type": "string"
218
- },
219
- "timeZone": {
220
- "description": "A description of the time zone used when displaying time values in this app. Note that this is a browser-only parameter - see the [Field type details](../fieldInfo) page in the portal for how time values are returned in API calls. See [Set the Time Zone for Both the Application and the Account](https://help.quickbase.com/user-assistance/application_local_timezone.html) to set the application’s time zone.",
221
- "type": "string"
222
- },
223
- "memoryInfo": {
224
- "type": "object",
225
- "description": "Application memory info",
226
- "additionalProperties": false,
227
- "properties": {
228
- "estMemory": {
229
- "type": "number",
230
- "description": "The estimated memory of this application in gigabytes"
231
- },
232
- "estMemoryInclDependentApps": {
233
- "type": "number",
234
- "description": "The estimated memory of this application and all dependent applications in gigabytes"
235
- }
236
- }
237
- },
238
- "id": {
239
- "description": "The unique identifier for this application.",
240
- "type": "string"
241
- },
242
- "hasEveryoneOnTheInternet": {
243
- "description": "Indicates whether app includes Everyone On The Internet access. See [Sharing apps with Everyone on the Internet (EOTI).](https://help.quickbase.com/user-assistance/share_with_everyone_on_internet.html)",
244
- "type": "boolean"
245
- },
246
- "variables": {
247
- "description": "The app variables. See [About Application Variables](https://help.quickbase.com/user-assistance/variables.html)",
248
- "type": "array",
249
- "items": {
250
- "type": "object",
251
- "additionalProperties": true,
252
- "properties": {
253
- "name": {
254
- "description": "Variable name.",
255
- "type": "string"
256
- },
257
- "value": {
258
- "description": "Variable value.",
259
- "type": "string"
260
- }
261
- }
262
- }
263
- },
264
- "dataClassification": {
265
- "description": "The Data Classification label assigned to the application. If Data Classification is not turned on, this will not be returned. If Data Classification is turned on, but application is not labeled, we return “None\". Data Classification labels can be added in the Admin Console by a Realm Administrator for Platform+ plans.",
266
- "type": "string"
267
- },
268
- "securityProperties": {
269
- "description": "Security properties of the application",
270
- "type": "object",
271
- "additionalProperties": true,
272
- "properties": {
273
- "allowClone": {
274
- "description": "Allow users who are not administrators to copy",
275
- "type": "boolean"
276
- },
277
- "allowExport": {
278
- "description": "Allow users who are not administrators to export data",
279
- "type": "boolean"
280
- },
281
- "hideFromPublic": {
282
- "description": "Hide from public application searches",
283
- "type": "boolean"
284
- },
285
- "enableAppTokens": {
286
- "description": "Require Application Tokens",
287
- "type": "boolean"
288
- },
289
- "useIPFilter": {
290
- "description": "Only users logging in from \"approved\" IP addresses may access this application",
291
- "type": "boolean"
292
- },
293
- "mustBeRealmApproved": {
294
- "description": "Only \"approved\" users may access this application",
295
- "type": "boolean"
296
- }
297
- }
298
- }
299
- }
34
+ "$ref": "#/definitions/CreateApp200Response"
300
35
  }
301
36
  }
302
- },
303
- "tags": [
304
- "Apps"
305
- ]
37
+ }
306
38
  }
307
39
  },
308
40
  "/apps/{appId}": {
@@ -317,7 +49,8 @@
317
49
  "name": "appId",
318
50
  "in": "path",
319
51
  "required": true,
320
- "type": "string"
52
+ "type": "string",
53
+ "description": "The application identifier."
321
54
  }
322
55
  ],
323
56
  "responses": {
@@ -672,7 +405,8 @@
672
405
  "name": "appId",
673
406
  "in": "query",
674
407
  "required": true,
675
- "type": "string"
408
+ "type": "string",
409
+ "description": "The application identifier."
676
410
  }
677
411
  ],
678
412
  "responses": {
@@ -686,347 +420,162 @@
686
420
  }
687
421
  }
688
422
  }
689
- }
690
- },
691
- "/tables/{tableId}": {
692
- "get": {
693
- "description": "Gets the properties of an individual table that is part of an application.",
694
- "operationId": "getTable",
695
- "summary": "Get a table",
696
- "consumes": [
697
- "application/json"
698
- ],
699
- "produces": [
700
- "application/json"
423
+ },
424
+ "post": {
425
+ "operationId": "createTable",
426
+ "summary": "Create a new table in an app",
427
+ "tags": [
428
+ "Tables"
701
429
  ],
702
430
  "parameters": [
703
431
  {
704
432
  "name": "appId",
705
- "description": "The unique identifier of an app",
706
- "required": true,
707
433
  "in": "query",
708
- "type": "string"
434
+ "required": true,
435
+ "type": "string",
436
+ "description": "The unique identifier of the app where the table will be created."
709
437
  },
710
438
  {
711
- "name": "tableId",
712
- "description": "The unique identifier (dbid) of the table.",
439
+ "name": "body",
440
+ "in": "body",
713
441
  "required": true,
714
- "in": "path",
715
- "type": "string"
716
- }
717
- ],
718
- "responses": {
719
- "200": {
720
- "description": "Success",
721
- "x-amf-mediaType": "application/json",
722
442
  "schema": {
723
- "example": {
724
- "name": "Example Table",
725
- "created": "2020-03-27T18:34:40Z",
726
- "updated": "2020-04-03T19:12:40Z",
727
- "alias": "_dbid_example_table",
728
- "description": "Table as an example.",
729
- "id": "bpqe82s0",
730
- "nextRecordId": 1,
731
- "nextFieldId": 1,
732
- "defaultSortFieldId": 2,
733
- "defaultSortOrder": "ASC",
734
- "keyFieldId": 3,
735
- "singleRecordName": "Example Record",
736
- "pluralRecordName": "Example Records",
737
- "sizeLimit": "150 MB",
738
- "spaceUsed": "17 MB",
739
- "spaceRemaining": "133 MB"
740
- },
741
443
  "type": "object",
742
- "additionalProperties": true,
743
444
  "properties": {
744
445
  "name": {
745
- "description": "The name of the table.",
746
- "type": "string"
747
- },
748
- "id": {
749
- "description": "The unique identifier (dbid) of the table.",
750
- "type": "string"
751
- },
752
- "alias": {
753
- "description": "The automatically-created table alias for the table.",
754
- "type": "string"
446
+ "type": "string",
447
+ "description": "The name of the table."
755
448
  },
756
449
  "description": {
757
- "description": "The description of the table, as configured by an application administrator.",
758
- "type": "string"
759
- },
760
- "created": {
761
- "description": "The time and date when the table was created, in the ISO 8601 time format YYYY-MM-DDThh:mm:ss.sssZ (in UTC time zone).",
762
- "type": "string"
763
- },
764
- "updated": {
765
- "description": "The time and date when the table schema or data was last updated, in the ISO 8601 time format YYYY-MM-DDThh:mm:ss.sssZ (in UTC time zone).",
766
- "type": "string"
767
- },
768
- "nextRecordId": {
769
- "description": "The incremental Record ID that will be used when the next record is created, as determined when the API call was ran.",
770
- "type": "integer"
771
- },
772
- "nextFieldId": {
773
- "description": "The incremental Field ID that will be used when the next field is created, as determined when the API call was ran.",
774
- "type": "integer"
775
- },
776
- "defaultSortFieldId": {
777
- "description": "The id of the field that is configured for default sorting.",
778
- "type": "integer"
779
- },
780
- "defaultSortOrder": {
781
- "description": "The configuration of the default sort order on the table.",
782
- "enum": [
783
- "ASC",
784
- "DESC"
785
- ],
786
- "type": "string"
787
- },
788
- "keyFieldId": {
789
- "description": "The id of the field that is configured to be the key on this table, which is usually the Quickbase Record ID.",
790
- "type": "integer"
450
+ "type": "string",
451
+ "description": "The description of the table."
791
452
  },
792
453
  "singleRecordName": {
793
- "description": "The builder-configured singular noun of the table.",
794
- "type": "string"
454
+ "type": "string",
455
+ "description": "Singular noun for records."
795
456
  },
796
457
  "pluralRecordName": {
797
- "description": "The builder-configured plural noun of the table.",
798
- "type": "string"
799
- },
800
- "sizeLimit": {
801
- "description": "The size limit for the table.",
802
- "type": "string"
803
- },
804
- "spaceUsed": {
805
- "description": "The amount of space currently being used by the table.",
806
- "type": "string"
807
- },
808
- "spaceRemaining": {
809
- "description": "The amount of space remaining for use by the table.",
810
- "type": "string"
458
+ "type": "string",
459
+ "description": "Plural noun for records."
811
460
  }
812
- }
461
+ },
462
+ "required": [
463
+ "name"
464
+ ]
813
465
  }
814
466
  }
815
- },
816
- "tags": [
817
- "Tables"
818
- ]
467
+ ],
468
+ "responses": {
469
+ "200": {
470
+ "description": "Success - table created",
471
+ "schema": {
472
+ "$ref": "#/definitions/Table"
473
+ }
474
+ }
475
+ }
476
+ }
477
+ },
478
+ "/tables/{tableId}": {
479
+ "get": {
480
+ "operationId": "getTable",
481
+ "summary": "Get a table by ID",
482
+ "tags": [
483
+ "Tables"
484
+ ],
485
+ "parameters": [
486
+ {
487
+ "name": "tableId",
488
+ "in": "path",
489
+ "required": true,
490
+ "type": "string",
491
+ "description": "The table identifier (dbid)."
492
+ },
493
+ {
494
+ "name": "appId",
495
+ "in": "query",
496
+ "required": true,
497
+ "type": "string",
498
+ "description": "The unique identifier of the app containing the table."
499
+ }
500
+ ],
501
+ "responses": {
502
+ "200": {
503
+ "description": "Success - table retrieved",
504
+ "schema": {
505
+ "$ref": "#/definitions/Table"
506
+ }
507
+ }
508
+ }
819
509
  },
820
510
  "post": {
821
- "description": "Updates the main properties of a specific table. Any properties of the table that you do not specify in the request body will remain unchanged.",
822
- "summary": "Update a table",
823
511
  "operationId": "updateTable",
824
- "consumes": [
825
- "application/json"
826
- ],
827
- "produces": [
828
- "application/json"
512
+ "summary": "Update a table by ID",
513
+ "tags": [
514
+ "Tables"
829
515
  ],
830
516
  "parameters": [
831
517
  {
832
- "name": "appId",
833
- "description": "The unique identifier of an app",
518
+ "name": "tableId",
519
+ "in": "path",
834
520
  "required": true,
835
- "in": "query",
836
- "type": "string"
521
+ "type": "string",
522
+ "description": "The table identifier (dbid)."
837
523
  },
838
524
  {
839
- "name": "tableId",
840
- "description": "The unique identifier (dbid) of the table.",
525
+ "name": "appId",
526
+ "in": "query",
841
527
  "required": true,
842
- "in": "path",
843
- "type": "string"
528
+ "type": "string",
529
+ "description": "The unique identifier of the app containing the table."
844
530
  },
845
531
  {
846
- "x-amf-mediaType": "application/json",
532
+ "name": "body",
847
533
  "in": "body",
848
- "name": "generated",
534
+ "required": true,
849
535
  "schema": {
850
- "description": "The example below shows all the properties that can be changed with this request. Additional properties that you can see with the corresponding GET request cannot be set through this API.",
851
- "example": {
852
- "name": "My table",
853
- "description": "my first table",
854
- "singleRecordName": "record",
855
- "pluralRecordName": "records"
856
- },
857
- "type": "object",
858
- "additionalProperties": true,
859
- "properties": {
860
- "name": {
861
- "description": "The name for the table.",
862
- "type": "string"
863
- },
864
- "pluralRecordName": {
865
- "description": "The plural noun for records in the table. If this value is not passed the default value is 'Records'.",
866
- "type": "string"
867
- },
868
- "singleRecordName": {
869
- "description": "The singular noun for records in the table. If this value is not passed the default value is 'Record'.",
870
- "type": "string"
871
- },
872
- "description": {
873
- "description": "The description for the table. If this value is not passed the default value is blank.",
874
- "type": "string"
875
- }
876
- }
536
+ "$ref": "#/definitions/UpdateTableRequest"
877
537
  }
878
538
  }
879
539
  ],
880
540
  "responses": {
881
541
  "200": {
882
- "description": "Success",
883
- "x-amf-mediaType": "application/json",
542
+ "description": "Success - table updated",
884
543
  "schema": {
885
- "example": {
886
- "name": "Example Table",
887
- "created": "2020-03-27T18:34:40Z",
888
- "updated": "2020-04-03T19:12:40Z",
889
- "alias": "_dbid_example_table",
890
- "description": "Table as an example.",
891
- "id": "bpqe82s0",
892
- "nextRecordId": 1,
893
- "nextFieldId": 1,
894
- "defaultSortFieldId": 2,
895
- "defaultSortOrder": "ASC",
896
- "keyFieldId": 3,
897
- "singleRecordName": "Example Record",
898
- "pluralRecordName": "Example Records",
899
- "sizeLimit": "150 MB",
900
- "spaceUsed": "17 MB",
901
- "spaceRemaining": "133 MB"
902
- },
903
- "type": "object",
904
- "additionalProperties": true,
905
- "properties": {
906
- "name": {
907
- "description": "The name of the table.",
908
- "type": "string"
909
- },
910
- "id": {
911
- "description": "The unique identifier (dbid) of the table.",
912
- "type": "string"
913
- },
914
- "alias": {
915
- "description": "The automatically-created table alias for the table.",
916
- "type": "string"
917
- },
918
- "description": {
919
- "description": "The description of the table, as configured by an application administrator.",
920
- "type": "string"
921
- },
922
- "created": {
923
- "description": "The time and date when the table was created, in the ISO 8601 time format YYYY-MM-DDThh:mm:ss.sssZ (in UTC time zone).",
924
- "type": "string"
925
- },
926
- "updated": {
927
- "description": "The time and date when the table schema or data was last updated, in the ISO 8601 time format YYYY-MM-DDThh:mm:ss.sssZ (in UTC time zone).",
928
- "type": "string"
929
- },
930
- "nextRecordId": {
931
- "description": "The incremental Record ID that will be used when the next record is created, as determined when the API call was ran.",
932
- "type": "integer"
933
- },
934
- "nextFieldId": {
935
- "description": "The incremental Field ID that will be used when the next field is created, as determined when the API call was ran.",
936
- "type": "integer"
937
- },
938
- "defaultSortFieldId": {
939
- "description": "The id of the field that is configured for default sorting.",
940
- "type": "integer"
941
- },
942
- "defaultSortOrder": {
943
- "description": "The configuration of the default sort order on the table.",
944
- "enum": [
945
- "ASC",
946
- "DESC"
947
- ],
948
- "type": "string"
949
- },
950
- "keyFieldId": {
951
- "description": "The id of the field that is configured to be the key on this table, which is usually the Quickbase Record ID.",
952
- "type": "integer"
953
- },
954
- "singleRecordName": {
955
- "description": "The builder-configured singular noun of the table.",
956
- "type": "string"
957
- },
958
- "pluralRecordName": {
959
- "description": "The builder-configured plural noun of the table.",
960
- "type": "string"
961
- },
962
- "sizeLimit": {
963
- "description": "The size limit for the table.",
964
- "type": "string"
965
- },
966
- "spaceUsed": {
967
- "description": "The amount of space currently being used by the table.",
968
- "type": "string"
969
- },
970
- "spaceRemaining": {
971
- "description": "The amount of space remaining for use by the table.",
972
- "type": "string"
973
- }
974
- }
544
+ "$ref": "#/definitions/Table"
975
545
  }
976
546
  }
977
- },
978
- "tags": [
979
- "Tables"
980
- ]
547
+ }
981
548
  },
982
549
  "delete": {
983
- "description": "Deletes a specific table in an application, including all of the data within it.",
984
550
  "operationId": "deleteTable",
985
- "summary": "Delete a table",
986
- "consumes": [
987
- "application/json"
988
- ],
989
- "produces": [
990
- "application/json"
551
+ "summary": "Delete a table by ID",
552
+ "tags": [
553
+ "Tables"
991
554
  ],
992
555
  "parameters": [
993
556
  {
994
- "name": "appId",
995
- "description": "The unique identifier of an app",
557
+ "name": "tableId",
558
+ "in": "path",
996
559
  "required": true,
997
- "in": "query",
998
- "type": "string"
560
+ "type": "string",
561
+ "description": "The table identifier (dbid)."
999
562
  },
1000
563
  {
1001
- "name": "tableId",
1002
- "description": "The unique identifier (dbid) of the table.",
564
+ "name": "appId",
565
+ "in": "query",
1003
566
  "required": true,
1004
- "in": "path",
1005
- "type": "string"
567
+ "type": "string",
568
+ "description": "The unique identifier of the app containing the table."
1006
569
  }
1007
570
  ],
1008
571
  "responses": {
1009
572
  "200": {
1010
- "description": "Success",
1011
- "x-amf-mediaType": "application/json",
573
+ "description": "Success - table deleted",
1012
574
  "schema": {
1013
- "example": {
1014
- "deletedTableId": "bck7gp3q2"
1015
- },
1016
- "type": "object",
1017
- "additionalProperties": true,
1018
- "properties": {
1019
- "deletedTableId": {
1020
- "description": "The deleted table id.",
1021
- "type": "string"
1022
- }
1023
- }
575
+ "$ref": "#/definitions/DeleteTableResponse"
1024
576
  }
1025
577
  }
1026
- },
1027
- "tags": [
1028
- "Tables"
1029
- ]
578
+ }
1030
579
  }
1031
580
  },
1032
581
  "/tables/{tableId}/relationships": {
@@ -2166,7 +1715,8 @@
2166
1715
  "name": "reportId",
2167
1716
  "in": "path",
2168
1717
  "required": true,
2169
- "type": "string"
1718
+ "type": "string",
1719
+ "description": "The report identifier."
2170
1720
  },
2171
1721
  {
2172
1722
  "name": "generated",
@@ -2202,13 +1752,15 @@
2202
1752
  "name": "tableId",
2203
1753
  "in": "query",
2204
1754
  "required": true,
2205
- "type": "string"
1755
+ "type": "string",
1756
+ "description": "The table identifier (dbid)."
2206
1757
  },
2207
1758
  {
2208
1759
  "name": "includeFieldPerms",
2209
1760
  "in": "query",
2210
1761
  "required": false,
2211
- "type": "boolean"
1762
+ "type": "boolean",
1763
+ "description": "Whether to include field permissions."
2212
1764
  }
2213
1765
  ],
2214
1766
  "responses": {
@@ -4485,474 +4037,84 @@
4485
4037
  },
4486
4038
  "/records": {
4487
4039
  "post": {
4488
- "description": "Insert and/or update record(s) in a table. In this single API call, inserts and updates can be submitted. Update can use the key field on the table, or any other supported unique field. Refer to the [Field types page](../fieldInfo) for more information about how each field type should be formatted. This operation allows for incremental processing of successful records, even when some of the records fail. \n**Note:** This endpoint supports a maximum payload size of 40MB.",
4489
- "summary": "Insert/Update record(s)",
4490
4040
  "operationId": "upsert",
4491
- "consumes": [
4492
- "application/json"
4493
- ],
4494
- "produces": [
4495
- "application/json"
4041
+ "summary": "Upsert records in a table",
4042
+ "tags": [
4043
+ "Records"
4496
4044
  ],
4497
4045
  "parameters": [
4498
4046
  {
4499
- "x-amf-mediaType": "application/json",
4047
+ "name": "body",
4500
4048
  "in": "body",
4501
- "name": "generated",
4049
+ "required": true,
4502
4050
  "schema": {
4503
- "x-amf-examples": {
4504
- "Insert record": {
4505
- "value": {
4506
- "to": "bck7gp3q2",
4507
- "data": [
4508
- {
4509
- "6": {
4510
- "value": "This is my text"
4511
- },
4512
- "7": {
4513
- "value": 10
4514
- },
4515
- "8": {
4516
- "value": "2019-12-18T08:00:00Z"
4517
- },
4518
- "9": {
4519
- "value": [
4520
- "a",
4521
- "b"
4522
- ]
4523
- },
4524
- "10": {
4525
- "value": true
4526
- },
4527
- "11": {
4528
- "value": "user@quickbase.com"
4529
- },
4530
- "12": {
4531
- "value": "www.quickbase.com"
4532
- },
4533
- "13": {
4534
- "value": [
4535
- {
4536
- "id": "123456.ab1s"
4537
- },
4538
- {
4539
- "id": "254789.mkgp"
4540
- },
4541
- {
4542
- "id": "789654.vc2s"
4543
- }
4544
- ]
4545
- }
4546
- }
4547
- ],
4548
- "fieldsToReturn": [
4549
- 6,
4550
- 7,
4551
- 8,
4552
- 9,
4553
- 10,
4554
- 11,
4555
- 12,
4556
- 13
4557
- ]
4558
- }
4559
- },
4560
- "Update existing record": {
4561
- "description": "For updating an existing record, add a mapping of the table key field ID (defaults to '3') to the record ID, in the data array. In the following example, we update the first record.",
4562
- "value": {
4563
- "to": "bck7gp3q2",
4564
- "data": [
4565
- {
4566
- "3": {
4567
- "value": 1
4568
- },
4569
- "6": {
4570
- "value": "This is my new text"
4571
- },
4572
- "7": {
4573
- "value": 20
4574
- },
4575
- "9": {
4576
- "value": [
4577
- "c",
4578
- "d"
4579
- ]
4580
- },
4581
- "10": {
4582
- "value": false
4583
- },
4584
- "11": {
4585
- "value": "newuser@quickbase.com"
4586
- }
4587
- }
4588
- ],
4589
- "fieldsToReturn": [
4590
- 6,
4591
- 7,
4592
- 9,
4593
- 10,
4594
- 11
4595
- ]
4596
- }
4597
- }
4598
- },
4599
- "type": "object",
4600
- "additionalProperties": true,
4601
- "required": [
4602
- "to"
4603
- ],
4604
- "properties": {
4605
- "to": {
4606
- "description": "The table identifier.",
4607
- "example": "bck7gp3q2",
4608
- "type": "string",
4609
- "minLength": 1
4610
- },
4611
- "data": {
4612
- "description": "Record data array, where each record contains key-value mappings of fields to be defined/updated and their values.",
4613
- "type": "array",
4614
- "items": {
4615
- "$ref": "#/definitions/Record"
4616
- }
4617
- },
4618
- "mergeFieldId": {
4619
- "description": "The merge field id.",
4620
- "example": 7,
4621
- "type": "integer"
4622
- },
4623
- "fieldsToReturn": {
4624
- "description": "Specify an array of field ids that will return data for any updates or added record. Record ID (FID 3) is always returned if any field ID is requested.",
4625
- "type": "array",
4626
- "items": {
4627
- "type": "integer"
4628
- }
4629
- }
4630
- }
4051
+ "$ref": "#/definitions/UpsertRequest"
4631
4052
  }
4632
4053
  }
4633
4054
  ],
4634
4055
  "responses": {
4635
4056
  "200": {
4636
- "description": "",
4637
- "x-amf-mediaType": "application/json",
4057
+ "description": "Success - all records processed successfully",
4638
4058
  "schema": {
4639
- "description": "A successful response that includes details on the records added, updated or unchanged. In the example below, the table previously had ten records with IDs from 1 through 10. The user posts an upsert that updates the value of record 1 and adds two new records, all successfully.",
4640
- "example": {
4641
- "value": {
4642
- "data": [
4643
- {
4644
- "3": {
4645
- "value": 1
4646
- },
4647
- "6": {
4648
- "value": "Updating this record"
4649
- },
4650
- "7": {
4651
- "value": 10
4652
- },
4653
- "8": {
4654
- "value": "2019-12-18T08:00:00.000Z"
4655
- }
4656
- },
4657
- {
4658
- "3": {
4659
- "value": 11
4660
- },
4661
- "6": {
4662
- "value": "This is my text"
4663
- },
4664
- "7": {
4665
- "value": 15
4666
- },
4667
- "8": {
4668
- "value": "2019-12-19T08:00:00.000Z"
4669
- }
4670
- },
4671
- {
4672
- "3": {
4673
- "value": 12
4674
- },
4675
- "6": {
4676
- "value": "This is my other text"
4677
- },
4678
- "7": {
4679
- "value": 20
4680
- },
4681
- "8": {
4682
- "value": "2019-12-20T08:00:00.000Z"
4683
- }
4684
- }
4685
- ],
4686
- "metadata": {
4687
- "createdRecordIds": [
4688
- 11,
4689
- 12
4690
- ],
4691
- "totalNumberOfRecordsProcessed": 3,
4692
- "unchangedRecordIds": [],
4693
- "updatedRecordIds": [
4694
- 1
4695
- ]
4696
- }
4697
- }
4698
- },
4699
- "type": "object",
4700
- "additionalProperties": true,
4701
- "properties": {
4702
- "metadata": {
4703
- "description": "Information about created records, updated records, referenced but unchanged records, and records having any errors while being processed.",
4704
- "type": "object",
4705
- "additionalProperties": true,
4706
- "properties": {
4707
- "createdRecordIds": {
4708
- "description": "Array containing the created record ids.",
4709
- "type": "array",
4710
- "items": {
4711
- "type": "integer"
4712
- }
4713
- },
4714
- "lineErrors": {
4715
- "description": "This will only be returned in the case of failed records. It is a collection of errors that occurred when processing the incoming data that resulted in records not being processed. Each object has a key representing the sequence number of the record in the original payload (starting from 1). The value is a list of errors occurred.",
4716
- "type": "object",
4717
- "additionalProperties": true
4718
- },
4719
- "unchangedRecordIds": {
4720
- "description": "Array containing the unchanged record ids.",
4721
- "type": "array",
4722
- "items": {
4723
- "type": "integer"
4724
- }
4725
- },
4726
- "updatedRecordIds": {
4727
- "description": "Array containing the updated record ids.",
4728
- "type": "array",
4729
- "items": {
4730
- "type": "integer"
4731
- }
4732
- },
4733
- "totalNumberOfRecordsProcessed": {
4734
- "description": "Number of records processed. Includes successful and failed record updates.",
4735
- "type": "integer"
4736
- }
4737
- }
4738
- },
4739
- "data": {
4740
- "description": "The data that is expected to be returned.",
4741
- "type": "array",
4742
- "items": {
4743
- "$ref": "#/definitions/Upsert200Response"
4744
- }
4745
- }
4746
- }
4059
+ "$ref": "#/definitions/Upsert200Response"
4747
4060
  }
4748
4061
  },
4749
4062
  "207": {
4750
- "description": "",
4751
- "x-amf-mediaType": "application/json",
4752
- "schema": {
4753
- "description": "Receiving this status code indicates that some (or all) of the individual records being handled had problems and were not processed successfully. The response will be reported under the 'lineErrors' element and indicate the total number of records processed and the errors that occurred with each record. The record IDs of records created, updated, and referenced but unchanged, will be returned in the 'createdRecordIds', 'updatedRecordIds', and 'unchangedRecordIds' elements respectively. \nIn the example below, a user tries to add three records to a table that previously had ten records with IDs from 1 through 10. The first and third records of the request are valid and create the 11th and 12th records in the table; the second record has a problem that prevents it from being processed.",
4754
- "example": {
4755
- "value": {
4756
- "data": [],
4757
- "metadata": {
4758
- "createdRecordIds": [
4759
- 11,
4760
- 12
4761
- ],
4762
- "lineErrors": {
4763
- "2": [
4764
- "Incompatible value for field with ID \"6\"."
4765
- ]
4766
- },
4767
- "totalNumberOfRecordsProcessed": 3,
4768
- "unchangedRecordIds": [],
4769
- "updatedRecordIds": []
4770
- }
4771
- }
4772
- },
4773
- "type": "object",
4774
- "additionalProperties": true,
4775
- "properties": {
4776
- "metadata": {
4777
- "description": "Information about created records, updated records, referenced but unchanged records, and records having any errors while being processed.",
4778
- "type": "object",
4779
- "additionalProperties": true,
4780
- "properties": {
4781
- "createdRecordIds": {
4782
- "description": "Array containing the created record ids.",
4783
- "type": "array",
4784
- "items": {
4785
- "type": "integer"
4786
- }
4787
- },
4788
- "lineErrors": {
4789
- "description": "This will only be returned in the case of failed records. It is a collection of errors that occurred when processing the incoming data that resulted in records not being processed. Each object has a key representing the sequence number of the record in the original payload (starting from 1). The value is a list of errors occurred.",
4790
- "type": "object",
4791
- "additionalProperties": true
4792
- },
4793
- "unchangedRecordIds": {
4794
- "description": "Array containing the unchanged record ids.",
4795
- "type": "array",
4796
- "items": {
4797
- "type": "integer"
4798
- }
4799
- },
4800
- "updatedRecordIds": {
4801
- "description": "Array containing the updated record ids.",
4802
- "type": "array",
4803
- "items": {
4804
- "type": "integer"
4805
- }
4806
- },
4807
- "totalNumberOfRecordsProcessed": {
4808
- "description": "Number of records processed. Includes successful and failed record updates.",
4809
- "type": "integer"
4810
- }
4811
- }
4812
- },
4813
- "data": {
4814
- "description": "The data that is expected to be returned.",
4815
- "type": "array",
4816
- "items": {
4817
- "$ref": "#/definitions/Upsert200Response"
4818
- }
4819
- }
4820
- }
4821
- }
4822
- },
4823
- "400": {
4824
- "description": "",
4825
- "x-amf-mediaType": "application/json",
4063
+ "description": "Multi-Status - partial success with some errors",
4826
4064
  "schema": {
4827
- "description": "There was problem in the format of the request. This prevented the entire request from processing any records. The error response will be in the [standard format](../errors).",
4828
- "example": {
4829
- "message": "Bad request",
4830
- "description": "Data object cannot be empty."
4831
- },
4832
- "type": "object",
4833
- "additionalProperties": true,
4834
- "properties": {
4835
- "message": {
4836
- "description": "The type of error found.",
4837
- "type": "string"
4838
- },
4839
- "description": {
4840
- "description": "The description for the occurence of the error.",
4841
- "type": "string"
4842
- }
4843
- }
4065
+ "$ref": "#/definitions/Upsert207Response"
4844
4066
  }
4845
4067
  }
4846
- },
4847
- "tags": [
4848
- "Records"
4849
- ]
4068
+ }
4850
4069
  },
4851
4070
  "delete": {
4852
- "description": "Deletes record(s) in a table based on a query. Alternatively, all records in the table can be deleted.",
4853
- "summary": "Delete record(s)",
4854
4071
  "operationId": "deleteRecords",
4855
- "consumes": [
4856
- "application/json"
4857
- ],
4858
- "produces": [
4859
- "application/json"
4072
+ "summary": "Delete records in a table",
4073
+ "tags": [
4074
+ "Records"
4860
4075
  ],
4861
4076
  "parameters": [
4862
4077
  {
4863
- "x-amf-mediaType": "application/json",
4078
+ "name": "body",
4864
4079
  "in": "body",
4865
- "name": "generated",
4080
+ "required": true,
4866
4081
  "schema": {
4867
- "example": {
4868
- "from": "bck7gp3q2",
4869
- "where": "{6.EX.'hello'}"
4870
- },
4871
- "type": "object",
4872
- "additionalProperties": true,
4873
- "required": [
4874
- "from",
4875
- "where"
4876
- ],
4877
- "properties": {
4878
- "from": {
4879
- "description": "The unique identifier of the table.",
4880
- "example": "bck7gp3q2",
4881
- "type": "string",
4882
- "minLength": 1
4883
- },
4884
- "where": {
4885
- "description": "The filter to delete records. To delete all records specify a filter that will include all records, for example {3.GT.0} where 3 is the ID of the Record ID field.",
4886
- "example": "{6.EX.'hello'}",
4887
- "type": "string",
4888
- "minLength": 1
4889
- }
4890
- }
4082
+ "$ref": "#/definitions/DeleteRecordsRequest"
4891
4083
  }
4892
4084
  }
4893
4085
  ],
4894
4086
  "responses": {
4895
4087
  "200": {
4896
- "description": "Successful delete records response.",
4897
- "x-amf-mediaType": "application/json",
4088
+ "description": "Success - records deleted",
4898
4089
  "schema": {
4899
- "example": {
4900
- "numberDeleted": 1
4901
- },
4902
- "type": "object",
4903
- "additionalProperties": true,
4904
- "properties": {
4905
- "numberDeleted": {
4906
- "description": "The number of records deleted.",
4907
- "example": 1,
4908
- "type": "integer"
4909
- }
4910
- }
4090
+ "$ref": "#/definitions/DeleteRecords200Response"
4911
4091
  }
4912
4092
  }
4913
- },
4914
- "tags": [
4915
- "Records"
4916
- ]
4093
+ }
4917
4094
  }
4918
4095
  },
4919
4096
  "/records/query": {
4920
4097
  "post": {
4921
- "operationId": "upsertRecords",
4922
- "summary": "Upsert records",
4098
+ "operationId": "runQuery",
4099
+ "summary": "Query records in a table",
4923
4100
  "tags": [
4924
4101
  "Records"
4925
4102
  ],
4926
4103
  "parameters": [
4927
4104
  {
4928
- "name": "generated",
4105
+ "name": "body",
4929
4106
  "in": "body",
4930
4107
  "required": true,
4931
4108
  "schema": {
4932
- "type": "array",
4933
- "items": {
4934
- "$ref": "#/definitions/Record"
4935
- }
4109
+ "$ref": "#/definitions/RunQueryRequest"
4936
4110
  }
4937
4111
  }
4938
4112
  ],
4939
4113
  "responses": {
4940
4114
  "200": {
4941
- "description": "Success",
4115
+ "description": "Success - records returned",
4942
4116
  "schema": {
4943
- "type": "array",
4944
- "items": {
4945
- "$ref": "#/definitions/Upsert200Response"
4946
- }
4947
- }
4948
- },
4949
- "207": {
4950
- "description": "Multi-Status (partial success)",
4951
- "schema": {
4952
- "type": "array",
4953
- "items": {
4954
- "$ref": "#/definitions/Upsert207Response"
4955
- }
4117
+ "$ref": "#/definitions/RunQueryResponse"
4956
4118
  }
4957
4119
  }
4958
4120
  }
@@ -4970,7 +4132,8 @@
4970
4132
  "name": "dbid",
4971
4133
  "in": "path",
4972
4134
  "required": true,
4973
- "type": "string"
4135
+ "type": "string",
4136
+ "description": "The database identifier (dbid)."
4974
4137
  }
4975
4138
  ],
4976
4139
  "responses": {
@@ -8145,6 +7308,10 @@
8145
7308
  "definitions": {
8146
7309
  "App": {
8147
7310
  "type": "object",
7311
+ "required": [
7312
+ "id",
7313
+ "name"
7314
+ ],
8148
7315
  "properties": {
8149
7316
  "id": {
8150
7317
  "type": "string"
@@ -8173,238 +7340,552 @@
8173
7340
  "type": "boolean"
8174
7341
  },
8175
7342
  "memoryInfo": {
8176
- "type": "object",
8177
- "properties": {
8178
- "estMemory": {
8179
- "type": "number"
8180
- },
8181
- "estMemoryInclDependentApps": {
8182
- "type": "number"
8183
- }
8184
- }
7343
+ "$ref": "#/definitions/AppMemoryInfo"
8185
7344
  },
8186
7345
  "securityProperties": {
8187
- "type": "object",
8188
- "properties": {
8189
- "allowClone": {
8190
- "type": "boolean"
8191
- },
8192
- "allowExport": {
8193
- "type": "boolean"
8194
- },
8195
- "enableAppTokens": {
8196
- "type": "boolean"
8197
- },
8198
- "hideFromPublic": {
8199
- "type": "boolean"
8200
- },
8201
- "mustBeRealmApproved": {
8202
- "type": "boolean"
8203
- },
8204
- "useIPFilter": {
8205
- "type": "boolean"
8206
- }
8207
- }
7346
+ "$ref": "#/definitions/AppSecurityProperties"
8208
7347
  }
8209
- },
8210
- "required": [
8211
- "id",
8212
- "name"
8213
- ]
7348
+ }
8214
7349
  },
8215
- "Field": {
7350
+ "AppMemoryInfo": {
8216
7351
  "type": "object",
8217
7352
  "properties": {
8218
- "id": {
7353
+ "estMemory": {
8219
7354
  "type": "number"
8220
7355
  },
8221
- "label": {
8222
- "type": "string"
8223
- },
8224
- "fieldType": {
8225
- "type": "string"
8226
- },
8227
- "noWrap": {
8228
- "type": "boolean"
8229
- },
8230
- "bold": {
7356
+ "estMemoryInclDependentApps": {
7357
+ "type": "number"
7358
+ }
7359
+ }
7360
+ },
7361
+ "AppSecurityProperties": {
7362
+ "type": "object",
7363
+ "properties": {
7364
+ "allowClone": {
8231
7365
  "type": "boolean"
8232
7366
  },
8233
- "required": {
7367
+ "allowExport": {
8234
7368
  "type": "boolean"
8235
7369
  },
8236
- "appearsByDefault": {
7370
+ "enableAppTokens": {
8237
7371
  "type": "boolean"
8238
7372
  },
8239
- "findEnabled": {
7373
+ "hideFromPublic": {
8240
7374
  "type": "boolean"
8241
7375
  },
8242
- "unique": {
7376
+ "mustBeRealmApproved": {
8243
7377
  "type": "boolean"
8244
7378
  },
8245
- "doesDataCopy": {
7379
+ "useIPFilter": {
8246
7380
  "type": "boolean"
7381
+ }
7382
+ }
7383
+ },
7384
+ "CreateAppRequest": {
7385
+ "type": "object",
7386
+ "required": [
7387
+ "name"
7388
+ ],
7389
+ "properties": {
7390
+ "name": {
7391
+ "type": "string",
7392
+ "description": "The app name. Multiple apps with the same name are allowed in the same realm."
8247
7393
  },
8248
- "fieldHelp": {
8249
- "type": "string"
7394
+ "assignToken": {
7395
+ "type": "boolean",
7396
+ "description": "Set to true to assign the app to the user token used to create it. Default is false."
8250
7397
  },
8251
- "audited": {
8252
- "type": "boolean"
7398
+ "description": {
7399
+ "type": "string",
7400
+ "description": "The description for the app. Defaults to blank if omitted."
8253
7401
  },
8254
- "properties": {
8255
- "type": "object",
8256
- "properties": {
8257
- "primaryKey": {
8258
- "type": "boolean"
8259
- },
8260
- "foreignKey": {
8261
- "type": "boolean"
8262
- },
8263
- "numLines": {
8264
- "type": "number"
8265
- },
8266
- "maxLength": {
8267
- "type": "number"
8268
- },
8269
- "appendOnly": {
8270
- "type": "boolean"
8271
- },
8272
- "allowHTML": {
8273
- "type": "boolean"
8274
- },
8275
- "allowMentions": {
8276
- "type": "boolean"
8277
- },
8278
- "sortAsGiven": {
8279
- "type": "boolean"
8280
- },
8281
- "carryChoices": {
8282
- "type": "boolean"
8283
- },
8284
- "allowNewChoices": {
8285
- "type": "boolean"
8286
- },
8287
- "formula": {
8288
- "type": "string"
8289
- },
8290
- "defaultValue": {
8291
- "type": "string"
8292
- }
8293
- }
7402
+ "securityProperties": {
7403
+ "$ref": "#/definitions/AppSecurityProperties",
7404
+ "description": "Application security properties."
8294
7405
  },
8295
- "permissions": {
7406
+ "variables": {
8296
7407
  "type": "array",
8297
7408
  "items": {
8298
7409
  "type": "object",
8299
7410
  "properties": {
8300
- "permissionType": {
7411
+ "name": {
8301
7412
  "type": "string"
8302
7413
  },
8303
- "role": {
7414
+ "value": {
8304
7415
  "type": "string"
8305
- },
8306
- "roleId": {
8307
- "type": "number"
8308
7416
  }
8309
- }
8310
- }
7417
+ },
7418
+ "required": [
7419
+ "name",
7420
+ "value"
7421
+ ]
7422
+ },
7423
+ "description": "App variables (max 10, optional). See About Application Variables."
7424
+ }
7425
+ }
7426
+ },
7427
+ "CreateApp200Response": {
7428
+ "type": "object",
7429
+ "properties": {
7430
+ "id": {
7431
+ "type": "string",
7432
+ "description": "The unique identifier for this application."
7433
+ },
7434
+ "name": {
7435
+ "type": "string",
7436
+ "description": "The app name."
7437
+ },
7438
+ "description": {
7439
+ "type": "string",
7440
+ "description": "The description for the app."
7441
+ },
7442
+ "created": {
7443
+ "type": "string",
7444
+ "format": "date-time",
7445
+ "description": "The time and date the app was created (ISO 8601, UTC)."
7446
+ },
7447
+ "updated": {
7448
+ "type": "string",
7449
+ "format": "date-time",
7450
+ "description": "The time and date the app was last updated (ISO 8601, UTC)."
7451
+ },
7452
+ "dateFormat": {
7453
+ "type": "string",
7454
+ "description": "The format used for displaying dates in the app (e.g., MM-DD-YYYY)."
7455
+ },
7456
+ "timeZone": {
7457
+ "type": "string",
7458
+ "description": "The time zone used for displaying time values (e.g., (UTC-08:00) Pacific Time)."
7459
+ },
7460
+ "memoryInfo": {
7461
+ "$ref": "#/definitions/AppMemoryInfo",
7462
+ "description": "Application memory information."
7463
+ },
7464
+ "hasEveryoneOnTheInternet": {
7465
+ "type": "boolean",
7466
+ "description": "Indicates if the app includes Everyone On The Internet access."
7467
+ },
7468
+ "variables": {
7469
+ "type": "array",
7470
+ "items": {
7471
+ "type": "object",
7472
+ "properties": {
7473
+ "name": {
7474
+ "type": "string"
7475
+ },
7476
+ "value": {
7477
+ "type": "string"
7478
+ }
7479
+ },
7480
+ "required": [
7481
+ "name",
7482
+ "value"
7483
+ ]
7484
+ },
7485
+ "description": "The app variables."
7486
+ },
7487
+ "dataClassification": {
7488
+ "type": "string",
7489
+ "description": "The Data Classification label assigned to the app (optional, may be 'None')."
7490
+ },
7491
+ "securityProperties": {
7492
+ "$ref": "#/definitions/AppSecurityProperties",
7493
+ "description": "Security properties of the application."
8311
7494
  }
8312
7495
  },
8313
7496
  "required": [
8314
7497
  "id",
8315
- "label",
8316
- "fieldType"
7498
+ "name"
8317
7499
  ]
8318
7500
  },
8319
- "Table": {
7501
+ "Field": {
8320
7502
  "type": "object",
7503
+ "required": [
7504
+ "id",
7505
+ "label",
7506
+ "fieldType"
7507
+ ],
8321
7508
  "properties": {
8322
7509
  "id": {
7510
+ "type": "integer"
7511
+ },
7512
+ "label": {
8323
7513
  "type": "string"
8324
7514
  },
8325
- "name": {
7515
+ "fieldType": {
8326
7516
  "type": "string"
8327
7517
  },
8328
- "alias": {
7518
+ "noWrap": {
7519
+ "type": "boolean"
7520
+ },
7521
+ "bold": {
7522
+ "type": "boolean"
7523
+ },
7524
+ "required": {
7525
+ "type": "boolean"
7526
+ },
7527
+ "appearsByDefault": {
7528
+ "type": "boolean"
7529
+ },
7530
+ "findEnabled": {
7531
+ "type": "boolean"
7532
+ },
7533
+ "unique": {
7534
+ "type": "boolean"
7535
+ },
7536
+ "doesDataCopy": {
7537
+ "type": "boolean"
7538
+ },
7539
+ "fieldHelp": {
8329
7540
  "type": "string"
8330
7541
  },
8331
- "created": {
8332
- "type": "string",
8333
- "format": "date-time"
7542
+ "audited": {
7543
+ "type": "boolean"
8334
7544
  },
8335
- "defaultSortFieldId": {
8336
- "type": "number"
7545
+ "properties": {
7546
+ "$ref": "#/definitions/FieldProperties"
8337
7547
  },
8338
- "defaultSortOrder": {
7548
+ "permissions": {
7549
+ "type": "array",
7550
+ "items": {
7551
+ "$ref": "#/definitions/FieldPermissionsInner"
7552
+ }
7553
+ }
7554
+ }
7555
+ },
7556
+ "FieldProperties": {
7557
+ "type": "object",
7558
+ "properties": {
7559
+ "primaryKey": {
7560
+ "type": "boolean"
7561
+ },
7562
+ "foreignKey": {
7563
+ "type": "boolean"
7564
+ },
7565
+ "numLines": {
7566
+ "type": "integer"
7567
+ },
7568
+ "maxLength": {
7569
+ "type": "integer"
7570
+ },
7571
+ "appendOnly": {
7572
+ "type": "boolean"
7573
+ },
7574
+ "allowHTML": {
7575
+ "type": "boolean"
7576
+ },
7577
+ "allowMentions": {
7578
+ "type": "boolean"
7579
+ },
7580
+ "sortAsGiven": {
7581
+ "type": "boolean"
7582
+ },
7583
+ "carryChoices": {
7584
+ "type": "boolean"
7585
+ },
7586
+ "allowNewChoices": {
7587
+ "type": "boolean"
7588
+ },
7589
+ "formula": {
8339
7590
  "type": "string"
8340
7591
  },
8341
- "description": {
7592
+ "defaultValue": {
7593
+ "type": "string"
7594
+ }
7595
+ }
7596
+ },
7597
+ "FieldPermissionsInner": {
7598
+ "type": "object",
7599
+ "properties": {
7600
+ "permissionType": {
8342
7601
  "type": "string"
8343
7602
  },
8344
- "keyFieldId": {
8345
- "type": "number"
7603
+ "role": {
7604
+ "type": "string"
8346
7605
  },
8347
- "nextFieldId": {
8348
- "type": "number"
7606
+ "roleId": {
7607
+ "type": "integer"
7608
+ }
7609
+ }
7610
+ },
7611
+ "Table": {
7612
+ "type": "object",
7613
+ "required": [
7614
+ "id",
7615
+ "name"
7616
+ ],
7617
+ "properties": {
7618
+ "id": {
7619
+ "type": "string",
7620
+ "description": "The unique identifier (dbid) of the table."
7621
+ },
7622
+ "name": {
7623
+ "type": "string",
7624
+ "description": "The name of the table."
7625
+ },
7626
+ "alias": {
7627
+ "type": "string",
7628
+ "description": "The automatically-created table alias for the table."
7629
+ },
7630
+ "description": {
7631
+ "type": "string",
7632
+ "description": "The description of the table, as configured by an application administrator."
7633
+ },
7634
+ "created": {
7635
+ "type": "string",
7636
+ "format": "date-time",
7637
+ "description": "The time and date when the table was created, in ISO 8601 format (UTC)."
7638
+ },
7639
+ "updated": {
7640
+ "type": "string",
7641
+ "format": "date-time",
7642
+ "description": "The time and date when the table schema or data was last updated, in ISO 8601 format (UTC)."
8349
7643
  },
8350
7644
  "nextRecordId": {
8351
- "type": "number"
7645
+ "type": "integer",
7646
+ "description": "The incremental Record ID that will be used when the next record is created."
8352
7647
  },
8353
- "pluralRecordName": {
8354
- "type": "string"
7648
+ "nextFieldId": {
7649
+ "type": "integer",
7650
+ "description": "The incremental Field ID that will be used when the next field is created."
7651
+ },
7652
+ "defaultSortFieldId": {
7653
+ "type": "integer",
7654
+ "description": "The id of the field that is configured for default sorting."
7655
+ },
7656
+ "defaultSortOrder": {
7657
+ "type": "string",
7658
+ "enum": [
7659
+ "ASC",
7660
+ "DESC"
7661
+ ],
7662
+ "description": "The default sort order for the table, either ascending (ASC) or descending (DESC)."
7663
+ },
7664
+ "keyFieldId": {
7665
+ "type": "integer",
7666
+ "description": "The id of the field that is configured to be the key on this table, usually the Quickbase Record ID."
8355
7667
  },
8356
7668
  "singleRecordName": {
8357
- "type": "string"
7669
+ "type": "string",
7670
+ "description": "The builder-configured singular noun of the table."
7671
+ },
7672
+ "pluralRecordName": {
7673
+ "type": "string",
7674
+ "description": "The builder-configured plural noun of the table."
8358
7675
  },
8359
7676
  "sizeLimit": {
8360
- "type": "string"
7677
+ "type": "string",
7678
+ "description": "The size limit for the table (e.g., '150 MB')."
7679
+ },
7680
+ "spaceUsed": {
7681
+ "type": "string",
7682
+ "description": "The amount of space currently being used by the table (e.g., '17 MB')."
8361
7683
  },
8362
7684
  "spaceRemaining": {
8363
- "type": "string"
7685
+ "type": "string",
7686
+ "description": "The amount of space remaining for use by the table (e.g., '133 MB')."
7687
+ }
7688
+ }
7689
+ },
7690
+ "UpdateTableRequest": {
7691
+ "type": "object",
7692
+ "properties": {
7693
+ "name": {
7694
+ "type": "string",
7695
+ "description": "The new name for the table."
8364
7696
  },
8365
- "spaceUsed": {
8366
- "type": "string"
7697
+ "singleRecordName": {
7698
+ "type": "string",
7699
+ "description": "The new singular noun for records in the table. Defaults to 'Record' if not provided."
8367
7700
  },
8368
- "updated": {
7701
+ "pluralRecordName": {
8369
7702
  "type": "string",
8370
- "format": "date-time"
7703
+ "description": "The new plural noun for records in the table. Defaults to 'Records' if not provided."
7704
+ },
7705
+ "description": {
7706
+ "type": "string",
7707
+ "description": "The new description for the table. Defaults to blank if not provided."
8371
7708
  }
8372
7709
  },
8373
- "required": [
8374
- "id",
8375
- "name"
8376
- ]
7710
+ "description": "Request body for updating table properties. At least one property must be provided."
7711
+ },
7712
+ "DeleteTableResponse": {
7713
+ "type": "object",
7714
+ "properties": {
7715
+ "deletedTableId": {
7716
+ "type": "string",
7717
+ "description": "The deleted table id."
7718
+ }
7719
+ }
8377
7720
  },
8378
7721
  "Record": {
8379
7722
  "type": "object",
8380
7723
  "properties": {
8381
- "id": {
8382
- "type": "number"
8383
- },
8384
- "fields": {
8385
- "type": "object",
8386
- "additionalProperties": {
8387
- "type": "string"
8388
- }
7724
+ "_dummy": {
7725
+ "type": "string",
7726
+ "description": "Unused dummy property to force model generation.",
7727
+ "nullable": true
8389
7728
  }
8390
7729
  },
7730
+ "additionalProperties": {
7731
+ "type": "object",
7732
+ "properties": {
7733
+ "value": {
7734
+ "type": [
7735
+ "string",
7736
+ "number",
7737
+ "boolean",
7738
+ "object",
7739
+ "array",
7740
+ "null"
7741
+ ]
7742
+ }
7743
+ },
7744
+ "description": "The value object for a field ID key."
7745
+ },
7746
+ "description": "A record with field ID keys (e.g., '6') and value objects (e.g., { value: 'data' })."
7747
+ },
7748
+ "UpsertRequest": {
7749
+ "type": "object",
8391
7750
  "required": [
8392
- "id"
8393
- ]
7751
+ "to"
7752
+ ],
7753
+ "properties": {
7754
+ "to": {
7755
+ "type": "string",
7756
+ "description": "The table identifier (dbid)."
7757
+ },
7758
+ "data": {
7759
+ "type": "array",
7760
+ "items": {
7761
+ "$ref": "#/definitions/Record"
7762
+ },
7763
+ "description": "Array of records to upsert."
7764
+ },
7765
+ "mergeFieldId": {
7766
+ "type": "integer",
7767
+ "description": "The field ID to merge on (optional)."
7768
+ },
7769
+ "fieldsToReturn": {
7770
+ "type": "array",
7771
+ "items": {
7772
+ "type": "integer"
7773
+ },
7774
+ "description": "Field IDs to return in the response (optional)."
7775
+ }
7776
+ }
8394
7777
  },
8395
7778
  "Upsert200Response": {
8396
7779
  "type": "object",
8397
7780
  "properties": {
8398
- "id": {
8399
- "type": "number"
7781
+ "data": {
7782
+ "type": "array",
7783
+ "items": {
7784
+ "type": "object",
7785
+ "additionalProperties": {
7786
+ "type": "object",
7787
+ "properties": {
7788
+ "value": {
7789
+ "type": "any"
7790
+ }
7791
+ }
7792
+ }
7793
+ },
7794
+ "description": "Array of upserted records with field IDs and values."
8400
7795
  },
8401
- "status": {
8402
- "type": "string"
7796
+ "metadata": {
7797
+ "type": "object",
7798
+ "properties": {
7799
+ "createdRecordIds": {
7800
+ "type": "array",
7801
+ "items": {
7802
+ "type": "integer"
7803
+ },
7804
+ "description": "IDs of newly created records."
7805
+ },
7806
+ "updatedRecordIds": {
7807
+ "type": "array",
7808
+ "items": {
7809
+ "type": "integer"
7810
+ },
7811
+ "description": "IDs of updated records."
7812
+ },
7813
+ "unchangedRecordIds": {
7814
+ "type": "array",
7815
+ "items": {
7816
+ "type": "integer"
7817
+ },
7818
+ "description": "IDs of unchanged records."
7819
+ },
7820
+ "totalNumberOfRecordsProcessed": {
7821
+ "type": "integer",
7822
+ "description": "Total records processed."
7823
+ }
7824
+ },
7825
+ "required": [
7826
+ "totalNumberOfRecordsProcessed"
7827
+ ]
8403
7828
  }
8404
- },
8405
- "required": [
8406
- "id"
8407
- ]
7829
+ }
7830
+ },
7831
+ "Upsert207Response": {
7832
+ "type": "object",
7833
+ "properties": {
7834
+ "data": {
7835
+ "type": "array",
7836
+ "items": {
7837
+ "type": "object",
7838
+ "additionalProperties": {
7839
+ "type": "object",
7840
+ "properties": {
7841
+ "value": {
7842
+ "type": "any"
7843
+ }
7844
+ }
7845
+ }
7846
+ },
7847
+ "description": "Array of successfully upserted records (may be empty)."
7848
+ },
7849
+ "metadata": {
7850
+ "type": "object",
7851
+ "properties": {
7852
+ "createdRecordIds": {
7853
+ "type": "array",
7854
+ "items": {
7855
+ "type": "integer"
7856
+ }
7857
+ },
7858
+ "updatedRecordIds": {
7859
+ "type": "array",
7860
+ "items": {
7861
+ "type": "integer"
7862
+ }
7863
+ },
7864
+ "unchangedRecordIds": {
7865
+ "type": "array",
7866
+ "items": {
7867
+ "type": "integer"
7868
+ }
7869
+ },
7870
+ "lineErrors": {
7871
+ "type": "object",
7872
+ "additionalProperties": {
7873
+ "type": "array",
7874
+ "items": {
7875
+ "type": "string"
7876
+ }
7877
+ },
7878
+ "description": "Errors by line number (1-based index)."
7879
+ },
7880
+ "totalNumberOfRecordsProcessed": {
7881
+ "type": "integer"
7882
+ }
7883
+ },
7884
+ "required": [
7885
+ "totalNumberOfRecordsProcessed"
7886
+ ]
7887
+ }
7888
+ }
8408
7889
  },
8409
7890
  "ReportRunResponse": {
8410
7891
  "type": "object",
@@ -8415,21 +7896,185 @@
8415
7896
  "data": {
8416
7897
  "type": "object"
8417
7898
  }
8418
- },
8419
- "required": [
8420
- "id"
8421
- ]
7899
+ }
8422
7900
  },
8423
7901
  "GetTempTokenDBID200Response": {
8424
7902
  "type": "object",
7903
+ "required": [
7904
+ "temporaryAuthorization"
7905
+ ],
8425
7906
  "properties": {
8426
7907
  "temporaryAuthorization": {
8427
7908
  "type": "string"
8428
7909
  }
7910
+ }
7911
+ },
7912
+ "DeleteRecordsRequest": {
7913
+ "type": "object",
7914
+ "required": [
7915
+ "from",
7916
+ "where"
7917
+ ],
7918
+ "properties": {
7919
+ "from": {
7920
+ "type": "string",
7921
+ "description": "The table identifier (dbid) from which to delete records."
7922
+ },
7923
+ "where": {
7924
+ "type": "string",
7925
+ "description": "A QuickBase query string specifying which records to delete."
7926
+ }
7927
+ },
7928
+ "description": "Request body for deleting records from a table using a query."
7929
+ },
7930
+ "DeleteRecords200Response": {
7931
+ "type": "object",
7932
+ "properties": {
7933
+ "numberDeleted": {
7934
+ "type": "integer",
7935
+ "description": "The number of records successfully deleted."
7936
+ }
8429
7937
  },
8430
7938
  "required": [
8431
- "temporaryAuthorization"
8432
- ]
7939
+ "numberDeleted"
7940
+ ],
7941
+ "description": "Response body for successful deletion of records."
7942
+ },
7943
+ "RunQueryRequest": {
7944
+ "type": "object",
7945
+ "required": [
7946
+ "from"
7947
+ ],
7948
+ "properties": {
7949
+ "from": {
7950
+ "type": "string",
7951
+ "description": "Table ID (dbid)"
7952
+ },
7953
+ "select": {
7954
+ "type": "array",
7955
+ "items": {
7956
+ "type": "integer"
7957
+ },
7958
+ "description": "Field IDs to return"
7959
+ },
7960
+ "where": {
7961
+ "type": "string",
7962
+ "description": "Query string"
7963
+ },
7964
+ "sortBy": {
7965
+ "type": "array",
7966
+ "items": {
7967
+ "type": "object",
7968
+ "properties": {
7969
+ "fieldId": {
7970
+ "type": "integer"
7971
+ },
7972
+ "order": {
7973
+ "type": "string",
7974
+ "enum": [
7975
+ "ASC",
7976
+ "DESC"
7977
+ ]
7978
+ }
7979
+ }
7980
+ },
7981
+ "description": "Sort criteria"
7982
+ },
7983
+ "groupBy": {
7984
+ "type": "array",
7985
+ "items": {
7986
+ "type": "object",
7987
+ "properties": {
7988
+ "fieldId": {
7989
+ "type": "integer"
7990
+ },
7991
+ "grouping": {
7992
+ "type": "string",
7993
+ "enum": [
7994
+ "equal-values"
7995
+ ]
7996
+ }
7997
+ }
7998
+ },
7999
+ "description": "Grouping criteria"
8000
+ },
8001
+ "options": {
8002
+ "type": "object",
8003
+ "properties": {
8004
+ "skip": {
8005
+ "type": "integer",
8006
+ "description": "Number of records to skip"
8007
+ },
8008
+ "top": {
8009
+ "type": "integer",
8010
+ "description": "Max number of records to return"
8011
+ },
8012
+ "compareWithAppLocalTime": {
8013
+ "type": "boolean",
8014
+ "description": "Compare times with app local time"
8015
+ }
8016
+ }
8017
+ }
8018
+ }
8019
+ },
8020
+ "RunQueryResponse": {
8021
+ "type": "object",
8022
+ "properties": {
8023
+ "data": {
8024
+ "type": "array",
8025
+ "items": {
8026
+ "type": "object",
8027
+ "additionalProperties": {
8028
+ "type": "object",
8029
+ "properties": {
8030
+ "value": {
8031
+ "type": "any"
8032
+ }
8033
+ }
8034
+ }
8035
+ },
8036
+ "description": "Array of record data with field IDs as keys"
8037
+ },
8038
+ "fields": {
8039
+ "type": "array",
8040
+ "items": {
8041
+ "type": "object",
8042
+ "properties": {
8043
+ "id": {
8044
+ "type": "integer"
8045
+ },
8046
+ "label": {
8047
+ "type": "string"
8048
+ },
8049
+ "type": {
8050
+ "type": "string"
8051
+ }
8052
+ }
8053
+ },
8054
+ "description": "Field metadata"
8055
+ },
8056
+ "metadata": {
8057
+ "type": "object",
8058
+ "properties": {
8059
+ "numFields": {
8060
+ "type": "integer"
8061
+ },
8062
+ "numRecords": {
8063
+ "type": "integer"
8064
+ },
8065
+ "skip": {
8066
+ "type": "integer"
8067
+ },
8068
+ "top": {
8069
+ "type": "integer"
8070
+ },
8071
+ "totalRecords": {
8072
+ "type": "integer"
8073
+ }
8074
+ },
8075
+ "description": "Query metadata"
8076
+ }
8077
+ }
8433
8078
  }
8434
8079
  }
8435
8080
  }