quickbase-js 1.0.1-beta.0 → 1.1.0-beta.0
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.
- package/CHANGELOG.md +24 -0
- package/dist/{quickbaseClient.d.ts → quickbase.d.ts} +344 -339
- package/dist/{quickbaseClient.js → quickbase.js} +350 -266
- package/dist/quickbase.js.map +1 -0
- package/log-gen.yaml +3565 -0
- package/package.json +11 -7
- package/rollup.config.js +2 -2
- package/src/code-generation/fix-spec-definitions.ts +417 -68
- package/src/code-generation/fix-spec-paths.ts +207 -2
- package/src/code-generation/output/quickbase-fixed.json +646 -1122
- package/src/generated-unified/QuickbaseClient.ts +9 -8
- package/src/log-gen.ts +82 -35
- package/src/quickbaseClient.ts +39 -42
- package/test-artifacts/test-results.json +173 -1145
- package/tests/playwright/qb/auth/cacheSwitching.test.ts +2 -2
- package/tests/playwright/qb/auth/fetchTempToken401.test.ts +2 -2
- package/tests/playwright/qb/auth/getAppWithUserToken.test.ts +2 -2
- package/tests/playwright/qb/auth/getTempToken.test.ts +2 -2
- package/tests/playwright/qb/auth/tokenPrefetch.test.ts +2 -2
- package/tests/playwright/qb/auth/tokenRenewal.test.ts +2 -2
- package/tests/setup.ts +16 -8
- package/tests/vitest/qb/apps/getApp.test.ts +37 -43
- package/tests/vitest/qb/records/deleteRecords.test.ts +78 -0
- package/tests/vitest/qb/records/upsert.test.ts +72 -0
- package/tests/vitest/qb/tables/createTable.test.ts +55 -0
- package/tests/vitest/qb/tables/deleteTable.test.ts +50 -0
- package/tests/vitest/qb/tables/getAppTables.test.ts +43 -64
- package/tests/vitest/qb/tables/getTable.test.ts +26 -0
- package/tests/vitest/qb/tables/updateTable.test.ts +48 -0
- package/tests/vitest/unit/apps/getApp.test.ts +1 -1
- package/tests/vitest/unit/auth/fetchTempToken401.test.ts +4 -3
- package/tests/vitest/unit/auth/getTempToken.test.ts +8 -9
- package/tests/vitest/unit/auth/retryOn401.test.ts +1 -1
- package/tests/vitest/unit/auth/two401s.test.ts +1 -1
- package/tests/vitest/unit/fields/getFields.test.ts +1 -1
- package/tests/vitest/unit/records/deleteRecords.test.ts +118 -0
- package/tests/vitest/unit/records/upsert.test.ts +228 -0
- package/tests/vitest/unit/tables/createTable.test.ts +62 -0
- package/tests/vitest/unit/tables/deleteTable.test.ts +68 -0
- package/tests/vitest/unit/tables/getAppTables.test.ts +1 -1
- package/tests/vitest/unit/tables/getTable.test.ts +212 -0
- package/tests/vitest/unit/tables/updateTable.test.ts +74 -0
- package/tsconfig.json +3 -2
- package/vitest.config.ts +3 -2
- package/dist/quickbaseClient.js.map +0 -1
- package/logGen.yaml +0 -1820
- package/src/utils.ts +0 -5
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
// src/code-generation/fix-spec-paths.ts
|
|
2
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
|
+
},
|
|
3
24
|
"/apps/{appId}": {
|
|
4
25
|
get: {
|
|
5
26
|
operationId: "getApp",
|
|
@@ -11,6 +32,7 @@ export const paths = {
|
|
|
11
32
|
in: "path",
|
|
12
33
|
required: true,
|
|
13
34
|
type: "string",
|
|
35
|
+
description: "The application identifier.",
|
|
14
36
|
},
|
|
15
37
|
],
|
|
16
38
|
responses: {
|
|
@@ -32,12 +54,14 @@ export const paths = {
|
|
|
32
54
|
in: "query",
|
|
33
55
|
required: true,
|
|
34
56
|
type: "string",
|
|
57
|
+
description: "The table identifier (dbid).",
|
|
35
58
|
},
|
|
36
59
|
{
|
|
37
60
|
name: "includeFieldPerms",
|
|
38
61
|
in: "query",
|
|
39
62
|
required: false,
|
|
40
63
|
type: "boolean",
|
|
64
|
+
description: "Whether to include field permissions.",
|
|
41
65
|
},
|
|
42
66
|
],
|
|
43
67
|
responses: {
|
|
@@ -62,6 +86,7 @@ export const paths = {
|
|
|
62
86
|
in: "query",
|
|
63
87
|
required: true,
|
|
64
88
|
type: "string",
|
|
89
|
+
description: "The application identifier.",
|
|
65
90
|
},
|
|
66
91
|
],
|
|
67
92
|
responses: {
|
|
@@ -74,11 +99,189 @@ export const paths = {
|
|
|
74
99
|
},
|
|
75
100
|
},
|
|
76
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
|
+
},
|
|
77
280
|
},
|
|
78
281
|
"/records/query": {
|
|
79
282
|
post: {
|
|
80
283
|
operationId: "upsertRecords",
|
|
81
|
-
summary: "Upsert records",
|
|
284
|
+
summary: "Upsert records (alternative endpoint)",
|
|
82
285
|
tags: ["Records"],
|
|
83
286
|
parameters: [
|
|
84
287
|
{
|
|
@@ -103,7 +306,7 @@ export const paths = {
|
|
|
103
306
|
description: "Multi-Status (partial success)",
|
|
104
307
|
schema: {
|
|
105
308
|
type: "array",
|
|
106
|
-
items: { $ref: "#/definitions/Upsert207Response" },
|
|
309
|
+
items: { $ref: "#/definitions/Upsert207Response" },
|
|
107
310
|
},
|
|
108
311
|
},
|
|
109
312
|
},
|
|
@@ -120,6 +323,7 @@ export const paths = {
|
|
|
120
323
|
in: "path",
|
|
121
324
|
required: true,
|
|
122
325
|
type: "string",
|
|
326
|
+
description: "The report identifier.",
|
|
123
327
|
},
|
|
124
328
|
{
|
|
125
329
|
name: "generated",
|
|
@@ -150,6 +354,7 @@ export const paths = {
|
|
|
150
354
|
in: "path",
|
|
151
355
|
required: true,
|
|
152
356
|
type: "string",
|
|
357
|
+
description: "The database identifier (dbid).",
|
|
153
358
|
},
|
|
154
359
|
],
|
|
155
360
|
responses: {
|