@d19n/youfibre-odin-sdk 2.0.256-beta.2 → 2.0.256

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 CHANGED
@@ -264,7 +264,7 @@ This SDK includes **174** entities across **12** modules.
264
264
  | Entity | Description | Types |
265
265
  |--------|-------------|-------|
266
266
  | **BngProvision** | BngProvision Entity Definition | DEFAULT |
267
- | **CustomerDevice** | CustomerDevice Entity Definition | BATTERY |
267
+ | **CustomerDevice** | CustomerDevice Entity Definition | BATTERY, TV_DEVICE |
268
268
  | **CustomerDeviceAta** | CustomerDeviceAta Entity Definition | DEFAULT |
269
269
  | **CustomerDeviceOnt** | CustomerDeviceOnt Entity Definition | DEFAULT |
270
270
  | **CustomerDeviceOntRemoval** | CustomerDeviceOntRemoval Entity Definition | DEFAULT |
@@ -18,8 +18,10 @@ export declare class CustomerDeviceApi extends ApiProvider {
18
18
  private readonly entityName;
19
19
  private sourceRecord;
20
20
  private _fieldservicedispatchedproduct?;
21
+ private _orderitem?;
21
22
  constructor(authParams?: OauthParams, authToken?: string);
22
23
  get fieldservicedispatchedproduct(): ApiRecordLinkManager;
24
+ get orderitem(): ApiRecordLinkManager;
23
25
  setRecord(sourceRecord: any): void;
24
26
  schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
25
27
  search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<CustomerDeviceProperties>>>;
@@ -39,6 +39,12 @@ class CustomerDeviceApi extends api_provider_1.ApiProvider {
39
39
  }
40
40
  return this._fieldservicedispatchedproduct;
41
41
  }
42
+ get orderitem() {
43
+ if (!this._orderitem) {
44
+ this._orderitem = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'ServiceModule:CustomerDevice', 'OrderModule:OrderItem', 'CustomerDevice__OrderItem');
45
+ }
46
+ return this._orderitem;
47
+ }
42
48
  // ============================================
43
49
  // STANDARD METHODS (Unchanged API)
44
50
  // ============================================
@@ -34,6 +34,7 @@ export declare class OrderItemApi extends ApiProvider {
34
34
  private _onetouchswitch?;
35
35
  private _activity?;
36
36
  private _orderitem?;
37
+ private _customerdevice?;
37
38
  constructor(authParams?: OauthParams, authToken?: string);
38
39
  get file(): ApiRecordLinkManager;
39
40
  get note(): ApiRecordLinkManager;
@@ -52,6 +53,7 @@ export declare class OrderItemApi extends ApiProvider {
52
53
  get onetouchswitch(): ApiRecordLinkManager;
53
54
  get activity(): ApiRecordLinkManager;
54
55
  get orderitem(): ApiRecordLinkManager;
56
+ get customerdevice(): ApiRecordLinkManager;
55
57
  setRecord(sourceRecord: any): void;
56
58
  schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
57
59
  search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<OrderItemProperties>>>;
@@ -135,6 +135,12 @@ class OrderItemApi extends api_provider_1.ApiProvider {
135
135
  }
136
136
  return this._orderitem;
137
137
  }
138
+ get customerdevice() {
139
+ if (!this._customerdevice) {
140
+ this._customerdevice = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'OrderModule:OrderItem', 'ServiceModule:CustomerDevice', 'CustomerDevice__OrderItem');
141
+ }
142
+ return this._customerdevice;
143
+ }
138
144
  // ============================================
139
145
  // STANDARD METHODS (Unchanged API)
140
146
  // ============================================
