univapay-node 3.0.37 → 3.0.39

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,7 +3,7 @@
3
3
  */
4
4
  import { AuthParams, SendData } from "../api/RestAPI.js";
5
5
  import { BankTransferConfiguration, CardConfigurationItem, ConvenienceConfigurationItem, OnlineConfigurationItem, PaidyConfigurationItem, QRScanConfigurationItem } from "./common/Configuration.js";
6
- import { CardBrand, OnlineBrand, ProcessingMode } from "./common/enums.js";
6
+ import { BankTransferBrand, CardBrand, OnlineBrand, ProcessingMode } from "./common/enums.js";
7
7
  import { AmountWithCurrency } from "./common/types.js";
8
8
  import { Resource } from "./Resource.js";
9
9
  import { OnlineCallMethod, OSType, RecurringTokenPrivilege } from "./TransactionTokens.js";
@@ -20,14 +20,21 @@ export interface CheckoutColors {
20
20
  baseText: string;
21
21
  }
22
22
  export interface SupportedBrand {
23
- cardBrand?: CardBrand;
24
- onlineBrand?: OnlineBrand;
23
+ brand: CardBrand | OnlineBrand | "paidy" | BankTransferBrand;
25
24
  supportAuthCapture: boolean;
26
25
  requiresFullName: boolean;
27
26
  supportDynamicDescriptor: boolean;
28
27
  requiresCvv: boolean;
29
- countriesAllowed?: string[];
28
+ countriesAllowed?: string[] | null;
30
29
  supportedCurrencies: string[];
30
+ /**
31
+ * @deprecated
32
+ */
33
+ cardBrand?: CardBrand;
34
+ /**
35
+ * @deprecated
36
+ */
37
+ onlineBrand?: OnlineBrand;
31
38
  }
