@nimee/api-clients 1.0.0 → 1.0.1
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/dist/src/account.d.ts +11 -0
- package/dist/src/account.js +44 -0
- package/dist/src/account.js.map +1 -0
- package/dist/src/eventOrder.d.ts +7 -0
- package/dist/src/eventOrder.js +33 -0
- package/dist/src/eventOrder.js.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +5 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/user.d.ts +0 -4
- package/dist/src/user.js +0 -10
- package/dist/src/user.js.map +1 -1
- package/package.json +2 -1
- package/src/account.ts +25 -0
- package/src/eventOrder.ts +19 -0
- package/src/index.ts +2 -0
- package/src/user.ts +0 -9
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IPaymeCreateSellerWebhookPayload } from "@nimee/shared-types";
|
|
2
|
+
export declare class AccountClient {
|
|
3
|
+
updateAccountByCreateSellerWebhook(params: {
|
|
4
|
+
jwt: string;
|
|
5
|
+
webhookData: IPaymeCreateSellerWebhookPayload;
|
|
6
|
+
}): Promise<any>;
|
|
7
|
+
getAccountById(params: {
|
|
8
|
+
jwt: string;
|
|
9
|
+
accountId: string;
|
|
10
|
+
}): Promise<any>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AccountClient = void 0;
|
|
16
|
+
const axios_1 = __importDefault(require("axios"));
|
|
17
|
+
const error_handler_1 = require("@nimee/error-handler");
|
|
18
|
+
const port = process.env.USER_PORT;
|
|
19
|
+
const basePath = process.env.IS_LOCAL === "true" ? `http://localhost:${port}` : "http://user";
|
|
20
|
+
const accountUrl = `${basePath}/user/account`;
|
|
21
|
+
class AccountClient {
|
|
22
|
+
updateAccountByCreateSellerWebhook(params) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const { webhookData, jwt } = params;
|
|
25
|
+
if (!jwt || !webhookData) {
|
|
26
|
+
throw new error_handler_1.CustomError("param_are_missing_in_updateAccountByCreateSellerWebhook", 400, `webhookData is: ${webhookData}`);
|
|
27
|
+
}
|
|
28
|
+
const response = yield axios_1.default.post(`${accountUrl}/updateAccountByCreateSellerWebhook`, { webhookData }, { headers: { jwt } });
|
|
29
|
+
return response === null || response === void 0 ? void 0 : response.data;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
getAccountById(params) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
const { accountId, jwt } = params;
|
|
35
|
+
if (!jwt || !accountId) {
|
|
36
|
+
throw new error_handler_1.CustomError("param_are_missing_in_updateAccountByCreateSellerWebhook", 400, `webhookData is: ${accountId}`);
|
|
37
|
+
}
|
|
38
|
+
const response = yield axios_1.default.get(`${accountUrl}/${accountId}`, { headers: { jwt } });
|
|
39
|
+
return response === null || response === void 0 ? void 0 : response.data;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.AccountClient = AccountClient;
|
|
44
|
+
//# sourceMappingURL=account.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../src/account.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,wDAAmD;AAEnD,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;AACnC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;AAC9F,MAAM,UAAU,GAAG,GAAG,QAAQ,eAAe,CAAC;AAE9C,MAAa,aAAa;IAClB,kCAAkC,CAAC,MAAsE;;YAC7G,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;YACpC,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE;gBACxB,MAAM,IAAI,2BAAW,CAAC,yDAAyD,EAAE,GAAG,EAAE,mBAAmB,WAAW,EAAE,CAAC,CAAC;aACzH;YACD,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,IAAI,CAAC,GAAG,UAAU,qCAAqC,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;YAC7H,OAAO,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,CAAC;QACxB,CAAC;KAAA;IACK,cAAc,CAAC,MAA0C;;YAC7D,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;YAClC,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE;gBACtB,MAAM,IAAI,2BAAW,CAAC,yDAAyD,EAAE,GAAG,EAAE,mBAAmB,SAAS,EAAE,CAAC,CAAC;aACvH;YACD,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,GAAG,UAAU,IAAI,SAAS,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;YACrF,OAAO,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,CAAC;QACxB,CAAC;KAAA;CACF;AAjBD,sCAiBC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.EventOrderClient = void 0;
|
|
16
|
+
const axios_1 = __importDefault(require("axios"));
|
|
17
|
+
const port = process.env.EVENT_PORT;
|
|
18
|
+
const basePath = process.env.IS_LOCAL === "true" ? `http://localhost:${port}` : "http://event";
|
|
19
|
+
const eventOrderUrl = `${basePath}/event/event-order`;
|
|
20
|
+
class EventOrderClient {
|
|
21
|
+
updateWithNewCharge(params) {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const { token, charge } = params;
|
|
24
|
+
const response = yield axios_1.default.post(`${eventOrderUrl}/updateWithNewCharge`, { charge }, {
|
|
25
|
+
headers: { jwt: `${token}` },
|
|
26
|
+
});
|
|
27
|
+
return response === null || response === void 0 ? void 0 : response.data;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.EventOrderClient = EventOrderClient;
|
|
32
|
+
// POST request to 'https://.co/payment/payme/webhook' ({"payme_status":"success","status_error_code":0,"status_code":0,"seller_payme_id":"MPL16720-72349IAE-FRITPXY5-TFLDUEWF","seller_created":"2022-12-26 18:32:29","seller_first_name":"Ron","seller_last_name":"Dahan","seller_social_id":"205569163","seller_birthdate":"1994-07-01","seller_date_of_birth":"1994-07-01","seller_gender":0,"seller_email":"roncho1794@gmail.com","seller_contact_email":"roncho1794@gmail.com","seller_phone":"+972542323517","seller_contact_phone":"+972542323517","seller_address_city":"Tel Aviv","seller_address_street":"Tel Aviv","seller_address_street_number":"12","seller_address_country":"IL","seller_inc":0,"seller_inc_code":"12345","seller_merchant_name":"Ronen","seller_site_url":"www.no.co.il","seller_custom_details":"No existing Isracard MID","seller_active":true,"seller_approved":false,"seller_market_fee":0,"seller_currencies":,"fee_default_processing_fee":"1.50","fee_default_processing_charge":"0.100000000000000000","fee_default_discount_fee":"0.50","fee_foreign_processing_fee":"2.95","fee_foreign_processing_charge":"0.100000000000000000","fee_forcurr_processing_charge":"0.100000000000000000","seller_public_key":{"uuid":"b40a5251-9907-4db1-8f26-c015dd9466df","description":"PayMe-Public-Key","is_active":true},"notify_type":"seller-create"}) with headers () T:6801.5247 M:38.50MB
|
|
33
|
+
//# sourceMappingURL=eventOrder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventOrder.js","sourceRoot":"","sources":["../../src/eventOrder.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;AACpC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC;AAC/F,MAAM,aAAa,GAAG,GAAG,QAAQ,oBAAoB,CAAC;AAEtD,MAAa,gBAAgB;IACrB,mBAAmB,CAAC,MAA+C;;YACvE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;YACjC,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,IAAI,CAC/B,GAAG,aAAa,sBAAsB,EACtC,EAAE,MAAM,EAAE,EACV;gBACE,OAAO,EAAE,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE;aAC7B,CACF,CAAC;YACF,OAAO,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,CAAC;QACxB,CAAC;KAAA;CACF;AAZD,4CAYC;AACD,g2CAAg2C"}
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserEventClient = exports.TicketClient = exports.EventClient = exports.UserClient = void 0;
|
|
3
|
+
exports.EventOrderClient = exports.AccountClient = exports.UserEventClient = exports.TicketClient = exports.EventClient = exports.UserClient = void 0;
|
|
4
4
|
var user_1 = require("./user");
|
|
5
5
|
Object.defineProperty(exports, "UserClient", { enumerable: true, get: function () { return user_1.UserClient; } });
|
|
6
6
|
var event_1 = require("./event");
|
|
@@ -9,4 +9,8 @@ var ticket_1 = require("./ticket");
|
|
|
9
9
|
Object.defineProperty(exports, "TicketClient", { enumerable: true, get: function () { return ticket_1.TicketClient; } });
|
|
10
10
|
var userEvent_1 = require("./userEvent");
|
|
11
11
|
Object.defineProperty(exports, "UserEventClient", { enumerable: true, get: function () { return userEvent_1.UserEventClient; } });
|
|
12
|
+
var account_1 = require("./account");
|
|
13
|
+
Object.defineProperty(exports, "AccountClient", { enumerable: true, get: function () { return account_1.AccountClient; } });
|
|
14
|
+
var eventOrder_1 = require("./eventOrder");
|
|
15
|
+
Object.defineProperty(exports, "EventOrderClient", { enumerable: true, get: function () { return eventOrder_1.EventOrderClient; } });
|
|
12
16
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,+BAAoC;AAA3B,kGAAA,UAAU,OAAA;AACnB,iCAAsC;AAA7B,oGAAA,WAAW,OAAA;AACpB,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;AACrB,yCAA8C;AAArC,4GAAA,eAAe,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,+BAAoC;AAA3B,kGAAA,UAAU,OAAA;AACnB,iCAAsC;AAA7B,oGAAA,WAAW,OAAA;AACpB,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;AACrB,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AACxB,qCAA0C;AAAjC,wGAAA,aAAa,OAAA;AACtB,2CAAgD;AAAvC,8GAAA,gBAAgB,OAAA"}
|
package/dist/src/user.d.ts
CHANGED
package/dist/src/user.js
CHANGED
|
@@ -24,16 +24,6 @@ class UserClient {
|
|
|
24
24
|
return yield axios_1.default.get(`${userUrl}/verifyToken`, { headers: { jwt: `${token}` } });
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
getAccountById(params) {
|
|
28
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
const { accountId, jwt } = params;
|
|
30
|
-
if (!jwt || !accountId) {
|
|
31
|
-
throw new Error("jwt, accountId are required");
|
|
32
|
-
}
|
|
33
|
-
const response = yield axios_1.default.get(`${accountUrl}/${accountId}`, { headers: { jwt } });
|
|
34
|
-
return response === null || response === void 0 ? void 0 : response.data;
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
27
|
}
|
|
38
28
|
exports.UserClient = UserClient;
|
|
39
29
|
//# sourceMappingURL=user.js.map
|
package/dist/src/user.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/user.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;AACnC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;AAC9F,MAAM,OAAO,GAAG,GAAG,QAAQ,OAAO,CAAC;AACnC,MAAM,UAAU,GAAG,GAAG,QAAQ,eAAe,CAAC;AAE9C,MAAa,UAAU;IACf,WAAW,CAAC,KAAa;;YAC7B,OAAO,MAAM,eAAK,CAAC,GAAG,CAAC,GAAG,OAAO,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;QACrF,CAAC;KAAA;
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/user.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;AACnC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;AAC9F,MAAM,OAAO,GAAG,GAAG,QAAQ,OAAO,CAAC;AACnC,MAAM,UAAU,GAAG,GAAG,QAAQ,eAAe,CAAC;AAE9C,MAAa,UAAU;IACf,WAAW,CAAC,KAAa;;YAC7B,OAAO,MAAM,eAAK,CAAC,GAAG,CAAC,GAAG,OAAO,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;QACrF,CAAC;KAAA;CACF;AAJD,gCAIC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nimee/api-clients",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "communication http for each ms",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"author": "dan goldberg",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"types": "dist/src/index.d.ts",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@nimee/logger": "1.0.21",
|
|
30
|
+
"@nimee/shared-types": "1.0.35",
|
|
30
31
|
"axios": "1.2.1"
|
|
31
32
|
}
|
|
32
33
|
}
|
package/src/account.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import { CustomError } from "@nimee/error-handler";
|
|
3
|
+
import { IPaymeCreateSellerWebhookPayload } from "@nimee/shared-types";
|
|
4
|
+
const port = process.env.USER_PORT;
|
|
5
|
+
const basePath = process.env.IS_LOCAL === "true" ? `http://localhost:${port}` : "http://user";
|
|
6
|
+
const accountUrl = `${basePath}/user/account`;
|
|
7
|
+
|
|
8
|
+
export class AccountClient {
|
|
9
|
+
async updateAccountByCreateSellerWebhook(params: { jwt: string; webhookData: IPaymeCreateSellerWebhookPayload }) {
|
|
10
|
+
const { webhookData, jwt } = params;
|
|
11
|
+
if (!jwt || !webhookData) {
|
|
12
|
+
throw new CustomError("param_are_missing_in_updateAccountByCreateSellerWebhook", 400, `webhookData is: ${webhookData}`);
|
|
13
|
+
}
|
|
14
|
+
const response = await axios.post(`${accountUrl}/updateAccountByCreateSellerWebhook`, { webhookData }, { headers: { jwt } });
|
|
15
|
+
return response?.data;
|
|
16
|
+
}
|
|
17
|
+
async getAccountById(params: { jwt: string; accountId: string }) {
|
|
18
|
+
const { accountId, jwt } = params;
|
|
19
|
+
if (!jwt || !accountId) {
|
|
20
|
+
throw new CustomError("param_are_missing_in_updateAccountByCreateSellerWebhook", 400, `webhookData is: ${accountId}`);
|
|
21
|
+
}
|
|
22
|
+
const response = await axios.get(`${accountUrl}/${accountId}`, { headers: { jwt } });
|
|
23
|
+
return response?.data;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
const port = process.env.EVENT_PORT;
|
|
3
|
+
const basePath = process.env.IS_LOCAL === "true" ? `http://localhost:${port}` : "http://event";
|
|
4
|
+
const eventOrderUrl = `${basePath}/event/event-order`;
|
|
5
|
+
import { IChargeModel } from "@nimee/shared-types";
|
|
6
|
+
export class EventOrderClient {
|
|
7
|
+
async updateWithNewCharge(params: { token: string; charge: IChargeModel }) {
|
|
8
|
+
const { token, charge } = params;
|
|
9
|
+
const response = await axios.post(
|
|
10
|
+
`${eventOrderUrl}/updateWithNewCharge`,
|
|
11
|
+
{ charge },
|
|
12
|
+
{
|
|
13
|
+
headers: { jwt: `${token}` },
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
return response?.data;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
// POST request to 'https://.co/payment/payme/webhook' ({"payme_status":"success","status_error_code":0,"status_code":0,"seller_payme_id":"MPL16720-72349IAE-FRITPXY5-TFLDUEWF","seller_created":"2022-12-26 18:32:29","seller_first_name":"Ron","seller_last_name":"Dahan","seller_social_id":"205569163","seller_birthdate":"1994-07-01","seller_date_of_birth":"1994-07-01","seller_gender":0,"seller_email":"roncho1794@gmail.com","seller_contact_email":"roncho1794@gmail.com","seller_phone":"+972542323517","seller_contact_phone":"+972542323517","seller_address_city":"Tel Aviv","seller_address_street":"Tel Aviv","seller_address_street_number":"12","seller_address_country":"IL","seller_inc":0,"seller_inc_code":"12345","seller_merchant_name":"Ronen","seller_site_url":"www.no.co.il","seller_custom_details":"No existing Isracard MID","seller_active":true,"seller_approved":false,"seller_market_fee":0,"seller_currencies":,"fee_default_processing_fee":"1.50","fee_default_processing_charge":"0.100000000000000000","fee_default_discount_fee":"0.50","fee_foreign_processing_fee":"2.95","fee_foreign_processing_charge":"0.100000000000000000","fee_forcurr_processing_charge":"0.100000000000000000","seller_public_key":{"uuid":"b40a5251-9907-4db1-8f26-c015dd9466df","description":"PayMe-Public-Key","is_active":true},"notify_type":"seller-create"}) with headers () T:6801.5247 M:38.50MB
|
package/src/index.ts
CHANGED
package/src/user.ts
CHANGED
|
@@ -8,13 +8,4 @@ export class UserClient {
|
|
|
8
8
|
async verifyToken(token: string) {
|
|
9
9
|
return await axios.get(`${userUrl}/verifyToken`, { headers: { jwt: `${token}` } });
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
async getAccountById(params: { jwt: string; accountId: string }) {
|
|
13
|
-
const { accountId, jwt } = params;
|
|
14
|
-
if (!jwt || !accountId) {
|
|
15
|
-
throw new Error("jwt, accountId are required");
|
|
16
|
-
}
|
|
17
|
-
const response = await axios.get(`${accountUrl}/${accountId}`, { headers: { jwt } });
|
|
18
|
-
return response?.data;
|
|
19
|
-
}
|
|
20
11
|
}
|