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.
- package/CHANGELOG.md +53 -22
- package/README.md +61 -5
- package/dist/quickbase.d.ts +1711 -613
- package/dist/quickbase.js +1469 -468
- package/dist/quickbase.js.map +1 -1
- package/examples/react.js +12 -12
- package/examples/vanillajs.html +12 -12
- package/log-gen.yaml +3558 -528
- package/package.json +12 -14
- package/playwright-results.txt/.last-run.json +4 -0
- package/playwright.config.ts +1 -1
- package/src/code-generation/definitions/apps.ts +274 -0
- package/src/code-generation/definitions/auth.ts +10 -0
- package/src/code-generation/definitions/fields.ts +751 -0
- package/src/code-generation/definitions/index.ts +18 -0
- package/src/code-generation/definitions/records.ts +269 -0
- package/src/code-generation/definitions/relationships.ts +90 -0
- package/src/code-generation/definitions/reports.ts +10 -0
- package/src/code-generation/definitions/tables.ts +112 -0
- package/src/code-generation/fix-spec-main.ts +2 -2
- package/src/code-generation/output/quickbase-fixed.json +1724 -3044
- package/src/code-generation/paths/apps.ts +100 -0
- package/src/code-generation/paths/auth.ts +25 -0
- package/src/code-generation/paths/fields.ts +207 -0
- package/src/code-generation/paths/index.ts +17 -0
- package/src/code-generation/paths/records.ts +68 -0
- package/src/code-generation/paths/relationships.ts +32 -0
- package/src/code-generation/paths/reports.ts +34 -0
- package/src/code-generation/paths/tables.ts +162 -0
- package/src/generated-unified/QuickbaseClient.ts +10 -8
- package/src/log-gen.ts +6 -2
- package/src/quickbaseClient.ts +35 -41
- package/tests/setup.ts +5 -1
- package/tests/vitest/qb/apps/copyApp.test.ts +76 -0
- package/tests/vitest/qb/apps/createApp.test.ts +64 -0
- package/tests/vitest/qb/apps/deleteApp.test.ts +76 -0
- package/tests/vitest/qb/fields/createField.test.ts +78 -0
- package/tests/vitest/qb/fields/deleteFields.test.ts +89 -0
- package/tests/vitest/qb/fields/getField.test.ts +85 -0
- package/tests/vitest/qb/fields/getFieldUsage.test.ts +174 -0
- package/tests/vitest/qb/fields/getFieldsUsage.test.ts +77 -0
- package/tests/vitest/qb/index.ts +25 -1
- package/tests/vitest/qb/records/deleteRecords.test.ts +42 -10
- package/tests/vitest/qb/records/runQuery.test.ts +81 -17
- package/tests/vitest/qb/records/upsert.test.ts +33 -3
- package/tests/vitest/qb/tables/getRelationships.test.ts +80 -0
- package/tests/vitest/unit/apps/copyApp.test.ts +282 -0
- package/tests/vitest/unit/apps/createApp.test.ts +125 -0
- package/tests/vitest/unit/apps/deleteApp.test.ts +215 -0
- package/tests/vitest/unit/fields/createField.test.ts +391 -0
- package/tests/vitest/unit/fields/deleteFields.test.ts +141 -0
- package/tests/vitest/unit/fields/getField.test.ts +189 -0
- package/tests/vitest/unit/fields/getFieldUsage.test.ts +147 -0
- package/tests/vitest/unit/fields/getFieldsUsage.test.ts +160 -0
- package/tests/vitest/unit/index.ts +30 -1
- package/tests/vitest/unit/tables/getRelationships.test.ts +259 -0
- package/src/code-generation/fix-spec-definitions.ts +0 -543
- package/src/code-generation/fix-spec-paths.ts +0 -355
- package/test-artifacts/test-results.json +0 -829
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "quickbase-js",
|
|
3
3
|
"main": "dist/quickbase.js",
|
|
4
4
|
"types": "dist/quickbase.d.ts",
|
|
5
|
-
"version": "1.1.0-beta.
|
|
5
|
+
"version": "1.1.0-beta.4",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
@@ -22,12 +22,13 @@
|
|
|
22
22
|
"release:push": "npm run release:beta && git push --follow-tags origin main",
|
|
23
23
|
"release:publish": "npm run release:push && npm publish --tag beta",
|
|
24
24
|
"fix-spec": "node --loader ts-node/esm src/code-generation/fix-spec-main.ts",
|
|
25
|
-
"regenerate": "rimraf src/generated && node --loader ts-node/esm src/code-generation/regenerate-client.ts",
|
|
26
|
-
"regenerate
|
|
27
|
-
"regenerate
|
|
25
|
+
"regenerate:openapi": "rimraf src/generated && node --loader ts-node/esm src/code-generation/regenerate-client.ts",
|
|
26
|
+
"regenerate:unified": "node --loader ts-node/esm src/code-generation/generate-unified-interface.ts",
|
|
27
|
+
"regenerate:all": "npm run fix-spec && npm run regenerate:openapi && npm run regenerate:unified",
|
|
28
28
|
"log-gen": "node --loader ts-node/esm src/log-gen.ts",
|
|
29
29
|
"build": "rimraf dist && rollup -c",
|
|
30
30
|
"build:prod": "rm -rf dist/* && NODE_ENV=production rollup -c",
|
|
31
|
+
"test:all": "vitest run tests/vitest/**/**/*.test.ts --reporter=basic && playwright test tests/playwright/qb --config playwright.config.ts --reporter=dot --quiet",
|
|
31
32
|
"test:pw:qb:all": "playwright test tests/playwright/qb --config playwright.config.ts",
|
|
32
33
|
"test:vitest:all": "vitest run tests/vitest/**/**/*.test.ts",
|
|
33
34
|
"test:vitest:qb": "vitest run tests/vitest/qb/**/*.test.ts",
|
|
@@ -35,17 +36,14 @@
|
|
|
35
36
|
"test:vitest:qb:apps": "vitest run tests/vitest/qb/apps/**/*.test.ts",
|
|
36
37
|
"test:vitest:qb:auth": "vitest run tests/vitest/qb/auth/**/*.test.ts",
|
|
37
38
|
"test:vitest:qb:fields": "vitest run tests/vitest/qb/fields/**/*.test.ts",
|
|
39
|
+
"test:vitest:qb:records": "vitest run tests/vitest/qb/records/**/*.test.ts",
|
|
38
40
|
"test:vitest:qb:tables": "vitest run tests/vitest/qb/tables/**/*.test.ts",
|
|
39
|
-
"test:
|
|
40
|
-
"test
|
|
41
|
-
"test:
|
|
42
|
-
"test:
|
|
43
|
-
"test:
|
|
44
|
-
"test:pw:qb:auth
|
|
45
|
-
"test:pw:qb:auth:debug": "playwright test tests/playwright/qb/auth --headed --debug",
|
|
46
|
-
"test:pw:qb:auth:temp:debug": "playwright test tests/playwright/qb/auth/getTempToken.test.ts --headed --debug",
|
|
47
|
-
"test:pw:qb:auth:renewal:debug": "playwright test tests/playwright/qb/auth/tokenRenewal.test.ts --headed --debug --config=playwright.config.ts",
|
|
48
|
-
"test:pw:qb:auth:cache:debug": "playwright test tests/playwright/qb/auth/cacheSwitching.test.ts --headed --debug"
|
|
41
|
+
"test:vitest:unit:apps": "vitest run tests/vitest/unit/apps/**/*.test.ts",
|
|
42
|
+
"test:vitest:unit:auth": "vitest run tests/vitest/unit/auth/**/*.test.ts",
|
|
43
|
+
"test:vitest:unit:fields": "vitest run tests/vitest/unit/fields/**/*.test.ts",
|
|
44
|
+
"test:vitest:unit:records": "vitest run tests/vitest/unit/records/**/*.test.ts",
|
|
45
|
+
"test:vitest:unit:tables": "vitest run tests/vitest/unit/tables/**/*.test.ts",
|
|
46
|
+
"test:pw:qb:auth": "playwright test tests/playwright/qb/auth"
|
|
49
47
|
},
|
|
50
48
|
"dependencies": {
|
|
51
49
|
"typescript": "^5.8.2"
|
package/playwright.config.ts
CHANGED
|
@@ -29,7 +29,7 @@ const config = defineConfig({
|
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
console.log(
|
|
32
|
-
`Loading Playwright
|
|
32
|
+
`Loading Playwright: Testing temp token authorization in browser. Be patient, this should take at least 5min. Workers: ${
|
|
33
33
|
config.workers || "default (half CPU cores)"
|
|
34
34
|
}`
|
|
35
35
|
);
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
// src/code-generation/definitions/apps.ts
|
|
2
|
+
export const appsDefinitions = {
|
|
3
|
+
App: {
|
|
4
|
+
type: "object",
|
|
5
|
+
required: ["id", "name"],
|
|
6
|
+
properties: {
|
|
7
|
+
id: { type: "string" },
|
|
8
|
+
name: { type: "string" },
|
|
9
|
+
created: { type: "string", format: "date-time" },
|
|
10
|
+
updated: { type: "string", format: "date-time" },
|
|
11
|
+
description: { type: "string" },
|
|
12
|
+
timeZone: { type: "string" },
|
|
13
|
+
dateFormat: { type: "string" },
|
|
14
|
+
hasEveryoneOnTheInternet: { type: "boolean" },
|
|
15
|
+
memoryInfo: { $ref: "#/definitions/AppMemoryInfo" },
|
|
16
|
+
securityProperties: { $ref: "#/definitions/AppSecurityProperties" },
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
AppMemoryInfo: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {
|
|
22
|
+
estMemory: { type: "number" },
|
|
23
|
+
estMemoryInclDependentApps: { type: "number" },
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
AppSecurityProperties: {
|
|
27
|
+
type: "object",
|
|
28
|
+
properties: {
|
|
29
|
+
allowClone: { type: "boolean" },
|
|
30
|
+
allowExport: { type: "boolean" },
|
|
31
|
+
enableAppTokens: { type: "boolean" },
|
|
32
|
+
hideFromPublic: { type: "boolean" },
|
|
33
|
+
mustBeRealmApproved: { type: "boolean" },
|
|
34
|
+
useIPFilter: { type: "boolean" },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
CreateAppRequest: {
|
|
38
|
+
type: "object",
|
|
39
|
+
required: ["name"],
|
|
40
|
+
properties: {
|
|
41
|
+
name: {
|
|
42
|
+
type: "string",
|
|
43
|
+
description:
|
|
44
|
+
"The app name. Multiple apps with the same name are allowed in the same realm.",
|
|
45
|
+
},
|
|
46
|
+
assignToken: {
|
|
47
|
+
type: "boolean",
|
|
48
|
+
description:
|
|
49
|
+
"Set to true to assign the app to the user token used to create it. Default is false.",
|
|
50
|
+
},
|
|
51
|
+
description: {
|
|
52
|
+
type: "string",
|
|
53
|
+
description:
|
|
54
|
+
"The description for the app. Defaults to blank if omitted.",
|
|
55
|
+
},
|
|
56
|
+
securityProperties: {
|
|
57
|
+
$ref: "#/definitions/AppSecurityProperties",
|
|
58
|
+
description: "Application security properties.",
|
|
59
|
+
},
|
|
60
|
+
variables: {
|
|
61
|
+
type: "array",
|
|
62
|
+
items: {
|
|
63
|
+
type: "object",
|
|
64
|
+
properties: {
|
|
65
|
+
name: { type: "string" },
|
|
66
|
+
value: { type: "string" },
|
|
67
|
+
},
|
|
68
|
+
required: ["name", "value"],
|
|
69
|
+
},
|
|
70
|
+
description:
|
|
71
|
+
"App variables (max 10, optional). See About Application Variables.",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
CreateApp200Response: {
|
|
76
|
+
type: "object",
|
|
77
|
+
properties: {
|
|
78
|
+
id: {
|
|
79
|
+
type: "string",
|
|
80
|
+
description: "The unique identifier for this application.",
|
|
81
|
+
},
|
|
82
|
+
name: { type: "string", description: "The app name." },
|
|
83
|
+
description: {
|
|
84
|
+
type: "string",
|
|
85
|
+
description: "The description for the app.",
|
|
86
|
+
},
|
|
87
|
+
created: {
|
|
88
|
+
type: "string",
|
|
89
|
+
format: "date-time",
|
|
90
|
+
description: "The time and date the app was created (ISO 8601, UTC).",
|
|
91
|
+
},
|
|
92
|
+
updated: {
|
|
93
|
+
type: "string",
|
|
94
|
+
format: "date-time",
|
|
95
|
+
description:
|
|
96
|
+
"The time and date the app was last updated (ISO 8601, UTC).",
|
|
97
|
+
},
|
|
98
|
+
dateFormat: {
|
|
99
|
+
type: "string",
|
|
100
|
+
description:
|
|
101
|
+
"The format used for displaying dates in the app (e.g., MM-DD-YYYY).",
|
|
102
|
+
},
|
|
103
|
+
timeZone: {
|
|
104
|
+
type: "string",
|
|
105
|
+
description:
|
|
106
|
+
"The time zone used for displaying time values (e.g., (UTC-08:00) Pacific Time).",
|
|
107
|
+
},
|
|
108
|
+
memoryInfo: {
|
|
109
|
+
$ref: "#/definitions/AppMemoryInfo",
|
|
110
|
+
description: "Application memory information.",
|
|
111
|
+
},
|
|
112
|
+
hasEveryoneOnTheInternet: {
|
|
113
|
+
type: "boolean",
|
|
114
|
+
description:
|
|
115
|
+
"Indicates if the app includes Everyone On The Internet access.",
|
|
116
|
+
},
|
|
117
|
+
variables: {
|
|
118
|
+
type: "array",
|
|
119
|
+
items: {
|
|
120
|
+
type: "object",
|
|
121
|
+
properties: {
|
|
122
|
+
name: { type: "string" },
|
|
123
|
+
value: { type: "string" },
|
|
124
|
+
},
|
|
125
|
+
required: ["name", "value"],
|
|
126
|
+
},
|
|
127
|
+
description: "The app variables.",
|
|
128
|
+
},
|
|
129
|
+
dataClassification: {
|
|
130
|
+
type: "string",
|
|
131
|
+
description:
|
|
132
|
+
"The Data Classification label assigned to the app (optional, may be 'None').",
|
|
133
|
+
},
|
|
134
|
+
securityProperties: {
|
|
135
|
+
$ref: "#/definitions/AppSecurityProperties",
|
|
136
|
+
description: "Security properties of the application.",
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
required: ["id", "name"],
|
|
140
|
+
},
|
|
141
|
+
CopyAppRequest: {
|
|
142
|
+
type: "object",
|
|
143
|
+
required: ["name"],
|
|
144
|
+
properties: {
|
|
145
|
+
name: {
|
|
146
|
+
type: "string",
|
|
147
|
+
description: "The name of the newly copied app.",
|
|
148
|
+
},
|
|
149
|
+
description: {
|
|
150
|
+
type: "string",
|
|
151
|
+
description: "The description of the newly copied app.",
|
|
152
|
+
},
|
|
153
|
+
properties: {
|
|
154
|
+
type: "object",
|
|
155
|
+
properties: {
|
|
156
|
+
keepData: {
|
|
157
|
+
type: "boolean",
|
|
158
|
+
description:
|
|
159
|
+
"Whether to copy the app's data along with the schema.",
|
|
160
|
+
},
|
|
161
|
+
excludeFiles: {
|
|
162
|
+
type: "boolean",
|
|
163
|
+
description:
|
|
164
|
+
"If keepData is true, whether to copy file attachments. Ignored if keepData is false.",
|
|
165
|
+
},
|
|
166
|
+
usersAndRoles: {
|
|
167
|
+
type: "boolean",
|
|
168
|
+
description:
|
|
169
|
+
"If true, users will be copied along with their assigned roles. If false, users and roles will be copied but roles will not be assigned.",
|
|
170
|
+
},
|
|
171
|
+
assignUserToken: {
|
|
172
|
+
type: "boolean",
|
|
173
|
+
description:
|
|
174
|
+
"Whether to add the user token used to make this request to the new app.",
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
description:
|
|
178
|
+
"The configuration properties for performing the app copy.",
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
description: "Request body for copying an existing application.",
|
|
182
|
+
},
|
|
183
|
+
CopyApp200Response: {
|
|
184
|
+
type: "object",
|
|
185
|
+
required: ["id", "name"],
|
|
186
|
+
properties: {
|
|
187
|
+
id: {
|
|
188
|
+
type: "string",
|
|
189
|
+
description: "The unique identifier for the copied application.",
|
|
190
|
+
},
|
|
191
|
+
name: {
|
|
192
|
+
type: "string",
|
|
193
|
+
description:
|
|
194
|
+
"The app name. Multiple apps with the same name are allowed in the same realm.",
|
|
195
|
+
},
|
|
196
|
+
description: {
|
|
197
|
+
type: "string",
|
|
198
|
+
description: "The description for the app.",
|
|
199
|
+
},
|
|
200
|
+
created: {
|
|
201
|
+
type: "string",
|
|
202
|
+
format: "date-time",
|
|
203
|
+
description: "The time and date the app was created (ISO 8601, UTC).",
|
|
204
|
+
},
|
|
205
|
+
updated: {
|
|
206
|
+
type: "string",
|
|
207
|
+
format: "date-time",
|
|
208
|
+
description:
|
|
209
|
+
"The time and date the app was last updated (ISO 8601, UTC).",
|
|
210
|
+
},
|
|
211
|
+
dateFormat: {
|
|
212
|
+
type: "string",
|
|
213
|
+
description:
|
|
214
|
+
"The format used for displaying dates in the app (e.g., MM-DD-YYYY).",
|
|
215
|
+
},
|
|
216
|
+
timeZone: {
|
|
217
|
+
type: "string",
|
|
218
|
+
description:
|
|
219
|
+
"The time zone used for displaying time values (e.g., (UTC-08:00) Pacific Time).",
|
|
220
|
+
},
|
|
221
|
+
hasEveryoneOnTheInternet: {
|
|
222
|
+
type: "boolean",
|
|
223
|
+
description:
|
|
224
|
+
"Indicates if the app includes Everyone On The Internet access.",
|
|
225
|
+
},
|
|
226
|
+
variables: {
|
|
227
|
+
type: "array",
|
|
228
|
+
items: {
|
|
229
|
+
type: "object",
|
|
230
|
+
properties: {
|
|
231
|
+
name: { type: "string" },
|
|
232
|
+
value: { type: "string" },
|
|
233
|
+
},
|
|
234
|
+
required: ["name", "value"],
|
|
235
|
+
},
|
|
236
|
+
description: "The app variables.",
|
|
237
|
+
},
|
|
238
|
+
ancestorId: {
|
|
239
|
+
type: "string",
|
|
240
|
+
description: "The id of the app from which this app was copied.",
|
|
241
|
+
},
|
|
242
|
+
dataClassification: {
|
|
243
|
+
type: "string",
|
|
244
|
+
description:
|
|
245
|
+
"The Data Classification label assigned to the app (optional, may be 'None').",
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
description: "Response body for successful app copy operation.",
|
|
249
|
+
},
|
|
250
|
+
DeleteAppRequest: {
|
|
251
|
+
type: "object",
|
|
252
|
+
required: ["name"],
|
|
253
|
+
properties: {
|
|
254
|
+
name: {
|
|
255
|
+
type: "string",
|
|
256
|
+
description:
|
|
257
|
+
"The name of the application to delete, required for confirmation.",
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
description:
|
|
261
|
+
"Request body for deleting an application, requiring the app name for confirmation.",
|
|
262
|
+
},
|
|
263
|
+
DeleteApp200Response: {
|
|
264
|
+
type: "object",
|
|
265
|
+
properties: {
|
|
266
|
+
deletedAppId: {
|
|
267
|
+
type: "string",
|
|
268
|
+
description: "The ID of the deleted application.",
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
required: ["deletedAppId"],
|
|
272
|
+
description: "Response body for successful deletion of an application.",
|
|
273
|
+
},
|
|
274
|
+
};
|