quickbase-js 0.1.0-beta.10

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 (165) hide show
  1. package/CHANGELOG.md +211 -0
  2. package/LICENSE +21 -0
  3. package/README.md +179 -0
  4. package/api-examples.md +49 -0
  5. package/build-common.js +131 -0
  6. package/build-esm.js +71 -0
  7. package/build-umd.js +69 -0
  8. package/dist/esm/quickbase.d.ts +8081 -0
  9. package/dist/esm/quickbase.js +7928 -0
  10. package/dist/esm/quickbase.js.map +1 -0
  11. package/dist/esm/quickbase.min.js +2 -0
  12. package/dist/esm/quickbase.min.js.map +1 -0
  13. package/dist/umd/quickbase.umd.js +8504 -0
  14. package/dist/umd/quickbase.umd.js.map +1 -0
  15. package/dist/umd/quickbase.umd.min.js +2 -0
  16. package/dist/umd/quickbase.umd.min.js.map +1 -0
  17. package/docs/.vitepress/cache/deps/@theme_index.js +275 -0
  18. package/docs/.vitepress/cache/deps/@theme_index.js.map +7 -0
  19. package/docs/.vitepress/cache/deps/_metadata.json +40 -0
  20. package/docs/.vitepress/cache/deps/chunk-5A67QEFC.js +12542 -0
  21. package/docs/.vitepress/cache/deps/chunk-5A67QEFC.js.map +7 -0
  22. package/docs/.vitepress/cache/deps/chunk-7D4P4MMP.js +9719 -0
  23. package/docs/.vitepress/cache/deps/chunk-7D4P4MMP.js.map +7 -0
  24. package/docs/.vitepress/cache/deps/package.json +3 -0
  25. package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +4504 -0
  26. package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +7 -0
  27. package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +583 -0
  28. package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +7 -0
  29. package/docs/.vitepress/cache/deps/vue.js +343 -0
  30. package/docs/.vitepress/cache/deps/vue.js.map +7 -0
  31. package/docs/.vitepress/config.mts +26 -0
  32. package/docs/api-examples.md +49 -0
  33. package/docs/index.md +59 -0
  34. package/docs/markdown-examples.md +85 -0
  35. package/docs-data/api-docs.json +4143 -0
  36. package/examples/quicbase-jsCDN.html +36 -0
  37. package/examples/react.js +48 -0
  38. package/examples/vanillajs.html +47 -0
  39. package/index.md +25 -0
  40. package/markdown-examples.md +85 -0
  41. package/open-api/fix-spec-main.ts +133 -0
  42. package/open-api/generate-unified-interface.ts +104 -0
  43. package/open-api/generateDocsJson.ts +24 -0
  44. package/open-api/output/quickbase-fixed.json +11191 -0
  45. package/open-api/post-process-generated.ts +226 -0
  46. package/open-api/regenerate-client.ts +117 -0
  47. package/open-api/schema/enhance-general.ts +111 -0
  48. package/open-api/schema/fix-arrays.ts +68 -0
  49. package/open-api/schema/tags/apps.ts +90 -0
  50. package/open-api/schema/tags/fields.ts +471 -0
  51. package/open-api/schema/tags/groups.ts +51 -0
  52. package/open-api/schema/tags/index.ts +66 -0
  53. package/open-api/schema/tags/records.ts +115 -0
  54. package/open-api/schema/tags/tables.ts +211 -0
  55. package/open-api/schema/tags/users.ts +47 -0
  56. package/open-api/types/spec.ts +42 -0
  57. package/open-api/utils/common.ts +29 -0
  58. package/open-api/utils/generateJsDoc.ts +74 -0
  59. package/open-api/utils/infer-schema.ts +40 -0
  60. package/open-api/utils/naming.ts +10 -0
  61. package/open-api/utils/sharedUtils.ts +352 -0
  62. package/package.json +96 -0
  63. package/playwright.config.ts +37 -0
  64. package/rollup.config.js +114 -0
  65. package/specs/QuickBase_RESTful_API_2025-03-04T06_22_39.725Z.json +46878 -0
  66. package/specs/split/apps.json +1315 -0
  67. package/specs/split/auth.json +191 -0
  68. package/specs/split/fields.json +3869 -0
  69. package/specs/split/records.json +754 -0
  70. package/specs/split/reports.json +619 -0
  71. package/specs/split/tables.json +1605 -0
  72. package/src/RateLimitError.ts +12 -0
  73. package/src/ThrottleBucket.ts +41 -0
  74. package/src/authorizationStrategy.ts +283 -0
  75. package/src/generated-unified/QuickbaseClient.ts +1135 -0
  76. package/src/generated-unified/missing-types-report.json +3 -0
  77. package/src/index.ts +1 -0
  78. package/src/invokeMethod.ts +245 -0
  79. package/src/quickbaseClient.ts +194 -0
  80. package/src/rateLimiter.ts +25 -0
  81. package/src/tokenCache.ts +35 -0
  82. package/src/utils.ts +50 -0
  83. package/tests/playwright/qb/auth/cacheSwitching.test.ts +159 -0
  84. package/tests/playwright/qb/auth/fetchTempToken401.test.ts +219 -0
  85. package/tests/playwright/qb/auth/getAppWithTempToken.test.ts +162 -0
  86. package/tests/playwright/qb/auth/getAppWithUserToken.test.ts +153 -0
  87. package/tests/playwright/qb/auth/getTempToken.test.ts +152 -0
  88. package/tests/playwright/qb/auth/tempTokenPrefetch.test.ts +179 -0
  89. package/tests/playwright/qb/auth/tempTokenRenewal.test.ts +133 -0
  90. package/tests/setup.ts +53 -0
  91. package/tests/vitest/qb/apps/copyApp.test.ts +76 -0
  92. package/tests/vitest/qb/apps/createApp.test.ts +64 -0
  93. package/tests/vitest/qb/apps/deleteApp.test.ts +76 -0
  94. package/tests/vitest/qb/apps/getApp.test.ts +44 -0
  95. package/tests/vitest/qb/apps/getAppEvents.test.ts +67 -0
  96. package/tests/vitest/qb/apps/updateApp.test.ts +58 -0
  97. package/tests/vitest/qb/auth/mockQuickbaseServer.ts +60 -0
  98. package/tests/vitest/qb/auth/retryUserToken401.test.ts +73 -0
  99. package/tests/vitest/qb/auth/ssoTokenIntegrationWithServer.test.ts +65 -0
  100. package/tests/vitest/qb/fields/createField.test.ts +77 -0
  101. package/tests/vitest/qb/fields/deleteFields.test.ts +83 -0
  102. package/tests/vitest/qb/fields/getField.test.ts +85 -0
  103. package/tests/vitest/qb/fields/getFieldUsage.test.ts +82 -0
  104. package/tests/vitest/qb/fields/getFields.test.ts +232 -0
  105. package/tests/vitest/qb/fields/getFieldsUsage.test.ts +77 -0
  106. package/tests/vitest/qb/fields/updateField.test.ts +93 -0
  107. package/tests/vitest/qb/formulas/runFormula.test.ts +96 -0
  108. package/tests/vitest/qb/index.ts +29 -0
  109. package/tests/vitest/qb/records/deleteRecords.test.ts +110 -0
  110. package/tests/vitest/qb/records/runQuery.test.ts +146 -0
  111. package/tests/vitest/qb/records/upsert.test.ts +102 -0
  112. package/tests/vitest/qb/tables/createRelationship.test.ts +102 -0
  113. package/tests/vitest/qb/tables/createTable.test.ts +55 -0
  114. package/tests/vitest/qb/tables/deleteRelationship.test.ts +143 -0
  115. package/tests/vitest/qb/tables/deleteTable.test.ts +50 -0
  116. package/tests/vitest/qb/tables/getAppTables.test.ts +46 -0
  117. package/tests/vitest/qb/tables/getRelationships.test.ts +80 -0
  118. package/tests/vitest/qb/tables/getTable.test.ts +26 -0
  119. package/tests/vitest/qb/tables/updateRelationship.test.ts +250 -0
  120. package/tests/vitest/qb/tables/updateTable.test.ts +48 -0
  121. package/tests/vitest/unit/ThrottleBucket.test.ts +95 -0
  122. package/tests/vitest/unit/apps/copyApp.test.ts +581 -0
  123. package/tests/vitest/unit/apps/createApp.test.ts +186 -0
  124. package/tests/vitest/unit/apps/deleteApp.test.ts +216 -0
  125. package/tests/vitest/unit/apps/getApp.test.ts +128 -0
  126. package/tests/vitest/unit/apps/getAppEvents.test.ts +193 -0
  127. package/tests/vitest/unit/apps/updateApp.test.ts +412 -0
  128. package/tests/vitest/unit/auth/fetchTempToken401.test.ts +63 -0
  129. package/tests/vitest/unit/auth/getTempToken.test.ts +119 -0
  130. package/tests/vitest/unit/auth/retryTempToken401.test.ts +95 -0
  131. package/tests/vitest/unit/auth/retryTempTokenMaxRetries.test.ts +206 -0
  132. package/tests/vitest/unit/auth/retryUserToken401.test.ts +69 -0
  133. package/tests/vitest/unit/auth/ssoTokenRefresh.test.ts +325 -0
  134. package/tests/vitest/unit/fields/createField.test.ts +451 -0
  135. package/tests/vitest/unit/fields/deleteFields.test.ts +141 -0
  136. package/tests/vitest/unit/fields/getField.test.ts +189 -0
  137. package/tests/vitest/unit/fields/getFieldUsage.test.ts +180 -0
  138. package/tests/vitest/unit/fields/getFields.test.ts +122 -0
  139. package/tests/vitest/unit/fields/getFieldsUsage.test.ts +160 -0
  140. package/tests/vitest/unit/fields/updateField.test.ts +285 -0
  141. package/tests/vitest/unit/formulas/runFormula.test.ts +205 -0
  142. package/tests/vitest/unit/index.ts +34 -0
  143. package/tests/vitest/unit/quickbaseClientHttpMethods.test.ts +139 -0
  144. package/tests/vitest/unit/rateLimit.test.ts +191 -0
  145. package/tests/vitest/unit/records/deleteRecords.test.ts +112 -0
  146. package/tests/vitest/unit/records/runQuery.test.ts +102 -0
  147. package/tests/vitest/unit/records/upsert.test.ts +234 -0
  148. package/tests/vitest/unit/tables/createRelationship.test.ts +212 -0
  149. package/tests/vitest/unit/tables/createTable.test.ts +70 -0
  150. package/tests/vitest/unit/tables/deleteRelationship.test.ts +97 -0
  151. package/tests/vitest/unit/tables/deleteTable.test.ts +77 -0
  152. package/tests/vitest/unit/tables/getAppTables.test.ts +85 -0
  153. package/tests/vitest/unit/tables/getRelationships.test.ts +259 -0
  154. package/tests/vitest/unit/tables/getTable.test.ts +233 -0
  155. package/tests/vitest/unit/tables/updateRelationship.test.ts +307 -0
  156. package/tests/vitest/unit/tables/updateTable.test.ts +80 -0
  157. package/tests/vitest/unit/tokenLifespan.test.ts +204 -0
  158. package/tests/vitest/unit/umd.test.ts +8 -0
  159. package/tools/log-gen.ts +251 -0
  160. package/tools/log-gen.yaml +4777 -0
  161. package/tools/openapi-jars/openapi-generator-cli-7.12.0.jar +0 -0
  162. package/tsconfig.build.json +17 -0
  163. package/tsconfig.json +32 -0
  164. package/versionrc.json +9 -0
  165. package/vitest.config.ts +27 -0
