@riocrypto/common 1.0.1556 → 1.0.1560

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.
@@ -3,6 +3,6 @@ import { Asset } from "./Asset";
3
3
  export declare class FiatAsset extends Asset {
4
4
  symbol: Fiat;
5
5
  constructor(symbol: Fiat);
6
- getName(): "Brazilian Real" | "Mexican Peso" | "United States Dollar" | "Peruvian Sol" | "ERR";
6
+ getName(): "Mexican Peso" | "United States Dollar" | "Peruvian Sol" | "ERR";
7
7
  getImageUri(): string;
8
8
  }
@@ -9,82 +9,11 @@ class FiatAsset extends Asset_1.Asset {
9
9
  this.symbol = symbol;
10
10
  }
11
11
  getName() {
12
- // if (this.symbol === Fiat.AUD) {
13
- // return "Australian Dollar";
14
- // // } else if (this.symbol === Fiat.BGN) {
15
- // // return "Bulgarian Lev";
16
- if (this.symbol === fiat_1.Fiat.BRL) {
17
- return "Brazilian Real";
18
- // } else if (this.symbol === Fiat.CAD) {
19
- // return "Canadian Dollar";
20
- // } else if (this.symbol === Fiat.CHF) {
21
- // return "Swiss Franc";
22
- // } else if (this.symbol === Fiat.CLP) {
23
- // return "Chilean Peso";
24
- // } else if (this.symbol === Fiat.CNY) {
25
- // return "Renminbi";
26
- // } else if (this.symbol === Fiat.CZK) {
27
- // return "Czech Koruna";
28
- // } else if (this.symbol === Fiat.DKK) {
29
- // return "Danish Krone";
30
- // } else if (this.symbol === Fiat.EUR) {
31
- // return "Euro";
32
- // } else if (this.symbol === Fiat.GBP) {
33
- // return "British Pound";
34
- // } else if (this.symbol === Fiat.HRK) {
35
- // return "Croatian Kuna";
36
- // } else if (this.symbol === Fiat.HUF) {
37
- // return "Hungarian Forint";
38
- // } else if (this.symbol === Fiat.IDR) {
39
- // return "Indonesian Rupiah";
40
- // } else if (this.symbol === Fiat.ILS) {
41
- // return "Israeli Shekel";
42
- // } else if (this.symbol === Fiat.INR) {
43
- // return "Indian Rupee";
44
- // } else if (this.symbol === Fiat.JPY) {
45
- // return "Japanese Yen";
46
- // } else if (this.symbol === Fiat.KRW) {
47
- // return "South Korean Won";
48
- }
49
- else if (this.symbol === fiat_1.Fiat.MXN) {
12
+ if (this.symbol === fiat_1.Fiat.MXN) {
50
13
  return "Mexican Peso";
51
- // } else if (this.symbol === Fiat.MYR) {
52
- // return "Malaysian Ringgit";
53
- // } else if (this.symbol === Fiat.NOK) {
54
- // return "Norwegian Krone";
55
- // } else if (this.symbol === Fiat.NZD) {
56
- // return "New Zealand Dollar";
57
- // } else if (this.symbol === Fiat.PHP) {
58
- // return "Philippine Peso";
59
- // } else if (this.symbol === Fiat.PLN) {
60
- // return "Polish Złoty";
61
- // } else if (this.symbol === Fiat.RON) {
62
- // return "Swedish Krona";
63
- // } else if (this.symbol === Fiat.RUB) {
64
- // return "Russian Ruble";
65
- // } else if (this.symbol === Fiat.SEK) {
66
- // return "Swedish Krona";
67
- // } else if (this.symbol === Fiat.THB) {
68
- // return "Thai Baht";
69
- // } else if (this.symbol === Fiat.TRY) {
70
- // return "Turkish Lira";
71
14
  }
72
15
  if (this.symbol === fiat_1.Fiat.USD) {
73
16
  return "United States Dollar";
74
- // } else if (this.symbol === Fiat.VND) {
75
- // return "Vietnamese Dong";
76
- // } else if (this.symbol === Fiat.ZAR) {
77
- // return "South African Rand";
78
- // } else if (this.symbol === Fiat.COP) {
79
- // return "Colombian Peso";
80
- // } else if (this.symbol === Fiat.SGD) {
81
- // return "Singapore Dollar";
82
- // } else if (this.symbol === Fiat.ARS) {
83
- // return "Argentine Peso";
84
- // } else if (this.symbol === Fiat.ISK) {
85
- // return "Icelandic Krona";
86
- // } else if (this.symbol === Fiat.HKD) {
87
- // return "Hong Kong Dollar";
88
17
  }
89
18
  else if (this.symbol === fiat_1.Fiat.PEN) {
90
19
  return "Peruvian Sol";
@@ -0,0 +1,2 @@
1
+ import { AdminAuthRole } from "../types/admin-auth-role";
2
+ export declare const humanizeAdminAuthRole: (role: AdminAuthRole) => string;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.humanizeAdminAuthRole = void 0;
4
+ const admin_auth_role_1 = require("../types/admin-auth-role");
5
+ const humanizeAdminAuthRole = (role) => {
6
+ switch (role) {
7
+ case admin_auth_role_1.AdminAuthRole.ViewOnly:
8
+ return "View only";
9
+ case admin_auth_role_1.AdminAuthRole.CreateAndModify:
10
+ return "Create and modify";
11
+ case admin_auth_role_1.AdminAuthRole.SuperAdmin:
12
+ return "Super admin";
13
+ default:
14
+ return "Unknown";
15
+ }
16
+ };
17
+ exports.humanizeAdminAuthRole = humanizeAdminAuthRole;
@@ -0,0 +1,2 @@
1
+ import { AuthRole } from "../types/auth-role";
2
+ export declare const humanizeAuthRole: (role: AuthRole) => string;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.humanizeAuthRole = void 0;
4
+ const auth_role_1 = require("../types/auth-role");
5
+ const humanizeAuthRole = (role) => {
6
+ switch (role) {
7
+ case auth_role_1.AuthRole.ViewOnly:
8
+ return "View only";
9
+ case auth_role_1.AuthRole.CreateAndModify:
10
+ return "Create and modify";
11
+ case auth_role_1.AuthRole.Owner:
12
+ return "Owner";
13
+ default:
14
+ return "Unknown";
15
+ }
16
+ };
17
+ exports.humanizeAuthRole = humanizeAuthRole;
package/build/index.d.ts CHANGED
@@ -283,6 +283,8 @@ export * from "./helpers/get-auth-name";
283
283
  export * from "./helpers/validate-individual-name";
284
284
  export * from "./helpers/validate-business-name";
285
285
  export * from "./helpers/get-address-for-testing";
286
+ export * from "./helpers/humanize-admin-auth-role";
287
+ export * from "./helpers/humanize-auth-role";
286
288
  export * from "./clients/rio-client";
287
289
  export * from "./clients/rio-admin-client";
288
290
  export * from "./constants/mexico-fiscal-regimens";
package/build/index.js CHANGED
@@ -299,6 +299,8 @@ __exportStar(require("./helpers/get-auth-name"), exports);
299
299
  __exportStar(require("./helpers/validate-individual-name"), exports);
300
300
  __exportStar(require("./helpers/validate-business-name"), exports);
301
301
  __exportStar(require("./helpers/get-address-for-testing"), exports);
302
+ __exportStar(require("./helpers/humanize-admin-auth-role"), exports);
303
+ __exportStar(require("./helpers/humanize-auth-role"), exports);
302
304
  __exportStar(require("./clients/rio-client"), exports);
303
305
  __exportStar(require("./clients/rio-admin-client"), exports);
304
306
  __exportStar(require("./constants/mexico-fiscal-regimens"), exports);
@@ -1,7 +1,5 @@
1
1
  export declare enum Fiat {
2
2
  USD = "USD",
3
- BRL = "BRL",
4
- COP = "COP",
5
3
  MXN = "MXN",
6
4
  PEN = "PEN"
7
5
  }
@@ -5,39 +5,6 @@ exports.Fiat = void 0;
5
5
  var Fiat;
6
6
  (function (Fiat) {
7
7
  Fiat["USD"] = "USD";
8
- // EUR = "EUR",
9
- // GBP = "GBP",
10
- // JPY = "JPY",
11
- // CAD = "CAD",
12
- // AUD = "AUD",
13
- // CHF = "CHF",
14
- // CNY = "CNY",
15
- // NZD = "NZD",
16
- // ARS = "ARS",
17
- // RUB = "RUB",
18
- // SEK = "SEK",
19
- // NOK = "NOK",
20
- // PLN = "PLN",
21
- Fiat["BRL"] = "BRL";
22
- // ISK = "ISK",
23
- // SGD = "SGD",
24
- // TRY = "TRY",
25
- // ZAR = "ZAR",
26
- // KRW = "KRW",
27
- // INR = "INR",
28
- // PHP = "PHP",
29
- // IDR = "IDR",
30
- Fiat["COP"] = "COP";
31
- // ILS = "ILS",
32
- // BGN = "BGN",
33
- // CLP = "CLP",
34
- // HKD = "HKD",
35
8
  Fiat["MXN"] = "MXN";
36
- // CZK = "CZK",
37
- // HUF = "HUF",
38
- // THB = "THB",
39
- // VND = "VND",
40
9
  Fiat["PEN"] = "PEN";
41
- // RON = "RON",
42
- // HRK = "HRK",
43
10
  })(Fiat = exports.Fiat || (exports.Fiat = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1556",
3
+ "version": "1.0.1560",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",