@cobre-npm/library-portal-core 0.1.7 → 0.2.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.
Files changed (31) hide show
  1. package/dist/constants/mmTypes/locales/en.json +24 -0
  2. package/dist/constants/mmTypes/locales/es-mex.json +24 -0
  3. package/dist/constants/mmTypes/mm-types.constants.d.ts +24 -0
  4. package/dist/constants/mmTypes/mm-types.constants.d.ts.map +1 -0
  5. package/dist/constants/mmTypes/mm-types.constants.js +23 -0
  6. package/dist/constants/mmTypes/mm-types.constants.js.map +1 -0
  7. package/dist/constants/mmTypes/mm-types.labels.d.ts +8 -0
  8. package/dist/constants/mmTypes/mm-types.labels.d.ts.map +1 -0
  9. package/dist/constants/mmTypes/mm-types.labels.js +21 -0
  10. package/dist/constants/mmTypes/mm-types.labels.js.map +1 -0
  11. package/dist/index.d.ts +8 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +9 -0
  14. package/dist/index.js.map +1 -1
  15. package/dist/interfaces/search/aggregations.interface.d.ts +31 -0
  16. package/dist/interfaces/search/aggregations.interface.d.ts.map +1 -0
  17. package/dist/interfaces/search/aggregations.interface.js +2 -0
  18. package/dist/interfaces/search/aggregations.interface.js.map +1 -0
  19. package/dist/interfaces/search/filters.interface.d.ts +14 -0
  20. package/dist/interfaces/search/filters.interface.d.ts.map +1 -0
  21. package/dist/interfaces/search/filters.interface.js +2 -0
  22. package/dist/interfaces/search/filters.interface.js.map +1 -0
  23. package/dist/interfaces/search/request.interface.d.ts +15 -0
  24. package/dist/interfaces/search/request.interface.d.ts.map +1 -0
  25. package/dist/interfaces/search/request.interface.js +2 -0
  26. package/dist/interfaces/search/request.interface.js.map +1 -0
  27. package/dist/interfaces/search/response.interface.d.ts +48 -0
  28. package/dist/interfaces/search/response.interface.d.ts.map +1 -0
  29. package/dist/interfaces/search/response.interface.js +2 -0
  30. package/dist/interfaces/search/response.interface.js.map +1 -0
  31. package/package.json +1 -1
