@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.createPgDirectDebitFile({ ... }).execute();
15
15
  * ```
16
16
  *
17
+ * Entity Types: DEFAULT, RESPONSE, SUBMISSION
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,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
31
  exports.isPgDirectDebitFileRecord = exports.PgDirectDebitFileRecord = 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 FileRecord_1 = require("./FileRecord");
36
+ const PgFileAllocationRecord_1 = require("./PgFileAllocationRecord");
32
37
  /**
33
38
  * Builder for action execution with dryRun support
34
39
  *
@@ -140,6 +145,117 @@ class PgDirectDebitFileRecord {
140
145
  /** Access the underlying OdinRecord (null for new records) */
141
146
  get record() { return this._record; }
142
147
  // ============================================
148
+ // TYPE GUARDS (with TypeScript type predicates)
149
+ // ============================================
150
+ /**
151
+ * Type guard: check if this record is of type DEFAULT
152
+ *
153
+ * When this returns true, TypeScript automatically narrows the type,
154
+ * giving you access to DEFAULT-specific properties.
155
+ *
156
+ * @example
157
+ * ```typescript
158
+ * if (record.isDefault()) {
159
+ * // TypeScript knows record.properties is PgDirectDebitFileProperties
160
+ * console.log(record.properties.SomeTypeSpecificField);
161
+ * }
162
+ * ```
163
+ * @remarks This is the default record type
164
+ */
165
+ isDefault() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'DEFAULT'; }
166
+ /**
167
+ * Type guard: check if this record is of type RESPONSE
168
+ *
169
+ * When this returns true, TypeScript automatically narrows the type,
170
+ * giving you access to RESPONSE-specific properties.
171
+ *
172
+ * @example
173
+ * ```typescript
174
+ * if (record.isResponse()) {
175
+ * // TypeScript knows record.properties is ResponsePgDirectDebitFileProperties
176
+ * console.log(record.properties.SomeTypeSpecificField);
177
+ * }
178
+ * ```
179
+ * @remarks Files received from HSBC
180
+ */
181
+ isResponse() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'RESPONSE'; }
182
+ /**
183
+ * Type guard: check if this record is of type SUBMISSION
184
+ *
185
+ * When this returns true, TypeScript automatically narrows the type,
186
+ * giving you access to SUBMISSION-specific properties.
187
+ *
188
+ * @example
189
+ * ```typescript
190
+ * if (record.isSubmission()) {
191
+ * // TypeScript knows record.properties is SubmissionPgDirectDebitFileProperties
192
+ * console.log(record.properties.SomeTypeSpecificField);
193
+ * }
194
+ * ```
195
+ * @remarks Files submitted to HSBC
196
+ */
197
+ isSubmission() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'SUBMISSION'; }
198
+ /**
199
+ * Access linked File records
200
+ * @remarks Available labels: PgDirectDebitFile__File
201
+ * @throws Error if called on a new (unsaved) record
202
+ *
203
+ * @example
204
+ * ```typescript
205
+ * // Get all linked File records
206
+ * const items = await record.files.list();
207
+ * const first = await record.files.first();
208
+ *
209
+ * // Filter by label
210
+ * const specific = await record.files.first({ label: 'PgDirectDebitFile__File' });
211
+ * ```
212
+ */
213
+ get files() {
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._files) {
218
+ this._files = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
219
+ sourceEntity: 'BillingModule:PgDirectDebitFile',
220
+ targetEntity: 'SchemaModule:File',
221
+ targetModuleName: 'SchemaModule',
222
+ targetEntityName: 'File',
223
+ labels: ['PgDirectDebitFile__File'],
224
+ }, FileRecord_1.FileRecord);
225
+ }
226
+ return this._files;
227
+ }
228
+ /**
229
+ * Access linked PgFileAllocation records
230
+ * @remarks Available labels: PgDirectDebitFile__PgFileAllocation
231
+ * @throws Error if called on a new (unsaved) record
232
+ *
233
+ * @example
234
+ * ```typescript
235
+ * // Get all linked PgFileAllocation records
236
+ * const items = await record.pgFileAllocations.list();
237
+ * const first = await record.pgFileAllocations.first();
238
+ *
239
+ * // Filter by label
240
+ * const specific = await record.pgFileAllocations.first({ label: 'PgDirectDebitFile__PgFileAllocation' });
241
+ * ```
242
+ */
243
+ get pgFileAllocations() {
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._pgFileAllocations) {
248
+ this._pgFileAllocations = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
249
+ sourceEntity: 'BillingModule:PgDirectDebitFile',
250
+ targetEntity: 'BillingModule:PgFileAllocation',
251
+ targetModuleName: 'BillingModule',
252
+ targetEntityName: 'PgFileAllocation',
253
+ labels: ['PgDirectDebitFile__PgFileAllocation'],
254
+ }, PgFileAllocationRecord_1.PgFileAllocationRecord);
255
+ }
256
+ return this._pgFileAllocations;
257
+ }
258
+ // ============================================
143
259
  // LINK MANAGEMENT
144
260
  // ============================================
145
261
  /**
@@ -705,6 +821,13 @@ class PgDirectDebitFileRecord {
705
821
  }
706
822
  }
707
823
  exports.PgDirectDebitFileRecord = PgDirectDebitFileRecord;
824
+ // ============================================
825
+ // TYPED LINK ACCESSORS
826
+ // ============================================
827
+ /** Valid labels for File associations */
828
+ PgDirectDebitFileRecord.filesLabels = ['PgDirectDebitFile__File'];
829
+ /** Valid labels for PgFileAllocation associations */
830
+ PgDirectDebitFileRecord.pgFileAllocationsLabels = ['PgDirectDebitFile__PgFileAllocation'];
708
831
  /** Type guard to check if an object is a PgDirectDebitFileRecord */
709
832
  function isPgDirectDebitFileRecord(obj) {
710
833
  return obj instanceof PgDirectDebitFileRecord;
@@ -13,14 +13,21 @@
13
13
  * await record.createPgDispute({ ... }).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 { PgDisputeProperties } from '../entities-v2/PgDispute';
23
26
  import { CreatePgDisputeProperties } from '../actions-v2/CreatePgDisputeDto';
27
+ import { PgWebhookRecord } from './PgWebhookRecord';
28
+ import { PgTransactionRecord } from './PgTransactionRecord';
29
+ /** Valid entity types for PgDispute */
30
+ export declare type PgDisputeType = 'DEFAULT';
24
31
  /**
25
32
  * Builder for action execution with dryRun support
26
33
  *
@@ -84,6 +91,8 @@ export declare class PgDisputeRecord<TProps = PgDisputeProperties> {
84
91
  private _provider;
85
92
  private _pendingLinks;
86
93
  private _preGeneratedId;
94
+ private _pgWebhooks?;
95
+ private _pgTransactions?;
87
96
  /**
88
97
  * Create a record wrapper.
89
98
  * @param record - The underlying record, or null for create operations
@@ -96,7 +105,7 @@ export declare class PgDisputeRecord<TProps = PgDisputeProperties> {
96
105
  /** Record ID - always available (pre-generated for new records) */
97
106
  get id(): string;
98
107
  get entity(): string;
99
- get type(): string | undefined;
108
+ get type(): PgDisputeType | undefined;
100
109
  /** Record properties - empty object for new (unsaved) records */
101
110
  get properties(): TProps;
102
111
  get title(): string | undefined;
@@ -109,6 +118,58 @@ export declare class PgDisputeRecord<TProps = PgDisputeProperties> {
109
118
  get groups(): string[];
110
119
  /** Access the underlying OdinRecord (null for new records) */
111
120
  get record(): OdinRecord<TProps> | null;
121
+ /**
122
+ * Type guard: check if this record is of type DEFAULT
123
+ *
124
+ * When this returns true, TypeScript automatically narrows the type,
125
+ * giving you access to DEFAULT-specific properties.
126
+ *
127
+ * @example
128
+ * ```typescript
129
+ * if (record.isDefault()) {
130
+ * // TypeScript knows record.properties is PgDisputeProperties
131
+ * console.log(record.properties.SomeTypeSpecificField);
132
+ * }
133
+ * ```
134
+ * @remarks This is the default record type
135
+ */
136
+ isDefault(): this is PgDisputeRecord<PgDisputeProperties>;
137
+ /** Valid labels for PgWebhook associations */
138
+ static readonly pgWebhooksLabels: readonly ["PgDispute__PgWebhook"];
139
+ /**
140
+ * Access linked PgWebhook records
141
+ * @remarks Available labels: PgDispute__PgWebhook
142
+ * @throws Error if called on a new (unsaved) record
143
+ *
144
+ * @example
145
+ * ```typescript
146
+ * // Get all linked PgWebhook records
147
+ * const items = await record.pgWebhooks.list();
148
+ * const first = await record.pgWebhooks.first();
149
+ *
150
+ * // Filter by label
151
+ * const specific = await record.pgWebhooks.first({ label: 'PgDispute__PgWebhook' });
152
+ * ```
153
+ */
154
+ get pgWebhooks(): RecordLinkManager<PgWebhookRecord, typeof PgDisputeRecord['pgWebhooksLabels'][number]>;
155
+ /** Valid labels for PgTransaction associations */
156
+ static readonly pgTransactionsLabels: readonly ["PgTransaction__PgDispute"];
157
+ /**
158
+ * Access linked PgTransaction records
159
+ * @remarks Available labels: PgTransaction__PgDispute
160
+ * @throws Error if called on a new (unsaved) record
161
+ *
162
+ * @example
163
+ * ```typescript
164
+ * // Get all linked PgTransaction records
165
+ * const items = await record.pgTransactions.list();
166
+ * const first = await record.pgTransactions.first();
167
+ *
168
+ * // Filter by label
169
+ * const specific = await record.pgTransactions.first({ label: 'PgTransaction__PgDispute' });
170
+ * ```
171
+ */
172
+ get pgTransactions(): RecordLinkManager<PgTransactionRecord, typeof PgDisputeRecord['pgTransactionsLabels'][number]>;
112
173
  /**
113
174
  * Queue a link to be created with the next action.
114
175
  * Works for both create and update actions.
@@ -14,6 +14,8 @@
14
14
  * await record.createPgDispute({ ... }).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,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
31
  exports.isPgDisputeRecord = exports.PgDisputeRecord = 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 PgWebhookRecord_1 = require("./PgWebhookRecord");
36
+ const PgTransactionRecord_1 = require("./PgTransactionRecord");
32
37
  /**
33
38
  * Builder for action execution with dryRun support
34
39
  *
@@ -140,6 +145,85 @@ class PgDisputeRecord {
140
145
  /** Access the underlying OdinRecord (null for new records) */
141
146
  get record() { return this._record; }
142
147
  // ============================================
148
+ // TYPE GUARDS (with TypeScript type predicates)
149
+ // ============================================
150
+ /**
151
+ * Type guard: check if this record is of type DEFAULT
152
+ *
153
+ * When this returns true, TypeScript automatically narrows the type,
154
+ * giving you access to DEFAULT-specific properties.
155
+ *
156
+ * @example
157
+ * ```typescript
158
+ * if (record.isDefault()) {
159
+ * // TypeScript knows record.properties is PgDisputeProperties
160
+ * console.log(record.properties.SomeTypeSpecificField);
161
+ * }
162
+ * ```
163
+ * @remarks This is the default record type
164
+ */
165
+ isDefault() { var _a; return ((_a = this._record) === null || _a === void 0 ? void 0 : _a.type) === 'DEFAULT'; }
166
+ /**
167
+ * Access linked PgWebhook records
168
+ * @remarks Available labels: PgDispute__PgWebhook
169
+ * @throws Error if called on a new (unsaved) record
170
+ *
171
+ * @example
172
+ * ```typescript
173
+ * // Get all linked PgWebhook records
174
+ * const items = await record.pgWebhooks.list();
175
+ * const first = await record.pgWebhooks.first();
176
+ *
177
+ * // Filter by label
178
+ * const specific = await record.pgWebhooks.first({ label: 'PgDispute__PgWebhook' });
179
+ * ```
180
+ */
181
+ get pgWebhooks() {
182
+ var _a;
183
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
184
+ throw new Error('Cannot access links on a new (unsaved) record');
185
+ if (!this._pgWebhooks) {
186
+ this._pgWebhooks = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
187
+ sourceEntity: 'BillingModule:PgDispute',
188
+ targetEntity: 'AuditModule:PgWebhook',
189
+ targetModuleName: 'AuditModule',
190
+ targetEntityName: 'PgWebhook',
191
+ labels: ['PgDispute__PgWebhook'],
192
+ }, PgWebhookRecord_1.PgWebhookRecord);
193
+ }
194
+ return this._pgWebhooks;
195
+ }
196
+ /**
197
+ * Access linked PgTransaction records
198
+ * @remarks Available labels: PgTransaction__PgDispute
199
+ * @throws Error if called on a new (unsaved) record
200
+ *
201
+ * @example
202
+ * ```typescript
203
+ * // Get all linked PgTransaction records
204
+ * const items = await record.pgTransactions.list();
205
+ * const first = await record.pgTransactions.first();
206
+ *
207
+ * // Filter by label
208
+ * const specific = await record.pgTransactions.first({ label: 'PgTransaction__PgDispute' });
209
+ * ```
210
+ */
211
+ get pgTransactions() {
212
+ var _a;
213
+ if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
214
+ throw new Error('Cannot access links on a new (unsaved) record');
215
+ if (!this._pgTransactions) {
216
+ this._pgTransactions = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
217
+ sourceEntity: 'BillingModule:PgDispute',
218
+ targetEntity: 'BillingModule:PgTransaction',
219
+ targetModuleName: 'BillingModule',
220
+ targetEntityName: 'PgTransaction',
221
+ labels: ['PgTransaction__PgDispute'],
222
+ }, PgTransactionRecord_1.PgTransactionRecord);
223
+ }
224
+ return this._pgTransactions;
225
+ }
226
+ // ============================================
143
227
  // LINK MANAGEMENT
144
228
  // ============================================
145
229
  /**
@@ -334,6 +418,13 @@ class PgDisputeRecord {
334
418
  }
335
419
  }
336
420
  exports.PgDisputeRecord = PgDisputeRecord;
421
+ // ============================================
422
+ // TYPED LINK ACCESSORS
423
+ // ============================================
424
+ /** Valid labels for PgWebhook associations */
425
+ PgDisputeRecord.pgWebhooksLabels = ['PgDispute__PgWebhook'];
426
+ /** Valid labels for PgTransaction associations */
427
+ PgDisputeRecord.pgTransactionsLabels = ['PgTransaction__PgDispute'];
337
428
  /** Type guard to check if an object is a PgDisputeRecord */
338
429
  function isPgDisputeRecord(obj) {
339
430
  return obj instanceof PgDisputeRecord;
@@ -13,19 +13,27 @@
13
13
  * await record.createPgFileAllocation({ ... }).execute();
14
14
  * ```
