@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.
Files changed (51) hide show
  1. package/README.md +4 -4
  2. package/dist/EntityRegistry.d.ts +2 -2
  3. package/dist/EntityRegistry.js +2 -2
  4. package/dist/OdinApiClient.d.ts +4 -4
  5. package/dist/OdinApiClient.js +6 -6
  6. package/dist/OdinDbClient.d.ts +4 -4
  7. package/dist/OdinDbClient.js +6 -6
  8. package/dist/accessors-v2/{TwilioCallEventsAccessor.d.ts → TwilioCallEventAccessor.d.ts} +24 -24
  9. package/dist/accessors-v2/{TwilioCallEventsAccessor.js → TwilioCallEventAccessor.js} +21 -21
  10. package/dist/accessors-v2/index.d.ts +1 -1
  11. package/dist/accessors-v2/index.js +3 -3
  12. package/dist/actions-v2/CreateInboundCallEventDto.d.ts +18 -23
  13. package/dist/actions-v2/CreateInboundCallEventDto.js +14 -19
  14. package/dist/actions-v2/CreateOutboundCallEventDto.d.ts +26 -26
  15. package/dist/actions-v2/CreateOutboundCallEventDto.js +13 -13
  16. package/dist/actions-v2/CreateVoiceConfigurationDto.d.ts +14 -14
  17. package/dist/api-sdk-v2/CallApi.d.ts +2 -2
  18. package/dist/api-sdk-v2/CallApi.js +4 -4
  19. package/dist/api-sdk-v2/OfferApi.d.ts +8 -8
  20. package/dist/api-sdk-v2/OfferApi.js +22 -22
  21. package/dist/api-sdk-v2/{TwilioCallEventsApi.d.ts → TwilioCallEventApi.d.ts} +11 -11
  22. package/dist/api-sdk-v2/{TwilioCallEventsApi.js → TwilioCallEventApi.js} +17 -17
  23. package/dist/db-accessors-v2/{TwilioCallEventsDbAccessor.d.ts → TwilioCallEventDbAccessor.d.ts} +22 -22
  24. package/dist/db-accessors-v2/{TwilioCallEventsDbAccessor.js → TwilioCallEventDbAccessor.js} +21 -21
  25. package/dist/db-accessors-v2/index.d.ts +1 -1
  26. package/dist/db-accessors-v2/index.js +3 -3
  27. package/dist/db-sdk-v2/CallDb.d.ts +2 -2
  28. package/dist/db-sdk-v2/CallDb.js +4 -4
  29. package/dist/db-sdk-v2/OfferDb.d.ts +8 -8
  30. package/dist/db-sdk-v2/OfferDb.js +22 -22
  31. package/dist/db-sdk-v2/{TwilioCallEventsDb.d.ts → TwilioCallEventDb.d.ts} +15 -15
  32. package/dist/db-sdk-v2/{TwilioCallEventsDb.js → TwilioCallEventDb.js} +20 -20
  33. package/dist/entities-v2/Call.d.ts +5 -5
  34. package/dist/entities-v2/Call.js +2 -2
  35. package/dist/entities-v2/Offer.d.ts +6 -6
  36. package/dist/entities-v2/Offer.js +5 -5
  37. package/dist/entities-v2/TwilioCallEvent.d.ts +229 -0
  38. package/dist/entities-v2/TwilioCallEvent.js +103 -0
  39. package/dist/records-v2/CallRecord.d.ts +10 -10
  40. package/dist/records-v2/CallRecord.js +15 -15
  41. package/dist/records-v2/OfferRecord.d.ts +10 -70
  42. package/dist/records-v2/OfferRecord.js +17 -116
  43. package/dist/records-v2/ProductRecord.d.ts +3 -103
  44. package/dist/records-v2/ProductRecord.js +4 -169
  45. package/dist/records-v2/{TwilioCallEventsRecord.d.ts → TwilioCallEventRecord.d.ts} +22 -86
  46. package/dist/records-v2/{TwilioCallEventsRecord.js → TwilioCallEventRecord.js} +28 -92
  47. package/dist/records-v2/index.d.ts +1 -1
  48. package/dist/records-v2/index.js +4 -4
  49. package/package.json +1 -1
  50. package/dist/entities-v2/TwilioCallEvents.d.ts +0 -433
  51. package/dist/entities-v2/TwilioCallEvents.js +0 -135
@@ -1,5 +1,5 @@
1
1
  /**
2
- * TwilioCallEvents Record Wrapper
2
+ * TwilioCallEvent Record Wrapper
3
3
  *
4
4
  * Provides typed action methods and link management.
5
5
  * Works with both ApiProvider and DbProvider.
@@ -9,11 +9,11 @@
9
9
  *
10
10
  * Can be instantiated with null record for create operations:
11
11
  * ```typescript
12
- * const record = odinClient.twilioCallEventss.new();
13
- * await record.createTwilioCallEvents({ ... }).execute();
12
+ * const record = odinClient.twilioCallEvents.new();
13
+ * await record.createTwilioCallEvent({ ... }).execute();
14
14
  * ```
15
15
  *
16
- * Entity Types: INBOUND_CALL_EVENT, INBOUND_CALL_STATUS_UPDATE_EVENT, NUMBER_CALL_STATUS_EVENT, OUTBOUND_CALL_EVENT, OUTBOUND_CALL_STATUS_UPDATE_EVENT, OUTBOUND_DIAL_ACTION_EVENT
16
+ * Entity Types: INBOUND_CALL_EVENT, OUTBOUND_CALL_EVENT
17
17
  *
18
18
  * AUTO-GENERATED - DO NOT EDIT DIRECTLY
19
19
  */
