@explorins/pers-sdk 1.6.47 → 2.0.0

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 (189) hide show
  1. package/README.md +103 -0
  2. package/dist/api-key/api/api-key-api.d.ts +5 -2
  3. package/dist/api-key/api/api-key-api.d.ts.map +1 -1
  4. package/dist/business/api/business-api.d.ts +30 -11
  5. package/dist/business/api/business-api.d.ts.map +1 -1
  6. package/dist/business/api/business-membership-api.d.ts +24 -5
  7. package/dist/business/api/business-membership-api.d.ts.map +1 -1
  8. package/dist/business/services/business-membership-service.d.ts +9 -15
  9. package/dist/business/services/business-membership-service.d.ts.map +1 -1
  10. package/dist/business/services/business-service.d.ts +11 -7
  11. package/dist/business/services/business-service.d.ts.map +1 -1
  12. package/dist/business.cjs +101 -61
  13. package/dist/business.cjs.map +1 -1
  14. package/dist/business.js +101 -61
  15. package/dist/business.js.map +1 -1
  16. package/dist/campaign/api/campaign-api.d.ts +50 -13
  17. package/dist/campaign/api/campaign-api.d.ts.map +1 -1
  18. package/dist/campaign/services/campaign-service.d.ts +13 -12
  19. package/dist/campaign/services/campaign-service.d.ts.map +1 -1
  20. package/dist/campaign.cjs +2 -1
  21. package/dist/campaign.cjs.map +1 -1
  22. package/dist/campaign.js +2 -1
  23. package/dist/campaign.js.map +1 -1
  24. package/dist/chunks/{base-token-service-BSXDwrcq.js → base-token-service-DsD6lSdq.js} +2 -48
  25. package/dist/chunks/base-token-service-DsD6lSdq.js.map +1 -0
  26. package/dist/chunks/{base-token-service-CYuqPPs0.cjs → base-token-service-_64IWVES.cjs} +2 -48
  27. package/dist/chunks/base-token-service-_64IWVES.cjs.map +1 -0
  28. package/dist/chunks/{campaign-service-D-v9ZlUB.cjs → campaign-service-Ae164xl8.cjs} +74 -46
  29. package/dist/chunks/campaign-service-Ae164xl8.cjs.map +1 -0
  30. package/dist/chunks/{campaign-service-CKwkiOLx.js → campaign-service-rlK4WeSY.js} +74 -46
  31. package/dist/chunks/campaign-service-rlK4WeSY.js.map +1 -0
  32. package/dist/chunks/{donation-service-D-xFrONi.cjs → donation-service--6cnTvWq.cjs} +9 -5
  33. package/dist/chunks/donation-service--6cnTvWq.cjs.map +1 -0
  34. package/dist/chunks/{donation-service-CyJS4DIZ.js → donation-service-xiXZ2Eto.js} +9 -5
  35. package/dist/chunks/donation-service-xiXZ2Eto.js.map +1 -0
  36. package/dist/chunks/pagination-utils-9vQ-Npkr.js +166 -0
  37. package/dist/chunks/pagination-utils-9vQ-Npkr.js.map +1 -0
  38. package/dist/chunks/pagination-utils-B2jRHMSO.cjs +173 -0
  39. package/dist/chunks/pagination-utils-B2jRHMSO.cjs.map +1 -0
  40. package/dist/chunks/{pers-sdk-DULFjOW2.cjs → pers-sdk-CrffRkya.cjs} +242 -234
  41. package/dist/chunks/pers-sdk-CrffRkya.cjs.map +1 -0
  42. package/dist/chunks/{pers-sdk-VmeBqUEP.js → pers-sdk-omI-Fl0m.js} +236 -228
  43. package/dist/chunks/pers-sdk-omI-Fl0m.js.map +1 -0
  44. package/dist/chunks/{token-service-CpVwC5Eb.js → token-service-Bfj6C0yz.js} +62 -30
  45. package/dist/chunks/token-service-Bfj6C0yz.js.map +1 -0
  46. package/dist/chunks/{token-service-BWScn8Qa.cjs → token-service-BlbXrxnS.cjs} +62 -30
  47. package/dist/chunks/token-service-BlbXrxnS.cjs.map +1 -0
  48. package/dist/chunks/{transaction-service-CXjTHCFu.cjs → transaction-service-BcJfyCcq.cjs} +68 -31
  49. package/dist/chunks/transaction-service-BcJfyCcq.cjs.map +1 -0
  50. package/dist/chunks/{transaction-service-B7h_4Hg3.js → transaction-service-CnOD3scu.js} +68 -31
  51. package/dist/chunks/transaction-service-CnOD3scu.js.map +1 -0
  52. package/dist/chunks/{user-service-doT5vsBD.js → user-service-BGP3SZpk.js} +24 -12
  53. package/dist/chunks/user-service-BGP3SZpk.js.map +1 -0
  54. package/dist/chunks/{user-service-B89wBOV1.cjs → user-service-gITOx4qj.cjs} +24 -12
  55. package/dist/chunks/user-service-gITOx4qj.cjs.map +1 -0
  56. package/dist/core.cjs +10 -9
  57. package/dist/core.cjs.map +1 -1
  58. package/dist/core.js +10 -9
  59. package/dist/core.js.map +1 -1
  60. package/dist/donation/api/donation-api.d.ts +3 -1
  61. package/dist/donation/api/donation-api.d.ts.map +1 -1
  62. package/dist/donation/services/donation-service.d.ts +3 -1
  63. package/dist/donation/services/donation-service.d.ts.map +1 -1
  64. package/dist/donation.cjs +2 -1
  65. package/dist/donation.cjs.map +1 -1
  66. package/dist/donation.js +2 -1
  67. package/dist/donation.js.map +1 -1
  68. package/dist/index.cjs +23 -16
  69. package/dist/index.cjs.map +1 -1
  70. package/dist/index.js +11 -10
  71. package/dist/index.js.map +1 -1
  72. package/dist/managers/analytics-manager.d.ts +9 -9
  73. package/dist/managers/api-key-manager.d.ts +8 -6
  74. package/dist/managers/api-key-manager.d.ts.map +1 -1
  75. package/dist/managers/business-manager.d.ts +9 -7
  76. package/dist/managers/business-manager.d.ts.map +1 -1
  77. package/dist/managers/campaign-manager.d.ts +21 -20
  78. package/dist/managers/campaign-manager.d.ts.map +1 -1
  79. package/dist/managers/donation-manager.d.ts +4 -2
  80. package/dist/managers/donation-manager.d.ts.map +1 -1
  81. package/dist/managers/file-manager.d.ts +2 -2
  82. package/dist/managers/purchase-manager.d.ts +26 -24
  83. package/dist/managers/purchase-manager.d.ts.map +1 -1
  84. package/dist/managers/redemption-manager.d.ts +103 -91
  85. package/dist/managers/redemption-manager.d.ts.map +1 -1
  86. package/dist/managers/tenant-manager.d.ts +5 -2
  87. package/dist/managers/tenant-manager.d.ts.map +1 -1
  88. package/dist/managers/token-manager.d.ts +6 -4
  89. package/dist/managers/token-manager.d.ts.map +1 -1
  90. package/dist/managers/transaction-manager.d.ts +18 -17
  91. package/dist/managers/transaction-manager.d.ts.map +1 -1
  92. package/dist/managers/user-manager.d.ts +4 -2
  93. package/dist/managers/user-manager.d.ts.map +1 -1
  94. package/dist/managers/user-status-manager.d.ts +6 -4
  95. package/dist/managers/user-status-manager.d.ts.map +1 -1
  96. package/dist/package.json +1 -1
  97. package/dist/payment/api/payment-api.d.ts +15 -18
  98. package/dist/payment/api/payment-api.d.ts.map +1 -1
  99. package/dist/payment/services/payment-service.d.ts +6 -4
  100. package/dist/payment/services/payment-service.d.ts.map +1 -1
  101. package/dist/payment.cjs +219 -15
  102. package/dist/payment.cjs.map +1 -1
  103. package/dist/payment.js +209 -1
  104. package/dist/payment.js.map +1 -1
  105. package/dist/redemption/api/redemption-api.d.ts +22 -11
  106. package/dist/redemption/api/redemption-api.d.ts.map +1 -1
  107. package/dist/redemption/services/redemption-service.d.ts +11 -9
  108. package/dist/redemption/services/redemption-service.d.ts.map +1 -1
  109. package/dist/redemption.cjs +347 -15
  110. package/dist/redemption.cjs.map +1 -1
  111. package/dist/redemption.js +337 -1
  112. package/dist/redemption.js.map +1 -1
  113. package/dist/shared/index.d.ts +1 -0
  114. package/dist/shared/index.d.ts.map +1 -1
  115. package/dist/shared/utils/pagination-utils.d.ts +184 -0
  116. package/dist/shared/utils/pagination-utils.d.ts.map +1 -0
  117. package/dist/tenant/api/tenant-api.d.ts +6 -1
  118. package/dist/tenant/api/tenant-api.d.ts.map +1 -1
  119. package/dist/tenant/services/tenant-service.d.ts +5 -2
  120. package/dist/tenant/services/tenant-service.d.ts.map +1 -1
  121. package/dist/tenant.cjs +171 -15
  122. package/dist/tenant.cjs.map +1 -1
  123. package/dist/tenant.js +161 -1
  124. package/dist/tenant.js.map +1 -1
  125. package/dist/token/api/token-api.d.ts +24 -7
  126. package/dist/token/api/token-api.d.ts.map +1 -1
  127. package/dist/token/base/base-token-service.d.ts +5 -4
  128. package/dist/token/base/base-token-service.d.ts.map +1 -1
  129. package/dist/token/services/token-service.d.ts +10 -8
  130. package/dist/token/services/token-service.d.ts.map +1 -1
  131. package/dist/token/token-sdk.d.ts +5 -34
  132. package/dist/token/token-sdk.d.ts.map +1 -1
  133. package/dist/token.cjs +3 -2
  134. package/dist/token.cjs.map +1 -1
  135. package/dist/token.js +3 -2
  136. package/dist/token.js.map +1 -1
  137. package/dist/transaction/api/transaction-api.d.ts +48 -6
  138. package/dist/transaction/api/transaction-api.d.ts.map +1 -1
  139. package/dist/transaction/services/transaction-service.d.ts +12 -4
  140. package/dist/transaction/services/transaction-service.d.ts.map +1 -1
  141. package/dist/transaction.cjs +2 -1
  142. package/dist/transaction.cjs.map +1 -1
  143. package/dist/transaction.js +2 -1
  144. package/dist/transaction.js.map +1 -1
  145. package/dist/user/api/user-api.d.ts +4 -2
  146. package/dist/user/api/user-api.d.ts.map +1 -1
  147. package/dist/user/services/user-service.d.ts +4 -2
  148. package/dist/user/services/user-service.d.ts.map +1 -1
  149. package/dist/user-status/api/user-status-api.d.ts +6 -4
  150. package/dist/user-status/api/user-status-api.d.ts.map +1 -1
  151. package/dist/user-status/index.d.ts +4 -2
  152. package/dist/user-status/index.d.ts.map +1 -1
  153. package/dist/user-status/services/user-status-service.d.ts +4 -2
  154. package/dist/user-status/services/user-status-service.d.ts.map +1 -1
  155. package/dist/user-status.cjs +22 -14
  156. package/dist/user-status.cjs.map +1 -1
  157. package/dist/user-status.js +22 -14
  158. package/dist/user-status.js.map +1 -1
  159. package/dist/user.cjs +2 -1
  160. package/dist/user.cjs.map +1 -1
  161. package/dist/user.js +2 -1
  162. package/dist/user.js.map +1 -1
  163. package/package.json +1 -1
  164. package/dist/chunks/base-token-service-BSXDwrcq.js.map +0 -1
  165. package/dist/chunks/base-token-service-CYuqPPs0.cjs.map +0 -1
  166. package/dist/chunks/campaign-service-CKwkiOLx.js.map +0 -1
  167. package/dist/chunks/campaign-service-D-v9ZlUB.cjs.map +0 -1
  168. package/dist/chunks/donation-service-CyJS4DIZ.js.map +0 -1
  169. package/dist/chunks/donation-service-D-xFrONi.cjs.map +0 -1
  170. package/dist/chunks/payment-service-B4qx0qiE.cjs +0 -220
  171. package/dist/chunks/payment-service-B4qx0qiE.cjs.map +0 -1
  172. package/dist/chunks/payment-service-DfCBFosx.js +0 -217
  173. package/dist/chunks/payment-service-DfCBFosx.js.map +0 -1
  174. package/dist/chunks/pers-sdk-DULFjOW2.cjs.map +0 -1
  175. package/dist/chunks/pers-sdk-VmeBqUEP.js.map +0 -1
  176. package/dist/chunks/redemption-service-7qbeQxEM.cjs +0 -330
  177. package/dist/chunks/redemption-service-7qbeQxEM.cjs.map +0 -1
  178. package/dist/chunks/redemption-service-BT0J5Iy7.js +0 -327
  179. package/dist/chunks/redemption-service-BT0J5Iy7.js.map +0 -1
  180. package/dist/chunks/tenant-service-DME24vr1.cjs +0 -157
  181. package/dist/chunks/tenant-service-DME24vr1.cjs.map +0 -1
  182. package/dist/chunks/tenant-service-DxtHAlaa.js +0 -154
  183. package/dist/chunks/tenant-service-DxtHAlaa.js.map +0 -1
  184. package/dist/chunks/token-service-BWScn8Qa.cjs.map +0 -1
  185. package/dist/chunks/token-service-CpVwC5Eb.js.map +0 -1
  186. package/dist/chunks/transaction-service-B7h_4Hg3.js.map +0 -1
  187. package/dist/chunks/transaction-service-CXjTHCFu.cjs.map +0 -1
  188. package/dist/chunks/user-service-B89wBOV1.cjs.map +0 -1
  189. package/dist/chunks/user-service-doT5vsBD.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"user-manager.d.ts","sourceRoot":"","sources":["../../src/managers/user-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAW,WAAW,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AAErG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,qBAAa,WAAW;IAIpB,O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,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;IAIlJ;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,WAAW,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAItF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACG,kBAAkB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;IAI1E;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,mBAAmB,CAAC,KAAK,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAI5E;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;IAIlF;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACG,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAIvD;;;;;;;;;;;;;;;OAeG;IACH,cAAc,IAAI,WAAW;CAI9B"}
