@d19n/youfibre-odin-sdk 2.0.13-beta.1 → 2.0.13

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 (239) hide show
  1. package/README.md +11 -10
  2. package/dist/actions-v2/CreateOrderFromBrskDto.d.ts +75 -0
  3. package/dist/actions-v2/CreateOrderItemFromBrskDto.d.ts +191 -0
  4. package/dist/actions-v2/CreateOrderItemFromBrskDto.js +52 -0
  5. package/dist/entities-v2/Order.d.ts +7 -0
  6. package/dist/entities-v2/Order.js +2 -0
  7. package/dist/entities-v2/OrderItem.d.ts +7 -0
  8. package/dist/entities-v2/OrderItem.js +2 -0
  9. package/dist/entities-v2/Product.d.ts +0 -42
  10. package/dist/entities-v2/Product.js +0 -2
  11. package/dist/records-v2/AccountCreditRecord.d.ts +62 -1
  12. package/dist/records-v2/AccountCreditRecord.js +91 -0
  13. package/dist/records-v2/AccountRecord.d.ts +306 -2
  14. package/dist/records-v2/AccountRecord.js +451 -0
  15. package/dist/records-v2/ActivityLogRecord.d.ts +122 -1
  16. package/dist/records-v2/ActivityLogRecord.js +190 -0
  17. package/dist/records-v2/ActivityRecord.d.ts +255 -2
  18. package/dist/records-v2/ActivityRecord.js +387 -0
  19. package/dist/records-v2/AddressRecord.d.ts +321 -0
  20. package/dist/records-v2/AddressRecord.js +532 -0
  21. package/dist/records-v2/AffiliateCodeRecord.d.ts +102 -1
  22. package/dist/records-v2/AffiliateCodeRecord.js +157 -0
  23. package/dist/records-v2/AppointmentRecord.d.ts +141 -0
  24. package/dist/records-v2/AppointmentRecord.js +235 -0
  25. package/dist/records-v2/BillingAdjustmentRecord.d.ts +81 -0
  26. package/dist/records-v2/BillingAdjustmentRecord.js +136 -0
  27. package/dist/records-v2/BillingRequestRecord.d.ts +178 -2
  28. package/dist/records-v2/BillingRequestRecord.js +271 -0
  29. package/dist/records-v2/BlockageA55Record.d.ts +103 -2
  30. package/dist/records-v2/BlockageA55Record.js +157 -0
  31. package/dist/records-v2/BrskEntityMigrationErrorRecord.d.ts +21 -1
  32. package/dist/records-v2/BrskEntityMigrationErrorRecord.js +21 -0
  33. package/dist/records-v2/CallEventRecord.d.ts +82 -1
  34. package/dist/records-v2/CallEventRecord.js +124 -0
  35. package/dist/records-v2/CallLegRecord.d.ts +82 -1
  36. package/dist/records-v2/CallLegRecord.js +124 -0
  37. package/dist/records-v2/CallRecord.d.ts +202 -1
  38. package/dist/records-v2/CallRecord.js +322 -0
  39. package/dist/records-v2/CallTransferRecord.d.ts +102 -1
  40. package/dist/records-v2/CallTransferRecord.js +157 -0
  41. package/dist/records-v2/CampaignRecord.d.ts +83 -2
  42. package/dist/records-v2/CampaignRecord.js +124 -0
  43. package/dist/records-v2/CaseRecord.d.ts +418 -2
  44. package/dist/records-v2/CaseRecord.js +667 -0
  45. package/dist/records-v2/ChangeReasonRecord.d.ts +171 -2
  46. package/dist/records-v2/ChangeReasonRecord.js +238 -0
  47. package/dist/records-v2/ChurnRequestRecord.d.ts +62 -1
  48. package/dist/records-v2/ChurnRequestRecord.js +91 -0
  49. package/dist/records-v2/ContactRecord.d.ts +560 -0
  50. package/dist/records-v2/ContactRecord.js +927 -0
  51. package/dist/records-v2/ContractBuyOutRecord.d.ts +162 -1
  52. package/dist/records-v2/ContractBuyOutRecord.js +256 -0
  53. package/dist/records-v2/ConversationFeedbackRecord.d.ts +102 -1
  54. package/dist/records-v2/ConversationFeedbackRecord.js +157 -0
  55. package/dist/records-v2/ConversationRecord.d.ts +102 -1
  56. package/dist/records-v2/ConversationRecord.js +157 -0
  57. package/dist/records-v2/CreditNoteRecord.d.ts +81 -0
  58. package/dist/records-v2/CreditNoteRecord.js +136 -0
  59. package/dist/records-v2/CrmDatasetRecord.d.ts +191 -2
  60. package/dist/records-v2/CrmDatasetRecord.js +271 -0
  61. package/dist/records-v2/CustomerDeviceAtaRecord.d.ts +21 -0
  62. package/dist/records-v2/CustomerDeviceAtaRecord.js +37 -0
  63. package/dist/records-v2/CustomerDeviceConfigurationRecord.d.ts +62 -1
  64. package/dist/records-v2/CustomerDeviceConfigurationRecord.js +91 -0
  65. package/dist/records-v2/CustomerDeviceOntRecord.d.ts +181 -0
  66. package/dist/records-v2/CustomerDeviceOntRecord.js +301 -0
  67. package/dist/records-v2/CustomerDeviceRouterRecord.d.ts +141 -0
  68. package/dist/records-v2/CustomerDeviceRouterRecord.js +235 -0
  69. package/dist/records-v2/CustomerPhonePortingRecord.d.ts +21 -0
  70. package/dist/records-v2/CustomerPhonePortingRecord.js +37 -0
  71. package/dist/records-v2/DiscountRecord.d.ts +121 -0
  72. package/dist/records-v2/DiscountRecord.js +202 -0
  73. package/dist/records-v2/EmailRecord.d.ts +230 -2
  74. package/dist/records-v2/EmailRecord.js +336 -0
  75. package/dist/records-v2/EmailSenderRecord.d.ts +42 -1
  76. package/dist/records-v2/EmailSenderRecord.js +58 -0
  77. package/dist/records-v2/EmailTemplateRecord.d.ts +21 -1
  78. package/dist/records-v2/EmailTemplateRecord.js +21 -0
  79. package/dist/records-v2/FieldServiceDispatchedProductRecord.d.ts +135 -2
  80. package/dist/records-v2/FieldServiceDispatchedProductRecord.js +189 -0
  81. package/dist/records-v2/FieldServiceProductRecord.d.ts +115 -2
  82. package/dist/records-v2/FieldServiceProductRecord.js +156 -0
  83. package/dist/records-v2/FileRecord.d.ts +1211 -2
  84. package/dist/records-v2/FileRecord.js +1902 -0
  85. package/dist/records-v2/ImpersonationTrackerRecord.d.ts +62 -1
  86. package/dist/records-v2/ImpersonationTrackerRecord.js +91 -0
  87. package/dist/records-v2/InternalInstallAuditRecord.d.ts +83 -2
  88. package/dist/records-v2/InternalInstallAuditRecord.js +124 -0
  89. package/dist/records-v2/InvoiceItemRecord.d.ts +40 -0
  90. package/dist/records-v2/InvoiceItemRecord.js +69 -0
  91. package/dist/records-v2/InvoiceRecord.d.ts +399 -2
  92. package/dist/records-v2/InvoiceRecord.js +635 -0
  93. package/dist/records-v2/KnowledgeArticleRecord.d.ts +98 -2
  94. package/dist/records-v2/KnowledgeArticleRecord.js +139 -0
  95. package/dist/records-v2/LeadRecord.d.ts +261 -0
  96. package/dist/records-v2/LeadRecord.js +433 -0
  97. package/dist/records-v2/MessageRecord.d.ts +99 -2
  98. package/dist/records-v2/MessageRecord.js +140 -0
  99. package/dist/records-v2/NetworkDeviceRecord.d.ts +43 -2
  100. package/dist/records-v2/NetworkDeviceRecord.js +58 -0
  101. package/dist/records-v2/NoteRecord.d.ts +1121 -1
  102. package/dist/records-v2/NoteRecord.js +1839 -0
  103. package/dist/records-v2/OfferRecord.d.ts +154 -2
  104. package/dist/records-v2/OfferRecord.js +221 -0
  105. package/dist/records-v2/OhAuditOfInstallationRecord.d.ts +83 -2
  106. package/dist/records-v2/OhAuditOfInstallationRecord.js +124 -0
  107. package/dist/records-v2/OhExternalAuditRecord.d.ts +83 -2
  108. package/dist/records-v2/OhExternalAuditRecord.js +124 -0
  109. package/dist/records-v2/OhInProgressAuditRecord.d.ts +83 -2
  110. package/dist/records-v2/OhInProgressAuditRecord.js +124 -0
  111. package/dist/records-v2/OhInstallationAuditRecord.d.ts +83 -2
  112. package/dist/records-v2/OhInstallationAuditRecord.js +124 -0
  113. package/dist/records-v2/OhRetroAuditRecord.d.ts +83 -2
  114. package/dist/records-v2/OhRetroAuditRecord.js +124 -0
  115. package/dist/records-v2/OneTouchSwitchRecord.d.ts +255 -2
  116. package/dist/records-v2/OneTouchSwitchRecord.js +387 -0
  117. package/dist/records-v2/OntReplacementApprovalRecord.d.ts +62 -1
  118. package/dist/records-v2/OntReplacementApprovalRecord.js +91 -0
  119. package/dist/records-v2/OrderCheckRecord.d.ts +21 -0
  120. package/dist/records-v2/OrderCheckRecord.js +37 -0
  121. package/dist/records-v2/OrderItemRecord.d.ts +309 -0
  122. package/dist/records-v2/OrderItemRecord.js +501 -0
  123. package/dist/records-v2/OrderKciRecord.d.ts +42 -1
  124. package/dist/records-v2/OrderKciRecord.js +58 -0
  125. package/dist/records-v2/OrderRecord.d.ts +620 -0
  126. package/dist/records-v2/OrderRecord.js +1026 -0
  127. package/dist/records-v2/OutageRecord.d.ts +42 -1
  128. package/dist/records-v2/OutageRecord.js +58 -0
  129. package/dist/records-v2/OverlayRealA55Record.d.ts +83 -2
  130. package/dist/records-v2/OverlayRealA55Record.js +124 -0
  131. package/dist/records-v2/PICRequestRecord.d.ts +62 -1
  132. package/dist/records-v2/PICRequestRecord.js +91 -0
  133. package/dist/records-v2/PaymentMethodRecord.d.ts +121 -0
  134. package/dist/records-v2/PaymentMethodRecord.js +202 -0
  135. package/dist/records-v2/PaymentMethodRefundRecord.d.ts +181 -0
  136. package/dist/records-v2/PaymentMethodRefundRecord.js +301 -0
  137. package/dist/records-v2/PaymentRecord.d.ts +82 -1
  138. package/dist/records-v2/PaymentRecord.js +124 -0
  139. package/dist/records-v2/PermissionToFailRecord.d.ts +61 -0
  140. package/dist/records-v2/PermissionToFailRecord.js +103 -0
  141. package/dist/records-v2/PgAccountValidationRecord.d.ts +21 -1
  142. package/dist/records-v2/PgAccountValidationRecord.js +21 -0
  143. package/dist/records-v2/PgContactRecord.d.ts +62 -1
  144. package/dist/records-v2/PgContactRecord.js +91 -0
  145. package/dist/records-v2/PgDirectDebitFileRecord.d.ts +95 -2
  146. package/dist/records-v2/PgDirectDebitFileRecord.js +123 -0
  147. package/dist/records-v2/PgDisputeRecord.d.ts +62 -1
  148. package/dist/records-v2/PgDisputeRecord.js +91 -0
  149. package/dist/records-v2/PgFileAllocationRecord.d.ts +115 -2
  150. package/dist/records-v2/PgFileAllocationRecord.js +156 -0
  151. package/dist/records-v2/PgLogRecord.d.ts +21 -1
  152. package/dist/records-v2/PgLogRecord.js +21 -0
  153. package/dist/records-v2/PgPaymentMethodRecord.d.ts +102 -1
  154. package/dist/records-v2/PgPaymentMethodRecord.js +157 -0
  155. package/dist/records-v2/PgSortCodeSubstitutionRecord.d.ts +21 -1
  156. package/dist/records-v2/PgSortCodeSubstitutionRecord.js +21 -0
  157. package/dist/records-v2/PgTransactionRecord.d.ts +135 -2
  158. package/dist/records-v2/PgTransactionRecord.js +189 -0
  159. package/dist/records-v2/PgVocalinkRecord.d.ts +21 -1
  160. package/dist/records-v2/PgVocalinkRecord.js +21 -0
  161. package/dist/records-v2/PgWebhookAttemptRecord.d.ts +42 -1
  162. package/dist/records-v2/PgWebhookAttemptRecord.js +58 -0
  163. package/dist/records-v2/PgWebhookRecord.d.ts +122 -1
  164. package/dist/records-v2/PgWebhookRecord.js +190 -0
  165. package/dist/records-v2/PhoneNumberRecord.d.ts +41 -0
  166. package/dist/records-v2/PhoneNumberRecord.js +70 -0
  167. package/dist/records-v2/PriceBookRecord.d.ts +21 -0
  168. package/dist/records-v2/PriceBookRecord.js +37 -0
  169. package/dist/records-v2/ProductRecord.d.ts +258 -2
  170. package/dist/records-v2/ProductRecord.js +351 -0
  171. package/dist/records-v2/PushNotificationRecord.d.ts +162 -1
  172. package/dist/records-v2/PushNotificationRecord.js +256 -0
  173. package/dist/records-v2/ReferralRecord.d.ts +143 -2
  174. package/dist/records-v2/ReferralRecord.js +223 -0
  175. package/dist/records-v2/RemediationOutcomeFormRecord.d.ts +83 -2
  176. package/dist/records-v2/RemediationOutcomeFormRecord.js +124 -0
  177. package/dist/records-v2/RemediationRequiredReasonRecord.d.ts +103 -2
  178. package/dist/records-v2/RemediationRequiredReasonRecord.js +157 -0
  179. package/dist/records-v2/ReturnsRecord.d.ts +62 -1
  180. package/dist/records-v2/ReturnsRecord.js +91 -0
  181. package/dist/records-v2/RewardRecord.d.ts +123 -2
  182. package/dist/records-v2/RewardRecord.js +190 -0
  183. package/dist/records-v2/SalesTerritoryRecord.d.ts +79 -2
  184. package/dist/records-v2/SalesTerritoryRecord.js +107 -0
  185. package/dist/records-v2/ScheduleSlotRecord.d.ts +42 -1
  186. package/dist/records-v2/ScheduleSlotRecord.js +58 -0
  187. package/dist/records-v2/ServiceAppointmentConfigRecord.d.ts +287 -2
  188. package/dist/records-v2/ServiceAppointmentConfigRecord.js +367 -0
  189. package/dist/records-v2/ServiceAppointmentRecord.d.ts +81 -0
  190. package/dist/records-v2/ServiceAppointmentRecord.js +136 -0
  191. package/dist/records-v2/ServiceRecord.d.ts +40 -0
  192. package/dist/records-v2/ServiceRecord.js +69 -0
  193. package/dist/records-v2/ServiceVisitAuditRecord.d.ts +83 -2
  194. package/dist/records-v2/ServiceVisitAuditRecord.js +124 -0
  195. package/dist/records-v2/SiteSpecificRiskAssessmentOutcomeFormRecord.d.ts +83 -2
  196. package/dist/records-v2/SiteSpecificRiskAssessmentOutcomeFormRecord.js +124 -0
  197. package/dist/records-v2/SmsMessageRecord.d.ts +175 -2
  198. package/dist/records-v2/SmsMessageRecord.js +255 -0
  199. package/dist/records-v2/SweeperMaintenanceAuditRecord.d.ts +83 -2
  200. package/dist/records-v2/SweeperMaintenanceAuditRecord.js +124 -0
  201. package/dist/records-v2/TeamRecord.d.ts +101 -0
  202. package/dist/records-v2/TeamRecord.js +169 -0
  203. package/dist/records-v2/TestEntityForVisualBuilderRecord.d.ts +115 -2
  204. package/dist/records-v2/TestEntityForVisualBuilderRecord.js +156 -0
  205. package/dist/records-v2/TimeSlotRecord.d.ts +21 -0
  206. package/dist/records-v2/TimeSlotRecord.js +37 -0
  207. package/dist/records-v2/TransactionRecord.d.ts +181 -1
  208. package/dist/records-v2/TransactionRecord.js +288 -0
  209. package/dist/records-v2/TwilioUserUpdateRecord.d.ts +42 -1
  210. package/dist/records-v2/TwilioUserUpdateRecord.js +58 -0
  211. package/dist/records-v2/UgAuditOfInstallationRecord.d.ts +83 -2
  212. package/dist/records-v2/UgAuditOfInstallationRecord.js +124 -0
  213. package/dist/records-v2/UgExternalAuditRecord.d.ts +83 -2
  214. package/dist/records-v2/UgExternalAuditRecord.js +124 -0
  215. package/dist/records-v2/UgInProgressAuditRecord.d.ts +83 -2
  216. package/dist/records-v2/UgInProgressAuditRecord.js +124 -0
  217. package/dist/records-v2/UgInstallationAuditRecord.d.ts +83 -2
  218. package/dist/records-v2/UgInstallationAuditRecord.js +124 -0
  219. package/dist/records-v2/UgRetroAuditRecord.d.ts +83 -2
  220. package/dist/records-v2/UgRetroAuditRecord.js +124 -0
  221. package/dist/records-v2/UserRecord.d.ts +400 -0
  222. package/dist/records-v2/UserRecord.js +663 -0
  223. package/dist/records-v2/VisitRecord.d.ts +121 -0
  224. package/dist/records-v2/VisitRecord.js +202 -0
  225. package/dist/records-v2/VoiceConfigurationRecord.d.ts +21 -0
  226. package/dist/records-v2/VoiceConfigurationRecord.js +37 -0
  227. package/dist/records-v2/WayleaveAuditRecord.d.ts +83 -2
  228. package/dist/records-v2/WayleaveAuditRecord.js +124 -0
  229. package/dist/records-v2/WorkOrderRecord.d.ts +1226 -2
  230. package/dist/records-v2/WorkOrderRecord.js +1865 -0
  231. package/dist/records-v2/WorkOrderStatusUpdateRecord.d.ts +75 -2
  232. package/dist/records-v2/WorkOrderStatusUpdateRecord.js +90 -0
  233. package/dist/records-v2/YfFieldServiceVisitRecord.d.ts +83 -2
  234. package/dist/records-v2/YfFieldServiceVisitRecord.js +124 -0
  235. package/dist/records-v2/YfStockAuditRecord.d.ts +103 -2
  236. package/dist/records-v2/YfStockAuditRecord.js +157 -0
  237. package/dist/records-v2/index.d.ts +1 -1
  238. package/dist/records-v2/index.js +5 -5
  239. package/package.json +1 -1
