@d19n/youfibre-odin-sdk 2.0.147 → 2.0.149

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.
Files changed (51) hide show
  1. package/README.md +4 -4
  2. package/dist/EntityRegistry.d.ts +2 -2
  3. package/dist/EntityRegistry.js +2 -2
  4. package/dist/OdinApiClient.d.ts +4 -4
  5. package/dist/OdinApiClient.js +6 -6
  6. package/dist/OdinDbClient.d.ts +4 -4
  7. package/dist/OdinDbClient.js +6 -6
  8. package/dist/accessors-v2/{TwilioCallEventsAccessor.d.ts → TwilioCallEventAccessor.d.ts} +24 -24
  9. package/dist/accessors-v2/{TwilioCallEventsAccessor.js → TwilioCallEventAccessor.js} +21 -21
  10. package/dist/accessors-v2/index.d.ts +1 -1
  11. package/dist/accessors-v2/index.js +3 -3
  12. package/dist/actions-v2/CreateInboundCallEventDto.d.ts +18 -23
  13. package/dist/actions-v2/CreateInboundCallEventDto.js +14 -19
  14. package/dist/actions-v2/CreateOutboundCallEventDto.d.ts +26 -26
  15. package/dist/actions-v2/CreateOutboundCallEventDto.js +13 -13
  16. package/dist/actions-v2/CreateVoiceConfigurationDto.d.ts +14 -14
  17. package/dist/api-sdk-v2/CallApi.d.ts +2 -2
  18. package/dist/api-sdk-v2/CallApi.js +4 -4
  19. package/dist/api-sdk-v2/OfferApi.d.ts +8 -8
  20. package/dist/api-sdk-v2/OfferApi.js +22 -22
  21. package/dist/api-sdk-v2/{TwilioCallEventsApi.d.ts → TwilioCallEventApi.d.ts} +11 -11
  22. package/dist/api-sdk-v2/{TwilioCallEventsApi.js → TwilioCallEventApi.js} +17 -17
  23. package/dist/db-accessors-v2/{TwilioCallEventsDbAccessor.d.ts → TwilioCallEventDbAccessor.d.ts} +22 -22
  24. package/dist/db-accessors-v2/{TwilioCallEventsDbAccessor.js → TwilioCallEventDbAccessor.js} +21 -21
  25. package/dist/db-accessors-v2/index.d.ts +1 -1
  26. package/dist/db-accessors-v2/index.js +3 -3
  27. package/dist/db-sdk-v2/CallDb.d.ts +2 -2
  28. package/dist/db-sdk-v2/CallDb.js +4 -4
  29. package/dist/db-sdk-v2/OfferDb.d.ts +8 -8
  30. package/dist/db-sdk-v2/OfferDb.js +22 -22
  31. package/dist/db-sdk-v2/{TwilioCallEventsDb.d.ts → TwilioCallEventDb.d.ts} +15 -15
  32. package/dist/db-sdk-v2/{TwilioCallEventsDb.js → TwilioCallEventDb.js} +20 -20
  33. package/dist/entities-v2/Call.d.ts +5 -5
  34. package/dist/entities-v2/Call.js +2 -2
  35. package/dist/entities-v2/Offer.d.ts +6 -6
  36. package/dist/entities-v2/Offer.js +5 -5
  37. package/dist/entities-v2/TwilioCallEvent.d.ts +229 -0
  38. package/dist/entities-v2/TwilioCallEvent.js +103 -0
  39. package/dist/records-v2/CallRecord.d.ts +10 -10
  40. package/dist/records-v2/CallRecord.js +15 -15
  41. package/dist/records-v2/OfferRecord.d.ts +10 -70
  42. package/dist/records-v2/OfferRecord.js +17 -116
  43. package/dist/records-v2/ProductRecord.d.ts +3 -103
  44. package/dist/records-v2/ProductRecord.js +4 -169
  45. package/dist/records-v2/{TwilioCallEventsRecord.d.ts → TwilioCallEventRecord.d.ts} +22 -86
  46. package/dist/records-v2/{TwilioCallEventsRecord.js → TwilioCallEventRecord.js} +28 -92
  47. package/dist/records-v2/index.d.ts +1 -1
  48. package/dist/records-v2/index.js +4 -4
  49. package/package.json +1 -1
  50. package/dist/entities-v2/TwilioCallEvents.d.ts +0 -433
  51. package/dist/entities-v2/TwilioCallEvents.js +0 -135
