@pegma/support-desk-application 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,535 @@
1
+ import { type AuditEvent } from "@pegma/audit";
2
+ import { type AccessContext } from "@pegma/authorization-core";
3
+ import { type MailJob } from "@pegma/mail";
4
+ import type { Clock, IsoTimestamp, Logger, PrincipalId } from "@pegma/spine";
5
+ import { type Store } from "@pegma/storage-core";
6
+ import type { MessageId, RequesterAssociation, Ticket, TicketChannel, TicketId, TicketMessage, TicketPriority, TicketStatus } from "@pegma/support-desk-contracts";
7
+ export declare const supportPermissions: Readonly<{
8
+ readonly create: "support.ticket.create";
9
+ readonly readOwn: "support.ticket.read.own";
10
+ readonly replyOwn: "support.ticket.reply.own";
11
+ readonly queueRead: "support.queue.read";
12
+ readonly replyAny: "support.ticket.reply.any";
13
+ readonly note: "support.ticket.note";
14
+ readonly assign: "support.ticket.assign";
15
+ readonly manage: "support.ticket.manage";
16
+ readonly auditRead: "support.audit.read";
17
+ }>;
18
+ export interface SupportDeskLimits {
19
+ readonly maxSubjectCharacters: number;
20
+ readonly maxMessageCharacters: number;
21
+ readonly maxTicketsPerPrincipal: number;
22
+ readonly maxMessagesPerTicket: number;
23
+ /**
24
+ * Hard cap on physical records in one ticket partition (ticket, messages,
25
+ * audit, commands, delivery jobs, quota, reservation). Reads and mutations
26
+ * fail closed when the partition would exceed this bound.
27
+ */
28
+ readonly maxRecordsPerTicket: number;
29
+ }
30
+ export declare const defaultSupportDeskLimits: SupportDeskLimits;
31
+ export declare class SupportDeskAuthorizationError extends Error {
32
+ readonly permission: string;
33
+ constructor(permission: string);
34
+ }
35
+ export declare class SupportDeskNotFoundError extends Error {
36
+ constructor();
37
+ }
38
+ export declare class SupportDeskConflictError extends Error {
39
+ constructor(message?: string);
40
+ }
41
+ export declare class SupportDeskLimitError extends Error {
42
+ readonly field: "subject" | "body" | "customer_tickets" | "ticket_messages" | "ticket_partition";
43
+ readonly maximum: number;
44
+ constructor(field: "subject" | "body" | "customer_tickets" | "ticket_messages" | "ticket_partition", maximum: number);
45
+ }
46
+ /**
47
+ * Staff queue online scan hit a configured materialization budget before the
48
+ * projection scan cycle completed. Hosts map this to HTTP 503; never return a
49
+ * partial queue page for this outcome.
50
+ */
51
+ export declare class SupportDeskQueueCapacityError extends Error {
52
+ readonly budget: "physical_rows" | "scan_pages" | "active_results";
53
+ readonly maximum: number;
54
+ constructor(budget: "physical_rows" | "scan_pages" | "active_results", maximum: number);
55
+ }
56
+ export interface DeliveryJob {
57
+ readonly kind: "delivery_job";
58
+ readonly partition: TicketId;
59
+ readonly id: string;
60
+ readonly ticketId: TicketId;
61
+ readonly messageId: MessageId;
62
+ readonly job: MailJob;
63
+ }
64
+ export interface DeliveryContent {
65
+ readonly templateId: string;
66
+ readonly templateVersion: number;
67
+ readonly variables: Readonly<Record<string, string>>;
68
+ readonly subject: string;
69
+ readonly outboundMessageId: string;
70
+ }
71
+ interface TicketRecord {
72
+ readonly kind: "ticket";
73
+ readonly partition: TicketId;
74
+ readonly id: "ticket";
75
+ readonly ticket: Ticket;
76
+ }
77
+ interface MessageRecord {
78
+ readonly kind: "message";
79
+ readonly partition: TicketId;
80
+ readonly id: string;
81
+ /**
82
+ * The ticket revision committed by the same transaction as this message.
83
+ * Legacy rows without one must be migrated before they can be returned.
84
+ */
85
+ readonly ordinal: number;
86
+ readonly message: TicketMessage;
87
+ /** Immutable Support-owned content resolved by the generic mail adapter. */
88
+ readonly deliveryContent?: DeliveryContent | undefined;
89
+ }
90
+ interface AuditMemberRecord {
91
+ readonly kind: "audit";
92
+ readonly partition: TicketId;
93
+ readonly id: string;
94
+ readonly event: AuditEvent;
95
+ }
96
+ type SupportCommandType = "create_customer_ticket" | "reply_customer_ticket" | "staff_reply" | "add_note" | "assign_ticket" | "change_priority" | "resolve_ticket" | "close_ticket" | "reopen_ticket";
97
+ interface CommandRecord {
98
+ readonly kind: "command";
99
+ readonly partition: TicketId;
100
+ readonly id: string;
101
+ readonly commandId: string;
102
+ readonly commandType: SupportCommandType;
103
+ /**
104
+ * Present for message-producing commands. Absent for assign, priority, and
105
+ * lifecycle commands that only mutate ticket state.
106
+ */
107
+ readonly messageId?: MessageId;
108
+ readonly requestFingerprint: string;
109
+ readonly completedAt: IsoTimestamp;
110
+ }
111
+ interface TicketQuotaRecord {
112
+ readonly kind: "ticket_quota";
113
+ readonly partition: TicketId;
114
+ readonly id: "quota";
115
+ readonly messageCount: number;
116
+ }
117
+ interface TicketReservationRecord {
118
+ readonly kind: "ticket_reservation";
119
+ readonly partition: TicketId;
120
+ readonly id: "reservation";
121
+ readonly token: string;
122
+ readonly generation: number;
123
+ readonly state: "committed" | "cancelled";
124
+ }
125
+ export type SupportRecord = TicketRecord | TicketQuotaRecord | TicketReservationRecord | MessageRecord | AuditMemberRecord | CommandRecord | DeliveryJob;
126
+ /** Closed MVP registry of durable accepted-change audit action names. */
127
+ export declare const supportTicketAuditActions: Readonly<{
128
+ readonly created: "support.ticket.created";
129
+ readonly customerReplied: "support.ticket.customer_replied";
130
+ readonly staffReplied: "support.ticket.staff_replied";
131
+ readonly noteAdded: "support.ticket.note_added";
132
+ readonly assigned: "support.ticket.assigned";
133
+ readonly unassigned: "support.ticket.unassigned";
134
+ readonly priorityChanged: "support.ticket.priority_changed";
135
+ readonly resolved: "support.ticket.resolved";
136
+ readonly closed: "support.ticket.closed";
137
+ readonly reopened: "support.ticket.reopened";
138
+ }>;
139
+ export interface CustomerTicketIndexEntry {
140
+ readonly ticketId: TicketId;
141
+ readonly reservationToken: string;
142
+ readonly reservationGeneration: number;
143
+ readonly reservedAt: IsoTimestamp;
144
+ readonly state: "reserved" | "confirmed";
145
+ }
146
+ export interface CustomerTicketIndexRecord {
147
+ readonly principalId: PrincipalId;
148
+ readonly entries: readonly CustomerTicketIndexEntry[];
149
+ }
150
+ export interface InboundReceipt {
151
+ readonly bucket: string;
152
+ /** Two-hex-digit slot derived with the bucket from a 128-bit digest. */
153
+ readonly slot: string;
154
+ readonly channelId: string;
155
+ readonly providerEventId: string;
156
+ readonly externalMessageId?: string;
157
+ readonly payloadFingerprint: string;
158
+ readonly status: "processing" | "processed" | "rejected";
159
+ /** Trusted host time at which processing first reserved this receipt. */
160
+ readonly receivedAt: IsoTimestamp;
161
+ /** Trusted host time at which processing reached a terminal status. */
162
+ readonly processedAt?: IsoTimestamp;
163
+ readonly ticketId?: TicketId;
164
+ readonly messageId?: MessageId;
165
+ readonly diagnostic?: string;
166
+ }
167
+ export interface DeliveryCallbackInput {
168
+ readonly provider: string;
169
+ readonly providerEventId: string;
170
+ readonly ticketId: TicketId;
171
+ readonly deliveryJobId: string;
172
+ readonly submissionGeneration: number;
173
+ readonly providerMessageRef?: string | undefined;
174
+ readonly status: "delivered" | "failed";
175
+ readonly occurredAt: IsoTimestamp;
176
+ readonly failureCategory?: string | undefined;
177
+ }
178
+ export interface DeliveryCallbackReceipt extends DeliveryCallbackInput {
179
+ readonly bucket: string;
180
+ /** Two-hex-digit slot derived with the bucket from a 128-bit digest. */
181
+ readonly slot: string;
182
+ readonly processedAt?: IsoTimestamp;
183
+ }
184
+ export declare const deliveryCallbackDedupeDays = 30;
185
+ export declare const maxDeliveryCallbacksPerBucket = 256;
186
+ export declare const inboundReceiptDedupeDays = 30;
187
+ export declare const maxInboundReceiptsPerBucket = 256;
188
+ export declare const supportRecords: import("@pegma/storage-core").CollectionDefinition<SupportRecord>;
189
+ /**
190
+ * Project generic mail state into Support Desk's durable record union.
191
+ *
192
+ * Physical identity stays Support-owned (`delivery:*`), while the nested job
193
+ * round-trips exactly for authoritative collection-wide discovery.
194
+ */
195
+ export declare const supportMail: import("@pegma/mail").Mail<SupportRecord>;
196
+ /**
197
+ * Project generic audit events into Support Desk's durable record union.
198
+ *
199
+ * Physical identity is `auditRecordId(event.id)`; the event itself is the
200
+ * accepted-change record. Domain `TicketEvent` values stay pure workflow input.
201
+ */
202
+ export declare const supportAudit: import("@pegma/audit").AuditLog<SupportRecord>;
203
+ export declare const customerTicketIndex: import("@pegma/storage-core").CollectionDefinition<CustomerTicketIndexRecord>;
204
+ /**
205
+ * One counter per Support Desk instance. Reservation is outside the ticket
206
+ * transaction; gaps are accepted when a later create step fails.
207
+ */
208
+ export declare const ticketNumbers: import("@pegma/storage-core").CollectionDefinition<TicketNumberRecord>;
209
+ export declare const inboundReceipts: import("@pegma/storage-core").CollectionDefinition<InboundReceipt>;
210
+ export declare const deliveryCallbackReceipts: import("@pegma/storage-core").CollectionDefinition<DeliveryCallbackReceipt>;
211
+ /**
212
+ * Staff queue projection row. One record per ticket, partitioned by ticket ID
213
+ * so no queue partition grows without bound. Never stores message bodies,
214
+ * email addresses, or permission decisions.
215
+ */
216
+ export interface QueueIndexRecord {
217
+ readonly ticketId: TicketId;
218
+ readonly id: "queue";
219
+ readonly projectedRevision: number;
220
+ readonly state: "active" | "inactive";
221
+ readonly status: TicketStatus;
222
+ readonly priority: TicketPriority;
223
+ readonly category?: string;
224
+ readonly requesterAssociation: RequesterAssociation;
225
+ readonly channel: TicketChannel;
226
+ readonly assignedTo?: PrincipalId;
227
+ readonly updatedAt: IsoTimestamp;
228
+ }
229
+ export declare const queueIndex: import("@pegma/storage-core").CollectionDefinition<QueueIndexRecord>;
230
+ /** Default terminal-retention cutoff shared by projection, repair, and sweep. */
231
+ export declare const defaultQueueTerminalRetentionMilliseconds: number;
232
+ export interface QueueScanBudgets {
233
+ /** Every adapter-returned physical projection row before confirmation. */
234
+ readonly maxPhysicalRows: number;
235
+ /** Complete scan pages attempted by one online queue request. */
236
+ readonly maxScanPages: number;
237
+ /** Confirmed active tickets materialized before filter/sort. */
238
+ readonly maxActiveResults: number;
239
+ /** Page size passed to `scan` (at most {@link MAX_SCAN_PAGE_SIZE}). */
240
+ readonly scanPageSize: number;
241
+ }
242
+ export declare const defaultQueueScanBudgets: QueueScanBudgets;
243
+ export interface QueueProjectionHealth {
244
+ readonly consecutiveFailures: number;
245
+ readonly lastFailureAt?: IsoTimestamp;
246
+ readonly lastFailureTicketId?: TicketId;
247
+ readonly lastFailureMessage?: string;
248
+ }
249
+ export interface NotificationInput {
250
+ readonly id: string;
251
+ readonly recipientRef: string;
252
+ readonly templateId: string;
253
+ readonly templateVersion: number;
254
+ readonly variables: Readonly<Record<string, string>>;
255
+ readonly subject: string;
256
+ readonly outboundMessageId: string;
257
+ readonly maxAttempts?: number;
258
+ }
259
+ export interface CreateCustomerTicketCommand {
260
+ readonly commandId: string;
261
+ readonly correlationId: string;
262
+ readonly ticketId: TicketId;
263
+ readonly messageId: MessageId;
264
+ readonly subject: string;
265
+ readonly body: string;
266
+ /** Optional host-configured opaque category from the application allowlist. */
267
+ readonly category?: string;
268
+ readonly requesterEmail?: string;
269
+ readonly notification?: NotificationInput;
270
+ }
271
+ /**
272
+ * Instance-scoped positive ticket-number counter.
273
+ * Partition and id are fixed: `instance` / `ticket-number`.
274
+ */
275
+ export interface TicketNumberRecord {
276
+ readonly lastIssued: number;
277
+ }
278
+ export declare const ticketNumberPartition = "instance";
279
+ export declare const ticketNumberRecordId = "ticket-number";
280
+ export interface ReplyToCustomerTicketCommand {
281
+ readonly commandId: string;
282
+ readonly correlationId: string;
283
+ readonly ticketId: TicketId;
284
+ readonly messageId: MessageId;
285
+ readonly body: string;
286
+ readonly notification?: NotificationInput;
287
+ }
288
+ /**
289
+ * Customer-safe ticket fields. Omits requester evidence, priority, assignee,
290
+ * staff-facing `updatedAt`, revision, and every other staff-only field.
291
+ */
292
+ export interface CustomerTicketSummary {
293
+ readonly id: TicketId;
294
+ readonly number: number;
295
+ readonly subject: string;
296
+ readonly category?: string;
297
+ readonly status: Ticket["status"];
298
+ readonly channel: Ticket["channel"];
299
+ readonly createdAt: Ticket["createdAt"];
300
+ readonly customerUpdatedAt: Ticket["customerUpdatedAt"];
301
+ }
302
+ /**
303
+ * Customer-safe conversation fields. Omits principal IDs and provider
304
+ * threading metadata that belong on the authoritative message record.
305
+ */
306
+ export interface CustomerMessage {
307
+ readonly id: TicketMessage["id"];
308
+ readonly ticketId: TicketMessage["ticketId"];
309
+ readonly authorKind: TicketMessage["authorKind"];
310
+ readonly channel: TicketMessage["channel"];
311
+ readonly visibility: TicketMessage["visibility"];
312
+ readonly format: TicketMessage["format"];
313
+ readonly body: TicketMessage["body"];
314
+ readonly createdAt: TicketMessage["createdAt"];
315
+ }
316
+ export interface CustomerTicketView {
317
+ readonly ticket: CustomerTicketSummary;
318
+ readonly messages: readonly CustomerMessage[];
319
+ }
320
+ /**
321
+ * Staff-facing ticket detail. Includes the authoritative ticket (requester,
322
+ * priority, assignee, revision, staff timestamps) and every message, including
323
+ * internal notes. Audit history is a separate permission-gated read.
324
+ */
325
+ export interface StaffTicketView {
326
+ readonly ticket: Ticket;
327
+ readonly messages: readonly TicketMessage[];
328
+ }
329
+ export interface StaffReplyCommand {
330
+ readonly commandId: string;
331
+ readonly correlationId: string;
332
+ readonly ticketId: TicketId;
333
+ readonly messageId: MessageId;
334
+ readonly body: string;
335
+ readonly notification?: NotificationInput;
336
+ }
337
+ export interface AddNoteCommand {
338
+ readonly commandId: string;
339
+ readonly correlationId: string;
340
+ readonly ticketId: TicketId;
341
+ readonly messageId: MessageId;
342
+ readonly body: string;
343
+ }
344
+ export interface AssignTicketCommand {
345
+ readonly commandId: string;
346
+ readonly correlationId: string;
347
+ readonly ticketId: TicketId;
348
+ /** Principal to assign, or null to unassign. */
349
+ readonly assigneeId: PrincipalId | null;
350
+ /**
351
+ * Optional assignment notification (for example to the new assignee),
352
+ * committed in the same ticket transaction. When any of these is set,
353
+ * `messageId` and `body` are required so mail binds to a real message.
354
+ */
355
+ readonly messageId?: MessageId;
356
+ readonly body?: string;
357
+ readonly notification?: NotificationInput;
358
+ }
359
+ export interface ChangePriorityCommand {
360
+ readonly commandId: string;
361
+ readonly correlationId: string;
362
+ readonly ticketId: TicketId;
363
+ readonly priority: TicketPriority;
364
+ }
365
+ export interface LifecycleTicketCommand {
366
+ readonly commandId: string;
367
+ readonly correlationId: string;
368
+ readonly ticketId: TicketId;
369
+ /**
370
+ * Optional customer-visible system message and mail, committed in the same
371
+ * ticket transaction as the lifecycle change (for example a resolution
372
+ * notification). When any of these is set, `messageId` and `body` are
373
+ * required so mail content binds to a real message record.
374
+ */
375
+ readonly messageId?: MessageId;
376
+ readonly body?: string;
377
+ readonly notification?: NotificationInput;
378
+ }
379
+ /**
380
+ * Staff queue filters applied in application memory after authoritative
381
+ * confirmation. Storage never filters or sorts projection rows.
382
+ */
383
+ export interface StaffQueueQuery {
384
+ readonly status?: TicketStatus | readonly TicketStatus[];
385
+ readonly priority?: TicketPriority | readonly TicketPriority[];
386
+ readonly association?: RequesterAssociation | readonly RequesterAssociation[];
387
+ readonly channel?: TicketChannel | readonly TicketChannel[];
388
+ /** Exact assignee principal; use with `unassignedOnly` for null assignee. */
389
+ readonly assignedTo?: PrincipalId;
390
+ readonly unassignedOnly?: boolean;
391
+ /** Newest updates first is the default staff presentation. */
392
+ readonly sort?: "updated_newest" | "updated_oldest";
393
+ }
394
+ /** Confirmed active ticket summary for the staff queue surface. */
395
+ export interface StaffQueueItem {
396
+ readonly ticketId: TicketId;
397
+ readonly revision: number;
398
+ readonly status: TicketStatus;
399
+ readonly priority: TicketPriority;
400
+ readonly category?: string;
401
+ readonly requesterAssociation: RequesterAssociation;
402
+ readonly channel: TicketChannel;
403
+ readonly assignedTo?: PrincipalId;
404
+ readonly updatedAt: IsoTimestamp;
405
+ }
406
+ export interface StaffQueueResult {
407
+ readonly items: readonly StaffQueueItem[];
408
+ }
409
+ export interface QueueRepairPageOptions {
410
+ /** Opaque adapter-issued continuation; omit to begin a new repair cycle. */
411
+ readonly cursor?: string;
412
+ /** Physical records per authoritative page; at most {@link MAX_SCAN_PAGE_SIZE}. */
413
+ readonly limit?: number;
414
+ }
415
+ export interface QueueRepairPageResult {
416
+ /** Host-persisted only after this whole page succeeds. */
417
+ readonly nextCursor: string | null;
418
+ readonly physicalRows: number;
419
+ readonly projected: number;
420
+ }
421
+ export interface QueueInactiveSweepOptions {
422
+ readonly cursor?: string;
423
+ readonly limit?: number;
424
+ }
425
+ export interface QueueInactiveSweepResult {
426
+ readonly nextCursor: string | null;
427
+ readonly physicalRows: number;
428
+ readonly deleted: number;
429
+ }
430
+ export interface SupportDeskApplication {
431
+ createCustomerTicket(access: AccessContext, command: CreateCustomerTicketCommand): Promise<CustomerTicketView>;
432
+ replyToCustomerTicket(access: AccessContext, command: ReplyToCustomerTicketCommand): Promise<CustomerTicketView>;
433
+ listCustomerTickets(access: AccessContext): Promise<readonly CustomerTicketSummary[]>;
434
+ readCustomerTicket(access: AccessContext, ticketId: TicketId): Promise<CustomerTicketView>;
435
+ readStaffTicket(access: AccessContext, ticketId: TicketId): Promise<StaffTicketView>;
436
+ /**
437
+ * Bounded staff queue over `support-desk.queue-index.v1`. Scans the
438
+ * projection from a null cursor for one complete cycle, confirms every
439
+ * candidate against the authoritative ticket, then filters and sorts in
440
+ * memory. Exhausting any budget returns {@link SupportDeskQueueCapacityError}
441
+ * with no partial result.
442
+ */
443
+ listStaffQueue(access: AccessContext, query?: StaffQueueQuery): Promise<StaffQueueResult>;
444
+ /** In-process projection health for host metrics/dashboards. */
445
+ queueProjectionHealth(): QueueProjectionHealth;
446
+ replyAsStaff(access: AccessContext, command: StaffReplyCommand): Promise<StaffTicketView>;
447
+ addNote(access: AccessContext, command: AddNoteCommand): Promise<StaffTicketView>;
448
+ assignTicket(access: AccessContext, command: AssignTicketCommand): Promise<StaffTicketView>;
449
+ changePriority(access: AccessContext, command: ChangePriorityCommand): Promise<StaffTicketView>;
450
+ resolveTicket(access: AccessContext, command: LifecycleTicketCommand): Promise<StaffTicketView>;
451
+ closeTicket(access: AccessContext, command: LifecycleTicketCommand): Promise<StaffTicketView>;
452
+ reopenTicket(access: AccessContext, command: LifecycleTicketCommand): Promise<StaffTicketView>;
453
+ readTicketAuditHistory(access: AccessContext, ticketId: TicketId): Promise<readonly AuditEvent[]>;
454
+ }
455
+ export declare function validateOutboundMessageId(value: string, field?: string): string;
456
+ export interface ProjectTicketToQueueOptions {
457
+ readonly store: Store;
458
+ readonly clock: Clock;
459
+ /**
460
+ * Shared terminal-retention cutoff used by projection, repair, and sweep.
461
+ * Hosts must pass the same value to every worker invocation that they
462
+ * configured on the application (no silent per-worker default).
463
+ */
464
+ readonly terminalRetentionMilliseconds: number;
465
+ readonly maxConflictAttempts?: number;
466
+ }
467
+ /**
468
+ * Load the authoritative ticket and project the entire queue row from it.
469
+ *
470
+ * Never accepts a caller-supplied `Ticket` snapshot. Accepts only a newer
471
+ * revision or an identical equal-revision replay. Authoritative terminal
472
+ * tickets beyond the shared retention cutoff keep the projection absent or
473
+ * are conditionally deleted — they never recreate an inactive row.
474
+ */
475
+ export declare function projectTicketToQueue(ticketId: TicketId, options: ProjectTicketToQueueOptions): Promise<"written" | "kept" | "deleted" | "absent">;
476
+ /**
477
+ * Scan one page of authoritative `support-desk.records.v1` rows and project
478
+ * every ticket found. Hosts persist `nextCursor` only after this call returns
479
+ * successfully for the whole page.
480
+ */
481
+ export declare function repairQueueProjectionPage(options: ProjectTicketToQueueOptions & QueueRepairPageOptions): Promise<QueueRepairPageResult>;
482
+ /**
483
+ * Sweep inactive queue rows only after reloading the authoritative ticket and
484
+ * confirming it is still terminal beyond the shared retention cutoff, then
485
+ * `deleteIfUnchanged`.
486
+ */
487
+ export declare function sweepInactiveQueueProjections(options: ProjectTicketToQueueOptions & QueueInactiveSweepOptions): Promise<QueueInactiveSweepResult>;
488
+ export declare function createSupportDeskApplication(options: {
489
+ readonly store: Store;
490
+ readonly clock: Clock;
491
+ readonly logger?: Logger;
492
+ readonly limits?: Partial<SupportDeskLimits>;
493
+ readonly maxConflictAttempts?: number;
494
+ /**
495
+ * Shared terminal-retention cutoff for queue projection, repair, and
496
+ * inactive-row sweeping (milliseconds). Defaults to 30 days.
497
+ */
498
+ readonly queueTerminalRetentionMilliseconds?: number;
499
+ /** Online staff queue scan budgets. */
500
+ readonly queueScanBudgets?: Partial<QueueScanBudgets>;
501
+ /**
502
+ * Frozen, deduplicated host allowlist for optional ticket categories.
503
+ * At most 32 values matching `^[a-z][a-z0-9_]{0,31}$`.
504
+ */
505
+ readonly allowedCategories?: readonly string[];
506
+ }): SupportDeskApplication;
507
+ export declare function inboundReceiptLocation(channelId: string, providerEventId: string): Promise<{
508
+ readonly bucket: string;
509
+ readonly slot: string;
510
+ }>;
511
+ export declare function inboundReceiptBucket(channelId: string, providerEventId: string): Promise<string>;
512
+ export declare function deliveryCallbackBucket(provider: string, providerEventId: string): Promise<string>;
513
+ export declare function recordDeliveryCallback(store: Store, input: DeliveryCallbackInput, clock: Clock): Promise<{
514
+ readonly duplicate: boolean;
515
+ readonly job: DeliveryJob | null;
516
+ }>;
517
+ interface ReceiptSweepInput {
518
+ readonly bucket: string;
519
+ readonly processedBefore: IsoTimestamp;
520
+ readonly maxDeletes?: number;
521
+ }
522
+ export declare function sweepInboundReceipts(store: Store, clock: Clock, input: ReceiptSweepInput): Promise<number>;
523
+ export declare function sweepDeliveryCallbackReceipts(store: Store, clock: Clock, input: ReceiptSweepInput): Promise<number>;
524
+ /**
525
+ * Remove stale ticket hints from one bounded principal index record.
526
+ *
527
+ * The index is never an authorization answer. A reserved hint may remain
528
+ * after a process stops before creating its ticket; this sweep confirms every
529
+ * hint against authoritative ticket state before retaining it.
530
+ */
531
+ export declare function pruneCustomerTicketIndex(store: Store, principalId: PrincipalId, input: {
532
+ readonly reservedBefore: IsoTimestamp;
533
+ }): Promise<readonly TicketId[]>;
534
+ export {};
535
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAA+B,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AACxE,OAA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