@@ -14,6 +14,8 @@
14
14
  * await record.createConversationFeedback({ ... }).execute();
15
15
  * ```
16
16
  *
17
+ * Entity Types: DEFAULT
18
+ *
17
19
  * AUTO-GENERATED - DO NOT EDIT DIRECTLY
18
20
  */
19
21
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
@@ -29,6 +31,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
31
  exports.isConversationFeedbackRecord = exports.ConversationFeedbackRecord = void 0;
30
32
  const uuid_1 = require("uuid");
31
33
  const core_1 = require("@d19n/odin-types/dist/core");
34
+ const record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/record-link-manager");
35
+ const CaseRecord_1 = require("./CaseRecord");
36
+ const ConversationRecord_1 = require("./ConversationRecord");
37
+ const ContactRecord_1 = require("./ContactRecord");
38
+ const UserRecord_1 = require("./UserRecord");
32
39
  /**
33
40
  * Builder for action execution with dryRun support
34
41
  *
@@ -140,6 +147,145 @@ class ConversationFeedbackRecord {
140
147
  /** Access the underlying OdinRecord (null for new records) */
141
148
  get record() { return this._record; }
142
149
  // ============================================
150
+ // TYPE GUARDS (with TypeScript type predicates)
151
+ // ============================================
152
+ /**
153
+ * Type guard: check if this record is of type DEFAULT
154
+ *
155
+ * When this returns true, TypeScript automatically narrows the type,
156
+ * giving you access to DEFAULT-specific properties.
157
+ *
158
+ * @example
159
+ * ```typescript
160
+ * if (record.isDefault()) {
161
+ * // TypeScript knows record.properties is ConversationFeedbackProperties
162
+ * console.log(record.properties.SomeTypeSpecificField);
163
+ * }
164
+ * ```
165
+ * @remarks This is the default record type
166
+ */
167
+ isDefault() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'DEFAULT'; }
168
+ /**
169
+ * Access linked Case records
170
+ * @remarks Available labels: Conversation_Case
171
+ * @throws Error if called on a new (unsaved) record
172
+ *
173
+ * @example
174
+ * ```typescript
175
+ * // Get all linked Case records
176
+ * const items = await record.cases.list();
177
+ * const first = await record.cases.first();
178
+ *
179
+ * // Filter by label
180
+ * const specific = await record.cases.first({ label: 'Conversation_Case' });
181
+ * ```
182
+ */
183
+ get cases() {
184
+ var _a;
185
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
186
+ throw new Error('Cannot access links on a new (unsaved) record');
187
+ if (!this._cases) {
188
+ this._cases = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
189
+ sourceEntity: 'NotificationModule:ConversationFeedback',
190
+ targetEntity: 'SupportModule:Case',
191
+ targetModuleName: 'SupportModule',
192
+ targetEntityName: 'Case',
193
+ labels: ['Conversation_Case'],
194
+ }, CaseRecord_1.CaseRecord);
195
+ }
196
+ return this._cases;
197
+ }
198
+ /**
199
+ * Access linked Conversation records
200
+ * @remarks Available labels: ConversationFeedback_Conversation
201
+ * @throws Error if called on a new (unsaved) record
202
+ *
203
+ * @example
204
+ * ```typescript
205
+ * // Get all linked Conversation records
206
+ * const items = await record.conversations.list();
207
+ * const first = await record.conversations.first();
208
+ *
209
+ * // Filter by label
210
+ * const specific = await record.conversations.first({ label: 'ConversationFeedback_Conversation' });
211
+ * ```
212
+ */
213
+ get conversations() {
214
+ var _a;
215
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
216
+ throw new Error('Cannot access links on a new (unsaved) record');
217
+ if (!this._conversations) {
218
+ this._conversations = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
219
+ sourceEntity: 'NotificationModule:ConversationFeedback',
220
+ targetEntity: 'NotificationModule:Conversation',
221
+ targetModuleName: 'NotificationModule',
222
+ targetEntityName: 'Conversation',
223
+ labels: ['ConversationFeedback_Conversation'],
224
+ }, ConversationRecord_1.ConversationRecord);
225
+ }
226
+ return this._conversations;
227
+ }
228
+ /**
229
+ * Access linked Contact records
230
+ * @remarks Available labels: ConversationFeedback_Contact
231
+ * @throws Error if called on a new (unsaved) record
232
+ *
233
+ * @example
234
+ * ```typescript
235
+ * // Get all linked Contact records
236
+ * const items = await record.contacts.list();
237
+ * const first = await record.contacts.first();
238
+ *
239
+ * // Filter by label
240
+ * const specific = await record.contacts.first({ label: 'ConversationFeedback_Contact' });
241
+ * ```
242
+ */
243
+ get contacts() {
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._contacts) {
248
+ this._contacts = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
249
+ sourceEntity: 'NotificationModule:ConversationFeedback',
250
+ targetEntity: 'CrmModule:Contact',
251
+ targetModuleName: 'CrmModule',
252
+ targetEntityName: 'Contact',
253
+ labels: ['ConversationFeedback_Contact'],
254
+ }, ContactRecord_1.ContactRecord);
255
+ }
256
+ return this._contacts;
257
+ }
258
+ /**
259
+ * Access linked User records
260
+ * @remarks Available labels: ConversationFeedback_User
261
+ * @throws Error if called on a new (unsaved) record
262
+ *
263
+ * @example
264
+ * ```typescript
265
+ * // Get all linked User records
266
+ * const items = await record.users.list();
267
+ * const first = await record.users.first();
268
+ *
269
+ * // Filter by label
270
+ * const specific = await record.users.first({ label: 'ConversationFeedback_User' });
271
+ * ```
272
+ */
273
+ get users() {
274
+ var _a;
275
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
276
+ throw new Error('Cannot access links on a new (unsaved) record');
277
+ if (!this._users) {
278
+ this._users = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
279
+ sourceEntity: 'NotificationModule:ConversationFeedback',
280
+ targetEntity: 'IdentityModule:User',
281
+ targetModuleName: 'IdentityModule',
282
+ targetEntityName: 'User',
283
+ labels: ['ConversationFeedback_User'],
284
+ }, UserRecord_1.UserRecord);
285
+ }
286
+ return this._users;
287
+ }
288
+ // ============================================
143
289
  // LINK MANAGEMENT
144
290
  // ============================================
145
291
  /**
@@ -215,6 +361,17 @@ class ConversationFeedbackRecord {
215
361
  }
216
362
  }
217
363
  exports.ConversationFeedbackRecord = ConversationFeedbackRecord;
364
+ // ============================================
365
+ // TYPED LINK ACCESSORS
366
+ // ============================================
367
+ /** Valid labels for Case associations */
368
+ ConversationFeedbackRecord.casesLabels = ['Conversation_Case'];
369
+ /** Valid labels for Conversation associations */
370
+ ConversationFeedbackRecord.conversationsLabels = ['ConversationFeedback_Conversation'];
371
+ /** Valid labels for Contact associations */
372
+ ConversationFeedbackRecord.contactsLabels = ['ConversationFeedback_Contact'];
373
+ /** Valid labels for User associations */
374
+ ConversationFeedbackRecord.usersLabels = ['ConversationFeedback_User'];
218
375
  /** Type guard to check if an object is a ConversationFeedbackRecord */
219
376
  function isConversationFeedbackRecord(obj) {
220
377
  return obj instanceof ConversationFeedbackRecord;
@@ -13,18 +13,27 @@
13
13
  * await record.createConversation({ ... }).execute();
14
14
  * ```
