@belonguniverseai/react-sdk 0.6.26 → 0.6.28
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 +36 -0
- package/dist/api/account-connectors.d.ts +2 -2
- package/dist/api/account-scope.d.ts +75 -0
- package/dist/api/artifact-actions.d.ts +29 -0
- package/dist/api/client-identity.d.ts +3 -1
- package/dist/api/client.d.ts +1972 -226
- package/dist/api/goals.d.ts +4 -4
- package/dist/api/live-artifacts.d.ts +197 -0
- package/dist/api/my-usage.d.ts +28 -0
- package/dist/api/queries.d.ts +6 -4
- package/dist/api/query-keys.d.ts +44 -3
- package/dist/api/task-schedule-sharing.d.ts +7 -4
- package/dist/api/task-schedules.d.ts +20 -17
- package/dist/app/dock-story-data.d.ts +10 -6
- package/dist/component/BelongWidget.d.ts +4 -1
- package/dist/component/{abnfDiagram-N423BO3Z-DpQ_UaNq.js → abnfDiagram-N423BO3Z-BGC_KU0K.js} +4 -4
- package/dist/component/{arc-BoxI9KQB.js → arc-BpIEtZvJ.js} +2 -2
- package/dist/component/{architectureDiagram-T3A2C74G-C0Pxx-k7.js → architectureDiagram-T3A2C74G-DYlEVfnh.js} +3 -3
- package/dist/component/{blockDiagram-VBNYF7ZC-CPX5VZHq.js → blockDiagram-VBNYF7ZC-BWDnhAW1.js} +4 -4
- package/dist/component/{c4Diagram-5PPSVZJV-6GrzIAcz.js → c4Diagram-5PPSVZJV-VKL0Shn2.js} +3 -3
- package/dist/component/{channel-Dp0k-SEg.js → channel-gGd0pNDR.js} +2 -2
- package/dist/component/{chunk-2GRJ4B5K-CTz4CZNM.js → chunk-2GRJ4B5K-CEt4y1jX.js} +2 -2
- package/dist/component/{chunk-2Q5K7J3B-Bg9gj6WB.js → chunk-2Q5K7J3B-Dj2wrNzr.js} +2 -2
- package/dist/component/{chunk-5RXB4S5H-SJVXjTS4.js → chunk-5RXB4S5H-oJQEn1bH.js} +5 -5
- package/dist/component/{chunk-5VM5RSS4-CCi9rnUJ.js → chunk-5VM5RSS4-DddP8MPP.js} +2 -2
- package/dist/component/{chunk-6Q2QTUOP-DxQKGpDM.js → chunk-6Q2QTUOP-CppUJwrF.js} +2 -2
- package/dist/component/{chunk-GF5L2VYU-C1soxsXo.js → chunk-GF5L2VYU--hyUlO9v.js} +6 -6
- package/dist/component/{chunk-JWPE2WC7-3wshSHI2.js → chunk-JWPE2WC7-CN0Ieqel.js} +2 -2
- package/dist/component/{chunk-KBJHAD2P-DQdZO07y.js → chunk-KBJHAD2P-BWhCQoHz.js} +2 -2
- package/dist/component/{chunk-RYQCIY6F-DUaZ-HUS.js → chunk-RYQCIY6F-BgNewpQe.js} +2 -2
- package/dist/component/{chunk-XXDRQBXY-D3NSjj_n.js → chunk-XXDRQBXY-mNH171OF.js} +2 -2
- package/dist/component/{classDiagram-JCYQIIEL-BVRygNRR.js → classDiagram-JCYQIIEL-UjZbWotD.js} +3 -3
- package/dist/component/{classDiagram-v2-OCEON4UE-BVRygNRR.js → classDiagram-v2-OCEON4UE-UjZbWotD.js} +3 -3
- package/dist/component/{cose-bilkent-JH36ORCC-DLTvBiOo.js → cose-bilkent-JH36ORCC-lsVWGlMj.js} +2 -2
- package/dist/component/{cynefinDiagram-MW4NZA55-xK50k2_4.js → cynefinDiagram-MW4NZA55-B5Ss0zoy.js} +3 -3
- package/dist/component/{dagre-VZM6K2ZE-DMUwiPX1.js → dagre-VZM6K2ZE-DisWRVfU.js} +3 -3
- package/dist/component/{diagram-7IWD3JNH-Cn6oaVgE.js → diagram-7IWD3JNH-B2QrdsOh.js} +4 -4
- package/dist/component/{diagram-B4RE2ZJO-Dc_LVByi.js → diagram-B4RE2ZJO-Bs8l4THz.js} +3 -3
- package/dist/component/{diagram-LBJQPF4R-y80jmIxC.js → diagram-LBJQPF4R-JTadtYMW.js} +3 -3
- package/dist/component/{diagram-Q27KOJAE-Bp6njNLR.js → diagram-Q27KOJAE-BQC33flc.js} +4 -4
- package/dist/component/{diagram-UB23O5K3-D3X1PDYF.js → diagram-UB23O5K3-ujC22dQx.js} +3 -3
- package/dist/component/{ebnfDiagram-BXEA7PRR-9Lw8nzKe.js → ebnfDiagram-BXEA7PRR-0WnF2wzt.js} +4 -4
- package/dist/component/{erDiagram-JOGREHBK-CcG_SaTj.js → erDiagram-JOGREHBK-CqgMsd5R.js} +5 -5
- package/dist/component/{flowDiagram-UKHOOZJN-BiabESAj.js → flowDiagram-UKHOOZJN-BOM0P8Mk.js} +7 -7
- package/dist/component/{ganttDiagram-PKOTCBZU-BAfZiFRN.js → ganttDiagram-PKOTCBZU-WeRFC1th.js} +3 -3
- package/dist/component/{gitGraphDiagram-DS77QQ5N-2_hBA0gy.js → gitGraphDiagram-DS77QQ5N-CS8L-BA8.js} +4 -4
- package/dist/component/{highlighted-body-OFNGDK62-BWKA8a2L.js → highlighted-body-OFNGDK62-CGejnMyq.js} +2 -2
- package/dist/component/index.js +2 -2
- package/dist/component/{infoDiagram-6WML65LV-C-P8lJtc.js → infoDiagram-6WML65LV-CQQhytkd.js} +2 -2
- package/dist/component/{ishikawaDiagram-WSZJBQD7-CkTFVaSp.js → ishikawaDiagram-WSZJBQD7-CjDo3-zt.js} +2 -2
- package/dist/component/{journeyDiagram-NVQOT4AX-CVW--vNB.js → journeyDiagram-NVQOT4AX-BCCoblta.js} +5 -5
- package/dist/component/{kanban-definition-27J2QSJJ-5EmiKkud.js → kanban-definition-27J2QSJJ-DgTIrgvB.js} +3 -3
- package/dist/component/{linear-CSKvOjpb.js → linear-BOaza_dp.js} +2 -2
- package/dist/component/{mermaid-GHXKKRXX-DJmRTUDm.js → mermaid-GHXKKRXX-BAq5-Vj8.js} +54487 -50019
- package/dist/component/{mindmap-definition-FAOFIHXS-D8kuCYBh.js → mindmap-definition-FAOFIHXS-D1oolR3A.js} +4 -4
- package/dist/component/{pegDiagram-VL7TDLO6-BTfnYOZL.js → pegDiagram-VL7TDLO6-C9UxqvBP.js} +4 -4
- package/dist/component/{pieDiagram-7S7Q4E2Y-CzbOJQ6u.js → pieDiagram-7S7Q4E2Y-I5IXzOZM.js} +4 -4
- package/dist/component/{quadrantDiagram-CIZ2JOQS-BCLm-h12.js → quadrantDiagram-CIZ2JOQS-DPDFBhEd.js} +3 -3
- package/dist/component/{railroadDiagram-AXF67PYL-DxjbsMsY.js → railroadDiagram-AXF67PYL-DIAkhVTf.js} +4 -4
- package/dist/component/{requirementDiagram-LRYGKXZP-7CT3WVcX.js → requirementDiagram-LRYGKXZP-DBEmV-Qy.js} +4 -4
- package/dist/component/{sankeyDiagram-W5VNT64P-P0xeL0DB.js → sankeyDiagram-W5VNT64P-BEeDyDj7.js} +2 -2
- package/dist/component/{sequenceDiagram-SI44F4Z6-BZwzqGo7.js → sequenceDiagram-SI44F4Z6-WYcXWUHF.js} +4 -4
- package/dist/component/{sizeCapture-X5ZJPWSS-BmFHn5uM.js → sizeCapture-X5ZJPWSS-BqDBRpiS.js} +2 -2
- package/dist/component/{stateDiagram-OKZ733FA-CVuv1e4U.js → stateDiagram-OKZ733FA-CfYfR0OH.js} +3 -3
- package/dist/component/{stateDiagram-v2-UEYNNEHI-D9ToaXGa.js → stateDiagram-v2-UEYNNEHI-BSa2VwcQ.js} +3 -3
- package/dist/component/{swimlanes-SLNWSIFB-D4imP0Ms.js → swimlanes-SLNWSIFB-C-7mrC4X.js} +4 -4
- package/dist/component/{swimlanesDiagram-ULZ7WXOC-BTQ985v3.js → swimlanesDiagram-ULZ7WXOC-DXcMd7U4.js} +3 -3
- package/dist/component/{timeline-definition-Z64GVDOM-DAHxnCB-.js → timeline-definition-Z64GVDOM-Dp65E80E.js} +3 -3
- package/dist/component/{vennDiagram-T6HMQDX7-K5TNKkRE.js → vennDiagram-T6HMQDX7-CRpZ12TH.js} +2 -2
- package/dist/component/{wardleyDiagram-T6FBY63Y-CYU76C7a.js → wardleyDiagram-T6FBY63Y-BupsM8K3.js} +3 -3
- package/dist/component/{xychartDiagram-ELKLHX3M-CRncQBO_.js → xychartDiagram-ELKLHX3M-CUnr8Qbu.js} +3 -3
- package/dist/components/artifacts/ArtifactDetailSurface.d.ts +37 -0
- package/dist/components/artifacts/ArtifactMeta.d.ts +10 -0
- package/dist/components/artifacts/ArtifactsListSurface.d.ts +11 -0
- package/dist/components/artifacts/BindScheduleDialog.d.ts +39 -0
- package/dist/components/artifacts/ConfirmDeleteArtifactDialog.d.ts +9 -0
- package/dist/components/artifacts/ConfirmReshareDialog.d.ts +24 -0
- package/dist/components/artifacts/artifact-format.d.ts +38 -0
- package/dist/components/artifacts/open-artifact-version.d.ts +16 -0
- package/dist/components/artifacts/use-artifact-actions.d.ts +32 -0
- package/dist/components/embed/ArtifactApprovalDialog.d.ts +8 -0
- package/dist/components/embed/ArtifactOperationNoticeLine.d.ts +5 -0
- package/dist/components/embed/EmbedComposer.d.ts +5 -1
- package/dist/components/embed/EmbedConversation.d.ts +4 -1
- package/dist/components/embed/EmbedRail.d.ts +9 -2
- package/dist/components/embed/MobileNavBar.d.ts +2 -1
- package/dist/components/embed/ResponseModeDial.d.ts +11 -0
- package/dist/components/embed/SessionStatsPanel.d.ts +3 -0
- package/dist/components/embed/UsageSettings.d.ts +11 -0
- package/dist/components/embed/WorkspacePolicySetting.d.ts +1 -0
- package/dist/components/embed/format-compact-number.d.ts +8 -0
- package/dist/components/embed/use-artifact-operation-notices.d.ts +20 -0
- package/dist/components/embed/use-inline-preview-url.d.ts +3 -1
- package/dist/components/scheduled/ScheduledDetailSurface.d.ts +9 -0
- package/dist/embed/artifact-action-bridge.d.ts +70 -0
- package/dist/embed/artifact-operation-notices.d.ts +45 -0
- package/dist/embed/artifact-remint-budget.d.ts +19 -0
- package/dist/embed/artifact-sandbox-hold.d.ts +10 -0
- package/dist/embed/dock-state.d.ts +1 -1
- package/dist/embed/global.d.ts +2 -0
- package/dist/embed/goal-row-model.d.ts +1 -1
- package/dist/embed/presets.d.ts +1 -0
- package/dist/embed/response-mode.d.ts +48 -0
- package/dist/embed/theme.d.ts +5 -0
- package/dist/embed/workspace-policy.d.ts +7 -0
- package/dist/i18n/messages/en.d.ts +161 -8
- package/dist/i18n/messages/surfaces/aiElements.d.ts +4 -0
- package/dist/i18n/messages/surfaces/artifacts.d.ts +304 -0
- package/dist/i18n/messages/surfaces/embedMisc.d.ts +84 -0
- package/dist/i18n/messages/surfaces/header.d.ts +4 -0
- package/dist/i18n/messages/surfaces/myUsage.d.ts +75 -0
- package/dist/i18n/messages/surfaces/scheduled.d.ts +22 -2
- package/dist/i18n/messages/surfaces/settings.d.ts +28 -0
- package/dist/i18n/messages/surfaces/stats.d.ts +4 -12
- package/dist/i18n/messages/surfaces/stream.d.ts +120 -0
- package/dist/i18n/messages/surfaces/usage.d.ts +0 -8
- package/dist/infrastructure/telemetry/first-response-timing.d.ts +51 -0
- package/dist/lib/use-now.d.ts +32 -0
- package/dist/routes/artifact-detail.d.ts +2 -0
- package/dist/routes/artifacts.d.ts +2 -0
- package/dist/routes/chat/transcript-row.d.ts +1 -0
- package/dist/stream/belong-chat-transport.d.ts +39 -7
- package/dist/stream/belong-data-parts.d.ts +10 -0
- package/dist/stream/message-parts.d.ts +3 -1
- package/dist/stream/queued-message-outbox.d.ts +5 -0
- package/dist/stream/select-session-usage.d.ts +9 -0
- package/dist/stream/session-stats-csv.d.ts +7 -9
- package/dist/types/public.d.ts +4 -4
- package/package.json +1 -1
package/dist/api/goals.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const goalStatusSchema: z.ZodEnum<{
|
|
3
|
+
waiting_for_approval: "waiting_for_approval";
|
|
3
4
|
active: "active";
|
|
4
5
|
paused: "paused";
|
|
5
6
|
clarifying: "clarifying";
|
|
6
7
|
completion_claimed: "completion_claimed";
|
|
7
8
|
deferred: "deferred";
|
|
8
9
|
waiting_for_user: "waiting_for_user";
|
|
9
|
-
waiting_for_approval: "waiting_for_approval";
|
|
10
10
|
waiting_for_ui_action: "waiting_for_ui_action";
|
|
11
11
|
blocked: "blocked";
|
|
12
12
|
budget_limited: "budget_limited";
|
|
@@ -25,13 +25,13 @@ export declare const goalJournalEntrySchema: z.ZodObject<{
|
|
|
25
25
|
kind: z.ZodString;
|
|
26
26
|
actor: z.ZodString;
|
|
27
27
|
toStatus: z.ZodNullable<z.ZodEnum<{
|
|
28
|
+
waiting_for_approval: "waiting_for_approval";
|
|
28
29
|
active: "active";
|
|
29
30
|
paused: "paused";
|
|
30
31
|
clarifying: "clarifying";
|
|
31
32
|
completion_claimed: "completion_claimed";
|
|
32
33
|
deferred: "deferred";
|
|
33
34
|
waiting_for_user: "waiting_for_user";
|
|
34
|
-
waiting_for_approval: "waiting_for_approval";
|
|
35
35
|
waiting_for_ui_action: "waiting_for_ui_action";
|
|
36
36
|
blocked: "blocked";
|
|
37
37
|
budget_limited: "budget_limited";
|
|
@@ -45,13 +45,13 @@ export type GoalJournalEntry = z.infer<typeof goalJournalEntrySchema>;
|
|
|
45
45
|
export declare const goalViewSchema: z.ZodObject<{
|
|
46
46
|
goalId: z.ZodString;
|
|
47
47
|
status: z.ZodEnum<{
|
|
48
|
+
waiting_for_approval: "waiting_for_approval";
|
|
48
49
|
active: "active";
|
|
49
50
|
paused: "paused";
|
|
50
51
|
clarifying: "clarifying";
|
|
51
52
|
completion_claimed: "completion_claimed";
|
|
52
53
|
deferred: "deferred";
|
|
53
54
|
waiting_for_user: "waiting_for_user";
|
|
54
|
-
waiting_for_approval: "waiting_for_approval";
|
|
55
55
|
waiting_for_ui_action: "waiting_for_ui_action";
|
|
56
56
|
blocked: "blocked";
|
|
57
57
|
budget_limited: "budget_limited";
|
|
@@ -90,13 +90,13 @@ export declare const goalViewSchema: z.ZodObject<{
|
|
|
90
90
|
kind: z.ZodString;
|
|
91
91
|
actor: z.ZodString;
|
|
92
92
|
toStatus: z.ZodNullable<z.ZodEnum<{
|
|
93
|
+
waiting_for_approval: "waiting_for_approval";
|
|
93
94
|
active: "active";
|
|
94
95
|
paused: "paused";
|
|
95
96
|
clarifying: "clarifying";
|
|
96
97
|
completion_claimed: "completion_claimed";
|
|
97
98
|
deferred: "deferred";
|
|
98
99
|
waiting_for_user: "waiting_for_user";
|
|
99
|
-
waiting_for_approval: "waiting_for_approval";
|
|
100
100
|
waiting_for_ui_action: "waiting_for_ui_action";
|
|
101
101
|
blocked: "blocked";
|
|
102
102
|
budget_limited: "budget_limited";
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { QueryClient, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { Recurrence } from './task-schedules.ts';
|
|
3
|
+
import { ApiClient } from './client.ts';
|
|
4
|
+
/**
|
|
5
|
+
* The cadence of the schedule a report is bound to, as the SERVER resolves it.
|
|
6
|
+
*
|
|
7
|
+
* Structured, never a rendered phrase: the dock formats these parts in the
|
|
8
|
+
* reader's locale with the same `recurrenceSummaryParams` the Scheduled
|
|
9
|
+
* surface uses. A server-rendered "daily at 09:00 UTC" would paint English
|
|
10
|
+
* inside a Spanish dock.
|
|
11
|
+
*
|
|
12
|
+
* It arrives from `/v1/live-artifacts` rather than being read client-side
|
|
13
|
+
* because that list is CALLER-scoped — a report follows its owner across
|
|
14
|
+
* workspaces — while the dock's own schedule read is workspace-scoped. A
|
|
15
|
+
* report bound in another workspace, or any report at all in a host with no
|
|
16
|
+
* workspace selected, could never learn its cadence client-side, and the
|
|
17
|
+
* overdue warning could never fire for it.
|
|
18
|
+
*/
|
|
19
|
+
export type LiveArtifactCadence = {
|
|
20
|
+
readonly recurrence: Recurrence;
|
|
21
|
+
/** Any instant on the cadence, in the schedule's own zone — the wall clock it preserves. */
|
|
22
|
+
readonly anchorAt: string;
|
|
23
|
+
readonly timezone: string;
|
|
24
|
+
};
|
|
25
|
+
/** One live report as the list serves it. Instants stay ISO strings (see header). */
|
|
26
|
+
export type LiveArtifactSummary = {
|
|
27
|
+
readonly liveArtifactId: string;
|
|
28
|
+
readonly name: string;
|
|
29
|
+
readonly description: string | null;
|
|
30
|
+
readonly currentVersion: number;
|
|
31
|
+
/** The public link's stable id. Present from creation; the public route
|
|
32
|
+
* serves it only once the report has actually been shared. */
|
|
33
|
+
readonly shareSlug: string;
|
|
34
|
+
readonly shareExpiresAt: string | null;
|
|
35
|
+
readonly shareRevokedAt: string | null;
|
|
36
|
+
readonly seriesId: string | null;
|
|
37
|
+
/** Null when nothing refreshes this report — or when its series is gone. */
|
|
38
|
+
readonly cadence: LiveArtifactCadence | null;
|
|
39
|
+
readonly lastRefreshedAt: string | null;
|
|
40
|
+
readonly createdAt: string;
|
|
41
|
+
readonly updatedAt: string;
|
|
42
|
+
};
|
|
43
|
+
export type LiveArtifactVersion = {
|
|
44
|
+
readonly version: number;
|
|
45
|
+
readonly artifactId: string;
|
|
46
|
+
/**
|
|
47
|
+
* The media type of this version's bytes, as the server reads it off the
|
|
48
|
+
* artifact row. The detail surface needs it to decide whether the CURRENT
|
|
49
|
+
* version can be framed inline (an interactive HTML app, whose controls only
|
|
50
|
+
* work with the dock as the frame's parent) or must stay a tab-opened
|
|
51
|
+
* download (a CSV, a PDF).
|
|
52
|
+
*
|
|
53
|
+
* `null` means "this cloud did not say" — see `versionSchema`. A null is
|
|
54
|
+
* never guessed at: it renders exactly like a non-HTML version, i.e. no
|
|
55
|
+
* frame.
|
|
56
|
+
*/
|
|
57
|
+
readonly mimeType: string | null;
|
|
58
|
+
readonly runId: string | null;
|
|
59
|
+
readonly summary: string | null;
|
|
60
|
+
readonly publishedAt: string;
|
|
61
|
+
};
|
|
62
|
+
export type LiveArtifactDetail = LiveArtifactSummary & {
|
|
63
|
+
readonly versions: readonly LiveArtifactVersion[];
|
|
64
|
+
};
|
|
65
|
+
export type LiveArtifactsListResult = {
|
|
66
|
+
readonly status: "ready";
|
|
67
|
+
readonly artifacts: readonly LiveArtifactSummary[];
|
|
68
|
+
readonly slotsUsed: number;
|
|
69
|
+
readonly slotLimit: number;
|
|
70
|
+
} | {
|
|
71
|
+
readonly status: "featureAbsent";
|
|
72
|
+
};
|
|
73
|
+
export type LiveArtifactsAvailability = "available" | "absent";
|
|
74
|
+
/**
|
|
75
|
+
* Where a report's public link stands right now. Mirrors the server's own
|
|
76
|
+
* `resolveShareState`, deliberately: the list serves the two timestamps and
|
|
77
|
+
* the dock has to decide what to say about them, and a second rule here would
|
|
78
|
+
* be a second truth.
|
|
79
|
+
*/
|
|
80
|
+
export type ShareState = {
|
|
81
|
+
readonly kind: "never_shared";
|
|
82
|
+
} | {
|
|
83
|
+
readonly kind: "revoked";
|
|
84
|
+
} | {
|
|
85
|
+
readonly kind: "expired";
|
|
86
|
+
} | {
|
|
87
|
+
readonly kind: "live";
|
|
88
|
+
readonly expiresAt: string;
|
|
89
|
+
};
|
|
90
|
+
export declare const resolveShareState: (row: {
|
|
91
|
+
readonly shareExpiresAt: string | null;
|
|
92
|
+
readonly shareRevokedAt: string | null;
|
|
93
|
+
}, now: Date) => ShareState;
|
|
94
|
+
/**
|
|
95
|
+
* Does sharing from THIS state mint a new url and kill the old one? Only a
|
|
96
|
+
* re-share after a revoke rotates (design doc D5); a first share has no
|
|
97
|
+
* previous url to break, and extending a live or expired share keeps it.
|
|
98
|
+
*/
|
|
99
|
+
export declare const shareRotates: (state: ShareState) => boolean;
|
|
100
|
+
/**
|
|
101
|
+
* The public url for a report's slug. Composed here rather than read back
|
|
102
|
+
* from the share response, so COPYING a link the user already has never has
|
|
103
|
+
* to POST (which would silently push the expiry out). Mirrors the server's
|
|
104
|
+
* `buildLiveShareUrl`.
|
|
105
|
+
*
|
|
106
|
+
* ASSUMPTION, stated because it is load-bearing and unenforced: the dock's
|
|
107
|
+
* configured `apiBaseUrl` is the SAME public origin the server composes from
|
|
108
|
+
* the request `Host` (`requestOrigin`, live-artifact.routes.ts). The two
|
|
109
|
+
* derive the origin independently — the server from the host the browser
|
|
110
|
+
* actually reached, the dock from its own config — so if a deployment ever
|
|
111
|
+
* points the dock at a base url that is not the public host (an internal Cloud
|
|
112
|
+
* Run url, a regional alias, a reverse proxy under a different name), the
|
|
113
|
+
* COPIED link is wrong while the MINTED one stays right, and only the copied
|
|
114
|
+
* one is silent about it. Keep this in step with `requestOrigin`.
|
|
115
|
+
*/
|
|
116
|
+
export declare const liveShareUrl: (apiBaseUrl: string, slug: string) => string;
|
|
117
|
+
export type ShareLiveArtifactOutcome = {
|
|
118
|
+
readonly status: "shared";
|
|
119
|
+
readonly shareUrl: string;
|
|
120
|
+
readonly expiresAt: string;
|
|
121
|
+
/**
|
|
122
|
+
* Did this call MINT A NEW url and kill the previous one? Read off the
|
|
123
|
+
* server's answer, never guessed from the state the dock happened to be
|
|
124
|
+
* looking at — the row can be stale, and "the link you already sent
|
|
125
|
+
* someone is dead now" is not a sentence to say on a guess.
|
|
126
|
+
*/
|
|
127
|
+
readonly rotated: boolean;
|
|
128
|
+
} | {
|
|
129
|
+
readonly status: "not_found";
|
|
130
|
+
} | {
|
|
131
|
+
readonly status: "forbidden";
|
|
132
|
+
} | {
|
|
133
|
+
readonly status: "error";
|
|
134
|
+
};
|
|
135
|
+
export type RevokeShareOutcome = {
|
|
136
|
+
readonly status: "revoked";
|
|
137
|
+
} | {
|
|
138
|
+
readonly status: "not_found";
|
|
139
|
+
} | {
|
|
140
|
+
readonly status: "forbidden";
|
|
141
|
+
} | {
|
|
142
|
+
readonly status: "error";
|
|
143
|
+
};
|
|
144
|
+
export type DeleteLiveArtifactOutcome = {
|
|
145
|
+
readonly status: "deleted";
|
|
146
|
+
} | {
|
|
147
|
+
readonly status: "not_found";
|
|
148
|
+
} | {
|
|
149
|
+
readonly status: "forbidden";
|
|
150
|
+
} | {
|
|
151
|
+
readonly status: "error";
|
|
152
|
+
};
|
|
153
|
+
export type UpdateLiveArtifactOutcome = {
|
|
154
|
+
readonly status: "updated";
|
|
155
|
+
} | {
|
|
156
|
+
readonly status: "not_found";
|
|
157
|
+
} | {
|
|
158
|
+
readonly status: "forbidden";
|
|
159
|
+
} | {
|
|
160
|
+
readonly status: "name_taken";
|
|
161
|
+
} | {
|
|
162
|
+
readonly status: "series_not_found";
|
|
163
|
+
} | {
|
|
164
|
+
readonly status: "error";
|
|
165
|
+
};
|
|
166
|
+
export type UpdateLiveArtifactInput = {
|
|
167
|
+
readonly liveArtifactId: string;
|
|
168
|
+
readonly name?: string;
|
|
169
|
+
readonly description?: string;
|
|
170
|
+
/** `null` unbinds the schedule; omit the field to leave the binding alone. */
|
|
171
|
+
readonly seriesId?: string | null;
|
|
172
|
+
};
|
|
173
|
+
export declare const listLiveArtifactsRequest: (api: ApiClient, signal?: AbortSignal) => Promise<LiveArtifactsListResult>;
|
|
174
|
+
export declare const useLiveArtifacts: () => UseQueryResult<LiveArtifactsListResult>;
|
|
175
|
+
/**
|
|
176
|
+
* Does this deployment have live reports? FALSE until some list call has
|
|
177
|
+
* RESOLVED `featureAbsent` — while loading, or during an outage, the rail keeps
|
|
178
|
+
* its entry (a late pop-in reads as a glitch; an outage must not look like a
|
|
179
|
+
* feature that was never there).
|
|
180
|
+
*/
|
|
181
|
+
export declare const useLiveArtifactsFeatureAbsent: () => boolean;
|
|
182
|
+
export type LiveArtifactDetailResult = {
|
|
183
|
+
readonly status: "ready";
|
|
184
|
+
readonly artifact: LiveArtifactDetail;
|
|
185
|
+
} | {
|
|
186
|
+
readonly status: "not_found";
|
|
187
|
+
};
|
|
188
|
+
export declare const useLiveArtifact: (liveArtifactId: string | null) => UseQueryResult<LiveArtifactDetailResult>;
|
|
189
|
+
/** Both the list and every detail read — a mutation makes both stale. */
|
|
190
|
+
export declare const invalidateLiveArtifacts: (queryClient: QueryClient) => Promise<void>;
|
|
191
|
+
export declare const useShareLiveArtifact: () => import('@tanstack/react-query').UseMutationResult<ShareLiveArtifactOutcome, Error, {
|
|
192
|
+
readonly liveArtifactId: string;
|
|
193
|
+
readonly ttlSeconds?: number;
|
|
194
|
+
}, unknown>;
|
|
195
|
+
export declare const useRevokeLiveArtifactShare: () => import('@tanstack/react-query').UseMutationResult<RevokeShareOutcome, Error, string, unknown>;
|
|
196
|
+
export declare const useDeleteLiveArtifact: () => import('@tanstack/react-query').UseMutationResult<DeleteLiveArtifactOutcome, Error, string, unknown>;
|
|
197
|
+
export declare const useUpdateLiveArtifact: () => import('@tanstack/react-query').UseMutationResult<UpdateLiveArtifactOutcome, Error, UpdateLiveArtifactInput, unknown>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ApiClient } from './client.ts';
|
|
3
|
+
export declare const myUsageSchema: z.ZodObject<{
|
|
4
|
+
timeZone: z.ZodLiteral<"UTC">;
|
|
5
|
+
asOf: z.ZodISODateTime;
|
|
6
|
+
days: z.ZodArray<z.ZodObject<{
|
|
7
|
+
date: z.ZodISODate;
|
|
8
|
+
weightedTokens: z.ZodNumber;
|
|
9
|
+
}, z.core.$strip>>;
|
|
10
|
+
today: z.ZodObject<{
|
|
11
|
+
date: z.ZodISODate;
|
|
12
|
+
weightedTokens: z.ZodNumber;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
monthToDate: z.ZodObject<{
|
|
15
|
+
from: z.ZodISODate;
|
|
16
|
+
weightedTokens: z.ZodNumber;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type MyUsage = z.infer<typeof myUsageSchema>;
|
|
20
|
+
export type MyUsageState = {
|
|
21
|
+
readonly status: "ready";
|
|
22
|
+
readonly usage: MyUsage;
|
|
23
|
+
} | {
|
|
24
|
+
readonly status: "unavailable";
|
|
25
|
+
};
|
|
26
|
+
export declare const fetchMyUsage: (client: ApiClient) => Promise<MyUsageState>;
|
|
27
|
+
/** Keyed by the account speaking to the API (`useAccountKey`), so it is purged on a switch. */
|
|
28
|
+
export declare const useMyUsage: (accountKey: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<MyUsageState>, Error>;
|
package/dist/api/queries.d.ts
CHANGED
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const useSessions: (limit?: number) => import('@tanstack/react-query').UseQueryResult<NoInfer<{
|
|
8
8
|
sessions: readonly {
|
|
9
|
-
readonly sessionId: import('
|
|
9
|
+
readonly sessionId: import('../../../../apps/belong-cloud/src/platform/ids.ts').SessionId;
|
|
10
10
|
readonly title: string | null;
|
|
11
|
-
readonly status: import('
|
|
11
|
+
readonly status: import('../../../../apps/belong-cloud/src/features/sessions/session.repo.ts').SessionRow["status"];
|
|
12
12
|
readonly updatedAt: string;
|
|
13
13
|
}[];
|
|
14
14
|
}>, Error>;
|
|
15
15
|
export declare const useSession: (sessionId: string | null) => import('@tanstack/react-query').UseQueryResult<NoInfer<{
|
|
16
|
-
readonly sessionId: import('
|
|
16
|
+
readonly sessionId: import('../../../../apps/belong-cloud/src/platform/ids.ts').SessionId;
|
|
17
17
|
readonly workspaceExternalId: string | null;
|
|
18
18
|
readonly title: string | null;
|
|
19
|
-
readonly status: import('
|
|
19
|
+
readonly status: import('../../../../apps/belong-cloud/src/features/sessions/session.repo.ts').SessionRow["status"];
|
|
20
20
|
readonly createdAt: string;
|
|
21
21
|
readonly updatedAt: string;
|
|
22
22
|
}>, Error>;
|
|
@@ -24,6 +24,7 @@ export declare const useSessionStats: (sessionId: string | null) => import('@tan
|
|
|
24
24
|
readonly totalInputTokens: number;
|
|
25
25
|
readonly totalOutputTokens: number;
|
|
26
26
|
readonly totalTokens: number;
|
|
27
|
+
readonly totalWeightedTokens: number;
|
|
27
28
|
readonly totalCacheReadInputTokens: number;
|
|
28
29
|
readonly totalCacheWriteInputTokens: number;
|
|
29
30
|
readonly turns: number;
|
|
@@ -36,5 +37,6 @@ export declare const useSessionStats: (sessionId: string | null) => import('@tan
|
|
|
36
37
|
readonly inputTokens: number;
|
|
37
38
|
readonly outputTokens: number;
|
|
38
39
|
readonly totalTokens: number;
|
|
40
|
+
readonly weightedTokens: number;
|
|
39
41
|
}[];
|
|
40
42
|
}>, Error>;
|
package/dist/api/query-keys.d.ts
CHANGED
|
@@ -47,9 +47,24 @@ export declare const queryKeys: {
|
|
|
47
47
|
/** Invalidation prefix for every task-schedule read (list + detail + runs). */
|
|
48
48
|
taskSchedules: readonly ["belong", "task-schedules"];
|
|
49
49
|
apiKeys: (ownerCacheKey: string) => readonly ["belong", "api-keys", string];
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
/**
|
|
51
|
+
* Plan 018 — the signed-in user's own usage. ACCOUNT-scoped (`accountKey`
|
|
52
|
+
* from `api/account-scope.ts`, right after the prefix like the schedule keys),
|
|
53
|
+
* so a host that swaps accounts in place never paints the previous user's
|
|
54
|
+
* usage.
|
|
55
|
+
*/
|
|
56
|
+
myUsage: (accountKey: string) => readonly ["belong", "my-usage", string];
|
|
57
|
+
/**
|
|
58
|
+
* Schedule reads are ACCOUNT-scoped as well as workspace-scoped (`accountKey`
|
|
59
|
+
* from `api/account-scope.ts`). `/v1/task-schedules` keys off the caller, and
|
|
60
|
+
* the account segment comes FIRST so `api/account-scope.ts` can find it in the
|
|
61
|
+
* same position for every one of these three — an unpartitioned schedule list
|
|
62
|
+
* showed account A's schedule titles to account B inside `BindScheduleDialog`
|
|
63
|
+
* (PR #614 audit finding 3, second pass).
|
|
64
|
+
*/
|
|
65
|
+
taskScheduleList: (accountKey: string, workspaceKey: string, filter: string, q: string) => readonly ["belong", "task-schedules", "list", string, string, string, string];
|
|
66
|
+
taskSchedule: (accountKey: string, workspaceKey: string, taskScheduleId: string) => readonly ["belong", "task-schedules", "detail", string, string, string];
|
|
67
|
+
taskScheduleRuns: (accountKey: string, workspaceKey: string, taskScheduleId: string) => readonly ["belong", "task-schedules", "detail", string, string, string, "runs"];
|
|
53
68
|
/** Invalidation prefix for every saved-prompt read (BEL-256). */
|
|
54
69
|
prePrompts: readonly ["belong", "pre-prompts"];
|
|
55
70
|
/** Workspace-scoped saved-prompt list (same "" unscoped convention). */
|
|
@@ -67,6 +82,32 @@ export declare const queryKeys: {
|
|
|
67
82
|
* every host workspace switch (R61).
|
|
68
83
|
*/
|
|
69
84
|
skillLibraryAvailability: readonly ["belong", "skill-library", "availability"];
|
|
85
|
+
/** Invalidation prefix for every live-artifact read (live-artifacts design doc §11.2). */
|
|
86
|
+
liveArtifacts: readonly ["belong", "live-artifacts"];
|
|
87
|
+
/**
|
|
88
|
+
* The owner's live-artifact list, partitioned by ACCOUNT (`accountKey` from
|
|
89
|
+
* `api/account-scope.ts` — the token's stable tenant+user claims, never the
|
|
90
|
+
* rotating token itself). `/v1/live-artifacts` is scoped by (tenant, user),
|
|
91
|
+
* and the SDK lets a host swap its token in place without remounting the
|
|
92
|
+
* memoized QueryClient: a key that named only the resource let the next
|
|
93
|
+
* account read the previous one's rows — including the public share slug that
|
|
94
|
+
* grants anonymous access to them (P1, 2026-09-27 PR #614 deep audit
|
|
95
|
+
* finding 3).
|
|
96
|
+
*
|
|
97
|
+
* NOT workspace-scoped, and deliberately so: a live report follows its owner
|
|
98
|
+
* across workspaces, so a per-workspace cache would paint the same list under
|
|
99
|
+
* two keys and let one of them go stale (the `connectors` reasoning, not the
|
|
100
|
+
* `skillLibrary` one).
|
|
101
|
+
*/
|
|
102
|
+
liveArtifactList: (accountKey: string) => readonly ["belong", "live-artifacts", "list", string];
|
|
103
|
+
liveArtifactDetail: (accountKey: string, liveArtifactId: string) => readonly ["belong", "live-artifacts", "detail", string, string];
|
|
104
|
+
/**
|
|
105
|
+
* UNSCOPED deployment probe, written by every list resolution and read by the
|
|
106
|
+
* rail — same reason as `skillLibraryAvailability`: whether the feature
|
|
107
|
+
* exists is a property of the CELL, so a host workspace switch must never pop
|
|
108
|
+
* a dead rail entry back in.
|
|
109
|
+
*/
|
|
110
|
+
liveArtifactsAvailability: readonly ["belong", "live-artifacts", "availability"];
|
|
70
111
|
/**
|
|
71
112
|
* Invalidation prefix for every custom-connector read. NOT workspace-scoped:
|
|
72
113
|
* `/v1/connectors` keys off the CALLER, not a workspace — a user's connected
|
|
@@ -5,10 +5,11 @@ export declare const sharedScheduleSchema: z.ZodObject<{
|
|
|
5
5
|
title: z.ZodString;
|
|
6
6
|
explicitTitle: z.ZodNullable<z.ZodString>;
|
|
7
7
|
message: z.ZodString;
|
|
8
|
+
sharedRecipients: z.ZodDefault<z.ZodArray<z.ZodEmail>>;
|
|
8
9
|
role: z.ZodEnum<{
|
|
9
10
|
edit: "edit";
|
|
10
|
-
use: "use";
|
|
11
11
|
owner: "owner";
|
|
12
|
+
use: "use";
|
|
12
13
|
}>;
|
|
13
14
|
owner: z.ZodString;
|
|
14
15
|
ownerTenant: z.ZodString;
|
|
@@ -52,7 +53,8 @@ export declare const useSharedSchedules: () => import('@tanstack/react-query').U
|
|
|
52
53
|
title: string;
|
|
53
54
|
explicitTitle: string | null;
|
|
54
55
|
message: string;
|
|
55
|
-
|
|
56
|
+
sharedRecipients: string[];
|
|
57
|
+
role: "edit" | "owner" | "use";
|
|
56
58
|
owner: string;
|
|
57
59
|
ownerTenant: string;
|
|
58
60
|
revision: number;
|
|
@@ -85,7 +87,8 @@ export declare const useSharedSchedule: (definitionId: string | null) => import(
|
|
|
85
87
|
title: string;
|
|
86
88
|
explicitTitle: string | null;
|
|
87
89
|
message: string;
|
|
88
|
-
|
|
90
|
+
sharedRecipients: string[];
|
|
91
|
+
role: "edit" | "owner" | "use";
|
|
89
92
|
owner: string;
|
|
90
93
|
ownerTenant: string;
|
|
91
94
|
revision: number;
|
|
@@ -146,7 +149,7 @@ export declare const useUpdateSharedSchedule: () => import('@tanstack/react-quer
|
|
|
146
149
|
revision: number;
|
|
147
150
|
}, Error, {
|
|
148
151
|
readonly definitionId: string;
|
|
149
|
-
readonly patch: Omit<UpdateTaskScheduleSeriesInput["patch"], "mode" | "expectedRevision"> & {
|
|
152
|
+
readonly patch: Omit<UpdateTaskScheduleSeriesInput["patch"], "mode" | "recipients" | "expectedRevision"> & {
|
|
150
153
|
readonly expectedRevision: number;
|
|
151
154
|
};
|
|
152
155
|
}, unknown>;
|
|
@@ -53,8 +53,8 @@ export declare const recurrenceKindSchema: z.ZodEnum<{
|
|
|
53
53
|
interval: "interval";
|
|
54
54
|
}>;
|
|
55
55
|
export type RecurrenceKind = z.infer<typeof recurrenceKindSchema>;
|
|
56
|
-
/** Bounds for the `interval` cadence (BEL-157):
|
|
57
|
-
export declare const MIN_RECURRENCE_INTERVAL_MINUTES =
|
|
56
|
+
/** Bounds for the `interval` cadence (BEL-157): 5 minutes up to a full day. */
|
|
57
|
+
export declare const MIN_RECURRENCE_INTERVAL_MINUTES = 5;
|
|
58
58
|
export declare const MAX_RECURRENCE_INTERVAL_MINUTES = 1440;
|
|
59
59
|
/**
|
|
60
60
|
* Recurrence as a discriminated union: only `interval` carries a width. Used
|
|
@@ -112,8 +112,8 @@ export declare const recurrenceSchema: z.ZodPipe<z.ZodObject<{
|
|
|
112
112
|
intervalMinutes?: number | undefined;
|
|
113
113
|
}>>;
|
|
114
114
|
export declare const taskScheduleSeriesStatusSchema: z.ZodEnum<{
|
|
115
|
-
active: "active";
|
|
116
115
|
completed: "completed";
|
|
116
|
+
active: "active";
|
|
117
117
|
paused: "paused";
|
|
118
118
|
deleted: "deleted";
|
|
119
119
|
}>;
|
|
@@ -124,8 +124,8 @@ declare const taskScheduleListItemSchema: z.ZodObject<{
|
|
|
124
124
|
taskScheduleId: z.ZodUUID;
|
|
125
125
|
title: z.ZodString;
|
|
126
126
|
status: z.ZodEnum<{
|
|
127
|
-
active: "active";
|
|
128
127
|
completed: "completed";
|
|
128
|
+
active: "active";
|
|
129
129
|
paused: "paused";
|
|
130
130
|
deleted: "deleted";
|
|
131
131
|
}>;
|
|
@@ -161,8 +161,8 @@ declare const taskScheduleListItemSchema: z.ZodObject<{
|
|
|
161
161
|
lastRun: z.ZodNullable<z.ZodObject<{
|
|
162
162
|
status: z.ZodEnum<{
|
|
163
163
|
failed: "failed";
|
|
164
|
-
completed: "completed";
|
|
165
164
|
running: "running";
|
|
165
|
+
completed: "completed";
|
|
166
166
|
}>;
|
|
167
167
|
at: z.ZodNullable<z.ZodISODateTime>;
|
|
168
168
|
}, z.core.$strip>>;
|
|
@@ -175,8 +175,8 @@ export declare const taskScheduleDetailSchema: z.ZodObject<{
|
|
|
175
175
|
taskScheduleId: z.ZodUUID;
|
|
176
176
|
title: z.ZodString;
|
|
177
177
|
status: z.ZodEnum<{
|
|
178
|
-
active: "active";
|
|
179
178
|
completed: "completed";
|
|
179
|
+
active: "active";
|
|
180
180
|
paused: "paused";
|
|
181
181
|
deleted: "deleted";
|
|
182
182
|
}>;
|
|
@@ -212,8 +212,8 @@ export declare const taskScheduleDetailSchema: z.ZodObject<{
|
|
|
212
212
|
lastRun: z.ZodNullable<z.ZodObject<{
|
|
213
213
|
status: z.ZodEnum<{
|
|
214
214
|
failed: "failed";
|
|
215
|
-
completed: "completed";
|
|
216
215
|
running: "running";
|
|
216
|
+
completed: "completed";
|
|
217
217
|
}>;
|
|
218
218
|
at: z.ZodNullable<z.ZodISODateTime>;
|
|
219
219
|
}, z.core.$strip>>;
|
|
@@ -224,11 +224,12 @@ export declare const taskScheduleDetailSchema: z.ZodObject<{
|
|
|
224
224
|
role: z.ZodEnum<{
|
|
225
225
|
edit: "edit";
|
|
226
226
|
revoked: "revoked";
|
|
227
|
-
use: "use";
|
|
228
227
|
owner: "owner";
|
|
228
|
+
use: "use";
|
|
229
229
|
}>;
|
|
230
230
|
revision: z.ZodNumber;
|
|
231
231
|
workspaceCount: z.ZodNumber;
|
|
232
|
+
sharedRecipients: z.ZodOptional<z.ZodArray<z.ZodEmail>>;
|
|
232
233
|
}, z.core.$strip>>>;
|
|
233
234
|
explicitTitle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
234
235
|
message: z.ZodString;
|
|
@@ -278,8 +279,8 @@ declare const taskScheduleRunSchema: z.ZodObject<{
|
|
|
278
279
|
}>;
|
|
279
280
|
displayStatus: z.ZodEnum<{
|
|
280
281
|
failed: "failed";
|
|
281
|
-
completed: "completed";
|
|
282
282
|
running: "running";
|
|
283
|
+
completed: "completed";
|
|
283
284
|
needs_attention: "needs_attention";
|
|
284
285
|
}>;
|
|
285
286
|
scheduledFor: z.ZodISODateTime;
|
|
@@ -294,7 +295,7 @@ export type TaskScheduleRun = z.infer<typeof taskScheduleRunSchema>;
|
|
|
294
295
|
export declare const useTaskSchedules: (filter: TaskScheduleFilter, q: string) => import('@tanstack/react-query').UseInfiniteQueryResult<{
|
|
295
296
|
taskScheduleId: string;
|
|
296
297
|
title: string;
|
|
297
|
-
status: "
|
|
298
|
+
status: "completed" | "active" | "paused" | "deleted";
|
|
298
299
|
recurrence: {
|
|
299
300
|
readonly kind: "none";
|
|
300
301
|
} | {
|
|
@@ -312,7 +313,7 @@ export declare const useTaskSchedules: (filter: TaskScheduleFilter, q: string) =
|
|
|
312
313
|
timezone: string;
|
|
313
314
|
nextRunAt: string | null;
|
|
314
315
|
lastRun: {
|
|
315
|
-
status: "failed" | "
|
|
316
|
+
status: "failed" | "running" | "completed";
|
|
316
317
|
at: string | null;
|
|
317
318
|
} | null;
|
|
318
319
|
messagePreview: string;
|
|
@@ -322,7 +323,7 @@ export declare const useTaskSchedules: (filter: TaskScheduleFilter, q: string) =
|
|
|
322
323
|
export declare const useTaskSchedule: (taskScheduleId: string | null) => import('@tanstack/react-query').UseQueryResult<NoInfer<{
|
|
323
324
|
taskScheduleId: string;
|
|
324
325
|
title: string;
|
|
325
|
-
status: "
|
|
326
|
+
status: "completed" | "active" | "paused" | "deleted";
|
|
326
327
|
recurrence: {
|
|
327
328
|
readonly kind: "none";
|
|
328
329
|
} | {
|
|
@@ -340,7 +341,7 @@ export declare const useTaskSchedule: (taskScheduleId: string | null) => import(
|
|
|
340
341
|
timezone: string;
|
|
341
342
|
nextRunAt: string | null;
|
|
342
343
|
lastRun: {
|
|
343
|
-
status: "failed" | "
|
|
344
|
+
status: "failed" | "running" | "completed";
|
|
344
345
|
at: string | null;
|
|
345
346
|
} | null;
|
|
346
347
|
messagePreview: string;
|
|
@@ -377,15 +378,16 @@ export declare const useTaskSchedule: (taskScheduleId: string | null) => import(
|
|
|
377
378
|
shared?: boolean | undefined;
|
|
378
379
|
sharing?: {
|
|
379
380
|
definitionId: string;
|
|
380
|
-
role: "edit" | "revoked" | "
|
|
381
|
+
role: "edit" | "revoked" | "owner" | "use";
|
|
381
382
|
revision: number;
|
|
382
383
|
workspaceCount: number;
|
|
384
|
+
sharedRecipients?: string[] | undefined;
|
|
383
385
|
} | null | undefined;
|
|
384
386
|
}>, Error>;
|
|
385
387
|
export declare const useTaskScheduleRuns: (taskScheduleId: string | null) => import('@tanstack/react-query').UseInfiniteQueryResult<{
|
|
386
388
|
taskScheduleRunId: string;
|
|
387
389
|
occurrenceKind: "scheduled" | "manual";
|
|
388
|
-
displayStatus: "failed" | "
|
|
390
|
+
displayStatus: "failed" | "running" | "completed" | "needs_attention";
|
|
389
391
|
scheduledFor: string;
|
|
390
392
|
startedAt: string | null;
|
|
391
393
|
finishedAt: string | null;
|
|
@@ -408,6 +410,7 @@ export type UpdateTaskScheduleSeriesInput = {
|
|
|
408
410
|
readonly taskScheduleId: string;
|
|
409
411
|
readonly patch: {
|
|
410
412
|
readonly expectedRevision?: number;
|
|
413
|
+
readonly sharedRecipients?: string[];
|
|
411
414
|
readonly title?: string | null;
|
|
412
415
|
readonly message?: string;
|
|
413
416
|
readonly scheduledFor?: string;
|
|
@@ -422,14 +425,14 @@ export declare const useCreateTaskSchedule: () => import('@tanstack/react-query'
|
|
|
422
425
|
}, Error, CreateTaskScheduleSeriesInput, unknown>;
|
|
423
426
|
export declare const useUpdateTaskSchedule: () => import('@tanstack/react-query').UseMutationResult<{
|
|
424
427
|
taskScheduleId: string;
|
|
425
|
-
status: "
|
|
428
|
+
status: "completed" | "active" | "paused" | "deleted";
|
|
426
429
|
nextRunAt: string | null;
|
|
427
430
|
}, Error, UpdateTaskScheduleSeriesInput, unknown>;
|
|
428
431
|
export declare const usePauseTaskSchedule: () => import('@tanstack/react-query').UseMutationResult<{
|
|
429
432
|
status: "paused";
|
|
430
433
|
}, Error, string, unknown>;
|
|
431
434
|
export declare const useResumeTaskSchedule: () => import('@tanstack/react-query').UseMutationResult<{
|
|
432
|
-
status: "
|
|
435
|
+
status: "completed" | "active" | "needs_attention";
|
|
433
436
|
nextRunAt: string | null;
|
|
434
437
|
}, Error, string, unknown>;
|
|
435
438
|
export declare const useRunNowTaskSchedule: () => import('@tanstack/react-query').UseMutationResult<{
|
|
@@ -16,7 +16,7 @@ export declare function dockStoryData(brand: "belong" | "simetrik"): {
|
|
|
16
16
|
schedule: {
|
|
17
17
|
taskScheduleId: string;
|
|
18
18
|
title: string;
|
|
19
|
-
status: "
|
|
19
|
+
status: "completed" | "active" | "paused" | "deleted";
|
|
20
20
|
recurrence: {
|
|
21
21
|
readonly kind: "none";
|
|
22
22
|
} | {
|
|
@@ -34,7 +34,7 @@ export declare function dockStoryData(brand: "belong" | "simetrik"): {
|
|
|
34
34
|
timezone: string;
|
|
35
35
|
nextRunAt: string | null;
|
|
36
36
|
lastRun: {
|
|
37
|
-
status: "failed" | "
|
|
37
|
+
status: "failed" | "running" | "completed";
|
|
38
38
|
at: string | null;
|
|
39
39
|
} | null;
|
|
40
40
|
messagePreview: string;
|
|
@@ -44,7 +44,7 @@ export declare function dockStoryData(brand: "belong" | "simetrik"): {
|
|
|
44
44
|
detail: {
|
|
45
45
|
taskScheduleId: string;
|
|
46
46
|
title: string;
|
|
47
|
-
status: "
|
|
47
|
+
status: "completed" | "active" | "paused" | "deleted";
|
|
48
48
|
recurrence: {
|
|
49
49
|
readonly kind: "none";
|
|
50
50
|
} | {
|
|
@@ -62,7 +62,7 @@ export declare function dockStoryData(brand: "belong" | "simetrik"): {
|
|
|
62
62
|
timezone: string;
|
|
63
63
|
nextRunAt: string | null;
|
|
64
64
|
lastRun: {
|
|
65
|
-
status: "failed" | "
|
|
65
|
+
status: "failed" | "running" | "completed";
|
|
66
66
|
at: string | null;
|
|
67
67
|
} | null;
|
|
68
68
|
messagePreview: string;
|
|
@@ -99,13 +99,17 @@ export declare function dockStoryData(brand: "belong" | "simetrik"): {
|
|
|
99
99
|
shared?: boolean | undefined;
|
|
100
100
|
sharing?: {
|
|
101
101
|
definitionId: string;
|
|
102
|
-
role: "edit" | "revoked" | "
|
|
102
|
+
role: "edit" | "revoked" | "owner" | "use";
|
|
103
103
|
revision: number;
|
|
104
104
|
workspaceCount: number;
|
|
105
|
+
sharedRecipients?: string[] | undefined;
|
|
105
106
|
} | null | undefined;
|
|
106
107
|
};
|
|
107
108
|
};
|
|
108
|
-
export declare function createDockStoryQueryClient(brand?: "belong" | "simetrik", scheduleSessionId?: string, expanded?: boolean
|
|
109
|
+
export declare function createDockStoryQueryClient(brand?: "belong" | "simetrik", scheduleSessionId?: string, expanded?: boolean,
|
|
110
|
+
/** The account partition the schedule reads are keyed under — the story owns
|
|
111
|
+
* the token and the base url, so it owns this (api/account-scope.ts). */
|
|
112
|
+
account?: string): QueryClient;
|
|
109
113
|
/** Rich client-demo fixtures only; available providers still come from the real API in production. */
|
|
110
114
|
export declare function dockStoryApps(brand: "belong" | "simetrik"): {
|
|
111
115
|
connectors: readonly ConnectorSummary[];
|
|
@@ -10,6 +10,9 @@ export type BelongWidgetProps = {
|
|
|
10
10
|
readonly getToken: () => Promise<string>;
|
|
11
11
|
/** Belong cloud base URL, e.g. `https://api.belong.host`. */
|
|
12
12
|
readonly backend: string;
|
|
13
|
+
/** Public tenant ID or slug for branding. Omit only on single-tenant APIs.
|
|
14
|
+
* Authenticated requests still derive their tenant from the signed JWT. */
|
|
15
|
+
readonly tenant?: string;
|
|
13
16
|
/**
|
|
14
17
|
* @deprecated Ignored. Cross-origin navigation now keys off the live document
|
|
15
18
|
* origin (`window.location`) directly — the only reliable answer to "would a
|
|
@@ -86,4 +89,4 @@ export type BelongWidgetProps = {
|
|
|
86
89
|
readonly fromDocumentTitle?: boolean;
|
|
87
90
|
};
|
|
88
91
|
};
|
|
89
|
-
export declare const BelongWidget: ({ getToken, backend, agentId, locale, panelEnabled, agentGrant, workspace, user, pageContext, }: BelongWidgetProps) => import("react").JSX.Element;
|
|
92
|
+
export declare const BelongWidget: ({ getToken, backend, tenant, agentId, locale, panelEnabled, agentGrant, workspace, user, pageContext, }: BelongWidgetProps) => import("react").JSX.Element;
|