diff --git a/_versions/1.21/1.21.md b/_versions/1.21/1.21.md new file mode 100644 index 00000000..1d290c0a --- /dev/null +++ b/_versions/1.21/1.21.md @@ -0,0 +1,4 @@ +--- +version: "1.21" +date: 2024-07-30 +--- diff --git a/docs/1.21/api/README.md b/docs/1.21/api/README.md new file mode 100644 index 00000000..07c567c7 --- /dev/null +++ b/docs/1.21/api/README.md @@ -0,0 +1,11 @@ +--- +layout: default +--- + + + + + + + + diff --git a/docs/1.21/api/classes/accesstokendata.md b/docs/1.21/api/classes/accesstokendata.md new file mode 100644 index 00000000..58af35b1 --- /dev/null +++ b/docs/1.21/api/classes/accesstokendata.md @@ -0,0 +1,63 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / AccessTokenData + +# Class: AccessTokenData + +Token data type. + +## Hierarchy + +* **AccessTokenData** + +## Index + +### Constructors + +* [constructor](accesstokendata.md#constructor) + +### Properties + +* [scopes](accesstokendata.md#scopes) +* [token](accesstokendata.md#token) +* [validUntil](accesstokendata.md#validuntil) + +## Constructors + +### constructor + +\+ **new AccessTokenData**(`baseToken`: NativeTokenData): [AccessTokenData](accesstokendata.md) + +*Defined in [js-miniapp-bridge/src/types/token-data.ts:18](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/token-data.ts#L18)* + +#### Parameters: + +Name | Type | +------ | ------ | +`baseToken` | NativeTokenData | + +**Returns:** [AccessTokenData](accesstokendata.md) + +## Properties + +### scopes + +• `Readonly` **scopes**: [AccessTokenScopes](accesstokenscopes.md) + +*Defined in [js-miniapp-bridge/src/types/token-data.ts:18](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/token-data.ts#L18)* + +___ + +### token + +• `Readonly` **token**: string + +*Defined in [js-miniapp-bridge/src/types/token-data.ts:16](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/token-data.ts#L16)* + +___ + +### validUntil + +• `Readonly` **validUntil**: Date + +*Defined in [js-miniapp-bridge/src/types/token-data.ts:17](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/token-data.ts#L17)* diff --git a/docs/1.21/api/classes/accesstokenscopes.md b/docs/1.21/api/classes/accesstokenscopes.md new file mode 100644 index 00000000..ac304f02 --- /dev/null +++ b/docs/1.21/api/classes/accesstokenscopes.md @@ -0,0 +1,54 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / AccessTokenScopes + +# Class: AccessTokenScopes + +Token permission type. + +## Hierarchy + +* **AccessTokenScopes** + +## Index + +### Constructors + +* [constructor](accesstokenscopes.md#constructor) + +### Properties + +* [audience](accesstokenscopes.md#audience) +* [scopes](accesstokenscopes.md#scopes) + +## Constructors + +### constructor + +\+ **new AccessTokenScopes**(`basePermission`: NativeTokenScopes): [AccessTokenScopes](accesstokenscopes.md) + +*Defined in [js-miniapp-bridge/src/types/token-data.ts:30](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/token-data.ts#L30)* + +#### Parameters: + +Name | Type | +------ | ------ | +`basePermission` | NativeTokenScopes | + +**Returns:** [AccessTokenScopes](accesstokenscopes.md) + +## Properties + +### audience + +• `Readonly` **audience**: string + +*Defined in [js-miniapp-bridge/src/types/token-data.ts:29](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/token-data.ts#L29)* + +___ + +### scopes + +• `Readonly` **scopes**: string[] + +*Defined in [js-miniapp-bridge/src/types/token-data.ts:30](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/token-data.ts#L30)* diff --git a/docs/1.21/api/classes/audiencenotsupportederror.md b/docs/1.21/api/classes/audiencenotsupportederror.md new file mode 100644 index 00000000..df3a24fe --- /dev/null +++ b/docs/1.21/api/classes/audiencenotsupportederror.md @@ -0,0 +1,82 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / AudienceNotSupportedError + +# Class: AudienceNotSupportedError + +## Hierarchy + +* [MiniAppError](miniapperror.md) + + ↳ **AudienceNotSupportedError** + +## Index + +### Constructors + +* [constructor](audiencenotsupportederror.md#constructor) + +### Properties + +* [errorInput](audiencenotsupportederror.md#errorinput) +* [message](audiencenotsupportederror.md#message) +* [name](audiencenotsupportederror.md#name) +* [stack](audiencenotsupportederror.md#stack) + +## Constructors + +### constructor + +\+ **new AudienceNotSupportedError**(`errorInput`: [MiniAppJson](../interfaces/miniappjson.md)): [AudienceNotSupportedError](audiencenotsupportederror.md) + +*Overrides [MiniAppError](miniapperror.md).[constructor](miniapperror.md#constructor)* + +*Defined in [js-miniapp-bridge/src/types/error-types/auth-errors.ts:9](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/auth-errors.ts#L9)* + +#### Parameters: + +Name | Type | +------ | ------ | +`errorInput` | [MiniAppJson](../interfaces/miniappjson.md) | + +**Returns:** [AudienceNotSupportedError](audiencenotsupportederror.md) + +## Properties + +### errorInput + +• **errorInput**: [MiniAppJson](../interfaces/miniappjson.md) + +*Overrides [MiniAppError](miniapperror.md).[errorInput](miniapperror.md#errorinput)* + +*Defined in [js-miniapp-bridge/src/types/error-types/auth-errors.ts:10](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/auth-errors.ts#L10)* + +___ + +### message + +• **message**: string + +*Inherited from [MiniAppError](miniapperror.md).[message](miniapperror.md#message)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1054* + +___ + +### name + +• **name**: string + +*Inherited from [MiniAppError](miniapperror.md).[name](miniapperror.md#name)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1053* + +___ + +### stack + +• `Optional` **stack**: string + +*Inherited from [MiniAppError](miniapperror.md).[stack](miniapperror.md#stack)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1055* diff --git a/docs/1.21/api/classes/authorizationfailureerror.md b/docs/1.21/api/classes/authorizationfailureerror.md new file mode 100644 index 00000000..39fdc8f1 --- /dev/null +++ b/docs/1.21/api/classes/authorizationfailureerror.md @@ -0,0 +1,82 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / AuthorizationFailureError + +# Class: AuthorizationFailureError + +## Hierarchy + +* [MiniAppError](miniapperror.md) + + ↳ **AuthorizationFailureError** + +## Index + +### Constructors + +* [constructor](authorizationfailureerror.md#constructor) + +### Properties + +* [errorInput](authorizationfailureerror.md#errorinput) +* [message](authorizationfailureerror.md#message) +* [name](authorizationfailureerror.md#name) +* [stack](authorizationfailureerror.md#stack) + +## Constructors + +### constructor + +\+ **new AuthorizationFailureError**(`errorInput`: [MiniAppJson](../interfaces/miniappjson.md)): [AuthorizationFailureError](authorizationfailureerror.md) + +*Overrides [MiniAppError](miniapperror.md).[constructor](miniapperror.md#constructor)* + +*Defined in [js-miniapp-bridge/src/types/error-types/auth-errors.ts:25](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/auth-errors.ts#L25)* + +#### Parameters: + +Name | Type | +------ | ------ | +`errorInput` | [MiniAppJson](../interfaces/miniappjson.md) | + +**Returns:** [AuthorizationFailureError](authorizationfailureerror.md) + +## Properties + +### errorInput + +• **errorInput**: [MiniAppJson](../interfaces/miniappjson.md) + +*Overrides [MiniAppError](miniapperror.md).[errorInput](miniapperror.md#errorinput)* + +*Defined in [js-miniapp-bridge/src/types/error-types/auth-errors.ts:26](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/auth-errors.ts#L26)* + +___ + +### message + +• **message**: string + +*Inherited from [MiniAppError](miniapperror.md).[message](miniapperror.md#message)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1054* + +___ + +### name + +• **name**: string + +*Inherited from [MiniAppError](miniapperror.md).[name](miniapperror.md#name)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1053* + +___ + +### stack + +• `Optional` **stack**: string + +*Inherited from [MiniAppError](miniapperror.md).[stack](miniapperror.md#stack)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1055* diff --git a/docs/1.21/api/classes/bridgeinfoconverter.md b/docs/1.21/api/classes/bridgeinfoconverter.md new file mode 100644 index 00000000..ad15fc4e --- /dev/null +++ b/docs/1.21/api/classes/bridgeinfoconverter.md @@ -0,0 +1,48 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / BridgeInfoConverter + +# Class: BridgeInfoConverter + +## Hierarchy + +* **BridgeInfoConverter** + +## Index + +### Methods + +* [convertJsonToPlatformInfo](bridgeinfoconverter.md#convertjsontoplatforminfo) +* [mapStringToHostBuildType](bridgeinfoconverter.md#mapstringtohostbuildtype) + +## Methods + +### convertJsonToPlatformInfo + +▸ `Static`**convertJsonToPlatformInfo**(`json`: [HostEnvironmentInfo](../interfaces/hostenvironmentinfo.md)): [HostEnvironmentInfo](../interfaces/hostenvironmentinfo.md) + +*Defined in [js-miniapp-sdk/src/modules/bridge-info-converter.ts:47](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/bridge-info-converter.ts#L47)* + +#### Parameters: + +Name | Type | +------ | ------ | +`json` | [HostEnvironmentInfo](../interfaces/hostenvironmentinfo.md) | + +**Returns:** [HostEnvironmentInfo](../interfaces/hostenvironmentinfo.md) + +___ + +### mapStringToHostBuildType + +▸ `Static`**mapStringToHostBuildType**(`value`: string): [HostBuildType](../enums/hostbuildtype.md) \| undefined + +*Defined in [js-miniapp-sdk/src/modules/bridge-info-converter.ts:41](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/bridge-info-converter.ts#L41)* + +#### Parameters: + +Name | Type | +------ | ------ | +`value` | string | + +**Returns:** [HostBuildType](../enums/hostbuildtype.md) \| undefined diff --git a/docs/1.21/api/classes/consumefailederror.md b/docs/1.21/api/classes/consumefailederror.md new file mode 100644 index 00000000..9f71f569 --- /dev/null +++ b/docs/1.21/api/classes/consumefailederror.md @@ -0,0 +1,82 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / ConsumeFailedError + +# Class: ConsumeFailedError + +## Hierarchy + +* [MiniAppError](miniapperror.md) + + ↳ **ConsumeFailedError** + +## Index + +### Constructors + +* [constructor](consumefailederror.md#constructor) + +### Properties + +* [errorInput](consumefailederror.md#errorinput) +* [message](consumefailederror.md#message) +* [name](consumefailederror.md#name) +* [stack](consumefailederror.md#stack) + +## Constructors + +### constructor + +\+ **new ConsumeFailedError**(`errorInput`: [MiniAppJson](../interfaces/miniappjson.md)): [ConsumeFailedError](consumefailederror.md) + +*Overrides [MiniAppError](miniapperror.md).[constructor](miniapperror.md#constructor)* + +*Defined in [js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts:19](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts#L19)* + +#### Parameters: + +Name | Type | +------ | ------ | +`errorInput` | [MiniAppJson](../interfaces/miniappjson.md) | + +**Returns:** [ConsumeFailedError](consumefailederror.md) + +## Properties + +### errorInput + +• **errorInput**: [MiniAppJson](../interfaces/miniappjson.md) + +*Overrides [MiniAppError](miniapperror.md).[errorInput](miniapperror.md#errorinput)* + +*Defined in [js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts:20](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts#L20)* + +___ + +### message + +• **message**: string + +*Inherited from [MiniAppError](miniapperror.md).[message](miniapperror.md#message)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1054* + +___ + +### name + +• **name**: string + +*Inherited from [MiniAppError](miniapperror.md).[name](miniapperror.md#name)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1053* + +___ + +### stack + +• `Optional` **stack**: string + +*Inherited from [MiniAppError](miniapperror.md).[stack](miniapperror.md#stack)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1055* diff --git a/docs/1.21/api/classes/downloadfailederror.md b/docs/1.21/api/classes/downloadfailederror.md new file mode 100644 index 00000000..1c483180 --- /dev/null +++ b/docs/1.21/api/classes/downloadfailederror.md @@ -0,0 +1,84 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / DownloadFailedError + +# Class: DownloadFailedError + +Error returned by `MiniApp.downloadFile` when failed to download or save the file. + +## Hierarchy + +* [MiniAppError](miniapperror.md) + + ↳ **DownloadFailedError** + +## Index + +### Constructors + +* [constructor](downloadfailederror.md#constructor) + +### Properties + +* [errorInput](downloadfailederror.md#errorinput) +* [message](downloadfailederror.md#message) +* [name](downloadfailederror.md#name) +* [stack](downloadfailederror.md#stack) + +## Constructors + +### constructor + +\+ **new DownloadFailedError**(`errorInput`: [MiniAppDownloadError](../interfaces/miniappdownloaderror.md)): [DownloadFailedError](downloadfailederror.md) + +*Overrides [MiniAppError](miniapperror.md).[constructor](miniapperror.md#constructor)* + +*Defined in [js-miniapp-bridge/src/types/error-types/download-file-errors.ts:17](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/download-file-errors.ts#L17)* + +#### Parameters: + +Name | Type | +------ | ------ | +`errorInput` | [MiniAppDownloadError](../interfaces/miniappdownloaderror.md) | + +**Returns:** [DownloadFailedError](downloadfailederror.md) + +## Properties + +### errorInput + +• **errorInput**: [MiniAppDownloadError](../interfaces/miniappdownloaderror.md) + +*Overrides [MiniAppError](miniapperror.md).[errorInput](miniapperror.md#errorinput)* + +*Defined in [js-miniapp-bridge/src/types/error-types/download-file-errors.ts:18](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/download-file-errors.ts#L18)* + +___ + +### message + +• **message**: string + +*Inherited from [MiniAppError](miniapperror.md).[message](miniapperror.md#message)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1054* + +___ + +### name + +• **name**: string + +*Inherited from [MiniAppError](miniapperror.md).[name](miniapperror.md#name)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1053* + +___ + +### stack + +• `Optional` **stack**: string + +*Inherited from [MiniAppError](miniapperror.md).[stack](miniapperror.md#stack)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1055* diff --git a/docs/1.21/api/classes/downloadhttperror.md b/docs/1.21/api/classes/downloadhttperror.md new file mode 100644 index 00000000..04a30f74 --- /dev/null +++ b/docs/1.21/api/classes/downloadhttperror.md @@ -0,0 +1,95 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / DownloadHttpError + +# Class: DownloadHttpError + +Error returned by `MiniApp.downloadFile` when failed to download the file due to an HTTP error. + +**`param`** HTTP error code returned by the server. + +## Hierarchy + +* [MiniAppError](miniapperror.md) + + ↳ **DownloadHttpError** + +## Index + +### Constructors + +* [constructor](downloadhttperror.md#constructor) + +### Properties + +* [code](downloadhttperror.md#code) +* [errorInput](downloadhttperror.md#errorinput) +* [message](downloadhttperror.md#message) +* [name](downloadhttperror.md#name) +* [stack](downloadhttperror.md#stack) + +## Constructors + +### constructor + +\+ **new DownloadHttpError**(`errorInput`: [MiniAppDownloadError](../interfaces/miniappdownloaderror.md)): [DownloadHttpError](downloadhttperror.md) + +*Overrides [MiniAppError](miniapperror.md).[constructor](miniapperror.md#constructor)* + +*Defined in [js-miniapp-bridge/src/types/error-types/download-file-errors.ts:53](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/download-file-errors.ts#L53)* + +#### Parameters: + +Name | Type | +------ | ------ | +`errorInput` | [MiniAppDownloadError](../interfaces/miniappdownloaderror.md) | + +**Returns:** [DownloadHttpError](downloadhttperror.md) + +## Properties + +### code + +• **code**: number + +*Defined in [js-miniapp-bridge/src/types/error-types/download-file-errors.ts:53](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/download-file-errors.ts#L53)* + +___ + +### errorInput + +• **errorInput**: [MiniAppDownloadError](../interfaces/miniappdownloaderror.md) + +*Overrides [MiniAppError](miniapperror.md).[errorInput](miniapperror.md#errorinput)* + +*Defined in [js-miniapp-bridge/src/types/error-types/download-file-errors.ts:55](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/download-file-errors.ts#L55)* + +___ + +### message + +• **message**: string + +*Inherited from [MiniAppError](miniapperror.md).[message](miniapperror.md#message)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1054* + +___ + +### name + +• **name**: string + +*Inherited from [MiniAppError](miniapperror.md).[name](miniapperror.md#name)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1053* + +___ + +### stack + +• `Optional` **stack**: string + +*Inherited from [MiniAppError](miniapperror.md).[stack](miniapperror.md#stack)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1055* diff --git a/docs/1.21/api/classes/invalidurlerror.md b/docs/1.21/api/classes/invalidurlerror.md new file mode 100644 index 00000000..0293b31c --- /dev/null +++ b/docs/1.21/api/classes/invalidurlerror.md @@ -0,0 +1,85 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / InvalidUrlError + +# Class: InvalidUrlError + +Error returned by `MiniApp.downloadFile` when the provided URL is invalid. +Only `http:`, `https:` and `data:` URLs are supported. + +## Hierarchy + +* [MiniAppError](miniapperror.md) + + ↳ **InvalidUrlError** + +## Index + +### Constructors + +* [constructor](invalidurlerror.md#constructor) + +### Properties + +* [errorInput](invalidurlerror.md#errorinput) +* [message](invalidurlerror.md#message) +* [name](invalidurlerror.md#name) +* [stack](invalidurlerror.md#stack) + +## Constructors + +### constructor + +\+ **new InvalidUrlError**(`errorInput`: [MiniAppDownloadError](../interfaces/miniappdownloaderror.md)): [InvalidUrlError](invalidurlerror.md) + +*Overrides [MiniAppError](miniapperror.md).[constructor](miniapperror.md#constructor)* + +*Defined in [js-miniapp-bridge/src/types/error-types/download-file-errors.ts:29](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/download-file-errors.ts#L29)* + +#### Parameters: + +Name | Type | +------ | ------ | +`errorInput` | [MiniAppDownloadError](../interfaces/miniappdownloaderror.md) | + +**Returns:** [InvalidUrlError](invalidurlerror.md) + +## Properties + +### errorInput + +• **errorInput**: [MiniAppDownloadError](../interfaces/miniappdownloaderror.md) + +*Overrides [MiniAppError](miniapperror.md).[errorInput](miniapperror.md#errorinput)* + +*Defined in [js-miniapp-bridge/src/types/error-types/download-file-errors.ts:30](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/download-file-errors.ts#L30)* + +___ + +### message + +• **message**: string + +*Inherited from [MiniAppError](miniapperror.md).[message](miniapperror.md#message)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1054* + +___ + +### name + +• **name**: string + +*Inherited from [MiniAppError](miniapperror.md).[name](miniapperror.md#name)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1053* + +___ + +### stack + +• `Optional` **stack**: string + +*Inherited from [MiniAppError](miniapperror.md).[stack](miniapperror.md#stack)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1055* diff --git a/docs/1.21/api/classes/logtype.md b/docs/1.21/api/classes/logtype.md new file mode 100644 index 00000000..021cc37d --- /dev/null +++ b/docs/1.21/api/classes/logtype.md @@ -0,0 +1,68 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / LogType + +# Class: LogType + +## Hierarchy + +* **LogType** + +## Index + +### Properties + +* [icon](logtype.md#icon) +* [type](logtype.md#type) +* [debug](logtype.md#debug) +* [error](logtype.md#error) +* [log](logtype.md#log) +* [warn](logtype.md#warn) + +## Properties + +### icon + +• `Readonly` **icon**: string + +*Defined in [js-miniapp-bridge/src/common-log.ts:46](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-log.ts#L46)* + +___ + +### type + +• `Readonly` **type**: string + +*Defined in [js-miniapp-bridge/src/common-log.ts:46](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-log.ts#L46)* + +___ + +### debug + +▪ `Static` `Readonly` **debug**: [LogType](logtype.md) = new LogType('debug', '📘') + +*Defined in [js-miniapp-bridge/src/common-log.ts:41](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-log.ts#L41)* + +___ + +### error + +▪ `Static` `Readonly` **error**: [LogType](logtype.md) = new LogType('error', '📕') + +*Defined in [js-miniapp-bridge/src/common-log.ts:44](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-log.ts#L44)* + +___ + +### log + +▪ `Static` `Readonly` **log**: [LogType](logtype.md) = new LogType('log', '📗') + +*Defined in [js-miniapp-bridge/src/common-log.ts:42](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-log.ts#L42)* + +___ + +### warn + +▪ `Static` `Readonly` **warn**: [LogType](logtype.md) = new LogType('warning', '📙') + +*Defined in [js-miniapp-bridge/src/common-log.ts:43](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-log.ts#L43)* diff --git a/docs/1.21/api/classes/miniapp.md b/docs/1.21/api/classes/miniapp.md new file mode 100644 index 00000000..021d5258 --- /dev/null +++ b/docs/1.21/api/classes/miniapp.md @@ -0,0 +1,365 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MiniApp + +# Class: MiniApp + +## Hierarchy + +* **MiniApp** + +## Implements + +* [MiniAppFeatures](../interfaces/miniappfeatures.md) +* [Ad](../interfaces/ad.md) +* Platform + +## Index + +### Properties + +* [chatService](miniapp.md#chatservice) +* [cookieManager](miniapp.md#cookiemanager) +* [miniappUtils](miniapp.md#miniapputils) +* [preferences](miniapp.md#preferences) +* [purchaseService](miniapp.md#purchaseservice) +* [secureStorageService](miniapp.md#securestorageservice) +* [universalBridge](miniapp.md#universalbridge) +* [user](miniapp.md#user) + +### Methods + +* [downloadFile](miniapp.md#downloadfile) +* [getHostEnvironmentInfo](miniapp.md#gethostenvironmentinfo) +* [getMauid](miniapp.md#getmauid) +* [getMessagingUniqueId](miniapp.md#getmessaginguniqueid) +* [getPlatform](miniapp.md#getplatform) +* [getPoints](miniapp.md#getpoints) +* [getUniqueId](miniapp.md#getuniqueid) +* [loadInterstitialAd](miniapp.md#loadinterstitialad) +* [loadRewardedAd](miniapp.md#loadrewardedad) +* [requestCustomPermissions](miniapp.md#requestcustompermissions) +* [requestLocationPermission](miniapp.md#requestlocationpermission) +* [setCloseAlert](miniapp.md#setclosealert) +* [setScreenOrientation](miniapp.md#setscreenorientation) +* [shareInfo](miniapp.md#shareinfo) +* [showInterstitialAd](miniapp.md#showinterstitialad) +* [showRewardedAd](miniapp.md#showrewardedad) + +## Properties + +### chatService + +• **chatService**: ChatService = new ChatService() + +*Defined in [js-miniapp-sdk/src/miniapp.ts:170](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L170)* + +___ + +### cookieManager + +• **cookieManager**: CookieManager = new CookieManager() + +*Defined in [js-miniapp-sdk/src/miniapp.ts:175](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L175)* + +___ + +### miniappUtils + +• **miniappUtils**: MiniAppUtils = new MiniAppUtils() + +*Defined in [js-miniapp-sdk/src/miniapp.ts:173](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L173)* + +___ + +### preferences + +• **preferences**: MiniAppPreference = new MiniAppPreference() + +*Defined in [js-miniapp-sdk/src/miniapp.ts:176](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L176)* + +___ + +### purchaseService + +• **purchaseService**: Purchases = new Purchases() + +*Defined in [js-miniapp-sdk/src/miniapp.ts:174](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L174)* + +___ + +### secureStorageService + +• **secureStorageService**: SecureStorageService = new SecureStorageService() + +*Defined in [js-miniapp-sdk/src/miniapp.ts:171](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L171)* + +___ + +### universalBridge + +• **universalBridge**: UniversalBridge = new UniversalBridge() + +*Defined in [js-miniapp-sdk/src/miniapp.ts:172](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L172)* + +___ + +### user + +• **user**: [UserInfoProvider](../interfaces/userinfoprovider.md) = new UserInfo() + +*Defined in [js-miniapp-sdk/src/miniapp.ts:169](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L169)* + +## Methods + +### downloadFile + +▸ **downloadFile**(`filename`: string, `url`: string, `headers?`: [DownloadFileHeaders](../interfaces/downloadfileheaders.md)): Promise\ + +*Implementation of [MiniAppFeatures](../interfaces/miniappfeatures.md)* + +*Defined in [js-miniapp-sdk/src/miniapp.ts:281](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L281)* + +#### Parameters: + +Name | Type | Default value | +------ | ------ | ------ | +`filename` | string | - | +`url` | string | - | +`headers` | [DownloadFileHeaders](../interfaces/downloadfileheaders.md) | {} | + +**Returns:** Promise\ + +___ + +### getHostEnvironmentInfo + +▸ **getHostEnvironmentInfo**(): Promise\<[HostEnvironmentInfo](../interfaces/hostenvironmentinfo.md)> + +*Implementation of [MiniAppFeatures](../interfaces/miniappfeatures.md)* + +*Defined in [js-miniapp-sdk/src/miniapp.ts:272](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L272)* + +**Returns:** Promise\<[HostEnvironmentInfo](../interfaces/hostenvironmentinfo.md)> + +___ + +### getMauid + +▸ **getMauid**(): Promise\ + +*Implementation of [MiniAppFeatures](../interfaces/miniappfeatures.md)* + +*Defined in [js-miniapp-sdk/src/miniapp.ts:193](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L193)* + +**Returns:** Promise\ + +___ + +### getMessagingUniqueId + +▸ **getMessagingUniqueId**(): Promise\ + +*Implementation of [MiniAppFeatures](../interfaces/miniappfeatures.md)* + +*Defined in [js-miniapp-sdk/src/miniapp.ts:189](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L189)* + +**Returns:** Promise\ + +___ + +### getPlatform + +▸ **getPlatform**(): string + +*Defined in [js-miniapp-sdk/src/miniapp.ts:256](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L256)* + +**Returns:** string + +___ + +### getPoints + +▸ **getPoints**(): Promise\<[Points](../interfaces/points.md)> + +*Implementation of [MiniAppFeatures](../interfaces/miniappfeatures.md)* + +*Defined in [js-miniapp-sdk/src/miniapp.ts:268](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L268)* + +**Returns:** Promise\<[Points](../interfaces/points.md)> + +___ + +### getUniqueId + +▸ **getUniqueId**(): Promise\ + +*Implementation of [MiniAppFeatures](../interfaces/miniappfeatures.md)* + +*Defined in [js-miniapp-sdk/src/miniapp.ts:185](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L185)* + +**`deprecated`** Deprecated method for getting the uniqueId use `getMessagingUniqueId` or `getMauid` instead + +**Returns:** Promise\ + +___ + +### loadInterstitialAd + +▸ **loadInterstitialAd**(`id`: string): Promise\ + +*Implementation of [Ad](../interfaces/ad.md)* + +*Defined in [js-miniapp-sdk/src/miniapp.ts:236](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L236)* + +#### Parameters: + +Name | Type | +------ | ------ | +`id` | string | + +**Returns:** Promise\ + +___ + +### loadRewardedAd + +▸ **loadRewardedAd**(`id`: string): Promise\ + +*Implementation of [Ad](../interfaces/ad.md)* + +*Defined in [js-miniapp-sdk/src/miniapp.ts:240](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L240)* + +#### Parameters: + +Name | Type | +------ | ------ | +`id` | string | + +**Returns:** Promise\ + +___ + +### requestCustomPermissions + +▸ **requestCustomPermissions**(`permissions`: [CustomPermission](../interfaces/custompermission.md)[]): Promise\<[CustomPermissionResult](../interfaces/custompermissionresult.md)[]> + +*Implementation of [MiniAppFeatures](../interfaces/miniappfeatures.md)* + +*Defined in [js-miniapp-sdk/src/miniapp.ts:228](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L228)* + +#### Parameters: + +Name | Type | +------ | ------ | +`permissions` | [CustomPermission](../interfaces/custompermission.md)[] | + +**Returns:** Promise\<[CustomPermissionResult](../interfaces/custompermissionresult.md)[]> + +___ + +### requestLocationPermission + +▸ **requestLocationPermission**(`permissionDescription?`: string): Promise\ + +*Implementation of [MiniAppFeatures](../interfaces/miniappfeatures.md)* + +*Defined in [js-miniapp-sdk/src/miniapp.ts:197](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L197)* + +#### Parameters: + +Name | Type | Default value | +------ | ------ | ------ | +`permissionDescription` | string | "" | + +**Returns:** Promise\ + +___ + +### setCloseAlert + +▸ **setCloseAlert**(`alertInfo`: [CloseAlertInfo](../interfaces/closealertinfo.md)): Promise\ + +*Implementation of [MiniAppFeatures](../interfaces/miniappfeatures.md)* + +*Defined in [js-miniapp-sdk/src/miniapp.ts:289](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L289)* + +#### Parameters: + +Name | Type | +------ | ------ | +`alertInfo` | [CloseAlertInfo](../interfaces/closealertinfo.md) | + +**Returns:** Promise\ + +___ + +### setScreenOrientation + +▸ **setScreenOrientation**(`screenOrientation`: [ScreenOrientation](../enums/screenorientation.md)): Promise\ + +*Implementation of [MiniAppFeatures](../interfaces/miniappfeatures.md)* + +*Defined in [js-miniapp-sdk/src/miniapp.ts:264](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L264)* + +#### Parameters: + +Name | Type | +------ | ------ | +`screenOrientation` | [ScreenOrientation](../enums/screenorientation.md) | + +**Returns:** Promise\ + +___ + +### shareInfo + +▸ **shareInfo**(`info`: [ShareInfoType](../interfaces/shareinfotype.md)): Promise\ + +*Implementation of [MiniAppFeatures](../interfaces/miniappfeatures.md)* + +*Defined in [js-miniapp-sdk/src/miniapp.ts:252](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L252)* + +#### Parameters: + +Name | Type | +------ | ------ | +`info` | [ShareInfoType](../interfaces/shareinfotype.md) | + +**Returns:** Promise\ + +___ + +### showInterstitialAd + +▸ **showInterstitialAd**(`id`: string): Promise\ + +*Implementation of [Ad](../interfaces/ad.md)* + +*Defined in [js-miniapp-sdk/src/miniapp.ts:244](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L244)* + +#### Parameters: + +Name | Type | +------ | ------ | +`id` | string | + +**Returns:** Promise\ + +___ + +### showRewardedAd + +▸ **showRewardedAd**(`id`: string): Promise\<[Reward](../interfaces/reward.md)> + +*Implementation of [Ad](../interfaces/ad.md)* + +*Defined in [js-miniapp-sdk/src/miniapp.ts:248](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L248)* + +#### Parameters: + +Name | Type | +------ | ------ | +`id` | string | + +**Returns:** Promise\<[Reward](../interfaces/reward.md)> diff --git a/docs/1.21/api/classes/miniappbridgeutils.md b/docs/1.21/api/classes/miniappbridgeutils.md new file mode 100644 index 00000000..b00f0626 --- /dev/null +++ b/docs/1.21/api/classes/miniappbridgeutils.md @@ -0,0 +1,31 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MiniAppBridgeUtils + +# Class: MiniAppBridgeUtils + +## Hierarchy + +* **MiniAppBridgeUtils** + +## Index + +### Methods + +* [BooleanValue](miniappbridgeutils.md#booleanvalue) + +## Methods + +### BooleanValue + +▸ `Static`**BooleanValue**(`value`: any): boolean + +*Defined in [js-miniapp-bridge/src/common-bridge.ts:1059](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-bridge.ts#L1059)* + +#### Parameters: + +Name | Type | +------ | ------ | +`value` | any | + +**Returns:** boolean diff --git a/docs/1.21/api/classes/miniapperror.md b/docs/1.21/api/classes/miniapperror.md new file mode 100644 index 00000000..fa2275a3 --- /dev/null +++ b/docs/1.21/api/classes/miniapperror.md @@ -0,0 +1,123 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MiniAppError + +# Class: MiniAppError + +This class is a representation of an error sent from MiniApp mobile SDK + +## Hierarchy + +* [Error](miniapperror.md#error) + + ↳ **MiniAppError** + + ↳↳ [AudienceNotSupportedError](audiencenotsupportederror.md) + + ↳↳ [ScopesNotSupportedError](scopesnotsupportederror.md) + + ↳↳ [AuthorizationFailureError](authorizationfailureerror.md) + + ↳↳ [DownloadFailedError](downloadfailederror.md) + + ↳↳ [InvalidUrlError](invalidurlerror.md) + + ↳↳ [SaveFailureError](savefailureerror.md) + + ↳↳ [DownloadHttpError](downloadhttperror.md) + + ↳↳ [SecureStorageFullError](securestoragefullerror.md) + + ↳↳ [SecureStorageBusyError](securestoragebusyerror.md) + + ↳↳ [SecureStorageUnavailableError](securestorageunavailableerror.md) + + ↳↳ [SecureStorageIOError](securestorageioerror.md) + + ↳↳ [PurchaseFailedError](purchasefailederror.md) + + ↳↳ [ConsumeFailedError](consumefailederror.md) + + ↳↳ [ProductNotFoundError](productnotfounderror.md) + + ↳↳ [ProductPurchasedAlreadyError](productpurchasedalreadyerror.md) + + ↳↳ [UserCancelledPurchaseError](usercancelledpurchaseerror.md) + +## Index + +### Constructors + +* [constructor](miniapperror.md#constructor) + +### Properties + +* [errorInput](miniapperror.md#errorinput) +* [message](miniapperror.md#message) +* [name](miniapperror.md#name) +* [stack](miniapperror.md#stack) +* [Error](miniapperror.md#error) + +## Constructors + +### constructor + +\+ **new MiniAppError**(`errorInput`: [MiniAppJson](../interfaces/miniappjson.md)): [MiniAppError](miniapperror.md) + +*Defined in [js-miniapp-bridge/src/types/error-types/mini-app-error.ts:9](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/mini-app-error.ts#L9)* + +#### Parameters: + +Name | Type | +------ | ------ | +`errorInput` | [MiniAppJson](../interfaces/miniappjson.md) | + +**Returns:** [MiniAppError](miniapperror.md) + +## Properties + +### errorInput + +• **errorInput**: [MiniAppJson](../interfaces/miniappjson.md) + +*Defined in [js-miniapp-bridge/src/types/error-types/mini-app-error.ts:10](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/mini-app-error.ts#L10)* + +___ + +### message + +• **message**: string + +*Inherited from [MiniAppError](miniapperror.md).[message](miniapperror.md#message)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1054* + +___ + +### name + +• **name**: string + +*Inherited from [MiniAppError](miniapperror.md).[name](miniapperror.md#name)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1053* + +___ + +### stack + +• `Optional` **stack**: string + +*Inherited from [MiniAppError](miniapperror.md).[stack](miniapperror.md#stack)* + +*Overrides [MiniAppError](miniapperror.md).[stack](miniapperror.md#stack)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1055* + +___ + +### Error + +▪ `Static` **Error**: ErrorConstructor + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1064* diff --git a/docs/1.21/api/classes/miniapppreferences.md b/docs/1.21/api/classes/miniapppreferences.md new file mode 100644 index 00000000..d651ba4e --- /dev/null +++ b/docs/1.21/api/classes/miniapppreferences.md @@ -0,0 +1,134 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MiniAppPreferences + +# Class: MiniAppPreferences + +## Hierarchy + +* **MiniAppPreferences** + +## Index + +### Constructors + +* [constructor](miniapppreferences.md#constructor) + +### Properties + +* [executor](miniapppreferences.md#executor) +* [platform](miniapppreferences.md#platform) + +### Methods + +* [clearMiniAppPreferences](miniapppreferences.md#clearminiapppreferences) +* [get](miniapppreferences.md#get) +* [remove](miniapppreferences.md#remove) +* [set](miniapppreferences.md#set) + +## Constructors + +### constructor + +\+ **new MiniAppPreferences**(`executor`: PlatformExecutor): [MiniAppPreferences](miniapppreferences.md) + +*Defined in [js-miniapp-bridge/src/modules/miniapp-preferences.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/modules/miniapp-preferences.ts#L6)* + +#### Parameters: + +Name | Type | +------ | ------ | +`executor` | PlatformExecutor | + +**Returns:** [MiniAppPreferences](miniapppreferences.md) + +## Properties + +### executor + +• **executor**: PlatformExecutor + +*Defined in [js-miniapp-bridge/src/modules/miniapp-preferences.ts:5](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/modules/miniapp-preferences.ts#L5)* + +___ + +### platform + +• **platform**: string + +*Defined in [js-miniapp-bridge/src/modules/miniapp-preferences.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/modules/miniapp-preferences.ts#L6)* + +## Methods + +### clearMiniAppPreferences + +▸ **clearMiniAppPreferences**(): Promise\ + +*Defined in [js-miniapp-bridge/src/modules/miniapp-preferences.ts:73](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/modules/miniapp-preferences.ts#L73)* + +Removes all keys that is stored + +**`see`** {clearMiniAppPreferences} + +**Returns:** Promise\ + +___ + +### get + +▸ **get**(`key`: string): Promise\ + +*Defined in [js-miniapp-bridge/src/modules/miniapp-preferences.ts:37](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/modules/miniapp-preferences.ts#L37)* + +Returns the object associated with the specified key. + +**`see`** {get} + +#### Parameters: + +Name | Type | +------ | ------ | +`key` | string | + +**Returns:** Promise\ + +___ + +### remove + +▸ **remove**(`key`: string): Promise\ + +*Defined in [js-miniapp-bridge/src/modules/miniapp-preferences.ts:55](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/modules/miniapp-preferences.ts#L55)* + +Removes the value of the specified default key. + +**`see`** {remove} + +#### Parameters: + +Name | Type | +------ | ------ | +`key` | string | + +**Returns:** Promise\ + +___ + +### set + +▸ **set**(`key`: string, `value`: string): Promise\ + +*Defined in [js-miniapp-bridge/src/modules/miniapp-preferences.ts:19](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/modules/miniapp-preferences.ts#L19)* + +Sets the value of the specified default key. + +**`see`** {set} + +#### Parameters: + +Name | Type | +------ | ------ | +`key` | string | +`value` | string | + +**Returns:** Promise\ diff --git a/docs/1.21/api/classes/notificationbridge.md b/docs/1.21/api/classes/notificationbridge.md new file mode 100644 index 00000000..d2093def --- /dev/null +++ b/docs/1.21/api/classes/notificationbridge.md @@ -0,0 +1,118 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / NotificationBridge + +# Class: NotificationBridge + +## Hierarchy + +* **NotificationBridge** + +## Index + +### Constructors + +* [constructor](notificationbridge.md#constructor) + +### Properties + +* [executor](notificationbridge.md#executor) +* [platform](notificationbridge.md#platform) + +### Methods + +* [shouldClearNotifications](notificationbridge.md#shouldclearnotifications) +* [shouldUpdateBadgeNumber](notificationbridge.md#shouldupdatebadgenumber) +* [shouldUpdateNotificationInfo](notificationbridge.md#shouldupdatenotificationinfo) + +## Constructors + +### constructor + +\+ **new NotificationBridge**(`executor`: PlatformExecutor): [NotificationBridge](notificationbridge.md) + +*Defined in [js-miniapp-bridge/src/modules/notification-bridge.ts:10](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/modules/notification-bridge.ts#L10)* + +#### Parameters: + +Name | Type | +------ | ------ | +`executor` | PlatformExecutor | + +**Returns:** [NotificationBridge](notificationbridge.md) + +## Properties + +### executor + +• **executor**: PlatformExecutor + +*Defined in [js-miniapp-bridge/src/modules/notification-bridge.ts:9](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/modules/notification-bridge.ts#L9)* + +___ + +### platform + +• **platform**: string + +*Defined in [js-miniapp-bridge/src/modules/notification-bridge.ts:10](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/modules/notification-bridge.ts#L10)* + +## Methods + +### shouldClearNotifications + +▸ **shouldClearNotifications**(`notificationType`: [NotificationInfoType](../enums/notificationinfotype.md)): Promise\ + +*Defined in [js-miniapp-bridge/src/modules/notification-bridge.ts:22](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/modules/notification-bridge.ts#L22)* + +This method is used to clear any notifications in the Host application + +**`see`** {shouldClearNotifications} + +#### Parameters: + +Name | Type | +------ | ------ | +`notificationType` | [NotificationInfoType](../enums/notificationinfotype.md) | + +**Returns:** Promise\ + +___ + +### shouldUpdateBadgeNumber + +▸ **shouldUpdateBadgeNumber**(`notificationInfo`: [NotificationInfo](../interfaces/notificationinfo.md)): Promise\ + +*Defined in [js-miniapp-bridge/src/modules/notification-bridge.ts:38](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/modules/notification-bridge.ts#L38)* + +This method is used to to update badge number for a specific notification info + +**`see`** {shouldUpdateBadgeNumber} + +#### Parameters: + +Name | Type | +------ | ------ | +`notificationInfo` | [NotificationInfo](../interfaces/notificationinfo.md) | + +**Returns:** Promise\ + +___ + +### shouldUpdateNotificationInfo + +▸ **shouldUpdateNotificationInfo**(`notificationDetailedInfo`: [NotificationDetailedInfo](../interfaces/notificationdetailedinfo.md)): Promise\ + +*Defined in [js-miniapp-bridge/src/modules/notification-bridge.ts:54](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/modules/notification-bridge.ts#L54)* + +This method is used to share the notification detailed information to Host app + +**`see`** {shouldUpdateNotificationInfo} + +#### Parameters: + +Name | Type | +------ | ------ | +`notificationDetailedInfo` | [NotificationDetailedInfo](../interfaces/notificationdetailedinfo.md) | + +**Returns:** Promise\ diff --git a/docs/1.21/api/classes/productnotfounderror.md b/docs/1.21/api/classes/productnotfounderror.md new file mode 100644 index 00000000..4ded210a --- /dev/null +++ b/docs/1.21/api/classes/productnotfounderror.md @@ -0,0 +1,82 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / ProductNotFoundError + +# Class: ProductNotFoundError + +## Hierarchy + +* [MiniAppError](miniapperror.md) + + ↳ **ProductNotFoundError** + +## Index + +### Constructors + +* [constructor](productnotfounderror.md#constructor) + +### Properties + +* [errorInput](productnotfounderror.md#errorinput) +* [message](productnotfounderror.md#message) +* [name](productnotfounderror.md#name) +* [stack](productnotfounderror.md#stack) + +## Constructors + +### constructor + +\+ **new ProductNotFoundError**(`errorInput`: [MiniAppJson](../interfaces/miniappjson.md)): [ProductNotFoundError](productnotfounderror.md) + +*Overrides [MiniAppError](miniapperror.md).[constructor](miniapperror.md#constructor)* + +*Defined in [js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts:28](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts#L28)* + +#### Parameters: + +Name | Type | +------ | ------ | +`errorInput` | [MiniAppJson](../interfaces/miniappjson.md) | + +**Returns:** [ProductNotFoundError](productnotfounderror.md) + +## Properties + +### errorInput + +• **errorInput**: [MiniAppJson](../interfaces/miniappjson.md) + +*Overrides [MiniAppError](miniapperror.md).[errorInput](miniapperror.md#errorinput)* + +*Defined in [js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts:29](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts#L29)* + +___ + +### message + +• **message**: string + +*Inherited from [MiniAppError](miniapperror.md).[message](miniapperror.md#message)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1054* + +___ + +### name + +• **name**: string + +*Inherited from [MiniAppError](miniapperror.md).[name](miniapperror.md#name)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1053* + +___ + +### stack + +• `Optional` **stack**: string + +*Inherited from [MiniAppError](miniapperror.md).[stack](miniapperror.md#stack)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1055* diff --git a/docs/1.21/api/classes/productpurchasedalreadyerror.md b/docs/1.21/api/classes/productpurchasedalreadyerror.md new file mode 100644 index 00000000..abf3ec7a --- /dev/null +++ b/docs/1.21/api/classes/productpurchasedalreadyerror.md @@ -0,0 +1,82 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / ProductPurchasedAlreadyError + +# Class: ProductPurchasedAlreadyError + +## Hierarchy + +* [MiniAppError](miniapperror.md) + + ↳ **ProductPurchasedAlreadyError** + +## Index + +### Constructors + +* [constructor](productpurchasedalreadyerror.md#constructor) + +### Properties + +* [errorInput](productpurchasedalreadyerror.md#errorinput) +* [message](productpurchasedalreadyerror.md#message) +* [name](productpurchasedalreadyerror.md#name) +* [stack](productpurchasedalreadyerror.md#stack) + +## Constructors + +### constructor + +\+ **new ProductPurchasedAlreadyError**(`errorInput`: [MiniAppJson](../interfaces/miniappjson.md)): [ProductPurchasedAlreadyError](productpurchasedalreadyerror.md) + +*Overrides [MiniAppError](miniapperror.md).[constructor](miniapperror.md#constructor)* + +*Defined in [js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts:37](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts#L37)* + +#### Parameters: + +Name | Type | +------ | ------ | +`errorInput` | [MiniAppJson](../interfaces/miniappjson.md) | + +**Returns:** [ProductPurchasedAlreadyError](productpurchasedalreadyerror.md) + +## Properties + +### errorInput + +• **errorInput**: [MiniAppJson](../interfaces/miniappjson.md) + +*Overrides [MiniAppError](miniapperror.md).[errorInput](miniapperror.md#errorinput)* + +*Defined in [js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts:38](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts#L38)* + +___ + +### message + +• **message**: string + +*Inherited from [MiniAppError](miniapperror.md).[message](miniapperror.md#message)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1054* + +___ + +### name + +• **name**: string + +*Inherited from [MiniAppError](miniapperror.md).[name](miniapperror.md#name)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1053* + +___ + +### stack + +• `Optional` **stack**: string + +*Inherited from [MiniAppError](miniapperror.md).[stack](miniapperror.md#stack)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1055* diff --git a/docs/1.21/api/classes/purchasefailederror.md b/docs/1.21/api/classes/purchasefailederror.md new file mode 100644 index 00000000..9b1a006c --- /dev/null +++ b/docs/1.21/api/classes/purchasefailederror.md @@ -0,0 +1,82 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / PurchaseFailedError + +# Class: PurchaseFailedError + +## Hierarchy + +* [MiniAppError](miniapperror.md) + + ↳ **PurchaseFailedError** + +## Index + +### Constructors + +* [constructor](purchasefailederror.md#constructor) + +### Properties + +* [errorInput](purchasefailederror.md#errorinput) +* [message](purchasefailederror.md#message) +* [name](purchasefailederror.md#name) +* [stack](purchasefailederror.md#stack) + +## Constructors + +### constructor + +\+ **new PurchaseFailedError**(`errorInput`: [MiniAppJson](../interfaces/miniappjson.md)): [PurchaseFailedError](purchasefailederror.md) + +*Overrides [MiniAppError](miniapperror.md).[constructor](miniapperror.md#constructor)* + +*Defined in [js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts:11](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts#L11)* + +#### Parameters: + +Name | Type | +------ | ------ | +`errorInput` | [MiniAppJson](../interfaces/miniappjson.md) | + +**Returns:** [PurchaseFailedError](purchasefailederror.md) + +## Properties + +### errorInput + +• **errorInput**: [MiniAppJson](../interfaces/miniappjson.md) + +*Overrides [MiniAppError](miniapperror.md).[errorInput](miniapperror.md#errorinput)* + +*Defined in [js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts:12](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts#L12)* + +___ + +### message + +• **message**: string + +*Inherited from [MiniAppError](miniapperror.md).[message](miniapperror.md#message)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1054* + +___ + +### name + +• **name**: string + +*Inherited from [MiniAppError](miniapperror.md).[name](miniapperror.md#name)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1053* + +___ + +### stack + +• `Optional` **stack**: string + +*Inherited from [MiniAppError](miniapperror.md).[stack](miniapperror.md#stack)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1055* diff --git a/docs/1.21/api/classes/savefailureerror.md b/docs/1.21/api/classes/savefailureerror.md new file mode 100644 index 00000000..cfcdba20 --- /dev/null +++ b/docs/1.21/api/classes/savefailureerror.md @@ -0,0 +1,84 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / SaveFailureError + +# Class: SaveFailureError + +Error returned by `MiniApp.downloadFile` when failed to save file to device. + +## Hierarchy + +* [MiniAppError](miniapperror.md) + + ↳ **SaveFailureError** + +## Index + +### Constructors + +* [constructor](savefailureerror.md#constructor) + +### Properties + +* [errorInput](savefailureerror.md#errorinput) +* [message](savefailureerror.md#message) +* [name](savefailureerror.md#name) +* [stack](savefailureerror.md#stack) + +## Constructors + +### constructor + +\+ **new SaveFailureError**(`errorInput`: [MiniAppDownloadError](../interfaces/miniappdownloaderror.md)): [SaveFailureError](savefailureerror.md) + +*Overrides [MiniAppError](miniapperror.md).[constructor](miniapperror.md#constructor)* + +*Defined in [js-miniapp-bridge/src/types/error-types/download-file-errors.ts:40](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/download-file-errors.ts#L40)* + +#### Parameters: + +Name | Type | +------ | ------ | +`errorInput` | [MiniAppDownloadError](../interfaces/miniappdownloaderror.md) | + +**Returns:** [SaveFailureError](savefailureerror.md) + +## Properties + +### errorInput + +• **errorInput**: [MiniAppDownloadError](../interfaces/miniappdownloaderror.md) + +*Overrides [MiniAppError](miniapperror.md).[errorInput](miniapperror.md#errorinput)* + +*Defined in [js-miniapp-bridge/src/types/error-types/download-file-errors.ts:41](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/download-file-errors.ts#L41)* + +___ + +### message + +• **message**: string + +*Inherited from [MiniAppError](miniapperror.md).[message](miniapperror.md#message)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1054* + +___ + +### name + +• **name**: string + +*Inherited from [MiniAppError](miniapperror.md).[name](miniapperror.md#name)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1053* + +___ + +### stack + +• `Optional` **stack**: string + +*Inherited from [MiniAppError](miniapperror.md).[stack](miniapperror.md#stack)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1055* diff --git a/docs/1.21/api/classes/scopesnotsupportederror.md b/docs/1.21/api/classes/scopesnotsupportederror.md new file mode 100644 index 00000000..14eb9bd9 --- /dev/null +++ b/docs/1.21/api/classes/scopesnotsupportederror.md @@ -0,0 +1,82 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / ScopesNotSupportedError + +# Class: ScopesNotSupportedError + +## Hierarchy + +* [MiniAppError](miniapperror.md) + + ↳ **ScopesNotSupportedError** + +## Index + +### Constructors + +* [constructor](scopesnotsupportederror.md#constructor) + +### Properties + +* [errorInput](scopesnotsupportederror.md#errorinput) +* [message](scopesnotsupportederror.md#message) +* [name](scopesnotsupportederror.md#name) +* [stack](scopesnotsupportederror.md#stack) + +## Constructors + +### constructor + +\+ **new ScopesNotSupportedError**(`errorInput`: [MiniAppJson](../interfaces/miniappjson.md)): [ScopesNotSupportedError](scopesnotsupportederror.md) + +*Overrides [MiniAppError](miniapperror.md).[constructor](miniapperror.md#constructor)* + +*Defined in [js-miniapp-bridge/src/types/error-types/auth-errors.ts:17](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/auth-errors.ts#L17)* + +#### Parameters: + +Name | Type | +------ | ------ | +`errorInput` | [MiniAppJson](../interfaces/miniappjson.md) | + +**Returns:** [ScopesNotSupportedError](scopesnotsupportederror.md) + +## Properties + +### errorInput + +• **errorInput**: [MiniAppJson](../interfaces/miniappjson.md) + +*Overrides [MiniAppError](miniapperror.md).[errorInput](miniapperror.md#errorinput)* + +*Defined in [js-miniapp-bridge/src/types/error-types/auth-errors.ts:18](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/auth-errors.ts#L18)* + +___ + +### message + +• **message**: string + +*Inherited from [MiniAppError](miniapperror.md).[message](miniapperror.md#message)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1054* + +___ + +### name + +• **name**: string + +*Inherited from [MiniAppError](miniapperror.md).[name](miniapperror.md#name)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1053* + +___ + +### stack + +• `Optional` **stack**: string + +*Inherited from [MiniAppError](miniapperror.md).[stack](miniapperror.md#stack)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1055* diff --git a/docs/1.21/api/classes/securestoragebusyerror.md b/docs/1.21/api/classes/securestoragebusyerror.md new file mode 100644 index 00000000..bacf61a3 --- /dev/null +++ b/docs/1.21/api/classes/securestoragebusyerror.md @@ -0,0 +1,82 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / SecureStorageBusyError + +# Class: SecureStorageBusyError + +## Hierarchy + +* [MiniAppError](miniapperror.md) + + ↳ **SecureStorageBusyError** + +## Index + +### Constructors + +* [constructor](securestoragebusyerror.md#constructor) + +### Properties + +* [errorInput](securestoragebusyerror.md#errorinput) +* [message](securestoragebusyerror.md#message) +* [name](securestoragebusyerror.md#name) +* [stack](securestoragebusyerror.md#stack) + +## Constructors + +### constructor + +\+ **new SecureStorageBusyError**(`errorInput`: [MiniAppJson](../interfaces/miniappjson.md)): [SecureStorageBusyError](securestoragebusyerror.md) + +*Overrides [MiniAppError](miniapperror.md).[constructor](miniapperror.md#constructor)* + +*Defined in [js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts:18](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts#L18)* + +#### Parameters: + +Name | Type | +------ | ------ | +`errorInput` | [MiniAppJson](../interfaces/miniappjson.md) | + +**Returns:** [SecureStorageBusyError](securestoragebusyerror.md) + +## Properties + +### errorInput + +• **errorInput**: [MiniAppJson](../interfaces/miniappjson.md) + +*Overrides [MiniAppError](miniapperror.md).[errorInput](miniapperror.md#errorinput)* + +*Defined in [js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts:19](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts#L19)* + +___ + +### message + +• **message**: string + +*Inherited from [MiniAppError](miniapperror.md).[message](miniapperror.md#message)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1054* + +___ + +### name + +• **name**: string + +*Inherited from [MiniAppError](miniapperror.md).[name](miniapperror.md#name)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1053* + +___ + +### stack + +• `Optional` **stack**: string + +*Inherited from [MiniAppError](miniapperror.md).[stack](miniapperror.md#stack)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1055* diff --git a/docs/1.21/api/classes/securestoragefullerror.md b/docs/1.21/api/classes/securestoragefullerror.md new file mode 100644 index 00000000..a335a3ba --- /dev/null +++ b/docs/1.21/api/classes/securestoragefullerror.md @@ -0,0 +1,82 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / SecureStorageFullError + +# Class: SecureStorageFullError + +## Hierarchy + +* [MiniAppError](miniapperror.md) + + ↳ **SecureStorageFullError** + +## Index + +### Constructors + +* [constructor](securestoragefullerror.md#constructor) + +### Properties + +* [errorInput](securestoragefullerror.md#errorinput) +* [message](securestoragefullerror.md#message) +* [name](securestoragefullerror.md#name) +* [stack](securestoragefullerror.md#stack) + +## Constructors + +### constructor + +\+ **new SecureStorageFullError**(`errorInput`: [MiniAppJson](../interfaces/miniappjson.md)): [SecureStorageFullError](securestoragefullerror.md) + +*Overrides [MiniAppError](miniapperror.md).[constructor](miniapperror.md#constructor)* + +*Defined in [js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts:10](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts#L10)* + +#### Parameters: + +Name | Type | +------ | ------ | +`errorInput` | [MiniAppJson](../interfaces/miniappjson.md) | + +**Returns:** [SecureStorageFullError](securestoragefullerror.md) + +## Properties + +### errorInput + +• **errorInput**: [MiniAppJson](../interfaces/miniappjson.md) + +*Overrides [MiniAppError](miniapperror.md).[errorInput](miniapperror.md#errorinput)* + +*Defined in [js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts:11](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts#L11)* + +___ + +### message + +• **message**: string + +*Inherited from [MiniAppError](miniapperror.md).[message](miniapperror.md#message)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1054* + +___ + +### name + +• **name**: string + +*Inherited from [MiniAppError](miniapperror.md).[name](miniapperror.md#name)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1053* + +___ + +### stack + +• `Optional` **stack**: string + +*Inherited from [MiniAppError](miniapperror.md).[stack](miniapperror.md#stack)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1055* diff --git a/docs/1.21/api/classes/securestorageioerror.md b/docs/1.21/api/classes/securestorageioerror.md new file mode 100644 index 00000000..9125e080 --- /dev/null +++ b/docs/1.21/api/classes/securestorageioerror.md @@ -0,0 +1,82 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / SecureStorageIOError + +# Class: SecureStorageIOError + +## Hierarchy + +* [MiniAppError](miniapperror.md) + + ↳ **SecureStorageIOError** + +## Index + +### Constructors + +* [constructor](securestorageioerror.md#constructor) + +### Properties + +* [errorInput](securestorageioerror.md#errorinput) +* [message](securestorageioerror.md#message) +* [name](securestorageioerror.md#name) +* [stack](securestorageioerror.md#stack) + +## Constructors + +### constructor + +\+ **new SecureStorageIOError**(`errorInput`: [MiniAppJson](../interfaces/miniappjson.md)): [SecureStorageIOError](securestorageioerror.md) + +*Overrides [MiniAppError](miniapperror.md).[constructor](miniapperror.md#constructor)* + +*Defined in [js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts:34](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts#L34)* + +#### Parameters: + +Name | Type | +------ | ------ | +`errorInput` | [MiniAppJson](../interfaces/miniappjson.md) | + +**Returns:** [SecureStorageIOError](securestorageioerror.md) + +## Properties + +### errorInput + +• **errorInput**: [MiniAppJson](../interfaces/miniappjson.md) + +*Overrides [MiniAppError](miniapperror.md).[errorInput](miniapperror.md#errorinput)* + +*Defined in [js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts:35](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts#L35)* + +___ + +### message + +• **message**: string + +*Inherited from [MiniAppError](miniapperror.md).[message](miniapperror.md#message)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1054* + +___ + +### name + +• **name**: string + +*Inherited from [MiniAppError](miniapperror.md).[name](miniapperror.md#name)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1053* + +___ + +### stack + +• `Optional` **stack**: string + +*Inherited from [MiniAppError](miniapperror.md).[stack](miniapperror.md#stack)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1055* diff --git a/docs/1.21/api/classes/securestorageunavailableerror.md b/docs/1.21/api/classes/securestorageunavailableerror.md new file mode 100644 index 00000000..6adbf2e6 --- /dev/null +++ b/docs/1.21/api/classes/securestorageunavailableerror.md @@ -0,0 +1,82 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / SecureStorageUnavailableError + +# Class: SecureStorageUnavailableError + +## Hierarchy + +* [MiniAppError](miniapperror.md) + + ↳ **SecureStorageUnavailableError** + +## Index + +### Constructors + +* [constructor](securestorageunavailableerror.md#constructor) + +### Properties + +* [errorInput](securestorageunavailableerror.md#errorinput) +* [message](securestorageunavailableerror.md#message) +* [name](securestorageunavailableerror.md#name) +* [stack](securestorageunavailableerror.md#stack) + +## Constructors + +### constructor + +\+ **new SecureStorageUnavailableError**(`errorInput`: [MiniAppJson](../interfaces/miniappjson.md)): [SecureStorageUnavailableError](securestorageunavailableerror.md) + +*Overrides [MiniAppError](miniapperror.md).[constructor](miniapperror.md#constructor)* + +*Defined in [js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts:26](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts#L26)* + +#### Parameters: + +Name | Type | +------ | ------ | +`errorInput` | [MiniAppJson](../interfaces/miniappjson.md) | + +**Returns:** [SecureStorageUnavailableError](securestorageunavailableerror.md) + +## Properties + +### errorInput + +• **errorInput**: [MiniAppJson](../interfaces/miniappjson.md) + +*Overrides [MiniAppError](miniapperror.md).[errorInput](miniapperror.md#errorinput)* + +*Defined in [js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts:27](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts#L27)* + +___ + +### message + +• **message**: string + +*Inherited from [MiniAppError](miniapperror.md).[message](miniapperror.md#message)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1054* + +___ + +### name + +• **name**: string + +*Inherited from [MiniAppError](miniapperror.md).[name](miniapperror.md#name)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1053* + +___ + +### stack + +• `Optional` **stack**: string + +*Inherited from [MiniAppError](miniapperror.md).[stack](miniapperror.md#stack)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1055* diff --git a/docs/1.21/api/classes/usercancelledpurchaseerror.md b/docs/1.21/api/classes/usercancelledpurchaseerror.md new file mode 100644 index 00000000..c1a5bebd --- /dev/null +++ b/docs/1.21/api/classes/usercancelledpurchaseerror.md @@ -0,0 +1,82 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / UserCancelledPurchaseError + +# Class: UserCancelledPurchaseError + +## Hierarchy + +* [MiniAppError](miniapperror.md) + + ↳ **UserCancelledPurchaseError** + +## Index + +### Constructors + +* [constructor](usercancelledpurchaseerror.md#constructor) + +### Properties + +* [errorInput](usercancelledpurchaseerror.md#errorinput) +* [message](usercancelledpurchaseerror.md#message) +* [name](usercancelledpurchaseerror.md#name) +* [stack](usercancelledpurchaseerror.md#stack) + +## Constructors + +### constructor + +\+ **new UserCancelledPurchaseError**(`errorInput`: [MiniAppJson](../interfaces/miniappjson.md)): [UserCancelledPurchaseError](usercancelledpurchaseerror.md) + +*Overrides [MiniAppError](miniapperror.md).[constructor](miniapperror.md#constructor)* + +*Defined in [js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts:45](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts#L45)* + +#### Parameters: + +Name | Type | +------ | ------ | +`errorInput` | [MiniAppJson](../interfaces/miniappjson.md) | + +**Returns:** [UserCancelledPurchaseError](usercancelledpurchaseerror.md) + +## Properties + +### errorInput + +• **errorInput**: [MiniAppJson](../interfaces/miniappjson.md) + +*Overrides [MiniAppError](miniapperror.md).[errorInput](miniapperror.md#errorinput)* + +*Defined in [js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts:46](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts#L46)* + +___ + +### message + +• **message**: string + +*Inherited from [MiniAppError](miniapperror.md).[message](miniapperror.md#message)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1054* + +___ + +### name + +• **name**: string + +*Inherited from [MiniAppError](miniapperror.md).[name](miniapperror.md#name)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1053* + +___ + +### stack + +• `Optional` **stack**: string + +*Inherited from [MiniAppError](miniapperror.md).[stack](miniapperror.md#stack)* + +*Defined in node_modules/typescript/lib/lib.es5.d.ts:1055* diff --git a/docs/1.21/api/enums/adtypes.md b/docs/1.21/api/enums/adtypes.md new file mode 100644 index 00000000..8980cb4a --- /dev/null +++ b/docs/1.21/api/enums/adtypes.md @@ -0,0 +1,31 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / AdTypes + +# Enumeration: AdTypes + +Enum for supported ad types/formats +These ad formats replicate formats supported by Google + +## Index + +### Enumeration members + +* [INTERSTITIAL](adtypes.md#interstitial) +* [REWARDED](adtypes.md#rewarded) + +## Enumeration members + +### INTERSTITIAL + +• **INTERSTITIAL**: + +*Defined in [js-miniapp-bridge/src/types/ad-types/index.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/ad-types/index.ts#L6)* + +___ + +### REWARDED + +• **REWARDED**: + +*Defined in [js-miniapp-bridge/src/types/ad-types/index.ts:7](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/ad-types/index.ts#L7)* diff --git a/docs/1.21/api/enums/custompermissionname.md b/docs/1.21/api/enums/custompermissionname.md new file mode 100644 index 00000000..c49dbbca --- /dev/null +++ b/docs/1.21/api/enums/custompermissionname.md @@ -0,0 +1,82 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / CustomPermissionName + +# Enumeration: CustomPermissionName + +## Index + +### Enumeration members + +* [ACCESS\_TOKEN](custompermissionname.md#access_token) +* [CONTACT\_LIST](custompermissionname.md#contact_list) +* [FILE\_DOWNLOAD](custompermissionname.md#file_download) +* [LOCATION](custompermissionname.md#location) +* [POINTS](custompermissionname.md#points) +* [PROFILE\_PHOTO](custompermissionname.md#profile_photo) +* [SEND\_MESSAGE](custompermissionname.md#send_message) +* [USER\_NAME](custompermissionname.md#user_name) + +## Enumeration members + +### ACCESS\_TOKEN + +• **ACCESS\_TOKEN**: = "rakuten.miniapp.user.ACCESS\_TOKEN" + +*Defined in [js-miniapp-bridge/src/types/custom-permissions.ts:5](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/custom-permissions.ts#L5)* + +___ + +### CONTACT\_LIST + +• **CONTACT\_LIST**: = "rakuten.miniapp.user.CONTACT\_LIST" + +*Defined in [js-miniapp-bridge/src/types/custom-permissions.ts:4](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/custom-permissions.ts#L4)* + +___ + +### FILE\_DOWNLOAD + +• **FILE\_DOWNLOAD**: = "rakuten.miniapp.device.FILE\_DOWNLOAD" + +*Defined in [js-miniapp-bridge/src/types/custom-permissions.ts:9](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/custom-permissions.ts#L9)* + +___ + +### LOCATION + +• **LOCATION**: = "rakuten.miniapp.device.LOCATION" + +*Defined in [js-miniapp-bridge/src/types/custom-permissions.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/custom-permissions.ts#L6)* + +___ + +### POINTS + +• **POINTS**: = "rakuten.miniapp.user.POINTS" + +*Defined in [js-miniapp-bridge/src/types/custom-permissions.ts:8](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/custom-permissions.ts#L8)* + +___ + +### PROFILE\_PHOTO + +• **PROFILE\_PHOTO**: = "rakuten.miniapp.user.PROFILE\_PHOTO" + +*Defined in [js-miniapp-bridge/src/types/custom-permissions.ts:3](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/custom-permissions.ts#L3)* + +___ + +### SEND\_MESSAGE + +• **SEND\_MESSAGE**: = "rakuten.miniapp.user.action.SEND\_MESSAGE" + +*Defined in [js-miniapp-bridge/src/types/custom-permissions.ts:7](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/custom-permissions.ts#L7)* + +___ + +### USER\_NAME + +• **USER\_NAME**: = "rakuten.miniapp.user.USER\_NAME" + +*Defined in [js-miniapp-bridge/src/types/custom-permissions.ts:2](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/custom-permissions.ts#L2)* diff --git a/docs/1.21/api/enums/custompermissionstatus.md b/docs/1.21/api/enums/custompermissionstatus.md new file mode 100644 index 00000000..7e56727c --- /dev/null +++ b/docs/1.21/api/enums/custompermissionstatus.md @@ -0,0 +1,37 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / CustomPermissionStatus + +# Enumeration: CustomPermissionStatus + +## Index + +### Enumeration members + +* [ALLOWED](custompermissionstatus.md#allowed) +* [DENIED](custompermissionstatus.md#denied) +* [PERMISSION\_NOT\_AVAILABLE](custompermissionstatus.md#permission_not_available) + +## Enumeration members + +### ALLOWED + +• **ALLOWED**: = "ALLOWED" + +*Defined in [js-miniapp-bridge/src/types/custom-permissions.ts:13](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/custom-permissions.ts#L13)* + +___ + +### DENIED + +• **DENIED**: = "DENIED" + +*Defined in [js-miniapp-bridge/src/types/custom-permissions.ts:14](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/custom-permissions.ts#L14)* + +___ + +### PERMISSION\_NOT\_AVAILABLE + +• **PERMISSION\_NOT\_AVAILABLE**: = "PERMISSION\_NOT\_AVAILABLE" + +*Defined in [js-miniapp-bridge/src/types/custom-permissions.ts:15](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/custom-permissions.ts#L15)* diff --git a/docs/1.21/api/enums/devicepermission.md b/docs/1.21/api/enums/devicepermission.md new file mode 100644 index 00000000..a8441834 --- /dev/null +++ b/docs/1.21/api/enums/devicepermission.md @@ -0,0 +1,21 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / DevicePermission + +# Enumeration: DevicePermission + +Permission type resource. + +## Index + +### Enumeration members + +* [LOCATION](devicepermission.md#location) + +## Enumeration members + +### LOCATION + +• **LOCATION**: = "location" + +*Defined in [js-miniapp-bridge/src/types/device-permission.ts:8](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/device-permission.ts#L8)* diff --git a/docs/1.21/api/enums/hostappevents.md b/docs/1.21/api/enums/hostappevents.md new file mode 100644 index 00000000..6d4ceef6 --- /dev/null +++ b/docs/1.21/api/enums/hostappevents.md @@ -0,0 +1,21 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / HostAppEvents + +# Enumeration: HostAppEvents + +Enum for supported HostApp event types + +## Index + +### Enumeration members + +* [RECEIVE\_JSON\_INFO](hostappevents.md#receive_json_info) + +## Enumeration members + +### RECEIVE\_JSON\_INFO + +• **RECEIVE\_JSON\_INFO**: = "miniappreceivejsoninfo" + +*Defined in [js-miniapp-sdk/src/event-types/index.ts:22](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/event-types/index.ts#L22)* diff --git a/docs/1.21/api/enums/hostbuildtype.md b/docs/1.21/api/enums/hostbuildtype.md new file mode 100644 index 00000000..13bd4109 --- /dev/null +++ b/docs/1.21/api/enums/hostbuildtype.md @@ -0,0 +1,66 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / HostBuildType + +# Enumeration: HostBuildType + +Device Build Types. + +## Index + +### Enumeration members + +* [CUSTOM](hostbuildtype.md#custom) +* [DEBUG](hostbuildtype.md#debug) +* [PREPRODUCTION](hostbuildtype.md#preproduction) +* [PRODUCTION](hostbuildtype.md#production) +* [QA](hostbuildtype.md#qa) +* [STAGING](hostbuildtype.md#staging) + +## Enumeration members + +### CUSTOM + +• **CUSTOM**: = "CUSTOM" + +*Defined in [js-miniapp-bridge/src/types/platform.ts:14](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/platform.ts#L14)* + +___ + +### DEBUG + +• **DEBUG**: = "DEBUG" + +*Defined in [js-miniapp-bridge/src/types/platform.ts:11](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/platform.ts#L11)* + +___ + +### PREPRODUCTION + +• **PREPRODUCTION**: = "PRE-PRODUCTION" + +*Defined in [js-miniapp-bridge/src/types/platform.ts:15](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/platform.ts#L15)* + +___ + +### PRODUCTION + +• **PRODUCTION**: = "PRODUCTION" + +*Defined in [js-miniapp-bridge/src/types/platform.ts:16](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/platform.ts#L16)* + +___ + +### QA + +• **QA**: = "QA" + +*Defined in [js-miniapp-bridge/src/types/platform.ts:13](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/platform.ts#L13)* + +___ + +### STAGING + +• **STAGING**: = "STAGING" + +*Defined in [js-miniapp-bridge/src/types/platform.ts:12](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/platform.ts#L12)* diff --git a/docs/1.21/api/enums/maanalyticsactiontype.md b/docs/1.21/api/enums/maanalyticsactiontype.md new file mode 100644 index 00000000..126849ef --- /dev/null +++ b/docs/1.21/api/enums/maanalyticsactiontype.md @@ -0,0 +1,57 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MAAnalyticsActionType + +# Enumeration: MAAnalyticsActionType + +Action Type + +## Index + +### Enumeration members + +* [add](maanalyticsactiontype.md#add) +* [change](maanalyticsactiontype.md#change) +* [close](maanalyticsactiontype.md#close) +* [delete](maanalyticsactiontype.md#delete) +* [open](maanalyticsactiontype.md#open) + +## Enumeration members + +### add + +• **add**: = "add" + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:18](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L18)* + +___ + +### change + +• **change**: = "change" + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:20](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L20)* + +___ + +### close + +• **close**: = "close" + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:17](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L17)* + +___ + +### delete + +• **delete**: = "delete" + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:19](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L19)* + +___ + +### open + +• **open**: = "open" + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:16](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L16)* diff --git a/docs/1.21/api/enums/maanalyticseventtype.md b/docs/1.21/api/enums/maanalyticseventtype.md new file mode 100644 index 00000000..7261e065 --- /dev/null +++ b/docs/1.21/api/enums/maanalyticseventtype.md @@ -0,0 +1,57 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MAAnalyticsEventType + +# Enumeration: MAAnalyticsEventType + +Analytics Event type + +## Index + +### Enumeration members + +* [appear](maanalyticseventtype.md#appear) +* [click](maanalyticseventtype.md#click) +* [custom](maanalyticseventtype.md#custom) +* [error](maanalyticseventtype.md#error) +* [pageView](maanalyticseventtype.md#pageview) + +## Enumeration members + +### appear + +• **appear**: = "appear" + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:5](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L5)* + +___ + +### click + +• **click**: = "click" + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L6)* + +___ + +### custom + +• **custom**: = "custom" + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:8](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L8)* + +___ + +### error + +• **error**: = "error" + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:7](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L7)* + +___ + +### pageView + +• **pageView**: = "pv" + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:9](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L9)* diff --git a/docs/1.21/api/enums/miniappautherrortype.md b/docs/1.21/api/enums/miniappautherrortype.md new file mode 100644 index 00000000..3d7b6b5e --- /dev/null +++ b/docs/1.21/api/enums/miniappautherrortype.md @@ -0,0 +1,37 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MiniAppAuthErrorType + +# Enumeration: MiniAppAuthErrorType + +## Index + +### Enumeration members + +* [AudienceNotSupportedError](miniappautherrortype.md#audiencenotsupportederror) +* [AuthorizationFailureError](miniappautherrortype.md#authorizationfailureerror) +* [ScopesNotSupportedError](miniappautherrortype.md#scopesnotsupportederror) + +## Enumeration members + +### AudienceNotSupportedError + +• **AudienceNotSupportedError**: = "AudienceNotSupportedError" + +*Defined in [js-miniapp-bridge/src/types/error-types/auth-errors.ts:4](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/auth-errors.ts#L4)* + +___ + +### AuthorizationFailureError + +• **AuthorizationFailureError**: = "AuthorizationFailureError" + +*Defined in [js-miniapp-bridge/src/types/error-types/auth-errors.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/auth-errors.ts#L6)* + +___ + +### ScopesNotSupportedError + +• **ScopesNotSupportedError**: = "ScopesNotSupportedError" + +*Defined in [js-miniapp-bridge/src/types/error-types/auth-errors.ts:5](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/auth-errors.ts#L5)* diff --git a/docs/1.21/api/enums/miniappdownloaderrortype.md b/docs/1.21/api/enums/miniappdownloaderrortype.md new file mode 100644 index 00000000..29b0380c --- /dev/null +++ b/docs/1.21/api/enums/miniappdownloaderrortype.md @@ -0,0 +1,46 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MiniAppDownloadErrorType + +# Enumeration: MiniAppDownloadErrorType + +## Index + +### Enumeration members + +* [DownloadFailedError](miniappdownloaderrortype.md#downloadfailederror) +* [DownloadHttpError](miniappdownloaderrortype.md#downloadhttperror) +* [InvalidUrlError](miniappdownloaderrortype.md#invalidurlerror) +* [SaveFailureError](miniappdownloaderrortype.md#savefailureerror) + +## Enumeration members + +### DownloadFailedError + +• **DownloadFailedError**: = "DownloadFailedError" + +*Defined in [js-miniapp-bridge/src/types/error-types/download-file-errors.ts:4](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/download-file-errors.ts#L4)* + +___ + +### DownloadHttpError + +• **DownloadHttpError**: = "DownloadHttpError" + +*Defined in [js-miniapp-bridge/src/types/error-types/download-file-errors.ts:7](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/download-file-errors.ts#L7)* + +___ + +### InvalidUrlError + +• **InvalidUrlError**: = "InvalidUrlError" + +*Defined in [js-miniapp-bridge/src/types/error-types/download-file-errors.ts:5](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/download-file-errors.ts#L5)* + +___ + +### SaveFailureError + +• **SaveFailureError**: = "SaveFailureError" + +*Defined in [js-miniapp-bridge/src/types/error-types/download-file-errors.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/download-file-errors.ts#L6)* diff --git a/docs/1.21/api/enums/miniappevents.md b/docs/1.21/api/enums/miniappevents.md new file mode 100644 index 00000000..b77b5009 --- /dev/null +++ b/docs/1.21/api/enums/miniappevents.md @@ -0,0 +1,39 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MiniAppEvents + +# Enumeration: MiniAppEvents + +Enum for supported SDK event types + +## Index + +### Enumeration members + +* [EXTERNAL\_WEBVIEW\_CLOSE](miniappevents.md#external_webview_close) +* [PAUSE](miniappevents.md#pause) +* [RESUME](miniappevents.md#resume) + +## Enumeration members + +### EXTERNAL\_WEBVIEW\_CLOSE + +• **EXTERNAL\_WEBVIEW\_CLOSE**: = "miniappwebviewclosed" + +*Defined in [js-miniapp-sdk/src/event-types/index.ts:5](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/event-types/index.ts#L5)* + +___ + +### PAUSE + +• **PAUSE**: = "miniapppause" + +*Defined in [js-miniapp-sdk/src/event-types/index.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/event-types/index.ts#L6)* + +___ + +### RESUME + +• **RESUME**: = "miniappresume" + +*Defined in [js-miniapp-sdk/src/event-types/index.ts:7](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/event-types/index.ts#L7)* diff --git a/docs/1.21/api/enums/miniappinapppurchaseerrortype.md b/docs/1.21/api/enums/miniappinapppurchaseerrortype.md new file mode 100644 index 00000000..179ac1e5 --- /dev/null +++ b/docs/1.21/api/enums/miniappinapppurchaseerrortype.md @@ -0,0 +1,55 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MiniAppInAppPurchaseErrorType + +# Enumeration: MiniAppInAppPurchaseErrorType + +## Index + +### Enumeration members + +* [ConsumeFailedError](miniappinapppurchaseerrortype.md#consumefailederror) +* [ProductNotFoundError](miniappinapppurchaseerrortype.md#productnotfounderror) +* [ProductPurchasedAlreadyError](miniappinapppurchaseerrortype.md#productpurchasedalreadyerror) +* [PurchaseFailedError](miniappinapppurchaseerrortype.md#purchasefailederror) +* [UserCancelledPurchaseError](miniappinapppurchaseerrortype.md#usercancelledpurchaseerror) + +## Enumeration members + +### ConsumeFailedError + +• **ConsumeFailedError**: = "ConsumeFailedError" + +*Defined in [js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts:5](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts#L5)* + +___ + +### ProductNotFoundError + +• **ProductNotFoundError**: = "ProductNotFoundError" + +*Defined in [js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts#L6)* + +___ + +### ProductPurchasedAlreadyError + +• **ProductPurchasedAlreadyError**: = "ProductPurchasedAlreadyError" + +*Defined in [js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts:7](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts#L7)* + +___ + +### PurchaseFailedError + +• **PurchaseFailedError**: = "PurchaseFailedError" + +*Defined in [js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts:4](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts#L4)* + +___ + +### UserCancelledPurchaseError + +• **UserCancelledPurchaseError**: = "UserCancelledPurchaseError" + +*Defined in [js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts:8](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts#L8)* diff --git a/docs/1.21/api/enums/miniappkeyboardevents.md b/docs/1.21/api/enums/miniappkeyboardevents.md new file mode 100644 index 00000000..f44500f3 --- /dev/null +++ b/docs/1.21/api/enums/miniappkeyboardevents.md @@ -0,0 +1,30 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MiniAppKeyboardEvents + +# Enumeration: MiniAppKeyboardEvents + +Enum for supported keyboard event types + +## Index + +### Enumeration members + +* [KEYBOARDHIDDEN](miniappkeyboardevents.md#keyboardhidden) +* [KEYBOARDSHOWN](miniappkeyboardevents.md#keyboardshown) + +## Enumeration members + +### KEYBOARDHIDDEN + +• **KEYBOARDHIDDEN**: = "miniappkeyboardhidden" + +*Defined in [js-miniapp-sdk/src/event-types/index.ts:15](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/event-types/index.ts#L15)* + +___ + +### KEYBOARDSHOWN + +• **KEYBOARDSHOWN**: = "miniappkeyboardshown" + +*Defined in [js-miniapp-sdk/src/event-types/index.ts:14](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/event-types/index.ts#L14)* diff --git a/docs/1.21/api/enums/miniappsecurestorageevents.md b/docs/1.21/api/enums/miniappsecurestorageevents.md new file mode 100644 index 00000000..468f26bc --- /dev/null +++ b/docs/1.21/api/enums/miniappsecurestorageevents.md @@ -0,0 +1,28 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MiniAppSecureStorageEvents + +# Enumeration: MiniAppSecureStorageEvents + +## Index + +### Enumeration members + +* [onLoadError](miniappsecurestorageevents.md#onloaderror) +* [onReady](miniappsecurestorageevents.md#onready) + +## Enumeration members + +### onLoadError + +• **onLoadError**: = "miniappsecurestorageloaderror" + +*Defined in [js-miniapp-bridge/src/types/secure-storage.ts:17](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/secure-storage.ts#L17)* + +___ + +### onReady + +• **onReady**: = "miniappsecurestorageready" + +*Defined in [js-miniapp-bridge/src/types/secure-storage.ts:16](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/secure-storage.ts#L16)* diff --git a/docs/1.21/api/enums/miniappstorageerrortype.md b/docs/1.21/api/enums/miniappstorageerrortype.md new file mode 100644 index 00000000..20a11568 --- /dev/null +++ b/docs/1.21/api/enums/miniappstorageerrortype.md @@ -0,0 +1,46 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MiniAppStorageErrorType + +# Enumeration: MiniAppStorageErrorType + +## Index + +### Enumeration members + +* [SecureStorageBusyError](miniappstorageerrortype.md#securestoragebusyerror) +* [SecureStorageFullError](miniappstorageerrortype.md#securestoragefullerror) +* [SecureStorageIOError](miniappstorageerrortype.md#securestorageioerror) +* [SecureStorageUnavailableError](miniappstorageerrortype.md#securestorageunavailableerror) + +## Enumeration members + +### SecureStorageBusyError + +• **SecureStorageBusyError**: = "SecureStorageBusyError" + +*Defined in [js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts:5](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts#L5)* + +___ + +### SecureStorageFullError + +• **SecureStorageFullError**: = "SecureStorageFullError" + +*Defined in [js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts:4](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts#L4)* + +___ + +### SecureStorageIOError + +• **SecureStorageIOError**: = "SecureStorageIOError" + +*Defined in [js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts:7](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts#L7)* + +___ + +### SecureStorageUnavailableError + +• **SecureStorageUnavailableError**: = "SecureStorageUnavailableError" + +*Defined in [js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts#L6)* diff --git a/docs/1.21/api/enums/notificationinfopriority.md b/docs/1.21/api/enums/notificationinfopriority.md new file mode 100644 index 00000000..bf0ee649 --- /dev/null +++ b/docs/1.21/api/enums/notificationinfopriority.md @@ -0,0 +1,64 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / NotificationInfoPriority + +# Enumeration: NotificationInfoPriority + +## Index + +### Enumeration members + +* [CRITICAL](notificationinfopriority.md#critical) +* [MAINTENANCE](notificationinfopriority.md#maintenance) +* [MAJOR](notificationinfopriority.md#major) +* [MINOR](notificationinfopriority.md#minor) +* [NORMAL](notificationinfopriority.md#normal) +* [OFFERS](notificationinfopriority.md#offers) + +## Enumeration members + +### CRITICAL + +• **CRITICAL**: + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:12](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L12)* + +___ + +### MAINTENANCE + +• **MAINTENANCE**: + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:17](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L17)* + +___ + +### MAJOR + +• **MAJOR**: + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:13](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L13)* + +___ + +### MINOR + +• **MINOR**: + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:14](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L14)* + +___ + +### NORMAL + +• **NORMAL**: + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:15](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L15)* + +___ + +### OFFERS + +• **OFFERS**: + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:16](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L16)* diff --git a/docs/1.21/api/enums/notificationinfotype.md b/docs/1.21/api/enums/notificationinfotype.md new file mode 100644 index 00000000..5be1645e --- /dev/null +++ b/docs/1.21/api/enums/notificationinfotype.md @@ -0,0 +1,73 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / NotificationInfoType + +# Enumeration: NotificationInfoType + +## Index + +### Enumeration members + +* [CALLS](notificationinfotype.md#calls) +* [CUSTOM](notificationinfotype.md#custom) +* [HOME](notificationinfotype.md#home) +* [MAIL](notificationinfotype.md#mail) +* [MESSAGES](notificationinfotype.md#messages) +* [PROFILE](notificationinfotype.md#profile) +* [SUPPORT](notificationinfotype.md#support) + +## Enumeration members + +### CALLS + +• **CALLS**: + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:2](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L2)* + +___ + +### CUSTOM + +• **CUSTOM**: + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:8](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L8)* + +___ + +### HOME + +• **HOME**: + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:4](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L4)* + +___ + +### MAIL + +• **MAIL**: + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:5](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L5)* + +___ + +### MESSAGES + +• **MESSAGES**: + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:3](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L3)* + +___ + +### PROFILE + +• **PROFILE**: + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L6)* + +___ + +### SUPPORT + +• **SUPPORT**: + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:7](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L7)* diff --git a/docs/1.21/api/enums/platform.md b/docs/1.21/api/enums/platform.md new file mode 100644 index 00000000..76b62d05 --- /dev/null +++ b/docs/1.21/api/enums/platform.md @@ -0,0 +1,48 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / Platform + +# Enumeration: Platform + +Device platform. + +## Index + +### Enumeration members + +* [ANDROID](platform.md#android) +* [IOS](platform.md#ios) + +### Functions + +* [getPlatform](platform.md#getplatform) + +## Enumeration members + +### ANDROID + +• **ANDROID**: = "Android" + +*Defined in [js-miniapp-bridge/src/types/platform.ts:5](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/platform.ts#L5)* + +___ + +### IOS + +• **IOS**: = "iOS" + +*Defined in [js-miniapp-bridge/src/types/platform.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/platform.ts#L6)* + +## Functions + +### getPlatform + +▸ **getPlatform**(): string + +*Defined in [js-miniapp-sdk/src/miniapp.ts:165](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L165)* + +Detect which platform your mini app is running on. + +**Returns:** string + +`Android`, `iOS`, or `Unknown` diff --git a/docs/1.21/api/enums/screenorientation.md b/docs/1.21/api/enums/screenorientation.md new file mode 100644 index 00000000..2614dc66 --- /dev/null +++ b/docs/1.21/api/enums/screenorientation.md @@ -0,0 +1,39 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / ScreenOrientation + +# Enumeration: ScreenOrientation + +Screen orientation with lock action type. + +## Index + +### Enumeration members + +* [LOCK\_LANDSCAPE](screenorientation.md#lock_landscape) +* [LOCK\_PORTRAIT](screenorientation.md#lock_portrait) +* [LOCK\_RELEASE](screenorientation.md#lock_release) + +## Enumeration members + +### LOCK\_LANDSCAPE + +• **LOCK\_LANDSCAPE**: = "rakuten.miniapp.screen.LOCK\_LANDSCAPE" + +*Defined in [js-miniapp-bridge/src/types/screen.ts:8](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/screen.ts#L8)* + +___ + +### LOCK\_PORTRAIT + +• **LOCK\_PORTRAIT**: = "rakuten.miniapp.screen.LOCK\_PORTRAIT" + +*Defined in [js-miniapp-bridge/src/types/screen.ts:7](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/screen.ts#L7)* + +___ + +### LOCK\_RELEASE + +• **LOCK\_RELEASE**: = "rakuten.miniapp.screen.LOCK\_RELEASE" + +*Defined in [js-miniapp-bridge/src/types/screen.ts:9](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/screen.ts#L9)* diff --git a/docs/1.21/api/index.md b/docs/1.21/api/index.md new file mode 100644 index 00000000..b4416fc8 --- /dev/null +++ b/docs/1.21/api/index.md @@ -0,0 +1,441 @@ +**[js-miniapp-sdk](README.md)** + +> Globals + +# js-miniapp-sdk + +## Index + +### Enumerations + +* [AdTypes](enums/adtypes.md) +* [CustomPermissionName](enums/custompermissionname.md) +* [CustomPermissionStatus](enums/custompermissionstatus.md) +* [DevicePermission](enums/devicepermission.md) +* [HostAppEvents](enums/hostappevents.md) +* [HostBuildType](enums/hostbuildtype.md) +* [MAAnalyticsActionType](enums/maanalyticsactiontype.md) +* [MAAnalyticsEventType](enums/maanalyticseventtype.md) +* [MiniAppAuthErrorType](enums/miniappautherrortype.md) +* [MiniAppDownloadErrorType](enums/miniappdownloaderrortype.md) +* [MiniAppEvents](enums/miniappevents.md) +* [MiniAppInAppPurchaseErrorType](enums/miniappinapppurchaseerrortype.md) +* [MiniAppKeyboardEvents](enums/miniappkeyboardevents.md) +* [MiniAppSecureStorageEvents](enums/miniappsecurestorageevents.md) +* [MiniAppStorageErrorType](enums/miniappstorageerrortype.md) +* [NotificationInfoPriority](enums/notificationinfopriority.md) +* [NotificationInfoType](enums/notificationinfotype.md) +* [Platform](enums/platform.md) +* [ScreenOrientation](enums/screenorientation.md) + +### Classes + +* [AccessTokenData](classes/accesstokendata.md) +* [AccessTokenScopes](classes/accesstokenscopes.md) +* [AudienceNotSupportedError](classes/audiencenotsupportederror.md) +* [AuthorizationFailureError](classes/authorizationfailureerror.md) +* [BridgeInfoConverter](classes/bridgeinfoconverter.md) +* [ConsumeFailedError](classes/consumefailederror.md) +* [DownloadFailedError](classes/downloadfailederror.md) +* [DownloadHttpError](classes/downloadhttperror.md) +* [InvalidUrlError](classes/invalidurlerror.md) +* [LogType](classes/logtype.md) +* [MiniApp](classes/miniapp.md) +* [MiniAppBridgeUtils](classes/miniappbridgeutils.md) +* [MiniAppError](classes/miniapperror.md) +* [MiniAppPreferences](classes/miniapppreferences.md) +* [NotificationBridge](classes/notificationbridge.md) +* [ProductNotFoundError](classes/productnotfounderror.md) +* [ProductPurchasedAlreadyError](classes/productpurchasedalreadyerror.md) +* [PurchaseFailedError](classes/purchasefailederror.md) +* [SaveFailureError](classes/savefailureerror.md) +* [ScopesNotSupportedError](classes/scopesnotsupportederror.md) +* [SecureStorageBusyError](classes/securestoragebusyerror.md) +* [SecureStorageFullError](classes/securestoragefullerror.md) +* [SecureStorageIOError](classes/securestorageioerror.md) +* [SecureStorageUnavailableError](classes/securestorageunavailableerror.md) +* [UserCancelledPurchaseError](classes/usercancelledpurchaseerror.md) + +### Interfaces + +* [Ad](interfaces/ad.md) +* [ChatServiceProvider](interfaces/chatserviceprovider.md) +* [CloseAlertInfo](interfaces/closealertinfo.md) +* [Contact](interfaces/contact.md) +* [CookieInfo](interfaces/cookieinfo.md) +* [CookieProvider](interfaces/cookieprovider.md) +* [CustomPermission](interfaces/custompermission.md) +* [CustomPermissionResponse](interfaces/custompermissionresponse.md) +* [CustomPermissionResult](interfaces/custompermissionresult.md) +* [Decoder](interfaces/decoder.md) +* [DownloadFileHeaders](interfaces/downloadfileheaders.md) +* [HostEnvironmentInfo](interfaces/hostenvironmentinfo.md) +* [HostThemeColor](interfaces/hostthemecolor.md) +* [MAAnalyticsInfo](interfaces/maanalyticsinfo.md) +* [MessageToContact](interfaces/messagetocontact.md) +* [MiniAppDownloadError](interfaces/miniappdownloaderror.md) +* [MiniAppFeatures](interfaces/miniappfeatures.md) +* [MiniAppJson](interfaces/miniappjson.md) +* [MiniAppPreferenceProvider](interfaces/miniapppreferenceprovider.md) +* [MiniAppResponseInfo](interfaces/miniappresponseinfo.md) +* [MiniAppUtilsProvider](interfaces/miniapputilsprovider.md) +* [NotificationDetailedInfo](interfaces/notificationdetailedinfo.md) +* [NotificationInfo](interfaces/notificationinfo.md) +* [Points](interfaces/points.md) +* [ProductInfo](interfaces/productinfo.md) +* [ProductPrice](interfaces/productprice.md) +* [PurchaseProvider](interfaces/purchaseprovider.md) +* [PurchasedProductInfo](interfaces/purchasedproductinfo.md) +* [Reward](interfaces/reward.md) +* [SecureStorageProvider](interfaces/securestorageprovider.md) +* [ShareInfoType](interfaces/shareinfotype.md) +* [UniversalBridgeInfo](interfaces/universalbridgeinfo.md) +* [UniversalBridgeProvider](interfaces/universalbridgeprovider.md) +* [UserInfoProvider](interfaces/userinfoprovider.md) + +### Type aliases + +* [MiniAppSecureStorageKeyValues](README.md#miniappsecurestoragekeyvalues) +* [MiniAppSecureStorageSize](README.md#miniappsecurestoragesize) + +### Variables + +* [mabCustomEventQueue](README.md#mabcustomeventqueue) +* [mabKeyboardEventQueue](README.md#mabkeyboardeventqueue) +* [originalDebug](README.md#originaldebug) +* [originalError](README.md#originalerror) +* [originalLog](README.md#originallog) +* [originalWarn](README.md#originalwarn) + +### Functions + +* [convertUnicodeCharacters](README.md#convertunicodecharacters) +* [convertUnicodeCharactersForAndroid](README.md#convertunicodecharactersforandroid) +* [decodeOctalEscape](README.md#decodeoctalescape) +* [getConsoleForLogType](README.md#getconsoleforlogtype) +* [isValidJson](README.md#isvalidjson) +* [logMessage](README.md#logmessage) +* [parseAuthError](README.md#parseautherror) +* [parseDownloadError](README.md#parsedownloaderror) +* [parseInAppPurchaseError](README.md#parseinapppurchaseerror) +* [parseIntOctal](README.md#parseintoctal) +* [parseMiniAppError](README.md#parseminiapperror) +* [parseStorageError](README.md#parsestorageerror) +* [removeFromEventQueue](README.md#removefromeventqueue) +* [removeFromKeyboardEventQueue](README.md#removefromkeyboardeventqueue) +* [trimBannerText](README.md#trimbannertext) + +## Type aliases + +### MiniAppSecureStorageKeyValues + +Ƭ **MiniAppSecureStorageKeyValues**: { [key:string]: string; } + +*Defined in [js-miniapp-bridge/src/types/secure-storage.ts:5](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/secure-storage.ts#L5)* + +Type used when requesting to set/get multiple key/value pairs using MiniApp.setItems + +___ + +### MiniAppSecureStorageSize + +Ƭ **MiniAppSecureStorageSize**: { max: number ; used: number } + +*Defined in [js-miniapp-bridge/src/types/secure-storage.ts:10](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/secure-storage.ts#L10)* + +#### Type declaration: + +Name | Type | +------ | ------ | +`max` | number | +`used` | number | + +## Variables + +### mabCustomEventQueue + +• `Const` **mabCustomEventQueue**: CustomEvent[] = [] + +*Defined in [js-miniapp-bridge/src/common-bridge.ts:45](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-bridge.ts#L45)* + +___ + +### mabKeyboardEventQueue + +• `Const` **mabKeyboardEventQueue**: CustomEvent[] = [] + +*Defined in [js-miniapp-bridge/src/common-bridge.ts:46](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-bridge.ts#L46)* + +___ + +### originalDebug + +• `Const` **originalDebug**: debug = console.debug + +*Defined in [js-miniapp-bridge/src/common-log.ts:65](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-log.ts#L65)* + +___ + +### originalError + +• `Const` **originalError**: error = console.error + +*Defined in [js-miniapp-bridge/src/common-log.ts:64](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-log.ts#L64)* + +___ + +### originalLog + +• `Const` **originalLog**: log = console.log + +*Defined in [js-miniapp-bridge/src/common-log.ts:62](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-log.ts#L62)* + +___ + +### originalWarn + +• `Const` **originalWarn**: warn = console.warn + +*Defined in [js-miniapp-bridge/src/common-log.ts:63](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-log.ts#L63)* + +## Functions + +### convertUnicodeCharacters + +▸ **convertUnicodeCharacters**(`value`: any): any + +*Defined in [js-miniapp-bridge/src/common-bridge.ts:1022](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-bridge.ts#L1022)* + +#### Parameters: + +Name | Type | +------ | ------ | +`value` | any | + +**Returns:** any + +___ + +### convertUnicodeCharactersForAndroid + +▸ **convertUnicodeCharactersForAndroid**(`value`: any): any + +*Defined in [js-miniapp-bridge/src/common-bridge.ts:1037](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-bridge.ts#L1037)* + +#### Parameters: + +Name | Type | +------ | ------ | +`value` | any | + +**Returns:** any + +___ + +### decodeOctalEscape + +▸ `Const`**decodeOctalEscape**(`input`: any): any + +*Defined in [js-miniapp-bridge/src/common-bridge.ts:1017](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-bridge.ts#L1017)* + +#### Parameters: + +Name | Type | +------ | ------ | +`input` | any | + +**Returns:** any + +___ + +### getConsoleForLogType + +▸ **getConsoleForLogType**(`type`: [LogType](classes/logtype.md)): error + +*Defined in [js-miniapp-bridge/src/common-log.ts:49](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-log.ts#L49)* + +#### Parameters: + +Name | Type | +------ | ------ | +`type` | [LogType](classes/logtype.md) | + +**Returns:** error + +___ + +### isValidJson + +▸ **isValidJson**(`str`: any): boolean + +*Defined in [js-miniapp-bridge/src/common-bridge.ts:1049](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-bridge.ts#L1049)* + +#### Parameters: + +Name | Type | +------ | ------ | +`str` | any | + +**Returns:** boolean + +___ + +### logMessage + +▸ **logMessage**(`type`: [LogType](classes/logtype.md), `argumentsList`: any[]): void + +*Defined in [js-miniapp-bridge/src/common-log.ts:67](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-log.ts#L67)* + +#### Parameters: + +Name | Type | +------ | ------ | +`type` | [LogType](classes/logtype.md) | +`argumentsList` | any[] | + +**Returns:** void + +___ + +### parseAuthError + +▸ **parseAuthError**(`json`: [MiniAppJson](interfaces/miniappjson.md)): [AudienceNotSupportedError](classes/audiencenotsupportederror.md) \| [ScopesNotSupportedError](classes/scopesnotsupportederror.md) \| [AuthorizationFailureError](classes/authorizationfailureerror.md) + +*Defined in [js-miniapp-bridge/src/types/error-types/auth-errors.ts:32](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/auth-errors.ts#L32)* + +#### Parameters: + +Name | Type | +------ | ------ | +`json` | [MiniAppJson](interfaces/miniappjson.md) | + +**Returns:** [AudienceNotSupportedError](classes/audiencenotsupportederror.md) \| [ScopesNotSupportedError](classes/scopesnotsupportederror.md) \| [AuthorizationFailureError](classes/authorizationfailureerror.md) + +___ + +### parseDownloadError + +▸ **parseDownloadError**(`json`: [MiniAppDownloadError](interfaces/miniappdownloaderror.md)): [DownloadFailedError](classes/downloadfailederror.md) \| [InvalidUrlError](classes/invalidurlerror.md) \| [SaveFailureError](classes/savefailureerror.md) \| [DownloadHttpError](classes/downloadhttperror.md) + +*Defined in [js-miniapp-bridge/src/types/error-types/download-file-errors.ts:63](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/download-file-errors.ts#L63)* + +#### Parameters: + +Name | Type | +------ | ------ | +`json` | [MiniAppDownloadError](interfaces/miniappdownloaderror.md) | + +**Returns:** [DownloadFailedError](classes/downloadfailederror.md) \| [InvalidUrlError](classes/invalidurlerror.md) \| [SaveFailureError](classes/savefailureerror.md) \| [DownloadHttpError](classes/downloadhttperror.md) + +___ + +### parseInAppPurchaseError + +▸ **parseInAppPurchaseError**(`json`: [MiniAppJson](interfaces/miniappjson.md)): [PurchaseFailedError](classes/purchasefailederror.md) \| [ConsumeFailedError](classes/consumefailederror.md) \| [ProductNotFoundError](classes/productnotfounderror.md) \| [ProductPurchasedAlreadyError](classes/productpurchasedalreadyerror.md) \| [UserCancelledPurchaseError](classes/usercancelledpurchaseerror.md) + +*Defined in [js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts:53](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/in-app-purchase-errors.ts#L53)* + +#### Parameters: + +Name | Type | +------ | ------ | +`json` | [MiniAppJson](interfaces/miniappjson.md) | + +**Returns:** [PurchaseFailedError](classes/purchasefailederror.md) \| [ConsumeFailedError](classes/consumefailederror.md) \| [ProductNotFoundError](classes/productnotfounderror.md) \| [ProductPurchasedAlreadyError](classes/productpurchasedalreadyerror.md) \| [UserCancelledPurchaseError](classes/usercancelledpurchaseerror.md) + +___ + +### parseIntOctal + +▸ `Const`**parseIntOctal**(`octalCode`: any): number + +*Defined in [js-miniapp-bridge/src/common-bridge.ts:1013](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-bridge.ts#L1013)* + +#### Parameters: + +Name | Type | +------ | ------ | +`octalCode` | any | + +**Returns:** number + +___ + +### parseMiniAppError + +▸ **parseMiniAppError**(`jsonString`: string): [MiniAppError](classes/miniapperror.md) + +*Defined in [js-miniapp-bridge/src/types/error-types/index.ts:31](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/index.ts#L31)* + +#### Parameters: + +Name | Type | +------ | ------ | +`jsonString` | string | + +**Returns:** [MiniAppError](classes/miniapperror.md) + +___ + +### parseStorageError + +▸ **parseStorageError**(`json`: [MiniAppJson](interfaces/miniappjson.md)): [SecureStorageFullError](classes/securestoragefullerror.md) \| [SecureStorageBusyError](classes/securestoragebusyerror.md) \| [SecureStorageUnavailableError](classes/securestorageunavailableerror.md) \| [SecureStorageIOError](classes/securestorageioerror.md) + +*Defined in [js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts:42](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/secure-storage-errors.ts#L42)* + +#### Parameters: + +Name | Type | +------ | ------ | +`json` | [MiniAppJson](interfaces/miniappjson.md) | + +**Returns:** [SecureStorageFullError](classes/securestoragefullerror.md) \| [SecureStorageBusyError](classes/securestoragebusyerror.md) \| [SecureStorageUnavailableError](classes/securestorageunavailableerror.md) \| [SecureStorageIOError](classes/securestorageioerror.md) + +___ + +### removeFromEventQueue + +▸ **removeFromEventQueue**(`queueObj`: any): void + +*Defined in [js-miniapp-bridge/src/common-bridge.ts:985](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-bridge.ts#L985)* + +#### Parameters: + +Name | Type | +------ | ------ | +`queueObj` | any | + +**Returns:** void + +___ + +### removeFromKeyboardEventQueue + +▸ **removeFromKeyboardEventQueue**(`queueObj`: any): void + +*Defined in [js-miniapp-bridge/src/common-bridge.ts:996](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-bridge.ts#L996)* + +#### Parameters: + +Name | Type | +------ | ------ | +`queueObj` | any | + +**Returns:** void + +___ + +### trimBannerText + +▸ **trimBannerText**(`message?`: string, `maxLength?`: number): string + +*Defined in [js-miniapp-bridge/src/common-bridge.ts:1007](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/common-bridge.ts#L1007)* + +#### Parameters: + +Name | Type | Default value | +------ | ------ | ------ | +`message` | string | null | +`maxLength` | number | 128 | + +**Returns:** string diff --git a/docs/1.21/api/interfaces/ad.md b/docs/1.21/api/interfaces/ad.md new file mode 100644 index 00000000..87874fa4 --- /dev/null +++ b/docs/1.21/api/interfaces/ad.md @@ -0,0 +1,115 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / Ad + +# Interface: Ad + +A contract declaring the interaction mechanism between mini-apps and native host app to display ads. + +## Hierarchy + +* **Ad** + +## Implemented by + +* [MiniApp](../classes/miniapp.md) + +## Index + +### Methods + +* [loadInterstitialAd](ad.md#loadinterstitialad) +* [loadRewardedAd](ad.md#loadrewardedad) +* [showInterstitialAd](ad.md#showinterstitialad) +* [showRewardedAd](ad.md#showrewardedad) + +## Methods + +### loadInterstitialAd + +▸ **loadInterstitialAd**(`id`: string): Promise\ + +*Defined in [js-miniapp-sdk/src/miniapp.ts:131](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L131)* + +Loads the specified Interstittial Ad Unit ID. +Can be called multiple times to pre-load multiple ads. +Promise is resolved when successfully loaded. + +#### Parameters: + +Name | Type | +------ | ------ | +`id` | string | + +**Returns:** Promise\ + +The Promise of load success response. +Promise is rejected if failed to load. + +___ + +### loadRewardedAd + +▸ **loadRewardedAd**(`id`: string): Promise\ + +*Defined in [js-miniapp-sdk/src/miniapp.ts:140](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L140)* + +Loads the specified Rewarded Ad Unit ID. +Can be called multiple times to pre-load multiple ads. +Promise is resolved when successfully loaded. + +#### Parameters: + +Name | Type | +------ | ------ | +`id` | string | + +**Returns:** Promise\ + +The Promise of load success response. +Promise is rejected if failed to load. + +___ + +### showInterstitialAd + +▸ **showInterstitialAd**(`id`: string): Promise\ + +*Defined in [js-miniapp-sdk/src/miniapp.ts:148](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L148)* + +Shows the Interstitial Ad for the specified ID. +Promise is resolved after the user closes the Ad. + +#### Parameters: + +Name | Type | +------ | ------ | +`id` | string | + +**Returns:** Promise\ + +The Promise of close success response. +Promise is rejected if the Ad failed to display wasn't loaded first using MiniApp.loadInterstitialAd. + +___ + +### showRewardedAd + +▸ **showRewardedAd**(`id`: string): Promise\<[Reward](reward.md)> + +*Defined in [js-miniapp-sdk/src/miniapp.ts:157](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L157)* + +Shows the Rewarded Ad for the specified ID. +Promise is resolved with an object after the user closes the Ad. The object contains the reward earned by the user. +Reward will be null if the user did not earn the reward. + +#### Parameters: + +Name | Type | +------ | ------ | +`id` | string | + +**Returns:** Promise\<[Reward](reward.md)> + +The Promise of Rewarded ad response result from injected side. +Promise is rejected if the Ad failed to display wasn't loaded first using MiniApp.loadRewardedAds. diff --git a/docs/1.21/api/interfaces/chatserviceprovider.md b/docs/1.21/api/interfaces/chatserviceprovider.md new file mode 100644 index 00000000..4bf54816 --- /dev/null +++ b/docs/1.21/api/interfaces/chatserviceprovider.md @@ -0,0 +1,86 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / ChatServiceProvider + +# Interface: ChatServiceProvider + +## Hierarchy + +* **ChatServiceProvider** + +## Index + +### Methods + +* [sendMessageToContact](chatserviceprovider.md#sendmessagetocontact) +* [sendMessageToContactId](chatserviceprovider.md#sendmessagetocontactid) +* [sendMessageToMultipleContacts](chatserviceprovider.md#sendmessagetomultiplecontacts) + +## Methods + +### sendMessageToContact + +▸ **sendMessageToContact**(`message`: [MessageToContact](messagetocontact.md)): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/chat-service.ts:13](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/chat-service.ts#L13)* + +Opens a contact chooser which allows the user to choose a single contact, +and then sends the message to the chosen contact. + +#### Parameters: + +Name | Type | Description | +------ | ------ | ------ | +`message` | [MessageToContact](messagetocontact.md) | The message to send to contact. | + +**Returns:** Promise\ + +Promise resolves with the contact id received a message. +Can also resolve with null response in the case that the message was not sent to a contact, such as if the user cancelled sending the message. +Promise rejects in the case that there was an error. + +___ + +### sendMessageToContactId + +▸ **sendMessageToContactId**(`id`: string, `message`: [MessageToContact](messagetocontact.md)): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/chat-service.ts:22](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/chat-service.ts#L22)* + +Send a message to the specific contact. + +**`see`** {sendMessageToContact} + +#### Parameters: + +Name | Type | Description | +------ | ------ | ------ | +`id` | string | The id of the contact receiving a message. | +`message` | [MessageToContact](messagetocontact.md) | The message to send to contact. | + +**Returns:** Promise\ + +Promise resolves with the contact id received a message. + +___ + +### sendMessageToMultipleContacts + +▸ **sendMessageToMultipleContacts**(`message`: [MessageToContact](messagetocontact.md)): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/chat-service.ts:35](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/chat-service.ts#L35)* + +Opens a contact chooser which allows the user to choose a multiple contacts +and then sends the message to the all chosen contacts. + +#### Parameters: + +Name | Type | Description | +------ | ------ | ------ | +`message` | [MessageToContact](messagetocontact.md) | The message to send to contact. | + +**Returns:** Promise\ + +Promise resolves with an array of contact id which were sent the message. +Can also resolve with null array in the case that the message was not sent to any contacts, such as if the user cancelled sending the message. +Promise rejects in the case that there was an error. diff --git a/docs/1.21/api/interfaces/closealertinfo.md b/docs/1.21/api/interfaces/closealertinfo.md new file mode 100644 index 00000000..990297b0 --- /dev/null +++ b/docs/1.21/api/interfaces/closealertinfo.md @@ -0,0 +1,43 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / CloseAlertInfo + +# Interface: CloseAlertInfo + +Mini App Close confirmation alert info + +## Hierarchy + +* **CloseAlertInfo** + +## Index + +### Properties + +* [description](closealertinfo.md#description) +* [shouldDisplay](closealertinfo.md#shoulddisplay) +* [title](closealertinfo.md#title) + +## Properties + +### description + +• **description**: string + +*Defined in [js-miniapp-bridge/src/types/close-alert.ts:10](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/close-alert.ts#L10)* + +___ + +### shouldDisplay + +• **shouldDisplay**: boolean + +*Defined in [js-miniapp-bridge/src/types/close-alert.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/close-alert.ts#L6)* + +___ + +### title + +• **title**: string + +*Defined in [js-miniapp-bridge/src/types/close-alert.ts:8](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/close-alert.ts#L8)* diff --git a/docs/1.21/api/interfaces/contact.md b/docs/1.21/api/interfaces/contact.md new file mode 100644 index 00000000..af84ba5f --- /dev/null +++ b/docs/1.21/api/interfaces/contact.md @@ -0,0 +1,52 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / Contact + +# Interface: Contact + +Contact type. + +## Hierarchy + +* **Contact** + +## Index + +### Properties + +* [allEmailList](contact.md#allemaillist) +* [email](contact.md#email) +* [id](contact.md#id) +* [name](contact.md#name) + +## Properties + +### allEmailList + +• `Optional` **allEmailList**: string[] + +*Defined in [js-miniapp-bridge/src/types/contact.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/contact.ts#L6)* + +___ + +### email + +• `Optional` **email**: string + +*Defined in [js-miniapp-bridge/src/types/contact.ts:5](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/contact.ts#L5)* + +___ + +### id + +• **id**: string + +*Defined in [js-miniapp-bridge/src/types/contact.ts:3](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/contact.ts#L3)* + +___ + +### name + +• `Optional` **name**: string + +*Defined in [js-miniapp-bridge/src/types/contact.ts:4](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/contact.ts#L4)* diff --git a/docs/1.21/api/interfaces/cookieinfo.md b/docs/1.21/api/interfaces/cookieinfo.md new file mode 100644 index 00000000..b3bf93ad --- /dev/null +++ b/docs/1.21/api/interfaces/cookieinfo.md @@ -0,0 +1,34 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / CookieInfo + +# Interface: CookieInfo + +CookieInfo type. + +## Hierarchy + +* **CookieInfo** + +## Index + +### Properties + +* [name](cookieinfo.md#name) +* [value](cookieinfo.md#value) + +## Properties + +### name + +• `Optional` **name**: string + +*Defined in [js-miniapp-bridge/src/types/cookie-info.ts:3](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/cookie-info.ts#L3)* + +___ + +### value + +• `Optional` **value**: string + +*Defined in [js-miniapp-bridge/src/types/cookie-info.ts:4](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/cookie-info.ts#L4)* diff --git a/docs/1.21/api/interfaces/cookieprovider.md b/docs/1.21/api/interfaces/cookieprovider.md new file mode 100644 index 00000000..bd57773e --- /dev/null +++ b/docs/1.21/api/interfaces/cookieprovider.md @@ -0,0 +1,52 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / CookieProvider + +# Interface: CookieProvider + +Interfaces to retrieve Cookies from Host app + +## Hierarchy + +* **CookieProvider** + +## Index + +### Methods + +* [getAllCookies](cookieprovider.md#getallcookies) +* [getCookies](cookieprovider.md#getcookies) + +## Methods + +### getAllCookies + +▸ **getAllCookies**(): Promise\<[[CookieInfo](cookieinfo.md)]> + +*Defined in [js-miniapp-sdk/src/modules/cookie-manager.ts:12](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/cookie-manager.ts#L12)* + +Fetches all cookies from host app. + +**Returns:** Promise\<[[CookieInfo](cookieinfo.md)]> + +List of Cookies with name and value details + +___ + +### getCookies + +▸ **getCookies**(`cookieNameList`: string[]): Promise\<[[CookieInfo](cookieinfo.md)]> + +*Defined in [js-miniapp-sdk/src/modules/cookie-manager.ts:18](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/cookie-manager.ts#L18)* + +Fetches the cookies for the provided name list + +#### Parameters: + +Name | Type | +------ | ------ | +`cookieNameList` | string[] | + +**Returns:** Promise\<[[CookieInfo](cookieinfo.md)]> + +List of Cookies with name and value details diff --git a/docs/1.21/api/interfaces/custompermission.md b/docs/1.21/api/interfaces/custompermission.md new file mode 100644 index 00000000..9049b162 --- /dev/null +++ b/docs/1.21/api/interfaces/custompermission.md @@ -0,0 +1,32 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / CustomPermission + +# Interface: CustomPermission + +## Hierarchy + +* **CustomPermission** + +## Index + +### Properties + +* [description](custompermission.md#description) +* [name](custompermission.md#name) + +## Properties + +### description + +• **description**: string + +*Defined in [js-miniapp-bridge/src/types/custom-permissions.ts:20](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/custom-permissions.ts#L20)* + +___ + +### name + +• **name**: [CustomPermissionName](../enums/custompermissionname.md) + +*Defined in [js-miniapp-bridge/src/types/custom-permissions.ts:19](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/custom-permissions.ts#L19)* diff --git a/docs/1.21/api/interfaces/custompermissionresponse.md b/docs/1.21/api/interfaces/custompermissionresponse.md new file mode 100644 index 00000000..9214c987 --- /dev/null +++ b/docs/1.21/api/interfaces/custompermissionresponse.md @@ -0,0 +1,23 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / CustomPermissionResponse + +# Interface: CustomPermissionResponse + +## Hierarchy + +* **CustomPermissionResponse** + +## Index + +### Properties + +* [permissions](custompermissionresponse.md#permissions) + +## Properties + +### permissions + +• **permissions**: [CustomPermissionResult](custompermissionresult.md)[] + +*Defined in [js-miniapp-bridge/src/types/custom-permissions.ts:29](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/custom-permissions.ts#L29)* diff --git a/docs/1.21/api/interfaces/custompermissionresult.md b/docs/1.21/api/interfaces/custompermissionresult.md new file mode 100644 index 00000000..601d2fbf --- /dev/null +++ b/docs/1.21/api/interfaces/custompermissionresult.md @@ -0,0 +1,32 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / CustomPermissionResult + +# Interface: CustomPermissionResult + +## Hierarchy + +* **CustomPermissionResult** + +## Index + +### Properties + +* [name](custompermissionresult.md#name) +* [status](custompermissionresult.md#status) + +## Properties + +### name + +• **name**: [CustomPermissionName](../enums/custompermissionname.md) + +*Defined in [js-miniapp-bridge/src/types/custom-permissions.ts:24](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/custom-permissions.ts#L24)* + +___ + +### status + +• **status**: [CustomPermissionStatus](../enums/custompermissionstatus.md) + +*Defined in [js-miniapp-bridge/src/types/custom-permissions.ts:25](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/custom-permissions.ts#L25)* diff --git a/docs/1.21/api/interfaces/decoder.md b/docs/1.21/api/interfaces/decoder.md new file mode 100644 index 00000000..1ed8aba0 --- /dev/null +++ b/docs/1.21/api/interfaces/decoder.md @@ -0,0 +1,37 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / Decoder + +# Interface: Decoder + +Interfaces to Decode any input + +## Hierarchy + +* **Decoder** + +## Index + +### Methods + +* [decodeContacts](decoder.md#decodecontacts) + +## Methods + +### decodeContacts + +▸ **decodeContacts**(`contactList`: [Contact](contact.md)[]): Promise\<[Contact](contact.md)[]> + +*Defined in [js-miniapp-sdk/src/modules/decoder.ts:12](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/decoder.ts#L12)* + +Decode the contacts name + +#### Parameters: + +Name | Type | +------ | ------ | +`contactList` | [Contact](contact.md)[] | + +**Returns:** Promise\<[Contact](contact.md)[]> + +Decoded list of Contacts diff --git a/docs/1.21/api/interfaces/downloadfileheaders.md b/docs/1.21/api/interfaces/downloadfileheaders.md new file mode 100644 index 00000000..352d5349 --- /dev/null +++ b/docs/1.21/api/interfaces/downloadfileheaders.md @@ -0,0 +1,17 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / DownloadFileHeaders + +# Interface: DownloadFileHeaders + +DownloadFileHeaders. + +## Hierarchy + +* **DownloadFileHeaders** + +## Indexable + +▪ [header: string]: string + +DownloadFileHeaders. diff --git a/docs/1.21/api/interfaces/hostenvironmentinfo.md b/docs/1.21/api/interfaces/hostenvironmentinfo.md new file mode 100644 index 00000000..9d73ed6b --- /dev/null +++ b/docs/1.21/api/interfaces/hostenvironmentinfo.md @@ -0,0 +1,88 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / HostEnvironmentInfo + +# Interface: HostEnvironmentInfo + +HostEnvironmentInfo type. + +## Hierarchy + +* **HostEnvironmentInfo** + +## Index + +### Properties + +* [deviceToken](hostenvironmentinfo.md#devicetoken) +* [hostBuildType](hostenvironmentinfo.md#hostbuildtype) +* [hostLocale](hostenvironmentinfo.md#hostlocale) +* [hostVersion](hostenvironmentinfo.md#hostversion) +* [platform](hostenvironmentinfo.md#platform) +* [platformVersion](hostenvironmentinfo.md#platformversion) +* [pushToken](hostenvironmentinfo.md#pushtoken) +* [sdkVersion](hostenvironmentinfo.md#sdkversion) + +## Properties + +### deviceToken + +• `Optional` **deviceToken**: string + +*Defined in [js-miniapp-bridge/src/types/host-environment-info.ts:11](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/host-environment-info.ts#L11)* + +___ + +### hostBuildType + +• `Optional` **hostBuildType**: [HostBuildType](../enums/hostbuildtype.md) + +*Defined in [js-miniapp-bridge/src/types/host-environment-info.ts:10](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/host-environment-info.ts#L10)* + +___ + +### hostLocale + +• `Optional` **hostLocale**: string + +*Defined in [js-miniapp-bridge/src/types/host-environment-info.ts:9](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/host-environment-info.ts#L9)* + +___ + +### hostVersion + +• `Optional` **hostVersion**: string + +*Defined in [js-miniapp-bridge/src/types/host-environment-info.ts:7](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/host-environment-info.ts#L7)* + +___ + +### platform + +• `Optional` **platform**: [Platform](../enums/platform.md) + +*Defined in [js-miniapp-bridge/src/types/host-environment-info.ts:5](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/host-environment-info.ts#L5)* + +___ + +### platformVersion + +• `Optional` **platformVersion**: string + +*Defined in [js-miniapp-bridge/src/types/host-environment-info.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/host-environment-info.ts#L6)* + +___ + +### pushToken + +• `Optional` **pushToken**: string + +*Defined in [js-miniapp-bridge/src/types/host-environment-info.ts:12](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/host-environment-info.ts#L12)* + +___ + +### sdkVersion + +• `Optional` **sdkVersion**: string + +*Defined in [js-miniapp-bridge/src/types/host-environment-info.ts:8](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/host-environment-info.ts#L8)* diff --git a/docs/1.21/api/interfaces/hostthemecolor.md b/docs/1.21/api/interfaces/hostthemecolor.md new file mode 100644 index 00000000..3868766b --- /dev/null +++ b/docs/1.21/api/interfaces/hostthemecolor.md @@ -0,0 +1,34 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / HostThemeColor + +# Interface: HostThemeColor + +Host Color Scheme type. + +## Hierarchy + +* **HostThemeColor** + +## Index + +### Properties + +* [primaryColor](hostthemecolor.md#primarycolor) +* [secondaryColor](hostthemecolor.md#secondarycolor) + +## Properties + +### primaryColor + +• `Optional` **primaryColor**: string + +*Defined in [js-miniapp-bridge/src/types/host-color-scheme.ts:3](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/host-color-scheme.ts#L3)* + +___ + +### secondaryColor + +• `Optional` **secondaryColor**: string + +*Defined in [js-miniapp-bridge/src/types/host-color-scheme.ts:4](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/host-color-scheme.ts#L4)* diff --git a/docs/1.21/api/interfaces/maanalyticsinfo.md b/docs/1.21/api/interfaces/maanalyticsinfo.md new file mode 100644 index 00000000..9ed92a45 --- /dev/null +++ b/docs/1.21/api/interfaces/maanalyticsinfo.md @@ -0,0 +1,115 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MAAnalyticsInfo + +# Interface: MAAnalyticsInfo + +Mini App Analytics info type + +## Hierarchy + +* **MAAnalyticsInfo** + +## Index + +### Properties + +* [accountId](maanalyticsinfo.md#accountid) +* [actionType](maanalyticsinfo.md#actiontype) +* [applicationId](maanalyticsinfo.md#applicationid) +* [componentName](maanalyticsinfo.md#componentname) +* [customerId](maanalyticsinfo.md#customerid) +* [data](maanalyticsinfo.md#data) +* [elementType](maanalyticsinfo.md#elementtype) +* [eventType](maanalyticsinfo.md#eventtype) +* [genre](maanalyticsinfo.md#genre) +* [pageName](maanalyticsinfo.md#pagename) +* [ssc](maanalyticsinfo.md#ssc) + +## Properties + +### accountId + +• `Optional` **accountId**: string + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:36](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L36)* + +___ + +### actionType + +• **actionType**: [MAAnalyticsActionType](../enums/maanalyticsactiontype.md) + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:28](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L28)* + +___ + +### applicationId + +• `Optional` **applicationId**: string + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:37](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L37)* + +___ + +### componentName + +• **componentName**: string + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:30](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L30)* + +___ + +### customerId + +• `Optional` **customerId**: string + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:35](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L35)* + +___ + +### data + +• **data**: string + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:32](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L32)* + +___ + +### elementType + +• **elementType**: string + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:31](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L31)* + +___ + +### eventType + +• **eventType**: [MAAnalyticsEventType](../enums/maanalyticseventtype.md) + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:27](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L27)* + +___ + +### genre + +• `Optional` **genre**: string + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:34](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L34)* + +___ + +### pageName + +• **pageName**: string + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:29](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L29)* + +___ + +### ssc + +• `Optional` **ssc**: string + +*Defined in [js-miniapp-bridge/src/types/analytics/analytics.ts:33](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/analytics/analytics.ts#L33)* diff --git a/docs/1.21/api/interfaces/messagetocontact.md b/docs/1.21/api/interfaces/messagetocontact.md new file mode 100644 index 00000000..582529f4 --- /dev/null +++ b/docs/1.21/api/interfaces/messagetocontact.md @@ -0,0 +1,61 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MessageToContact + +# Interface: MessageToContact + +Message type sent to Contact. + +## Hierarchy + +* **MessageToContact** + +## Index + +### Properties + +* [action](messagetocontact.md#action) +* [bannerMessage](messagetocontact.md#bannermessage) +* [caption](messagetocontact.md#caption) +* [image](messagetocontact.md#image) +* [text](messagetocontact.md#text) + +## Properties + +### action + +• **action**: string + +*Defined in [js-miniapp-bridge/src/types/message-to-contact.ts:10](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/message-to-contact.ts#L10)* + +___ + +### bannerMessage + +• `Optional` **bannerMessage**: string + +*Defined in [js-miniapp-bridge/src/types/message-to-contact.ts:12](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/message-to-contact.ts#L12)* + +___ + +### caption + +• **caption**: string + +*Defined in [js-miniapp-bridge/src/types/message-to-contact.ts:8](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/message-to-contact.ts#L8)* + +___ + +### image + +• **image**: string + +*Defined in [js-miniapp-bridge/src/types/message-to-contact.ts:4](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/message-to-contact.ts#L4)* + +___ + +### text + +• **text**: string + +*Defined in [js-miniapp-bridge/src/types/message-to-contact.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/message-to-contact.ts#L6)* diff --git a/docs/1.21/api/interfaces/miniappdownloaderror.md b/docs/1.21/api/interfaces/miniappdownloaderror.md new file mode 100644 index 00000000..1bb08d69 --- /dev/null +++ b/docs/1.21/api/interfaces/miniappdownloaderror.md @@ -0,0 +1,47 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MiniAppDownloadError + +# Interface: MiniAppDownloadError + +## Hierarchy + +* [MiniAppJson](miniappjson.md) + + ↳ **MiniAppDownloadError** + +## Index + +### Properties + +* [code](miniappdownloaderror.md#code) +* [message](miniappdownloaderror.md#message) +* [type](miniappdownloaderror.md#type) + +## Properties + +### code + +• `Optional` **code**: number + +*Defined in [js-miniapp-bridge/src/types/error-types/download-file-errors.ts:11](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/download-file-errors.ts#L11)* + +___ + +### message + +• `Optional` **message**: string + +*Inherited from [MiniAppJson](miniappjson.md).[message](miniappjson.md#message)* + +*Defined in [js-miniapp-bridge/src/types/error-types/mini-app-error.ts:2](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/mini-app-error.ts#L2)* + +___ + +### type + +• `Optional` **type**: string + +*Inherited from [MiniAppJson](miniappjson.md).[type](miniappjson.md#type)* + +*Defined in [js-miniapp-bridge/src/types/error-types/mini-app-error.ts:3](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/mini-app-error.ts#L3)* diff --git a/docs/1.21/api/interfaces/miniappfeatures.md b/docs/1.21/api/interfaces/miniappfeatures.md new file mode 100644 index 00000000..3b61a942 --- /dev/null +++ b/docs/1.21/api/interfaces/miniappfeatures.md @@ -0,0 +1,231 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MiniAppFeatures + +# Interface: MiniAppFeatures + +A module layer for webapps and mobile native interaction. + +## Hierarchy + +* **MiniAppFeatures** + +## Implemented by + +* [MiniApp](../classes/miniapp.md) + +## Index + +### Methods + +* [downloadFile](miniappfeatures.md#downloadfile) +* [getHostEnvironmentInfo](miniappfeatures.md#gethostenvironmentinfo) +* [getMauid](miniappfeatures.md#getmauid) +* [getMessagingUniqueId](miniappfeatures.md#getmessaginguniqueid) +* [getPoints](miniappfeatures.md#getpoints) +* [getUniqueId](miniappfeatures.md#getuniqueid) +* [requestCustomPermissions](miniappfeatures.md#requestcustompermissions) +* [requestLocationPermission](miniappfeatures.md#requestlocationpermission) +* [setCloseAlert](miniappfeatures.md#setclosealert) +* [setScreenOrientation](miniappfeatures.md#setscreenorientation) +* [shareInfo](miniappfeatures.md#shareinfo) + +## Methods + +### downloadFile + +▸ **downloadFile**(`filename`: string, `url`: string, `headers?`: [DownloadFileHeaders](downloadfileheaders.md)): Promise\ + +*Defined in [js-miniapp-sdk/src/miniapp.ts:108](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L108)* + +Request to download a file and save to the user's device. + +#### Parameters: + +Name | Type | +------ | ------ | +`filename` | string | +`url` | string | +`headers?` | [DownloadFileHeaders](downloadfileheaders.md) | + +**Returns:** Promise\ + +Promise of the downloaded files name. Response will be `null` in case the user cancelled the download. +Can be rejected with [MiniAppError](../classes/miniapperror.md), [DownloadFailedError](../enums/miniappdownloaderrortype.md#downloadfailederror), [DownloadHttpError](../enums/miniappdownloaderrortype.md#downloadhttperror), [InvalidUrlError](../enums/miniappdownloaderrortype.md#invalidurlerror), or [SaveFailureError](../enums/miniappdownloaderrortype.md#savefailureerror). + +___ + +### getHostEnvironmentInfo + +▸ **getHostEnvironmentInfo**(): Promise\<[HostEnvironmentInfo](hostenvironmentinfo.md)> + +*Defined in [js-miniapp-sdk/src/miniapp.ts:101](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L101)* + +Request the host environment information. + +**Returns:** Promise\<[HostEnvironmentInfo](hostenvironmentinfo.md)> + +Promise of the provided environment info from mini app. + +___ + +### getMauid + +▸ **getMauid**(): Promise\ + +*Defined in [js-miniapp-sdk/src/miniapp.ts:50](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L50)* + +Request the mini app's mauid from the host app. + +**Returns:** Promise\ + +The Promise of provided id of mini app from injected side. + +___ + +### getMessagingUniqueId + +▸ **getMessagingUniqueId**(): Promise\ + +*Defined in [js-miniapp-sdk/src/miniapp.ts:44](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L44)* + +Request the mini app's messaging unique id from the host app. + +**Returns:** Promise\ + +The Promise of provided id of mini app from injected side. + +___ + +### getPoints + +▸ **getPoints**(): Promise\<[Points](points.md)> + +*Defined in [js-miniapp-sdk/src/miniapp.ts:95](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L95)* + +Request the point balance from the host app. + +**Returns:** Promise\<[Points](points.md)> + +Promise of the provided point balance from mini app. + +___ + +### getUniqueId + +▸ **getUniqueId**(): Promise\ + +*Defined in [js-miniapp-sdk/src/miniapp.ts:38](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L38)* + +**`deprecated`** +Use `getMessagingUniqueId` or `getMauid` instead +Request the mini app's unique id from the host app. + +**Returns:** Promise\ + +The Promise of provided id of mini app from injected side. + +___ + +### requestCustomPermissions + +▸ **requestCustomPermissions**(`permissions`: [CustomPermission](custompermission.md)[]): Promise\<[CustomPermissionResult](custompermissionresult.md)[]> + +*Defined in [js-miniapp-sdk/src/miniapp.ts:72](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L72)* + +Request that the user grant custom permissions related to accessing user data. +Typically, this will show a dialog in the Host App asking the user grant access to your Mini App. +You can pass multiple permissions at once and the Host App will request all of those permissions within a single dialog. + +#### Parameters: + +Name | Type | Description | +------ | ------ | ------ | +`permissions` | [CustomPermission](custompermission.md)[] | An array containing CustomPermission objects - permission name and description | + +**Returns:** Promise\<[CustomPermissionResult](custompermissionresult.md)[]> + +Promise with the custom permission results - "ALLOWED" or "DENIED" for each permission + +___ + +### requestLocationPermission + +▸ **requestLocationPermission**(`permissionDescription?`: string): Promise\ + +*Defined in [js-miniapp-sdk/src/miniapp.ts:61](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L61)* + +Request the location permission from the host app. +You must call this before using `navigator.geolocation`. +This will request both the Android/iOS device permission for location (if not yet granted to the host app), +and the custom permission for location [CustomPermissionName.LOCATION](../enums/custompermissionname.md#location). + +#### Parameters: + +Name | Type | Description | +------ | ------ | ------ | +`permissionDescription?` | string | Description of location permission. | + +**Returns:** Promise\ + +The Promise of permission result of mini app from injected side. +Rejects the promise if the user denied the location permission (either the device permission or custom permission). + +___ + +### setCloseAlert + +▸ **setCloseAlert**(`alertInfo`: [CloseAlertInfo](closealertinfo.md)): Promise\ + +*Defined in [js-miniapp-sdk/src/miniapp.ts:117](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L117)* + +Mini App can choose whether to display Close confirmation alert dialog when mini app is closed + +#### Parameters: + +Name | Type | +------ | ------ | +`alertInfo` | [CloseAlertInfo](closealertinfo.md) | + +**Returns:** Promise\ + +___ + +### setScreenOrientation + +▸ **setScreenOrientation**(`screenOrientation`: [ScreenOrientation](../enums/screenorientation.md)): Promise\ + +*Defined in [js-miniapp-sdk/src/miniapp.ts:89](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L89)* + +Swap and lock the screen orientation. +There is no guarantee that all hostapps and devices allow the force screen change so MiniApp should not rely on this. + +#### Parameters: + +Name | Type | Description | +------ | ------ | ------ | +`screenOrientation` | [ScreenOrientation](../enums/screenorientation.md) | The action that miniapp wants to request on device. | + +**Returns:** Promise\ + +The Promise of screen action state from injected side. + +___ + +### shareInfo + +▸ **shareInfo**(`info`: [ShareInfoType](shareinfotype.md)): Promise\ + +*Defined in [js-miniapp-sdk/src/miniapp.ts:81](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/miniapp.ts#L81)* + +Share text data with another App or with the host app. + +#### Parameters: + +Name | Type | Description | +------ | ------ | ------ | +`info` | [ShareInfoType](shareinfotype.md) | The shared data must match the property in [ShareInfoType]. | + +**Returns:** Promise\ + +The Promise of share info action state from injected side. diff --git a/docs/1.21/api/interfaces/miniappjson.md b/docs/1.21/api/interfaces/miniappjson.md new file mode 100644 index 00000000..b5d8221b --- /dev/null +++ b/docs/1.21/api/interfaces/miniappjson.md @@ -0,0 +1,34 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MiniAppJson + +# Interface: MiniAppJson + +## Hierarchy + +* **MiniAppJson** + + ↳ [MiniAppDownloadError](miniappdownloaderror.md) + +## Index + +### Properties + +* [message](miniappjson.md#message) +* [type](miniappjson.md#type) + +## Properties + +### message + +• `Optional` **message**: string + +*Defined in [js-miniapp-bridge/src/types/error-types/mini-app-error.ts:2](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/mini-app-error.ts#L2)* + +___ + +### type + +• `Optional` **type**: string + +*Defined in [js-miniapp-bridge/src/types/error-types/mini-app-error.ts:3](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/error-types/mini-app-error.ts#L3)* diff --git a/docs/1.21/api/interfaces/miniapppreferenceprovider.md b/docs/1.21/api/interfaces/miniapppreferenceprovider.md new file mode 100644 index 00000000..bb7a326a --- /dev/null +++ b/docs/1.21/api/interfaces/miniapppreferenceprovider.md @@ -0,0 +1,87 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MiniAppPreferenceProvider + +# Interface: MiniAppPreferenceProvider + +Interfaces used to store, get and clear miniapp preferences + +## Hierarchy + +* **MiniAppPreferenceProvider** + +## Index + +### Methods + +* [clearMiniAppPreferences](miniapppreferenceprovider.md#clearminiapppreferences) +* [get](miniapppreferenceprovider.md#get) +* [remove](miniapppreferenceprovider.md#remove) +* [set](miniapppreferenceprovider.md#set) + +## Methods + +### clearMiniAppPreferences + +▸ **clearMiniAppPreferences**(): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/miniapp-preferences.ts:25](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/miniapp-preferences.ts#L25)* + +Clear all key/values that is stored for the MiniApp + +**Returns:** Promise\ + +___ + +### get + +▸ **get**(`key`: string): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/miniapp-preferences.ts:15](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/miniapp-preferences.ts#L15)* + +Get the value for a given key + +#### Parameters: + +Name | Type | +------ | ------ | +`key` | string | + +**Returns:** Promise\ + +___ + +### remove + +▸ **remove**(`key`: string): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/miniapp-preferences.ts:20](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/miniapp-preferences.ts#L20)* + +Remove value for a given key + +#### Parameters: + +Name | Type | +------ | ------ | +`key` | string | + +**Returns:** Promise\ + +___ + +### set + +▸ **set**(`key`: string, `value`: string): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/miniapp-preferences.ts:10](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/miniapp-preferences.ts#L10)* + +Store any value for a given key + +#### Parameters: + +Name | Type | +------ | ------ | +`key` | string | +`value` | string | + +**Returns:** Promise\ diff --git a/docs/1.21/api/interfaces/miniappresponseinfo.md b/docs/1.21/api/interfaces/miniappresponseinfo.md new file mode 100644 index 00000000..e11f4150 --- /dev/null +++ b/docs/1.21/api/interfaces/miniappresponseinfo.md @@ -0,0 +1,34 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MiniAppResponseInfo + +# Interface: MiniAppResponseInfo + +Generic Mini app Response object + +## Hierarchy + +* **MiniAppResponseInfo** + +## Index + +### Properties + +* [description](miniappresponseinfo.md#description) +* [title](miniappresponseinfo.md#title) + +## Properties + +### description + +• `Optional` **description**: string + +*Defined in [js-miniapp-bridge/src/types/response-types/miniapp/index.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/response-types/miniapp/index.ts#L6)* + +___ + +### title + +• `Optional` **title**: string + +*Defined in [js-miniapp-bridge/src/types/response-types/miniapp/index.ts:5](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/response-types/miniapp/index.ts#L5)* diff --git a/docs/1.21/api/interfaces/miniapputilsprovider.md b/docs/1.21/api/interfaces/miniapputilsprovider.md new file mode 100644 index 00000000..0715d145 --- /dev/null +++ b/docs/1.21/api/interfaces/miniapputilsprovider.md @@ -0,0 +1,164 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / MiniAppUtilsProvider + +# Interface: MiniAppUtilsProvider + +Mini App Utility methods + +## Hierarchy + +* **MiniAppUtilsProvider** + +## Index + +### Methods + +* [canOpenAppDeeplink](miniapputilsprovider.md#canopenappdeeplink) +* [closeMiniApp](miniapputilsprovider.md#closeminiapp) +* [getFeatureList](miniapputilsprovider.md#getfeaturelist) +* [getHostAppThemeColors](miniapputilsprovider.md#gethostappthemecolors) +* [isAppDeeplinkSupported](miniapputilsprovider.md#isappdeeplinksupported) +* [isDarkMode](miniapputilsprovider.md#isdarkmode) +* [miniAppFinishedLoading](miniapputilsprovider.md#miniappfinishedloading) +* [sendAnalytics](miniapputilsprovider.md#sendanalytics) +* [setCloseAlert](miniapputilsprovider.md#setclosealert) + +## Methods + +### canOpenAppDeeplink + +▸ **canOpenAppDeeplink**(`deeplinkURL`: string): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/utils.ts:55](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/utils.ts#L55)* + +Interface to check if the device has the deeplink available. + +#### Parameters: + +Name | Type | +------ | ------ | +`deeplinkURL` | string | + +**Returns:** Promise\ + +___ + +### closeMiniApp + +▸ **closeMiniApp**(`withConfirmation`: boolean): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/utils.ts:23](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/utils.ts#L23)* + +Mini App can be closed using this method, provided Host app is supporting this interface to close the miniapp. + +#### Parameters: + +Name | Type | Description | +------ | ------ | ------ | +`withConfirmation` | boolean | boolean value which will be used by the host app to show/hide close confirmation alert which should be set using `setCloseAlert` method in prior before calling this interface | + +**Returns:** Promise\ + +___ + +### getFeatureList + +▸ **getFeatureList**(): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/utils.ts:50](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/utils.ts#L50)* + +Interface to get list of features supported by the SDK and Host + +**Returns:** Promise\ + +___ + +### getHostAppThemeColors + +▸ **getHostAppThemeColors**(): Promise\<[HostThemeColor](hostthemecolor.md)> + +*Defined in [js-miniapp-sdk/src/modules/utils.ts:34](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/utils.ts#L34)* + +Interface that is used to get the Color theme used in the Host application + +**Returns:** Promise\<[HostThemeColor](hostthemecolor.md)> + +___ + +### isAppDeeplinkSupported + +▸ **isAppDeeplinkSupported**(`deeplinkURL`: string): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/utils.ts:60](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/utils.ts#L60)* + +Interface to check if the application has whitelisted the deeplink + +#### Parameters: + +Name | Type | +------ | ------ | +`deeplinkURL` | string | + +**Returns:** Promise\ + +___ + +### isDarkMode + +▸ **isDarkMode**(): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/utils.ts:39](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/utils.ts#L39)* + +Interface to check if the Device/Application is using Dark mode + +**Returns:** Promise\ + +___ + +### miniAppFinishedLoading + +▸ **miniAppFinishedLoading**(): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/utils.ts:29](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/utils.ts#L29)* + +Miniapp can notify the host app that it has finished loading using this call. +Host app can implement this interface to perform any other actions after the miniapp has loaded. + +**Returns:** Promise\ + +___ + +### sendAnalytics + +▸ **sendAnalytics**(`analytics`: [MAAnalyticsInfo](maanalyticsinfo.md)): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/utils.ts:45](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/utils.ts#L45)* + +Interface to send analytics to Host app + +#### Parameters: + +Name | Type | +------ | ------ | +`analytics` | [MAAnalyticsInfo](maanalyticsinfo.md) | + +**Returns:** Promise\ + +___ + +### setCloseAlert + +▸ **setCloseAlert**(`alertInfo`: [CloseAlertInfo](closealertinfo.md)): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/utils.ts:16](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/utils.ts#L16)* + +Mini App can choose whether to display Close confirmation alert dialog when mini app is closed + +#### Parameters: + +Name | Type | Description | +------ | ------ | ------ | +`alertInfo` | [CloseAlertInfo](closealertinfo.md) | CloseAlertInfo object | + +**Returns:** Promise\ diff --git a/docs/1.21/api/interfaces/notificationdetailedinfo.md b/docs/1.21/api/interfaces/notificationdetailedinfo.md new file mode 100644 index 00000000..2bf51066 --- /dev/null +++ b/docs/1.21/api/interfaces/notificationdetailedinfo.md @@ -0,0 +1,106 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / NotificationDetailedInfo + +# Interface: NotificationDetailedInfo + +Notification DetailedInfo + +## Hierarchy + +* **NotificationDetailedInfo** + +## Index + +### Properties + +* [additionalData](notificationdetailedinfo.md#additionaldata) +* [badgeNumber](notificationdetailedinfo.md#badgenumber) +* [body](notificationdetailedinfo.md#body) +* [clearAfterRead](notificationdetailedinfo.md#clearafterread) +* [icon](notificationdetailedinfo.md#icon) +* [notificationInfoPriority](notificationdetailedinfo.md#notificationinfopriority) +* [notificationInfoType](notificationdetailedinfo.md#notificationinfotype) +* [timestamp](notificationdetailedinfo.md#timestamp) +* [title](notificationdetailedinfo.md#title) +* [url](notificationdetailedinfo.md#url) + +## Properties + +### additionalData + +• `Optional` **additionalData**: string + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:39](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L39)* + +___ + +### badgeNumber + +• `Optional` **badgeNumber**: number + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:40](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L40)* + +___ + +### body + +• `Optional` **body**: string + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:35](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L35)* + +___ + +### clearAfterRead + +• `Optional` **clearAfterRead**: boolean + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:43](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L43)* + +___ + +### icon + +• `Optional` **icon**: string + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:36](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L36)* + +___ + +### notificationInfoPriority + +• `Optional` **notificationInfoPriority**: [NotificationInfoPriority](../enums/notificationinfopriority.md) + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:42](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L42)* + +___ + +### notificationInfoType + +• `Optional` **notificationInfoType**: [NotificationInfoType](../enums/notificationinfotype.md) + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:41](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L41)* + +___ + +### timestamp + +• `Optional` **timestamp**: Date + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:38](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L38)* + +___ + +### title + +• `Optional` **title**: string + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:34](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L34)* + +___ + +### url + +• `Optional` **url**: string + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:37](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L37)* diff --git a/docs/1.21/api/interfaces/notificationinfo.md b/docs/1.21/api/interfaces/notificationinfo.md new file mode 100644 index 00000000..3145160d --- /dev/null +++ b/docs/1.21/api/interfaces/notificationinfo.md @@ -0,0 +1,52 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / NotificationInfo + +# Interface: NotificationInfo + +Notification Info + +## Hierarchy + +* **NotificationInfo** + +## Index + +### Properties + +* [badgeNumber](notificationinfo.md#badgenumber) +* [clearAfterRead](notificationinfo.md#clearafterread) +* [notificationInfoPriority](notificationinfo.md#notificationinfopriority) +* [notificationInfoType](notificationinfo.md#notificationinfotype) + +## Properties + +### badgeNumber + +• `Optional` **badgeNumber**: number + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:24](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L24)* + +___ + +### clearAfterRead + +• `Optional` **clearAfterRead**: boolean + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:27](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L27)* + +___ + +### notificationInfoPriority + +• `Optional` **notificationInfoPriority**: [NotificationInfoPriority](../enums/notificationinfopriority.md) + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:26](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L26)* + +___ + +### notificationInfoType + +• `Optional` **notificationInfoType**: [NotificationInfoType](../enums/notificationinfotype.md) + +*Defined in [js-miniapp-bridge/src/types/notification/notification-info.ts:25](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/notification/notification-info.ts#L25)* diff --git a/docs/1.21/api/interfaces/points.md b/docs/1.21/api/interfaces/points.md new file mode 100644 index 00000000..555255d0 --- /dev/null +++ b/docs/1.21/api/interfaces/points.md @@ -0,0 +1,43 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / Points + +# Interface: Points + +Points type. + +## Hierarchy + +* **Points** + +## Index + +### Properties + +* [cash](points.md#cash) +* [standard](points.md#standard) +* [term](points.md#term) + +## Properties + +### cash + +• `Optional` **cash**: number + +*Defined in [js-miniapp-bridge/src/types/points.ts:5](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/points.ts#L5)* + +___ + +### standard + +• `Optional` **standard**: number + +*Defined in [js-miniapp-bridge/src/types/points.ts:3](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/points.ts#L3)* + +___ + +### term + +• `Optional` **term**: number + +*Defined in [js-miniapp-bridge/src/types/points.ts:4](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/points.ts#L4)* diff --git a/docs/1.21/api/interfaces/productinfo.md b/docs/1.21/api/interfaces/productinfo.md new file mode 100644 index 00000000..90c188d5 --- /dev/null +++ b/docs/1.21/api/interfaces/productinfo.md @@ -0,0 +1,50 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / ProductInfo + +# Interface: ProductInfo + +## Hierarchy + +* **ProductInfo** + +## Index + +### Properties + +* [description](productinfo.md#description) +* [id](productinfo.md#id) +* [productPriceInfo](productinfo.md#productpriceinfo) +* [title](productinfo.md#title) + +## Properties + +### description + +• **description**: string + +*Defined in [js-miniapp-bridge/src/types/in-app-purchase.ts:3](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/in-app-purchase.ts#L3)* + +___ + +### id + +• **id**: string + +*Defined in [js-miniapp-bridge/src/types/in-app-purchase.ts:4](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/in-app-purchase.ts#L4)* + +___ + +### productPriceInfo + +• **productPriceInfo**: [ProductPrice](productprice.md) + +*Defined in [js-miniapp-bridge/src/types/in-app-purchase.ts:5](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/in-app-purchase.ts#L5)* + +___ + +### title + +• **title**: string + +*Defined in [js-miniapp-bridge/src/types/in-app-purchase.ts:2](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/in-app-purchase.ts#L2)* diff --git a/docs/1.21/api/interfaces/productprice.md b/docs/1.21/api/interfaces/productprice.md new file mode 100644 index 00000000..c27b061d --- /dev/null +++ b/docs/1.21/api/interfaces/productprice.md @@ -0,0 +1,32 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / ProductPrice + +# Interface: ProductPrice + +## Hierarchy + +* **ProductPrice** + +## Index + +### Properties + +* [currencyCode](productprice.md#currencycode) +* [price](productprice.md#price) + +## Properties + +### currencyCode + +• **currencyCode**: string + +*Defined in [js-miniapp-bridge/src/types/in-app-purchase.ts:8](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/in-app-purchase.ts#L8)* + +___ + +### price + +• **price**: string + +*Defined in [js-miniapp-bridge/src/types/in-app-purchase.ts:9](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/in-app-purchase.ts#L9)* diff --git a/docs/1.21/api/interfaces/purchasedproductinfo.md b/docs/1.21/api/interfaces/purchasedproductinfo.md new file mode 100644 index 00000000..9dd7a257 --- /dev/null +++ b/docs/1.21/api/interfaces/purchasedproductinfo.md @@ -0,0 +1,41 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / PurchasedProductInfo + +# Interface: PurchasedProductInfo + +## Hierarchy + +* **PurchasedProductInfo** + +## Index + +### Properties + +* [productInfo](purchasedproductinfo.md#productinfo) +* [transactionDate](purchasedproductinfo.md#transactiondate) +* [transactionId](purchasedproductinfo.md#transactionid) + +## Properties + +### productInfo + +• **productInfo**: [ProductInfo](productinfo.md) + +*Defined in [js-miniapp-bridge/src/types/in-app-purchase.ts:12](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/in-app-purchase.ts#L12)* + +___ + +### transactionDate + +• **transactionDate**: string + +*Defined in [js-miniapp-bridge/src/types/in-app-purchase.ts:14](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/in-app-purchase.ts#L14)* + +___ + +### transactionId + +• **transactionId**: string + +*Defined in [js-miniapp-bridge/src/types/in-app-purchase.ts:13](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/in-app-purchase.ts#L13)* diff --git a/docs/1.21/api/interfaces/purchaseprovider.md b/docs/1.21/api/interfaces/purchaseprovider.md new file mode 100644 index 00000000..3a8d925a --- /dev/null +++ b/docs/1.21/api/interfaces/purchaseprovider.md @@ -0,0 +1,66 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / PurchaseProvider + +# Interface: PurchaseProvider + +## Hierarchy + +* **PurchaseProvider** + +## Index + +### Methods + +* [consumePurchaseWith](purchaseprovider.md#consumepurchasewith) +* [getAllProducts](purchaseprovider.md#getallproducts) +* [purchaseProductWith](purchaseprovider.md#purchaseproductwith) + +## Methods + +### consumePurchaseWith + +▸ **consumePurchaseWith**(`id`: string, `transactionId`: string): Promise\<[PurchasedProductInfo](purchasedproductinfo.md)> + +*Defined in [js-miniapp-sdk/src/modules/in-app-purchase.ts:26](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/in-app-purchase.ts#L26)* + +Triggers the request to host app to Purchase a product using the Product ID. + +#### Parameters: + +Name | Type | Description | +------ | ------ | ------ | +`id` | string | The product id which must be purchased from inapp-purchase. This will return the status of inapp-purchase and the details of the purchased product. | +`transactionId` | string | - | + +**Returns:** Promise\<[PurchasedProductInfo](purchasedproductinfo.md)> + +___ + +### getAllProducts + +▸ **getAllProducts**(): Promise\<[ProductInfo](productinfo.md)[]> + +*Defined in [js-miniapp-sdk/src/modules/in-app-purchase.ts:12](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/in-app-purchase.ts#L12)* + +Retrieves and lists all the products from the play/app store which are available for inapp-purchases. + +**Returns:** Promise\<[ProductInfo](productinfo.md)[]> + +___ + +### purchaseProductWith + +▸ **purchaseProductWith**(`id`: string): Promise\<[PurchasedProductInfo](purchasedproductinfo.md)> + +*Defined in [js-miniapp-sdk/src/modules/in-app-purchase.ts:19](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/in-app-purchase.ts#L19)* + +Triggers the request to host app to Purchase a product using the Product ID. + +#### Parameters: + +Name | Type | Description | +------ | ------ | ------ | +`id` | string | The product id which must be purchased from inapp-purchase. This will return the status of inapp-purchase and the details of the purchased product. | + +**Returns:** Promise\<[PurchasedProductInfo](purchasedproductinfo.md)> diff --git a/docs/1.21/api/interfaces/reward.md b/docs/1.21/api/interfaces/reward.md new file mode 100644 index 00000000..f0846ffb --- /dev/null +++ b/docs/1.21/api/interfaces/reward.md @@ -0,0 +1,34 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / Reward + +# Interface: Reward + +A contract declaring the reward response, consists of amount and type of the reward + +## Hierarchy + +* **Reward** + +## Index + +### Properties + +* [amount](reward.md#amount) +* [type](reward.md#type) + +## Properties + +### amount + +• `Optional` **amount**: number + +*Defined in [js-miniapp-bridge/src/types/response-types/rewarded/index.ts:5](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/response-types/rewarded/index.ts#L5)* + +___ + +### type + +• `Optional` **type**: string + +*Defined in [js-miniapp-bridge/src/types/response-types/rewarded/index.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/response-types/rewarded/index.ts#L6)* diff --git a/docs/1.21/api/interfaces/securestorageprovider.md b/docs/1.21/api/interfaces/securestorageprovider.md new file mode 100644 index 00000000..35736728 --- /dev/null +++ b/docs/1.21/api/interfaces/securestorageprovider.md @@ -0,0 +1,109 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / SecureStorageProvider + +# Interface: SecureStorageProvider + +## Hierarchy + +* **SecureStorageProvider** + +## Index + +### Methods + +* [clear](securestorageprovider.md#clear) +* [getItem](securestorageprovider.md#getitem) +* [onLoadError](securestorageprovider.md#onloaderror) +* [onReady](securestorageprovider.md#onready) +* [removeItems](securestorageprovider.md#removeitems) +* [setItems](securestorageprovider.md#setitems) +* [size](securestorageprovider.md#size) + +## Methods + +### clear + +▸ **clear**(): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/secure-storage.ts:18](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/secure-storage.ts#L18)* + +**Returns:** Promise\ + +___ + +### getItem + +▸ **getItem**(`key`: string): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/secure-storage.ts:14](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/secure-storage.ts#L14)* + +#### Parameters: + +Name | Type | +------ | ------ | +`key` | string | + +**Returns:** Promise\ + +___ + +### onLoadError + +▸ **onLoadError**(): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/secure-storage.ts:24](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/secure-storage.ts#L24)* + +**Returns:** Promise\ + +___ + +### onReady + +▸ **onReady**(): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/secure-storage.ts:22](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/secure-storage.ts#L22)* + +**Returns:** Promise\ + +___ + +### removeItems + +▸ **removeItems**(`key`: [string]): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/secure-storage.ts:16](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/secure-storage.ts#L16)* + +#### Parameters: + +Name | Type | +------ | ------ | +`key` | [string] | + +**Returns:** Promise\ + +___ + +### setItems + +▸ **setItems**(`items`: [MiniAppSecureStorageKeyValues](../README.md#miniappsecurestoragekeyvalues)): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/secure-storage.ts:12](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/secure-storage.ts#L12)* + +#### Parameters: + +Name | Type | +------ | ------ | +`items` | [MiniAppSecureStorageKeyValues](../README.md#miniappsecurestoragekeyvalues) | + +**Returns:** Promise\ + +___ + +### size + +▸ **size**(): Promise\<[MiniAppSecureStorageSize](../README.md#miniappsecurestoragesize)> + +*Defined in [js-miniapp-sdk/src/modules/secure-storage.ts:20](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/secure-storage.ts#L20)* + +**Returns:** Promise\<[MiniAppSecureStorageSize](../README.md#miniappsecurestoragesize)> diff --git a/docs/1.21/api/interfaces/shareinfotype.md b/docs/1.21/api/interfaces/shareinfotype.md new file mode 100644 index 00000000..38c4b30b --- /dev/null +++ b/docs/1.21/api/interfaces/shareinfotype.md @@ -0,0 +1,25 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / ShareInfoType + +# Interface: ShareInfoType + +Shared info type. + +## Hierarchy + +* **ShareInfoType** + +## Index + +### Properties + +* [content](shareinfotype.md#content) + +## Properties + +### content + +• **content**: string + +*Defined in [js-miniapp-bridge/src/types/share-info.ts:3](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/share-info.ts#L3)* diff --git a/docs/1.21/api/interfaces/universalbridgeinfo.md b/docs/1.21/api/interfaces/universalbridgeinfo.md new file mode 100644 index 00000000..65b85e2b --- /dev/null +++ b/docs/1.21/api/interfaces/universalbridgeinfo.md @@ -0,0 +1,43 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / UniversalBridgeInfo + +# Interface: UniversalBridgeInfo + +Model that will be sent to Host app through Universal bridge + +## Hierarchy + +* **UniversalBridgeInfo** + +## Index + +### Properties + +* [description](universalbridgeinfo.md#description) +* [key](universalbridgeinfo.md#key) +* [value](universalbridgeinfo.md#value) + +## Properties + +### description + +• `Optional` **description**: string + +*Defined in [js-miniapp-bridge/src/types/universal-bridge.ts:7](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/universal-bridge.ts#L7)* + +___ + +### key + +• `Optional` **key**: string + +*Defined in [js-miniapp-bridge/src/types/universal-bridge.ts:5](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/universal-bridge.ts#L5)* + +___ + +### value + +• `Optional` **value**: string + +*Defined in [js-miniapp-bridge/src/types/universal-bridge.ts:6](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-bridge/src/types/universal-bridge.ts#L6)* diff --git a/docs/1.21/api/interfaces/universalbridgeprovider.md b/docs/1.21/api/interfaces/universalbridgeprovider.md new file mode 100644 index 00000000..c5ce19b0 --- /dev/null +++ b/docs/1.21/api/interfaces/universalbridgeprovider.md @@ -0,0 +1,54 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / UniversalBridgeProvider + +# Interface: UniversalBridgeProvider + +Interfaces to communicate with Host application + +## Hierarchy + +* **UniversalBridgeProvider** + +## Index + +### Methods + +* [sendInfoToHostapp](universalbridgeprovider.md#sendinfotohostapp) +* [sendJsonToHostapp](universalbridgeprovider.md#sendjsontohostapp) + +## Methods + +### sendInfoToHostapp + +▸ **sendInfoToHostapp**(`info`: [UniversalBridgeInfo](universalbridgeinfo.md)): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/universal-bridge.ts:16](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/universal-bridge.ts#L16)* + +Send UniversalBridgeInfo to HostApp. + +#### Parameters: + +Name | Type | +------ | ------ | +`info` | [UniversalBridgeInfo](universalbridgeinfo.md) | + +**Returns:** Promise\ + +___ + +### sendJsonToHostapp + +▸ **sendJsonToHostapp**(`info`: string): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/universal-bridge.ts:11](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/universal-bridge.ts#L11)* + +Send JSON/String information to HostApp. + +#### Parameters: + +Name | Type | +------ | ------ | +`info` | string | + +**Returns:** Promise\ diff --git a/docs/1.21/api/interfaces/userinfoprovider.md b/docs/1.21/api/interfaces/userinfoprovider.md new file mode 100644 index 00000000..e09bd3d5 --- /dev/null +++ b/docs/1.21/api/interfaces/userinfoprovider.md @@ -0,0 +1,116 @@ +**[js-miniapp-sdk](../README.md)** + +> [Globals](../README.md) / UserInfoProvider + +# Interface: UserInfoProvider + +Interfaces to retrieve User profile related information. + +## Hierarchy + +* **UserInfoProvider** + +## Index + +### Methods + +* [getAccessToken](userinfoprovider.md#getaccesstoken) +* [getContacts](userinfoprovider.md#getcontacts) +* [getPhoneNumber](userinfoprovider.md#getphonenumber) +* [getPoints](userinfoprovider.md#getpoints) +* [getProfilePhoto](userinfoprovider.md#getprofilephoto) +* [getUserName](userinfoprovider.md#getusername) + +## Methods + +### getAccessToken + +▸ **getAccessToken**(`audience`: string, `scopes`: string[]): Promise\<[AccessTokenData](../classes/accesstokendata.md) \| [MiniAppError](../classes/miniapperror.md)> + +*Defined in [js-miniapp-sdk/src/modules/user-info.ts:41](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/user-info.ts#L41)* + +Fetches the access token from host app. + +#### Parameters: + +Name | Type | Description | +------ | ------ | ------ | +`audience` | string | one of the audiences provided in MiniApp manifest | +`scopes` | string[] | scopes array associated to the audience | + +**Returns:** Promise\<[AccessTokenData](../classes/accesstokendata.md) \| [MiniAppError](../classes/miniapperror.md)> + +Access token from native host app. + +___ + +### getContacts + +▸ **getContacts**(): Promise\<[Contact](contact.md)[]> + +*Defined in [js-miniapp-sdk/src/modules/user-info.ts:33](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/user-info.ts#L33)* + +Fetches the contact list from host app. +You should request the [CustomPermissionName.CONTACT_LIST](../enums/custompermissionname.md#contact_list) permission before using this method. + +**Returns:** Promise\<[Contact](contact.md)[]> + +Contact list in the host app user profile. + +___ + +### getPhoneNumber + +▸ **getPhoneNumber**(): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/user-info.ts:56](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/user-info.ts#L56)* + +Fetches the Phone number of the user. + +**Returns:** Promise\ + +Phone number saved in the host app user profile. + +___ + +### getPoints + +▸ **getPoints**(): Promise\<[Points](points.md)> + +*Defined in [js-miniapp-sdk/src/modules/user-info.ts:50](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/user-info.ts#L50)* + +Fetches the points from host app. + +**Returns:** Promise\<[Points](points.md)> + +Points from native host app. + +___ + +### getProfilePhoto + +▸ **getProfilePhoto**(): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/user-info.ts:26](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/user-info.ts#L26)* + +Fetches the profile photo URI from host app. +You should request the [CustomPermissionName.PROFILE_PHOTO](../enums/custompermissionname.md#profile_photo) permission before using this method. + +**Returns:** Promise\ + +Profile photo saved in the host app user profile. + +___ + +### getUserName + +▸ **getUserName**(): Promise\ + +*Defined in [js-miniapp-sdk/src/modules/user-info.ts:19](https://github.com/rakutentech/js-miniapp/blob/e6e9208/js-miniapp-sdk/src/modules/user-info.ts#L19)* + +Fetches the username from host app. +You should request the [CustomPermissionName.USER_NAME](../enums/custompermissionname.md#user_name) permission before using this method. + +**Returns:** Promise\ + +Username saved in the host app user profile. diff --git a/docs/1.21/index.md b/docs/1.21/index.md new file mode 100644 index 00000000..e2fac61e --- /dev/null +++ b/docs/1.21/index.md @@ -0,0 +1,1522 @@ +# Mini App JS SDK + +The Mini App SDK for JavaScript can be used to access Android/iOS device and App specific features from a Mini App. It is intended to be used in conjunction with the [Android Mini App SDK](https://github.com/rakutentech/android-miniapp) and [iOS Mini App SDK](https://github.com/rakutentech/ios-miniapp). + +[JS SDK Developer documentation](https://rakutentech.github.io/js-miniapp/docs/1.20/) + +## Table of Contents +{:.no_toc} + +* Table of contents +{:toc} + + +## Getting Started + +
+
+ +This SDK can be used either as an NPM module or via the bundled script file. + +### Usage as NPM module + +The SDK package can be installed in your project from the NPM registry: + +``` +npm install js-miniapp-sdk +``` + +And then it can be used as an import in your project: + +```javascript +import MiniApp from "js-miniapp-sdk"; + +MiniApp.getMessagingUniqueId() + .then(id => { + // ... +``` + +### Usage via bundled script + +You can alternatively use the bundled script file to use the SDK. When using the bundled script file, a global `MiniApp` object will be available for using the SDK. + +First, download the bundled script file from the [releases page](https://github.com/rakutentech/js-miniapp/releases). You can then include it as a normal ` +``` + +Then you can acces the SDK methods via `window.MiniApp.default`. + +```javascript +window.MiniApp.default.getMessagingUniqueId() + .then(id => { + // ... +``` +
+ + +## Mini App Manifest + +
+
+ +There is a manifest for each mini app. The manifest provides the info for Android/iOS SDK to handle the mini app so the mini app developer should understand the structure and data type of manifest. + +The manifest contains: + +- Required permissions +- Optional permissions +- Access token permissions +- Custom metadata + +Here is the example of manifest. You can also see [it](https://github.com/rakutentech/js-miniapp/blob/master/js-miniapp-sample/public/manifest.json) in our sample app. + +```javascript +{ + // The mini app should use "reqPermissions" for setting which permissions it requires. + // These permissions will be requested by the host app before launching and downloading the mini app. + // The user MUST accept these permissions before the mini app can be launched. + "reqPermissions": [ + { + "name": "rakuten.miniapp.user.USER_NAME", + "reason": "Describe your reason here (optional)." + }, + { + "name": "rakuten.miniapp.user.PROFILE_PHOTO", + "reason": "Describe your reason here (optional)." + } + ], + // The mini app should use "optPermissions" for setting which permissions it will optionally use. + // These permissions will be requested by the host app before launching and downloading the mini app. + // The user can choose to either accept or deny these permissions before the mini app is launched. + "optPermissions": [ + { + "name": "rakuten.miniapp.user.CONTACT_LIST", + "reason": "Describe your reason here (optional)." + }, + { + "name": "rakuten.miniapp.device.LOCATION", + "reason": "Describe your reason here (optional)." + } + ], + // For access tokens, can define which "audience" and "scopes" you would like permission to use + "accessTokenPermissions": [ + { + "audience": "rae", + "scopes": ["idinfo_read_openid", "memberinfo_read_point"] + }, + { + "audience": "api-c", + "scopes": ["your_service_scope_here"] + } + ], + // The Host App can require additional keys that the mini app developer must set + "customMetaData": { + "exampleKey": "test" + } +} +``` +
+ + +## Mini App Features + +- [Retrieve a unique ID](#retrieve-a-unique-id) +- [Get Phone Number](#get-phone-number) +- [Request Permissions](#request-permissions) +- [Show Ads](#show-ads) +- [Share info](#share-info) +- [Events](#mini-app-events) +- [Requesting User details](#requesting-user-details) +- [Set Screen orientation](#set-screen-orientation) +- [Send Message](#send-message) +- [Set Close alert info](#set-close-alert) +- [Universal Bridge](#universal-bridge) +- [Close Mini app](#close-miniapp) +- [In-App Purchases](#in-app-purchases) +- [Get Points](#get-points) +- [Check Platform - Android/iOS](#get-platform) +- [Host Environment Info](#get-host-info) +- [Download file](#download-file) +- [Secure storage](#secure-storage) +- [Host app theme colors](#host-theme-colors) +- [isDarkMode](#dark-mode) +- [Send Analytics](#send-analytics) +- [Get Cookies](#get-cookies) +- [MiniApp Storage](#miniapp-storage) +- [MiniApp Finished Loading](#miniapp-finished-loading) +- [Get Feature list](#get-feature-list) +- [Can open App Deeplink](#can-open-app-deeplink) +- [App supports deeplink](#is-app-deeplink-supported) + + +## User details + +### Retrieve a unique ID + +
+
+ +1. getUniqueId() - This method is deprecated from 2.0 and renamed to getMauid() + + **API:** [MiniAppFeatures.getUniqueId](api/interfaces/miniappfeatures.md#getuniqueid) + + You can retrieve a unique ID which was generated by the Android or iOS App to represent the user of the mini app: + + ```javascript + import MiniApp from 'js-miniapp-sdk'; + + MiniApp + .getUniqueId() + .then(id => { + console.log(id); + }) + .catch(error => { + console.error(error); + }); + ``` + +2. getMauid() - This method is replaced with the getUniqueId() + + **API:** [MiniAppFeatures.getmauid](api/interfaces/miniappfeatures.md#getmauid) + + You can retrieve a unique ID which was generated by the Android or iOS App to represent the user of the mini app: + + ```javascript + import MiniApp from 'js-miniapp-sdk'; + + MiniApp + .getMauid() + .then(id => { + console.log(id); + }) + .catch(error => { + console.error(error); + }); + ``` + +3. getMessagingUniqueId() - This method is used to retrieve a Unqiue ID that can be used for messages. + + **API:** [MiniAppFeatures.getmessaginguniqueid](api/interfaces/miniappfeatures.md#getmessaginguniqueid) + + + ```javascript + import MiniApp from 'js-miniapp-sdk'; + + MiniApp + .getMauid() + .then(id => { + console.log(id); + }) + .catch(error => { + console.error(error); + }); + ``` + +
+3. getPhoneNumber() - This method is used to retrieve phone number of the user. + + **API:** [MiniAppFeatures.getphonenumber](api/interfaces/miniappfeatures.md#getphonenumber) + + ```javascript + import MiniApp from 'js-miniapp-sdk'; + + MiniApp.user + .getPhoneNumber() + .then(number => { + console.log(number); + }) + .catch(error => { + console.error(error); + }); + ``` + + + +## Request Permissions + +
+
+ +There must be permission requests from miniapp to access some mobile components and data. Users can revoke a permission at any time, so you must always request the permission every time before you use the associated API. Note that accepted permissions are cached, so if a User has already accepted a permission then they will not be shown the permission dialog again unless they manually revoke the permission. + +There are two types of permissions: + +- [**Custom permissions:**](#custom-permissions) Access User data or device features which the Host App controls. Displays Host App's custom permission dialog. +- [**Device permissions:**](#device-permissions) Access device features. Displays Android/iOS platform permission dialog. + +Mini app developer can define which permissions are required and optional in mini app manifest. You do not need to request permission when declaring them as required type. + +#### Custom Permissions + +**API:** [MiniAppFeatures.requestCustomPermissions](api/interfaces/miniappfeatures.md#requestcustompermissions), +[CustomPermissionName](api/enums/custompermissionname.md), +[CustomPermissionStatus](api/enums/custompermissionstatus.md) + +These permissions are related to accessing the User data or device features which the Host App controls, and the Host App will display a custom permission dialog. Multiple permissions can be requested at once. These permissions should be requested before you attempt to access the User's data or certain device features. + +These permissions are requested using the [MiniAppFeatures.requestCustomPermissions](api/interfaces/miniappfeatures.md#requestcustompermissions) method. + +| Permission Name | Description | +| ------------------------------------ | --------------------------------------------------------------- | +| `CustomPermissionName.USER_NAME` | Grant access to the User's name. | +| `CustomPermissionName.PROFILE_PHOTO` | Grant access to the user's Profile Photo. | +| `CustomPermissionName.CONTACT_LIST` | Grant access to the user's contact list. | +| `CustomPermissionName.ACCESS_TOKEN` | Grant access to the a user's access token. | +| `CustomPermissionName.LOCATION` | Grant access to the device's location (custom permission only). | +| `CustomPermissionName.SEND_MESSAGE` | Allow miniapp to send message to specific contact via hostapp. | +| `CustomPermissionName.POINTS` | Allow miniapp to retrieve points. | +| `CustomPermissionName.FILE_DOWNLOAD` | Allow miniapp to download files. | + +##### Usage example + +```javascript +import MiniApp, { + CustomPermissionResult, + CustomPermissionName, +} from 'js-miniapp-sdk'; + +MiniApp + .requestCustomPermissions([ + { + name: CustomPermissionName.USER_NAME, + description: 'This text will be shown to the user.', + }, + { + name: CustomPermissionName.PROFILE_PHOTO, + description: 'This text will be shown to the user.', + }, + { + name: CustomPermissionName.CONTACT_LIST, + description: 'This text will be shown to the user.', + }, + { + name: CustomPermissionName.ACCESS_TOKEN, + description: 'This text will be shown to the user.', + }, + { + name: CustomPermissionName.LOCATION, + description: 'This text will be shown to the user.', + }, + { + name: CustomPermissionName.SEND_MESSAGE, + description: 'This text will be shown to the user.', + }, + { + name: CustomPermissionName.POINTS, + description: 'This text will be shown to the user.', + }, + { + name: CustomPermissionName.FILE_DOWNLOAD, + description: 'This text will be shown to the user.', + }, + ]) + .then(result => { + const allowed = result + .filter( + permission => permission.status === CustomPermissionResult.ALLOWED + ) + .map(permission => permisssion.name); + + if (allowed.indexOf(CustomPermissionName.USER_NAME) > -1) { + // Access and use the User Name data + } + }) + .catch(error => { + console.error(error); // An error occured + }); +``` + +#### Device Permissions + +**API:** [MiniAppFeatures.requestLocationPermission](api/interfaces/miniappfeatures.md#requestlocationpermission) + +These permissions are for accessing device features, and they will display a platform-specific dialog which is controlled by the Android or iOS operating system. Device permissions can only be requested one at a time. + +Each device permission is requested using a specific method for that permission. Device permissions also have an associated [Custom permissions](#custom-permissions), so you should first request the custom permission before requesting the device permission. However, if you did not request the custom permission first, then the method will automatically request the custom permission from the user. + +| Permission Method | Description | +| ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------- | +| [`requestLocationPermission`](api/interfaces/miniappfeatures.md#requestlocationpermission) | Grant access to the device location (both device permission & custom permission). | + +##### Usage example + +```javascript +// Location Permission +import MiniApp from 'js-miniapp-sdk'; + +MiniApp + .requestLocationPermission('This description will be shown to the user.') + .then(success => { + console.log(success); // Allowed. + }) + .catch(error => { + console.error(error); // Permission is not granted due to many circumstances. + }); +``` + + + + +## Show Ads + +
+
+ +**API:** [Ad.loadInterstitialAd](api/interfaces/ad.md#loadinterstitialad), +[Ad.loadRewardedAd](api/interfaces/ad.md#loadrewardedad), +[Ad.showInterstitialAd](api/interfaces/ad.md#showinterstitialad), +[Ad.showRewardedAd](api/interfaces/ad.md#showrewardedad), +[Reward](api/interfaces/reward.md) + +Mini App SDK allows you to display ads upon requesting from a Mini App with an ad unit id. +This requires you to first load an Ad by passing an ID. You can then display an Ad in the Ad Unit by passing the same ID which was used for loading. + +Note that typically you should load your Ads at some point earlier than you intend to use them, such as at App launch time. You can also pre-load multiple Ads by calling `MiniApp.loadInterstialAd` or `MiniApp.loadRewardedAd` multiple times. + +Currently two ad types are supported, + +1. Interstitial +2. Rewarded + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +const adUnitID = 'xxx-xxx-xxxxxxxxxxxxx'; + +MiniApp + .loadInterstitialAd(adUnitID) + .then(response => { + MiniApp + .showInterstitialAd(adUnitID) + .then(response => console.log(response)) + .catch(error => console.error(response)); + }) + .catch(error => console.error(response)); +``` + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +const adUnitID = 'xxx-xxx-xxxxxxxxxxxxx'; + +MiniApp + .loadRewardedAd(adUnitID) + .then(response => { + MiniApp + .showRewardedAd(adUnitID) + .then(response => console.log(response)) + .catch(error => console.error(response)); + }) + .catch(error => console.error(response)); +``` + +
+ +## Events + +Mini app can listen to the following events that will be sent/triggered by the Hostapp/Native SDKs to Mini app. +
+
+ +### Mini App Events + +**API:** [MiniAppEvents](api/enums/MiniAppEvents.md) + +These `MiniAppEvents` events are more live Mini app life cycle events that will be broadcast when a event occurs + +- EXTERNAL_WEBVIEW_CLOSE +- PAUSE +- RESUME + +
Click here to see the Code snippet + + + ```javascript + window.addEventListener(MiniAppEvents.EXTERNAL_WEBVIEW_CLOSE, function (e) { + // To-do + }); + ``` + +
+ +### Keyboard events +**API:** [MiniAppKeyboardEvents](api/enums/MiniAppKeyboardEvents.md) + +These `MiniAppKeyboardEvents` events will be triggered when a keyboard is shown or dismissed + +- KEYBOARDSHOWN +- KEYBOARDHIDDEN + +
Click here to see the Code snippet + + + ```javascript + import MiniApp from 'js-miniapp-sdk'; + + window.addEventListener(MiniAppKeyboardEvents.KEYBOARDSHOWN, function (e) { + // To-do + }); + ``` + +
+ +### Host app events Available from v1.16.0 +**API:** [HostAppEvents](api/enums/HostAppEvents.md) + +These `HostAppEvents` will be triggered when the host app wants to notify something to the Mini app + +- RECEIVE_JSON_INFO + +
Click here to see the Code snippet + + + ```javascript + import MiniApp from 'js-miniapp-sdk'; + + window.addEventListener(MiniAppKeyboardEvents.RECEIVE_JSON_INFO, function (e) { + // To-do + }); + ``` + +
+ +
+ + +## Share Info + +
+
+ +**API:** [MiniAppFeatures.shareInfo](api/interfaces/miniappfeatures.md#shareinfo), + +[ShareInfoType](api/interfaces/shareinfotype.md) + +It is possible for the mini app user to share data with another App by showing the native content sharing chooser. + +The data format must match the [ShareInfoType](api/interfaces/shareinfotype.md). + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +const info = { content: inputValue }; + +MiniApp + .shareInfo(info) + .then(success => console.log(success)) + .catch(error => console.error(error)); +``` +
+ + +## Requesting User details + +
+
+ +**API:** [UserInfoProvider](api/interfaces/userinfoprovider.md) + +Please make sure that User have allowed respective custom permission before requesting the user detail. + +#### User name + +**API:** [UserInfoProvider.getUserName](api/interfaces/userinfoprovider.md#getusername), +[CustomPermissionName.USER_NAME](api/enums/custompermissionname.html#user_name) + +Returns the Username text from the Host app. + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp.user + .getUserName() + .then(userName => { + console.log(userName); + }) + .catch(error => { + console.error(error); + }); +``` + +#### Profile Photo + +**API:** [UserInfoProvider.getProfilePhoto](api/interfaces/userinfoprovider.md#getprofilephoto), +[CustomPermissionName.PROFILE_PHOTO](api/enums/custompermissionname.html#profile_photo) + +Returns the Profile Photo URI from the Host app. + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp.user + .getProfilePhoto() + .then(profilePhoto => { + console.log(profilePhoto); + }) + .catch(error => { + console.error(error); + }); +``` + +#### Contact List + +**API:** [UserInfoProvider.getContacts](api/interfaces/userinfoprovider.md#getcontacts), +[Contact](api/interfaces/contact.md), +[CustomPermissionName.CONTACT_LIST](api/enums/custompermissionname.html#contact_list) + +Returns the [Contact](api/interfaces/contact.md) list from the Host app. + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp.user + .getContacts() + .then(contacts => { + console.log(contacts); + }) + .catch(error => { + console.error(error); + }); +``` + +#### Access Token + +**API:** [UserInfoProvider.getAccessToken](api/interfaces/userinfoprovider.md#getaccesstoken), +[AccessTokenData](api/classes/accesstokendata.md), +[AccessTokenScopes](api/classes/accesstokenscopes.md), +[CustomPermissionName.ACCESS_TOKEN](api/enums/custompermissionname.html#access_token) + +You can get an access token provided by the Host App. + +There are 2 reasons your access token request can be rejected: + +- The Host App will be able to deny your request if your mini app ID is not approved to access the token. +- Your request will also be denied by the MiniApp SDK if your audience and scopes do not match the ones defined in the [Mini App Manifest](#mini-app-manifest) + +Returns the [AccessTokenData](api/interfaces/accesstokendata.md) list from the Host app. + +**AccessTokenData** contains `token`,`validUntil` and `scopes` details. + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp.user + .getAccessToken('TOKEN_AUDIENCE', ['TOKEN_SCOPE1', 'TOKEN_SCOPE2']) + .then(data => { + const isValid = data.validUntil.getTime() >= Date.now(); + if (isValid) { + const token = data.token; + // Use token + } + }) + .catch(error => console.error(error)); +``` +
+ + +## Set screen orientation + +
+
+ +**API:** [MiniAppFeatures.setScreenOrientation](api/interfaces/miniappfeatures.md#setscreenorientation), +[ScreenOrientation](api/enums/screenorientation.md) + +It is possible to change and lock device screen orientation. +However, there is no guarantee that all hostapps and device OS allow the force screen change so MiniApp should not rely on this. + +The support screen change cases are defined as [ScreenOrientation](api/enums/screenorientation.md). +After finish locking, the miniapp can release the lock and grant back the normal orientation controller to device. Please use `ScreenOrientation.LOCK_RELEASE` + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp + .setScreenOrientation(ScreenOrientation.LOCK_LANDSCAPE) // or LOCK_PORTRAIT, LOCK_RELEASE. + .then(success => { + console.log(success); + }) + .catch(error => { + console.error(error); + }); +``` + +
+ + +## Send message + +
+
+ +**API:** [ChatServiceProvider](api/interfaces/chatserviceprovider.md) +[MessageToContact](api/interfaces/messagetocontact.md) + +#### Send message to the single contact + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp.chatService + .sendMessageToContact(messageToContact) + .then(contactId => { + // contact id string. + console.log(contactId); + }) + .catch(error => { + console.error(error); + }); +``` + +#### Send message by contact id + +Please make sure that User have allowed message sending custom permission before sending message to specific contact. + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp.chatService + .sendMessageToContactId(id, messageToContact) + .then(contactId => { + console.log(contactId); + }) + .catch(error => { + console.error(error); + }); +``` + +#### Send message to multiple contacts + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp.chatService + .sendMessageToMultipleContacts(messageToContact) + .then(contactIds => { + // contact id string array. + console.log(contactIds); + }) + .catch(error => { + console.error(error); + }); +``` + + +
+ +### Open device camera + +
+
+ +Please make sure that `capture` attribute is available, it will open device camera from miniapp. + +```html + + ... +
+ + +
+ ... + +``` + + +
+ +
+ +## Set Close alert Available from v1.15.0 + +**API:** [MiniApp.miniappUtils.setCloseAlert](api/interfaces/miniapputilsprovider.html#setclosealert) + +
+
+When a Mini app is closed, you can set the close confirmation popup which the host app can show before closing the miniapp. Host app can decide whether to show/hide the confirmation popup before closing the miniapp. + + + ```javascript + import MiniApp from 'js-miniapp-sdk'; + + const alertInfo: CloseAlertInfo = { + shouldDisplay: true, + title: "Info", + description: "Would you like to close the miniapp?", + }; + MiniApp.miniappUtils + .setCloseAlert(alertInfo) + .then(() => { + }) + .catch((error) => { + }); + }); + ``` + +
+ +
+ +## Universal Bridge Available from v1.16.0 + +**API:** [MiniApp.universalBridge.sendJsonToHostapp](api/interfaces/universalbridgeprovider.html#sendjsontohostapp) + +
+
+ +MiniApp users can send any JSON/String from MiniApp to HostApp as well as receive any JSON/String from HostApp to MiniApp. + +### Send a JSON/String from MiniApp to HostApp + +Please use the following example in the MiniApp: + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +const inputValue = '{"data":"This is a sample json information"}'; +const info = { content: inputValue }; +MiniApp.universalBridge + .sendJsonToHostapp(info) + .then(success => { + console.log(success); + }) + .catch(error => { + console.error(error); + }); +``` + +### Send a UniversalBridgeInfo from MiniApp to HostApp Available from v1.18.0 + +Please use the following example in the MiniApp: + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +const info: UniversalBridgeInfo = { + key: "launch", + value: "deeplinkurl", + description: "Description of the info that is passed", +}; + +const info = { content: inputValue }; + +MiniApp.universalBridge + .sendInfoToHostapp(info) + .then(success => { + console.log(success); + }) + .catch(error => { + console.error(error); + }); +``` + +#### Receive a JSON/String from HostApp to MiniApp + +Please use the following example in the MiniApp: + +```javascript +import HostAppEvents from 'js-miniapp-sdk'; + +window.addEventListener(HostAppEvents.RECEIVE_JSON_INFO, function(e) { + let message = e.detail.message; + console.log(message); +}); +``` + + +
+ +
+ +## Close miniapp Available from v1.16.0 + +
+
+ +When the miniapp want's to close, they can use this interface to close by itself. Calling this interface, it would let know the host app know that the miniapp wants to close. Host app can decide if it can proceed with the flow. + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp.miniappUtils.closeMiniApp(true).catch((error) => { +}); +``` + + +
+ +
+ + +## In-App Purchases + +You can perform the in-app purchases for the products available for In-App Purchases associated with Google Play™. + +### Get all products list +This will retrieve the list of products details available for In-App Purchase associated with Google Play™. +This will return only the list of products associated with Mini app in the platform + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp.purchases + .getAllProducts() + .then((success) => { + console.log(success); + }) + .catch((error) => { + console.error(error); + }); +``` + +### Purchase a product with product id +This will request for the In-app Purchase of a product with product id associated with Google Play™. +Returns the PurchasedProduct object with transaction details. +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp.purchases + .purchaseProductWith(productId) + .then((success) => { + console.log(success); + }) + .catch((error) => { + console.error(error); + }); +``` + +### Consume a purchase +This will request to Consume the product that is purchased using the purchaseProductWith API +Returns the PurchasedProduct object with transaction details. +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp.purchases + .consumePurchaseWith(productId, transactionId) + .then((success) => { + console.log(success); + }) + .catch((error) => { + console.error(error); + }); +``` + +
+ +## Get Points + +
+
+ +Host app can send any generic Point related information using this interface + +### getPoints() +**API:** [MiniAppFeatures.getPoints](api/interfaces/miniappfeatures.md#getpoints) + +MiniApp need to call [getPoints](api/interfaces/miniappfeatures.md#getpoints) interface to retrieve [Points](api/interfaces/points.html) + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp.user + .getPoints() + .then((points) => { + console.log(points); + }) + .catch((error) => { + console.error(error); + }); +``` + + +
+ +
+ +## Check Android/iOS device + +
+
+ +**API:** [Platform.getPlatform](api/enums/platform.html#getplatform) + +You can detect whether your mini app is running on an Android/iOS by using + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +const platform = MiniApp.getPlatform(); +//platform value here can be `Android`, `iOS` or `Unknown`. +``` + +When it is not running by Android/iOS, the return value is `Unknown`. + + +
+ +
+ +## Get Host application info + +
+
+ +**API:** [MiniAppFeatures.getHostEnvironmentInfo](api/interfaces/miniappfeatures.html#gethostenvironmentinfo) + +Native host application can share the information such as Locale, Host app version, Host app Build type, SDK version, device token and push token using this interface. Miniapp can fetch these information using the following interface which will get [HostEnvironmentInfo](api/interfaces/hostenvironmentinfo.html) as a promise. + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp + .getHostEnvironmentInfo() + .then((info) => { + console.log(info); + }) + .catch((error) => { + console.error(error); + }); +``` + + +
+ +
+ +## Download File + +
+
+ +**API:** [MiniAppFeatures.downloadFile](api/interfaces/miniappfeatures.html#downloadfile) + +Request to download a file and save to the user's device, by providing a valid fileName, URL and headers (if required). + +```javascript +import MiniApp from 'js-miniapp-sdk'; + + MiniApp + .downloadFile(fileName, url, { token: 'test' }) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.log('FileDownload Error:', error); + }); +``` + + + +
+ +
+ +## Secure Storage + +
+
+ + +**API:** [SecureStorageProvider](api/interfaces/securestorageprovider.html) + +1. [onReady](api/interfaces/securestorageprovider.html#onready) + + Register/Subscribe to onReady event. Host app will send the event to Miniapp when the storage is ready + + ```javascript + import MiniApp from 'js-miniapp-sdk'; + + MiniApp.secureStorageService.onReady(() => { + // Event triggered when the storage is ready + }); + ``` + +2. [onLoadError](api/interfaces/securestorageprovider.html#onloaderror) + + Register/Subscribe to onLoadError event. Host app will send the event to Miniapp when the storage is not loaded + + ```javascript + import MiniApp from 'js-miniapp-sdk'; + + MiniApp.secureStorageService.onLoadError((error) => { + console.log(error) + // Event triggered when the storage is not loaded + }); + ``` + +3. [size](api/interfaces/securestorageprovider.html#size) + + Miniapp can retrieve the storage size i.e max size and used size for a Miniapp using the below interface. + It returns MiniAppSecureStorageSize as a promise. + + ```javascript + import MiniApp from 'js-miniapp-sdk'; + + MiniApp.secureStorageService + .size() + .then((storageSize) => { + console.log(storageSize); + }) + .catch((error) => { + console.log(error); + }); + ``` + +4. [setItems](api/interfaces/securestorageprovider.html#setItems) + + If a Miniapp has available free space, you can store the values using the folowing interface. Please note the items which is set should of MiniAppSecureStorageKeyValues type + + ```javascript + import MiniApp from 'js-miniapp-sdk'; + + MiniApp.secureStorageService + .setItems(items) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.log(error); + }); + ``` + +5. [getItem](api/interfaces/securestorageprovider.html#getItems) + + You can retrieve a value for a key using the below interface. As of now we are not supporting buld retrieval. + + ```javascript + import MiniApp from 'js-miniapp-sdk'; + + MiniApp.secureStorageService + .getItem(key) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.log(error); + }); + ``` + +6. [removeItems](api/interfaces/securestorageprovider.html#removeItems) + + List of keys that you want be removed from the storage + + ```javascript + import MiniApp from 'js-miniapp-sdk'; + + MiniApp.secureStorageService + .removeItems(keys) + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.log(error); + }); + ``` + +7. [clear](api/interfaces/securestorageprovider.html#clear) + + The following interface will help you to clear all the data that is stored using the above interfaces. + + ```javascript + import MiniApp from 'js-miniapp-sdk'; + + MiniApp.secureStorageService + .clear() + .then((response) => { + console.log(response); + }) + .catch((error) => { + console.log(error); + }); + ``` + +
+ +
+ +## Host app Theme colors Available from v1.18.0 + +
+
+ +**API:** [MiniApp.miniappUtils.getHostAppThemeColors](api/interfaces/miniapputilsprovider.html#getHostAppThemeColors) + +Host app uses different themes and if the Miniapp would like to have a similar theme as Host app, it can use the following interface to get the primary and secondary colors + +Promise returns a HostThemeColor. + +```javascript +import MiniApp from 'js-miniapp-sdk'; + + MiniApp.miniappUtils + .getHostAppThemeColors() + .then((info) => { + console.log(info); + }) + .catch((error) => { + console.error(error); + }); +``` + + + +
+ +
+ +## Dark Mode Available from v1.18.0 + +
+
+ +**API:** [Platform.isDarkMode](api/interfaces/miniapputilsprovider.html#isDarkMode) + +Using the following interface the Host app can let the Miniapp know if it is Dark mode or not. + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp + .isDarkMode() + .then((boolean) => { + console.log(boolean); + }) + .catch((error) => { + console.error(error); + }); +``` + +
+ +
+ +## Send Analytics to Host app Available from v1.18.0 + +You can use the following interface to send analytics to Host app. Host app can use this data to record them to any server. + +```javascript +import MiniApp from 'js-miniapp-sdk'; + + const analyticsInfo: MAAnalyticsInfo = { + eventType: MAAnalyticsEventType.appear, + actionType: MAAnalyticsActionType.open, + pageName: "Home", + componentName: "Page", + elementType: "Tab", + data: "AnyData", + }; + + MiniApp.miniappUtils.sendAnalytics(analyticsInfo); +``` + +
+ +## MiniApp Finished Loading Available from v1.20.0 + +
+
+ +**API:** [Platform.miniAppFinishedLoading](api/interfaces/miniapputilsprovider.html#miniAppFinishedLoading) + +Using the following interface the Miniapp can notify the host app that it has finished loading. + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp.miniappUtils + .miniAppFinishedLoading() + .then((response) => { + console.log(response); + }) + .catch((miniAppError) => { + console.log('miniAppFinishedLoading - Error: ', miniAppError); + }); +``` + +
+ +
+ +## Get Cookies from host application Available from v1.19.0 + +You can use the following interface to get all Cookies from Host app using the following interface + +```javascript +import MiniApp from 'js-miniapp-sdk'; + + MiniApp.cookieManager + .getAllCookies() + .then((response) => { + // Response will be [CookieInfo] + console.log(response); + }) + .catch((error) => { + console.log(error); + }); + +``` + +You can also request the host app to provide specific cookies by sharing the list of keys as `string[]` + +```javascript +import MiniApp from 'js-miniapp-sdk'; + + MiniApp.cookieManager + .getCookies(['user-token', `user-last-session`]) + .then((response) => { + // Response will be [CookieInfo] + console.log(response); + }) + .catch((error) => { + console.log(error); + }); + +``` + +
+ +## MiniApp storage using Key/Value Available from v1.20.0 + +We already have a [Secure storage](#secure-storage) that uses database for storing any data from MiniApp. It is recommended for MiniApps that wants to store huge data. + +If MiniApp wants to use any storage that is lightweight, then they can use the following interfaces. +Android uses Shared Preferences and iOS uses UserDefaults for the interfaces below, + + +
+
+ + +**API:** [MiniappPreferenceProvider](api/interfaces/miniapppreferenceprovider.html) + +1. [set](api/interfaces/miniapppreferenceprovider.html#set) + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp.preferences + .set(key, value) + .then((response) => { + // String response sent from Host app when the value set is successfull + console.log(response); + }) + .catch((error) => { + console.log(error); + }); + +``` + +2. [get](api/interfaces/miniapppreferenceprovider.html#get) + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp.preferences + .get(key) + .then((response) => { + // Value that is stored for a given key + console.log(response); + }) + .catch((error) => { + console.log(error); + }); + +``` + +3. [remove](api/interfaces/miniapppreferenceprovider.html#remove) + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp.preferences + .remove(key) + .then((response) => { + // String response sent from Host app when the remove is successfull + console.log(response); + }) + .catch((error) => { + console.log(error); + }); + +``` + +4. [clearMiniAppPreferences](api/interfaces/miniapppreferenceprovider.html#clearminiapppreferences) + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp.preferences + .clearMiniAppPreferences(key) + .then((response) => { + // String response sent from Host app when the clearing preferences is successfull + console.log(response); + }) + .catch((error) => { + console.log(error); + }); + +``` + + +
+ +## Get feature list Available from v1.20.0 + +This interface will help the MiniApps to get the list of features that is supported by the MiniApp native SDK also with the list of other features that is supported by the Host app + +```javascript +import MiniApp from 'js-miniapp-sdk'; + +MiniApp.miniappUtils + .getFeatureList() + .then((response) => { + // Array of strings/features that is supported + // For eg., ["GET_USERNAME", "IS_DARK_MODE", "GET_ALL_COOKIES"] + console.log(response); + }) + .catch((error) => { + console.log(error); + }); + +``` + +