@explorins/pers-sdk 1.1.2 → 1.1.3

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 (291) hide show
  1. package/dist/analytics/api/analytics-api.d.ts +17 -0
  2. package/dist/analytics/api/analytics-api.d.ts.map +1 -0
  3. package/{src/analytics/index.ts → dist/analytics/index.d.ts} +28 -52
  4. package/dist/analytics/index.d.ts.map +1 -0
  5. package/dist/analytics/models/index.d.ts +61 -0
  6. package/dist/analytics/models/index.d.ts.map +1 -0
  7. package/dist/analytics/services/analytics-service.d.ts +19 -0
  8. package/dist/analytics/services/analytics-service.d.ts.map +1 -0
  9. package/dist/analytics.cjs +76 -0
  10. package/dist/analytics.cjs.map +1 -0
  11. package/dist/analytics.d.ts +28 -0
  12. package/dist/analytics.js +72 -0
  13. package/dist/analytics.js.map +1 -0
  14. package/dist/auth-admin/api/auth-admin-api.d.ts +27 -0
  15. package/dist/auth-admin/api/auth-admin-api.d.ts.map +1 -0
  16. package/dist/auth-admin/index.d.ts +26 -0
  17. package/dist/auth-admin/index.d.ts.map +1 -0
  18. package/dist/auth-admin/services/auth-admin-service.d.ts +23 -0
  19. package/dist/auth-admin/services/auth-admin-service.d.ts.map +1 -0
  20. package/dist/auth-admin.cjs +96 -0
  21. package/dist/auth-admin.cjs.map +1 -0
  22. package/dist/auth-admin.d.ts +26 -0
  23. package/dist/auth-admin.js +92 -0
  24. package/dist/auth-admin.js.map +1 -0
  25. package/dist/business/api/business-api.d.ts +133 -0
  26. package/dist/business/api/business-api.d.ts.map +1 -0
  27. package/dist/business/index.d.ts +34 -0
  28. package/dist/business/index.d.ts.map +1 -0
  29. package/dist/business/models/index.d.ts +8 -0
  30. package/dist/business/models/index.d.ts.map +1 -0
  31. package/dist/business/services/business-service.d.ts +51 -0
  32. package/dist/business/services/business-service.d.ts.map +1 -0
  33. package/dist/business.cjs +303 -0
  34. package/dist/business.cjs.map +1 -0
  35. package/dist/business.d.ts +34 -0
  36. package/dist/business.js +299 -0
  37. package/dist/business.js.map +1 -0
  38. package/dist/campaign/api/campaign-api.d.ts +213 -0
  39. package/dist/campaign/api/campaign-api.d.ts.map +1 -0
  40. package/dist/campaign/index.d.ts +44 -0
  41. package/dist/campaign/index.d.ts.map +1 -0
  42. package/dist/campaign/services/campaign-service.d.ts +88 -0
  43. package/dist/campaign/services/campaign-service.d.ts.map +1 -0
  44. package/dist/campaign.cjs +506 -0
  45. package/dist/campaign.cjs.map +1 -0
  46. package/dist/campaign.d.ts +44 -0
  47. package/dist/campaign.js +502 -0
  48. package/dist/campaign.js.map +1 -0
  49. package/dist/core/abstractions/http-client.d.ts +22 -0
  50. package/dist/core/abstractions/http-client.d.ts.map +1 -0
  51. package/dist/core/auth/auth-provider.interface.d.ts +12 -0
  52. package/dist/core/auth/auth-provider.interface.d.ts.map +1 -0
  53. package/dist/core/auth/create-auth-provider.d.ts +27 -0
  54. package/dist/core/auth/create-auth-provider.d.ts.map +1 -0
  55. package/dist/core/auth/simple-auth-config.interface.d.ts +15 -0
  56. package/dist/core/auth/simple-auth-config.interface.d.ts.map +1 -0
  57. package/dist/core/index.d.ts +13 -0
  58. package/dist/core/index.d.ts.map +1 -0
  59. package/dist/core/pers-api-client.d.ts +54 -0
  60. package/dist/core/pers-api-client.d.ts.map +1 -0
  61. package/dist/core/pers-config.d.ts +38 -0
  62. package/dist/core/pers-config.d.ts.map +1 -0
  63. package/dist/core/utils/jwt.function.d.ts +2 -0
  64. package/dist/core/utils/jwt.function.d.ts.map +1 -0
  65. package/dist/core.cjs +506 -0
  66. package/dist/core.cjs.map +1 -0
  67. package/dist/core.d.ts +13 -0
  68. package/dist/core.js +497 -0
  69. package/dist/core.js.map +1 -0
  70. package/dist/donation/api/donation-api.d.ts +18 -0
  71. package/dist/donation/api/donation-api.d.ts.map +1 -0
  72. package/dist/donation/index.d.ts +25 -0
  73. package/dist/donation/index.d.ts.map +1 -0
  74. package/{src/donation/models/index.ts → dist/donation/models/index.d.ts} +8 -11
  75. package/dist/donation/models/index.d.ts.map +1 -0
  76. package/dist/donation/services/donation-service.d.ts +19 -0
  77. package/dist/donation/services/donation-service.d.ts.map +1 -0
  78. package/dist/donation.cjs +78 -0
  79. package/dist/donation.cjs.map +1 -0
  80. package/dist/donation.d.ts +25 -0
  81. package/dist/donation.js +74 -0
  82. package/dist/donation.js.map +1 -0
  83. package/dist/index.cjs +4217 -0
  84. package/dist/index.cjs.map +1 -0
  85. package/dist/index.d.ts +21 -0
  86. package/dist/index.d.ts.map +1 -0
  87. package/dist/index.js +4164 -0
  88. package/dist/index.js.map +1 -0
  89. package/dist/package.json +148 -0
  90. package/dist/payment/api/payment-api.d.ts +105 -0
  91. package/dist/payment/api/payment-api.d.ts.map +1 -0
  92. package/dist/payment/index.d.ts +36 -0
  93. package/dist/payment/index.d.ts.map +1 -0
  94. package/dist/payment/models/index.d.ts +12 -0
  95. package/dist/payment/models/index.d.ts.map +1 -0
  96. package/dist/payment/services/payment-service.d.ts +40 -0
  97. package/dist/payment/services/payment-service.d.ts.map +1 -0
  98. package/dist/payment.cjs +258 -0
  99. package/dist/payment.cjs.map +1 -0
  100. package/dist/payment.d.ts +36 -0
  101. package/dist/payment.js +254 -0
  102. package/dist/payment.js.map +1 -0
  103. package/dist/pers-sdk.d.ts +29 -0
  104. package/dist/pers-sdk.d.ts.map +1 -0
  105. package/dist/redemption/api/redemption-api.d.ts +147 -0
  106. package/dist/redemption/api/redemption-api.d.ts.map +1 -0
  107. package/dist/redemption/index.d.ts +35 -0
  108. package/dist/redemption/index.d.ts.map +1 -0
  109. package/dist/redemption/models/index.d.ts +8 -0
  110. package/dist/redemption/models/index.d.ts.map +1 -0
  111. package/dist/redemption/services/redemption-service.d.ts +56 -0
  112. package/dist/redemption/services/redemption-service.d.ts.map +1 -0
  113. package/dist/redemption.cjs +333 -0
  114. package/dist/redemption.cjs.map +1 -0
  115. package/dist/redemption.d.ts +35 -0
  116. package/dist/redemption.js +329 -0
  117. package/dist/redemption.js.map +1 -0
  118. package/dist/shared/interfaces/pers-shared-lib.interfaces.d.ts +18 -0
  119. package/dist/shared/interfaces/pers-shared-lib.interfaces.d.ts.map +1 -0
  120. package/dist/tenant/api/tenant-api.d.ts +56 -0
  121. package/dist/tenant/api/tenant-api.d.ts.map +1 -0
  122. package/dist/tenant/index.d.ts +34 -0
  123. package/dist/tenant/index.d.ts.map +1 -0
  124. package/dist/tenant/models/index.d.ts +11 -0
  125. package/dist/tenant/models/index.d.ts.map +1 -0
  126. package/dist/tenant/services/tenant-service.d.ts +46 -0
  127. package/dist/tenant/services/tenant-service.d.ts.map +1 -0
  128. package/dist/tenant.cjs +177 -0
  129. package/dist/tenant.cjs.map +1 -0
  130. package/dist/tenant.d.ts +34 -0
  131. package/dist/tenant.js +173 -0
  132. package/dist/tenant.js.map +1 -0
  133. package/dist/token/api/token-api.d.ts +64 -0
  134. package/dist/token/api/token-api.d.ts.map +1 -0
  135. package/dist/token/base/base-token-service.d.ts +87 -0
  136. package/dist/token/base/base-token-service.d.ts.map +1 -0
  137. package/dist/token/index.d.ts +13 -0
  138. package/dist/token/index.d.ts.map +1 -0
  139. package/dist/token/models/index.d.ts +18 -0
  140. package/dist/token/models/index.d.ts.map +1 -0
  141. package/dist/token/services/token-service.d.ts +68 -0
  142. package/dist/token/services/token-service.d.ts.map +1 -0
  143. package/dist/token/token-sdk.d.ts +140 -0
  144. package/dist/token/token-sdk.d.ts.map +1 -0
  145. package/dist/token.cjs +537 -0
  146. package/dist/token.cjs.map +1 -0
  147. package/dist/token.d.ts +13 -0
  148. package/dist/token.js +532 -0
  149. package/dist/token.js.map +1 -0
  150. package/dist/transaction/api/transaction-api.d.ts +133 -0
  151. package/dist/transaction/api/transaction-api.d.ts.map +1 -0
  152. package/dist/transaction/index.d.ts +38 -0
  153. package/dist/transaction/index.d.ts.map +1 -0
  154. package/dist/transaction/models/index.d.ts +42 -0
  155. package/dist/transaction/models/index.d.ts.map +1 -0
  156. package/dist/transaction/services/transaction-service.d.ts +56 -0
  157. package/dist/transaction/services/transaction-service.d.ts.map +1 -0
  158. package/dist/transaction.cjs +394 -0
  159. package/dist/transaction.cjs.map +1 -0
  160. package/dist/transaction.d.ts +38 -0
  161. package/dist/transaction.js +390 -0
  162. package/dist/transaction.js.map +1 -0
  163. package/dist/user/api/user-api.d.ts +56 -0
  164. package/dist/user/api/user-api.d.ts.map +1 -0
  165. package/dist/user/index.d.ts +36 -0
  166. package/dist/user/index.d.ts.map +1 -0
  167. package/{src/user/models/index.ts → dist/user/models/index.d.ts} +12 -10
  168. package/dist/user/models/index.d.ts.map +1 -0
  169. package/dist/user/services/user-service.d.ts +46 -0
  170. package/dist/user/services/user-service.d.ts.map +1 -0
  171. package/dist/user-status/api/user-status-api.d.ts +37 -0
  172. package/dist/user-status/api/user-status-api.d.ts.map +1 -0
  173. package/dist/user-status/index.d.ts +28 -0
  174. package/dist/user-status/index.d.ts.map +1 -0
  175. package/{src/user-status/models/index.ts → dist/user-status/models/index.d.ts} +8 -11
  176. package/dist/user-status/models/index.d.ts.map +1 -0
  177. package/dist/user-status/services/user-status-service.d.ts +26 -0
  178. package/dist/user-status/services/user-status-service.d.ts.map +1 -0
  179. package/dist/user-status.cjs +147 -0
  180. package/dist/user-status.cjs.map +1 -0
  181. package/dist/user-status.d.ts +28 -0
  182. package/dist/user-status.js +143 -0
  183. package/dist/user-status.js.map +1 -0
  184. package/dist/user.cjs +188 -0
  185. package/dist/user.cjs.map +1 -0
  186. package/dist/user.d.ts +36 -0
  187. package/dist/user.js +184 -0
  188. package/dist/user.js.map +1 -0
  189. package/dist/web3/api/web3-api.d.ts +27 -0
  190. package/dist/web3/api/web3-api.d.ts.map +1 -0
  191. package/dist/web3/index.d.ts +16 -0
  192. package/dist/web3/index.d.ts.map +1 -0
  193. package/dist/web3/models/index.d.ts +92 -0
  194. package/dist/web3/models/index.d.ts.map +1 -0
  195. package/dist/web3/services/web3-service.d.ts +21 -0
  196. package/dist/web3/services/web3-service.d.ts.map +1 -0
  197. package/dist/web3-chain/api/web3-chain-api.d.ts +19 -0
  198. package/dist/web3-chain/api/web3-chain-api.d.ts.map +1 -0
  199. package/dist/web3-chain/index.d.ts +17 -0
  200. package/dist/web3-chain/index.d.ts.map +1 -0
  201. package/{src/web3-chain/models/index.ts → dist/web3-chain/models/index.d.ts} +38 -45
  202. package/dist/web3-chain/models/index.d.ts.map +1 -0
  203. package/dist/web3-chain/services/getWeb3FCD.service.d.ts +8 -0
  204. package/dist/web3-chain/services/getWeb3FCD.service.d.ts.map +1 -0
  205. package/dist/web3-chain/services/provider.service.d.ts +15 -0
  206. package/dist/web3-chain/services/provider.service.d.ts.map +1 -0
  207. package/dist/web3-chain/services/public-http-provider.service.d.ts +8 -0
  208. package/dist/web3-chain/services/public-http-provider.service.d.ts.map +1 -0
  209. package/dist/web3-chain/services/web3-chain-service.d.ts +17 -0
  210. package/dist/web3-chain/services/web3-chain-service.d.ts.map +1 -0
  211. package/dist/web3-chain.cjs +316 -0
  212. package/dist/web3-chain.cjs.map +1 -0
  213. package/dist/web3-chain.d.ts +17 -0
  214. package/dist/web3-chain.js +310 -0
  215. package/dist/web3-chain.js.map +1 -0
  216. package/dist/web3.cjs +516 -0
  217. package/dist/web3.cjs.map +1 -0
  218. package/dist/web3.d.ts +16 -0
  219. package/dist/web3.js +513 -0
  220. package/dist/web3.js.map +1 -0
  221. package/package.json +70 -67
  222. package/config/domains.js +0 -22
  223. package/explorins-pers-sdk-1.0.0-alpha.1.tgz +0 -0
  224. package/rollup.config.js +0 -74
  225. package/scripts/copy-declarations.js +0 -147
  226. package/src/analytics/api/analytics-api.ts +0 -24
  227. package/src/analytics/models/index.ts +0 -74
  228. package/src/analytics/services/analytics-service.ts +0 -28
  229. package/src/auth-admin/api/auth-admin-api.ts +0 -42
  230. package/src/auth-admin/index.ts +0 -47
  231. package/src/auth-admin/services/auth-admin-service.ts +0 -36
  232. package/src/business/api/business-api.ts +0 -234
  233. package/src/business/index.ts +0 -53
  234. package/src/business/models/index.ts +0 -13
  235. package/src/business/services/business-service.ts +0 -88
  236. package/src/campaign/api/campaign-api.ts +0 -376
  237. package/src/campaign/index.ts +0 -67
  238. package/src/campaign/services/campaign-service.ts +0 -164
  239. package/src/core/abstractions/http-client.ts +0 -24
  240. package/src/core/auth/auth-provider.interface.ts +0 -16
  241. package/src/core/auth/create-auth-provider.ts +0 -136
  242. package/src/core/auth/simple-auth-config.interface.ts +0 -15
  243. package/src/core/index.ts +0 -33
  244. package/src/core/pers-api-client.ts +0 -343
  245. package/src/core/pers-config.ts +0 -65
  246. package/src/core/utils/jwt.function.ts +0 -24
  247. package/src/donation/api/donation-api.ts +0 -24
  248. package/src/donation/index.ts +0 -47
  249. package/src/donation/services/donation-service.ts +0 -25
  250. package/src/index.ts +0 -55
  251. package/src/payment/api/payment-api.ts +0 -185
  252. package/src/payment/index.ts +0 -64
  253. package/src/payment/models/index.ts +0 -29
  254. package/src/payment/services/payment-service.ts +0 -70
  255. package/src/pers-sdk.ts +0 -45
  256. package/src/redemption/api/redemption-api.ts +0 -241
  257. package/src/redemption/index.ts +0 -60
  258. package/src/redemption/models/index.ts +0 -17
  259. package/src/redemption/services/redemption-service.ts +0 -103
  260. package/src/shared/interfaces/pers-shared-lib.interfaces.ts +0 -99
  261. package/src/tenant/api/tenant-api.ts +0 -92
  262. package/src/tenant/index.ts +0 -61
  263. package/src/tenant/models/index.ts +0 -20
  264. package/src/tenant/services/tenant-service.ts +0 -78
  265. package/src/token/api/token-api.ts +0 -129
  266. package/src/token/base/base-token-service.ts +0 -167
  267. package/src/token/index.ts +0 -38
  268. package/src/token/models/index.ts +0 -30
  269. package/src/token/services/token-service.ts +0 -125
  270. package/src/token/token-sdk.ts +0 -231
  271. package/src/transaction/api/transaction-api.ts +0 -296
  272. package/src/transaction/index.ts +0 -65
  273. package/src/transaction/models/index.ts +0 -60
  274. package/src/transaction/services/transaction-service.ts +0 -104
  275. package/src/user/api/user-api.ts +0 -98
  276. package/src/user/index.ts +0 -62
  277. package/src/user/services/user-service.ts +0 -75
  278. package/src/user-status/api/user-status-api.ts +0 -78
  279. package/src/user-status/index.ts +0 -55
  280. package/src/user-status/services/user-status-service.ts +0 -51
  281. package/src/web3/api/web3-api.ts +0 -68
  282. package/src/web3/index.ts +0 -38
  283. package/src/web3/models/index.ts +0 -150
  284. package/src/web3/services/web3-service.ts +0 -338
  285. package/src/web3-chain/api/web3-chain-api.ts +0 -42
  286. package/src/web3-chain/index.ts +0 -27
  287. package/src/web3-chain/services/getWeb3FCD.service.ts +0 -47
  288. package/src/web3-chain/services/provider.service.ts +0 -123
  289. package/src/web3-chain/services/public-http-provider.service.ts +0 -26
  290. package/src/web3-chain/services/web3-chain-service.ts +0 -131
  291. package/tsconfig.json +0 -28
