quickbase-js 0.1.0-beta.8 → 1.0.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.
Files changed (132) hide show
  1. package/README.md +252 -126
  2. package/dist/esm/quickbase.d.ts +2725 -2689
  3. package/dist/esm/quickbase.js +1763 -3524
  4. package/dist/esm/quickbase.js.map +1 -1
  5. package/dist/esm/quickbase.min.js +1 -1
  6. package/dist/esm/quickbase.min.js.map +1 -1
  7. package/dist/umd/quickbase.umd.js +1762 -3706
  8. package/dist/umd/quickbase.umd.js.map +1 -1
  9. package/dist/umd/quickbase.umd.min.js +1 -1
  10. package/dist/umd/quickbase.umd.min.js.map +1 -1
  11. package/package.json +27 -12
  12. package/CHANGELOG.md +0 -155
  13. package/build-common.js +0 -131
  14. package/build-esm.js +0 -71
  15. package/build-umd.js +0 -69
  16. package/examples/quicbase-jsCDN.html +0 -36
  17. package/examples/react.js +0 -48
  18. package/examples/vanillajs.html +0 -47
  19. package/open-api/fix-spec-main.ts +0 -97
  20. package/open-api/generate-override-report.ts +0 -214
  21. package/open-api/generate-unified-interface.ts +0 -256
  22. package/open-api/output/override-report.html +0 -11
  23. package/open-api/output/override-report.json +0 -14395
  24. package/open-api/output/quickbase-fixed.json +0 -11191
  25. package/open-api/regenerate-client.ts +0 -116
  26. package/open-api/schema/enhance-general.ts +0 -100
  27. package/open-api/schema/fix-arrays.ts +0 -69
  28. package/open-api/schema/tags/apps.ts +0 -90
  29. package/open-api/schema/tags/fields.ts +0 -471
  30. package/open-api/schema/tags/groups.ts +0 -51
  31. package/open-api/schema/tags/index.ts +0 -66
  32. package/open-api/schema/tags/records.ts +0 -115
  33. package/open-api/schema/tags/tables.ts +0 -211
  34. package/open-api/schema/tags/users.ts +0 -47
  35. package/open-api/types/spec.ts +0 -42
  36. package/open-api/utils/infer-schema.ts +0 -40
  37. package/open-api/utils/naming.ts +0 -10
  38. package/playwright.config.ts +0 -37
  39. package/rollup.config.js +0 -114
  40. package/specs/QuickBase_RESTful_API_2025-03-04T06_22_39.725Z.json +0 -46878
  41. package/specs/split/apps.json +0 -1315
  42. package/specs/split/auth.json +0 -191
  43. package/specs/split/fields.json +0 -3869
  44. package/specs/split/records.json +0 -754
  45. package/specs/split/reports.json +0 -619
  46. package/specs/split/tables.json +0 -1605
  47. package/src/RateLimitError.ts +0 -12
  48. package/src/ThrottleBucket.ts +0 -36
  49. package/src/generated-unified/QuickbaseClient.ts +0 -359
  50. package/src/generated-unified/missing-types-report.json +0 -3
  51. package/src/index.ts +0 -1
  52. package/src/invokeMethod.ts +0 -357
  53. package/src/quickbaseClient.ts +0 -244
  54. package/src/tokenCache.ts +0 -51
  55. package/src/utils.ts +0 -7
  56. package/test-esm.js +0 -1
  57. package/test-results.json +0 -2050
  58. package/test-umd.js +0 -1
  59. package/test.ts +0 -1
  60. package/tests/playwright/qb/auth/cacheSwitching.test.ts +0 -159
  61. package/tests/playwright/qb/auth/fetchTempToken401.test.ts +0 -219
  62. package/tests/playwright/qb/auth/getAppWithTempToken.test.ts +0 -162
  63. package/tests/playwright/qb/auth/getAppWithUserToken.test.ts +0 -153
  64. package/tests/playwright/qb/auth/getTempToken.test.ts +0 -152
  65. package/tests/playwright/qb/auth/tempTokenPrefetch.test.ts +0 -179
  66. package/tests/playwright/qb/auth/tempTokenRenewal.test.ts +0 -133
  67. package/tests/setup.ts +0 -53
  68. package/tests/vitest/qb/apps/copyApp.test.ts +0 -76
  69. package/tests/vitest/qb/apps/createApp.test.ts +0 -64
  70. package/tests/vitest/qb/apps/deleteApp.test.ts +0 -76
  71. package/tests/vitest/qb/apps/getApp.test.ts +0 -44
  72. package/tests/vitest/qb/apps/getAppEvents.test.ts +0 -67
  73. package/tests/vitest/qb/apps/updateApp.test.ts +0 -58
  74. package/tests/vitest/qb/auth/retryUserToken401.test.ts +0 -56
  75. package/tests/vitest/qb/fields/createField.test.ts +0 -77
  76. package/tests/vitest/qb/fields/deleteFields.test.ts +0 -83
  77. package/tests/vitest/qb/fields/getField.test.ts +0 -85
  78. package/tests/vitest/qb/fields/getFieldUsage.test.ts +0 -174
  79. package/tests/vitest/qb/fields/getFields.test.ts +0 -232
  80. package/tests/vitest/qb/fields/getFieldsUsage.test.ts +0 -77
  81. package/tests/vitest/qb/fields/updateField.test.ts +0 -93
  82. package/tests/vitest/qb/index.ts +0 -29
  83. package/tests/vitest/qb/records/deleteRecords.test.ts +0 -110
  84. package/tests/vitest/qb/records/runQuery.test.ts +0 -146
  85. package/tests/vitest/qb/records/upsert.test.ts +0 -102
  86. package/tests/vitest/qb/tables/createTable.test.ts +0 -55
  87. package/tests/vitest/qb/tables/deleteTable.test.ts +0 -50
  88. package/tests/vitest/qb/tables/getAppTables.test.ts +0 -46
  89. package/tests/vitest/qb/tables/getRelationships.test.ts +0 -80
  90. package/tests/vitest/qb/tables/getTable.test.ts +0 -26
  91. package/tests/vitest/qb/tables/updateRelationship.test.ts +0 -277
  92. package/tests/vitest/qb/tables/updateTable.test.ts +0 -48
  93. package/tests/vitest/unit/apps/copyApp.test.ts +0 -488
  94. package/tests/vitest/unit/apps/createApp.test.ts +0 -186
  95. package/tests/vitest/unit/apps/deleteApp.test.ts +0 -216
  96. package/tests/vitest/unit/apps/getApp.test.ts +0 -128
  97. package/tests/vitest/unit/apps/getAppEvents.test.ts +0 -193
  98. package/tests/vitest/unit/apps/updateApp.test.ts +0 -381
  99. package/tests/vitest/unit/auth/fetchTempToken401.test.ts +0 -62
  100. package/tests/vitest/unit/auth/getTempToken.test.ts +0 -95
  101. package/tests/vitest/unit/auth/retryTempToken401.test.ts +0 -113
  102. package/tests/vitest/unit/auth/retryTempTokenTwo401.test.ts +0 -81
  103. package/tests/vitest/unit/auth/retryUserToken401.test.ts +0 -56
  104. package/tests/vitest/unit/fields/createField.test.ts +0 -387
  105. package/tests/vitest/unit/fields/deleteFields.test.ts +0 -141
  106. package/tests/vitest/unit/fields/getField.test.ts +0 -189
  107. package/tests/vitest/unit/fields/getFieldUsage.test.ts +0 -166
  108. package/tests/vitest/unit/fields/getFields.test.ts +0 -122
  109. package/tests/vitest/unit/fields/getFieldsUsage.test.ts +0 -160
  110. package/tests/vitest/unit/fields/updateField.test.ts +0 -280
  111. package/tests/vitest/unit/index.ts +0 -33
  112. package/tests/vitest/unit/rateLimit.test.ts +0 -189
  113. package/tests/vitest/unit/records/deleteRecords.test.ts +0 -112
  114. package/tests/vitest/unit/records/runQuery.test.ts +0 -102
  115. package/tests/vitest/unit/records/upsert.test.ts +0 -234
  116. package/tests/vitest/unit/tables/createTable.test.ts +0 -70
  117. package/tests/vitest/unit/tables/deleteTable.test.ts +0 -77
  118. package/tests/vitest/unit/tables/getAppTables.test.ts +0 -85
  119. package/tests/vitest/unit/tables/getRelationships.test.ts +0 -259
  120. package/tests/vitest/unit/tables/getTable.test.ts +0 -233
  121. package/tests/vitest/unit/tables/updateRelationship.test.ts +0 -305
  122. package/tests/vitest/unit/tables/updateTable.test.ts +0 -80
  123. package/tests/vitest/unit/tokenLifespan.test.ts +0 -138
  124. package/tests/vitest/unit/umd.test.ts +0 -8
  125. package/text.txt +0 -104
  126. package/tools/log-gen.ts +0 -235
  127. package/tools/log-gen.yaml +0 -4982
  128. package/tools/openapi-jars/openapi-generator-cli-7.12.0.jar +0 -0
  129. package/tsconfig.build.json +0 -17
  130. package/tsconfig.json +0 -32
  131. package/versionrc.json +0 -9
  132. package/vitest.config.ts +0 -27
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quickbase-js",
3
- "version": "0.1.0-beta.8",
3
+ "version": "1.0.0",
4
4
  "description": "QuickBase JavaScript client for frameworks and vanilla JS",
