@cobre-npm/library-portal-core 0.18.0 → 0.19.0

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,78 @@
1
+ export declare const CURRENCIES: {
2
+ readonly cop: {
3
+ readonly code: "cop";
4
+ readonly label: "COP";
5
+ readonly isoCode: "COP";
6
+ readonly geo: "col";
7
+ readonly flagAsset: "col";
8
+ readonly minAmount: 1;
9
+ readonly type: "fiat";
10
+ };
11
+ readonly mxn: {
12
+ readonly code: "mxn";
13
+ readonly label: "MXN";
14
+ readonly isoCode: "MXN";
15
+ readonly geo: "mex";
16
+ readonly flagAsset: "mex";
17
+ readonly minAmount: 0.01;
18
+ readonly type: "fiat";
19
+ };
20
+ readonly usd: {
21
+ readonly code: "usd";
22
+ readonly label: "USD";
23
+ readonly isoCode: "USD";
24
+ readonly geo: "usa";
25
+ readonly flagAsset: "eu";
26
+ readonly minAmount: 100;
27
+ readonly type: "fiat";
28
+ };
29
+ readonly cop_stable: {
30
+ readonly code: "cop_stable";
31
+ readonly label: "COP Stable";
32
+ readonly isoCode: "COP";
33
+ readonly geo: "col";
34
+ readonly flagAsset: "cop_stable";
35
+ readonly minAmount: 1;
36
+ readonly type: "stable";
37
+ };
38
+ readonly usd_stable: {
39
+ readonly code: "usd_stable";
40
+ readonly label: "USD Stable";
41
+ readonly isoCode: "USD";
42
+ readonly geo: "global";
43
+ readonly flagAsset: "usd_stable";
44
+ readonly minAmount: 1;
45
+ readonly type: "stable";
46
+ };
47
+ readonly usdt: {
48
+ readonly code: "usdt";
49
+ readonly label: "USD (USDT)";
50
+ readonly isoCode: "USD";
51
+ readonly geo: "usa";
52
+ readonly flagAsset: "usdt";
53
+ readonly minAmount: 1;
54
+ readonly type: "stablecoin";
55
+ };
56
+ readonly usdc: {
57
+ readonly code: "usdc";
58
+ readonly label: "USD (USDC)";
59
+ readonly isoCode: "USD";
60
+ readonly geo: "usa";
61
+ readonly flagAsset: "usdc";
62
+ readonly minAmount: 1;
63
+ readonly type: "stablecoin";
64
+ };
65
+ readonly copco: {
66
+ readonly code: "copco";
67
+ readonly label: "COPco";
68
+ readonly isoCode: "COP";
69
+ readonly geo: "col";
70
+ readonly flagAsset: "cop_stable";
71
+ readonly minAmount: 1;
72
+ readonly type: "stable";
73
+ };
74
+ };
75
+ export type Currency = keyof typeof CURRENCIES;
76
+ export type CurrencyType = (typeof CURRENCIES)[Currency]["type"];
77
+ export type CurrencyRecord = (typeof CURRENCIES)[Currency];
78
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/currencies/catalog.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASb,CAAA;AAEV,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,UAAU,CAAA;AAC9C,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAA;AAChE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAA"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CURRENCIES = void 0;
4
+ const countries_constants_1 = require("../constants/countries/countries.constants");
5
+ exports.CURRENCIES = {
6
+ cop: { code: "cop", label: "COP", isoCode: "COP", geo: countries_constants_1.Countries.COL, flagAsset: "col", minAmount: 1, type: "fiat" },
7
+ mxn: { code: "mxn", label: "MXN", isoCode: "MXN", geo: countries_constants_1.Countries.MEX, flagAsset: "mex", minAmount: 0.01, type: "fiat" },
8
+ usd: { code: "usd", label: "USD", isoCode: "USD", geo: countries_constants_1.Countries.USA, flagAsset: "eu", minAmount: 100, type: "fiat" },
9
+ cop_stable: { code: "cop_stable", label: "COP Stable", isoCode: "COP", geo: countries_constants_1.Countries.COL, flagAsset: "cop_stable", minAmount: 1, type: "stable" },
10
+ usd_stable: { code: "usd_stable", label: "USD Stable", isoCode: "USD", geo: countries_constants_1.Countries.GLOBAL, flagAsset: "usd_stable", minAmount: 1, type: "stable" },
11
+ usdt: { code: "usdt", label: "USD (USDT)", isoCode: "USD", geo: countries_constants_1.Countries.USA, flagAsset: "usdt", minAmount: 1, type: "stablecoin" },
12
+ usdc: { code: "usdc", label: "USD (USDC)", isoCode: "USD", geo: countries_constants_1.Countries.USA, flagAsset: "usdc", minAmount: 1, type: "stablecoin" },
13
+ copco: { code: "copco", label: "COPco", isoCode: "COP", geo: countries_constants_1.Countries.COL, flagAsset: "cop_stable", minAmount: 1, type: "stable" },
14
+ };
15
+ //# sourceMappingURL=catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/currencies/catalog.ts"],"names":[],"mappings":";;;AAAA,oFAAsE;AAEzD,QAAA,UAAU,GAAG;IACxB,GAAG,EAAS,EAAE,IAAI,EAAE,KAAK,EAAS,KAAK,EAAE,KAAK,EAAS,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,+BAAS,CAAC,GAAG,EAAK,SAAS,EAAE,KAAK,EAAS,SAAS,EAAE,CAAC,EAAK,IAAI,EAAE,MAAM,EAAE;IACtJ,GAAG,EAAS,EAAE,IAAI,EAAE,KAAK,EAAS,KAAK,EAAE,KAAK,EAAS,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,+BAAS,CAAC,GAAG,EAAK,SAAS,EAAE,KAAK,EAAS,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE;IACtJ,GAAG,EAAS,EAAE,IAAI,EAAE,KAAK,EAAS,KAAK,EAAE,KAAK,EAAS,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,+BAAS,CAAC,GAAG,EAAK,SAAS,EAAE,IAAI,EAA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"index.d.ts","sourceRoot":"","sources":["../../src/currencies/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,wBAAwB,CAAA"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./catalog"), exports);
18
+ __exportStar(require("./utils/currency.utils"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/currencies/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,yDAAsC"}
@@ -0,0 +1,4 @@
1
+ import type { CurrencyType, CurrencyRecord } from "../catalog";
2
+ export declare const currencyList: readonly CurrencyRecord[];
3
+ export declare const getCurrenciesByType: (...types: CurrencyType[]) => CurrencyRecord[];
4
+ //# sourceMappingURL=currency.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currency.utils.d.ts","sourceRoot":"","sources":["../../../src/currencies/utils/currency.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAE9D,eAAO,MAAM,YAAY,EAAE,SAAS,cAAc,EAA8B,CAAA;AAEhF,eAAO,MAAM,mBAAmB,GAAI,GAAG,OAAO,YAAY,EAAE,KAAG,cAAc,EACU,CAAA"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCurrenciesByType = exports.currencyList = void 0;
4
+ const catalog_1 = require("../catalog");
5
+ exports.currencyList = Object.values(catalog_1.CURRENCIES);
6
+ const getCurrenciesByType = (...types) => types.length ? exports.currencyList.filter((c) => types.includes(c.type)) : [...exports.currencyList];
7
+ exports.getCurrenciesByType = getCurrenciesByType;
8
+ //# sourceMappingURL=currency.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currency.utils.js","sourceRoot":"","sources":["../../../src/currencies/utils/currency.utils.ts"],"names":[],"mappings":";;;AAAA,wCAAuC;AAG1B,QAAA,YAAY,GAA8B,MAAM,CAAC,MAAM,CAAC,oBAAU,CAAC,CAAA;AAEzE,MAAM,mBAAmB,GAAG,CAAC,GAAG,KAAqB,EAAoB,EAAE,CAChF,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,oBAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,oBAAY,CAAC,CAAA;AAD1E,QAAA,mBAAmB,uBACuD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobre-npm/library-portal-core",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "Shared configurations and resources for Portal MFEs",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -8,6 +8,10 @@
8
8
  ".": {
9
9
  "types": "./dist/index.d.ts",
10
10
  "default": "./dist/index.js"
11
+ },
12
+ "./currencies": {
13
+ "types": "./dist/currencies/index.d.ts",
14
+ "default": "./dist/currencies/index.js"
11
15
  }
12
16
  },
13
17
  "files": [