@@ -22,12 +22,12 @@ import { PipelineStageEntity } from '@d19n/odin-types/dist/core';
22
22
  import { IDbRecordCreateUpdateRes } from '@d19n/odin-types/dist/core/interfaces/v1.db.interfaces';
23
23
  import { IOdinProvider } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
24
24
  import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-manager';
25
- import { TwilioCallEventsProperties, InboundCallEventTwilioCallEventsProperties, InboundCallStatusUpdateEventTwilioCallEventsProperties, NumberCallStatusEventTwilioCallEventsProperties, OutboundCallEventTwilioCallEventsProperties, OutboundCallStatusUpdateEventTwilioCallEventsProperties, OutboundDialActionEventTwilioCallEventsProperties } from '../entities-v2/TwilioCallEvents';
25
+ import { TwilioCallEventProperties, InboundCallEventTwilioCallEventProperties, OutboundCallEventTwilioCallEventProperties } from '../entities-v2/TwilioCallEvent';
26
26
  import { CreateInboundCallEventProperties } from '../actions-v2/CreateInboundCallEventDto';
27
27
  import { CreateOutboundCallEventProperties } from '../actions-v2/CreateOutboundCallEventDto';
28
28
  import { CallRecord } from './CallRecord';
29
- /** Valid entity types for TwilioCallEvents */
30
- export declare type TwilioCallEventsType = 'INBOUND_CALL_EVENT' | 'INBOUND_CALL_STATUS_UPDATE_EVENT' | 'NUMBER_CALL_STATUS_EVENT' | 'OUTBOUND_CALL_EVENT' | 'OUTBOUND_CALL_STATUS_UPDATE_EVENT' | 'OUTBOUND_DIAL_ACTION_EVENT';
29
+ /** Valid entity types for TwilioCallEvent */
30
+ export declare type TwilioCallEventType = 'INBOUND_CALL_EVENT' | 'OUTBOUND_CALL_EVENT';
31
31
  /**
32
32
  * Builder for action execution with dryRun support
33
33
  *
@@ -86,7 +86,7 @@ declare class ActionBuilder<T = IDbRecordCreateUpdateRes[]> {
86
86
  */
87
87
  then(): never;
88
88
  }