@@ -22,8 +22,10 @@ export declare class CustomerDeviceDb extends DbProvider {
22
22
  private readonly entityName;
23
23
  private sourceRecord;
24
24
  private _fieldservicedispatchedproduct?;
25
+ private _orderitem?;
25
26
  constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
26
27
  get fieldservicedispatchedproduct(): DbRecordLinkManager;
28
+ get orderitem(): DbRecordLinkManager;
27
29
  setRecord(sourceRecord: any): void;
28
30
  /**
29
31
  * Search records with manual pagination control
@@ -44,6 +44,12 @@ class CustomerDeviceDb extends db_provider_1.DbProvider {
44
44
  }
45
45
  return this._fieldservicedispatchedproduct;
46
46
  }
47
+ get orderitem() {
48
+ if (!this._orderitem) {
49
+ this._orderitem = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'ServiceModule:CustomerDevice', 'OrderModule:OrderItem', 'CustomerDevice__OrderItem');
50
+ }
51
+ return this._orderitem;
52
+ }
47
53
  // ============================================
48
54
  // STANDARD METHODS
49
55
  // ============================================
@@ -38,6 +38,7 @@ export declare class OrderItemDb extends DbProvider {
38
38
  private _onetouchswitch?;
39
39
  private _activity?;
40
40
  private _orderitem?;
41
+ private _customerdevice?;
41
42
  constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
42
43
  get file(): DbRecordLinkManager;
43
44
  get note(): DbRecordLinkManager;
@@ -56,6 +57,7 @@ export declare class OrderItemDb extends DbProvider {
56
57
  get onetouchswitch(): DbRecordLinkManager;
57
58
  get activity(): DbRecordLinkManager;
58
59
  get orderitem(): DbRecordLinkManager;
60
+ get customerdevice(): DbRecordLinkManager;
59
61
  setRecord(sourceRecord: any): void;
60
62
  /**
61
63
  * Search records with manual pagination control
@@ -140,6 +140,12 @@ class OrderItemDb extends db_provider_1.DbProvider {
140
140
  }
141
141
  return this._orderitem;
142
142
  }
143
+ get customerdevice() {
144
+ if (!this._customerdevice) {
145
+ this._customerdevice = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'OrderModule:OrderItem', 'ServiceModule:CustomerDevice', 'CustomerDevice__OrderItem');
146
+ }
147
+ return this._customerdevice;
148
+ }
143
149
  // ============================================
144
150
  // STANDARD METHODS
145
151
  // ============================================
@@ -12,6 +12,7 @@
12
12
  */
13
13
  import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/core';
14
14
  import { FieldServiceDispatchedProductProperties } from './FieldServiceDispatchedProduct';
15
+ import { OrderItemProperties } from './OrderItem';
15
16
  /**
16
17
  * Available types for CustomerDevice records
17
18
  */
@@ -19,7 +20,9 @@ export declare enum CustomerDeviceEntityTypes {
19
20
  /** Battery Backup Unit */
20
21
  BATTERY = "BATTERY",
21
22
  /** This is the default record type */
22
- DEFAULT = "DEFAULT"
23
+ DEFAULT = "DEFAULT",
24
+ /** TV Device */
25
+ TV_DEVICE = "TV_DEVICE"
23
26
  }
24
27
  /**
25
28
  * Property keys for CustomerDevice
@@ -65,6 +68,23 @@ export interface BatteryCustomerDeviceProperties {
65
68
  */
66
69
  SerialNumber: string;
67
70
  }
71
+ /**
72
+ * Properties for TV_DEVICE CustomerDevice records
73
+ *
74
+ * @see ServiceModule:CustomerDevice
75
+ */
76
+ export interface TvDeviceCustomerDeviceProperties {
77
+ /** Mac Address
78
+ *
79
+ * @type {TEXT}
80
+ */
81
+ MacAddress: string;
82
+ /** Serial Number
83
+ *
84
+ * @type {TEXT}
85
+ */
86
+ SerialNumber: string;
87
+ }
68
88
  /**
69
89
  * CustomerDevice entity from ServiceModule
70
90
  *
@@ -83,6 +103,8 @@ export declare class CustomerDevice extends OdinRecord<CustomerDeviceProperties>
83
103
  properties: CustomerDeviceProperties;
84
104
  /** Linked FieldServiceDispatchedProduct records (CustomerDevice__FieldServiceDispatchedProduct) */
85
105
  FieldServiceDispatchedProduct: OdinLink<LinkedOdinRecord<FieldServiceDispatchedProductProperties>>;
106
+ /** Linked OrderItem records (CustomerDevice__OrderItem) */
107
+ OrderItem: OdinLink<LinkedOdinRecord<OrderItemProperties>>;
86
108
  }