15
15
  *
16
+ * Entity Types: DEFAULT, REPORT, SUBMISSION
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';
22
- import { PgFileAllocationProperties } from '../entities-v2/PgFileAllocation';
24
+ import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-manager';
25
+ import { PgFileAllocationProperties, ReportPgFileAllocationProperties, SubmissionPgFileAllocationProperties } from '../entities-v2/PgFileAllocation';
23
26
  import { CreateAuddisPgSubmissionAllocationProperties } from '../actions-v2/CreateAuddisPgSubmissionAllocationDto';
24
27
  import { CreateBacsPgSubmissionAllocationProperties } from '../actions-v2/CreateBacsPgSubmissionAllocationDto';
25
28
  import { UpdatePgAllocationWithAcknowledgementOneProperties } from '../actions-v2/UpdatePgAllocationWithAcknowledgementOneDto';
26
29
  import { UpdatePgAllocationWithAcknowledgementTwoProperties } from '../actions-v2/UpdatePgAllocationWithAcknowledgementTwoDto';
27
30
  import { UpdatePgAllocationWithBacsReportProperties } from '../actions-v2/UpdatePgAllocationWithBacsReportDto';
28
31
  import { UpdatePgFileAllocationProperties } from '../actions-v2/UpdatePgFileAllocationDto';