89
- export declare class TwilioCallEventsRecord<TProps = TwilioCallEventsProperties> {
89
+ export declare class TwilioCallEventRecord<TProps = TwilioCallEventProperties> {
90
90
  private _record;
91
91
  private _provider;
92
92
  private _pendingLinks;
@@ -104,7 +104,7 @@ export declare class TwilioCallEventsRecord<TProps = TwilioCallEventsProperties>
104
104
  /** Record ID - always available (pre-generated for new records) */
105
105
  get id(): string;
106
106
  get entity(): string;
107
- get type(): TwilioCallEventsType | undefined;
107
+ get type(): TwilioCallEventType | undefined;
108
108
  /** Record properties - empty object for new (unsaved) records */
109
109
  get properties(): TProps;
110
110
  get title(): string | undefined;
@@ -126,45 +126,13 @@ export declare class TwilioCallEventsRecord<TProps = TwilioCallEventsProperties>
126
126
  * @example
127
127
  * ```typescript
128
128
  * if (record.isInboundCallEvent()) {
129
- * // TypeScript knows record.properties is InboundCallEventTwilioCallEventsProperties
129
+ * // TypeScript knows record.properties is InboundCallEventTwilioCallEventProperties
130
130
  * console.log(record.properties.SomeTypeSpecificField);
131
131
  * }
132
132
  * ```
133
133
  * @remarks Inbound call webhook events
134
134
  */
135
- isInboundCallEvent(): this is TwilioCallEventsRecord<InboundCallEventTwilioCallEventsProperties>;
136
- /**
137
- * Type guard: check if this record is of type INBOUND_CALL_STATUS_UPDATE_EVENT
138
- *
139
- * When this returns true, TypeScript automatically narrows the type,
140
- * giving you access to INBOUND_CALL_STATUS_UPDATE_EVENT-specific properties.
141
- *
142
- * @example
143
- * ```typescript
144
- * if (record.isInboundCallStatusUpdateEvent()) {
145
- * // TypeScript knows record.properties is InboundCallStatusUpdateEventTwilioCallEventsProperties
146
- * console.log(record.properties.SomeTypeSpecificField);
147
- * }
148
- * ```
149
- * @remarks Callback containing incoming call status updates for agent
150
- */
151
- isInboundCallStatusUpdateEvent(): this is TwilioCallEventsRecord<InboundCallStatusUpdateEventTwilioCallEventsProperties>;
152
- /**
153
- * Type guard: check if this record is of type NUMBER_CALL_STATUS_EVENT
154
- *
155
- * When this returns true, TypeScript automatically narrows the type,
156
- * giving you access to NUMBER_CALL_STATUS_EVENT-specific properties.
157
- *
158
- * @example
159
- * ```typescript
160
- * if (record.isNumberCallStatusEvent()) {
161
- * // TypeScript knows record.properties is NumberCallStatusEventTwilioCallEventsProperties
162
- * console.log(record.properties.SomeTypeSpecificField);
163
- * }
164
- * ```
165
- * @remarks Callback containing incoming call wrap up for customer
166
- */
167
- isNumberCallStatusEvent(): this is TwilioCallEventsRecord<NumberCallStatusEventTwilioCallEventsProperties>;
135
+ isInboundCallEvent(): this is TwilioCallEventRecord<InboundCallEventTwilioCallEventProperties>;
168
136
  /**
169
137
  * Type guard: check if this record is of type OUTBOUND_CALL_EVENT
170
138
  *
@@ -174,45 +142,13 @@ export declare class TwilioCallEventsRecord<TProps = TwilioCallEventsProperties>
174
142
  * @example
175
143
  * ```typescript
176
144
  * if (record.isOutboundCallEvent()) {
177
- * // TypeScript knows record.properties is OutboundCallEventTwilioCallEventsProperties
145
+ * // TypeScript knows record.properties is OutboundCallEventTwilioCallEventProperties
178
146
  * console.log(record.properties.SomeTypeSpecificField);
179
147
  * }
180
148
  * ```
181
149
  * @remarks Outbound call webhook events
182
150
  */
183
- isOutboundCallEvent(): this is TwilioCallEventsRecord<OutboundCallEventTwilioCallEventsProperties>;
184
- /**
185
- * Type guard: check if this record is of type OUTBOUND_CALL_STATUS_UPDATE_EVENT
186
- *
187
- * When this returns true, TypeScript automatically narrows the type,
188
- * giving you access to OUTBOUND_CALL_STATUS_UPDATE_EVENT-specific properties.
189
- *
190
- * @example
191
- * ```typescript
192
- * if (record.isOutboundCallStatusUpdateEvent()) {
193
- * // TypeScript knows record.properties is OutboundCallStatusUpdateEventTwilioCallEventsProperties
194
- * console.log(record.properties.SomeTypeSpecificField);
195
- * }
196
- * ```
197
- * @remarks Callback containing outbound call status updates for customer
198
- */
199
- isOutboundCallStatusUpdateEvent(): this is TwilioCallEventsRecord<OutboundCallStatusUpdateEventTwilioCallEventsProperties>;
200
- /**
201
- * Type guard: check if this record is of type OUTBOUND_DIAL_ACTION_EVENT
202
- *
203
- * When this returns true, TypeScript automatically narrows the type,
204
- * giving you access to OUTBOUND_DIAL_ACTION_EVENT-specific properties.
205
- *
206
- * @example
207
- * ```typescript
208
- * if (record.isOutboundDialActionEvent()) {
209
- * // TypeScript knows record.properties is OutboundDialActionEventTwilioCallEventsProperties
210
- * console.log(record.properties.SomeTypeSpecificField);
211
- * }
212
- * ```
213
- * @remarks Callback containing outbound call wrap up for agent
214
- */
215
- isOutboundDialActionEvent(): this is TwilioCallEventsRecord<OutboundDialActionEventTwilioCallEventsProperties>;
151
+ isOutboundCallEvent(): this is TwilioCallEventRecord<OutboundCallEventTwilioCallEventProperties>;
216
152
  /** Valid labels for Call associations */
217
153
  static readonly callsLabels: readonly ["Call__TwilioCallEvents"];
218
154
  /**
@@ -230,7 +166,7 @@ export declare class TwilioCallEventsRecord<TProps = TwilioCallEventsProperties>
230
166
  * const specific = await record.calls.first({ label: 'Call__TwilioCallEvents' });
231
167
  * ```
232
168
  */
233
- get calls(): RecordLinkManager<CallRecord, typeof TwilioCallEventsRecord['callsLabels'][number]>;
169
+ get calls(): RecordLinkManager<CallRecord, typeof TwilioCallEventRecord['callsLabels'][number]>;
234
170
  /**
235
171
  * Queue a link to be created with the next action.
236
172
  * Works for both create and update actions.
@@ -255,13 +191,12 @@ export declare class TwilioCallEventsRecord<TProps = TwilioCallEventsProperties>
255
191
  /**
256
192
  * CreateInboundCallEvent
257
193
  *
258
- * Creates a new TwilioCallEvents record with the specified properties.
194
+ * Creates a new TwilioCallEvent record with the specified properties.
259
195
  * Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
260
196
  *
261
- * @remarks Record type: INBOUND_CALL_EVENT
262
- *
263
197
  * @param properties - The properties for the new record
264
198
  * @param options - Optional settings
199
+ * @param options.type - Override the record type
265
200
  * @param options.journeyId - Associate with a journey
266
201
  * @param options.stageKey - Set initial pipeline stage
267
202
  * @returns ActionBuilder - call .execute() to create or .dryRun() for payload
@@ -269,7 +204,7 @@ export declare class TwilioCallEventsRecord<TProps = TwilioCallEventsProperties>
269
204
  * @example
270
205
  * ```typescript
271
206
  * // Create with properties
272
- * const record = odinClient.twilioCallEventss.new();
207
+ * const record = odinClient.twilioCallEvents.new();
273
208
  * await record.createInboundCallEvent({ ... }).execute();
274
209
  *
275
210
  * // Dry run (for debugging)
@@ -277,13 +212,14 @@ export declare class TwilioCallEventsRecord<TProps = TwilioCallEventsProperties>
277
212
  * ```
278
213
  */
279
214
  createInboundCallEvent(properties: CreateInboundCallEventProperties, options?: {
215
+ type?: string;
280
216
  journeyId?: string;
281
217
  stageKey?: string;
282
218
  }): ActionBuilder;
283
219
  /**
284
220
  * CreateOutboundCallEvent
285
221
  *
286
- * Creates a new TwilioCallEvents record with the specified properties.
222
+ * Creates a new TwilioCallEvent record with the specified properties.
287
223
  * Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
288
224
  *
289
225
  * @param properties - The properties for the new record
@@ -296,7 +232,7 @@ export declare class TwilioCallEventsRecord<TProps = TwilioCallEventsProperties>
296
232
  * @example
297
233
  * ```typescript
298
234
  * // Create with properties
299
- * const record = odinClient.twilioCallEventss.new();
235
+ * const record = odinClient.twilioCallEvents.new();
300
236
  * await record.createOutboundCallEvent({ ... }).execute();
301
237
  *
302
238
  * // Dry run (for debugging)
@@ -309,6 +245,6 @@ export declare class TwilioCallEventsRecord<TProps = TwilioCallEventsProperties>
309
245
  stageKey?: string;
310
246
  }): ActionBuilder;
311
247
  }
312
- /** Type guard to check if an object is a TwilioCallEventsRecord */
313
- export declare function isTwilioCallEventsRecord(obj: any): obj is TwilioCallEventsRecord;
248
+ /** Type guard to check if an object is a TwilioCallEventRecord */
249
+ export declare function isTwilioCallEventRecord(obj: any): obj is TwilioCallEventRecord;
314
250
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * TwilioCallEvents Record Wrapper
3
+ * TwilioCallEvent Record Wrapper
4
4
  *
5
5
  * Provides typed action methods and link management.
6
6
  * Works with both ApiProvider and DbProvider.
@@ -10,11 +10,11 @@
10
10
  *
11
11
  * Can be instantiated with null record for create operations:
12
12
  * ```typescript
13
- * const record = odinClient.twilioCallEventss.new();
14
- * await record.createTwilioCallEvents({ ... }).execute();
13
+ * const record = odinClient.twilioCallEvents.new();
14
+ * await record.createTwilioCallEvent({ ... }).execute();
15
15
  * ```
16
16
  *
17
- * Entity Types: INBOUND_CALL_EVENT, INBOUND_CALL_STATUS_UPDATE_EVENT, NUMBER_CALL_STATUS_EVENT, OUTBOUND_CALL_EVENT, OUTBOUND_CALL_STATUS_UPDATE_EVENT, OUTBOUND_DIAL_ACTION_EVENT
17
+ * Entity Types: INBOUND_CALL_EVENT, OUTBOUND_CALL_EVENT
18
18
  *
19
19
  * AUTO-GENERATED - DO NOT EDIT DIRECTLY
20
20
  */
@@ -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.isTwilioCallEventsRecord = exports.TwilioCallEventsRecord = void 0;
31
+ exports.isTwilioCallEventRecord = exports.TwilioCallEventRecord = 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");
@@ -109,7 +109,7 @@ class ActionBuilder {
109
109
  throw new Error('ActionBuilder cannot be awaited directly. Call .execute() to run the action or .dryRun() to get the payload.');
110
110
  }
111
111
  }
112
- class TwilioCallEventsRecord {
112
+ class TwilioCallEventRecord {
113
113
  /**
114
114
  * Create a record wrapper.
115
115
  * @param record - The underlying record, or null for create operations
@@ -129,7 +129,7 @@ class TwilioCallEventsRecord {
129
129
  get isNew() { var _a; return !((_a = this._record) === null || _a === void 0 ? void 0 : _a.id); }
130
130
  /** Record ID - always available (pre-generated for new records) */
131
131
  get id() { var _a, _b; return (_b = (_a = this._record) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : this._preGeneratedId; }
132
- get entity() { var _a, _b; return (_b = (_a = this._record) === null || _a === void 0 ? void 0 : _a.entity) !== null && _b !== void 0 ? _b : 'NotificationModule:TwilioCallEvents'; }
132
+ get entity() { var _a, _b; return (_b = (_a = this._record) === null || _a === void 0 ? void 0 : _a.entity) !== null && _b !== void 0 ? _b : 'NotificationModule:TwilioCallEvent'; }
133
133
  get type() { var _a; return (_a = this._record) === null || _a === void 0 ? void 0 : _a.type; }
134
134
  /** Record properties - empty object for new (unsaved) records */
135
135
  get properties() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.properties) || {}; }
@@ -155,45 +155,13 @@ class TwilioCallEventsRecord {
155
155
  * @example
156
156
  * ```typescript
157
157
  * if (record.isInboundCallEvent()) {
158
- * // TypeScript knows record.properties is InboundCallEventTwilioCallEventsProperties
158
+ * // TypeScript knows record.properties is InboundCallEventTwilioCallEventProperties
159
159
  * console.log(record.properties.SomeTypeSpecificField);
160
160
  * }
161
161
  * ```
162
162
  * @remarks Inbound call webhook events
163
163
  */
164
164
  isInboundCallEvent() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'INBOUND_CALL_EVENT'; }
165
- /**
166
- * Type guard: check if this record is of type INBOUND_CALL_STATUS_UPDATE_EVENT
167
- *
168
- * When this returns true, TypeScript automatically narrows the type,
169
- * giving you access to INBOUND_CALL_STATUS_UPDATE_EVENT-specific properties.
170
- *
171
- * @example
172
- * ```typescript
173
- * if (record.isInboundCallStatusUpdateEvent()) {
174
- * // TypeScript knows record.properties is InboundCallStatusUpdateEventTwilioCallEventsProperties
175
- * console.log(record.properties.SomeTypeSpecificField);
176
- * }
177
- * ```
178
- * @remarks Callback containing incoming call status updates for agent
179
- */
180
- isInboundCallStatusUpdateEvent() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'INBOUND_CALL_STATUS_UPDATE_EVENT'; }
181
- /**
182
- * Type guard: check if this record is of type NUMBER_CALL_STATUS_EVENT
183
- *
184
- * When this returns true, TypeScript automatically narrows the type,
185
- * giving you access to NUMBER_CALL_STATUS_EVENT-specific properties.
186
- *
187
- * @example
188
- * ```typescript
189
- * if (record.isNumberCallStatusEvent()) {
190
- * // TypeScript knows record.properties is NumberCallStatusEventTwilioCallEventsProperties
191
- * console.log(record.properties.SomeTypeSpecificField);
192
- * }
193
- * ```
194
- * @remarks Callback containing incoming call wrap up for customer
195
- */
196
- isNumberCallStatusEvent() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'NUMBER_CALL_STATUS_EVENT'; }
197
165
  /**
198
166
  * Type guard: check if this record is of type OUTBOUND_CALL_EVENT
199
167
  *
@@ -203,45 +171,13 @@ class TwilioCallEventsRecord {
203
171
  * @example
204
172
  * ```typescript
205
173
  * if (record.isOutboundCallEvent()) {
206
- * // TypeScript knows record.properties is OutboundCallEventTwilioCallEventsProperties
174
+ * // TypeScript knows record.properties is OutboundCallEventTwilioCallEventProperties
207
175
  * console.log(record.properties.SomeTypeSpecificField);
208
176
  * }
209
177
  * ```
210
178
  * @remarks Outbound call webhook events
211
179
  */
