@d19n/youfibre-odin-sdk 2.0.102-beta.2 → 2.0.102-beta.4
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 +2 -1
- package/dist/actions-v2/CreateCustomerCallLegDto.d.ts +10 -105
- package/dist/actions-v2/CreateCustomerCallLegDto.js +1 -121
- package/dist/actions-v2/SendDirectDebitCreatedEmailDto.d.ts +8 -1
- package/dist/actions-v2/SendDirectDebitFailedEmailDto.d.ts +8 -1
- package/dist/actions-v2/SendDirectDebitSetupConfirmationEmailDto.d.ts +8 -1
- package/dist/actions-v2/SendDirectDebitSetupRequestDto.d.ts +8 -1
- package/dist/actions-v2/UpdateCallOnTaskRouterAssignDto.d.ts +96 -0
- package/dist/actions-v2/UpdateCallOnTaskRouterAssignDto.js +56 -0
- package/dist/records-v2/CallLegRecord.d.ts +10 -8
- package/dist/records-v2/CallLegRecord.js +19 -8
- package/dist/records-v2/CallRecord.d.ts +27 -0
- package/dist/records-v2/CallRecord.js +29 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -352,7 +352,7 @@ This SDK includes **164** entities across **12** modules.
|
|
|
352
352
|
|
|
353
353
|
## Actions
|
|
354
354
|
|
|
355
|
-
This SDK includes **
|
|
355
|
+
This SDK includes **620** actions.
|
|
356
356
|
|
|
357
357
|
### Action Types
|
|
358
358
|
|
|
@@ -1171,6 +1171,7 @@ This SDK includes **619** actions.
|
|
|
1171
1171
|
| Action | Type | Event |
|
|
1172
1172
|
|--------|------|-------|
|
|
1173
1173
|
| `CreateCall` | CREATE | k1.t-hEOJjsDb.NotificationModule.Call.Create.CreateCall |
|
|
1174
|
+
| `UpdateCallOnTaskRouterAssign` | UPDATE | k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallOnTaskRouterAssign |
|
|
1174
1175
|
| `UpdateCallTranscriptionUrl` | UPDATE | k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallTranscriptionUrl |
|
|
1175
1176
|
|
|
1176
1177
|
#### CallEvent
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
12
12
|
*/
|
|
13
|
-
import {
|
|
13
|
+
import { OdinRecordCreateDto, OdinRecordCreatedEvent } from '@d19n/odin-types/dist/core';
|
|
14
14
|
/**
|
|
15
15
|
* RabbitMQ message payload for CreateCustomerCallLeg created events
|
|
16
16
|
*
|
|
@@ -21,10 +21,18 @@ export interface CreateCustomerCallLegMessage extends OdinRecordCreatedEvent<Cre
|
|
|
21
21
|
/**
|
|
22
22
|
* Properties for CreateCustomerCallLeg action
|
|
23
23
|
*
|
|
24
|
-
* @property Required fields:
|
|
24
|
+
* @property Required fields: 9
|
|
25
25
|
* @property Optional fields: 0
|
|
26
26
|
*/
|
|
27
27
|
export interface CreateCustomerCallLegProperties {
|
|
28
|
+
/**
|
|
29
|
+
* CallId
|
|
30
|
+
*
|
|
31
|
+
* Reference identifier for CallLeg relationships. Used for data integrity.
|
|
32
|
+
* @type {LOOKUP}
|
|
33
|
+
* @required
|
|
34
|
+
*/
|
|
35
|
+
CallId: string;
|
|
28
36
|
/**
|
|
29
37
|
* CallSid
|
|
30
38
|
*
|
|
@@ -90,100 +98,6 @@ export interface CreateCustomerCallLegProperties {
|
|
|
90
98
|
*/
|
|
91
99
|
InitiatedAt: string;
|
|
92
100
|
}
|
|
93
|
-
/**
|
|
94
|
-
* Builder for CreateCustomerCallLeg action
|
|
95
|
-
*
|
|
96
|
-
* Provides fluent API for adding associations before executing the action.
|
|
97
|
-
* Use .link*() methods to add associations, then call .execute() to run.
|
|
98
|
-
*
|
|
99
|
-
* @example
|
|
100
|
-
* ```typescript
|
|
101
|
-
* await record.createCustomerCallLeg({ ...properties })
|
|
102
|
-
* .linkAssociation_1778250753812({ id: '...', entity: '...' })
|
|
103
|
-
* .execute();
|
|
104
|
-
* ```
|
|
105
|
-
*/
|
|
106
|
-
export declare class CreateCustomerCallLegBuilder {
|
|
107
|
-
private _associations;
|
|
108
|
-
private _properties;
|
|
109
|
-
private _pendingLinks;
|
|
110
|
-
private _options?;
|
|
111
|
-
private _provider?;
|
|
112
|
-
private _moduleName?;
|
|
113
|
-
private _entityName?;
|
|
114
|
-
private _clearPendingLinks?;
|
|
115
|
-
private _externalId?;
|
|
116
|
-
private _externalAppId?;
|
|
117
|
-
private _groups?;
|
|
118
|
-
constructor(properties: CreateCustomerCallLegProperties, pendingLinks: OdinRecordLinkDto[], options?: {
|
|
119
|
-
journeyId?: string;
|
|
120
|
-
stageKey?: string;
|
|
121
|
-
});
|
|
122
|
-
/**
|
|
123
|
-
* Link CallLeg_Call
|
|
124
|
-
* @schemaAssociationId 40babadf-1cd8-4c6a-adb8-f78f976245ac
|
|
125
|
-
* @required
|
|
126
|
-
* @param target - The record to link
|
|
127
|
-
* @returns this (for method chaining)
|
|
128
|
-
*/
|
|
129
|
-
linkAssociation_1778250753812(target: OdinRecord<any> | {
|
|
130
|
-
id: string;
|
|
131
|
-
entity: string;
|
|
132
|
-
}): this;
|
|
133
|
-
/**
|
|
134
|
-
* Set an external system identifier for this record.
|
|
135
|
-
* Links the record to a corresponding entry in an external application.
|
|
136
|
-
* @param externalId - The ID in the external system
|
|
137
|
-
* @param externalAppId - The external application identifier
|
|
138
|
-
* @returns this (for chaining)
|
|
139
|
-
*/
|
|
140
|
-
withExternalId(externalId: string, externalAppId: string): this;
|
|
141
|
-
/**
|
|
142
|
-
* Set security/access groups for this record.
|
|
143
|
-
* @param groups - Array of group names
|
|
144
|
-
* @returns this (for chaining)
|
|
145
|
-
*/
|
|
146
|
-
withGroups(groups: string[]): this;
|
|
147
|
-
/**
|
|
148
|
-
* Get the action payload without executing
|
|
149
|
-
* @returns The action data that would be sent
|
|
150
|
-
*/
|
|
151
|
-
getData(): {
|
|
152
|
-
entity: string;
|
|
153
|
-
type: string | undefined;
|
|
154
|
-
actionName: string;
|
|
155
|
-
properties: CreateCustomerCallLegProperties;
|
|
156
|
-
associations?: OdinRecordLinkDto[];
|
|
157
|
-
journeyId?: string;
|
|
158
|
-
stageKey?: string;
|
|
159
|
-
externalId?: string;
|
|
160
|
-
externalAppId?: string;
|
|
161
|
-
groups?: string[];
|
|
162
|
-
};
|
|
163
|
-
/**
|
|
164
|
-
* Inject execution context (called by record wrapper)
|
|
165
|
-
* @internal
|
|
166
|
-
*/
|
|
167
|
-
withProvider(provider: {
|
|
168
|
-
_applyAction(moduleName: string, entityName: string, payload: any): Promise<any>;
|
|
169
|
-
}, moduleName: string, entityName: string, clearPendingLinks: () => void): this;
|
|
170
|
-
/**
|
|
171
|
-
* Execute the action
|
|
172
|
-
* @returns The result from the API
|
|
173
|
-
* @throws Error if withProvider() has not been called
|
|
174
|
-
*/
|
|
175
|
-
execute(): Promise<any>;
|
|
176
|
-
/**
|
|
177
|
-
* Returns the request payload without executing (for debugging)
|
|
178
|
-
* @returns The request payload that would be sent to the API
|
|
179
|
-
*/
|
|
180
|
-
dryRun(): Record<string, any>;
|
|
181
|
-
/**
|
|
182
|
-
* Prevents accidental `await builder` without .execute()
|
|
183
|
-
* @throws Error always - use .execute() or .dryRun() instead
|
|
184
|
-
*/
|
|
185
|
-
then(): never;
|
|
186
|
-
}
|
|
187
101
|
/**
|
|
188
102
|
* CreateCustomerCallLeg
|
|
189
103
|
*
|
|
@@ -209,15 +123,6 @@ export declare class CreateCustomerCallLegDto extends OdinRecordCreateDto<Create
|
|
|
209
123
|
static readonly STEP_SCHEMA_ID = "75c59745-35fb-44b9-b3f2-7563101fdcec";
|
|
210
124
|
static readonly STEP_SCHEMA_ACTION_ID = "440c10de-fda8-4697-8b44-277cc7e00d3e";
|
|
211
125
|
static readonly AUTO_LINK_PARENT = true;
|
|
212
|
-
static readonly HAS_ASSOCIATIONS = true;
|
|
213
|
-
static readonly HAS_REQUIRED_ASSOCIATIONS = true;
|
|
214
|
-
static readonly BUILDER_CLASS = "CreateCustomerCallLegBuilder";
|
|
215
|
-
static readonly ASSOCIATION_FIELDS: readonly [{
|
|
216
|
-
readonly name: "Association_1778250753812";
|
|
217
|
-
readonly methodName: "linkAssociation_1778250753812";
|
|
218
|
-
readonly required: true;
|
|
219
|
-
readonly schemaAssociationId: "40babadf-1cd8-4c6a-adb8-f78f976245ac";
|
|
220
|
-
}];
|
|
221
126
|
readonly actionName: string;
|
|
222
127
|
readonly schemaActionId: string;
|
|
223
128
|
readonly entity: string;
|
|
@@ -11,125 +11,9 @@
|
|
|
11
11
|
*
|
|
12
12
|
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
13
|
*/
|
|
14
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.CreateCustomerCallLegDto =
|
|
15
|
+
exports.CreateCustomerCallLegDto = void 0;
|
|
25
16
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
26
|
-
/**
|
|
27
|
-
* Builder for CreateCustomerCallLeg action
|
|
28
|
-
*
|
|
29
|
-
* Provides fluent API for adding associations before executing the action.
|
|
30
|
-
* Use .link*() methods to add associations, then call .execute() to run.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```typescript
|
|
34
|
-
* await record.createCustomerCallLeg({ ...properties })
|
|
35
|
-
* .linkAssociation_1778250753812({ id: '...', entity: '...' })
|
|
36
|
-
* .execute();
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
class CreateCustomerCallLegBuilder {
|
|
40
|
-
constructor(properties, pendingLinks, options) {
|
|
41
|
-
this._associations = [];
|
|
42
|
-
this._properties = properties;
|
|
43
|
-
this._pendingLinks = pendingLinks;
|
|
44
|
-
this._options = options;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Link CallLeg_Call
|
|
48
|
-
* @schemaAssociationId 40babadf-1cd8-4c6a-adb8-f78f976245ac
|
|
49
|
-
* @required
|
|
50
|
-
* @param target - The record to link
|
|
51
|
-
* @returns this (for method chaining)
|
|
52
|
-
*/
|
|
53
|
-
linkAssociation_1778250753812(target) {
|
|
54
|
-
this._associations.push(new core_1.OdinRecordLinkDto({
|
|
55
|
-
id: target.id,
|
|
56
|
-
entity: 'entity' in target ? target.entity : target.entity,
|
|
57
|
-
}));
|
|
58
|
-
return this;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Set an external system identifier for this record.
|
|
62
|
-
* Links the record to a corresponding entry in an external application.
|
|
63
|
-
* @param externalId - The ID in the external system
|
|
64
|
-
* @param externalAppId - The external application identifier
|
|
65
|
-
* @returns this (for chaining)
|
|
66
|
-
*/
|
|
67
|
-
withExternalId(externalId, externalAppId) {
|
|
68
|
-
this._externalId = externalId;
|
|
69
|
-
this._externalAppId = externalAppId;
|
|
70
|
-
return this;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Set security/access groups for this record.
|
|
74
|
-
* @param groups - Array of group names
|
|
75
|
-
* @returns this (for chaining)
|
|
76
|
-
*/
|
|
77
|
-
withGroups(groups) {
|
|
78
|
-
this._groups = groups;
|
|
79
|
-
return this;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Get the action payload without executing
|
|
83
|
-
* @returns The action data that would be sent
|
|
84
|
-
*/
|
|
85
|
-
getData() {
|
|
86
|
-
var _a, _b;
|
|
87
|
-
const allAssociations = [...this._associations, ...this._pendingLinks];
|
|
88
|
-
return Object.assign(Object.assign({ entity: 'NotificationModule:CallLeg', type: undefined, actionName: 'CreateCustomerCallLeg', properties: this._properties, associations: allAssociations.length > 0 ? allAssociations : undefined, journeyId: (_a = this._options) === null || _a === void 0 ? void 0 : _a.journeyId, stageKey: (_b = this._options) === null || _b === void 0 ? void 0 : _b.stageKey }, (this._externalId && { externalId: this._externalId, externalAppId: this._externalAppId })), (this._groups && { groups: this._groups }));
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Inject execution context (called by record wrapper)
|
|
92
|
-
* @internal
|
|
93
|
-
*/
|
|
94
|
-
withProvider(provider, moduleName, entityName, clearPendingLinks) {
|
|
95
|
-
this._provider = provider;
|
|
96
|
-
this._moduleName = moduleName;
|
|
97
|
-
this._entityName = entityName;
|
|
98
|
-
this._clearPendingLinks = clearPendingLinks;
|
|
99
|
-
return this;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Execute the action
|
|
103
|
-
* @returns The result from the API
|
|
104
|
-
* @throws Error if withProvider() has not been called
|
|
105
|
-
*/
|
|
106
|
-
execute() {
|
|
107
|
-
var _a;
|
|
108
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
-
if (!this._provider || !this._moduleName || !this._entityName) {
|
|
110
|
-
throw new Error('Builder not connected to provider. Use the record wrapper API to get an executable builder.');
|
|
111
|
-
}
|
|
112
|
-
const result = yield this._provider._applyAction(this._moduleName, this._entityName, this.getData());
|
|
113
|
-
(_a = this._clearPendingLinks) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
114
|
-
return result;
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Returns the request payload without executing (for debugging)
|
|
119
|
-
* @returns The request payload that would be sent to the API
|
|
120
|
-
*/
|
|
121
|
-
dryRun() {
|
|
122
|
-
return this.getData();
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Prevents accidental `await builder` without .execute()
|
|
126
|
-
* @throws Error always - use .execute() or .dryRun() instead
|
|
127
|
-
*/
|
|
128
|
-
then() {
|
|
129
|
-
throw new Error('Builder cannot be awaited directly. Call .execute() to run the action or .dryRun() to get the payload.');
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
exports.CreateCustomerCallLegBuilder = CreateCustomerCallLegBuilder;
|
|
133
17
|
/**
|
|
134
18
|
* CreateCustomerCallLeg
|
|
135
19
|
*
|
|
@@ -168,7 +52,3 @@ CreateCustomerCallLegDto.STEP_ENTITY = 'NotificationModule:CallLeg';
|
|
|
168
52
|
CreateCustomerCallLegDto.STEP_SCHEMA_ID = '75c59745-35fb-44b9-b3f2-7563101fdcec';
|
|
169
53
|
CreateCustomerCallLegDto.STEP_SCHEMA_ACTION_ID = '440c10de-fda8-4697-8b44-277cc7e00d3e';
|
|
170
54
|
CreateCustomerCallLegDto.AUTO_LINK_PARENT = true;
|
|
171
|
-
CreateCustomerCallLegDto.HAS_ASSOCIATIONS = true;
|
|
172
|
-
CreateCustomerCallLegDto.HAS_REQUIRED_ASSOCIATIONS = true;
|
|
173
|
-
CreateCustomerCallLegDto.BUILDER_CLASS = 'CreateCustomerCallLegBuilder';
|
|
174
|
-
CreateCustomerCallLegDto.ASSOCIATION_FIELDS = [{ "name": "Association_1778250753812", "methodName": "linkAssociation_1778250753812", "required": true, "schemaAssociationId": "40babadf-1cd8-4c6a-adb8-f78f976245ac" }];
|
|
@@ -23,7 +23,7 @@ export interface SendDirectDebitCreatedEmailMessage extends OdinRecordCreatedEve
|
|
|
23
23
|
* Properties for SendDirectDebitCreatedEmail action
|
|
24
24
|
*
|
|
25
25
|
* @property Required fields: 0
|
|
26
|
-
* @property Optional fields:
|
|
26
|
+
* @property Optional fields: 9
|
|
27
27
|
*/
|
|
28
28
|
export interface SendDirectDebitCreatedEmailProperties {
|
|
29
29
|
/**
|
|
@@ -82,6 +82,13 @@ export interface SendDirectDebitCreatedEmailProperties {
|
|
|
82
82
|
* @type {TEXT}
|
|
83
83
|
*/
|
|
84
84
|
Title?: string | null;
|
|
85
|
+
/**
|
|
86
|
+
* Subject
|
|
87
|
+
*
|
|
88
|
+
* Data field for Email records. Used by Communications team.
|
|
89
|
+
* @type {TEXT}
|
|
90
|
+
*/
|
|
91
|
+
Subject?: string | null;
|
|
85
92
|
}
|
|
86
93
|
/**
|
|
87
94
|
* SendDirectDebitCreatedEmail
|
|
@@ -23,7 +23,7 @@ export interface SendDirectDebitFailedEmailMessage extends OdinRecordCreatedEven
|
|
|
23
23
|
* Properties for SendDirectDebitFailedEmail action
|
|
24
24
|
*
|
|
25
25
|
* @property Required fields: 0
|
|
26
|
-
* @property Optional fields:
|
|
26
|
+
* @property Optional fields: 9
|
|
27
27
|
*/
|
|
28
28
|
export interface SendDirectDebitFailedEmailProperties {
|
|
29
29
|
/**
|
|
@@ -82,6 +82,13 @@ export interface SendDirectDebitFailedEmailProperties {
|
|
|
82
82
|
* @type {TEXT}
|
|
83
83
|
*/
|
|
84
84
|
Title?: string | null;
|
|
85
|
+
/**
|
|
86
|
+
* Subject
|
|
87
|
+
*
|
|
88
|
+
* Data field for Email records. Used by Communications team.
|
|
89
|
+
* @type {TEXT}
|
|
90
|
+
*/
|
|
91
|
+
Subject?: string | null;
|
|
85
92
|
}
|
|
86
93
|
/**
|
|
87
94
|
* SendDirectDebitFailedEmail
|
|
@@ -23,7 +23,7 @@ export interface SendDirectDebitSetupConfirmationEmailMessage extends OdinRecord
|
|
|
23
23
|
* Properties for SendDirectDebitSetupConfirmationEmail action
|
|
24
24
|
*
|
|
25
25
|
* @property Required fields: 0
|
|
26
|
-
* @property Optional fields:
|
|
26
|
+
* @property Optional fields: 9
|
|
27
27
|
*/
|
|
28
28
|
export interface SendDirectDebitSetupConfirmationEmailProperties {
|
|
29
29
|
/**
|
|
@@ -82,6 +82,13 @@ export interface SendDirectDebitSetupConfirmationEmailProperties {
|
|
|
82
82
|
* @type {TEXT}
|
|
83
83
|
*/
|
|
84
84
|
Title?: string | null;
|
|
85
|
+
/**
|
|
86
|
+
* Subject
|
|
87
|
+
*
|
|
88
|
+
* Data field for Email records. Used by Communications team.
|
|
89
|
+
* @type {TEXT}
|
|
90
|
+
*/
|
|
91
|
+
Subject?: string | null;
|
|
85
92
|
}
|
|
86
93
|
/**
|
|
87
94
|
* SendDirectDebitSetupConfirmationEmail
|
|
@@ -23,7 +23,7 @@ export interface SendDirectDebitSetupRequestMessage extends OdinRecordCreatedEve
|
|
|
23
23
|
* Properties for SendDirectDebitSetupRequest action
|
|
24
24
|
*
|
|
25
25
|
* @property Required fields: 0
|
|
26
|
-
* @property Optional fields:
|
|
26
|
+
* @property Optional fields: 9
|
|
27
27
|
*/
|
|
28
28
|
export interface SendDirectDebitSetupRequestProperties {
|
|
29
29
|
/**
|
|
@@ -82,6 +82,13 @@ export interface SendDirectDebitSetupRequestProperties {
|
|
|
82
82
|
* @type {TEXT}
|
|
83
83
|
*/
|
|
84
84
|
Title?: string | null;
|
|
85
|
+
/**
|
|
86
|
+
* Subject
|
|
87
|
+
*
|
|
88
|
+
* Data field for Email records. Used by Communications team.
|
|
89
|
+
* @type {TEXT}
|
|
90
|
+
*/
|
|
91
|
+
Subject?: string | null;
|
|
85
92
|
}
|
|
86
93
|
/**
|
|
87
94
|
* SendDirectDebitSetupRequest
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UpdateCallOnTaskRouterAssign Action DTO
|
|
3
|
+
*
|
|
4
|
+
* Update call on twillio Task Router Assign
|
|
5
|
+
*
|
|
6
|
+
* @module NotificationModule
|
|
7
|
+
* @entity Call
|
|
8
|
+
* @actionKey UpdateCallOnTaskRouterAssign
|
|
9
|
+
* @event k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallOnTaskRouterAssign
|
|
10
|
+
*
|
|
11
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
12
|
+
*/
|
|
13
|
+
import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent } from '@d19n/odin-types/dist/core';
|
|
14
|
+
/**
|
|
15
|
+
* RabbitMQ message payload for UpdateCallOnTaskRouterAssign updated events
|
|
16
|
+
*
|
|
17
|
+
* @event k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallOnTaskRouterAssign
|
|
18
|
+
*/
|
|
19
|
+
export interface UpdateCallOnTaskRouterAssignMessage extends OdinRecordUpdatedEvent<UpdateCallOnTaskRouterAssignDto, UpdateCallOnTaskRouterAssignProperties> {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Properties for UpdateCallOnTaskRouterAssign action
|
|
23
|
+
*
|
|
24
|
+
* @property Required fields: 3
|
|
25
|
+
* @property Optional fields: 1
|
|
26
|
+
*/
|
|
27
|
+
export interface UpdateCallOnTaskRouterAssignProperties {
|
|
28
|
+
/**
|
|
29
|
+
* TaskSid
|
|
30
|
+
*
|
|
31
|
+
* Wrap up taskSid (Communications - Call)
|
|
32
|
+
* @type {TEXT}
|
|
33
|
+
* @required
|
|
34
|
+
*/
|
|
35
|
+
TaskSid: string;
|
|
36
|
+
/**
|
|
37
|
+
* CurrentAgentEmail
|
|
38
|
+
*
|
|
39
|
+
* Email of currently assigned agent (Communications - Call)
|
|
40
|
+
* @type {TEXT}
|
|
41
|
+
* @required
|
|
42
|
+
*/
|
|
43
|
+
CurrentAgentEmail: string;
|
|
44
|
+
/**
|
|
45
|
+
* user Id
|
|
46
|
+
*
|
|
47
|
+
* The Odin user that handled the call (Communications - Call)
|
|
48
|
+
* @type {UUID}
|
|
49
|
+
* @required
|
|
50
|
+
*/
|
|
51
|
+
UserId: string;
|
|
52
|
+
/**
|
|
53
|
+
* QueueName
|
|
54
|
+
*
|
|
55
|
+
* Display name/title for Call records. Primary identifier for Communications team.
|
|
56
|
+
* @type {TEXT}
|
|
57
|
+
*/
|
|
58
|
+
QueueName?: string | null;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* UpdateCallOnTaskRouterAssign
|
|
62
|
+
*
|
|
63
|
+
* Update call on twillio Task Router Assign
|
|
64
|
+
*
|
|
65
|
+
* @actionType UPDATE - Updates an existing Call record
|
|
66
|
+
* @module NotificationModule
|
|
67
|
+
* @entity Call
|
|
68
|
+
* @event k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallOnTaskRouterAssign
|
|
69
|
+
* @permission schema.action.updatecallontaskrouterassign.trigger
|
|
70
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
71
|
+
*/
|
|
72
|
+
export declare class UpdateCallOnTaskRouterAssignDto extends OdinRecordUpdateDto<UpdateCallOnTaskRouterAssignProperties> {
|
|
73
|
+
/** Used by SDK generators to identify action type */
|
|
74
|
+
static readonly ACTION_TYPE = "UPDATE";
|
|
75
|
+
static readonly ACTION_KEY = "UpdateCallOnTaskRouterAssign";
|
|
76
|
+
static readonly MODULE_NAME = "NotificationModule";
|
|
77
|
+
static readonly ENTITIES: string[];
|
|
78
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallOnTaskRouterAssign";
|
|
79
|
+
static readonly PERMISSION = "schema.action.updatecallontaskrouterassign.trigger";
|
|
80
|
+
/** Step metadata - entity this action targets */
|
|
81
|
+
static readonly STEP_ENTITY = "NotificationModule:Call";
|
|
82
|
+
static readonly STEP_SCHEMA_ID = "e157f15c-6846-4bfb-bc92-aed4c4084e9f";
|
|
83
|
+
static readonly STEP_SCHEMA_ACTION_ID = "41f37514-6f46-4e7f-be4e-8abb33f36656";
|
|
84
|
+
static readonly AUTO_LINK_PARENT = false;
|
|
85
|
+
readonly actionName: string;
|
|
86
|
+
readonly schemaActionId: string;
|
|
87
|
+
readonly entity: string;
|
|
88
|
+
constructor(record: OdinRecord<any> | {
|
|
89
|
+
id: string;
|
|
90
|
+
entity: string;
|
|
91
|
+
type?: string;
|
|
92
|
+
}, properties: UpdateCallOnTaskRouterAssignProperties, options?: {
|
|
93
|
+
journeyId?: string;
|
|
94
|
+
stageKey?: string;
|
|
95
|
+
});
|
|
96
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* UpdateCallOnTaskRouterAssign Action DTO
|
|
4
|
+
*
|
|
5
|
+
* Update call on twillio Task Router Assign
|
|
6
|
+
*
|
|
7
|
+
* @module NotificationModule
|
|
8
|
+
* @entity Call
|
|
9
|
+
* @actionKey UpdateCallOnTaskRouterAssign
|
|
10
|
+
* @event k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallOnTaskRouterAssign
|
|
11
|
+
*
|
|
12
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.UpdateCallOnTaskRouterAssignDto = void 0;
|
|
16
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
|
+
/**
|
|
18
|
+
* UpdateCallOnTaskRouterAssign
|
|
19
|
+
*
|
|
20
|
+
* Update call on twillio Task Router Assign
|
|
21
|
+
*
|
|
22
|
+
* @actionType UPDATE - Updates an existing Call record
|
|
23
|
+
* @module NotificationModule
|
|
24
|
+
* @entity Call
|
|
25
|
+
* @event k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallOnTaskRouterAssign
|
|
26
|
+
* @permission schema.action.updatecallontaskrouterassign.trigger
|
|
27
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
28
|
+
*/
|
|
29
|
+
class UpdateCallOnTaskRouterAssignDto extends core_1.OdinRecordUpdateDto {
|
|
30
|
+
constructor(record, properties, options) {
|
|
31
|
+
super({
|
|
32
|
+
id: record.id,
|
|
33
|
+
entity: record.entity,
|
|
34
|
+
type: record.type,
|
|
35
|
+
properties,
|
|
36
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
37
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
38
|
+
});
|
|
39
|
+
this.actionName = 'UpdateCallOnTaskRouterAssign';
|
|
40
|
+
this.schemaActionId = '41f37514-6f46-4e7f-be4e-8abb33f36656';
|
|
41
|
+
this.entity = 'NotificationModule:Call';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.UpdateCallOnTaskRouterAssignDto = UpdateCallOnTaskRouterAssignDto;
|
|
45
|
+
/** Used by SDK generators to identify action type */
|
|
46
|
+
UpdateCallOnTaskRouterAssignDto.ACTION_TYPE = 'UPDATE';
|
|
47
|
+
UpdateCallOnTaskRouterAssignDto.ACTION_KEY = 'UpdateCallOnTaskRouterAssign';
|
|
48
|
+
UpdateCallOnTaskRouterAssignDto.MODULE_NAME = 'NotificationModule';
|
|
49
|
+
UpdateCallOnTaskRouterAssignDto.ENTITIES = ['Call'];
|
|
50
|
+
UpdateCallOnTaskRouterAssignDto.EVENT_NAME = 'k1.t-hEOJjsDb.NotificationModule.Call.Update.UpdateCallOnTaskRouterAssign';
|
|
51
|
+
UpdateCallOnTaskRouterAssignDto.PERMISSION = 'schema.action.updatecallontaskrouterassign.trigger';
|
|
52
|
+
/** Step metadata - entity this action targets */
|
|
53
|
+
UpdateCallOnTaskRouterAssignDto.STEP_ENTITY = 'NotificationModule:Call';
|
|
54
|
+
UpdateCallOnTaskRouterAssignDto.STEP_SCHEMA_ID = 'e157f15c-6846-4bfb-bc92-aed4c4084e9f';
|
|
55
|
+
UpdateCallOnTaskRouterAssignDto.STEP_SCHEMA_ACTION_ID = '41f37514-6f46-4e7f-be4e-8abb33f36656';
|
|
56
|
+
UpdateCallOnTaskRouterAssignDto.AUTO_LINK_PARENT = false;
|
|
@@ -25,7 +25,6 @@ import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-man
|
|
|
25
25
|
import { CallLegProperties } from '../entities-v2/CallLeg';
|
|
26
26
|
import { CreateAgentCallLegProperties } from '../actions-v2/CreateAgentCallLegDto';
|
|
27
27
|
import { CreateCustomerCallLegProperties } from '../actions-v2/CreateCustomerCallLegDto';
|
|
28
|
-
import { CreateCustomerCallLegBuilder } from '../actions-v2/CreateCustomerCallLegDto';
|
|
29
28
|
import { UpdateCallProperties } from '../actions-v2/UpdateCallDto';
|
|
30
29
|
import { CallRecord } from './CallRecord';
|
|
31
30
|
import { CallEventRecord } from './CallEventRecord';
|
|
@@ -246,27 +245,30 @@ export declare class CallLegRecord<TProps = CallLegProperties> {
|
|
|
246
245
|
* CreateCustomerCallLeg
|
|
247
246
|
*
|
|
248
247
|
* Creates a new CallLeg record with the specified properties.
|
|
249
|
-
* Returns
|
|
250
|
-
* Call .execute() to create or .dryRun() for debugging.
|
|
248
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
251
249
|
*
|
|
252
250
|
* @param properties - The properties for the new record
|
|
253
251
|
* @param options - Optional settings
|
|
252
|
+
* @param options.type - Override the record type
|
|
254
253
|
* @param options.journeyId - Associate with a journey
|
|
255
254
|
* @param options.stageKey - Set initial pipeline stage
|
|
256
|
-
* @returns
|
|
255
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
257
256
|
*
|
|
258
257
|
* @example
|
|
259
258
|
* ```typescript
|
|
259
|
+
* // Create with properties
|
|
260
260
|
* const record = odinClient.callLegs.new();
|
|
261
|
-
* await record.createCustomerCallLeg({ ... })
|
|
262
|
-
*
|
|
263
|
-
*
|
|
261
|
+
* await record.createCustomerCallLeg({ ... }).execute();
|
|
262
|
+
*
|
|
263
|
+
* // Dry run (for debugging)
|
|
264
|
+
* const payload = record.createCustomerCallLeg({ ... }).dryRun();
|
|
264
265
|
* ```
|
|
265
266
|
*/
|
|
266
267
|
createCustomerCallLeg(properties: CreateCustomerCallLegProperties, options?: {
|
|
268
|
+
type?: string;
|
|
267
269
|
journeyId?: string;
|
|
268
270
|
stageKey?: string;
|
|
269
|
-
}):
|
|
271
|
+
}): ActionBuilder;
|
|
270
272
|
/**
|
|
271
273
|
* UpdateCall
|
|
272
274
|
*
|
|
@@ -32,7 +32,6 @@ exports.isCallLegRecord = exports.CallLegRecord = 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");
|
|
35
|
-
const CreateCustomerCallLegDto_1 = require("../actions-v2/CreateCustomerCallLegDto");
|
|
36
35
|
const CallRecord_1 = require("./CallRecord");
|
|
37
36
|
const CallEventRecord_1 = require("./CallEventRecord");
|
|
38
37
|
const CallTransferRecord_1 = require("./CallTransferRecord");
|
|
@@ -333,25 +332,37 @@ class CallLegRecord {
|
|
|
333
332
|
* CreateCustomerCallLeg
|
|
334
333
|
*
|
|
335
334
|
* Creates a new CallLeg record with the specified properties.
|
|
336
|
-
* Returns
|
|
337
|
-
* Call .execute() to create or .dryRun() for debugging.
|
|
335
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
338
336
|
*
|
|
339
337
|
* @param properties - The properties for the new record
|
|
340
338
|
* @param options - Optional settings
|
|
339
|
+
* @param options.type - Override the record type
|
|
341
340
|
* @param options.journeyId - Associate with a journey
|
|
342
341
|
* @param options.stageKey - Set initial pipeline stage
|
|
343
|
-
* @returns
|
|
342
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
344
343
|
*
|
|
345
344
|
* @example
|
|
346
345
|
* ```typescript
|
|
346
|
+
* // Create with properties
|
|
347
347
|
* const record = odinClient.callLegs.new();
|
|
348
|
-
* await record.createCustomerCallLeg({ ... })
|
|
349
|
-
*
|
|
350
|
-
*
|
|
348
|
+
* await record.createCustomerCallLeg({ ... }).execute();
|
|
349
|
+
*
|
|
350
|
+
* // Dry run (for debugging)
|
|
351
|
+
* const payload = record.createCustomerCallLeg({ ... }).dryRun();
|
|
351
352
|
* ```
|
|
352
353
|
*/
|
|
353
354
|
createCustomerCallLeg(properties, options) {
|
|
354
|
-
|
|
355
|
+
var _a, _b;
|
|
356
|
+
const payload = {
|
|
357
|
+
entity: 'NotificationModule:CallLeg',
|
|
358
|
+
type: (_a = options === null || options === void 0 ? void 0 : options.type) !== null && _a !== void 0 ? _a : (_b = this._record) === null || _b === void 0 ? void 0 : _b.type,
|
|
359
|
+
actionName: 'CreateCustomerCallLeg',
|
|
360
|
+
properties: properties || {},
|
|
361
|
+
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
362
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
363
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
364
|
+
};
|
|
365
|
+
return new ActionBuilder(this._provider, 'NotificationModule', 'CallLeg', payload, () => { this._pendingLinks = []; });
|
|
355
366
|
}
|
|
356
367
|
// ============================================
|
|
357
368
|
// UPDATE ACTIONS (require existing record)
|
|
@@ -25,6 +25,7 @@ import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-man
|
|
|
25
25
|
import { CallProperties } from '../entities-v2/Call';
|
|
26
26
|
import { CreateCallProperties } from '../actions-v2/CreateCallDto';
|
|
27
27
|
import { CreateCallBuilder } from '../actions-v2/CreateCallDto';
|
|
28
|
+
import { UpdateCallOnTaskRouterAssignProperties } from '../actions-v2/UpdateCallOnTaskRouterAssignDto';
|
|
28
29
|
import { UpdateCallTranscriptionUrlProperties } from '../actions-v2/UpdateCallTranscriptionUrlDto';
|
|
29
30
|
import { LeadRecord } from './LeadRecord';
|
|
30
31
|
import { FileRecord } from './FileRecord';
|
|
@@ -358,6 +359,32 @@ export declare class CallRecord<TProps = CallProperties> {
|
|
|
358
359
|
journeyId?: string;
|
|
359
360
|
stageKey?: string;
|
|
360
361
|
}): CreateCallBuilder;
|
|
362
|
+
/**
|
|
363
|
+
* UpdateCallOnTaskRouterAssign
|
|
364
|
+
*
|
|
365
|
+
* Updates this Call record with the specified properties.
|
|
366
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
367
|
+
*
|
|
368
|
+
* @param properties - Required properties for this action
|
|
369
|
+
* @param options - Optional settings
|
|
370
|
+
* @param options.journeyId - Associate with a journey
|
|
371
|
+
* @param options.stageKey - Transition to pipeline stage
|
|
372
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
373
|
+
* @throws Error if called on a new (unsaved) record
|
|
374
|
+
*
|
|
375
|
+
* @example
|
|
376
|
+
* ```typescript
|
|
377
|
+
* const record = await odinClient.calls.get(id);
|
|
378
|
+
* await record.updateCallOnTaskRouterAssign({ ... }).execute();
|
|
379
|
+
*
|
|
380
|
+
* // Dry run (for debugging)
|
|
381
|
+
* const payload = record.updateCallOnTaskRouterAssign({ ... }).dryRun();
|
|
382
|
+
* ```
|
|
383
|
+
*/
|
|
384
|
+
updateCallOnTaskRouterAssign(properties: UpdateCallOnTaskRouterAssignProperties, options?: {
|
|
385
|
+
journeyId?: string;
|
|
386
|
+
stageKey?: string;
|
|
387
|
+
}): ActionBuilder;
|
|
361
388
|
/**
|
|
362
389
|
* UpdateCallTranscriptionUrl
|
|
363
390
|
*
|
|
@@ -506,6 +506,35 @@ class CallRecord {
|
|
|
506
506
|
// ============================================
|
|
507
507
|
// UPDATE ACTIONS (require existing record)
|
|
508
508
|
// ============================================
|
|
509
|
+
/**
|
|
510
|
+
* UpdateCallOnTaskRouterAssign
|
|
511
|
+
*
|
|
512
|
+
* Updates this Call record with the specified properties.
|
|
513
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
514
|
+
*
|
|
515
|
+
* @param properties - Required properties for this action
|
|
516
|
+
* @param options - Optional settings
|
|
517
|
+
* @param options.journeyId - Associate with a journey
|
|
518
|
+
* @param options.stageKey - Transition to pipeline stage
|
|
519
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
520
|
+
* @throws Error if called on a new (unsaved) record
|
|
521
|
+
*
|
|
522
|
+
* @example
|
|
523
|
+
* ```typescript
|
|
524
|
+
* const record = await odinClient.calls.get(id);
|
|
525
|
+
* await record.updateCallOnTaskRouterAssign({ ... }).execute();
|
|
526
|
+
*
|
|
527
|
+
* // Dry run (for debugging)
|
|
528
|
+
* const payload = record.updateCallOnTaskRouterAssign({ ... }).dryRun();
|
|
529
|
+
* ```
|
|
530
|
+
*/
|
|
531
|
+
updateCallOnTaskRouterAssign(properties, options) {
|
|
532
|
+
var _a;
|
|
533
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
534
|
+
throw new Error('updateCallOnTaskRouterAssign requires an existing record. Use accessor.get() first.');
|
|
535
|
+
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateCallOnTaskRouterAssign', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, options);
|
|
536
|
+
return new ActionBuilder(this._provider, 'NotificationModule', 'Call', payload, () => { this._pendingLinks = []; });
|
|
537
|
+
}
|
|
509
538
|
/**
|
|
510
539
|
* UpdateCallTranscriptionUrl
|
|
511
540
|
*
|