@actschurch/ccms-sdk 0.0.16 → 0.0.18

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 (104) hide show
  1. package/dist/core/HttpClient.d.ts.map +1 -1
  2. package/dist/core/HttpClient.js +6 -3
  3. package/dist/core/HttpClient.js.map +1 -1
  4. package/dist/models/orders/ModelView/OrderPaymentModelView.d.ts +14 -0
  5. package/dist/models/orders/ModelView/OrderPaymentModelView.d.ts.map +1 -1
  6. package/dist/models/orders/Order.d.ts +10 -0
  7. package/dist/models/orders/Order.d.ts.map +1 -1
  8. package/dist/models/orders/OrderLine.d.ts +4 -0
  9. package/dist/models/orders/OrderLine.d.ts.map +1 -1
  10. package/dist/models/system/SystemRevenue.d.ts +30 -0
  11. package/dist/models/system/SystemRevenue.d.ts.map +1 -0
  12. package/dist/models/system/SystemRevenue.js +2 -0
  13. package/dist/models/system/SystemRevenue.js.map +1 -0
  14. package/dist/models/system/VendorSystemSetting.d.ts +20 -0
  15. package/dist/models/system/VendorSystemSetting.d.ts.map +1 -0
  16. package/dist/models/system/VendorSystemSetting.js +2 -0
  17. package/dist/models/system/VendorSystemSetting.js.map +1 -0
  18. package/dist/models/system/index.d.ts +2 -0
  19. package/dist/models/system/index.d.ts.map +1 -1
  20. package/dist/models/system/index.js +2 -0
  21. package/dist/models/system/index.js.map +1 -1
  22. package/dist/models/vendors/VendorLedger.d.ts +17 -0
  23. package/dist/models/vendors/VendorLedger.d.ts.map +1 -0
  24. package/dist/models/vendors/VendorLedger.js +2 -0
  25. package/dist/models/vendors/VendorLedger.js.map +1 -0
  26. package/dist/models/vendors/VendorLedgerEntry.d.ts +21 -0
  27. package/dist/models/vendors/VendorLedgerEntry.d.ts.map +1 -0
  28. package/dist/models/vendors/VendorLedgerEntry.js +10 -0
  29. package/dist/models/vendors/VendorLedgerEntry.js.map +1 -0
  30. package/dist/models/vendors/VendorPayout.d.ts +27 -0
  31. package/dist/models/vendors/VendorPayout.d.ts.map +1 -0
  32. package/dist/models/vendors/VendorPayout.js +12 -0
  33. package/dist/models/vendors/VendorPayout.js.map +1 -0
  34. package/dist/models/vendors/VendorPayoutStatus.d.ts +14 -0
  35. package/dist/models/vendors/VendorPayoutStatus.d.ts.map +1 -0
  36. package/dist/models/vendors/VendorPayoutStatus.js +2 -0
  37. package/dist/models/vendors/VendorPayoutStatus.js.map +1 -0
  38. package/dist/models/vendors/index.d.ts +4 -0
  39. package/dist/models/vendors/index.d.ts.map +1 -1
  40. package/dist/models/vendors/index.js +4 -0
  41. package/dist/models/vendors/index.js.map +1 -1
  42. package/dist/react/hooks/services/useSystemServices.d.ts +9 -1
  43. package/dist/react/hooks/services/useSystemServices.d.ts.map +1 -1
  44. package/dist/react/hooks/services/useSystemServices.js +12 -0
  45. package/dist/react/hooks/services/useSystemServices.js.map +1 -1
  46. package/dist/react/hooks/services/useVendorsServices.d.ts +9 -1
  47. package/dist/react/hooks/services/useVendorsServices.d.ts.map +1 -1
  48. package/dist/react/hooks/services/useVendorsServices.js +12 -0
  49. package/dist/react/hooks/services/useVendorsServices.js.map +1 -1
  50. package/dist/services/procurements/ApproverPortalService.d.ts.map +1 -1
  51. package/dist/services/procurements/ApproverPortalService.js +2 -1
  52. package/dist/services/procurements/ApproverPortalService.js.map +1 -1
  53. package/dist/services/procurements/FinancePortalService.d.ts.map +1 -1
  54. package/dist/services/procurements/FinancePortalService.js +2 -1
  55. package/dist/services/procurements/FinancePortalService.js.map +1 -1
  56. package/dist/services/procurements/ProcurementDashboardService.d.ts.map +1 -1
  57. package/dist/services/procurements/ProcurementDashboardService.js +2 -1
  58. package/dist/services/procurements/ProcurementDashboardService.js.map +1 -1
  59. package/dist/services/procurements/SageCompanyService.d.ts.map +1 -1
  60. package/dist/services/procurements/SageCompanyService.js +2 -1
  61. package/dist/services/procurements/SageCompanyService.js.map +1 -1
  62. package/dist/services/procurements/SageItemService.d.ts +7 -0
  63. package/dist/services/procurements/SageItemService.d.ts.map +1 -1
  64. package/dist/services/procurements/SageItemService.js +12 -2
  65. package/dist/services/procurements/SageItemService.js.map +1 -1
  66. package/dist/services/procurements/SagePurchaseOrderService.d.ts.map +1 -1
  67. package/dist/services/procurements/SagePurchaseOrderService.js +2 -1
  68. package/dist/services/procurements/SagePurchaseOrderService.js.map +1 -1
  69. package/dist/services/procurements/StaffRequestPortalService.d.ts.map +1 -1
  70. package/dist/services/procurements/StaffRequestPortalService.js +2 -1
  71. package/dist/services/procurements/StaffRequestPortalService.js.map +1 -1
  72. package/dist/services/system/SystemRevenueService.d.ts +56 -0
  73. package/dist/services/system/SystemRevenueService.d.ts.map +1 -0
  74. package/dist/services/system/SystemRevenueService.js +79 -0
  75. package/dist/services/system/SystemRevenueService.js.map +1 -0
  76. package/dist/services/system/VendorSystemSettingsService.d.ts +68 -0
  77. package/dist/services/system/VendorSystemSettingsService.d.ts.map +1 -0
  78. package/dist/services/system/VendorSystemSettingsService.js +100 -0
  79. package/dist/services/system/VendorSystemSettingsService.js.map +1 -0
  80. package/dist/services/system/index.d.ts +6 -0
  81. package/dist/services/system/index.d.ts.map +1 -1
  82. package/dist/services/system/index.js +6 -0
  83. package/dist/services/system/index.js.map +1 -1
  84. package/dist/services/users/AuthService.d.ts +9 -0
  85. package/dist/services/users/AuthService.d.ts.map +1 -1
  86. package/dist/services/users/AuthService.js +17 -0
  87. package/dist/services/users/AuthService.js.map +1 -1
  88. package/dist/services/vendors/VendorLedgerService.d.ts +95 -0
  89. package/dist/services/vendors/VendorLedgerService.d.ts.map +1 -0
  90. package/dist/services/vendors/VendorLedgerService.js +139 -0
  91. package/dist/services/vendors/VendorLedgerService.js.map +1 -0
  92. package/dist/services/vendors/VendorPayoutService.d.ts +100 -0
  93. package/dist/services/vendors/VendorPayoutService.d.ts.map +1 -0
  94. package/dist/services/vendors/VendorPayoutService.js +154 -0
  95. package/dist/services/vendors/VendorPayoutService.js.map +1 -0
  96. package/dist/services/vendors/index.d.ts +8 -0
  97. package/dist/services/vendors/index.d.ts.map +1 -1
  98. package/dist/services/vendors/index.js +6 -0
  99. package/dist/services/vendors/index.js.map +1 -1
  100. package/dist/utils/object.d.ts +5 -0
  101. package/dist/utils/object.d.ts.map +1 -1
  102. package/dist/utils/object.js +45 -0
  103. package/dist/utils/object.js.map +1 -1
  104. package/package.json +1 -1