15
15
  *
16
+ * Entity Types: DEFAULT
17
+ *
16
18
  * AUTO-GENERATED - DO NOT EDIT DIRECTLY
17
19
  */
18
20
  import { OdinRecord, OdinRecordLinkDto } from '@d19n/odin-types/dist/core';
19
21
  import { PipelineStageEntity } from '@d19n/odin-types/dist/core';
20
22
  import { IDbRecordCreateUpdateRes } from '@d19n/odin-types/dist/core/interfaces/v1.db.interfaces';
21
23
  import { IOdinProvider } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
24
+ import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-manager';
22
25
  import { ConversationProperties } from '../entities-v2/Conversation';
23
26
  import { CloseConversationProperties } from '../actions-v2/CloseConversationDto';
24
27
  import { CreateConversationProperties } from '../actions-v2/CreateConversationDto';
25
28
  import { ReopenConversationProperties } from '../actions-v2/ReopenConversationDto';
26
29
  import { UpdateConversationProperties } from '../actions-v2/UpdateConversationDto';
27
30
  import { UpdateConversationSummaryProperties } from '../actions-v2/UpdateConversationSummaryDto';
31
+ import { MessageRecord } from './MessageRecord';
32
+ import { CaseRecord } from './CaseRecord';
33
+ import { ConversationFeedbackRecord } from './ConversationFeedbackRecord';
34
+ import { PushNotificationRecord } from './PushNotificationRecord';
35
+ /** Valid entity types for Conversation */
36
+ export declare type ConversationType = 'DEFAULT';
28
37
  /**
29
38
  * Builder for action execution with dryRun support
30
39
  *
@@ -88,6 +97,10 @@ export declare class ConversationRecord<TProps = ConversationProperties> {
88
97
  private _provider;
89
98
  private _pendingLinks;
90
99
  private _preGeneratedId;
100
+ private _messages?;
101
+ private _cases?;
102
+ private _conversationFeedbacks?;
103
+ private _pushNotifications?;
91
104
  /**
92
105
  * Create a record wrapper.
93
106
  * @param record - The underlying record, or null for create operations
@@ -100,7 +113,7 @@ export declare class ConversationRecord<TProps = ConversationProperties> {
100
113
  /** Record ID - always available (pre-generated for new records) */
