quickbase-js 1.1.0-beta.3 → 1.1.0-beta.4

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 (46) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +61 -5
  3. package/dist/quickbase.d.ts +1108 -349
  4. package/dist/quickbase.js +828 -263
  5. package/dist/quickbase.js.map +1 -1
  6. package/examples/react.js +12 -12
  7. package/examples/vanillajs.html +12 -12
  8. package/log-gen.yaml +4622 -759
  9. package/package.json +12 -14
  10. package/playwright-results.txt/.last-run.json +4 -0
  11. package/playwright.config.ts +1 -1
  12. package/src/code-generation/definitions/apps.ts +274 -0
  13. package/src/code-generation/definitions/auth.ts +10 -0
  14. package/src/code-generation/definitions/fields.ts +751 -0
  15. package/src/code-generation/definitions/index.ts +18 -0
  16. package/src/code-generation/definitions/records.ts +269 -0
  17. package/src/code-generation/definitions/relationships.ts +90 -0
  18. package/src/code-generation/definitions/reports.ts +10 -0
  19. package/src/code-generation/definitions/tables.ts +112 -0
  20. package/src/code-generation/fix-spec-main.ts +2 -2
  21. package/src/code-generation/output/quickbase-fixed.json +3244 -4586
  22. package/src/code-generation/paths/apps.ts +100 -0
  23. package/src/code-generation/paths/auth.ts +25 -0
  24. package/src/code-generation/paths/fields.ts +207 -0
  25. package/src/code-generation/paths/index.ts +17 -0
  26. package/src/code-generation/paths/records.ts +68 -0
  27. package/src/code-generation/paths/relationships.ts +32 -0
  28. package/src/code-generation/paths/reports.ts +34 -0
  29. package/src/code-generation/paths/tables.ts +162 -0
  30. package/src/generated-unified/QuickbaseClient.ts +7 -6
  31. package/src/log-gen.ts +8 -6
  32. package/tests/vitest/qb/fields/createField.test.ts +78 -0
  33. package/tests/vitest/qb/fields/deleteFields.test.ts +89 -0
  34. package/tests/vitest/qb/fields/getField.test.ts +85 -0
  35. package/tests/vitest/qb/fields/getFieldUsage.test.ts +174 -0
  36. package/tests/vitest/qb/fields/getFieldsUsage.test.ts +77 -0
  37. package/tests/vitest/qb/index.ts +25 -1
  38. package/tests/vitest/unit/fields/createField.test.ts +391 -0
  39. package/tests/vitest/unit/fields/deleteFields.test.ts +141 -0
  40. package/tests/vitest/unit/fields/getField.test.ts +189 -0
  41. package/tests/vitest/unit/fields/getFieldUsage.test.ts +147 -0
  42. package/tests/vitest/unit/fields/getFieldsUsage.test.ts +160 -0
  43. package/tests/vitest/unit/index.ts +30 -1
  44. package/src/code-generation/fix-spec-definitions.ts +0 -809
  45. package/src/code-generation/fix-spec-paths.ts +0 -439
  46. package/test-artifacts/test-results.json +0 -829
