@noodleseed/one 0.172.1 → 0.174.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/dist/commands/solutions-draft-source.d.ts +9 -0
- package/dist/commands/solutions-draft-source.d.ts.map +1 -0
- package/dist/commands/solutions-draft-source.js +67 -0
- package/dist/commands/solutions-draft-source.js.map +1 -0
- package/dist/commands/solutions-drafts.d.ts +5 -0
- package/dist/commands/solutions-drafts.d.ts.map +1 -0
- package/dist/commands/solutions-drafts.js +159 -0
- package/dist/commands/solutions-drafts.js.map +1 -0
- package/dist/commands/solutions-ops-args.d.ts +42 -0
- package/dist/commands/solutions-ops-args.d.ts.map +1 -0
- package/dist/commands/solutions-ops-args.js +47 -0
- package/dist/commands/solutions-ops-args.js.map +1 -0
- package/dist/commands/solutions-ops.d.ts.map +1 -1
- package/dist/commands/solutions-ops.js +12 -46
- package/dist/commands/solutions-ops.js.map +1 -1
- package/dist/commands/solutions-page.d.ts +5 -0
- package/dist/commands/solutions-page.d.ts.map +1 -0
- package/dist/commands/solutions-page.js +85 -0
- package/dist/commands/solutions-page.js.map +1 -0
- package/dist/commands/solutions-workspace.d.ts +5 -0
- package/dist/commands/solutions-workspace.d.ts.map +1 -0
- package/dist/commands/solutions-workspace.js +132 -0
- package/dist/commands/solutions-workspace.js.map +1 -0
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-solution-drafts.js +141 -0
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-solution-page.js +57 -0
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-solution-workspace.js +88 -0
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-solutions.js +6 -0
- package/node_modules/@noodle-borg/service/dist/application-drafts/contracts.js +11 -0
- package/node_modules/@noodle-borg/service/dist/application-drafts/paths.js +26 -0
- package/node_modules/@noodle-borg/service/dist/business-information/business-page-paths.js +14 -0
- package/node_modules/@noodle-borg/service/dist/business-information/business-page.d.ts +39 -0
- package/node_modules/@noodle-borg/service/dist/business-information/business-page.js +81 -0
- package/node_modules/@noodle-borg/service/dist/business-information/contracts.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/business-information/in-memory-business-pages.js +37 -0
- package/node_modules/@noodle-borg/service/dist/business-information/in-memory-store.js +3 -0
- package/node_modules/@noodle-borg/service/dist/business-information/managed-solution-executable.js +11 -3
- package/node_modules/@noodle-borg/service/dist/business-workspaces/contracts.js +52 -0
- package/node_modules/@noodle-borg/service/dist/business-workspaces/paths.js +17 -0
- package/node_modules/@noodle-borg/service/dist/routes/application-drafts.js +162 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-authoring-dispatch.js +23 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-channels.js +3 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-dispatch.js +16 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-pages.js +158 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-workspaces.js +106 -0
- package/node_modules/@noodle-borg/service/dist/routes/service-probes.js +32 -0
- package/node_modules/@noodle-borg/service/dist/service.js +20 -18
- package/node_modules/@noodle-borg/service/dist/solution-installation-activation.js +3 -3
- package/node_modules/@noodle-borg/wire-contracts/dist/application-channels.d.ts +3 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/application-channels.js +1 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/application-drafts.d.ts +322 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/application-drafts.js +152 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/billing-org-transfer.d.ts +8 -8
- package/node_modules/@noodle-borg/wire-contracts/dist/billing-read.d.ts +5 -5
- package/node_modules/@noodle-borg/wire-contracts/dist/business-page.d.ts +157 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/business-page.js +105 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/business-workspaces.d.ts +210 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/business-workspaces.js +102 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/distribution.d.ts +10 -10
- package/node_modules/@noodle-borg/wire-contracts/dist/index.d.ts +3 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/index.js +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
2
|
+
import { BusinessWorkspaceAcceptRequestSchema, BusinessWorkspaceInvitationRequestSchema, BusinessWorkspaceIssuedInvitationResponseSchema, BusinessWorkspaceMutationResponseSchema, BusinessWorkspaceResponseSchema, BusinessWorkspaceRevisionRequestSchema, BusinessWorkspaceRoleChangeRequestSchema, } from '@noodle-borg/wire-contracts';
|
|
3
|
+
import { admitBusinessTarget, authorizeBusinessApi } from '../business-api-admission.js';
|
|
4
|
+
import { BusinessWorkspaceError } from '../business-workspaces/contracts.js';
|
|
5
|
+
import { businessWorkspaceMethod, parseBusinessWorkspacePath, } from '../business-workspaces/paths.js';
|
|
6
|
+
export async function handleBusinessWorkspaceRoute(req, res, url, deps) {
|
|
7
|
+
res.setHeader('cache-control', 'private, no-store');
|
|
8
|
+
try {
|
|
9
|
+
await handle(req, res, url, deps);
|
|
10
|
+
}
|
|
11
|
+
catch (error) {
|
|
12
|
+
if (error instanceof BusinessWorkspaceError) {
|
|
13
|
+
const status = error.code === 'forbidden'
|
|
14
|
+
? 403
|
|
15
|
+
: error.code === 'invalid_request'
|
|
16
|
+
? 400
|
|
17
|
+
: error.code === 'not_found'
|
|
18
|
+
? 404
|
|
19
|
+
: 409;
|
|
20
|
+
return sendJson(res, status, {
|
|
21
|
+
error: error.code.replaceAll('_', ' '),
|
|
22
|
+
code: error.code,
|
|
23
|
+
...(error.currentRevision === undefined ? {} : { currentRevision: error.currentRevision }),
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
sendJson(res, 503, {
|
|
27
|
+
error: 'Workspace access is temporarily unavailable.',
|
|
28
|
+
code: 'workspace_unavailable',
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
async function handle(req, res, url, deps) {
|
|
33
|
+
const ref = parseBusinessWorkspacePath(url.pathname);
|
|
34
|
+
if (!ref)
|
|
35
|
+
return sendJson(res, 404, { error: 'not found' });
|
|
36
|
+
const identity = await authorizeBusinessApi(req, res, deps);
|
|
37
|
+
if (!identity)
|
|
38
|
+
return;
|
|
39
|
+
const method = businessWorkspaceMethod(ref);
|
|
40
|
+
if (req.method !== method) {
|
|
41
|
+
res.setHeader('allow', method);
|
|
42
|
+
return sendJson(res, 405, { error: 'method not allowed' });
|
|
43
|
+
}
|
|
44
|
+
if ([...url.searchParams].length)
|
|
45
|
+
return invalid(res);
|
|
46
|
+
const { org } = ref;
|
|
47
|
+
if (ref.action !== 'accept') {
|
|
48
|
+
const state = await deps.workspaces.inspect(org, identity.subject);
|
|
49
|
+
if (ref.action && !state.permissions.includes('team:manage'))
|
|
50
|
+
throw new BusinessWorkspaceError('forbidden');
|
|
51
|
+
if (!(await admitBusinessTarget(res, { org })))
|
|
52
|
+
return;
|
|
53
|
+
if (!ref.action)
|
|
54
|
+
return sendJson(res, 200, BusinessWorkspaceResponseSchema.parse({ ok: true, data: state }));
|
|
55
|
+
}
|
|
56
|
+
const body = await readJsonBody(req, Math.min(deps.maxBody, 16 * 1024));
|
|
57
|
+
if (!body.ok)
|
|
58
|
+
return sendJson(res, body.status, { error: body.error });
|
|
59
|
+
if (ref.action === 'accept') {
|
|
60
|
+
const input = BusinessWorkspaceAcceptRequestSchema.safeParse(body.value);
|
|
61
|
+
if (!input.success)
|
|
62
|
+
return invalid(res);
|
|
63
|
+
const email = await deps.verifiedEmail?.(identity.subject, identity.email);
|
|
64
|
+
if (!email)
|
|
65
|
+
return sendJson(res, 403, {
|
|
66
|
+
error: 'Sign in with a verified invited email address.',
|
|
67
|
+
code: 'verified_email_required',
|
|
68
|
+
});
|
|
69
|
+
// Subject admission already ran. The opaque one-use invitation supplies authority, not the org in the URL.
|
|
70
|
+
const result = await deps.workspaces.accept({
|
|
71
|
+
org,
|
|
72
|
+
subject: identity.subject,
|
|
73
|
+
verifiedEmail: email,
|
|
74
|
+
token: input.data.token,
|
|
75
|
+
});
|
|
76
|
+
return sendJson(res, 200, BusinessWorkspaceMutationResponseSchema.parse({ ok: true, data: result }));
|
|
77
|
+
}
|
|
78
|
+
if (ref.action === 'invitations' && !ref.id) {
|
|
79
|
+
const input = BusinessWorkspaceInvitationRequestSchema.safeParse(body.value);
|
|
80
|
+
if (!input.success)
|
|
81
|
+
return invalid(res);
|
|
82
|
+
const result = await deps.workspaces.invite({ ...input.data, org, actor: identity.subject });
|
|
83
|
+
return sendJson(res, 201, BusinessWorkspaceIssuedInvitationResponseSchema.parse({ ok: true, data: result }));
|
|
84
|
+
}
|
|
85
|
+
if (ref.action === 'invitations' && ref.id) {
|
|
86
|
+
const input = BusinessWorkspaceRevisionRequestSchema.safeParse(body.value);
|
|
87
|
+
if (!input.success)
|
|
88
|
+
return invalid(res);
|
|
89
|
+
const result = await deps.workspaces.revokeInvitation({
|
|
90
|
+
...input.data,
|
|
91
|
+
org,
|
|
92
|
+
actor: identity.subject,
|
|
93
|
+
invitationId: ref.id,
|
|
94
|
+
});
|
|
95
|
+
return sendJson(res, 200, BusinessWorkspaceMutationResponseSchema.parse({ ok: true, data: result }));
|
|
96
|
+
}
|
|
97
|
+
const input = BusinessWorkspaceRoleChangeRequestSchema.safeParse(body.value);
|
|
98
|
+
if (!input.success)
|
|
99
|
+
return invalid(res);
|
|
100
|
+
const result = await deps.workspaces.changeRole({ ...input.data, org, actor: identity.subject });
|
|
101
|
+
return sendJson(res, 200, BusinessWorkspaceMutationResponseSchema.parse({ ok: true, data: result }));
|
|
102
|
+
}
|
|
103
|
+
function invalid(res) {
|
|
104
|
+
return sendJson(res, 400, { error: 'Invalid workspace request.', code: 'invalid_request' });
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=business-workspaces.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { applySecurityHeaders, sendJson } from '@noodle-borg/transport-http';
|
|
2
|
+
import { serviceInfoPayload } from '../build-info.js';
|
|
3
|
+
export function createServiceProbeDispatcher(deps) {
|
|
4
|
+
return (req, res, url) => {
|
|
5
|
+
if (req.method !== 'GET' || !['/healthz', '/readyz', '/v1/service/info'].includes(url.pathname))
|
|
6
|
+
return false;
|
|
7
|
+
handleServiceProbe(req, res, url, deps);
|
|
8
|
+
return true;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function handleServiceProbe(req, res, url, { tls, moduleHost, buildInfo, options, whatsapp }) {
|
|
12
|
+
// Liveness/readiness probes: un-gated and **not** HTTPS-enforced — Cloud Run's internal probe is plain
|
|
13
|
+
// HTTP, so enforcing HTTPS here would `426` the probe and the revision would never go healthy (ADR 0034).
|
|
14
|
+
// `/healthz` is a pure liveness 200 (no store touch); `/readyz` reflects the injected readiness probe.
|
|
15
|
+
if (req.method === 'GET' && (url.pathname === '/healthz' || url.pathname === '/readyz')) {
|
|
16
|
+
applySecurityHeaders(res, tls);
|
|
17
|
+
if (url.pathname === '/healthz')
|
|
18
|
+
return sendJson(res, 200, { status: 'ok' });
|
|
19
|
+
void Promise.resolve()
|
|
20
|
+
.then(() => moduleHost.ready())
|
|
21
|
+
.then((ready) => sendJson(res, ready ? 200 : 503, { status: ready ? 'ready' : 'unready' }))
|
|
22
|
+
.catch(() => sendJson(res, 503, { status: 'unready' }));
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
// Deployed-version visibility (ADR 0080): un-gated, non-HTTPS-enforced like the probes so the
|
|
26
|
+
// post-deploy smoke can confirm exactly which commit is live. Non-sensitive fields only.
|
|
27
|
+
if (req.method === 'GET' && url.pathname === '/v1/service/info') {
|
|
28
|
+
applySecurityHeaders(res, tls);
|
|
29
|
+
return sendJson(res, 200, serviceInfoPayload(buildInfo, options.developerMcp === true, whatsapp !== undefined));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=service-probes.js.map
|
|
@@ -12,7 +12,7 @@ import { createArchivePreflight } from './archive-preflight.js';
|
|
|
12
12
|
import { ArchiveSweeper, resolveArchiveRetentionDays } from './archive-sweeper.js';
|
|
13
13
|
import { serveLocalAsset } from './assets.js';
|
|
14
14
|
import { assistantRouteDependencies } from './assistant-composition.js';
|
|
15
|
-
import { resolveBuildInfo
|
|
15
|
+
import { resolveBuildInfo } from './build-info.js';
|
|
16
16
|
import { createBusinessInformationRuntime, resolvePrivateInstallationDefinition, } from './business-information-runtime.js';
|
|
17
17
|
import { serviceCapabilityReport } from './capabilities.js';
|
|
18
18
|
import { createWhatsAppRuntime } from './channels/composition.js';
|
|
@@ -36,6 +36,7 @@ import { handleAppArchive, handleAppRestore } from './routes/archive.js';
|
|
|
36
36
|
import { handleAssetPreflight } from './routes/asset-control-plane.js';
|
|
37
37
|
import { dispatchAssistantRoutes } from './routes/assistant-dispatch.js';
|
|
38
38
|
import { dispatchAuthDiscoveryRoute } from './routes/auth-discovery.js';
|
|
39
|
+
import { dispatchBusinessAuthoringRoutes } from './routes/business-authoring-dispatch.js';
|
|
39
40
|
import { dispatchBusinessInformationRoutes } from './routes/business-information-dispatch.js';
|
|
40
41
|
import { dispatchConfigValueRequest } from './routes/config-values-dispatch.js';
|
|
41
42
|
import { authorizeTenantControl, handleDeploymentStatus, handleWhoami, } from './routes/control-plane.js';
|
|
@@ -52,6 +53,7 @@ import { dispatchProtectedResourceMetadata } from './routes/protected-resource-m
|
|
|
52
53
|
import { dispatchResourceReads } from './routes/resource-read-dispatch.js';
|
|
53
54
|
import { handleRollback } from './routes/rollback.js';
|
|
54
55
|
import { createServicePrincipalDispatcher } from './routes/service-principals-dispatch.js';
|
|
56
|
+
import { createServiceProbeDispatcher } from './routes/service-probes.js';
|
|
55
57
|
import { dispatchWhatsAppRoutes } from './routes/whatsapp.js';
|
|
56
58
|
import { servicePrincipalDataPlaneHooks } from './service-principal-data-plane.js';
|
|
57
59
|
import { InMemoryAlertRuleStore } from './store/alert-rules.js';
|
|
@@ -201,20 +203,17 @@ export function createServiceHandler(registry, options = {}) {
|
|
|
201
203
|
installations: businessInformationStore,
|
|
202
204
|
activity,
|
|
203
205
|
});
|
|
206
|
+
const dispatchProbe = createServiceProbeDispatcher({
|
|
207
|
+
tls,
|
|
208
|
+
moduleHost,
|
|
209
|
+
buildInfo,
|
|
210
|
+
options,
|
|
211
|
+
whatsapp,
|
|
212
|
+
});
|
|
204
213
|
return (req, res) => {
|
|
205
214
|
const url = new URL(req.url ?? '/', 'http://localhost');
|
|
206
|
-
|
|
207
|
-
// HTTP, so enforcing HTTPS here would `426` the probe and the revision would never go healthy (ADR 0034).
|
|
208
|
-
// `/healthz` is a pure liveness 200 (no store touch); `/readyz` reflects the injected readiness probe.
|
|
209
|
-
if (req.method === 'GET' && (url.pathname === '/healthz' || url.pathname === '/readyz')) {
|
|
210
|
-
applySecurityHeaders(res, tls);
|
|
211
|
-
if (url.pathname === '/healthz')
|
|
212
|
-
return sendJson(res, 200, { status: 'ok' });
|
|
213
|
-
void Promise.resolve(moduleHost.ready())
|
|
214
|
-
.then((ready) => sendJson(res, ready ? 200 : 503, { status: ready ? 'ready' : 'unready' }))
|
|
215
|
-
.catch(() => sendJson(res, 503, { status: 'unready' }));
|
|
215
|
+
if (dispatchProbe(req, res, url))
|
|
216
216
|
return;
|
|
217
|
-
}
|
|
218
217
|
if (options.developerMcp === true && url.pathname === DEVELOPER_MCP_PATH) {
|
|
219
218
|
const mount = createDeveloperMcpMountOptions({
|
|
220
219
|
registry,
|
|
@@ -228,12 +227,6 @@ export function createServiceHandler(registry, options = {}) {
|
|
|
228
227
|
void handleDeveloperMcpRequest(req, res, mount).catch((error) => respondRouteError(logger, res, 'developer.mcp.failed', error));
|
|
229
228
|
return;
|
|
230
229
|
}
|
|
231
|
-
// Deployed-version visibility (ADR 0080): un-gated, non-HTTPS-enforced like the probes so the
|
|
232
|
-
// post-deploy smoke can confirm exactly which commit is live. Non-sensitive fields only.
|
|
233
|
-
if (req.method === 'GET' && url.pathname === '/v1/service/info') {
|
|
234
|
-
applySecurityHeaders(res, tls);
|
|
235
|
-
return sendJson(res, 200, serviceInfoPayload(buildInfo, options.developerMcp === true, whatsapp !== undefined));
|
|
236
|
-
}
|
|
237
230
|
if (url.pathname.startsWith('/v1/') && rejectIncompatibleCli(req, res, buildInfo, tls))
|
|
238
231
|
return;
|
|
239
232
|
if (req.method === 'GET' || req.method === 'HEAD') {
|
|
@@ -302,9 +295,18 @@ export function createServiceHandler(registry, options = {}) {
|
|
|
302
295
|
}
|
|
303
296
|
if (servicePrincipalDispatcher?.(req, res, url))
|
|
304
297
|
return;
|
|
298
|
+
if (dispatchBusinessAuthoringRoutes(req, res, url, options.businessAuthoring, {
|
|
299
|
+
gate,
|
|
300
|
+
publicCounters,
|
|
301
|
+
maxBody: maxDeployBody,
|
|
302
|
+
tls,
|
|
303
|
+
}))
|
|
304
|
+
return;
|
|
305
305
|
if (businessInformationStore !== undefined &&
|
|
306
306
|
options.businessInformationEnabled !== false &&
|
|
307
307
|
dispatchBusinessInformationRoutes(req, res, url, {
|
|
308
|
+
pageOrigin: options.businessPageOrigin,
|
|
309
|
+
pageServiceUrl: options.publicBaseUrl,
|
|
308
310
|
...(whatsapp ? { readWhatsApp: whatsapp.projection.bind(whatsapp) } : {}),
|
|
309
311
|
store: businessInformationStore,
|
|
310
312
|
...(businessOnboarding ? { businessOnboarding } : {}),
|
|
@@ -95,7 +95,7 @@ export async function activateSolutionInstallation(input, dependencies) {
|
|
|
95
95
|
}
|
|
96
96
|
return { ok: true, deploymentId };
|
|
97
97
|
};
|
|
98
|
-
const source = await executableSource(installation, dependencies.registry);
|
|
98
|
+
const source = await executableSource(installation, dependencies.registry, dependencies.options.businessPageOrigin);
|
|
99
99
|
if (!source.ok)
|
|
100
100
|
return source;
|
|
101
101
|
const current = await dependencies.registry.getActiveByTenant(tenant);
|
|
@@ -152,13 +152,13 @@ export async function activateSolutionInstallation(input, dependencies) {
|
|
|
152
152
|
};
|
|
153
153
|
return bind(deployed.result.deploymentId, false);
|
|
154
154
|
}
|
|
155
|
-
async function executableSource(installation, registry) {
|
|
155
|
+
async function executableSource(installation, registry, hostedPageOrigin) {
|
|
156
156
|
const reference = installation.definition.reference;
|
|
157
157
|
if (reference.kind === 'managed') {
|
|
158
158
|
return {
|
|
159
159
|
ok: true,
|
|
160
160
|
value: {
|
|
161
|
-
manifest: JSON.stringify(managedSolutionManifest(installation.definition)),
|
|
161
|
+
manifest: JSON.stringify(managedSolutionManifest(installation.definition, hostedPageOrigin)),
|
|
162
162
|
accessMode: 'public',
|
|
163
163
|
serverVersion: '1',
|
|
164
164
|
},
|
|
@@ -3,6 +3,7 @@ export declare const ApplicationChannelsProjectionSchema: z.ZodObject<{
|
|
|
3
3
|
revision: z.ZodNumber;
|
|
4
4
|
active: z.ZodBoolean;
|
|
5
5
|
canEdit: z.ZodBoolean;
|
|
6
|
+
businessPageUrl: z.ZodOptional<z.ZodURL>;
|
|
6
7
|
deploymentId: z.ZodOptional<z.ZodString>;
|
|
7
8
|
mcp: z.ZodObject<{
|
|
8
9
|
status: z.ZodEnum<{
|
|
@@ -56,6 +57,7 @@ export declare const ApplicationChannelsResponseSchema: z.ZodObject<{
|
|
|
56
57
|
revision: z.ZodNumber;
|
|
57
58
|
active: z.ZodBoolean;
|
|
58
59
|
canEdit: z.ZodBoolean;
|
|
60
|
+
businessPageUrl: z.ZodOptional<z.ZodURL>;
|
|
59
61
|
deploymentId: z.ZodOptional<z.ZodString>;
|
|
60
62
|
mcp: z.ZodObject<{
|
|
61
63
|
status: z.ZodEnum<{
|
|
@@ -109,6 +111,7 @@ export declare const ApplicationChannelsClientResponseSchema: z.ZodObject<{
|
|
|
109
111
|
revision: z.ZodNumber;
|
|
110
112
|
active: z.ZodBoolean;
|
|
111
113
|
canEdit: z.ZodBoolean;
|
|
114
|
+
businessPageUrl: z.ZodOptional<z.ZodURL>;
|
|
112
115
|
deploymentId: z.ZodOptional<z.ZodString>;
|
|
113
116
|
mcp: z.ZodObject<{
|
|
114
117
|
status: z.ZodEnum<{
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Bounded browser-authoring input; not the compiled deployment artifact allowance. */
|
|
3
|
+
export declare const APPLICATION_DRAFT_LIMITS: Readonly<{
|
|
4
|
+
draftsPerApp: 10;
|
|
5
|
+
draftsPerWorkspace: 50;
|
|
6
|
+
sourceBytesPerWorkspace: number;
|
|
7
|
+
receiptsPerWorkspace: 10000;
|
|
8
|
+
retryWindowMs: number;
|
|
9
|
+
revisionsPerDraft: 100;
|
|
10
|
+
files: 64;
|
|
11
|
+
pathChars: 240;
|
|
12
|
+
fileBytes: number;
|
|
13
|
+
totalBytes: number;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const ApplicationDraftSourceSchema: z.ZodObject<{
|
|
16
|
+
entrypoint: z.ZodString;
|
|
17
|
+
files: z.ZodArray<z.ZodObject<{
|
|
18
|
+
path: z.ZodString;
|
|
19
|
+
content: z.ZodString;
|
|
20
|
+
}, z.core.$strict>>;
|
|
21
|
+
}, z.core.$strict>;
|
|
22
|
+
export type ApplicationDraftSource = z.infer<typeof ApplicationDraftSourceSchema>;
|
|
23
|
+
export declare const ApplicationDraftIdSchema: z.ZodString;
|
|
24
|
+
export declare const ApplicationDraftCreateRequestSchema: z.ZodObject<{
|
|
25
|
+
environment: z.ZodString;
|
|
26
|
+
source: z.ZodObject<{
|
|
27
|
+
entrypoint: z.ZodString;
|
|
28
|
+
files: z.ZodArray<z.ZodObject<{
|
|
29
|
+
path: z.ZodString;
|
|
30
|
+
content: z.ZodString;
|
|
31
|
+
}, z.core.$strict>>;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
baseRelease: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strict>;
|
|
35
|
+
export declare const ApplicationDraftEditRequestSchema: z.ZodObject<{
|
|
36
|
+
expectedRevision: z.ZodNumber;
|
|
37
|
+
source: z.ZodObject<{
|
|
38
|
+
entrypoint: z.ZodString;
|
|
39
|
+
files: z.ZodArray<z.ZodObject<{
|
|
40
|
+
path: z.ZodString;
|
|
41
|
+
content: z.ZodString;
|
|
42
|
+
}, z.core.$strict>>;
|
|
43
|
+
}, z.core.$strict>;
|
|
44
|
+
}, z.core.$strict>;
|
|
45
|
+
export declare const ApplicationDraftUndoRequestSchema: z.ZodObject<{
|
|
46
|
+
expectedRevision: z.ZodNumber;
|
|
47
|
+
targetRevision: z.ZodNumber;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
export declare const ApplicationDraftRevisionRequestSchema: z.ZodObject<{
|
|
50
|
+
expectedRevision: z.ZodNumber;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
export declare const ApplicationDraftSchema: z.ZodObject<{
|
|
53
|
+
id: z.ZodString;
|
|
54
|
+
org: z.ZodString;
|
|
55
|
+
app: z.ZodString;
|
|
56
|
+
environment: z.ZodString;
|
|
57
|
+
revision: z.ZodNumber;
|
|
58
|
+
sourceDigest: z.ZodString;
|
|
59
|
+
source: z.ZodObject<{
|
|
60
|
+
entrypoint: z.ZodString;
|
|
61
|
+
files: z.ZodArray<z.ZodObject<{
|
|
62
|
+
path: z.ZodString;
|
|
63
|
+
content: z.ZodString;
|
|
64
|
+
}, z.core.$strict>>;
|
|
65
|
+
}, z.core.$strict>;
|
|
66
|
+
baseRelease: z.ZodOptional<z.ZodString>;
|
|
67
|
+
createdAt: z.ZodISODateTime;
|
|
68
|
+
createdBySubject: z.ZodString;
|
|
69
|
+
updatedAt: z.ZodISODateTime;
|
|
70
|
+
updatedBySubject: z.ZodString;
|
|
71
|
+
origin: z.ZodEnum<{
|
|
72
|
+
manual: "manual";
|
|
73
|
+
guided: "guided";
|
|
74
|
+
ai: "ai";
|
|
75
|
+
undo: "undo";
|
|
76
|
+
import: "import";
|
|
77
|
+
}>;
|
|
78
|
+
}, z.core.$strict>;
|
|
79
|
+
export type ApplicationDraft = z.infer<typeof ApplicationDraftSchema>;
|
|
80
|
+
export declare const ApplicationDraftSummarySchema: z.ZodObject<{
|
|
81
|
+
createdAt: z.ZodISODateTime;
|
|
82
|
+
org: z.ZodString;
|
|
83
|
+
app: z.ZodString;
|
|
84
|
+
origin: z.ZodEnum<{
|
|
85
|
+
manual: "manual";
|
|
86
|
+
guided: "guided";
|
|
87
|
+
ai: "ai";
|
|
88
|
+
undo: "undo";
|
|
89
|
+
import: "import";
|
|
90
|
+
}>;
|
|
91
|
+
environment: z.ZodString;
|
|
92
|
+
id: z.ZodString;
|
|
93
|
+
revision: z.ZodNumber;
|
|
94
|
+
baseRelease: z.ZodOptional<z.ZodString>;
|
|
95
|
+
sourceDigest: z.ZodString;
|
|
96
|
+
createdBySubject: z.ZodString;
|
|
97
|
+
updatedAt: z.ZodISODateTime;
|
|
98
|
+
updatedBySubject: z.ZodString;
|
|
99
|
+
}, z.core.$strict>;
|
|
100
|
+
export type ApplicationDraftSummary = z.infer<typeof ApplicationDraftSummarySchema>;
|
|
101
|
+
export declare const ApplicationDraftResponseSchema: z.ZodObject<{
|
|
102
|
+
ok: z.ZodLiteral<true>;
|
|
103
|
+
data: z.ZodObject<{
|
|
104
|
+
draft: z.ZodObject<{
|
|
105
|
+
id: z.ZodString;
|
|
106
|
+
org: z.ZodString;
|
|
107
|
+
app: z.ZodString;
|
|
108
|
+
environment: z.ZodString;
|
|
109
|
+
revision: z.ZodNumber;
|
|
110
|
+
sourceDigest: z.ZodString;
|
|
111
|
+
source: z.ZodObject<{
|
|
112
|
+
entrypoint: z.ZodString;
|
|
113
|
+
files: z.ZodArray<z.ZodObject<{
|
|
114
|
+
path: z.ZodString;
|
|
115
|
+
content: z.ZodString;
|
|
116
|
+
}, z.core.$strict>>;
|
|
117
|
+
}, z.core.$strict>;
|
|
118
|
+
baseRelease: z.ZodOptional<z.ZodString>;
|
|
119
|
+
createdAt: z.ZodISODateTime;
|
|
120
|
+
createdBySubject: z.ZodString;
|
|
121
|
+
updatedAt: z.ZodISODateTime;
|
|
122
|
+
updatedBySubject: z.ZodString;
|
|
123
|
+
origin: z.ZodEnum<{
|
|
124
|
+
manual: "manual";
|
|
125
|
+
guided: "guided";
|
|
126
|
+
ai: "ai";
|
|
127
|
+
undo: "undo";
|
|
128
|
+
import: "import";
|
|
129
|
+
}>;
|
|
130
|
+
}, z.core.$strict>;
|
|
131
|
+
}, z.core.$strict>;
|
|
132
|
+
}, z.core.$strict>;
|
|
133
|
+
export declare const ApplicationDraftHistoryResponseSchema: z.ZodObject<{
|
|
134
|
+
ok: z.ZodLiteral<true>;
|
|
135
|
+
data: z.ZodObject<{
|
|
136
|
+
revisions: z.ZodArray<z.ZodObject<{
|
|
137
|
+
createdAt: z.ZodISODateTime;
|
|
138
|
+
org: z.ZodString;
|
|
139
|
+
app: z.ZodString;
|
|
140
|
+
origin: z.ZodEnum<{
|
|
141
|
+
manual: "manual";
|
|
142
|
+
guided: "guided";
|
|
143
|
+
ai: "ai";
|
|
144
|
+
undo: "undo";
|
|
145
|
+
import: "import";
|
|
146
|
+
}>;
|
|
147
|
+
environment: z.ZodString;
|
|
148
|
+
id: z.ZodString;
|
|
149
|
+
revision: z.ZodNumber;
|
|
150
|
+
baseRelease: z.ZodOptional<z.ZodString>;
|
|
151
|
+
sourceDigest: z.ZodString;
|
|
152
|
+
createdBySubject: z.ZodString;
|
|
153
|
+
updatedAt: z.ZodISODateTime;
|
|
154
|
+
updatedBySubject: z.ZodString;
|
|
155
|
+
}, z.core.$strict>>;
|
|
156
|
+
}, z.core.$strict>;
|
|
157
|
+
}, z.core.$strict>;
|
|
158
|
+
export declare const ApplicationDraftHistoryClientResponseSchema: z.ZodObject<{
|
|
159
|
+
ok: z.ZodLiteral<true>;
|
|
160
|
+
data: z.ZodObject<{
|
|
161
|
+
revisions: z.ZodArray<z.ZodObject<{
|
|
162
|
+
createdAt: z.ZodISODateTime;
|
|
163
|
+
org: z.ZodString;
|
|
164
|
+
app: z.ZodString;
|
|
165
|
+
origin: z.ZodEnum<{
|
|
166
|
+
manual: "manual";
|
|
167
|
+
guided: "guided";
|
|
168
|
+
ai: "ai";
|
|
169
|
+
undo: "undo";
|
|
170
|
+
import: "import";
|
|
171
|
+
}>;
|
|
172
|
+
environment: z.ZodString;
|
|
173
|
+
id: z.ZodString;
|
|
174
|
+
revision: z.ZodNumber;
|
|
175
|
+
baseRelease: z.ZodOptional<z.ZodString>;
|
|
176
|
+
sourceDigest: z.ZodString;
|
|
177
|
+
createdBySubject: z.ZodString;
|
|
178
|
+
updatedAt: z.ZodISODateTime;
|
|
179
|
+
updatedBySubject: z.ZodString;
|
|
180
|
+
}, z.core.$strict>>;
|
|
181
|
+
}, z.core.$strict>;
|
|
182
|
+
}, z.core.$strict>;
|
|
183
|
+
export declare const ApplicationDraftDiffSchema: z.ZodObject<{
|
|
184
|
+
draftId: z.ZodString;
|
|
185
|
+
fromRevision: z.ZodNumber;
|
|
186
|
+
toRevision: z.ZodNumber;
|
|
187
|
+
fromDigest: z.ZodString;
|
|
188
|
+
toDigest: z.ZodString;
|
|
189
|
+
fromEntrypoint: z.ZodString;
|
|
190
|
+
toEntrypoint: z.ZodString;
|
|
191
|
+
changes: z.ZodArray<z.ZodObject<{
|
|
192
|
+
path: z.ZodString;
|
|
193
|
+
before: z.ZodNullable<z.ZodString>;
|
|
194
|
+
after: z.ZodNullable<z.ZodString>;
|
|
195
|
+
}, z.core.$strict>>;
|
|
196
|
+
}, z.core.$strict>;
|
|
197
|
+
export type ApplicationDraftDiff = z.infer<typeof ApplicationDraftDiffSchema>;
|
|
198
|
+
export declare const ApplicationDraftDiffResponseSchema: z.ZodObject<{
|
|
199
|
+
ok: z.ZodLiteral<true>;
|
|
200
|
+
data: z.ZodObject<{
|
|
201
|
+
diff: z.ZodObject<{
|
|
202
|
+
draftId: z.ZodString;
|
|
203
|
+
fromRevision: z.ZodNumber;
|
|
204
|
+
toRevision: z.ZodNumber;
|
|
205
|
+
fromDigest: z.ZodString;
|
|
206
|
+
toDigest: z.ZodString;
|
|
207
|
+
fromEntrypoint: z.ZodString;
|
|
208
|
+
toEntrypoint: z.ZodString;
|
|
209
|
+
changes: z.ZodArray<z.ZodObject<{
|
|
210
|
+
path: z.ZodString;
|
|
211
|
+
before: z.ZodNullable<z.ZodString>;
|
|
212
|
+
after: z.ZodNullable<z.ZodString>;
|
|
213
|
+
}, z.core.$strict>>;
|
|
214
|
+
}, z.core.$strict>;
|
|
215
|
+
}, z.core.$strict>;
|
|
216
|
+
}, z.core.$strict>;
|
|
217
|
+
export declare const ApplicationDraftDiffClientResponseSchema: z.ZodObject<{
|
|
218
|
+
ok: z.ZodLiteral<true>;
|
|
219
|
+
data: z.ZodObject<{
|
|
220
|
+
diff: z.ZodObject<{
|
|
221
|
+
draftId: z.ZodString;
|
|
222
|
+
fromRevision: z.ZodNumber;
|
|
223
|
+
toRevision: z.ZodNumber;
|
|
224
|
+
fromDigest: z.ZodString;
|
|
225
|
+
toDigest: z.ZodString;
|
|
226
|
+
fromEntrypoint: z.ZodString;
|
|
227
|
+
toEntrypoint: z.ZodString;
|
|
228
|
+
changes: z.ZodArray<z.ZodObject<{
|
|
229
|
+
path: z.ZodString;
|
|
230
|
+
before: z.ZodNullable<z.ZodString>;
|
|
231
|
+
after: z.ZodNullable<z.ZodString>;
|
|
232
|
+
}, z.core.$strict>>;
|
|
233
|
+
}, z.core.$strict>;
|
|
234
|
+
}, z.core.$strip>;
|
|
235
|
+
}, z.core.$strip>;
|
|
236
|
+
export declare const ApplicationDraftDiffRequestSchema: z.ZodObject<{
|
|
237
|
+
from: z.ZodNumber;
|
|
238
|
+
to: z.ZodNumber;
|
|
239
|
+
}, z.core.$strict>;
|
|
240
|
+
export declare const ApplicationDraftClientResponseSchema: z.ZodObject<{
|
|
241
|
+
ok: z.ZodLiteral<true>;
|
|
242
|
+
data: z.ZodObject<{
|
|
243
|
+
draft: z.ZodObject<{
|
|
244
|
+
id: z.ZodString;
|
|
245
|
+
org: z.ZodString;
|
|
246
|
+
app: z.ZodString;
|
|
247
|
+
environment: z.ZodString;
|
|
248
|
+
revision: z.ZodNumber;
|
|
249
|
+
sourceDigest: z.ZodString;
|
|
250
|
+
source: z.ZodObject<{
|
|
251
|
+
entrypoint: z.ZodString;
|
|
252
|
+
files: z.ZodArray<z.ZodObject<{
|
|
253
|
+
path: z.ZodString;
|
|
254
|
+
content: z.ZodString;
|
|
255
|
+
}, z.core.$strict>>;
|
|
256
|
+
}, z.core.$strict>;
|
|
257
|
+
baseRelease: z.ZodOptional<z.ZodString>;
|
|
258
|
+
createdAt: z.ZodISODateTime;
|
|
259
|
+
createdBySubject: z.ZodString;
|
|
260
|
+
updatedAt: z.ZodISODateTime;
|
|
261
|
+
updatedBySubject: z.ZodString;
|
|
262
|
+
origin: z.ZodEnum<{
|
|
263
|
+
manual: "manual";
|
|
264
|
+
guided: "guided";
|
|
265
|
+
ai: "ai";
|
|
266
|
+
undo: "undo";
|
|
267
|
+
import: "import";
|
|
268
|
+
}>;
|
|
269
|
+
}, z.core.$strict>;
|
|
270
|
+
}, z.core.$strip>;
|
|
271
|
+
}, z.core.$strip>;
|
|
272
|
+
export declare const ApplicationDraftListResponseSchema: z.ZodObject<{
|
|
273
|
+
ok: z.ZodLiteral<true>;
|
|
274
|
+
data: z.ZodObject<{
|
|
275
|
+
drafts: z.ZodArray<z.ZodObject<{
|
|
276
|
+
createdAt: z.ZodISODateTime;
|
|
277
|
+
org: z.ZodString;
|
|
278
|
+
app: z.ZodString;
|
|
279
|
+
origin: z.ZodEnum<{
|
|
280
|
+
manual: "manual";
|
|
281
|
+
guided: "guided";
|
|
282
|
+
ai: "ai";
|
|
283
|
+
undo: "undo";
|
|
284
|
+
import: "import";
|
|
285
|
+
}>;
|
|
286
|
+
environment: z.ZodString;
|
|
287
|
+
id: z.ZodString;
|
|
288
|
+
revision: z.ZodNumber;
|
|
289
|
+
baseRelease: z.ZodOptional<z.ZodString>;
|
|
290
|
+
sourceDigest: z.ZodString;
|
|
291
|
+
createdBySubject: z.ZodString;
|
|
292
|
+
updatedAt: z.ZodISODateTime;
|
|
293
|
+
updatedBySubject: z.ZodString;
|
|
294
|
+
}, z.core.$strict>>;
|
|
295
|
+
}, z.core.$strict>;
|
|
296
|
+
}, z.core.$strict>;
|
|
297
|
+
export declare const ApplicationDraftListClientResponseSchema: z.ZodObject<{
|
|
298
|
+
ok: z.ZodLiteral<true>;
|
|
299
|
+
data: z.ZodObject<{
|
|
300
|
+
drafts: z.ZodArray<z.ZodObject<{
|
|
301
|
+
createdAt: z.ZodISODateTime;
|
|
302
|
+
org: z.ZodString;
|
|
303
|
+
app: z.ZodString;
|
|
304
|
+
origin: z.ZodEnum<{
|
|
305
|
+
manual: "manual";
|
|
306
|
+
guided: "guided";
|
|
307
|
+
ai: "ai";
|
|
308
|
+
undo: "undo";
|
|
309
|
+
import: "import";
|
|
310
|
+
}>;
|
|
311
|
+
environment: z.ZodString;
|
|
312
|
+
id: z.ZodString;
|
|
313
|
+
revision: z.ZodNumber;
|
|
314
|
+
baseRelease: z.ZodOptional<z.ZodString>;
|
|
315
|
+
sourceDigest: z.ZodString;
|
|
316
|
+
createdBySubject: z.ZodString;
|
|
317
|
+
updatedAt: z.ZodISODateTime;
|
|
318
|
+
updatedBySubject: z.ZodString;
|
|
319
|
+
}, z.core.$strict>>;
|
|
320
|
+
}, z.core.$strip>;
|
|
321
|
+
}, z.core.$strip>;
|
|
322
|
+
//# sourceMappingURL=application-drafts.d.ts.map
|