@seatlayer/js 0.36.1 → 0.36.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +717 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +330 -9
- package/dist/index.d.ts +330 -9
- package/dist/index.js +710 -37
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -605,7 +605,7 @@ interface RealtimeSink {
|
|
|
605
605
|
activeHolds: number;
|
|
606
606
|
}): void;
|
|
607
607
|
}
|
|
608
|
-
interface SubscribeTicket {
|
|
608
|
+
interface SubscribeTicket$1 {
|
|
609
609
|
ticket?: string;
|
|
610
610
|
/** Exactly what to hand `new WebSocket(url, protocols)`, per protocol doc §3. */
|
|
611
611
|
protocols?: string[];
|
|
@@ -616,7 +616,7 @@ interface BuyerRealtimeOptions {
|
|
|
616
616
|
sink: RealtimeSink;
|
|
617
617
|
/** Mint a one-use ticket for THIS connection attempt. Returns null for the
|
|
618
618
|
* anonymous public case (no ticket needed). Throwing stops the client. */
|
|
619
|
-
mintTicket?: () => Promise<SubscribeTicket | null>;
|
|
619
|
+
mintTicket?: () => Promise<SubscribeTicket$1 | null>;
|
|
620
620
|
/** Typed access states. 4401 arrives here as `revoked`. */
|
|
621
621
|
onAccessUnavailable?: (event: BuyerAccessUnavailableEvent) => void;
|
|
622
622
|
/** Test seam. Defaults to the global WebSocket. */
|
|
@@ -1830,9 +1830,23 @@ declare function attachPickerFrame(iframe: HTMLIFrameElement, opts?: AttachPicke
|
|
|
1830
1830
|
*
|
|
1831
1831
|
* Spec: sales-channels-product-ux-spec §8.4–8.5.
|
|
1832
1832
|
*/
|
|
1833
|
-
/**
|
|
1834
|
-
|
|
1833
|
+
/**
|
|
1834
|
+
* Public sale is a built-in pseudo-channel. The server's sentinel for it is the
|
|
1835
|
+
* literal string `'public'` — it is what `GET /channels` returns as
|
|
1836
|
+
* `publicSale.id`, what `GET /channels/allocation` reports for an unallocated
|
|
1837
|
+
* unit, and what `POST /channels/assignments` accepts (alongside `null`) as the
|
|
1838
|
+
* target meaning "send these back to public sale".
|
|
1839
|
+
*
|
|
1840
|
+
* This constant was `''` until 2026-08-02, which silently made every public unit
|
|
1841
|
+
* look like an unknown PRIVATE channel to `planAssignment` and `markerOf` — the
|
|
1842
|
+
* cause of the Review sheet's phantom "moved out of another channel" line and
|
|
1843
|
+
* the rail's "?" marker. Keep it byte-identical to the server's
|
|
1844
|
+
* `eventChannels.PUBLIC_CHANNEL_ID`.
|
|
1845
|
+
*/
|
|
1846
|
+
declare const PUBLIC_CHANNEL_ID = "public";
|
|
1835
1847
|
declare const PUBLIC_CHANNEL_NAME = "Public sale";
|
|
1848
|
+
/** True for every spelling of "public sale" a worker may hand us. */
|
|
1849
|
+
declare function isPublicChannelId(id: string | null | undefined): boolean;
|
|
1836
1850
|
type ChannelState = 'active' | 'paused' | 'archived';
|
|
1837
1851
|
/** Physical inventory status, as the manage surface speaks it. */
|
|
1838
1852
|
type ChannelSeatStatus = 'free' | 'held' | 'booked' | 'blocked';
|
|
@@ -1873,7 +1887,9 @@ interface ChannelRecord {
|
|
|
1873
1887
|
access?: ChannelAccessSummary | null;
|
|
1874
1888
|
}
|
|
1875
1889
|
interface PublicSaleChannel {
|
|
1876
|
-
|
|
1890
|
+
/** `'public'` on every shipped worker; typed loosely so an older build that
|
|
1891
|
+
* still answers `''` is normalised rather than rejected. */
|
|
1892
|
+
id: string;
|
|
1877
1893
|
name: string;
|
|
1878
1894
|
state: 'active';
|
|
1879
1895
|
counts: ChannelCounts;
|
|
@@ -1920,6 +1936,16 @@ interface ArchiveBlockedDetails {
|
|
|
1920
1936
|
latestHoldExpiresAt?: number | null;
|
|
1921
1937
|
retryAfterMs?: number;
|
|
1922
1938
|
}
|
|
1939
|
+
/**
|
|
1940
|
+
* Clamp any marker text down to the ONE uppercase character every surface draws.
|
|
1941
|
+
*
|
|
1942
|
+
* The server stores `marker` as free text (it only length-caps it), so a channel
|
|
1943
|
+
* created outside this widget can carry "star" or "VIP". The comp's marker chip
|
|
1944
|
+
* is a single glyph: taking two characters ("ST") overflows the 22px chip and
|
|
1945
|
+
* stops reading as a letter. Non-letter leading characters (an emoji, a digit,
|
|
1946
|
+
* punctuation) are skipped in favour of the first real letter.
|
|
1947
|
+
*/
|
|
1948
|
+
declare function markerLetter(raw: string | null | undefined, fallback: string): string;
|
|
1923
1949
|
/**
|
|
1924
1950
|
* Suggest a marker for a new channel: the first letter of its name when that
|
|
1925
1951
|
* letter is still free, otherwise the next unused letter. Deterministic so the
|
|
@@ -2003,6 +2029,100 @@ declare function retryAfterCopy(details: ArchiveBlockedDetails | null | undefine
|
|
|
2003
2029
|
declare function accessLine(access: ChannelAccessSummary | null | undefined): string;
|
|
2004
2030
|
/** Plain-language label for the access-intent control. */
|
|
2005
2031
|
declare function accessIntentLabel(intent: ChannelAccessIntent): string;
|
|
2032
|
+
/** Lifecycle the server stores. `rotated` means a newer link replaced this one. */
|
|
2033
|
+
type AccessLinkState = 'active' | 'revoked' | 'rotated';
|
|
2034
|
+
/** What the organizer surface renders: `state`, unless an active link has run
|
|
2035
|
+
* out of time or out of redemptions. Never a capability, never a hash. */
|
|
2036
|
+
type AccessLinkStatus = AccessLinkState | 'expired' | 'exhausted';
|
|
2037
|
+
/**
|
|
2038
|
+
* One hosted link, exactly as `GET …/access-links` projects it.
|
|
2039
|
+
*
|
|
2040
|
+
* There is deliberately NO `url` and NO `capability` field here — the listing
|
|
2041
|
+
* route does not return them, no other route returns them, and this type must
|
|
2042
|
+
* not tempt a caller into believing otherwise. The secret exists in exactly one
|
|
2043
|
+
* place for exactly one moment: the create/rotate response (`AccessLinkReveal`).
|
|
2044
|
+
*/
|
|
2045
|
+
interface AccessLinkRecord {
|
|
2046
|
+
id: string;
|
|
2047
|
+
channelId: string;
|
|
2048
|
+
label: string | null;
|
|
2049
|
+
includePublic: boolean;
|
|
2050
|
+
expiresAt: number;
|
|
2051
|
+
maxRedemptions: number;
|
|
2052
|
+
redemptions: number;
|
|
2053
|
+
/** Guest-weighted per-buyer ceiling handed to every session this link mints. */
|
|
2054
|
+
maxQuantity: number;
|
|
2055
|
+
sessionTtlSeconds: number;
|
|
2056
|
+
state: AccessLinkState;
|
|
2057
|
+
status: AccessLinkStatus;
|
|
2058
|
+
createdAt: number;
|
|
2059
|
+
createdBy: string | null;
|
|
2060
|
+
revokedAt: number | null;
|
|
2061
|
+
lastRedeemedAt: number | null;
|
|
2062
|
+
/** Rotation lineage: the link this replaced, and the one that replaced it. */
|
|
2063
|
+
rotatedFrom: string | null;
|
|
2064
|
+
rotatedTo: string | null;
|
|
2065
|
+
}
|
|
2066
|
+
/** A listed link, with the live session count the rotate dialog needs to state
|
|
2067
|
+
* "N buyers got in with this link and still have access". */
|
|
2068
|
+
interface AccessLinkStatusRecord extends AccessLinkRecord {
|
|
2069
|
+
activeSessions?: number;
|
|
2070
|
+
}
|
|
2071
|
+
/**
|
|
2072
|
+
* The ONE-TIME reveal. `url` and `capability` are on the wire exactly once, in
|
|
2073
|
+
* the create/rotate response, and are unrecoverable afterwards: SeatLayer stores
|
|
2074
|
+
* only a hash. Nothing may persist this — see `ChannelsMode.revealLink`.
|
|
2075
|
+
*/
|
|
2076
|
+
interface AccessLinkReveal {
|
|
2077
|
+
link: AccessLinkRecord;
|
|
2078
|
+
url: string;
|
|
2079
|
+
capability: string;
|
|
2080
|
+
revealedOnce: true;
|
|
2081
|
+
/** Rotation only: the link that just stopped working, and how many live buyer
|
|
2082
|
+
* sessions from it were ended (0 when the organizer let them finish). */
|
|
2083
|
+
previous?: AccessLinkRecord;
|
|
2084
|
+
endedSessions?: number;
|
|
2085
|
+
}
|
|
2086
|
+
/**
|
|
2087
|
+
* Owner-set defaults for a new link. Expiry is NOT here: "when the event starts"
|
|
2088
|
+
* is the server's own default (it knows `starts_at`; the cockpit does not), so
|
|
2089
|
+
* the create form expresses that choice by omitting `expiresAt` entirely rather
|
|
2090
|
+
* than by guessing a timestamp the server would then have to correct.
|
|
2091
|
+
*/
|
|
2092
|
+
declare const ACCESS_LINK_DEFAULTS: {
|
|
2093
|
+
readonly maxRedemptions: 100;
|
|
2094
|
+
readonly maxQuantity: 4;
|
|
2095
|
+
};
|
|
2096
|
+
/** Plain-language state badge for a hosted link (§9: no internal vocabulary). */
|
|
2097
|
+
declare function accessLinkBadge(link: Pick<AccessLinkRecord, 'status' | 'state'>): {
|
|
2098
|
+
text: string;
|
|
2099
|
+
kind: 'active' | 'paused' | 'archived';
|
|
2100
|
+
};
|
|
2101
|
+
/** Only an `active` link can be rotated or revoked; the server agrees (409
|
|
2102
|
+
* `access_link_not_active`), so the buttons are absent rather than failing. */
|
|
2103
|
+
declare function accessLinkIsLive(link: Pick<AccessLinkRecord, 'status' | 'state'>): boolean;
|
|
2104
|
+
/**
|
|
2105
|
+
* The policy an organizer is agreeing to, in one list. Used by BOTH the reveal
|
|
2106
|
+
* (what you just created) and the status card (what is live), so the two can
|
|
2107
|
+
* never drift into describing the same link differently.
|
|
2108
|
+
*/
|
|
2109
|
+
declare function accessLinkPolicyLines(link: AccessLinkRecord): Array<{
|
|
2110
|
+
k: string;
|
|
2111
|
+
v: string;
|
|
2112
|
+
}>;
|
|
2113
|
+
/**
|
|
2114
|
+
* Plain language for a refused hosted-link call.
|
|
2115
|
+
*
|
|
2116
|
+
* The PLATFORM BOUNDS live on the server (60s–180d expiry, 1–10 000 redemptions,
|
|
2117
|
+
* 1–100 seats per buyer, 20 live links per channel) and the server states them
|
|
2118
|
+
* in `message`. We surface that sentence rather than re-encoding the numbers
|
|
2119
|
+
* here, so the client can never disagree with the rule it is reporting.
|
|
2120
|
+
*/
|
|
2121
|
+
declare function accessLinkErrorCopy(err: {
|
|
2122
|
+
code?: string;
|
|
2123
|
+
serverMessage?: string;
|
|
2124
|
+
status?: number;
|
|
2125
|
+
} | null | undefined): string;
|
|
2006
2126
|
/**
|
|
2007
2127
|
* The chart-update refusal `channel_assignment_would_drop` (409) deliberately
|
|
2008
2128
|
* mirrors the Apply skipped buckets, so ONE review component renders both.
|
|
@@ -2037,8 +2157,13 @@ declare function stateBadge(state: ChannelState | 'builtin'): string;
|
|
|
2037
2157
|
* cookie-CSRF gate, so no extra client header is needed.
|
|
2038
2158
|
* - `credentials: 'omit'` — there is no session cookie; the CMS runs
|
|
2039
2159
|
* cross-origin. The worker's credentialed CORS still echoes the CMS origin.
|
|
2040
|
-
* -
|
|
2041
|
-
*
|
|
2160
|
+
* - `/pub/events/:key/chart` stays public: geometry is the same map buyers
|
|
2161
|
+
* see. The seat STATE reads are not. `/pub/.../objects` and an unticketed
|
|
2162
|
+
* `/pub/.../subscribe` both answer with the BUYER projection, which shows
|
|
2163
|
+
* inventory the caller may not buy as a neutral `blocked` — so an organizer
|
|
2164
|
+
* reading them sees its own channel allocations as blocked seats. Both now
|
|
2165
|
+
* go through the token: `/v1/events/:key/objects` for the snapshot, and a
|
|
2166
|
+
* `/v1/events/:key/subscribe-tickets` mint for the socket's scope.
|
|
2042
2167
|
*
|
|
2043
2168
|
* `box-book` is intentionally omitted for M1 (box office ships in M2, and the
|
|
2044
2169
|
* route is still session-only server-side).
|
|
@@ -2112,10 +2237,17 @@ declare class ManageApiError extends Error {
|
|
|
2112
2237
|
* `channel_assignment_conflict` carries the current assignmentVersion.
|
|
2113
2238
|
*/
|
|
2114
2239
|
details?: Record<string, unknown>;
|
|
2240
|
+
/**
|
|
2241
|
+
* The server's own human sentence, when it sent one. `message` is the machine
|
|
2242
|
+
* code (that is what `error` carries), so a UI that wants to state a PLATFORM
|
|
2243
|
+
* RULE — "redemptions must be between 1 and 10 000" — reads this instead of
|
|
2244
|
+
* re-encoding the bound locally and risking disagreement with the server.
|
|
2245
|
+
*/
|
|
2246
|
+
serverMessage?: string;
|
|
2115
2247
|
constructor(status: number, message: string, code?: string, conflicts?: {
|
|
2116
2248
|
label: string;
|
|
2117
2249
|
reason?: string;
|
|
2118
|
-
}[], details?: Record<string, unknown
|
|
2250
|
+
}[], details?: Record<string, unknown>, serverMessage?: string);
|
|
2119
2251
|
}
|
|
2120
2252
|
interface ReportByStatus {
|
|
2121
2253
|
free: number;
|
|
@@ -2219,6 +2351,18 @@ interface LogPage {
|
|
|
2219
2351
|
entries: LogEntry[];
|
|
2220
2352
|
nextBefore: number | null;
|
|
2221
2353
|
}
|
|
2354
|
+
/**
|
|
2355
|
+
* A one-use WebSocket subscribe ticket. `protocols` is exactly what to hand
|
|
2356
|
+
* `new WebSocket(url, protocols)` — the ticket rides in `Sec-WebSocket-Protocol`
|
|
2357
|
+
* because a browser socket cannot carry an Authorization header and a bearer
|
|
2358
|
+
* must never travel in a URL.
|
|
2359
|
+
*/
|
|
2360
|
+
interface SubscribeTicket {
|
|
2361
|
+
ticket: string;
|
|
2362
|
+
expiresAt: number;
|
|
2363
|
+
protocol: string;
|
|
2364
|
+
protocols: string[];
|
|
2365
|
+
}
|
|
2222
2366
|
interface PubObjectsResult {
|
|
2223
2367
|
/** Every non-free seat's status keyed by label (free seats omitted). */
|
|
2224
2368
|
seats: Record<string, string>;
|
|
@@ -2250,8 +2394,32 @@ declare class ManageApi {
|
|
|
2250
2394
|
setToken(token: string): void;
|
|
2251
2395
|
private auth;
|
|
2252
2396
|
private pub;
|
|
2397
|
+
/** The chart geometry. Genuinely public — it is the same map buyers see. */
|
|
2253
2398
|
chart(key: string): Promise<PubChartResult>;
|
|
2399
|
+
/**
|
|
2400
|
+
* The ORGANIZER's seat map: physical state, token-authed.
|
|
2401
|
+
*
|
|
2402
|
+
* This used to read `/pub/events/:key/objects` with no credential, which
|
|
2403
|
+
* answers with the BUYER projection — every unit the caller may not buy
|
|
2404
|
+
* collapses to a neutral `blocked`. An anonymous caller may buy only Public
|
|
2405
|
+
* sale inventory, so the cockpit rendered every channel-allocated seat as
|
|
2406
|
+
* blocked and then computed its KPIs, sell-through and (worse) its
|
|
2407
|
+
* block/unblock target sets from that. `/v1/events/:key/objects` returns the
|
|
2408
|
+
* unprojected snapshot the control-room read model already trusts.
|
|
2409
|
+
*/
|
|
2254
2410
|
objects(key: string): Promise<PubObjectsResult>;
|
|
2411
|
+
/**
|
|
2412
|
+
* Exchange the manage token for a one-use organizer socket ticket.
|
|
2413
|
+
*
|
|
2414
|
+
* A browser `WebSocket` cannot send an Authorization header, so the socket's
|
|
2415
|
+
* scope is established here, over ordinary HTTPS. Without it the DO treats a
|
|
2416
|
+
* manager socket as an anonymous public buyer and projects its deltas — so a
|
|
2417
|
+
* hold inside a private allocation is structurally suppressed and the map
|
|
2418
|
+
* drifts away from the truth `objects()` just established.
|
|
2419
|
+
*
|
|
2420
|
+
* Tickets are single-redemption and expire in ~30s: mint one per connect.
|
|
2421
|
+
*/
|
|
2422
|
+
subscribeTicket(key: string): Promise<SubscribeTicket>;
|
|
2255
2423
|
socketUrl(key: string): string;
|
|
2256
2424
|
/** Take FREE seats off sale in one batched call. Optional `releaseAt` (epoch
|
|
2257
2425
|
* ms, future) auto-returns them to sale; `reason` tags the block (M3 uses it).
|
|
@@ -2370,6 +2538,53 @@ declare class ManageApi {
|
|
|
2370
2538
|
ok: true;
|
|
2371
2539
|
channel: ChannelRecord;
|
|
2372
2540
|
}>;
|
|
2541
|
+
/**
|
|
2542
|
+
* Mint a hosted access link. The 201 is the ONE and ONLY time `url` and
|
|
2543
|
+
* `capability` exist outside the buyer's browser — SeatLayer keeps a hash, so
|
|
2544
|
+
* there is no route, cache, or support escalation that can produce this string
|
|
2545
|
+
* again. Callers must reveal it immediately and then let it go.
|
|
2546
|
+
*
|
|
2547
|
+
* Every omitted field takes the server's default: expiry = when the event
|
|
2548
|
+
* starts, 100 redemptions, 4 seats per buyer, this channel's allocation only.
|
|
2549
|
+
* Platform bounds are enforced server-side and reported as 422 with the rule
|
|
2550
|
+
* spelled out in `ManageApiError.serverMessage`.
|
|
2551
|
+
*
|
|
2552
|
+
* Side effect by design: this also declares the channel's access intent as
|
|
2553
|
+
* `hosted_link`, so the rail stops saying "no buyer access configured".
|
|
2554
|
+
*/
|
|
2555
|
+
createAccessLink(key: string, channelId: string, input?: {
|
|
2556
|
+
label?: string | null;
|
|
2557
|
+
/** Absolute epoch ms. Omit for "when the event starts". */
|
|
2558
|
+
expiresAt?: number;
|
|
2559
|
+
maxRedemptions?: number;
|
|
2560
|
+
maxQuantity?: number;
|
|
2561
|
+
includePublic?: boolean;
|
|
2562
|
+
}): Promise<AccessLinkReveal>;
|
|
2563
|
+
/** Status only — label, expiry, redemptions, per-buyer cap, lineage, and the
|
|
2564
|
+
* live session count. Never the url, never the capability. Needs `:view`. */
|
|
2565
|
+
accessLinks(key: string, channelId: string): Promise<{
|
|
2566
|
+
links: AccessLinkStatusRecord[];
|
|
2567
|
+
}>;
|
|
2568
|
+
/**
|
|
2569
|
+
* Rotate — the ONLY recovery for a link nobody kept. The old URL stops opening
|
|
2570
|
+
* immediately and the response is a fresh one-time reveal.
|
|
2571
|
+
*
|
|
2572
|
+
* `endActiveSessions` is REQUIRED, not defaulted: the organizer must say
|
|
2573
|
+
* whether buyers already inside finish their checkout or lose access now. The
|
|
2574
|
+
* server answers 422 `end_active_sessions_required` if it is omitted, and that
|
|
2575
|
+
* refusal is correct — a UI must not pick either branch on their behalf.
|
|
2576
|
+
*/
|
|
2577
|
+
rotateAccessLink(key: string, channelId: string, linkId: string, endActiveSessions: boolean): Promise<AccessLinkReveal & {
|
|
2578
|
+
previous: AccessLinkRecord;
|
|
2579
|
+
endedSessions: number;
|
|
2580
|
+
}>;
|
|
2581
|
+
/** Revoke. The link stops opening immediately; `endActiveSessions` decides
|
|
2582
|
+
* whether the buyers already inside keep their sessions. */
|
|
2583
|
+
revokeAccessLink(key: string, channelId: string, linkId: string, endActiveSessions?: boolean): Promise<{
|
|
2584
|
+
ok: true;
|
|
2585
|
+
link: AccessLinkRecord;
|
|
2586
|
+
endedSessions: number;
|
|
2587
|
+
}>;
|
|
2373
2588
|
report(key: string): Promise<ReportResult>;
|
|
2374
2589
|
controlRoom(key: string, windowMinutes?: number): Promise<ControlRoomSnapshot>;
|
|
2375
2590
|
log(key: string, opts?: {
|
|
@@ -2648,10 +2863,33 @@ declare class SeatManager {
|
|
|
2648
2863
|
private updateRendererInteraction;
|
|
2649
2864
|
private handleSeatSelect;
|
|
2650
2865
|
private repaintAll;
|
|
2866
|
+
/**
|
|
2867
|
+
* Open the cockpit's realtime socket AS THE ORGANIZER.
|
|
2868
|
+
*
|
|
2869
|
+
* The scope has to be established before the upgrade, because a browser
|
|
2870
|
+
* `WebSocket` cannot send an Authorization header: the manage token is traded
|
|
2871
|
+
* over HTTPS for a one-use ticket which rides in `Sec-WebSocket-Protocol`.
|
|
2872
|
+
* Without it the server treats this socket as an anonymous public buyer and
|
|
2873
|
+
* projects its deltas, so any change inside a private channel allocation is
|
|
2874
|
+
* structurally suppressed and the map silently drifts.
|
|
2875
|
+
*
|
|
2876
|
+
* If the mint fails (an expired token, a worker that predates the route) we
|
|
2877
|
+
* still connect unticketed rather than going dark — the public-sale stream is
|
|
2878
|
+
* worth having, and every `resnapshot()` re-establishes physical truth from
|
|
2879
|
+
* the authenticated HTTP read.
|
|
2880
|
+
*/
|
|
2651
2881
|
private connect;
|
|
2652
2882
|
private scheduleReconnect;
|
|
2653
2883
|
private onMessage;
|
|
2654
2884
|
private resnapshot;
|
|
2885
|
+
/**
|
|
2886
|
+
* Replace the whole seat model.
|
|
2887
|
+
*
|
|
2888
|
+
* `fallback` is the compact frame's modal status: those snapshots list only
|
|
2889
|
+
* the seats that DIFFER from it, so every other known label takes it. Without
|
|
2890
|
+
* this the omitted majority would silently fall back to `free` — fine when
|
|
2891
|
+
* the mode really is free, wrong the moment it is not.
|
|
2892
|
+
*/
|
|
2655
2893
|
private applySnapshot;
|
|
2656
2894
|
/** Optimistic local write shared by organizer actions. Paint and tally once,
|
|
2657
2895
|
* even when an arena-sized operation changes hundreds of seats. */
|
|
@@ -2828,6 +3066,26 @@ interface ChannelsClient {
|
|
|
2828
3066
|
ok: true;
|
|
2829
3067
|
channel: ChannelRecord;
|
|
2830
3068
|
}>;
|
|
3069
|
+
/** 201 with the ONE-TIME reveal. Every omitted field takes the server default
|
|
3070
|
+
* (expiry = event start, 100 redemptions, 4 seats per buyer). */
|
|
3071
|
+
createAccessLink(key: string, channelId: string, input: {
|
|
3072
|
+
label?: string | null;
|
|
3073
|
+
expiresAt?: number;
|
|
3074
|
+
maxRedemptions?: number;
|
|
3075
|
+
maxQuantity?: number;
|
|
3076
|
+
includePublic?: boolean;
|
|
3077
|
+
}): Promise<AccessLinkReveal>;
|
|
3078
|
+
/** Status only. This response has no url and no capability, by contract. */
|
|
3079
|
+
accessLinks(key: string, channelId: string): Promise<{
|
|
3080
|
+
links: AccessLinkStatusRecord[];
|
|
3081
|
+
}>;
|
|
3082
|
+
/** `endActiveSessions` is required — the server 422s without it, deliberately. */
|
|
3083
|
+
rotateAccessLink(key: string, channelId: string, linkId: string, endActiveSessions: boolean): Promise<AccessLinkReveal>;
|
|
3084
|
+
revokeAccessLink(key: string, channelId: string, linkId: string, endActiveSessions?: boolean): Promise<{
|
|
3085
|
+
ok: true;
|
|
3086
|
+
link: unknown;
|
|
3087
|
+
endedSessions: number;
|
|
3088
|
+
}>;
|
|
2831
3089
|
}
|
|
2832
3090
|
interface ChannelsCapabilities {
|
|
2833
3091
|
view: boolean;
|
|
@@ -2906,6 +3164,15 @@ declare class ChannelsMode {
|
|
|
2906
3164
|
private dialog;
|
|
2907
3165
|
private detent;
|
|
2908
3166
|
private seatListLimit;
|
|
3167
|
+
/**
|
|
3168
|
+
* Hosted-link STATUS for the channel whose detail panel is open. This is the
|
|
3169
|
+
* listing projection — it carries no url and no capability, because no route
|
|
3170
|
+
* returns one. `unsupported` is the honest answer for a worker that predates
|
|
3171
|
+
* M8, exactly like the buyer-preview probe.
|
|
3172
|
+
*/
|
|
3173
|
+
private links;
|
|
3174
|
+
private linksChannelId;
|
|
3175
|
+
private linksState;
|
|
2909
3176
|
private previewAudience;
|
|
2910
3177
|
private previewIncludePublic;
|
|
2911
3178
|
private previewProjection;
|
|
@@ -2989,6 +3256,23 @@ declare class ChannelsMode {
|
|
|
2989
3256
|
private listRailHtml;
|
|
2990
3257
|
private selectionRailHtml;
|
|
2991
3258
|
private detailRailHtml;
|
|
3259
|
+
/**
|
|
3260
|
+
* Read the status projection for the open channel. Never paints — the caller
|
|
3261
|
+
* decides when the rail repaints, so a poll-driven reload does not fight a
|
|
3262
|
+
* user-driven one. A worker without M8 answers 404/405 and gets the honest
|
|
3263
|
+
* "needs a newer server" line rather than an error toast.
|
|
3264
|
+
*/
|
|
3265
|
+
private loadLinks;
|
|
3266
|
+
/**
|
|
3267
|
+
* The hosted-link section of the detail panel.
|
|
3268
|
+
*
|
|
3269
|
+
* STATUS ONLY, by design (comp 06 `hosted`): label, state, expiry,
|
|
3270
|
+
* redemptions, seats per buyer, live sessions. There is no Copy control here
|
|
3271
|
+
* and no field to hang one on — the URL was shown once at creation and cannot
|
|
3272
|
+
* be produced again. Rotation is the recovery path, and it says so.
|
|
3273
|
+
*/
|
|
3274
|
+
private hostedLinksHtml;
|
|
3275
|
+
private linkCardHtml;
|
|
2992
3276
|
private previewRailHtml;
|
|
2993
3277
|
private paintSelection;
|
|
2994
3278
|
private wireRail;
|
|
@@ -3029,6 +3313,43 @@ declare class ChannelsMode {
|
|
|
3029
3313
|
* per-section select actions.
|
|
3030
3314
|
*/
|
|
3031
3315
|
private renderSeatListDialog;
|
|
3316
|
+
private reloadLinks;
|
|
3317
|
+
private linkById;
|
|
3318
|
+
/**
|
|
3319
|
+
* Create. The three policy fields carry the owner's defaults and every one of
|
|
3320
|
+
* them is editable; the PLATFORM bounds (60s–180d, 1–10 000, 1–100, 20 live
|
|
3321
|
+
* links) are the server's to enforce and the server's to explain, so this form
|
|
3322
|
+
* checks only that a number is a number and surfaces the server's sentence for
|
|
3323
|
+
* everything else.
|
|
3324
|
+
*/
|
|
3325
|
+
private renderLinkCreateDialog;
|
|
3326
|
+
private createLink;
|
|
3327
|
+
/**
|
|
3328
|
+
* The ONE-TIME reveal.
|
|
3329
|
+
*
|
|
3330
|
+
* Three things make this unrecoverable rather than merely "not shown twice":
|
|
3331
|
+
*
|
|
3332
|
+
* 1. `url` is a local const. It is never assigned to a field on this class,
|
|
3333
|
+
* never handed to the host, never put in a `DialogState`.
|
|
3334
|
+
* 2. `this.dialog` is cleared FIRST, so `renderDialog()` — the only function
|
|
3335
|
+
* that rebuilds a sheet — has nothing to rebuild this one from.
|
|
3336
|
+
* 3. The string exists in exactly one DOM node inside the scrim. Dismissing
|
|
3337
|
+
* the dialog removes the scrim, and the closure goes with it.
|
|
3338
|
+
*
|
|
3339
|
+
* The server holds only a hash, so even a compromised client cannot ask for it
|
|
3340
|
+
* again. Rotation is the recovery path, and the copy says so.
|
|
3341
|
+
*/
|
|
3342
|
+
private revealLink;
|
|
3343
|
+
/**
|
|
3344
|
+
* Rotate. The organizer must SAY what happens to the buyers already inside —
|
|
3345
|
+
* the confirm stays disabled until one of the two choices is picked, because
|
|
3346
|
+
* the gentle branch and the destructive branch are both real decisions and the
|
|
3347
|
+
* server refuses (422 `end_active_sessions_required`) to guess either.
|
|
3348
|
+
*/
|
|
3349
|
+
private renderLinkRotateDialog;
|
|
3350
|
+
private rotateLink;
|
|
3351
|
+
private renderLinkRevokeDialog;
|
|
3352
|
+
private revokeLink;
|
|
3032
3353
|
private applySheetClasses;
|
|
3033
3354
|
private cycleDetent;
|
|
3034
3355
|
/** Back/Close from the full detent returns to the previous one and keeps the
|
|
@@ -3036,4 +3357,4 @@ declare class ChannelsMode {
|
|
|
3036
3357
|
handleBack(): boolean;
|
|
3037
3358
|
}
|
|
3038
3359
|
|
|
3039
|
-
export { ApiError, type ArchiveBlockedDetails, type AssignmentBuckets, type AssignmentDropDetails, type AssignmentResult, type AttachPickerFrameOptions, type BestAvailableResult, type BucketRow, BuyerAccessContext, type BuyerAccessExpiredEvent, type BuyerAccessRefreshReason, type BuyerAccessToken, type BuyerAccessTokenProvider, BuyerAccessUnavailableError, type BuyerAccessUnavailableEvent, type BuyerAccessUnavailableReason, BuyerRealtimeClient, type BuyerRealtimeOptions, type ChannelAccessIntent, type ChannelAccessSummary, type ChannelAllocationPage, type ChannelAuditEntry, type ChannelAuditPage, type ChannelCounts, type ChannelListResult, type ChannelPreviewProjection, type ChannelRecord, type ChannelSeatStatus, type ChannelState, type ChannelsCapabilities, type ChannelsClient, ChannelsMode, type ChannelsModeHost, type ChannelsSeatView, type CheckoutHandoff, type CheckoutLineItem, type ControlRoomActivityEntry, type ControlRoomSectionMetric, type ControlRoomSnapshot, EmbeddedDesigner, type EmbeddedDesignerEventType, type EmbeddedDesignerMessage, type EmbeddedDesignerOptions, type GAAreaAvailability, type HoldConflict, type HoldLineItem, type HoldResult, type LogEntry, type LogPage, ManageApi, ManageApiError, PUBLIC_CHANNEL_ID, PUBLIC_CHANNEL_NAME, type Projection, type PubApiOptions, type RealtimeSink, type ReportByStatus, type ReportCategoryMeta, type ReportCategoryRow, type ReportResult, type ResumedHoldResult, SeatManager, type SeatManagerActionResult, type SeatManagerActivity, type SeatManagerCapability, type SeatManagerMode, type SeatManagerOptions, type SeatManagerTallies, SeatPicker, type SeatPickerOptions, type SeatPickerTheme, SeatingChart, type SeatingChartOptions, type SelectedObjectUnavailableEvent, type SelectedSeat, type SelectionSourceRow, type StatusChange, type SubscribeTicket, accessIntentLabel, accessLine, attachPickerFrame, bucketRows, bucketRowsHtml, createBuyerAccessContext, createControllerSink, dropReviewRows, markerOf, mutationCount, needsMoveConfirmation, planAssignment, retryAfterCopy, selectionSources, stateBadge, suggestMarker };
|
|
3360
|
+
export { ACCESS_LINK_DEFAULTS, type AccessLinkRecord, type AccessLinkReveal, type AccessLinkState, type AccessLinkStatus, type AccessLinkStatusRecord, ApiError, type ArchiveBlockedDetails, type AssignmentBuckets, type AssignmentDropDetails, type AssignmentResult, type AttachPickerFrameOptions, type BestAvailableResult, type BucketRow, BuyerAccessContext, type BuyerAccessExpiredEvent, type BuyerAccessRefreshReason, type BuyerAccessToken, type BuyerAccessTokenProvider, BuyerAccessUnavailableError, type BuyerAccessUnavailableEvent, type BuyerAccessUnavailableReason, BuyerRealtimeClient, type BuyerRealtimeOptions, type ChannelAccessIntent, type ChannelAccessSummary, type ChannelAllocationPage, type ChannelAuditEntry, type ChannelAuditPage, type ChannelCounts, type ChannelListResult, type ChannelPreviewProjection, type ChannelRecord, type ChannelSeatStatus, type ChannelState, type ChannelsCapabilities, type ChannelsClient, ChannelsMode, type ChannelsModeHost, type ChannelsSeatView, type CheckoutHandoff, type CheckoutLineItem, type ControlRoomActivityEntry, type ControlRoomSectionMetric, type ControlRoomSnapshot, EmbeddedDesigner, type EmbeddedDesignerEventType, type EmbeddedDesignerMessage, type EmbeddedDesignerOptions, type GAAreaAvailability, type HoldConflict, type HoldLineItem, type HoldResult, type LogEntry, type LogPage, ManageApi, ManageApiError, PUBLIC_CHANNEL_ID, PUBLIC_CHANNEL_NAME, type Projection, type PubApiOptions, type RealtimeSink, type ReportByStatus, type ReportCategoryMeta, type ReportCategoryRow, type ReportResult, type ResumedHoldResult, SeatManager, type SeatManagerActionResult, type SeatManagerActivity, type SeatManagerCapability, type SeatManagerMode, type SeatManagerOptions, type SeatManagerTallies, SeatPicker, type SeatPickerOptions, type SeatPickerTheme, SeatingChart, type SeatingChartOptions, type SelectedObjectUnavailableEvent, type SelectedSeat, type SelectionSourceRow, type StatusChange, type SubscribeTicket$1 as SubscribeTicket, accessIntentLabel, accessLine, accessLinkBadge, accessLinkErrorCopy, accessLinkIsLive, accessLinkPolicyLines, attachPickerFrame, bucketRows, bucketRowsHtml, createBuyerAccessContext, createControllerSink, dropReviewRows, isPublicChannelId, markerLetter, markerOf, mutationCount, needsMoveConfirmation, planAssignment, retryAfterCopy, selectionSources, stateBadge, suggestMarker };
|