@@ -14,6 +14,8 @@ export * from './RabbitMQManagementService';
14
14
  export * from './RedisManagementService';
15
15
  export * from './RabbitMQTestService';
16
16
  export * from './RedisTestService';
17
+ export { VendorSystemSettingsService } from './VendorSystemSettingsService';
18
+ export { SystemRevenueService } from './SystemRevenueService';
17
19
  import { SystemService } from './SystemService';
18
20
  import { ApiRequestLogService } from './ApiRequestLogService';
19
21
  import { QueryPerformanceLogService } from './QueryPerformanceLogService';
@@ -24,6 +26,8 @@ import { RabbitMQManagementService } from './RabbitMQManagementService';
24
26
  import { RedisManagementService } from './RedisManagementService';
25
27
  import { RabbitMQTestService } from './RabbitMQTestService';
26
28
  import { RedisTestService } from './RedisTestService';
29
+ import { VendorSystemSettingsService } from './VendorSystemSettingsService';
30
+ import { SystemRevenueService } from './SystemRevenueService';
27
31
  /**
28
32
  * System services collection interface
29
33
  */
@@ -38,6 +42,8 @@ export interface SystemServices {
38
42
  redisManagement: RedisManagementService;
39
43
  rabbitMQTest: RabbitMQTestService;
40
44
  redisTest: RedisTestService;
45
+ vendorSystemSettings: VendorSystemSettingsService;
46
+ systemRevenue: SystemRevenueService;
41
47
  }