package/package.json CHANGED
@@ -1,110 +1,113 @@
1
1
  {
2
2
  "name": "@explorins/pers-sdk",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Platform-agnostic SDK for PERS (Phygital Experience Rewards System) - Production Defaults",
5
5
  "type": "module",
6
- "main": "./index.cjs",
7
- "module": "./index.js",
8
- "types": "./index.d.ts",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "files": [
10
+ "dist/**/*"
11
+ ],
9
12
  "exports": {
10
13
  ".": {
11
- "types": "./index.d.ts",
12
- "import": "./index.js",
13
- "require": "./index.cjs"
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js",
16
+ "require": "./dist/index.cjs"
14
17
  },
15
18
  "./analytics": {
16
- "types": "./analytics.d.ts",
17
- "import": "./analytics.js",
18
- "require": "./analytics.cjs"
19
+ "types": "./dist/analytics.d.ts",
20
+ "import": "./dist/analytics.js",
21
+ "require": "./dist/analytics.cjs"
19
22
  },
20
23
  "./auth-admin": {
21
- "types": "./auth-admin.d.ts",
22
- "import": "./auth-admin.js",
23
- "require": "./auth-admin.cjs"
24
+ "types": "./dist/auth-admin.d.ts",
25
+ "import": "./dist/auth-admin.js",
26
+ "require": "./dist/auth-admin.cjs"
24
27
  },
25
28
  "./business": {
26
- "types": "./business.d.ts",
27
- "import": "./business.js",
28
- "require": "./business.cjs"
29
+ "types": "./dist/business.d.ts",
30
+ "import": "./dist/business.js",
31
+ "require": "./dist/business.cjs"
29
32
  },
30
33
  "./campaign": {
31
- "types": "./campaign.d.ts",
32
- "import": "./campaign.js",
33
- "require": "./campaign.cjs"
34
+ "types": "./dist/campaign.d.ts",
35
+ "import": "./dist/campaign.js",
36
+ "require": "./dist/campaign.cjs"
34
37
  },
35
38
  "./core": {
36
- "types": "./core.d.ts",
37
- "import": "./core.js",
38
- "require": "./core.cjs"
39
+ "types": "./dist/core.d.ts",
40
+ "import": "./dist/core.js",
41
+ "require": "./dist/core.cjs"
39
42
  },
40
43
  "./donation": {
41
- "types": "./donation.d.ts",
42
- "import": "./donation.js",
43
- "require": "./donation.cjs"
44
+ "types": "./dist/donation.d.ts",
45
+ "import": "./dist/donation.js",
46
+ "require": "./dist/donation.cjs"
44
47
  },
45
48
  "./payment": {
46
- "types": "./payment.d.ts",
47
- "import": "./payment.js",
48
- "require": "./payment.cjs"
49
+ "types": "./dist/payment.d.ts",
50
+ "import": "./dist/payment.js",
51
+ "require": "./dist/payment.cjs"
49
52
  },
50
53
  "./redemption": {
51
- "types": "./redemption.d.ts",
52
- "import": "./redemption.js",
53
- "require": "./redemption.cjs"
54
+ "types": "./dist/redemption.d.ts",
55
+ "import": "./dist/redemption.js",
56
+ "require": "./dist/redemption.cjs"
54
57
  },
55
58
  "./tenant": {
56
- "types": "./tenant.d.ts",
57
- "import": "./tenant.js",
58
- "require": "./tenant.cjs"
59
+ "types": "./dist/tenant.d.ts",
60
+ "import": "./dist/tenant.js",
61
+ "require": "./dist/tenant.cjs"
59
62
  },
60
63
  "./token": {
61
- "types": "./token.d.ts",
62
- "import": "./token.js",
63
- "require": "./token.cjs"
64
+ "types": "./dist/token.d.ts",
65
+ "import": "./dist/token.js",
66
+ "require": "./dist/token.cjs"
64
67
  },
65
68
  "./transaction": {
66
- "types": "./transaction.d.ts",
67
- "import": "./transaction.js",
68
- "require": "./transaction.cjs"
69
+ "types": "./dist/transaction.d.ts",
70
+ "import": "./dist/transaction.js",
71
+ "require": "./dist/transaction.cjs"
69
72
  },
70
73
  "./user": {
71
- "types": "./user.d.ts",
72
- "import": "./user.js",
73
- "require": "./user.cjs"
74
+ "types": "./dist/user.d.ts",
75
+ "import": "./dist/user.js",
76
+ "require": "./dist/user.cjs"
74
77
  },
75
78
  "./user-status": {
76
- "types": "./user-status.d.ts",
77
- "import": "./user-status.js",
78
- "require": "./user-status.cjs"
79
+ "types": "./dist/user-status.d.ts",
80
+ "import": "./dist/user-status.js",
81
+ "require": "./dist/user-status.cjs"
79
82
  },
80
83
  "./web3-chain": {
81
- "types": "./web3-chain.d.ts",
82
- "import": "./web3-chain.js",
83
- "require": "./web3-chain.cjs"
84
+ "types": "./dist/web3-chain.d.ts",
85
+ "import": "./dist/web3-chain.js",
86
+ "require": "./dist/web3-chain.cjs"
84
87
  },
85
88
  "./web3": {
86
- "types": "./web3.d.ts",
87
- "import": "./web3.js",
88
- "require": "./web3.cjs"
89
+ "types": "./dist/web3.d.ts",
90
+ "import": "./dist/web3.js",
91
+ "require": "./dist/web3.cjs"
89
92
  }
90
93
  },
91
94
  "typesVersions": {
92
95
  "*": {
93
- "analytics": ["./analytics.d.ts"],
94
- "auth-admin": ["./auth-admin.d.ts"],
95
- "business": ["./business.d.ts"],
96
- "campaign": ["./campaign.d.ts"],
97
- "core": ["./core.d.ts"],
98
- "donation": ["./donation.d.ts"],
99
- "payment": ["./payment.d.ts"],
100
- "redemption": ["./redemption.d.ts"],
101
- "tenant": ["./tenant.d.ts"],
102
- "token": ["./token.d.ts"],
103
- "transaction": ["./transaction.d.ts"],
104
- "user": ["./user.d.ts"],
105
- "user-status": ["./user-status.d.ts"],
106
- "web3-chain": ["./web3-chain.d.ts"],
107
- "web3": ["./web3.d.ts"]
96
+ "analytics": ["./dist/analytics.d.ts"],
97
+ "auth-admin": ["./dist/auth-admin.d.ts"],
98
+ "business": ["./dist/business.d.ts"],
99
+ "campaign": ["./dist/campaign.d.ts"],
100
+ "core": ["./dist/core.d.ts"],
101
+ "donation": ["./dist/donation.d.ts"],
102
+ "payment": ["./dist/payment.d.ts"],
103
+ "redemption": ["./dist/redemption.d.ts"],
104
+ "tenant": ["./dist/tenant.d.ts"],
105
+ "token": ["./dist/token.d.ts"],
106
+ "transaction": ["./dist/transaction.d.ts"],
107
+ "user": ["./dist/user.d.ts"],
108
+ "user-status": ["./dist/user-status.d.ts"],
109
+ "web3-chain": ["./dist/web3-chain.d.ts"],
110
+ "web3": ["./dist/web3.d.ts"]
108
111
  }
109
112
  },
110
113
  "scripts": {
package/config/domains.js DELETED
@@ -1,22 +0,0 @@
1
- // Domain configurations for the PERS SDK
2
- // This is the single source of truth for all domain configurations
3
- export const domains = [
4
- { name: 'core', externals: ['jwt-decode'] },
5
- { name: 'business', externals: ['@explorins/pers-shared'] },
6
- { name: 'transaction', externals: ['@explorins/pers-shared'] },
7
- { name: 'analytics', externals: ['@explorins/pers-shared'] },
8
- { name: 'auth-admin', externals: ['@explorins/pers-shared'] },
9
- { name: 'campaign', externals: ['@explorins/pers-shared'] },
10
- { name: 'donation', externals: ['@explorins/pers-shared'] },
11
- { name: 'payment', externals: ['@explorins/pers-shared'] },
12
- { name: 'redemption', externals: ['@explorins/pers-shared'] },
13
- { name: 'tenant', externals: ['@explorins/pers-shared'] },
14
- { name: 'token', externals: ['@explorins/pers-shared'] },
15
- { name: 'user', externals: ['@explorins/pers-shared'] },
16
- { name: 'user-status', externals: ['@explorins/pers-shared'] },
17
- { name: 'web3-chain', externals: ['@explorins/pers-shared', 'web3', '@explorins/web3-ts', 'ethers'] },
18
- { name: 'web3', externals: ['@explorins/pers-shared', 'web3', '@explorins/web3-ts', 'ethers'] }
19
- ];
20
-
21
- // Extract just the domain names for scripts that only need the names
22
- export const domainNames = domains.map(domain => domain.name);
package/rollup.config.js DELETED
@@ -1,74 +0,0 @@
1
- import typescript from '@rollup/plugin-typescript';
2
- import copy from 'rollup-plugin-copy';
3
- import { domains } from './config/domains.js';
4
-
5
- // Generate domain configurations
6
- const domainConfigs = domains.map(domain => ({
7
- input: `src/${domain.name}/index.ts`,
8
- output: [
9
- {
10
- file: `dist/${domain.name}.cjs`,
11
- format: 'cjs',
12
- sourcemap: true,
13
- exports: 'named'
14
- },
15
- {
16
- file: `dist/${domain.name}.js`,
17
- format: 'esm',
18
- sourcemap: true
19
- }
20
- ],
21
- plugins: [
22
- typescript({
23
- tsconfig: './tsconfig.json',
24
- declaration: true,
25
- declarationMap: true,
26
- outDir: './dist/temp',
27
- declarationDir: './dist/temp',
28
- compilerOptions: {
29
- rootDir: './src',
30
- outDir: './dist/temp',
31
- declarationDir: './dist/temp'
32
- }
33
- })
34
- ],
35
- external: domain.externals
36
- }));
37
-
38
- export default [
39
- // All domain configurations
40
- ...domainConfigs,
41
-
42
- // Main entry point (everything)
43
- {
44
- input: 'src/index.ts',
45
- output: [
46
- {
47
- file: 'dist/index.cjs',
48
- format: 'cjs',
49
- sourcemap: true,
50
- exports: 'named'
51
- },
52
- {
53
- file: 'dist/index.js',
54
- format: 'esm',
55
- sourcemap: true
56
- }
57
- ],
58
- plugins: [
59
- typescript({
60
- tsconfig: './tsconfig.json',
61
- declaration: true,
62
- declarationMap: true,
63
- declarationDir: './dist',
64
- outDir: './dist'
65
- }),
66
- copy({
67
- targets: [
68
- { src: 'package.json', dest: 'dist' }
69
- ]
70
- })
71
- ],
72
- external: ['@explorins/pers-shared', 'web3', 'jwt-decode', '@explorins/web3-ts', 'ethers'] // All dependencies
73
- }
74
- ];
@@ -1,147 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import fs from 'fs';
4
- import path from 'path';
5
- import { fileURLToPath } from 'url';
6
-
7
- // Import domain names from shared configuration
8
- import { domainNames } from '../config/domains.js';
9
-
10
- // Get __dirname equivalent for ES modules
11
- const __filename = fileURLToPath(import.meta.url);
12
- const __dirname = path.dirname(__filename);
13
-
14
- const distPath = path.join(__dirname, '..', 'dist');
15
- const tempPath = path.join(distPath, 'temp');
16
-
17
- console.log('Copying domain declaration files...');
18
-
19
- // Ensure dist directory exists
20
- if (!fs.existsSync(distPath)) {
21
- fs.mkdirSync(distPath, { recursive: true });
22
- }
23
-
24
- let copiedCount = 0;
25
- let errors = [];
26
-
27
- for (const domain of domainNames) {
28
- const sourcePath = path.join(tempPath, domain, 'index.d.ts');
29
- const targetPath = path.join(distPath, `${domain}.d.ts`);
30
-
31
- try {
32
- if (fs.existsSync(sourcePath)) {
33
- let content = fs.readFileSync(sourcePath, 'utf8');
34
-
35
- // Fix relative imports for the root-level declaration files
36
- // Convert './api/something' to './domain/api/something'
37
- // Convert './models' to './domain/models'
38
- // Convert './services/something' to './domain/services/something'
39
- content = content.replace(
40
- /from ['"]\.\/(api|models|services)([^'"]*)['"]/g,
41
- `from './${domain}/$1$2'`
42
- );
43
-
44
- // Also fix export statements
45
- content = content.replace(
46
- /export \{ ([^}]+) \} from ['"]\.\/(api|models|services)([^'"]*)['"]/g,
47
- `export { $1 } from './${domain}/$2$3'`
48
- );
49
-
50
- // Fix export * statements
51
- content = content.replace(
52
- /export \* from ['"]\.\/(api|models|services)([^'"]*)['"]/g,
53
- `export * from './${domain}/$1$2'`
54
- );
55
-
56
- // Fix problematic import paths that reference @explorins/pers-shared directly
57
- // Replace specific import patterns with the re-exported types
58
- content = content.replace(
59
- /import\("@explorins\/pers-shared\/[^"]+"\)\.(\w+)/g,
60
- '$1'
61
- );
62
-
63
- // Fix centralized interface imports - convert relative paths to correct dist structure
64
- content = content.replace(
65
- /from ['"]\.\.\/(shared\/interfaces\/pers-shared-lib\.interfaces)['"]/g,
66
- `from './$1'`
67
- );
68
-
69
- // Fix centralized interface exports
70
- content = content.replace(
71
- /export \* from ['"]\.\.\/(shared\/interfaces\/pers-shared-lib\.interfaces)['"]/g,
72
- `export * from './$1'`
73
- );
74
-
75
- // Fix core imports - convert ../core/ to ./core/
76
- content = content.replace(
77
- /from ['"]\.\.\/(core\/[^'"]*)['"]/g,
78
- `from './$1'`
79
- );
80
-
81
- // Fix pers-sdk imports - convert ../pers-sdk to ./pers-sdk
82
- content = content.replace(
83
- /from ['"]\.\.\/(pers-sdk)['"]/g,
84
- `from './$1'`
85
- );
86
-
87
- // Fix cross-domain imports - convert ../domain-name/ to ./domain-name/
88
- content = content.replace(
89
- /from ['"]\.\.\/(web3-chain|core|business|payment|user|transaction|campaign|analytics|auth-admin|donation|redemption|tenant|token|user-status|web3)\/([^'"]*)['"]/g,
90
- `from './$1/$2'`
91
- );
92
-
93
- // Fix relative imports within domain files - they need to reference the domain subfolder
94
- // But skip paths that already reference shared, core, or business subdirectories correctly
95
- if (!content.includes('./shared/interfaces/') && !content.includes('./core/')) {
96
- content = content.replace(
97
- /from ['"]\.\/([^'"]+)['"]/g,
98
- (match, path) => {
99
- // Don't transform if it's already correctly prefixed
100
- if (path.startsWith(`${domain}/`) || path.startsWith('shared/') || path.startsWith('core/')) {
101
- return match;
102
- }
103
- return `from './${domain}/${path}'`;
104
- }
105
- );
106
-
107
- content = content.replace(
108
- /export \* from ['"]\.\/([^'"]+)['"]/g,
109
- (match, path) => {
110
- if (path.startsWith(`${domain}/`) || path.startsWith('shared/') || path.startsWith('core/')) {
111
- return match;
112
- }
113
- return `export * from './${domain}/${path}'`;
114
- }
115
- );
116
- }
117
-
118
- fs.writeFileSync(targetPath, content);
119
- console.log(`✓ Copied ${domain}.d.ts`);
120
- copiedCount++;
121
- } else {
122
- errors.push(`Source file not found: ${sourcePath}`);
123
- }
124
- } catch (error) {
125
- errors.push(`Error copying ${domain}.d.ts: ${error.message}`);
126
- }
127
- }
128
-
129
- // Clean up temp directory
130
- try {
131
- if (fs.existsSync(tempPath)) {
132
- fs.rmSync(tempPath, { recursive: true, force: true });
133
- console.log('✓ Cleaned up temp directory');
134
- }
135
- } catch (error) {
136
- console.warn(`Warning: Could not clean up temp directory: ${error.message}`);
137
- }
138
-
139
- console.log(`\nSummary: ${copiedCount}/${domainNames.length} declaration files copied successfully`);
140
-
141
- if (errors.length > 0) {
142
- console.error('\nErrors encountered:');
143
- errors.forEach(error => console.error(` - ${error}`));
144
- process.exit(1);
145
- }
146
-
147
- console.log('✓ All declaration files copied successfully!');
@@ -1,24 +0,0 @@
1
- import { PersApiClient } from '../../core/pers-api-client';
2
- import { TransactionAnalyticsRequestDTO, TransactionAnalyticsResponseDTO } from '../models';
3
-
4
-
5
- /**
6
- * Platform-Agnostic Analytics API Client
7
- *
8
- * Handles analytics operations using the PERS backend.
9
- * Uses @explorins/pers-shared DTOs for consistency with backend.
10
- */
11
- export class AnalyticsApi {
12
- constructor(private apiClient: PersApiClient) {}
13
-
14
- // ==========================================
15
- // ADMIN OPERATIONS
16
- // ==========================================
17
-
18
- /**
19
- * ADMIN: Get transaction analytics with filtering and aggregation
20
- */
21
- async getTransactionAnalytics(request: TransactionAnalyticsRequestDTO): Promise<TransactionAnalyticsResponseDTO> {
22
- return this.apiClient.post<TransactionAnalyticsResponseDTO>('/transactions/analytics', request);
23
- }
24
- }
@@ -1,74 +0,0 @@
1
- /**
2
- * Analytics Domain Models
3
- *
4
- * Re-exports from @explorins/pers-shared for consistency with backend
5
- * and to provide a single import source for analytics-related types.
6
- */
7
-
8
- // Core analytics entities
9
-
10
-
11
- export interface TransactionAnalyticsGroupByExpression {
12
- expression: string;
13
- alias: string;
14
- }
15
-
16
- export interface TransactionAnalyticsRequestDTO {
17
- filters?: TransactionAnalyticsFilters;
18
- groupBy?: TransactionAnalyticsGroupBy[];
19
- groupByExpressions?: TransactionAnalyticsGroupByExpression[];
20
- metrics?: TransactionAnalyticsMetric[];
21
- orderBy?: string;
22
- orderDirection?: 'ASC' | 'DESC';
23
- limit?: number;
24
- startDate?: string;
25
- endDate?: string;
26
- }
27
-
28
- export type TransactionAnalyticsFilters = {
29
- status?: string;
30
- tokenType?: string;
31
- triggerProcessType?: string;
32
- tenantId?: string;
33
- chainId?: number;
34
- type?: string;
35
- [key: string]: any;
36
- };
37
-
38
- export type TransactionAnalyticsGroupBy =
39
- | 'month' | 'week' | 'day' | 'year' | 'quarter'
40
- | 'tokenType' | 'status' | 'chainId' | 'triggerProcessType' | 'type'
41
- | 'senderAddress' | 'recipientAddress' | 'senderId' | 'recipientId' | 'senderOwnerType' | 'recipientOwnerType' | 'createdAt';
42
-
43
- export type TransactionAnalyticsMetric =
44
- | 'count' | 'sum' | 'avg' | 'min' | 'max';
45
-
46
- export interface TransactionAnalyticsResultItem {
47
- [key: string]: string | number | Date | undefined;
48
- count?: string;
49
- sum?: number;
50
- avg?: number;
51
- min?: number;
52
- max?: number;
53
- tokentype?: string;
54
- tokenType?: string;
55
- year?: string;
56
- month?: string;
57
- type?: string;
58
- senderaddress?: string;
59
- senderAddress?: string;
60
- recipientaddress?: string;
61
- recipientAddress?: string;
62
- triggerprocesstype?: string;
63
- triggerProcessType?: string;
64
- userid?: string;
65
- userId?: string;
66
- }
67
-
68
- export interface TransactionAnalyticsResponseDTO {
69
- results: TransactionAnalyticsResultItem[];
70
- totalGroups: number;
71
- metadata: {
72
- executionTime: string;
73
- };
74
- }
@@ -1,28 +0,0 @@
1
- import { AnalyticsApi } from '../api/analytics-api';
2
- import {
3
- TransactionAnalyticsRequestDTO,
4
- TransactionAnalyticsResponseDTO
5
- } from '../models';
6
-
7
- /**
8
- * Platform-Agnostic Analytics Service
9
- *
10
- * Contains analytics business logic and operations that work across platforms.
11
- * No framework dependencies - pure TypeScript business logic.
12
- *
13
- * Focuses only on actual backend capabilities.
14
- */
15
- export class AnalyticsService {
16
- constructor(private analyticsApi: AnalyticsApi) {}
17
-
18
- // ==========================================
19
- // ADMIN OPERATIONS
20
- // ==========================================
21
-
22
- /**
23
- * ADMIN: Get transaction analytics with filtering and aggregation
24
- */
25
- async getTransactionAnalytics(request: TransactionAnalyticsRequestDTO): Promise<TransactionAnalyticsResponseDTO> {
26
- return this.analyticsApi.getTransactionAnalytics(request);
27
- }
28
- }
@@ -1,42 +0,0 @@
1
- import { PersApiClient } from '../../core/pers-api-client';
2
- import {
3
- AdminDTO,
4
- SessionAuthResponseDTO as TokenRefreshResponse,
5
- SessionAuthResponseDTO as AdminLoginResponseDTO
6
- } from '../../shared/interfaces/pers-shared-lib.interfaces';
7
-
8
- /**
9
- * Platform-Agnostic Auth Admin API Client
10
- *
11
- * Handles authentication and authorization admin operations using the PERS backend.
12
- * Uses @explorins/pers-shared DTOs for consistency with backend.
13
- *
14
- * Note: Special header handling (bypass-auth-interceptor) may need to be implemented
15
- * at the PersApiClient level or through a specialized auth client.
16
- */
17
- export class AuthAdminApi {
18
- constructor(private apiClient: PersApiClient) {}
19
-
20
- private readonly basePath = '/auth';
21
-
22
- // ==========================================
23
- // ADMIN AUTHENTICATION OPERATIONS
24
- // ==========================================
25
-
26
- /**
27
- * ADMIN: Login tenant admin with JWT
28
- * Note: JWT handling and auth bypass headers may need special implementation
29
- */
30
- async loginTenantAdmin(jwt: string): Promise<AdminLoginResponseDTO> {
31
- // TODO: Implement proper JWT and bypass header handling when PersApiClient supports it
32
- return this.apiClient.post<AdminLoginResponseDTO>(`${this.basePath}/token`, {});
33
- }
34
-
35
- /**
36
- * ADMIN: Refresh access token
37
- * Note: Bypass header handling may need special implementation
38
- */
39
- async refreshAccessToken(refreshToken: string): Promise<TokenRefreshResponse> {
40
- return this.apiClient.post<TokenRefreshResponse>(`${this.basePath}/refresh`, { refreshToken });
41
- }
42
- }
@@ -1,47 +0,0 @@
1
- /**
2
- * @explorins/pers-sdk-auth-admin
3
- *
4
- * Platform-agnostic Auth Admin Domain SDK for PERS ecosystem
5
- * Handles authentication and authorization admin operations
6
- */
7
-
8
- // API Layer
9
- export { AuthAdminApi } from './api/auth-admin-api';
10
-
11
- // Service Layer
12
- export { AuthAdminService } from './services/auth-admin-service';
13
-
14
- // Models & Types - re-export all centralized interfaces
15
- export * from '../shared/interfaces/pers-shared-lib.interfaces';
16
-
17
- // Models & Types - imported from centralized interfaces
18
-
19
- // Factory function for creating auth admin SDK instance
20
- import { PersApiClient } from '../core/pers-api-client';
21
- import { AuthAdminApi } from './api/auth-admin-api';
22
- import { AuthAdminService } from './services/auth-admin-service';
23
-
24
- /**
25
- * Create a complete Auth Admin SDK instance
26
- *
27
- * @param apiClient - Configured PERS API client
28
- * @returns Auth Admin SDK with flattened structure for better DX
29
- */
30
- export function createAuthAdminSDK(apiClient: PersApiClient) {
31
- const authAdminApi = new AuthAdminApi(apiClient);
32
- const authAdminService = new AuthAdminService(authAdminApi);
33
-
34
- return {
35
- // Direct access to service methods (primary interface)
36
-
37
- // Admin authentication methods
38
- loginTenantAdmin: (jwt: string) => authAdminService.loginTenantAdmin(jwt),
39
- refreshAccessToken: (refreshToken: string) => authAdminService.refreshAccessToken(refreshToken),
40
-
41
- // Advanced access for edge cases
42
- api: authAdminApi,
43
- service: authAdminService
44
- };
45
- }
46
-
47
- export type AuthAdminSDK = ReturnType<typeof createAuthAdminSDK>;