@explorins/pers-sdk 2.0.7 → 2.0.11
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.
- package/README.md +113 -59
- package/dist/analytics/index.d.ts +0 -2
- package/dist/analytics/index.d.ts.map +1 -1
- package/dist/analytics/models/index.d.ts +1 -10
- package/dist/analytics/models/index.d.ts.map +1 -1
- package/dist/analytics.cjs +44 -29
- package/dist/analytics.cjs.map +1 -1
- package/dist/analytics.js +45 -2
- package/dist/analytics.js.map +1 -1
- package/dist/business/index.d.ts +0 -1
- package/dist/business/index.d.ts.map +1 -1
- package/dist/business.cjs +7 -774
- package/dist/business.cjs.map +1 -1
- package/dist/business.js +3 -751
- package/dist/business.js.map +1 -1
- package/dist/campaign/index.d.ts +0 -1
- package/dist/campaign/index.d.ts.map +1 -1
- package/dist/campaign.cjs +429 -29
- package/dist/campaign.cjs.map +1 -1
- package/dist/campaign.js +431 -3
- package/dist/campaign.js.map +1 -1
- package/dist/chunks/business-membership-service-8KC_qRj7.cjs +756 -0
- package/dist/chunks/business-membership-service-8KC_qRj7.cjs.map +1 -0
- package/dist/chunks/business-membership-service-D6vaVQTR.js +751 -0
- package/dist/chunks/business-membership-service-D6vaVQTR.js.map +1 -0
- package/dist/chunks/{web3-chain-service-BeBjALg2.cjs → index-B-g2JPVK.cjs} +1 -220
- package/dist/chunks/index-B-g2JPVK.cjs.map +1 -0
- package/dist/chunks/{web3-chain-service-DKHCnHQX.js → index-CKm_V5XE.js} +2 -219
- package/dist/chunks/index-CKm_V5XE.js.map +1 -0
- package/dist/chunks/payment-service-Bkw7ZXev.cjs +214 -0
- package/dist/chunks/payment-service-Bkw7ZXev.cjs.map +1 -0
- package/dist/chunks/payment-service-IvM6rryM.js +211 -0
- package/dist/chunks/payment-service-IvM6rryM.js.map +1 -0
- package/dist/chunks/{pers-sdk-JIExM712.js → pers-sdk-DYnIZvcx.js} +12 -291
- package/dist/chunks/pers-sdk-DYnIZvcx.js.map +1 -0
- package/dist/chunks/{pers-sdk-h-uoLpBx.cjs → pers-sdk-Dr9W8stD.cjs} +38 -318
- package/dist/chunks/pers-sdk-Dr9W8stD.cjs.map +1 -0
- package/dist/chunks/redemption-service-D-hBqh42.js +339 -0
- package/dist/chunks/redemption-service-D-hBqh42.js.map +1 -0
- package/dist/chunks/redemption-service-rMB6T2W5.cjs +342 -0
- package/dist/chunks/redemption-service-rMB6T2W5.cjs.map +1 -0
- package/dist/chunks/tenant-service-CsRA3O2V.js +163 -0
- package/dist/chunks/tenant-service-CsRA3O2V.js.map +1 -0
- package/dist/chunks/tenant-service-fj-pkXTw.cjs +166 -0
- package/dist/chunks/tenant-service-fj-pkXTw.cjs.map +1 -0
- package/dist/chunks/{transaction-request.builder-DrqTWcyC.cjs → transaction-request.builder-BwWmfHXm.cjs} +6 -6
- package/dist/chunks/{transaction-request.builder-DrqTWcyC.cjs.map → transaction-request.builder-BwWmfHXm.cjs.map} +1 -1
- package/dist/chunks/{transaction-request.builder-DltmruUC.js → transaction-request.builder-C1FPWmYN.js} +6 -6
- package/dist/chunks/{transaction-request.builder-DltmruUC.js.map → transaction-request.builder-C1FPWmYN.js.map} +1 -1
- package/dist/chunks/web3-chain-service-D68-0WaW.cjs +224 -0
- package/dist/chunks/web3-chain-service-D68-0WaW.cjs.map +1 -0
- package/dist/chunks/web3-chain-service-DuvxmKSj.js +221 -0
- package/dist/chunks/web3-chain-service-DuvxmKSj.js.map +1 -0
- package/dist/chunks/{explorer.utils-Cx3wrqAj.cjs → web3-manager-C_cFaMCm.cjs} +411 -144
- package/dist/chunks/web3-manager-C_cFaMCm.cjs.map +1 -0
- package/dist/chunks/{explorer.utils-BkS3k8hX.js → web3-manager-OExwBWB7.js} +412 -146
- package/dist/chunks/web3-manager-OExwBWB7.js.map +1 -0
- package/dist/core.cjs +18 -21
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +10 -12
- package/dist/core.js.map +1 -1
- package/dist/donation/index.d.ts +0 -1
- package/dist/donation/index.d.ts.map +1 -1
- package/dist/donation.cjs +48 -29
- package/dist/donation.cjs.map +1 -1
- package/dist/donation.js +50 -3
- package/dist/donation.js.map +1 -1
- package/dist/index.cjs +43 -69
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -15
- package/dist/index.js.map +1 -1
- package/dist/managers/analytics-manager.d.ts +1 -1
- package/dist/managers/index.d.ts +0 -1
- package/dist/managers/index.d.ts.map +1 -1
- package/dist/managers/web3-manager.d.ts +1 -1
- package/dist/managers/web3-manager.d.ts.map +1 -1
- package/dist/node.cjs +10 -13
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +10 -13
- package/dist/node.js.map +1 -1
- package/dist/package.json +4 -10
- package/dist/payment/index.d.ts +0 -1
- package/dist/payment/index.d.ts.map +1 -1
- package/dist/payment.cjs +5 -232
- package/dist/payment.cjs.map +1 -1
- package/dist/payment.js +3 -210
- package/dist/payment.js.map +1 -1
- package/dist/pers-sdk.d.ts +1 -13
- package/dist/pers-sdk.d.ts.map +1 -1
- package/dist/redemption/index.d.ts +0 -1
- package/dist/redemption/index.d.ts.map +1 -1
- package/dist/redemption/services/redemption-service.d.ts +1 -2
- package/dist/redemption/services/redemption-service.d.ts.map +1 -1
- package/dist/redemption.cjs +5 -360
- package/dist/redemption.cjs.map +1 -1
- package/dist/redemption.js +3 -338
- package/dist/redemption.js.map +1 -1
- package/dist/shared/interfaces/pers-shared-lib.interfaces.d.ts +15 -21
- package/dist/shared/interfaces/pers-shared-lib.interfaces.d.ts.map +1 -1
- package/dist/tenant/index.d.ts +0 -1
- package/dist/tenant/index.d.ts.map +1 -1
- package/dist/tenant.cjs +5 -184
- package/dist/tenant.cjs.map +1 -1
- package/dist/tenant.js +3 -162
- package/dist/tenant.js.map +1 -1
- package/dist/token/index.d.ts +0 -1
- package/dist/token/index.d.ts.map +1 -1
- package/dist/token.cjs +1 -25
- package/dist/token.cjs.map +1 -1
- package/dist/token.js +1 -1
- package/dist/transaction/models/transaction-request.builder.d.ts +4 -4
- package/dist/transaction/models/transaction-request.builder.d.ts.map +1 -1
- package/dist/transaction.cjs +1 -1
- package/dist/transaction.js +1 -1
- package/dist/user/index.d.ts +0 -1
- package/dist/user/index.d.ts.map +1 -1
- package/dist/user-status/index.d.ts +0 -1
- package/dist/user-status/index.d.ts.map +1 -1
- package/dist/user-status.cjs +0 -25
- package/dist/user-status.cjs.map +1 -1
- package/dist/user-status.js +0 -1
- package/dist/user-status.js.map +1 -1
- package/dist/user.cjs +209 -29
- package/dist/user.cjs.map +1 -1
- package/dist/user.js +211 -3
- package/dist/user.js.map +1 -1
- package/dist/web3/index.d.ts +1 -0
- package/dist/web3/index.d.ts.map +1 -1
- package/dist/web3-chain/index.d.ts +0 -1
- package/dist/web3-chain/index.d.ts.map +1 -1
- package/dist/web3-chain.cjs +14 -29
- package/dist/web3-chain.cjs.map +1 -1
- package/dist/web3-chain.js +16 -3
- package/dist/web3-chain.js.map +1 -1
- package/dist/web3-manager.cjs +13 -0
- package/dist/web3-manager.cjs.map +1 -0
- package/dist/web3-manager.js +7 -0
- package/dist/web3-manager.js.map +1 -0
- package/dist/web3.cjs +10 -6
- package/dist/web3.cjs.map +1 -1
- package/dist/web3.js +4 -1
- package/dist/web3.js.map +1 -1
- package/package.json +4 -10
- package/dist/chunks/analytics-service-CitlimKJ.cjs +0 -49
- package/dist/chunks/analytics-service-CitlimKJ.cjs.map +0 -1
- package/dist/chunks/analytics-service-CxyrOwel.js +0 -46
- package/dist/chunks/analytics-service-CxyrOwel.js.map +0 -1
- package/dist/chunks/campaign-service-CdEz0jpP.cjs +0 -435
- package/dist/chunks/campaign-service-CdEz0jpP.cjs.map +0 -1
- package/dist/chunks/campaign-service-DrTAqFZM.js +0 -432
- package/dist/chunks/campaign-service-DrTAqFZM.js.map +0 -1
- package/dist/chunks/donation-service--6cnTvWq.cjs +0 -54
- package/dist/chunks/donation-service--6cnTvWq.cjs.map +0 -1
- package/dist/chunks/donation-service-xiXZ2Eto.js +0 -51
- package/dist/chunks/donation-service-xiXZ2Eto.js.map +0 -1
- package/dist/chunks/explorer.utils-BkS3k8hX.js.map +0 -1
- package/dist/chunks/explorer.utils-Cx3wrqAj.cjs.map +0 -1
- package/dist/chunks/index-BtDNXaFq.js +0 -13
- package/dist/chunks/index-BtDNXaFq.js.map +0 -1
- package/dist/chunks/index-CMk3Aqkk.cjs +0 -15
- package/dist/chunks/index-CMk3Aqkk.cjs.map +0 -1
- package/dist/chunks/pers-sdk-JIExM712.js.map +0 -1
- package/dist/chunks/pers-sdk-h-uoLpBx.cjs.map +0 -1
- package/dist/chunks/user-service-BGP3SZpk.js +0 -212
- package/dist/chunks/user-service-BGP3SZpk.js.map +0 -1
- package/dist/chunks/user-service-gITOx4qj.cjs +0 -215
- package/dist/chunks/user-service-gITOx4qj.cjs.map +0 -1
- package/dist/chunks/web3-chain-service-BeBjALg2.cjs.map +0 -1
- package/dist/chunks/web3-chain-service-DKHCnHQX.js.map +0 -1
package/dist/node.js
CHANGED
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
import { j as StaticJwtAuthProvider, P as PersSDK } from './chunks/pers-sdk-
|
|
1
|
+
import { j as StaticJwtAuthProvider, P as PersSDK } from './chunks/pers-sdk-DYnIZvcx.js';
|
|
2
2
|
import { AccountOwnerType } from '@explorins/pers-shared';
|
|
3
3
|
export { AccountOwnerType } from '@explorins/pers-shared';
|
|
4
4
|
import { N as NodeHttpClientAdapter } from './chunks/node-http-client-DloDLfm9.js';
|
|
5
|
-
import './chunks/
|
|
6
|
-
import './
|
|
7
|
-
import '@explorins/web3-ts/ethers';
|
|
8
|
-
import './chunks/user-service-BGP3SZpk.js';
|
|
5
|
+
import './chunks/index-CKm_V5XE.js';
|
|
6
|
+
import './user.js';
|
|
9
7
|
import './chunks/pagination-utils-9vQ-Npkr.js';
|
|
10
8
|
import './user-status.js';
|
|
11
9
|
import './chunks/token-service-Bfj6C0yz.js';
|
|
12
|
-
import './business.js';
|
|
13
|
-
import './
|
|
14
|
-
import './redemption.js';
|
|
10
|
+
import './chunks/business-membership-service-D6vaVQTR.js';
|
|
11
|
+
import './campaign.js';
|
|
12
|
+
import './chunks/redemption-service-D-hBqh42.js';
|
|
15
13
|
import './chunks/transaction-service-CnOD3scu.js';
|
|
16
|
-
import './payment.js';
|
|
17
|
-
import './tenant.js';
|
|
18
|
-
import './
|
|
19
|
-
import './
|
|
20
|
-
import './chunks/explorer.utils-BkS3k8hX.js';
|
|
14
|
+
import './chunks/payment-service-IvM6rryM.js';
|
|
15
|
+
import './chunks/tenant-service-CsRA3O2V.js';
|
|
16
|
+
import './analytics.js';
|
|
17
|
+
import './donation.js';
|
|
21
18
|
|
|
22
19
|
/**
|
|
23
20
|
* Node.js-specific SDK utilities
|
package/dist/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sources":["../src/node.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"node.js","sources":["../src/node.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;AAkBG;AAQH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCG;AACG,SAAU,aAAa,CAAC,OAK7B,EAAA;AACC,IAAA,MAAM,UAAU,GAAG,IAAI,qBAAqB,EAAE;AAC9C,IAAA,MAAM,YAAY,GAAG,IAAI,qBAAqB,CAAC;QAC7C,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,UAAU,EAAE,OAAO,CAAC,UAAU;AAC9B,QAAA,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,gBAAgB,CAAC;AAChD,KAAA,CAAC;AAEF,IAAA,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE;AAC7B,QAAA,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,YAAY;QAChD,aAAa,EAAE,OAAO,CAAC,UAAU;QACjC;AACD,KAAA,CAAC;AACJ;;;;"}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@explorins/pers-sdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.11",
|
|
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",
|
|
@@ -122,22 +122,21 @@
|
|
|
122
122
|
"test": "jest",
|
|
123
123
|
"test:watch": "jest --watch",
|
|
124
124
|
"lint": "eslint src/**/*.ts",
|
|
125
|
-
"demo:ts": "tsc examples/server-side-demo.ts --outDir .demo-compiled --module esnext --target es2020 --moduleResolution bundler --skipLibCheck && cd examples && node ../.demo-compiled/server-side-demo.js && cd .. && rimraf .demo-compiled",
|
|
126
125
|
"prepublishOnly": "npm run clean && npm run build",
|
|
127
126
|
"publish-version": "npm run clean && npm run build && npm version patch && npm publish",
|
|
128
127
|
"publish-with-docs": "npm run clean && npm run build && npm run docs && npm version patch && npm publish"
|
|
129
128
|
},
|
|
130
129
|
"dependencies": {
|
|
131
|
-
"@explorins/
|
|
130
|
+
"@explorins/pers-shared": "^2.1.75",
|
|
131
|
+
"@explorins/web3-ts": "^0.3.77",
|
|
132
|
+
"ethers": "^6.15.0"
|
|
132
133
|
},
|
|
133
134
|
"devDependencies": {
|
|
134
|
-
"@explorins/pers-shared": "^2.1.72",
|
|
135
135
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
136
136
|
"@rollup/plugin-json": "^6.1.0",
|
|
137
137
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
138
138
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
139
139
|
"@types/jest": "^29.5.12",
|
|
140
|
-
"@types/node": "^25.2.1",
|
|
141
140
|
"jest": "^29.7.0",
|
|
142
141
|
"rimraf": "^5.0.5",
|
|
143
142
|
"rollup": "^4.50.0",
|
|
@@ -146,11 +145,6 @@
|
|
|
146
145
|
"typedoc-plugin-markdown": "^3.17.1",
|
|
147
146
|
"typescript": "^5.4.5"
|
|
148
147
|
},
|
|
149
|
-
"peerDependencies": {
|
|
150
|
-
"@explorins/pers-shared": "*",
|
|
151
|
-
"ethers": "^6.15.0"
|
|
152
|
-
},
|
|
153
|
-
"peerDependenciesMeta": {},
|
|
154
148
|
"publishConfig": {
|
|
155
149
|
"access": "public",
|
|
156
150
|
"registry": "https://registry.npmjs.org/"
|
package/dist/payment/index.d.ts
CHANGED
|
@@ -10,6 +10,5 @@
|
|
|
10
10
|
export { PaymentApi } from './api/payment-api';
|
|
11
11
|
export { PaymentService } from './services/payment-service';
|
|
12
12
|
export * from './models';
|
|
13
|
-
export * from '../shared/interfaces/pers-shared-lib.interfaces';
|
|
14
13
|
export * from './models';
|
|
15
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/payment/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAG5D,cAAc,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/payment/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAG5D,cAAc,UAAU,CAAC;AAIzB,cAAc,UAAU,CAAC"}
|
package/dist/payment.cjs
CHANGED
|
@@ -1,238 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
3
|
+
var paymentService = require('./chunks/payment-service-Bkw7ZXev.cjs');
|
|
4
|
+
require('@explorins/pers-shared');
|
|
5
|
+
require('./chunks/pagination-utils-B2jRHMSO.cjs');
|
|
5
6
|
|
|
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
|
-
}
|
|
154
7
|
|
|
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
|
-
}
|
|
211
8
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
get: function () { return persShared.AccountOwnerType; }
|
|
215
|
-
});
|
|
216
|
-
Object.defineProperty(exports, "ApiKeyType", {
|
|
217
|
-
enumerable: true,
|
|
218
|
-
get: function () { return persShared.ApiKeyType; }
|
|
219
|
-
});
|
|
220
|
-
Object.defineProperty(exports, "MEMBERSHIP_ROLE_HIERARCHY", {
|
|
221
|
-
enumerable: true,
|
|
222
|
-
get: function () { return persShared.MEMBERSHIP_ROLE_HIERARCHY; }
|
|
223
|
-
});
|
|
224
|
-
Object.defineProperty(exports, "MembershipRole", {
|
|
225
|
-
enumerable: true,
|
|
226
|
-
get: function () { return persShared.MembershipRole; }
|
|
227
|
-
});
|
|
228
|
-
Object.defineProperty(exports, "NativeTokenTypes", {
|
|
229
|
-
enumerable: true,
|
|
230
|
-
get: function () { return persShared.NativeTokenTypes; }
|
|
231
|
-
});
|
|
232
|
-
Object.defineProperty(exports, "hasMinimumRole", {
|
|
233
|
-
enumerable: true,
|
|
234
|
-
get: function () { return persShared.hasMinimumRole; }
|
|
235
|
-
});
|
|
236
|
-
exports.PaymentApi = PurchaseApi;
|
|
237
|
-
exports.PaymentService = PaymentService;
|
|
9
|
+
exports.PaymentApi = paymentService.PurchaseApi;
|
|
10
|
+
exports.PaymentService = paymentService.PaymentService;
|
|
238
11
|
//# sourceMappingURL=payment.cjs.map
|
package/dist/payment.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.cjs","sources":[
|
|
1
|
+
{"version":3,"file":"payment.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
package/dist/payment.js
CHANGED
|
@@ -1,211 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import
|
|
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 };
|
|
1
|
+
export { P as PaymentApi, a as PaymentService } from './chunks/payment-service-IvM6rryM.js';
|
|
2
|
+
import '@explorins/pers-shared';
|
|
3
|
+
import './chunks/pagination-utils-9vQ-Npkr.js';
|
|
211
4
|
//# sourceMappingURL=payment.js.map
|
package/dist/payment.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.js","sources":[
|
|
1
|
+
{"version":3,"file":"payment.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/pers-sdk.d.ts
CHANGED
|
@@ -168,7 +168,7 @@ import { HttpClient } from './core/abstractions/http-client';
|
|
|
168
168
|
import { PersConfig } from './core/pers-config';
|
|
169
169
|
import { PersApiClient } from './core/pers-api-client';
|
|
170
170
|
import { PersEventEmitter } from './core/events';
|
|
171
|
-
import { AuthManager, UserManager, UserStatusManager, TokenManager, BusinessManager, CampaignManager, RedemptionManager, TransactionManager, PurchaseManager, FileManager, TenantManager, ApiKeyManager, AnalyticsManager, DonationManager
|
|
171
|
+
import { AuthManager, UserManager, UserStatusManager, TokenManager, BusinessManager, CampaignManager, RedemptionManager, TransactionManager, PurchaseManager, FileManager, TenantManager, ApiKeyManager, AnalyticsManager, DonationManager } from './managers';
|
|
172
172
|
/**
|
|
173
173
|
* PERS SDK - Main SDK class with domain managers
|
|
174
174
|
*
|
|
@@ -243,7 +243,6 @@ export declare class PersSDK {
|
|
|
243
243
|
private _apiKeys;
|
|
244
244
|
private _analytics;
|
|
245
245
|
private _donations;
|
|
246
|
-
private _web3;
|
|
247
246
|
/**
|
|
248
247
|
* Creates a new PERS SDK instance
|
|
249
248
|
*
|
|
@@ -521,17 +520,6 @@ export declare class PersSDK {
|
|
|
521
520
|
* ```
|
|
522
521
|
*/
|
|
523
522
|
get donations(): DonationManager;
|
|
524
|
-
/**
|
|
525
|
-
* Web3 manager - High-level blockchain operations
|
|
526
|
-
*
|
|
527
|
-
* @example
|
|
528
|
-
* ```typescript
|
|
529
|
-
* const balance = await sdk.web3.getTokenBalance(request);
|
|
530
|
-
* const metadata = await sdk.web3.getTokenMetadata(request);
|
|
531
|
-
* const collection = await sdk.web3.getTokenCollection(request);
|
|
532
|
-
* ```
|
|
533
|
-
*/
|
|
534
|
-
get web3(): Web3Manager;
|
|
535
523
|
/**
|
|
536
524
|
* Gets the API client for direct PERS API requests
|
|
537
525
|
*
|
package/dist/pers-sdk.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pers-sdk.d.ts","sourceRoot":"","sources":["../src/pers-sdk.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6JG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;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;;;;;;;;;OASG;IACH,IAAI,OAAO,IAAI,aAAa,CAE3B;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,IAAI,OAAO,IAAI,aAAa,CAE3B;IAED;;;;;;;OAOG;IACH,IAAI,SAAS,IAAI,gBAAgB,CAEhC;IAED;;;;;;;OAOG;IACH,IAAI,SAAS,IAAI,eAAe,CAE/B;IAED;;;;;;;;;;;;;;OAcG;IACH,GAAG,IAAI,aAAa;IAIpB;;;;OAIG;IACH,YAAY,IAAI,OAAO;IAIvB;;;;;;;OAOG;IACH,aAAa,IAAI,OAAO;CAGzB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,UAAU,GACjB,OAAO,CAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/redemption/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/redemption/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PaginatedResponseDTO } from '@explorins/pers-shared';
|
|
2
2
|
import { RedemptionApi } from '../api/redemption-api';
|
|
3
|
-
import { TokenUnitCreateRequestDTO } from '../../
|
|
4
|
-
import { RedemptionDTO, RedemptionCreateRequestDTO, RedemptionTypeDTO, RedemptionRedeemDTO, RedemptionRedeemRequestResponseDTO } from '../../shared/interfaces/pers-shared-lib.interfaces';
|
|
3
|
+
import { TokenUnitCreateRequestDTO, RedemptionDTO, RedemptionCreateRequestDTO, RedemptionTypeDTO, RedemptionRedeemDTO, RedemptionRedeemRequestResponseDTO } from '../../shared/interfaces/pers-shared-lib.interfaces';
|
|
5
4
|
import { PaginationOptions } from '../../shared/utils/pagination-utils';
|
|
6
5
|
/**
|
|
7
6
|
* Platform-Agnostic Redemption Service
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redemption-service.d.ts","sourceRoot":"","sources":["../../../src/redemption/services/redemption-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"redemption-service.d.ts","sourceRoot":"","sources":["../../../src/redemption/services/redemption-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EACL,yBAAyB,EACzB,aAAa,EACb,0BAA0B,EAC1B,iBAAiB,EACjB,mBAAmB,EACnB,kCAAkC,EACnC,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE;;;;;;;GAOG;AACH,qBAAa,iBAAiB;IAChB,OAAO,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAMhD;;;;OAIG;IACG,cAAc,CAAC,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAIzH;;OAEG;IACG,oBAAoB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAItD;;OAEG;IACG,kBAAkB,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;IAQv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