@d19n/youfibre-odin-sdk 2.0.127 → 2.0.129

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 (36) hide show
  1. package/README.md +24 -1
  2. package/dist/actions-v2/MoveAccountCreditToCancelledDto.d.ts +115 -0
  3. package/dist/actions-v2/MoveAccountCreditToCancelledDto.js +80 -0
  4. package/dist/actions-v2/MoveAccountCreditToCompleteDto.d.ts +115 -0
  5. package/dist/actions-v2/MoveAccountCreditToCompleteDto.js +80 -0
  6. package/dist/actions-v2/MoveAccountCreditToInProgressDto.d.ts +115 -0
  7. package/dist/actions-v2/MoveAccountCreditToInProgressDto.js +80 -0
  8. package/dist/actions-v2/MoveAccountCreditToPendingDto.d.ts +115 -0
  9. package/dist/actions-v2/MoveAccountCreditToPendingDto.js +80 -0
  10. package/dist/actions-v2/MoveAccountCreditToVoidDto.d.ts +115 -0
  11. package/dist/actions-v2/MoveAccountCreditToVoidDto.js +80 -0
  12. package/dist/actions-v2/UpdateAgentCallLegOnIncomingCallFailedDto.d.ts +81 -0
  13. package/dist/actions-v2/UpdateAgentCallLegOnIncomingCallFailedDto.js +56 -0
  14. package/dist/actions-v2/UpdateAgentCallLegOnIncomingCallNoAnswerDto.d.ts +81 -0
  15. package/dist/actions-v2/UpdateAgentCallLegOnIncomingCallNoAnswerDto.js +56 -0
  16. package/dist/actions-v2/UpdateAgentCallLegOnOutboundCallFailedDto.d.ts +88 -0
  17. package/dist/actions-v2/UpdateAgentCallLegOnOutboundCallFailedDto.js +56 -0
  18. package/dist/actions-v2/UpdateCallOnInboundCallFailedDto.d.ts +97 -0
  19. package/dist/actions-v2/UpdateCallOnInboundCallFailedDto.js +56 -0
  20. package/dist/actions-v2/UpdateCallOnInboundCallNoAnswerDto.d.ts +97 -0
  21. package/dist/actions-v2/UpdateCallOnInboundCallNoAnswerDto.js +56 -0
  22. package/dist/actions-v2/UpdateCallOnOutboundCallFailedDto.d.ts +97 -0
  23. package/dist/actions-v2/UpdateCallOnOutboundCallFailedDto.js +56 -0
  24. package/dist/actions-v2/UpdateCustomerCallLegOnIncomingCallNoAnswerDto.d.ts +63 -0
  25. package/dist/actions-v2/UpdateCustomerCallLegOnIncomingCallNoAnswerDto.js +56 -0
  26. package/dist/actions-v2/UpdateCustomerCallLegOnOutboundCallFailedDto.d.ts +88 -0
  27. package/dist/actions-v2/UpdateCustomerCallLegOnOutboundCallFailedDto.js +56 -0
  28. package/dist/entities-v2/AccountCredit.d.ts +1 -1
  29. package/dist/entities-v2/AccountCredit.js +1 -1
  30. package/dist/records-v2/AccountCreditRecord.d.ts +125 -0
  31. package/dist/records-v2/AccountCreditRecord.js +145 -0
  32. package/dist/records-v2/CallLegRecord.d.ts +136 -0
  33. package/dist/records-v2/CallLegRecord.js +153 -0
  34. package/dist/records-v2/CallRecord.d.ts +81 -0
  35. package/dist/records-v2/CallRecord.js +87 -0
  36. package/package.json +1 -1
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ /**
3
+ * UpdateCustomerCallLegOnIncomingCallNoAnswer Action DTO
4
+ *
5
+ * Update customer call leg on incoming call no answer
6
+ *
7
+ * @module NotificationModule
8
+ * @entity CallLeg
9
+ * @actionKey UpdateCustomerCallLegOnIncomingCallNoAnswer
10
+ * @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateCustomerCallLegOnIncomingCallNoAnswer
11
+ *
12
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.UpdateCustomerCallLegOnIncomingCallNoAnswerDto = void 0;
16
+ const core_1 = require("@d19n/odin-types/dist/core");
17
+ /**
18
+ * UpdateCustomerCallLegOnIncomingCallNoAnswer
19
+ *
20
+ * Update customer call leg on incoming call no answer
21
+ *
22
+ * @actionType UPDATE - Updates an existing CallLeg record
23
+ * @module NotificationModule
24
+ * @entity CallLeg
25
+ * @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateCustomerCallLegOnIncomingCallNoAnswer
26
+ * @permission schema.action.updatecustomercalllegonincomingcallnoanswer.trigger
27
+ * @benchmark This action is tracked for performance benchmarks
28
+ */
29
+ class UpdateCustomerCallLegOnIncomingCallNoAnswerDto 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 = 'UpdateCustomerCallLegOnIncomingCallNoAnswer';
40
+ this.schemaActionId = 'bb4bc0f1-8641-49bd-857c-470bf34b8f9b';
41
+ this.entity = 'NotificationModule:CallLeg';
42
+ }
43
+ }
44
+ exports.UpdateCustomerCallLegOnIncomingCallNoAnswerDto = UpdateCustomerCallLegOnIncomingCallNoAnswerDto;
45
+ /** Used by SDK generators to identify action type */
46
+ UpdateCustomerCallLegOnIncomingCallNoAnswerDto.ACTION_TYPE = 'UPDATE';
47
+ UpdateCustomerCallLegOnIncomingCallNoAnswerDto.ACTION_KEY = 'UpdateCustomerCallLegOnIncomingCallNoAnswer';
48
+ UpdateCustomerCallLegOnIncomingCallNoAnswerDto.MODULE_NAME = 'NotificationModule';
49
+ UpdateCustomerCallLegOnIncomingCallNoAnswerDto.ENTITIES = ['CallLeg'];
50
+ UpdateCustomerCallLegOnIncomingCallNoAnswerDto.EVENT_NAME = 'k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateCustomerCallLegOnIncomingCallNoAnswer';
51
+ UpdateCustomerCallLegOnIncomingCallNoAnswerDto.PERMISSION = 'schema.action.updatecustomercalllegonincomingcallnoanswer.trigger';
52
+ /** Step metadata - entity this action targets */
53
+ UpdateCustomerCallLegOnIncomingCallNoAnswerDto.STEP_ENTITY = 'NotificationModule:CallLeg';
54
+ UpdateCustomerCallLegOnIncomingCallNoAnswerDto.STEP_SCHEMA_ID = '75c59745-35fb-44b9-b3f2-7563101fdcec';
55
+ UpdateCustomerCallLegOnIncomingCallNoAnswerDto.STEP_SCHEMA_ACTION_ID = 'bb4bc0f1-8641-49bd-857c-470bf34b8f9b';
56
+ UpdateCustomerCallLegOnIncomingCallNoAnswerDto.AUTO_LINK_PARENT = false;
@@ -0,0 +1,88 @@
1
+ /**
2
+ * UpdateCustomerCallLegOnOutboundCallFailed Action DTO
3
+ *
4
+ * Update customer call leg on outbound call failed
5
+ *
6
+ * @module NotificationModule
7
+ * @entity CallLeg
8
+ * @actionKey UpdateCustomerCallLegOnOutboundCallFailed
9
+ * @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateCustomerCallLegOnOutboundCallFailed
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 UpdateCustomerCallLegOnOutboundCallFailed updated events
16
+ *
17
+ * @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateCustomerCallLegOnOutboundCallFailed
18
+ */
19
+ export interface UpdateCustomerCallLegOnOutboundCallFailedMessage extends OdinRecordUpdatedEvent<UpdateCustomerCallLegOnOutboundCallFailedDto, UpdateCustomerCallLegOnOutboundCallFailedProperties> {
20
+ }
21
+ /**
22
+ * Properties for UpdateCustomerCallLegOnOutboundCallFailed action
23
+ *
24
+ * @property Required fields: 2
25
+ * @property Optional fields: 1
26
+ */
27
+ export interface UpdateCustomerCallLegOnOutboundCallFailedProperties {
28
+ /**
29
+ * EndedAt
30
+ *
31
+ * Data field for CallLeg records. Used by Communications team.
32
+ * @type {DATE_TIME}
33
+ * @required
34
+ */
35
+ EndedAt: string;
36
+ /**
37
+ * Status
38
+ *
39
+ * Status indicator for CallLeg records. Tracks lifecycle state. Used by Communications team.
40
+ * @type {ENUM}
41
+ * @required
42
+ */
43
+ Status: string;
44
+ /**
45
+ * Duration
46
+ *
47
+ * Duration of THIS leg only in seconds (Communications - CallLeg)
48
+ * @type {NUMBER}
49
+ */
50
+ Duration?: number | null;
51
+ }
52
+ /**
53
+ * UpdateCustomerCallLegOnOutboundCallFailed
54
+ *
55
+ * Update customer call leg on outbound call failed
56
+ *
57
+ * @actionType UPDATE - Updates an existing CallLeg record
58
+ * @module NotificationModule
59
+ * @entity CallLeg
60
+ * @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateCustomerCallLegOnOutboundCallFailed
61
+ * @permission schema.action.updatecustomercalllegonoutboundcallfailed.trigger
62
+ * @benchmark This action is tracked for performance benchmarks
63
+ */
64
+ export declare class UpdateCustomerCallLegOnOutboundCallFailedDto extends OdinRecordUpdateDto<UpdateCustomerCallLegOnOutboundCallFailedProperties> {
65
+ /** Used by SDK generators to identify action type */
66
+ static readonly ACTION_TYPE = "UPDATE";
67
+ static readonly ACTION_KEY = "UpdateCustomerCallLegOnOutboundCallFailed";
68
+ static readonly MODULE_NAME = "NotificationModule";
69
+ static readonly ENTITIES: string[];
70
+ static readonly EVENT_NAME = "k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateCustomerCallLegOnOutboundCallFailed";
71
+ static readonly PERMISSION = "schema.action.updatecustomercalllegonoutboundcallfailed.trigger";
72
+ /** Step metadata - entity this action targets */
73
+ static readonly STEP_ENTITY = "NotificationModule:CallLeg";
74
+ static readonly STEP_SCHEMA_ID = "75c59745-35fb-44b9-b3f2-7563101fdcec";
75
+ static readonly STEP_SCHEMA_ACTION_ID = "a6942c53-b14b-4862-b52c-c7a80a5e59b8";
76
+ static readonly AUTO_LINK_PARENT = false;
77
+ readonly actionName: string;
78
+ readonly schemaActionId: string;
79
+ readonly entity: string;
80
+ constructor(record: OdinRecord<any> | {
81
+ id: string;
82
+ entity: string;
83
+ type?: string;
84
+ }, properties: UpdateCustomerCallLegOnOutboundCallFailedProperties, options?: {
85
+ journeyId?: string;
86
+ stageKey?: string;
87
+ });
88
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ /**
3
+ * UpdateCustomerCallLegOnOutboundCallFailed Action DTO
4
+ *
5
+ * Update customer call leg on outbound call failed
6
+ *
7
+ * @module NotificationModule
8
+ * @entity CallLeg
9
+ * @actionKey UpdateCustomerCallLegOnOutboundCallFailed
10
+ * @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateCustomerCallLegOnOutboundCallFailed
11
+ *
12
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.UpdateCustomerCallLegOnOutboundCallFailedDto = void 0;
16
+ const core_1 = require("@d19n/odin-types/dist/core");
17
+ /**
18
+ * UpdateCustomerCallLegOnOutboundCallFailed
19
+ *
20
+ * Update customer call leg on outbound call failed
21
+ *
22
+ * @actionType UPDATE - Updates an existing CallLeg record
23
+ * @module NotificationModule
24
+ * @entity CallLeg
25
+ * @event k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateCustomerCallLegOnOutboundCallFailed
26
+ * @permission schema.action.updatecustomercalllegonoutboundcallfailed.trigger
27
+ * @benchmark This action is tracked for performance benchmarks
28
+ */
29
+ class UpdateCustomerCallLegOnOutboundCallFailedDto 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 = 'UpdateCustomerCallLegOnOutboundCallFailed';
40
+ this.schemaActionId = 'a6942c53-b14b-4862-b52c-c7a80a5e59b8';
41
+ this.entity = 'NotificationModule:CallLeg';
42
+ }
43
+ }
44
+ exports.UpdateCustomerCallLegOnOutboundCallFailedDto = UpdateCustomerCallLegOnOutboundCallFailedDto;
45
+ /** Used by SDK generators to identify action type */
46
+ UpdateCustomerCallLegOnOutboundCallFailedDto.ACTION_TYPE = 'UPDATE';
47
+ UpdateCustomerCallLegOnOutboundCallFailedDto.ACTION_KEY = 'UpdateCustomerCallLegOnOutboundCallFailed';
48
+ UpdateCustomerCallLegOnOutboundCallFailedDto.MODULE_NAME = 'NotificationModule';
49
+ UpdateCustomerCallLegOnOutboundCallFailedDto.ENTITIES = ['CallLeg'];
50
+ UpdateCustomerCallLegOnOutboundCallFailedDto.EVENT_NAME = 'k1.t-hEOJjsDb.NotificationModule.CallLeg.Update.UpdateCustomerCallLegOnOutboundCallFailed';
51
+ UpdateCustomerCallLegOnOutboundCallFailedDto.PERMISSION = 'schema.action.updatecustomercalllegonoutboundcallfailed.trigger';
52
+ /** Step metadata - entity this action targets */
53
+ UpdateCustomerCallLegOnOutboundCallFailedDto.STEP_ENTITY = 'NotificationModule:CallLeg';
54
+ UpdateCustomerCallLegOnOutboundCallFailedDto.STEP_SCHEMA_ID = '75c59745-35fb-44b9-b3f2-7563101fdcec';
55
+ UpdateCustomerCallLegOnOutboundCallFailedDto.STEP_SCHEMA_ACTION_ID = 'a6942c53-b14b-4862-b52c-c7a80a5e59b8';
56
+ UpdateCustomerCallLegOnOutboundCallFailedDto.AUTO_LINK_PARENT = false;
@@ -30,7 +30,7 @@ export declare enum DefaultAccountCreditStageNames {
30
30
  Pending = "Pending",
31
31
  /** Account credit has been partially used by the customer and is still available */
32
32
  InProgress = "In Progress",
33
- /** The customer has successfully used the full account credit */
33
+ /** The customer has successfully used the full account credit (success) */
34
34
  Complete = "Complete",
35
35
  /** The account credit has been cancelled (fail) */
36
36
  Cancelled = "Cancelled",
@@ -33,7 +33,7 @@ var DefaultAccountCreditStageNames;
33
33
  DefaultAccountCreditStageNames["Pending"] = "Pending";
34
34
  /** Account credit has been partially used by the customer and is still available */
35
35
  DefaultAccountCreditStageNames["InProgress"] = "In Progress";
36
- /** The customer has successfully used the full account credit */
36
+ /** The customer has successfully used the full account credit (success) */
37
37
  DefaultAccountCreditStageNames["Complete"] = "Complete";
38
38
  /** The account credit has been cancelled (fail) */
39
39
  DefaultAccountCreditStageNames["Cancelled"] = "Cancelled";
@@ -220,6 +220,131 @@ export declare class AccountCreditRecord<TProps = AccountCreditProperties> {
220
220
  journeyId?: string;
221
221
  stageKey?: string;
222
222
  }): ActionBuilder;
