@d19n/youfibre-odin-sdk 2.0.80 → 2.0.82
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 +3 -1
- package/dist/actions-v2/SendDirectDebitCreatedEmailDto.d.ts +8 -1
- package/dist/actions-v2/SendDirectDebitFailedEmailDto.d.ts +121 -0
- package/dist/actions-v2/SendDirectDebitFailedEmailDto.js +59 -0
- package/dist/actions-v2/SendDirectDebitSetupConfirmationEmailDto.d.ts +8 -1
- package/dist/actions-v2/SendDirectDebitSetupRequestDto.d.ts +121 -0
- package/dist/actions-v2/SendDirectDebitSetupRequestDto.js +59 -0
- package/dist/actions-v2/SendRefundTransactionEmailDto.d.ts +8 -1
- package/dist/api-sdk-v2/ProductApi.d.ts +2 -2
- package/dist/api-sdk-v2/ProductApi.js +6 -6
- package/dist/api-sdk-v2/ServiceApi.d.ts +2 -2
- package/dist/api-sdk-v2/ServiceApi.js +6 -6
- package/dist/db-sdk-v2/FileDb.d.ts +122 -122
- package/dist/db-sdk-v2/FileDb.js +247 -247
- package/dist/db-sdk-v2/ProductDb.d.ts +2 -2
- package/dist/db-sdk-v2/ProductDb.js +6 -6
- package/dist/db-sdk-v2/ServiceDb.d.ts +2 -2
- package/dist/db-sdk-v2/ServiceDb.js +6 -6
- package/dist/entities-v2/Product.d.ts +7 -7
- package/dist/entities-v2/Product.js +6 -6
- package/dist/entities-v2/Service.d.ts +2 -2
- package/dist/records-v2/EmailRecord.d.ts +58 -0
- package/dist/records-v2/EmailRecord.js +72 -0
- package/dist/records-v2/ProductRecord.d.ts +20 -20
- package/dist/records-v2/ProductRecord.js +33 -33
- package/dist/records-v2/ServiceRecord.d.ts +19 -19
- package/dist/records-v2/ServiceRecord.js +32 -32
- package/package.json +1 -1
|
@@ -24,7 +24,6 @@ export declare class ProductDb extends DbProvider {
|
|
|
24
24
|
private _lead?;
|
|
25
25
|
private _restriction?;
|
|
26
26
|
private _consumptionschedule?;
|
|
27
|
-
private _service?;
|
|
28
27
|
private _pricebook?;
|
|
29
28
|
private _orderitem?;
|
|
30
29
|
private _offer?;
|
|
@@ -32,11 +31,11 @@ export declare class ProductDb extends DbProvider {
|
|
|
32
31
|
private _product?;
|
|
33
32
|
private _vendor?;
|
|
34
33
|
private _fieldserviceproduct?;
|
|
34
|
+
private _service?;
|
|
35
35
|
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
36
36
|
get lead(): DbRecordLinkManager;
|
|
37
37
|
get restriction(): DbRecordLinkManager;
|
|
38
38
|
get consumptionschedule(): DbRecordLinkManager;
|
|
39
|
-
get service(): DbRecordLinkManager;
|
|
40
39
|
get pricebook(): DbRecordLinkManager;
|
|
41
40
|
get orderitem(): DbRecordLinkManager;
|
|
42
41
|
get offer(): DbRecordLinkManager;
|
|
@@ -44,6 +43,7 @@ export declare class ProductDb extends DbProvider {
|
|
|
44
43
|
get product(): DbRecordLinkManager;
|
|
45
44
|
get vendor(): DbRecordLinkManager;
|
|
46
45
|
get fieldserviceproduct(): DbRecordLinkManager;
|
|
46
|
+
get service(): DbRecordLinkManager;
|
|
47
47
|
setRecord(sourceRecord: any): void;
|
|
48
48
|
/**
|
|
49
49
|
* Search records with manual pagination control
|
|
@@ -56,12 +56,6 @@ class ProductDb extends db_provider_1.DbProvider {
|
|
|
56
56
|
}
|
|
57
57
|
return this._consumptionschedule;
|
|
58
58
|
}
|
|
59
|
-
get service() {
|
|
60
|
-
if (!this._service) {
|
|
61
|
-
this._service = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'ProductModule:Product', 'ServiceModule:Service', 'Product__Service');
|
|
62
|
-
}
|
|
63
|
-
return this._service;
|
|
64
|
-
}
|
|
65
59
|
get pricebook() {
|
|
66
60
|
if (!this._pricebook) {
|
|
67
61
|
this._pricebook = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'ProductModule:Product', 'ProductModule:PriceBook', 'PriceBook__Product');
|
|
@@ -104,6 +98,12 @@ class ProductDb extends db_provider_1.DbProvider {
|
|
|
104
98
|
}
|
|
105
99
|
return this._fieldserviceproduct;
|
|
106
100
|
}
|
|
101
|
+
get service() {
|
|
102
|
+
if (!this._service) {
|
|
103
|
+
this._service = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'ProductModule:Product', 'ServiceModule:Service', 'Product__Service');
|
|
104
|
+
}
|
|
105
|
+
return this._service;
|
|
106
|
+
}
|
|
107
107
|
// ============================================
|
|
108
108
|
// STANDARD METHODS
|
|
109
109
|
// ============================================
|
|
@@ -21,11 +21,11 @@ export declare class ServiceDb extends DbProvider {
|
|
|
21
21
|
private readonly moduleName;
|
|
22
22
|
private readonly entityName;
|
|
23
23
|
private sourceRecord;
|
|
24
|
-
private _product?;
|
|
25
24
|
private _service?;
|
|
25
|
+
private _product?;
|
|
26
26
|
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
27
|
-
get product(): DbRecordLinkManager;
|
|
28
27
|
get service(): DbRecordLinkManager;
|
|
28
|
+
get product(): DbRecordLinkManager;
|
|
29
29
|
setRecord(sourceRecord: any): void;
|
|
30
30
|
/**
|
|
31
31
|
* Search records with manual pagination control
|
|
@@ -38,18 +38,18 @@ class ServiceDb extends db_provider_1.DbProvider {
|
|
|
38
38
|
// LAZY-LOADED LINK MANAGERS (Public Getters)
|
|
39
39
|
// ============================================
|
|
40
40
|
// Usage remains identical: db.address.list(recordId)
|
|
41
|
-
get product() {
|
|
42
|
-
if (!this._product) {
|
|
43
|
-
this._product = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'ServiceModule:Service', 'ProductModule:Product', 'Product__Service');
|
|
44
|
-
}
|
|
45
|
-
return this._product;
|
|
46
|
-
}
|
|
47
41
|
get service() {
|
|
48
42
|
if (!this._service) {
|
|
49
43
|
this._service = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'ServiceModule:Service', 'ServiceModule:Service', 'Service__Service');
|
|
50
44
|
}
|
|
51
45
|
return this._service;
|
|
52
46
|
}
|
|
47
|
+
get product() {
|
|
48
|
+
if (!this._product) {
|
|
49
|
+
this._product = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'ServiceModule:Service', 'ProductModule:Product', 'Product__Service');
|
|
50
|
+
}
|
|
51
|
+
return this._product;
|
|
52
|
+
}
|
|
53
53
|
// ============================================
|
|
54
54
|
// STANDARD METHODS
|
|
55
55
|
// ============================================
|
|
@@ -14,13 +14,13 @@ import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/co
|
|
|
14
14
|
import { LeadProperties } from './Lead';
|
|
15
15
|
import { RestrictionProperties } from './Restriction';
|
|
16
16
|
import { ConsumptionScheduleProperties } from './ConsumptionSchedule';
|
|
17
|
-
import { ServiceProperties } from './Service';
|
|
18
17
|
import { PriceBookProperties } from './PriceBook';
|
|
19
18
|
import { OrderItemProperties } from './OrderItem';
|
|
20
19
|
import { OfferProperties } from './Offer';
|
|
21
20
|
import { ProductComponentProperties } from './ProductComponent';
|
|
22
21
|
import { VendorProperties } from './Vendor';
|
|
23
22
|
import { FieldServiceProductProperties } from './FieldServiceProduct';
|
|
23
|
+
import { ServiceProperties } from './Service';
|
|
24
24
|
/**
|
|
25
25
|
* Available types for Product records
|
|
26
26
|
*/
|
|
@@ -2929,8 +2929,6 @@ export declare class Product extends OdinRecord<ProductProperties> {
|
|
|
2929
2929
|
Restriction: OdinLink<LinkedOdinRecord<RestrictionProperties>>;
|
|
2930
2930
|
/** Linked ConsumptionSchedule records (Product__ConsumptionSchedule) */
|
|
2931
2931
|
ConsumptionSchedule: OdinLink<LinkedOdinRecord<ConsumptionScheduleProperties>>;
|
|
2932
|
-
/** Linked Service records (Product__Service) */
|
|
2933
|
-
Service: OdinLink<LinkedOdinRecord<ServiceProperties>>;
|
|
2934
2932
|
/** Linked PriceBook records (PriceBook__Product) */
|
|
2935
2933
|
PriceBook: OdinLink<LinkedOdinRecord<PriceBookProperties>>;
|
|
2936
2934
|
/** Linked OrderItem records (OrderItem__Product) */
|
|
@@ -2945,6 +2943,8 @@ export declare class Product extends OdinRecord<ProductProperties> {
|
|
|
2945
2943
|
Vendor: OdinLink<LinkedOdinRecord<VendorProperties>>;
|
|
2946
2944
|
/** Linked FieldServiceProduct records (FieldServiceProduct__CompatibleProducts) */
|
|
2947
2945
|
FieldServiceProduct: OdinLink<LinkedOdinRecord<FieldServiceProductProperties>>;
|
|
2946
|
+
/** Linked Service records (Product__Service) */
|
|
2947
|
+
Service: OdinLink<LinkedOdinRecord<ServiceProperties>>;
|
|
2948
2948
|
}
|
|
2949
2949
|
/**
|
|
2950
2950
|
* RabbitMQ routing keys for Product events
|
|
@@ -3006,10 +3006,6 @@ export declare const ROUTING_KEY_LINK_PRODUCT_RESTRICTION_DELETED = "ProductModu
|
|
|
3006
3006
|
export declare const ROUTING_KEY_LINK_PRODUCT_CONSUMPTION_SCHEDULE_CREATED = "ProductModule.Product.ConsumptionSchedule.SubDbRecordAssociationCreated";
|
|
3007
3007
|
/** Event: Product__ConsumptionSchedule link deleted */
|
|
3008
3008
|
export declare const ROUTING_KEY_LINK_PRODUCT_CONSUMPTION_SCHEDULE_DELETED = "ProductModule.Product.ConsumptionSchedule.SubDbRecordAssociationDeleted";
|
|
3009
|
-
/** Event: Product__Service link created */
|
|
3010
|
-
export declare const ROUTING_KEY_LINK_PRODUCT_SERVICE_CREATED = "ProductModule.Product.Service.SubDbRecordAssociationCreated";
|
|
3011
|
-
/** Event: Product__Service link deleted */
|
|
3012
|
-
export declare const ROUTING_KEY_LINK_PRODUCT_SERVICE_DELETED = "ProductModule.Product.Service.SubDbRecordAssociationDeleted";
|
|
3013
3009
|
/** Event: Product__ProductComponent link created */
|
|
3014
3010
|
export declare const ROUTING_KEY_LINK_PRODUCT_PRODUCT_COMPONENT_CREATED = "ProductModule.Product.ProductComponent.SubDbRecordAssociationCreated";
|
|
3015
3011
|
/** Event: Product__ProductComponent link deleted */
|
|
@@ -3018,3 +3014,7 @@ export declare const ROUTING_KEY_LINK_PRODUCT_PRODUCT_COMPONENT_DELETED = "Produ
|
|
|
3018
3014
|
export declare const ROUTING_KEY_LINK_PRODUCT_PRODUCT_CREATED = "ProductModule.Product.Product.SubDbRecordAssociationCreated";
|
|
3019
3015
|
/** Event: Product__Product link deleted */
|
|
3020
3016
|
export declare const ROUTING_KEY_LINK_PRODUCT_PRODUCT_DELETED = "ProductModule.Product.Product.SubDbRecordAssociationDeleted";
|
|
3017
|
+
/** Event: Product__Service link created */
|
|
3018
|
+
export declare const ROUTING_KEY_LINK_PRODUCT_SERVICE_CREATED = "ProductModule.Product.Service.SubDbRecordAssociationCreated";
|
|
3019
|
+
/** Event: Product__Service link deleted */
|
|
3020
|
+
export declare const ROUTING_KEY_LINK_PRODUCT_SERVICE_DELETED = "ProductModule.Product.Service.SubDbRecordAssociationDeleted";
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* Generated from Odin schema definition
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
15
|
+
exports.ROUTING_KEY_LINK_PRODUCT_PRODUCT_COMPONENT_CREATED = exports.ROUTING_KEY_LINK_PRODUCT_CONSUMPTION_SCHEDULE_DELETED = exports.ROUTING_KEY_LINK_PRODUCT_CONSUMPTION_SCHEDULE_CREATED = exports.ROUTING_KEY_LINK_PRODUCT_RESTRICTION_DELETED = exports.ROUTING_KEY_LINK_PRODUCT_RESTRICTION_CREATED = exports.ROUTING_KEY_PRODUCT_TELEVISION_DELETED = exports.ROUTING_KEY_PRODUCT_TELEVISION_UPDATED = exports.ROUTING_KEY_PRODUCT_TELEVISION_CREATED = exports.ROUTING_KEY_PRODUCT_MOBILE_DELETED = exports.ROUTING_KEY_PRODUCT_MOBILE_UPDATED = exports.ROUTING_KEY_PRODUCT_MOBILE_CREATED = exports.ROUTING_KEY_PRODUCT_MESH_DELETED = exports.ROUTING_KEY_PRODUCT_MESH_UPDATED = exports.ROUTING_KEY_PRODUCT_MESH_CREATED = exports.ROUTING_KEY_PRODUCT_LANDLINE_DELETED = exports.ROUTING_KEY_PRODUCT_LANDLINE_UPDATED = exports.ROUTING_KEY_PRODUCT_LANDLINE_CREATED = exports.ROUTING_KEY_PRODUCT_LABOR_DELETED = exports.ROUTING_KEY_PRODUCT_LABOR_UPDATED = exports.ROUTING_KEY_PRODUCT_LABOR_CREATED = exports.ROUTING_KEY_PRODUCT_INTERNET_DELETED = exports.ROUTING_KEY_PRODUCT_INTERNET_UPDATED = exports.ROUTING_KEY_PRODUCT_INTERNET_CREATED = exports.ROUTING_KEY_PRODUCT_BUNDLE_DELETED = exports.ROUTING_KEY_PRODUCT_BUNDLE_UPDATED = exports.ROUTING_KEY_PRODUCT_BUNDLE_CREATED = exports.ROUTING_KEY_PRODUCT_DELETED = exports.ROUTING_KEY_PRODUCT_UPDATED = exports.ROUTING_KEY_PRODUCT_CREATED = exports.Product = exports.ProductPropertyKeys = exports.ProductType = exports.ProductContractType = exports.ProductDiscount2Unit = exports.ProductDiscount2Type = exports.ProductTaxIncluded = exports.ProductChargeType = exports.ProductTaxable = exports.ProductTrialUnit = exports.ProductCustomerType = exports.ProductRequiresProvisioning = exports.ProductRetrievable = exports.ProductShippable = exports.ProductRequiresOnSiteSetup = exports.ProductDiscountType = exports.ProductDiscountUnit = exports.ProductCategory = exports.ProductIntervalUnit = exports.ProductUnitType = exports.ProductEntityTypes = void 0;
|
|
16
|
+
exports.ROUTING_KEY_LINK_PRODUCT_SERVICE_DELETED = exports.ROUTING_KEY_LINK_PRODUCT_SERVICE_CREATED = exports.ROUTING_KEY_LINK_PRODUCT_PRODUCT_DELETED = exports.ROUTING_KEY_LINK_PRODUCT_PRODUCT_CREATED = exports.ROUTING_KEY_LINK_PRODUCT_PRODUCT_COMPONENT_DELETED = void 0;
|
|
17
17
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
18
18
|
/**
|
|
19
19
|
* Available types for Product records
|
|
@@ -502,10 +502,6 @@ exports.ROUTING_KEY_LINK_PRODUCT_RESTRICTION_DELETED = 'ProductModule.Product.Re
|
|
|
502
502
|
exports.ROUTING_KEY_LINK_PRODUCT_CONSUMPTION_SCHEDULE_CREATED = 'ProductModule.Product.ConsumptionSchedule.SubDbRecordAssociationCreated';
|
|
503
503
|
/** Event: Product__ConsumptionSchedule link deleted */
|
|
504
504
|
exports.ROUTING_KEY_LINK_PRODUCT_CONSUMPTION_SCHEDULE_DELETED = 'ProductModule.Product.ConsumptionSchedule.SubDbRecordAssociationDeleted';
|
|
505
|
-
/** Event: Product__Service link created */
|
|
506
|
-
exports.ROUTING_KEY_LINK_PRODUCT_SERVICE_CREATED = 'ProductModule.Product.Service.SubDbRecordAssociationCreated';
|
|
507
|
-
/** Event: Product__Service link deleted */
|
|
508
|
-
exports.ROUTING_KEY_LINK_PRODUCT_SERVICE_DELETED = 'ProductModule.Product.Service.SubDbRecordAssociationDeleted';
|
|
509
505
|
/** Event: Product__ProductComponent link created */
|
|
510
506
|
exports.ROUTING_KEY_LINK_PRODUCT_PRODUCT_COMPONENT_CREATED = 'ProductModule.Product.ProductComponent.SubDbRecordAssociationCreated';
|
|
511
507
|
/** Event: Product__ProductComponent link deleted */
|
|
@@ -514,3 +510,7 @@ exports.ROUTING_KEY_LINK_PRODUCT_PRODUCT_COMPONENT_DELETED = 'ProductModule.Prod
|
|
|
514
510
|
exports.ROUTING_KEY_LINK_PRODUCT_PRODUCT_CREATED = 'ProductModule.Product.Product.SubDbRecordAssociationCreated';
|
|
515
511
|
/** Event: Product__Product link deleted */
|
|
516
512
|
exports.ROUTING_KEY_LINK_PRODUCT_PRODUCT_DELETED = 'ProductModule.Product.Product.SubDbRecordAssociationDeleted';
|
|
513
|
+
/** Event: Product__Service link created */
|
|
514
|
+
exports.ROUTING_KEY_LINK_PRODUCT_SERVICE_CREATED = 'ProductModule.Product.Service.SubDbRecordAssociationCreated';
|
|
515
|
+
/** Event: Product__Service link deleted */
|
|
516
|
+
exports.ROUTING_KEY_LINK_PRODUCT_SERVICE_DELETED = 'ProductModule.Product.Service.SubDbRecordAssociationDeleted';
|
|
@@ -194,10 +194,10 @@ export declare class Service extends OdinRecord<ServiceProperties> {
|
|
|
194
194
|
type: ServiceEntityTypes;
|
|
195
195
|
schemaId: 'b57b66ad-7325-4fb4-b6b8-da81535262cb';
|
|
196
196
|
properties: ServiceProperties;
|
|
197
|
-
/** Linked Product records (Product__Service) */
|
|
198
|
-
Product: OdinLink<LinkedOdinRecord<ProductProperties>>;
|
|
199
197
|
/** Linked Service records (Service__Service) */
|
|
200
198
|
Service: OdinLink<LinkedOdinRecord<ServiceProperties>>;
|
|
199
|
+
/** Linked Product records (Product__Service) */
|
|
200
|
+
Product: OdinLink<LinkedOdinRecord<ProductProperties>>;
|
|
201
201
|
}
|
|
202
202
|
/**
|
|
203
203
|
* RabbitMQ routing keys for Service events
|
|
@@ -39,7 +39,9 @@ import { CreateOrderReferralReferrerPendingEmailProperties } from '../actions-v2
|
|
|
39
39
|
import { CreateOrderReferralReferrerQualifiedEmailProperties } from '../actions-v2/CreateOrderReferralReferrerQualifiedEmailDto';
|
|
40
40
|
import { CreateTransactionalEmailProperties } from '../actions-v2/CreateTransactionalEmailDto';
|
|
41
41
|
import { SendDirectDebitCreatedEmailProperties } from '../actions-v2/SendDirectDebitCreatedEmailDto';
|
|
42
|
+
import { SendDirectDebitFailedEmailProperties } from '../actions-v2/SendDirectDebitFailedEmailDto';
|
|
42
43
|
import { SendDirectDebitSetupConfirmationEmailProperties } from '../actions-v2/SendDirectDebitSetupConfirmationEmailDto';
|
|
44
|
+
import { SendDirectDebitSetupRequestProperties } from '../actions-v2/SendDirectDebitSetupRequestDto';
|
|
43
45
|
import { SendRefundTransactionEmailProperties } from '../actions-v2/SendRefundTransactionEmailDto';
|
|
44
46
|
import { SendTlosNinjaCaseEmailProperties } from '../actions-v2/SendTlosNinjaCaseEmailDto';
|
|
45
47
|
import { UpdateEmailProperties } from '../actions-v2/UpdateEmailDto';
|
|
@@ -806,6 +808,34 @@ export declare class EmailRecord<TProps = EmailProperties> {
|
|
|
806
808
|
journeyId?: string;
|
|
807
809
|
stageKey?: string;
|
|
808
810
|
}): ActionBuilder;
|
|
811
|
+
/**
|
|
812
|
+
* SendDirectDebitFailedEmail
|
|
813
|
+
*
|
|
814
|
+
* Creates a new Email record with the specified properties.
|
|
815
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
816
|
+
*
|
|
817
|
+
* @remarks Record type: TRANSACTIONAL
|
|
818
|
+
*
|
|
819
|
+
* @param properties - The properties for the new record
|
|
820
|
+
* @param options - Optional settings
|
|
821
|
+
* @param options.journeyId - Associate with a journey
|
|
822
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
823
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
824
|
+
*
|
|
825
|
+
* @example
|
|
826
|
+
* ```typescript
|
|
827
|
+
* // Create with properties
|
|
828
|
+
* const record = odinClient.emails.new();
|
|
829
|
+
* await record.sendDirectDebitFailedEmail({ ... }).execute();
|
|
830
|
+
*
|
|
831
|
+
* // Dry run (for debugging)
|
|
832
|
+
* const payload = record.sendDirectDebitFailedEmail({ ... }).dryRun();
|
|
833
|
+
* ```
|
|
834
|
+
*/
|
|
835
|
+
sendDirectDebitFailedEmail(properties?: SendDirectDebitFailedEmailProperties, options?: {
|
|
836
|
+
journeyId?: string;
|
|
837
|
+
stageKey?: string;
|
|
838
|
+
}): ActionBuilder;
|
|
809
839
|
/**
|
|
810
840
|
* SendDirectDebitSetupConfirmationEmail
|
|
811
841
|
*
|
|
@@ -834,6 +864,34 @@ export declare class EmailRecord<TProps = EmailProperties> {
|
|
|
834
864
|
journeyId?: string;
|
|
835
865
|
stageKey?: string;
|
|
836
866
|
}): ActionBuilder;
|
|
867
|
+
/**
|
|
868
|
+
* SendDirectDebitSetupRequest
|
|
869
|
+
*
|
|
870
|
+
* Creates a new Email record with the specified properties.
|
|
871
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
872
|
+
*
|
|
873
|
+
* @remarks Record type: TRANSACTIONAL
|
|
874
|
+
*
|
|
875
|
+
* @param properties - The properties for the new record
|
|
876
|
+
* @param options - Optional settings
|
|
877
|
+
* @param options.journeyId - Associate with a journey
|
|
878
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
879
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
880
|
+
*
|
|
881
|
+
* @example
|
|
882
|
+
* ```typescript
|
|
883
|
+
* // Create with properties
|
|
884
|
+
* const record = odinClient.emails.new();
|
|
885
|
+
* await record.sendDirectDebitSetupRequest({ ... }).execute();
|
|
886
|
+
*
|
|
887
|
+
* // Dry run (for debugging)
|
|
888
|
+
* const payload = record.sendDirectDebitSetupRequest({ ... }).dryRun();
|
|
889
|
+
* ```
|
|
890
|
+
*/
|
|
891
|
+
sendDirectDebitSetupRequest(properties?: SendDirectDebitSetupRequestProperties, options?: {
|
|
892
|
+
journeyId?: string;
|
|
893
|
+
stageKey?: string;
|
|
894
|
+
}): ActionBuilder;
|
|
837
895
|
/**
|
|
838
896
|
* SendRefundTransactionEmail
|
|
839
897
|
*
|
|
@@ -1039,6 +1039,42 @@ class EmailRecord {
|
|
|
1039
1039
|
};
|
|
1040
1040
|
return new ActionBuilder(this._provider, 'NotificationModule', 'Email', payload, () => { this._pendingLinks = []; });
|
|
1041
1041
|
}
|
|
1042
|
+
/**
|
|
1043
|
+
* SendDirectDebitFailedEmail
|
|
1044
|
+
*
|
|
1045
|
+
* Creates a new Email record with the specified properties.
|
|
1046
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
1047
|
+
*
|
|
1048
|
+
* @remarks Record type: TRANSACTIONAL
|
|
1049
|
+
*
|
|
1050
|
+
* @param properties - The properties for the new record
|
|
1051
|
+
* @param options - Optional settings
|
|
1052
|
+
* @param options.journeyId - Associate with a journey
|
|
1053
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
1054
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
1055
|
+
*
|
|
1056
|
+
* @example
|
|
1057
|
+
* ```typescript
|
|
1058
|
+
* // Create with properties
|
|
1059
|
+
* const record = odinClient.emails.new();
|
|
1060
|
+
* await record.sendDirectDebitFailedEmail({ ... }).execute();
|
|
1061
|
+
*
|
|
1062
|
+
* // Dry run (for debugging)
|
|
1063
|
+
* const payload = record.sendDirectDebitFailedEmail({ ... }).dryRun();
|
|
1064
|
+
* ```
|
|
1065
|
+
*/
|
|
1066
|
+
sendDirectDebitFailedEmail(properties, options) {
|
|
1067
|
+
const payload = {
|
|
1068
|
+
entity: 'NotificationModule:Email',
|
|
1069
|
+
type: 'TRANSACTIONAL',
|
|
1070
|
+
actionName: 'SendDirectDebitFailedEmail',
|
|
1071
|
+
properties: properties || {},
|
|
1072
|
+
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
1073
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
1074
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
1075
|
+
};
|
|
1076
|
+
return new ActionBuilder(this._provider, 'NotificationModule', 'Email', payload, () => { this._pendingLinks = []; });
|
|
1077
|
+
}
|
|
1042
1078
|
/**
|
|
1043
1079
|
* SendDirectDebitSetupConfirmationEmail
|
|
1044
1080
|
*
|
|
@@ -1075,6 +1111,42 @@ class EmailRecord {
|
|
|
1075
1111
|
};
|
|
1076
1112
|
return new ActionBuilder(this._provider, 'NotificationModule', 'Email', payload, () => { this._pendingLinks = []; });
|
|
1077
1113
|
}
|
|
1114
|
+
/**
|
|
1115
|
+
* SendDirectDebitSetupRequest
|
|
1116
|
+
*
|
|
1117
|
+
* Creates a new Email record with the specified properties.
|
|
1118
|
+
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
1119
|
+
*
|
|
1120
|
+
* @remarks Record type: TRANSACTIONAL
|
|
1121
|
+
*
|
|
1122
|
+
* @param properties - The properties for the new record
|
|
1123
|
+
* @param options - Optional settings
|
|
1124
|
+
* @param options.journeyId - Associate with a journey
|
|
1125
|
+
* @param options.stageKey - Set initial pipeline stage
|
|
1126
|
+
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
1127
|
+
*
|
|
1128
|
+
* @example
|
|
1129
|
+
* ```typescript
|
|
1130
|
+
* // Create with properties
|
|
1131
|
+
* const record = odinClient.emails.new();
|
|
1132
|
+
* await record.sendDirectDebitSetupRequest({ ... }).execute();
|
|
1133
|
+
*
|
|
1134
|
+
* // Dry run (for debugging)
|
|
1135
|
+
* const payload = record.sendDirectDebitSetupRequest({ ... }).dryRun();
|
|
1136
|
+
* ```
|
|
1137
|
+
*/
|
|
1138
|
+
sendDirectDebitSetupRequest(properties, options) {
|
|
1139
|
+
const payload = {
|
|
1140
|
+
entity: 'NotificationModule:Email',
|
|
1141
|
+
type: 'TRANSACTIONAL',
|
|
1142
|
+
actionName: 'SendDirectDebitSetupRequest',
|
|
1143
|
+
properties: properties || {},
|
|
1144
|
+
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
1145
|
+
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
1146
|
+
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
1147
|
+
};
|
|
1148
|
+
return new ActionBuilder(this._provider, 'NotificationModule', 'Email', payload, () => { this._pendingLinks = []; });
|
|
1149
|
+
}
|
|
1078
1150
|
/**
|
|
1079
1151
|
* SendRefundTransactionEmail
|
|
1080
1152
|
*
|
|
@@ -38,11 +38,11 @@ import { UpdateMeshProductActionProperties } from '../actions-v2/UpdateMeshProdu
|
|
|
38
38
|
import { UpdateMobileProductActionProperties } from '../actions-v2/UpdateMobileProductActionDto';
|
|
39
39
|
import { UpdateTelevisionProductActionProperties } from '../actions-v2/UpdateTelevisionProductActionDto';
|
|
40
40
|
import { LeadRecord } from './LeadRecord';
|
|
41
|
-
import { ServiceRecord } from './ServiceRecord';
|
|
42
41
|
import { PriceBookRecord } from './PriceBookRecord';
|
|
43
42
|
import { OrderItemRecord } from './OrderItemRecord';
|
|
44
43
|
import { OfferRecord } from './OfferRecord';
|
|
45
44
|
import { FieldServiceProductRecord } from './FieldServiceProductRecord';
|
|
45
|
+
import { ServiceRecord } from './ServiceRecord';
|
|
46
46
|
/** Valid entity types for Product */
|
|
47
47
|
export declare type ProductType = 'BUNDLE' | 'INTERNET' | 'LABOR' | 'LANDLINE' | 'MESH' | 'MOBILE' | 'TELEVISION';
|
|
48
48
|
/**
|
|
@@ -109,12 +109,12 @@ export declare class ProductRecord<TProps = ProductProperties> {
|
|
|
109
109
|
private _pendingLinks;
|
|
110
110
|
private _preGeneratedId;
|
|
111
111
|
private _leads?;
|
|
112
|
-
private _services?;
|
|
113
112
|
private _priceBooks?;
|
|
114
113
|
private _orderItems?;
|
|
115
114
|
private _offers?;
|
|
116
115
|
private _products?;
|
|
117
116
|
private _fieldServiceProducts?;
|
|
117
|
+
private _services?;
|
|
118
118
|
/**
|
|
119
119
|
* Create a record wrapper.
|
|
120
120
|
* @param record - The underlying record, or null for create operations
|
|
@@ -270,24 +270,6 @@ export declare class ProductRecord<TProps = ProductProperties> {
|
|
|
270
270
|
* ```
|
|
271
271
|
*/
|
|
272
272
|
get leads(): RecordLinkManager<LeadRecord, typeof ProductRecord['leadsLabels'][number]>;
|
|
273
|
-
/** Valid labels for Service associations */
|
|
274
|
-
static readonly servicesLabels: readonly ["Product__Service"];
|
|
275
|
-
/**
|
|
276
|
-
* Access linked Service records
|
|
277
|
-
* @remarks Available labels: Product__Service
|
|
278
|
-
* @throws Error if called on a new (unsaved) record
|
|
279
|
-
*
|
|
280
|
-
* @example
|
|
281
|
-
* ```typescript
|
|
282
|
-
* // Get all linked Service records
|
|
283
|
-
* const items = await record.services.list();
|
|
284
|
-
* const first = await record.services.first();
|
|
285
|
-
*
|
|
286
|
-
* // Filter by label
|
|
287
|
-
* const specific = await record.services.first({ label: 'Product__Service' });
|
|
288
|
-
* ```
|
|
289
|
-
*/
|
|
290
|
-
get services(): RecordLinkManager<ServiceRecord, typeof ProductRecord['servicesLabels'][number]>;
|
|
291
273
|
/** Valid labels for PriceBook associations */
|
|
292
274
|
static readonly priceBooksLabels: readonly ["PriceBook__Product"];
|
|
293
275
|
/**
|
|
@@ -378,6 +360,24 @@ export declare class ProductRecord<TProps = ProductProperties> {
|
|
|
378
360
|
* ```
|
|
379
361
|
*/
|
|
380
362
|
get fieldServiceProducts(): RecordLinkManager<FieldServiceProductRecord, typeof ProductRecord['fieldServiceProductsLabels'][number]>;
|
|
363
|
+
/** Valid labels for Service associations */
|
|
364
|
+
static readonly servicesLabels: readonly ["Product__Service"];
|
|
365
|
+
/**
|
|
366
|
+
* Access linked Service records
|
|
367
|
+
* @remarks Available labels: Product__Service
|
|
368
|
+
* @throws Error if called on a new (unsaved) record
|
|
369
|
+
*
|
|
370
|
+
* @example
|
|
371
|
+
* ```typescript
|
|
372
|
+
* // Get all linked Service records
|
|
373
|
+
* const items = await record.services.list();
|
|
374
|
+
* const first = await record.services.first();
|
|
375
|
+
*
|
|
376
|
+
* // Filter by label
|
|
377
|
+
* const specific = await record.services.first({ label: 'Product__Service' });
|
|
378
|
+
* ```
|
|
379
|
+
*/
|
|
380
|
+
get services(): RecordLinkManager<ServiceRecord, typeof ProductRecord['servicesLabels'][number]>;
|
|
381
381
|
/**
|
|
382
382
|
* Queue a link to be created with the next action.
|
|
383
383
|
* Works for both create and update actions.
|
|
@@ -33,11 +33,11 @@ const uuid_1 = require("uuid");
|
|
|
33
33
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
34
34
|
const record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/record-link-manager");
|
|
35
35
|
const LeadRecord_1 = require("./LeadRecord");
|
|
36
|
-
const ServiceRecord_1 = require("./ServiceRecord");
|
|
37
36
|
const PriceBookRecord_1 = require("./PriceBookRecord");
|
|
38
37
|
const OrderItemRecord_1 = require("./OrderItemRecord");
|
|
39
38
|
const OfferRecord_1 = require("./OfferRecord");
|
|
40
39
|
const FieldServiceProductRecord_1 = require("./FieldServiceProductRecord");
|
|
40
|
+
const ServiceRecord_1 = require("./ServiceRecord");
|
|
41
41
|
/**
|
|
42
42
|
* Builder for action execution with dryRun support
|
|
43
43
|
*
|
|
@@ -293,36 +293,6 @@ class ProductRecord {
|
|
|
293
293
|
}
|
|
294
294
|
return this._leads;
|
|
295
295
|
}
|
|
296
|
-
/**
|
|
297
|
-
* Access linked Service records
|
|
298
|
-
* @remarks Available labels: Product__Service
|
|
299
|
-
* @throws Error if called on a new (unsaved) record
|
|
300
|
-
*
|
|
301
|
-
* @example
|
|
302
|
-
* ```typescript
|
|
303
|
-
* // Get all linked Service records
|
|
304
|
-
* const items = await record.services.list();
|
|
305
|
-
* const first = await record.services.first();
|
|
306
|
-
*
|
|
307
|
-
* // Filter by label
|
|
308
|
-
* const specific = await record.services.first({ label: 'Product__Service' });
|
|
309
|
-
* ```
|
|
310
|
-
*/
|
|
311
|
-
get services() {
|
|
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._services) {
|
|
316
|
-
this._services = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
317
|
-
sourceEntity: 'ProductModule:Product',
|
|
318
|
-
targetEntity: 'ServiceModule:Service',
|
|
319
|
-
targetModuleName: 'ServiceModule',
|
|
320
|
-
targetEntityName: 'Service',
|
|
321
|
-
labels: ['Product__Service'],
|
|
322
|
-
}, ServiceRecord_1.ServiceRecord);
|
|
323
|
-
}
|
|
324
|
-
return this._services;
|
|
325
|
-
}
|
|
326
296
|
/**
|
|
327
297
|
* Access linked PriceBook records
|
|
328
298
|
* @remarks Available labels: PriceBook__Product
|
|
@@ -473,6 +443,36 @@ class ProductRecord {
|
|
|
473
443
|
}
|
|
474
444
|
return this._fieldServiceProducts;
|
|
475
445
|
}
|
|
446
|
+
/**
|
|
447
|
+
* Access linked Service records
|
|
448
|
+
* @remarks Available labels: Product__Service
|
|
449
|
+
* @throws Error if called on a new (unsaved) record
|
|
450
|
+
*
|
|
451
|
+
* @example
|
|
452
|
+
* ```typescript
|
|
453
|
+
* // Get all linked Service records
|
|
454
|
+
* const items = await record.services.list();
|
|
455
|
+
* const first = await record.services.first();
|
|
456
|
+
*
|
|
457
|
+
* // Filter by label
|
|
458
|
+
* const specific = await record.services.first({ label: 'Product__Service' });
|
|
459
|
+
* ```
|
|
460
|
+
*/
|
|
461
|
+
get services() {
|
|
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._services) {
|
|
466
|
+
this._services = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
467
|
+
sourceEntity: 'ProductModule:Product',
|
|
468
|
+
targetEntity: 'ServiceModule:Service',
|
|
469
|
+
targetModuleName: 'ServiceModule',
|
|
470
|
+
targetEntityName: 'Service',
|
|
471
|
+
labels: ['Product__Service'],
|
|
472
|
+
}, ServiceRecord_1.ServiceRecord);
|
|
473
|
+
}
|
|
474
|
+
return this._services;
|
|
475
|
+
}
|
|
476
476
|
// ============================================
|
|
477
477
|
// LINK MANAGEMENT
|
|
478
478
|
// ============================================
|
|
@@ -976,8 +976,6 @@ exports.ProductRecord = ProductRecord;
|
|
|
976
976
|
// ============================================
|
|
977
977
|
/** Valid labels for Lead associations */
|
|
978
978
|
ProductRecord.leadsLabels = ['Lead__Product'];
|
|
979
|
-
/** Valid labels for Service associations */
|
|
980
|
-
ProductRecord.servicesLabels = ['Product__Service'];
|
|
981
979
|
/** Valid labels for PriceBook associations */
|
|
982
980
|
ProductRecord.priceBooksLabels = ['PriceBook__Product'];
|
|
983
981
|
/** Valid labels for OrderItem associations */
|
|
@@ -988,6 +986,8 @@ ProductRecord.offersLabels = ['Offer__Product'];
|
|
|
988
986
|
ProductRecord.productsLabels = ['Product__Product'];
|
|
989
987
|
/** Valid labels for FieldServiceProduct associations */
|
|
990
988
|
ProductRecord.fieldServiceProductsLabels = ['FieldServiceProduct__CompatibleProducts'];
|
|
989
|
+
/** Valid labels for Service associations */
|
|
990
|
+
ProductRecord.servicesLabels = ['Product__Service'];
|
|
991
991
|
/** Type guard to check if an object is a ProductRecord */
|
|
992
992
|
function isProductRecord(obj) {
|
|
993
993
|
return obj instanceof ProductRecord;
|
|
@@ -86,8 +86,8 @@ export declare class ServiceRecord<TProps = ServiceProperties> {
|
|
|
86
86
|
private _provider;
|
|
87
87
|
private _pendingLinks;
|
|
88
88
|
private _preGeneratedId;
|
|
89
|
-
private _products?;
|
|
90
89
|
private _services?;
|
|
90
|
+
private _products?;
|
|
91
91
|
/**
|
|
92
92
|
* Create a record wrapper.
|
|
93
93
|
* @param record - The underlying record, or null for create operations
|
|
@@ -113,24 +113,6 @@ export declare class ServiceRecord<TProps = ServiceProperties> {
|
|
|
113
113
|
get groups(): string[];
|
|
114
114
|
/** Access the underlying OdinRecord (null for new records) */
|
|
115
115
|
get record(): OdinRecord<TProps> | null;
|
|
116
|
-
/** Valid labels for Product associations */
|
|
117
|
-
static readonly productsLabels: readonly ["Product__Service"];
|
|
118
|
-
/**
|
|
119
|
-
* Access linked Product records
|
|
120
|
-
* @remarks Available labels: Product__Service
|
|
121
|
-
* @throws Error if called on a new (unsaved) record
|
|
122
|
-
*
|
|
123
|
-
* @example
|
|
124
|
-
* ```typescript
|
|
125
|
-
* // Get all linked Product records
|
|
126
|
-
* const items = await record.products.list();
|
|
127
|
-
* const first = await record.products.first();
|
|
128
|
-
*
|
|
129
|
-
* // Filter by label
|
|
130
|
-
* const specific = await record.products.first({ label: 'Product__Service' });
|
|
131
|
-
* ```
|
|
132
|
-
*/
|
|
133
|
-
get products(): RecordLinkManager<ProductRecord, typeof ServiceRecord['productsLabels'][number]>;
|
|
134
116
|
/** Valid labels for Service associations */
|
|
135
117
|
static readonly servicesLabels: readonly ["Service__Service"];
|
|
136
118
|
/**
|
|
@@ -149,6 +131,24 @@ export declare class ServiceRecord<TProps = ServiceProperties> {
|
|
|
149
131
|
* ```
|
|
150
132
|
*/
|
|
151
133
|
get services(): RecordLinkManager<ServiceRecord, typeof ServiceRecord['servicesLabels'][number]>;
|
|
134
|
+
/** Valid labels for Product associations */
|
|
135
|
+
static readonly productsLabels: readonly ["Product__Service"];
|
|
136
|
+
/**
|
|
137
|
+
* Access linked Product records
|
|
138
|
+
* @remarks Available labels: Product__Service
|
|
139
|
+
* @throws Error if called on a new (unsaved) record
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* ```typescript
|
|
143
|
+
* // Get all linked Product records
|
|
144
|
+
* const items = await record.products.list();
|
|
145
|
+
* const first = await record.products.first();
|
|
146
|
+
*
|
|
147
|
+
* // Filter by label
|
|
148
|
+
* const specific = await record.products.first({ label: 'Product__Service' });
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
get products(): RecordLinkManager<ProductRecord, typeof ServiceRecord['productsLabels'][number]>;
|
|
152
152
|
/**
|
|
153
153
|
* Queue a link to be created with the next action.
|
|
154
154
|
* Works for both create and update actions.
|