mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
MobileMessagingCordova (#43763)
* MobileMessagingCordova: add CustomEvents support * MobileMessagingCordova: fix lint * MobileMessagingCordova: change version * MobileMessaging: fix header Co-authored-by: Konstantin Latypov <Konstantin.Latypov@infobip.com>
This commit is contained in:
39
types/mobile-messaging-cordova/index.d.ts
vendored
39
types/mobile-messaging-cordova/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for non-npm package mobile-messaging-cordova-plugin 1.2
|
||||
// Type definitions for non-npm package mobile-messaging-cordova-plugin 1.3
|
||||
// Project: https://github.com/infobip/mobile-messaging-cordova-plugin
|
||||
// Definitions by: kostap13 <https://github.com/kostap13>,
|
||||
// tjuric <https://github.com/tjuric>
|
||||
@@ -166,6 +166,43 @@ declare namespace MobileMessagingCordova {
|
||||
|
||||
off(event: Event, handler: (message: Message) => void): void;
|
||||
|
||||
/**
|
||||
* Sends an event to the server eventually, handles possible errors and do retries for you.
|
||||
*
|
||||
* @param eventData. An object containing event data
|
||||
* {
|
||||
* definitionId: "eventDefinitionId"
|
||||
* properties: {
|
||||
* "stringAttribute": "string",
|
||||
* "numberAttribute": 1,
|
||||
* "dateAttribute": "2020-02-26T09:41:57Z",
|
||||
* "booleanAttribute": true
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
submitEvent(eventData: CustomEvent): void;
|
||||
|
||||
/**
|
||||
* Sends an event to the server immediately.
|
||||
* You have to handle possible connection or server errors, do retries yourself.
|
||||
*
|
||||
* @param eventData. An object containing event data
|
||||
* {
|
||||
* definitionId: "eventDefinitionId"
|
||||
* properties: {
|
||||
* "stringAttribute": "string",
|
||||
* "numberAttribute": 1,
|
||||
* "dateAttribute": "2020-02-26T09:41:57Z",
|
||||
* "booleanAttribute": true
|
||||
* }
|
||||
* }
|
||||
* @param callback will be called on result
|
||||
* @param errorCallback will be called on error, you have to handle error and do retries yourself
|
||||
*/
|
||||
submitEventImmediately(eventData: CustomEvent,
|
||||
callback: () => void,
|
||||
errorCallback: () => void): void;
|
||||
|
||||
/**
|
||||
* Saves user data to the server.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user