@riocrypto/common 1.0.956 → 1.0.958

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,14 @@
1
+ import { CustomError } from "./custom-error";
2
+ export declare class MissingUserDataError extends CustomError {
3
+ private customMessage;
4
+ private missingFields;
5
+ statusCode: number;
6
+ internalCode: number;
7
+ constructor(customMessage: string, missingFields: string[]);
8
+ getMessage(): void;
9
+ serializeErrors(): {
10
+ code: number;
11
+ fields: string[];
12
+ message: string;
13
+ }[];
14
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MissingUserDataError = void 0;
4
+ const custom_error_1 = require("./custom-error");
5
+ class MissingUserDataError extends custom_error_1.CustomError {
6
+ constructor(customMessage, missingFields) {
7
+ super(customMessage);
8
+ this.customMessage = customMessage;
9
+ this.missingFields = missingFields;
10
+ this.statusCode = 400;
11
+ this.internalCode = 39;
12
+ Object.setPrototypeOf(this, MissingUserDataError.prototype);
13
+ }
14
+ getMessage() {
15
+ let message = "This user is missing the following fields: ";
16
+ }
17
+ serializeErrors() {
18
+ return [
19
+ {
20
+ code: this.internalCode,
21
+ fields: this.missingFields,
22
+ message: this.customMessage,
23
+ },
24
+ ];
25
+ }
26
+ }
27
+ exports.MissingUserDataError = MissingUserDataError;
@@ -25,6 +25,7 @@ export declare type UserInput = {
25
25
  postalCode: string;
26
26
  cpf?: string;
27
27
  curp?: string;
28
+ ruc?: string;
28
29
  economicActivity?: string;
29
30
  platformFeeRanges?: PlatformFeeRange[];
30
31
  attributes?: UserAttribute[];
@@ -27,6 +27,7 @@ export declare type UserUpdate = {
27
27
  phoneNumber?: string;
28
28
  cpf?: string;
29
29
  curp?: string;
30
+ ruc?: string;
30
31
  economicActivity?: string;
31
32
  platformFeeRanges?: PlatformFeeRange[];
32
33
  attributes?: UserAttribute[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.956",
3
+ "version": "1.0.958",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",