@d19n/youfibre-odin-sdk 2.0.233-beta.5 → 2.0.233-beta.7
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/README.md +4 -1
- package/dist/actions-v2/MoveMsrToHeldDto.d.ts +209 -0
- package/dist/actions-v2/MoveMsrToHeldDto.js +118 -0
- package/dist/actions-v2/UpdateCallAnalyticsDto.d.ts +1 -17
- package/dist/actions-v2/UpdateCallOnInboundCallAnsweredDto.d.ts +10 -3
- package/dist/actions-v2/UpdateCallOnInboundCallCompletedDto.d.ts +8 -1
- package/dist/actions-v2/UpdateCallOnNumberCallStatusDto.d.ts +4 -4
- package/dist/actions-v2/UpdateCallOnOutboundDialActionDto.d.ts +2 -2
- package/dist/entities-v2/Call.d.ts +10 -24
- package/dist/entities-v2/Call.js +2 -6
- package/dist/records-v2/ModifyServiceRequestRecord.d.ts +86 -0
- package/dist/records-v2/ModifyServiceRequestRecord.js +135 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -359,7 +359,7 @@ This SDK includes **171** entities across **12** modules.
|
|
|
359
359
|
|
|
360
360
|
## Actions
|
|
361
361
|
|
|
362
|
-
This SDK includes **
|
|
362
|
+
This SDK includes **746** actions.
|
|
363
363
|
|
|
364
364
|
### Action Types
|
|
365
365
|
|
|
@@ -1501,6 +1501,7 @@ This SDK includes **745** actions.
|
|
|
1501
1501
|
| `CreateModifyServiceRequest` | CREATE | k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Create.CreateModifyServiceRequest |
|
|
1502
1502
|
| `MoveMsrToComplete` | STAGE_TRANSITION | k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Update.UpdateModifyServiceRequest |
|
|
1503
1503
|
| `MoveMsrToFailed` | STAGE_TRANSITION | k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Update.UpdateModifyServiceRequest |
|
|
1504
|
+
| `MoveMsrToHeld` | STAGE_TRANSITION | k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Update.UpdateModifyServiceRequest |
|
|
1504
1505
|
| `MoveMsrToInProgress` | STAGE_TRANSITION | k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Update.UpdateModifyServiceRequest |
|
|
1505
1506
|
| `UpdateModifyServiceRequest` | UPDATE | k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Update.UpdateModifyServiceRequest |
|
|
1506
1507
|
|
|
@@ -1508,6 +1509,8 @@ This SDK includes **745** actions.
|
|
|
1508
1509
|
|
|
1509
1510
|
**MoveMsrToFailed Target Stages:** `ModifyServiceRequestStateStageFailed`
|
|
1510
1511
|
|
|
1512
|
+
**MoveMsrToHeld Target Stages:** `ModifyServiceRequestStateStageHeld`
|
|
1513
|
+
|
|
1511
1514
|
**MoveMsrToInProgress Target Stages:** `ModifyServiceRequestStateStageInProgress`
|
|
1512
1515
|
|
|
1513
1516
|
#### NetworkDevice
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MoveMsrToHeld Action DTO
|
|
3
|
+
*
|
|
4
|
+
* MoveMsrToHeld
|
|
5
|
+
*
|
|
6
|
+
* @module ServiceModule
|
|
7
|
+
* @entity ModifyServiceRequest
|
|
8
|
+
* @entityType DEFAULT
|
|
9
|
+
* @actionKey MoveMsrToHeld
|
|
10
|
+
* @event k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Transition.MoveMsrToHeld
|
|
11
|
+
*
|
|
12
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
+
*/
|
|
14
|
+
import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent } from '@d19n/odin-types/dist/core';
|
|
15
|
+
/**
|
|
16
|
+
* Properties for UpdateModifyServiceRequest action
|
|
17
|
+
*
|
|
18
|
+
* @property Required fields: 0
|
|
19
|
+
* @property Optional fields: 7
|
|
20
|
+
*/
|
|
21
|
+
export interface UpdateModifyServiceRequestProperties {
|
|
22
|
+
/**
|
|
23
|
+
* Service ID
|
|
24
|
+
*
|
|
25
|
+
* The ID of the service being modified
|
|
26
|
+
* @type {TEXT}
|
|
27
|
+
*/
|
|
28
|
+
ServiceId?: string | null;
|
|
29
|
+
/**
|
|
30
|
+
* SKU Previous
|
|
31
|
+
*
|
|
32
|
+
* The previous SKU being modified from (Used for Line Profile mapping)
|
|
33
|
+
* @type {TEXT}
|
|
34
|
+
*/
|
|
35
|
+
SkuPrevious?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* SKU Next
|
|
38
|
+
*
|
|
39
|
+
* The next SKU being modified to (Used for Line Profile mapping)
|
|
40
|
+
* @type {TEXT}
|
|
41
|
+
*/
|
|
42
|
+
SkuNext?: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* FNO Modify Status
|
|
45
|
+
*
|
|
46
|
+
* FNO Modify Status
|
|
47
|
+
* @type {ENUM}
|
|
48
|
+
*/
|
|
49
|
+
FnoModifyStatus?: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* FNO Comment
|
|
52
|
+
*
|
|
53
|
+
* FNO Comment
|
|
54
|
+
* @type {TEXT_LONG}
|
|
55
|
+
*/
|
|
56
|
+
FnoComment?: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* ISP Modify Status
|
|
59
|
+
*
|
|
60
|
+
* ISP Modify Status
|
|
61
|
+
* @type {ENUM}
|
|
62
|
+
*/
|
|
63
|
+
IspModifyStatus?: string | null;
|
|
64
|
+
/**
|
|
65
|
+
* ISP Comment
|
|
66
|
+
*
|
|
67
|
+
* ISP Comment
|
|
68
|
+
* @type {TEXT_LONG}
|
|
69
|
+
*/
|
|
70
|
+
IspComment?: string | null;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* UpdateModifyServiceRequest
|
|
74
|
+
*
|
|
75
|
+
* @actionType UPDATE - Updates an existing ModifyServiceRequest record
|
|
76
|
+
* @module ServiceModule
|
|
77
|
+
* @entity ModifyServiceRequest
|
|
78
|
+
* @event k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Update.UpdateModifyServiceRequest
|
|
79
|
+
* @permission schema.action.updatemodifyservicerequest.trigger
|
|
80
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
81
|
+
*/
|
|
82
|
+
export declare class UpdateModifyServiceRequestDto extends OdinRecordUpdateDto<UpdateModifyServiceRequestProperties> {
|
|
83
|
+
/** Used by SDK generators to identify action type */
|
|
84
|
+
static readonly ACTION_TYPE = "UPDATE";
|
|
85
|
+
static readonly ACTION_KEY = "UpdateModifyServiceRequest";
|
|
86
|
+
static readonly MODULE_NAME = "ServiceModule";
|
|
87
|
+
static readonly ENTITIES: string[];
|
|
88
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Update.UpdateModifyServiceRequest";
|
|
89
|
+
static readonly PERMISSION = "schema.action.updatemodifyservicerequest.trigger";
|
|
90
|
+
/** Step metadata - entity this action targets */
|
|
91
|
+
static readonly STEP_ENTITY = "ServiceModule:ModifyServiceRequest";
|
|
92
|
+
static readonly STEP_SCHEMA_ID = "c33f6215-f398-4d02-a35a-ebcde2ee2669";
|
|
93
|
+
static readonly STEP_SCHEMA_ACTION_ID = "f4fb3994-062a-46f6-ad1b-badfa0bf3afa";
|
|
94
|
+
static readonly AUTO_LINK_PARENT = false;
|
|
95
|
+
readonly actionName: string;
|
|
96
|
+
readonly schemaActionId: string;
|
|
97
|
+
readonly entity: string;
|
|
98
|
+
constructor(record: OdinRecord<any> | {
|
|
99
|
+
id: string;
|
|
100
|
+
entity: string;
|
|
101
|
+
type?: string;
|
|
102
|
+
}, properties: UpdateModifyServiceRequestProperties, options?: {
|
|
103
|
+
journeyId?: string;
|
|
104
|
+
stageKey?: string;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
declare type StepClassMap = {
|
|
108
|
+
UpdateModifyServiceRequestDto: UpdateModifyServiceRequestDto;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Link definition for connecting steps in MoveMsrToHeld
|
|
112
|
+
*/
|
|
113
|
+
export interface MoveMsrToHeldStepLink {
|
|
114
|
+
/**
|
|
115
|
+
* The stepKey of the target step to link TO
|
|
116
|
+
* Must reference another step's stepKey in the same flow
|
|
117
|
+
*/
|
|
118
|
+
stepKey: string;
|
|
119
|
+
/**
|
|
120
|
+
* The schema association ID (UUID) defining the relationship
|
|
121
|
+
* Use the association.id from the schema association definition
|
|
122
|
+
* @example "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
|
|
123
|
+
*/
|
|
124
|
+
schemaAssociationId: string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Step definition with linking metadata for MoveMsrToHeld
|
|
128
|
+
*/
|
|
129
|
+
export interface MoveMsrToHeldStepDefinition {
|
|
130
|
+
/** Unique identifier for this step */
|
|
131
|
+
stepKey: string;
|
|
132
|
+
/** The DTO class name for this step */
|
|
133
|
+
dtoClass: string;
|
|
134
|
+
/** The entity this step creates (Module:Entity format) */
|
|
135
|
+
entity: string;
|
|
136
|
+
/** Links to create after this step executes */
|
|
137
|
+
linksTo: MoveMsrToHeldStepLink[] | null;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Type-safe step keys for MoveMsrToHeld
|
|
141
|
+
*/
|
|
142
|
+
export declare const MoveMsrToHeldSteps: {
|
|
143
|
+
readonly step_1: "step_1";
|
|
144
|
+
};
|
|
145
|
+
export declare type MoveMsrToHeldStepKey = typeof MoveMsrToHeldSteps[keyof typeof MoveMsrToHeldSteps];
|
|
146
|
+
/**
|
|
147
|
+
* RabbitMQ message payload for MoveMsrToHeld step flow events
|
|
148
|
+
*
|
|
149
|
+
* @event k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Transition.MoveMsrToHeld
|
|
150
|
+
*/
|
|
151
|
+
export interface MoveMsrToHeldMessage extends OdinRecordUpdatedEvent<MoveMsrToHeldDto, {}> {
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Properties for MoveMsrToHeld action
|
|
155
|
+
*
|
|
156
|
+
*/
|
|
157
|
+
export interface MoveMsrToHeldProperties {
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* MoveMsrToHeld
|
|
161
|
+
*
|
|
162
|
+
* @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
|
|
163
|
+
* @module ServiceModule
|
|
164
|
+
* @entity ModifyServiceRequest
|
|
165
|
+
* @entityType DEFAULT (Default)
|
|
166
|
+
* @targetStages ModifyServiceRequestStateStageHeld
|
|
167
|
+
* @event k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Transition.MoveMsrToHeld
|
|
168
|
+
* @permission schema.action.movemsrtoheld.trigger
|
|
169
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
170
|
+
*/
|
|
171
|
+
export declare class MoveMsrToHeldDto extends OdinRecordUpdateDto<Record<string, any>> {
|
|
172
|
+
/** Used by SDK generators to identify action type */
|
|
173
|
+
static readonly ACTION_TYPE = "UPDATE";
|
|
174
|
+
static readonly ACTION_KEY = "MoveMsrToHeld";
|
|
175
|
+
static readonly MODULE_NAME = "ServiceModule";
|
|
176
|
+
static readonly ENTITIES: string[];
|
|
177
|
+
static readonly ENTITY_TYPE = "DEFAULT";
|
|
178
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Transition.MoveMsrToHeld";
|
|
179
|
+
static readonly SCHEMA_ACTION_ID = "a2331418-7935-4f84-a449-7691942cb218";
|
|
180
|
+
static readonly PERMISSION = "schema.action.movemsrtoheld.trigger";
|
|
181
|
+
static readonly TARGET_STAGES: readonly ["ModifyServiceRequestStateStageHeld"];
|
|
182
|
+
static readonly IS_STAGE_TRANSITION = true;
|
|
183
|
+
static readonly IS_MULTI_STEP_FLOW = false;
|
|
184
|
+
static readonly HAS_STEP_LINKS = false;
|
|
185
|
+
/**
|
|
186
|
+
* Step definitions with linking metadata
|
|
187
|
+
* Used by SDK and backend for auto-linking after step execution
|
|
188
|
+
*/
|
|
189
|
+
static readonly stepDefinitions: MoveMsrToHeldStepDefinition[];
|
|
190
|
+
/** Type-safe step key accessor */
|
|
191
|
+
static readonly Steps: {
|
|
192
|
+
readonly step_1: "step_1";
|
|
193
|
+
};
|
|
194
|
+
readonly actionName: string;
|
|
195
|
+
readonly schemaActionId: string;
|
|
196
|
+
readonly entity: string;
|
|
197
|
+
readonly stageKey: string;
|
|
198
|
+
constructor(record: OdinRecord<any> | {
|
|
199
|
+
id: string;
|
|
200
|
+
entity: string;
|
|
201
|
+
type?: string;
|
|
202
|
+
}, options?: {
|
|
203
|
+
journeyId?: string;
|
|
204
|
+
});
|
|
205
|
+
/** Step classes that can be used with this action */
|
|
206
|
+
static readonly stepClasses: readonly ["UpdateModifyServiceRequestDto"];
|
|
207
|
+
steps: StepClassMap[(typeof MoveMsrToHeldDto.stepClasses)[number]][];
|
|
208
|
+
}
|
|
209
|
+
export {};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MoveMsrToHeld Action DTO
|
|
4
|
+
*
|
|
5
|
+
* MoveMsrToHeld
|
|
6
|
+
*
|
|
7
|
+
* @module ServiceModule
|
|
8
|
+
* @entity ModifyServiceRequest
|
|
9
|
+
* @entityType DEFAULT
|
|
10
|
+
* @actionKey MoveMsrToHeld
|
|
11
|
+
* @event k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Transition.MoveMsrToHeld
|
|
12
|
+
*
|
|
13
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.MoveMsrToHeldDto = exports.MoveMsrToHeldSteps = exports.UpdateModifyServiceRequestDto = void 0;
|
|
17
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
18
|
+
/**
|
|
19
|
+
* UpdateModifyServiceRequest
|
|
20
|
+
*
|
|
21
|
+
* @actionType UPDATE - Updates an existing ModifyServiceRequest record
|
|
22
|
+
* @module ServiceModule
|
|
23
|
+
* @entity ModifyServiceRequest
|
|
24
|
+
* @event k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Update.UpdateModifyServiceRequest
|
|
25
|
+
* @permission schema.action.updatemodifyservicerequest.trigger
|
|
26
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
27
|
+
*/
|
|
28
|
+
class UpdateModifyServiceRequestDto extends core_1.OdinRecordUpdateDto {
|
|
29
|
+
constructor(record, properties, options) {
|
|
30
|
+
super({
|
|
31
|
+
id: record.id,
|
|
32
|
+
entity: record.entity,
|
|
33
|
+
type: record.type,
|
|
34
|
+
properties,
|
|
35
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
36
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
37
|
+
});
|
|
38
|
+
this.actionName = 'UpdateModifyServiceRequest';
|
|
39
|
+
this.schemaActionId = 'f4fb3994-062a-46f6-ad1b-badfa0bf3afa';
|
|
40
|
+
this.entity = 'ServiceModule:ModifyServiceRequest';
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.UpdateModifyServiceRequestDto = UpdateModifyServiceRequestDto;
|
|
44
|
+
/** Used by SDK generators to identify action type */
|
|
45
|
+
UpdateModifyServiceRequestDto.ACTION_TYPE = 'UPDATE';
|
|
46
|
+
UpdateModifyServiceRequestDto.ACTION_KEY = 'UpdateModifyServiceRequest';
|
|
47
|
+
UpdateModifyServiceRequestDto.MODULE_NAME = 'ServiceModule';
|
|
48
|
+
UpdateModifyServiceRequestDto.ENTITIES = ['ModifyServiceRequest'];
|
|
49
|
+
UpdateModifyServiceRequestDto.EVENT_NAME = 'k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Update.UpdateModifyServiceRequest';
|
|
50
|
+
UpdateModifyServiceRequestDto.PERMISSION = 'schema.action.updatemodifyservicerequest.trigger';
|
|
51
|
+
/** Step metadata - entity this action targets */
|
|
52
|
+
UpdateModifyServiceRequestDto.STEP_ENTITY = 'ServiceModule:ModifyServiceRequest';
|
|
53
|
+
UpdateModifyServiceRequestDto.STEP_SCHEMA_ID = 'c33f6215-f398-4d02-a35a-ebcde2ee2669';
|
|
54
|
+
UpdateModifyServiceRequestDto.STEP_SCHEMA_ACTION_ID = 'f4fb3994-062a-46f6-ad1b-badfa0bf3afa';
|
|
55
|
+
UpdateModifyServiceRequestDto.AUTO_LINK_PARENT = false;
|
|
56
|
+
/**
|
|
57
|
+
* Type-safe step keys for MoveMsrToHeld
|
|
58
|
+
*/
|
|
59
|
+
exports.MoveMsrToHeldSteps = {
|
|
60
|
+
step_1: 'step_1',
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* MoveMsrToHeld
|
|
64
|
+
*
|
|
65
|
+
* @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
|
|
66
|
+
* @module ServiceModule
|
|
67
|
+
* @entity ModifyServiceRequest
|
|
68
|
+
* @entityType DEFAULT (Default)
|
|
69
|
+
* @targetStages ModifyServiceRequestStateStageHeld
|
|
70
|
+
* @event k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Transition.MoveMsrToHeld
|
|
71
|
+
* @permission schema.action.movemsrtoheld.trigger
|
|
72
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
73
|
+
*/
|
|
74
|
+
class MoveMsrToHeldDto extends core_1.OdinRecordUpdateDto {
|
|
75
|
+
constructor(record, options) {
|
|
76
|
+
super({
|
|
77
|
+
id: record.id,
|
|
78
|
+
entity: record.entity,
|
|
79
|
+
type: record.type,
|
|
80
|
+
properties: {},
|
|
81
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
82
|
+
});
|
|
83
|
+
this.actionName = 'MoveMsrToHeld';
|
|
84
|
+
this.schemaActionId = 'a2331418-7935-4f84-a449-7691942cb218';
|
|
85
|
+
this.entity = 'ServiceModule:ModifyServiceRequest';
|
|
86
|
+
this.stageKey = 'ModifyServiceRequestStateStageHeld';
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.MoveMsrToHeldDto = MoveMsrToHeldDto;
|
|
90
|
+
/** Used by SDK generators to identify action type */
|
|
91
|
+
MoveMsrToHeldDto.ACTION_TYPE = 'UPDATE';
|
|
92
|
+
MoveMsrToHeldDto.ACTION_KEY = 'MoveMsrToHeld';
|
|
93
|
+
MoveMsrToHeldDto.MODULE_NAME = 'ServiceModule';
|
|
94
|
+
MoveMsrToHeldDto.ENTITIES = ['ModifyServiceRequest'];
|
|
95
|
+
MoveMsrToHeldDto.ENTITY_TYPE = 'DEFAULT';
|
|
96
|
+
MoveMsrToHeldDto.EVENT_NAME = 'k1.t-hEOJjsDb.ServiceModule.ModifyServiceRequest.Transition.MoveMsrToHeld';
|
|
97
|
+
MoveMsrToHeldDto.SCHEMA_ACTION_ID = 'a2331418-7935-4f84-a449-7691942cb218';
|
|
98
|
+
MoveMsrToHeldDto.PERMISSION = 'schema.action.movemsrtoheld.trigger';
|
|
99
|
+
MoveMsrToHeldDto.TARGET_STAGES = ['ModifyServiceRequestStateStageHeld'];
|
|
100
|
+
MoveMsrToHeldDto.IS_STAGE_TRANSITION = true;
|
|
101
|
+
MoveMsrToHeldDto.IS_MULTI_STEP_FLOW = false;
|
|
102
|
+
MoveMsrToHeldDto.HAS_STEP_LINKS = false;
|
|
103
|
+
/**
|
|
104
|
+
* Step definitions with linking metadata
|
|
105
|
+
* Used by SDK and backend for auto-linking after step execution
|
|
106
|
+
*/
|
|
107
|
+
MoveMsrToHeldDto.stepDefinitions = [
|
|
108
|
+
{
|
|
109
|
+
stepKey: 'step_1',
|
|
110
|
+
dtoClass: 'UpdateModifyServiceRequestDto',
|
|
111
|
+
entity: 'ServiceModule:ModifyServiceRequest',
|
|
112
|
+
linksTo: null
|
|
113
|
+
}
|
|
114
|
+
];
|
|
115
|
+
/** Type-safe step key accessor */
|
|
116
|
+
MoveMsrToHeldDto.Steps = exports.MoveMsrToHeldSteps;
|
|
117
|
+
/** Step classes that can be used with this action */
|
|
118
|
+
MoveMsrToHeldDto.stepClasses = ['UpdateModifyServiceRequestDto'];
|
|
@@ -21,7 +21,7 @@ export interface UpdateCallAnalyticsMessage extends OdinRecordUpdatedEvent<Updat
|
|
|
21
21
|
/**
|
|
22
22
|
* Properties for UpdateCallAnalytics action
|
|
23
23
|
*
|
|
24
|
-
* @property Required fields:
|
|
24
|
+
* @property Required fields: 4
|
|
25
25
|
* @property Optional fields: 1
|
|
26
26
|
*/
|
|
27
27
|
export interface UpdateCallAnalyticsProperties {
|
|
@@ -41,14 +41,6 @@ export interface UpdateCallAnalyticsProperties {
|
|
|
41
41
|
* @required
|
|
42
42
|
*/
|
|
43
43
|
TimeInProgress: string;
|
|
44
|
-
/**
|
|
45
|
-
* TimeInInitiated
|
|
46
|
-
*
|
|
47
|
-
* TimeInInitiated (Communications - Call)
|
|
48
|
-
* @type {TEXT}
|
|
49
|
-
* @required
|
|
50
|
-
*/
|
|
51
|
-
TimeInInitiated: string;
|
|
52
44
|
/**
|
|
53
45
|
* CustomerHoldTotalSec
|
|
54
46
|
*
|
|
@@ -65,14 +57,6 @@ export interface UpdateCallAnalyticsProperties {
|
|
|
65
57
|
* @required
|
|
66
58
|
*/
|
|
67
59
|
AgentHoldTotalSec: string;
|
|
68
|
-
/**
|
|
69
|
-
* RingingTimeTotalSec
|
|
70
|
-
*
|
|
71
|
-
* RingingTimeTotalSec
|
|
72
|
-
* @type {TEXT}
|
|
73
|
-
* @required
|
|
74
|
-
*/
|
|
75
|
-
RingingTimeTotalSec: string;
|
|
76
60
|
/**
|
|
77
61
|
* Time in IVR
|
|
78
62
|
*
|
|
@@ -22,7 +22,7 @@ export interface UpdateCallOnInboundCallAnsweredMessage extends OdinRecordUpdate
|
|
|
22
22
|
* Properties for UpdateCallOnInboundCallAnswered action
|
|
23
23
|
*
|
|
24
24
|
* @property Required fields: 4
|
|
25
|
-
* @property Optional fields:
|
|
25
|
+
* @property Optional fields: 4
|
|
26
26
|
*/
|
|
27
27
|
export interface UpdateCallOnInboundCallAnsweredProperties {
|
|
28
28
|
/**
|
|
@@ -53,10 +53,10 @@ export interface UpdateCallOnInboundCallAnsweredProperties {
|
|
|
53
53
|
* QueueTime
|
|
54
54
|
*
|
|
55
55
|
* Seconds spent in queue (Communications - Call)
|
|
56
|
-
* @type {
|
|
56
|
+
* @type {TEXT}
|
|
57
57
|
* @required
|
|
58
58
|
*/
|
|
59
|
-
QueueTime:
|
|
59
|
+
QueueTime: string;
|
|
60
60
|
/**
|
|
61
61
|
* RingingDuration
|
|
62
62
|
*
|
|
@@ -78,6 +78,13 @@ export interface UpdateCallOnInboundCallAnsweredProperties {
|
|
|
78
78
|
* @type {DATE_TIME}
|
|
79
79
|
*/
|
|
80
80
|
QueueEntryTime?: string | null;
|
|
81
|
+
/**
|
|
82
|
+
* To
|
|
83
|
+
*
|
|
84
|
+
* Data field for Call records. Used by Communications team.
|
|
85
|
+
* @type {TEXT}
|
|
86
|
+
*/
|
|
87
|
+
To?: string | null;
|
|
81
88
|
}
|
|
82
89
|
/**
|
|
83
90
|
* UpdateCallOnInboundCallAnswered
|
|
@@ -22,7 +22,7 @@ export interface UpdateCallOnInboundCallCompletedMessage extends OdinRecordUpdat
|
|
|
22
22
|
* Properties for UpdateCallOnInboundCallCompleted action
|
|
23
23
|
*
|
|
24
24
|
* @property Required fields: 3
|
|
25
|
-
* @property Optional fields:
|
|
25
|
+
* @property Optional fields: 2
|
|
26
26
|
*/
|
|
27
27
|
export interface UpdateCallOnInboundCallCompletedProperties {
|
|
28
28
|
/**
|
|
@@ -56,6 +56,13 @@ export interface UpdateCallOnInboundCallCompletedProperties {
|
|
|
56
56
|
* @type {DATE_TIME}
|
|
57
57
|
*/
|
|
58
58
|
EndTime?: string | null;
|
|
59
|
+
/**
|
|
60
|
+
* RecordingStatus
|
|
61
|
+
*
|
|
62
|
+
* RecordingStatus (Communications - Call)
|
|
63
|
+
* @type {TEXT}
|
|
64
|
+
*/
|
|
65
|
+
RecordingStatus?: string | null;
|
|
59
66
|
}
|
|
60
67
|
/**
|
|
61
68
|
* UpdateCallOnInboundCallCompleted
|
|
@@ -53,18 +53,18 @@ export interface UpdateCallOnNumberCallStatusProperties {
|
|
|
53
53
|
* TotalDuration
|
|
54
54
|
*
|
|
55
55
|
* Total call duration in seconds from customer perspective (Communications - Call)
|
|
56
|
-
* @type {
|
|
56
|
+
* @type {TEXT}
|
|
57
57
|
* @required
|
|
58
58
|
*/
|
|
59
|
-
TotalDuration:
|
|
59
|
+
TotalDuration: string;
|
|
60
60
|
/**
|
|
61
61
|
* QueueTime
|
|
62
62
|
*
|
|
63
63
|
* Seconds spent in queue (Communications - Call)
|
|
64
|
-
* @type {
|
|
64
|
+
* @type {TEXT}
|
|
65
65
|
* @required
|
|
66
66
|
*/
|
|
67
|
-
QueueTime:
|
|
67
|
+
QueueTime: string;
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
70
|
* UpdateCallOnNumberCallStatus
|
|
@@ -53,10 +53,10 @@ export interface UpdateCallOnOutboundDialActionProperties {
|
|
|
53
53
|
* TotalDuration
|
|
54
54
|
*
|
|
55
55
|
* Total call duration in seconds from customer perspective (Communications - Call)
|
|
56
|
-
* @type {
|
|
56
|
+
* @type {TEXT}
|
|
57
57
|
* @required
|
|
58
58
|
*/
|
|
59
|
-
TotalDuration:
|
|
59
|
+
TotalDuration: string;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* UpdateCallOnOutboundDialAction
|
|
@@ -151,8 +151,6 @@ export declare enum CallPropertyKeys {
|
|
|
151
151
|
CallStatus = "CallStatus",
|
|
152
152
|
/** transcription url from AWS (Communications - Call) */
|
|
153
153
|
TranscriptionUrl = "TranscriptionUrl",
|
|
154
|
-
/** TimeInInitiated (Communications - Call) */
|
|
155
|
-
TimeInInitiated = "TimeInInitiated",
|
|
156
154
|
/** the source channel (Communications - Call) */
|
|
157
155
|
Channel = "Channel",
|
|
158
156
|
/** RecordingUrl (Communications - Call) */
|
|
@@ -167,10 +165,10 @@ export declare enum CallPropertyKeys {
|
|
|
167
165
|
CallStage = "CallStage",
|
|
168
166
|
/** the external id from the call management system (Communications - Call) */
|
|
169
167
|
ExternalId = "ExternalId",
|
|
170
|
-
/** Seconds spent in queue (Communications - Call) */
|
|
171
|
-
QueueTime = "QueueTime",
|
|
172
168
|
/** WorkOrderId (Communications - Call) */
|
|
173
169
|
WorkOrderId = "WorkOrderId",
|
|
170
|
+
/** Seconds spent in queue (Communications - Call) */
|
|
171
|
+
QueueTime = "QueueTime",
|
|
174
172
|
/** TransferCallId (Communications - Call) */
|
|
175
173
|
TransferCallId = "TransferCallId",
|
|
176
174
|
/** Wrap up taskSid (Communications - Call) */
|
|
@@ -224,9 +222,7 @@ export declare enum CallPropertyKeys {
|
|
|
224
222
|
/** IVRDuration */
|
|
225
223
|
IvrDuration = "IVRDuration",
|
|
226
224
|
/** CallEndReason */
|
|
227
|
-
CallEndReason = "CallEndReason"
|
|
228
|
-
/** RingingTimeTotalSec */
|
|
229
|
-
RingingTimeTotalSec = "RingingTimeTotalSec"
|
|
225
|
+
CallEndReason = "CallEndReason"
|
|
230
226
|
}
|
|
231
227
|
/**
|
|
232
228
|
* Properties for Call records
|
|
@@ -292,11 +288,6 @@ export interface CallProperties {
|
|
|
292
288
|
* @type {TEXT}
|
|
293
289
|
*/
|
|
294
290
|
TranscriptionUrl: string;
|
|
295
|
-
/** TimeInInitiated (Communications - Call)
|
|
296
|
-
*
|
|
297
|
-
* @type {TEXT}
|
|
298
|
-
*/
|
|
299
|
-
TimeInInitiated: string;
|
|
300
291
|
/** the source channel (Communications - Call)
|
|
301
292
|
*
|
|
302
293
|
* @type {TEXT}
|
|
@@ -336,17 +327,17 @@ export interface CallProperties {
|
|
|
336
327
|
* @hidden This field is hidden in the UI
|
|
337
328
|
*/
|
|
338
329
|
ExternalId: string;
|
|
339
|
-
/** Seconds spent in queue (Communications - Call)
|
|
340
|
-
*
|
|
341
|
-
* @type {NUMBER}
|
|
342
|
-
*/
|
|
343
|
-
QueueTime: number;
|
|
344
330
|
/** WorkOrderId (Communications - Call)
|
|
345
331
|
*
|
|
346
332
|
* @type {LOOKUP}
|
|
347
333
|
* @hidden This field is hidden in the UI
|
|
348
334
|
*/
|
|
349
335
|
WorkOrderId: string;
|
|
336
|
+
/** Seconds spent in queue (Communications - Call)
|
|
337
|
+
*
|
|
338
|
+
* @type {TEXT}
|
|
339
|
+
*/
|
|
340
|
+
QueueTime: string;
|
|
350
341
|
/** TransferCallId (Communications - Call)
|
|
351
342
|
*
|
|
352
343
|
* @type {UUID}
|
|
@@ -431,9 +422,9 @@ export interface CallProperties {
|
|
|
431
422
|
CustomerConnection: string;
|
|
432
423
|
/** Total call duration in seconds from customer perspective (Communications - Call)
|
|
433
424
|
*
|
|
434
|
-
* @type {
|
|
425
|
+
* @type {TEXT}
|
|
435
426
|
*/
|
|
436
|
-
TotalDuration:
|
|
427
|
+
TotalDuration: string;
|
|
437
428
|
/** RecordingDuration (Communications - Call)
|
|
438
429
|
*
|
|
439
430
|
* @type {TEXT}
|
|
@@ -485,11 +476,6 @@ export interface CallProperties {
|
|
|
485
476
|
* @enum {CallCallEndReason}
|
|
486
477
|
*/
|
|
487
478
|
CallEndReason: CallCallEndReason;
|
|
488
|
-
/** RingingTimeTotalSec
|
|
489
|
-
*
|
|
490
|
-
* @type {TEXT}
|
|
491
|
-
*/
|
|
492
|
-
RingingTimeTotalSec: string;
|
|
493
479
|
}
|
|
494
480
|
/**
|
|
495
481
|
* Call entity from NotificationModule
|
package/dist/entities-v2/Call.js
CHANGED
|
@@ -150,8 +150,6 @@ var CallPropertyKeys;
|
|
|
150
150
|
CallPropertyKeys["CallStatus"] = "CallStatus";
|
|
151
151
|
/** transcription url from AWS (Communications - Call) */
|
|
152
152
|
CallPropertyKeys["TranscriptionUrl"] = "TranscriptionUrl";
|
|
153
|
-
/** TimeInInitiated (Communications - Call) */
|
|
154
|
-
CallPropertyKeys["TimeInInitiated"] = "TimeInInitiated";
|
|
155
153
|
/** the source channel (Communications - Call) */
|
|
156
154
|
CallPropertyKeys["Channel"] = "Channel";
|
|
157
155
|
/** RecordingUrl (Communications - Call) */
|
|
@@ -166,10 +164,10 @@ var CallPropertyKeys;
|
|
|
166
164
|
CallPropertyKeys["CallStage"] = "CallStage";
|
|
167
165
|
/** the external id from the call management system (Communications - Call) */
|
|
168
166
|
CallPropertyKeys["ExternalId"] = "ExternalId";
|
|
169
|
-
/** Seconds spent in queue (Communications - Call) */
|
|
170
|
-
CallPropertyKeys["QueueTime"] = "QueueTime";
|
|
171
167
|
/** WorkOrderId (Communications - Call) */
|
|
172
168
|
CallPropertyKeys["WorkOrderId"] = "WorkOrderId";
|
|
169
|
+
/** Seconds spent in queue (Communications - Call) */
|
|
170
|
+
CallPropertyKeys["QueueTime"] = "QueueTime";
|
|
173
171
|
/** TransferCallId (Communications - Call) */
|
|
174
172
|
CallPropertyKeys["TransferCallId"] = "TransferCallId";
|
|
175
173
|
/** Wrap up taskSid (Communications - Call) */
|
|
@@ -224,8 +222,6 @@ var CallPropertyKeys;
|
|
|
224
222
|
CallPropertyKeys["IvrDuration"] = "IVRDuration";
|
|
225
223
|
/** CallEndReason */
|
|
226
224
|
CallPropertyKeys["CallEndReason"] = "CallEndReason";
|
|
227
|
-
/** RingingTimeTotalSec */
|
|
228
|
-
CallPropertyKeys["RingingTimeTotalSec"] = "RingingTimeTotalSec";
|
|
229
225
|
})(CallPropertyKeys = exports.CallPropertyKeys || (exports.CallPropertyKeys = {}));
|
|
230
226
|
/**
|
|
231
227
|
* Call entity from NotificationModule
|
|
@@ -212,6 +212,68 @@ export declare class MoveMsrToFailedFlowBuilder {
|
|
|
212
212
|
private _buildRequestPayload;
|
|
213
213
|
}
|
|
214
214
|
/** Options for a flow step */
|
|
215
|
+
export interface MoveMsrToHeldFlowBuilderStepOptions {
|
|
216
|
+
/** Associations to create with this step */
|
|
217
|
+
associations?: Array<{
|
|
218
|
+
recordId?: string;
|
|
219
|
+
entity?: string;
|
|
220
|
+
}>;
|
|
221
|
+
/** Groups for this step */
|
|
222
|
+
groups?: string[];
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* FlowBuilder for MoveMsrToHeld multi-step action
|
|
226
|
+
*
|
|
227
|
+
* Use method chaining to add steps, then call execute() to run the flow.
|
|
228
|
+
* Transitions to stage: ModifyServiceRequestStateStageHeld
|
|
229
|
+
*/
|
|
230
|
+
export declare class MoveMsrToHeldFlowBuilder {
|
|
231
|
+
private _record;
|
|
232
|
+
private _provider;
|
|
233
|
+
private _pendingLinks;
|
|
234
|
+
private _options?;
|
|
235
|
+
private _groups;
|
|
236
|
+
private _steps;
|
|
237
|
+
constructor(record: ModifyServiceRequestRecord<any>, provider: IOdinProvider, pendingLinks: OdinRecordLinkDto[], options?: {
|
|
238
|
+
journeyId?: string;
|
|
239
|
+
});
|
|
240
|
+
/**
|
|
241
|
+
* Add a group to the main action
|
|
242
|
+
* @param group - Group name to add
|
|
243
|
+
* @returns this (for method chaining)
|
|
244
|
+
*/
|
|
245
|
+
addGroup(group: string): this;
|
|
246
|
+
/**
|
|
247
|
+
* Add UpdateModifyServiceRequest step to the flow
|
|
248
|
+
* @param id - ID of the record to update
|
|
249
|
+
* @param properties - Properties for this step
|
|
250
|
+
* @param options - Optional step settings
|
|
251
|
+
* @returns this (for method chaining)
|
|
252
|
+
*/
|
|
253
|
+
updateModifyServiceRequest(id: string, properties: UpdateModifyServiceRequestProperties, options?: MoveMsrToHeldFlowBuilderStepOptions): this;
|
|
254
|
+
/**
|
|
255
|
+
* Execute the flow
|
|
256
|
+
* @returns The result from the API
|
|
257
|
+
*/
|
|
258
|
+
execute(): Promise<IDbRecordCreateUpdateRes[]>;
|
|
259
|
+
/**
|
|
260
|
+
* Returns the request payload without executing (for debugging)
|
|
261
|
+
* @returns The request payload that would be sent to the API
|
|
262
|
+
*/
|
|
263
|
+
dryRun(): Record<string, any>;
|
|
264
|
+
/**
|
|
265
|
+
* Prevents accidental `await flowBuilder` without .execute()
|
|
266
|
+
* Forces developers to explicitly call .execute()
|
|
267
|
+
* @throws Error always - use .execute() or .dryRun() instead
|
|
268
|
+
*/
|
|
269
|
+
then(): never;
|
|
270
|
+
/**
|
|
271
|
+
* Build the request payload for the action
|
|
272
|
+
* @private
|
|
273
|
+
*/
|
|
274
|
+
private _buildRequestPayload;
|
|
275
|
+
}
|
|
276
|
+
/** Options for a flow step */
|
|
215
277
|
export interface MoveMsrToInProgressFlowBuilderStepOptions {
|
|
216
278
|
/** Associations to create with this step */
|
|
217
279
|
associations?: Array<{
|
|
@@ -481,6 +543,30 @@ export declare class ModifyServiceRequestRecord<TProps = ModifyServiceRequestPro
|
|
|
481
543
|
moveMsrToFailed(options?: {
|
|
482
544
|
journeyId?: string;
|
|
483
545
|
}): MoveMsrToFailedFlowBuilder;
|
|
546
|
+
/**
|
|
547
|
+
* MoveMsrToHeld
|
|
548
|
+
*
|
|
549
|
+
* Starts a stage transition flow on this ModifyServiceRequest record.
|
|
550
|
+
* Chain step methods and call .execute() to run the flow.
|
|
551
|
+
*
|
|
552
|
+
* @remarks Transitions to stage: ModifyServiceRequestStateStageHeld
|
|
553
|
+
*
|
|
554
|
+
* @param options - Optional settings
|
|
555
|
+
* @param options.journeyId - Associate with a journey
|
|
556
|
+
* @returns FlowBuilder for chaining step methods
|
|
557
|
+
* @throws Error if called on a new (unsaved) record
|
|
558
|
+
*
|
|
559
|
+
* @example
|
|
560
|
+
* ```typescript
|
|
561
|
+
* const record = await odinClient.modifyServiceRequests.get(id);
|
|
562
|
+
* await record.moveMsrToHeld()
|
|
563
|
+
* .updateModifyServiceRequest(recordId, { ... })
|
|
564
|
+
* .execute();
|
|
565
|
+
* ```
|
|
566
|
+
*/
|
|
567
|
+
moveMsrToHeld(options?: {
|
|
568
|
+
journeyId?: string;
|
|
569
|
+
}): MoveMsrToHeldFlowBuilder;
|
|
484
570
|
/**
|
|
485
571
|
* MoveMsrToInProgress
|
|
486
572
|
*
|
|
@@ -28,7 +28,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.isModifyServiceRequestRecord = exports.ModifyServiceRequestRecord = exports.MoveMsrToInProgressFlowBuilder = exports.MoveMsrToFailedFlowBuilder = exports.MoveMsrToCompleteFlowBuilder = void 0;
|
|
31
|
+
exports.isModifyServiceRequestRecord = exports.ModifyServiceRequestRecord = exports.MoveMsrToInProgressFlowBuilder = exports.MoveMsrToHeldFlowBuilder = exports.MoveMsrToFailedFlowBuilder = exports.MoveMsrToCompleteFlowBuilder = void 0;
|
|
32
32
|
const uuid_1 = require("uuid");
|
|
33
33
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
34
34
|
const record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/record-link-manager");
|
|
@@ -324,6 +324,113 @@ class MoveMsrToFailedFlowBuilder {
|
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
exports.MoveMsrToFailedFlowBuilder = MoveMsrToFailedFlowBuilder;
|
|
327
|
+
/**
|
|
328
|
+
* FlowBuilder for MoveMsrToHeld multi-step action
|
|
329
|
+
*
|
|
330
|
+
* Use method chaining to add steps, then call execute() to run the flow.
|
|
331
|
+
* Transitions to stage: ModifyServiceRequestStateStageHeld
|
|
332
|
+
*/
|
|
333
|
+
class MoveMsrToHeldFlowBuilder {
|
|
334
|
+
constructor(record, provider, pendingLinks, options) {
|
|
335
|
+
this._groups = [];
|
|
336
|
+
this._steps = [];
|
|
337
|
+
this._record = record;
|
|
338
|
+
this._provider = provider;
|
|
339
|
+
this._pendingLinks = pendingLinks;
|
|
340
|
+
this._options = options;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Add a group to the main action
|
|
344
|
+
* @param group - Group name to add
|
|
345
|
+
* @returns this (for method chaining)
|
|
346
|
+
*/
|
|
347
|
+
addGroup(group) {
|
|
348
|
+
this._groups.push(group);
|
|
349
|
+
return this;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Add UpdateModifyServiceRequest step to the flow
|
|
353
|
+
* @param id - ID of the record to update
|
|
354
|
+
* @param properties - Properties for this step
|
|
355
|
+
* @param options - Optional step settings
|
|
356
|
+
* @returns this (for method chaining)
|
|
357
|
+
*/
|
|
358
|
+
updateModifyServiceRequest(id, properties, options) {
|
|
359
|
+
var _a;
|
|
360
|
+
this._steps.push({
|
|
361
|
+
actionName: 'UpdateModifyServiceRequest',
|
|
362
|
+
properties,
|
|
363
|
+
id,
|
|
364
|
+
entity: 'ServiceModule:ModifyServiceRequest',
|
|
365
|
+
autoLinkParent: false,
|
|
366
|
+
associations: (_a = options === null || options === void 0 ? void 0 : options.associations) === null || _a === void 0 ? void 0 : _a.map(a => (Object.assign(Object.assign({}, a), { linkType: null, relationType: undefined }))),
|
|
367
|
+
groups: options === null || options === void 0 ? void 0 : options.groups,
|
|
368
|
+
});
|
|
369
|
+
return this;
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Execute the flow
|
|
373
|
+
* @returns The result from the API
|
|
374
|
+
*/
|
|
375
|
+
execute() {
|
|
376
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
377
|
+
const payload = this._buildRequestPayload();
|
|
378
|
+
const result = yield this._provider._applyAction('ServiceModule', 'ModifyServiceRequest', payload);
|
|
379
|
+
// Clear pending links on the record after execution
|
|
380
|
+
this._record.clearPendingLinks();
|
|
381
|
+
return result;
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Returns the request payload without executing (for debugging)
|
|
386
|
+
* @returns The request payload that would be sent to the API
|
|
387
|
+
*/
|
|
388
|
+
dryRun() {
|
|
389
|
+
return this._buildRequestPayload();
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Prevents accidental `await flowBuilder` without .execute()
|
|
393
|
+
* Forces developers to explicitly call .execute()
|
|
394
|
+
* @throws Error always - use .execute() or .dryRun() instead
|
|
395
|
+
*/
|
|
396
|
+
then() {
|
|
397
|
+
throw new Error('FlowBuilder cannot be awaited directly. Call .execute() to run the flow or .dryRun() to get the payload.');
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Build the request payload for the action
|
|
401
|
+
* @private
|
|
402
|
+
*/
|
|
403
|
+
_buildRequestPayload() {
|
|
404
|
+
const record = this._record.record;
|
|
405
|
+
if (!(record === null || record === void 0 ? void 0 : record.id))
|
|
406
|
+
throw new Error('Cannot execute flow on unsaved record');
|
|
407
|
+
// Build steps with parent associations
|
|
408
|
+
const stepsWithAssociations = this._steps.map(step => {
|
|
409
|
+
const stepAssociations = [...(step.associations || [])];
|
|
410
|
+
// Auto-add parent association if step requires it
|
|
411
|
+
if (step.autoLinkParent) {
|
|
412
|
+
stepAssociations.push({
|
|
413
|
+
entity: record.entity,
|
|
414
|
+
recordId: record.id,
|
|
415
|
+
linkType: null,
|
|
416
|
+
relationType: 'PARENT',
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
return {
|
|
420
|
+
entity: step.entity,
|
|
421
|
+
type: step.type,
|
|
422
|
+
actionName: step.actionName,
|
|
423
|
+
properties: step.properties,
|
|
424
|
+
title: step.title,
|
|
425
|
+
id: step.id,
|
|
426
|
+
associations: stepAssociations.length > 0 ? stepAssociations : undefined,
|
|
427
|
+
groups: step.groups,
|
|
428
|
+
};
|
|
429
|
+
});
|
|
430
|
+
return Object.assign({ id: record.id, entity: record.entity, type: record.type, actionName: 'MoveMsrToHeld', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined, stageKey: 'ModifyServiceRequestStateStageHeld' }, this._options);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
exports.MoveMsrToHeldFlowBuilder = MoveMsrToHeldFlowBuilder;
|
|
327
434
|
/**
|
|
328
435
|
* FlowBuilder for MoveMsrToInProgress multi-step action
|
|
329
436
|
*
|
|
@@ -712,6 +819,33 @@ class ModifyServiceRequestRecord {
|
|
|
712
819
|
throw new Error('moveMsrToFailed requires an existing record. Use accessor.get() first.');
|
|
713
820
|
return new MoveMsrToFailedFlowBuilder(this, this._provider, this._pendingLinks, options);
|
|
714
821
|
}
|
|
822
|
+
/**
|
|
823
|
+
* MoveMsrToHeld
|
|
824
|
+
*
|
|
825
|
+
* Starts a stage transition flow on this ModifyServiceRequest record.
|
|
826
|
+
* Chain step methods and call .execute() to run the flow.
|
|
827
|
+
*
|
|
828
|
+
* @remarks Transitions to stage: ModifyServiceRequestStateStageHeld
|
|
829
|
+
*
|
|
830
|
+
* @param options - Optional settings
|
|
831
|
+
* @param options.journeyId - Associate with a journey
|
|
832
|
+
* @returns FlowBuilder for chaining step methods
|
|
833
|
+
* @throws Error if called on a new (unsaved) record
|
|
834
|
+
*
|
|
835
|
+
* @example
|
|
836
|
+
* ```typescript
|
|
837
|
+
* const record = await odinClient.modifyServiceRequests.get(id);
|
|
838
|
+
* await record.moveMsrToHeld()
|
|
839
|
+
* .updateModifyServiceRequest(recordId, { ... })
|
|
840
|
+
* .execute();
|
|
841
|
+
* ```
|
|
842
|
+
*/
|
|
843
|
+
moveMsrToHeld(options) {
|
|
844
|
+
var _a;
|
|
845
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
846
|
+
throw new Error('moveMsrToHeld requires an existing record. Use accessor.get() first.');
|
|
847
|
+
return new MoveMsrToHeldFlowBuilder(this, this._provider, this._pendingLinks, options);
|
|
848
|
+
}
|
|
715
849
|
/**
|
|
716
850
|
* MoveMsrToInProgress
|
|
717
851
|
*
|