@@ -32,11 +32,8 @@ exports.isOfferRecord = exports.OfferRecord = void 0;
32
32
  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
- const LeadRecord_1 = require("./LeadRecord");
36
35
  const DiscountRecord_1 = require("./DiscountRecord");
37
- const OrderItemRecord_1 = require("./OrderItemRecord");
38
36
  const ProductRecord_1 = require("./ProductRecord");
39
- const PriceBookRecord_1 = require("./PriceBookRecord");
40
37
  /**
41
38
  * Builder for action execution with dryRun support
42
39
  *
@@ -199,34 +196,34 @@ class OfferRecord {
199
196
  */
200
197
  isStandard() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'STANDARD'; }
201
198
  /**
202
- * Access linked Lead records
203
- * @remarks Available labels: Lead__Offer
199
+ * Access linked Offer records
200
+ * @remarks Available labels: Lead__Offer, OrderItem__Offer, Offer__Offer, PriceBook__Offer
204
201
  * @throws Error if called on a new (unsaved) record
205
202
  *
206
203
  * @example
207
204
  * ```typescript
208
- * // Get all linked Lead records
209
- * const items = await record.leads.list();
210
- * const first = await record.leads.first();
205
+ * // Get all linked Offer records
206
+ * const items = await record.offers.list();
207
+ * const first = await record.offers.first();
211
208
  *
212
209
  * // Filter by label
213
- * const specific = await record.leads.first({ label: 'Lead__Offer' });
210
+ * const specific = await record.offers.first({ label: 'Lead__Offer' });
214
211
  * ```
215
212
  */
216
- get leads() {
213
+ get offers() {
217
214
  var _a;
218
215
  if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
219
216
  throw new Error('Cannot access links on a new (unsaved) record');
220
- if (!this._leads) {
221
- this._leads = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
217
+ if (!this._offers) {
218
+ this._offers = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
222
219
  sourceEntity: 'ProductModule:Offer',
223
- targetEntity: 'CrmModule:Lead',
224
- targetModuleName: 'CrmModule',
225
- targetEntityName: 'Lead',
226
- labels: ['Lead__Offer'],
227
- }, LeadRecord_1.LeadRecord);
220
+ targetEntity: 'ProductModule:Offer',
221
+ targetModuleName: 'ProductModule',
222
+ targetEntityName: 'Offer',
223
+ labels: ['Lead__Offer', 'OrderItem__Offer', 'Offer__Offer', 'PriceBook__Offer'],
224
+ }, OfferRecord);
228
225
  }
229
- return this._leads;
226
+ return this._offers;
230
227
  }
