@bootpay/client-js 5.0.2-beta.2 → 5.0.2

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.
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "@bootpay/client-js",
3
- "version": "5.0.2-beta.2",
3
+ "version": "5.0.2",
4
4
  "main": "dist/index.es.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "styles": "dist/index.css",
@@ -10,7 +10,7 @@ declare const _default: {
10
10
  "deploy": "NODE_ENV=production ./node_modules/.bin/webpack --output-path=./dist --mode=production && gzip -kf dist/*.min.js && ./webview.sh $npm_package_version"
11
11
  },
12
12
  "dependencies": {
13
- "typescript": "^5.1.6"
13
+ "typescript": "^5.5.4"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@types/ws": "^8.5.5",
@@ -0,0 +1,7 @@
1
+ declare global {
2
+ interface Window {
3
+ BootpayEx: BootpayExInterface;
4
+ }
5
+ }
6
+ declare const BootpayEx: BootpayExInterface;
7
+ export default BootpayEx;
@@ -1,8 +1,9 @@
1
1
  import Bootpay, { BootpayInterface } from './bootpay';
2
2
  import BootpaySDK from './bootpay-sdk';
3
3
  import BootpayEnvironment from "./bootpay-environment";
4
+ import BootpayEx from './bootpay-ex';
4
5
  import BootpayWidget, { BootpayWidgetInterface } from './bootpay-widget';
5
- export { Bootpay, BootpaySDK, BootpayEnvironment, BootpayWidget };
6
+ export { Bootpay, BootpaySDK, BootpayEnvironment, BootpayWidget, BootpayEx };
6
7
  export default Bootpay;
7
8
  import { UserTokenTemplateManager } from './lib/template/user-token';
8
9
  import { BiometricDataModel, RequestPaymentWalletModel } from './models/bootpay-sdk-interface';
@@ -28,6 +29,7 @@ declare global {
28
29
  Bootpay: BootpayInterface;
29
30
  BootpayWidget: BootpayWidgetInterface;
30
31
  BootpaySDK: BootpaySdkInterface;
32
+ BootpayEx: BootpayExInterface;
31
33
  CustomEvent: any;
32
34
  }
33
35
  }
