@d19n/youfibre-odin-sdk 2.0.147 → 2.0.149
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 -4
- package/dist/EntityRegistry.d.ts +2 -2
- package/dist/EntityRegistry.js +2 -2
- package/dist/OdinApiClient.d.ts +4 -4
- package/dist/OdinApiClient.js +6 -6
- package/dist/OdinDbClient.d.ts +4 -4
- package/dist/OdinDbClient.js +6 -6
- package/dist/accessors-v2/{TwilioCallEventsAccessor.d.ts → TwilioCallEventAccessor.d.ts} +24 -24
- package/dist/accessors-v2/{TwilioCallEventsAccessor.js → TwilioCallEventAccessor.js} +21 -21
- package/dist/accessors-v2/index.d.ts +1 -1
- package/dist/accessors-v2/index.js +3 -3
- package/dist/actions-v2/CreateInboundCallEventDto.d.ts +18 -23
- package/dist/actions-v2/CreateInboundCallEventDto.js +14 -19
- package/dist/actions-v2/CreateOutboundCallEventDto.d.ts +26 -26
- package/dist/actions-v2/CreateOutboundCallEventDto.js +13 -13
- package/dist/actions-v2/CreateVoiceConfigurationDto.d.ts +14 -14
- package/dist/api-sdk-v2/CallApi.d.ts +2 -2
- package/dist/api-sdk-v2/CallApi.js +4 -4
- package/dist/api-sdk-v2/OfferApi.d.ts +8 -8
- package/dist/api-sdk-v2/OfferApi.js +22 -22
- package/dist/api-sdk-v2/{TwilioCallEventsApi.d.ts → TwilioCallEventApi.d.ts} +11 -11
- package/dist/api-sdk-v2/{TwilioCallEventsApi.js → TwilioCallEventApi.js} +17 -17
- package/dist/db-accessors-v2/{TwilioCallEventsDbAccessor.d.ts → TwilioCallEventDbAccessor.d.ts} +22 -22
- package/dist/db-accessors-v2/{TwilioCallEventsDbAccessor.js → TwilioCallEventDbAccessor.js} +21 -21
- package/dist/db-accessors-v2/index.d.ts +1 -1
- package/dist/db-accessors-v2/index.js +3 -3
- package/dist/db-sdk-v2/CallDb.d.ts +2 -2
- package/dist/db-sdk-v2/CallDb.js +4 -4
- package/dist/db-sdk-v2/OfferDb.d.ts +8 -8
- package/dist/db-sdk-v2/OfferDb.js +22 -22
- package/dist/db-sdk-v2/{TwilioCallEventsDb.d.ts → TwilioCallEventDb.d.ts} +15 -15
- package/dist/db-sdk-v2/{TwilioCallEventsDb.js → TwilioCallEventDb.js} +20 -20
- package/dist/entities-v2/Call.d.ts +5 -5
- package/dist/entities-v2/Call.js +2 -2
- package/dist/entities-v2/Offer.d.ts +6 -6
- package/dist/entities-v2/Offer.js +5 -5
- package/dist/entities-v2/TwilioCallEvent.d.ts +229 -0
- package/dist/entities-v2/TwilioCallEvent.js +103 -0
- package/dist/records-v2/CallRecord.d.ts +10 -10
- package/dist/records-v2/CallRecord.js +15 -15
- package/dist/records-v2/OfferRecord.d.ts +10 -70
- package/dist/records-v2/OfferRecord.js +17 -116
- package/dist/records-v2/ProductRecord.d.ts +3 -103
- package/dist/records-v2/ProductRecord.js +4 -169
- package/dist/records-v2/{TwilioCallEventsRecord.d.ts → TwilioCallEventRecord.d.ts} +22 -86
- package/dist/records-v2/{TwilioCallEventsRecord.js → TwilioCallEventRecord.js} +28 -92
- package/dist/records-v2/index.d.ts +1 -1
- package/dist/records-v2/index.js +4 -4
- package/package.json +1 -1
- package/dist/entities-v2/TwilioCallEvents.d.ts +0 -433
- package/dist/entities-v2/TwilioCallEvents.js +0 -135
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TwilioCallEvent Entity Definition
|
|
3
|
+
*
|
|
4
|
+
* Twilio callback events - inbound and outbound call updates triggered on ringing, answered completed, etc
|
|
5
|
+
*
|
|
6
|
+
* @module NotificationModule
|
|
7
|
+
* @entity TwilioCallEvent
|
|
8
|
+
* @schemaId 52cc16be-2010-453f-a1c9-142ca95f9a54
|
|
9
|
+
*
|
|
10
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
11
|
+
* Generated from Odin schema definition
|
|
12
|
+
*/
|
|
13
|
+
import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/core';
|
|
14
|
+
import { CallProperties } from './Call';
|
|
15
|
+
/**
|
|
16
|
+
* Available types for TwilioCallEvent records
|
|
17
|
+
*/
|
|
18
|
+
export declare enum TwilioCallEventEntityTypes {
|
|
19
|
+
/** Inbound call webhook events */
|
|
20
|
+
INBOUND_CALL_EVENT = "INBOUND_CALL_EVENT",
|
|
21
|
+
/** Outbound call webhook events */
|
|
22
|
+
OUTBOUND_CALL_EVENT = "OUTBOUND_CALL_EVENT"
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Valid values for TwilioCallEvent.WebhookSource
|
|
26
|
+
*
|
|
27
|
+
* Source of the captured event
|
|
28
|
+
*
|
|
29
|
+
* @remarks Available options:
|
|
30
|
+
* - `InboundCallStatusUpdateEvent`
|
|
31
|
+
* - `NumberCallStatusEvent`
|
|
32
|
+
* - `OutboundCallStatusUpdateEvent`
|
|
33
|
+
* - `OutboundDialActionEvent`
|
|
34
|
+
*/
|
|
35
|
+
export declare enum TwilioCallEventWebhookSource {
|
|
36
|
+
INBOUND_CALL_STATUS_UPDATE_EVENT = "InboundCallStatusUpdateEvent",
|
|
37
|
+
NUMBER_CALL_STATUS_EVENT = "NumberCallStatusEvent",
|
|
38
|
+
OUTBOUND_CALL_STATUS_UPDATE_EVENT = "OutboundCallStatusUpdateEvent",
|
|
39
|
+
OUTBOUND_DIAL_ACTION_EVENT = "OutboundDialActionEvent"
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Property keys for TwilioCallEvent
|
|
43
|
+
* Use these constants instead of string literals for type safety
|
|
44
|
+
*/
|
|
45
|
+
export declare enum TwilioCallEventPropertyKeys {
|
|
46
|
+
/** Body of the request received from Twilio */
|
|
47
|
+
Body = "Body",
|
|
48
|
+
/** Reference of the call record */
|
|
49
|
+
CallId = "CallId",
|
|
50
|
+
/** Twilio id of the call */
|
|
51
|
+
CallSid = "CallSid",
|
|
52
|
+
/** Query parameters of the request received from Twilio */
|
|
53
|
+
Query = "Query",
|
|
54
|
+
/** Moment of storing the event in odin */
|
|
55
|
+
ReceivedAt = "ReceivedAt",
|
|
56
|
+
/** Title of twilio call event record */
|
|
57
|
+
Title = "Title",
|
|
58
|
+
/** Source of the captured event */
|
|
59
|
+
WebhookSource = "WebhookSource"
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Properties for TwilioCallEvent records
|
|
63
|
+
*
|
|
64
|
+
* @see NotificationModule:TwilioCallEvent
|
|
65
|
+
*/
|
|
66
|
+
export interface TwilioCallEventProperties {
|
|
67
|
+
/** Body of the request received from Twilio
|
|
68
|
+
*
|
|
69
|
+
* @type {JSON}
|
|
70
|
+
*/
|
|
71
|
+
Body: string;
|
|
72
|
+
/** Reference of the call record
|
|
73
|
+
*
|
|
74
|
+
* @type {LOOKUP}
|
|
75
|
+
*/
|
|
76
|
+
CallId: string;
|
|
77
|
+
/** Twilio id of the call
|
|
78
|
+
*
|
|
79
|
+
* @type {TEXT}
|
|
80
|
+
*/
|
|
81
|
+
CallSid: string;
|
|
82
|
+
/** Query parameters of the request received from Twilio
|
|
83
|
+
*
|
|
84
|
+
* @type {JSON}
|
|
85
|
+
*/
|
|
86
|
+
Query: string;
|
|
87
|
+
/** Moment of storing the event in odin
|
|
88
|
+
*
|
|
89
|
+
* @type {DATE_TIME}
|
|
90
|
+
*/
|
|
91
|
+
ReceivedAt: string;
|
|
92
|
+
/** Title of twilio call event record
|
|
93
|
+
*
|
|
94
|
+
* @type {TEXT}
|
|
95
|
+
*/
|
|
96
|
+
Title: string;
|
|
97
|
+
/** Source of the captured event
|
|
98
|
+
*
|
|
99
|
+
* @type {ENUM}
|
|
100
|
+
* @enum {TwilioCallEventWebhookSource}
|
|
101
|
+
*/
|
|
102
|
+
WebhookSource: TwilioCallEventWebhookSource;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Properties for INBOUND_CALL_EVENT TwilioCallEvent records
|
|
106
|
+
*
|
|
107
|
+
* @see NotificationModule:TwilioCallEvent
|
|
108
|
+
*/
|
|
109
|
+
export interface InboundCallEventTwilioCallEventProperties {
|
|
110
|
+
/** Body of the request received from Twilio
|
|
111
|
+
*
|
|
112
|
+
* @type {JSON}
|
|
113
|
+
*/
|
|
114
|
+
Body: string;
|
|
115
|
+
/** Reference of the call record
|
|
116
|
+
*
|
|
117
|
+
* @type {LOOKUP}
|
|
118
|
+
*/
|
|
119
|
+
CallId: string;
|
|
120
|
+
/** Twilio id of the call
|
|
121
|
+
*
|
|
122
|
+
* @type {TEXT}
|
|
123
|
+
*/
|
|
124
|
+
CallSid: string;
|
|
125
|
+
/** Query parameters of the request received from Twilio
|
|
126
|
+
*
|
|
127
|
+
* @type {JSON}
|
|
128
|
+
*/
|
|
129
|
+
Query: string;
|
|
130
|
+
/** Moment of storing the event in odin
|
|
131
|
+
*
|
|
132
|
+
* @type {DATE_TIME}
|
|
133
|
+
*/
|
|
134
|
+
ReceivedAt: string;
|
|
135
|
+
/** Title of twilio call event record
|
|
136
|
+
*
|
|
137
|
+
* @type {TEXT}
|
|
138
|
+
*/
|
|
139
|
+
Title: string;
|
|
140
|
+
/** Source of the captured event
|
|
141
|
+
*
|
|
142
|
+
* @type {ENUM}
|
|
143
|
+
* @enum {TwilioCallEventWebhookSource}
|
|
144
|
+
*/
|
|
145
|
+
WebhookSource: TwilioCallEventWebhookSource;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Properties for OUTBOUND_CALL_EVENT TwilioCallEvent records
|
|
149
|
+
*
|
|
150
|
+
* @see NotificationModule:TwilioCallEvent
|
|
151
|
+
*/
|
|
152
|
+
export interface OutboundCallEventTwilioCallEventProperties {
|
|
153
|
+
/** Body of the request received from Twilio
|
|
154
|
+
*
|
|
155
|
+
* @type {JSON}
|
|
156
|
+
*/
|
|
157
|
+
Body: string;
|
|
158
|
+
/** Reference of the call record
|
|
159
|
+
*
|
|
160
|
+
* @type {LOOKUP}
|
|
161
|
+
*/
|
|
162
|
+
CallId: string;
|
|
163
|
+
/** Twilio id of the call
|
|
164
|
+
*
|
|
165
|
+
* @type {TEXT}
|
|
166
|
+
*/
|
|
167
|
+
CallSid: string;
|
|
168
|
+
/** Query parameters of the request received from Twilio
|
|
169
|
+
*
|
|
170
|
+
* @type {JSON}
|
|
171
|
+
*/
|
|
172
|
+
Query: string;
|
|
173
|
+
/** Moment of storing the event in odin
|
|
174
|
+
*
|
|
175
|
+
* @type {DATE_TIME}
|
|
176
|
+
*/
|
|
177
|
+
ReceivedAt: string;
|
|
178
|
+
/** Title of twilio call event record
|
|
179
|
+
*
|
|
180
|
+
* @type {TEXT}
|
|
181
|
+
*/
|
|
182
|
+
Title: string;
|
|
183
|
+
/** Source of the captured event
|
|
184
|
+
*
|
|
185
|
+
* @type {ENUM}
|
|
186
|
+
* @enum {TwilioCallEventWebhookSource}
|
|
187
|
+
*/
|
|
188
|
+
WebhookSource: TwilioCallEventWebhookSource;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* TwilioCallEvent entity from NotificationModule
|
|
192
|
+
*
|
|
193
|
+
* Twilio callback events - inbound and outbound call updates triggered on ringing, answered completed, etc
|
|
194
|
+
*
|
|
195
|
+
* @module NotificationModule
|
|
196
|
+
* @entity TwilioCallEvent
|
|
197
|
+
* @schemaId 52cc16be-2010-453f-a1c9-142ca95f9a54
|
|
198
|
+
* @capabilities searchable, updateable, undeletable, triggerable
|
|
199
|
+
*/
|
|
200
|
+
export declare class TwilioCallEvent extends OdinRecord<TwilioCallEventProperties> {
|
|
201
|
+
entity: 'NotificationModule:TwilioCallEvent';
|
|
202
|
+
type: TwilioCallEventEntityTypes;
|
|
203
|
+
schemaId: '52cc16be-2010-453f-a1c9-142ca95f9a54';
|
|
204
|
+
properties: TwilioCallEventProperties;
|
|
205
|
+
/** Linked Call records (Call__TwilioCallEvents) */
|
|
206
|
+
Call: OdinLink<LinkedOdinRecord<CallProperties>>;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* RabbitMQ routing keys for TwilioCallEvent events
|
|
210
|
+
*/
|
|
211
|
+
export declare const ROUTING_KEY_TWILIO_CALL_EVENT_CREATED = "NotificationModule.TwilioCallEvent.SubDbRecordCreated";
|
|
212
|
+
export declare const ROUTING_KEY_TWILIO_CALL_EVENT_UPDATED = "NotificationModule.TwilioCallEvent.SubDbRecordUpdated";
|
|
213
|
+
export declare const ROUTING_KEY_TWILIO_CALL_EVENT_DELETED = "NotificationModule.TwilioCallEvent.SubDbRecordDeleted";
|
|
214
|
+
/**
|
|
215
|
+
* Type-specific routing keys for TwilioCallEvent events
|
|
216
|
+
* Subscribe to these for events on specific entity types only
|
|
217
|
+
*/
|
|
218
|
+
/** Inbound call webhook events created */
|
|
219
|
+
export declare const ROUTING_KEY_TWILIO_CALL_EVENT_INBOUND_CALL_EVENT_CREATED = "NotificationModule.TwilioCallEvent.INBOUND_CALL_EVENT.SubDbRecordCreated";
|
|
220
|
+
/** Inbound call webhook events updated */
|
|
221
|
+
export declare const ROUTING_KEY_TWILIO_CALL_EVENT_INBOUND_CALL_EVENT_UPDATED = "NotificationModule.TwilioCallEvent.INBOUND_CALL_EVENT.SubDbRecordUpdated";
|
|
222
|
+
/** Inbound call webhook events deleted */
|
|
223
|
+
export declare const ROUTING_KEY_TWILIO_CALL_EVENT_INBOUND_CALL_EVENT_DELETED = "NotificationModule.TwilioCallEvent.INBOUND_CALL_EVENT.SubDbRecordDeleted";
|
|
224
|
+
/** Outbound call webhook events created */
|
|
225
|
+
export declare const ROUTING_KEY_TWILIO_CALL_EVENT_OUTBOUND_CALL_EVENT_CREATED = "NotificationModule.TwilioCallEvent.OUTBOUND_CALL_EVENT.SubDbRecordCreated";
|
|
226
|
+
/** Outbound call webhook events updated */
|
|
227
|
+
export declare const ROUTING_KEY_TWILIO_CALL_EVENT_OUTBOUND_CALL_EVENT_UPDATED = "NotificationModule.TwilioCallEvent.OUTBOUND_CALL_EVENT.SubDbRecordUpdated";
|
|
228
|
+
/** Outbound call webhook events deleted */
|
|
229
|
+
export declare const ROUTING_KEY_TWILIO_CALL_EVENT_OUTBOUND_CALL_EVENT_DELETED = "NotificationModule.TwilioCallEvent.OUTBOUND_CALL_EVENT.SubDbRecordDeleted";
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* TwilioCallEvent Entity Definition
|
|
4
|
+
*
|
|
5
|
+
* Twilio callback events - inbound and outbound call updates triggered on ringing, answered completed, etc
|
|
6
|
+
*
|
|
7
|
+
* @module NotificationModule
|
|
8
|
+
* @entity TwilioCallEvent
|
|
9
|
+
* @schemaId 52cc16be-2010-453f-a1c9-142ca95f9a54
|
|
10
|
+
*
|
|
11
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
12
|
+
* Generated from Odin schema definition
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ROUTING_KEY_TWILIO_CALL_EVENT_OUTBOUND_CALL_EVENT_DELETED = exports.ROUTING_KEY_TWILIO_CALL_EVENT_OUTBOUND_CALL_EVENT_UPDATED = exports.ROUTING_KEY_TWILIO_CALL_EVENT_OUTBOUND_CALL_EVENT_CREATED = exports.ROUTING_KEY_TWILIO_CALL_EVENT_INBOUND_CALL_EVENT_DELETED = exports.ROUTING_KEY_TWILIO_CALL_EVENT_INBOUND_CALL_EVENT_UPDATED = exports.ROUTING_KEY_TWILIO_CALL_EVENT_INBOUND_CALL_EVENT_CREATED = exports.ROUTING_KEY_TWILIO_CALL_EVENT_DELETED = exports.ROUTING_KEY_TWILIO_CALL_EVENT_UPDATED = exports.ROUTING_KEY_TWILIO_CALL_EVENT_CREATED = exports.TwilioCallEvent = exports.TwilioCallEventPropertyKeys = exports.TwilioCallEventWebhookSource = exports.TwilioCallEventEntityTypes = void 0;
|
|
16
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
|
+
/**
|
|
18
|
+
* Available types for TwilioCallEvent records
|
|
19
|
+
*/
|
|
20
|
+
var TwilioCallEventEntityTypes;
|
|
21
|
+
(function (TwilioCallEventEntityTypes) {
|
|
22
|
+
/** Inbound call webhook events */
|
|
23
|
+
TwilioCallEventEntityTypes["INBOUND_CALL_EVENT"] = "INBOUND_CALL_EVENT";
|
|
24
|
+
/** Outbound call webhook events */
|
|
25
|
+
TwilioCallEventEntityTypes["OUTBOUND_CALL_EVENT"] = "OUTBOUND_CALL_EVENT";
|
|
26
|
+
})(TwilioCallEventEntityTypes = exports.TwilioCallEventEntityTypes || (exports.TwilioCallEventEntityTypes = {}));
|
|
27
|
+
/**
|
|
28
|
+
* Valid values for TwilioCallEvent.WebhookSource
|
|
29
|
+
*
|
|
30
|
+
* Source of the captured event
|
|
31
|
+
*
|
|
32
|
+
* @remarks Available options:
|
|
33
|
+
* - `InboundCallStatusUpdateEvent`
|
|
34
|
+
* - `NumberCallStatusEvent`
|
|
35
|
+
* - `OutboundCallStatusUpdateEvent`
|
|
36
|
+
* - `OutboundDialActionEvent`
|
|
37
|
+
*/
|
|
38
|
+
var TwilioCallEventWebhookSource;
|
|
39
|
+
(function (TwilioCallEventWebhookSource) {
|
|
40
|
+
TwilioCallEventWebhookSource["INBOUND_CALL_STATUS_UPDATE_EVENT"] = "InboundCallStatusUpdateEvent";
|
|
41
|
+
TwilioCallEventWebhookSource["NUMBER_CALL_STATUS_EVENT"] = "NumberCallStatusEvent";
|
|
42
|
+
TwilioCallEventWebhookSource["OUTBOUND_CALL_STATUS_UPDATE_EVENT"] = "OutboundCallStatusUpdateEvent";
|
|
43
|
+
TwilioCallEventWebhookSource["OUTBOUND_DIAL_ACTION_EVENT"] = "OutboundDialActionEvent";
|
|
44
|
+
})(TwilioCallEventWebhookSource = exports.TwilioCallEventWebhookSource || (exports.TwilioCallEventWebhookSource = {}));
|
|
45
|
+
/**
|
|
46
|
+
* Property keys for TwilioCallEvent
|
|
47
|
+
* Use these constants instead of string literals for type safety
|
|
48
|
+
*/
|
|
49
|
+
var TwilioCallEventPropertyKeys;
|
|
50
|
+
(function (TwilioCallEventPropertyKeys) {
|
|
51
|
+
/** Body of the request received from Twilio */
|
|
52
|
+
TwilioCallEventPropertyKeys["Body"] = "Body";
|
|
53
|
+
/** Reference of the call record */
|
|
54
|
+
TwilioCallEventPropertyKeys["CallId"] = "CallId";
|
|
55
|
+
/** Twilio id of the call */
|
|
56
|
+
TwilioCallEventPropertyKeys["CallSid"] = "CallSid";
|
|
57
|
+
/** Query parameters of the request received from Twilio */
|
|
58
|
+
TwilioCallEventPropertyKeys["Query"] = "Query";
|
|
59
|
+
/** Moment of storing the event in odin */
|
|
60
|
+
TwilioCallEventPropertyKeys["ReceivedAt"] = "ReceivedAt";
|
|
61
|
+
/** Title of twilio call event record */
|
|
62
|
+
TwilioCallEventPropertyKeys["Title"] = "Title";
|
|
63
|
+
/** Source of the captured event */
|
|
64
|
+
TwilioCallEventPropertyKeys["WebhookSource"] = "WebhookSource";
|
|
65
|
+
})(TwilioCallEventPropertyKeys = exports.TwilioCallEventPropertyKeys || (exports.TwilioCallEventPropertyKeys = {}));
|
|
66
|
+
/**
|
|
67
|
+
* TwilioCallEvent entity from NotificationModule
|
|
68
|
+
*
|
|
69
|
+
* Twilio callback events - inbound and outbound call updates triggered on ringing, answered completed, etc
|
|
70
|
+
*
|
|
71
|
+
* @module NotificationModule
|
|
72
|
+
* @entity TwilioCallEvent
|
|
73
|
+
* @schemaId 52cc16be-2010-453f-a1c9-142ca95f9a54
|
|
74
|
+
* @capabilities searchable, updateable, undeletable, triggerable
|
|
75
|
+
*/
|
|
76
|
+
class TwilioCallEvent extends core_1.OdinRecord {
|
|
77
|
+
}
|
|
78
|
+
exports.TwilioCallEvent = TwilioCallEvent;
|
|
79
|
+
// ============================================
|
|
80
|
+
// RABBITMQ EVENT ROUTING KEYS
|
|
81
|
+
// ============================================
|
|
82
|
+
/**
|
|
83
|
+
* RabbitMQ routing keys for TwilioCallEvent events
|
|
84
|
+
*/
|
|
85
|
+
exports.ROUTING_KEY_TWILIO_CALL_EVENT_CREATED = 'NotificationModule.TwilioCallEvent.SubDbRecordCreated';
|
|
86
|
+
exports.ROUTING_KEY_TWILIO_CALL_EVENT_UPDATED = 'NotificationModule.TwilioCallEvent.SubDbRecordUpdated';
|
|
87
|
+
exports.ROUTING_KEY_TWILIO_CALL_EVENT_DELETED = 'NotificationModule.TwilioCallEvent.SubDbRecordDeleted';
|
|
88
|
+
/**
|
|
89
|
+
* Type-specific routing keys for TwilioCallEvent events
|
|
90
|
+
* Subscribe to these for events on specific entity types only
|
|
91
|
+
*/
|
|
92
|
+
/** Inbound call webhook events created */
|
|
93
|
+
exports.ROUTING_KEY_TWILIO_CALL_EVENT_INBOUND_CALL_EVENT_CREATED = 'NotificationModule.TwilioCallEvent.INBOUND_CALL_EVENT.SubDbRecordCreated';
|
|
94
|
+
/** Inbound call webhook events updated */
|
|
95
|
+
exports.ROUTING_KEY_TWILIO_CALL_EVENT_INBOUND_CALL_EVENT_UPDATED = 'NotificationModule.TwilioCallEvent.INBOUND_CALL_EVENT.SubDbRecordUpdated';
|
|
96
|
+
/** Inbound call webhook events deleted */
|
|
97
|
+
exports.ROUTING_KEY_TWILIO_CALL_EVENT_INBOUND_CALL_EVENT_DELETED = 'NotificationModule.TwilioCallEvent.INBOUND_CALL_EVENT.SubDbRecordDeleted';
|
|
98
|
+
/** Outbound call webhook events created */
|
|
99
|
+
exports.ROUTING_KEY_TWILIO_CALL_EVENT_OUTBOUND_CALL_EVENT_CREATED = 'NotificationModule.TwilioCallEvent.OUTBOUND_CALL_EVENT.SubDbRecordCreated';
|
|
100
|
+
/** Outbound call webhook events updated */
|
|
101
|
+
exports.ROUTING_KEY_TWILIO_CALL_EVENT_OUTBOUND_CALL_EVENT_UPDATED = 'NotificationModule.TwilioCallEvent.OUTBOUND_CALL_EVENT.SubDbRecordUpdated';
|
|
102
|
+
/** Outbound call webhook events deleted */
|
|
103
|
+
exports.ROUTING_KEY_TWILIO_CALL_EVENT_OUTBOUND_CALL_EVENT_DELETED = 'NotificationModule.TwilioCallEvent.OUTBOUND_CALL_EVENT.SubDbRecordDeleted';
|
|
@@ -47,7 +47,7 @@ import { CallLegRecord } from './CallLegRecord';
|
|
|
47
47
|
import { CallTransferRecord } from './CallTransferRecord';
|
|
48
48
|
import { CaseRecord } from './CaseRecord';
|
|
49
49
|
import { WorkOrderRecord } from './WorkOrderRecord';
|
|
50
|
-
import {
|
|
50
|
+
import { TwilioCallEventRecord } from './TwilioCallEventRecord';
|
|
51
51
|
/** Valid entity types for Call */
|
|
52
52
|
export declare type CallType = 'DEFAULT';
|
|
53
53
|
/**
|
|
@@ -121,7 +121,7 @@ export declare class CallRecord<TProps = CallProperties> {
|
|
|
121
121
|
private _callTransfers?;
|
|
122
122
|
private _cases?;
|
|
123
123
|
private _workOrders?;
|
|
124
|
-
private
|
|
124
|
+
private _twilioCallEvents?;
|
|
125
125
|
/**
|
|
126
126
|
* Create a record wrapper.
|
|
127
127
|
* @param record - The underlying record, or null for create operations
|
|
@@ -307,24 +307,24 @@ export declare class CallRecord<TProps = CallProperties> {
|
|
|
307
307
|
* ```
|
|
308
308
|
*/
|
|
309
309
|
get workOrders(): RecordLinkManager<WorkOrderRecord, typeof CallRecord['workOrdersLabels'][number]>;
|
|
310
|
-
/** Valid labels for
|
|
311
|
-
static readonly
|
|
310
|
+
/** Valid labels for TwilioCallEvent associations */
|
|
311
|
+
static readonly twilioCallEventsLabels: readonly ["Call__TwilioCallEvents"];
|
|
312
312
|
/**
|
|
313
|
-
* Access linked
|
|
313
|
+
* Access linked TwilioCallEvent records
|
|
314
314
|
* @remarks Available labels: Call__TwilioCallEvents
|
|
315
315
|
* @throws Error if called on a new (unsaved) record
|
|
316
316
|
*
|
|
317
317
|
* @example
|
|
318
318
|
* ```typescript
|
|
319
|
-
* // Get all linked
|
|
320
|
-
* const items = await record.
|
|
321
|
-
* const first = await record.
|
|
319
|
+
* // Get all linked TwilioCallEvent records
|
|
320
|
+
* const items = await record.twilioCallEvents.list();
|
|
321
|
+
* const first = await record.twilioCallEvents.first();
|
|
322
322
|
*
|
|
323
323
|
* // Filter by label
|
|
324
|
-
* const specific = await record.
|
|
324
|
+
* const specific = await record.twilioCallEvents.first({ label: 'Call__TwilioCallEvents' });
|
|
325
325
|
* ```
|
|
326
326
|
*/
|
|
327
|
-
get
|
|
327
|
+
get twilioCallEvents(): RecordLinkManager<TwilioCallEventRecord, typeof CallRecord['twilioCallEventsLabels'][number]>;
|
|
328
328
|
/**
|
|
329
329
|
* Queue a link to be created with the next action.
|
|
330
330
|
* Works for both create and update actions.
|
|
@@ -42,7 +42,7 @@ const CallLegRecord_1 = require("./CallLegRecord");
|
|
|
42
42
|
const CallTransferRecord_1 = require("./CallTransferRecord");
|
|
43
43
|
const CaseRecord_1 = require("./CaseRecord");
|
|
44
44
|
const WorkOrderRecord_1 = require("./WorkOrderRecord");
|
|
45
|
-
const
|
|
45
|
+
const TwilioCallEventRecord_1 = require("./TwilioCallEventRecord");
|
|
46
46
|
/**
|
|
47
47
|
* Builder for action execution with dryRun support
|
|
48
48
|
*
|
|
@@ -413,34 +413,34 @@ class CallRecord {
|
|
|
413
413
|
return this._workOrders;
|
|
414
414
|
}
|
|
415
415
|
/**
|
|
416
|
-
* Access linked
|
|
416
|
+
* Access linked TwilioCallEvent records
|
|
417
417
|
* @remarks Available labels: Call__TwilioCallEvents
|
|
418
418
|
* @throws Error if called on a new (unsaved) record
|
|
419
419
|
*
|
|
420
420
|
* @example
|
|
421
421
|
* ```typescript
|
|
422
|
-
* // Get all linked
|
|
423
|
-
* const items = await record.
|
|
424
|
-
* const first = await record.
|
|
422
|
+
* // Get all linked TwilioCallEvent records
|
|
423
|
+
* const items = await record.twilioCallEvents.list();
|
|
424
|
+
* const first = await record.twilioCallEvents.first();
|
|
425
425
|
*
|
|
426
426
|
* // Filter by label
|
|
427
|
-
* const specific = await record.
|
|
427
|
+
* const specific = await record.twilioCallEvents.first({ label: 'Call__TwilioCallEvents' });
|
|
428
428
|
* ```
|
|
429
429
|
*/
|
|
430
|
-
get
|
|
430
|
+
get twilioCallEvents() {
|
|
431
431
|
var _a;
|
|
432
432
|
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
433
433
|
throw new Error('Cannot access links on a new (unsaved) record');
|
|
434
|
-
if (!this.
|
|
435
|
-
this.
|
|
434
|
+
if (!this._twilioCallEvents) {
|
|
435
|
+
this._twilioCallEvents = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
436
436
|
sourceEntity: 'NotificationModule:Call',
|
|
437
|
-
targetEntity: 'NotificationModule:
|
|
437
|
+
targetEntity: 'NotificationModule:TwilioCallEvent',
|
|
438
438
|
targetModuleName: 'NotificationModule',
|
|
439
|
-
targetEntityName: '
|
|
439
|
+
targetEntityName: 'TwilioCallEvent',
|
|
440
440
|
labels: ['Call__TwilioCallEvents'],
|
|
441
|
-
},
|
|
441
|
+
}, TwilioCallEventRecord_1.TwilioCallEventRecord);
|
|
442
442
|
}
|
|
443
|
-
return this.
|
|
443
|
+
return this._twilioCallEvents;
|
|
444
444
|
}
|
|
445
445
|
// ============================================
|
|
446
446
|
// LINK MANAGEMENT
|
|
@@ -922,8 +922,8 @@ CallRecord.callTransfersLabels = ['Call_CallTransfer'];
|
|
|
922
922
|
CallRecord.casesLabels = ['Call__Case'];
|
|
923
923
|
/** Valid labels for WorkOrder associations */
|
|
924
924
|
CallRecord.workOrdersLabels = ['Call__WorkOrder'];
|
|
925
|
-
/** Valid labels for
|
|
926
|
-
CallRecord.
|
|
925
|
+
/** Valid labels for TwilioCallEvent associations */
|
|
926
|
+
CallRecord.twilioCallEventsLabels = ['Call__TwilioCallEvents'];
|
|
927
927
|
/** Type guard to check if an object is a CallRecord */
|
|
928
928
|
function isCallRecord(obj) {
|
|
929
929
|
return obj instanceof CallRecord;
|
|
@@ -25,11 +25,8 @@ import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-man
|
|
|
25
25
|
import { OfferProperties, RecontractOfferProperties, StandardOfferProperties } from '../entities-v2/Offer';
|
|
26
26
|
import { OfferCreateProperties } from '../actions-v2/OfferCreateDto';
|
|
27
27
|
import { OfferUpdateProperties } from '../actions-v2/OfferUpdateDto';
|
|
28
|
-
import { LeadRecord } from './LeadRecord';
|
|
29
28
|
import { DiscountRecord } from './DiscountRecord';
|
|
30
|
-
import { OrderItemRecord } from './OrderItemRecord';
|
|
31
29
|
import { ProductRecord } from './ProductRecord';
|
|
32
|
-
import { PriceBookRecord } from './PriceBookRecord';
|
|
33
30
|
/** Valid entity types for Offer */
|
|
34
31
|
export declare type OfferType = 'DEFAULT' | 'RECONTRACT' | 'STANDARD';
|
|
35
32
|
/**
|
|
@@ -95,12 +92,9 @@ export declare class OfferRecord<TProps = OfferProperties> {
|
|
|
95
92
|
private _provider;
|
|
96
93
|
private _pendingLinks;
|
|
97
94
|
private _preGeneratedId;
|
|
98
|
-
private
|
|
95
|
+
private _offers?;
|
|
99
96
|
private _discounts?;
|
|
100
|
-
private _orderItems?;
|
|
101
97
|
private _products?;
|
|
102
|
-
private _offers?;
|
|
103
|
-
private _priceBooks?;
|
|
104
98
|
/**
|
|
105
99
|
* Create a record wrapper.
|
|
106
100
|
* @param record - The underlying record, or null for create operations
|
|
@@ -174,24 +168,24 @@ export declare class OfferRecord<TProps = OfferProperties> {
|
|
|
174
168
|
* @remarks STANDARD
|
|
175
169
|
*/
|
|
176
170
|
isStandard(): this is OfferRecord<StandardOfferProperties>;
|
|
177
|
-
/** Valid labels for
|
|
178
|
-
static readonly
|
|
171
|
+
/** Valid labels for Offer associations */
|
|
172
|
+
static readonly offersLabels: readonly ["Lead__Offer", "OrderItem__Offer", "Offer__Offer", "PriceBook__Offer"];
|
|
179
173
|
/**
|
|
180
|
-
* Access linked
|
|
181
|
-
* @remarks Available labels: Lead__Offer
|
|
174
|
+
* Access linked Offer records
|
|
175
|
+
* @remarks Available labels: Lead__Offer, OrderItem__Offer, Offer__Offer, PriceBook__Offer
|
|
182
176
|
* @throws Error if called on a new (unsaved) record
|
|
183
177
|
*
|
|
184
178
|
* @example
|
|
185
179
|
* ```typescript
|
|
186
|
-
* // Get all linked
|
|
187
|
-
* const items = await record.
|
|
188
|
-
* const first = await record.
|
|
180
|
+
* // Get all linked Offer records
|
|
181
|
+
* const items = await record.offers.list();
|
|
182
|
+
* const first = await record.offers.first();
|
|
189
183
|
*
|
|
190
184
|
* // Filter by label
|
|
191
|
-
* const specific = await record.
|
|
185
|
+
* const specific = await record.offers.first({ label: 'Lead__Offer' });
|
|
192
186
|
* ```
|
|
193
187
|
*/
|
|
194
|
-
get
|
|
188
|
+
get offers(): RecordLinkManager<OfferRecord, typeof OfferRecord['offersLabels'][number]>;
|
|
195
189
|
/** Valid labels for Discount associations */
|
|
196
190
|
static readonly discountsLabels: readonly ["Offer__Discount"];
|
|
197
191
|
/**
|
|
@@ -210,24 +204,6 @@ export declare class OfferRecord<TProps = OfferProperties> {
|
|
|
210
204
|
* ```
|
|
211
205
|
*/
|
|
212
206
|
get discounts(): RecordLinkManager<DiscountRecord, typeof OfferRecord['discountsLabels'][number]>;
|
|
213
|
-
/** Valid labels for OrderItem associations */
|
|
214
|
-
static readonly orderItemsLabels: readonly ["OrderItem__Offer"];
|
|
215
|
-
/**
|
|
216
|
-
* Access linked OrderItem records
|
|
217
|
-
* @remarks Available labels: OrderItem__Offer
|
|
218
|
-
* @throws Error if called on a new (unsaved) record
|
|
219
|
-
*
|
|
220
|
-
* @example
|
|
221
|
-
* ```typescript
|
|
222
|
-
* // Get all linked OrderItem records
|
|
223
|
-
* const items = await record.orderItems.list();
|
|
224
|
-
* const first = await record.orderItems.first();
|
|
225
|
-
*
|
|
226
|
-
* // Filter by label
|
|
227
|
-
* const specific = await record.orderItems.first({ label: 'OrderItem__Offer' });
|
|
228
|
-
* ```
|
|
229
|
-
*/
|
|
230
|
-
get orderItems(): RecordLinkManager<OrderItemRecord, typeof OfferRecord['orderItemsLabels'][number]>;
|
|
231
207
|
/** Valid labels for Product associations */
|
|
232
208
|
static readonly productsLabels: readonly ["Offer__Product"];
|
|
233
209
|
/**
|
|
@@ -246,42 +222,6 @@ export declare class OfferRecord<TProps = OfferProperties> {
|
|
|
246
222
|
* ```
|
|
247
223
|
*/
|
|
248
224
|
get products(): RecordLinkManager<ProductRecord, typeof OfferRecord['productsLabels'][number]>;
|
|
249
|
-
/** Valid labels for Offer associations */
|
|
250
|
-
static readonly offersLabels: readonly ["Offer__Offer"];
|
|
251
|
-
/**
|
|
252
|
-
* Access linked Offer records
|
|
253
|
-
* @remarks Available labels: Offer__Offer
|
|
254
|
-
* @throws Error if called on a new (unsaved) record
|
|
255
|
-
*
|
|
256
|
-
* @example
|
|
257
|
-
* ```typescript
|
|
258
|
-
* // Get all linked Offer records
|
|
259
|
-
* const items = await record.offers.list();
|
|
260
|
-
* const first = await record.offers.first();
|
|
261
|
-
*
|
|
262
|
-
* // Filter by label
|
|
263
|
-
* const specific = await record.offers.first({ label: 'Offer__Offer' });
|
|
264
|
-
* ```
|
|
265
|
-
*/
|
|
266
|
-
get offers(): RecordLinkManager<OfferRecord, typeof OfferRecord['offersLabels'][number]>;
|
|
267
|
-
/** Valid labels for PriceBook associations */
|
|
268
|
-
static readonly priceBooksLabels: readonly ["PriceBook__Offer"];
|
|
269
|
-
/**
|
|
270
|
-
* Access linked PriceBook records
|
|
271
|
-
* @remarks Available labels: PriceBook__Offer
|
|
272
|
-
* @throws Error if called on a new (unsaved) record
|
|
273
|
-
*
|
|
274
|
-
* @example
|
|
275
|
-
* ```typescript
|
|
276
|
-
* // Get all linked PriceBook records
|
|
277
|
-
* const items = await record.priceBooks.list();
|
|
278
|
-
* const first = await record.priceBooks.first();
|
|
279
|
-
*
|
|
280
|
-
* // Filter by label
|
|
281
|
-
* const specific = await record.priceBooks.first({ label: 'PriceBook__Offer' });
|
|
282
|
-
* ```
|
|
283
|
-
*/
|
|
284
|
-
get priceBooks(): RecordLinkManager<PriceBookRecord, typeof OfferRecord['priceBooksLabels'][number]>;
|
|
285
225
|
/**
|
|
286
226
|
* Queue a link to be created with the next action.
|
|
287
227
|
* Works for both create and update actions.
|