@tonder.io/ionic-lite-sdk 0.0.35-beta.2 → 0.0.35-beta.3

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.
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="PrettierConfiguration">
4
+ <option name="myConfigurationMode" value="AUTOMATIC" />
5
+ </component>
6
+ </project>
@@ -32,7 +32,9 @@
32
32
  <change afterPath="$PROJECT_DIR$/src/types/validations.d.ts" afterDir="false" />
33
33
  <change beforePath="$PROJECT_DIR$/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/package-lock.json" afterDir="false" />
34
34
  <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
35
+ <change beforePath="$PROJECT_DIR$/src/classes/errorResponse.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/classes/errorResponse.ts" afterDir="false" />
35
36
  <change beforePath="$PROJECT_DIR$/src/classes/liteCheckout.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/classes/liteCheckout.ts" afterDir="false" />
37
+ <change beforePath="$PROJECT_DIR$/src/helpers/mercadopago.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/helpers/mercadopago.ts" afterDir="false" />
36
38
  <change beforePath="$PROJECT_DIR$/src/helpers/utils.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/helpers/utils.ts" afterDir="false" />
37
39
  <change beforePath="$PROJECT_DIR$/src/types/commons.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/types/commons.ts" afterDir="false" />
38
40
  <change beforePath="$PROJECT_DIR$/src/types/requests.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/types/requests.ts" afterDir="false" />
@@ -77,7 +79,8 @@
77
79
  "node.js.selected.package.eslint": "(autodetect)",
78
80
  "node.js.selected.package.tslint": "(autodetect)",
79
81
  "nodejs_package_manager_path": "npm",
80
- "settings.editor.selected.configurable": "settings.typescriptcompiler",
82
+ "prettierjs.PrettierConfiguration.Package": "/Users/davidhernandezalmagro/Desktop/Tonder/ionic-lite/node_modules/prettier",
83
+ "settings.editor.selected.configurable": "settings.javascript.prettier",
81
84
  "ts.external.directory.path": "/Users/davidhernandezalmagro/Desktop/Tonder/ionic-lite/node_modules/typescript/lib",
82
85
  "vue.rearranger.settings.migration": "true"
83
86
  }
@@ -92,7 +95,7 @@
92
95
  <updated>1724776429568</updated>
93
96
  <workItem from="1724776430626" duration="1847000" />
94
97
  <workItem from="1724790840744" duration="239000" />
95
- <workItem from="1725305433705" duration="16640000" />
98
+ <workItem from="1725305433705" duration="18188000" />
96
99
  </task>
97
100
  <servers />
98
101
  </component>
@@ -113,21 +116,9 @@
113
116
  <component name="XDebuggerManager">
114
117
  <breakpoint-manager>
115
118
  <breakpoints>
116
- <line-breakpoint enabled="true" type="javascript">
117
- <url>file://$PROJECT_DIR$/src/classes/BaseInlineCheckout.ts</url>
118
- <line>123</line>
119
- <properties lambdaOrdinal="-1" />
120
- <option name="timeStamp" value="6" />
121
- </line-breakpoint>
122
- <line-breakpoint enabled="true" type="javascript">
123
- <url>file://$PROJECT_DIR$/src/data/cardApi.ts</url>
124
- <line>8</line>
125
- <properties lambdaOrdinal="-1" />
126
- <option name="timeStamp" value="9" />
127
- </line-breakpoint>
128
119
  <line-breakpoint enabled="true" type="javascript">
129
120
  <url>file://$PROJECT_DIR$/src/classes/liteCheckout.ts</url>
130
- <line>208</line>
121
+ <line>221</line>
131
122
  <properties lambdaOrdinal="-1" />
132
123
  <option name="timeStamp" value="16" />
133
124
  </line-breakpoint>
@@ -1,9 +1,6 @@
1
1
  import { ThreeDSHandler } from "./3dsHandler";
2
- import { Business, IConfigureCheckout, IInlineCheckoutBaseOptions } from "../types/commons";
3
2
  import { ErrorResponse } from "./errorResponse";
