@d19n/youfibre-odin-sdk 1.0.319 → 1.0.320

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 (38) hide show
  1. package/README.md +2 -1
  2. package/dist/OdinDbClient.d.ts +22 -1
  3. package/dist/OdinDbClient.js +128 -106
  4. package/dist/actions-v2/ApproveCboDto.d.ts +1 -1
  5. package/dist/actions-v2/CboCreateDto.d.ts +1 -1
  6. package/dist/actions-v2/CboUpdateDto.d.ts +1 -1
  7. package/dist/actions-v2/CompleteInstallWorkOrderFlowDto.d.ts +122 -122
  8. package/dist/actions-v2/CompletePrePullWorkOrderFlowDto.d.ts +7 -7
  9. package/dist/actions-v2/CompleteRemediationWorkOrderFlowDto.d.ts +7 -7
  10. package/dist/actions-v2/CompleteServiceWorkOrderFlowDto.d.ts +25 -25
  11. package/dist/actions-v2/CreateCaseForChatDto.d.ts +1 -1
  12. package/dist/actions-v2/CreateMessageDto.d.ts +1 -1
  13. package/dist/actions-v2/CreateNewReturnDto.d.ts +17 -1
  14. package/dist/actions-v2/CreatePaymentMethodRefundForContactDto.d.ts +58 -0
  15. package/dist/actions-v2/CreatePaymentMethodRefundForContactDto.js +54 -0
  16. package/dist/actions-v2/CreateTransactionalEmailDto.d.ts +1 -1
  17. package/dist/actions-v2/CreateWayleaveWorkOrderFlowDto.d.ts +7 -7
  18. package/dist/actions-v2/FlowStepReceivedConfirmationDto.d.ts +1 -1
  19. package/dist/actions-v2/MoveBusinessInstallToRemediationDto.d.ts +4 -4
  20. package/dist/actions-v2/MoveCboToApprovedDto.d.ts +1 -1
  21. package/dist/actions-v2/MoveCboToReceivedDto.d.ts +1 -1
  22. package/dist/actions-v2/MoveInspectionWorkOrderToInProgressSubstantialDto.d.ts +10 -10
  23. package/dist/actions-v2/MoveInstallWorkOrderToInProgressSubstantialDto.d.ts +10 -10
  24. package/dist/actions-v2/MoveInstallWorkOrderToRemediationDto.d.ts +4 -4
  25. package/dist/actions-v2/MovePrePullWorkOrderToInProgressSubstantialDto.d.ts +10 -10
  26. package/dist/actions-v2/MovePrePullWorkOrderToRemediationDto.d.ts +4 -4
  27. package/dist/actions-v2/MoveRemediationWorkOrderToInProgressSubstantialDto.d.ts +10 -10
  28. package/dist/actions-v2/MoveRemediationWorkOrderToRemediationDto.d.ts +4 -4
  29. package/dist/actions-v2/MoveServiceWorkOrderToInProgressSubstantialDto.d.ts +10 -10
  30. package/dist/actions-v2/MoveServiceWorkOrderToRemediationDto.d.ts +4 -4
  31. package/dist/actions-v2/UpdateEmailDto.d.ts +1 -1
  32. package/dist/actions-v2/UpdateSsraDto.d.ts +10 -10
  33. package/dist/entities-v2/Returns.d.ts +15 -1
  34. package/dist/entities-v2/Returns.js +4 -0
  35. package/dist/index.d.ts +1 -0
  36. package/dist/records-v2/PaymentMethodRefundRecord.d.ts +31 -0
  37. package/dist/records-v2/PaymentMethodRefundRecord.js +41 -0
  38. package/package.json +2 -2
package/README.md CHANGED
@@ -347,7 +347,7 @@ This SDK includes **159** entities across **12** modules.
347
347
 
348
348
  ## Actions
349
349
 
350
- This SDK includes **504** actions.
350
+ This SDK includes **505** actions.
351
351
 
352
352
  ### Action Types
353
353
 
@@ -993,6 +993,7 @@ This SDK includes **504** actions.
993
993
  | `CompletePaymentMethodRefund` | UPDATE | BillingModule.PaymentMethodRefund.Update.CompletePaymentMethodRefund |
994
994
  | `CompletePaymentMethodRefundFlow` | STAGE_TRANSITION | BillingModule.PaymentMethodRefund.Update.CompletePaymentMethodRefund |
995
995
  | `CreatePaymentMethodRefund` | CREATE | BillingModule.PaymentMethodRefund.Create.CreatePaymentMethodRefund |
996
+ | `CreatePaymentMethodRefundForContact` | CREATE | BillingModule.PaymentMethodRefund.Create.CreatePaymentMethodRefundForContact |
996
997
 
997
998
  **CompletePaymentMethodRefundFlow Target Stages:** `PaymentMethodRefundStageDone`
998
999
 
@@ -13,10 +13,15 @@
13
13
  * const order = await odin.orders.get('ORD-123');
14
14
  * console.log(order.properties.Status);
15
15
  * await order.activateOrder({ ActiveDate: '2025-01-15' });
16
+ *
17
+ * // With default options (applies to all operations)
18
+ * const odin = new OdinDbClient(principal, this.dbService, { omitPermissionsCheck: true });
19
+ * const invoice = await odin.invoices.get(invoiceId); // Bypasses permissions
16
20
  * ```
17
21
  *
18
22
  * AUTO-GENERATED - DO NOT EDIT DIRECTLY
19
23
  */
24
+ import { DbProviderOptions } from '@d19n/odin-sdk-generator/dist/db.provider';
20
25
  import { AccountDbAccessor } from './db-accessors-v2/AccountDbAccessor';
21
26
  import { ActivityDbAccessor } from './db-accessors-v2/ActivityDbAccessor';
22
27
  import { ActivityLogDbAccessor } from './db-accessors-v2/ActivityLogDbAccessor';
@@ -125,6 +130,7 @@ import { YfStockAuditDbAccessor } from './db-accessors-v2/YfStockAuditDbAccessor
125
130
  export declare class OdinDbClient {
126
131
  private readonly _principal;
127
132
  private readonly _dbService;
133
+ private readonly _defaultOptions?;
128
134
  private _accounts?;
129
135
  private _activities?;
130
136
  private _activityLogs?;
@@ -235,8 +241,21 @@ export declare class OdinDbClient {
235
241
  *
236
242
  * @param principal The authenticated user/principal context
237
243
  * @param dbService The database service instance
244
+ * @param defaultOptions Default provider options applied to all operations
245
+ *
246
+ * @example
247
+ * ```typescript
248
+ * // Standard usage
249
+ * const odin = new OdinDbClient(principal, dbService);
250
+ *
251
+ * // With permissions bypass (applies to all operations)
252
+ * const odin = new OdinDbClient(principal, dbService, { omitPermissionsCheck: true });
253
+ *
254
+ * // Per-call override still available
255
+ * const record = await odin.invoices.get(id, { entities: ['InvoiceItem'] }, { omitPermissionsCheck: true });
256
+ * ```
238
257
  */
239
- constructor(principal: any, dbService: any);
258
+ constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
240
259
  /** Access Account records */
241
260
  get accounts(): AccountDbAccessor;
242
261
  /** Access Activity records */
@@ -451,5 +470,7 @@ export declare class OdinDbClient {
451
470
  get principal(): any;
452
471
  /** Get the database service */
453
472
  get dbService(): any;
473
+ /** Get the default provider options */
474
+ get defaultOptions(): DbProviderOptions | undefined;
454
475
  }
455
476
  export default OdinDbClient;