@riocrypto/common 1.0.837 → 1.0.839

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.
@@ -0,0 +1,6 @@
1
+ import { AdminTaskType } from "../types/admin-task-type";
2
+ export declare class AdminTaskTypeClass {
3
+ private key;
4
+ constructor(key: AdminTaskType);
5
+ getTaskLabel(): "ERR" | "Confirm Bank Transfer Receipt" | "Exchange to USD" | "Fix Exchange Rate to USD" | "Register Bank Account" | "Initiate Bank Transfer" | "Review KYX";
6
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminTaskTypeClass = void 0;
4
+ const admin_task_type_1 = require("../types/admin-task-type");
5
+ class AdminTaskTypeClass {
6
+ constructor(key) {
7
+ this.key = key;
8
+ }
9
+ getTaskLabel() {
10
+ if (this.key === admin_task_type_1.AdminTaskType.ConfirmBankTransferReceipt) {
11
+ return "Confirm Bank Transfer Receipt";
12
+ }
13
+ else if (this.key === admin_task_type_1.AdminTaskType.ExchangeToUSD) {
14
+ return "Exchange to USD";
15
+ }
16
+ else if (this.key === admin_task_type_1.AdminTaskType.FixExchangeRateToUSD) {
17
+ return "Fix Exchange Rate to USD";
18
+ }
19
+ else if (this.key === admin_task_type_1.AdminTaskType.RegisterBankAccount) {
20
+ return "Register Bank Account";
21
+ }
22
+ else if (this.key === admin_task_type_1.AdminTaskType.InitiateBankTransfer) {
23
+ return "Initiate Bank Transfer";
24
+ }
25
+ else if (this.key === admin_task_type_1.AdminTaskType.ReviewKYC) {
26
+ return "Review KYX";
27
+ }
28
+ else
29
+ return "ERR";
30
+ }
31
+ }
32
+ exports.AdminTaskTypeClass = AdminTaskTypeClass;
@@ -65,6 +65,8 @@ export declare class RioAdminClient {
65
65
  confirmBankPayout(orderId: string): Promise<any>;
66
66
  getUser(): Promise<User>;
67
67
  getAdmin(): Promise<Admin>;
68
+ acceptAdminTasks(): Promise<Admin>;
69
+ stopAdminTasks(): Promise<Admin>;
68
70
  createUser(user: UserInput): Promise<User>;
69
71
  getBankPayment(orderId: string): Promise<BankPayment>;
70
72
  verifyBankPayment(orderId: string): Promise<any>;
@@ -182,6 +182,18 @@ class RioAdminClient {
182
182
  return data;
183
183
  });
184
184
  }
185
+ acceptAdminTasks() {
186
+ return __awaiter(this, void 0, void 0, function* () {
187
+ const { data } = yield this.axios.post("/api/admin/tasks/accept");
188
+ return data;
189
+ });
190
+ }
191
+ stopAdminTasks() {
192
+ return __awaiter(this, void 0, void 0, function* () {
193
+ const { data } = yield this.axios.post("/api/admin/tasks/stop");
194
+ return data;
195
+ });
196
+ }
185
197
  createUser(user) {
186
198
  return __awaiter(this, void 0, void 0, function* () {
187
199
  const { data } = yield this.axios.post("/api/users", user);
package/build/index.d.ts CHANGED
@@ -166,6 +166,7 @@ export * from "./classes/PayoutMethodAsset";
166
166
  export * from "./classes/USStateAsset";
167
167
  export * from "./classes/WyrePaymentMethodAsset";
168
168
  export * from "./classes/SecurityQuestionClass";
169
+ export * from "./classes/AdminTaskTypeClass";
169
170
  export * from "./helpers/get-user-from-client-helper";
170
171
  export * from "./helpers/validate-address";
171
172
  export * from "./helpers/round-down-to-two-decimal-places";
package/build/index.js CHANGED
@@ -182,6 +182,7 @@ __exportStar(require("./classes/PayoutMethodAsset"), exports);
182
182
  __exportStar(require("./classes/USStateAsset"), exports);
183
183
  __exportStar(require("./classes/WyrePaymentMethodAsset"), exports);
184
184
  __exportStar(require("./classes/SecurityQuestionClass"), exports);
185
+ __exportStar(require("./classes/AdminTaskTypeClass"), exports);
185
186
  __exportStar(require("./helpers/get-user-from-client-helper"), exports);
186
187
  __exportStar(require("./helpers/validate-address"), exports);
187
188
  __exportStar(require("./helpers/round-down-to-two-decimal-places"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.837",
3
+ "version": "1.0.839",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",