@@ -0,0 +1,4777 @@
1
+ project: >-
2
+ quickbase-js
3
+ date: >-
4
+ 3/21/2025
5
+ root: >-
6
+ /home/drew/Projects/quickbase-js
7
+ goals:
8
+ - >-
9
+ A
10
+ library
11
+ for
12
+ interacting
13
+ with
14
+ the
15
+ QuickBase
16
+ RESTful
17
+ API.
18
+ - >-
19
+ Use
20
+ OpenAPI
21
+ to
22
+ generate
23
+ types
24
+ and
25
+ methods
26
+ using
27
+ a
28
+ proxy.
29
+ Validate
30
+ with
31
+ tests.
32
+ - >-
33
+ Provide
34
+ robust
35
+ and
36
+ intuitive
37
+ temporary
38
+ token
39
+ support
40
+ for
41
+ browser
42
+ environments.
43
+ - >-
44
+ User
45
+ Tokens
46
+ support
47
+ both
48
+ Node.js
49
+ and
50
+ browser
51
+ environments.
52
+ - >-
53
+ Use
54
+ case:
55
+ JS
56
+ frameworks
57
+ like
58
+ React,
59
+ Vue,
60
+ and
61
+ Angular
62
+ hosted
63
+ in
64
+ QuickBase
65
+ code
66
+ pages.
67
+ - >-
68
+ Enable
69
+ a
70
+ flexible
71
+ or
72
+ native
73
+ fetch
74
+ in
75
+ the
76
+ browser.
77
+ - >-
78
+ Enable
79
+ a
80
+ flexible
81
+ fetch
82
+ framework
83
+ in
84
+ Node.js.
85
+ - >-
86
+ #
87
+ - >-
88
+ No
89
+ manual
90
+ updating
91
+ methods
92
+ when
93
+ the
94
+ QuickBase
95
+ API
96
+ changes.
97
+ - >-
98
+ The
99
+ proxy
100
+ magic
101
+ dynamically
102
+ maps
103
+ generated
104
+ methods
105
+ and
106
+ types.
107
+ - >-
108
+ #
109
+ - >-
110
+ TokenCache
111
+ is
112
+ defined
113
+ per
114
+ quickbaseClient
115
+ call,
116
+ so
117
+ each
118
+ instance
119
+ has
120
+ its
121
+ own
122
+ isolated
123
+ TokenCache.
124
+ - >-
125
+ Each
126
+ quickbase
127
+ client
128
+ instance
129
+ has
130
+ an
131
+ isolated
132
+ and
133
+ individual
134
+ token
135
+ cache.
136
+ pipelineOverview:
137
+ - >-
138
+ What
139
+ I’m
140
+ Trying
141
+ to
142
+ Do
143
+ - >-
144
+ My
145
+ approach
146
+ is
147
+ to
148
+ ensure
149
+ AppsApi.ts
150
+ is
151
+ generated
152
+ with
153
+ getAppById
154
+ so
155
+ QuickbaseClient.ts
156
+ can
157
+ map
158
+ it
159
+ to
160
+ client.getApp.
161
+ Steps
162
+ include:
163
+ - >-
164
+ Fix
165
+ fix-spec.ts:
166
+ - >-
167
+ Add
168
+ tags:
169
+ ["Apps"]
170
+ to
171
+ /apps/*
172
+ endpoints
173
+ to
174
+ group
175
+ them
176
+ into
177
+ AppsApi.ts.
178
+ - >-
179
+ Ensure
180
+ all
181
+ endpoints
182
+ and
183
+ models
184
+ are
185
+ correctly
186
+ defined
187
+ and
188
+ typed.
189
+ - >-
190
+ Debug
191
+ regenerate-client.ts:
192
+ - >-
193
+ Enhance
194
+ logging
195
+ to
196
+ catch
197
+ why
198
+ AppsApi.ts
199
+ isn’t
200
+ generated.
201
+ - >-
202
+ Test
203
+ if
204
+ getAppById
205
+ appears
206
+ in
207
+ another
208
+ file
209
+ (e.g.,
210
+ DefaultApi.ts).
211
+ - >-
212
+ Update
213
+ QuickbaseClient.ts:
214
+ - >-
215
+ Adjust
216
+ imports
217
+ to
218
+ use
219
+ the
220
+ correct
221
+ API
222
+ class
223
+ once
224
+ generated.
225
+ - >-
226
+ Test
227
+ and
228
+ Iterate:
229
+ - >-
230
+ Run
231
+ npm
232
+ run
233
+ fix-spec,
234
+ npm
235
+ run
236
+ regenerate,
237
+ and
238
+ npm
239
+ run
240
+ test
241
+ to
242
+ verify
243
+ AppsApi.ts
244
+ exists
245
+ and
246
+ test.ts
247
+ works.
248
+ - >-
249
+ The
250
+ latest
251
+ fix-spec.ts
252
+ with
253
+ tags
254
+ aims
255
+ to
256
+ force
257
+ the
258
+ generator
259
+ to
260
+ create
261
+ AppsApi.ts,
262
+ addressing
263
+ the
264
+ missing
265
+ file
266
+ issue.
267
+ - >-
268
+ Relevant
269
+ Project
270
+ Files
271
+ - >-
272
+ Here’s
273
+ a
274
+ list
275
+ of
276
+ files
277
+ that
278
+ would
279
+ help
280
+ understand
281
+ and
282
+ resolve
283
+ this
284
+ problem,
285
+ along
286
+ with
287
+ their
288
+ roles:
289
+ - >-
290
+ src/code-generation/fix-spec.ts:
291
+ - >-
292
+ Role:
293
+ Modifies
294
+ the
295
+ original
296
+ QuickBase
297
+ spec
298
+ (e.g.,
299
+ QuickBase_RESTful_*.json)
300
+ to
301
+ create
302
+ quickbase-fixed.json
303
+ with
304
+ required
305
+ endpoints
306
+ (e.g.,
307
+ /apps/{appId}).
308
+ - >-
309
+ Relevance:
310
+ Defines
311
+ the
312
+ spec
313
+ fed
314
+ to
315
+ the
316
+ generator;
317
+ errors
318
+ here
319
+ affect
320
+ generation.
321
+ - >-
322
+ src/code-generation/quickbase-fixed.json:
323
+ - >-
324
+ Role:
325
+ The
326
+ processed
327
+ OpenAPI
328
+ spec
329
+ used
330
+ by
331
+ regenerate-client.ts
332
+ to
333
+ generate
334
+ code.
335
+ - >-
336
+ Relevance:
337
+ Confirms
338
+ if
339
+ /apps/{appId}
340
+ is
341
+ correctly
342
+ structured
343
+ with
344
+ operationId:
345
+ "getAppById".
346
+ - >-
347
+ src/code-generation/regenerate-client.ts:
348
+ - >-
349
+ Role:
350
+ Runs
351
+ OpenAPI
352
+ Generator
353
+ to
354
+ produce
355
+ src/generated/
356
+ files
357
+ (APIs
358
+ and
359
+ models)
360
+ and
361
+ fixes
362
+ .ts
363
+ extensions
364
+ with
365
+ ts-morph.
366
+ - >-
367
+ Relevance:
368
+ Controls
369
+ the
370
+ generation
371
+ process;
372
+ logs
373
+ reveal
374
+ why
375
+ AppsApi.ts
376
+ is
377
+ missing.
378
+ - >-
379
+ src/generated/apis/AppsApi.ts
380
+ (if
381
+ exists):
382
+ - >-
383
+ Role:
384
+ Should
385
+ contain
386
+ getAppById
387
+ method
388
+ for
389
+ /apps/{appId}
390
+ GET.
391
+ - >-
392
+ Relevance:
393
+ Missing
394
+ file
395
+ is
396
+ the
397
+ core
398
+ issue;
399
+ its
400
+ absence
401
+ breaks
402
+ QuickbaseClient.ts.
403
+ - >-
404
+ src/generated/apis/DefaultApi.ts:
405
+ - >-
406
+ Role:
407
+ Default
408
+ API
409
+ class
410
+ for
411
+ untagged
412
+ operations.
413
+ - >-
414
+ Relevance:
415
+ Might
416
+ contain
417
+ getAppById
418
+ if
419
+ tags
420
+ are
421
+ misconfigured.
422
+ - >-
423
+ src/QuickbaseClient.ts:
424
+ - >-
425
+ Role:
426
+ Wraps
427
+ generated
428
+ API
429
+ classes
430
+ (e.g.,
431
+ AppsApi)
432
+ in
433
+ a
434
+ Proxy
435
+ for
436
+ ergonomic
437
+ calls
438
+ (e.g.,
439
+ client.getApp).
440
+ - >-
441
+ Relevance:
442
+ Fails
443
+ to
444
+ import
445
+ AppsApi.ts,
446
+ causing
447
+ the
448
+ runtime
449
+ error.
450
+ - >-
451
+ src/test.ts:
452
+ - >-
453
+ Role:
454
+ Test
455
+ script
456
+ calling
457
+ client.getApp({
458
+ appId
459
+ }).
460
+ - >-
461
+ Relevance:
462
+ Final
463
+ validation
464
+ point;
465
+ shows
466
+ if
467
+ the
468
+ fix
469
+ works.
470
+ - >-
471
+ .env.development:
472
+ - >-
473
+ Role:
474
+ Stores
475
+ QB_REALM,
476
+ QB_USER_TOKEN,
477
+ QB_APP_ID
478
+ for
479
+ API
480
+ authentication.
481
+ - >-
482
+ Relevance:
483
+ Ensures
484
+ the
485
+ API
486
+ call
487
+ has
488
+ valid
489
+ credentials
490
+ (not
491
+ the
492
+ current
493
+ issue,
494
+ but
495
+ critical
496
+ for
497
+ success).
498
+ - >-
499
+ src/specs/QuickBase_RESTful_API_2025-03-04T06_22_39.725Z.json
500
+ (or
501
+ similar):
502
+ - >-
503
+ Role:
504
+ Original
505
+ QuickBase
506
+ API
507
+ spec
508
+ before
509
+ fix-spec.ts
510
+ processing.
511
+ - >-
512
+ Relevance:
513
+ Shows
514
+ how
515
+ /apps/{appId}
516
+ was
517
+ originally
518
+ defined,
519
+ helping
520
+ identify
521
+ conflicts.
522
+ - >-
523
+ package.json:
524
+ - >-
525
+ Role:
526
+ Defines
527
+ scripts
528
+ (fix-spec,
529
+ regenerate,
530
+ test)
531
+ and
532
+ dependencies
533
+ (e.g.,
534
+ ts-node,
535
+ openapi-generator-cli).
536
+ - >-
537
+ Relevance:
538
+ Confirms
539
+ script
540
+ commands
541
+ and
542
+ versions
543
+ align
544
+ with
545
+ our
546
+ process.
547
+ - >-
548
+ What
549
+ We
550
+ Achieved
551
+ - >-
552
+ Goal
553
+ Met:
554
+ You
555
+ can
556
+ now
557
+ call
558
+ client.getApp({
559
+ appId:
560
+ "buwai2zpe"
561
+ })
562
+ and
563
+ get
564
+ the
565
+ app
566
+ details
567
+ {
568
+ id:
569
+ 'buwai2zpe',
570
+ name:
571
+ 'qb-copy'
572
+ }.
573
+ - >-
574
+ Fixes
575
+ Applied:
576
+ - >-
577
+ Added
578
+ tags:
579
+ ["Apps"]
580
+ in
581
+ fix-spec.ts
582
+ to
583
+ ensure
584
+ AppsApi.ts
585
+ is
586
+ generated
587
+ with
588
+ getAppById.
589
+ - >-
590
+ Updated
591
+ QuickbaseClient.ts
592
+ to:
593
+ - >-
594
+ Use
595
+ prototype
596
+ methods
597
+ via
598
+ Object.getOwnPropertyNames.
599
+ - >-
600
+ Bind
601
+ methods
602
+ to
603
+ preserve
604
+ context
605
+ with
606
+ .bind(api).
607
+ - >-
608
+ Handle
609
+ getAppById’s
610
+ direct
611
+ JSON
612
+ return
613
+ instead
614
+ of
615
+ a
616
+ Response
617
+ object.
618
+ - >-
619
+ Result:
620
+ The
621
+ ergonomic
622
+ API
623
+ you
624
+ wanted
625
+ (client.getApp)
626
+ works
627
+ seamlessly
628
+ with
629
+ the
630
+ generated
631
+ AppsApi.ts.
632
+ - >-
633
+ Why
634
+ It
635
+ Works
636
+ Now
637
+ - >-
638
+ fix-spec.ts:
639
+ - >-
640
+ Correctly
641
+ defined
642
+ /apps/{appId}
643
+ with
644
+ operationId:
645
+ "getAppById"
646
+ and
647
+ tags:
648
+ ["Apps"],
649
+ ensuring
650
+ AppsApi.ts
651
+ generation.
652
+ - >-
653
+ regenerate-client.ts:
654
+ - >-
655
+ Successfully
656
+ ran
657
+ OpenAPI
658
+ Generator
659
+ to
660
+ produce
661
+ AppsApi.ts
662
+ with
663
+ getAppById.
664
+ - >-
665
+ QuickbaseClient.ts:
666
+ - >-
667
+ buildMethodMap
668
+ now
669
+ captures
670
+ getAppById
671
+ and
672
+ maps
673
+ it
674
+ to
675
+ getApp.
676
+ - >-
677
+ invokeMethod
678
+ passes
679
+ {
680
+ appId:
681
+ 'buwai2zpe'
682
+ }
683
+ as
684
+ requestParameters
685
+ and
686
+ handles
687
+ the
688
+ JSON
689
+ response
690
+ directly.
691
+ - >-
692
+ test.ts:
693
+ - >-
694
+ Calls
695
+ client.getApp
696
+ and
697
+ logs
698
+ the
699
+ result,
700
+ proving
701
+ the
702
+ end-to-end
703
+ flow.
704
+ tree:
705
+ name: >-
706
+ .
707
+ type: >-
708
+ directory
709
+ children:
710
+ - name: >-
711
+ .env
712
+ type: >-
713
+ file
714
+ - name: >-
715
+ .gitignore
716
+ type: >-
717
+ file
718
+ - name: >-
719
+ CHANGELOG.md
720
+ type: >-
721
+ file
722
+ - name: >-
723
+ LICENSE
724
+ type: >-
725
+ file
726
+ - name: >-
727
+ README.md
728
+ type: >-
729
+ file
730
+ - name: >-
731
+ api-examples.md
732
+ type: >-
733
+ file
734
+ - name: >-
735
+ build-common.js
736
+ type: >-
737
+ file
738
+ - name: >-
739
+ build-esm.js
740
+ type: >-
741
+ file
742
+ - name: >-
743
+ build-umd.js
744
+ type: >-
745
+ file
746
+ - name: >-
747
+ dist
748
+ type: >-
749
+ directory
750
+ children:
751
+ - name: >-
752
+ esm
753
+ type: >-
754
+ directory
755
+ children:
756
+ - name: >-
757
+ quickbase.d.ts
758
+ type: >-
759
+ file
760
+ - name: >-
761
+ quickbase.js
762
+ type: >-
763
+ file
764
+ - name: >-
765
+ quickbase.js.map
766
+ type: >-
767
+ file
768
+ - name: >-
769
+ quickbase.min.js
770
+ type: >-
771
+ file
772
+ - name: >-
773
+ quickbase.min.js.map
774
+ type: >-
775
+ file
776
+ - name: >-
777
+ umd
778
+ type: >-
779
+ directory
780
+ children:
781
+ - name: >-
782
+ quickbase.umd.js
783
+ type: >-
784
+ file
785
+ - name: >-
786
+ quickbase.umd.js.map
787
+ type: >-
788
+ file
789
+ - name: >-
790
+ quickbase.umd.min.js
791
+ type: >-
792
+ file
793
+ - name: >-
794
+ quickbase.umd.min.js.map
795
+ type: >-
796
+ file
797
+ - name: >-
798
+ docs
799
+ type: >-
800
+ directory
801
+ children:
802
+ - name: >-
803
+ .vitepress
804
+ type: >-
805
+ directory
806
+ children:
807
+ - name: >-
808
+ cache
809
+ type: >-
810
+ directory
811
+ children:
812
+ - name: >-
813
+ deps
814
+ type: >-
815
+ directory
816
+ children:
817
+ - name: >-
818
+ @theme_index.js
819
+ type: >-
820
+ file
821
+ - name: >-
822
+ @theme_index.js.map
823
+ type: >-
824
+ file
825
+ - name: >-
826
+ _metadata.json
827
+ type: >-
828
+ file
829
+ - name: >-
830
+ chunk-5A67QEFC.js
831
+ type: >-
832
+ file
833
+ - name: >-
834
+ chunk-5A67QEFC.js.map
835
+ type: >-
836
+ file
837
+ - name: >-
838
+ chunk-7D4P4MMP.js
839
+ type: >-
840
+ file
841
+ - name: >-
842
+ chunk-7D4P4MMP.js.map
843
+ type: >-
844
+ file
845
+ - name: >-
846
+ package.json
847
+ type: >-
848
+ file
849
+ - name: >-
850
+ vitepress___@vue_devtools-api.js
851
+ type: >-
852
+ file
853
+ - name: >-
854
+ vitepress___@vue_devtools-api.js.map
855
+ type: >-
856
+ file
857
+ - name: >-
858
+ vitepress___@vueuse_core.js
859
+ type: >-
860
+ file
861
+ - name: >-
862
+ vitepress___@vueuse_core.js.map
863
+ type: >-
864
+ file
865
+ - name: >-
866
+ vue.js
867
+ type: >-
868
+ file
869
+ - name: >-
870
+ vue.js.map
871
+ type: >-
872
+ file
873
+ - name: >-
874
+ config.mts
875
+ type: >-
876
+ file
877
+ - name: >-
878
+ dist
879
+ type: >-
880
+ directory
881
+ children:
882
+ - name: >-
883
+ 404.html
884
+ type: >-
885
+ file
886
+ - name: >-
887
+ api-examples.html
888
+ type: >-
889
+ file
890
+ - name: >-
891
+ assets
892
+ type: >-
893
+ directory
894
+ children:
895
+ - name: >-
896
+ api-examples.md.CRRh3xeI.js
897
+ type: >-
898
+ file
899
+ - name: >-
900
+ api-examples.md.CRRh3xeI.lean.js
901
+ type: >-
902
+ file
903
+ - name: >-
904
+ app.Yv9tMCdR.js
905
+ type: >-
906
+ file
907
+ - name: >-
908
+ chunks
909
+ type: >-
910
+ directory
911
+ children:
912
+ - name: >-
913
+ framework.Dh1jimFm.js
914
+ type: >-
915
+ file
916
+ - name: >-
917
+ theme.CDm2W-g2.js
918
+ type: >-
919
+ file
920
+ - name: >-
921
+ index.md.kvvDM3Wd.js
922
+ type: >-
923
+ file
924
+ - name: >-
925
+ index.md.kvvDM3Wd.lean.js
926
+ type: >-
927
+ file
928
+ - name: >-
929
+ inter-italic-cyrillic-ext.r48I6akx.woff2
930
+ type: >-
931
+ file
932
+ - name: >-
933
+ inter-italic-cyrillic.By2_1cv3.woff2
934
+ type: >-
935
+ file
936
+ - name: >-
937
+ inter-italic-greek-ext.1u6EdAuj.woff2
938
+ type: >-
939
+ file
940
+ - name: >-
941
+ inter-italic-greek.DJ8dCoTZ.woff2
942
+ type: >-
943
+ file
944
+ - name: >-
945
+ inter-italic-latin-ext.CN1xVJS-.woff2
946
+ type: >-
947
+ file
948
+ - name: >-
949
+ inter-italic-latin.C2AdPX0b.woff2
950
+ type: >-
951
+ file
952
+ - name: >-
953
+ inter-italic-vietnamese.BSbpV94h.woff2
954
+ type: >-
955
+ file
956
+ - name: >-
957
+ inter-roman-cyrillic-ext.BBPuwvHQ.woff2
958
+ type: >-
959
+ file
960
+ - name: >-
961
+ inter-roman-cyrillic.C5lxZ8CY.woff2
962
+ type: >-
963
+ file
964
+ - name: >-
965
+ inter-roman-greek-ext.CqjqNYQ-.woff2
966
+ type: >-
967
+ file
968
+ - name: >-
969
+ inter-roman-greek.BBVDIX6e.woff2
970
+ type: >-
971
+ file
972
+ - name: >-
973
+ inter-roman-latin-ext.4ZJIpNVo.woff2
974
+ type: >-
975
+ file
976
+ - name: >-
977
+ inter-roman-latin.Di8DUHzh.woff2
978
+ type: >-
979
+ file
980
+ - name: >-
981
+ inter-roman-vietnamese.BjW4sHH5.woff2
982
+ type: >-
983
+ file
984
+ - name: >-
985
+ markdown-examples.md.ediKJOVO.js
986
+ type: >-
987
+ file
988
+ - name: >-
989
+ markdown-examples.md.ediKJOVO.lean.js
990
+ type: >-
991
+ file
992
+ - name: >-
993
+ style.BJrZ0CFW.css
994
+ type: >-
995
+ file
996
+ - name: >-
997
+ hashmap.json
998
+ type: >-
999
+ file
1000
+ - name: >-
1001
+ index.html
1002
+ type: >-
1003
+ file
1004
+ - name: >-
1005
+ markdown-examples.html
1006
+ type: >-
1007
+ file
1008
+ - name: >-
1009
+ vp-icons.css
1010
+ type: >-
1011
+ file
1012
+ - name: >-
1013
+ api-examples.md
1014
+ type: >-
1015
+ file
1016
+ - name: >-
1017
+ index.md
1018
+ type: >-
1019
+ file
1020
+ - name: >-
1021
+ markdown-examples.md
1022
+ type: >-
1023
+ file
1024
+ - name: >-
1025
+ node_modules
1026
+ type: >-
1027
+ directory
1028
+ children: []
1029
+ - name: >-
1030
+ docs-data
1031
+ type: >-
1032
+ directory
1033
+ children:
1034
+ - name: >-
1035
+ api-docs.json
1036
+ type: >-
1037
+ file
1038
+ - name: >-
1039
+ examples
1040
+ type: >-
1041
+ directory
1042
+ children:
1043
+ - name: >-
1044
+ quicbase-jsCDN.html
1045
+ type: >-
1046
+ file
1047
+ - name: >-
1048
+ react.js
1049
+ type: >-
1050
+ file
1051
+ - name: >-
1052
+ vanillajs.html
1053
+ type: >-
1054
+ file
1055
+ - name: >-
1056
+ index.md
1057
+ type: >-
1058
+ file
1059
+ - name: >-
1060
+ markdown-examples.md
1061
+ type: >-
1062
+ file
1063
+ - name: >-
1064
+ open-api
1065
+ type: >-
1066
+ directory
1067
+ children:
1068
+ - name: >-
1069
+ fix-spec-main.ts
1070
+ type: >-
1071
+ file
1072
+ - name: >-
1073
+ generate-unified-interface.ts
1074
+ type: >-
1075
+ file
1076
+ - name: >-
1077
+ generateDocsJson.ts
1078
+ type: >-
1079
+ file
1080
+ - name: >-
1081
+ post-process-generated.ts
1082
+ type: >-
1083
+ file
1084
+ - name: >-
1085
+ regenerate-client.ts
1086
+ type: >-
1087
+ file
1088
+ - name: >-
1089
+ schema
1090
+ type: >-
1091
+ directory
1092
+ children:
1093
+ - name: >-
1094
+ enhance-general.ts
1095
+ type: >-
1096
+ file
1097
+ - name: >-
1098
+ fix-arrays.ts
1099
+ type: >-
1100
+ file
1101
+ - name: >-
1102
+ tags
1103
+ type: >-
1104
+ directory
1105
+ children:
1106
+ - name: >-
1107
+ apps.ts
1108
+ type: >-
1109
+ file
1110
+ - name: >-
1111
+ fields.ts
1112
+ type: >-
1113
+ file
1114
+ - name: >-
1115
+ groups.ts
1116
+ type: >-
1117
+ file
1118
+ - name: >-
1119
+ index.ts
1120
+ type: >-
1121
+ file
1122
+ - name: >-
1123
+ records.ts
1124
+ type: >-
1125
+ file
1126
+ - name: >-
1127
+ tables.ts
1128
+ type: >-
1129
+ file
1130
+ - name: >-
1131
+ users.ts
1132
+ type: >-
1133
+ file
1134
+ - name: >-
1135
+ types
1136
+ type: >-
1137
+ directory
1138
+ children:
1139
+ - name: >-
1140
+ spec.ts
1141
+ type: >-
1142
+ file
1143
+ - name: >-
1144
+ utils
1145
+ type: >-
1146
+ directory
1147
+ children:
1148
+ - name: >-
1149
+ common.ts
1150
+ type: >-
1151
+ file
1152
+ - name: >-
1153
+ generateJsDoc.ts
1154
+ type: >-
1155
+ file
1156
+ - name: >-
1157
+ infer-schema.ts
1158
+ type: >-
1159
+ file
1160
+ - name: >-
1161
+ naming.ts
1162
+ type: >-
1163
+ file
1164
+ - name: >-
1165
+ sharedUtils.ts
1166
+ type: >-
1167
+ file
1168
+ - name: >-
1169
+ openapitools.json
1170
+ type: >-
1171
+ file
1172
+ - name: >-
1173
+ package-lock.json
1174
+ type: >-
1175
+ file
1176
+ - name: >-
1177
+ package.json
1178
+ type: >-
1179
+ file
1180
+ - name: >-
1181
+ playwright.config.ts
1182
+ type: >-
1183
+ file
1184
+ - name: >-
1185
+ rollup.config.js
1186
+ type: >-
1187
+ file
1188
+ - name: >-
1189
+ src
1190
+ type: >-
1191
+ directory
1192
+ children:
1193
+ - name: >-
1194
+ RateLimitError.ts
1195
+ type: >-
1196
+ file
1197
+ - name: >-
1198
+ ThrottleBucket.ts
1199
+ type: >-
1200
+ file
1201
+ contents: >
1202
+ //
1203
+ src/ThrottleBucket.ts
1204
+
1205
+ export
1206
+ class
1207
+ ThrottleBucket
1208
+ {
1209
+ private tokens: number;
1210
+ private maxTokens: number;
1211
+ private refillRate: number; // Tokens per second
1212
+ private lastRefill: number;
1213
+ private pending: Promise<void> = Promise.resolve(); // Queue for sequential execution
1214
+
1215
+ constructor(rate: number, burst: number) {
1216
+ this.tokens = burst;
1217
+ this.maxTokens = burst;
1218
+ this.refillRate = rate;
1219
+ this.lastRefill = Date.now();
1220
+ }
1221
+
1222
+ private refill(): void {
1223
+ const now = Date.now();
1224
+ const elapsed = (now - this.lastRefill) / 1000; // Seconds elapsed
1225
+ const newTokens = elapsed * this.refillRate;
1226
+ this.tokens = Math.min(this.maxTokens, this.tokens + newTokens);
1227
+ this.lastRefill = now;
1228
+ }
1229
+
1230
+ async acquire(): Promise<void> {
1231
+ // Chain the new acquisition onto the pending queue
1232
+ const previous = this.pending;
1233
+ this.pending = (async () => {
1234
+ await previous; // Wait for prior calls to complete
1235
+ this.refill();
1236
+ if (this.tokens >= 1) {
1237
+ this.tokens -= 1;
1238
+ return;
1239
+ }
1240
+ const waitTime = ((1 - this.tokens) / this.refillRate) * 1000; // ms until next token
1241
+ await new Promise((resolve) => setTimeout(resolve, waitTime));
1242
+ this.refill();
1243
+ this.tokens -= 1;
1244
+ })();
1245
+ await this.pending;
1246
+ }
1247
+ }
1248
+ - name: >-
1249
+ authorizationStrategy.ts
1250
+ type: >-
1251
+ file
1252
+ contents: >
1253
+ //
1254
+ src/authorizationStrategy.ts
1255
+
1256
+
1257
+ import
1258
+ {
1259
+ TokenCache
1260
+ }
1261
+ from
1262
+ "./tokenCache";
1263
+
1264
+
1265
+ export
1266
+ interface
1267
+ AuthorizationStrategy
1268
+ {
1269
+ getToken(dbid: string): Promise<string | undefined>;
1270
+ applyHeaders(headers: Record<string, string>, token: string): void;
1271
+ handleError(
1272
+ status: number,
1273
+ params: any,
1274
+ attempt: number,
1275
+ maxAttempts: number,
1276
+ debug?: boolean,
1277
+ methodName?: string
1278
+ ): Promise<string | null>;
1279
+ }
1280
+
1281
+
1282
+ //
1283
+ src/authorizationStrategy.ts
1284
+ (partial
1285
+ update)
1286
+
1287
+
1288
+ export
1289
+ class
1290
+ TempTokenStrategy
1291
+ implements
1292
+ AuthorizationStrategy
1293
+ {
1294
+ constructor(
1295
+ private tokenCache: TokenCache,
1296
+ private initialTempToken: string | undefined,
1297
+ private fetchApi: typeof fetch,
1298
+ private realm: string,
1299
+ private baseUrl: string = "https://api.quickbase.com/v1"
1300
+ ) {}
1301
+
1302
+ async fetchTempToken(dbid: string): Promise<string> {
1303
+ const headers = {
1304
+ "QB-Realm-Hostname": `${this.realm}.quickbase.com`,
1305
+ "Content-Type": "application/json",
1306
+ };
1307
+ const response = await this.fetchApi(
1308
+ `${this.baseUrl}/auth/temporary/${dbid}`,
1309
+ {
1310
+ method: "GET",
1311
+ headers,
1312
+ credentials: "include",
1313
+ }
1314
+ );
1315
+
1316
+ if (!response.ok) {
1317
+ const errorBody = await response.json().catch(() => ({}));
1318
+ const message = errorBody.message || "Unknown error";
1319
+ throw new Error(`API Error: ${message} (Status: ${response.status})`);
1320
+ }
1321
+
1322
+ const tokenResult = await response.json();
1323
+ const token = tokenResult.temporaryAuthorization;
1324
+ if (!token) {
1325
+ throw new Error(
1326
+ "API Error: No temporary token returned from API (Status: 200)"
1327
+ );
1328
+ }
1329
+ this.tokenCache.set(dbid, token);
1330
+ console.log(`Fetched and cached new token for dbid: ${dbid}`, token);
1331
+ return token;
1332
+ }
1333
+
1334
+ async getToken(dbid: string): Promise<string | undefined> {
1335
+ let token = this.tokenCache.get(dbid) || this.initialTempToken;
1336
+ if (!token && dbid) {
1337
+ token = await this.fetchTempToken(dbid);
1338
+ }
1339
+ return token;
1340
+ }
1341
+
1342
+ applyHeaders(headers: Record<string, string>, token: string): void {
1343
+ headers["Authorization"] = `QB-TEMP-TOKEN ${token}`;
1344
+ }
1345
+
1346
+ async handleError(
1347
+ status: number,
1348
+ params: any,
1349
+ attempt: number,
1350
+ maxAttempts: number,
1351
+ debug?: boolean,
1352
+ methodName?: string
1353
+ ): Promise<string | null> {
1354
+ if (status !== 401 || attempt >= maxAttempts - 1) return null;
1355
+ if (debug)
1356
+ console.log(
1357
+ `Authorization error for ${
1358
+ methodName || "method"
1359
+ } (temp token), refreshing token:`
1360
+ );
1361
+ const dbid = extractDbid(params);
1362
+ if (!dbid) {
1363
+ if (debug)
1364
+ console.log(
1365
+ `No dbid available for ${
1366
+ methodName || "method"
1367
+ }, skipping token refresh`
1368
+ );
1369
+ return null;
1370
+ }
1371
+ if (debug) console.log(`Refreshing temp token for dbid: ${dbid}`);
1372
+ const newToken = await this.fetchTempToken(dbid);
1373
+ this.tokenCache.set(dbid, newToken);
1374
+ return newToken;
1375
+ }
1376
+ }
1377
+
1378
+
1379
+ export
1380
+ class
1381
+ UserTokenStrategy
1382
+ implements
1383
+ AuthorizationStrategy
1384
+ {
1385
+ constructor(private userToken: string) {}
1386
+
1387
+ async getToken(_dbid: string): Promise<string> {
1388
+ return this.userToken;
1389
+ }
1390
+
1391
+ applyHeaders(headers: Record<string, string>, token: string): void {
1392
+ headers["Authorization"] = `QB-USER-TOKEN ${token}`;
1393
+ }
1394
+
1395
+ async handleError(
1396
+ status: number,
1397
+ _params: any,
1398
+ attempt: number,
1399
+ maxAttempts: number,
1400
+ debug?: boolean,
1401
+ methodName?: string
1402
+ ): Promise<string | null> {
1403
+ if (status !== 401 || attempt >= maxAttempts - 1) return null;
1404
+ if (debug)
1405
+ console.log(
1406
+ `Retrying ${
1407
+ methodName || "method"
1408
+ } with existing user token: ${this.userToken.substring(0, 10)}...`
1409
+ );
1410
+ return this.userToken;
1411
+ }
1412
+ }
1413
+
1414
+
1415
+ export
1416
+ class
1417
+ SsoTokenStrategy
1418
+ implements
1419
+ AuthorizationStrategy
1420
+ {
1421
+ private currentToken: string | undefined;
1422
+
1423
+ constructor(
1424
+ private samlToken: string,
1425
+ private realm: string,
1426
+ private fetchApi: typeof fetch,
1427
+ private debug: boolean = false
1428
+ ) {}
1429
+
1430
+ async getToken(_dbid: string): Promise<string | undefined> {
1431
+ if (!this.currentToken) {
1432
+ this.currentToken = await this.fetchSsoToken({
1433
+ grant_type: "urn:ietf:params:oauth:grant-type:token-exchange",
1434
+ requested_token_type:
1435
+ "urn:quickbase:params:oauth:token-type:temp_token",
1436
+ subject_token: this.samlToken,
1437
+ subject_token_type: "urn:ietf:params:oauth:token-type:saml2",
1438
+ });
1439
+ }
1440
+ return this.currentToken;
1441
+ }
1442
+
1443
+ applyHeaders(headers: Record<string, string>, token: string): void {
1444
+ headers["Authorization"] = `QB-TEMP-TOKEN ${token}`;
1445
+ }
1446
+
1447
+ async handleError(
1448
+ status: number,
1449
+ _params: any,
1450
+ attempt: number,
1451
+ maxAttempts: number,
1452
+ debug?: boolean,
1453
+ methodName?: string
1454
+ ): Promise<string | null> {
1455
+ if (status !== 401 || attempt >= maxAttempts - 1) return null;
1456
+
1457
+ if (debug || this.debug) {
1458
+ console.log(
1459
+ `Authorization error for ${
1460
+ methodName || "method"
1461
+ } (SSO), refreshing token`
1462
+ );
1463
+ }
1464
+
1465
+ const newToken = await this.refreshSsoToken(debug || this.debug);
1466
+ if (newToken) {
1467
+ this.currentToken = newToken;
1468
+ return newToken;
1469
+ }
1470
+ return null;
1471
+ }
1472
+
1473
+ private async refreshSsoToken(debug: boolean = false): Promise<string> {
1474
+ const payload = {
1475
+ grant_type: "urn:ietf:params:oauth:grant-type:token-exchange",
1476
+ requested_token_type: "urn:quickbase:params:oauth:token-type:temp_token",
1477
+ subject_token: this.samlToken,
1478
+ subject_token_type: "urn:ietf:params:oauth:token-type:saml2",
1479
+ };
1480
+
1481
+ const response = await this.fetchApi(
1482
+ `https://api.quickbase.com/v1/auth/oauth/token`,
1483
+ {
1484
+ method: "POST",
1485
+ headers: {
1486
+ "QB-Realm-Hostname": `${this.realm}.quickbase.com`,
1487
+ "Content-Type": "application/json",
1488
+ },
1489
+ body: JSON.stringify(payload),
1490
+ credentials: "omit",
1491
+ }
1492
+ );
1493
+
1494
+ if (!response.ok) {
1495
+ const errorBody = await response.json().catch(() => ({}));
1496
+ if (debug) {
1497
+ console.log(`[SSO Refresh] Failed: ${response.status}`, errorBody);
1498
+ }
1499
+ throw new Error(
1500
+ `SSO token refresh failed: ${errorBody.message || "Unknown error"}`
1501
+ );
1502
+ }
1503
+
1504
+ const result = await response.json();
1505
+ const newToken = result.access_token;
1506
+ if (!newToken) {
1507
+ throw new Error("No access token returned from SSO token exchange");
1508
+ }
1509
+
1510
+ if (debug) {
1511
+ console.log(`[SSO Refresh] New token: ${newToken.substring(0, 10)}...`);
1512
+ }
1513
+ return newToken;
1514
+ }
1515
+
1516
+ private async fetchSsoToken(params: {
1517
+ grant_type: string;
1518
+ requested_token_type: string;
1519
+ subject_token: string;
1520
+ subject_token_type: string;
1521
+ }): Promise<string> {
1522
+ const response = await this.fetchApi(
1523
+ `https://api.quickbase.com/v1/auth/oauth/token`,
1524
+ {
1525
+ method: "POST",
1526
+ headers: {
1527
+ "QB-Realm-Hostname": `${this.realm}.quickbase.com`,
1528
+ "Content-Type": "application/json",
1529
+ },
1530
+ body: JSON.stringify(params),
1531
+ credentials: "omit",
1532
+ }
1533
+ );
1534
+
1535
+ if (!response.ok) {
1536
+ const errorBody = await response.json().catch(() => ({}));
1537
+ if (this.debug) {
1538
+ console.log(`[fetchSsoToken] Failed: ${response.status}`, errorBody);
1539
+ }
1540
+ throw new Error(
1541
+ `SSO token fetch failed: ${errorBody.message || "Unknown error"}`
1542
+ );
1543
+ }
1544
+
1545
+ const result = await response.json();
1546
+ const newToken = result.access_token;
1547
+ if (!newToken) {
1548
+ throw new Error("No access token returned from SSO token exchange");
1549
+ }
1550
+
1551
+ if (this.debug) {
1552
+ console.log(
1553
+ `[fetchSsoToken] Fetched token: ${newToken.substring(0, 10)}...`
1554
+ );
1555
+ }
1556
+ return newToken;
1557
+ }
1558
+ }
1559
+
1560
+
1561
+ export
1562
+ function
1563
+ extractDbid(params:
1564
+ any):
1565
+ string
1566
+ |
1567
+ undefined
1568
+ {
1569
+ return (
1570
+ params.dbid ||
1571
+ params.tableId ||
1572
+ params.appId ||
1573
+ params.body?.from ||
1574
+ params.body?.to
1575
+ );
1576
+ }
1577
+ - name: >-
1578
+ generated
1579
+ type: >-
1580
+ directory
1581
+ children:
1582
+ - name: >-
1583
+ .openapi-generator
1584
+ type: >-
1585
+ directory
1586
+ children:
1587
+ - name: >-
1588
+ FILES
1589
+ type: >-
1590
+ file
1591
+ - name: >-
1592
+ VERSION
1593
+ type: >-
1594
+ file
1595
+ - name: >-
1596
+ .openapi-generator-ignore
1597
+ type: >-
1598
+ file
1599
+ - name: >-
1600
+ apis
1601
+ type: >-
1602
+ directory
1603
+ children:
1604
+ - name: >-
1605
+ AppsApi.ts
1606
+ type: >-
1607
+ file
1608
+ - name: >-
1609
+ AuditApi.ts
1610
+ type: >-
1611
+ file
1612
+ - name: >-
1613
+ AuthApi.ts
1614
+ type: >-
1615
+ file
1616
+ - name: >-
1617
+ DocumentTemplatesApi.ts
1618
+ type: >-
1619
+ file
1620
+ - name: >-
1621
+ FieldsApi.ts
1622
+ type: >-
1623
+ file
1624
+ - name: >-
1625
+ FilesApi.ts
1626
+ type: >-
1627
+ file
1628
+ - name: >-
1629
+ FormulasApi.ts
1630
+ type: >-
1631
+ file
1632
+ - name: >-
1633
+ PlatformAnalyticsApi.ts
1634
+ type: >-
1635
+ file
1636
+ - name: >-
1637
+ RecordsApi.ts
1638
+ type: >-
1639
+ file
1640
+ - name: >-
1641
+ ReportsApi.ts
1642
+ type: >-
1643
+ file
1644
+ - name: >-
1645
+ SolutionsApi.ts
1646
+ type: >-
1647
+ file
1648
+ - name: >-
1649
+ TablesApi.ts
1650
+ type: >-
1651
+ file
1652
+ - name: >-
1653
+ UserTokenApi.ts
1654
+ type: >-
1655
+ file
1656
+ - name: >-
1657
+ UsersApi.ts
1658
+ type: >-
1659
+ file
1660
+ - name: >-
1661
+ index.ts
1662
+ type: >-
1663
+ file
1664
+ - name: >-
1665
+ index.ts
1666
+ type: >-
1667
+ file
1668
+ - name: >-
1669
+ models
1670
+ type: >-
1671
+ directory
1672
+ children:
1673
+ - name: >-
1674
+ AddManagersToGroup200Response.ts
1675
+ type: >-
1676
+ file
1677
+ - name: >-
1678
+ AddManagersToGroupRequest.ts
1679
+ type: >-
1680
+ file
1681
+ - name: >-
1682
+ AddMembersToGroup200Response.ts
1683
+ type: >-
1684
+ file
1685
+ - name: >-
1686
+ AddMembersToGroupRequest.ts
1687
+ type: >-
1688
+ file
1689
+ - name: >-
1690
+ AddSubgroupsToGroup200Response.ts
1691
+ type: >-
1692
+ file
1693
+ - name: >-
1694
+ AddSubgroupsToGroupRequest.ts
1695
+ type: >-
1696
+ file
1697
+ - name: >-
1698
+ Audit200Response.ts
1699
+ type: >-
1700
+ file
1701
+ - name: >-
1702
+ Audit202Response.ts
1703
+ type: >-
1704
+ file
1705
+ - name: >-
1706
+ AuditRequest.ts
1707
+ type: >-
1708
+ file
1709
+ - name: >-
1710
+ ChangesetSolution200Response.ts
1711
+ type: >-
1712
+ file
1713
+ - name: >-
1714
+ ChangesetSolution200ResponseInner.ts
1715
+ type: >-
1716
+ file
1717
+ - name: >-
1718
+ ChangesetSolution200ResponseInnerChangesInnerInner.ts
1719
+ type: >-
1720
+ file
1721
+ - name: >-
1722
+ ChangesetSolution200ResponseItemsInner.ts
1723
+ type: >-
1724
+ file
1725
+ - name: >-
1726
+ ChangesetSolution400Response.ts
1727
+ type: >-
1728
+ file
1729
+ - name: >-
1730
+ ChangesetSolution401403Response.ts
1731
+ type: >-
1732
+ file
1733
+ - name: >-
1734
+ ChangesetSolution404Response.ts
1735
+ type: >-
1736
+ file
1737
+ - name: >-
1738
+ ChangesetSolution4xx5xxResponse.ts
1739
+ type: >-
1740
+ file
1741
+ - name: >-
1742
+ ChangesetSolutionFromRecord200Response.ts
1743
+ type: >-
1744
+ file
1745
+ - name: >-
1746
+ ChangesetSolutionFromRecord200ResponseItemsInner.ts
1747
+ type: >-
1748
+ file
1749
+ - name: >-
1750
+ ChangesetSolutionFromRecord400Response.ts
1751
+ type: >-
1752
+ file
1753
+ - name: >-
1754
+ ChangesetSolutionFromRecord401403Response.ts
1755
+ type: >-
1756
+ file
1757
+ - name: >-
1758
+ ChangesetSolutionFromRecord404Response.ts
1759
+ type: >-
1760
+ file
1761
+ - name: >-
1762
+ ChangesetSolutionFromRecord4xx5xxResponse.ts
1763
+ type: >-
1764
+ file
1765
+ - name: >-
1766
+ CloneUserToken200Response.ts
1767
+ type: >-
1768
+ file
1769
+ - name: >-
1770
+ CloneUserTokenRequest.ts
1771
+ type: >-
1772
+ file
1773
+ - name: >-
1774
+ CopyApp200Response.ts
1775
+ type: >-
1776
+ file
1777
+ - name: >-
1778
+ CopyAppRequest.ts
1779
+ type: >-
1780
+ file
1781
+ - name: >-
1782
+ CopyAppRequestProperties.ts
1783
+ type: >-
1784
+ file
1785
+ - name: >-
1786
+ CreateApp200Response.ts
1787
+ type: >-
1788
+ file
1789
+ - name: >-
1790
+ CreateAppRequest.ts
1791
+ type: >-
1792
+ file
1793
+ - name: >-
1794
+ CreateField200Response.ts
1795
+ type: >-
1796
+ file
1797
+ - name: >-
1798
+ CreateFieldRequest.ts
1799
+ type: >-
1800
+ file
1801
+ - name: >-
1802
+ CreateFieldRequestProperties.ts
1803
+ type: >-
1804
+ file
1805
+ - name: >-
1806
+ CreateRelationship200Response.ts
1807
+ type: >-
1808
+ file
1809
+ - name: >-
1810
+ CreateRelationshipRequest.ts
1811
+ type: >-
1812
+ file
1813
+ - name: >-
1814
+ CreateSolution200Response.ts
1815
+ type: >-
1816
+ file
1817
+ - name: >-
1818
+ CreateSolution200ResponseItemsInner.ts
1819
+ type: >-
1820
+ file
1821
+ - name: >-
1822
+ CreateSolution400Response.ts
1823
+ type: >-
1824
+ file
1825
+ - name: >-
1826
+ CreateSolution401403Response.ts
1827
+ type: >-
1828
+ file
1829
+ - name: >-
1830
+ CreateSolution4xx5xxResponse.ts
1831
+ type: >-
1832
+ file
1833
+ - name: >-
1834
+ CreateSolutionFromRecord200Response.ts
1835
+ type: >-
1836
+ file
1837
+ - name: >-
1838
+ CreateSolutionFromRecord200ResponseInner.ts
1839
+ type: >-
1840
+ file
1841
+ - name: >-
1842
+ CreateSolutionFromRecord200ResponseInnerCreatedResourcesInner.ts
1843
+ type: >-
1844
+ file
1845
+ - name: >-
1846
+ CreateSolutionFromRecord200ResponseInnerCreatedResourcesInnerAppsInner.ts
1847
+ type: >-
1848
+ file
1849
+ - name: >-
1850
+ CreateSolutionFromRecord200ResponseItemsInner.ts
1851
+ type: >-
1852
+ file
1853
+ - name: >-
1854
+ CreateSolutionFromRecord400Response.ts
1855
+ type: >-
1856
+ file
1857
+ - name: >-
1858
+ CreateSolutionFromRecord401403Response.ts
1859
+ type: >-
1860
+ file
1861
+ - name: >-
1862
+ CreateSolutionFromRecord404Response.ts
1863
+ type: >-
1864
+ file
1865
+ - name: >-
1866
+ CreateSolutionFromRecord4xx5xxResponse.ts
1867
+ type: >-
1868
+ file
1869
+ - name: >-
1870
+ CreateTable200Response.ts
1871
+ type: >-
1872
+ file
1873
+ - name: >-
1874
+ CreateTableRequest.ts
1875
+ type: >-
1876
+ file
1877
+ - name: >-
1878
+ DeactivateUserToken200Response.ts
1879
+ type: >-
1880
+ file
1881
+ - name: >-
1882
+ DeleteApp200Response.ts
1883
+ type: >-
1884
+ file
1885
+ - name: >-
1886
+ DeleteAppRequest.ts
1887
+ type: >-
1888
+ file
1889
+ - name: >-
1890
+ DeleteFields200Response.ts
1891
+ type: >-
1892
+ file
1893
+ - name: >-
1894
+ DeleteFieldsRequest.ts
1895
+ type: >-
1896
+ file
1897
+ - name: >-
1898
+ DeleteFile200Response.ts
1899
+ type: >-
1900
+ file
1901
+ - name: >-
1902
+ DeleteRecords200Response.ts
1903
+ type: >-
1904
+ file
1905
+ - name: >-
1906
+ DeleteRecordsRequest.ts
1907
+ type: >-
1908
+ file
1909
+ - name: >-
1910
+ DeleteRelationship200Response.ts
1911
+ type: >-
1912
+ file
1913
+ - name: >-
1914
+ DeleteTable200Response.ts
1915
+ type: >-
1916
+ file
1917
+ - name: >-
1918
+ DeleteUserToken200Response.ts
1919
+ type: >-
1920
+ file
1921
+ - name: >-
1922
+ DenyUsers200Response.ts
1923
+ type: >-
1924
+ file
1925
+ - name: >-
1926
+ DenyUsersAndGroups200Response.ts
1927
+ type: >-
1928
+ file
1929
+ - name: >-
1930
+ DenyUsersAndGroupsRequest.ts
1931
+ type: >-
1932
+ file
1933
+ - name: >-
1934
+ DenyUsersRequest.ts
1935
+ type: >-
1936
+ file
1937
+ - name: >-
1938
+ DownloadFile200Response.ts
1939
+ type: >-
1940
+ file
1941
+ - name: >-
1942
+ ExchangeSsoToken200Response.ts
1943
+ type: >-
1944
+ file
1945
+ - name: >-
1946
+ ExchangeSsoTokenRequest.ts
1947
+ type: >-
1948
+ file
1949
+ - name: >-
1950
+ ExportSolution200Response.ts
1951
+ type: >-
1952
+ file
1953
+ - name: >-
1954
+ ExportSolution400Response.ts
1955
+ type: >-
1956
+ file
1957
+ - name: >-
1958
+ ExportSolution401403Response.ts
1959
+ type: >-
1960
+ file
1961
+ - name: >-
1962
+ ExportSolution404Response.ts
1963
+ type: >-
1964
+ file
1965
+ - name: >-
1966
+ ExportSolution4xx5xxResponse.ts
1967
+ type: >-
1968
+ file
1969
+ - name: >-
1970
+ ExportSolutionToRecord200Response.ts
1971
+ type: >-
1972
+ file
1973
+ - name: >-
1974
+ ExportSolutionToRecord200ResponseInner.ts
1975
+ type: >-
1976
+ file
1977
+ - name: >-
1978
+ ExportSolutionToRecord200ResponseItemsInner.ts
1979
+ type: >-
1980
+ file
1981
+ - name: >-
1982
+ ExportSolutionToRecord400Response.ts
1983
+ type: >-
1984
+ file
1985
+ - name: >-
1986
+ ExportSolutionToRecord401403Response.ts
1987
+ type: >-
1988
+ file
1989
+ - name: >-
1990
+ ExportSolutionToRecord404Response.ts
1991
+ type: >-
1992
+ file
1993
+ - name: >-
1994
+ ExportSolutionToRecord4xx5xxResponse.ts
1995
+ type: >-
1996
+ file
1997
+ - name: >-
1998
+ GenerateDocument200Response.ts
1999
+ type: >-
2000
+ file
2001
+ - name: >-
2002
+ GetApp200Response.ts
2003
+ type: >-
2004
+ file
2005
+ - name: >-
2006
+ GetAppEvents200Response.ts
2007
+ type: >-
2008
+ file
2009
+ - name: >-
2010
+ GetAppEvents200ResponseItemsInner.ts
2011
+ type: >-
2012
+ file
2013
+ - name: >-
2014
+ GetAppTables200Response.ts
2015
+ type: >-
2016
+ file
2017
+ - name: >-
2018
+ GetAppTables200ResponseItemsInner.ts
2019
+ type: >-
2020
+ file
2021
+ - name: >-
2022
+ GetField200Response.ts
2023
+ type: >-
2024
+ file
2025
+ - name: >-
2026
+ GetFieldUsage200Response.ts
2027
+ type: >-
2028
+ file
2029
+ - name: >-
2030
+ GetFieldUsage200ResponseItemsInner.ts
2031
+ type: >-
2032
+ file
2033
+ - name: >-
2034
+ GetFields200Response.ts
2035
+ type: >-
2036
+ file
2037
+ - name: >-
2038
+ GetFields200ResponseItemsInner.ts
2039
+ type: >-
2040
+ file
2041
+ - name: >-
2042
+ GetFieldsUsage200Response.ts
2043
+ type: >-
2044
+ file
2045
+ - name: >-
2046
+ GetFieldsUsage200ResponseItemsInner.ts
2047
+ type: >-
2048
+ file
2049
+ - name: >-
2050
+ GetRelationships200Response.ts
2051
+ type: >-
2052
+ file
2053
+ - name: >-
2054
+ GetReport200Response.ts
2055
+ type: >-
2056
+ file
2057
+ - name: >-
2058
+ GetTable200Response.ts
2059
+ type: >-
2060
+ file
2061
+ - name: >-
2062
+ GetTableReports200Response.ts
2063
+ type: >-
2064
+ file
2065
+ - name: >-
2066
+ GetTableReports200ResponseItemsInner.ts
2067
+ type: >-
2068
+ file
2069
+ - name: >-
2070
+ GetTempTokenDBID200Response.ts
2071
+ type: >-
2072
+ file
2073
+ - name: >-
2074
+ GetUsers200Response.ts
2075
+ type: >-
2076
+ file
2077
+ - name: >-
2078
+ GetUsersRequest.ts
2079
+ type: >-
2080
+ file
2081
+ - name: >-
2082
+ Permission.ts
2083
+ type: >-
2084
+ file
2085
+ - name: >-
2086
+ PlatformAnalyticEventSummaries200Response.ts
2087
+ type: >-
2088
+ file
2089
+ - name: >-
2090
+ PlatformAnalyticEventSummaries200ResponseMetadata.ts
2091
+ type: >-
2092
+ file
2093
+ - name: >-
2094
+ PlatformAnalyticEventSummaries200ResponseResultsInner.ts
2095
+ type: >-
2096
+ file
2097
+ - name: >-
2098
+ PlatformAnalyticEventSummaries200ResponseResultsInnerEventTypesInner.ts
2099
+ type: >-
2100
+ file
2101
+ - name: >-
2102
+ PlatformAnalyticEventSummaries200ResponseResultsInnerTotals.ts
2103
+ type: >-
2104
+ file
2105
+ - name: >-
2106
+ PlatformAnalyticEventSummaries200ResponseTotals.ts
2107
+ type: >-
2108
+ file
2109
+ - name: >-
2110
+ PlatformAnalyticEventSummaries200ResponseWhereInner.ts
2111
+ type: >-
2112
+ file
2113
+ - name: >-
2114
+ PlatformAnalyticEventSummariesRequest.ts
2115
+ type: >-
2116
+ file
2117
+ - name: >-
2118
+ PlatformAnalyticEventSummariesRequestWhereInner.ts
2119
+ type: >-
2120
+ file
2121
+ - name: >-
2122
+ PlatformAnalyticReads200Response.ts
2123
+ type: >-
2124
+ file
2125
+ - name: >-
2126
+ Record.ts
2127
+ type: >-
2128
+ file
2129
+ - name: >-
2130
+ RecordValue.ts
2131
+ type: >-
2132
+ file
2133
+ - name: >-
2134
+ RemoveManagersFromGroup200Response.ts
2135
+ type: >-
2136
+ file
2137
+ - name: >-
2138
+ RemoveManagersFromGroupRequest.ts
2139
+ type: >-
2140
+ file
2141
+ - name: >-
2142
+ RemoveMembersFromGroup200Response.ts
2143
+ type: >-
2144
+ file
2145
+ - name: >-
2146
+ RemoveMembersFromGroupRequest.ts
2147
+ type: >-
2148
+ file
2149
+ - name: >-
2150
+ RemoveSubgroupsFromGroup200Response.ts
2151
+ type: >-
2152
+ file
2153
+ - name: >-
2154
+ RemoveSubgroupsFromGroupRequest.ts
2155
+ type: >-
2156
+ file
2157
+ - name: >-
2158
+ RunFormula200Response.ts
2159
+ type: >-
2160
+ file
2161
+ - name: >-
2162
+ RunFormulaRequest.ts
2163
+ type: >-
2164
+ file
2165
+ - name: >-
2166
+ RunQuery200Response.ts
2167
+ type: >-
2168
+ file
2169
+ - name: >-
2170
+ RunQueryRequest.ts
2171
+ type: >-
2172
+ file
2173
+ - name: >-
2174
+ RunQueryRequestGroupByInner.ts
2175
+ type: >-
2176
+ file
2177
+ - name: >-
2178
+ RunQueryRequestOptions.ts
2179
+ type: >-
2180
+ file
2181
+ - name: >-
2182
+ RunQueryRequestSortByInner.ts
2183
+ type: >-
2184
+ file
2185
+ - name: >-
2186
+ RunReport200Response.ts
2187
+ type: >-
2188
+ file
2189
+ - name: >-
2190
+ TransferUserToken200Response.ts
2191
+ type: >-
2192
+ file
2193
+ - name: >-
2194
+ TransferUserTokenRequest.ts
2195
+ type: >-
2196
+ file
2197
+ - name: >-
2198
+ UndenyUsers200Response.ts
2199
+ type: >-
2200
+ file
2201
+ - name: >-
2202
+ UndenyUsersRequest.ts
2203
+ type: >-
2204
+ file
2205
+ - name: >-
2206
+ UpdateApp200Response.ts
2207
+ type: >-
2208
+ file
2209
+ - name: >-
2210
+ UpdateAppRequest.ts
2211
+ type: >-
2212
+ file
2213
+ - name: >-
2214
+ UpdateField200Response.ts
2215
+ type: >-
2216
+ file
2217
+ - name: >-
2218
+ UpdateFieldRequest.ts
2219
+ type: >-
2220
+ file
2221
+ - name: >-
2222
+ UpdateRelationship200Response.ts
2223
+ type: >-
2224
+ file
2225
+ - name: >-
2226
+ UpdateRelationshipRequest.ts
2227
+ type: >-
2228
+ file
2229
+ - name: >-
2230
+ UpdateSolution200Response.ts
2231
+ type: >-
2232
+ file
2233
+ - name: >-
2234
+ UpdateSolution200ResponseInner.ts
2235
+ type: >-
2236
+ file
2237
+ - name: >-
2238
+ UpdateSolution200ResponseInnerCreatedResourcesInner.ts
2239
+ type: >-
2240
+ file
2241
+ - name: >-
2242
+ UpdateSolution200ResponseItemsInner.ts
2243
+ type: >-
2244
+ file
2245
+ - name: >-
2246
+ UpdateSolution400Response.ts
2247
+ type: >-
2248
+ file
2249
+ - name: >-
2250
+ UpdateSolution401403Response.ts
2251
+ type: >-
2252
+ file
2253
+ - name: >-
2254
+ UpdateSolution4xx5xxResponse.ts
2255
+ type: >-
2256
+ file
2257
+ - name: >-
2258
+ UpdateSolutionToRecord200Response.ts
2259
+ type: >-
2260
+ file
2261
+ - name: >-
2262
+ UpdateSolutionToRecord200ResponseInner.ts
2263
+ type: >-
2264
+ file
2265
+ - name: >-
2266
+ UpdateSolutionToRecord200ResponseItemsInner.ts
2267
+ type: >-
2268
+ file
2269
+ - name: >-
2270
+ UpdateSolutionToRecord400Response.ts
2271
+ type: >-
2272
+ file
2273
+ - name: >-
2274
+ UpdateSolutionToRecord401403Response.ts
2275
+ type: >-
2276
+ file
2277
+ - name: >-
2278
+ UpdateSolutionToRecord404Response.ts
2279
+ type: >-
2280
+ file
2281
+ - name: >-
2282
+ UpdateSolutionToRecord4xx5xxResponse.ts
2283
+ type: >-
2284
+ file
2285
+ - name: >-
2286
+ UpdateTable200Response.ts
2287
+ type: >-
2288
+ file
2289
+ - name: >-
2290
+ UpdateTableRequest.ts
2291
+ type: >-
2292
+ file
2293
+ - name: >-
2294
+ Upsert200Response.ts
2295
+ type: >-
2296
+ file
2297
+ - name: >-
2298
+ Upsert207Response.ts
2299
+ type: >-
2300
+ file
2301
+ - name: >-
2302
+ Upsert400Response.ts
2303
+ type: >-
2304
+ file
2305
+ - name: >-
2306
+ UpsertRequest.ts
2307
+ type: >-
2308
+ file
2309
+ - name: >-
2310
+ index.ts
2311
+ type: >-
2312
+ file
2313
+ - name: >-
2314
+ runtime.ts
2315
+ type: >-
2316
+ file
2317
+ - name: >-
2318
+ generated-unified
2319
+ type: >-
2320
+ directory
2321
+ children:
2322
+ - name: >-
2323
+ QuickbaseClient.ts
2324
+ type: >-
2325
+ file
2326
+ contents: >
2327
+ //
2328
+ Generated
2329
+ on
2330
+ 2025-03-22T03:13:09.438Z
2331
+
2332
+ import
2333
+ {
2334
+ AddManagersToGroup200Response,
2335
+ AddManagersToGroupRequest,
2336
+ AddMembersToGroup200Response,
2337
+ AddMembersToGroupRequest,
2338
+ AddSubgroupsToGroup200Response,
2339
+ AddSubgroupsToGroupRequest,
2340
+ Audit200Response,
2341
+ ChangesetSolution200Response,
2342
+ ChangesetSolutionFromRecord200Response,
2343
+ CloneUserToken200Response,
2344
+ CopyApp200Response,
2345
+ CopyAppRequest,
2346
+ CreateApp200Response,
2347
+ CreateAppRequest,
2348
+ CreateField200Response,
2349
+ CreateFieldRequest,
2350
+ CreateRelationship200Response,
2351
+ CreateRelationshipRequest,
2352
+ CreateSolution200Response,
2353
+ CreateSolutionFromRecord200Response,
2354
+ CreateTable200Response,
2355
+ CreateTableRequest,
2356
+ DeactivateUserToken200Response,
2357
+ DeleteApp200Response,
2358
+ DeleteAppRequest,
2359
+ DeleteFields200Response,
2360
+ DeleteFieldsRequest,
2361
+ DeleteFile200Response,
2362
+ DeleteRecords200Response,
2363
+ DeleteRecordsRequest,
2364
+ DeleteRelationship200Response,
2365
+ DeleteTable200Response,
2366
+ DeleteUserToken200Response,
2367
+ DenyUsers200Response,
2368
+ DenyUsersAndGroups200Response,
2369
+ DenyUsersAndGroupsRequest,
2370
+ DenyUsersRequest,
2371
+ DownloadFile200Response,
2372
+ ExchangeSsoToken200Response,
2373
+ ExportSolution200Response,
2374
+ ExportSolutionToRecord200Response,
2375
+ GenerateDocument200Response,
2376
+ GetApp200Response,
2377
+ GetAppEvents200Response,
2378
+ GetAppTables200Response,
2379
+ GetField200Response,
2380
+ GetFieldUsage200Response,
2381
+ GetFields200Response,
2382
+ GetFieldsUsage200Response,
2383
+ GetRelationships200Response,
2384
+ GetReport200Response,
2385
+ GetTable200Response,
2386
+ GetTableReports200Response,
2387
+ GetTempTokenDBID200Response,
2388
+ GetUsers200Response,
2389
+ GetUsersRequest,
2390
+ PlatformAnalyticEventSummaries200Response,
2391
+ PlatformAnalyticReads200Response,
2392
+ RemoveManagersFromGroup200Response,
2393
+ RemoveManagersFromGroupRequest,
2394
+ RemoveMembersFromGroup200Response,
2395
+ RemoveMembersFromGroupRequest,
2396
+ RemoveSubgroupsFromGroup200Response,
2397
+ RemoveSubgroupsFromGroupRequest,
2398
+ RunFormula200Response,
2399
+ RunQuery200Response,
2400
+ RunQueryRequest,
2401
+ RunReport200Response,
2402
+ TransferUserToken200Response,
2403
+ UndenyUsers200Response,
2404
+ UndenyUsersRequest,
2405
+ UpdateApp200Response,
2406
+ UpdateAppRequest,
2407
+ UpdateField200Response,
2408
+ UpdateFieldRequest,
2409
+ UpdateRelationship200Response,
2410
+ UpdateRelationshipRequest,
2411
+ UpdateSolution200Response,
2412
+ UpdateSolutionToRecord200Response,
2413
+ UpdateTable200Response,
2414
+ UpdateTableRequest,
2415
+ Upsert200Response,
2416
+ Upsert207Response,
2417
+ UpsertRequest
2418
+ }
2419
+ from
2420
+ "../generated/models";
2421
+
2422
+
2423
+ export
2424
+ interface
2425
+ QuickbaseClient
2426
+ {
2427
+ /**
2428
+ * Create an app
2429
+ *
2430
+ * @param {Object} params - Object containing the parameters for createApp.
2431
+ * @param {CreateAppRequest} [params.body] - No description provided. (Optional)
2432
+ * - **name** (`string`, required) - The name of the app.
2433
+ * - **description** (`string`, optional) - A description for the app.
2434
+ * - **assignToken** (`boolean`, required) - Whether to assign the user token.
2435
+ *
2436
+ * @returns {Promise<CreateApp200Response>} - Promise resolving to the createApp response.
2437
+ * - **name** (`string`, required) - 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.
2438
+ * - **description** (`string`, optional) - The description for the app. If this property is left out, the app description will be blank.
2439
+ * - **created** (`string`, optional) - The time and date the app was created, in the ISO 8601 time format YYYY-MM-DDThh:mm:ss.sssZ (in UTC time zone).
2440
+ * - **updated** (`string`, optional) - 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).
2441
+ * - **dateFormat** (`string`, optional) - 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.
2442
+ * - **timeZone** (`string`, optional) - 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.
2443
+ * - **memoryInfo** (`object`, optional) - Application memory info
2444
+ * - **id** (`string`, optional) - The unique identifier for this application.
2445
+ * - **hasEveryoneOnTheInternet** (`boolean`, optional) - 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)
2446
+ * - **variables** (`any`, optional) - The app variables. See [About Application Variables](https://help.quickbase.com/user-assistance/variables.html)
2447
+ * - **dataClassification** (`string`, optional) - 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.
2448
+ * - **securityProperties** (`object`, optional) - Security properties of the application
2449
+ *
2450
+ * @see https://developer.quickbase.com/operation/createApp - Official Quickbase API documentation
2451
+ */
2452
+ createApp: (params: { body?: CreateAppRequest }) => Promise<CreateApp200Response>;
2453
+ /**
2454
+ * Get an app
2455
+ *
2456
+ * @param {Object} params - Object containing the parameters for getApp.
2457
+ * @param {string} params.appId - The unique identifier of an app
2458
+ *
2459
+ * @returns {Promise<GetApp200Response>} - Promise resolving to the getApp response.
2460
+ * - **ancestorId** (`string`, optional) - The id of the app from which this app was copied
2461
+ * - **name** (`string`, required) - 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.
2462
+ * - **description** (`string`, optional) - The description for the app. If this property is left out, the app description will be blank.
2463
+ * - **created** (`string`, optional) - The time and date the app was created, in the ISO 8601 time format YYYY-MM-DDThh:mm:ss.sssZ (in UTC time zone).
2464
+ * - **updated** (`string`, optional) - 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).
2465
+ * - **dateFormat** (`string`, optional) - 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.
2466
+ * - **timeZone** (`string`, optional) - 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.
2467
+ * - **memoryInfo** (`object`, optional) - Application memory info
2468
+ * - **id** (`string`, optional) - The unique identifier for this application.
2469
+ * - **hasEveryoneOnTheInternet** (`boolean`, optional) - 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)
2470
+ * - **variables** (`any`, optional) - The app variables. See [About Application Variables](https://help.quickbase.com/user-assistance/variables.html)
2471
+ * - **dataClassification** (`string`, optional) - 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.
2472
+ * - **securityProperties** (`object`, optional) - Security properties of the application
2473
+ *
2474
+ * @see https://developer.quickbase.com/operation/getApp - Official Quickbase API documentation
2475
+ */
2476
+ getApp: (params: { appId: string }) => Promise<GetApp200Response>;
2477
+ /**
2478
+ * Update an app
2479
+ *
2480
+ * @param {Object} params - Object containing the parameters for updateApp.
2481
+ * @param {string} params.appId - The unique identifier of an app
2482
+ * @param {UpdateAppRequest} [params.body] - No description provided. (Optional)
2483
+ * - **name** (`string`, required) - The name of the app.
2484
+ * - **description** (`string`, optional) - A description for the app.
2485
+ * - **assignToken** (`boolean`, required) - Whether to assign the user token.
2486
+ *
2487
+ * @returns {Promise<UpdateApp200Response>} - Promise resolving to the updateApp response.
2488
+ * - **ancestorId** (`string`, optional) - The id of the app from which this app was copied
2489
+ * - **name** (`string`, required) - 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.
2490
+ * - **description** (`string`, optional) - The description for the app. If this property is left out, the app description will be blank.
2491
+ * - **created** (`string`, optional) - The time and date the app was created, in the ISO 8601 time format YYYY-MM-DDThh:mm:ss.sssZ (in UTC time zone).
2492
+ * - **updated** (`string`, optional) - 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).
2493
+ * - **dateFormat** (`string`, optional) - 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.
2494
+ * - **timeZone** (`string`, optional) - 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.
2495
+ * - **memoryInfo** (`object`, optional) - Application memory info
2496
+ * - **id** (`string`, optional) - The unique identifier for this application.
2497
+ * - **hasEveryoneOnTheInternet** (`boolean`, optional) - 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)
2498
+ * - **variables** (`any`, optional) - The app variables. See [About Application Variables](https://help.quickbase.com/user-assistance/variables.html)
2499
+ * - **dataClassification** (`string`, optional) - 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.
2500
+ * - **securityProperties** (`object`, optional) - Security properties of the application
2501
+ *
2502
+ * @see https://developer.quickbase.com/operation/updateApp - Official Quickbase API documentation
2503
+ */
2504
+ updateApp: (params: { appId: string; body?: UpdateAppRequest }) => Promise<UpdateApp200Response>;
2505
+ /**
2506
+ * Delete an app
2507
+ *
2508
+ * @param {Object} params - Object containing the parameters for deleteApp.
2509
+ * @param {string} params.appId - The unique identifier of an app
2510
+ * @param {DeleteAppRequest} [params.body] - No description provided. (Optional)
2511
+ * - **name** (`string`, required) - The name of the app.
2512
+ * - **description** (`string`, optional) - A description for the app.
2513
+ * - **assignToken** (`boolean`, required) - Whether to assign the user token.
2514
+ *
2515
+ * @returns {Promise<DeleteApp200Response>} - Promise resolving to the deleteApp response.
2516
+ * - **deletedAppId** (`string`, optional) - An ID of deleted application.
2517
+ *
2518
+ * @see https://developer.quickbase.com/operation/deleteApp - Official Quickbase API documentation
2519
+ */
2520
+ deleteApp: (params: { appId: string; body?: DeleteAppRequest }) => Promise<DeleteApp200Response>;
2521
+ /**
2522
+ * Get app events
2523
+ *
2524
+ * @param {Object} params - Object containing the parameters for getAppEvents.
2525
+ * @param {string} params.appId - The unique identifier of an app
2526
+ *
2527
+ * @returns {Promise<GetAppEvents200Response>} - Promise resolving to the getAppEvents response.
2528
+ * - **isActive** (`boolean`, optional) - Indication of whether current event is active.
2529
+ * - **type** (`string`, optional) - Type of an event.
2530
+ * - **name** (`string`, optional) - The name of the event. This property is not returned for automations.
2531
+ * - **url** (`string`, optional) - The url to automation that can be accessed from the browser. Only returned for automations.
2532
+ * - **owner** (`object`, optional) - The user that owns the event.
2533
+ * - **tableId** (`string`, optional) - The unique identifier of the table to which event belongs to.
2534
+ *
2535
+ * @see https://developer.quickbase.com/operation/getAppEvents - Official Quickbase API documentation
2536
+ */
2537
+ getAppEvents: (params: { appId: string }) => Promise<GetAppEvents200Response>;
2538
+ /**
2539
+ * Copy an app
2540
+ *
2541
+ * @param {Object} params - Object containing the parameters for copyApp.
2542
+ * @param {string} params.appId - The unique identifier of an app
2543
+ * @param {CopyAppRequest} [params.body] - No description provided. (Optional)
2544
+ * - **name** (`string`, required) - The name of the new app.
2545
+ * - **description** (`string`, optional) - A description for the new app.
2546
+ * - **properties** (`CopyAppRequestProperties`, optional) - Type: CopyAppRequestProperties
2547
+ *
2548
+ * @returns {Promise<CopyApp200Response>} - Promise resolving to the copyApp response.
2549
+ * - **name** (`string`, required) - 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.
2550
+ * - **description** (`string`, optional) - The description for the app
2551
+ * - **created** (`string`, optional) - The time and date the app was created, in the ISO 8601 time format YYYY-MM-DDThh:mm:ss.sssZ (in UTC time zone).
2552
+ * - **updated** (`string`, optional) - 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).
2553
+ * - **dateFormat** (`string`, optional) - 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.
2554
+ * - **timeZone** (`string`, optional) - 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.
2555
+ * - **id** (`string`, optional) - The unique identifier for this application.
2556
+ * - **hasEveryoneOnTheInternet** (`boolean`, optional) - 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)
2557
+ * - **variables** (`any`, optional) - The app variables. See [About Application Variables](https://help.quickbase.com/user-assistance/variables.html)
2558
+ * - **ancestorId** (`string`, optional) - The id of the app from which this app was copied
2559
+ * - **dataClassification** (`string`, optional) - 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.
2560
+ *
2561
+ * @see https://developer.quickbase.com/operation/copyApp - Official Quickbase API documentation
2562
+ */
2563
+ copyApp: (params: { appId: string; body?: CopyAppRequest }) => Promise<CopyApp200Response>;
2564
+ /**
2565
+ * Create a table
2566
+ *
2567
+ * @param {Object} params - Object containing the parameters for createTable.
2568
+ * @param {string} params.appId - The unique identifier of an app
2569
+ * @param {CreateTableRequest} [params.body] - No description provided. (Optional)
2570
+ * - **name** (`string`, required) - The name for the table.
2571
+ * - **description** (`string`, optional) - The description for the table...
2572
+ * - **singleRecordName** (`string`, optional) - The singular noun for records...
2573
+ * - **pluralRecordName** (`string`, optional) - The plural noun for records...
2574
+ *
2575
+ * @returns {Promise<CreateTable200Response>} - Promise resolving to the createTable response.
2576
+ * - **name** (`string`, optional) - The name of the table.
2577
+ * - **id** (`string`, optional) - The unique identifier (dbid) of the table.
2578
+ * - **alias** (`string`, optional) - The automatically-created table alias for the table.
2579
+ * - **description** (`string`, optional) - The description of the table, as configured by an application administrator.
2580
+ * - **created** (`string`, optional) - 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).
2581
+ * - **updated** (`string`, optional) - 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).
2582
+ * - **nextRecordId** (`number`, optional) - The incremental Record ID that will be used when the next record is created, as determined when the API call was ran.
2583
+ * - **nextFieldId** (`number`, optional) - The incremental Field ID that will be used when the next field is created, as determined when the API call was ran.
2584
+ * - **defaultSortFieldId** (`number`, optional) - The id of the field that is configured for default sorting.
2585
+ * - **defaultSortOrder** (`string`, optional) - The configuration of the default sort order on the table.
2586
+ * - **keyFieldId** (`number`, optional) - The id of the field that is configured to be the key on this table, which is usually the Quickbase Record ID.
2587
+ * - **singleRecordName** (`string`, optional) - The builder-configured singular noun of the table.
2588
+ * - **pluralRecordName** (`string`, optional) - The builder-configured plural noun of the table.
2589
+ * - **sizeLimit** (`string`, optional) - The size limit for the table.
2590
+ * - **spaceUsed** (`string`, optional) - The amount of space currently being used by the table.
2591
+ * - **spaceRemaining** (`string`, optional) - The amount of space remaining for use by the table.
2592
+ *
2593
+ * @see https://developer.quickbase.com/operation/createTable - Official Quickbase API documentation
2594
+ */
2595
+ createTable: (params: { appId: string; body?: CreateTableRequest }) => Promise<CreateTable200Response>;
2596
+ /**
2597
+ * Get tables for an app
2598
+ *
2599
+ * @param {Object} params - Object containing the parameters for getAppTables.
2600
+ * @param {string} params.appId - The unique identifier of an app
2601
+ *
2602
+ * @returns {Promise<GetAppTables200Response>} - Promise resolving to the getAppTables response.
2603
+ * - **name** (`string`, optional) - The name of the table.
2604
+ * - **id** (`string`, optional) - The unique identifier (dbid) of the table.
2605
+ * - **alias** (`string`, optional) - The automatically-created table alias for the table.
2606
+ * - **description** (`string`, optional) - The description of the table, as configured by an application administrator.
2607
+ * - **created** (`string`, optional) - 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).
2608
+ * - **updated** (`string`, optional) - 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).
2609
+ * - **nextRecordId** (`number`, optional) - The incremental Record ID that will be used when the next record is created, as determined when the API call was ran.
2610
+ * - **nextFieldId** (`number`, optional) - The incremental Field ID that will be used when the next field is created, as determined when the API call was ran.
2611
+ * - **defaultSortFieldId** (`number`, optional) - The id of the field that is configured for default sorting.
2612
+ * - **defaultSortOrder** (`string`, optional) - The configuration of the default sort order on the table.
2613
+ * - **keyFieldId** (`number`, optional) - The id of the field that is configured to be the key on this table, which is usually the Quickbase Record ID.
2614
+ * - **singleRecordName** (`string`, optional) - The builder-configured singular noun of the table.
2615
+ * - **pluralRecordName** (`string`, optional) - The builder-configured plural noun of the table.
2616
+ * - **sizeLimit** (`string`, optional) - The size limit for the table.
2617
+ * - **spaceUsed** (`string`, optional) - The amount of space currently being used by the table.
2618
+ * - **spaceRemaining** (`string`, optional) - The amount of space remaining for use by the table.
2619
+ *
2620
+ * @see https://developer.quickbase.com/operation/getAppTables - Official Quickbase API documentation
2621
+ */
2622
+ getAppTables: (params: { appId: string }) => Promise<GetAppTables200Response>;
2623
+ /**
2624
+ * Get a table
2625
+ *
2626
+ * @param {Object} params - Object containing the parameters for getTable.
2627
+ * @param {string} params.appId - The unique identifier of an app
2628
+ * @param {string} params.tableId - The unique identifier (dbid) of the table.
2629
+ *
2630
+ * @returns {Promise<GetTable200Response>} - Promise resolving to the getTable response.
2631
+ * - **name** (`string`, optional) - The name of the table.
2632
+ * - **id** (`string`, optional) - The unique identifier (dbid) of the table.
2633
+ * - **alias** (`string`, optional) - The automatically-created table alias for the table.
2634
+ * - **description** (`string`, optional) - The description of the table, as configured by an application administrator.
2635
+ * - **created** (`string`, optional) - 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).
2636
+ * - **updated** (`string`, optional) - 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).
2637
+ * - **nextRecordId** (`number`, optional) - The incremental Record ID that will be used when the next record is created, as determined when the API call was ran.
2638
+ * - **nextFieldId** (`number`, optional) - The incremental Field ID that will be used when the next field is created, as determined when the API call was ran.
2639
+ * - **defaultSortFieldId** (`number`, optional) - The id of the field that is configured for default sorting.
2640
+ * - **defaultSortOrder** (`string`, optional) - The configuration of the default sort order on the table.
2641
+ * - **keyFieldId** (`number`, optional) - The id of the field that is configured to be the key on this table, which is usually the Quickbase Record ID.
2642
+ * - **singleRecordName** (`string`, optional) - The builder-configured singular noun of the table.
2643
+ * - **pluralRecordName** (`string`, optional) - The builder-configured plural noun of the table.
2644
+ * - **sizeLimit** (`string`, optional) - The size limit for the table.
2645
+ * - **spaceUsed** (`string`, optional) - The amount of space currently being used by the table.
2646
+ * - **spaceRemaining** (`string`, optional) - The amount of space remaining for use by the table.
2647
+ *
2648
+ * @see https://developer.quickbase.com/operation/getTable - Official Quickbase API documentation
2649
+ */
2650
+ getTable: (params: { appId: string; tableId: string }) => Promise<GetTable200Response>;
2651
+ /**
2652
+ * Update a table
2653
+ *
2654
+ * @param {Object} params - Object containing the parameters for updateTable.
2655
+ * @param {string} params.appId - The unique identifier of an app
2656
+ * @param {string} params.tableId - The unique identifier (dbid) of the table.
2657
+ * @param {UpdateTableRequest} [params.body] - No description provided. (Optional)
2658
+ * - **name** (`string`, optional) - The updated name of the table.
2659
+ * - **description** (`string`, optional) - The updated description for the table.
2660
+ *
2661
+ * @returns {Promise<UpdateTable200Response>} - Promise resolving to the updateTable response.
2662
+ * - **name** (`string`, optional) - The name of the table.
2663
+ * - **id** (`string`, optional) - The unique identifier (dbid) of the table.
2664
+ * - **alias** (`string`, optional) - The automatically-created table alias for the table.
2665
+ * - **description** (`string`, optional) - The description of the table, as configured by an application administrator.
2666
+ * - **created** (`string`, optional) - 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).
2667
+ * - **updated** (`string`, optional) - 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).
2668
+ * - **nextRecordId** (`number`, optional) - The incremental Record ID that will be used when the next record is created, as determined when the API call was ran.
2669
+ * - **nextFieldId** (`number`, optional) - The incremental Field ID that will be used when the next field is created, as determined when the API call was ran.
2670
+ * - **defaultSortFieldId** (`number`, optional) - The id of the field that is configured for default sorting.
2671
+ * - **defaultSortOrder** (`string`, optional) - The configuration of the default sort order on the table.
2672
+ * - **keyFieldId** (`number`, optional) - The id of the field that is configured to be the key on this table, which is usually the Quickbase Record ID.
2673
+ * - **singleRecordName** (`string`, optional) - The builder-configured singular noun of the table.
2674
+ * - **pluralRecordName** (`string`, optional) - The builder-configured plural noun of the table.
2675
+ * - **sizeLimit** (`string`, optional) - The size limit for the table.
2676
+ * - **spaceUsed** (`string`, optional) - The amount of space currently being used by the table.
2677
+ * - **spaceRemaining** (`string`, optional) - The amount of space remaining for use by the table.
2678
+ *
2679
+ * @see https://developer.quickbase.com/operation/updateTable - Official Quickbase API documentation
2680
+ */
2681
+ updateTable: (params: { appId: string; tableId: string; body?: UpdateTableRequest }) => Promise<UpdateTable200Response>;
2682
+ /**
2683
+ * Delete a table
2684
+ *
2685
+ * @param {Object} params - Object containing the parameters for deleteTable.
2686
+ * @param {string} params.appId - The unique identifier of an app
2687
+ * @param {string} params.tableId - The unique identifier (dbid) of the table.
2688
+ *
2689
+ * @returns {Promise<DeleteTable200Response>} - Promise resolving to the deleteTable response.
2690
+ * - **deletedTableId** (`string`, optional) - The deleted table id.
2691
+ *
2692
+ * @see https://developer.quickbase.com/operation/deleteTable - Official Quickbase API documentation
2693
+ */
2694
+ deleteTable: (params: { appId: string; tableId: string }) => Promise<DeleteTable200Response>;
2695
+ /**
2696
+ * Get all relationships
2697
+ *
2698
+ * @param {Object} params - Object containing the parameters for getRelationships.
2699
+ * @param {number} [params.skip] - The number of relationships to skip. (Optional)
2700
+ * @param {string} params.tableId - The unique identifier (dbid) of the child table.
2701
+ *
2702
+ * @returns {Promise<GetRelationships200Response>} - Promise resolving to the getRelationships response.
2703
+ * - **relationships** (`any`, required) - The relationships in a table.
2704
+ * - **metadata** (`object`, optional) - Additional information about the results that may be helpful.
2705
+ *
2706
+ * @see https://developer.quickbase.com/operation/getRelationships - Official Quickbase API documentation
2707
+ */
2708
+ getRelationships: (params: { skip?: number; tableId: string }) => Promise<GetRelationships200Response>;
2709
+ /**
2710
+ * Create a relationship
2711
+ *
2712
+ * @param {Object} params - Object containing the parameters for createRelationship.
2713
+ * @param {string} params.tableId - The unique identifier (dbid) of the table. This will be the child table.
2714
+ * @param {CreateRelationshipRequest} [params.body] - No description provided. (Optional)
2715
+ * - **parentTableId** (`string`, required) - The parent table id for the relationship.
2716
+ * - **foreignKeyField** (`{ [key: string]: any; }`, optional) - Type: { [key: string]: any; }
2717
+ * - **lookupFieldIds** (`number[]`, optional) - Array of field ids...
2718
+ * - **summaryFields** (`{ [key: string]: any; }[]`, optional) - Array of summary field objects...
2719
+ *
2720
+ * @returns {Promise<CreateRelationship200Response>} - Promise resolving to the createRelationship response.
2721
+ * - **id** (`number`, required) - The relationship id (foreign key field id).
2722
+ * - **parentTableId** (`string`, required) - The parent table id of the relationship.
2723
+ * - **childTableId** (`string`, required) - The child table id of the relationship.
2724
+ * - **foreignKeyField** (`object`, optional) - The foreign key field information.
2725
+ * - **isCrossApp** (`boolean`, required) - Whether this is a cross-app relationship.
2726
+ * - **lookupFields** (`any`, optional) - The lookup fields array.
2727
+ * - **summaryFields** (`any`, optional) - The summary fields array.
2728
+ *
2729
+ * @see https://developer.quickbase.com/operation/createRelationship - Official Quickbase API documentation
2730
+ */
2731
+ createRelationship: (params: { tableId: string; body?: CreateRelationshipRequest }) => Promise<CreateRelationship200Response>;
2732
+ /**
2733
+ * Update a relationship
2734
+ *
2735
+ * @param {Object} params - Object containing the parameters for updateRelationship.
2736
+ * @param {string} params.tableId - The unique identifier (dbid) of the table. This will be the child table.
2737
+ * @param {number} params.relationshipId - The relationship id. This is the field id of the reference field on the child table.
2738
+ * @param {UpdateRelationshipRequest} [params.body] - No description provided. (Optional)
2739
+ * - **parentTableId** (`string`, optional) - The updated parent table id...
2740
+ * - **foreignKeyField** (`{ [key: string]: any; }`, optional) - Type: { [key: string]: any; }
2741
+ * - **lookupFieldIds** (`number[]`, optional) - Updated array of field ids...
2742
+ * - **summaryFields** (`{ [key: string]: any; }[]`, optional) - Type: { [key: string]: any; }[]
2743
+ *
2744
+ * @returns {Promise<UpdateRelationship200Response>} - Promise resolving to the updateRelationship response.
2745
+ * - **id** (`number`, required) - The relationship id (foreign key field id).
2746
+ * - **parentTableId** (`string`, required) - The parent table id of the relationship.
2747
+ * - **childTableId** (`string`, required) - The child table id of the relationship.
2748
+ * - **foreignKeyField** (`object`, optional) - The foreign key field information.
2749
+ * - **isCrossApp** (`boolean`, required) - Whether this is a cross-app relationship.
2750
+ * - **lookupFields** (`any`, optional) - The lookup fields array.
2751
+ * - **summaryFields** (`any`, optional) - The summary fields array.
2752
+ *
2753
+ * @see https://developer.quickbase.com/operation/updateRelationship - Official Quickbase API documentation
2754
+ */
2755
+ updateRelationship: (params: { tableId: string; relationshipId: number; body?: UpdateRelationshipRequest }) => Promise<UpdateRelationship200Response>;
2756
+ /**
2757
+ * Delete a relationship
2758
+ *
2759
+ * @param {Object} params - Object containing the parameters for deleteRelationship.
2760
+ * @param {string} params.tableId - The unique identifier (dbid) of the table. This will be the child table.
2761
+ * @param {number} params.relationshipId - The relationship id. This is the field id of the reference field on the child table.
2762
+ *
2763
+ * @returns {Promise<DeleteRelationship200Response>} - Promise resolving to the deleteRelationship response.
2764
+ * - **relationshipId** (`number`, required) - The relationship id.
2765
+ *
2766
+ * @see https://developer.quickbase.com/operation/deleteRelationship - Official Quickbase API documentation
2767
+ */
2768
+ deleteRelationship: (params: { tableId: string; relationshipId: number }) => Promise<DeleteRelationship200Response>;
2769
+ /**
2770
+ * Get reports for a table
2771
+ *
2772
+ * @param {Object} params - Object containing the parameters for getTableReports.
2773
+ * @param {string} params.tableId - The unique identifier of the table.
2774
+ *
2775
+ * @returns {Promise<GetTableReports200Response>} - Promise resolving to the getTableReports response.
2776
+ * - **id** (`string`, optional) - The identifier of the report, unique to the table.
2777
+ * - **name** (`string`, optional) - The configured name of the report.
2778
+ * - **type** (`string`, optional) - The type of report in Quickbase (e.g., chart).
2779
+ * - **description** (`string`, optional) - The configured description of a report.
2780
+ * - **ownerId** (`number`, optional) - Optional, showed only for personal reports. The user ID of report owner.
2781
+ * - **query** (`object`, optional) - The query definition as configured in Quickbase that gets executed when the report is run.
2782
+ * - **properties** (`{ [key: string]: any; }`, optional) - A list of properties specific to the report type. To see a detailed description of the properties for each report type, See [Report Types.](../reportTypes)
2783
+ * - **usedLast** (`string`, optional) - The instant at which a report was last used.
2784
+ * - **usedCount** (`number`, optional) - The number of times a report has been used.
2785
+ *
2786
+ * @see https://developer.quickbase.com/operation/getTableReports - Official Quickbase API documentation
2787
+ */
2788
+ getTableReports: (params: { tableId: string }) => Promise<GetTableReports200Response>;
2789
+ /**
2790
+ * Get a report
2791
+ *
2792
+ * @param {Object} params - Object containing the parameters for getReport.
2793
+ * @param {string} params.tableId - The unique identifier of table.
2794
+ * @param {string} params.reportId - The identifier of the report, unique to the table.
2795
+ *
2796
+ * @returns {Promise<GetReport200Response>} - Promise resolving to the getReport response.
2797
+ * - **id** (`string`, optional) - The identifier of the report, unique to the table.
2798
+ * - **name** (`string`, optional) - The configured name of the report.
2799
+ * - **type** (`string`, optional) - The type of report in Quickbase (e.g., chart).
2800
+ * - **description** (`string`, optional) - The configured description of a report.
2801
+ * - **ownerId** (`number`, optional) - Optional, showed only for personal reports. The user ID of report owner.
2802
+ * - **query** (`object`, optional) - The query definition as configured in Quickbase that gets executed when the report is run.
2803
+ * - **properties** (`{ [key: string]: any; }`, optional) - A list of properties specific to the report type. To see a detailed description of the properties for each report type, See [Report Types.](../reportTypes)
2804
+ * - **usedLast** (`string`, optional) - The instant at which a report was last used.
2805
+ * - **usedCount** (`number`, optional) - The number of times a report has been used.
2806
+ *
2807
+ * @see https://developer.quickbase.com/operation/getReport - Official Quickbase API documentation
2808
+ */
2809
+ getReport: (params: { tableId: string; reportId: string }) => Promise<GetReport200Response>;
2810
+ /**
2811
+ * Run a report
2812
+ *
2813
+ * @param {Object} params - Object containing the parameters for runReport.
2814
+ * @param {string} params.tableId - The identifier of the table for the report.
2815
+ * @param {number} [params.skip] - The number of records to skip. You can set this value when paginating through a set of results. (Optional)
2816
+ * @param {number} [params.top] - The maximum number of records to return. You can override the default Quickbase pagination to get more or fewer results. If your requested value here exceeds the dynamic maximums, we will return a subset of results and the rest can be gathered in subsequent API calls. (Optional)
2817
+ * @param {string} params.reportId - The identifier of the report, unique to the table.
2818
+ * @param {any} [params.body] - No description provided. (Optional)
2819
+ *
2820
+ * @returns {Promise<RunReport200Response>} - Promise resolving to the runReport response.
2821
+ * - **fields** (`any`, optional) - 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.
2822
+ * - **data** (`any`, optional) - An array of objects that either represents the record data or summarized values, depending on the report type.
2823
+ * - **metadata** (`object`, optional) - 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.
2824
+ *
2825
+ * @see https://developer.quickbase.com/operation/runReport - Official Quickbase API documentation
2826
+ */
2827
+ runReport: (params: { tableId: string; skip?: number; top?: number; reportId: string; body?: any }) => Promise<RunReport200Response>;
2828
+ /**
2829
+ * Get fields for a table
2830
+ *
2831
+ * @param {Object} params - Object containing the parameters for getFields.
2832
+ * @param {string} params.tableId - The unique identifier (dbid) of the table.
2833
+ * @param {boolean} [params.includeFieldPerms] - Set to 'true' if you'd like to get back the custom permissions for the field(s). (Optional)
2834
+ *
2835
+ * @returns {Promise<GetFields200Response>} - Promise resolving to the getFields response.
2836
+ * - **id** (`number`, required) - The id of the field, unique to this table.
2837
+ * - **fieldType** (`string`, optional) - The type of field, as described [here](https://help.quickbase.com/user-assistance/field_types.html).
2838
+ * - **mode** (`string`, optional) - For derived fields, this will be 'lookup', 'summary', or 'formula', to indicate the type of derived field. For non-derived fields, this will be blank.
2839
+ * - **label** (`string`, optional) - The label (name) of the field.
2840
+ * - **noWrap** (`boolean`, optional) - Indicates if the field is configured to not wrap when displayed in the product.
2841
+ * - **bold** (`boolean`, optional) - Indicates if the field is configured to display in bold in the product.
2842
+ * - **required** (`boolean`, optional) - Indicates if the field is marked required.
2843
+ * - **appearsByDefault** (`boolean`, optional) - Indicates if the field is marked as a default in reports.
2844
+ * - **findEnabled** (`boolean`, optional) - Indicates if the field is marked as searchable.
2845
+ * - **unique** (`boolean`, optional) - Indicates if the field is marked unique.
2846
+ * - **doesDataCopy** (`boolean`, optional) - Indicates if the field data will copy when a user copies the record.
2847
+ * - **fieldHelp** (`string`, optional) - The configured help text shown to users within the product.
2848
+ * - **audited** (`boolean`, optional) - Indicates if the field is being tracked as part of Quickbase Audit Logs.
2849
+ * - **properties** (`{ [key: string]: any; }`, optional) - Additional properties for the field. Please see [Field type details](../fieldInfo) page for more details on the properties for each field type.
2850
+ * - **permissions** (`Permission[]`, optional) - Field Permissions for different roles.
2851
+ * * - **role** (`string`, required) - The role name
2852
+ * * - **permissionType** (`string`, required) - Permission type (e.g., View, Modify)
2853
+ * * - **roleId** (`number`, required) - The role identifier
2854
+ *
2855
+ * @see https://developer.quickbase.com/operation/getFields - Official Quickbase API documentation
2856
+ */
2857
+ getFields: (params: { tableId: string; includeFieldPerms?: boolean }) => Promise<GetFields200Response>;
2858
+ /**
2859
+ * Create a field
2860
+ *
2861
+ * @param {Object} params - Object containing the parameters for createField.
2862
+ * @param {string} params.tableId - The unique identifier of the table.
2863
+ * @param {CreateFieldRequest} [params.body] - No description provided. (Optional)
2864
+ * - **label** (`string`, required) - The label of the field
2865
+ * - **fieldType** (`CreateFieldRequestFieldTypeEnum`, required) - The type of the field
2866
+ * - **fieldHelp** (`string`, optional) - Help text for the field
2867
+ * - **addToForms** (`boolean`, optional) - Whether to add the field to forms
2868
+ * - **permissions** (`object`, optional) - Custom permissions for the field
2869
+ * - **required** (`boolean`, optional) - Whether the field is required
2870
+ * - **unique** (`boolean`, optional) - Whether the field must have unique values
2871
+ * - **noWrap** (`boolean`, optional) - Whether text wrapping is disabled
2872
+ * - **bold** (`boolean`, optional) - Whether the field is bolded
2873
+ * - **appearsByDefault** (`boolean`, optional) - Whether the field appears by default in reports
2874
+ * - **findEnabled** (`boolean`, optional) - Whether the field is searchable
2875
+ * - **doesDataCopy** (`boolean`, optional) - Whether the field copies data
2876
+ * - **audited** (`boolean`, optional) - Whether changes to the field are audited
2877
+ * - **properties** (`CreateFieldRequestProperties`, optional) - Type: CreateFieldRequestProperties
2878
+ *
2879
+ * @returns {Promise<CreateField200Response>} - Promise resolving to the createField response.
2880
+ * - **id** (`number`, required) - The id of the field, unique to this table.
2881
+ * - **fieldType** (`string`, optional) - The type of field, as described [here](https://help.quickbase.com/user-assistance/field_types.html).
2882
+ * - **mode** (`string`, optional) - For derived fields, this will be 'lookup', 'summary', or 'formula', to indicate the type of derived field. For non-derived fields, this will be blank.
2883
+ * - **label** (`string`, optional) - The label (name) of the field.
2884
+ * - **noWrap** (`boolean`, optional) - Indicates if the field is configured to not wrap when displayed in the product.
2885
+ * - **bold** (`boolean`, optional) - Indicates if the field is configured to display in bold in the product.
2886
+ * - **required** (`boolean`, optional) - Indicates if the field is marked required.
2887
+ * - **appearsByDefault** (`boolean`, optional) - Indicates if the field is marked as a default in reports.
2888
+ * - **findEnabled** (`boolean`, optional) - Indicates if the field is marked as searchable.
2889
+ * - **unique** (`boolean`, optional) - Indicates if the field is marked unique.
2890
+ * - **doesDataCopy** (`boolean`, optional) - Indicates if the field data will copy when a user copies the record.
2891
+ * - **fieldHelp** (`string`, optional) - The configured help text shown to users within the product.
2892
+ * - **audited** (`boolean`, optional) - Indicates if the field is being tracked as part of Quickbase Audit Logs.
2893
+ * - **properties** (`{ [key: string]: any; }`, optional) - Additional properties for the field. Please see [Field type details](../fieldInfo) page for more details on the properties for each field type.
2894
+ * - **permissions** (`Permission[]`, optional) - Field Permissions for different roles.
2895
+ * * - **role** (`string`, required) - The role name
2896
+ * * - **permissionType** (`string`, required) - Permission type (e.g., View, Modify)
2897
+ * * - **roleId** (`number`, required) - The role identifier
2898
+ *
2899
+ * @see https://developer.quickbase.com/operation/createField - Official Quickbase API documentation
2900
+ */
2901
+ createField: (params: { tableId: string; body?: CreateFieldRequest }) => Promise<CreateField200Response>;
2902
+ /**
2903
+ * Delete field(s)
2904
+ *
2905
+ * @param {Object} params - Object containing the parameters for deleteFields.
2906
+ * @param {string} params.tableId - The unique identifier of the table.
2907
+ * @param {DeleteFieldsRequest} [params.body] - No description provided. (Optional)
2908
+ * - **fieldIds** (`number[]`, required) - Type: number[]
2909
+ *
2910
+ * @returns {Promise<DeleteFields200Response>} - Promise resolving to the deleteFields response.
2911
+ * - **deletedFieldIds** (`any`, required) - List of field ids to were deleted.
2912
+ * - **errors** (`any`, required) - List of errors found.
2913
+ *
2914
+ * @see https://developer.quickbase.com/operation/deleteFields - Official Quickbase API documentation
2915
+ */
2916
+ deleteFields: (params: { tableId: string; body?: DeleteFieldsRequest }) => Promise<DeleteFields200Response>;
2917
+ /**
2918
+ * Get field
2919
+ *
2920
+ * @param {Object} params - Object containing the parameters for getField.
2921
+ * @param {string} params.tableId - The unique identifier (dbid) of the table.
2922
+ * @param {boolean} [params.includeFieldPerms] - Set to 'true' if you'd like to get back the custom permissions for the field(s). (Optional)
2923
+ * @param {number} params.fieldId - The unique identifier (fid) of the field.
2924
+ *
2925
+ * @returns {Promise<GetField200Response>} - Promise resolving to the getField response.
2926
+ * - **id** (`number`, required) - The id of the field, unique to this table.
2927
+ * - **fieldType** (`string`, optional) - The type of field, as described [here](https://help.quickbase.com/user-assistance/field_types.html).
2928
+ * - **mode** (`string`, optional) - For derived fields, this will be 'lookup', 'summary', or 'formula', to indicate the type of derived field. For non-derived fields, this will be blank.
2929
+ * - **label** (`string`, optional) - The label (name) of the field.
2930
+ * - **noWrap** (`boolean`, optional) - Indicates if the field is configured to not wrap when displayed in the product.
2931
+ * - **bold** (`boolean`, optional) - Indicates if the field is configured to display in bold in the product.
2932
+ * - **required** (`boolean`, optional) - Indicates if the field is marked required.
2933
+ * - **appearsByDefault** (`boolean`, optional) - Indicates if the field is marked as a default in reports.
2934
+ * - **findEnabled** (`boolean`, optional) - Indicates if the field is marked as searchable.
2935
+ * - **unique** (`boolean`, optional) - Indicates if the field is marked unique.
2936
+ * - **doesDataCopy** (`boolean`, optional) - Indicates if the field data will copy when a user copies the record.
2937
+ * - **fieldHelp** (`string`, optional) - The configured help text shown to users within the product.
2938
+ * - **audited** (`boolean`, optional) - Indicates if the field is being tracked as part of Quickbase Audit Logs.
2939
+ * - **properties** (`{ [key: string]: any; }`, optional) - Additional properties for the field. Please see [Field type details](../fieldInfo) page for more details on the properties for each field type.
2940
+ * - **permissions** (`Permission[]`, optional) - Field Permissions for different roles.
2941
+ * * - **role** (`string`, required) - The role name
2942
+ * * - **permissionType** (`string`, required) - Permission type (e.g., View, Modify)
2943
+ * * - **roleId** (`number`, required) - The role identifier
2944
+ *
2945
+ * @see https://developer.quickbase.com/operation/getField - Official Quickbase API documentation
2946
+ */
2947
+ getField: (params: { tableId: string; includeFieldPerms?: boolean; fieldId: number }) => Promise<GetField200Response>;
2948
+ /**
2949
+ * Update a field
2950
+ *
2951
+ * @param {Object} params - Object containing the parameters for updateField.
2952
+ * @param {string} params.tableId - The unique identifier of the table.
2953
+ * @param {number} params.fieldId - The unique identifier (fid) of the field.
2954
+ * @param {UpdateFieldRequest} [params.body] - No description provided. (Optional)
2955
+ * - **label** (`string`, required) - The label of the field
2956
+ * - **fieldType** (`UpdateFieldRequestFieldTypeEnum`, optional) - The type of the field
2957
+ * - **fieldHelp** (`string`, optional) - Help text for the field
2958
+ * - **addToForms** (`boolean`, optional) - Whether to add the field to forms
2959
+ * - **permissions** (`object`, optional) - Custom permissions for the field
2960
+ * - **required** (`boolean`, optional) - Whether the field is required
2961
+ * - **unique** (`boolean`, optional) - Whether the field must have unique values
2962
+ * - **noWrap** (`boolean`, optional) - Whether text wrapping is disabled
2963
+ * - **bold** (`boolean`, optional) - Whether the field is bolded
2964
+ * - **appearsByDefault** (`boolean`, optional) - Whether the field appears by default in reports
2965
+ * - **findEnabled** (`boolean`, optional) - Whether the field is searchable
2966
+ * - **doesDataCopy** (`boolean`, optional) - Whether the field copies data
2967
+ * - **audited** (`boolean`, optional) - Whether changes to the field are audited
2968
+ * - **properties** (`CreateFieldRequestProperties`, optional) - Type: CreateFieldRequestProperties
2969
+ *
2970
+ * @returns {Promise<UpdateField200Response>} - Promise resolving to the updateField response.
2971
+ * - **id** (`number`, required) - The id of the field, unique to this table.
2972
+ * - **fieldType** (`string`, optional) - The type of field, as described [here](https://help.quickbase.com/user-assistance/field_types.html).
2973
+ * - **mode** (`string`, optional) - For derived fields, this will be 'lookup', 'summary', or 'formula', to indicate the type of derived field. For non-derived fields, this will be blank.
2974
+ * - **label** (`string`, optional) - The label (name) of the field.
2975
+ * - **noWrap** (`boolean`, optional) - Indicates if the field is configured to not wrap when displayed in the product.
2976
+ * - **bold** (`boolean`, optional) - Indicates if the field is configured to display in bold in the product.
2977
+ * - **required** (`boolean`, optional) - Indicates if the field is marked required.
2978
+ * - **appearsByDefault** (`boolean`, optional) - Indicates if the field is marked as a default in reports.
2979
+ * - **findEnabled** (`boolean`, optional) - Indicates if the field is marked as searchable.
2980
+ * - **unique** (`boolean`, optional) - Indicates if the field is marked unique.
2981
+ * - **doesDataCopy** (`boolean`, optional) - Indicates if the field data will copy when a user copies the record.
2982
+ * - **fieldHelp** (`string`, optional) - The configured help text shown to users within the product.
2983
+ * - **audited** (`boolean`, optional) - Indicates if the field is being tracked as part of Quickbase Audit Logs.
2984
+ * - **properties** (`{ [key: string]: any; }`, optional) - Additional properties for the field. Please see [Field type details](../fieldInfo) page for more details on the properties for each field type.
2985
+ * - **permissions** (`Permission[]`, optional) - Field Permissions for different roles.
2986
+ * * - **role** (`string`, required) - The role name
2987
+ * * - **permissionType** (`string`, required) - Permission type (e.g., View, Modify)
2988
+ * * - **roleId** (`number`, required) - The role identifier
2989
+ *
2990
+ * @see https://developer.quickbase.com/operation/updateField - Official Quickbase API documentation
2991
+ */
2992
+ updateField: (params: { tableId: string; fieldId: number; body?: UpdateFieldRequest }) => Promise<UpdateField200Response>;
2993
+ /**
2994
+ * Get usage for all fields
2995
+ *
2996
+ * @param {Object} params - Object containing the parameters for getFieldsUsage.
2997
+ * @param {string} params.tableId - The unique identifier (dbid) of the table.
2998
+ * @param {number} [params.skip] - The number of fields to skip from the list. (Optional)
2999
+ * @param {number} [params.top] - The maximum number of fields to return. (Optional)
3000
+ *
3001
+ * @returns {Promise<GetFieldsUsage200Response>} - Promise resolving to the getFieldsUsage response.
3002
+ * - **field** (`object`, required) - Basic information about the field.
3003
+ * - **usage** (`object`, required) - Usage Information about the field.
3004
+ *
3005
+ * @see https://developer.quickbase.com/operation/getFieldsUsage - Official Quickbase API documentation
3006
+ */
3007
+ getFieldsUsage: (params: { tableId: string; skip?: number; top?: number }) => Promise<GetFieldsUsage200Response>;
3008
+ /**
3009
+ * Get usage for a field
3010
+ *
3011
+ * @param {Object} params - Object containing the parameters for getFieldUsage.
3012
+ * @param {string} params.tableId - The unique identifier (dbid) of the table.
3013
+ * @param {number} params.fieldId - The unique identifier (fid) of the field.
3014
+ *
3015
+ * @returns {Promise<GetFieldUsage200Response>} - Promise resolving to the getFieldUsage response.
3016
+ * - **field** (`object`, required) - Basic information about the field.
3017
+ * - **usage** (`object`, required) - Usage Information about the field.
3018
+ *
3019
+ * @see https://developer.quickbase.com/operation/getFieldUsage - Official Quickbase API documentation
3020
+ */
3021
+ getFieldUsage: (params: { tableId: string; fieldId: number }) => Promise<GetFieldUsage200Response>;
3022
+ /**
3023
+ * Run a formula
3024
+ *
3025
+ * @param {Object} params - Object containing the parameters for runFormula.
3026
+ * @param {{ formula?: string; rid?: number; from?: string }} [params.body] - No description provided. (Optional)
3027
+ *
3028
+ * @returns {Promise<RunFormula200Response>} - Promise resolving to the runFormula response.
3029
+ * - **result** (`string`, optional) - The formula execution result.
3030
+ *
3031
+ * @see https://developer.quickbase.com/operation/runFormula - Official Quickbase API documentation
3032
+ */
3033
+ runFormula: (params: { body?: { formula?: string; rid?: number; from?: string } }) => Promise<RunFormula200Response>;
3034
+ /**
3035
+ * Insert/Update record(s)
3036
+ *
3037
+ * @param {Object} params - Object containing the parameters for upsert.
3038
+ * @param {UpsertRequest} [params.body] - No description provided. (Optional)
3039
+ * - **data** (`Record[]`, optional) - Type: Record[]
3040
+ * - **to** (`string`, optional) - Type: string
3041
+ * - **fieldsToReturn** (`number[]`, optional) - Type: number[]
3042
+ *
3043
+ * @returns {Promise<Upsert200Response | Upsert207Response>} - Promise resolving to the upsert response.
3044
+ * - **metadata** (`object`, optional) - Information about created records, updated records, referenced but unchanged records, and records having any errors while being processed.
3045
+ * - **data** (`any`, optional) - The data that is expected to be returned.
3046
+ * - **metadata** (`{ [key: string]: any; }`, optional) - Information about created records, updated records, referenced but unchanged records, and records having any errors while being processed.
3047
+ * - **data** (`string[]`, optional) - The data that is expected to be returned.
3048
+ *
3049
+ * @see https://developer.quickbase.com/operation/upsert - Official Quickbase API documentation
3050
+ */
3051
+ upsert: (params: { body?: UpsertRequest }) => Promise<Upsert200Response | Upsert207Response>;
3052
+ /**
3053
+ * Delete record(s)
3054
+ *
3055
+ * @param {Object} params - Object containing the parameters for deleteRecords.
3056
+ * @param {DeleteRecordsRequest} [params.body] - No description provided. (Optional)
3057
+ * - **from** (`string`, required) - Type: string
3058
+ * - **where** (`string`, optional) - Type: string
3059
+ *
3060
+ * @returns {Promise<DeleteRecords200Response>} - Promise resolving to the deleteRecords response.
3061
+ * - **numberDeleted** (`number`, optional) - The number of records deleted.
3062
+ *
3063
+ * @see https://developer.quickbase.com/operation/deleteRecords - Official Quickbase API documentation
3064
+ */
3065
+ deleteRecords: (params: { body?: DeleteRecordsRequest }) => Promise<DeleteRecords200Response>;
3066
+ /**
3067
+ * Query for data
3068
+ *
3069
+ * @param {Object} params - Object containing the parameters for runQuery.
3070
+ * @param {RunQueryRequest} [params.body] - No description provided. (Optional)
3071
+ * - **from** (`string`, required) - The table identifier.
3072
+ * - **select** (`number[]`, optional) - An array of field ids...
3073
+ * - **where** (`string`, optional) - The filter, using the Quickbase query language...
3074
+ * - **sortBy** (`RunQueryRequestSortByInner[]`, optional) - An array of field IDs and sort directions...
3075
+ * - **groupBy** (`RunQueryRequestGroupByInner[]`, optional) - An array that contains the fields to group the records by.
3076
+ * - **options** (`RunQueryRequestOptions`, optional) - Type: RunQueryRequestOptions
3077
+ *
3078
+ * @returns {Promise<RunQuery200Response>} - Promise resolving to the runQuery response.
3079
+ * - **fields** (`any`, optional) - 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.
3080
+ * - **data** (`any`, optional) - An array of objects that either represents the record data or summarized values, depending on the report type.
3081
+ * - **metadata** (`object`, optional) - 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.
3082
+ *
3083
+ * @see https://developer.quickbase.com/operation/runQuery - Official Quickbase API documentation
3084
+ */
3085
+ runQuery: (params: { body?: RunQueryRequest }) => Promise<RunQuery200Response>;
3086
+ /**
3087
+ * Get a temporary token for a dbid
3088
+ *
3089
+ * @param {Object} params - Object containing the parameters for getTempTokenDBID.
3090
+ * @param {string} params.dbid - The unique identifier of an app or table.
3091
+ * @param {string} [params.qBAppToken] - Your Quickbase app token (Optional)
3092
+ *
3093
+ * @returns {Promise<GetTempTokenDBID200Response>} - Promise resolving to the getTempTokenDBID response.
3094
+ * - **temporaryAuthorization** (`string`, optional) - Temporary authorization token.
3095
+ *
3096
+ * @see https://developer.quickbase.com/operation/getTempTokenDBID - Official Quickbase API documentation
3097
+ */
3098
+ getTempTokenDBID: (params: { dbid: string; qBAppToken?: string }) => Promise<GetTempTokenDBID200Response>;
3099
+ /**
3100
+ * Exchange an SSO token
3101
+ *
3102
+ * @param {Object} params - Object containing the parameters for exchangeSsoToken.
3103
+ * @param {{ grant_type?: string; requested_token_type?: string; subject_token?: string; subject_token_type?: string }} [params.body] - No description provided. (Optional)
3104
+ *
3105
+ * @returns {Promise<ExchangeSsoToken200Response>} - Promise resolving to the exchangeSsoToken response.
3106
+ * - **access_token** (`string`, optional) - The security token issued by the authorization server in response to the token exchange request. The identifier `access_token` is used for historical reasons and the issued token need not be an OAuth access token.
3107
+ * - **issued_token_type** (`string`, optional) - An identifier for the representation of the issued security token.
3108
+ * - **token_type** (`string`, optional) - Will always return `N_A`
3109
+ *
3110
+ * @see https://developer.quickbase.com/operation/exchangeSsoToken - Official Quickbase API documentation
3111
+ */
3112
+ exchangeSsoToken: (params: { body?: { grant_type?: string; requested_token_type?: string; subject_token?: string; subject_token_type?: string } }) => Promise<ExchangeSsoToken200Response>;
3113
+ /**
3114
+ * Clone a user token
3115
+ *
3116
+ * @param {Object} params - Object containing the parameters for cloneUserToken.
3117
+ * @param {{ name?: string; description?: string }} [params.body] - No description provided. (Optional)
3118
+ *
3119
+ * @returns {Promise<CloneUserToken200Response>} - Promise resolving to the cloneUserToken response.
3120
+ * - **active** (`boolean`, optional) - Whether the user token is active.
3121
+ * - **apps** (`any`, optional) - The list of apps this user token is assigned to.
3122
+ * - **lastUsed** (`string`, optional) - The last date this user token was used, in the ISO 8601 time format YYYY-MM-DDThh:mm:ss.sssZ (in UTC time zone).
3123
+ * - **description** (`string`, optional) - User Token description.
3124
+ * - **id** (`number`, optional) - User Token id.
3125
+ * - **name** (`string`, optional) - User Token name.
3126
+ * - **token** (`string`, optional) - User Token value.
3127
+ *
3128
+ * @see https://developer.quickbase.com/operation/cloneUserToken - Official Quickbase API documentation
3129
+ */
3130
+ cloneUserToken: (params: { body?: { name?: string; description?: string } }) => Promise<CloneUserToken200Response>;
3131
+ /**
3132
+ * Transfer a user token
3133
+ *
3134
+ * @param {Object} params - Object containing the parameters for transferUserToken.
3135
+ * @param {{ id?: number; from?: string; to?: string }} [params.body] - No description provided. (Optional)
3136
+ *
3137
+ * @returns {Promise<TransferUserToken200Response>} - Promise resolving to the transferUserToken response.
3138
+ * - **active** (`boolean`, optional) - Whether the user token is active.
3139
+ * - **apps** (`any`, optional) - The list of apps this user token is assigned to.
3140
+ * - **lastUsed** (`string`, optional) - The last date this user token was used, in the ISO 8601 time format YYYY-MM-DDThh:mm:ss.sssZ (in UTC time zone).
3141
+ * - **description** (`string`, optional) - User Token description.
3142
+ * - **id** (`number`, optional) - User Token id.
3143
+ * - **name** (`string`, optional) - User Token name.
3144
+ *
3145
+ * @see https://developer.quickbase.com/operation/transferUserToken - Official Quickbase API documentation
3146
+ */
3147
+ transferUserToken: (params: { body?: { id?: number; from?: string; to?: string } }) => Promise<TransferUserToken200Response>;
3148
+ /**
3149
+ * Deactivate a user token
3150
+ *
3151
+ * No parameters.
3152
+ *
3153
+ * @returns {Promise<DeactivateUserToken200Response>} - Promise resolving to the deactivateUserToken response.
3154
+ * - **id** (`number`, optional) - The user token id.
3155
+ *
3156
+ * @see https://developer.quickbase.com/operation/deactivateUserToken - Official Quickbase API documentation
3157
+ */
3158
+ deactivateUserToken: (params: { }) => Promise<DeactivateUserToken200Response>;
3159
+ /**
3160
+ * Delete a user token
3161
+ *
3162
+ * No parameters.
3163
+ *
3164
+ * @returns {Promise<DeleteUserToken200Response>} - Promise resolving to the deleteUserToken response.
3165
+ * - **id** (`number`, optional) - The user token id.
3166
+ *
3167
+ * @see https://developer.quickbase.com/operation/deleteUserToken - Official Quickbase API documentation
3168
+ */
3169
+ deleteUserToken: (params: { }) => Promise<DeleteUserToken200Response>;
3170
+ /**
3171
+ * Download file
3172
+ *
3173
+ * @param {Object} params - Object containing the parameters for downloadFile.
3174
+ * @param {string} params.tableId - The unique identifier of the table.
3175
+ * @param {number} params.recordId - The unique identifier of the record.
3176
+ * @param {number} params.fieldId - The unique identifier of the field.
3177
+ * @param {number} params.versionNumber - The file attachment version number.
3178
+ *
3179
+ * @returns {Promise<DownloadFile200Response>} - Promise resolving to the downloadFile response.
3180
+ * - **data** (`string`, optional) - Type: string
3181
+ *
3182
+ * @see https://developer.quickbase.com/operation/downloadFile - Official Quickbase API documentation
3183
+ */
3184
+ downloadFile: (params: { tableId: string; recordId: number; fieldId: number; versionNumber: number }) => Promise<DownloadFile200Response>;
3185
+ /**
3186
+ * Delete file
3187
+ *
3188
+ * @param {Object} params - Object containing the parameters for deleteFile.
3189
+ * @param {string} params.tableId - The unique identifier of the table.
3190
+ * @param {number} params.recordId - The unique identifier of the record.
3191
+ * @param {number} params.fieldId - The unique identifier of the field.
3192
+ * @param {number} params.versionNumber - The file attachment version number.
3193
+ *
3194
+ * @returns {Promise<DeleteFile200Response>} - Promise resolving to the deleteFile response.
3195
+ * - **versionNumber** (`number`, optional) - The number of deleted version.
3196
+ * - **fileName** (`string`, optional) - The name of file associated with deleted version.
3197
+ * - **uploaded** (`string`, optional) - The timestamp when the version was originally uploaded.
3198
+ * - **creator** (`object`, optional) - The user that uploaded version.
3199
+ *
3200
+ * @see https://developer.quickbase.com/operation/deleteFile - Official Quickbase API documentation
3201
+ */
3202
+ deleteFile: (params: { tableId: string; recordId: number; fieldId: number; versionNumber: number }) => Promise<DeleteFile200Response>;
3203
+ /**
3204
+ * Get users
3205
+ *
3206
+ * @param {Object} params - Object containing the parameters for getUsers.
3207
+ * @param {number} [params.accountId] - The account id being used to get users. If no value is specified, the first account associated with the requesting user token is chosen. (Optional)
3208
+ * @param {GetUsersRequest} [params.body] - No description provided. (Optional)
3209
+ * - **userIds** (`string[]`, required) - Type: string[]
3210
+ *
3211
+ * @returns {Promise<GetUsers200Response>} - Promise resolving to the getUsers response.
3212
+ * - **users** (`any`, required) - A list of users found in an account with the given criterias
3213
+ * - **metadata** (`object`, required) - Additional request information
3214
+ *
3215
+ * @see https://developer.quickbase.com/operation/getUsers - Official Quickbase API documentation
3216
+ */
3217
+ getUsers: (params: { accountId?: number; body?: GetUsersRequest }) => Promise<GetUsers200Response>;
3218
+ /**
3219
+ * Deny users
3220
+ *
3221
+ * @param {Object} params - Object containing the parameters for denyUsers.
3222
+ * @param {number} [params.accountId] - The account id being used to deny users. If no value is specified, the first account associated with the requesting user token is chosen. (Optional)
3223
+ * @param {DenyUsersRequest} [params.body] - No description provided. (Optional)
3224
+ * - **userIds** (`string[]`, required) - Type: string[]
3225
+ *
3226
+ * @returns {Promise<DenyUsers200Response>} - Promise resolving to the denyUsers response.
3227
+ * - **failure** (`any`, required) - A list of users that couldn't be denied. This also includes the ID's of users that are not valid.
3228
+ * - **success** (`any`, required) - A list of users that have successfully been denied.
3229
+ *
3230
+ * @see https://developer.quickbase.com/operation/denyUsers - Official Quickbase API documentation
3231
+ */
3232
+ denyUsers: (params: { accountId?: number; body?: DenyUsersRequest }) => Promise<DenyUsers200Response>;
3233
+ /**
3234
+ * Deny and remove users from groups
3235
+ *
3236
+ * @param {Object} params - Object containing the parameters for denyUsersAndGroups.
3237
+ * @param {number} [params.accountId] - The account id being used to deny users. If no value is specified, the first account associated with the requesting user token is chosen. (Optional)
3238
+ * @param {boolean} params.shouldDeleteFromGroups - Specifies if the users should also be removed from all groups.
3239
+ * @param {DenyUsersAndGroupsRequest} [params.body] - No description provided. (Optional)
3240
+ * - **userIds** (`string[]`, required) - Type: string[]
3241
+ *
3242
+ * @returns {Promise<DenyUsersAndGroups200Response>} - Promise resolving to the denyUsersAndGroups response.
3243
+ * - **failure** (`any`, required) - A list of users that couldn't be denied. This also includes the ID's of users that are not valid.
3244
+ * - **success** (`any`, required) - A list of users that have successfully been denied.
3245
+ *
3246
+ * @see https://developer.quickbase.com/operation/denyUsersAndGroups - Official Quickbase API documentation
3247
+ */
3248
+ denyUsersAndGroups: (params: { accountId?: number; shouldDeleteFromGroups: boolean; body?: DenyUsersAndGroupsRequest }) => Promise<DenyUsersAndGroups200Response>;
3249
+ /**
3250
+ * Undeny users
3251
+ *
3252
+ * @param {Object} params - Object containing the parameters for undenyUsers.
3253
+ * @param {number} [params.accountId] - The account id being used to undeny users. If no value is specified, the first account associated with the requesting user token is chosen. (Optional)
3254
+ * @param {UndenyUsersRequest} [params.body] - No description provided. (Optional)
3255
+ * - **userIds** (`string[]`, required) - Type: string[]
3256
+ *
3257
+ * @returns {Promise<UndenyUsers200Response>} - Promise resolving to the undenyUsers response.
3258
+ * - **failure** (`any`, required) - A list of users that couldn't be undenied. This also includes the ID's of users that are not valid.
3259
+ * - **success** (`any`, required) - A list of users that have successfully been undenied.
3260
+ *
3261
+ * @see https://developer.quickbase.com/operation/undenyUsers - Official Quickbase API documentation
3262
+ */
3263
+ undenyUsers: (params: { accountId?: number; body?: UndenyUsersRequest }) => Promise<UndenyUsers200Response>;
3264
+ /**
3265
+ * Add members
3266
+ *
3267
+ * @param {Object} params - Object containing the parameters for addMembersToGroup.
3268
+ * @param {number} params.gid - This is the ID of the group being modified.
3269
+ * @param {AddMembersToGroupRequest} [params.body] - No description provided. (Optional)
3270
+ * - **userIds** (`string[]`, required) - Type: string[]
3271
+ *
3272
+ * @returns {Promise<AddMembersToGroup200Response>} - Promise resolving to the addMembersToGroup response.
3273
+ * - **failure** (`any`, required) - A list of users that couldn’t be added to the group. This includes a list of IDs that represent invalid users and users who have already been added to the group.
3274
+ * - **success** (`any`, required) - A list of users that have been added to the group successfully.
3275
+ *
3276
+ * @see https://developer.quickbase.com/operation/addMembersToGroup - Official Quickbase API documentation
3277
+ */
3278
+ addMembersToGroup: (params: { gid: number; body?: AddMembersToGroupRequest }) => Promise<AddMembersToGroup200Response>;
3279
+ /**
3280
+ * Remove members
3281
+ *
3282
+ * @param {Object} params - Object containing the parameters for removeMembersFromGroup.
3283
+ * @param {number} params.gid - This is the ID of the group being modified.
3284
+ * @param {RemoveMembersFromGroupRequest} [params.body] - No description provided. (Optional)
3285
+ * - **userIds** (`string[]`, required) - Type: string[]
3286
+ *
3287
+ * @returns {Promise<RemoveMembersFromGroup200Response>} - Promise resolving to the removeMembersFromGroup response.
3288
+ * - **failure** (`any`, required) - A list of users that couldn’t be removed from the group. This includes a list of IDs that represent invalid users.
3289
+ * - **success** (`any`, required) - A list of users that have been removed from the group successfully.
3290
+ *
3291
+ * @see https://developer.quickbase.com/operation/removeMembersFromGroup - Official Quickbase API documentation
3292
+ */
3293
+ removeMembersFromGroup: (params: { gid: number; body?: RemoveMembersFromGroupRequest }) => Promise<RemoveMembersFromGroup200Response>;
3294
+ /**
3295
+ * Add managers
3296
+ *
3297
+ * @param {Object} params - Object containing the parameters for addManagersToGroup.
3298
+ * @param {number} params.gid - This is the ID of the group being modified.
3299
+ * @param {AddManagersToGroupRequest} [params.body] - No description provided. (Optional)
3300
+ * - **userIds** (`string[]`, required) - Type: string[]
3301
+ *
3302
+ * @returns {Promise<AddManagersToGroup200Response>} - Promise resolving to the addManagersToGroup response.
3303
+ * - **failure** (`any`, required) - A list of users that couldn’t be added to the group. This includes a list of IDs that represent invalid users and users who have already been added to the group.
3304
+ * - **success** (`any`, required) - A list of users that have been added to the group successfully.
3305
+ *
3306
+ * @see https://developer.quickbase.com/operation/addManagersToGroup - Official Quickbase API documentation
3307
+ */
3308
+ addManagersToGroup: (params: { gid: number; body?: AddManagersToGroupRequest }) => Promise<AddManagersToGroup200Response>;
3309
+ /**
3310
+ * Remove managers
3311
+ *
3312
+ * @param {Object} params - Object containing the parameters for removeManagersFromGroup.
3313
+ * @param {number} params.gid - This is the ID of the group being modified.
3314
+ * @param {RemoveManagersFromGroupRequest} [params.body] - No description provided. (Optional)
3315
+ * - **userIds** (`string[]`, required) - Type: string[]
3316
+ *
3317
+ * @returns {Promise<RemoveManagersFromGroup200Response>} - Promise resolving to the removeManagersFromGroup response.
3318
+ * - **failure** (`any`, required) - A list of users that couldn’t be removed from the group. This includes a list of IDs that represent invalid users.
3319
+ * - **success** (`any`, required) - A list of users that have been removed from the group successfully.
3320
+ *
3321
+ * @see https://developer.quickbase.com/operation/removeManagersFromGroup - Official Quickbase API documentation
3322
+ */
3323
+ removeManagersFromGroup: (params: { gid: number; body?: RemoveManagersFromGroupRequest }) => Promise<RemoveManagersFromGroup200Response>;
3324
+ /**
3325
+ * Add child groups
3326
+ *
3327
+ * @param {Object} params - Object containing the parameters for addSubgroupsToGroup.
3328
+ * @param {number} params.gid - This is the ID of the group being modified.
3329
+ * @param {AddSubgroupsToGroupRequest} [params.body] - No description provided. (Optional)
3330
+ * - **userIds** (`string[]`, required) - Type: string[]
3331
+ *
3332
+ * @returns {Promise<AddSubgroupsToGroup200Response>} - Promise resolving to the addSubgroupsToGroup response.
3333
+ * - **failure** (`any`, required) - A list of child groups that couldn’t be added to the group. This includes a list of IDs that represent invalid groups and groups that have already been added to the group.
3334
+ * - **success** (`any`, required) - A list of child groups that have been added to the group successfully.
3335
+ *
3336
+ * @see https://developer.quickbase.com/operation/addSubgroupsToGroup - Official Quickbase API documentation
3337
+ */
3338
+ addSubgroupsToGroup: (params: { gid: number; body?: AddSubgroupsToGroupRequest }) => Promise<AddSubgroupsToGroup200Response>;
3339
+ /**
3340
+ * Remove child groups
3341
+ *
3342
+ * @param {Object} params - Object containing the parameters for removeSubgroupsFromGroup.
3343
+ * @param {number} params.gid - This is the ID of the group being modified.
3344
+ * @param {RemoveSubgroupsFromGroupRequest} [params.body] - No description provided. (Optional)
3345
+ * - **userIds** (`string[]`, required) - Type: string[]
3346
+ *
3347
+ * @returns {Promise<RemoveSubgroupsFromGroup200Response>} - Promise resolving to the removeSubgroupsFromGroup response.
3348
+ * - **failure** (`any`, required) - A list of child groups that couldn’t be removed from the group. This includes a list of IDs that represent invalid groups.
3349
+ * - **success** (`any`, required) - A list of child groups that have been removed from the group successfully.
3350
+ *
3351
+ * @see https://developer.quickbase.com/operation/removeSubgroupsFromGroup - Official Quickbase API documentation
3352
+ */
3353
+ removeSubgroupsFromGroup: (params: { gid: number; body?: RemoveSubgroupsFromGroupRequest }) => Promise<RemoveSubgroupsFromGroup200Response>;
3354
+ /**
3355
+ * Get audit logs
3356
+ *
3357
+ * @param {Object} params - Object containing the parameters for audit.
3358
+ * @param {{ nextToken?: string; numRows?: number; queryId?: string; date?: string; topics?: string[] }} [params.body] - No description provided. (Optional)
3359
+ *
3360
+ * @returns {Promise<Audit200Response>} - Promise resolving to the audit response.
3361
+ * - **queryId** (`string`, required) - Query id of the requested audit log.
3362
+ * - **events** (`any`, optional) - All events of the audit log.
3363
+ * - **nextToken** (`string`, optional) - Token to fetch the next 1000 logs.
3364
+ *
3365
+ * @see https://developer.quickbase.com/operation/audit - Official Quickbase API documentation
3366
+ */
3367
+ audit: (params: { body?: { nextToken?: string; numRows?: number; queryId?: string; date?: string; topics?: string[] } }) => Promise<Audit200Response>;
3368
+ /**
3369
+ * Get read summaries
3370
+ *
3371
+ * @param {Object} params - Object containing the parameters for platformAnalyticReads.
3372
+ * @param {string} [params.day] - The date for which read summaries need to be fetched. This must be date-time only, as YYYY-MM-DD, and a valid date in the past. (Optional)
3373
+ *
3374
+ * @returns {Promise<PlatformAnalyticReads200Response>} - Promise resolving to the platformAnalyticReads response.
3375
+ * - **date** (`string`, required) - The date of the requested summary.
3376
+ * - **reads** (`object`, required) - Total reads for the specified date.
3377
+ *
3378
+ * @see https://developer.quickbase.com/operation/platformAnalyticReads - Official Quickbase API documentation
3379
+ */
3380
+ platformAnalyticReads: (params: { day?: string }) => Promise<PlatformAnalyticReads200Response>;
3381
+ /**
3382
+ * Get event summaries
3383
+ *
3384
+ * @param {Object} params - Object containing the parameters for platformAnalyticEventSummaries.
3385
+ * @param {number} [params.accountId] - The ID of the account to query. If no value is specified, the first account matching the provided domain is chosen. (Optional)
3386
+ * @param {{ start?: string; end?: string; groupBy?: string; nextToken?: string; where?: { id?: string; type?: string }[] }} [params.body] - No description provided. (Optional)
3387
+ *
3388
+ * @returns {Promise<PlatformAnalyticEventSummaries200Response>} - Promise resolving to the platformAnalyticEventSummaries response.
3389
+ * - **accountId** (`string`, required) - The ID of the account the events are associated with.
3390
+ * - **start** (`string`, required) - The start date and time of the requested summaries in ISO 8601 time format.
3391
+ * - **end** (`string`, required) - The end date and time of the requested summaries in ISO 8601 time format.
3392
+ * - **groupBy** (`string`, required) - How the events should be grouped.
3393
+ * - **where** (`any`, required) - Type: any
3394
+ * - **results** (`any`, required) - An array of objects that contains Application/User information and an events object with summaries by event type.
3395
+ * - **metadata** (`object`, optional) - Additional information about the results that may be helpful.
3396
+ * - **totals** (`object`, optional) - Totals by billing category for all queried events.
3397
+ *
3398
+ * @see https://developer.quickbase.com/operation/platformAnalyticEventSummaries - Official Quickbase API documentation
3399
+ */
3400
+ platformAnalyticEventSummaries: (params: { accountId?: number; body?: { start?: string; end?: string; groupBy?: string; nextToken?: string; where?: { id?: string; type?: string }[] } }) => Promise<PlatformAnalyticEventSummaries200Response>;
3401
+ /**
3402
+ * Export a solution
3403
+ *
3404
+ * @param {Object} params - Object containing the parameters for exportSolution.
3405
+ * @param {string} params.solutionId - The unique identifier of a solution
3406
+ * @param {string} [params.qBLVersion] - The QBL version to be used for the export. If not specified the default would be used. (Optional)
3407
+ *
3408
+ * @returns {Promise<ExportSolution200Response>} - Promise resolving to the exportSolution response.
3409
+ * - **content** (`string`, optional) - Type: string
3410
+ *
3411
+ * @see https://developer.quickbase.com/operation/exportSolution - Official Quickbase API documentation
3412
+ */
3413
+ exportSolution: (params: { solutionId: string; qBLVersion?: string }) => Promise<ExportSolution200Response>;
3414
+ /**
3415
+ * Update a solution
3416
+ *
3417
+ * @param {Object} params - Object containing the parameters for updateSolution.
3418
+ * @param {string} params.solutionId - The unique identifier of a solution
3419
+ * @param {any} [params.body] - The QBL to be used for the update. (Optional)
3420
+ * @param {boolean} [params.xQBLErrorsAsSuccess] - If this header is set to true, the API will return a 207 status code even if there are errors. The errors will be returned in the response body. (Optional)
3421
+ *
3422
+ * @returns {Promise<UpdateSolution200Response>} - Promise resolving to the updateSolution response.
3423
+ * - **solutionId** (`string`, optional) - Type: string
3424
+ * - **alias** (`object`, optional) - Type: object
3425
+ * - **createdResources** (`any`, optional) - Type: any
3426
+ * - **warnings** (`any`, optional) - Type: any
3427
+ *
3428
+ * @see https://developer.quickbase.com/operation/updateSolution - Official Quickbase API documentation
3429
+ */
3430
+ updateSolution: (params: { solutionId: string; body?: any; xQBLErrorsAsSuccess?: boolean }) => Promise<UpdateSolution200Response>;
3431
+ /**
3432
+ * Create a solution
3433
+ *
3434
+ * @param {Object} params - Object containing the parameters for createSolution.
3435
+ * @param {any} [params.body] - The QBL to be used for the create. (Optional)
3436
+ * @param {boolean} [params.xQBLErrorsAsSuccess] - If this header is set to true, the API will return a 207 status code even if there are errors. The errors will be returned in the response body. (Optional)
3437
+ *
3438
+ * @returns {Promise<CreateSolution200Response>} - Promise resolving to the createSolution response.
3439
+ * - **solutionId** (`string`, optional) - Type: string
3440
+ * - **alias** (`object`, optional) - Type: object
3441
+ * - **createdResources** (`any`, optional) - Type: any
3442
+ * - **warnings** (`any`, optional) - Type: any
3443
+ *
3444
+ * @see https://developer.quickbase.com/operation/createSolution - Official Quickbase API documentation
3445
+ */
3446
+ createSolution: (params: { body?: any; xQBLErrorsAsSuccess?: boolean }) => Promise<CreateSolution200Response>;
3447
+ /**
3448
+ * Export solution to record
3449
+ *
3450
+ * @param {Object} params - Object containing the parameters for exportSolutionToRecord.
3451
+ * @param {string} params.solutionId - The unique identifier of the solution.
3452
+ * @param {string} params.tableId - The unique identifier (dbid) of the table.
3453
+ * @param {number} params.fieldId - The unique identifier (fid) of the field. It needs to be a file attachment field.
3454
+ * @param {boolean} [params.xQBLErrorsAsSuccess] - If this header is set to true, the API will return a 207 status code even if there are errors. The errors will be returned in the response body. (Optional)
3455
+ * @param {string} [params.qBLVersion] - The QBL version to be used for the export. If not specified the default would be used. (Optional)
3456
+ *
3457
+ * @returns {Promise<ExportSolutionToRecord200Response>} - Promise resolving to the exportSolutionToRecord response.
3458
+ * - **record_id** (`number`, optional) - Type: number
3459
+ * - **filename** (`string`, optional) - Type: string
3460
+ *
3461
+ * @see https://developer.quickbase.com/operation/exportSolutionToRecord - Official Quickbase API documentation
3462
+ */
3463
+ exportSolutionToRecord: (params: { solutionId: string; tableId: string; fieldId: number; xQBLErrorsAsSuccess?: boolean; qBLVersion?: string }) => Promise<ExportSolutionToRecord200Response>;
3464
+ /**
3465
+ * Create solution from record
3466
+ *
3467
+ * @param {Object} params - Object containing the parameters for createSolutionFromRecord.
3468
+ * @param {string} params.tableId - The unique identifier (dbid) of the table.
3469
+ * @param {number} params.fieldId - The unique identifier (fid) of the field. It needs to be a file attachment field.
3470
+ * @param {number} params.recordId - The unique identifier of the record.
3471
+ * @param {boolean} [params.xQBLErrorsAsSuccess] - If this header is set to true, the API will return a 207 status code even if there are errors. The errors will be returned in the response body. (Optional)
3472
+ *
3473
+ * @returns {Promise<CreateSolutionFromRecord200Response>} - Promise resolving to the createSolutionFromRecord response.
3474
+ * - **solutionId** (`string`, optional) - Type: string
3475
+ * - **alias** (`object`, optional) - Type: object
3476
+ * - **createdResources** (`any`, optional) - Type: any
3477
+ * - **warnings** (`any`, optional) - Type: any
3478
+ *
3479
+ * @see https://developer.quickbase.com/operation/createSolutionFromRecord - Official Quickbase API documentation
3480
+ */
3481
+ createSolutionFromRecord: (params: { tableId: string; fieldId: number; recordId: number; xQBLErrorsAsSuccess?: boolean }) => Promise<CreateSolutionFromRecord200Response>;
3482
+ /**
3483
+ * Update solution from record
3484
+ *
3485
+ * @param {Object} params - Object containing the parameters for updateSolutionToRecord.
3486
+ * @param {string} params.solutionId - The unique identifier of the solution.
3487
+ * @param {string} params.tableId - The unique identifier (dbid) of the table.
3488
+ * @param {number} params.fieldId - The unique identifier (fid) of the field. It needs to be a file attachment field.
3489
+ * @param {number} params.recordId - The unique identifier of the record.
3490
+ * @param {boolean} [params.xQBLErrorsAsSuccess] - If this header is set to true, the API will return a 207 status code even if there are errors. The errors will be returned in the response body. (Optional)
3491
+ *
3492
+ * @returns {Promise<UpdateSolutionToRecord200Response>} - Promise resolving to the updateSolutionToRecord response.
3493
+ * - **solutionId** (`string`, optional) - Type: string
3494
+ * - **alias** (`object`, optional) - Type: object
3495
+ * - **resources** (`any`, optional) - Type: any
3496
+ * - **warnings** (`any`, optional) - Type: any
3497
+ *
3498
+ * @see https://developer.quickbase.com/operation/updateSolutionToRecord - Official Quickbase API documentation
3499
+ */
3500
+ updateSolutionToRecord: (params: { solutionId: string; tableId: string; fieldId: number; recordId: number; xQBLErrorsAsSuccess?: boolean }) => Promise<UpdateSolutionToRecord200Response>;
3501
+ /**
3502
+ * List solution changes
3503
+ *
3504
+ * @param {Object} params - Object containing the parameters for changesetSolution.
3505
+ * @param {string} params.solutionId - The unique identifier of the solution.
3506
+ * @param {any} [params.body] - The QBL to be used for the changeset. (Optional)
3507
+ * @param {boolean} [params.xQBLErrorsAsSuccess] - If this header is set to true, the API will return a 207 status code even if there are errors. The errors will be returned in the response body. (Optional)
3508
+ *
3509
+ * @returns {Promise<ChangesetSolution200Response>} - Promise resolving to the changesetSolution response.
3510
+ * - **id** (`string`, optional) - Type: string
3511
+ * - **changes** (`any`, optional) - Type: any
3512
+ *
3513
+ * @see https://developer.quickbase.com/operation/changesetSolution - Official Quickbase API documentation
3514
+ */
3515
+ changesetSolution: (params: { solutionId: string; body?: any; xQBLErrorsAsSuccess?: boolean }) => Promise<ChangesetSolution200Response>;
3516
+ /**
3517
+ * List solution changes from record
3518
+ *
3519
+ * @param {Object} params - Object containing the parameters for changesetSolutionFromRecord.
3520
+ * @param {string} params.solutionId - The unique identifier of the solution.
3521
+ * @param {string} params.tableId - The unique identifier (dbid) of the table.
3522
+ * @param {number} params.fieldId - The unique identifier (fid) of the field. It needs to be a file attachment field.
3523
+ * @param {number} params.recordId - The unique identifier of the record.
3524
+ * @param {boolean} [params.xQBLErrorsAsSuccess] - If this header is set to true, the API will return a 207 status code even if there are errors. The errors will be returned in the response body. (Optional)
3525
+ *
3526
+ * @returns {Promise<ChangesetSolutionFromRecord200Response>} - Promise resolving to the changesetSolutionFromRecord response.
3527
+ * - **id** (`string`, optional) - Type: string
3528
+ * - **changes** (`any`, optional) - Type: any
3529
+ *
3530
+ * @see https://developer.quickbase.com/operation/changesetSolutionFromRecord - Official Quickbase API documentation
3531
+ */
3532
+ changesetSolutionFromRecord: (params: { solutionId: string; tableId: string; fieldId: number; recordId: number; xQBLErrorsAsSuccess?: boolean }) => Promise<ChangesetSolutionFromRecord200Response>;
3533
+ /**
3534
+ * Generate a document
3535
+ *
3536
+ * @param {Object} params - Object containing the parameters for generateDocument.
3537
+ * @param {number} params.templateId - This is the ID of document template.
3538
+ * @param {string} params.tableId - The unique identifier of the table.
3539
+ * @param {number} [params.recordId] - The ID of the record (Optional)
3540
+ * @param {string} params.filename - File name for the downloaded file
3541
+ * @param {string} [params.accept] - The content-type of the response. application/json will return a JSON payload with a base64 encoded file. application/octet-stream will download the file directly. (Optional)
3542
+ * @param {string} [params.format] - The format of the file that is returned. Default is "pdf". (Optional)
3543
+ * @param {string} [params.margin] - Margin formatted as top right bottom left, separated by spaces. Add to override the value set in the template builder. (Optional)
3544
+ * @param {string} [params.unit] - Unit of measurement for the margin. Default is "in". Add to override the value set in the template builder. (Optional)
3545
+ * @param {string} [params.pageSize] - Page size. Default is "A4". Add to override the value set in the template builder. (Optional)
3546
+ * @param {string} [params.orientation] - Page orientation. Default is "portrait". Add to override the value set in the template builder. (Optional)
3547
+ * @param {string} [params.realm] - Your Quickbase domain, for example demo.quickbase.com (Optional)
3548
+ *
3549
+ * @returns {Promise<GenerateDocument200Response>} - Promise resolving to the generateDocument response.
3550
+ * - **fileName** (`string`, optional) - The file name.
3551
+ * - **data** (`string`, optional) - Base64 encoded file content.
3552
+ * - **contentType** (`string`, optional) - The document content type.
3553
+ *
3554
+ * @see https://developer.quickbase.com/operation/generateDocument - Official Quickbase API documentation
3555
+ */
3556
+ generateDocument: (params: { templateId: number; tableId: string; recordId?: number; filename: string; accept?: string; format?: string; margin?: string; unit?: string; pageSize?: string; orientation?: string; realm?: string }) => Promise<GenerateDocument200Response>;
3557
+ }
3558
+ - name: >-
3559
+ missing-types-report.json
3560
+ type: >-
3561
+ file
3562
+ - name: >-
3563
+ index.ts
3564
+ type: >-
3565
+ file
3566
+ - name: >-
3567
+ invokeMethod.ts
3568
+ type: >-
3569
+ file
3570
+ contents: >
3571
+ //
3572
+ src/invokeMethod.ts
3573
+
3574
+
3575
+ import
3576
+ {
3577
+ AuthorizationStrategy,
3578
+ extractDbid
3579
+ }
3580
+ from
3581
+ "./authorizationStrategy";
3582
+
3583
+ import
3584
+ {
3585
+ RateLimiter
3586
+ }
3587
+ from
3588
+ "./rateLimiter";
3589
+
3590
+ import
3591
+ {
3592
+ RateLimitError
3593
+ }
3594
+ from
3595
+ "./RateLimitError";
3596
+
3597
+ import
3598
+ {
3599
+ ResponseError
3600
+ }
3601
+ from
3602
+ "./generated/runtime";
3603
+
3604
+ import
3605
+ {
3606
+ QuickbaseClient
3607
+ }
3608
+ from
3609
+ "./quickbaseClient";
3610
+
3611
+
3612
+ export
3613
+ type
3614
+ ApiMethod<K
3615
+ extends
3616
+ keyof
3617
+ QuickbaseClient>
3618
+ =
3619
+ (
3620
+ requestParameters: Parameters<QuickbaseClient[K]>[0],
3621
+ initOverrides?: RequestInit
3622
+ )
3623
+ =>
3624
+ Promise<ReturnType<QuickbaseClient[K]>>;
3625
+
3626
+
3627
+ export
3628
+ interface
3629
+ MethodInfo<K
3630
+ extends
3631
+ keyof
3632
+ QuickbaseClient>
3633
+ {
3634
+ api: any;
3635
+ method: ApiMethod<K>;
3636
+ paramMap: string[];
3637
+ httpMethod: string;
3638
+ }
3639
+
3640
+
3641
+ export
3642
+ async
3643
+ function
3644
+ invokeMethod<K
3645
+ extends
3646
+ keyof
3647
+ QuickbaseClient>(
3648
+ methodName: K,
3649
+ params: Parameters<QuickbaseClient[K]>[0] & {
3650
+ dbid?: string;
3651
+ tableId?: string;
3652
+ appId?: string;
3653
+ },
3654
+ methodMap: { [P in keyof QuickbaseClient]: MethodInfo<P> },
3655
+ baseHeaders: Record<string, string>,
3656
+ authStrategy: AuthorizationStrategy,
3657
+ rateLimiter: RateLimiter,
3658
+ transformDates: (obj: any, convertStringsToDates: boolean) => any,
3659
+ debug: boolean | undefined,
3660
+ convertDates: boolean
3661
+ ):
3662
+ Promise<ReturnType<QuickbaseClient[K]>>
3663
+ {
3664
+ console.log("[invokeMethod] Starting for method:", methodName);
3665
+
3666
+ const methodInfo = methodMap[methodName];
3667
+ if (!methodInfo) throw new Error(`Method ${methodName} not found`);
3668
+
3669
+ const hasBody = "body" in params && params.body !== undefined;
3670
+ const body = hasBody ? params.body : undefined;
3671
+ const restParams: any = hasBody
3672
+ ? Object.fromEntries(
3673
+ Object.entries(params).filter(([key]) => key !== "body")
3674
+ )
3675
+ : { ...params };
3676
+ const requestParameters: any = {
3677
+ ...restParams,
3678
+ ...(hasBody ? { generated: body } : {}),
3679
+ };
3680
+
3681
+ const requestOptions: RequestInit = {
3682
+ credentials: methodName === "getTempTokenDBID" ? "include" : "omit",
3683
+ method: methodInfo.httpMethod,
3684
+ };
3685
+
3686
+ let dbid: string | undefined = extractDbid(params);
3687
+ console.log("[invokeMethod] Extracted dbid:", dbid);
3688
+
3689
+ let token = dbid
3690
+ ? await authStrategy.getToken(dbid)
3691
+ : await authStrategy.getToken("");
3692
+ console.log("[invokeMethod] Initial token:", token);
3693
+
3694
+ if (token) {
3695
+ authStrategy.applyHeaders(baseHeaders, token);
3696
+ requestOptions.headers = { ...baseHeaders };
3697
+ console.log(
3698
+ "[invokeMethod] Token found, headers set:",
3699
+ requestOptions.headers
3700
+ );
3701
+ if (methodName === "getTempTokenDBID") {
3702
+ console.log("[invokeMethod] Using cached token:", token);
3703
+ return { temporaryAuthorization: token } as ReturnType<
3704
+ QuickbaseClient[K]
3705
+ >;
3706
+ }
3707
+ }
3708
+
3709
+ if (debug) {
3710
+ console.log(`[${methodName}] requestParameters:`, requestParameters);
3711
+ console.log(`[${methodName}] requestOptions:`, requestOptions);
3712
+ }
3713
+
3714
+ async function processResponse(
3715
+ rawResponse: any
3716
+ ): Promise<ReturnType<QuickbaseClient[K]>> {
3717
+ if (debug) console.log(`[${methodName}] rawResponse:`, rawResponse);
3718
+ if (rawResponse instanceof Response) {
3719
+ const contentType = rawResponse.headers
3720
+ .get("Content-Type")
3721
+ ?.toLowerCase();
3722
+ if (debug) console.log(`[${methodName}] contentType:`, contentType);
3723
+ if (contentType?.includes("application/json")) {
3724
+ const jsonResponse = await rawResponse.json();
3725
+ return transformDates(jsonResponse, convertDates) as ReturnType<
3726
+ QuickbaseClient[K]
3727
+ >;
3728
+ }
3729
+ return rawResponse as ReturnType<QuickbaseClient[K]>;
3730
+ }
3731
+ if (rawResponse && typeof rawResponse.value === "function") {
3732
+ const response = await rawResponse.value();
3733
+ if (debug)
3734
+ console.log(`[${methodName}] Resolved JSONApiResponse:`, response);
3735
+ return transformDates(response, convertDates) as ReturnType<
3736
+ QuickbaseClient[K]
3737
+ >;
3738
+ }
3739
+ return transformDates(rawResponse, convertDates) as ReturnType<
3740
+ QuickbaseClient[K]
3741
+ >;
3742
+ }
3743
+
3744
+ async function parseErrorResponse(
3745
+ response: Response
3746
+ ): Promise<{ message: string; status: number }> {
3747
+ let message = "Unknown error";
3748
+ let status = response.status || 500;
3749
+ try {
3750
+ const contentType =
3751
+ response.headers?.get("Content-Type")?.toLowerCase() ||
3752
+ "application/json";
3753
+ if (
3754
+ contentType.includes("application/json") &&
3755
+ typeof response.json === "function"
3756
+ ) {
3757
+ const errorBody = await response.json();
3758
+ if (
3759
+ errorBody &&
3760
+ typeof errorBody === "object" &&
3761
+ "message" in errorBody
3762
+ ) {
3763
+ message = errorBody.message;
3764
+ } else {
3765
+ message = "Invalid error response format";
3766
+ }
3767
+ } else if (typeof response.text === "function") {
3768
+ message = (await response.text()) || message;
3769
+ }
3770
+ } catch (e) {
3771
+ if (debug) console.log(`[${methodName}] Error parsing response body:`, e);
3772
+ message = "Failed to parse error response";
3773
+ }
3774
+ if (debug)
3775
+ console.log(
3776
+ "[invokeMethod] Parsed error - status:",
3777
+ status,
3778
+ "message:",
3779
+ message
3780
+ );
3781
+ return { message, status };
3782
+ }
3783
+
3784
+ let attempt = 0;
3785
+ const maxAttempts = rateLimiter.maxRetries + 1;
3786
+
3787
+ while (attempt < maxAttempts) {
3788
+ console.log("[invokeMethod] Attempt:", attempt + 1, "of", maxAttempts);
3789
+ try {
3790
+ await rateLimiter.throttle();
3791
+ console.log("[invokeMethod] About to call API for method:", methodName);
3792
+ const response = await methodInfo.method(
3793
+ requestParameters,
3794
+ requestOptions
3795
+ );
3796
+ console.log("[invokeMethod] API call completed for method:", methodName);
3797
+ return await processResponse(response);
3798
+ } catch (error: unknown) {
3799
+ if (debug) console.log("[invokeMethod] Caught error:", error);
3800
+
3801
+ let status: number;
3802
+ let message: string;
3803
+ let response: Response | undefined;
3804
+
3805
+ if (error instanceof ResponseError && error.response) {
3806
+ response = error.response;
3807
+ ({ message, status } = await parseErrorResponse(response));
3808
+ } else if (error instanceof Response) {
3809
+ response = error;
3810
+ ({ message, status } = await parseErrorResponse(response));
3811
+ } else {
3812
+ if (debug) console.log(`[${methodName}] Unexpected error:`, error);
3813
+ // Attempt to handle as a fetch error with a response
3814
+ if (error instanceof Error && "response" in error) {
3815
+ response = (error as any).response;
3816
+ if (response instanceof Response) {
3817
+ ({ message, status } = await parseErrorResponse(response));
3818
+ } else {
3819
+ throw error; // Rethrow if no response
3820
+ }
3821
+ } else {
3822
+ throw error; // Rethrow truly unexpected errors
3823
+ }
3824
+ }
3825
+
3826
+ if (debug)
3827
+ console.log("[invokeMethod] Handling error with status:", status);
3828
+
3829
+ if (status === 429) {
3830
+ if (!(error instanceof ResponseError)) {
3831
+ throw new Error("Expected ResponseError for 429 handling");
3832
+ }
3833
+ const delay = await rateLimiter.handle429(error, attempt + 1);
3834
+ if (debug) console.log(`[${methodName}] 429 delay: ${delay}ms`);
3835
+ if (attempt + 1 === maxAttempts) {
3836
+ throw new RateLimitError(
3837
+ `API Error: ${message} (Status: ${status})`,
3838
+ status,
3839
+ response?.headers.get("Retry-After")
3840
+ ? parseInt(response.headers.get("Retry-After")!, 10)
3841
+ : undefined
3842
+ );
3843
+ }
3844
+ await new Promise((resolve) => setTimeout(resolve, delay));
3845
+ attempt++;
3846
+ continue;
3847
+ }
3848
+
3849
+ const newToken = await authStrategy.handleError(
3850
+ status,
3851
+ params,
3852
+ attempt,
3853
+ maxAttempts,
3854
+ debug,
3855
+ methodName
3856
+ );
3857
+ if (newToken) {
3858
+ token = newToken;
3859
+ authStrategy.applyHeaders(baseHeaders, token);
3860
+ requestOptions.headers = { ...baseHeaders };
3861
+ attempt++;
3862
+ if (debug)
3863
+ console.log(
3864
+ `[${methodName}] Retrying with token: ${token.substring(0, 10)}...`
3865
+ );
3866
+ continue;
3867
+ }
3868
+
3869
+ throw new Error(`API Error: ${message} (Status: ${status})`);
3870
+ }
3871
+ }
3872
+ throw new Error(`API Error: Exhausted retries after ${maxAttempts} attempts`);
3873
+ }
3874
+ - name: >-
3875
+ quickbaseClient.ts
3876
+ type: >-
3877
+ file
3878
+ contents: >
3879
+ //
3880
+ src/quickbaseClient.ts
3881
+
3882
+
3883
+ import
3884
+ {
3885
+ QuickbaseClient
3886
+ as
3887
+ IQuickbaseClient
3888
+ }
3889
+ from
3890
+ "./generated-unified/QuickbaseClient";
3891
+
3892
+ import
3893
+ {
3894
+ Configuration,
3895
+ HTTPHeaders
3896
+ }
3897
+ from
3898
+ "./generated/runtime";
3899
+
3900
+ import
3901
+ *
3902
+ as
3903
+ apis
3904
+ from
3905
+ "./generated/apis";
3906
+
3907
+ import
3908
+ {
3909
+ TokenCache
3910
+ }
3911
+ from
3912
+ "./tokenCache";
3913
+
3914
+ import
3915
+ {
3916
+ simplifyName,
3917
+ getParamNames,
3918
+ transformDates,
3919
+ extractHttpMethod,
3920
+ }
3921
+ from
3922
+ "./utils";
3923
+ //
3924
+ Updated
3925
+ import
3926
+
3927
+ import
3928
+ {
3929
+ invokeMethod,
3930
+ MethodInfo
3931
+ }
3932
+ from
3933
+ "./invokeMethod";
3934
+
3935
+ import
3936
+ {
3937
+ TempTokenStrategy,
3938
+ UserTokenStrategy,
3939
+ AuthorizationStrategy,
3940
+ SsoTokenStrategy,
3941
+ }
3942
+ from
3943
+ "./authorizationStrategy";
3944
+
3945
+ import
3946
+ {
3947
+ ThrottleBucket
3948
+ }
3949
+ from
3950
+ "./ThrottleBucket";
3951
+
3952
+ import
3953
+ {
3954
+ RateLimiter
3955
+ }
3956
+ from
3957
+ "./rateLimiter";
3958
+
3959
+
3960
+ export
3961
+ *
3962
+ from
3963
+ "./generated/models/index";
3964
+
3965
+
3966
+ export
3967
+ interface
3968
+ QuickbaseClient
3969
+ extends
3970
+ IQuickbaseClient
3971
+ {}
3972
+
3973
+
3974
+ export
3975
+ interface
3976
+ QuickbaseConfig
3977
+ {
3978
+ realm: string;
3979
+ userToken?: string;
3980
+ tempToken?: string;
3981
+ useTempTokens?: boolean;
3982
+ useSso?: boolean;
3983
+ samlToken?: string;
3984
+ debug?: boolean;
3985
+ fetchApi?: typeof fetch;
3986
+ convertDates?: boolean;
3987
+ tempTokenLifespan?: number;
3988
+ throttle?: { rate: number; burst: number };
3989
+ maxRetries?: number;
3990
+ retryDelay?: number;
3991
+ tokenCache?: TokenCache;
3992
+ baseUrl?: string;
3993
+ }
3994
+
3995
+
3996
+ type
3997
+ MethodMap
3998
+ =
3999
+ {
4000
+ [K in keyof QuickbaseClient]: MethodInfo<K>;
4001
+ };
4002
+
4003
+
4004
+ export
4005
+ function
4006
+ quickbase(config:
4007
+ QuickbaseConfig):
4008
+ QuickbaseClient
4009
+ {
4010
+ const {
4011
+ realm,
4012
+ userToken,
4013
+ tempToken,
4014
+ useTempTokens,
4015
+ useSso,
4016
+ samlToken,
4017
+ fetchApi,
4018
+ debug,
4019
+ convertDates = true,
4020
+ tempTokenLifespan = 290000,
4021
+ throttle = { rate: 10, burst: 10 },
4022
+ maxRetries = 3,
4023
+ retryDelay = 1000,
4024
+ tokenCache: providedTokenCache,
4025
+ baseUrl = "https://api.quickbase.com/v1",
4026
+ } = config;
4027
+
4028
+ const tokenCache = providedTokenCache || new TokenCache(tempTokenLifespan);
4029
+ const throttleBucket = throttle
4030
+ ? new ThrottleBucket(throttle.rate, throttle.burst)
4031
+ : null;
4032
+ const rateLimiter = new RateLimiter(throttleBucket, maxRetries, retryDelay);
4033
+
4034
+ const defaultFetch: typeof fetch | undefined =
4035
+ typeof globalThis.window !== "undefined"
4036
+ ? globalThis.window.fetch.bind(globalThis.window)
4037
+ : undefined;
4038
+ const effectiveFetch = fetchApi || defaultFetch;
4039
+
4040
+ if (!effectiveFetch) {
4041
+ throw new Error("No fetch implementation available");
4042
+ }
4043
+
4044
+ const authStrategy: AuthorizationStrategy = useSso
4045
+ ? new SsoTokenStrategy(samlToken || "", realm, effectiveFetch, debug)
4046
+ : useTempTokens
4047
+ ? new TempTokenStrategy(
4048
+ tokenCache,
4049
+ tempToken,
4050
+ effectiveFetch,
4051
+ realm,
4052
+ baseUrl
4053
+ )
4054
+ : new UserTokenStrategy(userToken || "");
4055
+
4056
+ const baseHeaders: HTTPHeaders = {
4057
+ "QB-Realm-Hostname": `${realm}.quickbase.com`,
4058
+ "Content-Type": "application/json",
4059
+ };
4060
+
4061
+ const configuration = new Configuration({
4062
+ basePath: baseUrl,
4063
+ headers: { ...baseHeaders },
4064
+ fetchApi: effectiveFetch,
4065
+ credentials: "omit",
4066
+ });
4067
+
4068
+ const apiInstances = Object.fromEntries(
4069
+ Object.entries(apis)
4070
+ .filter(([name]) => name.endsWith("Api"))
4071
+ .map(([name, ApiClass]) => [
4072
+ name.replace("Api", "").toLowerCase(),
4073
+ new ApiClass(configuration),
4074
+ ])
4075
+ );
4076
+
4077
+ function buildMethodMap(): MethodMap {
4078
+ const methodMap: Partial<MethodMap> = {};
4079
+ const isValidMethod = (name: string) =>
4080
+ !name.startsWith("_") &&
4081
+ name !== "constructor" &&
4082
+ !["Middleware", "Pre", "Post", "Raw"].some((s) => name.includes(s));
4083
+
4084
+ for (const [apiName, api] of Object.entries(apiInstances)) {
4085
+ Object.getOwnPropertyNames(Object.getPrototypeOf(api))
4086
+ .filter(
4087
+ (name) =>
4088
+ isValidMethod(name) &&
4089
+ typeof api[name as keyof typeof api] === "function"
4090
+ )
4091
+ .forEach((rawMethodName) => {
4092
+ const simplifiedName = simplifyName(
4093
+ rawMethodName
4094
+ ) as keyof QuickbaseClient;
4095
+ const rawMethodKey = `${rawMethodName}Raw` as keyof typeof api;
4096
+ const method =
4097
+ api[rawMethodKey] || api[rawMethodName as keyof typeof api];
4098
+ const boundMethod = method.bind(api as any) as unknown;
4099
+ if (typeof boundMethod === "function" && boundMethod.length <= 2) {
4100
+ const httpMethod = extractHttpMethod(method);
4101
+ methodMap[simplifiedName] = {
4102
+ api,
4103
+ method: boundMethod as any,
4104
+ paramMap: getParamNames(method),
4105
+ httpMethod,
4106
+ };
4107
+ }
4108
+ });
4109
+ }
4110
+ if (debug) {
4111
+ console.log("[buildMethodMap] Methods:", Object.keys(methodMap));
4112
+ }
4113
+ return methodMap as MethodMap;
4114
+ }
4115
+
4116
+ const methodMap = buildMethodMap();
4117
+
4118
+ const proxyHandler: ProxyHandler<QuickbaseClient> = {
4119
+ get: (_, prop: string) => {
4120
+ console.log(
4121
+ "[proxy] Accessing:",
4122
+ prop,
4123
+ "in methodMap:",
4124
+ prop in methodMap
4125
+ );
4126
+ if (prop in methodMap) {
4127
+ const methodName = prop as keyof QuickbaseClient;
4128
+ return (params: Parameters<QuickbaseClient[typeof methodName]>[0]) =>
4129
+ invokeMethod(
4130
+ methodName,
4131
+ params,
4132
+ methodMap,
4133
+ baseHeaders,
4134
+ authStrategy,
4135
+ rateLimiter,
4136
+ transformDates,
4137
+ debug,
4138
+ convertDates
4139
+ );
4140
+ }
4141
+ console.log("[proxy] Method not found:", prop);
4142
+ return undefined;
4143
+ },
4144
+ };
4145
+
4146
+ const proxy = new Proxy<QuickbaseClient>({} as QuickbaseClient, proxyHandler);
4147
+
4148
+ if (debug) {
4149
+ console.log("[createClient] Config:", config);
4150
+ console.log("[createClient] Proxy created:", proxy);
4151
+ }
4152
+
4153
+ return proxy;
4154
+ }
4155
+ - name: >-
4156
+ rateLimiter.ts
4157
+ type: >-
4158
+ file
4159
+ contents: >
4160
+ //
4161
+ src/rateLimiter.ts
4162
+
4163
+ import
4164
+ {
4165
+ ThrottleBucket
4166
+ }
4167
+ from
4168
+ "./ThrottleBucket";
4169
+
4170
+ import
4171
+ {
4172
+ ResponseError
4173
+ }
4174
+ from
4175
+ "./generated/runtime";
4176
+
4177
+
4178
+ export
4179
+ class
4180
+ RateLimiter
4181
+ {
4182
+ constructor(
4183
+ private throttleBucket: ThrottleBucket | null,
4184
+ public maxRetries: number = 3,
4185
+ private retryDelay: number = 1000
4186
+ ) {}
4187
+
4188
+ async throttle(): Promise<void> {
4189
+ if (this.throttleBucket) {
4190
+ await this.throttleBucket.acquire();
4191
+ }
4192
+ }
4193
+
4194
+ async handle429(error: ResponseError, attempt: number): Promise<number> {
4195
+ // Remove the throw here; let invokeMethod handle exhaustion
4196
+ const retryAfter = error.response.headers.get("Retry-After");
4197
+ return retryAfter
4198
+ ? parseInt(retryAfter, 10) * 1000
4199
+ : this.retryDelay * Math.pow(2, attempt - 1);
4200
+ }
4201
+ }
4202
+ - name: >-
4203
+ tokenCache.ts
4204
+ type: >-
4205
+ file
4206
+ contents: >
4207
+ //
4208
+ src/tokenCache.ts
4209
+
4210
+ interface
4211
+ CachedToken
4212
+ {
4213
+ token: string;
4214
+ expiresAt: number;
4215
+ }
4216
+
4217
+
4218
+ export
4219
+ class
4220
+ TokenCache
4221
+ {
4222
+ private cache: Map<string, CachedToken>;
4223
+ private readonly tempTokenLifespan: number;
4224
+
4225
+ constructor(tempTokenLifespan: number = 4 * 60 * 1000 + 50 * 1000) {
4226
+ this.cache = new Map<string, CachedToken>();
4227
+ this.tempTokenLifespan = tempTokenLifespan;
4228
+ }
4229
+
4230
+ get(dbid: string): string | undefined {
4231
+ const entry = this.cache.get(dbid);
4232
+ const now = Date.now();
4233
+ if (entry && entry.expiresAt > now) return entry.token;
4234
+ if (entry) this.cache.delete(dbid); // Clean up expired temp tokens
4235
+ return undefined;
4236
+ }
4237
+
4238
+ set(dbid: string, token: string, lifespan?: number): void {
4239
+ const now = Date.now();
4240
+ this.cache.set(dbid, {
4241
+ token,
4242
+ expiresAt: now + (lifespan || this.tempTokenLifespan),
4243
+ });
4244
+ }
4245
+
4246
+ clear(): void {
4247
+ this.cache.clear();
4248
+ }
4249
+ }
4250
+ - name: >-
4251
+ utils.ts
4252
+ type: >-
4253
+ file
4254
+ contents: >
4255
+ //
4256
+ src/utils.ts
4257
+
4258
+
4259
+ export
4260
+ function
4261
+ simplifyName(methodName:
4262
+ string):
4263
+ string
4264
+ {
4265
+ // Assuming this removes 'Raw' or similar suffixes as per your original logic
4266
+ return methodName
4267
+ .replace(/Raw$/, "")
4268
+ .replace(/^./, (str) => str.toLowerCase());
4269
+ }
4270
+
4271
+
4272
+ export
4273
+ function
4274
+ getParamNames(func:
4275
+ Function):
4276
+ string[]
4277
+ {
4278
+ // Your existing logic to extract parameter names from a function
4279
+ const STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;
4280
+ const ARGUMENT_NAMES = /([^\s,]+)/g;
4281
+ const fnStr = func.toString().replace(STRIP_COMMENTS, "");
4282
+ const result = fnStr
4283
+ .slice(fnStr.indexOf("(") + 1, fnStr.indexOf(")"))
4284
+ .match(ARGUMENT_NAMES);
4285
+ return result || [];
4286
+ }
4287
+
4288
+
4289
+ export
4290
+ function
4291
+ transformDates(obj:
4292
+ any,
4293
+ convertStringsToDates:
4294
+ boolean):
4295
+ any
4296
+ {
4297
+ // Your existing logic to transform dates
4298
+ if (!obj || typeof obj !== "object") return obj;
4299
+ if (Array.isArray(obj))
4300
+ return obj.map((item) => transformDates(item, convertStringsToDates));
4301
+ const result: any = {};
4302
+ for (const [key, value] of Object.entries(obj)) {
4303
+ if (
4304
+ typeof value === "string" &&
4305
+ convertStringsToDates &&
4306
+ /^\d{4}-\d{2}-\d{2}/.test(value)
4307
+ ) {
4308
+ result[key] = new Date(value);
4309
+ } else if (value instanceof Date) {
4310
+ result[key] = value;
4311
+ } else if (typeof value === "object") {
4312
+ result[key] = transformDates(value, convertStringsToDates);
4313
+ } else {
4314
+ result[key] = value;
4315
+ }
4316
+ }
4317
+ return result;
4318
+ }
4319
+
4320
+
4321
+ export
4322
+ function
4323
+ extractHttpMethod(method:
4324
+ Function):
4325
+ string
4326
+ {
4327
+ const source = method.toString();
4328
+ // Match the `method: 'SOME_METHOD'` part of the `request` call
4329
+ const match = source.match(/method:\s*['"](\w+)['"]/i);
4330
+ return match ? match[1].toUpperCase() : "GET"; // Fallback to GET if no match
4331
+ }
4332
+ - name: >-
4333
+ test-artifacts
4334
+ type: >-
4335
+ directory
4336
+ children:
4337
+ - name: >-
4338
+ .last-run.json
4339
+ type: >-
4340
+ file
4341
+ - name: >-
4342
+ tests
4343
+ type: >-
4344
+ directory
4345
+ children:
4346
+ - name: >-
4347
+ playwright
4348
+ type: >-
4349
+ directory
4350
+ children:
4351
+ - name: >-
4352
+ qb
4353
+ type: >-
4354
+ directory
4355
+ children:
4356
+ - name: >-
4357
+ auth
4358
+ type: >-
4359
+ directory
4360
+ children:
4361
+ - name: >-
4362
+ cacheSwitching.test.ts
4363
+ type: >-
4364
+ file
4365
+ - name: >-
4366
+ fetchTempToken401.test.ts
4367
+ type: >-
4368
+ file
4369
+ - name: >-
4370
+ getAppWithTempToken.test.ts
4371
+ type: >-
4372
+ file
4373
+ - name: >-
4374
+ getAppWithUserToken.test.ts
4375
+ type: >-
4376
+ file
4377
+ - name: >-
4378
+ getTempToken.test.ts
4379
+ type: >-
4380
+ file
4381
+ - name: >-
4382
+ tempTokenPrefetch.test.ts
4383
+ type: >-
4384
+ file
4385
+ - name: >-
4386
+ tempTokenRenewal.test.ts
4387
+ type: >-
4388
+ file
4389
+ - name: >-
4390
+ setup.ts
4391
+ type: >-
4392
+ file
4393
+ - name: >-
4394
+ vitest
4395
+ type: >-
4396
+ directory
4397
+ children:
4398
+ - name: >-
4399
+ qb
4400
+ type: >-
4401
+ directory
4402
+ children:
4403
+ - name: >-
4404
+ apps
4405
+ type: >-
4406
+ directory
4407
+ children:
4408
+ - name: >-
4409
+ copyApp.test.ts
4410
+ type: >-
4411
+ file
4412
+ - name: >-
4413
+ createApp.test.ts
4414
+ type: >-
4415
+ file
4416
+ - name: >-
4417
+ deleteApp.test.ts
4418
+ type: >-
4419
+ file
4420
+ - name: >-
4421
+ getApp.test.ts
4422
+ type: >-
4423
+ file
4424
+ - name: >-
4425
+ getAppEvents.test.ts
4426
+ type: >-
4427
+ file
4428
+ - name: >-
4429
+ updateApp.test.ts
4430
+ type: >-
4431
+ file
4432
+ - name: >-
4433
+ auth
4434
+ type: >-
4435
+ directory
4436
+ children:
4437
+ - name: >-
4438
+ mockQuickbaseServer.ts
4439
+ type: >-
4440
+ file
4441
+ - name: >-
4442
+ retryUserToken401.test.ts
4443
+ type: >-
4444
+ file
4445
+ - name: >-
4446
+ ssoTokenIntegrationWithServer.test.ts
4447
+ type: >-
4448
+ file
4449
+ - name: >-
4450
+ fields
4451
+ type: >-
4452
+ directory
4453
+ children:
4454
+ - name: >-
4455
+ createField.test.ts
4456
+ type: >-
4457
+ file
4458
+ - name: >-
4459
+ deleteFields.test.ts
4460
+ type: >-
4461
+ file
4462
+ - name: >-
4463
+ getField.test.ts
4464
+ type: >-
4465
+ file
4466
+ - name: >-
4467
+ getFieldUsage.test.ts
4468
+ type: >-
4469
+ file
4470
+ - name: >-
4471
+ getFields.test.ts
4472
+ type: >-
4473
+ file
4474
+ - name: >-
4475
+ getFieldsUsage.test.ts
4476
+ type: >-
4477
+ file
4478
+ - name: >-
4479
+ updateField.test.ts
4480
+ type: >-
4481
+ file
4482
+ - name: >-
4483
+ formulas
4484
+ type: >-
4485
+ directory
4486
+ children:
4487
+ - name: >-
4488
+ runFormula.test.ts
4489
+ type: >-
4490
+ file
4491
+ - name: >-
4492
+ index.ts
4493
+ type: >-
4494
+ file
4495
+ - name: >-
4496
+ records
4497
+ type: >-
4498
+ directory
4499
+ children:
4500
+ - name: >-
4501
+ deleteRecords.test.ts
4502
+ type: >-
4503
+ file
4504
+ - name: >-
4505
+ runQuery.test.ts
4506
+ type: >-
4507
+ file
4508
+ - name: >-
4509
+ upsert.test.ts
4510
+ type: >-
4511
+ file
4512
+ - name: >-
4513
+ tables
4514
+ type: >-
4515
+ directory
4516
+ children:
4517
+ - name: >-
4518
+ createRelationship.test.ts
4519
+ type: >-
4520
+ file
4521
+ - name: >-
4522
+ createTable.test.ts
4523
+ type: >-
4524
+ file
4525
+ - name: >-
4526
+ deleteRelationship.test.ts
4527
+ type: >-
4528
+ file
4529
+ - name: >-
4530
+ deleteTable.test.ts
4531
+ type: >-
4532
+ file
4533
+ - name: >-
4534
+ getAppTables.test.ts
4535
+ type: >-
4536
+ file
4537
+ - name: >-
4538
+ getRelationships.test.ts
4539
+ type: >-
4540
+ file
4541
+ - name: >-
4542
+ getTable.test.ts
4543
+ type: >-
4544
+ file
4545
+ - name: >-
4546
+ updateRelationship.test.ts
4547
+ type: >-
4548
+ file
4549
+ - name: >-
4550
+ updateTable.test.ts
4551
+ type: >-
4552
+ file
4553
+ - name: >-
4554
+ unit
4555
+ type: >-
4556
+ directory
4557
+ children:
4558
+ - name: >-
4559
+ ThrottleBucket.test.ts
4560
+ type: >-
4561
+ file
4562
+ - name: >-
4563
+ apps
4564
+ type: >-
4565
+ directory
4566
+ children:
4567
+ - name: >-
4568
+ copyApp.test.ts
4569
+ type: >-
4570
+ file
4571
+ - name: >-
4572
+ createApp.test.ts
4573
+ type: >-
4574
+ file
4575
+ - name: >-
4576
+ deleteApp.test.ts
4577
+ type: >-
4578
+ file
4579
+ - name: >-
4580
+ getApp.test.ts
4581
+ type: >-
4582
+ file
4583
+ - name: >-
4584
+ getAppEvents.test.ts
4585
+ type: >-
4586
+ file
4587
+ - name: >-
4588
+ updateApp.test.ts
4589
+ type: >-
4590
+ file
4591
+ - name: >-
4592
+ auth
4593
+ type: >-
4594
+ directory
4595
+ children:
4596
+ - name: >-
4597
+ fetchTempToken401.test.ts
4598
+ type: >-
4599
+ file
4600
+ - name: >-
4601
+ getTempToken.test.ts
4602
+ type: >-
4603
+ file
4604
+ - name: >-
4605
+ retryTempToken401.test.ts
4606
+ type: >-
4607
+ file
4608
+ - name: >-
4609
+ retryTempTokenMaxRetries.test.ts
4610
+ type: >-
4611
+ file
4612
+ - name: >-
4613
+ retryUserToken401.test.ts
4614
+ type: >-
4615
+ file
4616
+ - name: >-
4617
+ ssoTokenRefresh.test.ts
4618
+ type: >-
4619
+ file
4620
+ - name: >-
4621
+ fields
4622
+ type: >-
4623
+ directory
4624
+ children:
4625
+ - name: >-
4626
+ createField.test.ts
4627
+ type: >-
4628
+ file
4629
+ - name: >-
4630
+ deleteFields.test.ts
4631
+ type: >-
4632
+ file
4633
+ - name: >-
4634
+ getField.test.ts
4635
+ type: >-
4636
+ file
4637
+ - name: >-
4638
+ getFieldUsage.test.ts
4639
+ type: >-
4640
+ file
4641
+ - name: >-
4642
+ getFields.test.ts
4643
+ type: >-
4644
+ file
4645
+ - name: >-
4646
+ getFieldsUsage.test.ts
4647
+ type: >-
4648
+ file
4649
+ - name: >-
4650
+ updateField.test.ts
4651
+ type: >-
4652
+ file
4653
+ - name: >-
4654
+ formulas
4655
+ type: >-
4656
+ directory
4657
+ children:
4658
+ - name: >-
4659
+ runFormula.test.ts
4660
+ type: >-
4661
+ file
4662
+ - name: >-
4663
+ index.ts
4664
+ type: >-
4665
+ file
4666
+ - name: >-
4667
+ quickbaseClientHttpMethods.test.ts
4668
+ type: >-
4669
+ file
4670
+ - name: >-
4671
+ rateLimit.test.ts
4672
+ type: >-
4673
+ file
4674
+ - name: >-
4675
+ records
4676
+ type: >-
4677
+ directory
4678
+ children:
4679
+ - name: >-
4680
+ deleteRecords.test.ts
4681
+ type: >-
4682
+ file
4683
+ - name: >-
4684
+ runQuery.test.ts
4685
+ type: >-
4686
+ file
4687
+ - name: >-
4688
+ upsert.test.ts
4689
+ type: >-
4690
+ file
4691
+ - name: >-
4692
+ tables
4693
+ type: >-
4694
+ directory
4695
+ children:
4696
+ - name: >-
4697
+ createRelationship.test.ts
4698
+ type: >-
4699
+ file
4700
+ - name: >-
4701
+ createTable.test.ts
4702
+ type: >-
4703
+ file
4704
+ - name: >-
4705
+ deleteRelationship.test.ts
4706
+ type: >-
4707
+ file
4708
+ - name: >-
4709
+ deleteTable.test.ts
4710
+ type: >-
4711
+ file
4712
+ - name: >-
4713
+ getAppTables.test.ts
4714
+ type: >-
4715
+ file
4716
+ - name: >-
4717
+ getRelationships.test.ts
4718
+ type: >-
4719
+ file
4720
+ - name: >-
4721
+ getTable.test.ts
4722
+ type: >-
4723
+ file
4724
+ - name: >-
4725
+ updateRelationship.test.ts
4726
+ type: >-
4727
+ file
4728
+ - name: >-
4729
+ updateTable.test.ts
4730
+ type: >-
4731
+ file
4732
+ - name: >-
4733
+ tokenLifespan.test.ts
4734
+ type: >-
4735
+ file
4736
+ - name: >-
4737
+ umd.test.ts
4738
+ type: >-
4739
+ file
4740
+ - name: >-
4741
+ tools
4742
+ type: >-
4743
+ directory
4744
+ children:
4745
+ - name: >-
4746
+ log-gen.ts
4747
+ type: >-
4748
+ file
4749
+ - name: >-
4750
+ log-gen.yaml
4751
+ type: >-
4752
+ file
4753
+ - name: >-
4754
+ openapi-jars
4755
+ type: >-
4756
+ directory
4757
+ children:
4758
+ - name: >-
4759
+ openapi-generator-cli-7.12.0.jar
4760
+ type: >-
4761
+ file
4762
+ - name: >-
4763
+ tsconfig.build.json
4764
+ type: >-
4765
+ file
4766
+ - name: >-
4767
+ tsconfig.json
4768
+ type: >-
4769
+ file
4770
+ - name: >-
4771
+ versionrc.json
4772
+ type: >-
4773
+ file
4774
+ - name: >-
4775
+ vitest.config.ts
4776
+ type: >-
4777
+ file