@@ -1,5 +1,7 @@
1
+ import { PaginatedResponseDTO } from '@explorins/pers-shared';
1
2
  import { PersApiClient } from '../core/pers-api-client';
2
3
  import { UserStatusSDK } from '../user-status';
4
+ import { PaginationOptions } from '../shared/utils/pagination-utils';
3
5
  import type { UserStatusTypeDTO } from '../shared/interfaces/pers-shared-lib.interfaces';
4
6
  /**
5
7
  * User Status Manager - Clean, high-level interface for user status operations
@@ -14,15 +16,15 @@ export declare class UserStatusManager {
14
16
  /**
15
17
  * Get all user status types
16
18
  *
17
- * @returns Promise resolving to array of user status types
19
+ * @returns Promise resolving to paginated user status types
18
20
  */
19
- getUserStatusTypes(): Promise<UserStatusTypeDTO[]>;
21
+ getUserStatusTypes(options?: PaginationOptions): Promise<PaginatedResponseDTO<UserStatusTypeDTO>>;
20
22
  /**
21
23
  * Get earned user status for authenticated user
22
24
  *
23
- * @returns Promise resolving to array of earned user status
25
+ * @returns Promise resolving to paginated earned user status
24
26
  */
25
- getEarnedUserStatus(): Promise<UserStatusTypeDTO[]>;
27
+ getEarnedUserStatus(options?: PaginationOptions): Promise<PaginatedResponseDTO<UserStatusTypeDTO>>;
26
28
  /**
27
29
  * Admin: Create new user status type
28
30
  *
@@ -1 +1 @@
1
- {"version":3,"file":"user-status-manager.d.ts","sourceRoot":"","sources":["../../src/managers/user-status-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAuB,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AAEzF;;;;;GAKG;AACH,qBAAa,iBAAiB;IAGhB,OAAO,CAAC,SAAS;IAF7B,OAAO,CAAC,aAAa,CAAgB;gBAEjB,SAAS,EAAE,aAAa;IAI5C;;;;OAIG;IACG,kBAAkB,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAIxD;;;;OAIG;IACG,mBAAmB,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAIzD;;;;;OAKG;IACG,oBAAoB,CAAC,cAAc,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIzF;;;;OAIG;IACH,gBAAgB,IAAI,aAAa;CAGlC"}
1
+ {"version":3,"file":"user-status-manager.d.ts","sourceRoot":"","sources":["../../src/managers/user-status-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAuB,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AAEzF;;;;;GAKG;AACH,qBAAa,iBAAiB;IAGhB,OAAO,CAAC,SAAS;IAF7B,OAAO,CAAC,aAAa,CAAgB;gBAEjB,SAAS,EAAE,aAAa;IAI5C;;;;OAIG;IACG,kBAAkB,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;IAIvG;;;;OAIG;IACG,mBAAmB,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;IAIxG;;;;;OAKG;IACG,oBAAoB,CAAC,cAAc,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIzF;;;;OAIG;IACH,gBAAgB,IAAI,aAAa;CAGlC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explorins/pers-sdk",
3
- "version": "1.6.47",
3
+ "version": "2.0.0",
4
4
  "description": "Platform-agnostic SDK for PERS (Phygital Experience Rewards System) - Core business logic and API integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -1,5 +1,7 @@
1
1
  import { PersApiClient } from '../../core/pers-api-client';
2
2
  import { PurchaseTokenDTO, PurchaseDTO, PurchaseCurrency, PaymentIntentDTO, PurchaseCreateResponseDTO, DonationTypeDTO } from '../models';
3
+ import { PaginatedResponseDTO } from '@explorins/pers-shared';
4
+ import { PaginationOptions } from '../../shared';
3
5
  /**
4
6
  * Platform-Agnostic Purchase API Client (RESTful Architecture)
5
7
  *
@@ -29,15 +31,22 @@ export declare class PurchaseApi {
29
31
  * INTELLIGENT ACCESS:
30
32
  * - PUBLIC (Project Key): Returns active tokens only (active parameter ignored)
31
33
  * - ADMIN (Tenant Admin JWT): Returns filtered results based on active parameter
34
+ *
35
+ * @param active Filter by active status
36
+ * @param options Pagination options (page, limit, sortBy, sortOrder)
37
+ * @returns Paginated response with purchase tokens
32
38
  */
