quickbase-js 0.1.0-beta.7

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 (123) hide show
  1. package/CHANGELOG.md +129 -0
  2. package/LICENSE +21 -0
  3. package/README.md +204 -0
  4. package/build-common.js +131 -0
  5. package/build-esm.js +71 -0
  6. package/build-umd.js +69 -0
  7. package/dist/esm/quickbase.d.ts +7594 -0
  8. package/dist/esm/quickbase.js +9752 -0
  9. package/dist/esm/quickbase.js.map +1 -0
  10. package/dist/esm/quickbase.min.js +2 -0
  11. package/dist/esm/quickbase.min.js.map +1 -0
  12. package/dist/umd/quickbase.umd.js +10502 -0
  13. package/dist/umd/quickbase.umd.js.map +1 -0
  14. package/dist/umd/quickbase.umd.min.js +2 -0
  15. package/dist/umd/quickbase.umd.min.js.map +1 -0
  16. package/examples/quicbase-jsCDN.html +36 -0
  17. package/examples/react.js +48 -0
  18. package/examples/vanillajs.html +47 -0
  19. package/notes.txt +158 -0
  20. package/open-api/fix-spec-main.ts +96 -0
  21. package/open-api/generate-unified-interface.ts +277 -0
  22. package/open-api/output/override-report.json +58 -0
  23. package/open-api/output/quickbase-fixed.json +10610 -0
  24. package/open-api/regenerate-client.ts +116 -0
  25. package/open-api/schema/enhance-general.ts +100 -0
  26. package/open-api/schema/fix-arrays.ts +69 -0
  27. package/open-api/schema/tags/apps.ts +90 -0
  28. package/open-api/schema/tags/fields.ts +156 -0
  29. package/open-api/schema/tags/groups.ts +51 -0
  30. package/open-api/schema/tags/index.ts +68 -0
  31. package/open-api/schema/tags/records.ts +115 -0
  32. package/open-api/schema/tags/tables.ts +211 -0
  33. package/open-api/schema/tags/users.ts +47 -0
  34. package/open-api/types/spec.ts +41 -0
  35. package/open-api/utils/infer-schema.ts +40 -0
  36. package/open-api/utils/naming.ts +10 -0
  37. package/package.json +91 -0
  38. package/playwright.config.ts +37 -0
  39. package/rollup.config.js +114 -0
  40. package/specs/QuickBase_RESTful_API_2025-03-04T06_22_39.725Z.json +46878 -0
  41. package/specs/split/apps.json +1315 -0
  42. package/specs/split/auth.json +191 -0
  43. package/specs/split/fields.json +3869 -0
  44. package/specs/split/records.json +754 -0
  45. package/specs/split/reports.json +619 -0
  46. package/specs/split/tables.json +1605 -0
  47. package/src/generated-unified/QuickbaseClient.ts +359 -0
  48. package/src/generated-unified/missing-types-report.json +3 -0
  49. package/src/index.ts +1 -0
  50. package/src/quickbaseClient.ts +402 -0
  51. package/src/tokenCache.ts +51 -0
  52. package/src/utils.ts +7 -0
  53. package/test-esm.js +1 -0
  54. package/test-results.json +2050 -0
  55. package/test-umd.js +1 -0
  56. package/test.ts +1 -0
  57. package/tests/playwright/qb/auth/cacheSwitching.test.ts +159 -0
  58. package/tests/playwright/qb/auth/fetchTempToken401.test.ts +219 -0
  59. package/tests/playwright/qb/auth/getAppWithTempToken.test.ts +162 -0
  60. package/tests/playwright/qb/auth/getAppWithUserToken.test.ts +153 -0
  61. package/tests/playwright/qb/auth/getTempToken.test.ts +152 -0
  62. package/tests/playwright/qb/auth/tokenPrefetch.test.ts +179 -0
  63. package/tests/playwright/qb/auth/tokenRenewal.test.ts +133 -0
  64. package/tests/setup.ts +51 -0
  65. package/tests/vitest/qb/apps/copyApp.test.ts +76 -0
  66. package/tests/vitest/qb/apps/createApp.test.ts +64 -0
  67. package/tests/vitest/qb/apps/deleteApp.test.ts +76 -0
  68. package/tests/vitest/qb/apps/getApp.test.ts +40 -0
  69. package/tests/vitest/qb/fields/createField.test.ts +78 -0
  70. package/tests/vitest/qb/fields/deleteFields.test.ts +89 -0
  71. package/tests/vitest/qb/fields/getField.test.ts +85 -0
  72. package/tests/vitest/qb/fields/getFieldUsage.test.ts +174 -0
  73. package/tests/vitest/qb/fields/getFields.test.ts +232 -0
  74. package/tests/vitest/qb/fields/getFieldsUsage.test.ts +77 -0
  75. package/tests/vitest/qb/index.ts +28 -0
  76. package/tests/vitest/qb/records/deleteRecords.test.ts +110 -0
  77. package/tests/vitest/qb/records/runQuery.test.ts +146 -0
  78. package/tests/vitest/qb/records/upsert.test.ts +102 -0
  79. package/tests/vitest/qb/tables/createTable.test.ts +55 -0
  80. package/tests/vitest/qb/tables/deleteTable.test.ts +50 -0
  81. package/tests/vitest/qb/tables/getAppTables.test.ts +46 -0
  82. package/tests/vitest/qb/tables/getRelationships.test.ts +80 -0
  83. package/tests/vitest/qb/tables/getTable.test.ts +26 -0
  84. package/tests/vitest/qb/tables/updateTable.test.ts +48 -0
  85. package/tests/vitest/unit/apps/copyApp.test.ts +488 -0
  86. package/tests/vitest/unit/apps/createApp.test.ts +186 -0
  87. package/tests/vitest/unit/apps/deleteApp.test.ts +216 -0
  88. package/tests/vitest/unit/apps/getApp.test.ts +128 -0
  89. package/tests/vitest/unit/auth/fetchTempToken401.test.ts +82 -0
  90. package/tests/vitest/unit/auth/getTempToken.test.ts +95 -0
  91. package/tests/vitest/unit/auth/retryOn401.test.ts +116 -0
  92. package/tests/vitest/unit/auth/two401s.test.ts +86 -0
  93. package/tests/vitest/unit/fields/createField.test.ts +391 -0
  94. package/tests/vitest/unit/fields/deleteFields.test.ts +141 -0
  95. package/tests/vitest/unit/fields/getField.test.ts +189 -0
  96. package/tests/vitest/unit/fields/getFieldUsage.test.ts +147 -0
  97. package/tests/vitest/unit/fields/getFields.test.ts +122 -0
  98. package/tests/vitest/unit/fields/getFieldsUsage.test.ts +160 -0
  99. package/tests/vitest/unit/index.ts +33 -0
  100. package/tests/vitest/unit/records/deleteRecords.test.ts +112 -0
  101. package/tests/vitest/unit/records/runQuery.test.ts +102 -0
  102. package/tests/vitest/unit/records/upsert.test.ts +234 -0
  103. package/tests/vitest/unit/tables/createTable.test.ts +70 -0
  104. package/tests/vitest/unit/tables/deleteTable.test.ts +77 -0
  105. package/tests/vitest/unit/tables/getAppTables.test.ts +85 -0
  106. package/tests/vitest/unit/tables/getRelationships.test.ts +259 -0
  107. package/tests/vitest/unit/tables/getTable.test.ts +233 -0
  108. package/tests/vitest/unit/tables/updateTable.test.ts +80 -0
  109. package/tests/vitest/unit/umd.test.ts +8 -0
  110. package/text.txt +104 -0
  111. package/tools/generate-types.ts +29 -0
  112. package/tools/log-gen.ts +231 -0
  113. package/tools/log-gen.yaml +3826 -0
  114. package/tools/openapi-jars/openapi-generator-cli-7.12.0.jar +0 -0
  115. package/tools/openapi-schema-validator.ts +38 -0
  116. package/tools/spec-analyzer.ts +163 -0
  117. package/tools/split-spec.ts +148 -0
  118. package/tools/test-import.ts +3 -0
  119. package/tools/validate-spec.ts +40 -0
  120. package/tsconfig.build.json +17 -0
  121. package/tsconfig.json +29 -0
  122. package/versionrc.json +9 -0
  123. package/vitest.config.ts +27 -0
