@trii/types 2.10.740 → 2.10.743
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IEventType } from "../../Calendar/Event";
|
|
1
2
|
import { IContactAddress } from "../../Contacts/contacts";
|
|
2
3
|
import { UserInfo } from "../../Users/UserTrii";
|
|
3
4
|
import { IChannelInfo } from "../Channels/Channel";
|
|
@@ -336,6 +337,16 @@ export interface MessageEvent {
|
|
|
336
337
|
allDay: boolean;
|
|
337
338
|
location?: string;
|
|
338
339
|
details?: string;
|
|
340
|
+
/** Color del evento (`IEvent.color`), para que la tarjeta use el mismo del calendario. */
|
|
341
|
+
color?: string;
|
|
342
|
+
/** Tipo de evento (`IEvent.eventType`): nombre, color e ícono. Snapshot, como el resto. */
|
|
343
|
+
eventType?: IEventType;
|
|
344
|
+
/**
|
|
345
|
+
* Sólo en eventos recurrentes: la ocurrencia que se compartió
|
|
346
|
+
* (`IEvent.originalOccurrenceDate`). `eventId` identifica la serie, así que sin esto el deep
|
|
347
|
+
* link abre la serie y no el día compartido.
|
|
348
|
+
*/
|
|
349
|
+
originalOccurrenceDate?: Date;
|
|
339
350
|
/** Deep link al evento (`/a/calendar/Calendar?eventId=`). El front lo recalcula si falta. */
|
|
340
351
|
link?: string;
|
|
341
352
|
}
|
|
@@ -19,6 +19,8 @@ export interface Post {
|
|
|
19
19
|
participants: UserInfo[];
|
|
20
20
|
archived: boolean;
|
|
21
21
|
assignment: ConversationAssignmentSnapshot;
|
|
22
|
+
/** Concurrencia optimista + idempotencia de comandos, igual que Conversation.version. */
|
|
23
|
+
version: number;
|
|
22
24
|
createdAt: Date;
|
|
23
25
|
updatedAt: Date;
|
|
24
26
|
}
|
|
@@ -2,6 +2,7 @@ import { ChannelType } from "../Common/Channels/ChannelType";
|
|
|
2
2
|
import { ITicketAuditedEntity, ITicketProperty, TicketPriority } from "./Common";
|
|
3
3
|
import { ITicketMessageReference } from "./Conversation";
|
|
4
4
|
import type { ITicketCursorResponse } from "./Api";
|
|
5
|
+
import type { ITicketAttachmentUploadSession } from "./AdvancedApi";
|
|
5
6
|
export declare enum TicketPortalAuthenticationMode {
|
|
6
7
|
PUBLIC = "PUBLIC",
|
|
7
8
|
OPTIONAL = "OPTIONAL",
|
|
@@ -508,6 +509,63 @@ export interface ISubmitTicketRequestDto {
|
|
|
508
509
|
formSubmissionId: string;
|
|
509
510
|
idempotencyKey: string;
|
|
510
511
|
}
|
|
512
|
+
/**
|
|
513
|
+
* One file the portal declares BEFORE any byte exists in storage.
|
|
514
|
+
*
|
|
515
|
+
* `sizeBytes` and `mimeType` are the client's DECLARATION and stay that way for
|
|
516
|
+
* the life of the attachment: tickets-api never sees the bytes (media-api owns
|
|
517
|
+
* storage), so there is nothing to compare them against.
|
|
518
|
+
*/
|
|
519
|
+
export interface ICreateCustomerTicketAttachmentDto {
|
|
520
|
+
fileName: string;
|
|
521
|
+
mimeType: string;
|
|
522
|
+
sizeBytes: number;
|
|
523
|
+
checksum?: string;
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Direct ticket creation from a portal, without going through a request draft.
|
|
527
|
+
*
|
|
528
|
+
* What is ABSENT is the contract, not an oversight: there is no channelType,
|
|
529
|
+
* channelId, primaryConversationId, assigneeId, assigneeName, assignedGroupId,
|
|
530
|
+
* statusId, origin, tagIds or externalReferences. Routing, channel provenance
|
|
531
|
+
* and the internal taxonomy are decisions of the agent side; the server fills
|
|
532
|
+
* them in (origin WEB_FORM, the space's initial status, the routing defaults of
|
|
533
|
+
* the category and the request type).
|
|
534
|
+
*/
|
|
535
|
+
export interface ICreateCustomerTicketDto {
|
|
536
|
+
/** Mongo ObjectId of the contact opening the ticket. Row-level authorisation
|
|
537
|
+
* of the whole customer surface: required, never defaulted. */
|
|
538
|
+
contactId: string;
|
|
539
|
+
title: string;
|
|
540
|
+
description?: string;
|
|
541
|
+
categoryId: string;
|
|
542
|
+
requestTypeId?: string;
|
|
543
|
+
/** Optional: a portal may or may not let the customer choose. Absent means the
|
|
544
|
+
* server default (MEDIUM). */
|
|
545
|
+
priority?: TicketPriority;
|
|
546
|
+
properties?: ITicketProperty[];
|
|
547
|
+
/** Files the customer is about to upload. Declaring them here is what puts the
|
|
548
|
+
* upload destinations inside the create transaction. */
|
|
549
|
+
attachments?: ICreateCustomerTicketAttachmentDto[];
|
|
550
|
+
/** REQUIRED, unlike ICreateTicketDto where it is optional: a portal submit is
|
|
551
|
+
* the canonical double-click. `source` is NOT part of the contract - the
|
|
552
|
+
* server derives it from the portal slug, so one portal's keys cannot collide
|
|
553
|
+
* with another's. */
|
|
554
|
+
idempotencyKey: string;
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* The answer to a create, and the reason the flow is ordered ticket-first.
|
|
558
|
+
*
|
|
559
|
+
* `attachmentUploads` carries one session per declared attachment, in the order
|
|
560
|
+
* they were declared, each already bound to the new ticket. The portal uploads
|
|
561
|
+
* the bytes to `uploadUrl` and then completes each session. Until it does, the
|
|
562
|
+
* ticket has no attachments - the deliberate trade: no byte is ever uploaded for
|
|
563
|
+
* a ticket that failed to be created.
|
|
564
|
+
*/
|
|
565
|
+
export interface ICustomerTicketCreatedView {
|
|
566
|
+
ticket: ICustomerTicketView;
|
|
567
|
+
attachmentUploads: ITicketAttachmentUploadSession[];
|
|
568
|
+
}
|
|
511
569
|
export interface ICustomerTicketActionDto {
|
|
512
570
|
expectedVersion: number;
|
|
513
571
|
action: TicketCustomerAction;
|