@@ -0,0 +1,8 @@
1
+ import { BootpayManager } from '../support/bootpay-manager';
2
+ export declare class BootpayExWindowManager extends BootpayManager {
3
+ constructor();
4
+ initialize(): void;
5
+ render(el: string, data: RequestExModel): void;
6
+ hideAlert(eventName?: string): void;
7
+ }
8
+ export declare const BootpayExWindow: BootpayExWindowManager;
@@ -0,0 +1,38 @@
1
+ import { BootpayWindowEvent } from '../../support/event';
2
+ declare class BootpayExEventManager extends BootpayWindowEvent {
3
+ $eventPrefix: string;
4
+ $messageEventName: string;
5
+ $routerEventName: string;
6
+ $exStore: ExStoreModel;
7
+ constructor();
8
+ bind(): void;
9
+ hookFunction(hook: string): {
10
+ parameterPrefix: string;
11
+ updateParameters({ parameters, replace }: {
12
+ parameters: any;
13
+ replace: any;
14
+ }): void;
15
+ } | {
16
+ resize: (data: ExResizeData) => void;
17
+ showAlert({ message, title, options }: {
18
+ message: any;
19
+ title: any;
20
+ options: any;
21
+ }): void;
22
+ hideAlert(): void;
23
+ showOverlayiFrame({ url, options }: {
24
+ url: any;
25
+ options: any;
26
+ }): void;
27
+ hideOverlayiFrame(): void;
28
+ responseOverlayiFrame({ event, data }: {
29
+ event: any;
30
+ data: any;
31
+ }): void;
32
+ addFavicon({ url }: {
33
+ url: any;
34
+ }): void;
35
+ };
36
+ }
37
+ export declare const BootpayExWindowEvent: BootpayExEventManager;
38
+ export {};
@@ -0,0 +1,7 @@
1
+ export declare const ExWindowRouter: {
2
+ parameterPrefix: string;
3
+ updateParameters({ parameters, replace }: {
4
+ parameters: any;
5
+ replace: any;
6
+ }): void;
7
+ };
@@ -0,0 +1,21 @@
1
+ export declare const ExWindowEvent: {
2
+ resize: (data: ExResizeData) => void;
3
+ showAlert({ message, title, options }: {
4
+ message: any;
5
+ title: any;
6
+ options: any;
7
+ }): void;
8
+ hideAlert(): void;
9
+ showOverlayiFrame({ url, options }: {
10
+ url: any;
11
+ options: any;
12
+ }): void;
13
+ hideOverlayiFrame(): void;
14
+ responseOverlayiFrame({ event, data }: {
15
+ event: any;
16
+ data: any;
17
+ }): void;
18
+ addFavicon({ url }: {
19
+ url: any;
20
+ }): void;
21
+ };
@@ -0,0 +1,33 @@
1
+ import { TemplateManager } from '../../support/template-manager';
2
+ declare class TemplateExManager extends TemplateManager {
3
+ $template: string;
4
+ $iFrameId: string;
5
+ $iFrameContainerId: string;
6
+ $exOverlayId: string;
7
+ $exOverlayContainerId: string;
8
+ $exStore: ExStoreModel;
9
+ constructor();
10
+ render(): void;
11
+ templateRender(): void;
12
+ resize(resizeData: any): void;
13
+ postMessage(event: string, data: any): void;
14
+ showAlert(message: string, title?: string, options?: {
15
+ type: string;
16
+ confirmText: string;
17
+ cancelText: string;
18
+ }): void;
19
+ hideAlert(eventName?: string): void;
20
+ showOverlayiFrameToUrl(url: string, options?: {
21
+ width: string;
22
+ height: string;
23
+ }): void;
24
+ hideOverlayiFrame(): void;
25
+ alertTypeTemplate(options?: {
26
+ type: string;
27
+ confirmText: string;
28
+ cancelText: string;
29
+ }): string;
30
+ shopUrl(): string;
31
+ }
32
+ export declare const TemplateEx: TemplateExManager;
33
+ export {};
@@ -1,24 +1,18 @@
1
1
  import { ResponseBootpayWidgetTermsModel } from './bootpay-widget-interface';