101
114
  get id(): string;
102
115
  get entity(): string;
103
- get type(): string | undefined;
116
+ get type(): ConversationType | undefined;
104
117
  /** Record properties - empty object for new (unsaved) records */
105
118
  get properties(): TProps;
106
119
  get title(): string | undefined;
@@ -113,6 +126,94 @@ export declare class ConversationRecord<TProps = ConversationProperties> {
113
126
  get groups(): string[];
114
127
  /** Access the underlying OdinRecord (null for new records) */
115
128
  get record(): OdinRecord<TProps> | null;
129
+ /**
130
+ * Type guard: check if this record is of type DEFAULT
131
+ *
132
+ * When this returns true, TypeScript automatically narrows the type,
133
+ * giving you access to DEFAULT-specific properties.
134
+ *
135
+ * @example
136
+ * ```typescript
137
+ * if (record.isDefault()) {
138
+ * // TypeScript knows record.properties is ConversationProperties
139
+ * console.log(record.properties.SomeTypeSpecificField);
140
+ * }
141
+ * ```
142
+ * @remarks This is the default record type
143
+ */
144
+ isDefault(): this is ConversationRecord<ConversationProperties>;
145
+ /** Valid labels for Message associations */
146
+ static readonly messagesLabels: readonly ["Conversation_Message"];
147
+ /**
148
+ * Access linked Message records
149
+ * @remarks Available labels: Conversation_Message
150
+ * @throws Error if called on a new (unsaved) record
151
+ *
152
+ * @example
153
+ * ```typescript
154
+ * // Get all linked Message records
155
+ * const items = await record.messages.list();
156
+ * const first = await record.messages.first();
157
+ *
158
+ * // Filter by label
159
+ * const specific = await record.messages.first({ label: 'Conversation_Message' });
160
+ * ```
161
+ */
162
+ get messages(): RecordLinkManager<MessageRecord, typeof ConversationRecord['messagesLabels'][number]>;
163
+ /** Valid labels for Case associations */
164
+ static readonly casesLabels: readonly ["Case_Conversation"];
165
+ /**
166
+ * Access linked Case records
167
+ * @remarks Available labels: Case_Conversation
168
+ * @throws Error if called on a new (unsaved) record
169
+ *
170
+ * @example
171
+ * ```typescript
172
+ * // Get all linked Case records
173
+ * const items = await record.cases.list();
174
+ * const first = await record.cases.first();
175
+ *
176
+ * // Filter by label
177
+ * const specific = await record.cases.first({ label: 'Case_Conversation' });
178
+ * ```
179
+ */
180
+ get cases(): RecordLinkManager<CaseRecord, typeof ConversationRecord['casesLabels'][number]>;
181
+ /** Valid labels for ConversationFeedback associations */
182
+ static readonly conversationFeedbacksLabels: readonly ["ConversationFeedback_Conversation"];
183
+ /**
184
+ * Access linked ConversationFeedback records
185
+ * @remarks Available labels: ConversationFeedback_Conversation
186
+ * @throws Error if called on a new (unsaved) record
187
+ *
188
+ * @example
189
+ * ```typescript
190
+ * // Get all linked ConversationFeedback records
191
+ * const items = await record.conversationFeedbacks.list();
192
+ * const first = await record.conversationFeedbacks.first();
193
+ *
194
+ * // Filter by label
195
+ * const specific = await record.conversationFeedbacks.first({ label: 'ConversationFeedback_Conversation' });
196
+ * ```
197
+ */
198
+ get conversationFeedbacks(): RecordLinkManager<ConversationFeedbackRecord, typeof ConversationRecord['conversationFeedbacksLabels'][number]>;
199
+ /** Valid labels for PushNotification associations */
200
+ static readonly pushNotificationsLabels: readonly ["Conversation__PushNotification"];
201
+ /**
202
+ * Access linked PushNotification records
203
+ * @remarks Available labels: Conversation__PushNotification
204
+ * @throws Error if called on a new (unsaved) record
205
+ *
206
+ * @example
207
+ * ```typescript
208
+ * // Get all linked PushNotification records
209
+ * const items = await record.pushNotifications.list();
210
+ * const first = await record.pushNotifications.first();
211
+ *
212
+ * // Filter by label
213
+ * const specific = await record.pushNotifications.first({ label: 'Conversation__PushNotification' });
214
+ * ```
215
+ */
216
+ get pushNotifications(): RecordLinkManager<PushNotificationRecord, typeof ConversationRecord['pushNotificationsLabels'][number]>;
116
217
  /**
117
218
  * Queue a link to be created with the next action.
118
219
  * Works for both create and update actions.
@@ -14,6 +14,8 @@
14
14
  * await record.createConversation({ ... }).execute();
15
15
  * ```
16
16
  *
17
+ * Entity Types: DEFAULT
18
+ *
17
19
  * AUTO-GENERATED - DO NOT EDIT DIRECTLY
18
20
  */
19
21
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
@@ -29,6 +31,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
31
  exports.isConversationRecord = exports.ConversationRecord = void 0;
30
32
  const uuid_1 = require("uuid");
31
33
  const core_1 = require("@d19n/odin-types/dist/core");
34
+ const record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/record-link-manager");
35
+ const MessageRecord_1 = require("./MessageRecord");
36
+ const CaseRecord_1 = require("./CaseRecord");
37
+ const ConversationFeedbackRecord_1 = require("./ConversationFeedbackRecord");
38
+ const PushNotificationRecord_1 = require("./PushNotificationRecord");
32
39
  /**
33
40
  * Builder for action execution with dryRun support
34
41
  *
@@ -140,6 +147,145 @@ class ConversationRecord {
140
147
  /** Access the underlying OdinRecord (null for new records) */
141
148
  get record() { return this._record; }
142
149
  // ============================================
150
+ // TYPE GUARDS (with TypeScript type predicates)
151
+ // ============================================
152
+ /**
153
+ * Type guard: check if this record is of type DEFAULT
154
+ *
155
+ * When this returns true, TypeScript automatically narrows the type,
156
+ * giving you access to DEFAULT-specific properties.
157
+ *
158
+ * @example
159
+ * ```typescript
160
+ * if (record.isDefault()) {
161
+ * // TypeScript knows record.properties is ConversationProperties
162
+ * console.log(record.properties.SomeTypeSpecificField);
163
+ * }
164
+ * ```
165
+ * @remarks This is the default record type
166
+ */
167
+ isDefault() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'DEFAULT'; }
168
+ /**
169
+ * Access linked Message records
170
+ * @remarks Available labels: Conversation_Message
171
+ * @throws Error if called on a new (unsaved) record
172
+ *
173
+ * @example
174
+ * ```typescript
175
+ * // Get all linked Message records
176
+ * const items = await record.messages.list();
177
+ * const first = await record.messages.first();
178
+ *
179
+ * // Filter by label
180
+ * const specific = await record.messages.first({ label: 'Conversation_Message' });
181
+ * ```
182
+ */
183
+ get messages() {
184
+ var _a;
185
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
186
+ throw new Error('Cannot access links on a new (unsaved) record');
187
+ if (!this._messages) {
188
+ this._messages = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
189
+ sourceEntity: 'NotificationModule:Conversation',
190
+ targetEntity: 'NotificationModule:Message',
191
+ targetModuleName: 'NotificationModule',
192
+ targetEntityName: 'Message',
193
+ labels: ['Conversation_Message'],
194
+ }, MessageRecord_1.MessageRecord);
195
+ }
196
+ return this._messages;
197
+ }
198
+ /**
199
+ * Access linked Case records
200
+ * @remarks Available labels: Case_Conversation
201
+ * @throws Error if called on a new (unsaved) record
202
+ *
203
+ * @example
204
+ * ```typescript
205
+ * // Get all linked Case records
206
+ * const items = await record.cases.list();
207
+ * const first = await record.cases.first();
208
+ *
209
+ * // Filter by label
210
+ * const specific = await record.cases.first({ label: 'Case_Conversation' });
211
+ * ```
212
+ */
213
+ get cases() {
214
+ var _a;
215
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
216
+ throw new Error('Cannot access links on a new (unsaved) record');
217
+ if (!this._cases) {
218
+ this._cases = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
219
+ sourceEntity: 'NotificationModule:Conversation',
220
+ targetEntity: 'SupportModule:Case',
221
+ targetModuleName: 'SupportModule',
222
+ targetEntityName: 'Case',
223
+ labels: ['Case_Conversation'],
224
+ }, CaseRecord_1.CaseRecord);
225
+ }
226
+ return this._cases;
227
+ }
228
+ /**
229
+ * Access linked ConversationFeedback records
230
+ * @remarks Available labels: ConversationFeedback_Conversation
231
+ * @throws Error if called on a new (unsaved) record
232
+ *
233
+ * @example
234
+ * ```typescript
235
+ * // Get all linked ConversationFeedback records
236
+ * const items = await record.conversationFeedbacks.list();
237
+ * const first = await record.conversationFeedbacks.first();
238
+ *
239
+ * // Filter by label
240
+ * const specific = await record.conversationFeedbacks.first({ label: 'ConversationFeedback_Conversation' });
241
+ * ```
242
+ */
243
+ get conversationFeedbacks() {
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._conversationFeedbacks) {
248
+ this._conversationFeedbacks = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
249
+ sourceEntity: 'NotificationModule:Conversation',
250
+ targetEntity: 'NotificationModule:ConversationFeedback',
251
+ targetModuleName: 'NotificationModule',
252
+ targetEntityName: 'ConversationFeedback',
253
+ labels: ['ConversationFeedback_Conversation'],
254
+ }, ConversationFeedbackRecord_1.ConversationFeedbackRecord);
255
+ }
256
+ return this._conversationFeedbacks;
257
+ }
258
+ /**
259
+ * Access linked PushNotification records
260
+ * @remarks Available labels: Conversation__PushNotification
261
+ * @throws Error if called on a new (unsaved) record
262
+ *
263
+ * @example
264
+ * ```typescript
265
+ * // Get all linked PushNotification records
266
+ * const items = await record.pushNotifications.list();
267
+ * const first = await record.pushNotifications.first();
268
+ *
269
+ * // Filter by label
270
+ * const specific = await record.pushNotifications.first({ label: 'Conversation__PushNotification' });
271
+ * ```
272
+ */
273
+ get pushNotifications() {
274
+ var _a;
275
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
276
+ throw new Error('Cannot access links on a new (unsaved) record');
277
+ if (!this._pushNotifications) {
278
+ this._pushNotifications = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
279
+ sourceEntity: 'NotificationModule:Conversation',
280
+ targetEntity: 'NotificationModule:PushNotification',
281
+ targetModuleName: 'NotificationModule',
282
+ targetEntityName: 'PushNotification',
283
+ labels: ['Conversation__PushNotification'],
284
+ }, PushNotificationRecord_1.PushNotificationRecord);
285
+ }
286
+ return this._pushNotifications;
287
+ }
288
+ // ============================================
143
289
  // LINK MANAGEMENT
