quickbase-js 1.1.0-beta.2 → 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 (59) hide show
  1. package/CHANGELOG.md +53 -22
  2. package/README.md +61 -5
  3. package/dist/quickbase.d.ts +1711 -613
  4. package/dist/quickbase.js +1469 -468
  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 +3558 -528
  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 +1724 -3044
  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 +10 -8
  31. package/src/log-gen.ts +6 -2
  32. package/src/quickbaseClient.ts +35 -41
  33. package/tests/setup.ts +5 -1
  34. package/tests/vitest/qb/apps/copyApp.test.ts +76 -0
  35. package/tests/vitest/qb/apps/createApp.test.ts +64 -0
  36. package/tests/vitest/qb/apps/deleteApp.test.ts +76 -0
  37. package/tests/vitest/qb/fields/createField.test.ts +78 -0
  38. package/tests/vitest/qb/fields/deleteFields.test.ts +89 -0
  39. package/tests/vitest/qb/fields/getField.test.ts +85 -0
  40. package/tests/vitest/qb/fields/getFieldUsage.test.ts +174 -0
  41. package/tests/vitest/qb/fields/getFieldsUsage.test.ts +77 -0
  42. package/tests/vitest/qb/index.ts +25 -1
  43. package/tests/vitest/qb/records/deleteRecords.test.ts +42 -10
  44. package/tests/vitest/qb/records/runQuery.test.ts +81 -17
  45. package/tests/vitest/qb/records/upsert.test.ts +33 -3
  46. package/tests/vitest/qb/tables/getRelationships.test.ts +80 -0
  47. package/tests/vitest/unit/apps/copyApp.test.ts +282 -0
  48. package/tests/vitest/unit/apps/createApp.test.ts +125 -0
  49. package/tests/vitest/unit/apps/deleteApp.test.ts +215 -0
  50. package/tests/vitest/unit/fields/createField.test.ts +391 -0
  51. package/tests/vitest/unit/fields/deleteFields.test.ts +141 -0
  52. package/tests/vitest/unit/fields/getField.test.ts +189 -0
  53. package/tests/vitest/unit/fields/getFieldUsage.test.ts +147 -0
  54. package/tests/vitest/unit/fields/getFieldsUsage.test.ts +160 -0
  55. package/tests/vitest/unit/index.ts +30 -1
  56. package/tests/vitest/unit/tables/getRelationships.test.ts +259 -0
  57. package/src/code-generation/fix-spec-definitions.ts +0 -543
  58. package/src/code-generation/fix-spec-paths.ts +0 -355
  59. package/test-artifacts/test-results.json +0 -829