87
109
  /**
88
110
  * RabbitMQ routing keys for CustomerDevice events
@@ -106,7 +128,17 @@ export declare const ROUTING_KEY_CUSTOMER_DEVICE_DEFAULT_CREATED = "ServiceModul
106
128
  export declare const ROUTING_KEY_CUSTOMER_DEVICE_DEFAULT_UPDATED = "ServiceModule.CustomerDevice.DEFAULT.SubDbRecordUpdated";
107
129
  /** This is the default record type deleted */
108
130
  export declare const ROUTING_KEY_CUSTOMER_DEVICE_DEFAULT_DELETED = "ServiceModule.CustomerDevice.DEFAULT.SubDbRecordDeleted";
131
+ /** TV Device created */
132
+ export declare const ROUTING_KEY_CUSTOMER_DEVICE_TV_DEVICE_CREATED = "ServiceModule.CustomerDevice.TV_DEVICE.SubDbRecordCreated";
133
+ /** TV Device updated */
134
+ export declare const ROUTING_KEY_CUSTOMER_DEVICE_TV_DEVICE_UPDATED = "ServiceModule.CustomerDevice.TV_DEVICE.SubDbRecordUpdated";
135
+ /** TV Device deleted */
136
+ export declare const ROUTING_KEY_CUSTOMER_DEVICE_TV_DEVICE_DELETED = "ServiceModule.CustomerDevice.TV_DEVICE.SubDbRecordDeleted";
109
137
  /** Event: CustomerDevice__FieldServiceDispatchedProduct link created */
110
138
  export declare const ROUTING_KEY_LINK_CUSTOMER_DEVICE_FIELD_SERVICE_DISPATCHED_PRODUCT_CREATED = "ServiceModule.CustomerDevice.FieldServiceDispatchedProduct.SubDbRecordAssociationCreated";
111
139
  /** Event: CustomerDevice__FieldServiceDispatchedProduct link deleted */
112
140
  export declare const ROUTING_KEY_LINK_CUSTOMER_DEVICE_FIELD_SERVICE_DISPATCHED_PRODUCT_DELETED = "ServiceModule.CustomerDevice.FieldServiceDispatchedProduct.SubDbRecordAssociationDeleted";
141
+ /** Event: CustomerDevice__OrderItem link created */
142
+ export declare const ROUTING_KEY_LINK_CUSTOMER_DEVICE_ORDER_ITEM_CREATED = "ServiceModule.CustomerDevice.OrderItem.SubDbRecordAssociationCreated";
143
+ /** Event: CustomerDevice__OrderItem link deleted */
144
+ export declare const ROUTING_KEY_LINK_CUSTOMER_DEVICE_ORDER_ITEM_DELETED = "ServiceModule.CustomerDevice.OrderItem.SubDbRecordAssociationDeleted";
@@ -12,7 +12,7 @@
12
12
  * Generated from Odin schema definition
13
13
  */
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.ROUTING_KEY_LINK_CUSTOMER_DEVICE_FIELD_SERVICE_DISPATCHED_PRODUCT_DELETED = exports.ROUTING_KEY_LINK_CUSTOMER_DEVICE_FIELD_SERVICE_DISPATCHED_PRODUCT_CREATED = exports.ROUTING_KEY_CUSTOMER_DEVICE_DEFAULT_DELETED = exports.ROUTING_KEY_CUSTOMER_DEVICE_DEFAULT_UPDATED = exports.ROUTING_KEY_CUSTOMER_DEVICE_DEFAULT_CREATED = exports.ROUTING_KEY_CUSTOMER_DEVICE_BATTERY_DELETED = exports.ROUTING_KEY_CUSTOMER_DEVICE_BATTERY_UPDATED = exports.ROUTING_KEY_CUSTOMER_DEVICE_BATTERY_CREATED = exports.ROUTING_KEY_CUSTOMER_DEVICE_DELETED = exports.ROUTING_KEY_CUSTOMER_DEVICE_UPDATED = exports.ROUTING_KEY_CUSTOMER_DEVICE_CREATED = exports.CustomerDevice = exports.CustomerDevicePropertyKeys = exports.CustomerDeviceEntityTypes = void 0;
15
+ exports.ROUTING_KEY_LINK_CUSTOMER_DEVICE_ORDER_ITEM_DELETED = exports.ROUTING_KEY_LINK_CUSTOMER_DEVICE_ORDER_ITEM_CREATED = exports.ROUTING_KEY_LINK_CUSTOMER_DEVICE_FIELD_SERVICE_DISPATCHED_PRODUCT_DELETED = exports.ROUTING_KEY_LINK_CUSTOMER_DEVICE_FIELD_SERVICE_DISPATCHED_PRODUCT_CREATED = exports.ROUTING_KEY_CUSTOMER_DEVICE_TV_DEVICE_DELETED = exports.ROUTING_KEY_CUSTOMER_DEVICE_TV_DEVICE_UPDATED = exports.ROUTING_KEY_CUSTOMER_DEVICE_TV_DEVICE_CREATED = exports.ROUTING_KEY_CUSTOMER_DEVICE_DEFAULT_DELETED = exports.ROUTING_KEY_CUSTOMER_DEVICE_DEFAULT_UPDATED = exports.ROUTING_KEY_CUSTOMER_DEVICE_DEFAULT_CREATED = exports.ROUTING_KEY_CUSTOMER_DEVICE_BATTERY_DELETED = exports.ROUTING_KEY_CUSTOMER_DEVICE_BATTERY_UPDATED = exports.ROUTING_KEY_CUSTOMER_DEVICE_BATTERY_CREATED = exports.ROUTING_KEY_CUSTOMER_DEVICE_DELETED = exports.ROUTING_KEY_CUSTOMER_DEVICE_UPDATED = exports.ROUTING_KEY_CUSTOMER_DEVICE_CREATED = exports.CustomerDevice = exports.CustomerDevicePropertyKeys = exports.CustomerDeviceEntityTypes = void 0;
16
16
  const core_1 = require("@d19n/odin-types/dist/core");