212
180
  isOutboundCallEvent() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'OUTBOUND_CALL_EVENT'; }
213
- /**
214
- * Type guard: check if this record is of type OUTBOUND_CALL_STATUS_UPDATE_EVENT
215
- *
216
- * When this returns true, TypeScript automatically narrows the type,
217
- * giving you access to OUTBOUND_CALL_STATUS_UPDATE_EVENT-specific properties.
218
- *
219
- * @example
220
- * ```typescript
221
- * if (record.isOutboundCallStatusUpdateEvent()) {
222
- * // TypeScript knows record.properties is OutboundCallStatusUpdateEventTwilioCallEventsProperties
223
- * console.log(record.properties.SomeTypeSpecificField);
224
- * }
225
- * ```
226
- * @remarks Callback containing outbound call status updates for customer
227
- */
228
- isOutboundCallStatusUpdateEvent() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'OUTBOUND_CALL_STATUS_UPDATE_EVENT'; }
229
- /**
230
- * Type guard: check if this record is of type OUTBOUND_DIAL_ACTION_EVENT
231
- *
232
- * When this returns true, TypeScript automatically narrows the type,
233
- * giving you access to OUTBOUND_DIAL_ACTION_EVENT-specific properties.
234
- *
235
- * @example
236
- * ```typescript
237
- * if (record.isOutboundDialActionEvent()) {
238
- * // TypeScript knows record.properties is OutboundDialActionEventTwilioCallEventsProperties
239
- * console.log(record.properties.SomeTypeSpecificField);
240
- * }
241
- * ```
242
- * @remarks Callback containing outbound call wrap up for agent
243
- */
244
- isOutboundDialActionEvent() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'OUTBOUND_DIAL_ACTION_EVENT'; }
245
181
  /**
246
182
  * Access linked Call records
247
183
  * @remarks Available labels: Call__TwilioCallEvents
@@ -263,7 +199,7 @@ class TwilioCallEventsRecord {
263
199
  throw new Error('Cannot access links on a new (unsaved) record');
264
200
  if (!this._calls) {
265
201
  this._calls = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
266
- sourceEntity: 'NotificationModule:TwilioCallEvents',
202
+ sourceEntity: 'NotificationModule:TwilioCallEvent',
267
203
  targetEntity: 'NotificationModule:Call',
268
204
  targetModuleName: 'NotificationModule',
269
205
  targetEntityName: 'Call',
@@ -304,7 +240,7 @@ class TwilioCallEventsRecord {
304
240
  if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
305
241
  throw new Error('Cannot unlink from a new (unsaved) record');
306
242
  const targetId = typeof target === 'string' ? target : target.id;
307
- yield this._provider._deleteLinks('NotificationModule', 'TwilioCallEvents', this._record.id, targetId);
243
+ yield this._provider._deleteLinks('NotificationModule', 'TwilioCallEvent', this._record.id, targetId);
308
244
  });
309
245
  }
310
246
  // ============================================
@@ -313,13 +249,12 @@ class TwilioCallEventsRecord {
313
249
  /**
314
250
  * CreateInboundCallEvent
315
251
  *
316
- * Creates a new TwilioCallEvents record with the specified properties.
252
+ * Creates a new TwilioCallEvent record with the specified properties.
317
253
  * Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
318
254
  *
319
- * @remarks Record type: INBOUND_CALL_EVENT
320
- *
321
255
  * @param properties - The properties for the new record
322
256
  * @param options - Optional settings
257
+ * @param options.type - Override the record type
323
258
  * @param options.journeyId - Associate with a journey
324
259
  * @param options.stageKey - Set initial pipeline stage
325
260
  * @returns ActionBuilder - call .execute() to create or .dryRun() for payload
@@ -327,7 +262,7 @@ class TwilioCallEventsRecord {
327
262
  * @example
328
263
  * ```typescript
329
264
  * // Create with properties
330
- * const record = odinClient.twilioCallEventss.new();
265
+ * const record = odinClient.twilioCallEvents.new();
331
266
  * await record.createInboundCallEvent({ ... }).execute();
332
267
  *
333
268
  * // Dry run (for debugging)
@@ -335,21 +270,22 @@ class TwilioCallEventsRecord {
335
270
  * ```
336
271
  */