4
- import { IItem, IProcessPaymentRequest, IStartCheckoutResponse } from "../types/checkout";
5
- import { StartCheckoutResponse } from "../types/responses";
6
- import { ICustomer } from "../types/customer";
3
+ import { Business, ICustomer, IItem, IInlineCheckoutBaseOptions, IConfigureCheckout, IProcessPaymentRequest, IStartCheckoutResponse, StartCheckoutResponse } from "../types";
7
4
  export declare class BaseInlineCheckout {
8
5
  #private;
9
6
  baseUrl: string;
@@ -29,20 +26,20 @@ export declare class BaseInlineCheckout {
29
26
  metadata: {};
30
27
  card?: {} | undefined;
31
28
  currency?: string;
32
- constructor({ mode, apiKey, apiKeyTonder, returnUrl, callBack }: IInlineCheckoutBaseOptions);
29
+ constructor({ mode, apiKey, apiKeyTonder, returnUrl, callBack, }: IInlineCheckoutBaseOptions);
33
30
  configureCheckout(data: IConfigureCheckout): void;
34
- verify3dsTransaction(): Promise<false | StartCheckoutResponse | ErrorResponse | undefined>;
31
+ verify3dsTransaction(): Promise<false | ErrorResponse | StartCheckoutResponse | undefined>;
35
32
  payment(data: IProcessPaymentRequest): Promise<IStartCheckoutResponse>;
36
33
  _initializeCheckout(): Promise<void>;
37
34
  _checkout(data: any): Promise<any>;
38
35
  _setCartTotal(total: string | number): void;
39
36
  _getCustomer(signal?: AbortSignal | null): Promise<Record<string, any>>;
40
- _handleCheckout({ card, payment_method, customer, isSandbox }: {
37
+ _handleCheckout({ card, payment_method, customer, isSandbox, }: {
41
38
  card?: string;
42
39
  payment_method?: string;
43
40
  customer: Record<string, any>;
44
41
  isSandbox?: boolean;
45
42
  }): Promise<any>;
46
43
  _fetchMerchantData(): Promise<Business | undefined>;
47
- _handle3dsRedirect(response: ErrorResponse | StartCheckoutResponse | false | undefined): Promise<false | StartCheckoutResponse | ErrorResponse | undefined>;
44
+ _handle3dsRedirect(response: ErrorResponse | StartCheckoutResponse | false | undefined): Promise<false | ErrorResponse | StartCheckoutResponse | undefined>;
48
45
  }
@@ -1,4 +1,4 @@
1
- import { IErrorResponse } from "../types/responses";
1
+ import { IErrorResponse } from "../types";
2
2
  export declare class ErrorResponse implements IErrorResponse {
3
3
  code?: string | undefined;
4
4
  body?: string | undefined;
@@ -1,12 +1,6 @@
1
- import { APM, IInlineCheckoutBaseOptions } from "../types/commons";
2
- import { CreateOrderRequest, CreatePaymentRequest, RegisterCustomerCardRequest, StartCheckoutRequest, StartCheckoutFullRequest, StartCheckoutIdRequest, TokensRequest } from "../types/requests";
3
- import { CustomerRegisterResponse, CreateOrderResponse, CreatePaymentResponse, StartCheckoutResponse, RegisterCustomerCardResponse, GetBusinessResponse } from "../types/responses";
4
1
  import { ErrorResponse } from "./errorResponse";
5
2
  import { BaseInlineCheckout } from "./BaseInlineCheckout";
6
- import { ICustomerCardsResponse, ISaveCardRequest, ISaveCardResponse } from "../types/card";
7
- import { IPaymentMethod } from "../types/paymentMethod";
8
- import { ICardFields } from "../types/checkout";
9
- import { ILiteInlineCheckout } from "../types/liteInlineCheckout";
3
+ import { APM, IInlineCheckoutBaseOptions, ILiteInlineCheckout, RegisterCustomerCardResponse, ISaveCardRequest, ICustomerCardsResponse, ISaveCardResponse, IPaymentMethod, GetBusinessResponse, TokensRequest, ICardFields, CustomerRegisterResponse, StartCheckoutFullRequest, CreateOrderRequest, CreatePaymentRequest, StartCheckoutRequest, StartCheckoutResponse, StartCheckoutIdRequest, CreatePaymentResponse, CreateOrderResponse, RegisterCustomerCardRequest } from "../types";
10
4
  declare global {
11
5
  interface Window {
12
6
  OpenPay: any;
@@ -17,16 +11,16 @@ export interface LiteCheckoutConstructor extends IInlineCheckoutBaseOptions {
17
11
  export declare class LiteCheckout extends BaseInlineCheckout implements ILiteInlineCheckout {
18
12
  #private;
19
13
  activeAPMs: APM[];
20
- constructor({ apiKey, mode, returnUrl, callBack, }: LiteCheckoutConstructor);
14
+ constructor({ apiKey, mode, returnUrl, callBack }: LiteCheckoutConstructor);
21
15
  injectCheckout(): Promise<void>;
22
16
  getCustomerCards(): Promise<ICustomerCardsResponse>;
23
17
  saveCustomerCard(card: ISaveCardRequest): Promise<ISaveCardResponse>;
24
18
  removeCustomerCard(skyflowId: string): Promise<string>;
25
19
  getCustomerPaymentMethods(): Promise<IPaymentMethod[]>;
26
20
  getBusiness(): Promise<GetBusinessResponse>;
27
- getSkyflowTokens({ vault_id, vault_url, data }: TokensRequest): Promise<any | ErrorResponse>;
21
+ getSkyflowTokens({ vault_id, vault_url, data, }: TokensRequest): Promise<any | ErrorResponse>;
28
22
  _setCartTotal(total: string): void;
29
- _checkout({ card, payment_method, isSandbox }: {
23
+ _checkout({ card, payment_method, isSandbox, }: {
30
24
  card?: ICardFields | string;
31
25
  payment_method?: string;
32
26
  isSandbox?: boolean;
@@ -54,7 +48,7 @@ export declare class LiteCheckout extends BaseInlineCheckout implements ILiteInl
54
48
  * Use the {@link payment} method
55
49
  */
56
50
  startCheckoutRouter(routerData: StartCheckoutRequest | StartCheckoutIdRequest): Promise<StartCheckoutResponse | ErrorResponse | undefined>;
57
- init3DSRedirect(checkoutResult: ErrorResponse | StartCheckoutResponse): Promise<false | StartCheckoutResponse | ErrorResponse | undefined>;
51
+ init3DSRedirect(checkoutResult: ErrorResponse | StartCheckoutResponse): Promise<false | ErrorResponse | StartCheckoutResponse | undefined>;
58
52
  /**
59
53
  * @deprecated This method is deprecated and will be removed in a future release.
60
54
  * Use the {@link payment} method
@@ -1,2 +1,2 @@
1
- import { GetBusinessResponse } from "../types/responses";
1
+ import { GetBusinessResponse } from "../types";
2
2
  export declare function fetchBusiness(baseUrl: string, apiKey: string, signal: AbortSignal): Promise<GetBusinessResponse>;
@@ -1,4 +1,4 @@
1
- import { ICustomerCardsResponse, ISaveCardResponse, ISaveCardSkyflowRequest } from "../types/card";
1
+ import { ICustomerCardsResponse, ISaveCardResponse, ISaveCardSkyflowRequest } from "../types";
2
2
  export declare function fetchCustomerCards(baseUrl: string, customerToken: string, businessId: string | number, signal?: null): Promise<ICustomerCardsResponse>;
3
3
  export declare function saveCustomerCard(baseUrl: string, customerToken: string, businessId: string | number, data: ISaveCardSkyflowRequest): Promise<ISaveCardResponse>;
4
4
  export declare function removeCustomerCard(baseUrl: string, customerToken: string, skyflowId: string | undefined, businessId: string | number): Promise<string>;
@@ -1,5 +1,4 @@
1
- import { CreateOrderRequest, CreatePaymentRequest } from "../types/requests";
2
- import { IStartCheckoutIdRequest, IStartCheckoutRequest } from "../types/checkout";
1
+ import { CreateOrderRequest, CreatePaymentRequest, IStartCheckoutIdRequest, IStartCheckoutRequest } from "../types";
3
2
  export declare function createOrder(baseUrl: string, apiKey: string, orderItems: CreateOrderRequest): Promise<any>;
4
3
  export declare function createPayment(baseUrl: string, apiKey: string, paymentItems: CreatePaymentRequest): Promise<any>;
5
4
  export declare function startCheckoutRouter(baseUrl: string, apiKey: string, routerItems: IStartCheckoutRequest | IStartCheckoutIdRequest): Promise<any>;
@@ -1,2 +1,2 @@
1
- import { CustomerRegisterResponse } from "../types/responses";
1
+ import { CustomerRegisterResponse } from "../types";
2
2
  export declare function registerOrFetchCustomer(baseUrl: string, apiKey: string, customer: Record<string, any>, signal?: AbortSignal | null): Promise<CustomerRegisterResponse>;
@@ -1,4 +1,4 @@
1
- import { IPaymentMethodResponse } from "../types/paymentMethod";
1
+ import { IPaymentMethodResponse } from "../types";
2
2
  export declare function fetchCustomerAPMs(baseUrl: string, apiKey: string, params?: {
3
3
  status: string;
4
4
  pagesize: string;
@@ -19,4 +19,4 @@ declare function formatPublicErrorResponse(data: Record<string, any>, error: any
19
19
  };
20
20
  declare const clearSpace: (text: string) => string;
21
21
  declare const getCardType: (scheme: string) => "https://d35a75syrgujp0.cloudfront.net/cards/visa.png" | "https://d35a75syrgujp0.cloudfront.net/cards/mastercard.png" | "https://d35a75syrgujp0.cloudfront.net/cards/american_express.png" | "https://d35a75syrgujp0.cloudfront.net/cards/default_card.png";
22
- export { buildErrorResponseFromCatch, buildErrorResponse, getCardType, formatPublicErrorResponse, clearSpace };
22
+ export { buildErrorResponseFromCatch, buildErrorResponse, getCardType, formatPublicErrorResponse, clearSpace, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonder.io/ionic-lite-sdk",
3
- "version": "0.0.35-beta.2",
3
+ "version": "0.0.35-beta.3",
4
4
  "description": "Tonder ionic lite SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",