17
17
  /**
18
18
  * Available types for CustomerDevice records
@@ -23,6 +23,8 @@ var CustomerDeviceEntityTypes;
23
23
  CustomerDeviceEntityTypes["BATTERY"] = "BATTERY";
24
24
  /** This is the default record type */
25
25
  CustomerDeviceEntityTypes["DEFAULT"] = "DEFAULT";
26
+ /** TV Device */
27
+ CustomerDeviceEntityTypes["TV_DEVICE"] = "TV_DEVICE";
26
28
  })(CustomerDeviceEntityTypes = exports.CustomerDeviceEntityTypes || (exports.CustomerDeviceEntityTypes = {}));
27
29
  /**
28
30
  * Property keys for CustomerDevice
@@ -74,7 +76,17 @@ exports.ROUTING_KEY_CUSTOMER_DEVICE_DEFAULT_CREATED = 'ServiceModule.CustomerDev
74
76
  exports.ROUTING_KEY_CUSTOMER_DEVICE_DEFAULT_UPDATED = 'ServiceModule.CustomerDevice.DEFAULT.SubDbRecordUpdated';
75
77
  /** This is the default record type deleted */
76
78
  exports.ROUTING_KEY_CUSTOMER_DEVICE_DEFAULT_DELETED = 'ServiceModule.CustomerDevice.DEFAULT.SubDbRecordDeleted';
79
+ /** TV Device created */
80
+ exports.ROUTING_KEY_CUSTOMER_DEVICE_TV_DEVICE_CREATED = 'ServiceModule.CustomerDevice.TV_DEVICE.SubDbRecordCreated';
81
+ /** TV Device updated */
82
+ exports.ROUTING_KEY_CUSTOMER_DEVICE_TV_DEVICE_UPDATED = 'ServiceModule.CustomerDevice.TV_DEVICE.SubDbRecordUpdated';
83
+ /** TV Device deleted */
84
+ exports.ROUTING_KEY_CUSTOMER_DEVICE_TV_DEVICE_DELETED = 'ServiceModule.CustomerDevice.TV_DEVICE.SubDbRecordDeleted';
77
85
  /** Event: CustomerDevice__FieldServiceDispatchedProduct link created */
78
86
  exports.ROUTING_KEY_LINK_CUSTOMER_DEVICE_FIELD_SERVICE_DISPATCHED_PRODUCT_CREATED = 'ServiceModule.CustomerDevice.FieldServiceDispatchedProduct.SubDbRecordAssociationCreated';
79
87
  /** Event: CustomerDevice__FieldServiceDispatchedProduct link deleted */