337
272
  createInboundCallEvent(properties, options) {
273
+ var _a, _b;
338
274
  const payload = {
339
- entity: 'NotificationModule:TwilioCallEvents',
340
- type: 'INBOUND_CALL_EVENT',
275
+ entity: 'NotificationModule:TwilioCallEvent',
276
+ 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,
341
277
  actionName: 'CreateInboundCallEvent',
342
278
  properties: properties || {},
343
279
  associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
344
280
  journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
345
281
  stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
346
282
  };
347
- return new ActionBuilder(this._provider, 'NotificationModule', 'TwilioCallEvents', payload, () => { this._pendingLinks = []; });
283
+ return new ActionBuilder(this._provider, 'NotificationModule', 'TwilioCallEvent', payload, () => { this._pendingLinks = []; });
348
284
  }
349
285
  /**
350
286
  * CreateOutboundCallEvent
351
287
  *
352
- * Creates a new TwilioCallEvents record with the specified properties.
288
+ * Creates a new TwilioCallEvent record with the specified properties.
353
289
  * Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
354
290
  *
355
291
  * @param properties - The properties for the new record
@@ -362,7 +298,7 @@ class TwilioCallEventsRecord {
362
298
  * @example
363
299
  * ```typescript
364
300
  * // Create with properties
365
- * const record = odinClient.twilioCallEventss.new();
301
+ * const record = odinClient.twilioCallEvents.new();
366
302
  * await record.createOutboundCallEvent({ ... }).execute();
367
303
  *
368
304
  * // Dry run (for debugging)
@@ -372,7 +308,7 @@ class TwilioCallEventsRecord {
372
308
  createOutboundCallEvent(properties, options) {
373
309
  var _a, _b;
374
310
  const payload = {
375
- entity: 'NotificationModule:TwilioCallEvents',
311
+ entity: 'NotificationModule:TwilioCallEvent',
376
312
  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,
377
313
  actionName: 'CreateOutboundCallEvent',
378
314
  properties: properties || {},
@@ -380,17 +316,17 @@ class TwilioCallEventsRecord {
380
316
  journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
381
317
  stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
382
318
  };
383
- return new ActionBuilder(this._provider, 'NotificationModule', 'TwilioCallEvents', payload, () => { this._pendingLinks = []; });
319
+ return new ActionBuilder(this._provider, 'NotificationModule', 'TwilioCallEvent', payload, () => { this._pendingLinks = []; });
384
320
  }
385
321
  }
386
- exports.TwilioCallEventsRecord = TwilioCallEventsRecord;
322
+ exports.TwilioCallEventRecord = TwilioCallEventRecord;
387
323
  // ============================================
388
324
  // TYPED LINK ACCESSORS
389
325
  // ============================================
390
326
  /** Valid labels for Call associations */
