@d19n/youfibre-odin-sdk 2.0.2 → 2.0.3-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/actions-v2/MovetoClosedDto.d.ts +1 -48
- package/dist/actions-v2/MovetoClosedDto.js +1 -21
- package/dist/actions-v2/UpdateAccountCreditBalanceDto.d.ts +63 -0
- package/dist/actions-v2/UpdateAccountCreditBalanceDto.js +56 -0
- package/dist/entities-v2/AccountCredit.d.ts +8 -7
- package/dist/entities-v2/AccountCredit.js +2 -2
- package/dist/entities-v2/Case.d.ts +12 -0
- package/dist/entities-v2/Case.js +2 -0
- package/dist/entities-v2/Transaction.d.ts +2 -0
- package/dist/entities-v2/Transaction.js +2 -0
- package/dist/records-v2/AccountCreditRecord.d.ts +28 -0
- package/dist/records-v2/AccountCreditRecord.js +40 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -352,7 +352,7 @@ This SDK includes **164** entities across **12** modules.
|
|
|
352
352
|
|
|
353
353
|
## Actions
|
|
354
354
|
|
|
355
|
-
This SDK includes **
|
|
355
|
+
This SDK includes **557** actions.
|
|
356
356
|
|
|
357
357
|
### Action Types
|
|
358
358
|
|
|
@@ -1042,6 +1042,7 @@ This SDK includes **556** actions.
|
|
|
1042
1042
|
| Action | Type | Event |
|
|
1043
1043
|
|--------|------|-------|
|
|
1044
1044
|
| `CreateAccountCredit` | CREATE | k1.t-hEOJjsDb.BillingModule.AccountCredit.Create.CreateAccountCredit |
|
|
1045
|
+
| `UpdateAccountCreditBalance` | UPDATE | k1.t-hEOJjsDb.BillingModule.AccountCredit.Update.UpdateAccountCreditBalance |
|
|
1045
1046
|
|
|
1046
1047
|
#### ActivityLog
|
|
1047
1048
|
|
|
@@ -12,43 +12,6 @@
|
|
|
12
12
|
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
13
|
*/
|
|
14
14
|
import { OdinRecord, OdinRecordUpdateDto, OdinRecordUpdatedEvent } from '@d19n/odin-types/dist/core';
|
|
15
|
-
declare type StepClassMap = {};
|
|
16
|
-
/**
|
|
17
|
-
* Link definition for connecting steps in MovetoClosed
|
|
18
|
-
*/
|
|
19
|
-
export interface MovetoClosedStepLink {
|
|
20
|
-
/**
|
|
21
|
-
* The stepKey of the target step to link TO
|
|
22
|
-
* Must reference another step's stepKey in the same flow
|
|
23
|
-
*/
|
|
24
|
-
stepKey: string;
|
|
25
|
-
/**
|
|
26
|
-
* The schema association ID (UUID) defining the relationship
|
|
27
|
-
* Use the association.id from the schema association definition
|
|
28
|
-
* @example "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
|
|
29
|
-
*/
|
|
30
|
-
schemaAssociationId: string;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Step definition with linking metadata for MovetoClosed
|
|
34
|
-
*/
|
|
35
|
-
export interface MovetoClosedStepDefinition {
|
|
36
|
-
/** Unique identifier for this step */
|
|
37
|
-
stepKey: string;
|
|
38
|
-
/** The DTO class name for this step */
|
|
39
|
-
dtoClass: string;
|
|
40
|
-
/** The entity this step creates (Module:Entity format) */
|
|
41
|
-
entity: string;
|
|
42
|
-
/** Links to create after this step executes */
|
|
43
|
-
linksTo: MovetoClosedStepLink[] | null;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Type-safe step keys for MovetoClosed
|
|
47
|
-
*/
|
|
48
|
-
export declare const MovetoClosedSteps: {
|
|
49
|
-
readonly step_1: "step_1";
|
|
50
|
-
};
|
|
51
|
-
export declare type MovetoClosedStepKey = typeof MovetoClosedSteps[keyof typeof MovetoClosedSteps];
|
|
52
15
|
/**
|
|
53
16
|
* RabbitMQ message payload for MovetoClosed step flow events
|
|
54
17
|
*
|
|
@@ -88,15 +51,6 @@ export declare class MovetoClosedDto extends OdinRecordUpdateDto<Record<string,
|
|
|
88
51
|
static readonly IS_STAGE_TRANSITION = true;
|
|
89
52
|
static readonly IS_MULTI_STEP_FLOW = false;
|
|
90
53
|
static readonly HAS_STEP_LINKS = false;
|
|
91
|
-
/**
|
|
92
|
-
* Step definitions with linking metadata
|
|
93
|
-
* Used by SDK and backend for auto-linking after step execution
|
|
94
|
-
*/
|
|
95
|
-
static readonly stepDefinitions: MovetoClosedStepDefinition[];
|
|
96
|
-
/** Type-safe step key accessor */
|
|
97
|
-
static readonly Steps: {
|
|
98
|
-
readonly step_1: "step_1";
|
|
99
|
-
};
|
|
100
54
|
readonly actionName: string;
|
|
101
55
|
readonly schemaActionId: string;
|
|
102
56
|
readonly entity: string;
|
|
@@ -110,6 +64,5 @@ export declare class MovetoClosedDto extends OdinRecordUpdateDto<Record<string,
|
|
|
110
64
|
});
|
|
111
65
|
/** Step classes that can be used with this action */
|
|
112
66
|
static readonly stepClasses: readonly [];
|
|
113
|
-
steps:
|
|
67
|
+
steps: [];
|
|
114
68
|
}
|
|
115
|
-
export {};
|
|
@@ -13,14 +13,8 @@
|
|
|
13
13
|
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.MovetoClosedDto =
|
|
16
|
+
exports.MovetoClosedDto = void 0;
|
|
17
17
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
18
|
-
/**
|
|
19
|
-
* Type-safe step keys for MovetoClosed
|
|
20
|
-
*/
|
|
21
|
-
exports.MovetoClosedSteps = {
|
|
22
|
-
step_1: 'step_1',
|
|
23
|
-
};
|
|
24
18
|
/**
|
|
25
19
|
* MovetoClosed
|
|
26
20
|
*
|
|
@@ -62,19 +56,5 @@ MovetoClosedDto.TARGET_STAGES = ['CaseDefaultStageClosed'];
|
|
|
62
56
|
MovetoClosedDto.IS_STAGE_TRANSITION = true;
|
|
63
57
|
MovetoClosedDto.IS_MULTI_STEP_FLOW = false;
|
|
64
58
|
MovetoClosedDto.HAS_STEP_LINKS = false;
|
|
65
|
-
/**
|
|
66
|
-
* Step definitions with linking metadata
|
|
67
|
-
* Used by SDK and backend for auto-linking after step execution
|
|
68
|
-
*/
|
|
69
|
-
MovetoClosedDto.stepDefinitions = [
|
|
70
|
-
{
|
|
71
|
-
stepKey: 'step_1',
|
|
72
|
-
dtoClass: 'unknown',
|
|
73
|
-
entity: 'unknown',
|
|
74
|
-
linksTo: null
|
|
75
|
-
}
|
|
76
|
-
];
|
|
77
|
-
/** Type-safe step key accessor */
|
|
78
|
-
MovetoClosedDto.Steps = exports.MovetoClosedSteps;
|
|
79
59
|
/** Step classes that can be used with this action */
|
|
80
60
|
MovetoClosedDto.stepClasses = [];
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UpdateAccountCreditBalance Action DTO
|
|
3
|
+
*
|
|
4
|
+
* Update the credit balance on an account credit record.
|
|
5
|
+
*
|
|
6
|
+
* @module BillingModule
|
|
7
|
+
* @entity AccountCredit
|
|
8
|
+
* @actionKey UpdateAccountCreditBalance
|
|
9
|
+
* @event k1.t-hEOJjsDb.BillingModule.AccountCredit.Update.UpdateAccountCreditBalance
|
|
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 UpdateAccountCreditBalance updated events
|
|
16
|
+
*
|
|
17
|
+
* @event k1.t-hEOJjsDb.BillingModule.AccountCredit.Update.UpdateAccountCreditBalance
|
|
18
|
+
*/
|
|
19
|
+
export interface UpdateAccountCreditBalanceMessage extends OdinRecordUpdatedEvent<UpdateAccountCreditBalanceDto, UpdateAccountCreditBalanceProperties> {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Properties for UpdateAccountCreditBalance action
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
export interface UpdateAccountCreditBalanceProperties {
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* UpdateAccountCreditBalance
|
|
29
|
+
*
|
|
30
|
+
* Update the credit balance on an account credit record.
|
|
31
|
+
*
|
|
32
|
+
* @actionType UPDATE - Updates an existing AccountCredit record
|
|
33
|
+
* @module BillingModule
|
|
34
|
+
* @entity AccountCredit
|
|
35
|
+
* @event k1.t-hEOJjsDb.BillingModule.AccountCredit.Update.UpdateAccountCreditBalance
|
|
36
|
+
* @permission schema.action.updateaccountcreditbalance.trigger
|
|
37
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
38
|
+
*/
|
|
39
|
+
export declare class UpdateAccountCreditBalanceDto extends OdinRecordUpdateDto<UpdateAccountCreditBalanceProperties> {
|
|
40
|
+
/** Used by SDK generators to identify action type */
|
|
41
|
+
static readonly ACTION_TYPE = "UPDATE";
|
|
42
|
+
static readonly ACTION_KEY = "UpdateAccountCreditBalance";
|
|
43
|
+
static readonly MODULE_NAME = "BillingModule";
|
|
44
|
+
static readonly ENTITIES: string[];
|
|
45
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.BillingModule.AccountCredit.Update.UpdateAccountCreditBalance";
|
|
46
|
+
static readonly PERMISSION = "schema.action.updateaccountcreditbalance.trigger";
|
|
47
|
+
/** Step metadata - entity this action targets */
|
|
48
|
+
static readonly STEP_ENTITY = "BillingModule:AccountCredit";
|
|
49
|
+
static readonly STEP_SCHEMA_ID = "5871ead3-e07b-44b8-a480-0c1152211a2b";
|
|
50
|
+
static readonly STEP_SCHEMA_ACTION_ID = "16e58bfd-7b1a-4030-97df-74a7b8dafd4b";
|
|
51
|
+
static readonly AUTO_LINK_PARENT = false;
|
|
52
|
+
readonly actionName: string;
|
|
53
|
+
readonly schemaActionId: string;
|
|
54
|
+
readonly entity: string;
|
|
55
|
+
constructor(record: OdinRecord<any> | {
|
|
56
|
+
id: string;
|
|
57
|
+
entity: string;
|
|
58
|
+
type?: string;
|
|
59
|
+
}, properties: UpdateAccountCreditBalanceProperties, options?: {
|
|
60
|
+
journeyId?: string;
|
|
61
|
+
stageKey?: string;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* UpdateAccountCreditBalance Action DTO
|
|
4
|
+
*
|
|
5
|
+
* Update the credit balance on an account credit record.
|
|
6
|
+
*
|
|
7
|
+
* @module BillingModule
|
|
8
|
+
* @entity AccountCredit
|
|
9
|
+
* @actionKey UpdateAccountCreditBalance
|
|
10
|
+
* @event k1.t-hEOJjsDb.BillingModule.AccountCredit.Update.UpdateAccountCreditBalance
|
|
11
|
+
*
|
|
12
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.UpdateAccountCreditBalanceDto = void 0;
|
|
16
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
|
+
/**
|
|
18
|
+
* UpdateAccountCreditBalance
|
|
19
|
+
*
|
|
20
|
+
* Update the credit balance on an account credit record.
|
|
21
|
+
*
|
|
22
|
+
* @actionType UPDATE - Updates an existing AccountCredit record
|
|
23
|
+
* @module BillingModule
|
|
24
|
+
* @entity AccountCredit
|
|
25
|
+
* @event k1.t-hEOJjsDb.BillingModule.AccountCredit.Update.UpdateAccountCreditBalance
|
|
26
|
+
* @permission schema.action.updateaccountcreditbalance.trigger
|
|
27
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
28
|
+
*/
|
|
29
|
+
class UpdateAccountCreditBalanceDto 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 = 'UpdateAccountCreditBalance';
|
|
40
|
+
this.schemaActionId = '16e58bfd-7b1a-4030-97df-74a7b8dafd4b';
|
|
41
|
+
this.entity = 'BillingModule:AccountCredit';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.UpdateAccountCreditBalanceDto = UpdateAccountCreditBalanceDto;
|
|
45
|
+
/** Used by SDK generators to identify action type */
|
|
46
|
+
UpdateAccountCreditBalanceDto.ACTION_TYPE = 'UPDATE';
|
|
47
|
+
UpdateAccountCreditBalanceDto.ACTION_KEY = 'UpdateAccountCreditBalance';
|
|
48
|
+
UpdateAccountCreditBalanceDto.MODULE_NAME = 'BillingModule';
|
|
49
|
+
UpdateAccountCreditBalanceDto.ENTITIES = ['AccountCredit'];
|
|
50
|
+
UpdateAccountCreditBalanceDto.EVENT_NAME = 'k1.t-hEOJjsDb.BillingModule.AccountCredit.Update.UpdateAccountCreditBalance';
|
|
51
|
+
UpdateAccountCreditBalanceDto.PERMISSION = 'schema.action.updateaccountcreditbalance.trigger';
|
|
52
|
+
/** Step metadata - entity this action targets */
|
|
53
|
+
UpdateAccountCreditBalanceDto.STEP_ENTITY = 'BillingModule:AccountCredit';
|
|
54
|
+
UpdateAccountCreditBalanceDto.STEP_SCHEMA_ID = '5871ead3-e07b-44b8-a480-0c1152211a2b';
|
|
55
|
+
UpdateAccountCreditBalanceDto.STEP_SCHEMA_ACTION_ID = '16e58bfd-7b1a-4030-97df-74a7b8dafd4b';
|
|
56
|
+
UpdateAccountCreditBalanceDto.AUTO_LINK_PARENT = false;
|
|
@@ -126,10 +126,10 @@ export declare enum AccountCreditPropertyKeys {
|
|
|
126
126
|
Description = "Description",
|
|
127
127
|
/** Reason */
|
|
128
128
|
Reason = "Reason",
|
|
129
|
-
/** Contact */
|
|
130
|
-
Contact = "Contact",
|
|
131
129
|
/** Credit Balance */
|
|
132
130
|
CreditBalance = "CreditBalance",
|
|
131
|
+
/** Contact */
|
|
132
|
+
Contact = "Contact",
|
|
133
133
|
/** Credit Total */
|
|
134
134
|
CreditTotal = "CreditTotal"
|
|
135
135
|
}
|
|
@@ -156,16 +156,17 @@ export interface AccountCreditProperties {
|
|
|
156
156
|
* @enum {AccountCreditReason}
|
|
157
157
|
*/
|
|
158
158
|
Reason: AccountCreditReason;
|
|
159
|
-
/** Contact
|
|
160
|
-
*
|
|
161
|
-
* @type {LOOKUP}
|
|
162
|
-
*/
|
|
163
|
-
Contact: string;
|
|
164
159
|
/** Credit Balance
|
|
165
160
|
*
|
|
166
161
|
* @type {CURRENCY}
|
|
162
|
+
* @tracked Changes to this field are tracked in audit history
|
|
167
163
|
*/
|
|
168
164
|
CreditBalance: string;
|
|
165
|
+
/** Contact
|
|
166
|
+
*
|
|
167
|
+
* @type {LOOKUP}
|
|
168
|
+
*/
|
|
169
|
+
Contact: string;
|
|
169
170
|
/** Credit Total
|
|
170
171
|
*
|
|
171
172
|
* @type {CURRENCY}
|
|
@@ -133,10 +133,10 @@ var AccountCreditPropertyKeys;
|
|
|
133
133
|
AccountCreditPropertyKeys["Description"] = "Description";
|
|
134
134
|
/** Reason */
|
|
135
135
|
AccountCreditPropertyKeys["Reason"] = "Reason";
|
|
136
|
-
/** Contact */
|
|
137
|
-
AccountCreditPropertyKeys["Contact"] = "Contact";
|
|
138
136
|
/** Credit Balance */
|
|
139
137
|
AccountCreditPropertyKeys["CreditBalance"] = "CreditBalance";
|
|
138
|
+
/** Contact */
|
|
139
|
+
AccountCreditPropertyKeys["Contact"] = "Contact";
|
|
140
140
|
/** Credit Total */
|
|
141
141
|
AccountCreditPropertyKeys["CreditTotal"] = "CreditTotal";
|
|
142
142
|
})(AccountCreditPropertyKeys = exports.AccountCreditPropertyKeys || (exports.AccountCreditPropertyKeys = {}));
|
|
@@ -722,6 +722,8 @@ export declare enum CasePropertyKeys {
|
|
|
722
722
|
CsatSentAt = "CsatSentAt",
|
|
723
723
|
/** Attributed To */
|
|
724
724
|
AttributedTo = "AttributedTo",
|
|
725
|
+
/** Timestamp of the CSAT response */
|
|
726
|
+
CsatResponseAt = "CsatResponseAt",
|
|
725
727
|
/** The address related to the case (Customer Service - Case) */
|
|
726
728
|
RAddressId = "R_AddressId",
|
|
727
729
|
/** R_AddressTitle (Customer Service - Case) */
|
|
@@ -904,6 +906,11 @@ export interface CaseProperties {
|
|
|
904
906
|
* @type {TEXT}
|
|
905
907
|
*/
|
|
906
908
|
AttributedTo: string;
|
|
909
|
+
/** Timestamp of the CSAT response
|
|
910
|
+
*
|
|
911
|
+
* @type {DATE_TIME}
|
|
912
|
+
*/
|
|
913
|
+
CsatResponseAt: string;
|
|
907
914
|
/** The address related to the case (Customer Service - Case)
|
|
908
915
|
*
|
|
909
916
|
* @type {LOOKUP}
|
|
@@ -1378,6 +1385,11 @@ export interface OutageCaseProperties {
|
|
|
1378
1385
|
* @type {TEXT}
|
|
1379
1386
|
*/
|
|
1380
1387
|
AttributedTo: string;
|
|
1388
|
+
/** Timestamp of the CSAT response
|
|
1389
|
+
*
|
|
1390
|
+
* @type {DATE_TIME}
|
|
1391
|
+
*/
|
|
1392
|
+
CsatResponseAt: string;
|
|
1381
1393
|
/** The address related to the case (Customer Service - Case)
|
|
1382
1394
|
*
|
|
1383
1395
|
* @type {LOOKUP}
|
package/dist/entities-v2/Case.js
CHANGED
|
@@ -733,6 +733,8 @@ var CasePropertyKeys;
|
|
|
733
733
|
CasePropertyKeys["CsatSentAt"] = "CsatSentAt";
|
|
734
734
|
/** Attributed To */
|
|
735
735
|
CasePropertyKeys["AttributedTo"] = "AttributedTo";
|
|
736
|
+
/** Timestamp of the CSAT response */
|
|
737
|
+
CasePropertyKeys["CsatResponseAt"] = "CsatResponseAt";
|
|
736
738
|
/** The address related to the case (Customer Service - Case) */
|
|
737
739
|
CasePropertyKeys["RAddressId"] = "R_AddressId";
|
|
738
740
|
/** R_AddressTitle (Customer Service - Case) */
|
|
@@ -79,6 +79,7 @@ export declare enum TransactionStatus {
|
|
|
79
79
|
* the payment method used for the transaction (Finance - Transaction)
|
|
80
80
|
*
|
|
81
81
|
* @remarks Available options:
|
|
82
|
+
* - `ACCOUNT_CREDIT` - Account Credit
|
|
82
83
|
* - `BANK_TRANSFER` - Bank Transfer
|
|
83
84
|
* - `CARD_PAYLINK` - Card PayLink
|
|
84
85
|
* - `DCA_PAYMENT` - DCA Payment
|
|
@@ -86,6 +87,7 @@ export declare enum TransactionStatus {
|
|
|
86
87
|
* - `PHONE_PAYMENT` - Phone Payment
|
|
87
88
|
*/
|
|
88
89
|
export declare enum TransactionPaymentMethod {
|
|
90
|
+
ACCOUNT_CREDIT = "ACCOUNT_CREDIT",
|
|
89
91
|
BANK_TRANSFER = "BANK_TRANSFER",
|
|
90
92
|
CARD_PAY_LINK = "CARD_PAYLINK",
|
|
91
93
|
DCA_PAYMENT = "DCA_PAYMENT",
|
|
@@ -77,6 +77,7 @@ var TransactionStatus;
|
|
|
77
77
|
* the payment method used for the transaction (Finance - Transaction)
|
|
78
78
|
*
|
|
79
79
|
* @remarks Available options:
|
|
80
|
+
* - `ACCOUNT_CREDIT` - Account Credit
|
|
80
81
|
* - `BANK_TRANSFER` - Bank Transfer
|
|
81
82
|
* - `CARD_PAYLINK` - Card PayLink
|
|
82
83
|
* - `DCA_PAYMENT` - DCA Payment
|
|
@@ -85,6 +86,7 @@ var TransactionStatus;
|
|
|
85
86
|
*/
|
|
86
87
|
var TransactionPaymentMethod;
|
|
87
88
|
(function (TransactionPaymentMethod) {
|
|
89
|
+
TransactionPaymentMethod["ACCOUNT_CREDIT"] = "ACCOUNT_CREDIT";
|
|
88
90
|
TransactionPaymentMethod["BANK_TRANSFER"] = "BANK_TRANSFER";
|
|
89
91
|
TransactionPaymentMethod["CARD_PAY_LINK"] = "CARD_PAYLINK";
|
|
90
92
|
TransactionPaymentMethod["DCA_PAYMENT"] = "DCA_PAYMENT";
|
|
@@ -24,6 +24,7 @@ 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
25
|
import { AccountCreditProperties } from '../entities-v2/AccountCredit';
|
|
26
26
|
import { CreateAccountCreditProperties } from '../actions-v2/CreateAccountCreditDto';
|
|
27
|
+
import { UpdateAccountCreditBalanceProperties } from '../actions-v2/UpdateAccountCreditBalanceDto';
|
|
27
28
|
import { ContactRecord } from './ContactRecord';
|
|
28
29
|
import { InvoiceRecord } from './InvoiceRecord';
|
|
29
30
|
/** Valid entity types for AccountCredit */
|
|
@@ -219,6 +220,33 @@ export declare class AccountCreditRecord<TProps = AccountCreditProperties> {
|
|
|
219
220
|
journeyId?: string;
|
|
220
221
|
stageKey?: string;
|
|
221
222
|
}): ActionBuilder;
|
|
223
|
+
/**
|
|
224
|
+
* UpdateAccountCreditBalance
|
|
225
|
+
*
|
|
226
|
+
* Updates this AccountCredit record.
|
|
227
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
228
|
+
*
|
|
229
|
+
* @param propertiesOrOptions - Properties to update, or options object
|
|
230
|
+
* @param options - Optional settings (journeyId, stageKey)
|
|
231
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
232
|
+
* @throws Error if called on a new (unsaved) record
|
|
233
|
+
*
|
|
234
|
+
* @example
|
|
235
|
+
* ```typescript
|
|
236
|
+
* const record = await odinClient.accountCredits.get(id);
|
|
237
|
+
* await record.updateAccountCreditBalance({ ... }).execute();
|
|
238
|
+
*
|
|
239
|
+
* // Dry run (for debugging)
|
|
240
|
+
* const payload = record.updateAccountCreditBalance({ ... }).dryRun();
|
|
241
|
+
* ```
|
|
242
|
+
*/
|
|
243
|
+
updateAccountCreditBalance(propertiesOrOptions?: UpdateAccountCreditBalanceProperties | {
|
|
244
|
+
journeyId?: string;
|
|
245
|
+
stageKey?: string;
|
|
246
|
+
}, options?: {
|
|
247
|
+
journeyId?: string;
|
|
248
|
+
stageKey?: string;
|
|
249
|
+
}): ActionBuilder;
|
|
222
250
|
}
|
|
223
251
|
/** Type guard to check if an object is a AccountCreditRecord */
|
|
224
252
|
export declare function isAccountCreditRecord(obj: any): obj is AccountCreditRecord;
|
|
@@ -297,6 +297,46 @@ class AccountCreditRecord {
|
|
|
297
297
|
};
|
|
298
298
|
return new ActionBuilder(this._provider, 'BillingModule', 'AccountCredit', payload, () => { this._pendingLinks = []; });
|
|
299
299
|
}
|
|
300
|
+
// ============================================
|
|
301
|
+
// UPDATE ACTIONS (require existing record)
|
|
302
|
+
// ============================================
|
|
303
|
+
/**
|
|
304
|
+
* UpdateAccountCreditBalance
|
|
305
|
+
*
|
|
306
|
+
* Updates this AccountCredit record.
|
|
307
|
+
* Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
|
|
308
|
+
*
|
|
309
|
+
* @param propertiesOrOptions - Properties to update, or options object
|
|
310
|
+
* @param options - Optional settings (journeyId, stageKey)
|
|
311
|
+
* @returns ActionBuilder - call .execute() to update or .dryRun() for payload
|
|
312
|
+
* @throws Error if called on a new (unsaved) record
|
|
313
|
+
*
|
|
314
|
+
* @example
|
|
315
|
+
* ```typescript
|
|
316
|
+
* const record = await odinClient.accountCredits.get(id);
|
|
317
|
+
* await record.updateAccountCreditBalance({ ... }).execute();
|
|
318
|
+
*
|
|
319
|
+
* // Dry run (for debugging)
|
|
320
|
+
* const payload = record.updateAccountCreditBalance({ ... }).dryRun();
|
|
321
|
+
* ```
|
|
322
|
+
*/
|
|
323
|
+
updateAccountCreditBalance(propertiesOrOptions, options) {
|
|
324
|
+
var _a;
|
|
325
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
326
|
+
throw new Error('updateAccountCreditBalance requires an existing record. Use accessor.get() first.');
|
|
327
|
+
let properties = {};
|
|
328
|
+
let opts = options;
|
|
329
|
+
if (propertiesOrOptions) {
|
|
330
|
+
if ('journeyId' in propertiesOrOptions || 'stageKey' in propertiesOrOptions) {
|
|
331
|
+
opts = propertiesOrOptions;
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
properties = propertiesOrOptions;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateAccountCreditBalance', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, opts);
|
|
338
|
+
return new ActionBuilder(this._provider, 'BillingModule', 'AccountCredit', payload, () => { this._pendingLinks = []; });
|
|
339
|
+
}
|
|
300
340
|
}
|
|
301
341
|
exports.AccountCreditRecord = AccountCreditRecord;
|
|
302
342
|
// ============================================
|