@d19n/youfibre-odin-sdk 2.0.136 → 2.0.137
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/dist/actions-v2/CreateInboundCallDto.d.ts +8 -1
- package/dist/api-sdk-v2/AccountCreditApi.d.ts +2 -0
- package/dist/api-sdk-v2/AccountCreditApi.js +6 -0
- package/dist/api-sdk-v2/NoteApi.d.ts +2 -0
- package/dist/api-sdk-v2/NoteApi.js +6 -0
- package/dist/db-sdk-v2/AccountCreditDb.d.ts +2 -0
- package/dist/db-sdk-v2/AccountCreditDb.js +6 -0
- package/dist/db-sdk-v2/NoteDb.d.ts +2 -0
- package/dist/db-sdk-v2/NoteDb.js +6 -0
- package/dist/entities-v2/AccountCredit.d.ts +7 -0
- package/dist/entities-v2/AccountCredit.js +5 -1
- package/dist/entities-v2/Note.d.ts +3 -0
- package/dist/records-v2/AccountCreditRecord.d.ts +20 -0
- package/dist/records-v2/AccountCreditRecord.js +33 -0
- package/dist/records-v2/NoteRecord.d.ts +20 -0
- package/dist/records-v2/NoteRecord.js +33 -0
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ export interface CreateInboundCallMessage extends OdinRecordCreatedEvent<CreateI
|
|
|
22
22
|
* Properties for CreateInboundCall action
|
|
23
23
|
*
|
|
24
24
|
* @property Required fields: 13
|
|
25
|
-
* @property Optional fields:
|
|
25
|
+
* @property Optional fields: 1
|
|
26
26
|
*/
|
|
27
27
|
export interface CreateInboundCallProperties {
|
|
28
28
|
/**
|
|
@@ -129,6 +129,13 @@ export interface CreateInboundCallProperties {
|
|
|
129
129
|
* @required
|
|
130
130
|
*/
|
|
131
131
|
UserId: string;
|
|
132
|
+
/**
|
|
133
|
+
* QueueName
|
|
134
|
+
*
|
|
135
|
+
* Display name/title for Call records. Primary identifier for Communications team.
|
|
136
|
+
* @type {TEXT}
|
|
137
|
+
*/
|
|
138
|
+
QueueName?: string | null;
|
|
132
139
|
}
|
|
133
140
|
/**
|
|
134
141
|
* Builder for CreateInboundCall action
|
|
@@ -19,9 +19,11 @@ export declare class AccountCreditApi extends ApiProvider {
|
|
|
19
19
|
private sourceRecord;
|
|
20
20
|
private _contact?;
|
|
21
21
|
private _invoice?;
|
|
22
|
+
private _note?;
|
|
22
23
|
constructor(authParams?: OauthParams, authToken?: string);
|
|
23
24
|
get contact(): ApiRecordLinkManager;
|
|
24
25
|
get invoice(): ApiRecordLinkManager;
|
|
26
|
+
get note(): ApiRecordLinkManager;
|
|
25
27
|
setRecord(sourceRecord: any): void;
|
|
26
28
|
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
27
29
|
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<AccountCreditProperties>>>;
|
|
@@ -45,6 +45,12 @@ class AccountCreditApi extends api_provider_1.ApiProvider {
|
|
|
45
45
|
}
|
|
46
46
|
return this._invoice;
|
|
47
47
|
}
|
|
48
|
+
get note() {
|
|
49
|
+
if (!this._note) {
|
|
50
|
+
this._note = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'BillingModule:AccountCredit', 'SupportModule:Note', 'AccountCredit_Note');
|
|
51
|
+
}
|
|
52
|
+
return this._note;
|
|
53
|
+
}
|
|
48
54
|
// ============================================
|
|
49
55
|
// STANDARD METHODS (Unchanged API)
|
|
50
56
|
// ============================================
|
|
@@ -90,6 +90,7 @@ export declare class NoteApi extends ApiProvider {
|
|
|
90
90
|
private _case?;
|
|
91
91
|
private _smsmessage?;
|
|
92
92
|
private _sitespecificriskassessmentoutcomeform?;
|
|
93
|
+
private _accountcredit?;
|
|
93
94
|
constructor(authParams?: OauthParams, authToken?: string);
|
|
94
95
|
get ugexternalaudit(): ApiRecordLinkManager;
|
|
95
96
|
get workorder(): ApiRecordLinkManager;
|
|
@@ -164,6 +165,7 @@ export declare class NoteApi extends ApiProvider {
|
|
|
164
165
|
get case(): ApiRecordLinkManager;
|
|
165
166
|
get smsmessage(): ApiRecordLinkManager;
|
|
166
167
|
get sitespecificriskassessmentoutcomeform(): ApiRecordLinkManager;
|
|
168
|
+
get accountcredit(): ApiRecordLinkManager;
|
|
167
169
|
setRecord(sourceRecord: any): void;
|
|
168
170
|
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
169
171
|
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<NoteProperties>>>;
|
|
@@ -471,6 +471,12 @@ class NoteApi extends api_provider_1.ApiProvider {
|
|
|
471
471
|
}
|
|
472
472
|
return this._sitespecificriskassessmentoutcomeform;
|
|
473
473
|
}
|
|
474
|
+
get accountcredit() {
|
|
475
|
+
if (!this._accountcredit) {
|
|
476
|
+
this._accountcredit = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:Note', 'BillingModule:AccountCredit', 'AccountCredit_Note');
|
|
477
|
+
}
|
|
478
|
+
return this._accountcredit;
|
|
479
|
+
}
|
|
474
480
|
// ============================================
|
|
475
481
|
// STANDARD METHODS (Unchanged API)
|
|
476
482
|
// ============================================
|
|
@@ -23,9 +23,11 @@ export declare class AccountCreditDb extends DbProvider {
|
|
|
23
23
|
private sourceRecord;
|
|
24
24
|
private _contact?;
|
|
25
25
|
private _invoice?;
|
|
26
|
+
private _note?;
|
|
26
27
|
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
27
28
|
get contact(): DbRecordLinkManager;
|
|
28
29
|
get invoice(): DbRecordLinkManager;
|
|
30
|
+
get note(): DbRecordLinkManager;
|
|
29
31
|
setRecord(sourceRecord: any): void;
|
|
30
32
|
/**
|
|
31
33
|
* Search records with manual pagination control
|
|
@@ -50,6 +50,12 @@ class AccountCreditDb extends db_provider_1.DbProvider {
|
|
|
50
50
|
}
|
|
51
51
|
return this._invoice;
|
|
52
52
|
}
|
|
53
|
+
get note() {
|
|
54
|
+
if (!this._note) {
|
|
55
|
+
this._note = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'BillingModule:AccountCredit', 'SupportModule:Note', 'AccountCredit_Note');
|
|
56
|
+
}
|
|
57
|
+
return this._note;
|
|
58
|
+
}
|
|
53
59
|
// ============================================
|
|
54
60
|
// STANDARD METHODS
|
|
55
61
|
// ============================================
|
|
@@ -94,6 +94,7 @@ export declare class NoteDb extends DbProvider {
|
|
|
94
94
|
private _case?;
|
|
95
95
|
private _smsmessage?;
|
|
96
96
|
private _sitespecificriskassessmentoutcomeform?;
|
|
97
|
+
private _accountcredit?;
|
|
97
98
|
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
98
99
|
get ugexternalaudit(): DbRecordLinkManager;
|
|
99
100
|
get workorder(): DbRecordLinkManager;
|
|
@@ -168,6 +169,7 @@ export declare class NoteDb extends DbProvider {
|
|
|
168
169
|
get case(): DbRecordLinkManager;
|
|
169
170
|
get smsmessage(): DbRecordLinkManager;
|
|
170
171
|
get sitespecificriskassessmentoutcomeform(): DbRecordLinkManager;
|
|
172
|
+
get accountcredit(): DbRecordLinkManager;
|
|
171
173
|
setRecord(sourceRecord: any): void;
|
|
172
174
|
/**
|
|
173
175
|
* Search records with manual pagination control
|
package/dist/db-sdk-v2/NoteDb.js
CHANGED
|
@@ -476,6 +476,12 @@ class NoteDb extends db_provider_1.DbProvider {
|
|
|
476
476
|
}
|
|
477
477
|
return this._sitespecificriskassessmentoutcomeform;
|
|
478
478
|
}
|
|
479
|
+
get accountcredit() {
|
|
480
|
+
if (!this._accountcredit) {
|
|
481
|
+
this._accountcredit = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'SupportModule:Note', 'BillingModule:AccountCredit', 'AccountCredit_Note');
|
|
482
|
+
}
|
|
483
|
+
return this._accountcredit;
|
|
484
|
+
}
|
|
479
485
|
// ============================================
|
|
480
486
|
// STANDARD METHODS
|
|
481
487
|
// ============================================
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/core';
|
|
14
14
|
import { ContactProperties } from './Contact';
|
|
15
15
|
import { InvoiceProperties } from './Invoice';
|
|
16
|
+
import { NoteProperties } from './Note';
|
|
16
17
|
/**
|
|
17
18
|
* Available types for AccountCredit records
|
|
18
19
|
*/
|
|
@@ -200,6 +201,8 @@ export declare class AccountCredit extends OdinRecord<AccountCreditProperties> {
|
|
|
200
201
|
Contact: OdinLink<LinkedOdinRecord<ContactProperties>>;
|
|
201
202
|
/** Linked Invoice records (AccountCredit__Invoice) */
|
|
202
203
|
Invoice: OdinLink<LinkedOdinRecord<InvoiceProperties>>;
|
|
204
|
+
/** Linked Note records (AccountCredit_Note) */
|
|
205
|
+
Note: OdinLink<LinkedOdinRecord<NoteProperties>>;
|
|
203
206
|
}
|
|
204
207
|
/**
|
|
205
208
|
* RabbitMQ routing keys for AccountCredit events
|
|
@@ -221,3 +224,7 @@ export declare const ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_DELETED = "BillingModule
|
|
|
221
224
|
export declare const ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_CREATED = "BillingModule.AccountCredit.Invoice.SubDbRecordAssociationCreated";
|
|
222
225
|
/** Event: AccountCredit__Invoice link deleted */
|
|
223
226
|
export declare const ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_DELETED = "BillingModule.AccountCredit.Invoice.SubDbRecordAssociationDeleted";
|
|
227
|
+
/** Event: AccountCredit_Note link created */
|
|
228
|
+
export declare const ROUTING_KEY_LINK_ACCOUNT_CREDIT_NOTE_CREATED = "BillingModule.AccountCredit.Note.SubDbRecordAssociationCreated";
|
|
229
|
+
/** Event: AccountCredit_Note link deleted */
|
|
230
|
+
export declare const ROUTING_KEY_LINK_ACCOUNT_CREDIT_NOTE_DELETED = "BillingModule.AccountCredit.Note.SubDbRecordAssociationDeleted";
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Generated from Odin schema definition
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_DELETED = exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_CREATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_DELETED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_UPDATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_CREATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DELETED = exports.ROUTING_KEY_ACCOUNT_CREDIT_UPDATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_CREATED = exports.AccountCredit = exports.AccountCreditPropertyKeys = exports.AccountCreditReason = exports.AccountCreditSource = exports.DefaultAccountCreditStageKeys = exports.DefaultAccountCreditStageNames = exports.AccountCreditEntityTypes = void 0;
|
|
15
|
+
exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_NOTE_DELETED = exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_NOTE_CREATED = exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_DELETED = exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_CREATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_DELETED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_UPDATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_CREATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_DELETED = exports.ROUTING_KEY_ACCOUNT_CREDIT_UPDATED = exports.ROUTING_KEY_ACCOUNT_CREDIT_CREATED = exports.AccountCredit = exports.AccountCreditPropertyKeys = exports.AccountCreditReason = exports.AccountCreditSource = exports.DefaultAccountCreditStageKeys = exports.DefaultAccountCreditStageNames = exports.AccountCreditEntityTypes = void 0;
|
|
16
16
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
17
|
/**
|
|
18
18
|
* Available types for AccountCredit records
|
|
@@ -179,3 +179,7 @@ exports.ROUTING_KEY_ACCOUNT_CREDIT_DEFAULT_DELETED = 'BillingModule.AccountCredi
|
|
|
179
179
|
exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_CREATED = 'BillingModule.AccountCredit.Invoice.SubDbRecordAssociationCreated';
|
|
180
180
|
/** Event: AccountCredit__Invoice link deleted */
|
|
181
181
|
exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_INVOICE_DELETED = 'BillingModule.AccountCredit.Invoice.SubDbRecordAssociationDeleted';
|
|
182
|
+
/** Event: AccountCredit_Note link created */
|
|
183
|
+
exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_NOTE_CREATED = 'BillingModule.AccountCredit.Note.SubDbRecordAssociationCreated';
|
|
184
|
+
/** Event: AccountCredit_Note link deleted */
|
|
185
|
+
exports.ROUTING_KEY_LINK_ACCOUNT_CREDIT_NOTE_DELETED = 'BillingModule.AccountCredit.Note.SubDbRecordAssociationDeleted';
|
|
@@ -82,6 +82,7 @@ import { ContractBuyOutProperties } from './ContractBuyOut';
|
|
|
82
82
|
import { CaseProperties } from './Case';
|
|
83
83
|
import { SmsMessageProperties } from './SmsMessage';
|
|
84
84
|
import { SiteSpecificRiskAssessmentOutcomeFormProperties } from './SiteSpecificRiskAssessmentOutcomeForm';
|
|
85
|
+
import { AccountCreditProperties } from './AccountCredit';
|
|
85
86
|
/**
|
|
86
87
|
* Available types for Note records
|
|
87
88
|
*/
|
|
@@ -329,6 +330,8 @@ export declare class Note extends OdinRecord<NoteProperties> {
|
|
|
329
330
|
SmsMessage: OdinLink<LinkedOdinRecord<SmsMessageProperties>>;
|
|
330
331
|
/** Linked SiteSpecificRiskAssessmentOutcomeForm records (SiteSpecificRiskAssessmentOutcomeForm__Note) */
|
|
331
332
|
SiteSpecificRiskAssessmentOutcomeForm: OdinLink<LinkedOdinRecord<SiteSpecificRiskAssessmentOutcomeFormProperties>>;
|
|
333
|
+
/** Linked AccountCredit records (AccountCredit_Note) */
|
|
334
|
+
AccountCredit: OdinLink<LinkedOdinRecord<AccountCreditProperties>>;
|
|
332
335
|
}
|
|
333
336
|
/**
|
|
334
337
|
* RabbitMQ routing keys for Note events
|
|
@@ -27,6 +27,7 @@ import { CreateAccountCreditProperties } from '../actions-v2/CreateAccountCredit
|
|
|
27
27
|
import { UpdateAccountCreditBalanceProperties } from '../actions-v2/UpdateAccountCreditBalanceDto';
|
|
28
28
|
import { ContactRecord } from './ContactRecord';
|
|
29
29
|
import { InvoiceRecord } from './InvoiceRecord';
|
|
30
|
+
import { NoteRecord } from './NoteRecord';
|
|
30
31
|
/** Valid entity types for AccountCredit */
|
|
31
32
|
export declare type AccountCreditType = 'DEFAULT';
|
|
32
33
|
/**
|
|
@@ -94,6 +95,7 @@ export declare class AccountCreditRecord<TProps = AccountCreditProperties> {
|
|
|
94
95
|
private _preGeneratedId;
|
|
95
96
|
private _contacts?;
|
|
96
97
|
private _invoices?;
|
|
98
|
+
private _notes?;
|
|
97
99
|
/**
|
|
98
100
|
* Create a record wrapper.
|
|
99
101
|
* @param record - The underlying record, or null for create operations
|
|
@@ -171,6 +173,24 @@ export declare class AccountCreditRecord<TProps = AccountCreditProperties> {
|
|
|
171
173
|
* ```
|
|
172
174
|
*/
|
|
173
175
|
get invoices(): RecordLinkManager<InvoiceRecord, typeof AccountCreditRecord['invoicesLabels'][number]>;
|
|
176
|
+
/** Valid labels for Note associations */
|
|
177
|
+
static readonly notesLabels: readonly ["AccountCredit_Note"];
|
|
178
|
+
/**
|
|
179
|
+
* Access linked Note records
|
|
180
|
+
* @remarks Available labels: AccountCredit_Note
|
|
181
|
+
* @throws Error if called on a new (unsaved) record
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```typescript
|
|
185
|
+
* // Get all linked Note records
|
|
186
|
+
* const items = await record.notes.list();
|
|
187
|
+
* const first = await record.notes.first();
|
|
188
|
+
*
|
|
189
|
+
* // Filter by label
|
|
190
|
+
* const specific = await record.notes.first({ label: 'AccountCredit_Note' });
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
get notes(): RecordLinkManager<NoteRecord, typeof AccountCreditRecord['notesLabels'][number]>;
|
|
174
194
|
/**
|
|
175
195
|
* Queue a link to be created with the next action.
|
|
176
196
|
* Works for both create and update actions.
|
|
@@ -34,6 +34,7 @@ const core_1 = require("@d19n/odin-types/dist/core");
|
|
|
34
34
|
const record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/record-link-manager");
|
|
35
35
|
const ContactRecord_1 = require("./ContactRecord");
|
|
36
36
|
const InvoiceRecord_1 = require("./InvoiceRecord");
|
|
37
|
+
const NoteRecord_1 = require("./NoteRecord");
|
|
37
38
|
/**
|
|
38
39
|
* Builder for action execution with dryRun support
|
|
39
40
|
*
|
|
@@ -223,6 +224,36 @@ class AccountCreditRecord {
|
|
|
223
224
|
}
|
|
224
225
|
return this._invoices;
|
|
225
226
|
}
|
|
227
|
+
/**
|
|
228
|
+
* Access linked Note records
|
|
229
|
+
* @remarks Available labels: AccountCredit_Note
|
|
230
|
+
* @throws Error if called on a new (unsaved) record
|
|
231
|
+
*
|
|
232
|
+
* @example
|
|
233
|
+
* ```typescript
|
|
234
|
+
* // Get all linked Note records
|
|
235
|
+
* const items = await record.notes.list();
|
|
236
|
+
* const first = await record.notes.first();
|
|
237
|
+
*
|
|
238
|
+
* // Filter by label
|
|
239
|
+
* const specific = await record.notes.first({ label: 'AccountCredit_Note' });
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
242
|
+
get notes() {
|
|
243
|
+
var _a;
|
|
244
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
245
|
+
throw new Error('Cannot access links on a new (unsaved) record');
|
|
246
|
+
if (!this._notes) {
|
|
247
|
+
this._notes = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
248
|
+
sourceEntity: 'BillingModule:AccountCredit',
|
|
249
|
+
targetEntity: 'SupportModule:Note',
|
|
250
|
+
targetModuleName: 'SupportModule',
|
|
251
|
+
targetEntityName: 'Note',
|
|
252
|
+
labels: ['AccountCredit_Note'],
|
|
253
|
+
}, NoteRecord_1.NoteRecord);
|
|
254
|
+
}
|
|
255
|
+
return this._notes;
|
|
256
|
+
}
|
|
226
257
|
// ============================================
|
|
227
258
|
// LINK MANAGEMENT
|
|
228
259
|
// ============================================
|
|
@@ -483,6 +514,8 @@ exports.AccountCreditRecord = AccountCreditRecord;
|
|
|
483
514
|
AccountCreditRecord.contactsLabels = ['Contact__AccountCredit'];
|
|
484
515
|
/** Valid labels for Invoice associations */
|
|
485
516
|
AccountCreditRecord.invoicesLabels = ['AccountCredit__Invoice'];
|
|
517
|
+
/** Valid labels for Note associations */
|
|
518
|
+
AccountCreditRecord.notesLabels = ['AccountCredit_Note'];
|
|
486
519
|
/** Type guard to check if an object is a AccountCreditRecord */
|
|
487
520
|
function isAccountCreditRecord(obj) {
|
|
488
521
|
return obj instanceof AccountCreditRecord;
|
|
@@ -68,6 +68,7 @@ import { ContractBuyOutRecord } from './ContractBuyOutRecord';
|
|
|
68
68
|
import { CaseRecord } from './CaseRecord';
|
|
69
69
|
import { SmsMessageRecord } from './SmsMessageRecord';
|
|
70
70
|
import { SiteSpecificRiskAssessmentOutcomeFormRecord } from './SiteSpecificRiskAssessmentOutcomeFormRecord';
|
|
71
|
+
import { AccountCreditRecord } from './AccountCreditRecord';
|
|
71
72
|
/** Valid entity types for Note */
|
|
72
73
|
export declare type NoteType = 'DEFAULT';
|
|
73
74
|
/**
|
|
@@ -175,6 +176,7 @@ export declare class NoteRecord<TProps = NoteProperties> {
|
|
|
175
176
|
private _cases?;
|
|
176
177
|
private _smsMessages?;
|
|
177
178
|
private _siteSpecificRiskAssessmentOutcomeForms?;
|
|
179
|
+
private _accountCredits?;
|
|
178
180
|
/**
|
|
179
181
|
* Create a record wrapper.
|
|
180
182
|
* @param record - The underlying record, or null for create operations
|
|
@@ -972,6 +974,24 @@ export declare class NoteRecord<TProps = NoteProperties> {
|
|
|
972
974
|
* ```
|
|
973
975
|
*/
|
|
974
976
|
get siteSpecificRiskAssessmentOutcomeForms(): RecordLinkManager<SiteSpecificRiskAssessmentOutcomeFormRecord, typeof NoteRecord['siteSpecificRiskAssessmentOutcomeFormsLabels'][number]>;
|
|
977
|
+
/** Valid labels for AccountCredit associations */
|
|
978
|
+
static readonly accountCreditsLabels: readonly ["AccountCredit_Note"];
|
|
979
|
+
/**
|
|
980
|
+
* Access linked AccountCredit records
|
|
981
|
+
* @remarks Available labels: AccountCredit_Note
|
|
982
|
+
* @throws Error if called on a new (unsaved) record
|
|
983
|
+
*
|
|
984
|
+
* @example
|
|
985
|
+
* ```typescript
|
|
986
|
+
* // Get all linked AccountCredit records
|
|
987
|
+
* const items = await record.accountCredits.list();
|
|
988
|
+
* const first = await record.accountCredits.first();
|
|
989
|
+
*
|
|
990
|
+
* // Filter by label
|
|
991
|
+
* const specific = await record.accountCredits.first({ label: 'AccountCredit_Note' });
|
|
992
|
+
* ```
|
|
993
|
+
*/
|
|
994
|
+
get accountCredits(): RecordLinkManager<AccountCreditRecord, typeof NoteRecord['accountCreditsLabels'][number]>;
|
|
975
995
|
/**
|
|
976
996
|
* Queue a link to be created with the next action.
|
|
977
997
|
* Works for both create and update actions.
|
|
@@ -73,6 +73,7 @@ const ContractBuyOutRecord_1 = require("./ContractBuyOutRecord");
|
|
|
73
73
|
const CaseRecord_1 = require("./CaseRecord");
|
|
74
74
|
const SmsMessageRecord_1 = require("./SmsMessageRecord");
|
|
75
75
|
const SiteSpecificRiskAssessmentOutcomeFormRecord_1 = require("./SiteSpecificRiskAssessmentOutcomeFormRecord");
|
|
76
|
+
const AccountCreditRecord_1 = require("./AccountCreditRecord");
|
|
76
77
|
/**
|
|
77
78
|
* Builder for action execution with dryRun support
|
|
78
79
|
*
|
|
@@ -1462,6 +1463,36 @@ class NoteRecord {
|
|
|
1462
1463
|
}
|
|
1463
1464
|
return this._siteSpecificRiskAssessmentOutcomeForms;
|
|
1464
1465
|
}
|
|
1466
|
+
/**
|
|
1467
|
+
* Access linked AccountCredit records
|
|
1468
|
+
* @remarks Available labels: AccountCredit_Note
|
|
1469
|
+
* @throws Error if called on a new (unsaved) record
|
|
1470
|
+
*
|
|
1471
|
+
* @example
|
|
1472
|
+
* ```typescript
|
|
1473
|
+
* // Get all linked AccountCredit records
|
|
1474
|
+
* const items = await record.accountCredits.list();
|
|
1475
|
+
* const first = await record.accountCredits.first();
|
|
1476
|
+
*
|
|
1477
|
+
* // Filter by label
|
|
1478
|
+
* const specific = await record.accountCredits.first({ label: 'AccountCredit_Note' });
|
|
1479
|
+
* ```
|
|
1480
|
+
*/
|
|
1481
|
+
get accountCredits() {
|
|
1482
|
+
var _a;
|
|
1483
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
1484
|
+
throw new Error('Cannot access links on a new (unsaved) record');
|
|
1485
|
+
if (!this._accountCredits) {
|
|
1486
|
+
this._accountCredits = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
1487
|
+
sourceEntity: 'SupportModule:Note',
|
|
1488
|
+
targetEntity: 'BillingModule:AccountCredit',
|
|
1489
|
+
targetModuleName: 'BillingModule',
|
|
1490
|
+
targetEntityName: 'AccountCredit',
|
|
1491
|
+
labels: ['AccountCredit_Note'],
|
|
1492
|
+
}, AccountCreditRecord_1.AccountCreditRecord);
|
|
1493
|
+
}
|
|
1494
|
+
return this._accountCredits;
|
|
1495
|
+
}
|
|
1465
1496
|
// ============================================
|
|
1466
1497
|
// LINK MANAGEMENT
|
|
1467
1498
|
// ============================================
|
|
@@ -1737,6 +1768,8 @@ NoteRecord.casesLabels = ['Case__Note'];
|
|
|
1737
1768
|
NoteRecord.smsMessagesLabels = ['SmsMessage__Note'];
|
|
1738
1769
|
/** Valid labels for SiteSpecificRiskAssessmentOutcomeForm associations */
|
|
1739
1770
|
NoteRecord.siteSpecificRiskAssessmentOutcomeFormsLabels = ['SiteSpecificRiskAssessmentOutcomeForm__Note'];
|
|
1771
|
+
/** Valid labels for AccountCredit associations */
|
|
1772
|
+
NoteRecord.accountCreditsLabels = ['AccountCredit_Note'];
|
|
1740
1773
|
/** Type guard to check if an object is a NoteRecord */
|
|
1741
1774
|
function isNoteRecord(obj) {
|
|
1742
1775
|
return obj instanceof NoteRecord;
|