33
- getPurchaseTokens(active?: boolean): Promise<PurchaseTokenDTO[]>;
39
+ getPurchaseTokens(active?: boolean, options?: PaginationOptions): Promise<PaginatedResponseDTO<PurchaseTokenDTO>>;
34
40
  /**
35
41
  * PUBLIC: Get donation types
36
42
  *
37
43
  * RESTful endpoint: GET /purchases/donation-types
38
44
  * Replaces: GET /purchase/donation/type
45
+ *
46
+ * @param options Pagination options (page, limit, sortBy, sortOrder)
47
+ * @returns Paginated response with donation types
39
48
  */
40
- getDonationTypes(): Promise<DonationTypeDTO[]>;
49
+ getDonationTypes(options?: PaginationOptions): Promise<PaginatedResponseDTO<DonationTypeDTO>>;
41
50
  /**
42
51
  * PUBLIC: Create payment intent (FINANCIAL OPERATION)
43
52
  *
@@ -83,23 +92,11 @@ export declare class PurchaseApi {
83
92
  *
84
93
  * USER-ONLY: Get authenticated user's purchase history
85
94
  * FINANCIAL RECORDS: User attribution critical for compliance
95
+ *
96
+ * @param options - Pagination options (page, limit, sortBy, sortOrder)
97
+ * @returns Paginated response with purchase history
86
98
  */