5
5
  "type": "module",
6
6
  "main": "dist/esm/quickbase.js",
@@ -23,24 +23,34 @@
23
23
  "umd:types": "./dist/umd/quickbase.umd.d.ts"
24
24
  }
25
25
  },
26
+ "files": [
27
+ "dist/**/*",
28
+ "README.md",
29
+ "LICENSE"
30
+ ],
26
31
  "scripts": {
27
32
  "build": "npm run build:esm && npm run build:umd",
28
33
  "build:esm": "rimraf dist/esm dist/temp dist/temp-src && node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' build-esm.js",
29
34
  "build:umd": "rimraf dist/umd dist/temp dist/temp-src && node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' build-umd.js",
30
- "release": "standard-version",
31
- "release:beta": "standard-version --prerelease beta",
32
- "release:alpha": "standard-version --prerelease alpha",
33
- "release:push": "npm run release:beta && git push --follow-tags origin main",
34
- "release:publish": "npm run release:push && npm publish --tag beta",
35
- "release:stable": "standard-version && git push --follow-tags origin main && npm publish",
36
- "fix-spec": "node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' open-api/fix-spec-main.ts",
37
- "generate-report": "node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' open-api/generate-override-report.ts",
35
+ "release:prepare": "standard-version",
36
+ "release:beta": "npm run build && standard-version --prerelease beta && git push --follow-tags origin main && npm publish --tag beta",
37
+ "release:stable": "npm run build && standard-version --release-as 1.0.0 && git push --follow-tags origin main && npm publish",
38
+ "release:patch": "npm run build && standard-version --release-as patch && git push --follow-tags origin main && npm publish",
39
+ "release:minor": "npm run build && standard-version --release-as minor && git push --follow-tags origin main && npm publish",
40
+ "release:major": "npm run build && standard-version --release-as major && git push --follow-tags origin main && npm publish",
41
+ "release": "npm run test:all && npm run release:stable",
42
+ "gen:fixspec": "node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' open-api/fix-spec-main.ts",
38
43
  "gen:openapi": "rimraf src/generated && node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' open-api/regenerate-client.ts",
44
+ "gen:openapi:post": "node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' open-api/post-process-generated.ts",
39
45
  "gen:unified": "node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' open-api/generate-unified-interface.ts",
40
- "gen:all": "npm run fix-spec && npm run generate-report && npm run gen:openapi && npm run gen:unified",
46
+ "gen:docsdata": "node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' open-api/generateDocsJson.ts",
47
+ "docs:dev": "vitepress dev docs",
48
+ "docs:build": "vitepress build docs",
49
+ "docs:preview": "vitepress preview docs",
50
+ "gen:all": "npm run gen:fixspec && npm run gen:openapi && npm run gen:openapi:post && npm run gen:unified && npm run gen:docsdata && npm run docs:build",
41
51
  "log-gen": "node --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' tools/log-gen.ts",
42
- "test:all": "vitest run tests/vitest/**/**/*.test.ts --reporter=basic && playwright test tests/playwright/qb --config playwright.config.ts --reporter=dot --quiet",
43
- "test:pw:qb:all": "playwright test tests/playwright/qb --config playwright.config.ts",
52
+ "test:all": "NODE_OPTIONS='--no-experimental-strip-types' vitest run tests/vitest/**/**/*.test.ts --reporter=basic && NODE_OPTIONS='--no-experimental-strip-types' playwright test tests/playwright/qb --config playwright.config.ts --reporter=dot --quiet",
53
+ "test:pw:qb:all": "playwright test --config playwright.config.ts tests/playwright/qb/**/*.test.ts",
44
54
  "test:vitest:all": "vitest run tests/vitest/**/**/*.test.ts",
45
55
  "test:vitest:qb": "vitest run tests/vitest/qb/**/*.test.ts",
46
56
  "test:vitest:unit": "vitest run tests/vitest/unit/**/*.test.ts",
@@ -49,11 +59,14 @@
49
59
  "test:vitest:qb:fields": "vitest run tests/vitest/qb/fields/*.test.ts",
50
60
  "test:vitest:qb:records": "vitest run tests/vitest/qb/records/*.test.ts",
51
61
  "test:vitest:qb:tables": "vitest run tests/vitest/qb/tables/*.test.ts",
62
+ "test:vitest:qb:quickbase-js": "vitest run tests/vitest/qb/quickbase-js/*.test.ts",
52
63
  "test:vitest:unit:apps": "vitest run tests/vitest/unit/apps/*.test.ts",
53
64
  "test:vitest:unit:auth": "vitest run tests/vitest/unit/auth/*.test.ts",
54
65
  "test:vitest:unit:fields": "vitest run tests/vitest/unit/fields/*.test.ts",
66
+ "test:vitest:unit:formulas": "vitest run tests/vitest/unit/formulas/*.test.ts",
55
67
  "test:vitest:unit:records": "vitest run tests/vitest/unit/records/*.test.ts",
56
68
  "test:vitest:unit:tables": "vitest run tests/vitest/unit/tables/*.test.ts",
69
+ "test:vitest:unit:quickbase-js": "vitest run tests/vitest/unit/quickbase-js/*.test.ts",
57
70
  "test:pw:qb:auth": "playwright test tests/playwright/qb/auth"
58
71
  },
