@voobase/cli 0.1.1-nonprod.2039 → 0.1.1-nonprod.2050
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/dist-bundle/index.mjs +69 -61
- package/package.json +9 -6
- package/runtime-sdk/dist/auth/client.d.ts +14 -0
- package/runtime-sdk/dist/auth/client.js +28 -0
- package/runtime-sdk/dist/blob/client.d.ts +39 -0
- package/runtime-sdk/dist/blob/client.js +148 -0
- package/runtime-sdk/dist/blob/client.test.d.ts +1 -0
- package/runtime-sdk/dist/blob/client.test.js +494 -0
- package/runtime-sdk/dist/browser/app.d.ts +142 -0
- package/runtime-sdk/dist/browser/app.js +256 -0
- package/runtime-sdk/dist/browser/app.test.d.ts +1 -0
- package/runtime-sdk/dist/browser/app.test.js +81 -0
- package/runtime-sdk/dist/browser/errors.d.ts +39 -0
- package/runtime-sdk/dist/browser/errors.js +265 -0
- package/runtime-sdk/dist/browser/errors.test.d.ts +1 -0
- package/runtime-sdk/dist/browser/errors.test.js +41 -0
- package/runtime-sdk/dist/browser.d.ts +5 -0
- package/runtime-sdk/dist/browser.js +5 -0
- package/runtime-sdk/dist/client.d.ts +16 -0
- package/runtime-sdk/dist/client.js +22 -0
- package/runtime-sdk/dist/cms/client.d.ts +39 -0
- package/runtime-sdk/dist/cms/client.js +56 -0
- package/runtime-sdk/dist/cms/client.test.d.ts +1 -0
- package/runtime-sdk/dist/cms/client.test.js +56 -0
- package/runtime-sdk/dist/cms/media.d.ts +10 -0
- package/runtime-sdk/dist/cms/media.js +113 -0
- package/runtime-sdk/dist/cms/media.test.d.ts +1 -0
- package/runtime-sdk/dist/cms/media.test.js +76 -0
- package/runtime-sdk/dist/cms/taxonomy.d.ts +8 -0
- package/runtime-sdk/dist/cms/taxonomy.js +77 -0
- package/runtime-sdk/dist/cms/taxonomy.test.d.ts +1 -0
- package/runtime-sdk/dist/cms/taxonomy.test.js +65 -0
- package/runtime-sdk/dist/data-form/client.d.ts +19 -0
- package/runtime-sdk/dist/data-form/client.js +118 -0
- package/runtime-sdk/dist/data-form/client.test.d.ts +1 -0
- package/runtime-sdk/dist/data-form/client.test.js +210 -0
- package/runtime-sdk/dist/data-form/contracts.d.ts +10 -0
- package/runtime-sdk/dist/data-form/contracts.js +33 -0
- package/runtime-sdk/dist/data-form/index.d.ts +3 -0
- package/runtime-sdk/dist/data-form/index.js +2 -0
- package/runtime-sdk/dist/data-form/types.d.ts +110 -0
- package/runtime-sdk/dist/data-form/types.js +1 -0
- package/runtime-sdk/dist/http.d.ts +27 -0
- package/runtime-sdk/dist/http.js +126 -0
- package/runtime-sdk/dist/index.d.ts +19 -0
- package/runtime-sdk/dist/index.js +14 -0
- package/runtime-sdk/dist/notification/client.d.ts +16 -0
- package/runtime-sdk/dist/notification/client.js +39 -0
- package/runtime-sdk/dist/notification/index.d.ts +1 -0
- package/runtime-sdk/dist/notification/index.js +1 -0
- package/runtime-sdk/dist/react/context.d.ts +18 -0
- package/runtime-sdk/dist/react/context.js +28 -0
- package/runtime-sdk/dist/react/hooks.d.ts +90 -0
- package/runtime-sdk/dist/react/hooks.js +172 -0
- package/runtime-sdk/dist/react.d.ts +2 -0
- package/runtime-sdk/dist/react.js +2 -0
- package/runtime-sdk/dist/session/browser.d.ts +25 -0
- package/runtime-sdk/dist/session/browser.js +60 -0
- package/runtime-sdk/dist/types/auth.d.ts +38 -0
- package/runtime-sdk/dist/types/auth.js +1 -0
- package/runtime-sdk/dist/types/cms.d.ts +93 -0
- package/runtime-sdk/dist/types/cms.js +1 -0
- package/runtime-sdk/dist/types/notification.d.ts +37 -0
- package/runtime-sdk/dist/types/notification.js +1 -0
- package/runtime-sdk/dist/types/object-storage.d.ts +58 -0
- package/runtime-sdk/dist/types/object-storage.js +1 -0
- package/runtime-sdk/dist/types/workflow.d.ts +52 -0
- package/runtime-sdk/dist/types/workflow.js +1 -0
- package/runtime-sdk/dist/workflow/client.d.ts +30 -0
- package/runtime-sdk/dist/workflow/client.js +45 -0
- package/scaffold-assets-manifest.json +429 -0
- package/template-blocks/assets.ts +95 -0
- package/template-blocks/contract/capabilities.ts +33 -0
- package/template-blocks/contract/facade-contract.ts +59 -0
- package/template-blocks/contract/index.ts +4 -0
- package/template-blocks/contract/path-builders.ts +76 -0
- package/template-blocks/contract/route-path-patterns-source.ts +222 -0
- package/template-blocks/contract/route-path-patterns.ts +210 -0
- package/template-blocks/contract/runtime-config.ts +256 -0
- package/template-blocks/dev-support/index.ts +2 -0
- package/template-blocks/dev-support/node/auth-shell.ts +31 -0
- package/template-blocks/dev-support/node/index.ts +3 -0
- package/template-blocks/dev-support/node/proxy.ts +133 -0
- package/template-blocks/dev-support/node/runtime-config.ts +163 -0
- package/template-blocks/dev-support/vite/auth-shell.ts +23 -0
- package/template-blocks/dev-support/vite/index.ts +3 -0
- package/template-blocks/dev-support/vite/proxy.ts +451 -0
- package/template-blocks/dev-support/vite/runtime-config.ts +107 -0
- package/template-blocks/legacy/app-core.ts +153 -0
- package/template-blocks/legacy/index.ts +10 -0
- package/template-blocks/legacy/lifecycle.ts +38 -0
- package/template-blocks/legacy/metadata.ts +59 -0
- package/template-blocks/legacy/pages.ts +156 -0
- package/template-blocks/legacy/react-lock.ts +1599 -0
- package/template-blocks/legacy/react.ts +823 -0
- package/template-blocks/legacy/tailwind.ts +1138 -0
- package/template-blocks/legacy/wrappers/auth.ts +105 -0
- package/template-blocks/legacy/wrappers/proxy.ts +250 -0
- package/template-blocks/legacy/wrappers/runtime.ts +535 -0
- package/template-blocks/protocol/auth-routes.ts +82 -0
- package/template-blocks/protocol/cms-routes.ts +81 -0
- package/template-blocks/protocol/index.ts +4 -0
- package/template-blocks/protocol/public-app-routes.ts +48 -0
- package/template-blocks/protocol/route-map.ts +75 -0
- package/template-blocks/routing.ts +62 -0
- package/template-blocks/server/html-injection.ts +45 -0
- package/template-blocks/server/proxy-routing.ts +65 -0
- package/template-blocks/server/request-context.ts +103 -0
- package/template-blocks/server/route-strip.ts +47 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { buildDataFormRuntimeRecordPath, buildDataFormRuntimeRecordsPath, buildDataFormRuntimeResourcesPath, buildDataFormRuntimeSchemaPath, normalizeDataFormRuntimeListQuery, } from "./contracts.js";
|
|
2
|
+
import { BaseRuntimeSdk } from "../http.js";
|
|
3
|
+
const DEFAULT_PREVIEW_PATH_PREFIX = "/previews";
|
|
4
|
+
const PREVIEW_ROUTE_KIND_SEGMENTS = new Set(["r", "s"]);
|
|
5
|
+
function inferPreviewPath(pathname) {
|
|
6
|
+
const normalizedPathname = pathname.startsWith("/") ? pathname : `/${pathname}`;
|
|
7
|
+
if (normalizedPathname !== DEFAULT_PREVIEW_PATH_PREFIX && !normalizedPathname.startsWith(`${DEFAULT_PREVIEW_PATH_PREFIX}/`)) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
const segments = normalizedPathname
|
|
11
|
+
.slice(DEFAULT_PREVIEW_PATH_PREFIX.length)
|
|
12
|
+
.replace(/^\/+/g, "")
|
|
13
|
+
.split("/")
|
|
14
|
+
.filter((segment) => segment.length > 0);
|
|
15
|
+
if (segments.length < 2) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
if (PREVIEW_ROUTE_KIND_SEGMENTS.has(segments[0] ?? "")) {
|
|
19
|
+
return segments.length >= 4;
|
|
20
|
+
}
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
export class RuntimeDataFormClient extends BaseRuntimeSdk {
|
|
24
|
+
constructor(options) {
|
|
25
|
+
super(options);
|
|
26
|
+
}
|
|
27
|
+
resolveRuntimeEnv() {
|
|
28
|
+
if (this.options.env === "preview" || this.options.env === "prod") {
|
|
29
|
+
return this.options.env;
|
|
30
|
+
}
|
|
31
|
+
const runtimeConfigEnv = readBrowserRuntimeEnv();
|
|
32
|
+
if (runtimeConfigEnv) {
|
|
33
|
+
return runtimeConfigEnv;
|
|
34
|
+
}
|
|
35
|
+
const baseUrl = resolveRouteBaseUrl(this.options);
|
|
36
|
+
try {
|
|
37
|
+
const pathname = new URL(baseUrl).pathname;
|
|
38
|
+
return inferPreviewPath(pathname) ? "preview" : "prod";
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return "prod";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
withRuntimeEnv(path) {
|
|
45
|
+
const url = new URL(path, "http://platform.local/");
|
|
46
|
+
url.searchParams.set("env", this.resolveRuntimeEnv());
|
|
47
|
+
return `${url.pathname}${url.search}`;
|
|
48
|
+
}
|
|
49
|
+
async listResources() {
|
|
50
|
+
return this.request(this.withRuntimeEnv(buildDataFormRuntimeResourcesPath(this.options.appId)));
|
|
51
|
+
}
|
|
52
|
+
async getSchema(resourceKey) {
|
|
53
|
+
return this.request(this.withRuntimeEnv(buildDataFormRuntimeSchemaPath(this.options.appId, resourceKey)));
|
|
54
|
+
}
|
|
55
|
+
async listRecords(args) {
|
|
56
|
+
const query = normalizeDataFormRuntimeListQuery({
|
|
57
|
+
page: args.page,
|
|
58
|
+
page_size: args.pageSize,
|
|
59
|
+
owner_scope: args.ownerScope,
|
|
60
|
+
q: args.q
|
|
61
|
+
});
|
|
62
|
+
const path = new URL(buildDataFormRuntimeRecordsPath(this.options.appId, args.resourceKey), "http://platform.local/");
|
|
63
|
+
path.searchParams.set("page", String(query.page));
|
|
64
|
+
path.searchParams.set("page_size", String(query.page_size));
|
|
65
|
+
path.searchParams.set("owner_scope", query.owner_scope);
|
|
66
|
+
if (query.q) {
|
|
67
|
+
path.searchParams.set("q", query.q);
|
|
68
|
+
}
|
|
69
|
+
path.searchParams.set("env", this.resolveRuntimeEnv());
|
|
70
|
+
return this.request(`${path.pathname}${path.search}`);
|
|
71
|
+
}
|
|
72
|
+
async getRecord(resourceKey, recordId) {
|
|
73
|
+
return this.request(this.withRuntimeEnv(buildDataFormRuntimeRecordPath(this.options.appId, resourceKey, recordId)));
|
|
74
|
+
}
|
|
75
|
+
async createRecord(resourceKey, input) {
|
|
76
|
+
return this.request(this.withRuntimeEnv(buildDataFormRuntimeRecordsPath(this.options.appId, resourceKey)), {
|
|
77
|
+
method: "POST",
|
|
78
|
+
body: JSON.stringify(input)
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
async updateRecord(resourceKey, recordId, input) {
|
|
82
|
+
return this.request(this.withRuntimeEnv(buildDataFormRuntimeRecordPath(this.options.appId, resourceKey, recordId)), {
|
|
83
|
+
method: "PATCH",
|
|
84
|
+
body: JSON.stringify(input)
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function resolveRouteBaseUrl(options) {
|
|
89
|
+
const explicitPublicBaseUrl = options.publicBaseUrl?.trim();
|
|
90
|
+
if (explicitPublicBaseUrl) {
|
|
91
|
+
return explicitPublicBaseUrl;
|
|
92
|
+
}
|
|
93
|
+
const browserPublicBaseUrl = readBrowserRuntimeConfig()?.publicBaseUrl;
|
|
94
|
+
if (typeof browserPublicBaseUrl === "string" && browserPublicBaseUrl.trim()) {
|
|
95
|
+
return browserPublicBaseUrl.trim();
|
|
96
|
+
}
|
|
97
|
+
return options.baseUrl.trim();
|
|
98
|
+
}
|
|
99
|
+
function readBrowserRuntimeEnv() {
|
|
100
|
+
const runtimeConfig = readBrowserRuntimeConfig();
|
|
101
|
+
if (!runtimeConfig) {
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
if (runtimeConfig.env === "preview" || runtimeConfig.env === "prod") {
|
|
105
|
+
return runtimeConfig.env;
|
|
106
|
+
}
|
|
107
|
+
if (runtimeConfig.mode === "preview") {
|
|
108
|
+
return "preview";
|
|
109
|
+
}
|
|
110
|
+
if (runtimeConfig.mode === "prod-path" || runtimeConfig.mode === "prod-host") {
|
|
111
|
+
return "prod";
|
|
112
|
+
}
|
|
113
|
+
return undefined;
|
|
114
|
+
}
|
|
115
|
+
function readBrowserRuntimeConfig() {
|
|
116
|
+
const runtimeWindow = globalThis.window;
|
|
117
|
+
return runtimeWindow?.__PLATFORM_RUNTIME_CONFIG__;
|
|
118
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import test from "node:test";
|
|
4
|
+
import { RuntimeDataFormClient } from "./client.js";
|
|
5
|
+
test("runtime data form client keeps mounted preview path single when building requests", async () => {
|
|
6
|
+
const calls = [];
|
|
7
|
+
const client = new RuntimeDataFormClient({
|
|
8
|
+
baseUrl: "http://127.0.0.1.nip.io/previews/app-demo/rel-demo/",
|
|
9
|
+
appId: "app-demo",
|
|
10
|
+
fetchImpl: async (input, init) => {
|
|
11
|
+
const url = String(input);
|
|
12
|
+
calls.push({ url, method: String(init?.method ?? "GET") });
|
|
13
|
+
if (url === "http://127.0.0.1.nip.io/previews/app-demo/rel-demo/api/public/apps/app-demo/data-form/resources?env=preview") {
|
|
14
|
+
return jsonResponse({ resources: [] });
|
|
15
|
+
}
|
|
16
|
+
if (url === "http://127.0.0.1.nip.io/previews/app-demo/rel-demo/api/public/apps/app-demo/data-form/resources/profile/schema?env=preview") {
|
|
17
|
+
return jsonResponse({
|
|
18
|
+
resource: {
|
|
19
|
+
resource_key: "profile",
|
|
20
|
+
display_name: "Profile",
|
|
21
|
+
resource_kind: "end_user_owned",
|
|
22
|
+
owner_type: "identity",
|
|
23
|
+
sharing_mode: "app_scoped",
|
|
24
|
+
access_policy: {
|
|
25
|
+
create: "own",
|
|
26
|
+
read: "own",
|
|
27
|
+
update: "own"
|
|
28
|
+
},
|
|
29
|
+
fields: []
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
if (url ===
|
|
34
|
+
"http://127.0.0.1.nip.io/previews/app-demo/rel-demo/api/public/apps/app-demo/data-form/resources/profile/records?page=2&page_size=5&owner_scope=all&q=demo&env=preview") {
|
|
35
|
+
return jsonResponse({
|
|
36
|
+
items: [],
|
|
37
|
+
page: 2,
|
|
38
|
+
page_size: 5,
|
|
39
|
+
total: 0,
|
|
40
|
+
has_more: false
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
if (url === "http://127.0.0.1.nip.io/previews/app-demo/rel-demo/api/public/apps/app-demo/data-form/resources/profile/records?env=preview") {
|
|
44
|
+
return jsonResponse({
|
|
45
|
+
record_id: "rec_1",
|
|
46
|
+
resource_key: "profile",
|
|
47
|
+
owner_identity_id: "id_1",
|
|
48
|
+
values: { nickname: "neo" },
|
|
49
|
+
created_at: "2026-05-15T00:00:00.000Z",
|
|
50
|
+
updated_at: "2026-05-15T00:00:00.000Z"
|
|
51
|
+
}, 201);
|
|
52
|
+
}
|
|
53
|
+
throw new Error(`Unexpected fetch url: ${url}`);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
const resources = await client.listResources();
|
|
57
|
+
const schema = await client.getSchema("profile");
|
|
58
|
+
const list = await client.listRecords({ resourceKey: "profile", page: 2, pageSize: 5, ownerScope: "all", q: " demo " });
|
|
59
|
+
const created = await client.createRecord("profile", {
|
|
60
|
+
values: {
|
|
61
|
+
nickname: "neo"
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
assert.deepEqual(resources, { resources: [] });
|
|
65
|
+
assert.equal(schema.resource.resource_key, "profile");
|
|
66
|
+
assert.equal(list.page, 2);
|
|
67
|
+
assert.equal(created.record_id, "rec_1");
|
|
68
|
+
assert.deepEqual(calls, [
|
|
69
|
+
{
|
|
70
|
+
url: "http://127.0.0.1.nip.io/previews/app-demo/rel-demo/api/public/apps/app-demo/data-form/resources?env=preview",
|
|
71
|
+
method: "GET"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
url: "http://127.0.0.1.nip.io/previews/app-demo/rel-demo/api/public/apps/app-demo/data-form/resources/profile/schema?env=preview",
|
|
75
|
+
method: "GET"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
url: "http://127.0.0.1.nip.io/previews/app-demo/rel-demo/api/public/apps/app-demo/data-form/resources/profile/records?page=2&page_size=5&owner_scope=all&q=demo&env=preview",
|
|
79
|
+
method: "GET"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
url: "http://127.0.0.1.nip.io/previews/app-demo/rel-demo/api/public/apps/app-demo/data-form/resources/profile/records?env=preview",
|
|
83
|
+
method: "POST"
|
|
84
|
+
}
|
|
85
|
+
]);
|
|
86
|
+
});
|
|
87
|
+
function jsonResponse(payload, status = 200) {
|
|
88
|
+
return new Response(JSON.stringify(payload), {
|
|
89
|
+
status,
|
|
90
|
+
headers: { "Content-Type": "application/json" }
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
test("runtime data form client prefers explicit env instead of inferring prod from localhost base url", async () => {
|
|
94
|
+
const calls = [];
|
|
95
|
+
const client = new RuntimeDataFormClient({
|
|
96
|
+
baseUrl: "http://127.0.0.1:3003/",
|
|
97
|
+
appId: "app-demo",
|
|
98
|
+
env: "preview",
|
|
99
|
+
fetchImpl: async (input) => {
|
|
100
|
+
const url = String(input);
|
|
101
|
+
calls.push(url);
|
|
102
|
+
if (url === "http://127.0.0.1:3003/api/public/apps/app-demo/data-form/resources?env=preview") {
|
|
103
|
+
return jsonResponse({ resources: [] });
|
|
104
|
+
}
|
|
105
|
+
throw new Error(`Unexpected fetch url: ${url}`);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
await client.listResources();
|
|
109
|
+
assert.deepEqual(calls, [
|
|
110
|
+
"http://127.0.0.1:3003/api/public/apps/app-demo/data-form/resources?env=preview"
|
|
111
|
+
]);
|
|
112
|
+
});
|
|
113
|
+
test("runtime data form client infers preview from tenant-scoped preview base url", async () => {
|
|
114
|
+
const calls = [];
|
|
115
|
+
const client = new RuntimeDataFormClient({
|
|
116
|
+
baseUrl: "https://runtime.example.com/previews/t-jason-workspace/app-demo/rel-123/",
|
|
117
|
+
appId: "app-demo",
|
|
118
|
+
fetchImpl: async (input) => {
|
|
119
|
+
const url = String(input);
|
|
120
|
+
calls.push(url);
|
|
121
|
+
if (url === "https://runtime.example.com/previews/t-jason-workspace/app-demo/rel-123/api/public/apps/app-demo/data-form/resources?env=preview") {
|
|
122
|
+
return jsonResponse({ resources: [] });
|
|
123
|
+
}
|
|
124
|
+
throw new Error(`Unexpected fetch url: ${url}`);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
await client.listResources();
|
|
128
|
+
assert.deepEqual(calls, [
|
|
129
|
+
"https://runtime.example.com/previews/t-jason-workspace/app-demo/rel-123/api/public/apps/app-demo/data-form/resources?env=preview"
|
|
130
|
+
]);
|
|
131
|
+
});
|
|
132
|
+
test("runtime data form client infers preview from explicit publicBaseUrl when baseUrl is request origin", async () => {
|
|
133
|
+
const calls = [];
|
|
134
|
+
const client = new RuntimeDataFormClient({
|
|
135
|
+
baseUrl: "https://runtime.example.com/",
|
|
136
|
+
publicBaseUrl: "https://runtime.example.com/previews/t-jason-workspace/app-demo/rel-123/",
|
|
137
|
+
appId: "app-demo",
|
|
138
|
+
fetchImpl: async (input) => {
|
|
139
|
+
const url = String(input);
|
|
140
|
+
calls.push(url);
|
|
141
|
+
if (url === "https://runtime.example.com/api/public/apps/app-demo/data-form/resources?env=preview") {
|
|
142
|
+
return jsonResponse({ resources: [] });
|
|
143
|
+
}
|
|
144
|
+
throw new Error(`Unexpected fetch url: ${url}`);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
await client.listResources();
|
|
148
|
+
assert.deepEqual(calls, [
|
|
149
|
+
"https://runtime.example.com/api/public/apps/app-demo/data-form/resources?env=preview"
|
|
150
|
+
]);
|
|
151
|
+
});
|
|
152
|
+
test("runtime data form client infers preview from routed preview base url", async () => {
|
|
153
|
+
const calls = [];
|
|
154
|
+
const client = new RuntimeDataFormClient({
|
|
155
|
+
baseUrl: "https://runtime.example.com/previews/r/t-jason-workspace/app-demo/rel-123/",
|
|
156
|
+
appId: "app-demo",
|
|
157
|
+
fetchImpl: async (input) => {
|
|
158
|
+
const url = String(input);
|
|
159
|
+
calls.push(url);
|
|
160
|
+
if (url === "https://runtime.example.com/previews/r/t-jason-workspace/app-demo/rel-123/api/public/apps/app-demo/data-form/resources?env=preview") {
|
|
161
|
+
return jsonResponse({ resources: [] });
|
|
162
|
+
}
|
|
163
|
+
throw new Error(`Unexpected fetch url: ${url}`);
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
await client.listResources();
|
|
167
|
+
assert.deepEqual(calls, [
|
|
168
|
+
"https://runtime.example.com/previews/r/t-jason-workspace/app-demo/rel-123/api/public/apps/app-demo/data-form/resources?env=preview"
|
|
169
|
+
]);
|
|
170
|
+
});
|
|
171
|
+
test("runtime data form client falls back to browser runtime config when options only carry request origin", async () => {
|
|
172
|
+
const previousWindow = globalThis.window;
|
|
173
|
+
globalThis.window = {
|
|
174
|
+
__PLATFORM_RUNTIME_CONFIG__: {
|
|
175
|
+
publicBaseUrl: "https://runtime.example.com/previews/r/t-jason-workspace/app-demo/rel-123/",
|
|
176
|
+
mode: "preview"
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
try {
|
|
180
|
+
const calls = [];
|
|
181
|
+
const client = new RuntimeDataFormClient({
|
|
182
|
+
baseUrl: "https://runtime.example.com/",
|
|
183
|
+
appId: "app-demo",
|
|
184
|
+
fetchImpl: async (input) => {
|
|
185
|
+
const url = String(input);
|
|
186
|
+
calls.push(url);
|
|
187
|
+
if (url === "https://runtime.example.com/api/public/apps/app-demo/data-form/resources?env=preview") {
|
|
188
|
+
return jsonResponse({ resources: [] });
|
|
189
|
+
}
|
|
190
|
+
throw new Error(`Unexpected fetch url: ${url}`);
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
await client.listResources();
|
|
194
|
+
assert.deepEqual(calls, [
|
|
195
|
+
"https://runtime.example.com/api/public/apps/app-demo/data-form/resources?env=preview"
|
|
196
|
+
]);
|
|
197
|
+
}
|
|
198
|
+
finally {
|
|
199
|
+
if (previousWindow === undefined) {
|
|
200
|
+
delete globalThis.window;
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
globalThis.window = previousWindow;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
test("compiled browser data form client is self-contained for vendored templates", async () => {
|
|
208
|
+
const compiled = await readFile(new URL("../../dist/data-form/client.js", import.meta.url), "utf8");
|
|
209
|
+
assert.doesNotMatch(compiled, /@platform\/url-contract/u);
|
|
210
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DataFormRuntimeListQuery } from "./types.js";
|
|
2
|
+
export declare const DATA_FORM_RUNTIME_ROUTE_PREFIX: "/api/public/apps";
|
|
3
|
+
export declare const DEFAULT_DATA_FORM_RUNTIME_PAGE = 1;
|
|
4
|
+
export declare const DEFAULT_DATA_FORM_RUNTIME_PAGE_SIZE = 20;
|
|
5
|
+
export declare function buildDataFormRuntimeBasePath(appId: string): string;
|
|
6
|
+
export declare function buildDataFormRuntimeResourcesPath(appId: string): string;
|
|
7
|
+
export declare function buildDataFormRuntimeSchemaPath(appId: string, resourceKey: string): string;
|
|
8
|
+
export declare function buildDataFormRuntimeRecordsPath(appId: string, resourceKey: string): string;
|
|
9
|
+
export declare function buildDataFormRuntimeRecordPath(appId: string, resourceKey: string, recordId: string): string;
|
|
10
|
+
export declare function normalizeDataFormRuntimeListQuery(query: DataFormRuntimeListQuery): Required<DataFormRuntimeListQuery>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export const DATA_FORM_RUNTIME_ROUTE_PREFIX = "/api/public/apps";
|
|
2
|
+
export const DEFAULT_DATA_FORM_RUNTIME_PAGE = 1;
|
|
3
|
+
export const DEFAULT_DATA_FORM_RUNTIME_PAGE_SIZE = 20;
|
|
4
|
+
export function buildDataFormRuntimeBasePath(appId) {
|
|
5
|
+
return `${DATA_FORM_RUNTIME_ROUTE_PREFIX}/${encodeURIComponent(appId)}/data-form`;
|
|
6
|
+
}
|
|
7
|
+
export function buildDataFormRuntimeResourcesPath(appId) {
|
|
8
|
+
return `${buildDataFormRuntimeBasePath(appId)}/resources`;
|
|
9
|
+
}
|
|
10
|
+
export function buildDataFormRuntimeSchemaPath(appId, resourceKey) {
|
|
11
|
+
return `${buildDataFormRuntimeResourcesPath(appId)}/${encodeURIComponent(resourceKey)}/schema`;
|
|
12
|
+
}
|
|
13
|
+
export function buildDataFormRuntimeRecordsPath(appId, resourceKey) {
|
|
14
|
+
return `${buildDataFormRuntimeResourcesPath(appId)}/${encodeURIComponent(resourceKey)}/records`;
|
|
15
|
+
}
|
|
16
|
+
export function buildDataFormRuntimeRecordPath(appId, resourceKey, recordId) {
|
|
17
|
+
return `${buildDataFormRuntimeRecordsPath(appId, resourceKey)}/${encodeURIComponent(recordId)}`;
|
|
18
|
+
}
|
|
19
|
+
export function normalizeDataFormRuntimeListQuery(query) {
|
|
20
|
+
return {
|
|
21
|
+
page: normalizePositiveInteger(query.page, DEFAULT_DATA_FORM_RUNTIME_PAGE),
|
|
22
|
+
page_size: normalizePositiveInteger(query.page_size, DEFAULT_DATA_FORM_RUNTIME_PAGE_SIZE),
|
|
23
|
+
owner_scope: query.owner_scope === "all" ? "all" : "me",
|
|
24
|
+
q: typeof query.q === "string" ? query.q.trim() : ""
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function normalizePositiveInteger(value, fallback) {
|
|
28
|
+
if (!Number.isFinite(value) || value === undefined) {
|
|
29
|
+
return fallback;
|
|
30
|
+
}
|
|
31
|
+
const normalized = Math.floor(value);
|
|
32
|
+
return normalized > 0 ? normalized : fallback;
|
|
33
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { RuntimeDataFormClient } from "./client.js";
|
|
2
|
+
export { buildDataFormRuntimeBasePath, buildDataFormRuntimeRecordPath, buildDataFormRuntimeRecordsPath, buildDataFormRuntimeResourcesPath, buildDataFormRuntimeSchemaPath, DEFAULT_DATA_FORM_RUNTIME_PAGE, DEFAULT_DATA_FORM_RUNTIME_PAGE_SIZE, normalizeDataFormRuntimeListQuery } from "./contracts.js";
|
|
3
|
+
export type { DataFormRuntimeCreateRecordInput, DataFormRuntimeListQuery, DataFormRuntimeRecord, DataFormRuntimeRecordListResponse, DataFormRuntimeRecordValues, DataFormRuntimeResourceListResponse, DataFormRuntimeResourceSummary, DataFormRuntimeSchemaResponse, DataFormRuntimeUpdateRecordInput } from "./types.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { RuntimeDataFormClient } from "./client.js";
|
|
2
|
+
export { buildDataFormRuntimeBasePath, buildDataFormRuntimeRecordPath, buildDataFormRuntimeRecordsPath, buildDataFormRuntimeResourcesPath, buildDataFormRuntimeSchemaPath, DEFAULT_DATA_FORM_RUNTIME_PAGE, DEFAULT_DATA_FORM_RUNTIME_PAGE_SIZE, normalizeDataFormRuntimeListQuery } from "./contracts.js";
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
export type DataFormAccessScope = "public" | "own" | "admin";
|
|
2
|
+
export type DataFormAccessPolicy = {
|
|
3
|
+
create: DataFormAccessScope;
|
|
4
|
+
read: DataFormAccessScope;
|
|
5
|
+
update: DataFormAccessScope;
|
|
6
|
+
};
|
|
7
|
+
export type DataFormResourceKind = "anonymous_submission" | "end_user_owned" | "admin_managed";
|
|
8
|
+
export type DataFormOwnerType = "none" | "identity";
|
|
9
|
+
export type DataFormResourceOwnerType = "app" | "tenant";
|
|
10
|
+
export type DataFormSharingMode = "app_scoped" | "shared";
|
|
11
|
+
export type DataFormConsumerAccessMode = "read_only" | "read_write";
|
|
12
|
+
export type DataFormFieldValidation = {
|
|
13
|
+
required?: boolean;
|
|
14
|
+
min_length?: number;
|
|
15
|
+
max_length?: number;
|
|
16
|
+
pattern?: string | null;
|
|
17
|
+
min?: number;
|
|
18
|
+
max?: number;
|
|
19
|
+
step?: number;
|
|
20
|
+
min_date?: string | null;
|
|
21
|
+
max_date?: string | null;
|
|
22
|
+
max_count?: number;
|
|
23
|
+
max_size?: number;
|
|
24
|
+
allowed_protocols?: string[];
|
|
25
|
+
};
|
|
26
|
+
export type DataFormFieldUi = {
|
|
27
|
+
multiline?: boolean;
|
|
28
|
+
with_time?: boolean;
|
|
29
|
+
number_kind?: "integer" | "decimal";
|
|
30
|
+
widget?: string;
|
|
31
|
+
};
|
|
32
|
+
export type DataFormFieldAccept = {
|
|
33
|
+
mime_types?: string[];
|
|
34
|
+
extensions?: string[];
|
|
35
|
+
};
|
|
36
|
+
export type DataFormFieldOption = {
|
|
37
|
+
label: string;
|
|
38
|
+
value: string;
|
|
39
|
+
};
|
|
40
|
+
export type DataFormFieldOptions = {
|
|
41
|
+
values?: DataFormFieldOption[];
|
|
42
|
+
};
|
|
43
|
+
export type DataFormFieldSpec = {
|
|
44
|
+
name: string;
|
|
45
|
+
label: string;
|
|
46
|
+
type: string;
|
|
47
|
+
required: boolean;
|
|
48
|
+
default: unknown;
|
|
49
|
+
description: string;
|
|
50
|
+
order: number;
|
|
51
|
+
readonly?: boolean;
|
|
52
|
+
system_managed?: boolean;
|
|
53
|
+
validation?: DataFormFieldValidation;
|
|
54
|
+
options?: DataFormFieldOptions;
|
|
55
|
+
relation_target?: {
|
|
56
|
+
collection: string;
|
|
57
|
+
} | null;
|
|
58
|
+
accept?: DataFormFieldAccept;
|
|
59
|
+
ui?: DataFormFieldUi;
|
|
60
|
+
content_format?: string;
|
|
61
|
+
};
|
|
62
|
+
export type DataFormRuntimeListQuery = {
|
|
63
|
+
page?: number;
|
|
64
|
+
page_size?: number;
|
|
65
|
+
owner_scope?: "me" | "all";
|
|
66
|
+
q?: string;
|
|
67
|
+
};
|
|
68
|
+
export type DataFormRuntimeRecordValues = Record<string, unknown>;
|
|
69
|
+
export type DataFormRuntimeResourceSummary = {
|
|
70
|
+
resource_key: string;
|
|
71
|
+
display_name: string;
|
|
72
|
+
resource_kind: DataFormResourceKind;
|
|
73
|
+
owner_type: DataFormOwnerType;
|
|
74
|
+
resource_owner_type: DataFormResourceOwnerType;
|
|
75
|
+
resource_owner_id?: string;
|
|
76
|
+
sharing_mode: DataFormSharingMode;
|
|
77
|
+
consumer_app_ids?: string[];
|
|
78
|
+
consumer_access: DataFormConsumerAccessMode;
|
|
79
|
+
access_policy: DataFormAccessPolicy;
|
|
80
|
+
};
|
|
81
|
+
export type DataFormRuntimeSchemaResponse = {
|
|
82
|
+
resource: DataFormRuntimeResourceSummary & {
|
|
83
|
+
fields: DataFormFieldSpec[];
|
|
84
|
+
description?: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
export type DataFormRuntimeResourceListResponse = {
|
|
88
|
+
resources: DataFormRuntimeResourceSummary[];
|
|
89
|
+
};
|
|
90
|
+
export type DataFormRuntimeRecord = {
|
|
91
|
+
record_id: string;
|
|
92
|
+
resource_key: string;
|
|
93
|
+
owner_identity_id: string | null;
|
|
94
|
+
values: DataFormRuntimeRecordValues;
|
|
95
|
+
created_at: string;
|
|
96
|
+
updated_at: string;
|
|
97
|
+
};
|
|
98
|
+
export type DataFormRuntimeRecordListResponse = {
|
|
99
|
+
items: DataFormRuntimeRecord[];
|
|
100
|
+
page: number;
|
|
101
|
+
page_size: number;
|
|
102
|
+
total: number;
|
|
103
|
+
has_more: boolean;
|
|
104
|
+
};
|
|
105
|
+
export type DataFormRuntimeCreateRecordInput = {
|
|
106
|
+
values: DataFormRuntimeRecordValues;
|
|
107
|
+
};
|
|
108
|
+
export type DataFormRuntimeUpdateRecordInput = {
|
|
109
|
+
values: DataFormRuntimeRecordValues;
|
|
110
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface RuntimeSdkOptions {
|
|
2
|
+
baseUrl: string;
|
|
3
|
+
publicBaseUrl?: string;
|
|
4
|
+
appId: string;
|
|
5
|
+
env?: "preview" | "prod";
|
|
6
|
+
fetchImpl?: typeof fetch;
|
|
7
|
+
getHeaders?: () => HeadersInit | Promise<HeadersInit>;
|
|
8
|
+
}
|
|
9
|
+
export declare class RuntimeApiError extends Error {
|
|
10
|
+
readonly status: number;
|
|
11
|
+
readonly code?: string | undefined;
|
|
12
|
+
readonly detail?: Record<string, unknown> | undefined;
|
|
13
|
+
readonly requestId?: string | undefined;
|
|
14
|
+
constructor(message: string, status: number, code?: string | undefined, detail?: Record<string, unknown> | undefined, requestId?: string | undefined);
|
|
15
|
+
}
|
|
16
|
+
export declare class BaseRuntimeSdk {
|
|
17
|
+
protected readonly options: RuntimeSdkOptions;
|
|
18
|
+
protected readonly fetchImpl: typeof fetch;
|
|
19
|
+
constructor(options: RuntimeSdkOptions);
|
|
20
|
+
protected buildAppPath(path: string): string;
|
|
21
|
+
protected requestApp<T>(path: string, init?: RequestInit): Promise<T>;
|
|
22
|
+
protected requestVoid(path: string, init?: RequestInit): Promise<void>;
|
|
23
|
+
protected requestVoidUrl(url: URL, init?: RequestInit): Promise<void>;
|
|
24
|
+
protected buildRequestUrl(path: string): URL;
|
|
25
|
+
protected request<T>(path: string, init?: RequestInit): Promise<T>;
|
|
26
|
+
private fetchResponse;
|
|
27
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
export class RuntimeApiError extends Error {
|
|
2
|
+
status;
|
|
3
|
+
code;
|
|
4
|
+
detail;
|
|
5
|
+
requestId;
|
|
6
|
+
constructor(message, status, code, detail, requestId) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.status = status;
|
|
9
|
+
this.code = code;
|
|
10
|
+
this.detail = detail;
|
|
11
|
+
this.requestId = requestId;
|
|
12
|
+
this.name = "RuntimeApiError";
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export class BaseRuntimeSdk {
|
|
16
|
+
options;
|
|
17
|
+
fetchImpl;
|
|
18
|
+
constructor(options) {
|
|
19
|
+
this.options = options;
|
|
20
|
+
const providedFetch = options.fetchImpl;
|
|
21
|
+
this.fetchImpl = ((input, init) => {
|
|
22
|
+
if (providedFetch) {
|
|
23
|
+
return providedFetch(input, init);
|
|
24
|
+
}
|
|
25
|
+
return fetch(input, init);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
buildAppPath(path) {
|
|
29
|
+
return `/api/public/apps/${encodeURIComponent(this.options.appId)}${path}`;
|
|
30
|
+
}
|
|
31
|
+
async requestApp(path, init = {}) {
|
|
32
|
+
return this.request(this.buildAppPath(path), init);
|
|
33
|
+
}
|
|
34
|
+
async requestVoid(path, init = {}) {
|
|
35
|
+
const response = await this.fetchResponse(this.buildRequestUrl(path), init);
|
|
36
|
+
if (response.ok) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const payload = (await parseJsonResponse(response));
|
|
40
|
+
const error = payload.error;
|
|
41
|
+
throw new RuntimeApiError(error?.message ?? `Request failed: ${response.status}`, response.status, error?.code, payload.detail, payload.request_id);
|
|
42
|
+
}
|
|
43
|
+
async requestVoidUrl(url, init = {}) {
|
|
44
|
+
const response = await this.fetchResponse(url, init);
|
|
45
|
+
if (response.ok) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const payload = (await parseJsonResponse(response));
|
|
49
|
+
const error = payload.error;
|
|
50
|
+
throw new RuntimeApiError(error?.message ?? `Request failed: ${response.status}`, response.status, error?.code, payload.detail, payload.request_id);
|
|
51
|
+
}
|
|
52
|
+
buildRequestUrl(path) {
|
|
53
|
+
const normalizedPath = typeof path === "string" ? path.replace(/^\/+/, "") : "";
|
|
54
|
+
const baseUrl = normalizeRuntimeBaseUrl(this.options.baseUrl);
|
|
55
|
+
return new URL(normalizedPath, baseUrl);
|
|
56
|
+
}
|
|
57
|
+
async request(path, init = {}) {
|
|
58
|
+
const response = await this.fetchResponse(this.buildRequestUrl(path), init);
|
|
59
|
+
const payload = (await parseJsonResponse(response));
|
|
60
|
+
if (!response.ok) {
|
|
61
|
+
const errorPayload = payload;
|
|
62
|
+
const error = errorPayload.error;
|
|
63
|
+
throw new RuntimeApiError(error?.message ?? `Request failed: ${response.status}`, response.status, error?.code, errorPayload.detail, errorPayload.request_id);
|
|
64
|
+
}
|
|
65
|
+
return payload;
|
|
66
|
+
}
|
|
67
|
+
async fetchResponse(url, init = {}) {
|
|
68
|
+
const headers = new Headers(init.headers);
|
|
69
|
+
if (!headers.has("Content-Type") && shouldDefaultJsonContentType(init.body)) {
|
|
70
|
+
headers.set("Content-Type", "application/json");
|
|
71
|
+
}
|
|
72
|
+
const extraHeaders = await this.options.getHeaders?.();
|
|
73
|
+
if (extraHeaders) {
|
|
74
|
+
const resolved = new Headers(extraHeaders);
|
|
75
|
+
resolved.forEach((value, key) => {
|
|
76
|
+
if (!headers.has(key)) {
|
|
77
|
+
headers.set(key, value);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return this.fetchImpl(url, {
|
|
82
|
+
...init,
|
|
83
|
+
headers
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function shouldDefaultJsonContentType(body) {
|
|
88
|
+
if (body === undefined || body === null) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
if (typeof body === "string") {
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
if (typeof FormData !== "undefined" && body instanceof FormData) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
if (typeof URLSearchParams !== "undefined" && body instanceof URLSearchParams) {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
if (typeof Blob !== "undefined" && body instanceof Blob) {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
if (body instanceof ArrayBuffer || ArrayBuffer.isView(body)) {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
function normalizeRuntimeBaseUrl(baseUrl) {
|
|
109
|
+
const normalized = typeof baseUrl === "string" ? baseUrl.trim() : "";
|
|
110
|
+
if (!normalized) {
|
|
111
|
+
return "/";
|
|
112
|
+
}
|
|
113
|
+
return normalized.endsWith("/") ? normalized : `${normalized}/`;
|
|
114
|
+
}
|
|
115
|
+
async function parseJsonResponse(response) {
|
|
116
|
+
const text = await response.text();
|
|
117
|
+
if (text.trim().length === 0) {
|
|
118
|
+
return {};
|
|
119
|
+
}
|
|
120
|
+
try {
|
|
121
|
+
return JSON.parse(text);
|
|
122
|
+
}
|
|
123
|
+
catch {
|
|
124
|
+
throw new RuntimeApiError(response.ok ? "Invalid JSON response" : `Request failed: ${response.status}`, response.status);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { PlatformRuntimeSdk } from "./client.js";
|
|
2
|
+
export { RuntimeApiError, type RuntimeSdkOptions } from "./http.js";
|
|
3
|
+
export { createBrowserRuntimeApp, type BrowserRuntimeAppOptions } from "./browser/app.js";
|
|
4
|
+
export { normalizeCmsMediaUrl, resolveCmsCoverImageSet, resolveCmsCoverImageUrl, resolveCmsImageSet, resolveCmsImageUrl, type RuntimeCmsMediaUrlOptions } from "./cms/media.js";
|
|
5
|
+
export { buildCmsCategoryNameMap, resolveCmsCategoryName, resolveCmsItemCategoryName, resolveCmsItemTagLabels, resolveCmsTagLabels } from "./cms/taxonomy.js";
|
|
6
|
+
export { RuntimeBlobClient, type RuntimeBlobBinaryBody } from "./blob/client.js";
|
|
7
|
+
export { classifyBrowserRuntimeError, classifyBrowserWorkflowError, getBrowserRuntimeErrorMessage, getBrowserWorkflowErrorMessage, resolveEndUserAccess, type BrowserRuntimeAccessKind, type BrowserRuntimeAccessResolution, type BrowserRuntimeErrorKind, type BrowserRuntimeErrorResolution, type BrowserWorkflowErrorKind, type BrowserWorkflowErrorResolution, } from "./browser/errors.js";
|
|
8
|
+
export { buildEndUserSessionStorageKey, createBrowserRuntimeSdk, createBrowserSessionStore, type BrowserSessionStore, type BrowserSessionStoreOptions } from "./session/browser.js";
|
|
9
|
+
export { RuntimeAuthClient } from "./auth/client.js";
|
|
10
|
+
export { RuntimeCmsClient } from "./cms/client.js";
|
|
11
|
+
export * from "./data-form/index.js";
|
|
12
|
+
export * from "./notification/index.js";
|
|
13
|
+
export { RuntimeNotificationClient } from "./notification/client.js";
|
|
14
|
+
export { RuntimeWorkflowClient } from "./workflow/client.js";
|
|
15
|
+
export type { RuntimeEndUserAuthMe, RuntimeEndUserRoleRecord } from "./types/auth.js";
|
|
16
|
+
export type { BlobDisplayValue, DataFormHydratedBlobValue, RuntimeBlobRef, RuntimeBlobHydrateResponse, RuntimeBlobUploadTicket, RuntimeBlobUploadSession, RuntimeCompleteBlobUploadInput, RuntimeCompleteBlobUploadResult, RuntimeCreateBlobUploadSessionInput, RuntimeHydrateBlobRefsInput, RuntimeHydrateRecordBlobsInput } from "./types/object-storage.js";
|
|
17
|
+
export type { RuntimeCmsCategoryNode, RuntimeCmsCategoryTreeResponse, RuntimeCmsCollectionListEntry, RuntimeCmsCollectionListResponse, RuntimeCmsCollectionMetaResponse, RuntimeCmsCollectionSpec, RuntimeCmsDeliveryListResponse, RuntimeCmsImageSet, RuntimeCmsItemDeliveryPayload, RuntimeCmsPresentation, RuntimeCmsRelationSummary } from "./types/cms.js";
|
|
18
|
+
export type { RuntimeNotificationAnnouncements, RuntimeNotificationCommandResult, RuntimeNotificationInboxItem, RuntimeNotificationInboxItemStatus, RuntimeNotificationInboxItemType, RuntimeNotificationInboxList, RuntimeNotificationUnreadCount } from "./types/notification.js";
|
|
19
|
+
export type { RuntimeWorkflowActionItem, RuntimeWorkflowActionResult, RuntimeWorkflowObjectState, RuntimeWorkflowStartResult, RuntimeWorkflowTaskList, RuntimeWorkflowTaskItem, RuntimeWorkflowTimelineItem } from "./types/workflow.js";
|