@riocrypto/common 1.0.1336 → 1.0.1338

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.
@@ -1,5 +1,4 @@
1
1
  import { AxiosInstance, AxiosStatic } from "axios";
2
- import { Admin } from "../types/admin";
3
2
  import { Auth } from "../types/auth";
4
3
  import { AuthUpdate } from "../types/auth-update";
5
4
  import { BankPayout } from "../types/bank-payout";
@@ -42,6 +41,7 @@ import { UBOInput } from "../types/UBO-input";
42
41
  import { UBO } from "../types/UBO";
43
42
  import { UBOUpdate } from "../types/UBO-update";
44
43
  import { IdentityVerificationType } from "../types/IdentityVerificationType";
44
+ import { AdminAuth } from "../types/admin-auth";
45
45
  export declare class RioAdminClient {
46
46
  private axios;
47
47
  constructor(axios: AxiosStatic | AxiosInstance);
@@ -89,11 +89,11 @@ export declare class RioAdminClient {
89
89
  sendVerificationEmail(type: IdentityVerificationType, id: string, country: Country): Promise<void>;
90
90
  sendBridgeOnboardingEmail(userId: string): Promise<void>;
91
91
  createUBO(user: UBOInput): Promise<UBO>;
92
- updateAdmin(update: {
92
+ updateAdminAuth(update: {
93
93
  email?: string;
94
94
  password?: string;
95
95
  newPassword?: string;
96
- }): Promise<Admin>;
96
+ }): Promise<AdminAuth>;
97
97
  getBridgeOnboardingLinks(userId: string): Promise<{
98
98
  tosLink: string;
99
99
  kycLink: string;
@@ -115,12 +115,11 @@ export declare class RioAdminClient {
115
115
  confirmBankPayout(orderId: string): Promise<any>;
116
116
  confirmLiquiditySourced(orderId: string): Promise<any>;
117
117
  getUser(userId: string): Promise<User>;
118
- getAdmin(): Promise<Admin>;
119
- acceptAdminTasks(adminId?: string): Promise<Admin>;
118
+ getAdmin(): Promise<AdminAuth>;
119
+ acceptAdminTasks(adminId?: string): Promise<AdminAuth>;
120
120
  grantAdminAccessToUser(userId?: string): Promise<void>;
121
- stopAdminTasks(adminId?: string): Promise<Admin>;
121
+ stopAdminTasks(adminId?: string): Promise<AdminAuth>;
122
122
  getAdminTasks(taskTypes?: AdminTaskType[]): Promise<AdminTask[]>;
123
- getAdmins(): Promise<Admin[]>;
124
123
  markAdminTaskComplete(id: string): Promise<AdminTask>;
125
124
  createUser(user: UserInput): Promise<User>;
126
125
  getBankPayment(orderId: string): Promise<BankPayment>;
@@ -236,7 +236,7 @@ class RioAdminClient {
236
236
  return data;
237
237
  });
238
238
  }
239
- updateAdmin(update) {
239
+ updateAdminAuth(update) {
240
240
  return __awaiter(this, void 0, void 0, function* () {
241
241
  const { data } = yield this.axios.patch(`/api/auth/admin`, update);
242
242
  return data;
@@ -321,7 +321,7 @@ class RioAdminClient {
321
321
  }
322
322
  getAdmin() {
323
323
  return __awaiter(this, void 0, void 0, function* () {
324
- const { data } = yield this.axios.get("/api/admin");
324
+ const { data } = yield this.axios.get("/api/auth/admin");
325
325
  return data;
326
326
  });
327
327
  }
@@ -355,12 +355,6 @@ class RioAdminClient {
355
355
  return data;
356
356
  });
357
357
  }
358
- getAdmins() {
359
- return __awaiter(this, void 0, void 0, function* () {
360
- const { data } = yield this.axios.get("/api/admin/all");
361
- return data;
362
- });
363
- }
364
358
  markAdminTaskComplete(id) {
365
359
  return __awaiter(this, void 0, void 0, function* () {
366
360
  const { data } = yield this.axios.patch(`/api/admin/tasks/${id}/complete`);
package/build/index.d.ts CHANGED
@@ -152,7 +152,6 @@ export * from "./types/fees";
152
152
  export * from "./types/user-update";
153
153
  export * from "./types/onboarding-status";
154
154
  export * from "./types/dlocal-payment-method";
155
- export * from "./types/admin";
156
155
  export * from "./types/users-stats";
157
156
  export * from "./types/user-attribute";
158
157
  export * from "./types/security-question";
package/build/index.js CHANGED
@@ -168,7 +168,6 @@ __exportStar(require("./types/fees"), exports);
168
168
  __exportStar(require("./types/user-update"), exports);
169
169
  __exportStar(require("./types/onboarding-status"), exports);
170
170
  __exportStar(require("./types/dlocal-payment-method"), exports);
171
- __exportStar(require("./types/admin"), exports);
172
171
  __exportStar(require("./types/users-stats"), exports);
173
172
  __exportStar(require("./types/user-attribute"), exports);
174
173
  __exportStar(require("./types/security-question"), exports);
@@ -1,9 +1,19 @@
1
+ import { AdminRole } from "./admin-role";
2
+ import { AdminTaskType } from "./admin-task-type";
1
3
  import { APIKey } from "./api-key";
2
4
  export interface AdminAuth {
3
5
  id: string;
6
+ password: string;
7
+ name: string;
4
8
  email: string;
9
+ slackWebhookUrl: string;
10
+ acceptingTasks?: boolean;
11
+ assignedTaskTypes: AdminTaskType[];
12
+ privileges: string[];
13
+ userAuthId?: string;
14
+ role: AdminRole;
5
15
  previousPasswords?: string[];
16
+ authenticatorSecret?: string;
6
17
  apiKeys?: APIKey[];
7
18
  isDisabled?: boolean;
8
- authenticatorSecret?: string;
9
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1336",
3
+ "version": "1.0.1338",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -1,15 +0,0 @@
1
- import { AdminRole } from "./admin-role";
2
- import { AdminTaskType } from "./admin-task-type";
3
- export interface Admin {
4
- id: string;
5
- createdAt: Date;
6
- adminAuthIds?: string[];
7
- name: string;
8
- email: string;
9
- slackWebhookUrl: string;
10
- role: AdminRole;
11
- acceptingTasks?: boolean;
12
- assignedTaskTypes: AdminTaskType[];
13
- privileges: string[];
14
- userAuthId?: string;
15
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });