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/CHANGELOG.md
CHANGED
|
@@ -2,45 +2,76 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
-
## [1.1.0-beta.
|
|
6
|
-
|
|
7
|
-
## [1.1.0-beta.1](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v1.1.0-beta.0...v1.1.0-beta.1) (2025-03-11)
|
|
5
|
+
## [1.1.0-beta.4](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v1.1.0-beta.3...v1.1.0-beta.4) (2025-03-12)
|
|
8
6
|
|
|
9
7
|
|
|
10
8
|
### Features
|
|
11
9
|
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* createField and deleteFields tests are passing ([4b47c4d](https://github.com/DrewBradfordXYZ/quickbase-js/commit/4b47c4deb9b3d731e6e7938c12fcebe97830568b))
|
|
11
|
+
* createField mock and integration tests pass ([b227c73](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b227c73b08f7efa5ce5f3d0c2897f82c8976a009))
|
|
12
|
+
* deleteFields spec update ([1f8beca](https://github.com/DrewBradfordXYZ/quickbase-js/commit/1f8becaca0d6b7950648c1b9bc2b0215781fa829))
|
|
13
|
+
* getFeildsUsage.test.ts unit and integration tests pass ([82a4886](https://github.com/DrewBradfordXYZ/quickbase-js/commit/82a488622967ec24a8767cbb19c59ef4ce808749))
|
|
14
|
+
* getField.test.ts unit and integration tests pass ([3e50b70](https://github.com/DrewBradfordXYZ/quickbase-js/commit/3e50b704f0ebea47f2fee3d02d811ea1b43db6c4))
|
|
15
|
+
* getFieldsUsage fix spec ([031faaa](https://github.com/DrewBradfordXYZ/quickbase-js/commit/031faaaeab9597f35fdd1ddcf5157ce5d774390b))
|
|
16
|
+
* getFieldUsage spec and unit test pass ([ac2824b](https://github.com/DrewBradfordXYZ/quickbase-js/commit/ac2824b226140dde99e33cf594d57bd6ffd4dc39))
|
|
17
|
+
* getFieldUsage unit and integration tests pass ([e62b586](https://github.com/DrewBradfordXYZ/quickbase-js/commit/e62b586d534620479a25dda2796ba5dcb8043705))
|
|
18
|
+
* split up fix-spec-paths and fix-spec-definitions into many files ([20d3246](https://github.com/DrewBradfordXYZ/quickbase-js/commit/20d32464e6337028778845fa55fbb19c5543f7eb))
|
|
14
19
|
|
|
15
20
|
|
|
16
21
|
### Bug Fixes
|
|
17
22
|
|
|
18
|
-
*
|
|
19
|
-
*
|
|
23
|
+
* cleanup createField.test.ts logging ([7b1306b](https://github.com/DrewBradfordXYZ/quickbase-js/commit/7b1306bd8eb49e2c932ce267f33457e949e0f74b))
|
|
24
|
+
* createField test syntax update ([043f964](https://github.com/DrewBradfordXYZ/quickbase-js/commit/043f964a47346878440eb73cc10c110dab904ad7))
|
|
25
|
+
* getFieldsUsage type fix ([4c6f271](https://github.com/DrewBradfordXYZ/quickbase-js/commit/4c6f271d123131ae13a236664f28fbbdfde3d564))
|
|
26
|
+
* update deleteFields error type spec ([1788e1c](https://github.com/DrewBradfordXYZ/quickbase-js/commit/1788e1ce6d4d2c8df871ec8b112be908d706f884))
|
|
20
27
|
|
|
21
|
-
## [1.1.0-beta.
|
|
28
|
+
## [1.1.0-beta.3](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v1.1.0-beta.2...v1.1.0-beta.3) (2025-03-11)
|
|
22
29
|
|
|
30
|
+
### Features
|
|
31
|
+
|
|
32
|
+
- copyApp fix-spec updates ([4c10ab4](https://github.com/DrewBradfordXYZ/quickbase-js/commit/4c10ab41464df047402a207c7b9e81026a7b6202))
|
|
33
|
+
- copyApp unit test passes ([b121bf1](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b121bf1d0130f338f131de5417896d798fe90db3))
|
|
34
|
+
- deleteApp fix spec added ([b27ce11](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b27ce11e2b08bc631d7656dedec57f6f5e579450))
|
|
35
|
+
- fix-spec-\* for getRelationship interface ([aad9fbd](https://github.com/DrewBradfordXYZ/quickbase-js/commit/aad9fbd7fc92b8aaaef901174c81169543ae86d2))
|
|
36
|
+
- getRelationship unit and integration test pass ([a1269bb](https://github.com/DrewBradfordXYZ/quickbase-js/commit/a1269bb60523944bdf5030404539043c967f0b83))
|
|
37
|
+
- updated Upsert200Response and Upsert207Response, deleteRecords.test.ts integration type issues resolved ([d39dad5](https://github.com/DrewBradfordXYZ/quickbase-js/commit/d39dad55d783d280db9dbae2ca4c782df3a1f12e))
|
|
38
|
+
- usertokens 401s do not generate a token, createApp unit and integration tests, deleteApp integration tests pass ([e3a092d](https://github.com/DrewBradfordXYZ/quickbase-js/commit/e3a092d76f283d5c5200ddbb5afd32782fc15379))
|
|
39
|
+
|
|
40
|
+
## [1.1.0-beta.2](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v1.1.0-beta.1...v1.1.0-beta.2) (2025-03-11)
|
|
41
|
+
|
|
42
|
+
## [1.1.0-beta.1](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v1.1.0-beta.0...v1.1.0-beta.1) (2025-03-11)
|
|
23
43
|
|
|
24
44
|
### Features
|
|
25
45
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
46
|
+
- runQuery.test.ts integration test pass ([180b17f](https://github.com/DrewBradfordXYZ/quickbase-js/commit/180b17f265c26a0d23bde3ca6993bad1ba4f65ee))
|
|
47
|
+
- runQuery.test.ts unit test pass ([84e2fc4](https://github.com/DrewBradfordXYZ/quickbase-js/commit/84e2fc4f237d5f558fcd20d7b6b8eb83f685d7ac))
|
|
48
|
+
|
|
49
|
+
### Bug Fixes
|
|
50
|
+
|
|
51
|
+
- added stub variables to unit tests ([d84b534](https://github.com/DrewBradfordXYZ/quickbase-js/commit/d84b5344201300d8d59e622b025d96ad9813d4eb))
|
|
52
|
+
- create env stubs for mock tests and update getTables.test.ts ([3d31c9e](https://github.com/DrewBradfordXYZ/quickbase-js/commit/3d31c9ebc9f852b99d1a807759490055d75c6396))
|
|
53
|
+
|
|
54
|
+
## [1.1.0-beta.0](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v1.0.1-beta.0...v1.1.0-beta.0) (2025-03-11)
|
|
55
|
+
|
|
56
|
+
### Features
|
|
31
57
|
|
|
58
|
+
- add deleteTable integration test with 404 verification ([277aec6](https://github.com/DrewBradfordXYZ/quickbase-js/commit/277aec66a3047fab687ce81ad42b9371e8c2bf56))
|
|
59
|
+
- deleteRecords integration and unit tests ([d3beba1](https://github.com/DrewBradfordXYZ/quickbase-js/commit/d3beba1a362b13166b38f59eeea83c289ddaf999))
|
|
60
|
+
- integration tests for deleteRecords and upsert pass ([759978b](https://github.com/DrewBradfordXYZ/quickbase-js/commit/759978bc13cb1c50c03770232eb02a1c3c08428d))
|
|
61
|
+
- mock deleteRecords passes ([a167028](https://github.com/DrewBradfordXYZ/quickbase-js/commit/a1670286def030950c568e92ca99ea12e20d5b62))
|
|
62
|
+
- upsert mock test passes ([dde6d07](https://github.com/DrewBradfordXYZ/quickbase-js/commit/dde6d07d4c4c73bd14189f87fdc6347744004e4e))
|
|
32
63
|
|
|
33
64
|
### Bug Fixes
|
|
34
65
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
66
|
+
- all vitests are passing again ([7206ba3](https://github.com/DrewBradfordXYZ/quickbase-js/commit/7206ba3f28bd7a3c7f5d699988e9a9a1f0053f42))
|
|
67
|
+
- fix-spec and test updates for createTable ([9c0cdd3](https://github.com/DrewBradfordXYZ/quickbase-js/commit/9c0cdd3b707971e6fb8f3e73598e3a600ff2b33d))
|
|
68
|
+
- fix-spec for upsertRecords and createApp ([d12de40](https://github.com/DrewBradfordXYZ/quickbase-js/commit/d12de40feac35e5d86a0b7d5019d8058cdfcffd9))
|
|
69
|
+
- fix-spec getTable ([1eb936c](https://github.com/DrewBradfordXYZ/quickbase-js/commit/1eb936c360ce5df4818b8d5ef7ccf4dc6b769af0))
|
|
70
|
+
- fix-spec getTable deleteTable ([236349a](https://github.com/DrewBradfordXYZ/quickbase-js/commit/236349af9e30776e00754232d83d76e065aab00b))
|
|
71
|
+
- fix-spec updates for createApp ([3614958](https://github.com/DrewBradfordXYZ/quickbase-js/commit/36149589ff2544ec50a82d9dc9b183f15d07778d))
|
|
72
|
+
- fix-spec updateTable ([26e278c](https://github.com/DrewBradfordXYZ/quickbase-js/commit/26e278cdbbe96d33e51f14e90ebb2c8b47d70f07))
|
|
73
|
+
- getTables test pass, change order for extractDbid to assign temp token dbid ([37b7685](https://github.com/DrewBradfordXYZ/quickbase-js/commit/37b7685d55a0f64e62cb91ad23df28d4916d5a50))
|
|
74
|
+
- upsert unit test type fixes ([8460cc8](https://github.com/DrewBradfordXYZ/quickbase-js/commit/8460cc8e63564bc8602dc12a9b6415094cc215f0))
|
|
44
75
|
|
|
45
76
|
### 1.0.1-beta.0 (2025-03-10)
|
|
46
77
|
|
package/README.md
CHANGED
|
@@ -1,14 +1,70 @@
|
|
|
1
1
|
# quickbase-js
|
|
2
2
|
|
|
3
|
+
# Installation
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install --save quickbase-js
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<!DOCTYPE html>
|
|
13
|
+
<html>
|
|
14
|
+
<head>
|
|
15
|
+
<title>Quickbase Test</title>
|
|
16
|
+
</head>
|
|
17
|
+
|
|
18
|
+
<body>
|
|
19
|
+
<div>
|
|
20
|
+
<h1>Quickbase Test</h1>
|
|
21
|
+
<p id="result">Loading...</p>
|
|
22
|
+
</div>
|
|
23
|
+
<script type="module">
|
|
24
|
+
import { quickbase } from "quickbase-js";
|
|
25
|
+
// Initalize the QuickBase client
|
|
26
|
+
const qb = quickbase({
|
|
27
|
+
realm: "your-realm", // Replace with actual QuickBase realm
|
|
28
|
+
// ## ------------------------------
|
|
29
|
+
// ## Authentication Options
|
|
30
|
+
// ## ----------------------------
|
|
31
|
+
// ## OPTION 1: User Token Authentication
|
|
32
|
+
// ## - Use this if you have a QuickBase user token.
|
|
33
|
+
// ## - Works in Node.js or browsers, ideal for standalone apps or testing outside QuickBase
|
|
34
|
+
// ## - Uncomment the line below and replace with your token; comment out 'useTempTokens'
|
|
35
|
+
// userToken: "your-user-token",
|
|
36
|
+
|
|
37
|
+
// ## ----------------------------
|
|
38
|
+
// ## OPTION 2: Temporary Token Authentication
|
|
39
|
+
// ## - Use this for QuickBase code pages, leveraging the browser’s authenticated session
|
|
40
|
+
// ## - No user token needed; requires running in a QuickBase browser context
|
|
41
|
+
// ## - Uncomment the line below and comment out 'userToken' if using this option
|
|
42
|
+
// useTempTokens: true,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// Fetch the app
|
|
46
|
+
qb.getApp({ appId: "your-app-id" }) // Replace with actual app ID
|
|
47
|
+
.then((app) => {
|
|
48
|
+
document.getElementById(
|
|
49
|
+
"result"
|
|
50
|
+
).textContent = `App Name: ${app.name}`;
|
|
51
|
+
})
|
|
52
|
+
.catch((err) => {
|
|
53
|
+
console.error("Error fetching app:", err);
|
|
54
|
+
document.getElementById("result").textContent =
|
|
55
|
+
err.message || "Failed to load app";
|
|
56
|
+
});
|
|
57
|
+
</script>
|
|
58
|
+
</body>
|
|
59
|
+
</html>
|
|
60
|
+
```
|
|
61
|
+
|
|
3
62
|
# Development workflow
|
|
4
63
|
|
|
5
64
|
```bash
|
|
6
|
-
npm run
|
|
7
|
-
npm run regenerate
|
|
8
|
-
npm run generate-unified
|
|
65
|
+
npm run regenerate:all
|
|
9
66
|
npm run build
|
|
10
|
-
npm run test
|
|
11
|
-
npm run test:pw:qb:all
|
|
67
|
+
npm run test:all
|
|
12
68
|
```
|
|
13
69
|
|
|
14
70
|
## In QuickBase Code Pages (Browser Environment)
|