@bootpay/client-js 4.1.6-beta.1 → 4.2.0-beta.1

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/index.d.ts CHANGED
@@ -1,25 +1,4 @@
1
1
  import Bootpay from "./bootpay";
2
2
  import BootpaySDK from "./bootpay-sdk";
3
- export const BootpayEnvironment: {
4
- mode: string;
5
- locale: string;
6
- applicationId: string;
7
- API_URL: any;
8
- ANALYTICS_URL: any;
9
- DOOR_URL: any;
10
- sdkNames: any;
11
- sdkVersion: string;
12
- sdkName: number;
13
- set(env: string): void;
14
- setApplicationId(applicationId: string | undefined): string | undefined;
15
- setLocale(locale: string): void;
16
- currentApplicationId(applicationId?: string | undefined): string | undefined;
17
- setDevelopmentHost(host: string): void;
18
- setVersion(version: string, name: string): void;
19
- toApi(uri: string): string;
20
- toDoor(uri: string): string;
21
- isMobile(): boolean;
22
- isMobileSafari(): boolean | null;
23
- toAnalytics(uri: string): string;
24
- };
25
- export { Bootpay, BootpaySDK };
3
+ import BootpayEnvironment from "./bootpay-environment";
4
+ export { Bootpay, BootpaySDK, BootpayEnvironment };
package/index.js CHANGED
@@ -1,7 +1,5 @@
1
1
  import Bootpay from './bootpay'
2
2
  import BootpaySDK from './bootpay-sdk'
3
- import { Environment } from "./support/environment"
4
-
5
- const BootpayEnvironment = Environment
3
+ import BootpayEnvironment from "./bootpay-environment"
6
4
 
7
5
  export { Bootpay, BootpaySDK, BootpayEnvironment };
@@ -81,5 +81,5 @@ export declare const BootpayMessage: {
81
81
  en: string;
82
82
  };
83
83
  };
84
+ getLocaleMessage: (key: string, locale: string) => any;
84
85
  };
85
- export declare const getLocaleMessage: (key: string, locale: string) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bootpay/client-js",
3
- "version": "4.1.6-beta.1",
3
+ "version": "4.2.0-beta.1",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "scripts": {
@@ -1,22 +1,44 @@
1
- export declare const Environment: {
2
- mode: string;
3
- locale: string;
1
+ interface EnvironmentMode {
2
+ development: string;
3
+ stage: string;
4
+ production: string;
5
+ }
6
+ export declare type SdkKeyType = 'android' | 'android_react_native' | 'android_flutter' | 'android_unity' | 'ios' | 'ios_react_native' | 'ios_flutter' | 'ios_unity' | 'ios_objc' | 'ios_swift_ui' | 'mac_swift' | 'mac_flutter';
7
+ interface SdkNameInterface {
8
+ android: 100;
9
+ android_react_native: 101;
10
+ android_flutter: 102;
11
+ android_unity: 103;
12
+ ios: 200;
13
+ ios_react_native: 201;
14
+ ios_flutter: 202;
15
+ ios_unity: 203;
16
+ ios_objc: 204;
17
+ ios_swift_ui: 205;
18
+ mac_swift: 206;
19
+ mac_flutter: 207;
20
+ }
21
+ export interface EnvironmentInterface {
22
+ mode: 'development' | 'stage' | 'production';
23
+ locale: 'ko' | 'en';
4
24
  applicationId: string;
5
- API_URL: any;
6
- ANALYTICS_URL: any;
7
- DOOR_URL: any;
8
- sdkNames: any;
25
+ API_URL: EnvironmentMode;
26
+ ANALYTICS_URL: EnvironmentMode;
27
+ DOOR_URL: EnvironmentMode;
28
+ sdkNames: SdkNameInterface;
9
29
  sdkVersion: string;
10
30
  sdkName: number;
11
- set(env: string): void;
31
+ set(env: 'development' | 'stage' | 'production'): void;
12
32
  setApplicationId(applicationId: string | undefined): string | undefined;
13
33
  setLocale(locale: string): void;
14
- currentApplicationId(applicationId?: string | undefined): string | undefined;
34
+ currentApplicationId(applicationId: string | undefined): string | undefined;
15
35
  setDevelopmentHost(host: string): void;
16
- setVersion(version: string, name: string): void;
36
+ setVersion(version: string, name: SdkKeyType): void;
17
37
  toApi(uri: string): string;
18
38
  toDoor(uri: string): string;
19
39
  isMobile(): boolean;
20
- isMobileSafari(): boolean | null;
40
+ isMobileSafari(): any;
21
41
  toAnalytics(uri: string): string;
22
- };
42
+ }
43
+ export declare const Environment: EnvironmentInterface;
44
+ export {};