391
- TwilioCallEventsRecord.callsLabels = ['Call__TwilioCallEvents'];
392
- /** Type guard to check if an object is a TwilioCallEventsRecord */
393
- function isTwilioCallEventsRecord(obj) {
394
- return obj instanceof TwilioCallEventsRecord;
327
+ TwilioCallEventRecord.callsLabels = ['Call__TwilioCallEvents'];
328
+ /** Type guard to check if an object is a TwilioCallEventRecord */
329
+ function isTwilioCallEventRecord(obj) {
330
+ return obj instanceof TwilioCallEventRecord;
395
331
  }
396
- exports.isTwilioCallEventsRecord = isTwilioCallEventsRecord;
332
+ exports.isTwilioCallEventRecord = isTwilioCallEventRecord;
@@ -60,7 +60,7 @@ export { FileRecord, isFileRecord } from './FileRecord';
60
60
  export { ActivityRecord, isActivityRecord } from './ActivityRecord';
61
61
  export { ImpersonationTrackerRecord, isImpersonationTrackerRecord } from './ImpersonationTrackerRecord';
62
62
  export { CallRecord, isCallRecord } from './CallRecord';
63
- export { TwilioCallEventsRecord, isTwilioCallEventsRecord } from './TwilioCallEventsRecord';
63
+ export { TwilioCallEventRecord, isTwilioCallEventRecord } from './TwilioCallEventRecord';
64
64
  export { InvoiceItemRecord, isInvoiceItemRecord } from './InvoiceItemRecord';
65
65
  export { LeadRecord, isLeadRecord } from './LeadRecord';
66
66
  export { MessageRecord, isMessageRecord } from './MessageRecord';
@@ -13,7 +13,7 @@
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.isYfFieldServiceVisitRecord = exports.YfFieldServiceVisitRecord = exports.isRemediationOutcomeFormRecord = exports.RemediationOutcomeFormRecord = exports.isOhExternalAuditRecord = exports.OhExternalAuditRecord = exports.isUgExternalAuditRecord = exports.UgExternalAuditRecord = exports.isPaymentMethodRefundRecord = exports.PaymentMethodRefundRecord = exports.isConversationRecord = exports.ConversationRecord = exports.isOntReplacementApprovalRecord = exports.OntReplacementApprovalRecord = exports.isAccountRecord = exports.AccountRecord = exports.isPermissionToFailRecord = exports.PermissionToFailRecord = exports.isTransactionRecord = exports.TransactionRecord = exports.isPaymentRecord = exports.PaymentRecord = exports.isPICRequestRecord = exports.PICRequestRecord = exports.isChangeReasonRecord = exports.ChangeReasonRecord = exports.isChurnRequestRecord = exports.ChurnRequestRecord = exports.isBillingRequestRecord = exports.BillingRequestRecord = exports.isBillingAdjustmentRecord = exports.BillingAdjustmentRecord = exports.isServiceAppointmentConfigRecord = exports.ServiceAppointmentConfigRecord = exports.isCrmDatasetRecord = exports.CrmDatasetRecord = exports.isNoteRecord = exports.NoteRecord = exports.isContractBuyOutRecord = exports.ContractBuyOutRecord = exports.isCaseRecord = exports.CaseRecord = exports.isAddressInteractionRecord = exports.AddressInteractionRecord = exports.isAddressRecord = exports.AddressRecord = exports.isWorkOrderRecord = exports.WorkOrderRecord = exports.isOrderRecord = exports.OrderRecord = void 0;
15
15
  exports.isImpersonationTrackerRecord = exports.ImpersonationTrackerRecord = exports.isActivityRecord = exports.ActivityRecord = exports.isFileRecord = exports.FileRecord = exports.isFieldServiceProductRecord = exports.FieldServiceProductRecord = exports.isFieldServiceDispatchedProductRecord = exports.FieldServiceDispatchedProductRecord = exports.isExchangeRecord = exports.ExchangeRecord = exports.isEmailTemplateRecord = exports.EmailTemplateRecord = exports.isEmailSenderRecord = exports.EmailSenderRecord = exports.isCustomerDeviceOntRecord = exports.CustomerDeviceOntRecord = exports.isCustomerDeviceConfigurationRecord = exports.CustomerDeviceConfigurationRecord = exports.isContactIdentityRecord = exports.ContactIdentityRecord = exports.isConfigRecord = exports.ConfigRecord = exports.isEmailRecord = exports.EmailRecord = exports.isRewardRecord = exports.RewardRecord = exports.isContactRecord = exports.ContactRecord = exports.isCallTransferRecord = exports.CallTransferRecord = exports.isProductRecord = exports.ProductRecord = exports.isBrskEntityMigrationErrorRecord = exports.BrskEntityMigrationErrorRecord = exports.isBngProvisionRecord = exports.BngProvisionRecord = exports.isPgFileAllocationRecord = exports.PgFileAllocationRecord = exports.isAppointmentRecord = exports.AppointmentRecord = exports.isCallLegRecord = exports.CallLegRecord = exports.isAffiliateCodeRecord = exports.AffiliateCodeRecord = exports.isActivityLogRecord = exports.ActivityLogRecord = exports.isAccountCreditRecord = exports.AccountCreditRecord = void 0;
16
- exports.isPgWebhookAttemptRecord = exports.PgWebhookAttemptRecord = exports.isPgAccountValidationRecord = exports.PgAccountValidationRecord = exports.isPgTransactionRecord = exports.PgTransactionRecord = exports.isPgSortCodeSubstitutionRecord = exports.PgSortCodeSubstitutionRecord = exports.isPgVocalinkRecord = exports.PgVocalinkRecord = exports.isPgDirectDebitFileRecord = exports.PgDirectDebitFileRecord = exports.isPgPaymentMethodRecord = exports.PgPaymentMethodRecord = exports.isPgLogRecord = exports.PgLogRecord = exports.isPgDisputeRecord = exports.PgDisputeRecord = exports.isPgContactRecord = exports.PgContactRecord = exports.isPaymentMethodRecord = exports.PaymentMethodRecord = exports.isSmsMessageRecord = exports.SmsMessageRecord = exports.isReferralRecord = exports.ReferralRecord = exports.isOrderKciRecord = exports.OrderKciRecord = exports.isOrderCheckRecord = exports.OrderCheckRecord = exports.isCampaignRecord = exports.CampaignRecord = exports.isOneTouchSwitchRecord = exports.OneTouchSwitchRecord = exports.isOfferTemplateRecord = exports.OfferTemplateRecord = exports.isReturnsRecord = exports.ReturnsRecord = exports.isNetworkDeviceRecord = exports.NetworkDeviceRecord = exports.isMessageRecord = exports.MessageRecord = exports.isLeadRecord = exports.LeadRecord = exports.isInvoiceItemRecord = exports.InvoiceItemRecord = exports.isTwilioCallEventsRecord = exports.TwilioCallEventsRecord = exports.isCallRecord = exports.CallRecord = void 0;
16
+ exports.isPgWebhookAttemptRecord = exports.PgWebhookAttemptRecord = exports.isPgAccountValidationRecord = exports.PgAccountValidationRecord = exports.isPgTransactionRecord = exports.PgTransactionRecord = exports.isPgSortCodeSubstitutionRecord = exports.PgSortCodeSubstitutionRecord = exports.isPgVocalinkRecord = exports.PgVocalinkRecord = exports.isPgDirectDebitFileRecord = exports.PgDirectDebitFileRecord = exports.isPgPaymentMethodRecord = exports.PgPaymentMethodRecord = exports.isPgLogRecord = exports.PgLogRecord = exports.isPgDisputeRecord = exports.PgDisputeRecord = exports.isPgContactRecord = exports.PgContactRecord = exports.isPaymentMethodRecord = exports.PaymentMethodRecord = exports.isSmsMessageRecord = exports.SmsMessageRecord = exports.isReferralRecord = exports.ReferralRecord = exports.isOrderKciRecord = exports.OrderKciRecord = exports.isOrderCheckRecord = exports.OrderCheckRecord = exports.isCampaignRecord = exports.CampaignRecord = exports.isOneTouchSwitchRecord = exports.OneTouchSwitchRecord = exports.isOfferTemplateRecord = exports.OfferTemplateRecord = exports.isReturnsRecord = exports.ReturnsRecord = exports.isNetworkDeviceRecord = exports.NetworkDeviceRecord = exports.isMessageRecord = exports.MessageRecord = exports.isLeadRecord = exports.LeadRecord = exports.isInvoiceItemRecord = exports.InvoiceItemRecord = exports.isTwilioCallEventRecord = exports.TwilioCallEventRecord = exports.isCallRecord = exports.CallRecord = void 0;
17
17
  exports.isOverlayRealA55Record = exports.OverlayRealA55Record = exports.isOfferRecord = exports.OfferRecord = exports.isServiceAppointmentRecord = exports.ServiceAppointmentRecord = exports.isOutageRecord = exports.OutageRecord = exports.isSiteSpecificRiskAssessmentOutcomeFormRecord = exports.SiteSpecificRiskAssessmentOutcomeFormRecord = exports.isRemediationRequiredReasonRecord = exports.RemediationRequiredReasonRecord = exports.isKnowledgeArticleRecord = exports.KnowledgeArticleRecord = exports.isInvoiceRecord = exports.InvoiceRecord = exports.isDiscountRecord = exports.DiscountRecord = exports.isCustomerDeviceRouterRecord = exports.CustomerDeviceRouterRecord = exports.isCustomerDeviceAtaRecord = exports.CustomerDeviceAtaRecord = exports.isCreditNoteRecord = exports.CreditNoteRecord = exports.isWorkOrderStatusUpdateRecord = exports.WorkOrderStatusUpdateRecord = exports.isWayleaveAuditRecord = exports.WayleaveAuditRecord = exports.isUserRecord = exports.UserRecord = exports.isTwilioUserUpdateRecord = exports.TwilioUserUpdateRecord = exports.isTwilioTaskQueueRecord = exports.TwilioTaskQueueRecord = exports.isTimeSlotRecord = exports.TimeSlotRecord = exports.isTeamRecord = exports.TeamRecord = exports.isSalesTerritoryRecord = exports.SalesTerritoryRecord = exports.isRegionRecord = exports.RegionRecord = exports.isVoiceConfigurationRecord = exports.VoiceConfigurationRecord = exports.isOrderItemRecord = exports.OrderItemRecord = exports.isPushNotificationRecord = exports.PushNotificationRecord = exports.isPgWebhookRecord = exports.PgWebhookRecord = void 0;
18
18
  exports.isCustomerPhonePortingRecord = exports.CustomerPhonePortingRecord = exports.isVisitRecord = exports.VisitRecord = exports.isServiceRecord = exports.ServiceRecord = exports.isScheduleSlotRecord = exports.ScheduleSlotRecord = exports.isPriceBookRecord = exports.PriceBookRecord = void 0;
19
19
  var OrderRecord_1 = require("./OrderRecord");
@@ -169,9 +169,9 @@ Object.defineProperty(exports, "isImpersonationTrackerRecord", { enumerable: tru
169
169
  var CallRecord_1 = require("./CallRecord");
170
170
  Object.defineProperty(exports, "CallRecord", { enumerable: true, get: function () { return CallRecord_1.CallRecord; } });
171
171
  Object.defineProperty(exports, "isCallRecord", { enumerable: true, get: function () { return CallRecord_1.isCallRecord; } });
172
- var TwilioCallEventsRecord_1 = require("./TwilioCallEventsRecord");
173
- Object.defineProperty(exports, "TwilioCallEventsRecord", { enumerable: true, get: function () { return TwilioCallEventsRecord_1.TwilioCallEventsRecord; } });
174
- Object.defineProperty(exports, "isTwilioCallEventsRecord", { enumerable: true, get: function () { return TwilioCallEventsRecord_1.isTwilioCallEventsRecord; } });
172
+ var TwilioCallEventRecord_1 = require("./TwilioCallEventRecord");
173
+ Object.defineProperty(exports, "TwilioCallEventRecord", { enumerable: true, get: function () { return TwilioCallEventRecord_1.TwilioCallEventRecord; } });
174
+ Object.defineProperty(exports, "isTwilioCallEventRecord", { enumerable: true, get: function () { return TwilioCallEventRecord_1.isTwilioCallEventRecord; } });
175
175
  var InvoiceItemRecord_1 = require("./InvoiceItemRecord");
176
176
  Object.defineProperty(exports, "InvoiceItemRecord", { enumerable: true, get: function () { return InvoiceItemRecord_1.InvoiceItemRecord; } });
177
177
  Object.defineProperty(exports, "isInvoiceItemRecord", { enumerable: true, get: function () { return InvoiceItemRecord_1.isInvoiceItemRecord; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d19n/youfibre-odin-sdk",
3
- "version": "2.0.147",
3
+ "version": "2.0.149",
4
4
  "description": "",
5
5
  "author": "@d19n",
6
6
  "license": "UNLICENSED",