@d19n/youfibre-odin-sdk 1.0.331 → 1.0.332
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/entities-v2/Email.d.ts +17 -0
- package/dist/entities-v2/Email.js +2 -0
- package/dist/records-v2/AccountRecord.d.ts +306 -2
- package/dist/records-v2/AccountRecord.js +451 -0
- package/dist/records-v2/ActivityLogRecord.d.ts +122 -1
- package/dist/records-v2/ActivityLogRecord.js +190 -0
- package/dist/records-v2/ActivityRecord.d.ts +255 -2
- package/dist/records-v2/ActivityRecord.js +387 -0
- package/dist/records-v2/AddressRecord.d.ts +321 -0
- package/dist/records-v2/AddressRecord.js +532 -0
- package/dist/records-v2/AffiliateCodeRecord.d.ts +102 -1
- package/dist/records-v2/AffiliateCodeRecord.js +157 -0
- package/dist/records-v2/AppointmentRecord.d.ts +141 -0
- package/dist/records-v2/AppointmentRecord.js +235 -0
- package/dist/records-v2/BillingAdjustmentRecord.d.ts +81 -0
- package/dist/records-v2/BillingAdjustmentRecord.js +136 -0
- package/dist/records-v2/BillingRequestRecord.d.ts +178 -2
- package/dist/records-v2/BillingRequestRecord.js +271 -0
- package/dist/records-v2/BlockageA55Record.d.ts +103 -2
- package/dist/records-v2/BlockageA55Record.js +157 -0
- package/dist/records-v2/CallEventRecord.d.ts +82 -1
- package/dist/records-v2/CallEventRecord.js +124 -0
- package/dist/records-v2/CallLegRecord.d.ts +82 -1
- package/dist/records-v2/CallLegRecord.js +124 -0
- package/dist/records-v2/CallRecord.d.ts +202 -1
- package/dist/records-v2/CallRecord.js +322 -0
- package/dist/records-v2/CallTransferRecord.d.ts +102 -1
- package/dist/records-v2/CallTransferRecord.js +157 -0
- package/dist/records-v2/CampaignRecord.d.ts +83 -2
- package/dist/records-v2/CampaignRecord.js +124 -0
- package/dist/records-v2/CaseRecord.d.ts +358 -2
- package/dist/records-v2/CaseRecord.js +568 -0
- package/dist/records-v2/ChangeReasonRecord.d.ts +171 -2
- package/dist/records-v2/ChangeReasonRecord.js +238 -0
- package/dist/records-v2/ChurnRequestRecord.d.ts +62 -1
- package/dist/records-v2/ChurnRequestRecord.js +91 -0
- package/dist/records-v2/ContactRecord.d.ts +460 -0
- package/dist/records-v2/ContactRecord.js +762 -0
- package/dist/records-v2/ContractBuyOutRecord.d.ts +162 -1
- package/dist/records-v2/ContractBuyOutRecord.js +256 -0
- package/dist/records-v2/ConversationRecord.d.ts +62 -1
- package/dist/records-v2/ConversationRecord.js +91 -0
- package/dist/records-v2/CreditNoteRecord.d.ts +81 -0
- package/dist/records-v2/CreditNoteRecord.js +136 -0
- package/dist/records-v2/CrmDatasetRecord.d.ts +191 -2
- package/dist/records-v2/CrmDatasetRecord.js +271 -0
- package/dist/records-v2/CustomerDeviceAtaRecord.d.ts +21 -0
- package/dist/records-v2/CustomerDeviceAtaRecord.js +37 -0
- package/dist/records-v2/CustomerDeviceOntRecord.d.ts +181 -0
- package/dist/records-v2/CustomerDeviceOntRecord.js +301 -0
- package/dist/records-v2/CustomerDeviceRouterRecord.d.ts +141 -0
- package/dist/records-v2/CustomerDeviceRouterRecord.js +235 -0
- package/dist/records-v2/CustomerPhonePortingRecord.d.ts +21 -0
- package/dist/records-v2/CustomerPhonePortingRecord.js +37 -0
- package/dist/records-v2/DiscountRecord.d.ts +121 -0
- package/dist/records-v2/DiscountRecord.js +202 -0
- package/dist/records-v2/EmailRecord.d.ts +174 -2
- package/dist/records-v2/EmailRecord.js +254 -0
- package/dist/records-v2/EmailTemplateRecord.d.ts +21 -1
- package/dist/records-v2/EmailTemplateRecord.js +21 -0
- package/dist/records-v2/FieldServiceDispatchedProductRecord.d.ts +135 -2
- package/dist/records-v2/FieldServiceDispatchedProductRecord.js +189 -0
- package/dist/records-v2/FieldServiceProductRecord.d.ts +115 -2
- package/dist/records-v2/FieldServiceProductRecord.js +156 -0
- package/dist/records-v2/FileRecord.d.ts +1191 -2
- package/dist/records-v2/FileRecord.js +1869 -0
- package/dist/records-v2/ImpersonationTrackerRecord.d.ts +62 -1
- package/dist/records-v2/ImpersonationTrackerRecord.js +91 -0
- package/dist/records-v2/InternalInstallAuditRecord.d.ts +83 -2
- package/dist/records-v2/InternalInstallAuditRecord.js +124 -0
- package/dist/records-v2/InvoiceItemRecord.d.ts +40 -0
- package/dist/records-v2/InvoiceItemRecord.js +69 -0
- package/dist/records-v2/InvoiceRecord.d.ts +359 -2
- package/dist/records-v2/InvoiceRecord.js +569 -0
- package/dist/records-v2/KnowledgeArticleRecord.d.ts +98 -2
- package/dist/records-v2/KnowledgeArticleRecord.js +139 -0
- package/dist/records-v2/LeadRecord.d.ts +261 -0
- package/dist/records-v2/LeadRecord.js +433 -0
- package/dist/records-v2/MessageRecord.d.ts +79 -2
- package/dist/records-v2/MessageRecord.js +107 -0
- package/dist/records-v2/NetworkDeviceRecord.d.ts +43 -2
- package/dist/records-v2/NetworkDeviceRecord.js +58 -0
- package/dist/records-v2/NoteRecord.d.ts +1101 -1
- package/dist/records-v2/NoteRecord.js +1806 -0
- package/dist/records-v2/OfferRecord.d.ts +154 -2
- package/dist/records-v2/OfferRecord.js +221 -0
- package/dist/records-v2/OhAuditOfInstallationRecord.d.ts +83 -2
- package/dist/records-v2/OhAuditOfInstallationRecord.js +124 -0
- package/dist/records-v2/OhExternalAuditRecord.d.ts +83 -2
- package/dist/records-v2/OhExternalAuditRecord.js +124 -0
- package/dist/records-v2/OhInProgressAuditRecord.d.ts +83 -2
- package/dist/records-v2/OhInProgressAuditRecord.js +124 -0
- package/dist/records-v2/OhInstallationAuditRecord.d.ts +83 -2
- package/dist/records-v2/OhInstallationAuditRecord.js +124 -0
- package/dist/records-v2/OhRetroAuditRecord.d.ts +83 -2
- package/dist/records-v2/OhRetroAuditRecord.js +124 -0
- package/dist/records-v2/OneTouchSwitchRecord.d.ts +255 -2
- package/dist/records-v2/OneTouchSwitchRecord.js +387 -0
- package/dist/records-v2/OntReplacementApprovalRecord.d.ts +62 -1
- package/dist/records-v2/OntReplacementApprovalRecord.js +91 -0
- package/dist/records-v2/OrderCheckRecord.d.ts +21 -0
- package/dist/records-v2/OrderCheckRecord.js +37 -0
- package/dist/records-v2/OrderItemRecord.d.ts +280 -0
- package/dist/records-v2/OrderItemRecord.js +465 -0
- package/dist/records-v2/OrderRecord.d.ts +540 -0
- package/dist/records-v2/OrderRecord.js +894 -0
- package/dist/records-v2/OutageRecord.d.ts +42 -1
- package/dist/records-v2/OutageRecord.js +58 -0
- package/dist/records-v2/OverlayRealA55Record.d.ts +83 -2
- package/dist/records-v2/OverlayRealA55Record.js +124 -0
- package/dist/records-v2/PICRequestRecord.d.ts +62 -1
- package/dist/records-v2/PICRequestRecord.js +91 -0
- package/dist/records-v2/PaymentMethodRecord.d.ts +121 -0
- package/dist/records-v2/PaymentMethodRecord.js +202 -0
- package/dist/records-v2/PaymentMethodRefundRecord.d.ts +181 -0
- package/dist/records-v2/PaymentMethodRefundRecord.js +301 -0
- package/dist/records-v2/PaymentRecord.d.ts +82 -1
- package/dist/records-v2/PaymentRecord.js +124 -0
- package/dist/records-v2/PermissionToFailRecord.d.ts +61 -0
- package/dist/records-v2/PermissionToFailRecord.js +103 -0
- package/dist/records-v2/PgAccountValidationRecord.d.ts +21 -1
- package/dist/records-v2/PgAccountValidationRecord.js +21 -0
- package/dist/records-v2/PgContactRecord.d.ts +62 -1
- package/dist/records-v2/PgContactRecord.js +91 -0
- package/dist/records-v2/PgDirectDebitFileRecord.d.ts +95 -2
- package/dist/records-v2/PgDirectDebitFileRecord.js +123 -0
- package/dist/records-v2/PgDisputeRecord.d.ts +62 -1
- package/dist/records-v2/PgDisputeRecord.js +91 -0
- package/dist/records-v2/PgFileAllocationRecord.d.ts +115 -2
- package/dist/records-v2/PgFileAllocationRecord.js +156 -0
- package/dist/records-v2/PgLogRecord.d.ts +21 -1
- package/dist/records-v2/PgLogRecord.js +21 -0
- package/dist/records-v2/PgPaymentMethodRecord.d.ts +102 -1
- package/dist/records-v2/PgPaymentMethodRecord.js +157 -0
- package/dist/records-v2/PgSortCodeSubstitutionRecord.d.ts +21 -1
- package/dist/records-v2/PgSortCodeSubstitutionRecord.js +21 -0
- package/dist/records-v2/PgTransactionRecord.d.ts +135 -2
- package/dist/records-v2/PgTransactionRecord.js +189 -0
- package/dist/records-v2/PgVocalinkRecord.d.ts +21 -1
- package/dist/records-v2/PgVocalinkRecord.js +21 -0
- package/dist/records-v2/PgWebhookAttemptRecord.d.ts +42 -1
- package/dist/records-v2/PgWebhookAttemptRecord.js +58 -0
- package/dist/records-v2/PgWebhookRecord.d.ts +122 -1
- package/dist/records-v2/PgWebhookRecord.js +190 -0
- package/dist/records-v2/PriceBookRecord.d.ts +21 -0
- package/dist/records-v2/PriceBookRecord.js +37 -0
- package/dist/records-v2/ProductRecord.d.ts +242 -2
- package/dist/records-v2/ProductRecord.js +335 -0
- package/dist/records-v2/PushNotificationRecord.d.ts +42 -1
- package/dist/records-v2/PushNotificationRecord.js +58 -0
- package/dist/records-v2/ReferralRecord.d.ts +103 -2
- package/dist/records-v2/ReferralRecord.js +157 -0
- package/dist/records-v2/RemediationOutcomeFormRecord.d.ts +83 -2
- package/dist/records-v2/RemediationOutcomeFormRecord.js +124 -0
- package/dist/records-v2/RemediationRequiredReasonRecord.d.ts +103 -2
- package/dist/records-v2/RemediationRequiredReasonRecord.js +157 -0
- package/dist/records-v2/ReturnsRecord.d.ts +62 -1
- package/dist/records-v2/ReturnsRecord.js +91 -0
- package/dist/records-v2/RewardRecord.d.ts +103 -2
- package/dist/records-v2/RewardRecord.js +157 -0
- package/dist/records-v2/SalesTerritoryRecord.d.ts +79 -2
- package/dist/records-v2/SalesTerritoryRecord.js +107 -0
- package/dist/records-v2/ScheduleSlotRecord.d.ts +42 -1
- package/dist/records-v2/ScheduleSlotRecord.js +58 -0
- package/dist/records-v2/ServiceAppointmentConfigRecord.d.ts +287 -2
- package/dist/records-v2/ServiceAppointmentConfigRecord.js +367 -0
- package/dist/records-v2/ServiceAppointmentRecord.d.ts +81 -0
- package/dist/records-v2/ServiceAppointmentRecord.js +136 -0
- package/dist/records-v2/ServiceRecord.d.ts +40 -0
- package/dist/records-v2/ServiceRecord.js +69 -0
- package/dist/records-v2/ServiceVisitAuditRecord.d.ts +83 -2
- package/dist/records-v2/ServiceVisitAuditRecord.js +124 -0
- package/dist/records-v2/SiteSpecificRiskAssessmentOutcomeFormRecord.d.ts +83 -2
- package/dist/records-v2/SiteSpecificRiskAssessmentOutcomeFormRecord.js +124 -0
- package/dist/records-v2/SweeperMaintenanceAuditRecord.d.ts +83 -2
- package/dist/records-v2/SweeperMaintenanceAuditRecord.js +124 -0
- package/dist/records-v2/TeamRecord.d.ts +81 -0
- package/dist/records-v2/TeamRecord.js +136 -0
- package/dist/records-v2/TimeSlotRecord.d.ts +21 -0
- package/dist/records-v2/TimeSlotRecord.js +37 -0
- package/dist/records-v2/TransactionRecord.d.ts +181 -1
- package/dist/records-v2/TransactionRecord.js +288 -0
- package/dist/records-v2/TwilioUserUpdateRecord.d.ts +42 -1
- package/dist/records-v2/TwilioUserUpdateRecord.js +58 -0
- package/dist/records-v2/UgAuditOfInstallationRecord.d.ts +83 -2
- package/dist/records-v2/UgAuditOfInstallationRecord.js +124 -0
- package/dist/records-v2/UgExternalAuditRecord.d.ts +83 -2
- package/dist/records-v2/UgExternalAuditRecord.js +124 -0
- package/dist/records-v2/UgInProgressAuditRecord.d.ts +83 -2
- package/dist/records-v2/UgInProgressAuditRecord.js +124 -0
- package/dist/records-v2/UgInstallationAuditRecord.d.ts +83 -2
- package/dist/records-v2/UgInstallationAuditRecord.js +124 -0
- package/dist/records-v2/UgRetroAuditRecord.d.ts +83 -2
- package/dist/records-v2/UgRetroAuditRecord.js +124 -0
- package/dist/records-v2/UserRecord.d.ts +360 -0
- package/dist/records-v2/UserRecord.js +597 -0
- package/dist/records-v2/VisitRecord.d.ts +121 -0
- package/dist/records-v2/VisitRecord.js +202 -0
- package/dist/records-v2/VoiceConfigurationRecord.d.ts +21 -0
- package/dist/records-v2/VoiceConfigurationRecord.js +37 -0
- package/dist/records-v2/WayleaveAuditRecord.d.ts +83 -2
- package/dist/records-v2/WayleaveAuditRecord.js +124 -0
- package/dist/records-v2/WorkOrderRecord.d.ts +1206 -2
- package/dist/records-v2/WorkOrderRecord.js +1832 -0
- package/dist/records-v2/WorkOrderStatusUpdateRecord.d.ts +75 -2
- package/dist/records-v2/WorkOrderStatusUpdateRecord.js +90 -0
- package/dist/records-v2/YfFieldServiceVisitRecord.d.ts +83 -2
- package/dist/records-v2/YfFieldServiceVisitRecord.js +124 -0
- package/dist/records-v2/YfStockAuditRecord.d.ts +83 -2
- package/dist/records-v2/YfStockAuditRecord.js +124 -0
- package/package.json +1 -1
|
@@ -76,6 +76,8 @@ export declare enum EmailEmailingService {
|
|
|
76
76
|
* Use these constants instead of string literals for type safety
|
|
77
77
|
*/
|
|
78
78
|
export declare enum EmailPropertyKeys {
|
|
79
|
+
/** Template Id */
|
|
80
|
+
TemplateId = "TemplateId",
|
|
79
81
|
/** Data field for Email records. Used by Communications team. */
|
|
80
82
|
Subject = "Subject",
|
|
81
83
|
/** Formatted Message (Communications - Email) */
|
|
@@ -129,6 +131,11 @@ export declare enum EmailPropertyKeys {
|
|
|
129
131
|
* @see NotificationModule:Email
|
|
130
132
|
*/
|
|
131
133
|
export interface EmailProperties {
|
|
134
|
+
/** Template Id
|
|
135
|
+
*
|
|
136
|
+
* @type {TEXT}
|
|
137
|
+
*/
|
|
138
|
+
TemplateId: string;
|
|
132
139
|
/** Data field for Email records. Used by Communications team.
|
|
133
140
|
*
|
|
134
141
|
* @type {TEXT}
|
|
@@ -256,6 +263,11 @@ export interface EmailProperties {
|
|
|
256
263
|
* @see NotificationModule:Email
|
|
257
264
|
*/
|
|
258
265
|
export interface SupportEmailProperties {
|
|
266
|
+
/** Template Id
|
|
267
|
+
*
|
|
268
|
+
* @type {TEXT}
|
|
269
|
+
*/
|
|
270
|
+
TemplateId: string;
|
|
259
271
|
/** Data field for Email records. Used by Communications team.
|
|
260
272
|
*
|
|
261
273
|
* @type {TEXT}
|
|
@@ -383,6 +395,11 @@ export interface SupportEmailProperties {
|
|
|
383
395
|
* @see NotificationModule:Email
|
|
384
396
|
*/
|
|
385
397
|
export interface TransactionalEmailProperties {
|
|
398
|
+
/** Template Id
|
|
399
|
+
*
|
|
400
|
+
* @type {TEXT}
|
|
401
|
+
*/
|
|
402
|
+
TemplateId: string;
|
|
386
403
|
/** Data field for Email records. Used by Communications team.
|
|
387
404
|
*
|
|
388
405
|
* @type {TEXT}
|
|
@@ -78,6 +78,8 @@ var EmailEmailingService;
|
|
|
78
78
|
*/
|
|
79
79
|
var EmailPropertyKeys;
|
|
80
80
|
(function (EmailPropertyKeys) {
|
|
81
|
+
/** Template Id */
|
|
82
|
+
EmailPropertyKeys["TemplateId"] = "TemplateId";
|
|
81
83
|
/** Data field for Email records. Used by Communications team. */
|
|
82
84
|
EmailPropertyKeys["Subject"] = "Subject";
|
|
83
85
|
/** Formatted Message (Communications - Email) */
|
|
@@ -13,13 +13,16 @@
|
|
|
13
13
|
* await record.createAccount({ ... }).execute();
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
|
+
* Entity Types: BUSINESS, MULTIPLE, PRIMARY, RESELLER, SERVICE
|
|
17
|
+
*
|
|
16
18
|
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
17
19
|
*/
|
|
18
20
|
import { OdinRecord, OdinRecordLinkDto } from '@d19n/odin-types/dist/core';
|
|
19
21
|
import { PipelineStageEntity } from '@d19n/odin-types/dist/core';
|
|
20
22
|
import { IDbRecordCreateUpdateRes } from '@d19n/odin-types/dist/core/interfaces/v1.db.interfaces';
|
|
21
23
|
import { IOdinProvider } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
|
|
22
|
-
import {
|
|
24
|
+
import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-manager';
|
|
25
|
+
import { AccountProperties, BusinessAccountProperties, MultipleAccountProperties, PrimaryAccountProperties, ResellerAccountProperties, ServiceAccountProperties } from '../entities-v2/Account';
|
|
23
26
|
import { ChangeBillingModeProperties } from '../actions-v2/ChangeBillingModeDto';
|
|
24
27
|
import { CreateBusinessAccountProperties } from '../actions-v2/CreateBusinessAccountDto';
|
|
25
28
|
import { CreatePrimaryAccountProperties } from '../actions-v2/CreatePrimaryAccountDto';
|
|
@@ -27,6 +30,18 @@ import { CreateResellerAccountProperties } from '../actions-v2/CreateResellerAcc
|
|
|
27
30
|
import { UpdateBusinessAccountProperties } from '../actions-v2/UpdateBusinessAccountDto';
|
|
28
31
|
import { UpdatePrimaryAccountProperties } from '../actions-v2/UpdatePrimaryAccountDto';
|
|
29
32
|
import { UpdateResellerAccountProperties } from '../actions-v2/UpdateResellerAccountDto';
|
|
33
|
+
import { WorkOrderRecord } from './WorkOrderRecord';
|
|
34
|
+
import { NoteRecord } from './NoteRecord';
|
|
35
|
+
import { OneTouchSwitchRecord } from './OneTouchSwitchRecord';
|
|
36
|
+
import { OrderRecord } from './OrderRecord';
|
|
37
|
+
import { InvoiceRecord } from './InvoiceRecord';
|
|
38
|
+
import { AddressRecord } from './AddressRecord';
|
|
39
|
+
import { CaseRecord } from './CaseRecord';
|
|
40
|
+
import { PaymentRecord } from './PaymentRecord';
|
|
41
|
+
import { ContactRecord } from './ContactRecord';
|
|
42
|
+
import { FileRecord } from './FileRecord';
|
|
43
|
+
/** Valid entity types for Account */
|
|
44
|
+
export declare type AccountType = 'BUSINESS' | 'MULTIPLE' | 'PRIMARY' | 'RESELLER' | 'SERVICE';
|
|
30
45
|
/**
|
|
31
46
|
* Builder for action execution with dryRun support
|
|
32
47
|
*
|
|
@@ -63,6 +78,17 @@ export declare class AccountRecord<TProps = AccountProperties> {
|
|
|
63
78
|
private _provider;
|
|
64
79
|
private _pendingLinks;
|
|
65
80
|
private _preGeneratedId;
|
|
81
|
+
private _workOrders?;
|
|
82
|
+
private _notes?;
|
|
83
|
+
private _oneTouchSwitches?;
|
|
84
|
+
private _orders?;
|
|
85
|
+
private _invoices?;
|
|
86
|
+
private _accounts?;
|
|
87
|
+
private _addresses?;
|
|
88
|
+
private _cases?;
|
|
89
|
+
private _payments?;
|
|
90
|
+
private _contacts?;
|
|
91
|
+
private _files?;
|
|
66
92
|
/**
|
|
67
93
|
* Create a record wrapper.
|
|
68
94
|
* @param record - The underlying record, or null for create operations
|
|
@@ -75,7 +101,7 @@ export declare class AccountRecord<TProps = AccountProperties> {
|
|
|
75
101
|
/** Record ID - always available (pre-generated for new records) */
|
|
76
102
|
get id(): string;
|
|
77
103
|
get entity(): string;
|
|
78
|
-
get type():
|
|
104
|
+
get type(): AccountType | undefined;
|
|
79
105
|
/** Record properties - empty object for new (unsaved) records */
|
|
80
106
|
get properties(): TProps;
|
|
81
107
|
get title(): string | undefined;
|
|
@@ -85,6 +111,284 @@ export declare class AccountRecord<TProps = AccountProperties> {
|
|
|
85
111
|
get updatedAt(): string | undefined;
|
|
86
112
|
/** Access the underlying OdinRecord (null for new records) */
|
|
87
113
|
get record(): OdinRecord<TProps> | null;
|
|
114
|
+
/**
|
|
115
|
+
* Type guard: check if this record is of type BUSINESS
|
|
116
|
+
*
|
|
117
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
118
|
+
* giving you access to BUSINESS-specific properties.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```typescript
|
|
122
|
+
* if (record.isBusiness()) {
|
|
123
|
+
* // TypeScript knows record.properties is BusinessAccountProperties
|
|
124
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
125
|
+
* }
|
|
126
|
+
* ```
|
|
127
|
+
* @remarks Business accounts
|
|
128
|
+
*/
|
|
129
|
+
isBusiness(): this is AccountRecord<BusinessAccountProperties>;
|
|
130
|
+
/**
|
|
131
|
+
* Type guard: check if this record is of type MULTIPLE
|
|
132
|
+
*
|
|
133
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
134
|
+
* giving you access to MULTIPLE-specific properties.
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```typescript
|
|
138
|
+
* if (record.isMultiple()) {
|
|
139
|
+
* // TypeScript knows record.properties is MultipleAccountProperties
|
|
140
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
141
|
+
* }
|
|
142
|
+
* ```
|
|
143
|
+
* @remarks Multiple accounts are for customers who want to purchase multiple services at many addresses
|
|
144
|
+
*/
|
|
145
|
+
isMultiple(): this is AccountRecord<MultipleAccountProperties>;
|
|
146
|
+
/**
|
|
147
|
+
* Type guard: check if this record is of type PRIMARY
|
|
148
|
+
*
|
|
149
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
150
|
+
* giving you access to PRIMARY-specific properties.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```typescript
|
|
154
|
+
* if (record.isPrimary()) {
|
|
155
|
+
* // TypeScript knows record.properties is PrimaryAccountProperties
|
|
156
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
157
|
+
* }
|
|
158
|
+
* ```
|
|
159
|
+
* @remarks Primary account
|
|
160
|
+
*/
|
|
161
|
+
isPrimary(): this is AccountRecord<PrimaryAccountProperties>;
|
|
162
|
+
/**
|
|
163
|
+
* Type guard: check if this record is of type RESELLER
|
|
164
|
+
*
|
|
165
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
166
|
+
* giving you access to RESELLER-specific properties.
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* ```typescript
|
|
170
|
+
* if (record.isReseller()) {
|
|
171
|
+
* // TypeScript knows record.properties is ResellerAccountProperties
|
|
172
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
173
|
+
* }
|
|
174
|
+
* ```
|
|
175
|
+
* @remarks Reseller
|
|
176
|
+
*/
|
|
177
|
+
isReseller(): this is AccountRecord<ResellerAccountProperties>;
|
|
178
|
+
/**
|
|
179
|
+
* Type guard: check if this record is of type SERVICE
|
|
180
|
+
*
|
|
181
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
182
|
+
* giving you access to SERVICE-specific properties.
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```typescript
|
|
186
|
+
* if (record.isService()) {
|
|
187
|
+
* // TypeScript knows record.properties is ServiceAccountProperties
|
|
188
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
189
|
+
* }
|
|
190
|
+
* ```
|
|
191
|
+
* @remarks This is the account where service is being delivered
|
|
192
|
+
*/
|
|
193
|
+
isService(): this is AccountRecord<ServiceAccountProperties>;
|
|
194
|
+
/** Valid labels for WorkOrder associations */
|
|
195
|
+
static readonly workOrdersLabels: readonly ["Account__WorkOrder"];
|
|
196
|
+
/**
|
|
197
|
+
* Access linked WorkOrder records
|
|
198
|
+
* @remarks Available labels: Account__WorkOrder
|
|
199
|
+
* @throws Error if called on a new (unsaved) record
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* ```typescript
|
|
203
|
+
* // Get all linked WorkOrder records
|
|
204
|
+
* const items = await record.workOrders.list();
|
|
205
|
+
* const first = await record.workOrders.first();
|
|
206
|
+
*
|
|
207
|
+
* // Filter by label
|
|
208
|
+
* const specific = await record.workOrders.first({ label: 'Account__WorkOrder' });
|
|
209
|
+
* ```
|
|
210
|
+
*/
|
|
211
|
+
get workOrders(): RecordLinkManager<WorkOrderRecord, typeof AccountRecord['workOrdersLabels'][number]>;
|
|
212
|
+
/** Valid labels for Note associations */
|
|
213
|
+
static readonly notesLabels: readonly ["Account__Note"];
|
|
214
|
+
/**
|
|
215
|
+
* Access linked Note records
|
|
216
|
+
* @remarks Available labels: Account__Note
|
|
217
|
+
* @throws Error if called on a new (unsaved) record
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* ```typescript
|
|
221
|
+
* // Get all linked Note records
|
|
222
|
+
* const items = await record.notes.list();
|
|
223
|
+
* const first = await record.notes.first();
|
|
224
|
+
*
|
|
225
|
+
* // Filter by label
|
|
226
|
+
* const specific = await record.notes.first({ label: 'Account__Note' });
|
|
227
|
+
* ```
|
|
228
|
+
*/
|
|
229
|
+
get notes(): RecordLinkManager<NoteRecord, typeof AccountRecord['notesLabels'][number]>;
|
|
230
|
+
/** Valid labels for OneTouchSwitch associations */
|
|
231
|
+
static readonly oneTouchSwitchesLabels: readonly ["Account__OneTouchSwitch"];
|
|
232
|
+
/**
|
|
233
|
+
* Access linked OneTouchSwitch records
|
|
234
|
+
* @remarks Available labels: Account__OneTouchSwitch
|
|
235
|
+
* @throws Error if called on a new (unsaved) record
|
|
236
|
+
*
|
|
237
|
+
* @example
|
|
238
|
+
* ```typescript
|
|
239
|
+
* // Get all linked OneTouchSwitch records
|
|
240
|
+
* const items = await record.oneTouchSwitches.list();
|
|
241
|
+
* const first = await record.oneTouchSwitches.first();
|
|
242
|
+
*
|
|
243
|
+
* // Filter by label
|
|
244
|
+
* const specific = await record.oneTouchSwitches.first({ label: 'Account__OneTouchSwitch' });
|
|
245
|
+
* ```
|
|
246
|
+
*/
|
|
247
|
+
get oneTouchSwitches(): RecordLinkManager<OneTouchSwitchRecord, typeof AccountRecord['oneTouchSwitchesLabels'][number]>;
|
|
248
|
+
/** Valid labels for Order associations */
|
|
249
|
+
static readonly ordersLabels: readonly ["Account__Order"];
|
|
250
|
+
/**
|
|
251
|
+
* Access linked Order records
|
|
252
|
+
* @remarks Available labels: Account__Order
|
|
253
|
+
* @throws Error if called on a new (unsaved) record
|
|
254
|
+
*
|
|
255
|
+
* @example
|
|
256
|
+
* ```typescript
|
|
257
|
+
* // Get all linked Order records
|
|
258
|
+
* const items = await record.orders.list();
|
|
259
|
+
* const first = await record.orders.first();
|
|
260
|
+
*
|
|
261
|
+
* // Filter by label
|
|
262
|
+
* const specific = await record.orders.first({ label: 'Account__Order' });
|
|
263
|
+
* ```
|
|
264
|
+
*/
|
|
265
|
+
get orders(): RecordLinkManager<OrderRecord, typeof AccountRecord['ordersLabels'][number]>;
|
|
266
|
+
/** Valid labels for Invoice associations */
|
|
267
|
+
static readonly invoicesLabels: readonly ["Account__Invoice"];
|
|
268
|
+
/**
|
|
269
|
+
* Access linked Invoice records
|
|
270
|
+
* @remarks Available labels: Account__Invoice
|
|
271
|
+
* @throws Error if called on a new (unsaved) record
|
|
272
|
+
*
|
|
273
|
+
* @example
|
|
274
|
+
* ```typescript
|
|
275
|
+
* // Get all linked Invoice records
|
|
276
|
+
* const items = await record.invoices.list();
|
|
277
|
+
* const first = await record.invoices.first();
|
|
278
|
+
*
|
|
279
|
+
* // Filter by label
|
|
280
|
+
* const specific = await record.invoices.first({ label: 'Account__Invoice' });
|
|
281
|
+
* ```
|
|
282
|
+
*/
|
|
283
|
+
get invoices(): RecordLinkManager<InvoiceRecord, typeof AccountRecord['invoicesLabels'][number]>;
|
|
284
|
+
/** Valid labels for Account associations */
|
|
285
|
+
static readonly accountsLabels: readonly ["Account_Account"];
|
|
286
|
+
/**
|
|
287
|
+
* Access linked Account records
|
|
288
|
+
* @remarks Available labels: Account_Account
|
|
289
|
+
* @throws Error if called on a new (unsaved) record
|
|
290
|
+
*
|
|
291
|
+
* @example
|
|
292
|
+
* ```typescript
|
|
293
|
+
* // Get all linked Account records
|
|
294
|
+
* const items = await record.accounts.list();
|
|
295
|
+
* const first = await record.accounts.first();
|
|
296
|
+
*
|
|
297
|
+
* // Filter by label
|
|
298
|
+
* const specific = await record.accounts.first({ label: 'Account_Account' });
|
|
299
|
+
* ```
|
|
300
|
+
*/
|
|
301
|
+
get accounts(): RecordLinkManager<AccountRecord, typeof AccountRecord['accountsLabels'][number]>;
|
|
302
|
+
/** Valid labels for Address associations */
|
|
303
|
+
static readonly addressesLabels: readonly ["BillingAddress"];
|
|
304
|
+
/**
|
|
305
|
+
* Access linked Address records
|
|
306
|
+
* @remarks Available labels: BillingAddress
|
|
307
|
+
* @throws Error if called on a new (unsaved) record
|
|
308
|
+
*
|
|
309
|
+
* @example
|
|
310
|
+
* ```typescript
|
|
311
|
+
* // Get all linked Address records
|
|
312
|
+
* const items = await record.addresses.list();
|
|
313
|
+
* const first = await record.addresses.first();
|
|
314
|
+
*
|
|
315
|
+
* // Filter by label
|
|
316
|
+
* const specific = await record.addresses.first({ label: 'BillingAddress' });
|
|
317
|
+
* ```
|
|
318
|
+
*/
|
|
319
|
+
get addresses(): RecordLinkManager<AddressRecord, typeof AccountRecord['addressesLabels'][number]>;
|
|
320
|
+
/** Valid labels for Case associations */
|
|
321
|
+
static readonly casesLabels: readonly ["Account__Case"];
|
|
322
|
+
/**
|
|
323
|
+
* Access linked Case records
|
|
324
|
+
* @remarks Available labels: Account__Case
|
|
325
|
+
* @throws Error if called on a new (unsaved) record
|
|
326
|
+
*
|
|
327
|
+
* @example
|
|
328
|
+
* ```typescript
|
|
329
|
+
* // Get all linked Case records
|
|
330
|
+
* const items = await record.cases.list();
|
|
331
|
+
* const first = await record.cases.first();
|
|
332
|
+
*
|
|
333
|
+
* // Filter by label
|
|
334
|
+
* const specific = await record.cases.first({ label: 'Account__Case' });
|
|
335
|
+
* ```
|
|
336
|
+
*/
|
|
337
|
+
get cases(): RecordLinkManager<CaseRecord, typeof AccountRecord['casesLabels'][number]>;
|
|
338
|
+
/** Valid labels for Payment associations */
|
|
339
|
+
static readonly paymentsLabels: readonly ["Account_Payment"];
|
|
340
|
+
/**
|
|
341
|
+
* Access linked Payment records
|
|
342
|
+
* @remarks Available labels: Account_Payment
|
|
343
|
+
* @throws Error if called on a new (unsaved) record
|
|
344
|
+
*
|
|
345
|
+
* @example
|
|
346
|
+
* ```typescript
|
|
347
|
+
* // Get all linked Payment records
|
|
348
|
+
* const items = await record.payments.list();
|
|
349
|
+
* const first = await record.payments.first();
|
|
350
|
+
*
|
|
351
|
+
* // Filter by label
|
|
352
|
+
* const specific = await record.payments.first({ label: 'Account_Payment' });
|
|
353
|
+
* ```
|
|
354
|
+
*/
|
|
355
|
+
get payments(): RecordLinkManager<PaymentRecord, typeof AccountRecord['paymentsLabels'][number]>;
|
|
356
|
+
/** Valid labels for Contact associations */
|
|
357
|
+
static readonly contactsLabels: readonly ["BillingContact"];
|
|
358
|
+
/**
|
|
359
|
+
* Access linked Contact records
|
|
360
|
+
* @remarks Available labels: BillingContact
|
|
361
|
+
* @throws Error if called on a new (unsaved) record
|
|
362
|
+
*
|
|
363
|
+
* @example
|
|
364
|
+
* ```typescript
|
|
365
|
+
* // Get all linked Contact records
|
|
366
|
+
* const items = await record.contacts.list();
|
|
367
|
+
* const first = await record.contacts.first();
|
|
368
|
+
*
|
|
369
|
+
* // Filter by label
|
|
370
|
+
* const specific = await record.contacts.first({ label: 'BillingContact' });
|
|
371
|
+
* ```
|
|
372
|
+
*/
|
|
373
|
+
get contacts(): RecordLinkManager<ContactRecord, typeof AccountRecord['contactsLabels'][number]>;
|
|
374
|
+
/** Valid labels for File associations */
|
|
375
|
+
static readonly filesLabels: readonly ["Account__File"];
|
|
376
|
+
/**
|
|
377
|
+
* Access linked File records
|
|
378
|
+
* @remarks Available labels: Account__File
|
|
379
|
+
* @throws Error if called on a new (unsaved) record
|
|
380
|
+
*
|
|
381
|
+
* @example
|
|
382
|
+
* ```typescript
|
|
383
|
+
* // Get all linked File records
|
|
384
|
+
* const items = await record.files.list();
|
|
385
|
+
* const first = await record.files.first();
|
|
386
|
+
*
|
|
387
|
+
* // Filter by label
|
|
388
|
+
* const specific = await record.files.first({ label: 'Account__File' });
|
|
389
|
+
* ```
|
|
390
|
+
*/
|
|
391
|
+
get files(): RecordLinkManager<FileRecord, typeof AccountRecord['filesLabels'][number]>;
|
|
88
392
|
/**
|
|
89
393
|
* Queue a link to be created with the next action.
|
|
90
394
|
* Works for both create and update actions.
|