87
- getUserPurchaseHistory(): Promise<PurchaseDTO[]>;
88
- /**
89
- * @deprecated Use getPurchaseTokens() instead
90
- * Backward compatibility alias for getActivePurchaseTokens
91
- */
92
- getActivePurchaseTokens(active?: boolean): Promise<PurchaseTokenDTO[]>;
93
- /**
94
- * @deprecated Use createUserPurchase() instead
95
- * Backward compatibility alias for createPurchase
96
- */
97
- createPurchase(paymentIntentId: string, amount: number, purchaseTokenId?: string, donationTypeId?: number, donationAccountAddress?: string): Promise<PurchaseCreateResponseDTO>;
98
- /**
99
- * @deprecated Use getUserPurchaseHistory() instead
100
- * Backward compatibility alias for getAllUserPurchases
101
- */
102
- getAllUserPurchases(): Promise<PurchaseDTO[]>;
99
+ getUserPurchaseHistory(options?: PaginationOptions): Promise<PaginatedResponseDTO<PurchaseDTO>>;
103
100
  }
104
101
  export { PurchaseApi as PaymentApi };
105
102
  //# sourceMappingURL=payment-api.d.ts.map
@@ -1 +1 @@
1
- {"version":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AC;IAUnG;;;;;;;OAOG;IACG,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAU3I;;;;;;;OAOG;IACG,mBAAmB,CAAC,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAUpK;;;;;;;OAOG;IACG,mBAAmB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAQ7E;;;;;;;;OAQG;IACG,kBAAkB,CAAC,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,EAAE,sBAAsB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAWzL;;;;;;;;;;;OAWG;IACG,sBAAsB,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC;CAMtG;AAGD,OAAO,EAAE,WAAW,IAAI,UAAU,EAAE,CAAC"}
@@ -1,5 +1,7 @@
1
+ import { PaginatedResponseDTO } from '@explorins/pers-shared';
1
2
  import { PaymentApi } from '../api/payment-api';
2
- import { PurchaseTokenDTO, PurchaseDTO, PurchaseCurrency, PaymentIntentDTO } from '../models';
3
+ import { PurchaseTokenDTO, PurchaseDTO, PurchaseCurrency, PaymentIntentDTO, PurchaseCreateResponseDTO } from '../models';
4
+ import { PaginationOptions } from '../../shared/utils/pagination-utils';
3
5
  /**
4
6
  * Platform-Agnostic Payment Service
5
7
  *
@@ -15,7 +17,7 @@ export declare class PaymentService {
15
17
  /**
16
18
  * PUBLIC: Get active purchase tokens
17
19
  */
18
- getActivePurchaseTokens(active?: boolean): Promise<PurchaseTokenDTO[]>;
20
+ getActivePurchaseTokens(active?: boolean, options?: PaginationOptions): Promise<PaginatedResponseDTO<PurchaseTokenDTO>>;
19
21
  /**
20
22
  * PUBLIC: Create payment intent
21
23
  */
@@ -31,10 +33,10 @@ export declare class PaymentService {
31
33
  /**
32
34
  * AUTH: Create purchase
33
35
  */
34
- createPurchase(paymentIntentId: string, amount: number, purchaseTokenId?: string, donationTypeId?: number, donationAccountAddress?: string): Promise<PurchaseDTO>;
36
+ createPurchase(paymentIntentId: string, amount: number, purchaseTokenId?: string, donationTypeId?: number, donationAccountAddress?: string): Promise<PurchaseCreateResponseDTO>;
35
37
  /**
36
38
  * AUTH: Get all user purchases
37
39
  */
38
- getAllUserPurchases(): Promise<PurchaseDTO[]>;
40
+ getAllUserPurchases(options?: PaginationOptions): Promise<PaginatedResponseDTO<PurchaseDTO>>;
39
41
  }
40
42
  //# sourceMappingURL=payment-service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"payment-service.d.ts","sourceRoot":"","sources":["../../../src/payment/services/payment-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,WAAW,CAAC;AAEnB;;;;;;;;GAQG;AACH,qBAAa,cAAc;IACb,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAM1C;;OAEG;IACG,uBAAuB,CAAC,MAAM,GAAE,OAAc,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAIlF;;OAEG;IACG,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAI3I;;OAEG;IACG,mBAAmB,CAAC,eAAe,EAAE,MAA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G,mBAAmB,CAAC,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIpK;;OAEG;IACG,mBAAmB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAQ7E;;OAEG;IACG,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,EAAE,sBAAsB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAIrL;;OAEG;IACG,mBAAmB,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC;CAGnG"}
package/dist/payment.cjs CHANGED
@@ -1,34 +1,238 @@
1
1
  'use strict';
2
2
 
3
- var paymentService = require('./chunks/payment-service-B4qx0qiE.cjs');
4
3
  var persShared = require('@explorins/pers-shared');
4
+ var paginationUtils = require('./chunks/pagination-utils-B2jRHMSO.cjs');
5
5
 
6
+ /**
7
+ * Platform-Agnostic Purchase API Client (RESTful Architecture)
8
+ *
9
+ * Handles purchase and payment operations using the PERS backend's new RESTful endpoints.
10
+ * Uses @explorins/pers-shared DTOs for consistency with backend.
11
+ *
12
+ * Migration Status: Updated to match /purchases controller (replaces /purchase endpoints)
13
+ *
14
+ * Available Access Levels:
15
+ * - PUBLIC: Project key authentication for catalog browsing and payment operations
16
+ * - USER: Requires user authentication JWT (purchase creation, history access)
17
+ * - ADMIN: Requires tenant admin privileges (not implemented in this client)
18
+ *
19
+ * Note: This SDK focuses on backend purchase operations only.
20
+ * Payment provider integrations (Stripe, etc.) should remain in infrastructure layer.
21
+ */
22
+ class PurchaseApi {
23
+ constructor(apiClient) {
24
+ this.apiClient = apiClient;
25
+ this.basePath = '/purchases';
26
+ }
27
+ // ==========================================
28
+ // PUBLIC OPERATIONS (Project Key)
29
+ // ==========================================
30
+ /**
31
+ * PUBLIC: Get purchase tokens (Intelligent Access)
32
+ *
33
+ * RESTful endpoint: GET /purchases/tokens
34
+ * Replaces: GET /purchase/token
35
+ *
36
+ * INTELLIGENT ACCESS:
37
+ * - PUBLIC (Project Key): Returns active tokens only (active parameter ignored)
38
+ * - ADMIN (Tenant Admin JWT): Returns filtered results based on active parameter
39
+ *
40
+ * @param active Filter by active status
41
+ * @param options Pagination options (page, limit, sortBy, sortOrder)
42
+ * @returns Paginated response with purchase tokens
43
+ */
44
+ async getPurchaseTokens(active, options) {
45
+ const params = paginationUtils.buildPaginationParams(options);
46
+ if (active !== undefined) {
47
+ params.append('active', String(active));
48
+ }
49
+ const response = await this.apiClient.get(`${this.basePath}/tokens?${params.toString()}`);
50
+ return paginationUtils.normalizeToPaginated(response);
51
+ }
52
+ /**
53
+ * PUBLIC: Get donation types
54
+ *
55
+ * RESTful endpoint: GET /purchases/donation-types
56
+ * Replaces: GET /purchase/donation/type
57
+ *
58
+ * @param options Pagination options (page, limit, sortBy, sortOrder)
59
+ * @returns Paginated response with donation types
60
+ */
61
+ async getDonationTypes(options) {
62
+ const params = paginationUtils.buildPaginationParams(options);
63
+ const response = await this.apiClient.get(`${this.basePath}/donation-types?${params.toString()}`);
64
+ return paginationUtils.normalizeToPaginated(response);
65
+ }
66
+ // ==========================================
67
+ // PAYMENT OPERATIONS (FINANCIAL - CRITICAL)
68
+ // ==========================================
69
+ /**
70
+ * PUBLIC: Create payment intent (FINANCIAL OPERATION)
71
+ *
72
+ * RESTful endpoint: POST /purchases/payment-intents
73
+ * Replaces: POST /purchase/payment-intent
74
+ *
75
+ * CRITICAL: Handles real money operations - tenant context required
76
+ */
77
+ async createPaymentIntent(amount, currency, receiptEmail, description) {
78
+ const body = {
79
+ amount,
80
+ currency,
81
+ receiptEmail,
82
+ description
83
+ };
84
+ return this.apiClient.post(`${this.basePath}/payment-intents`, body);
85
+ }
86
+ /**
87
+ * PUBLIC: Update payment intent (FINANCIAL OPERATION)
88
+ *
89
+ * RESTful endpoint: PUT /purchases/payment-intents/{paymentIntentId}
90
+ * Replaces: PUT /purchase/payment-intent/{paymentIntentId}
91
+ *
92
+ * CRITICAL: Handles real money operations - tenant context required
93
+ */
94
+ async updatePaymentIntent(paymentIntentId, amount, currency, receiptEmail, description) {
95
+ const body = {
96
+ amount,
97
+ currency,
98
+ receiptEmail,
99
+ description
100
+ };
101
+ return this.apiClient.put(`${this.basePath}/payment-intents/${paymentIntentId}`, body);
102
+ }
103
+ /**
104
+ * PUBLIC: Cancel payment intent (FINANCIAL OPERATION)
105
+ *
106
+ * RESTful endpoint: DELETE /purchases/payment-intents/{paymentIntentId}
107
+ * Replaces: DELETE /purchase/payment-intent/{paymentIntentId}
108
+ *
109
+ * CRITICAL: Handles real money operations - tenant context required
110
+ */
111
+ async cancelPaymentIntent(paymentIntentId) {
112
+ return this.apiClient.delete(`${this.basePath}/payment-intents/${paymentIntentId}`);
113
+ }
114
+ // ==========================================
115
+ // USER OPERATIONS (JWT + Project Key)
116
+ // ==========================================
117
+ /**
118
+ * USER: Create purchase (BUSINESS CRITICAL - FINANCIAL TRANSACTION)
119
+ *
120
+ * RESTful endpoint: POST /purchases
121
+ * Replaces: POST /purchase/auth
122
+ *
123
+ * USER-ONLY: Requires user authentication JWT for purchase creation
124
+ * CRITICAL: Real financial transaction with Stripe integration
125
+ */
126
+ async createUserPurchase(paymentIntentId, amount, purchaseTokenId, donationTypeId, donationAccountAddress) {
127
+ const body = {
128
+ quantity: amount,
129
+ purchaseTokenId: purchaseTokenId || '',
130
+ donationTypeId,
131
+ donationAccountAddress,
132
+ paymentIntentId
133
+ };
134
+ return this.apiClient.post(`${this.basePath}`, body);
135
+ }
136
+ /**
137
+ * USER: Get user purchase history
138
+ *
139
+ * RESTful endpoint: GET /purchases/me/history
140
+ * Replaces: GET /purchase/auth
141
+ *
142
+ * USER-ONLY: Get authenticated user's purchase history
143
+ * FINANCIAL RECORDS: User attribution critical for compliance
144
+ *
145
+ * @param options - Pagination options (page, limit, sortBy, sortOrder)
146
+ * @returns Paginated response with purchase history
147
+ */
148
+ async getUserPurchaseHistory(options) {
149
+ const params = paginationUtils.buildPaginationParams(options);
150
+ const response = await this.apiClient.get(`${this.basePath}/me/history?${params.toString()}`);
151
+ return paginationUtils.normalizeToPaginated(response);
152
+ }
153
+ }
6
154
 
155
+ /**
156
+ * Platform-Agnostic Payment Service
157
+ *
158
+ * Contains payment business logic and operations that work across platforms.
159
+ * No framework dependencies - pure TypeScript business logic.
160
+ *
161
+ * Focuses only on actual backend capabilities.
162
+ * Payment provider logic (Stripe, etc.) should remain in infrastructure layer.
163
+ */
164
+ class PaymentService {
165
+ constructor(paymentApi) {
166
+ this.paymentApi = paymentApi;
167
+ }
168
+ // ==========================================
169
+ // PUBLIC OPERATIONS
170
+ // ==========================================
171
+ /**
172
+ * PUBLIC: Get active purchase tokens
173
+ */
174
+ async getActivePurchaseTokens(active = true, options) {
175
+ return this.paymentApi.getPurchaseTokens(active, options);
176
+ }
177
+ /**
178
+ * PUBLIC: Create payment intent
179
+ */
180
+ async createPaymentIntent(amount, currency, receiptEmail, description) {
181
+ return this.paymentApi.createPaymentIntent(amount, currency, receiptEmail, description);
182
+ }
183
+ /**
184
+ * PUBLIC: Update payment intent
185
+ */
186
+ async updatePaymentIntent(paymentIntentId, amount, currency, receiptEmail, description) {
187
+ return this.paymentApi.updatePaymentIntent(paymentIntentId, amount, currency, receiptEmail, description);
188
+ }
189
+ /**
190
+ * PUBLIC: Cancel payment intent
191
+ */
192
+ async cancelPaymentIntent(paymentIntentId) {
193
+ return this.paymentApi.cancelPaymentIntent(paymentIntentId);
194
+ }
195
+ // ==========================================
196
+ // AUTHENTICATED OPERATIONS
197
+ // ==========================================
198
+ /**
199
+ * AUTH: Create purchase
200
+ */
201
+ async createPurchase(paymentIntentId, amount, purchaseTokenId, donationTypeId, donationAccountAddress) {
202
+ return this.paymentApi.createUserPurchase(paymentIntentId, amount, purchaseTokenId, donationTypeId, donationAccountAddress);
203
+ }
204
+ /**
205
+ * AUTH: Get all user purchases
206
+ */
207
+ async getAllUserPurchases(options) {
208
+ return this.paymentApi.getUserPurchaseHistory(options);
209
+ }
210
+ }
7
211
 
8
- exports.PaymentApi = paymentService.PurchaseApi;
9
- exports.PaymentService = paymentService.PaymentService;
10
212
  Object.defineProperty(exports, "AccountOwnerType", {
11
- enumerable: true,
12
- get: function () { return persShared.AccountOwnerType; }
213
+ enumerable: true,
214
+ get: function () { return persShared.AccountOwnerType; }
13
215
  });
14
216
  Object.defineProperty(exports, "ApiKeyType", {
15
- enumerable: true,
16
- get: function () { return persShared.ApiKeyType; }
217
+ enumerable: true,
218
+ get: function () { return persShared.ApiKeyType; }
17
219
  });
18
220
  Object.defineProperty(exports, "MEMBERSHIP_ROLE_HIERARCHY", {
19
- enumerable: true,
20
- get: function () { return persShared.MEMBERSHIP_ROLE_HIERARCHY; }
221
+ enumerable: true,
222
+ get: function () { return persShared.MEMBERSHIP_ROLE_HIERARCHY; }
21
223
  });
22
224
  Object.defineProperty(exports, "MembershipRole", {
23
- enumerable: true,
24
- get: function () { return persShared.MembershipRole; }
225
+ enumerable: true,
226
+ get: function () { return persShared.MembershipRole; }
25
227
  });
26
228
  Object.defineProperty(exports, "NativeTokenTypes", {
27
- enumerable: true,
28
- get: function () { return persShared.NativeTokenTypes; }
229
+ enumerable: true,
230
+ get: function () { return persShared.NativeTokenTypes; }
29
231
  });
30
232
  Object.defineProperty(exports, "hasMinimumRole", {
31
- enumerable: true,
32
- get: function () { return persShared.hasMinimumRole; }
233
+ enumerable: true,
234
+ get: function () { return persShared.hasMinimumRole; }
33
235
  });
236
+ exports.PaymentApi = PurchaseApi;
237
+ exports.PaymentService = PaymentService;
34
238
  //# sourceMappingURL=payment.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"payment.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"payment.cjs","sources":["../src/payment/api/payment-api.ts","../src/payment/services/payment-service.ts"],"sourcesContent":[null,null],"names":["buildPaginationParams","normalizeToPaginated"],"mappings":";;;;;AAcA;;;;;;;;;;;;;;;AAeG;MACU,WAAW,CAAA;AACtB,IAAA,WAAA,CAAoB,SAAwB,EAAA;QAAxB,IAAA,CAAA,SAAS,GAAT,SAAS;QAEZ,IAAA,CAAA,QAAQ,GAAG,YAAY;IAFO;;;;AAQ/C;;;;;;;;;;;;;AAaG;AACH,IAAA,MAAM,iBAAiB,CAAC,MAAgB,EAAE,OAA2B,EAAA;AACnE,QAAA,MAAM,MAAM,GAAGA,qCAAqB,CAAC,OAAO,CAAC;AAC7C,QAAA,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QACzC;QACA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,GAAG,CAAiC,CAAA,EAAG,IAAI,CAAC,QAAQ,WAAW,MAAM,CAAC,QAAQ,EAAE,CAAA,CAAE,CAAC;AACzH,QAAA,OAAOC,oCAAoB,CAAC,QAAQ,CAAC;IACvC;AAEA;;;;;;;;AAQG;IACH,MAAM,gBAAgB,CAAC,OAA2B,EAAA;AAChD,QAAA,MAAM,MAAM,GAAGD,qCAAqB,CAAC,OAAO,CAAC;QAC7C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,GAAG,CAAgC,CAAA,EAAG,IAAI,CAAC,QAAQ,mBAAmB,MAAM,CAAC,QAAQ,EAAE,CAAA,CAAE,CAAC;AAChI,QAAA,OAAOC,oCAAoB,CAAC,QAAQ,CAAC;IACvC;;;;AAMA;;;;;;;AAOG;IACH,MAAM,mBAAmB,CAAC,MAAc,EAAE,QAA0B,EAAE,YAAoB,EAAE,WAAmB,EA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E,eAAe,EAAE,cAAc,EAAE,sBAAsB,CAAC;IAC7H;AAEA;;AAEG;IACH,MAAM,mBAAmB,CAAC,OAA2B,EAAA;QACnD,OAAO,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC,OAAO,CAAC;IACxD;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/payment.js CHANGED
@@ -1,3 +1,211 @@
1
- export { P as PaymentApi, a as PaymentService } from './chunks/payment-service-DfCBFosx.js';
2
1
  export { AccountOwnerType, ApiKeyType, MEMBERSHIP_ROLE_HIERARCHY, MembershipRole, NativeTokenTypes, hasMinimumRole } from '@explorins/pers-shared';
2
+ import { b as buildPaginationParams, n as normalizeToPaginated } from './chunks/pagination-utils-9vQ-Npkr.js';
3
+
4
+ /**
5
+ * Platform-Agnostic Purchase API Client (RESTful Architecture)
6
+ *
7
+ * Handles purchase and payment operations using the PERS backend's new RESTful endpoints.
8
+ * Uses @explorins/pers-shared DTOs for consistency with backend.
9
+ *
10
+ * Migration Status: Updated to match /purchases controller (replaces /purchase endpoints)
11
+ *
12
+ * Available Access Levels:
13
+ * - PUBLIC: Project key authentication for catalog browsing and payment operations
14
+ * - USER: Requires user authentication JWT (purchase creation, history access)
15
+ * - ADMIN: Requires tenant admin privileges (not implemented in this client)
16
+ *
17
+ * Note: This SDK focuses on backend purchase operations only.
18
+ * Payment provider integrations (Stripe, etc.) should remain in infrastructure layer.
19
+ */
20
+ class PurchaseApi {
21
+ constructor(apiClient) {
22
+ this.apiClient = apiClient;
23
+ this.basePath = '/purchases';
24
+ }
25
+ // ==========================================
26
+ // PUBLIC OPERATIONS (Project Key)
27
+ // ==========================================
28
+ /**
29
+ * PUBLIC: Get purchase tokens (Intelligent Access)
30
+ *
31
+ * RESTful endpoint: GET /purchases/tokens
32
+ * Replaces: GET /purchase/token
33
+ *
34
+ * INTELLIGENT ACCESS:
35
+ * - PUBLIC (Project Key): Returns active tokens only (active parameter ignored)
36
+ * - ADMIN (Tenant Admin JWT): Returns filtered results based on active parameter
37
+ *
38
+ * @param active Filter by active status
39
+ * @param options Pagination options (page, limit, sortBy, sortOrder)
40
+ * @returns Paginated response with purchase tokens
41
+ */
42
+ async getPurchaseTokens(active, options) {
43
+ const params = buildPaginationParams(options);
44
+ if (active !== undefined) {
45
+ params.append('active', String(active));
46
+ }
47
+ const response = await this.apiClient.get(`${this.basePath}/tokens?${params.toString()}`);
48
+ return normalizeToPaginated(response);
49
+ }
50
+ /**
51
+ * PUBLIC: Get donation types
52
+ *
53
+ * RESTful endpoint: GET /purchases/donation-types
54
+ * Replaces: GET /purchase/donation/type
55
+ *
56
+ * @param options Pagination options (page, limit, sortBy, sortOrder)
57
+ * @returns Paginated response with donation types
58
+ */
59
+ async getDonationTypes(options) {
60
+ const params = buildPaginationParams(options);
61
+ const response = await this.apiClient.get(`${this.basePath}/donation-types?${params.toString()}`);
62
+ return normalizeToPaginated(response);
63
+ }
64
+ // ==========================================
65
+ // PAYMENT OPERATIONS (FINANCIAL - CRITICAL)
66
+ // ==========================================
67
+ /**
68
+ * PUBLIC: Create payment intent (FINANCIAL OPERATION)
69
+ *
70
+ * RESTful endpoint: POST /purchases/payment-intents
71
+ * Replaces: POST /purchase/payment-intent
72
+ *
73
+ * CRITICAL: Handles real money operations - tenant context required
74
+ */
75
+ async createPaymentIntent(amount, currency, receiptEmail, description) {
76
+ const body = {
77
+ amount,
78
+ currency,
79
+ receiptEmail,
80
+ description
81
+ };
82
+ return this.apiClient.post(`${this.basePath}/payment-intents`, body);
83
+ }
84
+ /**
85
+ * PUBLIC: Update payment intent (FINANCIAL OPERATION)
86
+ *
87
+ * RESTful endpoint: PUT /purchases/payment-intents/{paymentIntentId}
88
+ * Replaces: PUT /purchase/payment-intent/{paymentIntentId}
89
+ *
90
+ * CRITICAL: Handles real money operations - tenant context required
91
+ */
92
+ async updatePaymentIntent(paymentIntentId, amount, currency, receiptEmail, description) {
93
+ const body = {
94
+ amount,
95
+ currency,
96
+ receiptEmail,
97
+ description
98
+ };
99
+ return this.apiClient.put(`${this.basePath}/payment-intents/${paymentIntentId}`, body);
100
+ }
101
+ /**
102
+ * PUBLIC: Cancel payment intent (FINANCIAL OPERATION)
103
+ *
104
+ * RESTful endpoint: DELETE /purchases/payment-intents/{paymentIntentId}
105
+ * Replaces: DELETE /purchase/payment-intent/{paymentIntentId}
106
+ *
107
+ * CRITICAL: Handles real money operations - tenant context required
108
+ */
109
+ async cancelPaymentIntent(paymentIntentId) {
110
+ return this.apiClient.delete(`${this.basePath}/payment-intents/${paymentIntentId}`);
111
+ }
112
+ // ==========================================
113
+ // USER OPERATIONS (JWT + Project Key)
114
+ // ==========================================
115
+ /**
116
+ * USER: Create purchase (BUSINESS CRITICAL - FINANCIAL TRANSACTION)
117
+ *
118
+ * RESTful endpoint: POST /purchases
119
+ * Replaces: POST /purchase/auth
120
+ *
121
+ * USER-ONLY: Requires user authentication JWT for purchase creation
122
+ * CRITICAL: Real financial transaction with Stripe integration
123
+ */
124
+ async createUserPurchase(paymentIntentId, amount, purchaseTokenId, donationTypeId, donationAccountAddress) {
125
+ const body = {
126
+ quantity: amount,
127
+ purchaseTokenId: purchaseTokenId || '',
128
+ donationTypeId,
129
+ donationAccountAddress,
130
+ paymentIntentId
131
+ };
132
+ return this.apiClient.post(`${this.basePath}`, body);
133
+ }
134
+ /**
135
+ * USER: Get user purchase history
136
+ *
137
+ * RESTful endpoint: GET /purchases/me/history
138
+ * Replaces: GET /purchase/auth
139
+ *
140
+ * USER-ONLY: Get authenticated user's purchase history
141
+ * FINANCIAL RECORDS: User attribution critical for compliance
142
+ *
143
+ * @param options - Pagination options (page, limit, sortBy, sortOrder)
144
+ * @returns Paginated response with purchase history
145
+ */
146
+ async getUserPurchaseHistory(options) {
147
+ const params = buildPaginationParams(options);
148
+ const response = await this.apiClient.get(`${this.basePath}/me/history?${params.toString()}`);
149
+ return normalizeToPaginated(response);
150
+ }
151
+ }
152
+
153
+ /**
154
+ * Platform-Agnostic Payment Service
155
+ *
156
+ * Contains payment business logic and operations that work across platforms.
157
+ * No framework dependencies - pure TypeScript business logic.
158
+ *
159
+ * Focuses only on actual backend capabilities.
160
+ * Payment provider logic (Stripe, etc.) should remain in infrastructure layer.
161
+ */
162
+ class PaymentService {
163
+ constructor(paymentApi) {
164
+ this.paymentApi = paymentApi;
165
+ }
166
+ // ==========================================
167
+ // PUBLIC OPERATIONS
168
+ // ==========================================
169
+ /**
170
+ * PUBLIC: Get active purchase tokens
171
+ */
172
+ async getActivePurchaseTokens(active = true, options) {
173
+ return this.paymentApi.getPurchaseTokens(active, options);
174
+ }
175
+ /**
176
+ * PUBLIC: Create payment intent
177
+ */
178
+ async createPaymentIntent(amount, currency, receiptEmail, description) {
179
+ return this.paymentApi.createPaymentIntent(amount, currency, receiptEmail, description);
180
+ }
181
+ /**
182
+ * PUBLIC: Update payment intent
183
+ */
184
+ async updatePaymentIntent(paymentIntentId, amount, currency, receiptEmail, description) {
185
+ return this.paymentApi.updatePaymentIntent(paymentIntentId, amount, currency, receiptEmail, description);
186
+ }
187
+ /**
188
+ * PUBLIC: Cancel payment intent
189
+ */
190
+ async cancelPaymentIntent(paymentIntentId) {
191
+ return this.paymentApi.cancelPaymentIntent(paymentIntentId);
192
+ }
193
+ // ==========================================
194
+ // AUTHENTICATED OPERATIONS
195
+ // ==========================================
196
+ /**
197
+ * AUTH: Create purchase
198
+ */
199
+ async createPurchase(paymentIntentId, amount, purchaseTokenId, donationTypeId, donationAccountAddress) {
200
+ return this.paymentApi.createUserPurchase(paymentIntentId, amount, purchaseTokenId, donationTypeId, donationAccountAddress);
201
+ }
202
+ /**
203
+ * AUTH: Get all user purchases
204
+ */
205
+ async getAllUserPurchases(options) {
206
+ return this.paymentApi.getUserPurchaseHistory(options);
207
+ }
208
+ }
209
+
210
+ export { PurchaseApi as PaymentApi, PaymentService };
3
211
  //# sourceMappingURL=payment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"payment.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"payment.js","sources":["../src/payment/api/payment-api.ts","../src/payment/services/payment-service.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;;AAcA;;;;;;;;;;;;;;;AAeG;MACU,WAAW,CAAA;AACtB,IAAA,WAAA,CAAoB,SAAwB,EAAA;QAAxB,IAAA,CAAA,SAAS,GAAT,SAAS;QAEZ,IAAA,CAAA,QAAQ,GAAG,YAAY;IAFO;;;;AAQ/C;;;;;;;;;;;;;AAaG;AACH,IAAA,MAAM,iBAAiB,CAAC,MAAgB,EAAE,OAA2B,EAAA;AACnE,QAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,OAAO,CAAC;AAC7C,QAAA,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QACzC;QACA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,GAAG,CAAiC,CAAA,EAAG,IAAI,CAAC,QAAQ,WAAW,MAAM,CAAC,QAAQ,EAAE,CAAA,CAAE,CAAC;AACzH,QAAA,OAAO,oBAAoB,CAAC,QAAQ,CAAC;IACvC;AAEA;;;;;;;;AAQG;IACH,MAAM,gBAAgB,CAAC,OAA2B,EAAA;AAChD,QAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,OAAO,CAAC;QAC7C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,GAAG,CAAgC,CAAA,EAAG,IAAI,CAAC,QAAQ,mBAAmB,MAAM,CAAC,QAAQ,EAAE,CAAA,CAAE,CAAC;AAChI,QAAA,OAAO,oBAAoB,CAAC,QAAQ,CAAC;IACvC;;;;AAMA;;;;;;;AAOG;IACH,MAAM,mBAAmB,CAAC,MAAc,EAAE,QAA0B,EAAE,YAAoB,EAAE,WAAmB,EAAA;AAC7G,QAAA,MAAM,IAAI,GAA2B;YACnC,MAAM;YACN,QAAQ;YACR,YAAY;YACZ;SACD;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