80
88
  exports.ROUTING_KEY_LINK_CUSTOMER_DEVICE_FIELD_SERVICE_DISPATCHED_PRODUCT_DELETED = 'ServiceModule.CustomerDevice.FieldServiceDispatchedProduct.SubDbRecordAssociationDeleted';
89
+ /** Event: CustomerDevice__OrderItem link created */
90
+ exports.ROUTING_KEY_LINK_CUSTOMER_DEVICE_ORDER_ITEM_CREATED = 'ServiceModule.CustomerDevice.OrderItem.SubDbRecordAssociationCreated';
91
+ /** Event: CustomerDevice__OrderItem link deleted */
92
+ exports.ROUTING_KEY_LINK_CUSTOMER_DEVICE_ORDER_ITEM_DELETED = 'ServiceModule.CustomerDevice.OrderItem.SubDbRecordAssociationDeleted';
@@ -27,6 +27,7 @@ import { SplitOrderProperties } from './SplitOrder';
27
27
  import { CustomerPhonePortingProperties } from './CustomerPhonePorting';
28
28
  import { OneTouchSwitchProperties } from './OneTouchSwitch';
29
29
  import { ActivityProperties } from './Activity';
30
+ import { CustomerDeviceProperties } from './CustomerDevice';
30
31
  /**
31
32
  * Available types for OrderItem records
32
33
  */
@@ -571,6 +572,8 @@ export declare class OrderItem extends OdinRecord<OrderItemProperties> {
571
572
  Activity: OdinLink<LinkedOdinRecord<ActivityProperties>>;
572
573
  /** Linked OrderItem records (OrderItem__OrderItem) */
573
574
  OrderItem: OdinLink<LinkedOdinRecord<OrderItemProperties>>;
575
+ /** Linked CustomerDevice records (CustomerDevice__OrderItem) */
576
+ CustomerDevice: OdinLink<LinkedOdinRecord<CustomerDeviceProperties>>;
574
577
  }
575
578
  /**
576
579
  * RabbitMQ routing keys for OrderItem events
@@ -91,9 +91,11 @@ export declare enum PaymentCurrency {
91
91
  *
92
92
  * @remarks Available options:
93
93
  * - `GLOBALPAY` - global payments
94
+ * - `STRIPE` - stripe
94
95
  */
95
96
  export declare enum PaymentMethod {
96
- GLOBAL_PAYMENTS = "GLOBALPAY"
97
+ GLOBAL_PAYMENTS = "GLOBALPAY",
98
+ STRIPE = "STRIPE"
97
99
  }
98
100
  /**
99
101
  * Property keys for Payment
@@ -96,10 +96,12 @@ var PaymentCurrency;
96
96
  *
97
97
  * @remarks Available options:
98
98
  * - `GLOBALPAY` - global payments
99
+ * - `STRIPE` - stripe
99
100
  */
100
101
  var PaymentMethod;
101
102
  (function (PaymentMethod) {
102
103
  PaymentMethod["GLOBAL_PAYMENTS"] = "GLOBALPAY";
104
+ PaymentMethod["STRIPE"] = "STRIPE";
103
105
  })(PaymentMethod = exports.PaymentMethod || (exports.PaymentMethod = {}));
104
106
  /**
105
107
  * Property keys for Payment
@@ -13,7 +13,7 @@
13
13
  * await record.createCustomerDevice({ ... }).execute();
14
14
  * ```
15
15
  *
16
- * Entity Types: BATTERY, DEFAULT
16
+ * Entity Types: BATTERY, DEFAULT, TV_DEVICE
17
17
  *
18
18
  * AUTO-GENERATED - DO NOT EDIT DIRECTLY
19
19
  */
@@ -22,11 +22,12 @@ import { PipelineStageEntity } from '@d19n/odin-types/dist/core';
22
22
  import { IDbRecordCreateUpdateRes } from '@d19n/odin-types/dist/core/interfaces/v1.db.interfaces';
23
23
  import { IOdinProvider } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
24
24
  import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-manager';
25
- import { CustomerDeviceProperties, BatteryCustomerDeviceProperties } from '../entities-v2/CustomerDevice';
25
+ import { CustomerDeviceProperties, BatteryCustomerDeviceProperties, TvDeviceCustomerDeviceProperties } from '../entities-v2/CustomerDevice';
26
26
  import { CreateCustomerDeviceBatteryProperties } from '../actions-v2/CreateCustomerDeviceBatteryDto';