@@ -0,0 +1,24 @@
1
+ {
2
+ "mmTypes": {
3
+ "ach": "ACH",
4
+ "fast_pay": "Fast Pay",
5
+ "spei": "SPEI",
6
+ "spei_card": "SPEI Card",
7
+ "spei_return": "SPEI Refund",
8
+ "r2p": "Request",
9
+ "r2p_bancolombia": "Collection - Bancolombia Button",
10
+ "r2p_nequi": "Collection - Nequi Button",
11
+ "r2p_pse": "Collection - PSE",
12
+ "direct_debit": "Direct Debit",
13
+ "r2p_breb": "R2P Bre-B",
14
+ "r2p_top_up_pse": "R2P - PSE",
15
+ "r2p_top_up_bancolombia": "R2P - Bancolombia",
16
+ "global": "Global payout",
17
+ "r2p_spei": "R2P SPEI",
18
+ "on_ramp": "On Ramp",
19
+ "off_ramp": "Off Ramp",
20
+ "fedwire": "Fedwire",
21
+ "global_pay_to_usa": "FBO Top-Up",
22
+ "usa_pay_to_global": "Global Top-Up"
23
+ }
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "mmTypes": {
3
+ "ach": "ACH",
4
+ "fast_pay": "Fast Pay",
5
+ "spei": "SPEI",
6
+ "spei_card": "SPEI Card",
7
+ "spei_return": "Retorno SPEI",
8
+ "r2p": "Solicitud",
9
+ "r2p_bancolombia": "Recaudo - Botón Bancolombia",
10
+ "r2p_nequi": "Recaudo - Botón Nequi",
11
+ "r2p_pse": "Recaudo - PSE",
12
+ "direct_debit": "Débito a cuenta",
13
+ "r2p_breb": "Recaudo Bre-B",
14
+ "r2p_top_up_pse": "Recarga - PSE",
15
+ "r2p_top_up_bancolombia": "Recarga - Bancolombia",
16
+ "global": "Pago global",
17
+ "r2p_spei": "Recaudo SPEI",
18
+ "on_ramp": "On Ramp",
19
+ "off_ramp": "Off Ramp",
20
+ "fedwire": "Fedwire",
21
+ "global_pay_to_usa": "Recarga FBO",
22
+ "usa_pay_to_global": "Recarga Global"
23
+ }
24
+ }
@@ -0,0 +1,24 @@
1
+ export declare const MMTypes: {
2
+ readonly Ach: "ach";
3
+ readonly FastPay: "fast_pay";
4
+ readonly Spei: "spei";
5
+ readonly SpeiCard: "spei_card";
6
+ readonly SpeiReturn: "spei_return";
7
+ readonly R2P: "r2p";
8
+ readonly R2PBancolombia: "r2p_bancolombia";
9
+ readonly R2PNequi: "r2p_nequi";
10
+ readonly R2PPSE: "r2p_pse";
11
+ readonly DirectDebit: "direct_debit";
12
+ readonly R2PBreB: "r2p_breb";
13
+ readonly R2PTopUpPSE: "r2p_top_up_pse";
14
+ readonly R2PTopUpBancolombia: "r2p_top_up_bancolombia";
15
+ readonly Global: "global";
16
+ readonly R2PSpei: "r2p_spei";
17
+ readonly OnRamp: "on_ramp";
18
+ readonly OffRamp: "off_ramp";
19
+ readonly Fedwire: "fedwire";
20
+ readonly GlobalPayToUsa: "global_pay_to_usa";
21
+ readonly UsaPayToGlobal: "usa_pay_to_global";
22
+ };
23
+ export type MMType = (typeof MMTypes)[keyof typeof MMTypes];
24
+ //# sourceMappingURL=mm-types.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mm-types.constants.d.ts","sourceRoot":"","sources":["../../../src/constants/mmTypes/mm-types.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;CAqBV,CAAA;AAEV,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAA"}
@@ -0,0 +1,23 @@
1
+ export const MMTypes = {
2
+ Ach: "ach",
3
+ FastPay: "fast_pay",
4
+ Spei: "spei",
5
+ SpeiCard: "spei_card",
6
+ SpeiReturn: "spei_return",
7
+ R2P: "r2p",
8
+ R2PBancolombia: "r2p_bancolombia",
9
+ R2PNequi: "r2p_nequi",
10
+ R2PPSE: "r2p_pse",
11
+ DirectDebit: "direct_debit",
12
+ R2PBreB: "r2p_breb",
13
+ R2PTopUpPSE: "r2p_top_up_pse",
14
+ R2PTopUpBancolombia: "r2p_top_up_bancolombia",
15
+ Global: "global",
16
+ R2PSpei: "r2p_spei",
17
+ OnRamp: "on_ramp",
18
+ OffRamp: "off_ramp",
19
+ Fedwire: "fedwire",
20
+ GlobalPayToUsa: "global_pay_to_usa",
21
+ UsaPayToGlobal: "usa_pay_to_global",
22
+ };
23
+ //# sourceMappingURL=mm-types.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mm-types.constants.js","sourceRoot":"","sources":["../../../src/constants/mmTypes/mm-types.constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,UAAU;IACnB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,WAAW;IACrB,UAAU,EAAE,aAAa;IACzB,GAAG,EAAE,KAAK;IACV,cAAc,EAAE,iBAAiB;IACjC,QAAQ,EAAE,WAAW;IACrB,MAAM,EAAE,SAAS;IACjB,WAAW,EAAE,cAAc;IAC3B,OAAO,EAAE,UAAU;IACnB,WAAW,EAAE,gBAAgB;IAC7B,mBAAmB,EAAE,wBAAwB;IAC7C,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,UAAU;IACnB,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,UAAU;IACnB,OAAO,EAAE,SAAS;IAClB,cAAc,EAAE,mBAAmB;IACnC,cAAc,EAAE,mBAAmB;CAC3B,CAAA"}
@@ -0,0 +1,8 @@
1
+ import type { MMType } from "./mm-types.constants";
2
+ export declare const getMMTypeLabel: (key: MMType | null | undefined, lang: string) => string | undefined;
3
+ export declare const getMMTypesWithLabels: (lang: string) => {
4
+ id: number;
5
+ label: string;
6
+ value: "global" | "spei_card" | "r2p" | "r2p_breb" | "r2p_spei" | "ach" | "fast_pay" | "spei" | "spei_return" | "r2p_bancolombia" | "r2p_nequi" | "r2p_pse" | "direct_debit" | "r2p_top_up_pse" | "r2p_top_up_bancolombia" | "on_ramp" | "off_ramp" | "fedwire" | "global_pay_to_usa" | "usa_pay_to_global";
7
+ }[];
8
+ //# sourceMappingURL=mm-types.labels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mm-types.labels.d.ts","sourceRoot":"","sources":["../../../src/constants/mmTypes/mm-types.labels.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAOlD,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,MAAM,MAAM,KAAG,MAAM,GAAG,SAMtF,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM;;;;GAShD,CAAA"}
@@ -0,0 +1,21 @@
1
+ import { MMTypes } from "./mm-types.constants";
2
+ import enLocale from "./locales/en.json";
3
+ import esMexLocale from "./locales/es-mex.json";
4
+ import { DEFAULT_ES_LOCALE } from "../lang";
5
+ const locales = { en: enLocale, "es-mex": esMexLocale };
6
+ export const getMMTypeLabel = (key, lang) => {
7
+ if (!key)
8
+ return undefined;
9
+ const locale = locales[lang] ?? locales[DEFAULT_ES_LOCALE];
10
+ return locale.mmTypes[key];
11
+ };
12
+ export const getMMTypesWithLabels = (lang) => {
13
+ const keys = Object.values(MMTypes);
14
+ const locale = locales[lang] ?? locales[DEFAULT_ES_LOCALE];
15
+ return keys.map((key, index) => ({
16
+ id: index + 1,
17
+ label: locale.mmTypes[key],
18
+ value: key,
19
+ }));
20
+ };
21
+ //# sourceMappingURL=mm-types.labels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mm-types.labels.js","sourceRoot":"","sources":["../../../src/constants/mmTypes/mm-types.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAE9C,OAAO,QAAQ,MAAM,mBAAmB,CAAA;AACxC,OAAO,WAAW,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAE3C,MAAM,OAAO,GAAuC,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAA;AAE3F,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAA8B,EAAE,IAAY,EAAsB,EAAE;IACjG,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAA;IAE1B,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,iBAAiB,CAAE,CAAA;IAE3D,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;AAC5B,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAY,EAAE,EAAE;IACnD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACnC,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,iBAAiB,CAAE,CAAA;IAE3D,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;QAC/B,EAAE,EAAE,KAAK,GAAG,CAAC;QACb,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC;QAC1B,KAAK,EAAE,GAAG;KACX,CAAC,CAAC,CAAA;AACL,CAAC,CAAA"}
package/dist/index.d.ts CHANGED
@@ -1,8 +1,13 @@
1
+ export * from "./interfaces/search/aggregations.interface";
2
+ export * from "./interfaces/search/filters.interface";
3
+ export * from "./interfaces/search/request.interface";
4
+ export * from "./interfaces/search/response.interface";
1
5
  export * from "./constants/accountProviders/account-providers.constants";