42
48
  /**
43
49
  * Create all system services with shared configuration
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/system/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,eA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C;IACpC,mBAAmB,EAAE,0BAA0B,CAAC;IAChD,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,eAAe,CAAC;IAC1B,kBAAkB,EAAE,yBAAyB,CAAC;IAC9C,eAAe,EAAE,sBAAsB,CAAC;IACxC,YAAY,EAAE,mBAAmB,CAAC;IAClC,SAAS,EAAE,gBAAgB,CAAC;IAC5B,oBAAoB,EAAE,2BAA2B,CAAC;IAClD,aAAa,EAAE,oBAAoB,CAAC;CACrC;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,UAAU,EAChB,MAAM,CAAC,EAAE,aAAa,GACrB,cAAc,CAehB"}
@@ -13,6 +13,8 @@ export * from './RabbitMQManagementService';
13
13
  export * from './RedisManagementService';
14
14
  export * from './RabbitMQTestService';
15
15
  export * from './RedisTestService';
16
+ export { VendorSystemSettingsService } from './VendorSystemSettingsService';
17
+ export { SystemRevenueService } from './SystemRevenueService';
16
18
  // Service imports for factory
17
19
  import { SystemService } from './SystemService';
18
20
  import { ApiRequestLogService } from './ApiRequestLogService';
@@ -24,6 +26,8 @@ import { RabbitMQManagementService } from './RabbitMQManagementService';
24
26
  import { RedisManagementService } from './RedisManagementService';
25
27
  import { RabbitMQTestService } from './RabbitMQTestService';
26
28
  import { RedisTestService } from './RedisTestService';
29
+ import { VendorSystemSettingsService } from './VendorSystemSettingsService';
30
+ import { SystemRevenueService } from './SystemRevenueService';
27
31
  /**
28
32
  * Create all system services with shared configuration
29
33
  * @param http - HTTP client instance
@@ -42,6 +46,8 @@ export function createSystemServices(http, config) {
42
46
  redisManagement: new RedisManagementService(http, config),
43
47
  rabbitMQTest: new RabbitMQTestService(http, config),
44
48
  redisTest: new RedisTestService(http, config),
49
+ vendorSystemSettings: new VendorSystemSettingsService(http, config),
50
+ systemRevenue: new SystemRevenueService(http, config),
45
51
  };
46
52
  }
47
53
  //# sourceMappingURL=index.js.map
@@ -1 +1 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swordRaw(data: ForgotPasswordViewModel): Promise<ResponseData<boolean>>;
64
+ /**
65
+ * Validate password reset token
66
+ * GET api/auth/validate-reset-token?token={token}&email={email}
67
+ */
68
+ validateResetToken(token: string, email: string): Promise<boolean>;
69
+ /**
70
+ * Validate reset token with full response
71
+ */
72
+ validateResetTokenRaw(token: string, email: string): Promise<ResponseData<boolean>>;
64
73
  /**
65
74
  * Reset password using reset token
66
75
  * POST api/auth/reset-password
@@ -1 +1 @@
1
- {"version":3,"file":"AuthService.d.ts","sourceRoot":"","sources":["../../../src/services/users/AuthService.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,cAAc,EACd,YAAY,EACZ,gCAAgC,EAChC,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAE/B;;;GAGG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAAW;IACvD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAc;gBAEnC,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,aAAa;IAYpD;;;OAGG;IACG,KAAK,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC;IAQxD;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IASnE;;;OAGG;IACG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,gCAAgC,GAAG,OAAO,CAAC,YAAY,CAAC;IAQ9F;;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YAAY,CAAC,OAAO,CAAC,CAAC;IAQ3C;;;OAGG;IACG,cAAc,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,OAAO,CAAC;IAKrE;;OAEG;IACH,iBAAiB,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IAQhF;;;OAGG;IACG,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKxE;;OAEG;IACH,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IAQnF;;;OAGG;IACG,aAAa,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,OAAO,CAAC;IAKnE;;OAEG;IACH,gBAAgB,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IAQ9E;;;OAGG;IACG,cAAc,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,OAAO,CAAC;IAKrE;;OAEG;IACH,iBAAiB,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IAQhF;;;OAGG;IACG,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IAQpC;;OAEG;IACH,cAAc,IAAI,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;CAKhD"}
@@ -113,6 +113,23 @@ export class AuthService extends BaseService {
113
113
  const url = this.buildUrl(endpoint);
114
114
  return this.http.post(url, data);
115
115
  }
116
+ // ==================== VALIDATE RESET TOKEN ====================
117
+ /**
118
+ * Validate password reset token
119
+ * GET api/auth/validate-reset-token?token={token}&email={email}
120
+ */
121
+ async validateResetToken(token, email) {
122
+ const response = await this.validateResetTokenRaw(token, email);
123
+ return response.success;
124
+ }
125
+ /**
126
+ * Validate reset token with full response
127
+ */
128
+ validateResetTokenRaw(token, email) {
129
+ const endpoint = this.getEndpoint('validate-reset-token', 'validate-reset-token');
130
+ const url = this.buildUrlWithParams(endpoint, { token, email });
131
+ return this.http.get(url);
132
+ }
116
133
  // ==================== RESET PASSWORD ====================