223
+ /**
224
+ * MoveAccountCreditToCancelled
225
+ *
226
+ * Transitions this AccountCredit record to a new pipeline stage.
227
+ * Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
228
+ *
229
+ * @remarks Transitions to stage: AccountCreditStageCancelled
230
+ *
231
+ * @param options - Optional settings
232
+ * @param options.journeyId - Associate with a journey
233
+ * @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
234
+ * @throws Error if called on a new (unsaved) record
235
+ *
236
+ * @example
237
+ * ```typescript
238
+ * const record = await odinClient.accountCredits.get(id);
239
+ * await record.moveAccountCreditToCancelled().execute();
240
+ *
241
+ * // Dry run (for debugging)
242
+ * const payload = record.moveAccountCreditToCancelled().dryRun();
243
+ * ```
244
+ */
245
+ moveAccountCreditToCancelled(options?: {
246
+ journeyId?: string;
247
+ }): ActionBuilder;
248
+ /**
249
+ * MoveAccountCreditToComplete
250
+ *
251
+ * Transitions this AccountCredit record to a new pipeline stage.
252
+ * Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
253
+ *
254
+ * @remarks Transitions to stage: AccountCreditStageComplete
255
+ *
256
+ * @param options - Optional settings
257
+ * @param options.journeyId - Associate with a journey
258
+ * @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
259
+ * @throws Error if called on a new (unsaved) record
260
+ *
261
+ * @example
262
+ * ```typescript
263
+ * const record = await odinClient.accountCredits.get(id);
264
+ * await record.moveAccountCreditToComplete().execute();
265
+ *
266
+ * // Dry run (for debugging)
267
+ * const payload = record.moveAccountCreditToComplete().dryRun();
268
+ * ```
269
+ */
270
+ moveAccountCreditToComplete(options?: {
271
+ journeyId?: string;
272
+ }): ActionBuilder;
273
+ /**
274
+ * MoveAccountCreditToInProgress
275
+ *
276
+ * Transitions this AccountCredit record to a new pipeline stage.
277
+ * Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
278
+ *
279
+ * @remarks Transitions to stage: AccountCreditStageInProgress
280
+ *
281
+ * @param options - Optional settings
282
+ * @param options.journeyId - Associate with a journey
283
+ * @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
284
+ * @throws Error if called on a new (unsaved) record
285
+ *
286
+ * @example
287
+ * ```typescript
288
+ * const record = await odinClient.accountCredits.get(id);
289
+ * await record.moveAccountCreditToInProgress().execute();
290
+ *
291
+ * // Dry run (for debugging)
292
+ * const payload = record.moveAccountCreditToInProgress().dryRun();
293
+ * ```
294
+ */
295
+ moveAccountCreditToInProgress(options?: {
296
+ journeyId?: string;
297
+ }): ActionBuilder;
298
+ /**
299
+ * MoveAccountCreditToPending
300
+ *
301
+ * Transitions this AccountCredit record to a new pipeline stage.
302
+ * Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
303
+ *
304
+ * @remarks Transitions to stage: AccountCreditStagePending
305
+ *
306
+ * @param options - Optional settings
307
+ * @param options.journeyId - Associate with a journey
308
+ * @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
309
+ * @throws Error if called on a new (unsaved) record
310
+ *
311
+ * @example
312
+ * ```typescript
313
+ * const record = await odinClient.accountCredits.get(id);
314
+ * await record.moveAccountCreditToPending().execute();
315
+ *
316
+ * // Dry run (for debugging)
317
+ * const payload = record.moveAccountCreditToPending().dryRun();
318
+ * ```
319
+ */
320
+ moveAccountCreditToPending(options?: {
321
+ journeyId?: string;
322
+ }): ActionBuilder;
323
+ /**
324
+ * MoveAccountCreditToVoid
325
+ *
326
+ * Transitions this AccountCredit record to a new pipeline stage.
327
+ * Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
328
+ *
329
+ * @remarks Transitions to stage: AccountCreditStageVoid
330
+ *
331
+ * @param options - Optional settings
332
+ * @param options.journeyId - Associate with a journey
333
+ * @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
334
+ * @throws Error if called on a new (unsaved) record
335
+ *
336
+ * @example
337
+ * ```typescript
338
+ * const record = await odinClient.accountCredits.get(id);
339
+ * await record.moveAccountCreditToVoid().execute();
340
+ *
341
+ * // Dry run (for debugging)
342
+ * const payload = record.moveAccountCreditToVoid().dryRun();
343
+ * ```
344
+ */
345
+ moveAccountCreditToVoid(options?: {
346
+ journeyId?: string;
347
+ }): ActionBuilder;
223
348
  /**
224
349
  * UpdateAccountCreditBalance
225
350
  *
@@ -300,6 +300,151 @@ class AccountCreditRecord {
300
300
  // ============================================
301
301
  // UPDATE ACTIONS (require existing record)
302
302
  // ============================================
303
+ /**
304
+ * MoveAccountCreditToCancelled
305
+ *
306
+ * Transitions this AccountCredit record to a new pipeline stage.
307
+ * Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
308
+ *
309
+ * @remarks Transitions to stage: AccountCreditStageCancelled
310
+ *
311
+ * @param options - Optional settings
312
+ * @param options.journeyId - Associate with a journey
313
+ * @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
314
+ * @throws Error if called on a new (unsaved) record
315
+ *
316
+ * @example
317
+ * ```typescript
318
+ * const record = await odinClient.accountCredits.get(id);
319
+ * await record.moveAccountCreditToCancelled().execute();
320
+ *
321
+ * // Dry run (for debugging)
322
+ * const payload = record.moveAccountCreditToCancelled().dryRun();
323
+ * ```
324
+ */
325
+ moveAccountCreditToCancelled(options) {
326
+ var _a;
327
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
328
+ throw new Error('moveAccountCreditToCancelled requires an existing record. Use accessor.get() first.');
329
+ const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveAccountCreditToCancelled', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'AccountCreditStageCancelled' }, options);
330
+ return new ActionBuilder(this._provider, 'BillingModule', 'AccountCredit', payload, () => { this._pendingLinks = []; });
331
+ }
332
+ /**
333
+ * MoveAccountCreditToComplete
334
+ *
335
+ * Transitions this AccountCredit record to a new pipeline stage.
336
+ * Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
337
+ *
338
+ * @remarks Transitions to stage: AccountCreditStageComplete
339
+ *
340
+ * @param options - Optional settings
341
+ * @param options.journeyId - Associate with a journey
342
+ * @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
343
+ * @throws Error if called on a new (unsaved) record
344
+ *
345
+ * @example
346
+ * ```typescript
347
+ * const record = await odinClient.accountCredits.get(id);
348
+ * await record.moveAccountCreditToComplete().execute();
349
+ *
350
+ * // Dry run (for debugging)
351
+ * const payload = record.moveAccountCreditToComplete().dryRun();
352
+ * ```
353
+ */
354
+ moveAccountCreditToComplete(options) {
355
+ var _a;
356
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
357
+ throw new Error('moveAccountCreditToComplete requires an existing record. Use accessor.get() first.');
358
+ const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveAccountCreditToComplete', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'AccountCreditStageComplete' }, options);
359
+ return new ActionBuilder(this._provider, 'BillingModule', 'AccountCredit', payload, () => { this._pendingLinks = []; });
360
+ }
361
+ /**
362
+ * MoveAccountCreditToInProgress
363
+ *
364
+ * Transitions this AccountCredit record to a new pipeline stage.
365
+ * Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
366
+ *
367
+ * @remarks Transitions to stage: AccountCreditStageInProgress
368
+ *
369
+ * @param options - Optional settings
370
+ * @param options.journeyId - Associate with a journey
371
+ * @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
372
+ * @throws Error if called on a new (unsaved) record
373
+ *
374
+ * @example
375
+ * ```typescript
376
+ * const record = await odinClient.accountCredits.get(id);
377
+ * await record.moveAccountCreditToInProgress().execute();
378
+ *
379
+ * // Dry run (for debugging)
380
+ * const payload = record.moveAccountCreditToInProgress().dryRun();
381
+ * ```
382
+ */
383
+ moveAccountCreditToInProgress(options) {
384
+ var _a;
385
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
386
+ throw new Error('moveAccountCreditToInProgress requires an existing record. Use accessor.get() first.');
387
+ const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveAccountCreditToInProgress', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'AccountCreditStageInProgress' }, options);
388
+ return new ActionBuilder(this._provider, 'BillingModule', 'AccountCredit', payload, () => { this._pendingLinks = []; });
389
+ }
390
+ /**
391
+ * MoveAccountCreditToPending
392
+ *
393
+ * Transitions this AccountCredit record to a new pipeline stage.
394
+ * Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
395
+ *
396
+ * @remarks Transitions to stage: AccountCreditStagePending
397
+ *
398
+ * @param options - Optional settings
399
+ * @param options.journeyId - Associate with a journey
400
+ * @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
401
+ * @throws Error if called on a new (unsaved) record
402
+ *
403
+ * @example
404
+ * ```typescript
405
+ * const record = await odinClient.accountCredits.get(id);
406
+ * await record.moveAccountCreditToPending().execute();
407
+ *
408
+ * // Dry run (for debugging)
409
+ * const payload = record.moveAccountCreditToPending().dryRun();
410
+ * ```
411
+ */
412
+ moveAccountCreditToPending(options) {
413
+ var _a;
414
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
415
+ throw new Error('moveAccountCreditToPending requires an existing record. Use accessor.get() first.');
416
+ const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveAccountCreditToPending', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'AccountCreditStagePending' }, options);
417
+ return new ActionBuilder(this._provider, 'BillingModule', 'AccountCredit', payload, () => { this._pendingLinks = []; });
418
+ }
419
+ /**
420
+ * MoveAccountCreditToVoid
421
+ *
422
+ * Transitions this AccountCredit record to a new pipeline stage.
423
+ * Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
424
+ *
425
+ * @remarks Transitions to stage: AccountCreditStageVoid
426
+ *
427
+ * @param options - Optional settings
428
+ * @param options.journeyId - Associate with a journey
429
+ * @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
430
+ * @throws Error if called on a new (unsaved) record
431
+ *
432
+ * @example
433
+ * ```typescript
434
+ * const record = await odinClient.accountCredits.get(id);
435
+ * await record.moveAccountCreditToVoid().execute();
436
+ *
437
+ * // Dry run (for debugging)
438
+ * const payload = record.moveAccountCreditToVoid().dryRun();
439
+ * ```
440
+ */
441
+ moveAccountCreditToVoid(options) {
442
+ var _a;
443
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
444
+ throw new Error('moveAccountCreditToVoid requires an existing record. Use accessor.get() first.');
445
+ const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveAccountCreditToVoid', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'AccountCreditStageVoid' }, options);
446
+ return new ActionBuilder(this._provider, 'BillingModule', 'AccountCredit', payload, () => { this._pendingLinks = []; });
447
+ }
303
448
  /**
304
449
  * UpdateAccountCreditBalance
305
450
  *