@@ -1,439 +0,0 @@
1
- // src/code-generation/fix-spec-paths.ts
2
- export const paths = {
3
- "/apps": {
4
- post: {
5
- operationId: "createApp",
6
- summary: "Create a new application",
7
- tags: ["Apps"],
8
- parameters: [
9
- {
10
- name: "body",
11
- in: "body",
12
- required: true,
13
- schema: { $ref: "#/definitions/CreateAppRequest" },
14
- },
15
- ],
16
- responses: {
17
- 200: {
18
- description: "Success - application created",
19
- schema: { $ref: "#/definitions/CreateApp200Response" },
20
- },
21
- },
22
- },
23
- },
24
- "/apps/{appId}": {
25
- get: {
26
- operationId: "getApp",
27
- summary: "Get an app by ID",
28
- tags: ["Apps"],
29
- parameters: [
30
- {
31
- name: "appId",
32
- in: "path",
33
- required: true,
34
- type: "string",
35
- description: "The application identifier.",
36
- },
37
- ],
38
- responses: {
39
- 200: {
40
- description: "Success",
41
- schema: { $ref: "#/definitions/App" },
42
- },
43
- },
44
- },
45
- delete: {
46
- // New DELETE method for deleteApp
47
- operationId: "deleteApp",
48
- summary: "Delete an application by ID",
49
- tags: ["Apps"],
50
- parameters: [
51
- {
52
- name: "appId",
53
- in: "path",
54
- required: true,
55
- type: "string",
56
- description: "The unique identifier of the app to delete.",
57
- },
58
- {
59
- name: "body",
60
- in: "body",
61
- required: true,
62
- schema: { $ref: "#/definitions/DeleteAppRequest" },
63
- },
64
- ],
65
- responses: {
66
- 200: {
67
- description: "Success - application deleted",
68
- schema: { $ref: "#/definitions/DeleteApp200Response" },
69
- },
70
- },
71
- },
72
- },
73
- "/apps/{appId}/copy": {
74
- post: {
75
- operationId: "copyApp",
76
- summary: "Copy an existing application",
77
- tags: ["Apps"],
78
- parameters: [
79
- {
80
- name: "appId",
81
- in: "path",
82
- required: true,
83
- type: "string",
84
- description: "The unique identifier of the app to copy.",
85
- },
86
- {
87
- name: "body",
88
- in: "body",
89
- required: true,
90
- schema: { $ref: "#/definitions/CopyAppRequest" },
91
- },
92
- ],
93
- responses: {
94
- 200: {
95
- description: "Success - application copied",
96
- schema: { $ref: "#/definitions/CopyApp200Response" },
97
- },
98
- },
99
- },
100
- },
101
- "/fields": {
102
- get: {
103
- operationId: "getFields",
104
- summary: "Get all fields for a table",
105
- tags: ["Fields"],
106
- parameters: [
107
- {
108
- name: "tableId",
109
- in: "query",
110
- required: true,
111
- type: "string",
112
- description: "The table identifier (dbid).",
113
- },
114
- {
115
- name: "includeFieldPerms",
116
- in: "query",
117
- required: false,
118
- type: "boolean",
119
- description: "Whether to include field permissions.",
120
- },
121
- ],
122
- responses: {
123
- 200: {
124
- description: "Success",
125
- schema: {
126
- type: "array",
127
- items: { $ref: "#/definitions/Field" },
128
- },
129
- },
130
- },
131
- },
132
- },
133
- "/tables": {
134
- get: {
135
- operationId: "getAppTables",
136
- summary: "Get all tables for an app",
137
- tags: ["Tables"],
138
- parameters: [
139
- {
140
- name: "appId",
141
- in: "query",
142
- required: true,
143
- type: "string",
144
- description: "The application identifier.",
145
- },
146
- ],
147
- responses: {
148
- 200: {
149
- description: "Success",
150
- schema: {
151
- type: "array",
152
- items: { $ref: "#/definitions/Table" },
153
- },
154
- },
155
- },
156
- },
157
- post: {
158
- operationId: "createTable",
159
- summary: "Create a new table in an app",
160
- tags: ["Tables"],
161
- parameters: [
162
- {
163
- name: "appId",
164
- in: "query",
165
- required: true,
166
- type: "string",
167
- description:
168
- "The unique identifier of the app where the table will be created.",
169
- },
170
- {
171
- name: "body",
172
- in: "body",
173
- required: true,
174
- schema: {
175
- type: "object",
176
- properties: {
177
- name: { type: "string", description: "The name of the table." },
178
- description: {
179
- type: "string",
180
- description: "The description of the table.",
181
- },
182
- singleRecordName: {
183
- type: "string",
184
- description: "Singular noun for records.",
185
- },
186
- pluralRecordName: {
187
- type: "string",
188
- description: "Plural noun for records.",
189
- },
190
- },
191
- required: ["name"],
192
- },
193
- },
194
- ],
195
- responses: {
196
- 200: {
197
- description: "Success - table created",
198
- schema: { $ref: "#/definitions/Table" },
199
- },
200
- },
201
- },
202
- },
203
- "/tables/{tableId}": {
204
- get: {
205
- operationId: "getTable",
206
- summary: "Get a table by ID",
207
- tags: ["Tables"],
208
- parameters: [
209
- {
210
- name: "tableId",
211
- in: "path",
212
- required: true,
213
- type: "string",
214
- description: "The table identifier (dbid).",
215
- },
216
- {
217
- name: "appId",
218
- in: "query",
219
- required: true,
220
- type: "string",
221
- description: "The unique identifier of the app containing the table.",
222
- },
223
- ],
224
- responses: {
225
- 200: {
226
- description: "Success - table retrieved",
227
- schema: { $ref: "#/definitions/Table" },
228
- },
229
- },
230
- },
231
- post: {
232
- operationId: "updateTable",
233
- summary: "Update a table by ID",
234
- tags: ["Tables"],
235
- parameters: [
236
- {
237
- name: "tableId",
238
- in: "path",
239
- required: true,
240
- type: "string",
241
- description: "The table identifier (dbid).",
242
- },
243
- {
244
- name: "appId",
245
- in: "query",
246
- required: true,
247
- type: "string",
248
- description: "The unique identifier of the app containing the table.",
249
- },
250
- {
251
- name: "body",
252
- in: "body",
253
- required: true,
254
- schema: { $ref: "#/definitions/UpdateTableRequest" },
255
- },
256
- ],
257
- responses: {
258
- 200: {
259
- description: "Success - table updated",
260
- schema: { $ref: "#/definitions/Table" },
261
- },
262
- },
263
- },
264
- delete: {
265
- operationId: "deleteTable",
266
- summary: "Delete a table by ID",
267
- tags: ["Tables"],
268
- parameters: [
269
- {
270
- name: "tableId",
271
- in: "path",
272
- required: true,
273
- type: "string",
274
- description: "The table identifier (dbid).",
275
- },
276
- {
277
- name: "appId",
278
- in: "query",
279
- required: true,
280
- type: "string",
281
- description: "The unique identifier of the app containing the table.",
282
- },
283
- ],
284
- responses: {
285
- 200: {
286
- description: "Success - table deleted",
287
- schema: { $ref: "#/definitions/DeleteTableResponse" },
288
- },
289
- },
290
- },
291
- },
292
- "/tables/{tableId}/relationships": {
293
- get: {
294
- operationId: "getRelationships",
295
- summary: "Get relationships for a table",
296
- tags: ["Relationships"],
297
- parameters: [
298
- {
299
- name: "tableId",
300
- in: "path",
301
- required: true,
302
- type: "string",
303
- description: "The unique identifier (dbid) of the child table.",
304
- },
305
- {
306
- name: "skip",
307
- in: "query",
308
- required: false,
309
- type: "integer",
310
- description: "The number of relationships to skip.",
311
- },
312
- ],
313
- responses: {
314
- 200: {
315
- description: "Success - relationships retrieved",
316
- schema: { $ref: "#/definitions/GetRelationships200Response" },
317
- },
318
- },
319
- },
320
- },
321
- "/records": {
322
- post: {
323
- operationId: "upsert",
324
- summary: "Upsert records in a table",
325
- tags: ["Records"],
326
- parameters: [
327
- {
328
- name: "body",
329
- in: "body",
330
- required: true,
331
- schema: { $ref: "#/definitions/UpsertRequest" },
332
- },
333
- ],
334
- responses: {
335
- 200: {
336
- description: "Success - all records processed successfully",
337
- schema: { $ref: "#/definitions/Upsert200Response" },
338
- },
339
- 207: {
340
- description: "Multi-Status - partial success with some errors",
341
- schema: { $ref: "#/definitions/Upsert207Response" },
342
- },
343
- },
344
- },
345
- delete: {
346
- operationId: "deleteRecords",
347
- summary: "Delete records in a table",
348
- tags: ["Records"],
349
- parameters: [
350
- {
351
- name: "body",
352
- in: "body",
353
- required: true,
354
- schema: { $ref: "#/definitions/DeleteRecordsRequest" },
355
- },
356
- ],
357
- responses: {
358
- 200: {
359
- description: "Success - records deleted",
360
- schema: { $ref: "#/definitions/DeleteRecords200Response" },
361
- },
362
- },
363
- },
364
- },
365
- "/records/query": {
366
- post: {
367
- operationId: "runQuery",
368
- summary: "Query records in a table",
369
- tags: ["Records"],
370
- parameters: [
371
- {
372
- name: "body",
373
- in: "body",
374
- required: true,
375
- schema: { $ref: "#/definitions/RunQueryRequest" },
376
- },
377
- ],
378
- responses: {
379
- 200: {
380
- description: "Success - records returned",
381
- schema: { $ref: "#/definitions/RunQueryResponse" },
382
- },
383
- },
384
- },
385
- },
386
- "/reports/{reportId}/run": {
387
- post: {
388
- operationId: "runReport",
389
- summary: "Run a report",
390
- tags: ["Reports"],
391
- parameters: [
392
- {
393
- name: "reportId",
394
- in: "path",
395
- required: true,
396
- type: "string",
397
- description: "The report identifier.",
398
- },
399
- {
400
- name: "generated",
401
- in: "body",
402
- required: true,
403
- schema: { type: "object" },
404
- },
405
- ],
406
- responses: {
407
- 200: {
408
- description: "Success",
409
- schema: {
410
- type: "array",
411
- items: { $ref: "#/definitions/ReportRunResponse" },
412
- },
413
- },
414
- },
415
- },
416
- },
417
- "/auth/temporary/{dbid}": {
418
- get: {
419
- operationId: "getTempTokenDBID",
420
- summary: "Get a temporary authorization token for a specific dbid",
421
- tags: ["Auth"],
422
- parameters: [
423
- {
424
- name: "dbid",
425
- in: "path",
426
- required: true,
427
- type: "string",
428
- description: "The database identifier (dbid).",
429
- },
430
- ],
431
- responses: {
432
- 200: {
433
- description: "Success",
434
- schema: { $ref: "#/definitions/GetTempTokenDBID200Response" },
435
- },
436
- },
437
- },
438
- },
439
- };