@d19n/youfibre-odin-sdk 2.0.13-beta.1 → 2.0.13
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 +11 -10
- package/dist/actions-v2/CreateOrderFromBrskDto.d.ts +75 -0
- package/dist/actions-v2/CreateOrderItemFromBrskDto.d.ts +191 -0
- package/dist/actions-v2/CreateOrderItemFromBrskDto.js +52 -0
- package/dist/entities-v2/Order.d.ts +7 -0
- package/dist/entities-v2/Order.js +2 -0
- package/dist/entities-v2/OrderItem.d.ts +7 -0
- package/dist/entities-v2/OrderItem.js +2 -0
- package/dist/entities-v2/Product.d.ts +0 -42
- package/dist/entities-v2/Product.js +0 -2
- package/dist/records-v2/AccountCreditRecord.d.ts +62 -1
- package/dist/records-v2/AccountCreditRecord.js +91 -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/BrskEntityMigrationErrorRecord.d.ts +21 -1
- package/dist/records-v2/BrskEntityMigrationErrorRecord.js +21 -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 +418 -2
- package/dist/records-v2/CaseRecord.js +667 -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 +560 -0
- package/dist/records-v2/ContactRecord.js +927 -0
- package/dist/records-v2/ContractBuyOutRecord.d.ts +162 -1
- package/dist/records-v2/ContractBuyOutRecord.js +256 -0
- package/dist/records-v2/ConversationFeedbackRecord.d.ts +102 -1
- package/dist/records-v2/ConversationFeedbackRecord.js +157 -0
- package/dist/records-v2/ConversationRecord.d.ts +102 -1
- package/dist/records-v2/ConversationRecord.js +157 -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/CustomerDeviceConfigurationRecord.d.ts +62 -1
- package/dist/records-v2/CustomerDeviceConfigurationRecord.js +91 -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 +230 -2
- package/dist/records-v2/EmailRecord.js +336 -0
- package/dist/records-v2/EmailSenderRecord.d.ts +42 -1
- package/dist/records-v2/EmailSenderRecord.js +58 -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 +1211 -2
- package/dist/records-v2/FileRecord.js +1902 -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 +399 -2
- package/dist/records-v2/InvoiceRecord.js +635 -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 +99 -2
- package/dist/records-v2/MessageRecord.js +140 -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 +1121 -1
- package/dist/records-v2/NoteRecord.js +1839 -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 +309 -0
- package/dist/records-v2/OrderItemRecord.js +501 -0
- package/dist/records-v2/OrderKciRecord.d.ts +42 -1
- package/dist/records-v2/OrderKciRecord.js +58 -0
- package/dist/records-v2/OrderRecord.d.ts +620 -0
- package/dist/records-v2/OrderRecord.js +1026 -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/PhoneNumberRecord.d.ts +41 -0
- package/dist/records-v2/PhoneNumberRecord.js +70 -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 +258 -2
- package/dist/records-v2/ProductRecord.js +351 -0
- package/dist/records-v2/PushNotificationRecord.d.ts +162 -1
- package/dist/records-v2/PushNotificationRecord.js +256 -0
- package/dist/records-v2/ReferralRecord.d.ts +143 -2
- package/dist/records-v2/ReferralRecord.js +223 -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 +123 -2
- package/dist/records-v2/RewardRecord.js +190 -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/SmsMessageRecord.d.ts +175 -2
- package/dist/records-v2/SmsMessageRecord.js +255 -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 +101 -0
- package/dist/records-v2/TeamRecord.js +169 -0
- package/dist/records-v2/TestEntityForVisualBuilderRecord.d.ts +115 -2
- package/dist/records-v2/TestEntityForVisualBuilderRecord.js +156 -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 +400 -0
- package/dist/records-v2/UserRecord.js +663 -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 +1226 -2
- package/dist/records-v2/WorkOrderRecord.js +1865 -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 +103 -2
- package/dist/records-v2/YfStockAuditRecord.js +157 -0
- package/dist/records-v2/index.d.ts +1 -1
- package/dist/records-v2/index.js +5 -5
- package/package.json +1 -1
|
@@ -13,19 +13,32 @@
|
|
|
13
13
|
* await record.createFieldServiceDispatchedProduct({ ... }).execute();
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
|
+
* Entity Types: CPE_ROUTER, DEFAULT, MESH
|
|
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 { IOdinProvider } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
|
|
21
|
-
import {
|
|
23
|
+
import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-manager';
|
|
24
|
+
import { FieldServiceDispatchedProductProperties, CpeRouterFieldServiceDispatchedProductProperties, MeshFieldServiceDispatchedProductProperties } from '../entities-v2/FieldServiceDispatchedProduct';
|
|
22
25
|
import { CreateFieldServiceDispatchedProductProperties } from '../actions-v2/CreateFieldServiceDispatchedProductDto';
|
|
23
26
|
import { CreateFieldServiceDispatchedProductBuilder } from '../actions-v2/CreateFieldServiceDispatchedProductDto';
|
|
27
|
+
import { WorkOrderRecord } from './WorkOrderRecord';
|
|
28
|
+
import { CustomerDeviceRouterRecord } from './CustomerDeviceRouterRecord';
|
|
29
|
+
import { OrderRecord } from './OrderRecord';
|
|
30
|
+
import { FieldServiceProductRecord } from './FieldServiceProductRecord';
|
|
31
|
+
/** Valid entity types for FieldServiceDispatchedProduct */
|
|
32
|
+
export declare type FieldServiceDispatchedProductType = 'CPE_ROUTER' | 'DEFAULT' | 'MESH';
|
|
24
33
|
export declare class FieldServiceDispatchedProductRecord<TProps = FieldServiceDispatchedProductProperties> {
|
|
25
34
|
private _record;
|
|
26
35
|
private _provider;
|
|
27
36
|
private _pendingLinks;
|
|
28
37
|
private _preGeneratedId;
|
|
38
|
+
private _workOrders?;
|
|
39
|
+
private _customerDeviceRouters?;
|
|
40
|
+
private _orders?;
|
|
41
|
+
private _fieldServiceProducts?;
|
|
29
42
|
/**
|
|
30
43
|
* Create a record wrapper.
|
|
31
44
|
* @param record - The underlying record, or null for create operations
|
|
@@ -38,7 +51,7 @@ export declare class FieldServiceDispatchedProductRecord<TProps = FieldServiceDi
|
|
|
38
51
|
/** Record ID - always available (pre-generated for new records) */
|
|
39
52
|
get id(): string;
|
|
40
53
|
get entity(): string;
|
|
41
|
-
get type():
|
|
54
|
+
get type(): FieldServiceDispatchedProductType | undefined;
|
|
42
55
|
/** Record properties - empty object for new (unsaved) records */
|
|
43
56
|
get properties(): TProps;
|
|
44
57
|
get title(): string | undefined;
|
|
@@ -51,6 +64,126 @@ export declare class FieldServiceDispatchedProductRecord<TProps = FieldServiceDi
|
|
|
51
64
|
get groups(): string[];
|
|
52
65
|
/** Access the underlying OdinRecord (null for new records) */
|
|
53
66
|
get record(): OdinRecord<TProps> | null;
|
|
67
|
+
/**
|
|
68
|
+
* Type guard: check if this record is of type CPE_ROUTER
|
|
69
|
+
*
|
|
70
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
71
|
+
* giving you access to CPE_ROUTER-specific properties.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```typescript
|
|
75
|
+
* if (record.isCpeRouter()) {
|
|
76
|
+
* // TypeScript knows record.properties is CpeRouterFieldServiceDispatchedProductProperties
|
|
77
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
78
|
+
* }
|
|
79
|
+
* ```
|
|
80
|
+
* @remarks CPE Router
|
|
81
|
+
*/
|
|
82
|
+
isCpeRouter(): this is FieldServiceDispatchedProductRecord<CpeRouterFieldServiceDispatchedProductProperties>;
|
|
83
|
+
/**
|
|
84
|
+
* Type guard: check if this record is of type DEFAULT
|
|
85
|
+
*
|
|
86
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
87
|
+
* giving you access to DEFAULT-specific properties.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```typescript
|
|
91
|
+
* if (record.isDefault()) {
|
|
92
|
+
* // TypeScript knows record.properties is FieldServiceDispatchedProductProperties
|
|
93
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
94
|
+
* }
|
|
95
|
+
* ```
|
|
96
|
+
* @remarks This is the default record type
|
|
97
|
+
*/
|
|
98
|
+
isDefault(): this is FieldServiceDispatchedProductRecord<FieldServiceDispatchedProductProperties>;
|
|
99
|
+
/**
|
|
100
|
+
* Type guard: check if this record is of type MESH
|
|
101
|
+
*
|
|
102
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
103
|
+
* giving you access to MESH-specific properties.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```typescript
|
|
107
|
+
* if (record.isMesh()) {
|
|
108
|
+
* // TypeScript knows record.properties is MeshFieldServiceDispatchedProductProperties
|
|
109
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
110
|
+
* }
|
|
111
|
+
* ```
|
|
112
|
+
* @remarks Mesh Device
|
|
113
|
+
*/
|
|
114
|
+
isMesh(): this is FieldServiceDispatchedProductRecord<MeshFieldServiceDispatchedProductProperties>;
|
|
115
|
+
/** Valid labels for WorkOrder associations */
|
|
116
|
+
static readonly workOrdersLabels: readonly ["WorkOrder__FieldServiceDispatchedProduct"];
|
|
117
|
+
/**
|
|
118
|
+
* Access linked WorkOrder records
|
|
119
|
+
* @remarks Available labels: WorkOrder__FieldServiceDispatchedProduct
|
|
120
|
+
* @throws Error if called on a new (unsaved) record
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```typescript
|
|
124
|
+
* // Get all linked WorkOrder records
|
|
125
|
+
* const items = await record.workOrders.list();
|
|
126
|
+
* const first = await record.workOrders.first();
|
|
127
|
+
*
|
|
128
|
+
* // Filter by label
|
|
129
|
+
* const specific = await record.workOrders.first({ label: 'WorkOrder__FieldServiceDispatchedProduct' });
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
get workOrders(): RecordLinkManager<WorkOrderRecord, typeof FieldServiceDispatchedProductRecord['workOrdersLabels'][number]>;
|
|
133
|
+
/** Valid labels for CustomerDeviceRouter associations */
|
|
134
|
+
static readonly customerDeviceRoutersLabels: readonly ["CustomerDeviceRouter__FieldServiceDispatchedProduct"];
|
|
135
|
+
/**
|
|
136
|
+
* Access linked CustomerDeviceRouter records
|
|
137
|
+
* @remarks Available labels: CustomerDeviceRouter__FieldServiceDispatchedProduct
|
|
138
|
+
* @throws Error if called on a new (unsaved) record
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```typescript
|
|
142
|
+
* // Get all linked CustomerDeviceRouter records
|
|
143
|
+
* const items = await record.customerDeviceRouters.list();
|
|
144
|
+
* const first = await record.customerDeviceRouters.first();
|
|
145
|
+
*
|
|
146
|
+
* // Filter by label
|
|
147
|
+
* const specific = await record.customerDeviceRouters.first({ label: 'CustomerDeviceRouter__FieldServiceDispatchedProduct' });
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
150
|
+
get customerDeviceRouters(): RecordLinkManager<CustomerDeviceRouterRecord, typeof FieldServiceDispatchedProductRecord['customerDeviceRoutersLabels'][number]>;
|
|
151
|
+
/** Valid labels for Order associations */
|
|
152
|
+
static readonly ordersLabels: readonly ["FieldServiceDispatchedProduct__Order"];
|
|
153
|
+
/**
|
|
154
|
+
* Access linked Order records
|
|
155
|
+
* @remarks Available labels: FieldServiceDispatchedProduct__Order
|
|
156
|
+
* @throws Error if called on a new (unsaved) record
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```typescript
|
|
160
|
+
* // Get all linked Order records
|
|
161
|
+
* const items = await record.orders.list();
|
|
162
|
+
* const first = await record.orders.first();
|
|
163
|
+
*
|
|
164
|
+
* // Filter by label
|
|
165
|
+
* const specific = await record.orders.first({ label: 'FieldServiceDispatchedProduct__Order' });
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
168
|
+
get orders(): RecordLinkManager<OrderRecord, typeof FieldServiceDispatchedProductRecord['ordersLabels'][number]>;
|
|
169
|
+
/** Valid labels for FieldServiceProduct associations */
|
|
170
|
+
static readonly fieldServiceProductsLabels: readonly ["FieldServiceDispatchedProduct__FieldServiceProduct"];
|
|
171
|
+
/**
|
|
172
|
+
* Access linked FieldServiceProduct records
|
|
173
|
+
* @remarks Available labels: FieldServiceDispatchedProduct__FieldServiceProduct
|
|
174
|
+
* @throws Error if called on a new (unsaved) record
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* ```typescript
|
|
178
|
+
* // Get all linked FieldServiceProduct records
|
|
179
|
+
* const items = await record.fieldServiceProducts.list();
|
|
180
|
+
* const first = await record.fieldServiceProducts.first();
|
|
181
|
+
*
|
|
182
|
+
* // Filter by label
|
|
183
|
+
* const specific = await record.fieldServiceProducts.first({ label: 'FieldServiceDispatchedProduct__FieldServiceProduct' });
|
|
184
|
+
* ```
|
|
185
|
+
*/
|
|
186
|
+
get fieldServiceProducts(): RecordLinkManager<FieldServiceProductRecord, typeof FieldServiceDispatchedProductRecord['fieldServiceProductsLabels'][number]>;
|
|
54
187
|
/**
|
|
55
188
|
* Queue a link to be created with the next action.
|
|
56
189
|
* Works for both create and update actions.
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
* await record.createFieldServiceDispatchedProduct({ ... }).execute();
|
|
15
15
|
* ```
|
|
16
16
|
*
|
|
17
|
+
* Entity Types: CPE_ROUTER, DEFAULT, MESH
|
|
18
|
+
*
|
|
17
19
|
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
18
20
|
*/
|
|
19
21
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
@@ -29,7 +31,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
31
|
exports.isFieldServiceDispatchedProductRecord = exports.FieldServiceDispatchedProductRecord = void 0;
|
|
30
32
|
const uuid_1 = require("uuid");
|
|
31
33
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
34
|
+
const record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/record-link-manager");
|
|
32
35
|
const CreateFieldServiceDispatchedProductDto_1 = require("../actions-v2/CreateFieldServiceDispatchedProductDto");
|
|
36
|
+
const WorkOrderRecord_1 = require("./WorkOrderRecord");
|
|
37
|
+
const CustomerDeviceRouterRecord_1 = require("./CustomerDeviceRouterRecord");
|
|
38
|
+
const OrderRecord_1 = require("./OrderRecord");
|
|
39
|
+
const FieldServiceProductRecord_1 = require("./FieldServiceProductRecord");
|
|
33
40
|
/**
|
|
34
41
|
* Builder for action execution with dryRun support
|
|
35
42
|
*
|
|
@@ -141,6 +148,177 @@ class FieldServiceDispatchedProductRecord {
|
|
|
141
148
|
/** Access the underlying OdinRecord (null for new records) */
|
|
142
149
|
get record() { return this._record; }
|
|
143
150
|
// ============================================
|
|
151
|
+
// TYPE GUARDS (with TypeScript type predicates)
|
|
152
|
+
// ============================================
|
|
153
|
+
/**
|
|
154
|
+
* Type guard: check if this record is of type CPE_ROUTER
|
|
155
|
+
*
|
|
156
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
157
|
+
* giving you access to CPE_ROUTER-specific properties.
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* ```typescript
|
|
161
|
+
* if (record.isCpeRouter()) {
|
|
162
|
+
* // TypeScript knows record.properties is CpeRouterFieldServiceDispatchedProductProperties
|
|
163
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
164
|
+
* }
|
|
165
|
+
* ```
|
|
166
|
+
* @remarks CPE Router
|
|
167
|
+
*/
|
|
168
|
+
isCpeRouter() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'CPE_ROUTER'; }
|
|
169
|
+
/**
|
|
170
|
+
* Type guard: check if this record is of type DEFAULT
|
|
171
|
+
*
|
|
172
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
173
|
+
* giving you access to DEFAULT-specific properties.
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* ```typescript
|
|
177
|
+
* if (record.isDefault()) {
|
|
178
|
+
* // TypeScript knows record.properties is FieldServiceDispatchedProductProperties
|
|
179
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
180
|
+
* }
|
|
181
|
+
* ```
|
|
182
|
+
* @remarks This is the default record type
|
|
183
|
+
*/
|
|
184
|
+
isDefault() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'DEFAULT'; }
|
|
185
|
+
/**
|
|
186
|
+
* Type guard: check if this record is of type MESH
|
|
187
|
+
*
|
|
188
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
189
|
+
* giving you access to MESH-specific properties.
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```typescript
|
|
193
|
+
* if (record.isMesh()) {
|
|
194
|
+
* // TypeScript knows record.properties is MeshFieldServiceDispatchedProductProperties
|
|
195
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
196
|
+
* }
|
|
197
|
+
* ```
|
|
198
|
+
* @remarks Mesh Device
|
|
199
|
+
*/
|
|
200
|
+
isMesh() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'MESH'; }
|
|
201
|
+
/**
|
|
202
|
+
* Access linked WorkOrder records
|
|
203
|
+
* @remarks Available labels: WorkOrder__FieldServiceDispatchedProduct
|
|
204
|
+
* @throws Error if called on a new (unsaved) record
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* ```typescript
|
|
208
|
+
* // Get all linked WorkOrder records
|
|
209
|
+
* const items = await record.workOrders.list();
|
|
210
|
+
* const first = await record.workOrders.first();
|
|
211
|
+
*
|
|
212
|
+
* // Filter by label
|
|
213
|
+
* const specific = await record.workOrders.first({ label: 'WorkOrder__FieldServiceDispatchedProduct' });
|
|
214
|
+
* ```
|
|
215
|
+
*/
|
|
216
|
+
get workOrders() {
|
|
217
|
+
var _a;
|
|
218
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
219
|
+
throw new Error('Cannot access links on a new (unsaved) record');
|
|
220
|
+
if (!this._workOrders) {
|
|
221
|
+
this._workOrders = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
222
|
+
sourceEntity: 'FieldServiceModule:FieldServiceDispatchedProduct',
|
|
223
|
+
targetEntity: 'FieldServiceModule:WorkOrder',
|
|
224
|
+
targetModuleName: 'FieldServiceModule',
|
|
225
|
+
targetEntityName: 'WorkOrder',
|
|
226
|
+
labels: ['WorkOrder__FieldServiceDispatchedProduct'],
|
|
227
|
+
}, WorkOrderRecord_1.WorkOrderRecord);
|
|
228
|
+
}
|
|
229
|
+
return this._workOrders;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Access linked CustomerDeviceRouter records
|
|
233
|
+
* @remarks Available labels: CustomerDeviceRouter__FieldServiceDispatchedProduct
|
|
234
|
+
* @throws Error if called on a new (unsaved) record
|
|
235
|
+
*
|
|
236
|
+
* @example
|
|
237
|
+
* ```typescript
|
|
238
|
+
* // Get all linked CustomerDeviceRouter records
|
|
239
|
+
* const items = await record.customerDeviceRouters.list();
|
|
240
|
+
* const first = await record.customerDeviceRouters.first();
|
|
241
|
+
*
|
|
242
|
+
* // Filter by label
|
|
243
|
+
* const specific = await record.customerDeviceRouters.first({ label: 'CustomerDeviceRouter__FieldServiceDispatchedProduct' });
|
|
244
|
+
* ```
|
|
245
|
+
*/
|
|
246
|
+
get customerDeviceRouters() {
|
|
247
|
+
var _a;
|
|
248
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
249
|
+
throw new Error('Cannot access links on a new (unsaved) record');
|
|
250
|
+
if (!this._customerDeviceRouters) {
|
|
251
|
+
this._customerDeviceRouters = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
252
|
+
sourceEntity: 'FieldServiceModule:FieldServiceDispatchedProduct',
|
|
253
|
+
targetEntity: 'ServiceModule:CustomerDeviceRouter',
|
|
254
|
+
targetModuleName: 'ServiceModule',
|
|
255
|
+
targetEntityName: 'CustomerDeviceRouter',
|
|
256
|
+
labels: ['CustomerDeviceRouter__FieldServiceDispatchedProduct'],
|
|
257
|
+
}, CustomerDeviceRouterRecord_1.CustomerDeviceRouterRecord);
|
|
258
|
+
}
|
|
259
|
+
return this._customerDeviceRouters;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Access linked Order records
|
|
263
|
+
* @remarks Available labels: FieldServiceDispatchedProduct__Order
|
|
264
|
+
* @throws Error if called on a new (unsaved) record
|
|
265
|
+
*
|
|
266
|
+
* @example
|
|
267
|
+
* ```typescript
|
|
268
|
+
* // Get all linked Order records
|
|
269
|
+
* const items = await record.orders.list();
|
|
270
|
+
* const first = await record.orders.first();
|
|
271
|
+
*
|
|
272
|
+
* // Filter by label
|
|
273
|
+
* const specific = await record.orders.first({ label: 'FieldServiceDispatchedProduct__Order' });
|
|
274
|
+
* ```
|
|
275
|
+
*/
|
|
276
|
+
get orders() {
|
|
277
|
+
var _a;
|
|
278
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
279
|
+
throw new Error('Cannot access links on a new (unsaved) record');
|
|
280
|
+
if (!this._orders) {
|
|
281
|
+
this._orders = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
282
|
+
sourceEntity: 'FieldServiceModule:FieldServiceDispatchedProduct',
|
|
283
|
+
targetEntity: 'OrderModule:Order',
|
|
284
|
+
targetModuleName: 'OrderModule',
|
|
285
|
+
targetEntityName: 'Order',
|
|
286
|
+
labels: ['FieldServiceDispatchedProduct__Order'],
|
|
287
|
+
}, OrderRecord_1.OrderRecord);
|
|
288
|
+
}
|
|
289
|
+
return this._orders;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Access linked FieldServiceProduct records
|
|
293
|
+
* @remarks Available labels: FieldServiceDispatchedProduct__FieldServiceProduct
|
|
294
|
+
* @throws Error if called on a new (unsaved) record
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
* ```typescript
|
|
298
|
+
* // Get all linked FieldServiceProduct records
|
|
299
|
+
* const items = await record.fieldServiceProducts.list();
|
|
300
|
+
* const first = await record.fieldServiceProducts.first();
|
|
301
|
+
*
|
|
302
|
+
* // Filter by label
|
|
303
|
+
* const specific = await record.fieldServiceProducts.first({ label: 'FieldServiceDispatchedProduct__FieldServiceProduct' });
|
|
304
|
+
* ```
|
|
305
|
+
*/
|
|
306
|
+
get fieldServiceProducts() {
|
|
307
|
+
var _a;
|
|
308
|
+
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
309
|
+
throw new Error('Cannot access links on a new (unsaved) record');
|
|
310
|
+
if (!this._fieldServiceProducts) {
|
|
311
|
+
this._fieldServiceProducts = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
312
|
+
sourceEntity: 'FieldServiceModule:FieldServiceDispatchedProduct',
|
|
313
|
+
targetEntity: 'FieldServiceModule:FieldServiceProduct',
|
|
314
|
+
targetModuleName: 'FieldServiceModule',
|
|
315
|
+
targetEntityName: 'FieldServiceProduct',
|
|
316
|
+
labels: ['FieldServiceDispatchedProduct__FieldServiceProduct'],
|
|
317
|
+
}, FieldServiceProductRecord_1.FieldServiceProductRecord);
|
|
318
|
+
}
|
|
319
|
+
return this._fieldServiceProducts;
|
|
320
|
+
}
|
|
321
|
+
// ============================================
|
|
144
322
|
// LINK MANAGEMENT
|
|
145
323
|
// ============================================
|
|
146
324
|
/**
|
|
@@ -206,6 +384,17 @@ class FieldServiceDispatchedProductRecord {
|
|
|
206
384
|
}
|
|
207
385
|
}
|
|
208
386
|
exports.FieldServiceDispatchedProductRecord = FieldServiceDispatchedProductRecord;
|
|
387
|
+
// ============================================
|
|
388
|
+
// TYPED LINK ACCESSORS
|
|
389
|
+
// ============================================
|
|
390
|
+
/** Valid labels for WorkOrder associations */
|
|
391
|
+
FieldServiceDispatchedProductRecord.workOrdersLabels = ['WorkOrder__FieldServiceDispatchedProduct'];
|
|
392
|
+
/** Valid labels for CustomerDeviceRouter associations */
|
|
393
|
+
FieldServiceDispatchedProductRecord.customerDeviceRoutersLabels = ['CustomerDeviceRouter__FieldServiceDispatchedProduct'];
|
|
394
|
+
/** Valid labels for Order associations */
|
|
395
|
+
FieldServiceDispatchedProductRecord.ordersLabels = ['FieldServiceDispatchedProduct__Order'];
|
|
396
|
+
/** Valid labels for FieldServiceProduct associations */
|
|
397
|
+
FieldServiceDispatchedProductRecord.fieldServiceProductsLabels = ['FieldServiceDispatchedProduct__FieldServiceProduct'];
|
|
209
398
|
/** Type guard to check if an object is a FieldServiceDispatchedProductRecord */
|
|
210
399
|
function isFieldServiceDispatchedProductRecord(obj) {
|
|
211
400
|
return obj instanceof FieldServiceDispatchedProductRecord;
|
|
@@ -13,17 +13,25 @@
|
|
|
13
13
|
* await record.createFieldServiceProduct({ ... }).execute();
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
|
+
* Entity Types: CPE_ROUTER, MESH, MISC
|
|
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 { FieldServiceProductProperties, CpeRouterFieldServiceProductProperties, MeshFieldServiceProductProperties, MiscFieldServiceProductProperties } from '../entities-v2/FieldServiceProduct';
|
|
23
26
|
import { CreateFieldServiceMeshProductProperties } from '../actions-v2/CreateFieldServiceMeshProductDto';
|
|
24
27
|
import { CreateFieldServiceProductProperties } from '../actions-v2/CreateFieldServiceProductDto';
|
|
25
28
|
import { CreateFieldServiceRouterProductProperties } from '../actions-v2/CreateFieldServiceRouterProductDto';
|
|
26
29
|
import { EditFieldServiceProductProperties } from '../actions-v2/EditFieldServiceProductDto';
|
|
30
|
+
import { WorkOrderRecord } from './WorkOrderRecord';
|
|
31
|
+
import { FieldServiceDispatchedProductRecord } from './FieldServiceDispatchedProductRecord';
|
|
32
|
+
import { ProductRecord } from './ProductRecord';
|
|
33
|
+
/** Valid entity types for FieldServiceProduct */
|
|
34
|
+
export declare type FieldServiceProductType = 'CPE_ROUTER' | 'MESH' | 'MISC';
|
|
27
35
|
/**
|
|
28
36
|
* Builder for action execution with dryRun support
|
|
29
37
|
*
|
|
@@ -87,6 +95,9 @@ export declare class FieldServiceProductRecord<TProps = FieldServiceProductPrope
|
|
|
87
95
|
private _provider;
|
|
88
96
|
private _pendingLinks;
|
|
89
97
|
private _preGeneratedId;
|
|
98
|
+
private _workOrders?;
|
|
99
|
+
private _fieldServiceDispatchedProducts?;
|
|
100
|
+
private _products?;
|
|
90
101
|
/**
|
|
91
102
|
* Create a record wrapper.
|
|
92
103
|
* @param record - The underlying record, or null for create operations
|
|
@@ -99,7 +110,7 @@ export declare class FieldServiceProductRecord<TProps = FieldServiceProductPrope
|
|
|
99
110
|
/** Record ID - always available (pre-generated for new records) */
|
|
100
111
|
get id(): string;
|
|
101
112
|
get entity(): string;
|
|
102
|
-
get type():
|
|
113
|
+
get type(): FieldServiceProductType | undefined;
|
|
103
114
|
/** Record properties - empty object for new (unsaved) records */
|
|
104
115
|
get properties(): TProps;
|
|
105
116
|
get title(): string | undefined;
|
|
@@ -112,6 +123,108 @@ export declare class FieldServiceProductRecord<TProps = FieldServiceProductPrope
|
|
|
112
123
|
get groups(): string[];
|
|
113
124
|
/** Access the underlying OdinRecord (null for new records) */
|
|
114
125
|
get record(): OdinRecord<TProps> | null;
|
|
126
|
+
/**
|
|
127
|
+
* Type guard: check if this record is of type CPE_ROUTER
|
|
128
|
+
*
|
|
129
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
130
|
+
* giving you access to CPE_ROUTER-specific properties.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```typescript
|
|
134
|
+
* if (record.isCpeRouter()) {
|
|
135
|
+
* // TypeScript knows record.properties is CpeRouterFieldServiceProductProperties
|
|
136
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
137
|
+
* }
|
|
138
|
+
* ```
|
|
139
|
+
* @remarks CPE Router
|
|
140
|
+
*/
|
|
141
|
+
isCpeRouter(): this is FieldServiceProductRecord<CpeRouterFieldServiceProductProperties>;
|
|
142
|
+
/**
|
|
143
|
+
* Type guard: check if this record is of type MESH
|
|
144
|
+
*
|
|
145
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
146
|
+
* giving you access to MESH-specific properties.
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```typescript
|
|
150
|
+
* if (record.isMesh()) {
|
|
151
|
+
* // TypeScript knows record.properties is MeshFieldServiceProductProperties
|
|
152
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
153
|
+
* }
|
|
154
|
+
* ```
|
|
155
|
+
* @remarks Mesh
|
|
156
|
+
*/
|
|
157
|
+
isMesh(): this is FieldServiceProductRecord<MeshFieldServiceProductProperties>;
|
|
158
|
+
/**
|
|
159
|
+
* Type guard: check if this record is of type MISC
|
|
160
|
+
*
|
|
161
|
+
* When this returns true, TypeScript automatically narrows the type,
|
|
162
|
+
* giving you access to MISC-specific properties.
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* ```typescript
|
|
166
|
+
* if (record.isMisc()) {
|
|
167
|
+
* // TypeScript knows record.properties is MiscFieldServiceProductProperties
|
|
168
|
+
* console.log(record.properties.SomeTypeSpecificField);
|
|
169
|
+
* }
|
|
170
|
+
* ```
|
|
171
|
+
* @remarks MISC
|
|
172
|
+
*/
|
|
173
|
+
isMisc(): this is FieldServiceProductRecord<MiscFieldServiceProductProperties>;
|
|
174
|
+
/** Valid labels for WorkOrder associations */
|
|
175
|
+
static readonly workOrdersLabels: readonly ["WorkOrder__FieldServiceProduct_Router", "WorkOrder_FieldServiceProduct_Misc_Item_2", "WorkOrder_FieldServiceProduct_Misc_Item_1", "WorkOrder__FieldServiceProduct_Mesh"];
|
|
176
|
+
/**
|
|
177
|
+
* Access linked WorkOrder records
|
|
178
|
+
* @remarks Available labels: WorkOrder__FieldServiceProduct_Router, WorkOrder_FieldServiceProduct_Misc_Item_2, WorkOrder_FieldServiceProduct_Misc_Item_1, WorkOrder__FieldServiceProduct_Mesh
|
|
179
|
+
* @throws Error if called on a new (unsaved) record
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* ```typescript
|
|
183
|
+
* // Get all linked WorkOrder records
|
|
184
|
+
* const items = await record.workOrders.list();
|
|
185
|
+
* const first = await record.workOrders.first();
|
|
186
|
+
*
|
|
187
|
+
* // Filter by label
|
|
188
|
+
* const specific = await record.workOrders.first({ label: 'WorkOrder__FieldServiceProduct_Router' });
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
191
|
+
get workOrders(): RecordLinkManager<WorkOrderRecord, typeof FieldServiceProductRecord['workOrdersLabels'][number]>;
|
|
192
|
+
/** Valid labels for FieldServiceDispatchedProduct associations */
|
|
193
|
+
static readonly fieldServiceDispatchedProductsLabels: readonly ["FieldServiceDispatchedProduct__FieldServiceProduct"];
|
|
194
|
+
/**
|
|
195
|
+
* Access linked FieldServiceDispatchedProduct records
|
|
196
|
+
* @remarks Available labels: FieldServiceDispatchedProduct__FieldServiceProduct
|
|
197
|
+
* @throws Error if called on a new (unsaved) record
|
|
198
|
+
*
|
|
199
|
+
* @example
|
|
200
|
+
* ```typescript
|
|
201
|
+
* // Get all linked FieldServiceDispatchedProduct records
|
|
202
|
+
* const items = await record.fieldServiceDispatchedProducts.list();
|
|
203
|
+
* const first = await record.fieldServiceDispatchedProducts.first();
|
|
204
|
+
*
|
|
205
|
+
* // Filter by label
|
|
206
|
+
* const specific = await record.fieldServiceDispatchedProducts.first({ label: 'FieldServiceDispatchedProduct__FieldServiceProduct' });
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
209
|
+
get fieldServiceDispatchedProducts(): RecordLinkManager<FieldServiceDispatchedProductRecord, typeof FieldServiceProductRecord['fieldServiceDispatchedProductsLabels'][number]>;
|
|
210
|
+
/** Valid labels for Product associations */
|
|
211
|
+
static readonly productsLabels: readonly ["FieldServiceProduct__CompatibleProducts"];
|
|
212
|
+
/**
|
|
213
|
+
* Access linked Product records
|
|
214
|
+
* @remarks Available labels: FieldServiceProduct__CompatibleProducts
|
|
215
|
+
* @throws Error if called on a new (unsaved) record
|
|
216
|
+
*
|
|
217
|
+
* @example
|
|
218
|
+
* ```typescript
|
|
219
|
+
* // Get all linked Product records
|
|
220
|
+
* const items = await record.products.list();
|
|
221
|
+
* const first = await record.products.first();
|
|
222
|
+
*
|
|
223
|
+
* // Filter by label
|
|
224
|
+
* const specific = await record.products.first({ label: 'FieldServiceProduct__CompatibleProducts' });
|
|
225
|
+
* ```
|
|
226
|
+
*/
|
|
227
|
+
get products(): RecordLinkManager<ProductRecord, typeof FieldServiceProductRecord['productsLabels'][number]>;
|
|
115
228
|
/**
|
|
116
229
|
* Queue a link to be created with the next action.
|
|
117
230
|
* Works for both create and update actions.
|