@d19n/youfibre-odin-sdk 2.0.30 → 2.0.31
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 +13 -2
- package/dist/EntityRegistry.d.ts +2 -0
- package/dist/EntityRegistry.js +2 -0
- package/dist/OdinApiClient.d.ts +4 -0
- package/dist/OdinApiClient.js +8 -0
- package/dist/OdinDbClient.d.ts +4 -0
- package/dist/OdinDbClient.js +8 -0
- package/dist/accessors-v2/ContactIdentityAccessor.d.ts +111 -0
- package/dist/accessors-v2/ContactIdentityAccessor.js +190 -0
- package/dist/accessors-v2/index.d.ts +1 -0
- package/dist/accessors-v2/index.js +5 -3
- package/dist/actions-v2/BillingAdjustmentCreateDto.d.ts +8 -1
- package/dist/actions-v2/CompleteChurnRequestDto.d.ts +15 -5
- package/dist/actions-v2/CompleteChurnRequestFlowDto.d.ts +15 -5
- package/dist/actions-v2/CreateAuddisPgReportAllocationDto.d.ts +88 -0
- package/dist/actions-v2/CreateAuddisPgReportAllocationDto.js +59 -0
- package/dist/actions-v2/CreateBacsPgReportAllocationDto.d.ts +88 -0
- package/dist/actions-v2/CreateBacsPgReportAllocationDto.js +59 -0
- package/dist/actions-v2/CreateBrskMigrationErrorDto.d.ts +10 -3
- package/dist/actions-v2/CreateBrskMigrationErrorDto.js +11 -4
- package/dist/actions-v2/CreateCaseDto.d.ts +3 -4
- package/dist/actions-v2/CreateCaseFromCasesDto.d.ts +4 -6
- package/dist/actions-v2/CreateCaseFromContactDto.d.ts +3 -4
- package/dist/actions-v2/CreatePgContactDto.d.ts +9 -1
- package/dist/actions-v2/CreatePgPaymentMethodDto.d.ts +9 -1
- package/dist/actions-v2/CreatePgTransactionChargeDto.d.ts +9 -1
- package/dist/actions-v2/CreatePgTransactionRefundDto.d.ts +9 -1
- package/dist/actions-v2/EditCaseFormDto.d.ts +8 -1
- package/dist/actions-v2/MovePgWebhookToSentDto.d.ts +70 -0
- package/dist/actions-v2/MovePgWebhookToSentDto.js +62 -0
- package/dist/actions-v2/UpdateBngProvisionDto.d.ts +0 -14
- package/dist/actions-v2/UpdateContactIdentityDto.d.ts +79 -0
- package/dist/actions-v2/UpdateContactIdentityDto.js +56 -0
- package/dist/actions-v2/UpdateCustomerDeviceOntDto.d.ts +22 -1
- package/dist/actions-v2/UpdateOneTouchSwitchOrderForActivationDto.d.ts +77 -0
- package/dist/actions-v2/UpdateOneTouchSwitchOrderForActivationDto.js +61 -0
- package/dist/actions-v2/UpdatePaymentMethodDto.d.ts +17 -14
- package/dist/actions-v2/UpdatePaymentMethodDto.js +4 -6
- package/dist/actions-v2/UpdatePgContactDto.d.ts +8 -1
- package/dist/actions-v2/UpdatePgPaymentMethodDto.d.ts +8 -1
- package/dist/actions-v2/UpdatePgTransactionChargeDto.d.ts +8 -1
- package/dist/actions-v2/UpdatePgTransactionRefundDto.d.ts +8 -1
- package/dist/api-sdk-v2/ContactApi.d.ts +2 -0
- package/dist/api-sdk-v2/ContactApi.js +6 -0
- package/dist/api-sdk-v2/PaymentMethodApi.d.ts +2 -0
- package/dist/api-sdk-v2/PaymentMethodApi.js +6 -0
- package/dist/api-sdk-v2/PaymentMethodRefundApi.d.ts +2 -0
- package/dist/api-sdk-v2/PaymentMethodRefundApi.js +6 -0
- package/dist/api-sdk-v2/PgContactApi.d.ts +2 -0
- package/dist/api-sdk-v2/PgContactApi.js +6 -0
- package/dist/api-sdk-v2/PgPaymentMethodApi.d.ts +2 -0
- package/dist/api-sdk-v2/PgPaymentMethodApi.js +6 -0
- package/dist/api-sdk-v2/PgTransactionApi.d.ts +4 -0
- package/dist/api-sdk-v2/PgTransactionApi.js +12 -0
- package/dist/api-sdk-v2/TransactionApi.d.ts +2 -0
- package/dist/api-sdk-v2/TransactionApi.js +6 -0
- package/dist/db-accessors-v2/ContactIdentityDbAccessor.d.ts +149 -0
- package/dist/db-accessors-v2/ContactIdentityDbAccessor.js +227 -0
- package/dist/db-accessors-v2/index.d.ts +1 -0
- package/dist/db-accessors-v2/index.js +5 -3
- package/dist/db-sdk-v2/ContactDb.d.ts +2 -0
- package/dist/db-sdk-v2/ContactDb.js +6 -0
- package/dist/db-sdk-v2/PaymentMethodDb.d.ts +2 -0
- package/dist/db-sdk-v2/PaymentMethodDb.js +6 -0
- package/dist/db-sdk-v2/PaymentMethodRefundDb.d.ts +2 -0
- package/dist/db-sdk-v2/PaymentMethodRefundDb.js +6 -0
- package/dist/db-sdk-v2/PgContactDb.d.ts +2 -0
- package/dist/db-sdk-v2/PgContactDb.js +6 -0
- package/dist/db-sdk-v2/PgPaymentMethodDb.d.ts +2 -0
- package/dist/db-sdk-v2/PgPaymentMethodDb.js +6 -0
- package/dist/db-sdk-v2/PgTransactionDb.d.ts +4 -0
- package/dist/db-sdk-v2/PgTransactionDb.js +12 -0
- package/dist/db-sdk-v2/TransactionDb.d.ts +2 -0
- package/dist/db-sdk-v2/TransactionDb.js +6 -0
- package/dist/entities-v2/BillingAdjustment.d.ts +77 -70
- package/dist/entities-v2/BillingAdjustment.js +35 -33
- package/dist/entities-v2/BngProvision.d.ts +0 -14
- package/dist/entities-v2/BngProvision.js +0 -4
- package/dist/entities-v2/BrskEntityMigrationError.d.ts +14 -14
- package/dist/entities-v2/BrskEntityMigrationError.js +4 -4
- package/dist/entities-v2/Case.d.ts +12 -0
- package/dist/entities-v2/Case.js +2 -0
- package/dist/entities-v2/ChurnRequest.d.ts +8 -1
- package/dist/entities-v2/ChurnRequest.js +2 -0
- package/dist/entities-v2/Config.d.ts +8 -8
- package/dist/entities-v2/Config.js +4 -4
- package/dist/entities-v2/Contact.d.ts +3 -0
- package/dist/entities-v2/Conversation.d.ts +0 -2
- package/dist/entities-v2/Conversation.js +0 -2
- package/dist/entities-v2/CustomerDeviceOnt.d.ts +8 -1
- package/dist/entities-v2/CustomerDeviceOnt.js +2 -0
- package/dist/entities-v2/Order.d.ts +21 -0
- package/dist/entities-v2/Order.js +6 -0
- package/dist/entities-v2/PaymentMethod.d.ts +6 -1
- package/dist/entities-v2/PaymentMethod.js +2 -0
- package/dist/entities-v2/PaymentMethodRefund.d.ts +3 -0
- package/dist/entities-v2/PgContact.d.ts +14 -0
- package/dist/entities-v2/PgContact.js +7 -1
- package/dist/entities-v2/PgFileAllocation.d.ts +17 -17
- package/dist/entities-v2/PgFileAllocation.js +2 -2
- package/dist/entities-v2/PgPaymentMethod.d.ts +14 -0
- package/dist/entities-v2/PgPaymentMethod.js +7 -1
- package/dist/entities-v2/PgTransaction.d.ts +48 -0
- package/dist/entities-v2/PgTransaction.js +13 -1
- package/dist/entities-v2/PgWebhook.d.ts +19 -3
- package/dist/entities-v2/PgWebhook.js +17 -1
- package/dist/entities-v2/PriceBook.d.ts +8 -8
- package/dist/entities-v2/PriceBook.js +2 -2
- package/dist/entities-v2/Referral.d.ts +1 -1
- package/dist/entities-v2/Referral.js +1 -1
- package/dist/entities-v2/Reward.d.ts +1 -1
- package/dist/entities-v2/Reward.js +1 -1
- package/dist/entities-v2/Service.d.ts +28 -20
- package/dist/entities-v2/Service.js +23 -15
- package/dist/entities-v2/Transaction.d.ts +6 -1
- package/dist/entities-v2/Transaction.js +2 -0
- package/dist/entities-v2/VoiceConfiguration.d.ts +8 -1
- package/dist/entities-v2/VoiceConfiguration.js +2 -0
- package/dist/entities-v2/WorkOrder.d.ts +3 -2
- package/dist/entities-v2/WorkOrder.js +3 -2
- package/dist/records-v2/AccountCreditRecord.d.ts +1 -82
- package/dist/records-v2/AccountCreditRecord.js +0 -124
- package/dist/records-v2/AccountRecord.d.ts +2 -306
- package/dist/records-v2/AccountRecord.js +0 -451
- package/dist/records-v2/ActivityLogRecord.d.ts +1 -122
- package/dist/records-v2/ActivityLogRecord.js +0 -190
- package/dist/records-v2/ActivityRecord.d.ts +2 -255
- package/dist/records-v2/ActivityRecord.js +0 -387
- package/dist/records-v2/AddressRecord.d.ts +0 -321
- package/dist/records-v2/AddressRecord.js +0 -532
- package/dist/records-v2/AffiliateCodeRecord.d.ts +1 -102
- package/dist/records-v2/AffiliateCodeRecord.js +0 -157
- package/dist/records-v2/AppointmentRecord.d.ts +0 -141
- package/dist/records-v2/AppointmentRecord.js +0 -235
- package/dist/records-v2/BillingAdjustmentRecord.d.ts +0 -81
- package/dist/records-v2/BillingAdjustmentRecord.js +0 -136
- package/dist/records-v2/BillingRequestRecord.d.ts +2 -178
- package/dist/records-v2/BillingRequestRecord.js +0 -271
- package/dist/records-v2/BlockageA55Record.d.ts +2 -103
- package/dist/records-v2/BlockageA55Record.js +0 -157
- package/dist/records-v2/BngProvisionRecord.d.ts +1 -42
- package/dist/records-v2/BngProvisionRecord.js +0 -58
- package/dist/records-v2/BrskEntityMigrationErrorRecord.d.ts +3 -23
- package/dist/records-v2/BrskEntityMigrationErrorRecord.js +3 -24
- package/dist/records-v2/CallEventRecord.d.ts +1 -82
- package/dist/records-v2/CallEventRecord.js +0 -124
- package/dist/records-v2/CallLegRecord.d.ts +1 -82
- package/dist/records-v2/CallLegRecord.js +0 -124
- package/dist/records-v2/CallRecord.d.ts +1 -202
- package/dist/records-v2/CallRecord.js +0 -322
- package/dist/records-v2/CallTransferRecord.d.ts +1 -102
- package/dist/records-v2/CallTransferRecord.js +0 -157
- package/dist/records-v2/CampaignRecord.d.ts +2 -83
- package/dist/records-v2/CampaignRecord.js +0 -124
- package/dist/records-v2/CaseRecord.d.ts +2 -398
- package/dist/records-v2/CaseRecord.js +0 -634
- package/dist/records-v2/ChangeReasonRecord.d.ts +2 -171
- package/dist/records-v2/ChangeReasonRecord.js +0 -238
- package/dist/records-v2/ChurnRequestRecord.d.ts +1 -62
- package/dist/records-v2/ChurnRequestRecord.js +0 -91
- package/dist/records-v2/ContactIdentityRecord.d.ts +163 -0
- package/dist/records-v2/ContactIdentityRecord.js +223 -0
- package/dist/records-v2/ContactRecord.d.ts +0 -540
- package/dist/records-v2/ContactRecord.js +0 -894
- package/dist/records-v2/ContractBuyOutRecord.d.ts +1 -162
- package/dist/records-v2/ContractBuyOutRecord.js +0 -256
- package/dist/records-v2/ConversationRecord.d.ts +1 -82
- package/dist/records-v2/ConversationRecord.js +0 -124
- package/dist/records-v2/CreditNoteRecord.d.ts +0 -101
- package/dist/records-v2/CreditNoteRecord.js +0 -169
- package/dist/records-v2/CrmDatasetRecord.d.ts +2 -191
- package/dist/records-v2/CrmDatasetRecord.js +0 -271
- package/dist/records-v2/CustomerDeviceAtaRecord.d.ts +0 -21
- package/dist/records-v2/CustomerDeviceAtaRecord.js +0 -37
- package/dist/records-v2/CustomerDeviceConfigurationRecord.d.ts +1 -62
- package/dist/records-v2/CustomerDeviceConfigurationRecord.js +0 -91
- package/dist/records-v2/CustomerDeviceOntRecord.d.ts +0 -181
- package/dist/records-v2/CustomerDeviceOntRecord.js +0 -301
- package/dist/records-v2/CustomerDeviceRouterRecord.d.ts +0 -141
- package/dist/records-v2/CustomerDeviceRouterRecord.js +0 -235
- package/dist/records-v2/CustomerPhonePortingRecord.d.ts +0 -21
- package/dist/records-v2/CustomerPhonePortingRecord.js +0 -37
- package/dist/records-v2/DiscountRecord.d.ts +0 -121
- package/dist/records-v2/DiscountRecord.js +0 -202
- package/dist/records-v2/EmailRecord.d.ts +2 -230
- package/dist/records-v2/EmailRecord.js +0 -336
- package/dist/records-v2/EmailSenderRecord.d.ts +1 -42
- package/dist/records-v2/EmailSenderRecord.js +0 -58
- package/dist/records-v2/EmailTemplateRecord.d.ts +1 -21
- package/dist/records-v2/EmailTemplateRecord.js +0 -21
- package/dist/records-v2/FieldServiceDispatchedProductRecord.d.ts +2 -135
- package/dist/records-v2/FieldServiceDispatchedProductRecord.js +0 -189
- package/dist/records-v2/FieldServiceProductRecord.d.ts +2 -115
- package/dist/records-v2/FieldServiceProductRecord.js +0 -156
- package/dist/records-v2/FileRecord.d.ts +2 -1211
- package/dist/records-v2/FileRecord.js +0 -1902
- package/dist/records-v2/ImpersonationTrackerRecord.d.ts +1 -62
- package/dist/records-v2/ImpersonationTrackerRecord.js +0 -91
- package/dist/records-v2/InternalInstallAuditRecord.d.ts +2 -83
- package/dist/records-v2/InternalInstallAuditRecord.js +0 -124
- package/dist/records-v2/InvoiceItemRecord.d.ts +0 -40
- package/dist/records-v2/InvoiceItemRecord.js +0 -69
- package/dist/records-v2/InvoiceRecord.d.ts +2 -399
- package/dist/records-v2/InvoiceRecord.js +0 -635
- package/dist/records-v2/KnowledgeArticleRecord.d.ts +2 -98
- package/dist/records-v2/KnowledgeArticleRecord.js +0 -139
- package/dist/records-v2/LeadRecord.d.ts +0 -261
- package/dist/records-v2/LeadRecord.js +0 -433
- package/dist/records-v2/MessageRecord.d.ts +2 -131
- package/dist/records-v2/MessageRecord.js +0 -172
- package/dist/records-v2/NetworkDeviceRecord.d.ts +2 -43
- package/dist/records-v2/NetworkDeviceRecord.js +0 -58
- package/dist/records-v2/NoteRecord.d.ts +1 -1121
- package/dist/records-v2/NoteRecord.js +0 -1839
- package/dist/records-v2/OfferRecord.d.ts +2 -154
- package/dist/records-v2/OfferRecord.js +0 -221
- package/dist/records-v2/OhAuditOfInstallationRecord.d.ts +2 -83
- package/dist/records-v2/OhAuditOfInstallationRecord.js +0 -124
- package/dist/records-v2/OhExternalAuditRecord.d.ts +2 -83
- package/dist/records-v2/OhExternalAuditRecord.js +0 -124
- package/dist/records-v2/OhInProgressAuditRecord.d.ts +2 -83
- package/dist/records-v2/OhInProgressAuditRecord.js +0 -124
- package/dist/records-v2/OhInstallationAuditRecord.d.ts +2 -83
- package/dist/records-v2/OhInstallationAuditRecord.js +0 -124
- package/dist/records-v2/OhRetroAuditRecord.d.ts +2 -83
- package/dist/records-v2/OhRetroAuditRecord.js +0 -124
- package/dist/records-v2/OneTouchSwitchRecord.d.ts +30 -255
- package/dist/records-v2/OneTouchSwitchRecord.js +37 -387
- package/dist/records-v2/OntReplacementApprovalRecord.d.ts +1 -62
- package/dist/records-v2/OntReplacementApprovalRecord.js +0 -91
- package/dist/records-v2/OrderCheckRecord.d.ts +0 -21
- package/dist/records-v2/OrderCheckRecord.js +0 -37
- package/dist/records-v2/OrderItemRecord.d.ts +0 -300
- package/dist/records-v2/OrderItemRecord.js +0 -498
- package/dist/records-v2/OrderKciRecord.d.ts +1 -42
- package/dist/records-v2/OrderKciRecord.js +0 -58
- package/dist/records-v2/OrderRecord.d.ts +0 -620
- package/dist/records-v2/OrderRecord.js +0 -1026
- package/dist/records-v2/OutageRecord.d.ts +1 -42
- package/dist/records-v2/OutageRecord.js +0 -58
- package/dist/records-v2/OverlayRealA55Record.d.ts +2 -83
- package/dist/records-v2/OverlayRealA55Record.js +0 -124
- package/dist/records-v2/PICRequestRecord.d.ts +1 -62
- package/dist/records-v2/PICRequestRecord.js +0 -91
- package/dist/records-v2/PaymentMethodRecord.d.ts +7 -127
- package/dist/records-v2/PaymentMethodRecord.js +15 -209
- package/dist/records-v2/PaymentMethodRefundRecord.d.ts +0 -181
- package/dist/records-v2/PaymentMethodRefundRecord.js +0 -301
- package/dist/records-v2/PaymentRecord.d.ts +1 -82
- package/dist/records-v2/PaymentRecord.js +0 -124
- package/dist/records-v2/PermissionToFailRecord.d.ts +0 -61
- package/dist/records-v2/PermissionToFailRecord.js +0 -103
- package/dist/records-v2/PgAccountValidationRecord.d.ts +1 -21
- package/dist/records-v2/PgAccountValidationRecord.js +0 -21
- package/dist/records-v2/PgContactRecord.d.ts +1 -62
- package/dist/records-v2/PgContactRecord.js +0 -91
- package/dist/records-v2/PgDirectDebitFileRecord.d.ts +2 -95
- package/dist/records-v2/PgDirectDebitFileRecord.js +0 -123
- package/dist/records-v2/PgDisputeRecord.d.ts +1 -62
- package/dist/records-v2/PgDisputeRecord.js +0 -91
- package/dist/records-v2/PgFileAllocationRecord.d.ts +58 -140
- package/dist/records-v2/PgFileAllocationRecord.js +72 -185
- package/dist/records-v2/PgLogRecord.d.ts +1 -21
- package/dist/records-v2/PgLogRecord.js +0 -21
- package/dist/records-v2/PgPaymentMethodRecord.d.ts +1 -102
- package/dist/records-v2/PgPaymentMethodRecord.js +0 -157
- package/dist/records-v2/PgSortCodeSubstitutionRecord.d.ts +1 -21
- package/dist/records-v2/PgSortCodeSubstitutionRecord.js +0 -21
- package/dist/records-v2/PgTransactionRecord.d.ts +2 -135
- package/dist/records-v2/PgTransactionRecord.js +0 -189
- package/dist/records-v2/PgVocalinkRecord.d.ts +1 -21
- package/dist/records-v2/PgVocalinkRecord.js +0 -21
- package/dist/records-v2/PgWebhookAttemptRecord.d.ts +1 -42
- package/dist/records-v2/PgWebhookAttemptRecord.js +0 -58
- package/dist/records-v2/PgWebhookRecord.d.ts +26 -122
- package/dist/records-v2/PgWebhookRecord.js +29 -190
- package/dist/records-v2/PhoneNumberRecord.d.ts +0 -41
- package/dist/records-v2/PhoneNumberRecord.js +0 -70
- package/dist/records-v2/PriceBookRecord.d.ts +0 -21
- package/dist/records-v2/PriceBookRecord.js +0 -37
- package/dist/records-v2/ProductRecord.d.ts +2 -258
- package/dist/records-v2/ProductRecord.js +0 -351
- package/dist/records-v2/PushNotificationRecord.d.ts +1 -162
- package/dist/records-v2/PushNotificationRecord.js +0 -256
- package/dist/records-v2/ReferralRecord.d.ts +2 -143
- package/dist/records-v2/ReferralRecord.js +0 -223
- package/dist/records-v2/RemediationOutcomeFormRecord.d.ts +2 -83
- package/dist/records-v2/RemediationOutcomeFormRecord.js +0 -124
- package/dist/records-v2/RemediationRequiredReasonRecord.d.ts +2 -103
- package/dist/records-v2/RemediationRequiredReasonRecord.js +0 -157
- package/dist/records-v2/ReturnsRecord.d.ts +1 -62
- package/dist/records-v2/ReturnsRecord.js +0 -91
- package/dist/records-v2/RewardRecord.d.ts +2 -123
- package/dist/records-v2/RewardRecord.js +0 -190
- package/dist/records-v2/SalesTerritoryRecord.d.ts +2 -79
- package/dist/records-v2/SalesTerritoryRecord.js +0 -107
- package/dist/records-v2/ScheduleSlotRecord.d.ts +1 -42
- package/dist/records-v2/ScheduleSlotRecord.js +0 -58
- package/dist/records-v2/ServiceAppointmentConfigRecord.d.ts +2 -287
- package/dist/records-v2/ServiceAppointmentConfigRecord.js +0 -367
- package/dist/records-v2/ServiceAppointmentRecord.d.ts +0 -81
- package/dist/records-v2/ServiceAppointmentRecord.js +0 -136
- package/dist/records-v2/ServiceRecord.d.ts +0 -40
- package/dist/records-v2/ServiceRecord.js +0 -69
- package/dist/records-v2/ServiceVisitAuditRecord.d.ts +2 -83
- package/dist/records-v2/ServiceVisitAuditRecord.js +0 -124
- package/dist/records-v2/SiteSpecificRiskAssessmentOutcomeFormRecord.d.ts +2 -83
- package/dist/records-v2/SiteSpecificRiskAssessmentOutcomeFormRecord.js +0 -124
- package/dist/records-v2/SmsMessageRecord.d.ts +2 -175
- package/dist/records-v2/SmsMessageRecord.js +0 -255
- package/dist/records-v2/SweeperMaintenanceAuditRecord.d.ts +2 -83
- package/dist/records-v2/SweeperMaintenanceAuditRecord.js +0 -124
- package/dist/records-v2/TeamRecord.d.ts +0 -101
- package/dist/records-v2/TeamRecord.js +0 -169
- package/dist/records-v2/TestEntityForVisualBuilderRecord.d.ts +2 -115
- package/dist/records-v2/TestEntityForVisualBuilderRecord.js +0 -156
- package/dist/records-v2/TimeSlotRecord.d.ts +0 -21
- package/dist/records-v2/TimeSlotRecord.js +0 -37
- package/dist/records-v2/TransactionRecord.d.ts +1 -181
- package/dist/records-v2/TransactionRecord.js +0 -288
- package/dist/records-v2/TwilioUserUpdateRecord.d.ts +1 -42
- package/dist/records-v2/TwilioUserUpdateRecord.js +0 -58
- package/dist/records-v2/UgAuditOfInstallationRecord.d.ts +2 -83
- package/dist/records-v2/UgAuditOfInstallationRecord.js +0 -124
- package/dist/records-v2/UgExternalAuditRecord.d.ts +2 -83
- package/dist/records-v2/UgExternalAuditRecord.js +0 -124
- package/dist/records-v2/UgInProgressAuditRecord.d.ts +2 -83
- package/dist/records-v2/UgInProgressAuditRecord.js +0 -124
- package/dist/records-v2/UgInstallationAuditRecord.d.ts +2 -83
- package/dist/records-v2/UgInstallationAuditRecord.js +0 -124
- package/dist/records-v2/UgRetroAuditRecord.d.ts +2 -83
- package/dist/records-v2/UgRetroAuditRecord.js +0 -124
- package/dist/records-v2/UserRecord.d.ts +0 -380
- package/dist/records-v2/UserRecord.js +0 -630
- package/dist/records-v2/VisitRecord.d.ts +0 -121
- package/dist/records-v2/VisitRecord.js +0 -202
- package/dist/records-v2/VoiceConfigurationRecord.d.ts +0 -21
- package/dist/records-v2/VoiceConfigurationRecord.js +0 -37
- package/dist/records-v2/WayleaveAuditRecord.d.ts +2 -83
- package/dist/records-v2/WayleaveAuditRecord.js +0 -124
- package/dist/records-v2/WorkOrderRecord.d.ts +2 -1226
- package/dist/records-v2/WorkOrderRecord.js +0 -1865
- package/dist/records-v2/WorkOrderStatusUpdateRecord.d.ts +2 -75
- package/dist/records-v2/WorkOrderStatusUpdateRecord.js +0 -90
- package/dist/records-v2/YfFieldServiceVisitRecord.d.ts +2 -83
- package/dist/records-v2/YfFieldServiceVisitRecord.js +0 -124
- package/dist/records-v2/YfStockAuditRecord.d.ts +2 -103
- package/dist/records-v2/YfStockAuditRecord.js +0 -157
- package/dist/records-v2/index.d.ts +1 -0
- package/dist/records-v2/index.js +4 -1
- package/package.json +1 -1
- package/dist/actions-v2/UpdatePgAllocationWithBacsReportDto.d.ts +0 -85
- package/dist/actions-v2/UpdatePgAllocationWithBacsReportDto.js +0 -61
|
@@ -13,16 +13,13 @@
|
|
|
13
13
|
* await record.createProduct({ ... }).execute();
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
|
-
* Entity Types: BUNDLE, INTERNET, LABOR, LANDLINE, MESH, MOBILE, TELEVISION
|
|
17
|
-
*
|
|
18
16
|
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
19
17
|
*/
|
|
20
18
|
import { OdinRecord, OdinRecordLinkDto } from '@d19n/odin-types/dist/core';
|
|
21
19
|
import { PipelineStageEntity } from '@d19n/odin-types/dist/core';
|
|
22
20
|
import { IDbRecordCreateUpdateRes } from '@d19n/odin-types/dist/core/interfaces/v1.db.interfaces';
|
|
23
21
|
import { IOdinProvider } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
|
|
24
|
-
import {
|
|
25
|
-
import { ProductProperties, BundleProductProperties, InternetProductProperties, LaborProductProperties, LandlineProductProperties, MeshProductProperties, MobileProductProperties, TelevisionProductProperties } from '../entities-v2/Product';
|
|
22
|
+
import { ProductProperties } from '../entities-v2/Product';
|
|
26
23
|
import { CreateBundleProductActionProperties } from '../actions-v2/CreateBundleProductActionDto';
|
|
27
24
|
import { CreateInternetProductActionProperties } from '../actions-v2/CreateInternetProductActionDto';
|
|
28
25
|
import { CreateLaborProductActionProperties } from '../actions-v2/CreateLaborProductActionDto';
|
|
@@ -37,14 +34,6 @@ import { UpdateLandlineProductActionProperties } from '../actions-v2/UpdateLandl
|
|
|
37
34
|
import { UpdateMeshProductActionProperties } from '../actions-v2/UpdateMeshProductActionDto';
|
|
38
35
|
import { UpdateMobileProductActionProperties } from '../actions-v2/UpdateMobileProductActionDto';
|
|
39
36
|
import { UpdateTelevisionProductActionProperties } from '../actions-v2/UpdateTelevisionProductActionDto';
|
|
40
|
-
import { LeadRecord } from './LeadRecord';
|
|
41
|
-
import { OfferRecord } from './OfferRecord';
|
|
42
|
-
import { ServiceRecord } from './ServiceRecord';
|
|
43
|
-
import { PriceBookRecord } from './PriceBookRecord';
|
|
44
|
-
import { OrderItemRecord } from './OrderItemRecord';
|
|
45
|
-
import { FieldServiceProductRecord } from './FieldServiceProductRecord';
|
|
46
|
-
/** Valid entity types for Product */
|
|
47
|
-
export declare type ProductType = 'BUNDLE' | 'INTERNET' | 'LABOR' | 'LANDLINE' | 'MESH' | 'MOBILE' | 'TELEVISION';
|
|
48
37
|
/**
|
|
49
38
|
* Builder for action execution with dryRun support
|
|
50
39
|
*
|
|
@@ -108,13 +97,6 @@ export declare class ProductRecord<TProps = ProductProperties> {
|
|
|
108
97
|
private _provider;
|
|
109
98
|
private _pendingLinks;
|
|
110
99
|
private _preGeneratedId;
|
|
111
|
-
private _leads?;
|
|
112
|
-
private _offers?;
|
|
113
|
-
private _services?;
|
|
114
|
-
private _products?;
|
|
115
|
-
private _priceBooks?;
|
|
116
|
-
private _orderItems?;
|
|
117
|
-
private _fieldServiceProducts?;
|
|
118
100
|
/**
|
|
119
101
|
* Create a record wrapper.
|
|
120
102
|
* @param record - The underlying record, or null for create operations
|
|
@@ -127,7 +109,7 @@ export declare class ProductRecord<TProps = ProductProperties> {
|
|
|
127
109
|
/** Record ID - always available (pre-generated for new records) */
|
|
128
110
|
get id(): string;
|
|
129
111
|
get entity(): string;
|
|
130
|
-
get type():
|
|
112
|
+
get type(): string | undefined;
|
|
131
113
|
/** Record properties - empty object for new (unsaved) records */
|
|
132
114
|
get properties(): TProps;
|
|
133
115
|
get title(): string | undefined;
|
|
@@ -140,244 +122,6 @@ export declare class ProductRecord<TProps = ProductProperties> {
|
|
|
140
122
|
get groups(): string[];
|
|
141
123
|
/** Access the underlying OdinRecord (null for new records) */
|
|
142
124
|
get record(): OdinRecord<TProps> | null;
|
|
143
|
-
/**
|
|
144
|
-
* Type guard: check if this record is of type BUNDLE
|
|
145
|
-
*
|
|
146
|
-
* When this returns true, TypeScript automatically narrows the type,
|
|
147
|
-
* giving you access to BUNDLE-specific properties.
|
|
148
|
-
*
|
|
149
|
-
* @example
|
|
150
|
-
* ```typescript
|
|
151
|
-
* if (record.isBundle()) {
|
|
152
|
-
* // TypeScript knows record.properties is BundleProductProperties
|
|
153
|
-
* console.log(record.properties.SomeTypeSpecificField);
|
|
154
|
-
* }
|
|
155
|
-
* ```
|
|
156
|
-
* @remarks Bundle
|
|
157
|
-
*/
|
|
158
|
-
isBundle(): this is ProductRecord<BundleProductProperties>;
|
|
159
|
-
/**
|
|
160
|
-
* Type guard: check if this record is of type INTERNET
|
|
161
|
-
*
|
|
162
|
-
* When this returns true, TypeScript automatically narrows the type,
|
|
163
|
-
* giving you access to INTERNET-specific properties.
|
|
164
|
-
*
|
|
165
|
-
* @example
|
|
166
|
-
* ```typescript
|
|
167
|
-
* if (record.isInternet()) {
|
|
168
|
-
* // TypeScript knows record.properties is InternetProductProperties
|
|
169
|
-
* console.log(record.properties.SomeTypeSpecificField);
|
|
170
|
-
* }
|
|
171
|
-
* ```
|
|
172
|
-
* @remarks Internet
|
|
173
|
-
*/
|
|
174
|
-
isInternet(): this is ProductRecord<InternetProductProperties>;
|
|
175
|
-
/**
|
|
176
|
-
* Type guard: check if this record is of type LABOR
|
|
177
|
-
*
|
|
178
|
-
* When this returns true, TypeScript automatically narrows the type,
|
|
179
|
-
* giving you access to LABOR-specific properties.
|
|
180
|
-
*
|
|
181
|
-
* @example
|
|
182
|
-
* ```typescript
|
|
183
|
-
* if (record.isLabor()) {
|
|
184
|
-
* // TypeScript knows record.properties is LaborProductProperties
|
|
185
|
-
* console.log(record.properties.SomeTypeSpecificField);
|
|
186
|
-
* }
|
|
187
|
-
* ```
|
|
188
|
-
* @remarks Labor
|
|
189
|
-
*/
|
|
190
|
-
isLabor(): this is ProductRecord<LaborProductProperties>;
|
|
191
|
-
/**
|
|
192
|
-
* Type guard: check if this record is of type LANDLINE
|
|
193
|
-
*
|
|
194
|
-
* When this returns true, TypeScript automatically narrows the type,
|
|
195
|
-
* giving you access to LANDLINE-specific properties.
|
|
196
|
-
*
|
|
197
|
-
* @example
|
|
198
|
-
* ```typescript
|
|
199
|
-
* if (record.isLandline()) {
|
|
200
|
-
* // TypeScript knows record.properties is LandlineProductProperties
|
|
201
|
-
* console.log(record.properties.SomeTypeSpecificField);
|
|
202
|
-
* }
|
|
203
|
-
* ```
|
|
204
|
-
* @remarks Landline
|
|
205
|
-
*/
|
|
206
|
-
isLandline(): this is ProductRecord<LandlineProductProperties>;
|
|
207
|
-
/**
|
|
208
|
-
* Type guard: check if this record is of type MESH
|
|
209
|
-
*
|
|
210
|
-
* When this returns true, TypeScript automatically narrows the type,
|
|
211
|
-
* giving you access to MESH-specific properties.
|
|
212
|
-
*
|
|
213
|
-
* @example
|
|
214
|
-
* ```typescript
|
|
215
|
-
* if (record.isMesh()) {
|
|
216
|
-
* // TypeScript knows record.properties is MeshProductProperties
|
|
217
|
-
* console.log(record.properties.SomeTypeSpecificField);
|
|
218
|
-
* }
|
|
219
|
-
* ```
|
|
220
|
-
* @remarks Mesh
|
|
221
|
-
*/
|
|
222
|
-
isMesh(): this is ProductRecord<MeshProductProperties>;
|
|
223
|
-
/**
|
|
224
|
-
* Type guard: check if this record is of type MOBILE
|
|
225
|
-
*
|
|
226
|
-
* When this returns true, TypeScript automatically narrows the type,
|
|
227
|
-
* giving you access to MOBILE-specific properties.
|
|
228
|
-
*
|
|
229
|
-
* @example
|
|
230
|
-
* ```typescript
|
|
231
|
-
* if (record.isMobile()) {
|
|
232
|
-
* // TypeScript knows record.properties is MobileProductProperties
|
|
233
|
-
* console.log(record.properties.SomeTypeSpecificField);
|
|
234
|
-
* }
|
|
235
|
-
* ```
|
|
236
|
-
* @remarks Mobile
|
|
237
|
-
*/
|
|
238
|
-
isMobile(): this is ProductRecord<MobileProductProperties>;
|
|
239
|
-
/**
|
|
240
|
-
* Type guard: check if this record is of type TELEVISION
|
|
241
|
-
*
|
|
242
|
-
* When this returns true, TypeScript automatically narrows the type,
|
|
243
|
-
* giving you access to TELEVISION-specific properties.
|
|
244
|
-
*
|
|
245
|
-
* @example
|
|
246
|
-
* ```typescript
|
|
247
|
-
* if (record.isTelevision()) {
|
|
248
|
-
* // TypeScript knows record.properties is TelevisionProductProperties
|
|
249
|
-
* console.log(record.properties.SomeTypeSpecificField);
|
|
250
|
-
* }
|
|
251
|
-
* ```
|
|
252
|
-
* @remarks TV product
|
|
253
|
-
*/
|
|
254
|
-
isTelevision(): this is ProductRecord<TelevisionProductProperties>;
|
|
255
|
-
/** Valid labels for Lead associations */
|
|
256
|
-
static readonly leadsLabels: readonly ["Lead__Product"];
|
|
257
|
-
/**
|
|
258
|
-
* Access linked Lead records
|
|
259
|
-
* @remarks Available labels: Lead__Product
|
|
260
|
-
* @throws Error if called on a new (unsaved) record
|
|
261
|
-
*
|
|
262
|
-
* @example
|
|
263
|
-
* ```typescript
|
|
264
|
-
* // Get all linked Lead records
|
|
265
|
-
* const items = await record.leads.list();
|
|
266
|
-
* const first = await record.leads.first();
|
|
267
|
-
*
|
|
268
|
-
* // Filter by label
|
|
269
|
-
* const specific = await record.leads.first({ label: 'Lead__Product' });
|
|
270
|
-
* ```
|
|
271
|
-
*/
|
|
272
|
-
get leads(): RecordLinkManager<LeadRecord, typeof ProductRecord['leadsLabels'][number]>;
|
|
273
|
-
/** Valid labels for Offer associations */
|
|
274
|
-
static readonly offersLabels: readonly ["Offer__Product"];
|
|
275
|
-
/**
|
|
276
|
-
* Access linked Offer records
|
|
277
|
-
* @remarks Available labels: Offer__Product
|
|
278
|
-
* @throws Error if called on a new (unsaved) record
|
|
279
|
-
*
|
|
280
|
-
* @example
|
|
281
|
-
* ```typescript
|
|
282
|
-
* // Get all linked Offer records
|
|
283
|
-
* const items = await record.offers.list();
|
|
284
|
-
* const first = await record.offers.first();
|
|
285
|
-
*
|
|
286
|
-
* // Filter by label
|
|
287
|
-
* const specific = await record.offers.first({ label: 'Offer__Product' });
|
|
288
|
-
* ```
|
|
289
|
-
*/
|
|
290
|
-
get offers(): RecordLinkManager<OfferRecord, typeof ProductRecord['offersLabels'][number]>;
|
|
291
|
-
/** Valid labels for Service associations */
|
|
292
|
-
static readonly servicesLabels: readonly ["Product__Service"];
|
|
293
|
-
/**
|
|
294
|
-
* Access linked Service records
|
|
295
|
-
* @remarks Available labels: Product__Service
|
|
296
|
-
* @throws Error if called on a new (unsaved) record
|
|
297
|
-
*
|
|
298
|
-
* @example
|
|
299
|
-
* ```typescript
|
|
300
|
-
* // Get all linked Service records
|
|
301
|
-
* const items = await record.services.list();
|
|
302
|
-
* const first = await record.services.first();
|
|
303
|
-
*
|
|
304
|
-
* // Filter by label
|
|
305
|
-
* const specific = await record.services.first({ label: 'Product__Service' });
|
|
306
|
-
* ```
|
|
307
|
-
*/
|
|
308
|
-
get services(): RecordLinkManager<ServiceRecord, typeof ProductRecord['servicesLabels'][number]>;
|
|
309
|
-
/** Valid labels for Product associations */
|
|
310
|
-
static readonly productsLabels: readonly ["Product__Product"];
|
|
311
|
-
/**
|
|
312
|
-
* Access linked Product records
|
|
313
|
-
* @remarks Available labels: Product__Product
|
|
314
|
-
* @throws Error if called on a new (unsaved) record
|
|
315
|
-
*
|
|
316
|
-
* @example
|
|
317
|
-
* ```typescript
|
|
318
|
-
* // Get all linked Product records
|
|
319
|
-
* const items = await record.products.list();
|
|
320
|
-
* const first = await record.products.first();
|
|
321
|
-
*
|
|
322
|
-
* // Filter by label
|
|
323
|
-
* const specific = await record.products.first({ label: 'Product__Product' });
|
|
324
|
-
* ```
|
|
325
|
-
*/
|
|
326
|
-
get products(): RecordLinkManager<ProductRecord, typeof ProductRecord['productsLabels'][number]>;
|
|
327
|
-
/** Valid labels for PriceBook associations */
|
|
328
|
-
static readonly priceBooksLabels: readonly ["PriceBook__Product"];
|
|
329
|
-
/**
|
|
330
|
-
* Access linked PriceBook records
|
|
331
|
-
* @remarks Available labels: PriceBook__Product
|
|
332
|
-
* @throws Error if called on a new (unsaved) record
|
|
333
|
-
*
|
|
334
|
-
* @example
|
|
335
|
-
* ```typescript
|
|
336
|
-
* // Get all linked PriceBook records
|
|
337
|
-
* const items = await record.priceBooks.list();
|
|
338
|
-
* const first = await record.priceBooks.first();
|
|
339
|
-
*
|
|
340
|
-
* // Filter by label
|
|
341
|
-
* const specific = await record.priceBooks.first({ label: 'PriceBook__Product' });
|
|
342
|
-
* ```
|
|
343
|
-
*/
|
|
344
|
-
get priceBooks(): RecordLinkManager<PriceBookRecord, typeof ProductRecord['priceBooksLabels'][number]>;
|
|
345
|
-
/** Valid labels for OrderItem associations */
|
|
346
|
-
static readonly orderItemsLabels: readonly ["OrderItem__Product"];
|
|
347
|
-
/**
|
|
348
|
-
* Access linked OrderItem records
|
|
349
|
-
* @remarks Available labels: OrderItem__Product
|
|
350
|
-
* @throws Error if called on a new (unsaved) record
|
|
351
|
-
*
|
|
352
|
-
* @example
|
|
353
|
-
* ```typescript
|
|
354
|
-
* // Get all linked OrderItem records
|
|
355
|
-
* const items = await record.orderItems.list();
|
|
356
|
-
* const first = await record.orderItems.first();
|
|
357
|
-
*
|
|
358
|
-
* // Filter by label
|
|
359
|
-
* const specific = await record.orderItems.first({ label: 'OrderItem__Product' });
|
|
360
|
-
* ```
|
|
361
|
-
*/
|
|
362
|
-
get orderItems(): RecordLinkManager<OrderItemRecord, typeof ProductRecord['orderItemsLabels'][number]>;
|
|
363
|
-
/** Valid labels for FieldServiceProduct associations */
|
|
364
|
-
static readonly fieldServiceProductsLabels: readonly ["FieldServiceProduct__CompatibleProducts"];
|
|
365
|
-
/**
|
|
366
|
-
* Access linked FieldServiceProduct records
|
|
367
|
-
* @remarks Available labels: FieldServiceProduct__CompatibleProducts
|
|
368
|
-
* @throws Error if called on a new (unsaved) record
|
|
369
|
-
*
|
|
370
|
-
* @example
|
|
371
|
-
* ```typescript
|
|
372
|
-
* // Get all linked FieldServiceProduct records
|
|
373
|
-
* const items = await record.fieldServiceProducts.list();
|
|
374
|
-
* const first = await record.fieldServiceProducts.first();
|
|
375
|
-
*
|
|
376
|
-
* // Filter by label
|
|
377
|
-
* const specific = await record.fieldServiceProducts.first({ label: 'FieldServiceProduct__CompatibleProducts' });
|
|
378
|
-
* ```
|
|
379
|
-
*/
|
|
380
|
-
get fieldServiceProducts(): RecordLinkManager<FieldServiceProductRecord, typeof ProductRecord['fieldServiceProductsLabels'][number]>;
|
|
381
125
|
/**
|
|
382
126
|
* Queue a link to be created with the next action.
|
|
383
127
|
* Works for both create and update actions.
|
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
* await record.createProduct({ ... }).execute();
|
|
15
15
|
* ```
|
|
16
16
|
*
|
|
17
|
-
* Entity Types: BUNDLE, INTERNET, LABOR, LANDLINE, MESH, MOBILE, TELEVISION
|
|
18
|
-
*
|
|
19
17
|
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
20
18
|
*/
|
|
21
19
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
@@ -31,13 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
31
29
|
exports.isProductRecord = exports.ProductRecord = void 0;
|
|
32
30
|
const uuid_1 = require("uuid");
|
|
33
31
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
34
|
-
const record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/record-link-manager");
|
|
35
|
-
const LeadRecord_1 = require("./LeadRecord");
|
|
36
|
-
const OfferRecord_1 = require("./OfferRecord");
|
|
37
|
-
const ServiceRecord_1 = require("./ServiceRecord");
|
|
38
|
-
const PriceBookRecord_1 = require("./PriceBookRecord");
|
|
39
|
-
const OrderItemRecord_1 = require("./OrderItemRecord");
|
|
40
|
-
const FieldServiceProductRecord_1 = require("./FieldServiceProductRecord");
|
|
41
32
|
/**
|
|
42
33
|
* Builder for action execution with dryRun support
|
|
43
34
|
*
|
|
@@ -149,331 +140,6 @@ class ProductRecord {
|
|
|
149
140
|
/** Access the underlying OdinRecord (null for new records) */
|
|
150
141
|
get record() { return this._record; }
|
|
151
142
|
// ============================================
|
|
152
|
-
// TYPE GUARDS (with TypeScript type predicates)
|
|
153
|
-
// ============================================
|
|
154
|
-
/**
|
|
155
|
-
* Type guard: check if this record is of type BUNDLE
|
|
156
|
-
*
|
|
157
|
-
* When this returns true, TypeScript automatically narrows the type,
|
|
158
|
-
* giving you access to BUNDLE-specific properties.
|
|
159
|
-
*
|
|
160
|
-
* @example
|
|
161
|
-
* ```typescript
|
|
162
|
-
* if (record.isBundle()) {
|
|
163
|
-
* // TypeScript knows record.properties is BundleProductProperties
|
|
164
|
-
* console.log(record.properties.SomeTypeSpecificField);
|
|
165
|
-
* }
|
|
166
|
-
* ```
|
|
167
|
-
* @remarks Bundle
|
|
168
|
-
*/
|
|
169
|
-
isBundle() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'BUNDLE'; }
|
|
170
|
-
/**
|
|
171
|
-
* Type guard: check if this record is of type INTERNET
|
|
172
|
-
*
|
|
173
|
-
* When this returns true, TypeScript automatically narrows the type,
|
|
174
|
-
* giving you access to INTERNET-specific properties.
|
|
175
|
-
*
|
|
176
|
-
* @example
|
|
177
|
-
* ```typescript
|
|
178
|
-
* if (record.isInternet()) {
|
|
179
|
-
* // TypeScript knows record.properties is InternetProductProperties
|
|
180
|
-
* console.log(record.properties.SomeTypeSpecificField);
|
|
181
|
-
* }
|
|
182
|
-
* ```
|
|
183
|
-
* @remarks Internet
|
|
184
|
-
*/
|
|
185
|
-
isInternet() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'INTERNET'; }
|
|
186
|
-
/**
|
|
187
|
-
* Type guard: check if this record is of type LABOR
|
|
188
|
-
*
|
|
189
|
-
* When this returns true, TypeScript automatically narrows the type,
|
|
190
|
-
* giving you access to LABOR-specific properties.
|
|
191
|
-
*
|
|
192
|
-
* @example
|
|
193
|
-
* ```typescript
|
|
194
|
-
* if (record.isLabor()) {
|
|
195
|
-
* // TypeScript knows record.properties is LaborProductProperties
|
|
196
|
-
* console.log(record.properties.SomeTypeSpecificField);
|
|
197
|
-
* }
|
|
198
|
-
* ```
|
|
199
|
-
* @remarks Labor
|
|
200
|
-
*/
|
|
201
|
-
isLabor() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'LABOR'; }
|
|
202
|
-
/**
|
|
203
|
-
* Type guard: check if this record is of type LANDLINE
|
|
204
|
-
*
|
|
205
|
-
* When this returns true, TypeScript automatically narrows the type,
|
|
206
|
-
* giving you access to LANDLINE-specific properties.
|
|
207
|
-
*
|
|
208
|
-
* @example
|
|
209
|
-
* ```typescript
|
|
210
|
-
* if (record.isLandline()) {
|
|
211
|
-
* // TypeScript knows record.properties is LandlineProductProperties
|
|
212
|
-
* console.log(record.properties.SomeTypeSpecificField);
|
|
213
|
-
* }
|
|
214
|
-
* ```
|
|
215
|
-
* @remarks Landline
|
|
216
|
-
*/
|
|
217
|
-
isLandline() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'LANDLINE'; }
|
|
218
|
-
/**
|
|
219
|
-
* Type guard: check if this record is of type MESH
|
|
220
|
-
*
|
|
221
|
-
* When this returns true, TypeScript automatically narrows the type,
|
|
222
|
-
* giving you access to MESH-specific properties.
|
|
223
|
-
*
|
|
224
|
-
* @example
|
|
225
|
-
* ```typescript
|
|
226
|
-
* if (record.isMesh()) {
|
|
227
|
-
* // TypeScript knows record.properties is MeshProductProperties
|
|
228
|
-
* console.log(record.properties.SomeTypeSpecificField);
|
|
229
|
-
* }
|
|
230
|
-
* ```
|
|
231
|
-
* @remarks Mesh
|
|
232
|
-
*/
|
|
233
|
-
isMesh() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'MESH'; }
|
|
234
|
-
/**
|
|
235
|
-
* Type guard: check if this record is of type MOBILE
|
|
236
|
-
*
|
|
237
|
-
* When this returns true, TypeScript automatically narrows the type,
|
|
238
|
-
* giving you access to MOBILE-specific properties.
|
|
239
|
-
*
|
|
240
|
-
* @example
|
|
241
|
-
* ```typescript
|
|
242
|
-
* if (record.isMobile()) {
|
|
243
|
-
* // TypeScript knows record.properties is MobileProductProperties
|
|
244
|
-
* console.log(record.properties.SomeTypeSpecificField);
|
|
245
|
-
* }
|
|
246
|
-
* ```
|
|
247
|
-
* @remarks Mobile
|
|
248
|
-
*/
|
|
249
|
-
isMobile() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'MOBILE'; }
|
|
250
|
-
/**
|
|
251
|
-
* Type guard: check if this record is of type TELEVISION
|
|
252
|
-
*
|
|
253
|
-
* When this returns true, TypeScript automatically narrows the type,
|
|
254
|
-
* giving you access to TELEVISION-specific properties.
|
|
255
|
-
*
|
|
256
|
-
* @example
|
|
257
|
-
* ```typescript
|
|
258
|
-
* if (record.isTelevision()) {
|
|
259
|
-
* // TypeScript knows record.properties is TelevisionProductProperties
|
|
260
|
-
* console.log(record.properties.SomeTypeSpecificField);
|
|
261
|
-
* }
|
|
262
|
-
* ```
|
|
263
|
-
* @remarks TV product
|
|
264
|
-
*/
|
|
265
|
-
isTelevision() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'TELEVISION'; }
|
|
266
|
-
/**
|
|
267
|
-
* Access linked Lead records
|
|
268
|
-
* @remarks Available labels: Lead__Product
|
|
269
|
-
* @throws Error if called on a new (unsaved) record
|
|
270
|
-
*
|
|
271
|
-
* @example
|
|
272
|
-
* ```typescript
|
|
273
|
-
* // Get all linked Lead records
|
|
274
|
-
* const items = await record.leads.list();
|
|
275
|
-
* const first = await record.leads.first();
|
|
276
|
-
*
|
|
277
|
-
* // Filter by label
|
|
278
|
-
* const specific = await record.leads.first({ label: 'Lead__Product' });
|
|
279
|
-
* ```
|
|
280
|
-
*/
|
|
281
|
-
get leads() {
|
|
282
|
-
var _a;
|
|
283
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
284
|
-
throw new Error('Cannot access links on a new (unsaved) record');
|
|
285
|
-
if (!this._leads) {
|
|
286
|
-
this._leads = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
287
|
-
sourceEntity: 'ProductModule:Product',
|
|
288
|
-
targetEntity: 'CrmModule:Lead',
|
|
289
|
-
targetModuleName: 'CrmModule',
|
|
290
|
-
targetEntityName: 'Lead',
|
|
291
|
-
labels: ['Lead__Product'],
|
|
292
|
-
}, LeadRecord_1.LeadRecord);
|
|
293
|
-
}
|
|
294
|
-
return this._leads;
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* Access linked Offer records
|
|
298
|
-
* @remarks Available labels: Offer__Product
|
|
299
|
-
* @throws Error if called on a new (unsaved) record
|
|
300
|
-
*
|
|
301
|
-
* @example
|
|
302
|
-
* ```typescript
|
|
303
|
-
* // Get all linked Offer records
|
|
304
|
-
* const items = await record.offers.list();
|
|
305
|
-
* const first = await record.offers.first();
|
|
306
|
-
*
|
|
307
|
-
* // Filter by label
|
|
308
|
-
* const specific = await record.offers.first({ label: 'Offer__Product' });
|
|
309
|
-
* ```
|
|
310
|
-
*/
|
|
311
|
-
get offers() {
|
|
312
|
-
var _a;
|
|
313
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
314
|
-
throw new Error('Cannot access links on a new (unsaved) record');
|
|
315
|
-
if (!this._offers) {
|
|
316
|
-
this._offers = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
317
|
-
sourceEntity: 'ProductModule:Product',
|
|
318
|
-
targetEntity: 'ProductModule:Offer',
|
|
319
|
-
targetModuleName: 'ProductModule',
|
|
320
|
-
targetEntityName: 'Offer',
|
|
321
|
-
labels: ['Offer__Product'],
|
|
322
|
-
}, OfferRecord_1.OfferRecord);
|
|
323
|
-
}
|
|
324
|
-
return this._offers;
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* Access linked Service records
|
|
328
|
-
* @remarks Available labels: Product__Service
|
|
329
|
-
* @throws Error if called on a new (unsaved) record
|
|
330
|
-
*
|
|
331
|
-
* @example
|
|
332
|
-
* ```typescript
|
|
333
|
-
* // Get all linked Service records
|
|
334
|
-
* const items = await record.services.list();
|
|
335
|
-
* const first = await record.services.first();
|
|
336
|
-
*
|
|
337
|
-
* // Filter by label
|
|
338
|
-
* const specific = await record.services.first({ label: 'Product__Service' });
|
|
339
|
-
* ```
|
|
340
|
-
*/
|
|
341
|
-
get services() {
|
|
342
|
-
var _a;
|
|
343
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
344
|
-
throw new Error('Cannot access links on a new (unsaved) record');
|
|
345
|
-
if (!this._services) {
|
|
346
|
-
this._services = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
347
|
-
sourceEntity: 'ProductModule:Product',
|
|
348
|
-
targetEntity: 'ServiceModule:Service',
|
|
349
|
-
targetModuleName: 'ServiceModule',
|
|
350
|
-
targetEntityName: 'Service',
|
|
351
|
-
labels: ['Product__Service'],
|
|
352
|
-
}, ServiceRecord_1.ServiceRecord);
|
|
353
|
-
}
|
|
354
|
-
return this._services;
|
|
355
|
-
}
|
|
356
|
-
/**
|
|
357
|
-
* Access linked Product records
|
|
358
|
-
* @remarks Available labels: Product__Product
|
|
359
|
-
* @throws Error if called on a new (unsaved) record
|
|
360
|
-
*
|
|
361
|
-
* @example
|
|
362
|
-
* ```typescript
|
|
363
|
-
* // Get all linked Product records
|
|
364
|
-
* const items = await record.products.list();
|
|
365
|
-
* const first = await record.products.first();
|
|
366
|
-
*
|
|
367
|
-
* // Filter by label
|
|
368
|
-
* const specific = await record.products.first({ label: 'Product__Product' });
|
|
369
|
-
* ```
|
|
370
|
-
*/
|
|
371
|
-
get products() {
|
|
372
|
-
var _a;
|
|
373
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
374
|
-
throw new Error('Cannot access links on a new (unsaved) record');
|
|
375
|
-
if (!this._products) {
|
|
376
|
-
this._products = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
377
|
-
sourceEntity: 'ProductModule:Product',
|
|
378
|
-
targetEntity: 'ProductModule:Product',
|
|
379
|
-
targetModuleName: 'ProductModule',
|
|
380
|
-
targetEntityName: 'Product',
|
|
381
|
-
labels: ['Product__Product'],
|
|
382
|
-
}, ProductRecord);
|
|
383
|
-
}
|
|
384
|
-
return this._products;
|
|
385
|
-
}
|
|
386
|
-
/**
|
|
387
|
-
* Access linked PriceBook records
|
|
388
|
-
* @remarks Available labels: PriceBook__Product
|
|
389
|
-
* @throws Error if called on a new (unsaved) record
|
|
390
|
-
*
|
|
391
|
-
* @example
|
|
392
|
-
* ```typescript
|
|
393
|
-
* // Get all linked PriceBook records
|
|
394
|
-
* const items = await record.priceBooks.list();
|
|
395
|
-
* const first = await record.priceBooks.first();
|
|
396
|
-
*
|
|
397
|
-
* // Filter by label
|
|
398
|
-
* const specific = await record.priceBooks.first({ label: 'PriceBook__Product' });
|
|
399
|
-
* ```
|
|
400
|
-
*/
|
|
401
|
-
get priceBooks() {
|
|
402
|
-
var _a;
|
|
403
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
404
|
-
throw new Error('Cannot access links on a new (unsaved) record');
|
|
405
|
-
if (!this._priceBooks) {
|
|
406
|
-
this._priceBooks = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
407
|
-
sourceEntity: 'ProductModule:Product',
|
|
408
|
-
targetEntity: 'ProductModule:PriceBook',
|
|
409
|
-
targetModuleName: 'ProductModule',
|
|
410
|
-
targetEntityName: 'PriceBook',
|
|
411
|
-
labels: ['PriceBook__Product'],
|
|
412
|
-
}, PriceBookRecord_1.PriceBookRecord);
|
|
413
|
-
}
|
|
414
|
-
return this._priceBooks;
|
|
415
|
-
}
|
|
416
|
-
/**
|
|
417
|
-
* Access linked OrderItem records
|
|
418
|
-
* @remarks Available labels: OrderItem__Product
|
|
419
|
-
* @throws Error if called on a new (unsaved) record
|
|
420
|
-
*
|
|
421
|
-
* @example
|
|
422
|
-
* ```typescript
|
|
423
|
-
* // Get all linked OrderItem records
|
|
424
|
-
* const items = await record.orderItems.list();
|
|
425
|
-
* const first = await record.orderItems.first();
|
|
426
|
-
*
|
|
427
|
-
* // Filter by label
|
|
428
|
-
* const specific = await record.orderItems.first({ label: 'OrderItem__Product' });
|
|
429
|
-
* ```
|
|
430
|
-
*/
|
|
431
|
-
get orderItems() {
|
|
432
|
-
var _a;
|
|
433
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
434
|
-
throw new Error('Cannot access links on a new (unsaved) record');
|
|
435
|
-
if (!this._orderItems) {
|
|
436
|
-
this._orderItems = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
437
|
-
sourceEntity: 'ProductModule:Product',
|
|
438
|
-
targetEntity: 'OrderModule:OrderItem',
|
|
439
|
-
targetModuleName: 'OrderModule',
|
|
440
|
-
targetEntityName: 'OrderItem',
|
|
441
|
-
labels: ['OrderItem__Product'],
|
|
442
|
-
}, OrderItemRecord_1.OrderItemRecord);
|
|
443
|
-
}
|
|
444
|
-
return this._orderItems;
|
|
445
|
-
}
|
|
446
|
-
/**
|
|
447
|
-
* Access linked FieldServiceProduct records
|
|
448
|
-
* @remarks Available labels: FieldServiceProduct__CompatibleProducts
|
|
449
|
-
* @throws Error if called on a new (unsaved) record
|
|
450
|
-
*
|
|
451
|
-
* @example
|
|
452
|
-
* ```typescript
|
|
453
|
-
* // Get all linked FieldServiceProduct records
|
|
454
|
-
* const items = await record.fieldServiceProducts.list();
|
|
455
|
-
* const first = await record.fieldServiceProducts.first();
|
|
456
|
-
*
|
|
457
|
-
* // Filter by label
|
|
458
|
-
* const specific = await record.fieldServiceProducts.first({ label: 'FieldServiceProduct__CompatibleProducts' });
|
|
459
|
-
* ```
|
|
460
|
-
*/
|
|
461
|
-
get fieldServiceProducts() {
|
|
462
|
-
var _a;
|
|
463
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
464
|
-
throw new Error('Cannot access links on a new (unsaved) record');
|
|
465
|
-
if (!this._fieldServiceProducts) {
|
|
466
|
-
this._fieldServiceProducts = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
467
|
-
sourceEntity: 'ProductModule:Product',
|
|
468
|
-
targetEntity: 'FieldServiceModule:FieldServiceProduct',
|
|
469
|
-
targetModuleName: 'FieldServiceModule',
|
|
470
|
-
targetEntityName: 'FieldServiceProduct',
|
|
471
|
-
labels: ['FieldServiceProduct__CompatibleProducts'],
|
|
472
|
-
}, FieldServiceProductRecord_1.FieldServiceProductRecord);
|
|
473
|
-
}
|
|
474
|
-
return this._fieldServiceProducts;
|
|
475
|
-
}
|
|
476
|
-
// ============================================
|
|
477
143
|
// LINK MANAGEMENT
|
|
478
144
|
// ============================================
|
|
479
145
|
/**
|
|
@@ -971,23 +637,6 @@ class ProductRecord {
|
|
|
971
637
|
}
|
|
972
638
|
}
|
|
973
639
|
exports.ProductRecord = ProductRecord;
|
|
974
|
-
// ============================================
|
|
975
|
-
// TYPED LINK ACCESSORS
|
|
976
|
-
// ============================================
|
|
977
|
-
/** Valid labels for Lead associations */
|
|
978
|
-
ProductRecord.leadsLabels = ['Lead__Product'];
|
|
979
|
-
/** Valid labels for Offer associations */
|
|
980
|
-
ProductRecord.offersLabels = ['Offer__Product'];
|
|
981
|
-
/** Valid labels for Service associations */
|
|
982
|
-
ProductRecord.servicesLabels = ['Product__Service'];
|
|
983
|
-
/** Valid labels for Product associations */
|
|
984
|
-
ProductRecord.productsLabels = ['Product__Product'];
|
|
985
|
-
/** Valid labels for PriceBook associations */
|
|
986
|
-
ProductRecord.priceBooksLabels = ['PriceBook__Product'];
|
|
987
|
-
/** Valid labels for OrderItem associations */
|
|
988
|
-
ProductRecord.orderItemsLabels = ['OrderItem__Product'];
|
|
989
|
-
/** Valid labels for FieldServiceProduct associations */
|
|
990
|
-
ProductRecord.fieldServiceProductsLabels = ['FieldServiceProduct__CompatibleProducts'];
|
|
991
640
|
/** Type guard to check if an object is a ProductRecord */
|
|
992
641
|
function isProductRecord(obj) {
|
|
993
642
|
return obj instanceof ProductRecord;
|