@@ -1,355 +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
- },
46
- "/fields": {
47
- get: {
48
- operationId: "getFields",
49
- summary: "Get all fields for a table",
50
- tags: ["Fields"],
51
- parameters: [
52
- {
53
- name: "tableId",
54
- in: "query",
55
- required: true,
56
- type: "string",
57
- description: "The table identifier (dbid).",
58
- },
59
- {
60
- name: "includeFieldPerms",
61
- in: "query",
62
- required: false,
63
- type: "boolean",
64
- description: "Whether to include field permissions.",
65
- },
66
- ],
67
- responses: {
68
- 200: {
69
- description: "Success",
70
- schema: {
71
- type: "array",
72
- items: { $ref: "#/definitions/Field" },
73
- },
74
- },
75
- },
76
- },
77
- },
78
- "/tables": {
79
- get: {
80
- operationId: "getAppTables",
81
- summary: "Get all tables for an app",
82
- tags: ["Tables"],
83
- parameters: [
84
- {
85
- name: "appId",
86
- in: "query",
87
- required: true,
88
- type: "string",
89
- description: "The application identifier.",
90
- },
91
- ],
92
- responses: {
93
- 200: {
94
- description: "Success",
95
- schema: {
96
- type: "array",
97
- items: { $ref: "#/definitions/Table" },
98
- },
99
- },
100
- },
101
- },
102
- post: {
103
- operationId: "createTable",
104
- summary: "Create a new table in an app",
105
- tags: ["Tables"],
106
- parameters: [
107
- {
108
- name: "appId",
109
- in: "query",
110
- required: true,
111
- type: "string",
112
- description:
113
- "The unique identifier of the app where the table will be created.",
114
- },
115
- {
116
- name: "body",
117
- in: "body",
118
- required: true,
119
- schema: {
120
- type: "object",
121
- properties: {
122
- name: { type: "string", description: "The name of the table." },
123
- description: {
124
- type: "string",
125
- description: "The description of the table.",
126
- },
127
- singleRecordName: {
128
- type: "string",
129
- description: "Singular noun for records.",
130
- },
131
- pluralRecordName: {
132
- type: "string",
133
- description: "Plural noun for records.",
134
- },
135
- },
136
- required: ["name"],
137
- },
138
- },
139
- ],
140
- responses: {
141
- 200: {
142
- description: "Success - table created",
143
- schema: { $ref: "#/definitions/Table" },
144
- },
145
- },
146
- },
147
- },
148
- "/tables/{tableId}": {
149
- get: {
150
- operationId: "getTable",
151
- summary: "Get a table by ID",
152
- tags: ["Tables"],
153
- parameters: [
154
- {
155
- name: "tableId",
156
- in: "path",
157
- required: true,
158
- type: "string",
159
- description: "The table identifier (dbid).",
160
- },
161
- {
162
- name: "appId",
163
- in: "query",
164
- required: true,
165
- type: "string",
166
- description: "The unique identifier of the app containing the table.",
167
- },
168
- ],
169
- responses: {
170
- 200: {
171
- description: "Success - table retrieved",
172
- schema: { $ref: "#/definitions/Table" },
173
- },
174
- },
175
- },
176
- post: {
177
- operationId: "updateTable",
178
- summary: "Update a table by ID",
179
- tags: ["Tables"],
180
- parameters: [
181
- {
182
- name: "tableId",
183
- in: "path",
184
- required: true,
185
- type: "string",
186
- description: "The table identifier (dbid).",
187
- },
188
- {
189
- name: "appId",
190
- in: "query",
191
- required: true,
192
- type: "string",
193
- description: "The unique identifier of the app containing the table.",
194
- },
195
- {
196
- name: "body",
197
- in: "body",
198
- required: true,
199
- schema: { $ref: "#/definitions/UpdateTableRequest" },
200
- },
201
- ],
202
- responses: {
203
- 200: {
204
- description: "Success - table updated",
205
- schema: { $ref: "#/definitions/Table" },
206
- },
207
- },
208
- },
209
- delete: {
210
- operationId: "deleteTable",
211
- summary: "Delete a table by ID",
212
- tags: ["Tables"],
213
- parameters: [
214
- {
215
- name: "tableId",
216
- in: "path",
217
- required: true,
218
- type: "string",
219
- description: "The table identifier (dbid).",
220
- },
221
- {
222
- name: "appId",
223
- in: "query",
224
- required: true,
225
- type: "string",
226
- description: "The unique identifier of the app containing the table.",
227
- },
228
- ],
229
- responses: {
230
- 200: {
231
- description: "Success - table deleted",
232
- schema: { $ref: "#/definitions/DeleteTableResponse" },
233
- },
234
- },
235
- },
236
- },
237
- "/records": {
238
- post: {
239
- operationId: "upsert",
240
- summary: "Upsert records in a table",
241
- tags: ["Records"],
242
- parameters: [
243
- {
244
- name: "body",
245
- in: "body",
246
- required: true,
247
- schema: { $ref: "#/definitions/UpsertRequest" },
248
- },
249
- ],
250
- responses: {
251
- 200: {
252
- description: "Success - all records processed successfully",
253
- schema: { $ref: "#/definitions/Upsert200Response" },
254
- },
255
- 207: {
256
- description: "Multi-Status - partial success with some errors",
257
- schema: { $ref: "#/definitions/Upsert207Response" },
258
- },
259
- },
260
- },
261
- delete: {
262
- operationId: "deleteRecords",
263
- summary: "Delete records in a table",
264
- tags: ["Records"],
265
- parameters: [
266
- {
267
- name: "body",
268
- in: "body",
269
- required: true,
270
- schema: { $ref: "#/definitions/DeleteRecordsRequest" },
271
- },
272
- ],
273
- responses: {
274
- 200: {
275
- description: "Success - records deleted",
276
- schema: { $ref: "#/definitions/DeleteRecords200Response" },
277
- },
278
- },
279
- },
280
- },
281
- "/records/query": {
282
- post: {
283
- operationId: "runQuery",
284
- summary: "Query records in a table",
285
- tags: ["Records"],
286
- parameters: [
287
- {
288
- name: "body",
289
- in: "body",
290
- required: true,
291
- schema: { $ref: "#/definitions/RunQueryRequest" },
292
- },
293
- ],
294
- responses: {
295
- 200: {
296
- description: "Success - records returned",
297
- schema: { $ref: "#/definitions/RunQueryResponse" },
298
- },
299
- },
300
- },
301
- },
302
- "/reports/{reportId}/run": {
303
- post: {
304
- operationId: "runReport",
305
- summary: "Run a report",
306
- tags: ["Reports"],
307
- parameters: [
308
- {
309
- name: "reportId",
310
- in: "path",
311
- required: true,
312
- type: "string",
313
- description: "The report identifier.",
314
- },
315
- {
316
- name: "generated",
317
- in: "body",
318
- required: true,
319
- schema: { type: "object" },
320
- },
321
- ],
322
- responses: {
323
- 200: {
324
- description: "Success",
325
- schema: {
326
- type: "array",
327
- items: { $ref: "#/definitions/ReportRunResponse" },
328
- },
329
- },
330
- },
331
- },
332
- },
333
- "/auth/temporary/{dbid}": {
334
- get: {
335
- operationId: "getTempTokenDBID",
336
- summary: "Get a temporary authorization token for a specific dbid",
337
- tags: ["Auth"],
338
- parameters: [
339
- {
340
- name: "dbid",
341
- in: "path",
342
- required: true,
343
- type: "string",
344
- description: "The database identifier (dbid).",
345
- },
346
- ],
347
- responses: {
348
- 200: {
349
- description: "Success",
350
- schema: { $ref: "#/definitions/GetTempTokenDBID200Response" },
351
- },
352
- },
353
- },
354
- },
355
- };