27
27
  import { FieldServiceDispatchedProductRecord } from './FieldServiceDispatchedProductRecord';
28
+ import { OrderItemRecord } from './OrderItemRecord';
28
29
  /** Valid entity types for CustomerDevice */
29
- export declare type CustomerDeviceType = 'BATTERY' | 'DEFAULT';
30
+ export declare type CustomerDeviceType = 'BATTERY' | 'DEFAULT' | 'TV_DEVICE';
30
31
  /**
31
32
  * Builder for action execution with dryRun support
32
33
  *
@@ -91,6 +92,7 @@ export declare class CustomerDeviceRecord<TProps = CustomerDeviceProperties> {
91
92
  private _pendingLinks;
92
93
  private _preGeneratedId;
93
94
  private _fieldServiceDispatchedProducts?;
95
+ private _orderItems?;
94
96
  /**
95
97
  * Create a record wrapper.
96
98
  * @param record - The underlying record, or null for create operations
@@ -148,6 +150,22 @@ export declare class CustomerDeviceRecord<TProps = CustomerDeviceProperties> {
148
150
  * @remarks This is the default record type
149
151
  */
150
152
  isDefault(): this is CustomerDeviceRecord<CustomerDeviceProperties>;
153
+ /**
154
+ * Type guard: check if this record is of type TV_DEVICE
155
+ *
156
+ * When this returns true, TypeScript automatically narrows the type,
157
+ * giving you access to TV_DEVICE-specific properties.
158
+ *
159
+ * @example
160
+ * ```typescript
161
+ * if (record.isTvDevice()) {
162
+ * // TypeScript knows record.properties is TvDeviceCustomerDeviceProperties
163
+ * console.log(record.properties.SomeTypeSpecificField);
164
+ * }
165
+ * ```
166
+ * @remarks TV Device
167
+ */
168
+ isTvDevice(): this is CustomerDeviceRecord<TvDeviceCustomerDeviceProperties>;
151
169
  /** Valid labels for FieldServiceDispatchedProduct associations */
152
170
  static readonly fieldServiceDispatchedProductsLabels: readonly ["CustomerDevice__FieldServiceDispatchedProduct"];
153
171
  /**
@@ -166,6 +184,24 @@ export declare class CustomerDeviceRecord<TProps = CustomerDeviceProperties> {
166
184
  * ```
167
185
  */
168
186
  get fieldServiceDispatchedProducts(): RecordLinkManager<FieldServiceDispatchedProductRecord, typeof CustomerDeviceRecord['fieldServiceDispatchedProductsLabels'][number]>;
187
+ /** Valid labels for OrderItem associations */
188
+ static readonly orderItemsLabels: readonly ["CustomerDevice__OrderItem"];
189
+ /**
190
+ * Access linked OrderItem records
191
+ * @remarks Available labels: CustomerDevice__OrderItem
192
+ * @throws Error if called on a new (unsaved) record
193
+ *
194
+ * @example
195
+ * ```typescript
196
+ * // Get all linked OrderItem records
197
+ * const items = await record.orderItems.list();
198
+ * const first = await record.orderItems.first();
199
+ *
200
+ * // Filter by label
201
+ * const specific = await record.orderItems.first({ label: 'CustomerDevice__OrderItem' });
202
+ * ```
203
+ */
204
+ get orderItems(): RecordLinkManager<OrderItemRecord, typeof CustomerDeviceRecord['orderItemsLabels'][number]>;
169
205
  /**
170
206
  * Queue a link to be created with the next action.
171
207
  * Works for both create and update actions.
@@ -14,7 +14,7 @@
14
14
  * await record.createCustomerDevice({ ... }).execute();
15
15
  * ```
16
16
  *
17
- * Entity Types: BATTERY, DEFAULT
17
+ * Entity Types: BATTERY, DEFAULT, TV_DEVICE
18
18
  *
19
19
  * AUTO-GENERATED - DO NOT EDIT DIRECTLY
20
20
  */
@@ -33,6 +33,7 @@ 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 FieldServiceDispatchedProductRecord_1 = require("./FieldServiceDispatchedProductRecord");
36
+ const OrderItemRecord_1 = require("./OrderItemRecord");
36
37
  /**
37
38
  * Builder for action execution with dryRun support
38
39
  *
@@ -178,6 +179,22 @@ class CustomerDeviceRecord {
178
179
  * @remarks This is the default record type
179
180
  */
