@seatlayer/js 0.47.2 → 0.48.1
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 +16 -1
- package/dist/{channelsMode-33ZLORVF.js → channelsMode-NCH5GYHN.js} +3 -3
- package/dist/{chunk-X2R4AQSZ.js → chunk-H4OJF6LE.js} +176 -7
- package/dist/chunk-H4OJF6LE.js.map +1 -0
- package/dist/{chunk-DMEFXZIL.js → chunk-KNMZQZXR.js} +2 -2
- package/dist/{chunk-CF5MS7UR.js → chunk-Q5QT3YLA.js} +186 -59
- package/dist/chunk-Q5QT3YLA.js.map +1 -0
- package/dist/{hostedCheckout-SHQCWN5Y.js → hostedCheckout-F6C6VCCG.js} +1 -1
- package/dist/hostedCheckout-F6C6VCCG.js.map +1 -0
- package/dist/index.cjs +612 -120
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +37 -5
- package/dist/index.d.ts +37 -5
- package/dist/index.js +258 -62
- package/dist/index.js.map +1 -1
- package/dist/{manager-CAIPkUYl.d.cts → manager-DEjbKiqJ.d.cts} +200 -17
- package/dist/{manager-CAIPkUYl.d.ts → manager-DEjbKiqJ.d.ts} +200 -17
- package/dist/manager.cjs +358 -62
- package/dist/manager.cjs.map +1 -1
- package/dist/manager.d.cts +1 -1
- package/dist/manager.d.ts +1 -1
- package/dist/manager.js +2 -2
- package/package.json +2 -2
- package/dist/chunk-CF5MS7UR.js.map +0 -1
- package/dist/chunk-X2R4AQSZ.js.map +0 -1
- package/dist/hostedCheckout-SHQCWN5Y.js.map +0 -1
- /package/dist/{channelsMode-33ZLORVF.js.map → channelsMode-NCH5GYHN.js.map} +0 -0
- /package/dist/{chunk-DMEFXZIL.js.map → chunk-KNMZQZXR.js.map} +0 -0
package/README.md
CHANGED
|
@@ -58,7 +58,8 @@ Svelte → `onMount` / `onDestroy`. Angular → `ngAfterViewInit` / `ngOnDestroy
|
|
|
58
58
|
realtime organizer cockpit. Mint a short-lived, event-scoped `mse_` token from
|
|
59
59
|
your backend, bound to the browser's exact origin and only the capabilities it
|
|
60
60
|
needs. The shared surface owns Monitor, Inspect, Block/unblock, fullscreen,
|
|
61
|
-
presence, exact
|
|
61
|
+
presence, exact configured booked value, booking velocity, and a clearly explained
|
|
62
|
+
**Booking momentum** overlay.
|
|
62
63
|
Block mode exposes explicit multi-select category state and a searchable,
|
|
63
64
|
section-filtered blocked-inventory list, so an organizer can put specific seats
|
|
64
65
|
back on sale without resetting the entire event.
|
|
@@ -81,6 +82,20 @@ Switching tools and rotating tokens happen in place: the renderer, camera,
|
|
|
81
82
|
selection, WebSocket, and DOM are not remounted. Give the container a height;
|
|
82
83
|
the cockpit responds to its container rather than the browser viewport.
|
|
83
84
|
|
|
85
|
+
For a Platform event, the same event-scoped organizer client exposes inventory
|
|
86
|
+
Booking History without turning SeatLayer into the commerce system:
|
|
87
|
+
|
|
88
|
+
```js
|
|
89
|
+
import { ManageApi } from '@seatlayer/js/manager';
|
|
90
|
+
|
|
91
|
+
const inventory = new ManageApi('https://api.seatlayer.io', session.token);
|
|
92
|
+
const page = await inventory.listBookings('ev_9f3a', { state: 'booked', limit: 50 });
|
|
93
|
+
const detail = await inventory.retrieveBooking('ev_9f3a', page.bookings[0].bookingRef);
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
These records contain labels, lifecycle activity and configured-value snapshots.
|
|
97
|
+
They do not contain buyer, payment, ticket, email or refund data.
|
|
98
|
+
|
|
84
99
|
## Embed the chart Designer
|
|
85
100
|
|
|
86
101
|
For organizer-facing venue design, use `EmbeddedDesigner`. Your backend mints the
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
CHANNELS_CSS,
|
|
3
3
|
ChannelsMode,
|
|
4
4
|
bucketRowsHtml
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-KNMZQZXR.js";
|
|
6
|
+
import "./chunk-H4OJF6LE.js";
|
|
7
7
|
import "./chunk-HMLY7DHA.js";
|
|
8
8
|
export {
|
|
9
9
|
CHANNELS_CSS,
|
|
10
10
|
ChannelsMode,
|
|
11
11
|
bucketRowsHtml
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=channelsMode-
|
|
13
|
+
//# sourceMappingURL=channelsMode-NCH5GYHN.js.map
|
|
@@ -26,6 +26,99 @@ async function parse(res) {
|
|
|
26
26
|
}
|
|
27
27
|
return data;
|
|
28
28
|
}
|
|
29
|
+
function record(value) {
|
|
30
|
+
return value && typeof value === "object" ? value : {};
|
|
31
|
+
}
|
|
32
|
+
function finite(primary, legacy, fallback = 0) {
|
|
33
|
+
if (typeof primary === "number" && Number.isFinite(primary)) return primary;
|
|
34
|
+
if (typeof legacy === "number" && Number.isFinite(legacy)) return legacy;
|
|
35
|
+
return fallback;
|
|
36
|
+
}
|
|
37
|
+
function nullableFinite(primary, legacy) {
|
|
38
|
+
if (primary === null) return null;
|
|
39
|
+
if (typeof primary === "number" && Number.isFinite(primary)) return primary;
|
|
40
|
+
if (primary !== void 0) return null;
|
|
41
|
+
if (typeof legacy === "number" && Number.isFinite(legacy)) return legacy;
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
function normalizeSection(value) {
|
|
45
|
+
const row = record(value);
|
|
46
|
+
const bookedValue = finite(row.bookedValue, row.bookedRevenue);
|
|
47
|
+
return { ...row, bookedValue, bookedRevenue: bookedValue };
|
|
48
|
+
}
|
|
49
|
+
function normalizeReportResult(value) {
|
|
50
|
+
const source = record(value);
|
|
51
|
+
const report = record(source.report);
|
|
52
|
+
const byCategory = Array.isArray(report.byCategory) ? report.byCategory.map((value2) => {
|
|
53
|
+
const row = record(value2);
|
|
54
|
+
const bookedValue = finite(row.bookedValue, row.bookedRevenue);
|
|
55
|
+
return { ...row, bookedValue, bookedRevenue: bookedValue };
|
|
56
|
+
}) : [];
|
|
57
|
+
const bySection = Array.isArray(report.bySection) ? report.bySection.map(normalizeSection) : void 0;
|
|
58
|
+
return {
|
|
59
|
+
...source,
|
|
60
|
+
report: { ...report, byCategory, ...bySection ? { bySection } : {} }
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function normalizeControlRoomSnapshot(value) {
|
|
64
|
+
const source = record(value);
|
|
65
|
+
const canonical = record(source.bookedValue);
|
|
66
|
+
const legacy = record(source.revenue);
|
|
67
|
+
const selected = Object.keys(canonical).length ? canonical : legacy;
|
|
68
|
+
const bySectionSource = Array.isArray(canonical.bySection) ? canonical.bySection : Array.isArray(legacy.bySection) ? legacy.bySection : [];
|
|
69
|
+
const bookedValue = {
|
|
70
|
+
...selected,
|
|
71
|
+
gross: finite(canonical.gross, legacy.gross),
|
|
72
|
+
bySection: bySectionSource.map(normalizeSection)
|
|
73
|
+
};
|
|
74
|
+
const velocity = record(source.velocity);
|
|
75
|
+
const velocityRows = Array.isArray(velocity.bySection) ? velocity.bySection.map((value2) => {
|
|
76
|
+
const row = record(value2);
|
|
77
|
+
const rowValue = finite(row.bookedValue, row.grossRevenue);
|
|
78
|
+
return { ...row, bookedValue: rowValue, grossRevenue: rowValue };
|
|
79
|
+
}) : [];
|
|
80
|
+
return {
|
|
81
|
+
...source,
|
|
82
|
+
bookedValue,
|
|
83
|
+
revenue: bookedValue,
|
|
84
|
+
velocity: { ...velocity, bySection: velocityRows }
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function normalizeChannelReportResult(value) {
|
|
88
|
+
const source = record(value);
|
|
89
|
+
const report = record(source.report);
|
|
90
|
+
const includesBookedValue = typeof report.includesBookedValue === "boolean" ? report.includesBookedValue : report.includesRevenue === true;
|
|
91
|
+
const rows = Array.isArray(report.rows) ? report.rows.map((value2) => {
|
|
92
|
+
const row = record(value2);
|
|
93
|
+
const attribution = record(row.attribution);
|
|
94
|
+
const bookedValue = nullableFinite(attribution.bookedValue, attribution.revenue);
|
|
95
|
+
return {
|
|
96
|
+
...row,
|
|
97
|
+
attribution: { ...attribution, bookedValue, revenue: bookedValue }
|
|
98
|
+
};
|
|
99
|
+
}) : [];
|
|
100
|
+
const totals = record(report.totals);
|
|
101
|
+
const totalBookedValue = nullableFinite(totals.bookedValue, totals.revenue);
|
|
102
|
+
return {
|
|
103
|
+
...source,
|
|
104
|
+
report: {
|
|
105
|
+
...report,
|
|
106
|
+
includesBookedValue,
|
|
107
|
+
includesRevenue: includesBookedValue,
|
|
108
|
+
rows,
|
|
109
|
+
totals: { ...totals, bookedValue: totalBookedValue, revenue: totalBookedValue }
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function normalizeChannelReportLink(value) {
|
|
114
|
+
const link = record(value);
|
|
115
|
+
const includesBookedValue = typeof link.includesBookedValue === "boolean" ? link.includesBookedValue : link.includesRevenue === true;
|
|
116
|
+
return {
|
|
117
|
+
...link,
|
|
118
|
+
includesBookedValue,
|
|
119
|
+
includesRevenue: includesBookedValue
|
|
120
|
+
};
|
|
121
|
+
}
|
|
29
122
|
var ManageApi = class {
|
|
30
123
|
constructor(apiBase, token) {
|
|
31
124
|
this.base = apiBase.replace(/\/+$/, "");
|
|
@@ -45,13 +138,28 @@ var ManageApi = class {
|
|
|
45
138
|
}
|
|
46
139
|
return fetch(`${this.base}${path}`, { method, headers, body, credentials: "omit" }).then((r) => parse(r));
|
|
47
140
|
}
|
|
48
|
-
|
|
49
|
-
|
|
141
|
+
async authBlob(path) {
|
|
142
|
+
const res = await fetch(`${this.base}${path}`, {
|
|
143
|
+
method: "GET",
|
|
144
|
+
headers: { Authorization: `Bearer ${this.token}` },
|
|
145
|
+
credentials: "omit"
|
|
146
|
+
});
|
|
147
|
+
if (!res.ok) await parse(res);
|
|
148
|
+
return res.blob();
|
|
50
149
|
}
|
|
51
150
|
// ---- realtime read ----
|
|
52
|
-
/**
|
|
151
|
+
/** Event-pinned organizer geometry. A manage token is never sent to `/pub`. */
|
|
53
152
|
chart(key) {
|
|
54
|
-
return this.
|
|
153
|
+
return this.auth(`/v1/events/${encodeURIComponent(key)}/chart`);
|
|
154
|
+
}
|
|
155
|
+
/** Authenticated bytes for an Event-scoped organizer chart asset. */
|
|
156
|
+
asset(key, asset) {
|
|
157
|
+
if (!/^[a-zA-Z0-9._-]+$/.test(asset)) {
|
|
158
|
+
return Promise.reject(new ManageApiError(404, "not_found", "not_found"));
|
|
159
|
+
}
|
|
160
|
+
return this.authBlob(
|
|
161
|
+
`/v1/events/${encodeURIComponent(key)}/assets/${encodeURIComponent(asset)}`
|
|
162
|
+
);
|
|
55
163
|
}
|
|
56
164
|
/**
|
|
57
165
|
* The ORGANIZER's seat map: physical state, token-authed.
|
|
@@ -111,6 +219,31 @@ var ManageApi = class {
|
|
|
111
219
|
setHoldTtl(key, holdTtlMs) {
|
|
112
220
|
return this.auth(`/v1/events/${encodeURIComponent(key)}/hold-ttl`, { method: "POST", body: { holdTtlMs } });
|
|
113
221
|
}
|
|
222
|
+
// ---- Platform inventory booking history (token) ----
|
|
223
|
+
/** Inventory lifecycle by stable integrator bookingRef. Absent on Managed. */
|
|
224
|
+
bookings(key, query = {}) {
|
|
225
|
+
const params = new URLSearchParams();
|
|
226
|
+
if (query.q) params.set("q", query.q);
|
|
227
|
+
if (query.state) params.set("state", query.state);
|
|
228
|
+
if (query.cursor) params.set("cursor", query.cursor);
|
|
229
|
+
if (query.limit != null) params.set("limit", String(query.limit));
|
|
230
|
+
const qs = params.toString();
|
|
231
|
+
return this.auth(`/v1/events/${encodeURIComponent(key)}/bookings${qs ? `?${qs}` : ""}`);
|
|
232
|
+
}
|
|
233
|
+
/** Exact configured-value snapshot plus book/replay/cancellation audit. */
|
|
234
|
+
booking(key, bookingRef) {
|
|
235
|
+
return this.auth(
|
|
236
|
+
`/v1/events/${encodeURIComponent(key)}/bookings/${encodeURIComponent(bookingRef)}`
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
/** Alias matching the server SDK vocabulary. */
|
|
240
|
+
listBookings(key, query = {}) {
|
|
241
|
+
return this.bookings(key, query);
|
|
242
|
+
}
|
|
243
|
+
/** Alias matching the server SDK vocabulary. */
|
|
244
|
+
retrieveBooking(key, bookingRef) {
|
|
245
|
+
return this.booking(key, bookingRef);
|
|
246
|
+
}
|
|
114
247
|
// ---- availability windows (token) ----
|
|
115
248
|
/** The organizer's current per section/zone availability windows (needs
|
|
116
249
|
* `event:view`). Ids absent from `rules` are open / on sale. */
|
|
@@ -292,10 +425,46 @@ var ManageApi = class {
|
|
|
292
425
|
}
|
|
293
426
|
// ---- reports (token) ----
|
|
294
427
|
report(key) {
|
|
295
|
-
return this.auth(`/v1/events/${encodeURIComponent(key)}/report`);
|
|
428
|
+
return this.auth(`/v1/events/${encodeURIComponent(key)}/report`).then(normalizeReportResult);
|
|
296
429
|
}
|
|
297
430
|
controlRoom(key, windowMinutes = 15) {
|
|
298
|
-
return this.auth(
|
|
431
|
+
return this.auth(
|
|
432
|
+
`/v1/events/${encodeURIComponent(key)}/control-room?window=${windowMinutes}`
|
|
433
|
+
).then(normalizeControlRoomSnapshot);
|
|
434
|
+
}
|
|
435
|
+
/** Allocation beside immutable booking-time channel attribution. */
|
|
436
|
+
channelReport(key) {
|
|
437
|
+
return this.auth(
|
|
438
|
+
`/v1/events/${encodeURIComponent(key)}/channels/report`
|
|
439
|
+
).then(normalizeChannelReportResult);
|
|
440
|
+
}
|
|
441
|
+
createChannelReportLink(key, channelId, input = {}) {
|
|
442
|
+
return this.auth(
|
|
443
|
+
`/v1/events/${encodeURIComponent(key)}/channels/${encodeURIComponent(channelId)}/report-links`,
|
|
444
|
+
{ method: "POST", body: input }
|
|
445
|
+
).then((value) => {
|
|
446
|
+
const reveal = record(value);
|
|
447
|
+
return { ...reveal, link: normalizeChannelReportLink(reveal.link) };
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
channelReportLinks(key, channelId) {
|
|
451
|
+
return this.auth(
|
|
452
|
+
`/v1/events/${encodeURIComponent(key)}/channels/${encodeURIComponent(channelId)}/report-links`
|
|
453
|
+
).then((value) => {
|
|
454
|
+
const result = record(value);
|
|
455
|
+
return {
|
|
456
|
+
links: Array.isArray(result.links) ? result.links.map(normalizeChannelReportLink) : []
|
|
457
|
+
};
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
revokeChannelReportLink(key, channelId, linkId) {
|
|
461
|
+
return this.auth(
|
|
462
|
+
`/v1/events/${encodeURIComponent(key)}/channels/${encodeURIComponent(channelId)}/report-links/${encodeURIComponent(linkId)}`,
|
|
463
|
+
{ method: "DELETE" }
|
|
464
|
+
).then((value) => {
|
|
465
|
+
const result = record(value);
|
|
466
|
+
return { ...result, link: normalizeChannelReportLink(result.link) };
|
|
467
|
+
});
|
|
299
468
|
}
|
|
300
469
|
log(key, opts = {}) {
|
|
301
470
|
const params = new URLSearchParams();
|
|
@@ -320,4 +489,4 @@ export {
|
|
|
320
489
|
ManageApiError,
|
|
321
490
|
ManageApi
|
|
322
491
|
};
|
|
323
|
-
//# sourceMappingURL=chunk-
|
|
492
|
+
//# sourceMappingURL=chunk-H4OJF6LE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/manageApi.ts"],"sourcesContent":["/**\n * Organizer manage-surface client for workers/api (the `/v1/events/:key/*`\n * inventory routes + the public realtime channel). Companion to api.ts (the\n * buyer `/pub/*` client) — kept separate because the manage surface is\n * token-authed (Bearer) and cross-origin from the CMS:\n *\n * - Writes + reports send `Authorization: Bearer <token>` where the token is\n * a short-lived, event-scoped organizer manage token (`mse_…`, minted by\n * NestJS) OR a tenant secret key (`sk_…`). Both are accepted by the worker's\n * `eitherAuth` on block / unblock / unblock-all / unbook / hold-ttl / report\n * / log. The Authorization header also exempts the call from the worker's\n * cookie-CSRF gate, so no extra client header is needed.\n * - `credentials: 'omit'` — there is no session cookie; the CMS runs\n * cross-origin. The worker's credentialed CORS still echoes the CMS origin.\n * - chart geometry and authored media use authenticated organizer Event\n * routes. A manage bearer is not buyer authority and is never sent to\n * `/pub`. The seat STATE reads are private too. `/pub/.../objects` and an unticketed\n * `/pub/.../subscribe` both answer with the BUYER projection, which shows\n * inventory the caller may not buy as a neutral `blocked` — so an organizer\n * reading them sees its own channel allocations as blocked seats. Both now\n * go through the token: `/v1/events/:key/objects` for the snapshot, and a\n * `/v1/events/:key/subscribe-tickets` mint for the socket's scope.\n *\n * `box-book` is intentionally omitted for M1 (box office ships in M2, and the\n * route is still session-only server-side).\n */\nimport type { AvailabilityRule, ChartDoc } from '@seatlayer/core';\nimport type {\n AccessLinkRecord,\n AccessLinkReveal,\n AccessLinkStatusRecord,\n AssignmentResult,\n ChannelAccessIntent,\n ChannelCounts,\n ChannelListResult,\n ChannelRecord,\n ChannelState,\n} from './channelPlan';\n\nexport type { AvailabilityRule } from '@seatlayer/core';\n\n/** One page of the organizer-only label → channel projection. */\nexport interface ChannelAllocationPage {\n assignmentVersion: number;\n allocations: Array<{ label: string; channelId: string }>;\n nextAfterLabel: string | null;\n}\n\nexport interface ChannelAuditEntry {\n id: number;\n at: number;\n actor: string | null;\n action: string;\n channelId: string | null;\n assignmentVersion: number;\n before: unknown;\n after: unknown;\n reason: string | null;\n}\n\nexport interface ChannelAuditPage {\n entries: ChannelAuditEntry[];\n nextBefore: number | null;\n}\n\n/**\n * Buyer projection for a preview audience — the same scoped server view the\n * buyer SDK receives. When an audience cannot be previewed (a paused or\n * archived channel), the server answers `{available:false, unavailable:[…]}`\n * and the UI shows the real paused/unavailable landing state instead of\n * rendering those seats as eligible.\n *\n * Fields stay optional: a worker that predates the hardening merge 404s here,\n * and Channels mode says the preview needs a newer server rather than faking a\n * projection client-side.\n */\nexport interface ChannelPreviewProjection {\n available?: boolean;\n unavailable?: Array<{ channelId: string; state: 'paused' | 'archived' | string }>;\n channelIds?: string[];\n includePublic?: boolean;\n /** Labels this audience may buy. Everything else renders as ONE neutral\n * unavailable state so preview never leaks which channel holds a seat. */\n eligible?: string[];\n counts?: { eligible?: number; free?: number; held?: number; booked?: number };\n}\n\nexport class ManageApiError extends Error {\n status: number;\n code?: string;\n /** Present when a block/unbook 409s because seats were just taken. */\n conflicts?: { label: string; reason?: string }[];\n /**\n * Structured refusal detail. The channel routes use it for the two 409s a UI\n * must render rather than merely report: `channel_archive_blocked_by_holds`\n * carries {activeHolds, heldUnits, latestHoldExpiresAt, retryAfterMs}, and\n * `channel_assignment_conflict` carries the current assignmentVersion.\n */\n details?: Record<string, unknown>;\n /**\n * The server's own human sentence, when it sent one. `message` is the machine\n * code (that is what `error` carries), so a UI that wants to state a PLATFORM\n * RULE — \"redemptions must be between 1 and 10 000\" — reads this instead of\n * re-encoding the bound locally and risking disagreement with the server.\n */\n serverMessage?: string;\n\n constructor(\n status: number,\n message: string,\n code?: string,\n conflicts?: { label: string; reason?: string }[],\n details?: Record<string, unknown>,\n serverMessage?: string,\n ) {\n super(message);\n this.name = 'ManageApiError';\n this.status = status;\n this.code = code;\n this.conflicts = conflicts;\n this.details = details;\n this.serverMessage = serverMessage;\n }\n}\n\nexport interface ReportByStatus {\n free: number;\n held: number;\n booked: number;\n not_for_sale: number;\n}\n\nexport interface ReportCategoryRow {\n category: string;\n total: number;\n free: number;\n held: number;\n booked: number;\n not_for_sale: number;\n /** Configured-price snapshots for booked inventory; not proof of payment. */\n bookedValue: number;\n /** @deprecated Use `bookedValue`. */\n bookedRevenue: number;\n}\n\nexport interface ReportCategoryMeta {\n key: string;\n label: string;\n color: string;\n price: number;\n}\n\nexport interface ReportResult {\n report: { byStatus: ReportByStatus; byCategory: ReportCategoryRow[]; bySection?: ControlRoomSectionMetric[] };\n event: { key: string; name: string; seatTotal: number; currency?: string };\n categories: ReportCategoryMeta[];\n}\n\nexport interface ControlRoomSectionMetric {\n sectionId: string;\n sectionLabel: string;\n zoneId: string | null;\n total: number;\n free: number;\n held: number;\n booked: number;\n not_for_sale: number;\n bookedValue: number;\n /** @deprecated Use `bookedValue`. */\n bookedRevenue: number;\n}\n\n/** Recent seat-state change safe for an event:view control-room grant. Full\n * audit references remain available only through the event:reports log API. */\nexport interface ControlRoomActivityEntry {\n id: number;\n at: number;\n action: string;\n labels: string[];\n}\n\nexport interface ControlRoomSnapshot {\n version: number;\n currency: string;\n totals: { free: number; held: number; booked: number; blocked: number };\n /** Configured value attached to booked inventory, never payment revenue. */\n bookedValue: { gross: number; bySection: ControlRoomSectionMetric[] };\n /** @deprecated Use `bookedValue`. */\n revenue: { gross: number; bySection: ControlRoomSectionMetric[] };\n velocity: {\n windowMinutes: number;\n bySection: Array<{\n sectionId: string;\n netBooked: number;\n bookedValue: number;\n /** @deprecated Use `bookedValue`. */\n grossRevenue: number;\n previousNetBooked: number;\n trend: 'rising' | 'steady' | 'cooling';\n }>;\n };\n presence: { shoppingSessions: number; activeHolds: number };\n /** Present on workers that support reload-safe activity hydration. */\n activity?: ControlRoomActivityEntry[];\n event: { key: string; name: string; seatTotal: number; currency?: string };\n}\n\nexport interface LogEntry {\n id: number;\n at: number;\n action: string;\n labels: string[];\n ref: string | null;\n}\n\nexport interface LogPage {\n entries: LogEntry[];\n nextBefore: number | null;\n}\n\n/** Platform/SDK inventory history — deliberately unrelated to commerce Orders. */\nexport type InventoryBookingState = 'booked' | 'partially_cancelled' | 'cancelled';\n\nexport interface InventoryBookingObject {\n label: string;\n objectId: string;\n objectType: 'seat' | 'booth' | 'ga' | 'table';\n categoryKey: string;\n sectionId: string | null;\n sectionLabel: string | null;\n zoneId: string | null;\n tierId: string | null;\n releaseId: string | null;\n bookingMode: 'individual' | 'whole' | 'variable';\n quantity: number;\n /** Event-configured price snapshot; not proof of what a buyer paid. */\n unitPrice: number;\n configuredValue: number;\n currency: string;\n channelId: string | null;\n channelExternalRef: string | null;\n source: string;\n state: 'booked' | 'cancelled';\n bookedAt: number;\n cancelledAt: number | null;\n}\n\nexport interface InventoryBooking {\n eventKey: string;\n eventMode: 'live' | 'test';\n bookingRef: string;\n state: InventoryBookingState;\n bookedAt: number;\n updatedAt: number;\n cancelledAt: number | null;\n source: string;\n bookedBy: string | null;\n lastActor: string | null;\n lastSource: string;\n labels: string[];\n objects: InventoryBookingObject[];\n quantity: number;\n activeQuantity: number;\n configuredValue: number;\n activeConfiguredValue: number;\n currency: string | null;\n}\n\nexport interface InventoryBookingsQuery {\n q?: string;\n state?: InventoryBookingState | null;\n cursor?: string | null;\n limit?: number;\n}\n\nexport interface InventoryBookingsPage {\n bookings: InventoryBooking[];\n nextCursor: string | null;\n}\n\nexport interface InventoryBookingActivity {\n id: number;\n action: 'book' | 'replay' | 'partial_cancel' | 'cancel' | 'reconcile';\n at: number;\n labels: string[];\n actor: string | null;\n source: string;\n}\n\nexport interface InventoryBookingDetail {\n booking: InventoryBooking;\n activity: InventoryBookingActivity[];\n activityTruncated: boolean;\n}\n\n/** Booking-time facts attached to the channel that produced the inventory move. */\nexport interface ChannelAttribution {\n sold: number;\n units: number;\n bookedValue: number | null;\n /** @deprecated Use `bookedValue`. */\n revenue: number | null;\n}\n\nexport interface ChannelReportRow {\n channelId: string;\n name: string;\n externalRef: string | null;\n state: ChannelState;\n allocation: ChannelCounts;\n attribution: ChannelAttribution;\n sellThrough: number | null;\n}\n\nexport interface ChannelReport {\n assignmentVersion: number;\n includesBookedValue: boolean;\n /** @deprecated Use `includesBookedValue`. */\n includesRevenue: boolean;\n methodology: { allocation: string; attribution: string; sellThrough: string };\n rows: ChannelReportRow[];\n totals: {\n allocated: number;\n free: number;\n held: number;\n booked: number;\n blocked: number;\n sold: number;\n bookedValue: number | null;\n /** @deprecated Use `bookedValue`. */\n revenue: number | null;\n };\n}\n\nexport interface ChannelReportResult {\n report: ChannelReport;\n event: { key: string; name: string; seatTotal?: number; currency?: string };\n}\n\nexport interface ChannelReportLinkRecord {\n id: string;\n channelId: string;\n label: string | null;\n includesBookedValue: boolean;\n /** @deprecated Use `includesBookedValue`. */\n includesRevenue: boolean;\n expiresAt: number;\n state: 'active' | 'revoked';\n status: 'active' | 'revoked' | 'expired';\n views: number;\n lastViewedAt: number | null;\n createdAt: number;\n createdBy: string | null;\n revokedAt: number | null;\n}\n\nexport interface ChannelReportLinkReveal {\n link: ChannelReportLinkRecord;\n url: string;\n capability: string;\n revealedOnce: true;\n}\n\n/**\n * A one-use WebSocket subscribe ticket. `protocols` is exactly what to hand\n * `new WebSocket(url, protocols)` — the ticket rides in `Sec-WebSocket-Protocol`\n * because a browser socket cannot carry an Authorization header and a bearer\n * must never travel in a URL.\n */\nexport interface SubscribeTicket {\n ticket: string;\n expiresAt: number;\n protocol: string;\n protocols: string[];\n}\n\nexport interface PubObjectsResult {\n /** Every non-free seat's status keyed by label (free seats omitted). */\n seats: Record<string, string>;\n hidden?: string[];\n closed?: string[];\n updatedAt: number;\n}\n\nexport interface PubChartResult {\n event: {\n key: string;\n name: string;\n status?: string;\n venue?: string | null;\n startsAt?: number | null;\n currency?: string;\n mode?: string;\n };\n doc: ChartDoc;\n}\n\nasync function parse<T>(res: Response): Promise<T> {\n const isJson = (res.headers.get('content-type') ?? '').includes('application/json');\n const data = isJson ? await res.json().catch(() => null) : null;\n if (!res.ok) {\n const err = data as {\n error?: string;\n code?: string;\n conflicts?: { label: string; reason?: string }[];\n details?: Record<string, unknown>;\n message?: string;\n } | null;\n throw new ManageApiError(\n res.status,\n err?.error ?? `request_failed_${res.status}`,\n err?.code,\n err?.conflicts,\n err?.details,\n typeof err?.message === 'string' ? err.message : undefined,\n );\n }\n return data as T;\n}\n\ntype UnknownRecord = Record<string, unknown>;\n\nfunction record(value: unknown): UnknownRecord {\n return value && typeof value === 'object' ? value as UnknownRecord : {};\n}\n\nfunction finite(primary: unknown, legacy: unknown, fallback = 0): number {\n if (typeof primary === 'number' && Number.isFinite(primary)) return primary;\n if (typeof legacy === 'number' && Number.isFinite(legacy)) return legacy;\n return fallback;\n}\n\nfunction nullableFinite(primary: unknown, legacy: unknown): number | null {\n // `null` is an authorization-safe canonical answer (for example, a channel\n // viewer may see counts but not configured booked value). Fall back only\n // when the canonical field is genuinely absent during a rolling upgrade.\n if (primary === null) return null;\n if (typeof primary === 'number' && Number.isFinite(primary)) return primary;\n if (primary !== undefined) return null;\n if (typeof legacy === 'number' && Number.isFinite(legacy)) return legacy;\n return null;\n}\n\nfunction normalizeSection(value: unknown): ControlRoomSectionMetric {\n const row = record(value);\n const bookedValue = finite(row.bookedValue, row.bookedRevenue);\n return { ...row, bookedValue, bookedRevenue: bookedValue } as unknown as ControlRoomSectionMetric;\n}\n\nfunction normalizeReportResult(value: unknown): ReportResult {\n const source = record(value);\n const report = record(source.report);\n const byCategory = Array.isArray(report.byCategory)\n ? report.byCategory.map((value) => {\n const row = record(value);\n const bookedValue = finite(row.bookedValue, row.bookedRevenue);\n return { ...row, bookedValue, bookedRevenue: bookedValue } as unknown as ReportCategoryRow;\n })\n : [];\n const bySection = Array.isArray(report.bySection)\n ? report.bySection.map(normalizeSection)\n : undefined;\n return {\n ...source,\n report: { ...report, byCategory, ...(bySection ? { bySection } : {}) },\n } as unknown as ReportResult;\n}\n\nfunction normalizeControlRoomSnapshot(value: unknown): ControlRoomSnapshot {\n const source = record(value);\n const canonical = record(source.bookedValue);\n const legacy = record(source.revenue);\n const selected = Object.keys(canonical).length ? canonical : legacy;\n const bySectionSource = Array.isArray(canonical.bySection)\n ? canonical.bySection\n : Array.isArray(legacy.bySection) ? legacy.bySection : [];\n const bookedValue = {\n ...selected,\n gross: finite(canonical.gross, legacy.gross),\n bySection: bySectionSource.map(normalizeSection),\n };\n const velocity = record(source.velocity);\n const velocityRows = Array.isArray(velocity.bySection)\n ? velocity.bySection.map((value) => {\n const row = record(value);\n const rowValue = finite(row.bookedValue, row.grossRevenue);\n return { ...row, bookedValue: rowValue, grossRevenue: rowValue };\n })\n : [];\n return {\n ...source,\n bookedValue,\n revenue: bookedValue,\n velocity: { ...velocity, bySection: velocityRows },\n } as unknown as ControlRoomSnapshot;\n}\n\nfunction normalizeChannelReportResult(value: unknown): ChannelReportResult {\n const source = record(value);\n const report = record(source.report);\n const includesBookedValue = typeof report.includesBookedValue === 'boolean'\n ? report.includesBookedValue\n : report.includesRevenue === true;\n const rows = Array.isArray(report.rows) ? report.rows.map((value) => {\n const row = record(value);\n const attribution = record(row.attribution);\n const bookedValue = nullableFinite(attribution.bookedValue, attribution.revenue);\n return {\n ...row,\n attribution: { ...attribution, bookedValue, revenue: bookedValue },\n };\n }) : [];\n const totals = record(report.totals);\n const totalBookedValue = nullableFinite(totals.bookedValue, totals.revenue);\n return {\n ...source,\n report: {\n ...report,\n includesBookedValue,\n includesRevenue: includesBookedValue,\n rows,\n totals: { ...totals, bookedValue: totalBookedValue, revenue: totalBookedValue },\n },\n } as unknown as ChannelReportResult;\n}\n\nfunction normalizeChannelReportLink(value: unknown): ChannelReportLinkRecord {\n const link = record(value);\n const includesBookedValue = typeof link.includesBookedValue === 'boolean'\n ? link.includesBookedValue\n : link.includesRevenue === true;\n return {\n ...link,\n includesBookedValue,\n includesRevenue: includesBookedValue,\n } as unknown as ChannelReportLinkRecord;\n}\n\n/**\n * Bound to one apiBase + one event-scoped token. Rebuild (or `setToken`) when a\n * token is re-minted on 401.\n */\nexport class ManageApi {\n private base: string;\n private token: string;\n\n constructor(apiBase: string, token: string) {\n this.base = apiBase.replace(/\\/+$/, '');\n this.token = token;\n }\n\n /** Swap the Bearer token in place (SeatManager re-mints on 401). */\n setToken(token: string): void {\n this.token = token;\n }\n\n private auth<T>(\n path: string,\n init: { method?: 'GET' | 'POST' | 'PATCH' | 'DELETE'; body?: unknown } = {},\n ): Promise<T> {\n const method = init.method ?? 'GET';\n const headers: Record<string, string> = { Authorization: `Bearer ${this.token}` };\n let body: string | undefined;\n if (init.body !== undefined) {\n headers['Content-Type'] = 'application/json';\n body = JSON.stringify(init.body);\n }\n return fetch(`${this.base}${path}`, { method, headers, body, credentials: 'omit' }).then((r) => parse<T>(r));\n }\n\n private async authBlob(path: string): Promise<Blob> {\n const res = await fetch(`${this.base}${path}`, {\n method: 'GET',\n headers: { Authorization: `Bearer ${this.token}` },\n credentials: 'omit',\n });\n if (!res.ok) await parse<never>(res);\n return res.blob();\n }\n\n // ---- realtime read ----\n\n /** Event-pinned organizer geometry. A manage token is never sent to `/pub`. */\n chart(key: string): Promise<PubChartResult> {\n return this.auth(`/v1/events/${encodeURIComponent(key)}/chart`);\n }\n\n /** Authenticated bytes for an Event-scoped organizer chart asset. */\n asset(key: string, asset: string): Promise<Blob> {\n if (!/^[a-zA-Z0-9._-]+$/.test(asset)) {\n return Promise.reject(new ManageApiError(404, 'not_found', 'not_found'));\n }\n return this.authBlob(\n `/v1/events/${encodeURIComponent(key)}/assets/${encodeURIComponent(asset)}`,\n );\n }\n\n /**\n * The ORGANIZER's seat map: physical state, token-authed.\n *\n * This used to read `/pub/events/:key/objects` with no credential, which\n * answers with the BUYER projection — every unit the caller may not buy\n * collapses to a neutral `blocked`. An anonymous caller may buy only Public\n * sale inventory, so the cockpit rendered every channel-allocated seat as\n * blocked and then computed its KPIs, sell-through and (worse) its\n * block/unblock target sets from that. `/v1/events/:key/objects` returns the\n * unprojected snapshot the control-room read model already trusts.\n */\n objects(key: string): Promise<PubObjectsResult> {\n return this.auth(`/v1/events/${encodeURIComponent(key)}/objects`);\n }\n\n /**\n * Exchange the manage token for a one-use organizer socket ticket.\n *\n * A browser `WebSocket` cannot send an Authorization header, so the socket's\n * scope is established here, over ordinary HTTPS. Without it the DO treats a\n * manager socket as an anonymous public buyer and projects its deltas — so a\n * hold inside a private allocation is structurally suppressed and the map\n * drifts away from the truth `objects()` just established.\n *\n * Tickets are single-redemption and expire in ~30s: mint one per connect.\n */\n subscribeTicket(key: string): Promise<SubscribeTicket> {\n return this.auth(`/v1/events/${encodeURIComponent(key)}/subscribe-tickets`, { method: 'POST' });\n }\n\n socketUrl(key: string): string {\n return `${this.base.replace(/^http/, 'ws')}/pub/events/${encodeURIComponent(key)}/subscribe?surface=manager`;\n }\n\n // ---- inventory writes (token) ----\n\n /** Take FREE seats off sale in one batched call. Optional `releaseAt` (epoch\n * ms, future) auto-returns them to sale; `reason` tags the block (M3 uses it).\n * Throws ManageApiError 409 (conflicts) if any seat was just taken. */\n block(\n key: string,\n labels: string[],\n opts: { releaseAt?: number; reason?: string } = {},\n ): Promise<{ ok: true; blocked: string[] }> {\n const body: Record<string, unknown> = { labels };\n if (typeof opts.releaseAt === 'number') body.releaseAt = opts.releaseAt;\n if (opts.reason) body.reason = opts.reason;\n return this.auth(`/v1/events/${encodeURIComponent(key)}/block`, { method: 'POST', body });\n }\n\n /** Return specific blocked seats to sale (one batched call). */\n unblock(key: string, labels: string[]): Promise<{ ok: true; unblocked: string[] }> {\n return this.auth(`/v1/events/${encodeURIComponent(key)}/unblock`, { method: 'POST', body: { labels } });\n }\n\n /** Return every blocked seat to sale; resolves with the freed count. */\n unblockAll(key: string): Promise<{ ok: true; freed: number }> {\n return this.auth(`/v1/events/${encodeURIComponent(key)}/unblock-all`, { method: 'POST' });\n }\n\n /** Cancel bookings — return BOOKED seats to free (credit not refunded).\n * Guarded by the original booking reference. */\n unbook(key: string, labels: string[], bookingRef: string): Promise<{ ok: true; unbooked: string[] }> {\n return this.auth(`/v1/events/${encodeURIComponent(key)}/unbook`, { method: 'POST', body: { labels, bookingRef } });\n }\n\n /** Set (ms, clamped 1–60 min server-side) or clear (null) the hold TTL. */\n setHoldTtl(key: string, holdTtlMs: number | null): Promise<{ ok: true; holdTtlMs: number | null }> {\n return this.auth(`/v1/events/${encodeURIComponent(key)}/hold-ttl`, { method: 'POST', body: { holdTtlMs } });\n }\n\n // ---- Platform inventory booking history (token) ----\n\n /** Inventory lifecycle by stable integrator bookingRef. Absent on Managed. */\n bookings(key: string, query: InventoryBookingsQuery = {}): Promise<InventoryBookingsPage> {\n const params = new URLSearchParams();\n if (query.q) params.set('q', query.q);\n if (query.state) params.set('state', query.state);\n if (query.cursor) params.set('cursor', query.cursor);\n if (query.limit != null) params.set('limit', String(query.limit));\n const qs = params.toString();\n return this.auth(`/v1/events/${encodeURIComponent(key)}/bookings${qs ? `?${qs}` : ''}`);\n }\n\n /** Exact configured-value snapshot plus book/replay/cancellation audit. */\n booking(key: string, bookingRef: string): Promise<InventoryBookingDetail> {\n return this.auth(\n `/v1/events/${encodeURIComponent(key)}/bookings/${encodeURIComponent(bookingRef)}`,\n );\n }\n\n /** Alias matching the server SDK vocabulary. */\n listBookings(key: string, query: InventoryBookingsQuery = {}): Promise<InventoryBookingsPage> {\n return this.bookings(key, query);\n }\n\n /** Alias matching the server SDK vocabulary. */\n retrieveBooking(key: string, bookingRef: string): Promise<InventoryBookingDetail> {\n return this.booking(key, bookingRef);\n }\n\n // ---- availability windows (token) ----\n\n /** The organizer's current per section/zone availability windows (needs\n * `event:view`). Ids absent from `rules` are open / on sale. */\n availability(key: string): Promise<{ rules: Record<string, AvailabilityRule> }> {\n return this.auth(`/v1/events/${encodeURIComponent(key)}/availability`);\n }\n\n /** Replace the availability windows for a set of section/zone ids (needs\n * `event:block`). Ids absent from `rules` become open / on sale; a zone rule\n * cascades to its sections. The worker derives each id's seat labels, so\n * `labels` on the sent rules is best-effort. Resolves with the authoritative\n * effective `hidden` set (a due rule may fire at once) and the server-cleaned\n * `rules` map (fired timed/threshold windows dropped). */\n setAvailability(\n key: string,\n rules: Record<string, AvailabilityRule>,\n ): Promise<{ ok: true; hidden: string[]; rules: Record<string, AvailabilityRule> }> {\n return this.auth(`/v1/events/${encodeURIComponent(key)}/availability`, { method: 'POST', body: { rules } });\n }\n\n // ---- sales channels (token, capability-gated) ----\n // Reads need `event:channels:view`, mutations `event:channels:manage`.\n // `event:block` grants NEITHER (spec §10), so a Block-only cockpit token gets\n // a 403 here and Channels mode never renders.\n\n /** Allocation list with exact per-channel counts. `includeArchived` adds the\n * read-only archived rows behind the rail's \"Show archived\" control. */\n channels(key: string, opts: { includeArchived?: boolean } = {}): Promise<ChannelListResult> {\n const qs = opts.includeArchived ? '?includeArchived=1' : '';\n return this.auth(`/v1/events/${encodeURIComponent(key)}/channels${qs}`);\n }\n\n /** One page of the label → channel map that paints the allocation overlay.\n * Paged by label; follow `nextAfterLabel` until it is null. */\n channelAllocation(\n key: string,\n opts: { afterLabel?: string; limit?: number } = {},\n ): Promise<ChannelAllocationPage> {\n const params = new URLSearchParams();\n if (opts.afterLabel) params.set('afterLabel', opts.afterLabel);\n if (opts.limit != null) params.set('limit', String(opts.limit));\n const qs = params.toString();\n return this.auth(`/v1/events/${encodeURIComponent(key)}/channels/allocation${qs ? `?${qs}` : ''}`);\n }\n\n channelAudit(key: string, opts: { limit?: number; before?: number } = {}): Promise<ChannelAuditPage> {\n const params = new URLSearchParams();\n if (opts.limit != null) params.set('limit', String(opts.limit));\n if (opts.before != null) params.set('before', String(opts.before));\n const qs = params.toString();\n return this.auth(`/v1/events/${encodeURIComponent(key)}/channels/audit${qs ? `?${qs}` : ''}`);\n }\n\n createChannel(\n key: string,\n input: { name: string; color?: string | null; marker?: string | null; externalRef?: string | null },\n ): Promise<{ ok: true; channel: ChannelRecord }> {\n return this.auth(`/v1/events/${encodeURIComponent(key)}/channels`, { method: 'POST', body: input });\n }\n\n renameChannel(key: string, channelId: string, name: string): Promise<{ ok: true; channel: ChannelRecord }> {\n return this.auth(`/v1/events/${encodeURIComponent(key)}/channels/${encodeURIComponent(channelId)}`, {\n method: 'PATCH', body: { name },\n });\n }\n\n setChannelPaused(key: string, channelId: string, paused: boolean): Promise<{ ok: true; channel: ChannelRecord }> {\n const path = paused ? 'pause' : 'unpause';\n return this.auth(\n `/v1/events/${encodeURIComponent(key)}/channels/${encodeURIComponent(channelId)}/${path}`,\n { method: 'POST', body: {} },\n );\n }\n\n /** Archive with a mandatory destination for the remaining allocation.\n * Throws ManageApiError 409 `channel_archive_blocked_by_holds` while any hold\n * is live; `err.details` carries the exact counts + retry window. */\n archiveChannel(\n key: string,\n channelId: string,\n destination: string | null,\n ): Promise<{ ok: true; channel: ChannelRecord; assignmentVersion: number; moved: number }> {\n return this.auth(\n `/v1/events/${encodeURIComponent(key)}/channels/${encodeURIComponent(channelId)}/archive`,\n { method: 'POST', body: { destination } },\n );\n }\n\n /**\n * Versioned Apply. A stale `assignmentVersion` mutates NOTHING and throws\n * ManageApiError 409 `channel_assignment_conflict` — the caller keeps its\n * selection and offers \"Refresh and review\". There is no dry-run: the review\n * sheet previews locally, this call returns the authoritative buckets.\n */\n applyChannelAssignment(\n key: string,\n input: { targetChannelId: string | null; labels: string[]; assignmentVersion: number },\n ): Promise<AssignmentResult> {\n return this.auth(`/v1/events/${encodeURIComponent(key)}/channels/assignments`, {\n method: 'POST',\n body: {\n targetChannelId: input.targetChannelId || null,\n labels: input.labels,\n assignmentVersion: input.assignmentVersion,\n },\n });\n }\n\n /**\n * Read-only buyer projection for an audience (§8.6) — the SAME scoped server\n * view the buyer SDK receives, never a local approximation.\n *\n * Ships on the access-hardening branch. Older workers 404/405 here; callers\n * MUST feature-detect and quietly say the preview needs a newer server rather\n * than faking a projection client-side.\n */\n channelPreview(\n key: string,\n channelIds: string[],\n opts: { includePublic?: boolean } = {},\n ): Promise<ChannelPreviewProjection> {\n const params = new URLSearchParams();\n if (channelIds.length) params.set('channelIds', channelIds.join(','));\n if (opts.includePublic != null) params.set('includePublic', opts.includePublic ? '1' : '0');\n const qs = params.toString();\n return this.auth(`/v1/events/${encodeURIComponent(key)}/channels/preview${qs ? `?${qs}` : ''}`);\n }\n\n /**\n * Choose which sale route this channel opens.\n *\n * Since the server's 2026-08-06 change this is AUTHORIZATION, not a label:\n * exactly one of the four routes may mint buyer access for the channel and the\n * other three refuse with 409 `channel_access_intent_forbids`. The default is\n * `none`, which refuses all four — so a route has to be declared before any\n * buyer-facing action on the channel can succeed.\n *\n * Switching the route while buyers are already inside the current one is\n * refused with 409 `channel_intent_switch_blocked`, whose `details` name what\n * is live (`liveAccessLinks`, `activeSessions`). Retry with\n * `acknowledgeLiveAccess: true`: hosted links on the channel are revoked,\n * while sessions already minted keep their holds and drain on their own.\n * `intentSwitch` is present on the response ONLY when the switch disturbed\n * something, so the ordinary case stays the two-key body it has always been.\n */\n setChannelAccessIntent(\n key: string,\n channelId: string,\n accessIntent: ChannelAccessIntent,\n opts: { acknowledgeLiveAccess?: boolean; reason?: string } = {},\n ): Promise<{\n ok: true;\n channel: ChannelRecord;\n intentSwitch?: { closedLinks: number; keptSessions: number };\n }> {\n return this.auth(`/v1/events/${encodeURIComponent(key)}/channels/${encodeURIComponent(channelId)}`, {\n method: 'PATCH',\n body: {\n accessIntent,\n ...(opts.acknowledgeLiveAccess ? { acknowledgeLiveAccess: true } : {}),\n ...(opts.reason ? { reason: opts.reason } : {}),\n },\n });\n }\n\n // ---- hosted access links (M8) ----\n\n /**\n * Mint a hosted access link. The 201 is the ONE and ONLY time `url` and\n * `capability` exist outside the buyer's browser — SeatLayer keeps a hash, so\n * there is no route, cache, or support escalation that can produce this string\n * again. Callers must reveal it immediately and then let it go.\n *\n * Every omitted field takes the server's default: expiry = when the event\n * starts, 100 redemptions, 4 seats per buyer, this channel's allocation only.\n * Platform bounds are enforced server-side and reported as 422 with the rule\n * spelled out in `ManageApiError.serverMessage`.\n *\n * NOT a side effect any more. This used to SET the channel's access intent to\n * `hosted_link`; since 2026-08-06 it REQUIRES it, and a channel declaring any\n * other route refuses with 409 `channel_access_intent_forbids`. Callers must\n * declare the route first — `ChannelsMode` does exactly that before it\n * creates, so a first buyer link on a fresh channel is still one gesture.\n */\n createAccessLink(\n key: string,\n channelId: string,\n input: {\n label?: string | null;\n /** Absolute epoch ms. Omit for \"when the event starts\". */\n expiresAt?: number;\n maxRedemptions?: number;\n maxQuantity?: number;\n includePublic?: boolean;\n } = {},\n ): Promise<AccessLinkReveal> {\n return this.auth(\n `/v1/events/${encodeURIComponent(key)}/channels/${encodeURIComponent(channelId)}/access-links`,\n { method: 'POST', body: input },\n );\n }\n\n /** Status only — label, expiry, redemptions, per-buyer cap, lineage, and the\n * live session count. Never the url, never the capability. Needs `:view`. */\n accessLinks(key: string, channelId: string): Promise<{ links: AccessLinkStatusRecord[] }> {\n return this.auth(\n `/v1/events/${encodeURIComponent(key)}/channels/${encodeURIComponent(channelId)}/access-links`,\n );\n }\n\n /**\n * Rotate — the ONLY recovery for a link nobody kept. The old URL stops opening\n * immediately and the response is a fresh one-time reveal.\n *\n * `endActiveSessions` is REQUIRED, not defaulted: the organizer must say\n * whether buyers already inside finish their checkout or lose access now. The\n * server answers 422 `end_active_sessions_required` if it is omitted, and that\n * refusal is correct — a UI must not pick either branch on their behalf.\n */\n rotateAccessLink(\n key: string,\n channelId: string,\n linkId: string,\n endActiveSessions: boolean,\n ): Promise<AccessLinkReveal & { previous: AccessLinkRecord; endedSessions: number }> {\n return this.auth(\n `/v1/events/${encodeURIComponent(key)}/channels/${encodeURIComponent(channelId)}`\n + `/access-links/${encodeURIComponent(linkId)}/rotate`,\n { method: 'POST', body: { endActiveSessions } },\n );\n }\n\n /** Revoke. The link stops opening immediately; `endActiveSessions` decides\n * whether the buyers already inside keep their sessions. */\n revokeAccessLink(\n key: string,\n channelId: string,\n linkId: string,\n endActiveSessions = false,\n ): Promise<{ ok: true; link: AccessLinkRecord; endedSessions: number }> {\n const qs = endActiveSessions ? '?endActiveSessions=1' : '';\n return this.auth(\n `/v1/events/${encodeURIComponent(key)}/channels/${encodeURIComponent(channelId)}`\n + `/access-links/${encodeURIComponent(linkId)}${qs}`,\n { method: 'DELETE' },\n );\n }\n\n // ---- reports (token) ----\n\n report(key: string): Promise<ReportResult> {\n return this.auth<unknown>(`/v1/events/${encodeURIComponent(key)}/report`).then(normalizeReportResult);\n }\n\n controlRoom(key: string, windowMinutes = 15): Promise<ControlRoomSnapshot> {\n return this.auth<unknown>(\n `/v1/events/${encodeURIComponent(key)}/control-room?window=${windowMinutes}`,\n ).then(normalizeControlRoomSnapshot);\n }\n\n /** Allocation beside immutable booking-time channel attribution. */\n channelReport(key: string): Promise<ChannelReportResult> {\n return this.auth<unknown>(\n `/v1/events/${encodeURIComponent(key)}/channels/report`,\n ).then(normalizeChannelReportResult);\n }\n\n createChannelReportLink(\n key: string,\n channelId: string,\n input: {\n label?: string;\n includesBookedValue?: boolean;\n /** @deprecated Use `includesBookedValue`. */\n includesRevenue?: boolean;\n expiresAt?: number;\n } = {},\n ): Promise<ChannelReportLinkReveal> {\n return this.auth<unknown>(\n `/v1/events/${encodeURIComponent(key)}/channels/${encodeURIComponent(channelId)}/report-links`,\n { method: 'POST', body: input },\n ).then((value) => {\n const reveal = record(value);\n return { ...reveal, link: normalizeChannelReportLink(reveal.link) } as unknown as ChannelReportLinkReveal;\n });\n }\n\n channelReportLinks(key: string, channelId: string): Promise<{ links: ChannelReportLinkRecord[] }> {\n return this.auth<unknown>(\n `/v1/events/${encodeURIComponent(key)}/channels/${encodeURIComponent(channelId)}/report-links`,\n ).then((value) => {\n const result = record(value);\n return {\n links: Array.isArray(result.links) ? result.links.map(normalizeChannelReportLink) : [],\n };\n });\n }\n\n revokeChannelReportLink(\n key: string,\n channelId: string,\n linkId: string,\n ): Promise<{ ok: true; link: ChannelReportLinkRecord }> {\n return this.auth<unknown>(\n `/v1/events/${encodeURIComponent(key)}/channels/${encodeURIComponent(channelId)}`\n + `/report-links/${encodeURIComponent(linkId)}`,\n { method: 'DELETE' },\n ).then((value) => {\n const result = record(value);\n return { ...result, link: normalizeChannelReportLink(result.link) } as unknown as {\n ok: true; link: ChannelReportLinkRecord;\n };\n });\n }\n\n log(key: string, opts: { limit?: number; before?: number } = {}): Promise<LogPage> {\n const params = new URLSearchParams();\n if (opts.limit != null) params.set('limit', String(opts.limit));\n if (opts.before != null) params.set('before', String(opts.before));\n const qs = params.toString();\n return this.auth(`/v1/events/${encodeURIComponent(key)}/log${qs ? `?${qs}` : ''}`);\n }\n\n /** CSV report as a Blob (Bearer auth can't ride a plain <a href>). Host builds\n * an object URL for download. */\n async reportCsv(key: string): Promise<Blob> {\n const res = await fetch(`${this.base}/v1/events/${encodeURIComponent(key)}/report.csv`, {\n headers: { Authorization: `Bearer ${this.token}` },\n credentials: 'omit',\n });\n if (!res.ok) throw new ManageApiError(res.status, `request_failed_${res.status}`);\n return res.blob();\n }\n}\n"],"mappings":";AAuFO,IAAM,iBAAN,cAA6B,MAAM;AAAA,EAoBxC,YACE,QACA,SACA,MACA,WACA,SACA,eAC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
@@ -3195,4 +3195,4 @@ export {
|
|
|
3195
3195
|
bucketRowsHtml,
|
|
3196
3196
|
ChannelsMode
|
|
3197
3197
|
};
|
|
3198
|
-
//# sourceMappingURL=chunk-
|
|
3198
|
+
//# sourceMappingURL=chunk-KNMZQZXR.js.map
|