@@ -0,0 +1,754 @@
1
+ {
2
+ "swagger": "2.0",
3
+ "info": {
4
+ "title": "Quick Base API",
5
+ "version": "1.0.0"
6
+ },
7
+ "paths": {
8
+ "/records": {
9
+ "post": {
10
+ "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.",
11
+ "summary": "Insert/Update record(s)",
12
+ "operationId": "upsert",
13
+ "consumes": [
14
+ "application/json"
15
+ ],
16
+ "produces": [
17
+ "application/json"
18
+ ],
19
+ "parameters": [
20
+ {
21
+ "name": "QB-Realm-Hostname",
22
+ "in": "header",
23
+ "required": true,
24
+ "description": "Your Quickbase domain, for example demo.quickbase.com",
25
+ "type": "string"
26
+ },
27
+ {
28
+ "name": "User-Agent",
29
+ "in": "header",
30
+ "required": false,
31
+ "description": "This is entered by the person or utility invoking the API. You might custom create this or use the default one of your toolkit. Being descriptive here may offer more identification and troubleshooting capabilities.",
32
+ "type": "string"
33
+ },
34
+ {
35
+ "name": "Authorization",
36
+ "in": "header",
37
+ "required": true,
38
+ "description": "The Quickbase authentication scheme you are using to authenticate the request, as described on the [authorization page](../auth).",
39
+ "type": "string"
40
+ },
41
+ {
42
+ "name": "generated",
43
+ "in": "body",
44
+ "schema": {
45
+ "x-amf-examples": {
46
+ "Insert record": {
47
+ "value": {
48
+ "to": "bck7gp3q2",
49
+ "data": [
50
+ {
51
+ "6": {
52
+ "value": "This is my text"
53
+ },
54
+ "7": {
55
+ "value": 10
56
+ },
57
+ "8": {
58
+ "value": "2019-12-18T08:00:00Z"
59
+ },
60
+ "9": {
61
+ "value": [
62
+ "a",
63
+ "b"
64
+ ]
65
+ },
66
+ "10": {
67
+ "value": true
68
+ },
69
+ "11": {
70
+ "value": "user@quickbase.com"
71
+ },
72
+ "12": {
73
+ "value": "www.quickbase.com"
74
+ },
75
+ "13": {
76
+ "value": [
77
+ {
78
+ "id": "123456.ab1s"
79
+ },
80
+ {
81
+ "id": "254789.mkgp"
82
+ },
83
+ {
84
+ "id": "789654.vc2s"
85
+ }
86
+ ]
87
+ }
88
+ }
89
+ ],
90
+ "fieldsToReturn": [
91
+ 6,
92
+ 7,
93
+ 8,
94
+ 9,
95
+ 10,
96
+ 11,
97
+ 12,
98
+ 13
99
+ ]
100
+ }
101
+ },
102
+ "Update existing record": {
103
+ "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.",
104
+ "value": {
105
+ "to": "bck7gp3q2",
106
+ "data": [
107
+ {
108
+ "3": {
109
+ "value": 1
110
+ },
111
+ "6": {
112
+ "value": "This is my new text"
113
+ },
114
+ "7": {
115
+ "value": 20
116
+ },
117
+ "9": {
118
+ "value": [
119
+ "c",
120
+ "d"
121
+ ]
122
+ },
123
+ "10": {
124
+ "value": false
125
+ },
126
+ "11": {
127
+ "value": "newuser@quickbase.com"
128
+ }
129
+ }
130
+ ],
131
+ "fieldsToReturn": [
132
+ 6,
133
+ 7,
134
+ 9,
135
+ 10,
136
+ 11
137
+ ]
138
+ }
139
+ }
140
+ },
141
+ "type": "object",
142
+ "additionalProperties": true,
143
+ "required": [
144
+ "to"
145
+ ],
146
+ "properties": {
147
+ "to": {
148
+ "description": "The table identifier.",
149
+ "example": "bck7gp3q2",
150
+ "type": "string",
151
+ "minLength": 1
152
+ },
153
+ "data": {
154
+ "description": "Record data array, where each record contains key-value mappings of fields to be defined/updated and their values.",
155
+ "type": "array"
156
+ },
157
+ "mergeFieldId": {
158
+ "description": "The merge field id.",
159
+ "example": 7,
160
+ "type": "integer"
161
+ },
162
+ "fieldsToReturn": {
163
+ "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.",
164
+ "type": "array",
165
+ "items": {
166
+ "type": "integer"
167
+ }
168
+ }
169
+ }
170
+ }
171
+ }
172
+ ],
173
+ "responses": {
174
+ "200": {
175
+ "description": "",
176
+ "x-amf-mediaType": "application/json",
177
+ "schema": {
178
+ "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.",
179
+ "example": {
180
+ "value": {
181
+ "data": [
182
+ {
183
+ "3": {
184
+ "value": 1
185
+ },
186
+ "6": {
187
+ "value": "Updating this record"
188
+ },
189
+ "7": {
190
+ "value": 10
191
+ },
192
+ "8": {
193
+ "value": "2019-12-18T08:00:00.000Z"
194
+ }
195
+ },
196
+ {
197
+ "3": {
198
+ "value": 11
199
+ },
200
+ "6": {
201
+ "value": "This is my text"
202
+ },
203
+ "7": {
204
+ "value": 15
205
+ },
206
+ "8": {
207
+ "value": "2019-12-19T08:00:00.000Z"
208
+ }
209
+ },
210
+ {
211
+ "3": {
212
+ "value": 12
213
+ },
214
+ "6": {
215
+ "value": "This is my other text"
216
+ },
217
+ "7": {
218
+ "value": 20
219
+ },
220
+ "8": {
221
+ "value": "2019-12-20T08:00:00.000Z"
222
+ }
223
+ }
224
+ ],
225
+ "metadata": {
226
+ "createdRecordIds": [
227
+ 11,
228
+ 12
229
+ ],
230
+ "totalNumberOfRecordsProcessed": 3,
231
+ "unchangedRecordIds": [],
232
+ "updatedRecordIds": [
233
+ 1
234
+ ]
235
+ }
236
+ }
237
+ },
238
+ "type": "object",
239
+ "additionalProperties": true,
240
+ "properties": {
241
+ "metadata": {
242
+ "description": "Information about created records, updated records, referenced but unchanged records, and records having any errors while being processed.",
243
+ "type": "object",
244
+ "additionalProperties": true,
245
+ "properties": {
246
+ "createdRecordIds": {
247
+ "description": "Array containing the created record ids.",
248
+ "type": "array",
249
+ "items": {
250
+ "type": "integer"
251
+ }
252
+ },
253
+ "lineErrors": {
254
+ "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.",
255
+ "type": "object",
256
+ "additionalProperties": true
257
+ },
258
+ "unchangedRecordIds": {
259
+ "description": "Array containing the unchanged record ids.",
260
+ "type": "array",
261
+ "items": {
262
+ "type": "integer"
263
+ }
264
+ },
265
+ "updatedRecordIds": {
266
+ "description": "Array containing the updated record ids.",
267
+ "type": "array",
268
+ "items": {
269
+ "type": "integer"
270
+ }
271
+ },
272
+ "totalNumberOfRecordsProcessed": {
273
+ "description": "Number of records processed. Includes successful and failed record updates.",
274
+ "type": "integer"
275
+ }
276
+ }
277
+ },
278
+ "data": {
279
+ "description": "The data that is expected to be returned.",
280
+ "type": "array"
281
+ }
282
+ }
283
+ }
284
+ },
285
+ "207": {
286
+ "description": "",
287
+ "x-amf-mediaType": "application/json",
288
+ "schema": {
289
+ "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.",
290
+ "example": {
291
+ "value": {
292
+ "data": [],
293
+ "metadata": {
294
+ "createdRecordIds": [
295
+ 11,
296
+ 12
297
+ ],
298
+ "lineErrors": {
299
+ "2": [
300
+ "Incompatible value for field with ID \"6\"."
301
+ ]
302
+ },
303
+ "totalNumberOfRecordsProcessed": 3,
304
+ "unchangedRecordIds": [],
305
+ "updatedRecordIds": []
306
+ }
307
+ }
308
+ },
309
+ "type": "object",
310
+ "additionalProperties": true,
311
+ "properties": {
312
+ "metadata": {
313
+ "description": "Information about created records, updated records, referenced but unchanged records, and records having any errors while being processed.",
314
+ "type": "object",
315
+ "additionalProperties": true,
316
+ "properties": {
317
+ "createdRecordIds": {
318
+ "description": "Array containing the created record ids.",
319
+ "type": "array",
320
+ "items": {
321
+ "type": "integer"
322
+ }
323
+ },
324
+ "lineErrors": {
325
+ "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.",
326
+ "type": "object",
327
+ "additionalProperties": true
328
+ },
329
+ "unchangedRecordIds": {
330
+ "description": "Array containing the unchanged record ids.",
331
+ "type": "array",
332
+ "items": {
333
+ "type": "integer"
334
+ }
335
+ },
336
+ "updatedRecordIds": {
337
+ "description": "Array containing the updated record ids.",
338
+ "type": "array",
339
+ "items": {
340
+ "type": "integer"
341
+ }
342
+ },
343
+ "totalNumberOfRecordsProcessed": {
344
+ "description": "Number of records processed. Includes successful and failed record updates.",
345
+ "type": "integer"
346
+ }
347
+ }
348
+ },
349
+ "data": {
350
+ "description": "The data that is expected to be returned.",
351
+ "type": "array"
352
+ }
353
+ }
354
+ }
355
+ },
356
+ "400": {
357
+ "description": "",
358
+ "x-amf-mediaType": "application/json",
359
+ "schema": {
360
+ "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).",
361
+ "example": {
362
+ "message": "Bad request",
363
+ "description": "Data object cannot be empty."
364
+ },
365
+ "type": "object",
366
+ "additionalProperties": true,
367
+ "properties": {
368
+ "message": {
369
+ "description": "The type of error found.",
370
+ "type": "string"
371
+ },
372
+ "description": {
373
+ "description": "The description for the occurence of the error.",
374
+ "type": "string"
375
+ }
376
+ }
377
+ }
378
+ }
379
+ },
380
+ "tags": [
381
+ "Records"
382
+ ]
383
+ },
384
+ "delete": {
385
+ "description": "Deletes record(s) in a table based on a query. Alternatively, all records in the table can be deleted.",
386
+ "summary": "Delete record(s)",
387
+ "operationId": "deleteRecords",
388
+ "consumes": [
389
+ "application/json"
390
+ ],
391
+ "produces": [
392
+ "application/json"
393
+ ],
394
+ "parameters": [
395
+ {
396
+ "name": "QB-Realm-Hostname",
397
+ "in": "header",
398
+ "required": true,
399
+ "description": "Your Quickbase domain, for example demo.quickbase.com",
400
+ "type": "string"
401
+ },
402
+ {
403
+ "name": "User-Agent",
404
+ "in": "header",
405
+ "required": false,
406
+ "description": "This is entered by the person or utility invoking the API. You might custom create this or use the default one of your toolkit. Being descriptive here may offer more identification and troubleshooting capabilities.",
407
+ "type": "string"
408
+ },
409
+ {
410
+ "name": "Authorization",
411
+ "in": "header",
412
+ "required": true,
413
+ "description": "The Quickbase authentication scheme you are using to authenticate the request, as described on the [authorization page](../auth).",
414
+ "type": "string"
415
+ },
416
+ {
417
+ "name": "generated",
418
+ "in": "body",
419
+ "schema": {
420
+ "example": {
421
+ "from": "bck7gp3q2",
422
+ "where": "{6.EX.'hello'}"
423
+ },
424
+ "type": "object",
425
+ "additionalProperties": true,
426
+ "required": [
427
+ "from",
428
+ "where"
429
+ ],
430
+ "properties": {
431
+ "from": {
432
+ "description": "The unique identifier of the table.",
433
+ "example": "bck7gp3q2",
434
+ "type": "string",
435
+ "minLength": 1
436
+ },
437
+ "where": {
438
+ "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.",
439
+ "example": "{6.EX.'hello'}",
440
+ "type": "string",
441
+ "minLength": 1
442
+ }
443
+ }
444
+ }
445
+ }
446
+ ],
447
+ "responses": {
448
+ "200": {
449
+ "description": "Successful delete records response.",
450
+ "x-amf-mediaType": "application/json",
451
+ "schema": {
452
+ "example": {
453
+ "numberDeleted": 1
454
+ },
455
+ "type": "object",
456
+ "additionalProperties": true,
457
+ "properties": {
458
+ "numberDeleted": {
459
+ "description": "The number of records deleted.",
460
+ "example": 1,
461
+ "type": "integer"
462
+ }
463
+ }
464
+ }
465
+ }
466
+ },
467
+ "tags": [
468
+ "Records"
469
+ ]
470
+ }
471
+ },
472
+ "/records/query": {
473
+ "post": {
474
+ "description": "Pass in a query in the [Quickbase query language](https://help.quickbase.com/api-guide/componentsquery.html). Returns record data with [intelligent pagination](../pagination) based on the approximate size of each record. The metadata object will include the necessary information to iterate over the response and gather more data.",
475
+ "summary": "Query for data",
476
+ "operationId": "runQuery",
477
+ "consumes": [
478
+ "application/json"
479
+ ],
480
+ "produces": [
481
+ "application/json"
482
+ ],
483
+ "parameters": [
484
+ {
485
+ "name": "QB-Realm-Hostname",
486
+ "in": "header",
487
+ "required": true,
488
+ "description": "Your Quickbase domain, for example demo.quickbase.com",
489
+ "type": "string"
490
+ },
491
+ {
492
+ "name": "User-Agent",
493
+ "in": "header",
494
+ "required": false,
495
+ "description": "This is entered by the person or utility invoking the API. You might custom create this or use the default one of your toolkit. Being descriptive here may offer more identification and troubleshooting capabilities.",
496
+ "type": "string"
497
+ },
498
+ {
499
+ "name": "Authorization",
500
+ "in": "header",
501
+ "required": true,
502
+ "description": "The Quickbase authentication scheme you are using to authenticate the request, as described on the [authorization page](../auth).",
503
+ "type": "string"
504
+ },
505
+ {
506
+ "name": "generated",
507
+ "in": "body",
508
+ "schema": {
509
+ "description": "If grouping or sorting is not set, records will not be sorted.",
510
+ "example": {
511
+ "value": {
512
+ "from": "bck7gp3q2",
513
+ "select": [
514
+ 1,
515
+ 2,
516
+ 3
517
+ ],
518
+ "where": "{1.CT.'hello'}",
519
+ "sortBy": [
520
+ {
521
+ "fieldId": 4,
522
+ "order": "ASC"
523
+ },
524
+ {
525
+ "fieldId": 5,
526
+ "order": "ASC"
527
+ }
528
+ ],
529
+ "groupBy": [
530
+ {
531
+ "fieldId": 6,
532
+ "grouping": "equal-values"
533
+ }
534
+ ],
535
+ "options": {
536
+ "skip": 0,
537
+ "top": 0,
538
+ "compareWithAppLocalTime": false
539
+ }
540
+ }
541
+ },
542
+ "type": "object",
543
+ "additionalProperties": true,
544
+ "required": [
545
+ "from"
546
+ ],
547
+ "properties": {
548
+ "options": {
549
+ "description": "Additional query options.",
550
+ "type": "object",
551
+ "additionalProperties": true,
552
+ "properties": {
553
+ "skip": {
554
+ "description": "The number of records to skip.",
555
+ "type": "integer"
556
+ },
557
+ "compareWithAppLocalTime": {
558
+ "description": "Whether to run the query against a date time field with respect to the application's local time. The query is run with UTC time by default. This parameter is ignored when querying by ISO8601, which is always in UTC.",
559
+ "type": "boolean"
560
+ },
561
+ "top": {
562
+ "description": "The maximum number of records to display.",
563
+ "type": "integer"
564
+ }
565
+ }
566
+ },
567
+ "where": {
568
+ "description": "The filter, using the Quickbase query language, which determines the records to return. If this parameter is omitted, the query will return all records.",
569
+ "example": "{6.EX.'hello'}",
570
+ "type": "string"
571
+ },
572
+ "groupBy": {
573
+ "description": "An array that contains the fields to group the records by.",
574
+ "type": "array",
575
+ "items": {
576
+ "type": "object",
577
+ "additionalProperties": true,
578
+ "properties": {
579
+ "fieldId": {
580
+ "description": "The unique identifier of a field in a table.",
581
+ "type": "integer"
582
+ },
583
+ "grouping": {
584
+ "description": "Group by based on equal values (equal-values)",
585
+ "enum": [
586
+ "equal-values"
587
+ ],
588
+ "type": "string"
589
+ }
590
+ }
591
+ }
592
+ },
593
+ "sortBy": {
594
+ "description": "An array of field IDs and sort directions. If this attribute is not set or set to false, queries will be unsorted to improve performance.",
595
+ "x-amf-union": [
596
+ {
597
+ "type": "array",
598
+ "items": {
599
+ "type": "object",
600
+ "additionalProperties": true,
601
+ "properties": {
602
+ "fieldId": {
603
+ "description": "The unique identifier of a field in a table.",
604
+ "type": "integer"
605
+ },
606
+ "order": {
607
+ "description": "Sort based on ascending order (ASC), descending order (DESC) or equal values (equal-values)",
608
+ "enum": [
609
+ "ASC",
610
+ "DESC",
611
+ "equal-values"
612
+ ],
613
+ "type": "string"
614
+ }
615
+ }
616
+ }
617
+ },
618
+ {
619
+ "type": "boolean"
620
+ }
621
+ ]
622
+ },
623
+ "select": {
624
+ "description": "An array of field ids for the fields that should be returned in the response. If empty, the default columns on the table will be returned.",
625
+ "type": "array"
626
+ },
627
+ "from": {
628
+ "description": "The table identifier.",
629
+ "example": "bck7gp3q2",
630
+ "type": "string",
631
+ "minLength": 1
632
+ }
633
+ }
634
+ }
635
+ }
636
+ ],
637
+ "responses": {
638
+ "200": {
639
+ "description": "Success",
640
+ "x-amf-mediaType": "application/json",
641
+ "schema": {
642
+ "example": {
643
+ "value": {
644
+ "data": [
645
+ {
646
+ "6": {
647
+ "value": "Andre Harris"
648
+ },
649
+ "7": {
650
+ "value": 10
651
+ },
652
+ "8": {
653
+ "value": "2019-12-18T08:00:00Z"
654
+ }
655
+ }
656
+ ],
657
+ "fields": [
658
+ {
659
+ "id": 6,
660
+ "label": "Full Name",
661
+ "type": "text"
662
+ },
663
+ {
664
+ "id": 7,
665
+ "label": "Amount",
666
+ "type": "numeric"
667
+ },
668
+ {
669
+ "id": 8,
670
+ "label": "Date time",
671
+ "type": "date time"
672
+ }
673
+ ],
674
+ "metadata": {
675
+ "totalRecords": 10,
676
+ "numRecords": 1,
677
+ "numFields": 3,
678
+ "skip": 0
679
+ }
680
+ }
681
+ },
682
+ "type": "object",
683
+ "additionalProperties": true,
684
+ "properties": {
685
+ "fields": {
686
+ "description": "An array of objects that contains limited meta-data of each field displayed in the report. This assists in building logic that depends on field types and IDs.",
687
+ "type": "array",
688
+ "items": {
689
+ "type": "object",
690
+ "additionalProperties": true,
691
+ "properties": {
692
+ "id": {
693
+ "description": "Field id.",
694
+ "type": "integer"
695
+ },
696
+ "label": {
697
+ "description": "Field label.",
698
+ "type": "string"
699
+ },
700
+ "type": {
701
+ "description": "Field type.",
702
+ "type": "string"
703
+ }
704
+ }
705
+ }
706
+ },
707
+ "data": {
708
+ "description": "An array of objects that either represents the record data or summarized values, depending on the report type.",
709
+ "type": "array"
710
+ },
711
+ "metadata": {
712
+ "description": "Additional information about the results that may be helpful. Pagination may be needed if either you specify a smaller number of results to skip than is available, or if the API automatically returns fewer results. numRecords can be compared to totalRecords to determine if further pagination is needed.",
713
+ "type": "object",
714
+ "additionalProperties": true,
715
+ "required": [
716
+ "numFields",
717
+ "totalRecords",
718
+ "numRecords"
719
+ ],
720
+ "properties": {
721
+ "skip": {
722
+ "description": "The number of records to skip",
723
+ "type": "integer"
724
+ },
725
+ "numFields": {
726
+ "description": "The number of fields in each record in the current response object",
727
+ "type": "integer"
728
+ },
729
+ "top": {
730
+ "description": "If present, the maximum number of records requested by the caller",
731
+ "type": "integer"
732
+ },
733
+ "totalRecords": {
734
+ "description": "The total number of records in the result set",
735
+ "type": "integer"
736
+ },
737
+ "numRecords": {
738
+ "description": "The number of records in the current response object",
739
+ "type": "integer"
740
+ }
741
+ }
742
+ }
743
+ }
744
+ }
745
+ }
746
+ },
747
+ "tags": [
748
+ "Records"
749
+ ]
750
+ }
751
+ }
752
+ },
753
+ "definitions": {}
754
+ }