@d19n/youfibre-odin-sdk 2.0.308 → 2.0.310

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 (32) hide show
  1. package/README.md +4 -1
  2. package/dist/actions-v2/AssignEngineerDto.d.ts +1 -1
  3. package/dist/actions-v2/CreateContactSalesAppDto.d.ts +98 -0
  4. package/dist/actions-v2/CreateContactSalesAppDto.js +54 -0
  5. package/dist/actions-v2/CreateLeadFromAddressSalesAppDto.d.ts +58 -0
  6. package/dist/actions-v2/CreateLeadFromAddressSalesAppDto.js +54 -0
  7. package/dist/actions-v2/CreateLeadSalesAppDto.d.ts +92 -0
  8. package/dist/actions-v2/CreateLeadSalesAppDto.js +54 -0
  9. package/dist/api-sdk-v2/EmailApi.d.ts +2 -0
  10. package/dist/api-sdk-v2/EmailApi.js +6 -0
  11. package/dist/api-sdk-v2/OrderApi.d.ts +2 -0
  12. package/dist/api-sdk-v2/OrderApi.js +6 -0
  13. package/dist/db-sdk-v2/EmailDb.d.ts +2 -0
  14. package/dist/db-sdk-v2/EmailDb.js +6 -0
  15. package/dist/db-sdk-v2/OrderDb.d.ts +2 -0
  16. package/dist/db-sdk-v2/OrderDb.js +6 -0
  17. package/dist/entities-v2/AgentStatus.d.ts +33 -33
  18. package/dist/entities-v2/AgentStatus.js +21 -21
  19. package/dist/entities-v2/CustomerDeviceOnt.d.ts +8 -0
  20. package/dist/entities-v2/CustomerDeviceOnt.js +2 -0
  21. package/dist/entities-v2/Email.d.ts +3 -0
  22. package/dist/entities-v2/Order.d.ts +7 -0
  23. package/dist/entities-v2/Order.js +5 -1
  24. package/dist/records-v2/ContactRecord.d.ts +29 -0
  25. package/dist/records-v2/ContactRecord.js +36 -0
  26. package/dist/records-v2/EmailRecord.d.ts +20 -0
  27. package/dist/records-v2/EmailRecord.js +33 -0
  28. package/dist/records-v2/LeadRecord.d.ts +58 -0
  29. package/dist/records-v2/LeadRecord.js +72 -0
  30. package/dist/records-v2/OrderRecord.d.ts +20 -0
  31. package/dist/records-v2/OrderRecord.js +33 -0
  32. package/package.json +1 -1
@@ -73,6 +73,7 @@ import { ContactRecord } from './ContactRecord';
73
73
  import { RecontractRecord } from './RecontractRecord';
74
74
  import { DataIssueRecord } from './DataIssueRecord';
75
75
  import { WorkOrderRecord } from './WorkOrderRecord';
76
+ import { EmailRecord } from './EmailRecord';
76
77
  /**
77
78
  * Builder for action execution with dryRun support
78
79
  *
@@ -731,6 +732,7 @@ export declare class OrderRecord<TProps = OrderProperties> {
731
732
  private _recontracts?;
732
733
  private _dataIssues?;
733
734
  private _workOrders?;
735
+ private _emails?;
734
736
  /**
735
737
  * Create a record wrapper.
736
738
  * @param record - The underlying record, or null for create operations
@@ -1370,6 +1372,24 @@ export declare class OrderRecord<TProps = OrderProperties> {
1370
1372
  * ```
1371
1373
  */
1372
1374
  get workOrders(): RecordLinkManager<WorkOrderRecord, typeof OrderRecord['workOrdersLabels'][number]>;
1375
+ /** Valid labels for Email associations */
1376
+ static readonly emailsLabels: readonly ["Order__Email"];
1377
+ /**
1378
+ * Access linked Email records
1379
+ * @remarks Available labels: Order__Email
1380
+ * @throws Error if called on a new (unsaved) record
1381
+ *
1382
+ * @example
1383
+ * ```typescript
1384
+ * // Get all linked Email records
1385
+ * const items = await record.emails.list();
1386
+ * const first = await record.emails.first();
1387
+ *
1388
+ * // Filter by label
1389
+ * const specific = await record.emails.first({ label: 'Order__Email' });
1390
+ * ```
1391
+ */
1392
+ get emails(): RecordLinkManager<EmailRecord, typeof OrderRecord['emailsLabels'][number]>;
1373
1393
  /**
1374
1394
  * Queue a link to be created with the next action.
1375
1395
  * Works for both create and update actions.
@@ -63,6 +63,7 @@ const ContactRecord_1 = require("./ContactRecord");
63
63
  const RecontractRecord_1 = require("./RecontractRecord");
64
64
  const DataIssueRecord_1 = require("./DataIssueRecord");
65
65
  const WorkOrderRecord_1 = require("./WorkOrderRecord");
66
+ const EmailRecord_1 = require("./EmailRecord");
66
67
  /**
67
68
  * Builder for action execution with dryRun support
68
69
  *
@@ -2153,6 +2154,36 @@ class OrderRecord {
2153
2154
  }
2154
2155
  return this._workOrders;
2155
2156
  }
2157
+ /**
2158
+ * Access linked Email records
2159
+ * @remarks Available labels: Order__Email
2160
+ * @throws Error if called on a new (unsaved) record
2161
+ *
2162
+ * @example
2163
+ * ```typescript
2164
+ * // Get all linked Email records
2165
+ * const items = await record.emails.list();
2166
+ * const first = await record.emails.first();
2167
+ *
2168
+ * // Filter by label
2169
+ * const specific = await record.emails.first({ label: 'Order__Email' });
2170
+ * ```
2171
+ */
2172
+ get emails() {
2173
+ var _a;
2174
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
2175
+ throw new Error('Cannot access links on a new (unsaved) record');
2176
+ if (!this._emails) {
2177
+ this._emails = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
2178
+ sourceEntity: 'OrderModule:Order',
2179
+ targetEntity: 'NotificationModule:Email',
2180
+ targetModuleName: 'NotificationModule',
2181
+ targetEntityName: 'Email',
2182
+ labels: ['Order__Email'],
2183
+ }, EmailRecord_1.EmailRecord);
2184
+ }
2185
+ return this._emails;
2186
+ }
2156
2187
  // ============================================
2157
2188
  // LINK MANAGEMENT
2158
2189
  // ============================================
@@ -3407,6 +3438,8 @@ OrderRecord.recontractsLabels = ['Recontract__Order'];
3407
3438
  OrderRecord.dataIssuesLabels = ['DataIssue__Order'];
3408
3439
  /** Valid labels for WorkOrder associations */
3409
3440
  OrderRecord.workOrdersLabels = ['Order__WorkOrder'];
3441
+ /** Valid labels for Email associations */
3442
+ OrderRecord.emailsLabels = ['Order__Email'];
3410
3443
  /** Type guard to check if an object is a OrderRecord */
3411
3444
  function isOrderRecord(obj) {
3412
3445
  return obj instanceof OrderRecord;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d19n/youfibre-odin-sdk",
3
- "version": "2.0.308",
3
+ "version": "2.0.310",
4
4
  "description": "",
5
5
  "author": "@d19n",
6
6
  "license": "UNLICENSED",