@riocrypto/common 1.0.841 → 1.0.843

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.
@@ -25,6 +25,8 @@ import { QuoteInput } from "../types/quote-input";
25
25
  import { OrderQuery } from "../types/order-query";
26
26
  import { UserQuery } from "../types/user-query";
27
27
  import { BankAccountQuery } from "../types/bank-account-query";
28
+ import { AdminTask } from "../types/admin-task";
29
+ import { AdminTaskType } from "../types/admin-task-type";
28
30
  export declare class RioAdminClient {
29
31
  private axios;
30
32
  constructor(axios: AxiosStatic | AxiosInstance);
@@ -63,10 +65,11 @@ export declare class RioAdminClient {
63
65
  updateRioSettings(update: RioSettingsUpdate): Promise<void>;
64
66
  confirmBankPayment(orderId: string, amountFiat?: number): Promise<any>;
65
67
  confirmBankPayout(orderId: string): Promise<any>;
66
- getUser(): Promise<User>;
68
+ getUser(userId: string): Promise<User>;
67
69
  getAdmin(): Promise<Admin>;
68
70
  acceptAdminTasks(): Promise<Admin>;
69
71
  stopAdminTasks(): Promise<Admin>;
72
+ getAdminTasks(taskTypes: AdminTaskType[]): Promise<AdminTask[]>;
70
73
  createUser(user: UserInput): Promise<User>;
71
74
  getBankPayment(orderId: string): Promise<BankPayment>;
72
75
  verifyBankPayment(orderId: string): Promise<any>;
@@ -170,9 +170,9 @@ class RioAdminClient {
170
170
  return data;
171
171
  });
172
172
  }
173
- getUser() {
173
+ getUser(userId) {
174
174
  return __awaiter(this, void 0, void 0, function* () {
175
- const { data } = yield this.axios.get("/api/users");
175
+ const { data } = yield this.axios.get(`/api/users/${userId}`);
176
176
  return data;
177
177
  });
178
178
  }
@@ -194,6 +194,14 @@ class RioAdminClient {
194
194
  return data;
195
195
  });
196
196
  }
197
+ getAdminTasks(taskTypes) {
198
+ return __awaiter(this, void 0, void 0, function* () {
199
+ const { data } = yield this.axios.get("/api/admin/tasks", {
200
+ params: { taskTypes },
201
+ });
202
+ return data;
203
+ });
204
+ }
197
205
  createUser(user) {
198
206
  return __awaiter(this, void 0, void 0, function* () {
199
207
  const { data } = yield this.axios.post("/api/users", user);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.841",
3
+ "version": "1.0.843",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",