32
+ import { PgDirectDebitFileRecord } from './PgDirectDebitFileRecord';
33
+ import { PgPaymentMethodRecord } from './PgPaymentMethodRecord';
34
+ import { PgTransactionRecord } from './PgTransactionRecord';
35
+ /** Valid entity types for PgFileAllocation */
36
+ export declare type PgFileAllocationType = 'DEFAULT' | 'REPORT' | 'SUBMISSION';
29
37
  /**
30
38
  * Builder for action execution with dryRun support
31
39
  *
@@ -89,6 +97,9 @@ export declare class PgFileAllocationRecord<TProps = PgFileAllocationProperties>
89
97
  private _provider;
90
98
  private _pendingLinks;
91
99
  private _preGeneratedId;
100
+ private _pgDirectDebitFiles?;
101
+ private _pgPaymentMethods?;
102
+ private _pgTransactions?;
92
103
  /**
93
104
  * Create a record wrapper.
94
105
  * @param record - The underlying record, or null for create operations
@@ -101,7 +112,7 @@ export declare class PgFileAllocationRecord<TProps = PgFileAllocationProperties>
101
112
  /** Record ID - always available (pre-generated for new records) */
102
113
  get id(): string;
103
114
  get entity(): string;
104
- get type(): string | undefined;
115
+ get type(): PgFileAllocationType | undefined;
105
116
  /** Record properties - empty object for new (unsaved) records */