59
72
  "devDependencies": {
@@ -67,6 +80,7 @@
67
80
  "@types/js-yaml": "^4.0.9",
68
81
  "@types/node": "^22.13.10",
69
82
  "dotenv": "^16.4.7",
83
+ "express": "^4.21.2",
70
84
  "fast-json-patch": "^3.1.1",
71
85
  "glob": "^10.4.5",
72
86
  "js-yaml": "^4.1.0",
@@ -84,6 +98,7 @@
84
98
  "tslib": "^2.8.1",
85
99
  "typescript": "^5.8.2",
86
100
  "undici-types": "^7.5.0",
101
+ "vitepress": "^1.6.3",
87
102
  "vitest": "^3.0.8"
88
103
  }
89
104
  }
package/CHANGELOG.md DELETED
@@ -1,155 +0,0 @@
1
- # Changelog
2
-
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
-
5
- ## [0.1.0-beta.8](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v0.1.0-beta.7...v0.1.0-beta.8) (2025-03-18)
6
-
7
-
8
- ### Features
9
-
10
- * add updateField subfields that are not included in raw spec, test pass ([4481cff](https://github.com/DrewBradfordXYZ/quickbase-js/commit/4481cff81d4e6205a90537d49bb596214c0e45bd))
11
- * build now works without error ([3f6ef2c](https://github.com/DrewBradfordXYZ/quickbase-js/commit/3f6ef2c1337f50b93bb937dd4de1d702c2eb984b))
12
- * dev dependencies reinstall, pipeline runs again ([91a8216](https://github.com/DrewBradfordXYZ/quickbase-js/commit/91a8216064a48708fbf598e9d7be6084052cd439))
13
- * generate-report for spec diff ([53ad6e7](https://github.com/DrewBradfordXYZ/quickbase-js/commit/53ad6e7d2f94683134dfa79e50022a8d2ab0b448))
14
- * integration getApp and deleteFields pass ([ba07e9a](https://github.com/DrewBradfordXYZ/quickbase-js/commit/ba07e9a68d298ab6dbcf326c865261fcc46b51ba))
15
- * integration tests pass for getAppEvents and updateApp ([58f4d20](https://github.com/DrewBradfordXYZ/quickbase-js/commit/58f4d20b5e9d539e91ac29662cae4d2a5bb4eed0))
16
- * rename TokenBucket to ThrottleBucket ([3a3cdb4](https://github.com/DrewBradfordXYZ/quickbase-js/commit/3a3cdb4869856622e40ae3898f7fc66d50918b6c))
17
- * throttle limits and 429 retry ([a7aec4a](https://github.com/DrewBradfordXYZ/quickbase-js/commit/a7aec4af37f0a74c0e42a938c97e6ce1df7c5250))
18
- * tokenLifespan and separate invokeMethod.ts ([2336bce](https://github.com/DrewBradfordXYZ/quickbase-js/commit/2336bce25a9a22b6f14f2e3915e58849d5cb64f3))
19
- * updateApp.test.ts unit test passes ([f2a3dcc](https://github.com/DrewBradfordXYZ/quickbase-js/commit/f2a3dcc904da07bbb1c363732df551da60430de1))
20
- * updateField unit test pass ([c6ad2d5](https://github.com/DrewBradfordXYZ/quickbase-js/commit/c6ad2d53996bae3f7ed8a51a5795a6bfe0c293fd))
21
- * updateRelationship integration test passes, creates and cleans summary and lookup fields ([cc6645f](https://github.com/DrewBradfordXYZ/quickbase-js/commit/cc6645f91be43b1e63dc8b3428a24af42b69ad1c))
22
- * updateRelationship unit test passes ([155defc](https://github.com/DrewBradfordXYZ/quickbase-js/commit/155defcb1f3a746ac2bb135ec09db39b64dd58e2))
23
- * user token 401 retry, all tests now passing ([a81a05d](https://github.com/DrewBradfordXYZ/quickbase-js/commit/a81a05d873f95d23f5721337854e2794be80ac64))
24
-
25
-
26
- ### Bug Fixes
27
-
28
- * 429 retry logic now has all tests passing ([a2da0ad](https://github.com/DrewBradfordXYZ/quickbase-js/commit/a2da0ad28c24c843d2bfd318f78827ba543e6833))
29
- * build runs and all tests pass ([b1cbfaf](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b1cbfafb879d1325e60024e837e8c5602e027e47))
30
-
31
- ## [0.1.0-beta.7](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v1.1.0-beta.6...v0.1.0-beta.7) (2025-03-16)
32
-
33
-
34
- ### Features
35
-
36
- * added Record, hybrid semantic naming, fully typed QuickbaseClient with few response models left as type:any ([535a02e](https://github.com/DrewBradfordXYZ/quickbase-js/commit/535a02e10d5974d2a2deb6dc213286da94d68dea))
37
- * all fields tests pass ([84c539f](https://github.com/DrewBradfordXYZ/quickbase-js/commit/84c539fce7ba9d57c997b831be404a1398a6ac25))
38
- * all types, methods and files generated ([f25bea0](https://github.com/DrewBradfordXYZ/quickbase-js/commit/f25bea0e65a019d75b39a9caf85901d520bf1ac8))
39
- * build files always produce production code ([2f78598](https://github.com/DrewBradfordXYZ/quickbase-js/commit/2f785984416c61e1b3deda2b801071cbb1303a74))
40
- * copyApp unit test passes ([0e13f91](https://github.com/DrewBradfordXYZ/quickbase-js/commit/0e13f918c5daabbbd6e17c2424b3f18eca2eb3a4))
41
- * FieldMap issue resolved ([b3b7b41](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b3b7b415d6a0f7701851f32a5e0b1207a07ba481))
42
- * getApp and deleteApp test passes ([f5225e0](https://github.com/DrewBradfordXYZ/quickbase-js/commit/f5225e06299de58f34d6a765e73268d9a54e807d))
43
- * getAppEvents spec update ([1028255](https://github.com/DrewBradfordXYZ/quickbase-js/commit/10282559cd76d004899fa2ebcea6f5f435ffae2b))
44
- * import and upsert success ([ea9d9ee](https://github.com/DrewBradfordXYZ/quickbase-js/commit/ea9d9eef8384ad73b8cffb8183fbc374ab9cc25b))
45
- * log-gen yaml file gets created next to the build file ([cfe25af](https://github.com/DrewBradfordXYZ/quickbase-js/commit/cfe25afb60498909d2bac8ec963484e1c1b42d3f))
46
- * logging for swagger2.0 ([819aa17](https://github.com/DrewBradfordXYZ/quickbase-js/commit/819aa170cfc02e4e5b223ac13834d50bce5dda93))
47
- * missing-types-report updated to empty on success ([e35b28d](https://github.com/DrewBradfordXYZ/quickbase-js/commit/e35b28d61563b21f7bad3e1c9c3751bfa254ab4a))
48
- * QuickbaseClient is fully-typed from raw spec ([5c875c2](https://github.com/DrewBradfordXYZ/quickbase-js/commit/5c875c2ee07c38731c5609c384aaa8d3fbbdd64a))
49
- * reorganize open-api folder ([a0fe5bd](https://github.com/DrewBradfordXYZ/quickbase-js/commit/a0fe5bda606c37e7636d36c7fc5e233d191ac249))
50
- * simplifyName refactor again ([2a2952e](https://github.com/DrewBradfordXYZ/quickbase-js/commit/2a2952ea90fab818501d17908d6cd85a79c41adb))
51
- * split up fix-spec- files ([85b6a3e](https://github.com/DrewBradfordXYZ/quickbase-js/commit/85b6a3efb92520a46aa619bdfc4bf70d06984b3f))
52
- * unit auth tests pass ([494897f](https://github.com/DrewBradfordXYZ/quickbase-js/commit/494897f4551854096f89b1af43df4a455dfd9f4b))
53
- * unit records tests pass ([8160b53](https://github.com/DrewBradfordXYZ/quickbase-js/commit/8160b53378447fcd8e37fac178e7d4693b502288))
54
- * unit tables tests pass ([c4ec0ac](https://github.com/DrewBradfordXYZ/quickbase-js/commit/c4ec0ac378dd03e5d018b4ea83530e2c0fe905a2))
55
- * unit tests for apps folder is passing ([72ae8e5](https://github.com/DrewBradfordXYZ/quickbase-js/commit/72ae8e529cddc66626617c6b1ff672f40763f7b7))
56
- * update scripts to call integration tests, all tests pass ([08911f7](https://github.com/DrewBradfordXYZ/quickbase-js/commit/08911f76b214e6eb3ca8b4362c156d55383d7264))
57
-
58
-
59
- ### Bug Fixes
60
-
61
- * added back CreateRelationshipRequest and UpdateRelationshipRequest ([0d932ee](https://github.com/DrewBradfordXYZ/quickbase-js/commit/0d932eed8b603c6b84e13b8834a89722b91fabf3))
62
- * generate-unified-interface type fixes ([b8acd16](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b8acd16805f456336d396856c6ff88a29aa02813))
63
- * playwright cleanup and type fixes ([ff30a15](https://github.com/DrewBradfordXYZ/quickbase-js/commit/ff30a15c1a244c7eb1ad4f52941f60b775bb88d4))
64
- * remove the old /paths /definitons completely in scripts ([48ee6a3](https://github.com/DrewBradfordXYZ/quickbase-js/commit/48ee6a3b15579ca9224b89acde73f492e0769cab))
65
- * update tags/tables.ts to match raw schema ([c6ed554](https://github.com/DrewBradfordXYZ/quickbase-js/commit/c6ed554f0994187224219b454d1e8671307fc189))
66
-
67
- ## [1.1.0-beta.6](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v1.1.0-beta.5...v1.1.0-beta.6) (2025-03-13)
68
-
69
-
70
- ### Features
71
-
72
- * omit credientials for all api calls that are not fetching a temp token ([b1b4aae](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b1b4aae02aaa655e6eaab2fe0d532d526e6dc69f))
73
-
74
- ## [1.1.0-beta.5](https://github.com/DrewBradfordXYZ/quickbase-js/compare/v1.1.0-beta.4...v1.1.0-beta.5) (2025-03-13)
75
-
76
-
77
- ### Features
78
-
79
- * ESM and UMD build prod ([49513e9](https://github.com/DrewBradfordXYZ/quickbase-js/commit/49513e902e7bf4dd35da3c6508242e96507a91bd))
80
- * ESM and UMD support and src folder reorganization ([dc0170b](https://github.com/DrewBradfordXYZ/quickbase-js/commit/dc0170b547e6e9e57a117fbcccfdbeb86e48a8c7))
81
-
82
- ## [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)
83
-
84
-
85
- ### Features
86
-
87
- * createField and deleteFields tests are passing ([4b47c4d](https://github.com/DrewBradfordXYZ/quickbase-js/commit/4b47c4deb9b3d731e6e7938c12fcebe97830568b))
88
- * createField mock and integration tests pass ([b227c73](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b227c73b08f7efa5ce5f3d0c2897f82c8976a009))
89
- * deleteFields spec update ([1f8beca](https://github.com/DrewBradfordXYZ/quickbase-js/commit/1f8becaca0d6b7950648c1b9bc2b0215781fa829))
90
- * getFeildsUsage.test.ts unit and integration tests pass ([82a4886](https://github.com/DrewBradfordXYZ/quickbase-js/commit/82a488622967ec24a8767cbb19c59ef4ce808749))
91
- * getField.test.ts unit and integration tests pass ([3e50b70](https://github.com/DrewBradfordXYZ/quickbase-js/commit/3e50b704f0ebea47f2fee3d02d811ea1b43db6c4))
92
- * getFieldsUsage fix spec ([031faaa](https://github.com/DrewBradfordXYZ/quickbase-js/commit/031faaaeab9597f35fdd1ddcf5157ce5d774390b))
93
- * getFieldUsage spec and unit test pass ([ac2824b](https://github.com/DrewBradfordXYZ/quickbase-js/commit/ac2824b226140dde99e33cf594d57bd6ffd4dc39))
94
- * getFieldUsage unit and integration tests pass ([e62b586](https://github.com/DrewBradfordXYZ/quickbase-js/commit/e62b586d534620479a25dda2796ba5dcb8043705))
95
- * split up fix-spec-paths and fix-spec-definitions into many files ([20d3246](https://github.com/DrewBradfordXYZ/quickbase-js/commit/20d32464e6337028778845fa55fbb19c5543f7eb))
96
-
97
-
98
- ### Bug Fixes
99
-
100
- * cleanup createField.test.ts logging ([7b1306b](https://github.com/DrewBradfordXYZ/quickbase-js/commit/7b1306bd8eb49e2c932ce267f33457e949e0f74b))
101
- * createField test syntax update ([043f964](https://github.com/DrewBradfordXYZ/quickbase-js/commit/043f964a47346878440eb73cc10c110dab904ad7))
102
- * getFieldsUsage type fix ([4c6f271](https://github.com/DrewBradfordXYZ/quickbase-js/commit/4c6f271d123131ae13a236664f28fbbdfde3d564))
103
- * update deleteFields error type spec ([1788e1c](https://github.com/DrewBradfordXYZ/quickbase-js/commit/1788e1ce6d4d2c8df871ec8b112be908d706f884))
104
-
105
- ## [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)
106
-
107
- ### Features
108
-
109
- - copyApp fix-spec updates ([4c10ab4](https://github.com/DrewBradfordXYZ/quickbase-js/commit/4c10ab41464df047402a207c7b9e81026a7b6202))
110
- - copyApp unit test passes ([b121bf1](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b121bf1d0130f338f131de5417896d798fe90db3))
111
- - deleteApp fix spec added ([b27ce11](https://github.com/DrewBradfordXYZ/quickbase-js/commit/b27ce11e2b08bc631d7656dedec57f6f5e579450))
112
- - fix-spec-\* for getRelationship interface ([aad9fbd](https://github.com/DrewBradfordXYZ/quickbase-js/commit/aad9fbd7fc92b8aaaef901174c81169543ae86d2))
113
- - getRelationship unit and integration test pass ([a1269bb](https://github.com/DrewBradfordXYZ/quickbase-js/commit/a1269bb60523944bdf5030404539043c967f0b83))
114
- - updated Upsert200Response and Upsert207Response, deleteRecords.test.ts integration type issues resolved ([d39dad5](https://github.com/DrewBradfordXYZ/quickbase-js/commit/d39dad55d783d280db9dbae2ca4c782df3a1f12e))
115
- - 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))
116
-
117
- ## [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)
118
-
119
- ## [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)
120
-
121
- ### Features
122
-
123
- - runQuery.test.ts integration test pass ([180b17f](https://github.com/DrewBradfordXYZ/quickbase-js/commit/180b17f265c26a0d23bde3ca6993bad1ba4f65ee))
124
- - runQuery.test.ts unit test pass ([84e2fc4](https://github.com/DrewBradfordXYZ/quickbase-js/commit/84e2fc4f237d5f558fcd20d7b6b8eb83f685d7ac))
125
-
126
- ### Bug Fixes
127
-
128
- - added stub variables to unit tests ([d84b534](https://github.com/DrewBradfordXYZ/quickbase-js/commit/d84b5344201300d8d59e622b025d96ad9813d4eb))
129
- - create env stubs for mock tests and update getTables.test.ts ([3d31c9e](https://github.com/DrewBradfordXYZ/quickbase-js/commit/3d31c9ebc9f852b99d1a807759490055d75c6396))
130
-
131
- ## [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)
132
-
133
- ### Features
134
-
135
- - add deleteTable integration test with 404 verification ([277aec6](https://github.com/DrewBradfordXYZ/quickbase-js/commit/277aec66a3047fab687ce81ad42b9371e8c2bf56))
136
- - deleteRecords integration and unit tests ([d3beba1](https://github.com/DrewBradfordXYZ/quickbase-js/commit/d3beba1a362b13166b38f59eeea83c289ddaf999))
137
- - integration tests for deleteRecords and upsert pass ([759978b](https://github.com/DrewBradfordXYZ/quickbase-js/commit/759978bc13cb1c50c03770232eb02a1c3c08428d))
138
- - mock deleteRecords passes ([a167028](https://github.com/DrewBradfordXYZ/quickbase-js/commit/a1670286def030950c568e92ca99ea12e20d5b62))
139
- - upsert mock test passes ([dde6d07](https://github.com/DrewBradfordXYZ/quickbase-js/commit/dde6d07d4c4c73bd14189f87fdc6347744004e4e))
140
-
141
- ### Bug Fixes
142
-
143
- - all vitests are passing again ([7206ba3](https://github.com/DrewBradfordXYZ/quickbase-js/commit/7206ba3f28bd7a3c7f5d699988e9a9a1f0053f42))
144
- - fix-spec and test updates for createTable ([9c0cdd3](https://github.com/DrewBradfordXYZ/quickbase-js/commit/9c0cdd3b707971e6fb8f3e73598e3a600ff2b33d))
145
- - fix-spec for upsertRecords and createApp ([d12de40](https://github.com/DrewBradfordXYZ/quickbase-js/commit/d12de40feac35e5d86a0b7d5019d8058cdfcffd9))
146
- - fix-spec getTable ([1eb936c](https://github.com/DrewBradfordXYZ/quickbase-js/commit/1eb936c360ce5df4818b8d5ef7ccf4dc6b769af0))
147
- - fix-spec getTable deleteTable ([236349a](https://github.com/DrewBradfordXYZ/quickbase-js/commit/236349af9e30776e00754232d83d76e065aab00b))
148
- - fix-spec updates for createApp ([3614958](https://github.com/DrewBradfordXYZ/quickbase-js/commit/36149589ff2544ec50a82d9dc9b183f15d07778d))
149
- - fix-spec updateTable ([26e278c](https://github.com/DrewBradfordXYZ/quickbase-js/commit/26e278cdbbe96d33e51f14e90ebb2c8b47d70f07))
150
- - getTables test pass, change order for extractDbid to assign temp token dbid ([37b7685](https://github.com/DrewBradfordXYZ/quickbase-js/commit/37b7685d55a0f64e62cb91ad23df28d4916d5a50))
151
- - upsert unit test type fixes ([8460cc8](https://github.com/DrewBradfordXYZ/quickbase-js/commit/8460cc8e63564bc8602dc12a9b6415094cc215f0))
152
-
153
- ### 1.0.1-beta.0 (2025-03-10)
154
-
155
- Testing done in a consuming library for getApp() and getFields()
package/build-common.js DELETED
@@ -1,131 +0,0 @@
1
- // build-common.js
2
- import { execSync } from "child_process";
3
- import { rollup } from "rollup";
4
- import terser from "@rollup/plugin-terser";
5
- import nodeResolve from "@rollup/plugin-node-resolve";
6
- import commonjs from "@rollup/plugin-commonjs";
7
- import dts from "rollup-plugin-dts";
8
- import { rimrafSync } from "rimraf";
9
- import {
10
- copyFileSync,
11
- readdirSync,
12
- readFileSync,
13
- writeFileSync,
14
- mkdirSync,
15
- statSync,
16
- } from "fs";
17
- import { join } from "path";
18
-
19
- export const external = [
20
- "node:http",
21
- "node:https",
22
- "node:zlib",
23
- "node:stream",
24
- "node:buffer",
25
- "node:util",
26
- "node:url",
27
- "node:net",
28
- "node:fs",
29
- "node:path",
30
- "node-fetch",
31
- ];
32
- export const globals = { "node-fetch": "fetch" };
33
-
34
- export const srcDir = join(process.cwd(), "src");
35
- export const tempSrcDir = join(process.cwd(), "dist/temp-src");
36
- export const excludeDirs = ["specs"];
37
- export const excludeFiles = ["generated/index.ts"]; // Exclude generated/index.ts to avoid duplicate exports
38
-
39
- export function copyAndRewriteTsExtensions(src, dest) {
40
- console.log(`Copying from ${src} to ${dest}`);
41
- mkdirSync(dest, { recursive: true });
42
- const files = readdirSync(src, { withFileTypes: true });
43
-
44
- for (const file of files) {
45
- const srcPath = join(src, file.name);
46
- const destPath = join(dest, file.name);
47
-
48
- if (file.isDirectory()) {
49
- if (excludeDirs.includes(file.name)) {
50
- console.log(`Skipping excluded directory ${srcPath}`);
51
- continue;
52
- }
53
- copyAndRewriteTsExtensions(srcPath, destPath);
54
- } else if (file.name.endsWith(".ts")) {
55
- if (excludeFiles.some((excluded) => srcPath.includes(excluded))) {
56
- console.log(`Skipping excluded file ${srcPath}`);
57
- continue;
58
- }
59
- console.log(`Processing ${srcPath} -> ${destPath}`);
60
- let fileContent = readFileSync(srcPath, "utf8");
61
-
62
- // Remove .ts extensions from import/export statements for runtime compatibility
63
- fileContent = removeTsExtensionsFromImports(fileContent);
64
- fileContent = removeTsExtensionsFromStarExports(fileContent);
65
-
66
- writeFileSync(destPath, fileContent, "utf8");
67
- } else {
68
- console.log(`Skipping non-.ts file ${srcPath}`);
69
- }
70
- }
71
- }
72
-
73
- export function removeTsExtensionsFromImports(content) {
74
- // Matches: 'from "./some/path.ts"' or 'from "../another.ts"'
75
- const importPattern = /from\s+(['"])(\.[\w\/-]+)\.ts\1/g;
76
- return content.replace(importPattern, `from $1$2$1`);
77
- }
78
-
79
- export function removeTsExtensionsFromStarExports(content) {
80
- // Matches: 'export * from "./some/path.ts"' or 'export * from "../another.ts"'
81
- const exportStarPattern = /export\s+\*\s+from\s+(['"])(\.[\w\/-]+)\.ts\1/g;
82
- return content.replace(exportStarPattern, `export * from $1$2$1`);
83
- }
84
-
85
- export async function createBundle(input, plugins, format, outputOptions) {
86
- const bundle = await rollup({
87
- input,
88
- external,
89
- plugins,
90
- });
91
- await bundle.write(outputOptions);
92
- await bundle.close();
93
- }
94
-
95
- export function compileTypeScript() {
96
- console.log("Running tsc...");
97
- const tsFiles = readdirSync(tempSrcDir, { recursive: true })
98
- .filter((file) => file.endsWith(".ts"))
99
- .map((file) => join(tempSrcDir, file));
100
- const tscCommand = `npx tsc ${tsFiles.join(" ")} --outDir ${join(
101
- process.cwd(),
102
- "dist/temp"
103
- )} --module ESNext --target ESNext --sourceMap --moduleResolution bundler --baseUrl ${process.cwd()}`;
104
- console.log(`Command: ${tscCommand}`);
105
- execSync(tscCommand, { stdio: "inherit" });
106
- }
107
-
108
- export async function generateDeclarations() {
109
- console.log("Generating declarations...");
110
- const dtsBundle = await rollup({
111
- input: "src/quickbaseClient.ts",
112
- plugins: [dts({ tsconfig: "./tsconfig.json", respectExternal: true })],
113
- });
114
- await dtsBundle.write({ file: "dist/esm/quickbase.d.ts", format: "esm" });
115
- await dtsBundle.write({ file: "dist/umd/quickbase.umd.d.ts", format: "umd" });
116
- await dtsBundle.close();
117
- }
118
-
119
- export function listFilesWithSizes(dir, prefix = "") {
120
- const files = readdirSync(dir, { withFileTypes: true });
121
- for (const file of files) {
122
- const filePath = join(dir, file.name);
123
- if (file.isDirectory()) {
124
- listFilesWithSizes(filePath, `${prefix}${file.name}/`);
125
- } else {
126
- const stats = statSync(filePath);
127
- const sizeKB = (stats.size / 1024).toFixed(2);
128
- console.log(`${prefix}${file.name} - ${sizeKB} KB`);
129
- }
130
- }
131
- }
package/build-esm.js DELETED
@@ -1,71 +0,0 @@
1
- import { rimrafSync } from "rimraf";
2
- import { join } from "path";
3
- import nodeResolve from "@rollup/plugin-node-resolve";
4
- import commonjs from "@rollup/plugin-commonjs";
5
- import terser from "@rollup/plugin-terser";
6
- import {
7
- copyAndRewriteTsExtensions,
8
- compileTypeScript,
9
- createBundle,
10
- external,
11
- globals,
12
- srcDir,
13
- tempSrcDir,
14
- generateDeclarations,
15
- listFilesWithSizes,
16
- } from "./build-common.js";
17
-
18
- // Clean specific folders for ESM build
19
- rimrafSync("dist/esm");
20
- rimrafSync("dist/temp");
21
- rimrafSync("dist/temp-src");
22
-
23
- // Copy and rewrite TS files
24
- copyAndRewriteTsExtensions(srcDir, tempSrcDir);
25
-
26
- // Compile TypeScript
27
- compileTypeScript();
28
-
29
- // ESM Builds
30
- console.log("Building ESM bundles...");
31
-
32
- // Generate unminified ESM bundle
33
- console.log("Building unminified ESM bundle...");
34
- await createBundle(
35
- "dist/temp/quickbaseClient.js",
36
- [nodeResolve({ preferBuiltins: true }), commonjs()],
37
- "esm",
38
- {
39
- dir: "dist/esm",
40
- format: "esm",
41
- sourcemap: true,
42
- entryFileNames: "quickbase.js",
43
- }
44
- );
45
-
46
- // Generate minified ESM bundle
47
- console.log("Building minified ESM bundle...");
48
- await createBundle(
49
- "dist/temp/quickbaseClient.js",
50
- [nodeResolve({ preferBuiltins: true }), commonjs(), terser()],
51
- "esm",
52
- {
53
- dir: "dist/esm",
54
- format: "esm",
55
- sourcemap: true,
56
- entryFileNames: "quickbase.min.js",
57
- }
58
- );
59
-
60
- // Generate declarations
61
- await generateDeclarations();
62
-
63
- // Clean up
64
- rimrafSync("dist/temp");
65
- rimrafSync("dist/temp-src");
66
-
67
- // List generated files
68
- console.log("\nGenerated files:");
69
- listFilesWithSizes(join(process.cwd(), "dist/esm"));
70
-
71
- console.log("\nESM build completed successfully");
package/build-umd.js DELETED
@@ -1,69 +0,0 @@
1
- import { rimrafSync } from "rimraf";
2
- import { join } from "path";
3
- import nodeResolve from "@rollup/plugin-node-resolve";
4
- import commonjs from "@rollup/plugin-commonjs";
5
- import terser from "@rollup/plugin-terser";
6
- import {
7
- copyAndRewriteTsExtensions,
8
- compileTypeScript,
9
- createBundle,
10
- external,
11
- globals,
12
- srcDir,
13
- tempSrcDir,
14
- listFilesWithSizes,
15
- } from "./build-common.js";
16
-
17
- // Clean specific folders for UMD build
18
- rimrafSync("dist/umd");
19
- rimrafSync("dist/temp");
20
- rimrafSync("dist/temp-src");
21
-
22
- // Copy and rewrite TS files
23
- copyAndRewriteTsExtensions(srcDir, tempSrcDir);
24
-
25
- // Compile TypeScript
26
- compileTypeScript();
27
-
28
- // UMD Builds
29
- console.log("Building UMD bundles...");
30
-
31
- // Generate unminified UMD bundle
32
- console.log("Building unminified UMD bundle...");
33
- await createBundle(
34
- "dist/temp/quickbaseClient.js",
35
- [nodeResolve({ preferBuiltins: true, browser: true }), commonjs()],
36
- "umd",
37
- {
38
- file: join(process.cwd(), "dist/umd", "quickbase.umd.js"),
39
- format: "umd",
40
- name: "QuickbaseJS",
41
- sourcemap: true,
42
- globals,
43
- }
44
- );
45
-
46
- // Generate minified UMD bundle
47
- console.log("Building minified UMD bundle...");
48
- await createBundle(
49
- "dist/temp/quickbaseClient.js",
50
- [nodeResolve({ preferBuiltins: true, browser: true }), commonjs(), terser()],
51
- "umd",
52
- {
53
- file: join(process.cwd(), "dist/umd", "quickbase.umd.min.js"),
54
- format: "umd",
55
- name: "QuickbaseJS",
56
- sourcemap: true,
57
- globals,
58
- }
59
- );
60
-
61
- // Clean up
62
- rimrafSync("dist/temp");
63
- rimrafSync("dist/temp-src");
64
-
65
- // List generated files
66
- console.log("\nGenerated files:");
67
- listFilesWithSizes(join(process.cwd(), "dist/umd"));
68
-
69
- console.log("\nUMD build completed successfully");
@@ -1,36 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
-
4
- <head>
5
- <title>Quickbase</title>
6
- <script src="https://cdn.jsdelivr.net/npm/quickbase-js@1.1.0-beta.6/dist/umd/quickbase.umd.min.js"></script>
7
- </head>
8
-
9
- <body>
10
- <div>
11
- <h1>Quickbase-js CDN Example</h1>
12
- <p id="result">Loading...</p>
13
- </div>
14
- <script>
15
- var realm = "xxxxxxxxxxxxxxxxxxxx"; // replace with your realm
16
- var appId = "xxxxxxxxxxxxxxxxxxxx"; // replace with your app ID
17
- if (typeof QuickbaseJS === "undefined") {
18
- document.getElementById("result").textContent = "Error: Failed to load QuickbaseJS library.";
19
- } else {
20
- var qbClient = QuickbaseJS.quickbase({
21
- realm,
22
- useTempTokens: true
23
- });
24
-
25
- qbClient.getApp({ appId })
26
- .then(function (app) {
27
- document.getElementById("result").textContent = "App Name: " + app.name;
28
- })
29
- .catch(function (err) {
30
- document.getElementById("result").textContent = "Error: " + (err.message || "Failed to load app");
31
- });
32
- }
33
- </script>
34
- </body>
35
-
36
- </html>
package/examples/react.js DELETED
@@ -1,48 +0,0 @@
1
- import React, { useState, useEffect } from "react";
2
- import { quickbase } from "quickbase-js";
3
-
4
- const App = () => {
5
- const [appName, setAppName] = useState < string > "Loading...";
6
- const [error, setError] = (useState < string) | (null > null);
7
-
8
- useEffect(() => {
9
- // Initialize the QuickBase client
10
- const qb = quickbase({
11
- realm: "your-realm", // Replace with actual QuickBase realm
12
- // ## ------------------------------
13
- // ## Authentication Options
14
- // ## ------------------------------
15
- // ## OPTION 1: User Token Authentication
16
- // ## - Use this if you have a QuickBase user token (get it from "My Profile" > "Manage User Tokens")
17
- // ## - Works in Node.js or browsers, ideal for standalone apps or testing outside QuickBase
18
- // ## - Use the line below and replace with your token; comment out 'useTempTokens'
19
- // userToken: "your-user-token",
20
-
21
- // ## ------------------------------
22
- // ## OPTION 2: Temporary Token Authentication
23
- // ## - Use this for QuickBase code pages, leveraging the browser’s authenticated session
24
- // ## - No user token needed; requires running in a QuickBase browser context
25
- // ## - Uncomment the line below and comment out 'userToken' if using this option
26
- // useTempTokens: true,
27
- });
28
-
29
- // Fetch the app
30
- qb.getApp({ appId: "your-app-id" }) // Replace with actual app ID
31
- .then((app) => {
32
- setAppName(app.name);
33
- })
34
- .catch((err) => {
35
- console.error("Error fetching app:", err);
36
- setError("Failed to load app");
37
- });
38
- }, []); // Empty dependency array to run once on mount
39
-
40
- return (
41
- <div>
42
- <h1>Quickbase Test</h1>
43
- {error ? <p>{error}</p> : <p>App Name: {appName}</p>}
44
- </div>
45
- );
46
- };
47
-
48
- export default App;
@@ -1,47 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
-
4
- <head>
5
- <title>Quickbase Test</title>
6
- </head>
7
-
8
- <body>
9
- <div>
10
- <h1>Quickbase Test</h1>
11
- <p id="result">Loading...</p>
12
- </div>
13
- <script type="module">
14
- import { quickbase } from 'quickbase-js';
15
- // Initalize the QuickBase client
16
- const qb = quickbase({
17
- realm: 'your-realm', // Replace with actual QuickBase realm
18
- // ## ------------------------------
19
- // ## Authentication Options
20
- // ## ----------------------------
21
- // ## OPTION 1: User Token Authentication
22
- // ## - Use this if you have a QuickBase user token (get it from "My Profile" > "Manage User Tokens")
23
- // ## - Works in Node.js or browsers, ideal for standalone apps or testing outside QuickBase
24
- // ## - Uncomment the line below and replace with your token; comment out 'useTempTokens'
25
- // userToken: "your-user-token",
26
-
27
- // ## ----------------------------
28
- // ## OPTION 2: Temporary Token Authentication
29
- // ## - Use this for QuickBase code pages, leveraging the browser’s authenticated session
30
- // ## - No user token needed; requires running in a QuickBase browser context
31
- // ## - Uncomment the line below and comment out 'userToken' if using this option
32
- // useTempTokens: true,
33
- });
34
-
35
- // Fetch the app
36
- qb.getApp({ appId: 'your-app-id' }) // Replace with actual app ID
37
- .then((app) => {
38
- document.getElementById('result').textContent = `App Name: ${app.name}`;
39
- })
40
- .catch((err) => {
41
- console.error('Error fetching app:', err);
42
- document.getElementById('result').textContent = err.message || 'Failed to load app';
43
- });
44
- </script>
45
- </body>
46
-
47
- </html>