2
- /**
3
- * 결제 요청 모델
4
- * Comment by GOSOMI
5
- * @date: 2021-04-13
6
- */
7
- export interface RequestPaymentModel {
2
+ interface RequestPaymentBaseModel {
8
3
  ver?: string;
9
4
  sdk?: boolean;
10
5
  sdk_version?: string;
11
6
  sdk_type?: number;
12
7
  application_id?: string;
13
8
  pg?: string;
14
- method?: string | Array<string>;
9
+ method?: string | string[];
15
10
  order_name: string;
16
11
  price: number;
17
12
  tax_free?: number;
18
13
  deposit_price?: number;
19
14
  platform_type?: number;
20
15
  currency?: string;
21
- order_id: string;
22
16
  uuid?: string;
23
17
  sk?: string;
24
18
  ti?: number;
@@ -30,7 +24,7 @@ export interface RequestPaymentModel {
30
24
  redirect_url?: string;
31
25
  metadata?: any;
32
26
  user?: UserModel;
33
- items?: Array<ItemModel>;
27
+ items?: ItemModel[];
34
28
  extra?: ExtraModel;
35
29
  env?: EnvironmentModel;
36
30
  terms?: ResponseBootpayWidgetTermsModel[];
@@ -38,12 +32,20 @@ export interface RequestPaymentModel {
38
32
  widget?: 1 | 0;
39
33
  locale?: string;
40
34
  }
35
+ /**
36
+ * 결제 요청 모델
37
+ * Comment by GOSOMI
38
+ * @date: 2021-04-13
39
+ */
40
+ export interface RequestPaymentModel extends RequestPaymentBaseModel {
41
+ order_id: string;
42
+ }
41
43
  export interface RequestPaymentUrlModel {
42
44
  application_id?: string;
43
45
  url?: string;
44
46
  }
45
- export interface RequestSubscriptionModel extends RequestPaymentModel {
46
- subscription_id?: string;
47
+ export interface RequestSubscriptionModel extends RequestPaymentBaseModel {
48
+ subscription_id: string;
47
49
  }
48
50
  export interface RequestAuthenticationModel {
49
51
  ver?: string;
@@ -202,10 +204,12 @@ export interface ExtraModel {
202
204
  override_global_event?: boolean;
203
205
  cash_receipt_not_published?: boolean;
204
206
  }
205
- export interface WidgetExtraModel {
207
+ export interface WidgetExtraModel extends Partial<ExtraModel> {
206
208
  card_quota?: string | string[] | number[];
207
209
  direct_card_company?: string;
208
210
  direct_card_quota?: string;
211
+ hide_title?: boolean;
212
+ hide_divider_line?: boolean;
209
213
  }
210
214
  export interface ConfirmModel {
211
215
  event: string;
@@ -1,4 +1,4 @@
1
- import { ExtraModel, RequestPaymentModel } from './bootpay-interface';
1
+ import { ExtraModel, RequestPaymentModel, WidgetExtraModel } from './bootpay-interface';
2
2
  export interface RequestBootpayWidgetModel extends Partial<RequestPaymentModel> {
3
3
  subscription_id?: string;
4
4
  use_only_oopay?: boolean;
@@ -6,6 +6,7 @@ export interface RequestBootpayWidgetModel extends Partial<RequestPaymentModel>
6
6
  sandbox?: boolean;
7
7
  use_bootpay_inapp_sdk?: boolean;
8
8
  external_terms?: ExternalBootpayWidgetTermsModel[];
9
+ extra?: WidgetExtraModel;
9
10
  }
10
11
  export interface ResponseBootpayWidgetTermsModel {
11
12
  term_id?: string;
@@ -0,0 +1,14 @@
1
+ export declare const EnvironmentEx: {
2
+ mode: string;
3
+ locale: string;
4
+ packageVersion: string;
5
+ EX_SHOP_URL: {
6
+ development: string;
7
+ stage: string;
8
+ production: string;
9
+ };
10
+ set(env: "development" | "stage" | "production"): void;
11
+ setClientKey(clientKey: string): string | undefined;
12
+ setLocale(locale: string): void;
13
+ toExShopUrl(uri: string): string;
14
+ };
@@ -0,0 +1 @@
1
+ export declare const ExStore: ExStoreModel;
@@ -1,5 +1,5 @@
1
1
  import { ExternalBootpayWidgetTermsModel, RequestBootpayWidgetModel, ResponseBootpayWidgetTermsModel } from '../models/bootpay-widget-interface';
2
- import { ExtraModel, WidgetExtraModel } from '../models/bootpay-interface';
2
+ import { ExtraModel, RequestSubscriptionModel, WidgetExtraModel } from '../models/bootpay-interface';
3
3
  export interface WidgetStoreModel {
4
4
  el: string | undefined;
5
5
  data?: RequestBootpayWidgetModel;
@@ -13,7 +13,7 @@ export interface WidgetStoreModel {
13
13
  encrypt(data: object | string): string;
14
14
  decrypt(data: string): any | string;
15
15
  getExtra(externalExtra: ExtraModel | undefined): ExtraModel;
16
- getRequestPaymentData(data: RequestBootpayWidgetModel | {}): RequestBootpayWidgetModel;
16
+ getRequestPaymentData(data: RequestBootpayWidgetModel | RequestSubscriptionModel): RequestBootpayWidgetModel | RequestSubscriptionModel;
17
17
  }
18
18
  export interface WidgetStoreData {
19
19
  el?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bootpay/client-js",
3
- "version": "5.0.2-beta.2",
3
+ "version": "5.0.2",
4
4
  "main": "dist/index.es.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "styles": "dist/index.css",
@@ -10,7 +10,7 @@
10
10
  "deploy": "NODE_ENV=production ./node_modules/.bin/webpack --output-path=./dist --mode=production && gzip -kf dist/*.min.js && ./webview.sh $npm_package_version"
11
11
  },
12
12
  "dependencies": {
13
- "typescript": "^5.1.6"
13
+ "typescript": "^5.5.4"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@types/ws": "^8.5.5",
package/tsconfig.json CHANGED
@@ -31,7 +31,8 @@
31
31
  "node_modules",
32
32
  "dist",
33
33
  "public",
34
- "webpack.config.js"
34
+ "webpack.config.js",
35
+ "src/test"
35
36
  ],
36
37
  "compileOnSave": false
37
38
  }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};