univapay-node 3.0.38 → 3.0.40
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/dist/cjs/resources/CheckoutInfo.d.ts +2 -1
- package/dist/cjs/resources/CheckoutInfo.js.map +1 -1
- package/dist/cjs/resources/Products.d.ts +2 -0
- package/dist/cjs/resources/Products.js +8 -0
- package/dist/cjs/resources/Products.js.map +1 -1
- package/dist/esm/resources/CheckoutInfo.d.ts +2 -1
- package/dist/esm/resources/CheckoutInfo.js.map +1 -1
- package/dist/esm/resources/Products.d.ts +2 -0
- package/dist/esm/resources/Products.js +8 -0
- package/dist/esm/resources/Products.js.map +1 -1
- package/package.json +5 -5
|
@@ -6,7 +6,7 @@ import { BankTransferConfiguration, CardConfigurationItem, ConvenienceConfigurat
|
|
|
6
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
|
-
import { OnlineCallMethod, OSType, RecurringTokenPrivilege } from "./TransactionTokens.js";
|
|
9
|
+
import { OnlineCallMethod, OSType, PaymentType, RecurringTokenPrivilege } from "./TransactionTokens.js";
|
|
10
10
|
export interface CheckoutInfoParams {
|
|
11
11
|
origin?: string;
|
|
12
12
|
}
|
|
@@ -27,6 +27,7 @@ export interface SupportedBrand {
|
|
|
27
27
|
requiresCvv: boolean;
|
|
28
28
|
countriesAllowed?: string[] | null;
|
|
29
29
|
supportedCurrencies: string[];
|
|
30
|
+
paymentType: PaymentType;
|
|
30
31
|
/**
|
|
31
32
|
* @deprecated
|
|
32
33
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckoutInfo.js","sourceRoot":"","sources":["../../../src/resources/CheckoutInfo.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kDAAqE;AAYrE,+CAAuD;
|
|
1
|
+
{"version":3,"file":"CheckoutInfo.js","sourceRoot":"","sources":["../../../src/resources/CheckoutInfo.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kDAAqE;AAYrE,+CAAuD;AAqGvD,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":";;;
|
|
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"}
|
|
@@ -6,7 +6,7 @@ import { BankTransferConfiguration, CardConfigurationItem, ConvenienceConfigurat
|
|
|
6
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
|
-
import { OnlineCallMethod, OSType, RecurringTokenPrivilege } from "./TransactionTokens.js";
|
|
9
|
+
import { OnlineCallMethod, OSType, PaymentType, RecurringTokenPrivilege } from "./TransactionTokens.js";
|
|
10
10
|
export interface CheckoutInfoParams {
|
|
11
11
|
origin?: string;
|
|
12
12
|
}
|
|
@@ -27,6 +27,7 @@ export interface SupportedBrand {
|
|
|
27
27
|
requiresCvv: boolean;
|
|
28
28
|
countriesAllowed?: string[] | null;
|
|
29
29
|
supportedCurrencies: string[];
|
|
30
|
+
paymentType: PaymentType;
|
|
30
31
|
/**
|
|
31
32
|
* @deprecated
|
|
32
33
|
*/
|
|
@@ -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;
|
|
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;AAqGvD,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":"
|
|
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.
|
|
3
|
+
"version": "3.0.40",
|
|
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.
|
|
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.
|
|
52
|
-
"@typescript-eslint/parser": "5.
|
|
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.
|
|
78
|
+
"typescript": "4.9.5",
|
|
79
79
|
"uuid": "9.0.0"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|