@riocrypto/common 1.0.779 → 1.0.781

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.
@@ -43,7 +43,7 @@ export declare class RioAdminClient {
43
43
  password?: string;
44
44
  newPassword?: string;
45
45
  }): Promise<Admin>;
46
- getBridgeKYCLinks(userId: string): Promise<{
46
+ getBridgeOnboardingLinks(userId: string): Promise<{
47
47
  tosLink: string;
48
48
  kycLink: string;
49
49
  }>;
@@ -109,9 +109,9 @@ class RioAdminClient {
109
109
  return data;
110
110
  });
111
111
  }
112
- getBridgeKYCLinks(userId) {
112
+ getBridgeOnboardingLinks(userId) {
113
113
  return __awaiter(this, void 0, void 0, function* () {
114
- const { data } = yield this.axios.post(`/api/users/${userId}/us/kyc-link`);
114
+ const { data } = yield this.axios.get(`/api/users/${userId}/us/onboarding-links`);
115
115
  return data;
116
116
  });
117
117
  }
@@ -0,0 +1,10 @@
1
+ import { CustomError } from "./custom-error";
2
+ export declare class UnavailableInSandboxError extends CustomError {
3
+ statusCode: number;
4
+ internalCode: number;
5
+ constructor();
6
+ serializeErrors(): {
7
+ code: number;
8
+ message: string;
9
+ }[];
10
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UnavailableInSandboxError = void 0;
4
+ const custom_error_1 = require("./custom-error");
5
+ class UnavailableInSandboxError extends custom_error_1.CustomError {
6
+ constructor() {
7
+ super("This endpoint is not available in sandbox");
8
+ this.statusCode = 501;
9
+ this.internalCode = 36;
10
+ Object.setPrototypeOf(this, UnavailableInSandboxError.prototype);
11
+ }
12
+ serializeErrors() {
13
+ return [
14
+ {
15
+ code: this.internalCode,
16
+ message: "This endpoint is not available in sandbox",
17
+ },
18
+ ];
19
+ }
20
+ }
21
+ exports.UnavailableInSandboxError = UnavailableInSandboxError;
package/build/index.d.ts CHANGED
@@ -34,6 +34,7 @@ export * from "./errors/partner-auth-already-exists-error";
34
34
  export * from "./errors/partner-auth-not-found-error";
35
35
  export * from "./errors/missing-cpf-error";
36
36
  export * from "./errors/active-sell-order-error";
37
+ export * from "./errors/unavailable-in-sandbox-error";
37
38
  export * from "./events/base-listener";
38
39
  export * from "./events/base-publisher";
39
40
  export * from "./events/subjects";
package/build/index.js CHANGED
@@ -50,6 +50,7 @@ __exportStar(require("./errors/partner-auth-already-exists-error"), exports);
50
50
  __exportStar(require("./errors/partner-auth-not-found-error"), exports);
51
51
  __exportStar(require("./errors/missing-cpf-error"), exports);
52
52
  __exportStar(require("./errors/active-sell-order-error"), exports);
53
+ __exportStar(require("./errors/unavailable-in-sandbox-error"), exports);
53
54
  __exportStar(require("./events/base-listener"), exports);
54
55
  __exportStar(require("./events/base-publisher"), exports);
55
56
  __exportStar(require("./events/subjects"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.779",
3
+ "version": "1.0.781",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",