2
6
  export * from "./constants/accountTypes/account-types.constants";
3
7
  export * from "./constants/counterpartyTypes/counterparty-types.constants";
4
8
  export * from "./constants/countries/countries.constants";
5
9
  export * from "./constants/currencies/currencies.constants";
10
+ export * from "./constants/mmTypes/mm-types.constants";
6
11
  export * from "./constants/movementStatus/movement-status.constants";
7
12
  export * from "./constants/countries/countries.data";
8
13
  export * from "./constants/currencies/currencies.data";
@@ -12,11 +17,14 @@ export * from "./constants/currencies/currencies.filters";
12
17
  export * from "./constants/accountTypes/account-types.labels";
13
18
  export * from "./constants/counterpartyTypes/counterparty-types.labels";
14
19
  export * from "./constants/countries/countries.labels";
20
+ export * from "./constants/mmTypes/mm-types.labels";
15
21
  export * from "./constants/lang";
16
22
  export { default as accountTypesEnLocale } from "./constants/accountTypes/locales/en.json";
17
23
  export { default as accountTypesMexLocale } from "./constants/accountTypes/locales/es-mex.json";
18
24
  export { default as counterpartyTypesEnLocale } from "./constants/counterpartyTypes/locales/en.json";
19
25
  export { default as counterpartyTypesMexLocale } from "./constants/counterpartyTypes/locales/es-mex.json";
