@trii/types 2.10.801 → 2.10.803

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,12 @@
1
+ /** Platform-wide channel assigned to a workspace exclusively through Trii Admin. */
2
+ export type ReleaseChannel = 'stable' | 'pilot';
3
+ /**
4
+ * Global channel snapshot. Revisions are positive integers and immutable once published.
5
+ * Component values identify immutable artifacts, not API versions or mutable aliases.
6
+ * Activation and runtime validation belong to the administering service.
7
+ */
8
+ export interface IChannelConfiguration {
9
+ channel: ReleaseChannel;
10
+ revision: number;
11
+ components: Record<string, string>;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,8 @@
1
1
  import { UserInfo } from "../Users/index";
2
+ import type { ReleaseChannel } from '../Releases';
2
3
  export interface ISpaceInfo {
4
+ /** Platform channel; absent on legacy spaces means stable. Managed only by Trii Admin. */
5
+ channel?: ReleaseChannel;
3
6
  id: string;
4
7
  name: string;
5
8
  imageUrl: string;
@@ -59,6 +62,8 @@ export declare const RegionInfo: {
59
62
  };
60
63
  };
61
64
  export interface ISpace {
65
+ /** Platform channel; absent on legacy spaces means stable. Managed only by Trii Admin. */
66
+ channel?: ReleaseChannel;
62
67
  id: string;
63
68
  uid: string;
64
69
  name: string;
@@ -1,5 +1,5 @@
1
1
  import { ITicket } from "./Ticket";
2
- import { TicketOrigin, TicketPriority, TicketPropertyValue, TicketStage } from "./Common";
2
+ import { TicketCreationMethod, TicketPriority, TicketPropertyValue, TicketStage } from "./Common";
3
3
  export interface ITicketCursorRequest {
4
4
  cursor?: string;
5
5
  limit?: number;
@@ -27,7 +27,7 @@ export interface ITicketFilter {
27
27
  stages?: TicketStage[];
28
28
  statusIds?: string[];
29
29
  priorities?: TicketPriority[];
30
- origins?: TicketOrigin[];
30
+ origins?: TicketCreationMethod[];
31
31
  contactIds?: string[];
32
32
  assigneeIds?: string[];
33
33
  assignedGroupIds?: string[];
@@ -12,17 +12,45 @@ export declare enum TicketPriority {
12
12
  HIGH = "HIGH",
13
13
  URGENT = "URGENT"
14
14
  }
15
- export declare enum TicketOrigin {
16
- MANUAL = "MANUAL",
17
- API = "API",
18
- IMPORT = "IMPORT",
19
- AUTOMATION = "AUTOMATION",
20
- CONVERSATION = "CONVERSATION",
21
- WEB_FORM = "WEB_FORM",
22
- SOCIAL_MEDIA = "SOCIAL_MEDIA",
23
- EMAIL = "EMAIL",
24
- PHONE = "PHONE",
25
- OTHER = "OTHER"
15
+ /**
16
+ * How a ticket was created (stored in ITicket.origin). The server sets it from
17
+ * the surface that creates the ticket; callers never choose it. The channel the
18
+ * request arrived through is a separate concern (channelType/channelId).
19
+ * - manual: an agent creates it from the CRM, including from a conversation.
20
+ * - self_service: the customer creates it from a portal or public form.
21
+ * - integration: an external system or message generates it.
22
+ * - automation: a rule, scheduled job or internal process creates it.
23
+ * - import: it comes in through a bulk load or migration.
24
+ */
25
+ export declare enum TicketCreationMethod {
26
+ Manual = "manual",
27
+ SelfService = "self_service",
28
+ Integration = "integration",
29
+ Automation = "automation",
30
+ Import = "import"
31
+ }
32
+ /**
33
+ * How the request behind a ticket reached the organisation (ITicket.originChannel). It is a
34
+ * business classification, separate from channelType/channelId (the technical channel of a
35
+ * linked conversation, used by routing capacity). A ticket created from a conversation takes it
36
+ * from that conversation's channel; an agent picks it otherwise. `unknown` is for tickets whose
37
+ * channel cannot be determined (legacy rows, integrations that do not report it).
38
+ */
39
+ export declare enum TicketOriginChannel {
40
+ Email = "email",
41
+ Phone = "phone",
42
+ WhatsApp = "whatsapp",
43
+ WebChat = "web_chat",
44
+ WebForm = "web_form",
45
+ CustomerPortal = "customer_portal",
46
+ InPerson = "in_person",
47
+ Internal = "internal",
48
+ SMS = "sms",
49
+ Facebook = "facebook",
50
+ Instagram = "instagram",
51
+ Telegram = "telegram",
52
+ Other = "other",
53
+ Unknown = "unknown"
26
54
  }
27
55
  export declare enum TicketAccessLevel {
28
56
  ALL = "ALL",
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TicketAccessLevel = exports.TicketOrigin = exports.TicketPriority = exports.TicketStage = void 0;
3
+ exports.TicketAccessLevel = exports.TicketOriginChannel = exports.TicketCreationMethod = exports.TicketPriority = exports.TicketStage = void 0;
4
4
  var TicketStage;
5
5
  (function (TicketStage) {
6
6
  TicketStage["NEW"] = "NEW";
@@ -16,19 +16,48 @@ var TicketPriority;
16
16
  TicketPriority["HIGH"] = "HIGH";
17
17
  TicketPriority["URGENT"] = "URGENT";
18
18
  })(TicketPriority || (exports.TicketPriority = TicketPriority = {}));
19
- var TicketOrigin;
20
- (function (TicketOrigin) {
21
- TicketOrigin["MANUAL"] = "MANUAL";
22
- TicketOrigin["API"] = "API";
23
- TicketOrigin["IMPORT"] = "IMPORT";
24
- TicketOrigin["AUTOMATION"] = "AUTOMATION";
25
- TicketOrigin["CONVERSATION"] = "CONVERSATION";
26
- TicketOrigin["WEB_FORM"] = "WEB_FORM";
27
- TicketOrigin["SOCIAL_MEDIA"] = "SOCIAL_MEDIA";
28
- TicketOrigin["EMAIL"] = "EMAIL";
29
- TicketOrigin["PHONE"] = "PHONE";
30
- TicketOrigin["OTHER"] = "OTHER";
31
- })(TicketOrigin || (exports.TicketOrigin = TicketOrigin = {}));
19
+ /**
20
+ * How a ticket was created (stored in ITicket.origin). The server sets it from
21
+ * the surface that creates the ticket; callers never choose it. The channel the
22
+ * request arrived through is a separate concern (channelType/channelId).
23
+ * - manual: an agent creates it from the CRM, including from a conversation.
24
+ * - self_service: the customer creates it from a portal or public form.
25
+ * - integration: an external system or message generates it.
26
+ * - automation: a rule, scheduled job or internal process creates it.
27
+ * - import: it comes in through a bulk load or migration.
28
+ */
29
+ var TicketCreationMethod;
30
+ (function (TicketCreationMethod) {
31
+ TicketCreationMethod["Manual"] = "manual";
32
+ TicketCreationMethod["SelfService"] = "self_service";
33
+ TicketCreationMethod["Integration"] = "integration";
34
+ TicketCreationMethod["Automation"] = "automation";
35
+ TicketCreationMethod["Import"] = "import";
36
+ })(TicketCreationMethod || (exports.TicketCreationMethod = TicketCreationMethod = {}));
37
+ /**
38
+ * How the request behind a ticket reached the organisation (ITicket.originChannel). It is a
39
+ * business classification, separate from channelType/channelId (the technical channel of a
40
+ * linked conversation, used by routing capacity). A ticket created from a conversation takes it
41
+ * from that conversation's channel; an agent picks it otherwise. `unknown` is for tickets whose
42
+ * channel cannot be determined (legacy rows, integrations that do not report it).
43
+ */
44
+ var TicketOriginChannel;
45
+ (function (TicketOriginChannel) {
46
+ TicketOriginChannel["Email"] = "email";
47
+ TicketOriginChannel["Phone"] = "phone";
48
+ TicketOriginChannel["WhatsApp"] = "whatsapp";
49
+ TicketOriginChannel["WebChat"] = "web_chat";
50
+ TicketOriginChannel["WebForm"] = "web_form";
51
+ TicketOriginChannel["CustomerPortal"] = "customer_portal";
52
+ TicketOriginChannel["InPerson"] = "in_person";
53
+ TicketOriginChannel["Internal"] = "internal";
54
+ TicketOriginChannel["SMS"] = "sms";
55
+ TicketOriginChannel["Facebook"] = "facebook";
56
+ TicketOriginChannel["Instagram"] = "instagram";
57
+ TicketOriginChannel["Telegram"] = "telegram";
58
+ TicketOriginChannel["Other"] = "other";
59
+ TicketOriginChannel["Unknown"] = "unknown";
60
+ })(TicketOriginChannel || (exports.TicketOriginChannel = TicketOriginChannel = {}));
32
61
  var TicketAccessLevel;
33
62
  (function (TicketAccessLevel) {
34
63
  TicketAccessLevel["ALL"] = "ALL";
@@ -1,5 +1,5 @@
1
1
  import { ChannelType } from "../Common/Channels/ChannelType";
2
- import { ITicketDateRange, ITicketMetricGroup, ITicketMetricPoint, TicketPriority, TicketPropertyValue } from "./Common";
2
+ import { ITicketDateRange, ITicketMetricGroup, ITicketMetricPoint, TicketOriginChannel, TicketPriority, TicketPropertyValue } from "./Common";
3
3
  import { ITicketFilter } from "./Api";
4
4
  import type { ServiceCommitmentType, SlaMetricType, SlaStatus } from "./Sla";
5
5
  import type { AgentAvailabilityStatus } from "./Routing";
@@ -269,6 +269,8 @@ export declare enum DashboardIcon {
269
269
  export interface ITicketAnalyticsFilter extends ITicketFilter {
270
270
  range: ITicketDateRange;
271
271
  channelTypes?: ChannelType[];
272
+ /** ITicket.originChannel. The creation method is the inherited `origins`. */
273
+ originChannels?: TicketOriginChannel[];
272
274
  queueIds?: string[];
273
275
  organizationIds?: string[];
274
276
  brandIds?: string[];
@@ -600,7 +600,7 @@ export interface ICreateCustomerTicketAttachmentDto {
600
600
  * channelId, primaryConversationId, assigneeId, assigneeName, assignedGroupId,
601
601
  * statusId, origin, tagIds or externalReferences. Routing, channel provenance
602
602
  * and the internal taxonomy are decisions of the agent side; the server fills
603
- * them in (origin WEB_FORM, the space's initial status, the routing defaults of
603
+ * them in (origin self_service, the space's initial status, the routing defaults of
604
604
  * the category and the request type).
605
605
  */
606
606
  export interface ICreateCustomerTicketDto {
@@ -1,5 +1,5 @@
1
1
  import { ChannelType } from "../Common/Channels/ChannelType";
2
- import { ITicketAttachment, ITicketContactProjection, ITicketExternalReference, ITicketProperty, ITicketTagInfo, TicketOrigin, TicketPriority, TicketStage } from "./Common";
2
+ import { ITicketAttachment, ITicketContactProjection, ITicketExternalReference, ITicketProperty, ITicketTagInfo, TicketCreationMethod, TicketOriginChannel, TicketPriority, TicketStage } from "./Common";
3
3
  import { ITicketFormSubmissionReference } from "./Workflow";
4
4
  import { ITicketSlaState } from "./Sla";
5
5
  import { ITicketSecurityState } from "./Security";
@@ -29,7 +29,7 @@ export interface ITicket {
29
29
  statusId: string;
30
30
  stage: TicketStage;
31
31
  priority: TicketPriority;
32
- origin: TicketOrigin;
32
+ origin: TicketCreationMethod;
33
33
  assigneeId?: string;
34
34
  assignedGroupId?: string;
35
35
  routing?: ITicketRoutingState;
@@ -43,6 +43,7 @@ export interface ITicket {
43
43
  version: number;
44
44
  categoryId: string;
45
45
  requestTypeId?: string;
46
+ originChannel: TicketOriginChannel;
46
47
  channelType?: ChannelType;
47
48
  channelId?: string;
48
49
  primaryConversationId?: string;
@@ -78,7 +79,6 @@ export interface ICreateTicketDto {
78
79
  businessId?: string;
79
80
  statusId?: string;
80
81
  priority: TicketPriority;
81
- origin: TicketOrigin;
82
82
  assigneeId?: string;
83
83
  assignedGroupId?: string;
84
84
  dueAt?: Date;
@@ -89,6 +89,8 @@ export interface ICreateTicketDto {
89
89
  idempotencyKey?: string;
90
90
  categoryId: string;
91
91
  requestTypeId?: string;
92
+ /** Required unless it can be derived: from channelType when present, or fixed by the create surface. */
93
+ originChannel?: TicketOriginChannel;
92
94
  channelType?: ChannelType;
93
95
  channelId?: string;
94
96
  primaryConversationId?: string;
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export * as Calls from './Calls/index';
8
8
  export * as Security from './Security/index';
9
9
  export * as Reports from './Reports/index';
10
10
  export * as Spaces from './Spaces/index';
11
+ export * as Releases from './Releases/index';
11
12
  export * as Tickets from './Tickets/index';
12
13
  export * as Sales from './Sales/index';
13
14
  export * as Collections from './Collections/index';
package/dist/index.js CHANGED
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.Marketing = exports.Automations = exports.Forms = exports.APIResponses = exports.Shop = exports.AI = exports.APIKeys = exports.Events = exports.EventsQueue = exports.ApiResponses = exports.Presence = exports.Users = exports.Collections = exports.Sales = exports.Tickets = exports.Spaces = exports.Reports = exports.Security = exports.Calls = exports.Conversations = exports.Calendar = exports.Contacts = exports.Common = exports.AuditLogs = exports.Accounts = void 0;
36
+ exports.Marketing = exports.Automations = exports.Forms = exports.APIResponses = exports.Shop = exports.AI = exports.APIKeys = exports.Events = exports.EventsQueue = exports.ApiResponses = exports.Presence = exports.Users = exports.Collections = exports.Sales = exports.Tickets = exports.Releases = exports.Spaces = exports.Reports = exports.Security = exports.Calls = exports.Conversations = exports.Calendar = exports.Contacts = exports.Common = exports.AuditLogs = exports.Accounts = void 0;
37
37
  exports.Accounts = __importStar(require("./Accounts/index"));
38
38
  exports.AuditLogs = __importStar(require("./AuditLogs/index"));
39
39
  exports.Common = __importStar(require("./Common/index"));
@@ -44,6 +44,7 @@ exports.Calls = __importStar(require("./Calls/index"));
44
44
  exports.Security = __importStar(require("./Security/index"));
45
45
  exports.Reports = __importStar(require("./Reports/index"));
46
46
  exports.Spaces = __importStar(require("./Spaces/index"));
47
+ exports.Releases = __importStar(require("./Releases/index"));
47
48
  exports.Tickets = __importStar(require("./Tickets/index"));
48
49
  exports.Sales = __importStar(require("./Sales/index"));
49
50
  exports.Collections = __importStar(require("./Collections/index"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trii/types",
3
- "version": "2.10.801",
3
+ "version": "2.10.803",
4
4
  "description": "Types definitions for Trii projects - ",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",