@zorionapp/gg-toolkit 4.80.2 → 4.81.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zorionapp/gg-toolkit",
3
- "version": "4.80.2",
3
+ "version": "4.81.1",
4
4
  "peerDependencies": {
5
5
  "@horizon-republic/nominal-types": "^2.0.5",
6
6
  "@mikro-orm/core": "^5.0.0 || ^6.0.0",
package/util/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from './compact-object';
2
2
  export * from './response-wrapper';
3
3
  export * from './payment-request-utils';
4
4
  export * from './operation-utils';
5
+ export * from './mop-utils';
package/util/index.js CHANGED
@@ -5,4 +5,5 @@ tslib_1.__exportStar(require("./compact-object"), exports);
5
5
  tslib_1.__exportStar(require("./response-wrapper"), exports);
6
6
  tslib_1.__exportStar(require("./payment-request-utils"), exports);
7
7
  tslib_1.__exportStar(require("./operation-utils"), exports);
8
+ tslib_1.__exportStar(require("./mop-utils"), exports);
8
9
  //# sourceMappingURL=index.js.map
package/util/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/gg-toolkit/util/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,6DAAmC;AACnC,kEAAwC;AACxC,4DAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/gg-toolkit/util/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,6DAAmC;AACnC,kEAAwC;AACxC,4DAAkC;AAClC,sDAA4B"}
@@ -0,0 +1,5 @@
1
+ import { Mop } from '../nominal-type';
2
+ import { Payment } from '../enum';
3
+ export declare class MopUtils {
4
+ static getMethodTypeByMopType(mop: Mop, paymentMethodType?: Payment.MethodType): Payment.MethodType;
5
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MopUtils = void 0;
4
+ const enum_1 = require("../enum");
5
+ class MopUtils {
6
+ static getMethodTypeByMopType(mop, paymentMethodType) {
7
+ if (paymentMethodType) {
8
+ if (mop.getType() === enum_1.Mop.Type.Card && paymentMethodType === enum_1.Payment.MethodType.Token) {
9
+ return enum_1.Payment.MethodType.Token;
10
+ }
11
+ if (mop.getType() === enum_1.Mop.Type.Card && paymentMethodType === enum_1.Payment.MethodType.Card) {
12
+ return enum_1.Payment.MethodType.Card;
13
+ }
14
+ }
15
+ return mop.getPaymentMethodType();
16
+ }
17
+ }
18
+ exports.MopUtils = MopUtils;
19
+ //# sourceMappingURL=mop-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mop-utils.js","sourceRoot":"","sources":["../../../../libs/gg-toolkit/util/mop-utils.ts"],"names":[],"mappings":";;;AACA,kCAAgD;AAEhD,MAAa,QAAQ;IACZ,MAAM,CAAC,sBAAsB,CAAC,GAAQ,EAAE,iBAAsC;QACnF,IAAI,iBAAiB,EAAE,CAAC;YACtB,IAAI,GAAG,CAAC,OAAO,EAAE,KAAK,UAAK,CAAC,IAAI,CAAC,IAAI,IAAI,iBAAiB,KAAK,cAAO,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;gBACxF,OAAO,cAAO,CAAC,UAAU,CAAC,KAAK,CAAC;YAClC,CAAC;YAED,IAAI,GAAG,CAAC,OAAO,EAAE,KAAK,UAAK,CAAC,IAAI,CAAC,IAAI,IAAI,iBAAiB,KAAK,cAAO,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;gBACvF,OAAO,cAAO,CAAC,UAAU,CAAC,IAAI,CAAC;YACjC,CAAC;QACH,CAAC;QAED,OAAO,GAAG,CAAC,oBAAoB,EAAE,CAAC;IACpC,CAAC;CACF;AAdD,4BAcC"}