26
+ export { default as mmTypesEnLocale } from "./constants/mmTypes/locales/en.json";
27
+ export { default as mmTypesMexLocale } from "./constants/mmTypes/locales/es-mex.json";
20
28
  export { default as countriesEnLocale } from "./constants/countries/locales/en.json";
21
29
  export { default as countriesMexLocale } from "./constants/countries/locales/es-mex.json";
22
30
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,0DAA0D,CAAA;AACxE,cAAc,kDAAkD,CAAA;AAChE,cAAc,4DAA4D,CAAA;AAC1E,cAAc,2CAA2C,CAAA;AACzD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,sDAAsD,CAAA;AAGpE,cAAc,sCAAsC,CAAA;AACpD,cAAc,wCAAwC,CAAA;AAGtD,cAAc,gDAAgD,CAAA;AAC9D,cAAc,0DAA0D,CAAA;AACxE,cAAc,2CAA2C,CAAA;AAGzD,cAAc,+CAA+C,CAAA;AAC7D,cAAc,yDAAyD,CAAA;AACvE,cAAc,wCAAwC,CAAA;AAGtD,cAAc,kBAAkB,CAAA;AAGhC,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0CAA0C,CAAA;AAC1F,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,8CAA8C,CAAA;AAC/F,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OAAO,IAAI,gBAAgB,EAAE,MAAM,yCAAyC,CAAA;AACrF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AACpF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,2CAA2C,CAAA"}
package/dist/index.js CHANGED
@@ -1,9 +1,15 @@
1
+ // --- Interfaces ---
2
+ export * from "./interfaces/search/aggregations.interface";
3
+ export * from "./interfaces/search/filters.interface";
4
+ export * from "./interfaces/search/request.interface";
5
+ export * from "./interfaces/search/response.interface";
1
6
  // --- Constants ---
2
7
  export * from "./constants/accountProviders/account-providers.constants";
3
8
  export * from "./constants/accountTypes/account-types.constants";
4
9
  export * from "./constants/counterpartyTypes/counterparty-types.constants";
5
10
  export * from "./constants/countries/countries.constants";
6
11
  export * from "./constants/currencies/currencies.constants";
12
+ export * from "./constants/mmTypes/mm-types.constants";
7
13
  export * from "./constants/movementStatus/movement-status.constants";
8
14
  // --- Data ---
9
15
  export * from "./constants/countries/countries.data";
@@ -16,6 +22,7 @@ export * from "./constants/currencies/currencies.filters";
16
22
  export * from "./constants/accountTypes/account-types.labels";
17
23
  export * from "./constants/counterpartyTypes/counterparty-types.labels";
18
24
  export * from "./constants/countries/countries.labels";
25
+ export * from "./constants/mmTypes/mm-types.labels";
19
26
  // --- Lang ---
20
27
  export * from "./constants/lang";
21
28
  // --- Locales ---
@@ -23,6 +30,8 @@ export { default as accountTypesEnLocale } from "./constants/accountTypes/locale
23
30
  export { default as accountTypesMexLocale } from "./constants/accountTypes/locales/es-mex.json";
24
31
  export { default as counterpartyTypesEnLocale } from "./constants/counterpartyTypes/locales/en.json";
25
32
  export { default as counterpartyTypesMexLocale } from "./constants/counterpartyTypes/locales/es-mex.json";
33
+ export { default as mmTypesEnLocale } from "./constants/mmTypes/locales/en.json";
34
+ export { default as mmTypesMexLocale } from "./constants/mmTypes/locales/es-mex.json";
26
35
  export { default as countriesEnLocale } from "./constants/countries/locales/en.json";
27
36
  export { default as countriesMexLocale } from "./constants/countries/locales/es-mex.json";
