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
package/CHANGELOG.md CHANGED
@@ -2,6 +2,29 @@
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.4](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v1.1.0-beta.3...v1.1.0-beta.4) (2025-03-12)
6
+
7
+
8
+ ### Features
9
+
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))
19
+
20
+
21
+ ### Bug Fixes
22
+
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))
27
+
5
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)
6
29
 
7
30
  ### Features
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 fix-spec
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)