capacitor-mindbox-sdk
v0.0.1
Published
Mindbox SDK
Downloads
1
Readme
capacitor-mindbox-sdk
Mindbox SDK
Install
npm install capacitor-mindbox-sdk
npx cap sync
API
echo(...)
initialize(...)
getDeviceUUID()
getToken()
updateToken(...)
registerInAppCallbacks(...)
executeAsyncOperation(...)
executeSyncOperation(...)
setLogLevel(...)
getSdkVersion()
pushDelivered(...)
updateNotificationPermissionStatus(...)
- Interfaces
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>
| Param | Type |
| ------------- | ------------------------------- |
| options
| { value: string; } |
Returns: Promise<{ value: string; }>
initialize(...)
initialize(options: InitializationData) => Promise<void>
| Param | Type |
| ------------- | ----------------------------------------------------------------- |
| options
| InitializationData |
getDeviceUUID()
getDeviceUUID() => Promise<{ deviceUUID: string; }>
Returns: Promise<{ deviceUUID: string; }>
getToken()
getToken() => Promise<{ token: string; }>
Returns: Promise<{ token: string; }>
updateToken(...)
updateToken(options: { token: string; }) => Promise<void>
| Param | Type |
| ------------- | ------------------------------- |
| options
| { token: string; } |
registerInAppCallbacks(...)
registerInAppCallbacks(callbacks: InAppCallback[]) => Promise<void>
| Param | Type |
| --------------- | ---------------------------- |
| callbacks
| InAppCallback[] |
executeAsyncOperation(...)
executeAsyncOperation(options: ExecuteAsyncOperationPayload) => Promise<void>
| Param | Type |
| ------------- | ------------------------------------------------------------------------------------- |
| options
| ExecuteAsyncOperationPayload |
executeSyncOperation(...)
executeSyncOperation(options: ExecuteSyncOperationPayload) => Promise<any>
| Param | Type |
| ------------- | ----------------------------------------------------------------------------------- |
| options
| ExecuteSyncOperationPayload |
Returns: Promise<any>
setLogLevel(...)
setLogLevel(options: { level: number; }) => Promise<void>
| Param | Type |
| ------------- | ------------------------------- |
| options
| { level: number; } |
getSdkVersion()
getSdkVersion() => Promise<{ sdkVersion: string; }>
Returns: Promise<{ sdkVersion: string; }>
pushDelivered(...)
pushDelivered(options: { uniqKey: string; }) => Promise<void>
| Param | Type |
| ------------- | --------------------------------- |
| options
| { uniqKey: string; } |
updateNotificationPermissionStatus(...)
updateNotificationPermissionStatus(options: { granted: boolean; }) => Promise<void>
| Param | Type |
| ------------- | ---------------------------------- |
| options
| { granted: boolean; } |
Interfaces
InitializationData
| Prop | Type |
| -------------------------------- | -------------------- |
| domain
| string |
| endpointId
| string |
| subscribeCustomerIfCreated
| boolean |
| shouldCreateCustomer
| boolean |
| previousInstallId
| string |
| previousUuid
| string |
InAppCallback
| Method | Signature | | -------------------- | ------------------------------------------------------------- | | getName | () => string | | onInAppClick | (id: string, redirectUrl: string, payload: string) => void | | onInAppDismissed | (id: string) => void |
ExecuteAsyncOperationPayload
| Prop | Type |
| ------------------------- | ------------------- |
| operationSystemName
| string |
| operationBody
| any |
ExecuteSyncOperationPayload
| Prop | Type |
| ------------------------- | -------------------------------------- |
| operationSystemName
| string |
| operationBody
| any |
| onSuccess
| (data: any) => void |
| onError
| ((error: any) => void) |