28
37
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,cAAc,0DAA0D,CAAA;AACxE,cAAc,kDAAkD,CAAA;AAChE,cAAc,4DAA4D,CAAA;AAC1E,cAAc,2CAA2C,CAAA;AACzD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,sDAAsD,CAAA;AAEpE,eAAe;AACf,cAAc,sCAAsC,CAAA;AACpD,cAAc,wCAAwC,CAAA;AAEtD,kBAAkB;AAClB,cAAc,gDAAgD,CAAA;AAC9D,cAAc,0DAA0D,CAAA;AACxE,cAAc,2CAA2C,CAAA;AAEzD,iBAAiB;AACjB,cAAc,+CAA+C,CAAA;AAC7D,cAAc,yDAAyD,CAAA;AACvE,cAAc,wCAAwC,CAAA;AAEtD,eAAe;AACf,cAAc,kBAAkB,CAAA;AAEhC,kBAAkB;AAClB,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0CAA0C,CAAA;AAC1F,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,8CAA8C,CAAA;AAC/F,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,+CAA+C,CAAA;AACpG,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,mDAAmD,CAAA;AACzG,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AACpF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,2CAA2C,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,cAAc,4CAA4C,CAAA;AAC1D,cAAc,uCAAuC,CAAA;AACrD,cAAc,uCAAuC,CAAA;AACrD,cAAc,wCAAwC,CAAA;AAEtD,oBAAoB;AACpB,cAAc,0DAA0D,CAAA;AACxE,cAAc,kDAAkD,CAAA;AAChE,cAAc,4DAA4D,CAAA;AAC1E,cAAc,2CAA2C,CAAA;AACzD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,wCAAwC,CAAA;AACtD,cAAc,sDAAsD,CAAA;AAEpE,eAAe;AACf,cAAc,sCAAsC,CAAA;AACpD,cAAc,wCAAwC,CAAA;AAEtD,kBAAkB;AAClB,cAAc,gDAAgD,CAAA;AAC9D,cAAc,0DAA0D,CAAA;AACxE,cAAc,2CAA2C,CAAA;AAEzD,iBAAiB;AACjB,cAAc,+CAA+C,CAAA;AAC7D,cAAc,yDAAyD,CAAA;AACvE,cAAc,wCAAwC,CAAA;AACtD,cAAc,qCAAqC,CAAA;AAEnD,eAAe;AACf,cAAc,kBAAkB,CAAA;AAEhC,kBAAkB;AAClB,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0CAA0C,CAAA;AAC1F,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,8CAA8C,CAAA;AAC/F,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,+CAA+C,CAAA;AACpG,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,mDAAmD,CAAA;AACzG,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAChF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yCAAyC,CAAA;AACrF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AACpF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,2CAA2C,CAAA"}
@@ -0,0 +1,31 @@
1
+ import type { SearchFilter } from "./filters.interface";
2
+ export type MetricAggregationType = "sum" | "avg" | "min" | "max" | "count";
3
+ export interface MetricAggregation {
4
+ name: string;
5
+ type: MetricAggregationType;
6
+ field: string;
7
+ }
8
+ export interface TermsBucketAggregation {
9
+ name: string;
10
+ type: "terms";
11
+ field: string;
12
+ options: {
13
+ size: number;
14
+ };
15
+ metrics?: MetricAggregation[];
16
+ }
17
+ export interface DateHistogramBucketAggregation {
18
+ name: string;
19
+ type: "date_histogram";
20
+ field: string;
21
+ options: {
22
+ interval: "minute" | "hour" | "day" | "week" | "month";
23
+ };
24
+ metrics?: MetricAggregation[];
25
+ }
26
+ export type AggregationDefinition = MetricAggregation | TermsBucketAggregation | DateHistogramBucketAggregation;
27
+ export interface AggregateQueryRequest {
28
+ filters?: SearchFilter;
29
+ aggregations: AggregationDefinition[];
30
+ }
31
+ //# sourceMappingURL=aggregations.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregations.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/search/aggregations.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAIvD,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,CAAA;AAE3E,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAG,MAAM,CAAA;IACb,IAAI,EAAG,qBAAqB,CAAA;IAC5B,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAM,MAAM,CAAA;IAChB,IAAI,EAAM,OAAO,CAAA;IACjB,KAAK,EAAK,MAAM,CAAA;IAChB,OAAO,EAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1B,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAA;CAC9B;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAM,MAAM,CAAA;IAChB,IAAI,EAAM,gBAAgB,CAAA;IAC1B,KAAK,EAAK,MAAM,CAAA;IAChB,OAAO,EAAG;QAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;IACpE,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAA;CAC9B;AAED,MAAM,MAAM,qBAAqB,GAC7B,iBAAiB,GACjB,sBAAsB,GACtB,8BAA8B,CAAA;AAElC,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAM,YAAY,CAAA;IAC1B,YAAY,EAAE,qBAAqB,EAAE,CAAA;CACtC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=aggregations.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregations.interface.js","sourceRoot":"","sources":["../../../src/interfaces/search/aggregations.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ export type SearchOperator = "eq" | "gte" | "lte" | "contains" | "exists";
2
+ export interface SearchCondition {
3
+ field: string;
4
+ operator: SearchOperator;
5
+ value: string | number | boolean;
6
+ }
7
+ export interface SearchOrFilter {
8
+ or: SearchCondition[];
9
+ }
10
+ export interface SearchAndFilter {
11
+ and: Array<SearchOrFilter | SearchCondition>;
12
+ }
13
+ export type SearchFilter = SearchAndFilter | SearchOrFilter | SearchCondition;
14
+ //# sourceMappingURL=filters.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filters.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/search/filters.interface.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,QAAQ,CAAA;AAEzE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAK,MAAM,CAAA;IAChB,QAAQ,EAAE,cAAc,CAAA;IACxB,KAAK,EAAI,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;CACnC;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,eAAe,EAAE,CAAA;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,KAAK,CAAC,cAAc,GAAG,eAAe,CAAC,CAAA;CAC7C;AAID,MAAM,MAAM,YAAY,GAAG,eAAe,GAAG,cAAc,GAAG,eAAe,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=filters.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filters.interface.js","sourceRoot":"","sources":["../../../src/interfaces/search/filters.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import type { SearchFilter } from "./filters.interface";
2
+ export interface SearchSort {
3
+ field: string;
4
+ order: "asc" | "desc";
5
+ }
6
+ export interface SearchPagination {
7
+ cursor: string | null;
8
+ page_size: number;
9
+ }
10
+ export interface SearchRequest {
11
+ filters: SearchFilter;
12
+ sort: SearchSort[];
13
+ pagination: SearchPagination;
14
+ }
15
+ //# sourceMappingURL=request.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/search/request.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAIvD,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,KAAK,GAAG,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAK,MAAM,GAAG,IAAI,CAAA;IACxB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAK,YAAY,CAAA;IACxB,IAAI,EAAQ,UAAU,EAAE,CAAA;IACxB,UAAU,EAAE,gBAAgB,CAAA;CAC7B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=request.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.interface.js","sourceRoot":"","sources":["../../../src/interfaces/search/request.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,48 @@
1
+ import type { SearchFilter } from "./filters.interface";
2
+ import type { SearchSort } from "./request.interface";
3
+ import type { AggregationDefinition, MetricAggregationType } from "./aggregations.interface";
4
+ export interface SearchPaginationResponse {
5
+ next_cursor: string | null;
6
+ prev_cursor: string | null;
7
+ }
8
+ export interface SearchSortResponse {
9
+ field: string;
10
+ order: Uppercase<SearchSort["order"]>;
11
+ }
12
+ export interface SearchQueryResponse<T> {
13
+ data: T[];
14
+ has_more: boolean;
15
+ page_items: number;
16
+ pagination: SearchPaginationResponse;
17
+ applied_sort: SearchSortResponse[];
18
+ applied_filters: SearchFilter;
19
+ }
20
+ export interface AggregateMetricResult {
21
+ name: string;
22
+ type: MetricAggregationType;
23
+ value: number | null;
24
+ }
25
+ export interface AggregateBucket {
26
+ key: string | number;
27
+ aggregated_items: number;
28
+ metrics: AggregateMetricResult[];
29
+ }
30
+ export interface AggregateTermsResult {
31
+ name: string;
32
+ type: "terms";
33
+ buckets: AggregateBucket[];
34
+ }
35
+ export interface AggregateDateHistogramResult {
36
+ name: string;
37
+ type: "date_histogram";
38
+ buckets: AggregateBucket[];
39
+ }
40
+ export type AggregateResult = AggregateMetricResult | AggregateTermsResult | AggregateDateHistogramResult;
41
+ export interface AggregateQueryResponse {
42
+ results: AggregateResult[];
43
+ total_aggregated_items: number;
44
+ applied_filters: SearchFilter;
45
+ applied_aggregations?: AggregationDefinition[];
46
+ }
47
+ export type SearchResponse<T> = SearchQueryResponse<T> | AggregateQueryResponse;
48
+ //# sourceMappingURL=response.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/search/response.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAI5F,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE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;CAChD;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,mBAAmB,CAAC,CAAC,CAAC,GAAG,sBAAsB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=response.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.interface.js","sourceRoot":"","sources":["../../../src/interfaces/search/response.interface.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobre-npm/library-portal-core",
3
- "version": "0.1.7",
3
+ "version": "0.2.0",
4
4
  "description": "Shared configurations and resources for Portal MFEs",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",