231
228
  /**
232
229
  * Access linked Discount records
@@ -258,36 +255,6 @@ class OfferRecord {
258
255
  }
259
256
  return this._discounts;
260
257
  }
261
- /**
262
- * Access linked OrderItem records
263
- * @remarks Available labels: OrderItem__Offer
264
- * @throws Error if called on a new (unsaved) record
265
- *
266
- * @example
267
- * ```typescript
268
- * // Get all linked OrderItem records
269
- * const items = await record.orderItems.list();
270
- * const first = await record.orderItems.first();
271
- *
272
- * // Filter by label
273
- * const specific = await record.orderItems.first({ label: 'OrderItem__Offer' });
274
- * ```
275
- */
276
- get orderItems() {
277
- var _a;
278
- if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
279
- throw new Error('Cannot access links on a new (unsaved) record');
280
- if (!this._orderItems) {
281
- this._orderItems = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
282
- sourceEntity: 'ProductModule:Offer',
283
- targetEntity: 'OrderModule:OrderItem',
284
- targetModuleName: 'OrderModule',
285
- targetEntityName: 'OrderItem',
286
- labels: ['OrderItem__Offer'],
287
- }, OrderItemRecord_1.OrderItemRecord);
288
- }
289
- return this._orderItems;
290
- }
291
258
  /**
292
259
  * Access linked Product records
293
260
  * @remarks Available labels: Offer__Product
@@ -318,66 +285,6 @@ class OfferRecord {
318
285
  }
319
286
  return this._products;
320
287
  }
321
- /**
322
- * Access linked Offer records
323
- * @remarks Available labels: Offer__Offer
324
- * @throws Error if called on a new (unsaved) record
325
- *
326
- * @example
327
- * ```typescript
328
- * // Get all linked Offer records
329
- * const items = await record.offers.list();
330
- * const first = await record.offers.first();
331
- *
332
- * // Filter by label
333
- * const specific = await record.offers.first({ label: 'Offer__Offer' });
334
- * ```
335
- */
336
- get offers() {
337
- var _a;
338
- if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
339
- throw new Error('Cannot access links on a new (unsaved) record');
340
- if (!this._offers) {
341
- this._offers = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
342
- sourceEntity: 'ProductModule:Offer',
343
- targetEntity: 'ProductModule:Offer',
344
- targetModuleName: 'ProductModule',
345
- targetEntityName: 'Offer',
346
- labels: ['Offer__Offer'],
347
- }, OfferRecord);
348
- }
349
- return this._offers;
350
- }
351
- /**
352
- * Access linked PriceBook records
353
- * @remarks Available labels: PriceBook__Offer
354
- * @throws Error if called on a new (unsaved) record
355
- *
356
- * @example
357
- * ```typescript
358
- * // Get all linked PriceBook records
359
- * const items = await record.priceBooks.list();
360
- * const first = await record.priceBooks.first();
361
- *
362
- * // Filter by label
363
- * const specific = await record.priceBooks.first({ label: 'PriceBook__Offer' });
364
- * ```
365
- */
366
- get priceBooks() {
367
- var _a;
368
- if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
369
- throw new Error('Cannot access links on a new (unsaved) record');
370
- if (!this._priceBooks) {
371
- this._priceBooks = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
372
- sourceEntity: 'ProductModule:Offer',
373
- targetEntity: 'ProductModule:PriceBook',
374
- targetModuleName: 'ProductModule',
375
- targetEntityName: 'PriceBook',
376
- labels: ['PriceBook__Offer'],
377
- }, PriceBookRecord_1.PriceBookRecord);
378
- }
379
- return this._priceBooks;
380
- }
381
288
  // ============================================
382
289
  // LINK MANAGEMENT
383
290
  // ============================================
@@ -489,18 +396,12 @@ exports.OfferRecord = OfferRecord;
489
396
  // ============================================
490
397
  // TYPED LINK ACCESSORS
491
398
  // ============================================
492
- /** Valid labels for Lead associations */
493
- OfferRecord.leadsLabels = ['Lead__Offer'];
399
+ /** Valid labels for Offer associations */
400
+ OfferRecord.offersLabels = ['Lead__Offer', 'OrderItem__Offer', 'Offer__Offer', 'PriceBook__Offer'];
494
401
  /** Valid labels for Discount associations */
495
402
  OfferRecord.discountsLabels = ['Offer__Discount'];
496
- /** Valid labels for OrderItem associations */
497
- OfferRecord.orderItemsLabels = ['OrderItem__Offer'];
498
403
  /** Valid labels for Product associations */
499
404
  OfferRecord.productsLabels = ['Offer__Product'];
500
- /** Valid labels for Offer associations */
501
- OfferRecord.offersLabels = ['Offer__Offer'];
502
- /** Valid labels for PriceBook associations */
503
- OfferRecord.priceBooksLabels = ['PriceBook__Offer'];
504
405
  /** Type guard to check if an object is a OfferRecord */