180
181
  isDefault() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'DEFAULT'; }
182
+ /**
183
+ * Type guard: check if this record is of type TV_DEVICE
184
+ *
185
+ * When this returns true, TypeScript automatically narrows the type,
186
+ * giving you access to TV_DEVICE-specific properties.
187
+ *
188
+ * @example
189
+ * ```typescript
190
+ * if (record.isTvDevice()) {
191
+ * // TypeScript knows record.properties is TvDeviceCustomerDeviceProperties
192
+ * console.log(record.properties.SomeTypeSpecificField);
193
+ * }
194
+ * ```
195
+ * @remarks TV Device
196
+ */
197
+ isTvDevice() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'TV_DEVICE'; }
181
198
  /**
182
199
  * Access linked FieldServiceDispatchedProduct records
183
200
  * @remarks Available labels: CustomerDevice__FieldServiceDispatchedProduct
@@ -208,6 +225,36 @@ class CustomerDeviceRecord {
208
225
  }
209
226
  return this._fieldServiceDispatchedProducts;
210
227
  }
228
+ /**
229
+ * Access linked OrderItem records
230
+ * @remarks Available labels: CustomerDevice__OrderItem
231
+ * @throws Error if called on a new (unsaved) record
232
+ *
233
+ * @example
234
+ * ```typescript
235
+ * // Get all linked OrderItem records
236
+ * const items = await record.orderItems.list();
237
+ * const first = await record.orderItems.first();
238
+ *
239
+ * // Filter by label
240
+ * const specific = await record.orderItems.first({ label: 'CustomerDevice__OrderItem' });
241
+ * ```
242
+ */
243
+ get orderItems() {
244
+ var _a;
245
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
246
+ throw new Error('Cannot access links on a new (unsaved) record');
247
+ if (!this._orderItems) {
248
+ this._orderItems = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
249
+ sourceEntity: 'ServiceModule:CustomerDevice',
250
+ targetEntity: 'OrderModule:OrderItem',
251
+ targetModuleName: 'OrderModule',
252
+ targetEntityName: 'OrderItem',
253
+ labels: ['CustomerDevice__OrderItem'],
254
+ }, OrderItemRecord_1.OrderItemRecord);
255
+ }
256
+ return this._orderItems;
257
+ }
211
258
  // ============================================
212
259
  // LINK MANAGEMENT
213
260
  // ============================================
@@ -289,6 +336,8 @@ exports.CustomerDeviceRecord = CustomerDeviceRecord;
289
336
  // ============================================
290
337
  /** Valid labels for FieldServiceDispatchedProduct associations */
291
338
  CustomerDeviceRecord.fieldServiceDispatchedProductsLabels = ['CustomerDevice__FieldServiceDispatchedProduct'];
339
+ /** Valid labels for OrderItem associations */
340
+ CustomerDeviceRecord.orderItemsLabels = ['CustomerDevice__OrderItem'];
292
341
  /** Type guard to check if an object is a CustomerDeviceRecord */
