quickbase-js 0.1.0-beta.10
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 +211 -0
- package/LICENSE +21 -0
- package/README.md +179 -0
- package/api-examples.md +49 -0
- package/build-common.js +131 -0
- package/build-esm.js +71 -0
- package/build-umd.js +69 -0
- package/dist/esm/quickbase.d.ts +8081 -0
- package/dist/esm/quickbase.js +7928 -0
- package/dist/esm/quickbase.js.map +1 -0
- package/dist/esm/quickbase.min.js +2 -0
- package/dist/esm/quickbase.min.js.map +1 -0
- package/dist/umd/quickbase.umd.js +8504 -0
- package/dist/umd/quickbase.umd.js.map +1 -0
- package/dist/umd/quickbase.umd.min.js +2 -0
- package/dist/umd/quickbase.umd.min.js.map +1 -0
- package/docs/.vitepress/cache/deps/@theme_index.js +275 -0
- package/docs/.vitepress/cache/deps/@theme_index.js.map +7 -0
- package/docs/.vitepress/cache/deps/_metadata.json +40 -0
- package/docs/.vitepress/cache/deps/chunk-5A67QEFC.js +12542 -0
- package/docs/.vitepress/cache/deps/chunk-5A67QEFC.js.map +7 -0
- package/docs/.vitepress/cache/deps/chunk-7D4P4MMP.js +9719 -0
- package/docs/.vitepress/cache/deps/chunk-7D4P4MMP.js.map +7 -0
- package/docs/.vitepress/cache/deps/package.json +3 -0
- package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +4504 -0
- package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +7 -0
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +583 -0
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +7 -0
- package/docs/.vitepress/cache/deps/vue.js +343 -0
- package/docs/.vitepress/cache/deps/vue.js.map +7 -0
- package/docs/.vitepress/config.mts +26 -0
- package/docs/api-examples.md +49 -0
- package/docs/index.md +59 -0
- package/docs/markdown-examples.md +85 -0
- package/docs-data/api-docs.json +4143 -0
- package/examples/quicbase-jsCDN.html +36 -0
- package/examples/react.js +48 -0
- package/examples/vanillajs.html +47 -0
- package/index.md +25 -0
- package/markdown-examples.md +85 -0
- package/open-api/fix-spec-main.ts +133 -0
- package/open-api/generate-unified-interface.ts +104 -0
- package/open-api/generateDocsJson.ts +24 -0
- package/open-api/output/quickbase-fixed.json +11191 -0
- package/open-api/post-process-generated.ts +226 -0
- package/open-api/regenerate-client.ts +117 -0
- package/open-api/schema/enhance-general.ts +111 -0
- package/open-api/schema/fix-arrays.ts +68 -0
- package/open-api/schema/tags/apps.ts +90 -0
- package/open-api/schema/tags/fields.ts +471 -0
- package/open-api/schema/tags/groups.ts +51 -0
- package/open-api/schema/tags/index.ts +66 -0
- package/open-api/schema/tags/records.ts +115 -0
- package/open-api/schema/tags/tables.ts +211 -0
- package/open-api/schema/tags/users.ts +47 -0
- package/open-api/types/spec.ts +42 -0
- package/open-api/utils/common.ts +29 -0
- package/open-api/utils/generateJsDoc.ts +74 -0
- package/open-api/utils/infer-schema.ts +40 -0
- package/open-api/utils/naming.ts +10 -0
- package/open-api/utils/sharedUtils.ts +352 -0
- package/package.json +96 -0
- package/playwright.config.ts +37 -0
- package/rollup.config.js +114 -0
- package/specs/QuickBase_RESTful_API_2025-03-04T06_22_39.725Z.json +46878 -0
- package/specs/split/apps.json +1315 -0
- package/specs/split/auth.json +191 -0
- package/specs/split/fields.json +3869 -0
- package/specs/split/records.json +754 -0
- package/specs/split/reports.json +619 -0
- package/specs/split/tables.json +1605 -0
- package/src/RateLimitError.ts +12 -0
- package/src/ThrottleBucket.ts +41 -0
- package/src/authorizationStrategy.ts +283 -0
- package/src/generated-unified/QuickbaseClient.ts +1135 -0
- package/src/generated-unified/missing-types-report.json +3 -0
- package/src/index.ts +1 -0
- package/src/invokeMethod.ts +245 -0
- package/src/quickbaseClient.ts +194 -0
- package/src/rateLimiter.ts +25 -0
- package/src/tokenCache.ts +35 -0
- package/src/utils.ts +50 -0
- package/tests/playwright/qb/auth/cacheSwitching.test.ts +159 -0
- package/tests/playwright/qb/auth/fetchTempToken401.test.ts +219 -0
- package/tests/playwright/qb/auth/getAppWithTempToken.test.ts +162 -0
- package/tests/playwright/qb/auth/getAppWithUserToken.test.ts +153 -0
- package/tests/playwright/qb/auth/getTempToken.test.ts +152 -0
- package/tests/playwright/qb/auth/tempTokenPrefetch.test.ts +179 -0
- package/tests/playwright/qb/auth/tempTokenRenewal.test.ts +133 -0
- package/tests/setup.ts +53 -0
- 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/apps/getApp.test.ts +44 -0
- package/tests/vitest/qb/apps/getAppEvents.test.ts +67 -0
- package/tests/vitest/qb/apps/updateApp.test.ts +58 -0
- package/tests/vitest/qb/auth/mockQuickbaseServer.ts +60 -0
- package/tests/vitest/qb/auth/retryUserToken401.test.ts +73 -0
- package/tests/vitest/qb/auth/ssoTokenIntegrationWithServer.test.ts +65 -0
- package/tests/vitest/qb/fields/createField.test.ts +77 -0
- package/tests/vitest/qb/fields/deleteFields.test.ts +83 -0
- package/tests/vitest/qb/fields/getField.test.ts +85 -0
- package/tests/vitest/qb/fields/getFieldUsage.test.ts +82 -0
- package/tests/vitest/qb/fields/getFields.test.ts +232 -0
- package/tests/vitest/qb/fields/getFieldsUsage.test.ts +77 -0
- package/tests/vitest/qb/fields/updateField.test.ts +93 -0
- package/tests/vitest/qb/formulas/runFormula.test.ts +96 -0
- package/tests/vitest/qb/index.ts +29 -0
- package/tests/vitest/qb/records/deleteRecords.test.ts +110 -0
- package/tests/vitest/qb/records/runQuery.test.ts +146 -0
- package/tests/vitest/qb/records/upsert.test.ts +102 -0
- package/tests/vitest/qb/tables/createRelationship.test.ts +102 -0
- package/tests/vitest/qb/tables/createTable.test.ts +55 -0
- package/tests/vitest/qb/tables/deleteRelationship.test.ts +143 -0
- package/tests/vitest/qb/tables/deleteTable.test.ts +50 -0
- package/tests/vitest/qb/tables/getAppTables.test.ts +46 -0
- package/tests/vitest/qb/tables/getRelationships.test.ts +80 -0
- package/tests/vitest/qb/tables/getTable.test.ts +26 -0
- package/tests/vitest/qb/tables/updateRelationship.test.ts +250 -0
- package/tests/vitest/qb/tables/updateTable.test.ts +48 -0
- package/tests/vitest/unit/ThrottleBucket.test.ts +95 -0
- package/tests/vitest/unit/apps/copyApp.test.ts +581 -0
- package/tests/vitest/unit/apps/createApp.test.ts +186 -0
- package/tests/vitest/unit/apps/deleteApp.test.ts +216 -0
- package/tests/vitest/unit/apps/getApp.test.ts +128 -0
- package/tests/vitest/unit/apps/getAppEvents.test.ts +193 -0
- package/tests/vitest/unit/apps/updateApp.test.ts +412 -0
- package/tests/vitest/unit/auth/fetchTempToken401.test.ts +63 -0
- package/tests/vitest/unit/auth/getTempToken.test.ts +119 -0
- package/tests/vitest/unit/auth/retryTempToken401.test.ts +95 -0
- package/tests/vitest/unit/auth/retryTempTokenMaxRetries.test.ts +206 -0
- package/tests/vitest/unit/auth/retryUserToken401.test.ts +69 -0
- package/tests/vitest/unit/auth/ssoTokenRefresh.test.ts +325 -0
- package/tests/vitest/unit/fields/createField.test.ts +451 -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 +180 -0
- package/tests/vitest/unit/fields/getFields.test.ts +122 -0
- package/tests/vitest/unit/fields/getFieldsUsage.test.ts +160 -0
- package/tests/vitest/unit/fields/updateField.test.ts +285 -0
- package/tests/vitest/unit/formulas/runFormula.test.ts +205 -0
- package/tests/vitest/unit/index.ts +34 -0
- package/tests/vitest/unit/quickbaseClientHttpMethods.test.ts +139 -0
- package/tests/vitest/unit/rateLimit.test.ts +191 -0
- package/tests/vitest/unit/records/deleteRecords.test.ts +112 -0
- package/tests/vitest/unit/records/runQuery.test.ts +102 -0
- package/tests/vitest/unit/records/upsert.test.ts +234 -0
- package/tests/vitest/unit/tables/createRelationship.test.ts +212 -0
- package/tests/vitest/unit/tables/createTable.test.ts +70 -0
- package/tests/vitest/unit/tables/deleteRelationship.test.ts +97 -0
- package/tests/vitest/unit/tables/deleteTable.test.ts +77 -0
- package/tests/vitest/unit/tables/getAppTables.test.ts +85 -0
- package/tests/vitest/unit/tables/getRelationships.test.ts +259 -0
- package/tests/vitest/unit/tables/getTable.test.ts +233 -0
- package/tests/vitest/unit/tables/updateRelationship.test.ts +307 -0
- package/tests/vitest/unit/tables/updateTable.test.ts +80 -0
- package/tests/vitest/unit/tokenLifespan.test.ts +204 -0
- package/tests/vitest/unit/umd.test.ts +8 -0
- package/tools/log-gen.ts +251 -0
- package/tools/log-gen.yaml +4777 -0
- package/tools/openapi-jars/openapi-generator-cli-7.12.0.jar +0 -0
- package/tsconfig.build.json +17 -0
- package/tsconfig.json +32 -0
- package/versionrc.json +9 -0
- package/vitest.config.ts +27 -0
package/build-esm.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
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");
|