144
290
  // ============================================
145
291
  /**
@@ -334,6 +480,17 @@ class ConversationRecord {
334
480
  }
335
481
  }
336
482
  exports.ConversationRecord = ConversationRecord;
483
+ // ============================================
484
+ // TYPED LINK ACCESSORS
485
+ // ============================================
486
+ /** Valid labels for Message associations */
487
+ ConversationRecord.messagesLabels = ['Conversation_Message'];
488
+ /** Valid labels for Case associations */
489
+ ConversationRecord.casesLabels = ['Case_Conversation'];
490
+ /** Valid labels for ConversationFeedback associations */
491
+ ConversationRecord.conversationFeedbacksLabels = ['ConversationFeedback_Conversation'];
492
+ /** Valid labels for PushNotification associations */
493
+ ConversationRecord.pushNotificationsLabels = ['Conversation__PushNotification'];
337
494
  /** Type guard to check if an object is a ConversationRecord */
338
495
  function isConversationRecord(obj) {
339
496
  return obj instanceof ConversationRecord;
@@ -19,9 +19,14 @@ import { OdinRecord, OdinRecordLinkDto } from '@d19n/odin-types/dist/core';
19
19
  import { PipelineStageEntity } from '@d19n/odin-types/dist/core';
20
20
  import { IDbRecordCreateUpdateRes } from '@d19n/odin-types/dist/core/interfaces/v1.db.interfaces';
21
21
  import { IOdinProvider } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
22
+ import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-manager';
22
23
  import { CreditNoteProperties } from '../entities-v2/CreditNote';
23
24
  import { CreditNoteCreateProperties } from '../actions-v2/CreditNoteCreateDto';
24
25
  import { CreditNoteUpdateProperties } from '../actions-v2/CreditNoteUpdateDto';
26
+ import { TransactionRecord } from './TransactionRecord';
27
+ import { NoteRecord } from './NoteRecord';
28
+ import { InvoiceRecord } from './InvoiceRecord';
29
+ import { FileRecord } from './FileRecord';
25
30
  /**
26
31
  * Builder for action execution with dryRun support
27
32
  *
@@ -85,6 +90,10 @@ export declare class CreditNoteRecord<TProps = CreditNoteProperties> {
85
90
  private _provider;
86
91
  private _pendingLinks;
87
92
  private _preGeneratedId;
93
+ private _transactions?;
94
+ private _notes?;
95
+ private _invoices?;
96
+ private _files?;
88
97
  /**
89
98
  * Create a record wrapper.
90
99
  * @param record - The underlying record, or null for create operations
@@ -110,6 +119,78 @@ export declare class CreditNoteRecord<TProps = CreditNoteProperties> {
110
119
  get groups(): string[];
111
120
  /** Access the underlying OdinRecord (null for new records) */
112
121
  get record(): OdinRecord<TProps> | null;
122
+ /** Valid labels for Transaction associations */
123
+ static readonly transactionsLabels: readonly ["CreditNote__Transaction"];
124
+ /**
125
+ * Access linked Transaction records
126
+ * @remarks Available labels: CreditNote__Transaction
127
+ * @throws Error if called on a new (unsaved) record
128
+ *
129
+ * @example
130
+ * ```typescript
131
+ * // Get all linked Transaction records
132
+ * const items = await record.transactions.list();
133
+ * const first = await record.transactions.first();
134
+ *
135
+ * // Filter by label
136
+ * const specific = await record.transactions.first({ label: 'CreditNote__Transaction' });
137
+ * ```
138
+ */
139
+ get transactions(): RecordLinkManager<TransactionRecord, typeof CreditNoteRecord['transactionsLabels'][number]>;
140
+ /** Valid labels for Note associations */
141
+ static readonly notesLabels: readonly ["CreditNote__Note"];
142
+ /**
143
+ * Access linked Note records
144
+ * @remarks Available labels: CreditNote__Note
145
+ * @throws Error if called on a new (unsaved) record
146
+ *
147
+ * @example
148
+ * ```typescript
149
+ * // Get all linked Note records
150
+ * const items = await record.notes.list();
151
+ * const first = await record.notes.first();
152
+ *
153
+ * // Filter by label
154
+ * const specific = await record.notes.first({ label: 'CreditNote__Note' });
155
+ * ```
156
+ */
157
+ get notes(): RecordLinkManager<NoteRecord, typeof CreditNoteRecord['notesLabels'][number]>;
158
+ /** Valid labels for Invoice associations */
159
+ static readonly invoicesLabels: readonly ["Invoice__CreditNote"];
160
+ /**
161
+ * Access linked Invoice records
162
+ * @remarks Available labels: Invoice__CreditNote
163
+ * @throws Error if called on a new (unsaved) record
164
+ *
165
+ * @example
166
+ * ```typescript
167
+ * // Get all linked Invoice records
168
+ * const items = await record.invoices.list();
169
+ * const first = await record.invoices.first();
170
+ *
171
+ * // Filter by label
172
+ * const specific = await record.invoices.first({ label: 'Invoice__CreditNote' });
173
+ * ```
174
+ */
175
+ get invoices(): RecordLinkManager<InvoiceRecord, typeof CreditNoteRecord['invoicesLabels'][number]>;
176
+ /** Valid labels for File associations */
177
+ static readonly filesLabels: readonly ["CreditNote__File"];
178
+ /**
179
+ * Access linked File records
180
+ * @remarks Available labels: CreditNote__File
181
+ * @throws Error if called on a new (unsaved) record
182
+ *
183
+ * @example
184
+ * ```typescript
185
+ * // Get all linked File records
186
+ * const items = await record.files.list();
187
+ * const first = await record.files.first();
188
+ *
189
+ * // Filter by label
190
+ * const specific = await record.files.first({ label: 'CreditNote__File' });
191
+ * ```
192
+ */
193
+ get files(): RecordLinkManager<FileRecord, typeof CreditNoteRecord['filesLabels'][number]>;
113
194
  /**
114
195
  * Queue a link to be created with the next action.
115
196
  * Works for both create and update actions.