293
342
  function isCustomerDeviceRecord(obj) {
294
343
  return obj instanceof CustomerDeviceRecord;
@@ -40,6 +40,7 @@ import { CustomerDeviceRouterRecord } from './CustomerDeviceRouterRecord';
40
40
  import { CustomerPhonePortingRecord } from './CustomerPhonePortingRecord';
41
41
  import { OneTouchSwitchRecord } from './OneTouchSwitchRecord';
42
42
  import { ActivityRecord } from './ActivityRecord';
43
+ import { CustomerDeviceRecord } from './CustomerDeviceRecord';
43
44
  /**
44
45
  * Builder for action execution with dryRun support
45
46
  *
@@ -118,6 +119,7 @@ export declare class OrderItemRecord<TProps = OrderItemProperties> {
118
119
  private _oneTouchSwitches?;
119
120
  private _activities?;
120
121
  private _orderItems?;
122
+ private _customerDevices?;
121
123
  /**
122
124
  * Create a record wrapper.
123
125
  * @param record - The underlying record, or null for create operations
@@ -413,6 +415,24 @@ export declare class OrderItemRecord<TProps = OrderItemProperties> {
413
415
  * ```
414
416
  */
415
417
  get orderItems(): RecordLinkManager<OrderItemRecord, typeof OrderItemRecord['orderItemsLabels'][number]>;
418
+ /** Valid labels for CustomerDevice associations */
419
+ static readonly customerDevicesLabels: readonly ["CustomerDevice__OrderItem"];
420
+ /**
421
+ * Access linked CustomerDevice records
422
+ * @remarks Available labels: CustomerDevice__OrderItem
423
+ * @throws Error if called on a new (unsaved) record
424
+ *
425
+ * @example
426
+ * ```typescript
427
+ * // Get all linked CustomerDevice records
428
+ * const items = await record.customerDevices.list();
429
+ * const first = await record.customerDevices.first();
430
+ *
431
+ * // Filter by label
432
+ * const specific = await record.customerDevices.first({ label: 'CustomerDevice__OrderItem' });
433
+ * ```
434
+ */
435
+ get customerDevices(): RecordLinkManager<CustomerDeviceRecord, typeof OrderItemRecord['customerDevicesLabels'][number]>;
416
436
  /**
417
437
  * Queue a link to be created with the next action.
418
438
  * Works for both create and update actions.
@@ -44,6 +44,7 @@ const CustomerDeviceRouterRecord_1 = require("./CustomerDeviceRouterRecord");
44
44
  const CustomerPhonePortingRecord_1 = require("./CustomerPhonePortingRecord");
45
45
  const OneTouchSwitchRecord_1 = require("./OneTouchSwitchRecord");
46
46
  const ActivityRecord_1 = require("./ActivityRecord");
47
+ const CustomerDeviceRecord_1 = require("./CustomerDeviceRecord");
47
48
  /**
48
49
  * Builder for action execution with dryRun support
49
50
  *
@@ -604,6 +605,36 @@ class OrderItemRecord {
604
605
  }
605
606
  return this._orderItems;
606
607
  }
608
+ /**
609
+ * Access linked CustomerDevice records
610
+ * @remarks Available labels: CustomerDevice__OrderItem
611
+ * @throws Error if called on a new (unsaved) record
612
+ *
613
+ * @example
614
+ * ```typescript
615
+ * // Get all linked CustomerDevice records
616
+ * const items = await record.customerDevices.list();
617
+ * const first = await record.customerDevices.first();
618
+ *
619
+ * // Filter by label
620
+ * const specific = await record.customerDevices.first({ label: 'CustomerDevice__OrderItem' });
621
+ * ```
622
+ */
623
+ get customerDevices() {
624
+ var _a;
625
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
626
+ throw new Error('Cannot access links on a new (unsaved) record');
627
+ if (!this._customerDevices) {
628
+ this._customerDevices = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
629
+ sourceEntity: 'OrderModule:OrderItem',
630
+ targetEntity: 'ServiceModule:CustomerDevice',
631
+ targetModuleName: 'ServiceModule',
632
+ targetEntityName: 'CustomerDevice',
633
+ labels: ['CustomerDevice__OrderItem'],
634
+ }, CustomerDeviceRecord_1.CustomerDeviceRecord);
635
+ }
636
+ return this._customerDevices;
637
+ }
607
638
  // ============================================
608
639
  // LINK MANAGEMENT
609
640
  // ============================================
@@ -856,6 +887,8 @@ OrderItemRecord.oneTouchSwitchesLabels = ['OneTouchSwitch__OrderItem'];
856
887
  OrderItemRecord.activitiesLabels = ['OrderItem__Activity'];
857
888
  /** Valid labels for OrderItem associations */
858
889
  OrderItemRecord.orderItemsLabels = ['OrderItem__OrderItem'];
890
+ /** Valid labels for CustomerDevice associations */
891
+ OrderItemRecord.customerDevicesLabels = ['CustomerDevice__OrderItem'];
859
892
  /** Type guard to check if an object is a OrderItemRecord */
860
893
  function isOrderItemRecord(obj) {
861
894
  return obj instanceof OrderItemRecord;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d19n/youfibre-odin-sdk",
3
- "version": "2.0.256-beta.2",
3
+ "version": "2.0.256",
4
4
  "description": "",
5
5
  "author": "@d19n",
6
6
  "license": "UNLICENSED",