117
134
  /**
118
135
  * Reset password using reset token
@@ -1 +1 @@
1
- {"version":3,"file":"AuthService.js","sourceRoot":"","sources":["../../../src/services/users/AuthService.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAYlD;;;GAGG;AACH,MAAM,OAAO,WAAY,SAAQ,WAAW;IAI1C,YAAY,IAAgB,EAAE,MAAsB;QAClD,MAAM,WAAW,GAAG,MAAM,EAAE,WAAW,IAAI,WAAW,CAAC,oBAAoB,CAAC;QAC5E,OAAO,CAAC,GAAG,CAAC,0CAA0C,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;QACzG,KAAK,CAAC,IAAI,EAAE;YACV,WAAW;YACX,QAAQ,EAAE,WAAW,CAAC,SAAS;YAC/B,SAAS,EAAE,MAAM,EAAE,SAAS;SAC7B,CAAC,CAAC;IACL,CAAC;IAED,kDAAkD;IAElD;;;OAGG;IACH,KAAK,CAAC,KAAK,CAAC,IAAoB;QAC9B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,IAAI,cAAc,CAAC,CAAC;QACtD,CAAC;QACD,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,IAAoB;QAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACpD,MAAM,GAAG,GA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AAQ,GAAG,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC;QACxE,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAU,GAAG,EAAE,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,0DAA0D;IAE1D;;;OAGG;IACH,KAAK,CAAC,WAAW;QACf,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC7C,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,IAAI,yBAAyB,CAAC,CAAC;QACjE,CAAC;QACD,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,cAAc;QACZ,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;QACpE,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAS,GAAG,EAAE,EAAE,CAAC,CAAC;IACzC,CAAC;;AA5MuB,gCAAoB,GAAG,OAAO,CAAC;AAC/B,qBAAS,GAAG,UAAU,CAAC"}
@@ -0,0 +1,95 @@
1
+ /**
2
+ * VendorLedgerService
3
+ * Service for managing vendor financial ledgers
4
+ */
5
+ import { CrudService } from '../base/CrudService';
6
+ import type { HttpClient } from '../../core/HttpClient';
7
+ import type { ResponseData } from '../../models/common';
8
+ import type { ServiceConfig } from '../types';
9
+ import type { VendorLedger } from '../../models/vendors';
10
+ import type { VendorLedgerEntry } from '../../models/vendors';
11
+ /**
12
+ * Service for vendor ledger CRUD operations with vendor-specific queries
13
+ */
14
+ export declare class VendorLedgerService extends CrudService<VendorLedger, Partial<VendorLedger>, Partial<VendorLedger>> {
15
+ private static readonly DEFAULT_SERVICE_PATH;
16
+ private static readonly BASE_PATH;
17
+ constructor(http: HttpClient, config?: ServiceConfig);
18
+ /**
19
+ * Get all ledger records for a specific vendor
20
+ * @param vendorId - The vendor ID
21
+ * @returns Array of vendor ledgers
22
+ */
23
+ getByVendor(vendorId: number): Promise<VendorLedger[]>;
24
+ /**
25
+ * Get all ledger records for a specific vendor with full response
26
+ * @param vendorId - The vendor ID
27
+ * @returns ResponseData with array of vendor ledgers
28
+ */
29
+ getByVendorRaw(vendorId: number): Promise<ResponseData<VendorLedger[]>>;
30
+ /**
31
+ * Get a ledger statement for a vendor within a date range
32
+ * @param vendorId - The vendor ID
33
+ * @param from - Start date string
34
+ * @param to - End date string
35
+ * @returns Array of ledger entries
36
+ */
37
+ getStatement(vendorId: number, from: string, to: string): Promise<VendorLedgerEntry[]>;
38
+ /**
39
+ * Get a ledger statement for a vendor within a date range with full response
40
+ * @param vendorId - The vendor ID
41
+ * @param from - Start date string
42
+ * @param to - End date string
43
+ * @returns ResponseData with array of ledger entries
44
+ */
45
+ getStatementRaw(vendorId: number, from: string, to: string): Promise<ResponseData<VendorLedgerEntry[]>>;
46
+ /**
47
+ * Credit a vendor's ledger
48
+ * @param vendorId - The vendor ID
49
+ * @param data - Credit data
50
+ * @returns The created ledger entry
51
+ */
52
+ creditVendor(vendorId: number, data: Partial<VendorLedgerEntry>): Promise<VendorLedgerEntry>;
53
+ /**
54
+ * Credit a vendor's ledger with full response
55
+ * @param vendorId - The vendor ID
56
+ * @param data - Credit data
57
+ * @returns ResponseData with the created ledger entry
58
+ */
59
+ creditVendorRaw(vendorId: number, data: Partial<VendorLedgerEntry>): Promise<ResponseData<VendorLedgerEntry>>;
60
+ /**
61
+ * Get all vendor ledgers as model views
62
+ * @returns Array of vendor ledger views
63
+ */
64
+ getViews(): Promise<VendorLedger[]>;
65
+ /**
66
+ * Get all vendor ledgers as model views with full response
67
+ * @returns ResponseData with array of vendor ledger views
68
+ */
69
+ getViewsRaw(): Promise<ResponseData<VendorLedger[]>>;
70
+ /**
71
+ * Get vendor ledger model view by ID
72
+ * @param id - Ledger ID
73
+ * @returns The vendor ledger view
74
+ */
75
+ getView(id: number): Promise<VendorLedger>;
76
+ /**
77
+ * Get vendor ledger model view by ID with full response
78
+ * @param id - Ledger ID
79
+ * @returns ResponseData with vendor ledger view
80
+ */
81
+ getViewRaw(id: number): Promise<ResponseData<VendorLedger>>;
82
+ /**
83
+ * Get all ledger model views for a specific vendor
84
+ * @param vendorId - Vendor ID
85
+ * @returns Array of vendor ledger views
86
+ */
87
+ getViewsByVendor(vendorId: number): Promise<VendorLedger[]>;
88
+ /**
89
+ * Get all ledger model views for a specific vendor with full response
90
+ * @param vendorId - Vendor ID
91
+ * @returns ResponseData with array of vendor ledger views
92
+ */
93
+ getViewsByVendorRaw(vendorId: number): Promise<ResponseData<VendorLedger[]>>;
94
+ }
95
+ //# sourceMappingURL=VendorLedgerService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VendorLedgerService.d.ts","sourceRoot":"","sources":["../../../src/services/vendors/VendorLedgerService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,WAAW,CAClD,YAAY,EACZ,OAAO,CAAC,YAAY,CAAC,EACrB,OAAO,CAAC,YAAY,CAAC,CACtB;IACC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAAa;IAC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IACG,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAKjE;;;;OAIG;IACH,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,CAAC;CAI7E"}
@@ -0,0 +1,139 @@
1
+ /**
2
+ * VendorLedgerService
3
+ * Service for managing vendor financial ledgers
4
+ */
5
+ import { CrudService } from '../base/CrudService';
6
+ /**
7
+ * Service for vendor ledger CRUD operations with vendor-specific queries
8
+ */
9
+ export class VendorLedgerService extends CrudService {
10
+ constructor(http, config) {
11
+ super(http, {
12
+ servicePath: config?.servicePath ?? VendorLedgerService.DEFAULT_SERVICE_PATH,
13
+ basePath: VendorLedgerService.BASE_PATH,
14
+ endpoints: config?.endpoints,
15
+ });
16
+ }
17
+ /**
18
+ * Get all ledger records for a specific vendor
19
+ * @param vendorId - The vendor ID
20
+ * @returns Array of vendor ledgers
21
+ */
22
+ async getByVendor(vendorId) {
23
+ const response = await this.getByVendorRaw(vendorId);
24
+ return response.data ?? [];
25
+ }
26
+ /**
27
+ * Get all ledger records for a specific vendor with full response
28
+ * @param vendorId - The vendor ID
29
+ * @returns ResponseData with array of vendor ledgers
30
+ */
31
+ getByVendorRaw(vendorId) {
32
+ const url = this.buildUrl(`vendor/${vendorId}`);
33
+ return this.http.get(url);
34
+ }
35
+ /**
36
+ * Get a ledger statement for a vendor within a date range
37
+ * @param vendorId - The vendor ID
38
+ * @param from - Start date string
39
+ * @param to - End date string
40
+ * @returns Array of ledger entries
41
+ */
42
+ async getStatement(vendorId, from, to) {
43
+ const response = await this.getStatementRaw(vendorId, from, to);
44
+ return response.data ?? [];
45
+ }
46
+ /**
47
+ * Get a ledger statement for a vendor within a date range with full response
48
+ * @param vendorId - The vendor ID
49
+ * @param from - Start date string
50
+ * @param to - End date string
51
+ * @returns ResponseData with array of ledger entries
52
+ */
53
+ getStatementRaw(vendorId, from, to) {
54
+ const url = this.buildUrl(`vendor/${vendorId}/statement?from=${from}&to=${to}`);
55
+ return this.http.get(url);
56
+ }
57
+ /**
58
+ * Credit a vendor's ledger
59
+ * @param vendorId - The vendor ID
60
+ * @param data - Credit data
61
+ * @returns The created ledger entry
62
+ */
63
+ async creditVendor(vendorId, data) {
64
+ const response = await this.creditVendorRaw(vendorId, data);
65
+ if (!response.data) {
66
+ throw new Error(`Failed to credit vendor ledger: vendorId=${vendorId}`);
67
+ }
68
+ return response.data;
69
+ }
70
+ /**
71
+ * Credit a vendor's ledger with full response
72
+ * @param vendorId - The vendor ID
73
+ * @param data - Credit data
74
+ * @returns ResponseData with the created ledger entry
75
+ */
76
+ creditVendorRaw(vendorId, data) {
77
+ const url = this.buildUrl(`vendor/${vendorId}/credit`);
78
+ return this.http.post(url, data);
79
+ }
80
+ // ==================== MODEL VIEW QUERIES ====================
81
+ /**
82
+ * Get all vendor ledgers as model views
83
+ * @returns Array of vendor ledger views
84
+ */
85
+ async getViews() {
86
+ const response = await this.getViewsRaw();
87
+ return response.data ?? [];
88
+ }
89
+ /**
90
+ * Get all vendor ledgers as model views with full response
91
+ * @returns ResponseData with array of vendor ledger views
92
+ */
93
+ getViewsRaw() {
94
+ const url = this.buildUrl('views');
95
+ return this.http.get(url);
96
+ }
97
+ /**
98
+ * Get vendor ledger model view by ID
99
+ * @param id - Ledger ID
100
+ * @returns The vendor ledger view
101
+ */
102
+ async getView(id) {
103
+ const response = await this.getViewRaw(id);
104
+ if (!response.data) {
105
+ throw new Error(`VendorLedger view not found: id=${id}`);
106
+ }
107
+ return response.data;
108
+ }
109
+ /**
110
+ * Get vendor ledger model view by ID with full response
111
+ * @param id - Ledger ID
112
+ * @returns ResponseData with vendor ledger view
113
+ */
114
+ getViewRaw(id) {
115
+ const url = this.buildUrl(`${id}/view`);
116
+ return this.http.get(url);
117
+ }
118
+ /**
119
+ * Get all ledger model views for a specific vendor
120
+ * @param vendorId - Vendor ID
121
+ * @returns Array of vendor ledger views
122
+ */
123
+ async getViewsByVendor(vendorId) {
124
+ const response = await this.getViewsByVendorRaw(vendorId);
125
+ return response.data ?? [];
126
+ }
127
+ /**
128
+ * Get all ledger model views for a specific vendor with full response
129
+ * @param vendorId - Vendor ID
130
+ * @returns ResponseData with array of vendor ledger views
131
+ */
132
+ getViewsByVendorRaw(vendorId) {
133
+ const url = this.buildUrl(`vendor/${vendorId}/views`);
134
+ return this.http.get(url);
135
+ }
136
+ }
137
+ VendorLedgerService.DEFAULT_SERVICE_PATH = 'vendors';
138
+ VendorLedgerService.BASE_PATH = 'api/vendor-ledgers';
139
+ //# sourceMappingURL=VendorLedgerService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VendorLedgerService.js","sourceRoot":"","sources":["../../../src/services/vendors/VendorLedgerService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOlD;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,WAIxC;IAIC,YAAY,IAAgB,EAAE,MAAsB;QAClD,KAAK,CAAC,IAAI,EAAE;YACV,WAAW,EAAE,MAAM,EAAE,WAAW,IAAI,mBAAmB,CAAC,oBAAoB;YAC5E,QAAQ,EAAE,mBAAmB,CAAC,SAAS;YACvC,SAAS,EAAE,MAAM,EAAE,SAAS;SAC7B,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,WAAW,CAAC,QAAgB;QAChC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QACrD,OAAO,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC;IAC7B,CAAC;IAED;;;;OAIG;IACH,cAAc,CAAC,QAAgB;QAC7B,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,QAAQ,EAAE,CAAC,CAAC;QAChD,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAiB,GAAG,CAAC,CAAC;IAC5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+ import type { HttpClient } from '../../core/HttpClient';
7
+ import type { ResponseData } from '../../models/common';
8
+ import type { ServiceConfig } from '../types';
9
+ import type { VendorPayout } from '../../models/vendors';
10
+ /**
11
+ * Service for vendor payout CRUD operations with vendor-specific queries
12
+ */
13
+ export declare class VendorPayoutService extends CrudService<VendorPayout, Partial<VendorPayout>, Partial<VendorPayout>> {
14
+ private static readonly DEFAULT_SERVICE_PATH;
15
+ private static readonly BASE_PATH;
16
+ constructor(http: HttpClient, config?: ServiceConfig);
17
+ /**
18
+ * Get all payout records for a specific vendor
19
+ * @param vendorId - The vendor ID
20
+ * @returns Array of vendor payouts
21
+ */
22
+ getByVendor(vendorId: number): Promise<VendorPayout[]>;
23
+ /**
24
+ * Get all payout records for a specific vendor with full response
25
+ * @param vendorId - The vendor ID
26
+ * @returns ResponseData with array of vendor payouts
27
+ */
28
+ getByVendorRaw(vendorId: number): Promise<ResponseData<VendorPayout[]>>;
29
+ /**
30
+ * Get all pending payouts
31
+ * @returns Array of pending vendor payouts
32
+ */
33
+ getPending(): Promise<VendorPayout[]>;
34
+ /**
35
+ * Get all pending payouts with full response
36
+ * @returns ResponseData with array of pending vendor payouts
37
+ */
38
+ getPendingRaw(): Promise<ResponseData<VendorPayout[]>>;
39
+ /**
40
+ * Process a payout for a vendor
41
+ * @param vendorId - The vendor ID
42
+ * @returns The processed payout
43
+ */
44
+ processPayout(vendorId: number): Promise<VendorPayout>;
45
+ /**
46
+ * Process a payout for a vendor with full response
47
+ * @param vendorId - The vendor ID
48
+ * @returns ResponseData with the processed payout
49
+ */
50
+ processPayoutRaw(vendorId: number): Promise<ResponseData<VendorPayout>>;
51
+ /**
52
+ * Update the status of a payout
53
+ * @param payoutId - The payout ID
54
+ * @param statusId - The new status ID
55
+ * @returns The updated payout
56
+ */
57
+ updateStatus(payoutId: number, statusId: number): Promise<VendorPayout>;
58
+ /**
59
+ * Update the status of a payout with full response
60
+ * @param payoutId - The payout ID
61
+ * @param statusId - The new status ID
62
+ * @returns ResponseData with the updated payout
63
+ */
64
+ updateStatusRaw(payoutId: number, statusId: number): Promise<ResponseData<VendorPayout>>;
65
+ /**
66
+ * Get all vendor payouts as model views
67
+ * @returns Array of vendor payout views
68
+ */
69
+ getViews(): Promise<VendorPayout[]>;
70
+ /**
71
+ * Get all vendor payouts as model views with full response
72
+ * @returns ResponseData with array of vendor payout views
73
+ */
74
+ getViewsRaw(): Promise<ResponseData<VendorPayout[]>>;
75
+ /**
76
+ * Get vendor payout model view by ID
77
+ * @param id - Payout ID
78
+ * @returns The vendor payout view
79
+ */
80
+ getView(id: number): Promise<VendorPayout>;
81
+ /**
82
+ * Get vendor payout model view by ID with full response
83
+ * @param id - Payout ID
84
+ * @returns ResponseData with vendor payout view
85
+ */
86
+ getViewRaw(id: number): Promise<ResponseData<VendorPayout>>;
87
+ /**
88
+ * Get all payout model views for a specific vendor
89
+ * @param vendorId - Vendor ID
90
+ * @returns Array of vendor payout views
91
+ */
92
+ getViewsByVendor(vendorId: number): Promise<VendorPayout[]>;
93
+ /**
94
+ * Get all payout model views for a specific vendor with full response
95
+ * @param vendorId - Vendor ID
96
+ * @returns ResponseData with array of vendor payout views
97
+ */
98
+ getViewsByVendorRaw(vendorId: number): Promise<ResponseData<VendorPayout[]>>;
99
+ }
100
+ //# sourceMappingURL=VendorPayoutService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VendorPayoutService.d.ts","sourceRoot":"","sources":["../../../src/services/vendors/VendorPayoutService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;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AAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAQhD;;;;OAIG;IACH,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IAK3D;;;;OAIG;IACG,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAKjE;;;;OAIG;IACH,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,CAAC;CAI7E"}
@@ -0,0 +1,154 @@
1
+ /**
2
+ * VendorPayoutService
3
+ * Service for managing vendor payouts
4
+ */
5
+ import { CrudService } from '../base/CrudService';
6
+ /**
7
+ * Service for vendor payout CRUD operations with vendor-specific queries
8
+ */
9
+ export class VendorPayoutService extends CrudService {
10
+ constructor(http, config) {
11
+ super(http, {
12
+ servicePath: config?.servicePath ?? VendorPayoutService.DEFAULT_SERVICE_PATH,
13
+ basePath: VendorPayoutService.BASE_PATH,
14
+ endpoints: config?.endpoints,
15
+ });
16
+ }
17
+ /**
18
+ * Get all payout records for a specific vendor
19
+ * @param vendorId - The vendor ID
20
+ * @returns Array of vendor payouts
21
+ */
22
+ async getByVendor(vendorId) {
23
+ const response = await this.getByVendorRaw(vendorId);
24
+ return response.data ?? [];
25
+ }
26
+ /**
27
+ * Get all payout records for a specific vendor with full response
28
+ * @param vendorId - The vendor ID
29
+ * @returns ResponseData with array of vendor payouts
30
+ */
31
+ getByVendorRaw(vendorId) {
32
+ const url = this.buildUrl(`vendor/${vendorId}`);
33
+ return this.http.get(url);
34
+ }
35
+ /**
36
+ * Get all pending payouts
37
+ * @returns Array of pending vendor payouts
38
+ */
39
+ async getPending() {
40
+ const response = await this.getPendingRaw();
41
+ return response.data ?? [];
42
+ }
43
+ /**
44
+ * Get all pending payouts with full response
45
+ * @returns ResponseData with array of pending vendor payouts
46
+ */
47
+ getPendingRaw() {
48
+ const url = this.buildUrl('pending');
49
+ return this.http.get(url);
50
+ }
51
+ /**
52
+ * Process a payout for a vendor
53
+ * @param vendorId - The vendor ID
54
+ * @returns The processed payout
55
+ */
56
+ async processPayout(vendorId) {
57
+ const response = await this.processPayoutRaw(vendorId);
58
+ if (!response.data) {
59
+ throw new Error(`Failed to process payout for vendor: vendorId=${vendorId}`);
60
+ }
61
+ return response.data;
62
+ }
63
+ /**
64
+ * Process a payout for a vendor with full response
65
+ * @param vendorId - The vendor ID
66
+ * @returns ResponseData with the processed payout
67
+ */
68
+ processPayoutRaw(vendorId) {
69
+ const url = this.buildUrl(`vendor/${vendorId}/process`);
70
+ return this.http.post(url, {});
71
+ }
72
+ /**
73
+ * Update the status of a payout
74
+ * @param payoutId - The payout ID
75
+ * @param statusId - The new status ID
76
+ * @returns The updated payout
77
+ */
78
+ async updateStatus(payoutId, statusId) {
79
+ const response = await this.updateStatusRaw(payoutId, statusId);
80
+ if (!response.data) {
81
+ throw new Error(`Failed to update payout status: payoutId=${payoutId}`);
82
+ }
83
+ return response.data;
84
+ }
85
+ /**
86
+ * Update the status of a payout with full response
87
+ * @param payoutId - The payout ID
88
+ * @param statusId - The new status ID
89
+ * @returns ResponseData with the updated payout
90
+ */
91
+ updateStatusRaw(payoutId, statusId) {
92
+ const url = this.buildUrl(`${payoutId}/status`);
93
+ return this.http.put(url, { statusId });
94
+ }
95
+ // ==================== MODEL VIEW QUERIES ====================
96
+ /**
97
+ * Get all vendor payouts as model views
98
+ * @returns Array of vendor payout views
99
+ */
100
+ async getViews() {
101
+ const response = await this.getViewsRaw();
102
+ return response.data ?? [];
103
+ }
104
+ /**
105
+ * Get all vendor payouts as model views with full response
106
+ * @returns ResponseData with array of vendor payout views
107
+ */
108
+ getViewsRaw() {
109
+ const url = this.buildUrl('views');
110
+ return this.http.get(url);
111
+ }
112
+ /**
113
+ * Get vendor payout model view by ID
114
+ * @param id - Payout ID
115
+ * @returns The vendor payout view
116
+ */
117
+ async getView(id) {
118
+ const response = await this.getViewRaw(id);
119
+ if (!response.data) {
120
+ throw new Error(`VendorPayout view not found: id=${id}`);
121
+ }
122
+ return response.data;
123
+ }
124
+ /**
125
+ * Get vendor payout model view by ID with full response
126
+ * @param id - Payout ID
127
+ * @returns ResponseData with vendor payout view
128
+ */
129
+ getViewRaw(id) {
130
+ const url = this.buildUrl(`${id}/view`);
131
+ return this.http.get(url);
132
+ }
133
+ /**
134
+ * Get all payout model views for a specific vendor
135
+ * @param vendorId - Vendor ID
136
+ * @returns Array of vendor payout views
137
+ */
138
+ async getViewsByVendor(vendorId) {
139
+ const response = await this.getViewsByVendorRaw(vendorId);
140
+ return response.data ?? [];
141
+ }
142
+ /**
143
+ * Get all payout model views for a specific vendor with full response
144
+ * @param vendorId - Vendor ID
145
+ * @returns ResponseData with array of vendor payout views
146
+ */
147
+ getViewsByVendorRaw(vendorId) {
148
+ const url = this.buildUrl(`vendor/${vendorId}/views`);
149
+ return this.http.get(url);
150
+ }
151
+ }
152
+ VendorPayoutService.DEFAULT_SERVICE_PATH = 'vendors';
153
+ VendorPayoutService.BASE_PATH = 'api/vendor-payouts';
154
+ //# sourceMappingURL=VendorPayoutService.js.map