32
39
  export interface CheckoutInfoItem {
33
40
  mode: ProcessingMode;
@@ -1 +1 @@
1
- {"version":3,"file":"CheckoutInfo.js","sourceRoot":"","sources":["../../../src/resources/CheckoutInfo.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kDAAqE;AAYrE,+CAAuD;AA2FvD,MAAa,YAAa,SAAQ,sBAAQ;IAEtC,GAAG,CAAC,IAAmC,EAAE,IAAiB;QACtD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,uBAAU,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;QAC5E,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACjC,CAAC;IAGD,OAAO,CACH,KAAkB,EAClB,IAAyC,EACzC,IAAiB;QAEjB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,CAAC,uBAAU,CAAC,IAAI,EAAE,gCAAgC,CAAC,CAAC;QACrG,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAChD,CAAC;CACJ;AAhBD,oCAgBC"}
1
+ {"version":3,"file":"CheckoutInfo.js","sourceRoot":"","sources":["../../../src/resources/CheckoutInfo.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kDAAqE;AAYrE,+CAAuD;AAoGvD,MAAa,YAAa,SAAQ,sBAAQ;IAEtC,GAAG,CAAC,IAAmC,EAAE,IAAiB;QACtD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,uBAAU,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;QAC5E,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACjC,CAAC;IAGD,OAAO,CACH,KAAkB,EAClB,IAAyC,EACzC,IAAiB;QAEjB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,CAAC,uBAAU,CAAC,IAAI,EAAE,gCAAgC,CAAC,CAAC;QACrG,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAChD,CAAC;CACJ;AAhBD,oCAgBC"}
@@ -32,4 +32,6 @@ export declare class Products extends CRUDResource {
32
32
  static routeBase: string;
33
33
  private _get?;
34
34
  get(id: string, data?: SendData<void>, auth?: AuthParams): Promise<ResponseProduct>;
35
+ private _getByCode?;
36
+ getByCode(code: string, data?: SendData<void>, auth?: AuthParams): Promise<ResponseProduct>;
35
37
  }
@@ -1,12 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Products = void 0;
4
+ /**
5
+ * @module Resources/Products
6
+ */
7
+ const RestAPI_js_1 = require("../api/RestAPI.js");
4
8
  const CRUDResource_js_1 = require("./CRUDResource.js");
5
9
  class Products extends CRUDResource_js_1.CRUDResource {
6
10
  get(id, data, auth) {
7
11
  this._get = this._get ?? this._getRoute();
8
12
  return this._get(data, auth, { id });
9
13
  }
14
+ getByCode(code, data, auth) {
15
+ this._getByCode = this._getByCode ?? this.defineRoute(RestAPI_js_1.HTTPMethod.GET, "/checkout/products/code/:code");
16
+ return this._getByCode(data, auth, { code });
17
+ }
10
18
  }
11
19
  exports.Products = Products;
12
20
  Products.routeBase = "/checkout/products";
@@ -1 +1 @@
1
- {"version":3,"file":"Products.js","sourceRoot":"","sources":["../../../src/resources/Products.ts"],"names":[],"mappings":";;;AAKA,uDAAiD;AAiCjD,MAAa,QAAS,SAAQ,8BAAY;IAItC,GAAG,CAAC,EAAU,EAAE,IAAqB,EAAE,IAAiB;QACpD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;QAC1C,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACzC,CAAC;;AAPL,4BAQC;AAPU,kBAAS,GAAG,oBAAoB,CAAC"}
1
+ {"version":3,"file":"Products.js","sourceRoot":"","sources":["../../../src/resources/Products.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,kDAAqE;AAErE,uDAAiD;AAiCjD,MAAa,QAAS,SAAQ,8BAAY;IAItC,GAAG,CAAC,EAAU,EAAE,IAAqB,EAAE,IAAiB;QACpD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;QAC1C,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACzC,CAAC;IAGD,SAAS,CAAC,IAAY,EAAE,IAAqB,EAAE,IAAiB;QAC5D,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,WAAW,CAAC,uBAAU,CAAC,GAAG,EAAE,+BAA+B,CAAC,CAAC;QACvG,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IACjD,CAAC;;AAbL,4BAcC;AAbU,kBAAS,GAAG,oBAAoB,CAAC"}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { AuthParams, SendData } from "../api/RestAPI.js";
5
5
  import { BankTransferConfiguration, CardConfigurationItem, ConvenienceConfigurationItem, OnlineConfigurationItem, PaidyConfigurationItem, QRScanConfigurationItem } from "./common/Configuration.js";
6
- import { CardBrand, OnlineBrand, ProcessingMode } from "./common/enums.js";
6
+ import { BankTransferBrand, CardBrand, OnlineBrand, ProcessingMode } from "./common/enums.js";
7
7
  import { AmountWithCurrency } from "./common/types.js";
8
8
  import { Resource } from "./Resource.js";
9
9
  import { OnlineCallMethod, OSType, RecurringTokenPrivilege } from "./TransactionTokens.js";
@@ -20,14 +20,21 @@ export interface CheckoutColors {
20
20
  baseText: string;
21
21
  }
22
22
  export interface SupportedBrand {
23
- cardBrand?: CardBrand;
24
- onlineBrand?: OnlineBrand;
23
+ brand: CardBrand | OnlineBrand | "paidy" | BankTransferBrand;
25
24
  supportAuthCapture: boolean;
26
25
  requiresFullName: boolean;
27
26
  supportDynamicDescriptor: boolean;
28
27
  requiresCvv: boolean;
29
- countriesAllowed?: string[];
28
+ countriesAllowed?: string[] | null;
30
29
  supportedCurrencies: string[];
30
+ /**
31
+ * @deprecated
32
+ */
33
+ cardBrand?: CardBrand;
34
+ /**
35
+ * @deprecated
36
+ */
37
+ onlineBrand?: OnlineBrand;
31
38
  }
32
39
  export interface CheckoutInfoItem {
33
40
  mode: ProcessingMode;
@@ -1 +1 @@
1
- {"version":3,"file":"CheckoutInfo.js","sourceRoot":"","sources":["../../../src/resources/CheckoutInfo.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAc,UAAU,EAAY,MAAM,mBAAmB,CAAC;AAYrE,OAAO,EAAgB,QAAQ,EAAE,MAAM,eAAe,CAAC;AA2FvD,MAAM,OAAO,YAAa,SAAQ,QAAQ;IAEtC,GAAG,CAAC,IAAmC,EAAE,IAAiB;QACtD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;QAC5E,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACjC,CAAC;IAGD,OAAO,CACH,KAAkB,EAClB,IAAyC,EACzC,IAAiB;QAEjB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,EAAE,gCAAgC,CAAC,CAAC;QACrG,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAChD,CAAC;CACJ"}
1
+ {"version":3,"file":"CheckoutInfo.js","sourceRoot":"","sources":["../../../src/resources/CheckoutInfo.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAc,UAAU,EAAY,MAAM,mBAAmB,CAAC;AAYrE,OAAO,EAAgB,QAAQ,EAAE,MAAM,eAAe,CAAC;AAoGvD,MAAM,OAAO,YAAa,SAAQ,QAAQ;IAEtC,GAAG,CAAC,IAAmC,EAAE,IAAiB;QACtD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;QAC5E,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACjC,CAAC;IAGD,OAAO,CACH,KAAkB,EAClB,IAAyC,EACzC,IAAiB;QAEjB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,EAAE,gCAAgC,CAAC,CAAC;QACrG,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAChD,CAAC;CACJ"}
@@ -32,4 +32,6 @@ export declare class Products extends CRUDResource {
32
32
  static routeBase: string;
33
33
  private _get?;
34
34
  get(id: string, data?: SendData<void>, auth?: AuthParams): Promise<ResponseProduct>;
35
+ private _getByCode?;
36
+ getByCode(code: string, data?: SendData<void>, auth?: AuthParams): Promise<ResponseProduct>;
35
37
  }
@@ -1,9 +1,17 @@
1
+ /**
2
+ * @module Resources/Products
3
+ */
4
+ import { HTTPMethod } from "../api/RestAPI.js";
1
5
  import { CRUDResource } from "./CRUDResource.js";
2
6
  export class Products extends CRUDResource {
3
7
  get(id, data, auth) {
4
8
  this._get = this._get ?? this._getRoute();
5
9
  return this._get(data, auth, { id });
6
10
  }
11
+ getByCode(code, data, auth) {
12
+ this._getByCode = this._getByCode ?? this.defineRoute(HTTPMethod.GET, "/checkout/products/code/:code");
13
+ return this._getByCode(data, auth, { code });
14
+ }
7
15
  }
8
16
  Products.routeBase = "/checkout/products";
9
17
  //# sourceMappingURL=Products.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Products.js","sourceRoot":"","sources":["../../../src/resources/Products.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAiCjD,MAAM,OAAO,QAAS,SAAQ,YAAY;IAItC,GAAG,CAAC,EAAU,EAAE,IAAqB,EAAE,IAAiB;QACpD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;QAC1C,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACzC,CAAC;;AANM,kBAAS,GAAG,oBAAoB,CAAC"}
1
+ {"version":3,"file":"Products.js","sourceRoot":"","sources":["../../../src/resources/Products.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAc,UAAU,EAAY,MAAM,mBAAmB,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAiCjD,MAAM,OAAO,QAAS,SAAQ,YAAY;IAItC,GAAG,CAAC,EAAU,EAAE,IAAqB,EAAE,IAAiB;QACpD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;QAC1C,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACzC,CAAC;IAGD,SAAS,CAAC,IAAY,EAAE,IAAqB,EAAE,IAAiB;QAC5D,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,EAAE,+BAA+B,CAAC,CAAC;QACvG,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IACjD,CAAC;;AAZM,kBAAS,GAAG,oBAAoB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "univapay-node",
3
- "version": "3.0.37",
3
+ "version": "3.0.39",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,12 +44,12 @@
44
44
  "@types/fetch-mock": "7.3.5",
45
45
  "@types/jsonwebtoken": "9.0.1",
46
46
  "@types/mocha": "10.0.1",
47
- "@types/node": "18.11.18",
47
+ "@types/node": "18.11.19",
48
48
  "@types/sinon": "10.0.13",
49
49
  "@types/sinon-chai": "3.2.9",
50
50
  "@types/uuid": "9.0.0",
51
- "@typescript-eslint/eslint-plugin": "5.49.0",
52
- "@typescript-eslint/parser": "5.49.0",
51
+ "@typescript-eslint/eslint-plugin": "5.51.0",
52
+ "@typescript-eslint/parser": "5.51.0",
53
53
  "c8": "^7.12.0",
54
54
  "chai": "4.3.7",
55
55
  "chai-arrays": "2.2.0",
@@ -75,7 +75,7 @@
75
75
  "ts-node": "10.9.1",
76
76
  "typedoc": "0.23.24",
77
77
  "typedoc-plugin-internal-external": "2.2.0",
78
- "typescript": "4.9.4",
78
+ "typescript": "4.9.5",
79
79
  "uuid": "9.0.0"
80
80
  },
81
81
  "dependencies": {