gap-nodejs-sdk 1.0.4 → 1.0.7
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/gap-sdk.js +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/src/base/response_data_api_type.d.ts +8 -0
- package/dist/src/base/response_data_api_type.d.ts.map +1 -0
- package/dist/{base/input_data_type.js → src/base/response_data_api_type.js} +0 -0
- package/dist/src/base_type.d.ts +20 -0
- package/dist/src/base_type.d.ts.map +1 -0
- package/dist/src/base_type.js +23 -0
- package/dist/src/context.d.ts +23 -0
- package/dist/src/context.d.ts.map +1 -0
- package/dist/src/context.js +35 -0
- package/dist/src/error.d.ts +26 -0
- package/dist/src/error.d.ts.map +1 -0
- package/dist/src/error.js +24 -0
- package/dist/src/gci_client_api/interface/index.d.ts +7 -0
- package/dist/src/gci_client_api/interface/index.d.ts.map +1 -0
- package/dist/{base/response_data_type.js → src/gci_client_api/interface/index.js} +0 -0
- package/dist/src/gci_client_api/v1/repository/GciClientRepository.d.ts +8 -0
- package/dist/src/gci_client_api/v1/repository/GciClientRepository.d.ts.map +1 -0
- package/dist/src/gci_client_api/v1/repository/GciClientRepository.js +14 -0
- package/dist/src/http_client/http_client.d.ts +1 -0
- package/dist/src/http_client/http_client.d.ts.map +1 -0
- package/dist/{base/event_type.js → src/http_client/http_client.js} +0 -0
- package/dist/src/http_client/types.d.ts +31 -0
- package/dist/src/http_client/types.d.ts.map +1 -0
- package/dist/src/http_client/types.js +13 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +14 -0
- package/dist/src/interface/invoke_event_interface.d.ts +4 -0
- package/dist/src/interface/invoke_event_interface.d.ts.map +1 -0
- package/dist/{interface/native_app_interface.js → src/interface/invoke_event_interface.js} +0 -0
- package/dist/src/types.d.ts +2 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +5 -7
- package/dist/android/android_bridge.d.ts +0 -2
- package/dist/android/android_bridge.d.ts.map +0 -1
- package/dist/android/android_bridge.js +0 -21
- package/dist/android/android_bridge.js.map +0 -1
- package/dist/base/event_type.d.ts +0 -1
- package/dist/base/event_type.d.ts.map +0 -1
- package/dist/base/event_type.js.map +0 -1
- package/dist/base/input_data_type.d.ts +0 -37
- package/dist/base/input_data_type.d.ts.map +0 -1
- package/dist/base/input_data_type.js.map +0 -1
- package/dist/base/response_data_type.d.ts +0 -32
- package/dist/base/response_data_type.d.ts.map +0 -1
- package/dist/base/response_data_type.js.map +0 -1
- package/dist/base_type.js.map +0 -1
- package/dist/common_bridge.d.ts +0 -62
- package/dist/common_bridge.d.ts.map +0 -1
- package/dist/common_bridge.js +0 -95
- package/dist/common_bridge.js.map +0 -1
- package/dist/context.js.map +0 -1
- package/dist/error.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/interface/invoke_event_interface.js.map +0 -1
- package/dist/interface/native_app_interface.d.ts +0 -13
- package/dist/interface/native_app_interface.d.ts.map +0 -1
- package/dist/interface/native_app_interface.js.map +0 -1
- package/dist/ios/ios_bridge.d.ts +0 -2
- package/dist/ios/ios_bridge.d.ts.map +0 -1
- package/dist/ios/ios_bridge.js +0 -43
- package/dist/ios/ios_bridge.js.map +0 -1
- package/dist/native_app/index.d.ts +0 -14
- package/dist/native_app/index.d.ts.map +0 -1
- package/dist/native_app/index.js +0 -32
- package/dist/native_app/index.js.map +0 -1
- package/dist/types/platform.d.ts +0 -8
- package/dist/types/platform.d.ts.map +0 -1
- package/dist/types/platform.js +0 -8
- package/dist/types/platform.js.map +0 -1
- package/dist/types.js.map +0 -1
package/dist/gap-sdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.GapSdk=t():e.GapSdk=t()}(self,(()=>(()=>{"use strict";var e={
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.GapSdk=t():e.GapSdk=t()}(self,(()=>(()=>{"use strict";var e={d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{Gap:()=>I,GapApiVersion:()=>o,GapHeader:()=>n,Platform:()=>i,UserAgent:()=>r,default:()=>l});var o,n,r,i,s={};e.r(s),e.d(s,{GapError:()=>a,HttpResponseError:()=>E,MissingDataContextError:()=>p,UninitializedContextError:()=>d}),function(e){e.V1="1.0.0"}(o||(o={})),function(e){e.GClientId="G-ClientID"}(n||(n={})),function(e){e.IOS="IOS",e.ANDROID="ANDROID",e.CHROME="CHROME",e.SAFARI="SAFARI"}(r||(r={})),function(e){e.ANDROID="Android",e.IOS="iOS",e.WEB="Web",e.WINDOW="Window"}(i||(i={}));class a extends Error{constructor(...e){super(...e),Object.setPrototypeOf(this,new.target.prototype)}}class E extends a{constructor({message:e,code:t,statusText:o,body:n,headers:r}){super(e),this.response={code:t,statusText:o,body:n,headers:r}}}class d extends a{}class p extends a{}const I={Context:{API_KEY:"",API_SECRET_KEY:"",G_CLIENTID:"",USER_AGENT:"",API_VERSION:o.V1,initialize:function(e){const t=[];if(e.API_KEY.length||t.push("API_KEY"),e.API_SECRET_KEY.length||t.push("API_SECRET_KEY"),e.API_SECRET_KEY.length||t.push("G_CLIENTID"),t.length)throw new p(`Cannot initialize GAP Library. Missing values for: ${t.join(", ")}`);this.API_KEY=e.API_KEY,this.API_SECRET_KEY=e.API_SECRET_KEY,this.G_CLIENTID=e.G_CLIENTID,this.API_VERSION=e.API_VERSION},throwIfUninitialized:function(){if(!this.API_KEY||0===this.API_KEY.length)throw new d("Context has not been properly initialized. Please call the .initialize() method to setup your app context object.")}},Errors:s};window.Gap=I;const l=I;return t})()));
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,SAAS,CAAC;AAGpC,eAAO,MAAM,GAAG
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,SAAS,CAAC;AAGpC,eAAO,MAAM,GAAG;;;CAOf,CAAC;AAIF,eAAe,GAAG,CAAC;AACnB,cAAc,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Context } from './context';
|
|
2
2
|
import * as GapError from './error';
|
|
3
|
-
import { GapMiniAppSdk } from 'gap-miniapp-sdk';
|
|
3
|
+
// import { GapMiniAppSdk } from '../gap-miniapp-sdk/src/index';
|
|
4
4
|
export const Gap = {
|
|
5
5
|
Context,
|
|
6
6
|
// GciClientApi,
|
|
7
7
|
// BookingClientApi,
|
|
8
8
|
// PosClientApi,
|
|
9
9
|
Errors: GapError,
|
|
10
|
-
MiniApp: GapMiniAppSdk
|
|
10
|
+
// MiniApp: GapMiniAppSdk
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
window.Gap = Gap;
|
|
13
13
|
export default Gap;
|
|
14
14
|
export * from './types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response_data_api_type.d.ts","sourceRoot":"","sources":["../../../src/base/response_data_api_type.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG;IAClC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAA;CACjB,CAAA"}
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare enum GapApiVersion {
|
|
2
|
+
V1 = "1.0.0"
|
|
3
|
+
}
|
|
4
|
+
export declare enum GapHeader {
|
|
5
|
+
GClientId = "G-ClientID"
|
|
6
|
+
}
|
|
7
|
+
export declare enum UserAgent {
|
|
8
|
+
IOS = "IOS",
|
|
9
|
+
ANDROID = "ANDROID",
|
|
10
|
+
CHROME = "CHROME",
|
|
11
|
+
SAFARI = "SAFARI"
|
|
12
|
+
}
|
|
13
|
+
/** Device platform of bridge. */
|
|
14
|
+
export declare enum Platform {
|
|
15
|
+
ANDROID = "Android",
|
|
16
|
+
IOS = "iOS",
|
|
17
|
+
WEB = "Web",
|
|
18
|
+
WINDOW = "Window"
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=base_type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base_type.d.ts","sourceRoot":"","sources":["../../src/base_type.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACrB,EAAE,UAAU;CACf;AAED,oBAAY,SAAS;IACjB,SAAS,eAAe;CAC3B;AAED,oBAAY,SAAS;IACjB,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,MAAM,WAAW;CACpB;AAED,iCAAiC;AACjC,oBAAY,QAAQ;IAChB,OAAO,YAAY;IACnB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,MAAM,WAAW;CACpB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export var GapApiVersion;
|
|
2
|
+
(function (GapApiVersion) {
|
|
3
|
+
GapApiVersion["V1"] = "1.0.0";
|
|
4
|
+
})(GapApiVersion || (GapApiVersion = {}));
|
|
5
|
+
export var GapHeader;
|
|
6
|
+
(function (GapHeader) {
|
|
7
|
+
GapHeader["GClientId"] = "G-ClientID";
|
|
8
|
+
})(GapHeader || (GapHeader = {}));
|
|
9
|
+
export var UserAgent;
|
|
10
|
+
(function (UserAgent) {
|
|
11
|
+
UserAgent["IOS"] = "IOS";
|
|
12
|
+
UserAgent["ANDROID"] = "ANDROID";
|
|
13
|
+
UserAgent["CHROME"] = "CHROME";
|
|
14
|
+
UserAgent["SAFARI"] = "SAFARI";
|
|
15
|
+
})(UserAgent || (UserAgent = {}));
|
|
16
|
+
/** Device platform of bridge. */
|
|
17
|
+
export var Platform;
|
|
18
|
+
(function (Platform) {
|
|
19
|
+
Platform["ANDROID"] = "Android";
|
|
20
|
+
Platform["IOS"] = "iOS";
|
|
21
|
+
Platform["WEB"] = "Web";
|
|
22
|
+
Platform["WINDOW"] = "Window";
|
|
23
|
+
})(Platform || (Platform = {}));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { GapApiVersion } from "./base_type";
|
|
2
|
+
interface ContextInterface {
|
|
3
|
+
API_KEY: string;
|
|
4
|
+
API_SECRET_KEY: string;
|
|
5
|
+
G_CLIENTID: string;
|
|
6
|
+
API_VERSION: GapApiVersion;
|
|
7
|
+
USER_AGENT: string;
|
|
8
|
+
LOG_FILE?: string;
|
|
9
|
+
USER_AGENT_PREFIX?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Sets up the GAP API Library
|
|
12
|
+
*
|
|
13
|
+
* @param params Settings to update
|
|
14
|
+
*/
|
|
15
|
+
initialize(params: ContextInterface): void;
|
|
16
|
+
/**
|
|
17
|
+
* Throws error if context has not been initialized.
|
|
18
|
+
*/
|
|
19
|
+
throwIfUninitialized(): void | never;
|
|
20
|
+
}
|
|
21
|
+
declare const Context: ContextInterface;
|
|
22
|
+
export { Context, ContextInterface };
|
|
23
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAI5C,UAAU,gBAAgB;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,aAAa,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IAKnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAG3B;;;;OAIG;IACH,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAE3C;;OAEG;IACH,oBAAoB,IAAI,IAAI,GAAG,KAAK,CAAC;CAExC;AAED,QAAA,MAAM,OAAO,EAAE,gBAqCd,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { GapApiVersion } from "./base_type";
|
|
2
|
+
import * as GapErrors from "./error";
|
|
3
|
+
const Context = {
|
|
4
|
+
API_KEY: "",
|
|
5
|
+
API_SECRET_KEY: "",
|
|
6
|
+
G_CLIENTID: "",
|
|
7
|
+
USER_AGENT: "",
|
|
8
|
+
API_VERSION: GapApiVersion.V1,
|
|
9
|
+
initialize: function (params) {
|
|
10
|
+
// Make sure that the essential params actually have content in them
|
|
11
|
+
const missing = [];
|
|
12
|
+
if (!params.API_KEY.length) {
|
|
13
|
+
missing.push('API_KEY');
|
|
14
|
+
}
|
|
15
|
+
if (!params.API_SECRET_KEY.length) {
|
|
16
|
+
missing.push('API_SECRET_KEY');
|
|
17
|
+
}
|
|
18
|
+
if (!params.API_SECRET_KEY.length) {
|
|
19
|
+
missing.push('G_CLIENTID');
|
|
20
|
+
}
|
|
21
|
+
if (missing.length) {
|
|
22
|
+
throw new GapErrors.MissingDataContextError(`Cannot initialize GAP Library. Missing values for: ${missing.join(', ')}`);
|
|
23
|
+
}
|
|
24
|
+
this.API_KEY = params.API_KEY;
|
|
25
|
+
this.API_SECRET_KEY = params.API_SECRET_KEY;
|
|
26
|
+
this.G_CLIENTID = params.G_CLIENTID;
|
|
27
|
+
this.API_VERSION = params.API_VERSION;
|
|
28
|
+
},
|
|
29
|
+
throwIfUninitialized: function () {
|
|
30
|
+
if (!this.API_KEY || this.API_KEY.length === 0) {
|
|
31
|
+
throw new GapErrors.UninitializedContextError('Context has not been properly initialized. Please call the .initialize() method to setup your app context object.');
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
export { Context };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare class GapError extends Error {
|
|
2
|
+
constructor(...args: any);
|
|
3
|
+
}
|
|
4
|
+
interface HttpResponseData {
|
|
5
|
+
code: number;
|
|
6
|
+
statusText: string;
|
|
7
|
+
body?: {
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
};
|
|
10
|
+
headers?: {
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
interface HttpResponseErrorParams extends HttpResponseData {
|
|
15
|
+
message: string;
|
|
16
|
+
}
|
|
17
|
+
export declare class HttpResponseError extends GapError {
|
|
18
|
+
readonly response: HttpResponseData;
|
|
19
|
+
constructor({ message, code, statusText, body, headers, }: HttpResponseErrorParams);
|
|
20
|
+
}
|
|
21
|
+
export declare class UninitializedContextError extends GapError {
|
|
22
|
+
}
|
|
23
|
+
export declare class MissingDataContextError extends GapError {
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/error.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAS,SAAQ,KAAK;gBACnB,GAAG,IAAI,EAAE,GAAG;CAI3B;AAED,UAAU,gBAAgB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAClC,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CACxC;AACD,UAAU,uBAAwB,SAAQ,gBAAgB;IACtD,OAAO,EAAE,MAAM,CAAC;CACnB;AACD,qBAAa,iBAAkB,SAAQ,QAAQ;IAC3C,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;gBAEjB,EACf,OAAO,EACP,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,OAAO,GACV,EAAE,uBAAuB;CAS7B;AAGD,qBAAa,yBAA0B,SAAQ,QAAQ;CAAI;AAC3D,qBAAa,uBAAwB,SAAQ,QAAQ;CAAI"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export class GapError extends Error {
|
|
2
|
+
constructor(...args) {
|
|
3
|
+
super(...args);
|
|
4
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export class HttpResponseError extends GapError {
|
|
8
|
+
constructor({ message, code, statusText, body, headers, }) {
|
|
9
|
+
super(message);
|
|
10
|
+
this.response = {
|
|
11
|
+
code,
|
|
12
|
+
statusText,
|
|
13
|
+
body,
|
|
14
|
+
headers,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//Detail of error for testing purpose
|
|
19
|
+
export class UninitializedContextError extends GapError {
|
|
20
|
+
}
|
|
21
|
+
;
|
|
22
|
+
export class MissingDataContextError extends GapError {
|
|
23
|
+
}
|
|
24
|
+
;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ResponseDataApi } from "src/base/response_data_api_type";
|
|
2
|
+
import { GapApiVersion } from "src/base_type";
|
|
3
|
+
export interface IGciClientRepository {
|
|
4
|
+
apiVersion: GapApiVersion.V1;
|
|
5
|
+
getList: () => ResponseDataApi | null;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/gci_client_api/interface/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,WAAW,oBAAoB;IACjC,UAAU,EAAE,aAAa,CAAC,EAAE,CAAC;IAC7B,OAAO,EAAE,MAAM,eAAe,GAAG,IAAI,CAAC;CACzC"}
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ResponseDataApi } from "src/base/response_data_api_type";
|
|
2
|
+
import { GapApiVersion } from "src/base_type";
|
|
3
|
+
import { IGciClientRepository } from "src/gci_client_api/interface";
|
|
4
|
+
export declare class GciClientRepository implements IGciClientRepository {
|
|
5
|
+
apiVersion: GapApiVersion.V1;
|
|
6
|
+
getList(): ResponseDataApi | null;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=GciClientRepository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GciClientRepository.d.ts","sourceRoot":"","sources":["../../../../../src/gci_client_api/v1/repository/GciClientRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,qBAAa,mBAAoB,YAAW,oBAAoB;IAC5D,UAAU,EAAE,aAAa,CAAC,EAAE,CAAC;IAC7B,OAAO,IAAI,eAAe,GAAG,IAAI;CAYpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=http_client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http_client.d.ts","sourceRoot":"","sources":["../../../src/http_client/http_client.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface HeaderParams {
|
|
2
|
+
[key: string]: string | number;
|
|
3
|
+
}
|
|
4
|
+
export declare enum DataType {
|
|
5
|
+
JSON = "application/json"
|
|
6
|
+
}
|
|
7
|
+
export declare type QueryParams = string | number | string[] | number[] | {
|
|
8
|
+
[key: string]: QueryParams;
|
|
9
|
+
};
|
|
10
|
+
export interface GetRequestParams {
|
|
11
|
+
path: string;
|
|
12
|
+
type?: DataType;
|
|
13
|
+
data?: {
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
} | string;
|
|
16
|
+
query?: {
|
|
17
|
+
[key: string]: QueryParams;
|
|
18
|
+
};
|
|
19
|
+
extraHeaders?: HeaderParams;
|
|
20
|
+
tries?: number;
|
|
21
|
+
}
|
|
22
|
+
export declare type PostRequestParams = GetRequestParams & {
|
|
23
|
+
type: DataType;
|
|
24
|
+
data: {
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
} | string;
|
|
27
|
+
};
|
|
28
|
+
export declare type PutRequestParams = PostRequestParams;
|
|
29
|
+
export declare type DeleteRequestParams = GetRequestParams;
|
|
30
|
+
export declare type RequestParams = (GetRequestParams | PostRequestParams);
|
|
31
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/http_client/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CAChC;AAED,oBAAY,QAAQ;IAClB,IAAI,qBAAqB;CAG1B;AAED,oBAAY,WAAW,GACnB,MAAM,GACN,MAAM,GACN,MAAM,EAAE,GACR,MAAM,EAAE,GACR;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAA;CAAE,CAAC;AAEnC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,MAAM,CAAC;IAC3C,KAAK,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAA;KAAE,CAAC;IACvC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,oBAAY,iBAAiB,GAAG,gBAAgB,GAAG;IACjD,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,MAAM,CAAC;CAC3C,CAAC;AAEF,oBAAY,gBAAgB,GAAG,iBAAiB,CAAC;AAEjD,oBAAY,mBAAmB,GAAG,gBAAgB,CAAC;AAEnD,oBAAY,aAAa,GAAG,CAAC,gBAAgB,GAAG,iBAAiB,CAAC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export var DataType;
|
|
2
|
+
(function (DataType) {
|
|
3
|
+
DataType["JSON"] = "application/json";
|
|
4
|
+
// GraphQL = "application/graphql", // eslint-disable-line @shopify/typescript/prefer-pascal-case-enums
|
|
5
|
+
// URLEncoded = "application/x-www-form-urlencoded", // eslint-disable-line @shopify/typescript/prefer-pascal-case-enums
|
|
6
|
+
})(DataType || (DataType = {}));
|
|
7
|
+
// & {
|
|
8
|
+
// method: Method;
|
|
9
|
+
// };
|
|
10
|
+
// export interface RequestReturn {
|
|
11
|
+
// body: unknown;
|
|
12
|
+
// headers: Headers;
|
|
13
|
+
// }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,SAAS,CAAC;AAGpC,eAAO,MAAM,GAAG;;;CAOf,CAAC;AAIF,eAAe,GAAG,CAAC;AACnB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Context } from './context';
|
|
2
|
+
import * as GapError from './error';
|
|
3
|
+
// import { GapMiniAppSdk } from '../gap-miniapp-sdk/src/index';
|
|
4
|
+
export const Gap = {
|
|
5
|
+
Context,
|
|
6
|
+
// GciClientApi,
|
|
7
|
+
// BookingClientApi,
|
|
8
|
+
// PosClientApi,
|
|
9
|
+
Errors: GapError,
|
|
10
|
+
// MiniApp: GapMiniAppSdk
|
|
11
|
+
};
|
|
12
|
+
window.Gap = Gap;
|
|
13
|
+
export default Gap;
|
|
14
|
+
export * from './types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invoke_event_interface.d.ts","sourceRoot":"","sources":["../../../src/interface/invoke_event_interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IACxB,WAAW,EAAE,MAAM,MAAM,CAAC;CAC7B"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './base_type';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/tslib/tslib.d.ts","../src/base_type.ts","../src/error.ts","../src/context.ts","../src/types.ts","../src/index.ts","../src/base/response_data_api_type.ts","../src/gci_client_api/interface/index.ts","../src/gci_client_api/v1/repository/gciclientrepository.ts","../src/http_client/http_client.ts","../src/http_client/types.ts","../src/interface/invoke_event_interface.ts","../node_modules/@types/eslint/helpers.d.ts","../node_modules/@types/estree/index.d.ts","../node_modules/@types/json-schema/index.d.ts","../node_modules/@types/eslint/index.d.ts","../node_modules/@types/eslint-scope/index.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/test.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3f149f903dd20dfeb7c80e228b659f0e436532de772469980dbd00702cc05cc1","affectsGlobalScope":true},{"version":"1272277fe7daa738e555eb6cc45ded42cc2d0f76c07294142283145d49e96186","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},"14a84fbe4ec531dcbaf5d2594fd95df107258e60ae6c6a076404f13c3f66f28e",{"version":"15bd457799c45334317bea3adef5bc1b805d252f1894e6850938fdde17352474","signature":"18b523d8b58b67e07de805422e10dc23d9bbb9c58c1ac514ef500b934f93eec5"},{"version":"05821f1e6308ebcacc376483c4bd5dd10c6bf2494da75d827aee2491e52364af","signature":"51b34025eab7f2f35e78bc6735b767cb954e9acd5dd64dbd54535e72739b9f4e"},{"version":"4761ad76124ad163c923b22689081f4341abf3e810823f952c6ece58db76acfe","signature":"9915d4ccc482226595222cc1457d8089c7788bfc1e72f22f64aa3ec921c09033"},"38670c5b3c7ddc170ddc5776cfa5aa2269c62df39afd34dd6318cfb8d4ebfdfb",{"version":"a31805437f4c850c83776a9f967e0cc371fe647d398872f48fe6a85ffe082f04","signature":"b76273064dd983cf4dcae332b6d8f1eef5ee84ea9ce787465423d4e5360e00cf"},{"version":"25c1d71e012c8e05171e6333380eae9c769c254f16a8dfaac665227cbc51e679","signature":"56f98fbb4f13bb9eb2a3728b72079db133eb62c798ea3a082ca42f494fdca1d6"},{"version":"b278f5b772173d020bb05c6a246c304f3b0cda07865b3517b3a283a91ae177f9","signature":"34532d40a8d17eee5041237e3294eb176c406ef32ee61c0c221fd7e52b6fa84c"},{"version":"86e004aa10bd0d171ccd95105c213198dde3861f253074a36553dfae984d7525","signature":"0e82fca49cd79e3bb41bb68d79666839c8912001227e7ee45e4fc31d32249f5a"},"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",{"version":"833999af7dcd30e90b21c84b7bc61d9053d0e2cbaa4d990b47eb4c4e12719e0a","signature":"46dbcf069a62ba299fd8180a5734e150d1410451540889ee292898b72f50ff62"},{"version":"db811f40f0909b705c3fb0f0c259aa031574f81e69ec083b14c625820099b20c","signature":"ae27a8b6888f25c40bcc1a265602a85517743c43b985fe49995ca23334b160d5"},{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"a1c79f857f5c7754e14c93949dad8cfefcd7df2ecc0dc9dd79a30fd493e28449","f3e604694b624fa3f83f6684185452992088f5efb2cf136b62474aa106d6f1b6","c6297435733f252a9c0e2297fab3b58014b8fde5fa097a4102dae4e12522bccd","e050a0afcdbb269720a900c85076d18e0c1ab73e580202a2bf6964978181222a","9122ed7070e054b73ebab37c2373a196def2d90e7d1a9a7fcd9d46b0e51fae78","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"77f0b5c6a193a699c9f7d7fb0578e64e562d271afa740783665d2a827104a873","affectsGlobalScope":true},"21a167fec8f933752fb8157f06d28fab6817af3ad9b0bdb1908a10762391eab9",{"version":"3e4624c306340ad303cc536a07004e81336c3f088308a9e4a9f4c957a3cda2fd","affectsGlobalScope":true},"0c0cee62cb619aed81133b904f644515ba3064487002a7da83fd8aa07b1b4abd","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","025fc13211ed47d2798269017af3ec869122a050d5431a6ad3c1997900e65c58","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","75ecef44f126e2ae018b4abbd85b6e8a2e2ba1638ebec56cc64274643ce3567b","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"249a2b90439cdfd51709539fbfa4dfe0791cbae6efce1e9b327ba8f8cd703f49","affectsGlobalScope":true},"2f60ac046e587e917d739f1edc77540eb0ec34f83090dae4ebd5f96c1c9578d4","a9b6b0f7b1e30359283b131ba6d1c51ee2d3601a2f12e1623141e6a1a60c92a5","aeee0090b38de0dd47ca9a79ad5c2d156e3e09d92306719b0b45a3e96098e564","7bac475dcdd9f7e4e9da934d32c305bc889c4ce3c8ac0ef45a93a8d670fff607","09416dd69576b03a3f485adf329a02f043e4a481e060ef5b208194e488d31fd9","8acf99b1c8682276a63ea5bb68433782715892726b97e4604a415e4e56bce41c",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"3b145a2351f5cf16abf999c8d5f4481c74dffdc54ec1e9a89992e2622e1226c5","a907bf91df26df2400858ef75f749498fb5cf00062bf90a737ac3949cc07978d","d270fd4b565eda11a0a737c181892316b7a1ace06c7988d0246219c3df11db06","4275d5f964e7fc7afc18538e26b3748c207dd772998346d17f409749aa1f3a63",{"version":"59a638a504490fecaacf0020b9814b6abee37edb66047eb1ab9f7c2274bf1da0","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","d1a78a3c5708807e8de3e399f91df4797c62e44b02195eefc2209b2e713e54ee","8c4c1a64db28930732033c31418f817dcb9d09d706766707ae6d38f23faf0c53","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","12a70315c8281e46d65696086dd25827408e967b305a22276ae2779fe519e0fe","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","29d613c3964ea75b2b4e0d17098245c34529282e9cc72b7e4eeb2a7b12c27cb7",{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","a381f079c4804442f179d742fdb2e495fe28d67a47cac673485f75ae2e77aeca","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"bfe39beb986d2a2e512c091cbe924f1c415bc65de54de0e2f6a0dc6f84c183d9","affectsGlobalScope":true},"2af17363f8a062e3a8cd1b26030af0058b3f86e783f4fc6aa9f57247f240ebaa","06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","dfe08140492cdc135fb7fd9c4a652c05207b61a436906079b87da1d3111314bf","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","089e1f8603cbc35ab977c8dcc662eb754b82fca32ed1dfb16bd682726c2d5432","8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"82fc37849846a3a0264047621d5beb6ce2ddeb2f83bdee2c79523af3c3282d97"],"options":{"composite":true,"declaration":true,"declarationMap":true,"downlevelIteration":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"noEmitOnError":false,"noImplicitAny":false,"noImplicitThis":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","skipLibCheck":true,"sourceMap":false,"strictNullChecks":true,"target":2},"fileIdsList":[[56,58,104],[104],[55,56,57,104],[60,104],[63,104],[64,69,104],[65,75,76,83,92,103,104],[65,66,75,83,104],[67,104],[68,69,76,84,104],[69,92,100,104],[70,72,75,83,104],[71,104],[72,73,104],[74,75,104],[75,104],[75,76,77,92,103,104],[75,76,77,92,95,104],[104,108],[78,83,92,103,104],[75,76,78,79,83,92,100,103,104],[78,80,92,100,103,104],[60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110],[75,81,104],[82,103,104],[72,75,83,92,104],[84,104],[85,104],[63,86,104],[87,102,104,108],[88,104],[89,104],[75,90,104],[90,91,104,106],[75,92,93,94,95,104],[92,94,104],[92,93,104],[95,104],[96,104],[75,98,99,104],[98,99,104],[69,83,92,100,104],[101,104],[83,102,104],[64,78,89,103,104],[69,104],[92,104,105],[104,106],[104,107],[64,69,75,77,86,92,103,104,106,108],[92,104,109],[43,104],[43,44,45,104],[43,44,49,104],[43,44,49,50,104],[43,45,46,47,104],[43,44,104],[44],[44,49],[44,49,50],[45,46,47]],"referencedMap":[[59,1],[55,2],[58,3],[56,2],[57,2],[60,4],[61,4],[63,5],[64,6],[65,7],[66,8],[67,9],[68,10],[69,11],[70,12],[71,13],[72,14],[73,14],[74,15],[75,16],[76,17],[77,18],[62,19],[110,2],[78,20],[79,21],[80,22],[111,23],[81,24],[82,25],[83,26],[84,27],[85,28],[86,29],[87,30],[88,31],[89,32],[90,33],[91,34],[92,35],[94,36],[93,37],[95,38],[96,39],[97,2],[98,40],[99,41],[100,42],[101,43],[102,44],[103,45],[104,46],[105,47],[106,48],[107,49],[108,50],[109,51],[43,2],[8,2],[9,2],[11,2],[10,2],[2,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[3,2],[4,2],[23,2],[20,2],[21,2],[22,2],[24,2],[25,2],[26,2],[5,2],[27,2],[28,2],[29,2],[30,2],[6,2],[31,2],[32,2],[33,2],[34,2],[7,2],[35,2],[40,2],[41,2],[36,2],[37,2],[38,2],[39,2],[1,2],[42,2],[49,52],[44,52],[46,53],[45,52],[50,54],[51,55],[52,2],[53,52],[48,56],[54,52],[47,57]],"exportedModulesMap":[[59,1],[55,2],[58,3],[56,2],[57,2],[60,4],[61,4],[63,5],[64,6],[65,7],[66,8],[67,9],[68,10],[69,11],[70,12],[71,13],[72,14],[73,14],[74,15],[75,16],[76,17],[77,18],[62,19],[110,2],[78,20],[79,21],[80,22],[111,23],[81,24],[82,25],[83,26],[84,27],[85,28],[86,29],[87,30],[88,31],[89,32],[90,33],[91,34],[92,35],[94,36],[93,37],[95,38],[96,39],[97,2],[98,40],[99,41],[100,42],[101,43],[102,44],[103,45],[104,46],[105,47],[106,48],[107,49],[108,50],[109,51],[43,2],[8,2],[9,2],[11,2],[10,2],[2,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[3,2],[4,2],[23,2],[20,2],[21,2],[22,2],[24,2],[25,2],[26,2],[5,2],[27,2],[28,2],[29,2],[30,2],[6,2],[31,2],[32,2],[33,2],[34,2],[7,2],[35,2],[40,2],[41,2],[36,2],[37,2],[38,2],[39,2],[1,2],[42,2],[46,58],[50,59],[51,60],[52,2],[48,61],[47,57]],"semanticDiagnosticsPerFile":[59,55,58,56,57,60,61,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,62,110,78,79,80,111,81,82,83,84,85,86,87,88,89,90,91,92,94,93,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,43,8,9,11,10,2,12,13,14,15,16,17,18,19,3,4,23,20,21,22,24,25,26,5,27,28,29,30,6,31,32,33,34,7,35,40,41,36,37,38,39,1,42,49,44,46,45,50,51,52,53,48,54,47]},"version":"4.7.4"}
|
package/package.json
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gap-nodejs-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "GCI App Platform Library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
|
-
"dist"
|
|
8
|
+
"dist/"
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
|
-
"prepare": "npm run build",
|
|
12
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
13
|
-
"build": "
|
|
12
|
+
"build": "tsc && webpack",
|
|
14
13
|
"lint": "eslint '**/*.{ts,tsx}' --max-warnings 0",
|
|
15
14
|
"clean": "rimraf ./dist tsconfig.tsbuildinfo",
|
|
16
|
-
"bundle": "
|
|
15
|
+
"bundle": "tsc && browserify -p esmify dist/index.js -o javascript/bundle.js"
|
|
17
16
|
},
|
|
18
17
|
"repository": {
|
|
19
18
|
"type": "git",
|
|
@@ -30,7 +29,6 @@
|
|
|
30
29
|
"browserify": "^17.0.0"
|
|
31
30
|
},
|
|
32
31
|
"dependencies": {
|
|
33
|
-
"tslib": "^2.4.0"
|
|
34
|
-
"gap-miniapp-sdk": "~1.0.0"
|
|
32
|
+
"tslib": "^2.4.0"
|
|
35
33
|
}
|
|
36
34
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"android_bridge.d.ts","sourceRoot":"","sources":["../../src/android/android_bridge.ts"],"names":[],"mappings":""}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { MiniAppBridge, mabMessageQueue, } from '../common_bridge';
|
|
2
|
-
import { Platform } from '../types/platform';
|
|
3
|
-
/* tslint:disable:no-any */
|
|
4
|
-
let uniqueId = Math.random();
|
|
5
|
-
class AndroidExecutor {
|
|
6
|
-
execEvents(event) {
|
|
7
|
-
window.dispatchEvent(event);
|
|
8
|
-
}
|
|
9
|
-
exec(action, param, onSuccess, onError) {
|
|
10
|
-
const callback = {};
|
|
11
|
-
callback.onSuccess = onSuccess;
|
|
12
|
-
callback.onError = onError;
|
|
13
|
-
callback.id = String(++uniqueId);
|
|
14
|
-
mabMessageQueue.unshift(callback);
|
|
15
|
-
window.MiniAppAndroid.postMessage(JSON.stringify({ action, param, id: callback.id }));
|
|
16
|
-
}
|
|
17
|
-
getPlatform() {
|
|
18
|
-
return Platform.ANDROID;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
window.MiniAppBridge = new MiniAppBridge(new AndroidExecutor());
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"android_bridge.js","sourceRoot":"","sources":["../../src/android/android_bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,aAAa,EAEb,eAAe,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,2BAA2B;AAC3B,IAAI,QAAQ,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;AAE7B,MAAM,eAAe;IACjB,UAAU,CAAC,KAAK;QACX,MAAc,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;IACD,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO;QAClC,MAAM,QAAQ,GAAG,EAAc,CAAC;QAChC,QAAQ,CAAC,SAAS,GAAG,SAAS,CAAC;QAC/B,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;QAC3B,QAAQ,CAAC,EAAE,GAAG,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC;QACjC,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAEjC,MAAc,CAAC,cAAc,CAAC,WAAW,CACtC,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CACrD,CAAC;IACN,CAAC;IAED,WAAW;QACP,OAAO,QAAQ,CAAC,OAAO,CAAC;IAC5B,CAAC;CACJ;AAEA,MAAc,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=event_type.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event_type.d.ts","sourceRoot":"","sources":["../../src/base/event_type.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event_type.js","sourceRoot":"","sources":["../../src/base/event_type.ts"],"names":[],"mappings":""}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export declare type LoginInput = {
|
|
2
|
-
username: string;
|
|
3
|
-
password: string;
|
|
4
|
-
};
|
|
5
|
-
export declare type AppConfig = {
|
|
6
|
-
/**
|
|
7
|
-
* Title app.
|
|
8
|
-
*/
|
|
9
|
-
title?: string;
|
|
10
|
-
/**
|
|
11
|
-
* 0: Default | 1: Sensor | 2: Force portrait | 3: Force landscape
|
|
12
|
-
*/
|
|
13
|
-
orientation?: 'auto' | 'portrait' | 'landscape';
|
|
14
|
-
/**
|
|
15
|
-
* Color.
|
|
16
|
-
*/
|
|
17
|
-
headerColor?: null | string;
|
|
18
|
-
/**
|
|
19
|
-
* Text Color.
|
|
20
|
-
*/
|
|
21
|
-
textColor?: null | string;
|
|
22
|
-
/**
|
|
23
|
-
* Status bar Color.
|
|
24
|
-
*/
|
|
25
|
-
statusBarColor?: null | string;
|
|
26
|
-
/**
|
|
27
|
-
* Left button.
|
|
28
|
-
*/
|
|
29
|
-
leftButton?: 'none' | 'back' | 'home' | 'both';
|
|
30
|
-
};
|
|
31
|
-
export declare type CommonRequest = {
|
|
32
|
-
channel: string;
|
|
33
|
-
type: string;
|
|
34
|
-
method: string;
|
|
35
|
-
data?: string;
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=input_data_type.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input_data_type.d.ts","sourceRoot":"","sources":["../../src/base/input_data_type.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,MAAM,UAAU,GAAG;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,SAAS,GAAG;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,WAAW,CAAC;IAChD;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC1B;;OAEG;IACH,cAAc,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC/B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CAClD,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input_data_type.js","sourceRoot":"","sources":["../../src/base/input_data_type.ts"],"names":[],"mappings":""}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { GapError } from "src/error";
|
|
2
|
-
export declare type ResponseSuccess = {
|
|
3
|
-
channel: string;
|
|
4
|
-
type: string;
|
|
5
|
-
method: string;
|
|
6
|
-
data: string;
|
|
7
|
-
};
|
|
8
|
-
export declare type ResponseError = {
|
|
9
|
-
error: object | GapError | string;
|
|
10
|
-
};
|
|
11
|
-
export declare type SystemInfo = {
|
|
12
|
-
version: string;
|
|
13
|
-
apiVersion: string;
|
|
14
|
-
};
|
|
15
|
-
export declare type BusinessInfo = {
|
|
16
|
-
name: string;
|
|
17
|
-
shortName: string;
|
|
18
|
-
phone: string;
|
|
19
|
-
address: string;
|
|
20
|
-
countryCode: string;
|
|
21
|
-
city: string;
|
|
22
|
-
stateCode: string;
|
|
23
|
-
postalCode: string;
|
|
24
|
-
description: string;
|
|
25
|
-
logoImage: string;
|
|
26
|
-
coverImage: string;
|
|
27
|
-
};
|
|
28
|
-
export declare type BusinessConfig = {
|
|
29
|
-
setting: object | string;
|
|
30
|
-
appSetting: object | string;
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=response_data_type.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"response_data_type.d.ts","sourceRoot":"","sources":["../../src/base/response_data_type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,MAAM,CAAC,OAAO,MAAM,eAAe,GAAG;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG;IAChC,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;CACrC,CAAA;AAED,MAAM,CAAC,OAAO,MAAM,UAAU,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,CAAC,OAAO,MAAM,YAAY,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,CAAC,OAAO,MAAM,cAAc,GAAG;IACjC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"response_data_type.js","sourceRoot":"","sources":["../../src/base/response_data_type.ts"],"names":[],"mappings":""}
|
package/dist/base_type.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base_type.js","sourceRoot":"","sources":["../src/base_type.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,aAEX;AAFD,WAAY,aAAa;IACrB,6BAAY,CAAA;AAChB,CAAC,EAFW,aAAa,KAAb,aAAa,QAExB;AAED,MAAM,CAAN,IAAY,SAEX;AAFD,WAAY,SAAS;IACjB,qCAAwB,CAAA;AAC5B,CAAC,EAFW,SAAS,KAAT,SAAS,QAEpB;AAED,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACjB,wBAAW,CAAA;IACX,gCAAmB,CAAA;IACnB,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;AACrB,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB"}
|
package/dist/common_bridge.d.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/** @internal */
|
|
2
|
-
declare const mabMessageQueue: Callback[];
|
|
3
|
-
declare const mabCustomEventQueue: CustomEvent[];
|
|
4
|
-
declare const mabKeyboardEventQueue: CustomEvent[];
|
|
5
|
-
export { mabMessageQueue };
|
|
6
|
-
export { mabCustomEventQueue };
|
|
7
|
-
export { mabKeyboardEventQueue };
|
|
8
|
-
/** @internal */
|
|
9
|
-
export interface Callback {
|
|
10
|
-
id: string;
|
|
11
|
-
onSuccess: (value: string) => void;
|
|
12
|
-
onError: (error: string) => void;
|
|
13
|
-
}
|
|
14
|
-
/** @internal */
|
|
15
|
-
export interface PlatformExecutor {
|
|
16
|
-
/**
|
|
17
|
-
* Method to call the native interface methods for respective platforms
|
|
18
|
-
* such as iOS & Android.
|
|
19
|
-
* @param {[string]} action Action command/interface name that native side need to execute
|
|
20
|
-
* @param {Object} param Object that contains request parameter values like permissions.
|
|
21
|
-
* For eg., {permission: 'location'}
|
|
22
|
-
* @param {[Function]} onSuccess Success callback function
|
|
23
|
-
* @param {[Function]} onError Error callback function
|
|
24
|
-
*/
|
|
25
|
-
exec(action: string, param: object | null, onSuccess: (value: string) => void, onError: (error: string) => void): void;
|
|
26
|
-
execEvents(event: CustomEvent): void;
|
|
27
|
-
/**
|
|
28
|
-
* Get the platform which injects this bridge.
|
|
29
|
-
* @returns The platform name. It could be 'Android' or 'iOS'.
|
|
30
|
-
*/
|
|
31
|
-
getPlatform(): string;
|
|
32
|
-
}
|
|
33
|
-
export declare class MiniAppBridge {
|
|
34
|
-
executor: PlatformExecutor;
|
|
35
|
-
platform: string;
|
|
36
|
-
constructor(executor: PlatformExecutor);
|
|
37
|
-
/**
|
|
38
|
-
* Success Callback method that will be called from native side
|
|
39
|
-
* to this bridge. This method will send back the value to the
|
|
40
|
-
* mini apps that uses promises.
|
|
41
|
-
* @param {[String]} messageId Message ID which will be used to get callback object from messageQueue
|
|
42
|
-
* @param {[String]} value Response value sent from the native on invoking the action command
|
|
43
|
-
*/
|
|
44
|
-
execSuccessCallback(messageId: any, value: any): void;
|
|
45
|
-
/**
|
|
46
|
-
* Error Callback method that will be called from native side
|
|
47
|
-
* to this bridge. This method will send back the error message to the
|
|
48
|
-
* mini apps that uses promises.
|
|
49
|
-
* @param {[String]} messageId Message ID which will be used to get callback object from messageQueue
|
|
50
|
-
* @param {[String]} errorMessage Error message sent from the native on invoking the action command
|
|
51
|
-
*/
|
|
52
|
-
execErrorCallback(messageId: any, errorMessage: any): void;
|
|
53
|
-
/**
|
|
54
|
-
* Event Callback method that will be called from native side
|
|
55
|
-
* to this bridge. This method will send back the value to the
|
|
56
|
-
* mini app that listen to this eventType.
|
|
57
|
-
* @param {[String]} eventType EventType which will be used to listen for the event
|
|
58
|
-
* @param {[String]} value Additional message sent from the native on invoking for the eventType
|
|
59
|
-
*/
|
|
60
|
-
execCustomEventsCallback(eventType: string, value: string): void;
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=common_bridge.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common_bridge.d.ts","sourceRoot":"","sources":["../src/common_bridge.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,QAAA,MAAM,eAAe,EAAE,QAAQ,EAAO,CAAC;AACvC,QAAA,MAAM,mBAAmB,EAAE,WAAW,EAAO,CAAC;AAC9C,QAAA,MAAM,qBAAqB,EAAE,WAAW,EAAO,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAEjC,gBAAgB;AAChB,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,gBAAgB;AAChB,MAAM,WAAW,gBAAgB;IAC7B;;;;;;;;OAQG;IACH,IAAI,CACA,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,EAClC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GACjC,IAAI,CAAC;IAER,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC;IAErC;;;OAGG;IACH,WAAW,IAAI,MAAM,CAAC;CACzB;AAED,qBAAa,aAAa;IACtB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;gBAIL,QAAQ,EAAE,gBAAgB;IAetC;;;;;;OAMG;IACH,mBAAmB,CAAC,SAAS,KAAA,EAAE,KAAK,KAAA;IAYpC;;;;;;OAMG;IACH,iBAAiB,CAAC,SAAS,KAAA,EAAE,YAAY,KAAA;IAUzC;;;;;;OAMG;IACH,wBAAwB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAgB5D"}
|
package/dist/common_bridge.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/** @internal */
|
|
2
|
-
const mabMessageQueue = [];
|
|
3
|
-
const mabCustomEventQueue = [];
|
|
4
|
-
const mabKeyboardEventQueue = [];
|
|
5
|
-
export { mabMessageQueue };
|
|
6
|
-
export { mabCustomEventQueue };
|
|
7
|
-
export { mabKeyboardEventQueue };
|
|
8
|
-
export class MiniAppBridge {
|
|
9
|
-
// isSecureStorageReady = false;
|
|
10
|
-
// secureStorageLoadError: MiniAppError | null = null;
|
|
11
|
-
constructor(executor) {
|
|
12
|
-
this.executor = executor;
|
|
13
|
-
this.platform = executor.getPlatform();
|
|
14
|
-
// window.addEventListener(
|
|
15
|
-
// MiniAppSecureStorageEvents.onReady,
|
|
16
|
-
// () => (this.isSecureStorageReady = true)
|
|
17
|
-
// );
|
|
18
|
-
// window.addEventListener(
|
|
19
|
-
// MiniAppSecureStorageEvents.onLoadError,
|
|
20
|
-
// (e: CustomEvent) =>
|
|
21
|
-
// (this.secureStorageLoadError = parseMiniAppError(e.detail.message))
|
|
22
|
-
// );
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Success Callback method that will be called from native side
|
|
26
|
-
* to this bridge. This method will send back the value to the
|
|
27
|
-
* mini apps that uses promises.
|
|
28
|
-
* @param {[String]} messageId Message ID which will be used to get callback object from messageQueue
|
|
29
|
-
* @param {[String]} value Response value sent from the native on invoking the action command
|
|
30
|
-
*/
|
|
31
|
-
execSuccessCallback(messageId, value) {
|
|
32
|
-
const queueObj = mabMessageQueue.filter(callback => callback.id === messageId)[0];
|
|
33
|
-
if (value) {
|
|
34
|
-
queueObj.onSuccess(value);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
queueObj.onError('Unknown Error');
|
|
38
|
-
}
|
|
39
|
-
removeFromMessageQueue(queueObj);
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Error Callback method that will be called from native side
|
|
43
|
-
* to this bridge. This method will send back the error message to the
|
|
44
|
-
* mini apps that uses promises.
|
|
45
|
-
* @param {[String]} messageId Message ID which will be used to get callback object from messageQueue
|
|
46
|
-
* @param {[String]} errorMessage Error message sent from the native on invoking the action command
|
|
47
|
-
*/
|
|
48
|
-
execErrorCallback(messageId, errorMessage) {
|
|
49
|
-
const queueObj = mabMessageQueue.filter(callback => callback.id === messageId)[0];
|
|
50
|
-
if (!errorMessage) {
|
|
51
|
-
errorMessage = 'Unknown Error';
|
|
52
|
-
}
|
|
53
|
-
queueObj.onError(errorMessage);
|
|
54
|
-
removeFromMessageQueue(queueObj);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Event Callback method that will be called from native side
|
|
58
|
-
* to this bridge. This method will send back the value to the
|
|
59
|
-
* mini app that listen to this eventType.
|
|
60
|
-
* @param {[String]} eventType EventType which will be used to listen for the event
|
|
61
|
-
* @param {[String]} value Additional message sent from the native on invoking for the eventType
|
|
62
|
-
*/
|
|
63
|
-
execCustomEventsCallback(eventType, value) {
|
|
64
|
-
const event = new CustomEvent(eventType, {
|
|
65
|
-
detail: { message: value },
|
|
66
|
-
});
|
|
67
|
-
let queueObj = mabCustomEventQueue.filter(customEvent => customEvent === event)[0];
|
|
68
|
-
if (!queueObj) {
|
|
69
|
-
if (eventType === event.type) {
|
|
70
|
-
removeFromEventQueue(event);
|
|
71
|
-
}
|
|
72
|
-
queueObj = event;
|
|
73
|
-
mabCustomEventQueue.unshift(queueObj);
|
|
74
|
-
}
|
|
75
|
-
this.executor.execEvents(queueObj);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Method to remove the callback object from the message queue after successful/error communication
|
|
80
|
-
* with the native application
|
|
81
|
-
* @param {[Object]} queueObj Queue Object that holds the references of callback information.
|
|
82
|
-
* @internal
|
|
83
|
-
*/
|
|
84
|
-
function removeFromMessageQueue(queueObj) {
|
|
85
|
-
const messageObjIndex = mabMessageQueue.indexOf(queueObj);
|
|
86
|
-
if (messageObjIndex !== -1) {
|
|
87
|
-
mabMessageQueue.splice(messageObjIndex, 1);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
function removeFromEventQueue(queueObj) {
|
|
91
|
-
const eventObjIndex = mabCustomEventQueue.indexOf(mabCustomEventQueue.filter(customEvent => customEvent.type === queueObj.type)[0]);
|
|
92
|
-
if (eventObjIndex !== -1) {
|
|
93
|
-
mabCustomEventQueue.splice(eventObjIndex, 1);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common_bridge.js","sourceRoot":"","sources":["../src/common_bridge.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,MAAM,eAAe,GAAe,EAAE,CAAC;AACvC,MAAM,mBAAmB,GAAkB,EAAE,CAAC;AAC9C,MAAM,qBAAqB,GAAkB,EAAE,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAoCjC,MAAM,OAAO,aAAa;IAGtB,gCAAgC;IAChC,sDAAsD;IAEtD,YAAY,QAA0B;QAClC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;QAEvC,2BAA2B;QAC3B,0CAA0C;QAC1C,+CAA+C;QAC/C,KAAK;QACL,2BAA2B;QAC3B,8CAA8C;QAC9C,0BAA0B;QAC1B,8EAA8E;QAC9E,KAAK;IACT,CAAC;IAED;;;;;;OAMG;IACH,mBAAmB,CAAC,SAAS,EAAE,KAAK;QAChC,MAAM,QAAQ,GAAG,eAAe,CAAC,MAAM,CACnC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,SAAS,CACxC,CAAC,CAAC,CAAC,CAAC;QACL,IAAI,KAAK,EAAE;YACP,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;SAC7B;aAAM;YACH,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;SACrC;QACD,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IAED;;;;;;OAMG;IACH,iBAAiB,CAAC,SAAS,EAAE,YAAY;QACrC,MAAM,QAAQ,GAAG,eAAe,CAAC,MAAM,CACnC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,SAAS,CACxC,CAAC,CAAC,CAAC,CAAC;QACL,IAAI,CAAC,YAAY,EAAE;YACf,YAAY,GAAG,eAAe,CAAC;SAClC;QACD,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC/B,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IACD;;;;;;OAMG;IACH,wBAAwB,CAAC,SAAiB,EAAE,KAAa;QACrD,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,SAAS,EAAE;YACrC,MAAM,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;SAC7B,CAAC,CAAC;QACH,IAAI,QAAQ,GAAG,mBAAmB,CAAC,MAAM,CACrC,WAAW,CAAC,EAAE,CAAC,WAAW,KAAK,KAAK,CACvC,CAAC,CAAC,CAAC,CAAC;QACL,IAAI,CAAC,QAAQ,EAAE;YACX,IAAI,SAAS,KAAK,KAAK,CAAC,IAAI,EAAE;gBAC1B,oBAAoB,CAAC,KAAK,CAAC,CAAC;aAC/B;YACD,QAAQ,GAAG,KAAK,CAAC;YACjB,mBAAmB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;SACzC;QACD,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;CACJ;AACD;;;;;GAKG;AACH,SAAS,sBAAsB,CAAC,QAAQ;IACpC,MAAM,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC1D,IAAI,eAAe,KAAK,CAAC,CAAC,EAAE;QACxB,eAAe,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC;KAC9C;AACL,CAAC;AAED,SAAS,oBAAoB,CAAC,QAAQ;IAClC,MAAM,aAAa,GAAG,mBAAmB,CAAC,OAAO,CAC7C,mBAAmB,CAAC,MAAM,CACtB,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,CACpD,CAAC,CAAC,CAAC,CACP,CAAC;IACF,IAAI,aAAa,KAAK,CAAC,CAAC,EAAE;QACtB,mBAAmB,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;KAChD;AACL,CAAC"}
|
package/dist/context.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,SAAS,MAAM,SAAS,CAAC;AA+BrC,MAAM,OAAO,GAAqB;IAC9B,OAAO,EAAE,EAAE;IACX,cAAc,EAAE,EAAE;IAClB,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,aAAa,CAAC,EAAE;IAC7B,UAAU,EAAE,UAAU,MAAwB;QAC1C,oEAAoE;QACpE,MAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE;YACxB,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC3B;QACD,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE;YAC/B,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;SAClC;QACD,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE;YAC/B,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;SAC9B;QACD,IAAI,OAAO,CAAC,MAAM,EAAE;YAChB,MAAM,IAAI,SAAS,CAAC,uBAAuB,CACvC,8DAA8D,OAAO,CAAC,IAAI,CACtE,IAAI,CACP,EAAE,CACN,CAAC;SACL;QACD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;QAC5C,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAC1C,CAAC;IACD,oBAAoB,EAAE;QAClB,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5C,MAAM,IAAI,SAAS,CAAC,yBAAyB,CACzC,mHAAmH,CACtH,CAAC;SACL;IACL,CAAC;CACJ,CAAA;AAED,OAAO,EAAE,OAAO,EAAoB,CAAC"}
|
package/dist/error.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,QAAS,SAAQ,KAAK;IAC/B,YAAY,GAAG,IAAS;QACpB,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;QACf,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACtD,CAAC;CACJ;AAWD,MAAM,OAAO,iBAAkB,SAAQ,QAAQ;IAG3C,YAAmB,EACf,OAAO,EACP,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,OAAO,GACe;QACtB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG;YACZ,IAAI;YACJ,UAAU;YACV,IAAI;YACJ,OAAO;SACV,CAAC;IACN,CAAC;CACJ;AAED,qCAAqC;AACrC,MAAM,OAAO,yBAA0B,SAAQ,QAAQ;CAAI;AAAA,CAAC;AAC5D,MAAM,OAAO,uBAAwB,SAAQ,QAAQ;CAAI;AAAA,CAAC"}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,SAAS,CAAC;AAEpC,MAAM,CAAC,MAAM,GAAG,GAAG;IACf,OAAO;IACP,SAAS;IACT,gBAAgB;IAChB,MAAM,EAAE,QAAQ;CACnB,CAAC;AAEF,eAAe,GAAG,CAAC;AACnB,cAAc,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invoke_event_interface.js","sourceRoot":"","sources":["../../src/interface/invoke_event_interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as ResponseDataType from "src/base/response_data_type";
|
|
2
|
-
import * as InputDataType from "src/base/input_data_type";
|
|
3
|
-
export default interface NativeAppInterFace {
|
|
4
|
-
getAppId(): string;
|
|
5
|
-
login: (data?: InputDataType.LoginInput) => Promise<string>;
|
|
6
|
-
getLoginStatus: () => boolean;
|
|
7
|
-
getAccessToken: () => Promise<string | null>;
|
|
8
|
-
getVersion: () => string;
|
|
9
|
-
getSystemInfo: () => ResponseDataType.SystemInfo;
|
|
10
|
-
getBusinessInfo: () => ResponseDataType.BusinessInfo;
|
|
11
|
-
getBusinessConfig: () => ResponseDataType.BusinessConfig;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=native_app_interface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"native_app_interface.d.ts","sourceRoot":"","sources":["../../src/interface/native_app_interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAE1D,MAAM,CAAC,OAAO,WAAW,kBAAkB;IACvC,QAAQ,IAAI,MAAM,CAAC;IACnB,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,UAAU,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5D,cAAc,EAAE,MAAM,OAAO,CAAC;IAC9B,cAAc,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC7C,UAAU,EAAE,MAAM,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,gBAAgB,CAAC,UAAU,CAAC;IACjD,eAAe,EAAE,MAAM,gBAAgB,CAAC,YAAY,CAAC;IACrD,iBAAiB,EAAE,MAAM,gBAAgB,CAAC,cAAc,CAAC;CAC5D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"native_app_interface.js","sourceRoot":"","sources":["../../src/interface/native_app_interface.ts"],"names":[],"mappings":""}
|
package/dist/ios/ios_bridge.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ios_bridge.d.ts","sourceRoot":"","sources":["../../src/ios/ios_bridge.ts"],"names":[],"mappings":""}
|
package/dist/ios/ios_bridge.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { MiniAppBridge, mabMessageQueue, } from '../common_bridge';
|
|
2
|
-
import { Platform } from '../types/platform';
|
|
3
|
-
/* tslint:disable:no-any */
|
|
4
|
-
let uniqueId = Math.random();
|
|
5
|
-
// tslint:disable-next-line: variable-name
|
|
6
|
-
const GeolocationPositionError = {
|
|
7
|
-
PERMISSION_DENIED: 1,
|
|
8
|
-
POSITION_UNAVAILABLE: 2,
|
|
9
|
-
TIMEOUT: 3,
|
|
10
|
-
};
|
|
11
|
-
class IOSExecutor {
|
|
12
|
-
execEvents(event) {
|
|
13
|
-
window.dispatchEvent(event);
|
|
14
|
-
}
|
|
15
|
-
exec(action, param, onSuccess, onError) {
|
|
16
|
-
const callback = {};
|
|
17
|
-
callback.onSuccess = onSuccess;
|
|
18
|
-
callback.onError = onError;
|
|
19
|
-
callback.id = String(++uniqueId);
|
|
20
|
-
mabMessageQueue.unshift(callback);
|
|
21
|
-
window.webkit.messageHandlers.MiniAppiOS.postMessage(JSON.stringify({ action, param, id: callback.id }));
|
|
22
|
-
}
|
|
23
|
-
getPlatform() {
|
|
24
|
-
return Platform.IOS;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
const iOSExecutor = new IOSExecutor();
|
|
28
|
-
window.MiniAppBridge = new MiniAppBridge(iOSExecutor);
|
|
29
|
-
navigator.geolocation.getCurrentPosition = (success, error, options) => {
|
|
30
|
-
return iOSExecutor.exec('getCurrentPosition', { locationOptions: options }, value => {
|
|
31
|
-
try {
|
|
32
|
-
const parsedData = JSON.parse(value);
|
|
33
|
-
success(parsedData);
|
|
34
|
-
console.log(error);
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
error({
|
|
38
|
-
code: GeolocationPositionError.POSITION_UNAVAILABLE,
|
|
39
|
-
message: 'Failed to parse location object from MiniAppBridge: ' + error,
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}, error => console.error(error));
|
|
43
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ios_bridge.js","sourceRoot":"","sources":["../../src/ios/ios_bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EAEb,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,2BAA2B;AAC3B,IAAI,QAAQ,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;AAE7B,0CAA0C;AAC1C,MAAM,wBAAwB,GAAG;IAC/B,iBAAiB,EAAE,CAAC;IACpB,oBAAoB,EAAE,CAAC;IACvB,OAAO,EAAE,CAAC;CACX,CAAC;AAEF,MAAM,WAAW;IACf,UAAU,CAAC,KAAK;QACb,MAAc,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IACD,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO;QACpC,MAAM,QAAQ,GAAG,EAAc,CAAC;QAChC,QAAQ,CAAC,SAAS,GAAG,SAAS,CAAC;QAC/B,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;QAC3B,QAAQ,CAAC,EAAE,GAAG,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC;QACjC,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAEjC,MAAc,CAAC,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC,WAAW,CAC3D,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CACnD,CAAC;IACJ,CAAC;IAED,WAAW;QACT,OAAO,QAAQ,CAAC,GAAG,CAAC;IACtB,CAAC;CACF;AAED,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;AACrC,MAAc,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,WAAW,CAAC,CAAC;AAE/D,SAAS,CAAC,WAAW,CAAC,kBAAkB,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;IACrE,OAAO,WAAW,CAAC,IAAI,CACrB,oBAAoB,EACpB,EAAE,eAAe,EAAE,OAAO,EAAE,EAC5B,KAAK,CAAC,EAAE;QACN,IAAI;YACF,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACrC,OAAO,CAAC,UAAU,CAAC,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;SACpB;QAAC,OAAO,KAAK,EAAE;YACd,KAAK,CAAC;gBACJ,IAAI,EAAE,wBAAwB,CAAC,oBAAoB;gBACnD,OAAO,EACL,sDAAsD,GAAG,KAAK;aACjE,CAAC,CAAC;SACJ;IACH,CAAC,EACD,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAC9B,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as ResponseDataType from "src/base/response_data_type";
|
|
2
|
-
import NativeAppInterFace from "src/interface/native_app_interface";
|
|
3
|
-
import * as InputDataType from "src/base/input_data_type";
|
|
4
|
-
export declare class NativeAppClass implements NativeAppInterFace {
|
|
5
|
-
getAppId(): string;
|
|
6
|
-
login: (data?: InputDataType.LoginInput | undefined) => Promise<string>;
|
|
7
|
-
getLoginStatus: () => boolean;
|
|
8
|
-
getAccessToken: () => Promise<string | null>;
|
|
9
|
-
getVersion: () => string;
|
|
10
|
-
getSystemInfo: () => ResponseDataType.SystemInfo;
|
|
11
|
-
getBusinessInfo: () => ResponseDataType.BusinessInfo;
|
|
12
|
-
getBusinessConfig: () => ResponseDataType.BusinessConfig;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/native_app/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,6BAA6B,CAAC;AAChE,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AACpE,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAE1D,qBAAa,cAAe,YAAW,kBAAkB;IACrD,QAAQ,IAAI,MAAM;IAGlB,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,UAAU,GAAG,SAAS,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACxE,cAAc,EAAE,MAAM,OAAO,CAAC;IAC9B,cAAc,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC7C,UAAU,EAAE,MAAM,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,gBAAgB,CAAC,UAAU,CAAC;IACjD,eAAe,EAAE,MAAM,gBAAgB,CAAC,YAAY,CAAC;IACrD,iBAAiB,EAAE,MAAM,gBAAgB,CAAC,cAAc,CAAC;CAE5D"}
|
package/dist/native_app/index.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export class NativeAppClass {
|
|
2
|
-
getAppId() {
|
|
3
|
-
return "App ID ne hihi";
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
// const NativeApp: NativeAppInterFace = {
|
|
7
|
-
// getAppId: function (): string {
|
|
8
|
-
// throw new Error("Function not implemented.");
|
|
9
|
-
// },
|
|
10
|
-
// login: function (data?: LoginInput | undefined): Promise<string> {
|
|
11
|
-
// throw new Error("Function not implemented.");
|
|
12
|
-
// },
|
|
13
|
-
// getLoginStatus: function (): boolean {
|
|
14
|
-
// throw new Error("Function not implemented.");
|
|
15
|
-
// },
|
|
16
|
-
// getAccessToken: function (): Promise<string | null> {
|
|
17
|
-
// throw new Error("Function not implemented.");
|
|
18
|
-
// },
|
|
19
|
-
// getVersion: function (): string {
|
|
20
|
-
// throw new Error("Function not implemented.");
|
|
21
|
-
// },
|
|
22
|
-
// getSystemInfo: function (): SystemInfo {
|
|
23
|
-
// throw new Error("Function not implemented.");
|
|
24
|
-
// },
|
|
25
|
-
// getBusinessInfo: function (): BusinessInfo {
|
|
26
|
-
// throw new Error("Function not implemented.");
|
|
27
|
-
// },
|
|
28
|
-
// getBusinessConfig: function (): BusinessConfig {
|
|
29
|
-
// throw new Error("Function not implemented.");
|
|
30
|
-
// }
|
|
31
|
-
// }
|
|
32
|
-
// export { NativeApp };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/native_app/index.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,SAAS;IACX,QAAQ;QACX,OAAO,EAAE,CAAC;IACd,CAAC;CASJ"}
|
package/dist/types/platform.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/types/platform.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAEhB,uBAAuB;AACvB,oBAAY,QAAQ;IAChB,OAAO,YAAY;IACnB,GAAG,QAAQ;IACX,GAAG,QAAQ;CACd"}
|
package/dist/types/platform.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../src/types/platform.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAEhB,uBAAuB;AACvB,MAAM,CAAN,IAAY,QAIX;AAJD,WAAY,QAAQ;IAChB,+BAAmB,CAAA;IACnB,uBAAW,CAAA;IACX,uBAAW,CAAA;AACf,CAAC,EAJW,QAAQ,KAAR,QAAQ,QAInB"}
|
package/dist/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|