@trii/types 2.10.718 → 2.10.720

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,4 +1,4 @@
1
- import { ITicketProperty, TicketPropertyValue } from "./Common";
1
+ import { ITicketAuditedEntity, ITicketProperty, TicketPropertyValue } from "./Common";
2
2
  import { TicketMetricCode } from "./Dashboard";
3
3
  import { TicketSecurityOperation } from "./Security";
4
4
  /** Identifies the native AI experiences that Tickets can request from the central AI module. */
@@ -105,6 +105,7 @@ export declare enum TicketAIContextScope {
105
105
  }
106
106
  /** Configuration exposed by Tickets so UI and Flow know which AI experiences are available and permitted. */
107
107
  export interface ITicketAICapabilityDefinition {
108
+ spaceId: string;
108
109
  code: TicketAICapability;
109
110
  name: string;
110
111
  description: string;
@@ -117,9 +118,24 @@ export interface ITicketAICapabilityDefinition {
117
118
  promptTemplateId?: string;
118
119
  minimumConfidence?: number;
119
120
  requireHumanApproval: boolean;
121
+ createdAt?: Date;
122
+ createdBy?: string;
123
+ updatedAt?: Date;
124
+ updatedBy?: string;
125
+ }
126
+ export interface IUpdateTicketAICapabilityDto {
127
+ enabled: boolean;
128
+ allowedRoleIds?: string[];
129
+ requiredOperations?: TicketSecurityOperation[];
130
+ contextScopes: TicketAIContextScope[];
131
+ providerId?: string;
132
+ modelId?: string;
133
+ promptTemplateId?: string;
134
+ minimumConfidence?: number;
135
+ requireHumanApproval: boolean;
120
136
  }
121
137
  /** Per-tenant policy enforced before any ticket context is sent to a model. */
122
- export interface ITicketAIPolicy {
138
+ export interface ITicketAIPolicy extends ITicketAuditedEntity {
123
139
  id: string;
124
140
  spaceId: string;
125
141
  name: string;
@@ -141,6 +157,38 @@ export interface ITicketAIPolicy {
141
157
  updatedAt?: Date;
142
158
  updatedBy?: string;
143
159
  }
160
+ export interface ICreateTicketAIPolicyDto {
161
+ name: string;
162
+ enabled?: boolean;
163
+ allowedCapabilities: TicketAICapability[];
164
+ allowedContextScopes: TicketAIContextScope[];
165
+ excludedFieldNameKeys?: string[];
166
+ allowPii: boolean;
167
+ allowSensitivePii: boolean;
168
+ redactBeforeInference: boolean;
169
+ retainInputs: boolean;
170
+ retainOutputs: boolean;
171
+ retentionDays?: number;
172
+ maximumTokensPerRequest?: number;
173
+ maximumCostPerRequest?: number;
174
+ requireSourceCitations?: boolean;
175
+ }
176
+ export interface IUpdateTicketAIPolicyDto {
177
+ name?: string;
178
+ enabled?: boolean;
179
+ allowedCapabilities?: TicketAICapability[];
180
+ allowedContextScopes?: TicketAIContextScope[];
181
+ excludedFieldNameKeys?: string[];
182
+ allowPii?: boolean;
183
+ allowSensitivePii?: boolean;
184
+ redactBeforeInference?: boolean;
185
+ retainInputs?: boolean;
186
+ retainOutputs?: boolean;
187
+ retentionDays?: number;
188
+ maximumTokensPerRequest?: number;
189
+ maximumCostPerRequest?: number;
190
+ requireSourceCitations?: boolean;
191
+ }
144
192
  /** Request issued by an agent-facing UI for summaries, replies, rewrites or recommendations. */
145
193
  export interface ICreateTicketAIAssistanceDto {
146
194
  ticketId: string;
@@ -1,5 +1,5 @@
1
1
  import { MessageVisibility } from "../Common/Messages/Message";
2
- import { ITicketAttachment, ITicketProperty, TicketPriority, TicketPropertyValue } from "./Common";
2
+ import { ITicketAttachment, ITicketAuditedEntity, ITicketProperty, TicketPriority, TicketPropertyValue } from "./Common";
3
3
  import { ITicketFilter, ITicketCursorRequest, ITicketCursorResponse } from "./Api";
4
4
  import { ITicketTimelineEntry } from "./Conversation";
5
5
  import { ISlaMetricCycle } from "./Sla";
@@ -307,7 +307,7 @@ export type ITicketMacroAction = {
307
307
  type: TicketMacroActionType.ENQUEUE;
308
308
  queueId: string;
309
309
  };
310
- export interface ITicketMacro {
310
+ export interface ITicketMacro extends ITicketAuditedEntity {
311
311
  id: string;
312
312
  spaceId: string;
313
313
  name: string;
@@ -329,6 +329,20 @@ export interface IApplyTicketMacroDto {
329
329
  };
330
330
  idempotencyKey: string;
331
331
  }
332
+ export interface ICreateTicketMacroDto {
333
+ name: string;
334
+ description?: string;
335
+ actions: ITicketMacroAction[];
336
+ allowedRoleIds?: string[];
337
+ enabled?: boolean;
338
+ }
339
+ export interface IUpdateTicketMacroDto {
340
+ name?: string;
341
+ description?: string;
342
+ actions?: ITicketMacroAction[];
343
+ allowedRoleIds?: string[];
344
+ enabled?: boolean;
345
+ }
332
346
  export declare enum TicketBulkOperationType {
333
347
  UPDATE = "UPDATE",
334
348
  ASSIGN = "ASSIGN",
@@ -342,3 +342,51 @@ export type IUpdateTicketRoutingPolicyDto = Partial<ICreateTicketRoutingPolicyDt
342
342
  export interface IReorderTicketRoutingPoliciesDto {
343
343
  orderedIds: string[];
344
344
  }
345
+ export declare enum TicketSkillWarningCode {
346
+ ENABLED_BUT_UNASSIGNED = "ENABLED_BUT_UNASSIGNED",
347
+ DISABLED_BUT_REFERENCED = "DISABLED_BUT_REFERENCED",
348
+ REQUIRED_BY_QUEUE_BUT_UNMET = "REQUIRED_BY_QUEUE_BUT_UNMET"
349
+ }
350
+ export interface ITicketSkillUsageSummary {
351
+ agentsCount: number;
352
+ queuesCount: number;
353
+ policiesCount: number;
354
+ }
355
+ export interface ITicketSkillUsageRef {
356
+ id: string;
357
+ name: string;
358
+ }
359
+ export interface ITicketSkillUsage {
360
+ agents: number;
361
+ queues: ITicketSkillUsageRef[];
362
+ policies: ITicketSkillUsageRef[];
363
+ }
364
+ export interface ITicketSkillWithUsage extends ITicketSkill {
365
+ usage: ITicketSkillUsageSummary;
366
+ warnings: TicketSkillWarningCode[];
367
+ }
368
+ export interface ICreateAgentTicketSkillDto {
369
+ userId: string;
370
+ skillId: string;
371
+ proficiency?: number;
372
+ priority?: number;
373
+ enabled?: boolean;
374
+ validFrom?: Date;
375
+ validUntil?: Date;
376
+ }
377
+ export type IUpdateAgentTicketSkillDto = Partial<Omit<ICreateAgentTicketSkillDto, "userId" | "skillId">>;
378
+ export interface IAgentChannelCapacityConfig {
379
+ id: string;
380
+ userId: string;
381
+ channelType?: ChannelType;
382
+ maximumConcurrent: number;
383
+ reservedCapacity?: number;
384
+ effectiveCapacity: number;
385
+ }
386
+ export interface ICreateAgentChannelCapacityDto {
387
+ userId: string;
388
+ channelType?: ChannelType;
389
+ maximumConcurrent: number;
390
+ reservedCapacity?: number;
391
+ }
392
+ export type IUpdateAgentChannelCapacityDto = Partial<Omit<ICreateAgentChannelCapacityDto, "userId" | "channelType">>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TicketAssignmentEndReason = exports.TicketEscalationActionType = exports.TicketEscalationTrigger = exports.TicketSkillRelaxationMode = exports.TicketQueueOrderDirection = exports.TicketQueueOrderCriterion = exports.TicketRoutingConditionGroupOperator = exports.AgentAvailabilityStatus = exports.TicketRoutingStatus = exports.TicketRoutingStrategy = void 0;
3
+ exports.TicketSkillWarningCode = exports.TicketAssignmentEndReason = exports.TicketEscalationActionType = exports.TicketEscalationTrigger = exports.TicketSkillRelaxationMode = exports.TicketQueueOrderDirection = exports.TicketQueueOrderCriterion = exports.TicketRoutingConditionGroupOperator = exports.AgentAvailabilityStatus = exports.TicketRoutingStatus = exports.TicketRoutingStrategy = void 0;
4
4
  var TicketRoutingStrategy;
5
5
  (function (TicketRoutingStrategy) {
6
6
  TicketRoutingStrategy["ROUND_ROBIN"] = "ROUND_ROBIN";
@@ -85,3 +85,9 @@ var TicketAssignmentEndReason;
85
85
  TicketAssignmentEndReason["EXPIRED"] = "EXPIRED";
86
86
  TicketAssignmentEndReason["MANUAL"] = "MANUAL";
87
87
  })(TicketAssignmentEndReason || (exports.TicketAssignmentEndReason = TicketAssignmentEndReason = {}));
88
+ var TicketSkillWarningCode;
89
+ (function (TicketSkillWarningCode) {
90
+ TicketSkillWarningCode["ENABLED_BUT_UNASSIGNED"] = "ENABLED_BUT_UNASSIGNED";
91
+ TicketSkillWarningCode["DISABLED_BUT_REFERENCED"] = "DISABLED_BUT_REFERENCED";
92
+ TicketSkillWarningCode["REQUIRED_BY_QUEUE_BUT_UNMET"] = "REQUIRED_BY_QUEUE_BUT_UNMET";
93
+ })(TicketSkillWarningCode || (exports.TicketSkillWarningCode = TicketSkillWarningCode = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trii/types",
3
- "version": "2.10.718",
3
+ "version": "2.10.720",
4
4
  "description": "Types definitions for Trii projects - ",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",