106
117
  get properties(): TProps;
107
118
  get title(): string | undefined;
@@ -114,6 +125,108 @@ export declare class PgFileAllocationRecord<TProps = PgFileAllocationProperties>
114
125
  get groups(): string[];
115
126
  /** Access the underlying OdinRecord (null for new records) */
116
127
  get record(): OdinRecord<TProps> | null;
128
+ /**
129
+ * Type guard: check if this record is of type DEFAULT
130
+ *
131
+ * When this returns true, TypeScript automatically narrows the type,
132
+ * giving you access to DEFAULT-specific properties.
133
+ *
134
+ * @example
135
+ * ```typescript
136
+ * if (record.isDefault()) {
137
+ * // TypeScript knows record.properties is PgFileAllocationProperties
138
+ * console.log(record.properties.SomeTypeSpecificField);
139
+ * }
140
+ * ```
141
+ * @remarks This is the default record type
142
+ */
143
+ isDefault(): this is PgFileAllocationRecord<PgFileAllocationProperties>;
144
+ /**
145
+ * Type guard: check if this record is of type REPORT
146
+ *
147
+ * When this returns true, TypeScript automatically narrows the type,
148
+ * giving you access to REPORT-specific properties.
149
+ *
150
+ * @example
151
+ * ```typescript
152
+ * if (record.isReport()) {
153
+ * // TypeScript knows record.properties is ReportPgFileAllocationProperties
154
+ * console.log(record.properties.SomeTypeSpecificField);
155
+ * }
156
+ * ```
157
+ * @remarks Report
158
+ */
159
+ isReport(): this is PgFileAllocationRecord<ReportPgFileAllocationProperties>;
160
+ /**
161
+ * Type guard: check if this record is of type SUBMISSION
162
+ *
163
+ * When this returns true, TypeScript automatically narrows the type,
164
+ * giving you access to SUBMISSION-specific properties.
165
+ *
166
+ * @example
167
+ * ```typescript
168
+ * if (record.isSubmission()) {
169
+ * // TypeScript knows record.properties is SubmissionPgFileAllocationProperties
170
+ * console.log(record.properties.SomeTypeSpecificField);
171
+ * }
172
+ * ```
173
+ * @remarks Submission
174
+ */
175
+ isSubmission(): this is PgFileAllocationRecord<SubmissionPgFileAllocationProperties>;
176
+ /** Valid labels for PgDirectDebitFile associations */
177
+ static readonly pgDirectDebitFilesLabels: readonly ["PgDirectDebitFile__PgFileAllocation"];
178
+ /**
179
+ * Access linked PgDirectDebitFile records
180
+ * @remarks Available labels: PgDirectDebitFile__PgFileAllocation
181
+ * @throws Error if called on a new (unsaved) record
182
+ *
183
+ * @example
184
+ * ```typescript
185
+ * // Get all linked PgDirectDebitFile records
186
+ * const items = await record.pgDirectDebitFiles.list();
187
+ * const first = await record.pgDirectDebitFiles.first();
188
+ *
189
+ * // Filter by label
190
+ * const specific = await record.pgDirectDebitFiles.first({ label: 'PgDirectDebitFile__PgFileAllocation' });
191
+ * ```
192
+ */
193
+ get pgDirectDebitFiles(): RecordLinkManager<PgDirectDebitFileRecord, typeof PgFileAllocationRecord['pgDirectDebitFilesLabels'][number]>;
194
+ /** Valid labels for PgPaymentMethod associations */
195
+ static readonly pgPaymentMethodsLabels: readonly ["PgPaymentMethod__PgFileAllocation"];
196
+ /**
197
+ * Access linked PgPaymentMethod records
198
+ * @remarks Available labels: PgPaymentMethod__PgFileAllocation
199
+ * @throws Error if called on a new (unsaved) record
200
+ *
201
+ * @example
202
+ * ```typescript
203
+ * // Get all linked PgPaymentMethod records
204
+ * const items = await record.pgPaymentMethods.list();
205
+ * const first = await record.pgPaymentMethods.first();
206
+ *
207
+ * // Filter by label
208
+ * const specific = await record.pgPaymentMethods.first({ label: 'PgPaymentMethod__PgFileAllocation' });
209
+ * ```
210
+ */
211
+ get pgPaymentMethods(): RecordLinkManager<PgPaymentMethodRecord, typeof PgFileAllocationRecord['pgPaymentMethodsLabels'][number]>;
212
+ /** Valid labels for PgTransaction associations */
213
+ static readonly pgTransactionsLabels: readonly ["PgTransaction__PgFileAllocation"];
214
+ /**
215
+ * Access linked PgTransaction records
216
+ * @remarks Available labels: PgTransaction__PgFileAllocation
217
+ * @throws Error if called on a new (unsaved) record
218
+ *
219
+ * @example
220
+ * ```typescript
221
+ * // Get all linked PgTransaction records
222
+ * const items = await record.pgTransactions.list();
223
+ * const first = await record.pgTransactions.first();
224
+ *
225
+ * // Filter by label
226
+ * const specific = await record.pgTransactions.first({ label: 'PgTransaction__PgFileAllocation' });
227
+ * ```
228
+ */
229
+ get pgTransactions(): RecordLinkManager<PgTransactionRecord, typeof PgFileAllocationRecord['pgTransactionsLabels'][number]>;
117
230
  /**
118
231
  * Queue a link to be created with the next action.
119
232
  * Works for both create and update actions.