quickbase-js 1.1.0-beta.6 → 1.1.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.
- package/README.md +253 -135
- package/dist/esm/quickbase.d.ts +5614 -2861
- package/dist/esm/quickbase.js +3204 -2116
- package/dist/esm/quickbase.js.map +1 -1
- package/dist/esm/quickbase.min.js +1 -1
- package/dist/esm/quickbase.min.js.map +1 -1
- package/dist/umd/quickbase.umd.js +3533 -2325
- package/dist/umd/quickbase.umd.js.map +1 -1
- package/dist/umd/quickbase.umd.min.js +1 -1
- package/dist/umd/quickbase.umd.min.js.map +1 -1
- package/package.json +49 -32
- package/CHANGELOG.md +0 -93
- package/build.js +0 -186
- package/dist/umd/quickbase.umd.d.ts +0 -5341
- package/examples/react.js +0 -48
- package/examples/vanillajs.html +0 -47
- package/examples/vanillatest.html +0 -49
- package/log-gen.yaml +0 -1372
- package/open-api/definitions/apps.ts +0 -274
- package/open-api/definitions/auth.ts +0 -10
- package/open-api/definitions/fields.ts +0 -751
- package/open-api/definitions/index.ts +0 -18
- package/open-api/definitions/records.ts +0 -269
- package/open-api/definitions/relationships.ts +0 -90
- package/open-api/definitions/reports.ts +0 -10
- package/open-api/definitions/tables.ts +0 -112
- package/open-api/fix-spec-main.ts +0 -176
- package/open-api/generate-unified-interface.ts +0 -170
- package/open-api/output/quickbase-fixed.json +0 -6760
- package/open-api/paths/apps.ts +0 -100
- package/open-api/paths/auth.ts +0 -25
- package/open-api/paths/fields.ts +0 -207
- package/open-api/paths/index.ts +0 -17
- package/open-api/paths/records.ts +0 -68
- package/open-api/paths/relationships.ts +0 -32
- package/open-api/paths/reports.ts +0 -34
- package/open-api/paths/tables.ts +0 -162
- package/open-api/regenerate-client.ts +0 -110
- package/playwright-results.txt/.last-run.json +0 -4
- package/playwright.config.ts +0 -37
- package/rollup.config.mjs +0 -114
- package/specs/QuickBase_RESTful_API_2025-03-04T06_22_39.725Z.json +0 -46878
- package/src/generated-unified/QuickbaseClient.ts +0 -62
- package/src/index.ts +0 -1
- package/src/quickbaseClient.ts +0 -313
- package/src/tokenCache.ts +0 -51
- package/test-artifacts/.last-run.json +0 -6
- package/test-esm.js +0 -1
- package/test-results.json +0 -2050
- package/test-umd.js +0 -1
- package/test.ts +0 -1
- package/tests/playwright/qb/auth/cacheSwitching.test.ts +0 -189
- package/tests/playwright/qb/auth/fetchTempToken401.test.ts +0 -217
- package/tests/playwright/qb/auth/getAppWithUserToken.test.ts +0 -151
- package/tests/playwright/qb/auth/getTempToken.test.ts +0 -180
- package/tests/playwright/qb/auth/tokenPrefetch.test.ts +0 -192
- package/tests/playwright/qb/auth/tokenRenewal.test.ts +0 -110
- package/tests/playwright/qb/auth/umd.test.ts +0 -10
- package/tests/setup.ts +0 -51
- package/tests/vitest/qb/apps/copyApp.test.ts +0 -76
- package/tests/vitest/qb/apps/createApp.test.ts +0 -64
- package/tests/vitest/qb/apps/deleteApp.test.ts +0 -76
- package/tests/vitest/qb/apps/getApp.test.ts +0 -40
- package/tests/vitest/qb/fields/createField.test.ts +0 -78
- package/tests/vitest/qb/fields/deleteFields.test.ts +0 -89
- package/tests/vitest/qb/fields/getField.test.ts +0 -85
- package/tests/vitest/qb/fields/getFieldUsage.test.ts +0 -174
- package/tests/vitest/qb/fields/getFields.test.ts +0 -232
- package/tests/vitest/qb/fields/getFieldsUsage.test.ts +0 -77
- package/tests/vitest/qb/index.ts +0 -28
- package/tests/vitest/qb/records/deleteRecords.test.ts +0 -110
- package/tests/vitest/qb/records/runQuery.test.ts +0 -146
- package/tests/vitest/qb/records/upsert.test.ts +0 -102
- package/tests/vitest/qb/tables/createTable.test.ts +0 -55
- package/tests/vitest/qb/tables/deleteTable.test.ts +0 -50
- package/tests/vitest/qb/tables/getAppTables.test.ts +0 -46
- package/tests/vitest/qb/tables/getRelationships.test.ts +0 -80
- package/tests/vitest/qb/tables/getTable.test.ts +0 -26
- package/tests/vitest/qb/tables/updateTable.test.ts +0 -48
- package/tests/vitest/unit/apps/copyApp.test.ts +0 -282
- package/tests/vitest/unit/apps/createApp.test.ts +0 -125
- package/tests/vitest/unit/apps/deleteApp.test.ts +0 -215
- package/tests/vitest/unit/apps/getApp.test.ts +0 -86
- package/tests/vitest/unit/auth/fetchTempToken401.test.ts +0 -85
- package/tests/vitest/unit/auth/getTempToken.test.ts +0 -95
- package/tests/vitest/unit/auth/retryOn401.test.ts +0 -106
- package/tests/vitest/unit/auth/two401s.test.ts +0 -77
- package/tests/vitest/unit/fields/createField.test.ts +0 -391
- package/tests/vitest/unit/fields/deleteFields.test.ts +0 -141
- package/tests/vitest/unit/fields/getField.test.ts +0 -189
- package/tests/vitest/unit/fields/getFieldUsage.test.ts +0 -147
- package/tests/vitest/unit/fields/getFields.test.ts +0 -122
- package/tests/vitest/unit/fields/getFieldsUsage.test.ts +0 -160
- package/tests/vitest/unit/index.ts +0 -33
- package/tests/vitest/unit/records/deleteRecords.test.ts +0 -112
- package/tests/vitest/unit/records/runQuery.test.ts +0 -102
- package/tests/vitest/unit/records/upsert.test.ts +0 -218
- package/tests/vitest/unit/tables/createTable.test.ts +0 -70
- package/tests/vitest/unit/tables/deleteTable.test.ts +0 -77
- package/tests/vitest/unit/tables/getAppTables.test.ts +0 -85
- package/tests/vitest/unit/tables/getRelationships.test.ts +0 -259
- package/tests/vitest/unit/tables/getTable.test.ts +0 -233
- package/tests/vitest/unit/tables/updateTable.test.ts +0 -80
- package/tests/vitest/unit/umd.test.ts +0 -8
- package/text.txt +0 -104
- package/tools/log-gen.ts +0 -175
- package/tools/openapi-jars/openapi-generator-cli-7.12.0.jar +0 -0
- package/tsconfig.build.json +0 -17
- package/tsconfig.json +0 -29
- package/versionrc.json +0 -9
- package/vitest.config.ts +0 -27
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;
|
package/examples/vanillajs.html
DELETED
|
@@ -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>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<title>Quickbase CDN Test</title>
|
|
6
|
-
<!-- Load Quickbase library from CDN -->
|
|
7
|
-
<script src="https://cdn.jsdelivr.net/npm/quickbase-js@1.1.0-beta.5/dist/umd/quickbase.umd.min.js"></script>
|
|
8
|
-
</head>
|
|
9
|
-
|
|
10
|
-
<body>
|
|
11
|
-
<div>
|
|
12
|
-
<h1>Quickbase CDN Test</h1>
|
|
13
|
-
<p id="result">Loading...</p>
|
|
14
|
-
</div>
|
|
15
|
-
<script>
|
|
16
|
-
// Log the global object for debugging
|
|
17
|
-
console.log("Window object:", window);
|
|
18
|
-
|
|
19
|
-
// Log the QuickbaseJS variable for debugging
|
|
20
|
-
console.log("QuickbaseJS:", typeof QuickbaseJS);
|
|
21
|
-
|
|
22
|
-
// Ensure the QuickbaseJS library is loaded
|
|
23
|
-
if (typeof QuickbaseJS === "undefined") {
|
|
24
|
-
console.error("QuickbaseJS library not loaded.");
|
|
25
|
-
document.getElementById("result").textContent = "Error: Failed to load QuickbaseJS library.";
|
|
26
|
-
} else {
|
|
27
|
-
console.log("QuickbaseJS library loaded successfully.");
|
|
28
|
-
|
|
29
|
-
// Initialize the Quickbase client
|
|
30
|
-
var qbClient = QuickbaseJS.quickbase({
|
|
31
|
-
realm: "builderprogram-dbradford6815", // Replace with your realm (without .quickbase.com)
|
|
32
|
-
useTempTokens: true,
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
// Fetch the app using the getApp method
|
|
36
|
-
qbClient.getApp({ appId: "buwai2zpe" })
|
|
37
|
-
.then(function (app) {
|
|
38
|
-
document.getElementById("result").textContent = "App Name: " + app.name;
|
|
39
|
-
})
|
|
40
|
-
.catch(function (err) {
|
|
41
|
-
console.error("Error fetching app:", err);
|
|
42
|
-
document.getElementById("result").textContent =
|
|
43
|
-
"Error: " + (err.message || "Failed to load app");
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
</script>
|
|
47
|
-
</body>
|
|
48
|
-
|
|
49
|
-
</html>
|