505
406
  function isOfferRecord(obj) {
506
407
  return obj instanceof OfferRecord;
@@ -37,11 +37,6 @@ import { UpdateLandlineProductActionProperties } from '../actions-v2/UpdateLandl
37
37
  import { UpdateMeshProductActionProperties } from '../actions-v2/UpdateMeshProductActionDto';
38
38
  import { UpdateMobileProductActionProperties } from '../actions-v2/UpdateMobileProductActionDto';
39
39
  import { UpdateTelevisionProductActionProperties } from '../actions-v2/UpdateTelevisionProductActionDto';
40
- import { LeadRecord } from './LeadRecord';
41
- import { PriceBookRecord } from './PriceBookRecord';
42
- import { OrderItemRecord } from './OrderItemRecord';
43
- import { OfferRecord } from './OfferRecord';
44
- import { FieldServiceProductRecord } from './FieldServiceProductRecord';
45
40
  import { ServiceRecord } from './ServiceRecord';
46
41
  /** Valid entity types for Product */
47
42
  export declare type ProductType = 'BUNDLE' | 'INTERNET' | 'LABOR' | 'LANDLINE' | 'MESH' | 'MOBILE' | 'TELEVISION';
@@ -108,12 +103,7 @@ export declare class ProductRecord<TProps = ProductProperties> {
108
103
  private _provider;
109
104
  private _pendingLinks;
110
105
  private _preGeneratedId;
111
- private _leads?;
112
- private _priceBooks?;
113
- private _orderItems?;
114
- private _offers?;
115
106
  private _products?;
116
- private _fieldServiceProducts?;
117
107
  private _services?;
118
108
  /**
119
109
  * Create a record wrapper.
@@ -252,83 +242,11 @@ export declare class ProductRecord<TProps = ProductProperties> {
252
242
  * @remarks TV product
253
243
  */
254
244
  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 PriceBook associations */
274
- static readonly priceBooksLabels: readonly ["PriceBook__Product"];
275
- /**
276
- * Access linked PriceBook records
277
- * @remarks Available labels: PriceBook__Product
278
- * @throws Error if called on a new (unsaved) record
279
- *
280
- * @example
281
- * ```typescript
282
- * // Get all linked PriceBook records
283
- * const items = await record.priceBooks.list();
284
- * const first = await record.priceBooks.first();
285
- *
286
- * // Filter by label
287
- * const specific = await record.priceBooks.first({ label: 'PriceBook__Product' });
288
- * ```
289
- */
290
- get priceBooks(): RecordLinkManager<PriceBookRecord, typeof ProductRecord['priceBooksLabels'][number]>;
291
- /** Valid labels for OrderItem associations */
292
- static readonly orderItemsLabels: readonly ["OrderItem__Product"];
293
- /**
294
- * Access linked OrderItem records
295
- * @remarks Available labels: OrderItem__Product
296
- * @throws Error if called on a new (unsaved) record
297
- *
298
- * @example
299
- * ```typescript
300
- * // Get all linked OrderItem records
301
- * const items = await record.orderItems.list();
302
- * const first = await record.orderItems.first();
303
- *
304
- * // Filter by label
305
- * const specific = await record.orderItems.first({ label: 'OrderItem__Product' });
306
- * ```
307
- */
308
- get orderItems(): RecordLinkManager<OrderItemRecord, typeof ProductRecord['orderItemsLabels'][number]>;
309
- /** Valid labels for Offer associations */
310
- static readonly offersLabels: readonly ["Offer__Product"];
311
- /**
312
- * Access linked Offer records
313
- * @remarks Available labels: Offer__Product
314
- * @throws Error if called on a new (unsaved) record
315
- *
316
- * @example
317
- * ```typescript
318
- * // Get all linked Offer records
319
- * const items = await record.offers.list();
320
- * const first = await record.offers.first();
321
- *
322
- * // Filter by label
323
- * const specific = await record.offers.first({ label: 'Offer__Product' });
324
- * ```
325
- */
326
- get offers(): RecordLinkManager<OfferRecord, typeof ProductRecord['offersLabels'][number]>;
327
245
  /** Valid labels for Product associations */
328
- static readonly productsLabels: readonly ["Product__Product"];
246
+ static readonly productsLabels: readonly ["Lead__Product", "PriceBook__Product", "OrderItem__Product", "Offer__Product", "Product__Product", "Vendor__Product", "FieldServiceProduct__CompatibleProducts"];
329
247
  /**
330
248
  * Access linked Product records
331
- * @remarks Available labels: Product__Product
249
+ * @remarks Available labels: Lead__Product, PriceBook__Product, OrderItem__Product, Offer__Product, Product__Product, Vendor__Product, FieldServiceProduct__CompatibleProducts
332
250
  * @throws Error if called on a new (unsaved) record
333
251
  *
334
252
  * @example
@@ -338,28 +256,10 @@ export declare class ProductRecord<TProps = ProductProperties> {
338
256
  * const first = await record.products.first();
339
257
  *
340
258
  * // Filter by label
341
- * const specific = await record.products.first({ label: 'Product__Product' });
259
+ * const specific = await record.products.first({ label: 'Lead__Product' });
342
260
  * ```
343
261
  */
344
262
  get products(): RecordLinkManager<ProductRecord, typeof ProductRecord['productsLabels'][number]>;
345
- /** Valid labels for FieldServiceProduct associations */
346
- static readonly fieldServiceProductsLabels: readonly ["FieldServiceProduct__CompatibleProducts"];
347
- /**
348
- * Access linked FieldServiceProduct records
349
- * @remarks Available labels: FieldServiceProduct__CompatibleProducts
350
- * @throws Error if called on a new (unsaved) record
351
- *
352
- * @example
353
- * ```typescript
354
- * // Get all linked FieldServiceProduct records
355
- * const items = await record.fieldServiceProducts.list();
356
- * const first = await record.fieldServiceProducts.first();
357
- *
358
- * // Filter by label
359
- * const specific = await record.fieldServiceProducts.first({ label: 'FieldServiceProduct__CompatibleProducts' });
360
- * ```
361
- */
362
- get fieldServiceProducts(): RecordLinkManager<FieldServiceProductRecord, typeof ProductRecord['fieldServiceProductsLabels'][number]>;
363
263
  /** Valid labels for Service associations */
364
264
  static readonly servicesLabels: readonly ["Product__Service"];
365
265
  /**
@@ -32,11 +32,6 @@ exports.isProductRecord = exports.ProductRecord = void 0;
32
32
  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
- const LeadRecord_1 = require("./LeadRecord");
36
- const PriceBookRecord_1 = require("./PriceBookRecord");
37
- const OrderItemRecord_1 = require("./OrderItemRecord");
38
- const OfferRecord_1 = require("./OfferRecord");
39
- const FieldServiceProductRecord_1 = require("./FieldServiceProductRecord");
40
35
  const ServiceRecord_1 = require("./ServiceRecord");
41
36
  /**
42
37
  * Builder for action execution with dryRun support
@@ -263,129 +258,9 @@ class ProductRecord {
263
258
  * @remarks TV product
264
259
  */
265
260
  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 PriceBook records
298
- * @remarks Available labels: PriceBook__Product
299
- * @throws Error if called on a new (unsaved) record
300
- *
301
- * @example
302
- * ```typescript
303
- * // Get all linked PriceBook records
304
- * const items = await record.priceBooks.list();
305
- * const first = await record.priceBooks.first();
306
- *
307
- * // Filter by label
308
- * const specific = await record.priceBooks.first({ label: 'PriceBook__Product' });
309
- * ```
310
- */
311
- get priceBooks() {
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._priceBooks) {
316
- this._priceBooks = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
317
- sourceEntity: 'ProductModule:Product',
318
- targetEntity: 'ProductModule:PriceBook',
319
- targetModuleName: 'ProductModule',
320
- targetEntityName: 'PriceBook',
321
- labels: ['PriceBook__Product'],
322
- }, PriceBookRecord_1.PriceBookRecord);
323
- }
324
- return this._priceBooks;
325
- }
326
- /**
327
- * Access linked OrderItem records
328
- * @remarks Available labels: OrderItem__Product
329
- * @throws Error if called on a new (unsaved) record
330
- *
331
- * @example
332
- * ```typescript
333
- * // Get all linked OrderItem records
334
- * const items = await record.orderItems.list();
335
- * const first = await record.orderItems.first();
336
- *
337
- * // Filter by label
338
- * const specific = await record.orderItems.first({ label: 'OrderItem__Product' });
339
- * ```
340
- */
341
- get orderItems() {
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._orderItems) {
346
- this._orderItems = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
347
- sourceEntity: 'ProductModule:Product',
348
- targetEntity: 'OrderModule:OrderItem',
349
- targetModuleName: 'OrderModule',
350
- targetEntityName: 'OrderItem',
351
- labels: ['OrderItem__Product'],
352
- }, OrderItemRecord_1.OrderItemRecord);
353
- }
354
- return this._orderItems;
355
- }
356
- /**
357
- * Access linked Offer records
358
- * @remarks Available labels: Offer__Product
359
- * @throws Error if called on a new (unsaved) record
360
- *
361
- * @example
362
- * ```typescript
363
- * // Get all linked Offer records
364
- * const items = await record.offers.list();
365
- * const first = await record.offers.first();
366
- *
367
- * // Filter by label
368
- * const specific = await record.offers.first({ label: 'Offer__Product' });
369
- * ```
370
- */
371
- get offers() {
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._offers) {
376
- this._offers = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
377
- sourceEntity: 'ProductModule:Product',
378
- targetEntity: 'ProductModule:Offer',
379
- targetModuleName: 'ProductModule',
380
- targetEntityName: 'Offer',
381
- labels: ['Offer__Product'],
382
- }, OfferRecord_1.OfferRecord);
383
- }
384
- return this._offers;
385
- }
386
261
  /**
387
262
  * Access linked Product records
388
- * @remarks Available labels: Product__Product
263
+ * @remarks Available labels: Lead__Product, PriceBook__Product, OrderItem__Product, Offer__Product, Product__Product, Vendor__Product, FieldServiceProduct__CompatibleProducts
389
264
  * @throws Error if called on a new (unsaved) record
390
265
  *
391
266
  * @example
@@ -395,7 +270,7 @@ class ProductRecord {
395
270
  * const first = await record.products.first();
396
271
  *
397
272
  * // Filter by label
398
- * const specific = await record.products.first({ label: 'Product__Product' });
273
+ * const specific = await record.products.first({ label: 'Lead__Product' });
399
274
  * ```
400
275
  */
