quickbase-js 0.1.0-beta.13 → 0.1.0-beta.14

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