univapay-node 3.0.10 → 3.0.13

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.
@@ -78,11 +78,9 @@ declare type CheckoutInfoBrandItemBrand = {
78
78
  };
79
79
  };
80
80
  export declare type CheckoutInfoBrandItem = {
81
- result: {
82
- service: string;
83
- serviceName: string;
84
- brands: CheckoutInfoBrandItemBrand[];
85
- };
81
+ service: OnlineBrand;
82
+ serviceName: string;
83
+ brands: CheckoutInfoBrandItemBrand[];
86
84
  };
87
85
  export declare type ResponseCheckoutInfo = CheckoutInfoItem;
88
86
  export declare class CheckoutInfo extends Resource {
@@ -1 +1 @@
1
- {"version":3,"file":"CheckoutInfo.js","sourceRoot":"","sources":["../../../src/resources/CheckoutInfo.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kDAAqE;AAYrE,+CAAuD;AA6FvD,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;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"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @module Resources/Products
3
+ */
4
+ import { AuthParams, SendData } from "../api/RestAPI.js";
5
+ import { CRUDItemsResponse, CRUDResource } from "./CRUDResource.js";
6
+ import { TransactionTokenType } from "./TransactionTokens.js";
7
+ export declare type LinkProductListItem = {
8
+ id: string;
9
+ merchantId: string;
10
+ storeId: string;
11
+ name: string;
12
+ description?: string | null;
13
+ amount: number;
14
+ currency: string;
15
+ shippingFees?: number | null;
16
+ tokenType: TransactionTokenType;
17
+ createdOn: string;
18
+ updatedOn: string;
19
+ code: string | null;
20
+ quantity: number;
21
+ };
22
+ export declare type ResponseLinkProducts = CRUDItemsResponse<LinkProductListItem> & {
23
+ hasMore: false;
24
+ };
25
+ export declare class LinksProducts extends CRUDResource {
26
+ static routeBase: string;
27
+ private _list?;
28
+ list(linkId: string, data?: SendData<{
29
+ [k: string]: never;
30
+ }>, auth?: AuthParams): Promise<ResponseLinkProducts>;
31
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ /**
3
+ * @module Resources/Products
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LinksProducts = void 0;
7
+ const CRUDResource_js_1 = require("./CRUDResource.js");
8
+ class LinksProducts extends CRUDResource_js_1.CRUDResource {
9
+ list(linkId, data, auth) {
10
+ this._list = this._list ?? this._listRoute();
11
+ return this._list(data, auth, { linkId });
12
+ }
13
+ }
14
+ exports.LinksProducts = LinksProducts;
15
+ LinksProducts.routeBase = "/checkout/links/:linkId/products";
16
+ //# sourceMappingURL=LinksProducts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinksProducts.js","sourceRoot":"","sources":["../../../src/resources/LinksProducts.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAGH,uDAAoE;AAuBpE,MAAa,aAAc,SAAQ,8BAAY;IAI3C,IAAI,CAAC,MAAc,EAAE,IAAuC,EAAE,IAAiB;QAC3E,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;QAC7C,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAC9C,CAAC;;AAPL,sCAQC;AAPU,uBAAS,GAAG,kCAAkC,CAAC"}
@@ -185,16 +185,16 @@ export interface ConfigurationParams {
185
185
  logoUrl?: string;
186
186
  bankTransferConfiguration?: Partial<BankTransferConfiguration>;
187
187
  cardConfiguration?: Partial<CardConfigurationItem>;
188
- qrScanConfiguration?: Partial<QRScanConfigurationItem>;
189
- qrMerchantConfiguration?: Partial<QRMerchantConfigurationItem>;
188
+ checkoutConfiguration?: Partial<CheckoutConfiguration>;
190
189
  convenienceConfiguration?: Partial<ConvenienceConfigurationItem>;
190
+ descriptorProvidedConfiguration?: Partial<DescriptorProvidedConfiguration>;
191
+ installmentsConfiguration?: Partial<InstallmentsConfigurationItem>;
191
192
  onlineConfiguration?: Partial<OnlineConfigurationItem>;
192
193
  paidyConfiguration?: Partial<PaidyConfigurationItem>;
193
- installmentsConfiguration?: Partial<InstallmentsConfigurationItem>;
194
+ qrScanConfiguration?: Partial<QRScanConfigurationItem>;
195
+ qrMerchantConfiguration?: Partial<QRMerchantConfigurationItem>;
194
196
  recurringTokenConfiguration?: Partial<RecurringTokenConfiguration>;
195
- descriptorProvidedConfiguration?: Partial<DescriptorProvidedConfiguration>;
196
197
  subscriptionConfiguration?: Partial<SubscriptionsConfiguration>;
197
- checkoutConfiguration?: Partial<CheckoutConfiguration>;
198
198
  securityConfiguration?: Partial<SecurityConfiguration>;
199
199
  }
200
200
  export declare type ConfigurationCreateParams = ConfigurationParams;
@@ -9,8 +9,15 @@ declare type CheckoutConfiguration = {
9
9
  enabled: boolean;
10
10
  };
11
11
  };
12
+ declare type ConvenienceConfiguration = {
13
+ /**
14
+ * Period (e.g.: P1DT9H)
15
+ */
16
+ expiration: string;
17
+ };
12
18
  export interface PlatformUserDefaults {
13
19
  bankTransferConfiguration: BankTransferConfiguration;
20
+ convenienceConfiguration: ConvenienceConfiguration;
14
21
  percentFee: number;
15
22
  transferSchedule: TransferScheduleItem;
16
23
  flatFees: AmountWithCurrency[];
@@ -78,11 +78,9 @@ declare type CheckoutInfoBrandItemBrand = {
78
78
  };
79
79
  };
80
80
  export declare type CheckoutInfoBrandItem = {
81
- result: {
82
- service: string;
83
- serviceName: string;
84
- brands: CheckoutInfoBrandItemBrand[];
85
- };
81
+ service: OnlineBrand;
82
+ serviceName: string;
83
+ brands: CheckoutInfoBrandItemBrand[];
86
84
  };
87
85
  export declare type ResponseCheckoutInfo = CheckoutInfoItem;
88
86
  export declare class CheckoutInfo extends Resource {
@@ -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,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AI,EAAE,gCAAgC,CAAC,CAAC;QACrG,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAChD,CAAC;CACJ"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @module Resources/Products
3
+ */
4
+ import { AuthParams, SendData } from "../api/RestAPI.js";
5
+ import { CRUDItemsResponse, CRUDResource } from "./CRUDResource.js";
6
+ import { TransactionTokenType } from "./TransactionTokens.js";
7
+ export declare type LinkProductListItem = {
8
+ id: string;
9
+ merchantId: string;
10
+ storeId: string;
11
+ name: string;
12
+ description?: string | null;
13
+ amount: number;
14
+ currency: string;
15
+ shippingFees?: number | null;
16
+ tokenType: TransactionTokenType;
17
+ createdOn: string;
18
+ updatedOn: string;
19
+ code: string | null;
20
+ quantity: number;
21
+ };
22
+ export declare type ResponseLinkProducts = CRUDItemsResponse<LinkProductListItem> & {
23
+ hasMore: false;
24
+ };
25
+ export declare class LinksProducts extends CRUDResource {
26
+ static routeBase: string;
27
+ private _list?;
28
+ list(linkId: string, data?: SendData<{
29
+ [k: string]: never;
30
+ }>, auth?: AuthParams): Promise<ResponseLinkProducts>;
31
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @module Resources/Products
3
+ */
4
+ import { CRUDResource } from "./CRUDResource.js";
5
+ export class LinksProducts extends CRUDResource {
6
+ list(linkId, data, auth) {
7
+ this._list = this._list ?? this._listRoute();
8
+ return this._list(data, auth, { linkId });
9
+ }
10
+ }
11
+ LinksProducts.routeBase = "/checkout/links/:linkId/products";
12
+ //# sourceMappingURL=LinksProducts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinksProducts.js","sourceRoot":"","sources":["../../../src/resources/LinksProducts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAqB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAuBpE,MAAM,OAAO,aAAc,SAAQ,YAAY;IAI3C,IAAI,CAAC,MAAc,EAAE,IAAuC,EAAE,IAAiB;QAC3E,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;QAC7C,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAC9C,CAAC;;AANM,uBAAS,GAAG,kCAAkC,CAAC"}
@@ -185,16 +185,16 @@ export interface ConfigurationParams {
185
185
  logoUrl?: string;
186
186
  bankTransferConfiguration?: Partial<BankTransferConfiguration>;
187
187
  cardConfiguration?: Partial<CardConfigurationItem>;
188
- qrScanConfiguration?: Partial<QRScanConfigurationItem>;
189
- qrMerchantConfiguration?: Partial<QRMerchantConfigurationItem>;
188
+ checkoutConfiguration?: Partial<CheckoutConfiguration>;
190
189
  convenienceConfiguration?: Partial<ConvenienceConfigurationItem>;
190
+ descriptorProvidedConfiguration?: Partial<DescriptorProvidedConfiguration>;
191
+ installmentsConfiguration?: Partial<InstallmentsConfigurationItem>;
191
192
  onlineConfiguration?: Partial<OnlineConfigurationItem>;
192
193
  paidyConfiguration?: Partial<PaidyConfigurationItem>;
193
- installmentsConfiguration?: Partial<InstallmentsConfigurationItem>;
194
+ qrScanConfiguration?: Partial<QRScanConfigurationItem>;
195
+ qrMerchantConfiguration?: Partial<QRMerchantConfigurationItem>;
194
196
  recurringTokenConfiguration?: Partial<RecurringTokenConfiguration>;
195
- descriptorProvidedConfiguration?: Partial<DescriptorProvidedConfiguration>;
196
197
  subscriptionConfiguration?: Partial<SubscriptionsConfiguration>;
197
- checkoutConfiguration?: Partial<CheckoutConfiguration>;
198
198
  securityConfiguration?: Partial<SecurityConfiguration>;
199
199
  }
200
200
  export declare type ConfigurationCreateParams = ConfigurationParams;
@@ -9,8 +9,15 @@ declare type CheckoutConfiguration = {
9
9
  enabled: boolean;
10
10
  };
11
11
  };
12
+ declare type ConvenienceConfiguration = {
13
+ /**
14
+ * Period (e.g.: P1DT9H)
15
+ */
16
+ expiration: string;
17
+ };
12
18
  export interface PlatformUserDefaults {
13
19
  bankTransferConfiguration: BankTransferConfiguration;
20
+ convenienceConfiguration: ConvenienceConfiguration;
14
21
  percentFee: number;
15
22
  transferSchedule: TransferScheduleItem;
16
23
  flatFees: AmountWithCurrency[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "univapay-node",
3
- "version": "3.0.10",
3
+ "version": "3.0.13",
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": "8.5.8",
46
46
  "@types/mocha": "9.1.1",
47
- "@types/node": "18.0.6",
48
- "@types/sinon": "10.0.12",
47
+ "@types/node": "18.6.1",
48
+ "@types/sinon": "10.0.13",
49
49
  "@types/sinon-chai": "3.2.8",
50
50
  "@types/uuid": "8.3.4",
51
- "@typescript-eslint/eslint-plugin": "5.30.7",
52
- "@typescript-eslint/parser": "5.30.7",
51
+ "@typescript-eslint/eslint-plugin": "5.31.0",
52
+ "@typescript-eslint/parser": "5.31.0",
53
53
  "c8": "^7.12.0",
54
54
  "chai": "4.3.6",
55
55
  "chai-arrays": "2.2.0",
@@ -73,7 +73,7 @@
73
73
  "sinon": "14.0.0",
74
74
  "sinon-chai": "3.7.0",
75
75
  "ts-node": "10.9.1",
76
- "typedoc": "0.23.8",
76
+ "typedoc": "0.23.9",
77
77
  "typedoc-plugin-internal-external": "2.2.0",
78
78
  "typescript": "4.7.4",
79
79
  "uuid": "8.3.2"