401
276
  get products() {
@@ -408,41 +283,11 @@ class ProductRecord {
408
283
  targetEntity: 'ProductModule:Product',
409
284
  targetModuleName: 'ProductModule',
410
285
  targetEntityName: 'Product',
411
- labels: ['Product__Product'],
286
+ labels: ['Lead__Product', 'PriceBook__Product', 'OrderItem__Product', 'Offer__Product', 'Product__Product', 'Vendor__Product', 'FieldServiceProduct__CompatibleProducts'],
412
287
  }, ProductRecord);
413
288
  }
414
289
  return this._products;
415
290
  }
416
- /**
417
- * Access linked FieldServiceProduct records
418
- * @remarks Available labels: FieldServiceProduct__CompatibleProducts
419
- * @throws Error if called on a new (unsaved) record
420
- *
421
- * @example
422
- * ```typescript
423
- * // Get all linked FieldServiceProduct records
424
- * const items = await record.fieldServiceProducts.list();
425
- * const first = await record.fieldServiceProducts.first();
426
- *
427
- * // Filter by label
428
- * const specific = await record.fieldServiceProducts.first({ label: 'FieldServiceProduct__CompatibleProducts' });
429
- * ```
430
- */
431
- get fieldServiceProducts() {
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._fieldServiceProducts) {
436
- this._fieldServiceProducts = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
437
- sourceEntity: 'ProductModule:Product',
438
- targetEntity: 'FieldServiceModule:FieldServiceProduct',
439
- targetModuleName: 'FieldServiceModule',
440
- targetEntityName: 'FieldServiceProduct',
441
- labels: ['FieldServiceProduct__CompatibleProducts'],
442
- }, FieldServiceProductRecord_1.FieldServiceProductRecord);
443
- }
444
- return this._fieldServiceProducts;
445
- }
446
291
  /**
447
292
  * Access linked Service records
448
293
  * @remarks Available labels: Product__Service
@@ -974,18 +819,8 @@ exports.ProductRecord = ProductRecord;
974
819
  // ============================================
975
820
  // TYPED LINK ACCESSORS
976
821
  // ============================================
977
- /** Valid labels for Lead associations */
978
- ProductRecord.leadsLabels = ['Lead__Product'];
979
- /** Valid labels for PriceBook associations */
980
- ProductRecord.priceBooksLabels = ['PriceBook__Product'];
981
- /** Valid labels for OrderItem associations */
982
- ProductRecord.orderItemsLabels = ['OrderItem__Product'];
983
- /** Valid labels for Offer associations */
984
- ProductRecord.offersLabels = ['Offer__Product'];
985
822
  /** Valid labels for Product associations */
986
- ProductRecord.productsLabels = ['Product__Product'];
987
- /** Valid labels for FieldServiceProduct associations */
988
- ProductRecord.fieldServiceProductsLabels = ['FieldServiceProduct__CompatibleProducts'];
823
+ ProductRecord.productsLabels = ['Lead__Product', 'PriceBook__Product', 'OrderItem__Product', 'Offer__Product', 'Product__Product', 'Vendor__Product', 'FieldServiceProduct__CompatibleProducts'];
989
824
  /** Valid labels for Service associations */
990
825
  ProductRecord.servicesLabels = ['Product__Service'];
991
826
  /** Type guard to check if an object is a ProductRecord */