indigitall-capacitor-plugin 2.0.6 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/IndigitallCapacitorPlugin.podspec +1 -1
- package/README.md +28 -4
- package/android/build.gradle +3 -3
- package/android/src/main/AndroidManifest.xml +2 -2
- package/android/src/main/java/com/indigitall/capacitor/IndigitallCpPlugin.java +45 -57
- package/android/src/main/java/com/indigitall/capacitor/IndigitallInAppPlugin.java +104 -46
- package/android/src/main/java/com/indigitall/capacitor/implementations/CustomerCp.java +7 -7
- package/android/src/main/java/com/indigitall/capacitor/implementations/InAppCp.java +52 -13
- package/android/src/main/java/com/indigitall/capacitor/implementations/IndigitallCp.java +88 -23
- package/android/src/main/java/com/indigitall/capacitor/models/CpIndigitallHiddenActivity.java +3 -3
- package/android/src/main/java/com/indigitall/capacitor/models/CpPushNotification.java +12 -7
- package/android/src/main/java/com/indigitall/capacitor/services/IndigitallFirebaseMessagingService.java +3 -3
- package/android/src/main/java/com/indigitall/capacitor/utils/CpIndigitallUtils.java +4 -4
- package/android/src/main/java/com/indigitall/capacitor/utils/IndigitallInAppParse.java +49 -32
- package/android/src/main/java/com/indigitall/capacitor/utils/IndigitallParse.java +15 -82
- package/dist/docs.json +22 -2
- package/dist/esm/InApp.js +290 -85
- package/dist/esm/InApp.js.map +1 -1
- package/dist/esm/Push.js +11 -3
- package/dist/esm/Push.js.map +1 -1
- package/dist/esm/callbacks/callbacksType.d.ts +4 -1
- package/dist/esm/callbacks/callbacksType.js.map +1 -1
- package/dist/esm/definitions/customerDefinitions.d.ts +2 -2
- package/dist/esm/definitions/customerDefinitions.js.map +1 -1
- package/dist/esm/definitions/inAppDefinitions.d.ts +13 -3
- package/dist/esm/definitions/inAppDefinitions.js.map +1 -1
- package/dist/esm/definitions/pushDefinitions.d.ts +7 -3
- package/dist/esm/definitions/pushDefinitions.js.map +1 -1
- package/dist/esm/models/InInApp.d.ts +1 -1
- package/dist/esm/models/InInApp.js.map +1 -1
- package/dist/esm/models/InInbox.d.ts +1 -1
- package/dist/esm/models/InInbox.js.map +1 -1
- package/dist/esm/params/customerParams.d.ts +1 -1
- package/dist/esm/params/customerParams.js.map +1 -1
- package/dist/esm/params/pushParams.d.ts +2 -0
- package/dist/esm/params/pushParams.js.map +1 -1
- package/dist/plugin.cjs.js +300 -88
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +300 -88
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/IndigitallCpPlugin.swift +11 -1
- package/ios/Plugin/implementations/CustomerCp.swift +1 -3
- package/ios/Plugin/implementations/InAppCp.swift +7 -24
- package/ios/Plugin/implementations/InboxCp.swift +9 -9
- package/ios/Plugin/implementations/IndigitallCp.swift +25 -3
- package/ios/Plugin/utils/IndigitallParse.h +1 -2
- package/ios/Plugin/utils/IndigitallParse.m +41 -21
- package/package.json +1 -1
package/dist/esm/Push.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Push.js","sourceRoot":"","sources":["../../src/Push.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAoBjD,MAAM,YAAY,GAAG,cAAc,CAAqB,cAAc,EAAE;AACpE,gEAAgE;CACjE,CAAC,CAAC;AAEH,MAAM,UAAU,GAAqB;IACjC,IAAI,EAAE,CACF,MAAkB,EAClB,2BAAyD,EACzD,OAA6B,EAC/B,EAAE;QACA,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;YACpB,cAAc,EAAE,OAAO;YACvB,WAAW,EAAE,WAAW;SACzB,CAAC,CAAA;QACF,YAAY,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YAC9C,IAAI,2BAA2B;gBAC3B,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,o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C,KAAK,CAAC,EAAE;YACb,IAAI,OAAO;gBACP,OAAO,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC;IACD,KAAK,EAAE,CACH,UAAkB,EAClB,SAA+B,EAC/B,OAA6B,EAAE,EAAE;QACjC,YAAY,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YAC/C,IAAI,SAAS;gBACT,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;YACb,IAAI,OAAO;gBACP,OAAO,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC;IACD,MAAM,EAAE,CACJ,SAA+B,EAC/B,OAA6B,EAAE,EAAE;QACjC,YAAY,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YAClC,IAAI,SAAS;gBACT,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;YACb,IAAI,OAAO;gBACP,OAAO,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AAED,OAAO,EAAE,UAAU,EAAE,CAAA","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { \n OnIndigitallInitializedType, \n OnDeviceSuccessType,\n OnTopicSuccessType,\n OnPushSuccessType,\n OnErrorCallbackType,\n OnMessageReceivedSuccessType,\n OnTokenSuccessType,\n } from './callbacks/callbacksType';\nimport type { \n IndigitallCpPlugin, \n IndigitallPlugin\n } from './definitions/pushDefinitions';\nimport type {\n EventParams,\n InitParams,\n } from './params/pushParams';\n\nconst IndigitallCp = registerPlugin<IndigitallCpPlugin>('IndigitallCp', {\n //web: () => import('./web').then(m => new m.IndigitallCpWeb()),\n });\n\n const Indigitall: IndigitallPlugin = {\n init: (\n config: InitParams,\n onIndigitallInitializedType?: OnIndigitallInitializedType,\n onError?: OnErrorCallbackType\n ) => {\n Object.assign(config, {\n productVersion: '2.0.6',\n productName: 'capacitor',\n })\n IndigitallCp.initialize({ config }).then(onInit => {\n if (onIndigitallInitializedType)\n onIndigitallInitializedType(onInit[\"device\"], onInit[\"pushPermission\"], onInit[\"locationPermission\"]);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n deviceGet: (\n onSuccess: OnDeviceSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.deviceGet().then(response => {\n onSuccess(response.device);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n deviceEnable: (\n onSuccess?: OnDeviceSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.deviceEnable().then(response => {\n if (onSuccess)\n onSuccess(response.device);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n deviceDisable: (\n onSuccess?: OnDeviceSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.deviceDisable().then(response => {\n if (onSuccess)\n onSuccess(response.device);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n topicsList: (\n onSuccess?: OnTopicSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.topicsList().then(response => {\n if (onSuccess)\n onSuccess(response.topics);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n topicsSubscribe: (\n topics: string[],\n onSuccess?: OnTopicSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.topicsSubscribe({ topics }).then(response => {\n if (onSuccess)\n onSuccess(response.topics);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n topicsUnsubscribe: (\n topics: string[],\n onSuccess?: OnTopicSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.topicsUnsubscribe({ topics }).then(response => {\n if (onSuccess)\n onSuccess(response.topics);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n sendCustomEvent: (\n customEvent: EventParams,\n onSuccess?: () => void,\n onError?: OnErrorCallbackType) => {\n const myCustomEvent = { customEvent };\n IndigitallCp.sendCustomEvent(myCustomEvent).then(() => {\n if (onSuccess)\n onSuccess();\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n getPush: (\n onSuccess: OnPushSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.getPush(onSuccess, onError);\n },\n onIndigitallGetPush: (\n onSuccess: OnPushSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.onIndigitallGetPush(onSuccess, onError);\n },\n clearViewUrl: () => {\n IndigitallCp.clearViewUrl();\n }, \n setDefaultViewUrl: (defaultView: string) => {\n IndigitallCp.setDefaultViewUrl({defaultView});\n },\n onMessageReceived: (\n onSuccess: OnMessageReceivedSuccessType) => {\n IndigitallCp.onMessageReceived(onSuccess);\n },\n getToken: (\n onSuccess: OnTokenSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.getToken().then(response => {\n onSuccess(response.token);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n isIndigitallPushNotification: (\n notification: any,\n onSuccess: () => void,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.isIndigitallPushNotification({ notification }).then(() => {\n onSuccess();\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n logIn: (\n externalId: string,\n onSuccess?: OnDeviceSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.logIn({ externalId }).then(response => {\n if (onSuccess)\n onSuccess(response.device);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n logOut: (\n onSuccess?: OnDeviceSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.logOut().then(response => {\n if (onSuccess)\n onSuccess(response.device);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n }\n\n export { Indigitall }\n\n"]}
|
|
1
|
+
{"version":3,"file":"Push.js","sourceRoot":"","sources":["../../src/Push.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc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AAK,CAAC,EAAE;YACb,IAAI,OAAO;gBACP,OAAO,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC;IAEH,qBAAqB,EAAE,GAAG,EAAE;QACxB,YAAY,CAAC,qBAAqB,EAAE,CAAC;IACxC,CAAC;IACD,uBAAuB,EAAE,CAAC,SAA8B,EAAE,EAAE;QACxD,YAAY,CAAC,uBAAuB,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YACpD,SAAS,CAAC,QAAQ,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC;CACH,CAAA;AAED,OAAO,EAAE,UAAU,EAAE,CAAA","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { \n OnIndigitallInitializedType, \n OnDeviceSuccessType,\n OnStatusSuccessType,\n OnTopicSuccessType,\n OnPushSuccessType,\n OnErrorCallbackType,\n OnMessageReceivedSuccessType,\n OnTokenSuccessType,\n } from './callbacks/callbacksType';\nimport type { \n IndigitallCpPlugin, \n IndigitallPlugin\n } from './definitions/pushDefinitions';\nimport type {\n EventParams,\n InitParams,\n } from './params/pushParams';\n\nconst IndigitallCp = registerPlugin<IndigitallCpPlugin>('IndigitallCp', {\n //web: () => import('./web').then(m => new m.IndigitallCpWeb()),\n });\n\n const Indigitall: IndigitallPlugin = {\n init: (\n config: InitParams,\n onIndigitallInitializedType?: OnIndigitallInitializedType,\n onError?: OnErrorCallbackType\n ) => {\n Object.assign(config, {\n productVersion: '2.2.0',\n productName: 'capacitor',\n })\n IndigitallCp.initialize({ config }).then(onInit => {\n if (onIndigitallInitializedType)\n onIndigitallInitializedType(onInit[\"device\"], onInit[\"pushPermission\"], onInit[\"locationPermission\"]);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n deviceGet: (\n onSuccess: OnDeviceSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.deviceGet().then(response => {\n onSuccess(response.device);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n deviceEnable: (\n onSuccess?: OnDeviceSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.deviceEnable().then(response => {\n if (onSuccess)\n onSuccess(response.device);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n deviceDisable: (\n onSuccess?: OnDeviceSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.deviceDisable().then(response => {\n if (onSuccess)\n onSuccess(response.device);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n topicsList: (\n onSuccess?: OnTopicSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.topicsList().then(response => {\n if (onSuccess)\n onSuccess(response.topics);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n topicsSubscribe: (\n topics: string[],\n onSuccess?: OnTopicSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.topicsSubscribe({ topics }).then(response => {\n if (onSuccess)\n onSuccess(response.topics);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n topicsUnsubscribe: (\n topics: string[],\n onSuccess?: OnTopicSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.topicsUnsubscribe({ topics }).then(response => {\n if (onSuccess)\n onSuccess(response.topics);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n sendCustomEvent: (\n customEvent: EventParams,\n onSuccess?: () => void,\n onError?: OnErrorCallbackType) => {\n const myCustomEvent = { customEvent };\n IndigitallCp.sendCustomEvent(myCustomEvent).then(() => {\n if (onSuccess)\n onSuccess();\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n getPush: (\n onSuccess: OnPushSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.getPush(onSuccess, onError);\n },\n onIndigitallGetPush: (\n onSuccess: OnPushSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.onIndigitallGetPush(onSuccess, onError);\n },\n clearViewUrl: () => {\n IndigitallCp.clearViewUrl();\n }, \n setDefaultViewUrl: (defaultView: string) => {\n IndigitallCp.setDefaultViewUrl({defaultView});\n },\n onMessageReceived: (\n onSuccess: OnMessageReceivedSuccessType) => {\n IndigitallCp.onMessageReceived(onSuccess);\n },\n getToken: (\n onSuccess: OnTokenSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.getToken().then(response => {\n onSuccess(response.token);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n isIndigitallPushNotification: (\n notification: any,\n onSuccess: () => void,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.isIndigitallPushNotification({ notification }).then(() => {\n onSuccess();\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n logIn: (\n externalCode: string,\n onSuccess?: OnDeviceSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.logIn({ externalCode }).then(response => {\n if (onSuccess)\n onSuccess(response.device);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n logOut: (\n onSuccess?: OnDeviceSuccessType,\n onError?: OnErrorCallbackType) => {\n IndigitallCp.logOut().then(response => {\n if (onSuccess)\n onSuccess(response.device);\n }).catch(error => {\n if (onError)\n onError(error);\n });\n },\n\n requestPushPermission: () => {\n IndigitallCp.requestPushPermission();\n },\n getPushPermissionStatus: (onSuccess: OnStatusSuccessType) => {\n IndigitallCp.getPushPermissionStatus().then(response => {\n onSuccess(response);\n });\n }\n }\n\n export { Indigitall }\n\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Customer, CustomerField } from '../models/InCustomer';
|
|
2
2
|
import type { Device, Topic } from '../models/InDevice';
|
|
3
|
-
import type { InApp } from '../models/InInApp';
|
|
3
|
+
import type { InApp, InAppAction } from '../models/InInApp';
|
|
4
4
|
import type { Inbox, InboxNotifications, MessageCount } from '../models/InInbox';
|
|
5
5
|
import type { Push } from '../models/InPush';
|
|
6
6
|
declare type ErrorCallback = {
|
|
@@ -10,10 +10,13 @@ export declare type OnIndigitallInitializedType = (device: Device, pushPermissio
|
|
|
10
10
|
export declare type OnErrorCallbackType = (error: ErrorCallback) => void;
|
|
11
11
|
export declare type OnDeviceSuccessType = (device: Device) => void;
|
|
12
12
|
export declare type OnMessageReceivedSuccessType = (json: JSON) => void;
|
|
13
|
+
export declare type OnStatusSuccessType = (status: string) => void;
|
|
13
14
|
export declare type OnTokenSuccessType = (token: string) => void;
|
|
14
15
|
export declare type OnPushSuccessType = (push: Push) => void;
|
|
15
16
|
export declare type OnTopicSuccessType = (topic: [Topic]) => void;
|
|
17
|
+
export declare type OnInAppTopicSuccessType = (topic: string) => void;
|
|
16
18
|
export declare type OnInAppCallbackType = (inApp: InApp) => void;
|
|
19
|
+
export declare type OnInAppActionCallbackType = (inApp: InApp, action: InAppAction) => void;
|
|
17
20
|
export declare type OnErrorMultipleInAppCallbackType = (error: ErrorCallback, viewId: string) => void;
|
|
18
21
|
export declare type OnInboxSuccessType = (inbox: Inbox) => void;
|
|
19
22
|
export declare type OnInboxNotificationSuccessType = (inboxNotification: InboxNotifications) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callbacksType.js","sourceRoot":"","sources":["../../../src/callbacks/callbacksType.ts"],"names":[],"mappings":"","sourcesContent":["import type { Customer, CustomerField } from '../models/InCustomer';\nimport type {\n Device, \n Topic \n} from '../models/InDevice';\nimport type { InApp } from '../models/InInApp';\nimport type { Inbox, InboxNotifications, MessageCount } from '../models/InInbox';\nimport type { Push } from '../models/InPush';\n\ntype ErrorCallback = {\n message: string;\n};\n\n//INIT\nexport type OnIndigitallInitializedType = ( \n device: Device,\n pushPermission: number,\n locationPermission: number\n ) => void;\nexport type OnErrorCallbackType = (error: ErrorCallback) => void;\nexport type OnDeviceSuccessType = (device: Device) => void;\nexport type OnMessageReceivedSuccessType = (json: JSON) => void;\nexport type OnTokenSuccessType = (token: string) => void;\nexport type OnPushSuccessType = (push: Push) => void;\nexport type OnTopicSuccessType = (topic: [Topic]) => void;\n\n//IN APP\nexport type OnInAppCallbackType = (\n inApp: InApp\n ) => void;\n\nexport type OnErrorMultipleInAppCallbackType = (error: ErrorCallback, viewId: string) => void;\n//INBOX\nexport type OnInboxSuccessType = (inbox: Inbox) => void;\nexport type OnInboxNotificationSuccessType = (\n inboxNotification: InboxNotifications\n) => void;\nexport type OnInboxMessageCountSuccessType = (\n messageCount: MessageCount\n) => void;\n\n//CUSTOMER\nexport type OnCustomerSuccessType = (customer: Customer) => void;\nexport type OnCustomerFieldSuccessType = (\n customerField: [CustomerField]\n) => void;\n"]}
|
|
1
|
+
{"version":3,"file":"callbacksType.js","sourceRoot":"","sources":["../../../src/callbacks/callbacksType.ts"],"names":[],"mappings":"","sourcesContent":["import type { Customer, CustomerField } from '../models/InCustomer';\nimport type {\n Device, \n Topic \n} from '../models/InDevice';\nimport type { InApp, InAppAction } from '../models/InInApp';\nimport type { Inbox, InboxNotifications, MessageCount } from '../models/InInbox';\nimport type { Push } from '../models/InPush';\n\ntype ErrorCallback = {\n message: string;\n};\n\n//INIT\nexport type OnIndigitallInitializedType = ( \n device: Device,\n pushPermission: number,\n locationPermission: number\n ) => void;\nexport type OnErrorCallbackType = (error: ErrorCallback) => void;\nexport type OnDeviceSuccessType = (device: Device) => void;\nexport type OnMessageReceivedSuccessType = (json: JSON) => void;\nexport type OnStatusSuccessType = (status: string) => void;\nexport type OnTokenSuccessType = (token: string) => void;\nexport type OnPushSuccessType = (push: Push) => void;\nexport type OnTopicSuccessType = (topic: [Topic]) => void;\nexport type OnInAppTopicSuccessType = (topic: string) => void;\n\n\n//IN APP\nexport type OnInAppCallbackType = (\n inApp: InApp\n ) => void;\n\nexport type OnInAppActionCallbackType = (\n inApp: InApp,\n action: InAppAction\n) => void;\n\nexport type OnErrorMultipleInAppCallbackType = (error: ErrorCallback, viewId: string) => void;\n//INBOX\nexport type OnInboxSuccessType = (inbox: Inbox) => void;\nexport type OnInboxNotificationSuccessType = (\n inboxNotification: InboxNotifications\n) => void;\nexport type OnInboxMessageCountSuccessType = (\n messageCount: MessageCount\n) => void;\n\n//CUSTOMER\nexport type OnCustomerSuccessType = (customer: Customer) => void;\nexport type OnCustomerFieldSuccessType = (\n customerField: [CustomerField]\n) => void;\n"]}
|
|
@@ -13,13 +13,13 @@ export interface IndigitallCustomerPlugin {
|
|
|
13
13
|
}): Promise<any>;
|
|
14
14
|
link(params: {
|
|
15
15
|
link: {
|
|
16
|
-
|
|
16
|
+
externalCode?: string;
|
|
17
17
|
channel: string;
|
|
18
18
|
};
|
|
19
19
|
}): Promise<void>;
|
|
20
20
|
unlink(params: {
|
|
21
21
|
unlink: {
|
|
22
|
-
|
|
22
|
+
externalCode?: string;
|
|
23
23
|
channel: string;
|
|
24
24
|
};
|
|
25
25
|
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customerDefinitions.js","sourceRoot":"","sources":["../../../src/definitions/customerDefinitions.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n OnCustomerSuccessType,\n OnCustomerFieldSuccessType,\n OnErrorCallbackType,\n } from '../callbacks/callbacksType';\nimport type { \n OnCustomerFieldParams,\n OnLinkCustomerParams\n} from '../params/customerParams';\n\nexport interface IndigitallCustomerPlugin {\n getCustomer(): Promise<any>;\n getCustomerInformation(params: { fieldNamesList: string[]}): Promise<any>;\n assignOrUpdateValueToCustomerFields(params: { customerFields: any}): Promise<any>;\n deleteValuesFromCustomerFields(params: { fieldNamesList: string[]}): Promise<any>;\n link(params: { link: {
|
|
1
|
+
{"version":3,"file":"customerDefinitions.js","sourceRoot":"","sources":["../../../src/definitions/customerDefinitions.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n OnCustomerSuccessType,\n OnCustomerFieldSuccessType,\n OnErrorCallbackType,\n } from '../callbacks/callbacksType';\nimport type { \n OnCustomerFieldParams,\n OnLinkCustomerParams\n} from '../params/customerParams';\n\nexport interface IndigitallCustomerPlugin {\n getCustomer(): Promise<any>;\n getCustomerInformation(params: { fieldNamesList: string[]}): Promise<any>;\n assignOrUpdateValueToCustomerFields(params: { customerFields: any}): Promise<any>;\n deleteValuesFromCustomerFields(params: { fieldNamesList: string[]}): Promise<any>;\n link(params: { link: {externalCode?: string; channel: string;} }): Promise<void>;\n unlink(params: { unlink: {externalCode?: string; channel: string;} }): Promise<void>;\n }\n export interface CustomerPlugin {\n getCustomer: (\n onSuccess: OnCustomerSuccessType,\n onError?: OnErrorCallbackType\n ) => void;\n getCustomerInformation: (\n fieldNamesList: string[],\n onSuccess?: OnCustomerFieldSuccessType,\n onError?: OnErrorCallbackType\n ) => void;\n assignOrUpdateValueToCustomerFields: (\n params: OnCustomerFieldParams,\n onSuccess?: OnCustomerSuccessType,\n onError?: OnErrorCallbackType\n ) => void;\n deleteValuesFromCustomerFields: (\n fieldNamesList: string[],\n onSuccess?: OnCustomerSuccessType,\n onError?: OnErrorCallbackType\n ) => void;\n link: (\n params: OnLinkCustomerParams,\n onSuccess?: () => void,\n onError?: OnErrorCallbackType\n ) => void;\n unlink: (\n params: OnLinkCustomerParams,\n onSuccess?: () => void,\n onError?: OnErrorCallbackType\n ) => void;\n }"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OnErrorCallbackType, OnInAppCallbackType } from '../callbacks/callbacksType';
|
|
1
|
+
import type { OnErrorCallbackType, OnInAppActionCallbackType, OnInAppCallbackType, OnInAppTopicSuccessType, OnTopicSuccessType } from '../callbacks/callbacksType';
|
|
2
2
|
import type { InApp } from '../models/InInApp';
|
|
3
3
|
import type { ShowPopUpParams, InAppParams, MultipleInAppParams } from '../params/inAppParams';
|
|
4
4
|
export interface IndigitallInAppPlugin {
|
|
@@ -29,6 +29,13 @@ export interface IndigitallInAppPlugin {
|
|
|
29
29
|
imageCloseButtonName?: string;
|
|
30
30
|
};
|
|
31
31
|
}): Promise<any>;
|
|
32
|
+
topicsList(): Promise<any>;
|
|
33
|
+
topicsSubscribe(params: {
|
|
34
|
+
topics: string[];
|
|
35
|
+
}): Promise<any>;
|
|
36
|
+
topicsUnsubscribe(params: {
|
|
37
|
+
topics: string[];
|
|
38
|
+
}): Promise<any>;
|
|
32
39
|
}
|
|
33
40
|
export interface InAppPlugin {
|
|
34
41
|
inAppGet: (inAppSchemaCode: string, onSuccess: OnInAppCallbackType, onError?: OnErrorCallbackType) => void;
|
|
@@ -38,6 +45,9 @@ export interface InAppPlugin {
|
|
|
38
45
|
eventPrintInAppRequest: (inApp: InApp) => void;
|
|
39
46
|
onClick: (inApp: InApp, onSuccess?: () => void) => void;
|
|
40
47
|
showPopUp: (params: ShowPopUpParams, didCancel?: () => void, didClicked?: () => void, didDisimissed?: () => void, onShowTimeFinished?: () => void, didExpired?: () => void, didShowMoreThanOnce?: () => void, didClickOut?: () => void, didDismissForever?: () => void, onSuccess?: () => void, onError?: OnErrorCallbackType) => void;
|
|
41
|
-
showInApp: (inAppParams: InAppParams, onShowTimeFinished?:
|
|
42
|
-
showMultipleInApp: (inAppParams: MultipleInAppParams, onShowTimeFinished?:
|
|
48
|
+
showInApp: (inAppParams: InAppParams, onShowTimeFinished?: OnInAppCallbackType, didExpired?: OnErrorCallbackType, didShowManyTimes?: OnErrorCallbackType, didClickOut?: OnErrorCallbackType, dismissForever?: OnErrorCallbackType, didClicked?: OnInAppActionCallbackType, didFormSubmit?: () => void, didFormError?: OnErrorCallbackType, onSuccess?: OnInAppCallbackType, onError?: OnErrorCallbackType) => void;
|
|
49
|
+
showMultipleInApp: (inAppParams: MultipleInAppParams, onShowTimeFinished?: OnInAppCallbackType, didExpired?: OnErrorCallbackType, didShowManyTimes?: OnErrorCallbackType, didClickOut?: OnErrorCallbackType, dismissForever?: OnErrorCallbackType, didClicked?: OnInAppActionCallbackType, didFormSubmit?: () => void, didFormError?: OnErrorCallbackType, onSuccess?: OnInAppCallbackType, onError?: OnErrorCallbackType) => void;
|
|
50
|
+
topicsList: (onSuccess?: OnTopicSuccessType, onError?: OnErrorCallbackType) => void;
|
|
51
|
+
topicsSubscribe: (topics: string[], onSuccess?: OnInAppTopicSuccessType, onError?: OnErrorCallbackType) => void;
|
|
52
|
+
topicsUnsubscribe: (topics: string[], onSuccess?: OnInAppTopicSuccessType, onError?: OnErrorCallbackType) => void;
|
|
43
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inAppDefinitions.js","sourceRoot":"","sources":["../../../src/definitions/inAppDefinitions.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n OnErrorCallbackType,\n OnInAppCallbackType,\n } from '../callbacks/callbacksType';\n import type { InApp } from '../models/InInApp';\nimport type {\n ShowPopUpParams,\n InAppParams,\n MultipleInAppParams\n} from '../params/inAppParams'\n \nexport interface IndigitallInAppPlugin {\n getPackageName(): Promise<any>;\n inAppGet(params: { inAppSchemaCode: string }): Promise<any>;\n inAppWasShown(params: { params: InAppParams }): Promise<any>;\n addNewInAppClick(params: { inApp: InApp }): Promise<void>;\n addNewInAppToDismissForever(params: { inApp: InApp }): Promise<void>;\n eventPrintInAppRequest(params: { inApp: InApp }): Promise<any>;\n onClick(params: { inApp: InApp}): Promise<any>;\n showInApp(params: InAppParams): Promise<any>;\n showPopUp(params: {inApp: { inAppSchemaCode: string, closeIconDisabled?: boolean, imageCloseButtonName?: string }}): Promise<any
|
|
1
|
+
{"version":3,"file":"inAppDefinitions.js","sourceRoot":"","sources":["../../../src/definitions/inAppDefinitions.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n OnErrorCallbackType,\n OnInAppActionCallbackType,\n OnInAppCallbackType,\n OnInAppTopicSuccessType,\n OnTopicSuccessType,\n } from '../callbacks/callbacksType';\n import type { InApp } from '../models/InInApp';\nimport type {\n ShowPopUpParams,\n InAppParams,\n MultipleInAppParams\n} from '../params/inAppParams'\n \nexport interface IndigitallInAppPlugin {\n getPackageName(): Promise<any>;\n inAppGet(params: { inAppSchemaCode: string }): Promise<any>;\n inAppWasShown(params: { params: InAppParams }): Promise<any>;\n addNewInAppClick(params: { inApp: InApp }): Promise<void>;\n addNewInAppToDismissForever(params: { inApp: InApp }): Promise<void>;\n eventPrintInAppRequest(params: { inApp: InApp }): Promise<any>;\n onClick(params: { inApp: InApp}): Promise<any>;\n showInApp(params: InAppParams): Promise<any>;\n showPopUp(params: {inApp: { inAppSchemaCode: string, closeIconDisabled?: boolean, imageCloseButtonName?: string }}): Promise<any>;\n topicsList(): Promise<any>;\n topicsSubscribe(params: { topics: string[] }): Promise<any>;\n topicsUnsubscribe(params: { topics: string[] }): Promise<any>;\n }\n \n export interface InAppPlugin {\n inAppGet: (\n inAppSchemaCode: string,\n onSuccess: OnInAppCallbackType,\n onError?: OnErrorCallbackType\n ) => void;\n inAppWasShown: (\n params: InAppParams,\n onSuccess: OnInAppCallbackType,\n onError?: OnErrorCallbackType\n ) => void;\n addNewInAppClick: (\n inApp: InApp,\n onSuccess?: () => void\n ) => void;\n addNewInAppToDismissForever: (\n inApp: InApp,\n onSuccess?: () => void\n ) => void;\n eventPrintInAppRequest: (\n inApp: InApp\n ) => void;\n onClick: (\n inApp: InApp,\n onSuccess?:() => void\n ) => void;\n showPopUp: (\n params: ShowPopUpParams, \n didCancel?: () => void,\n didClicked?: () => void,\n didDisimissed?: () => void,\n onShowTimeFinished?: () => void,\n didExpired?: () => void,\n didShowMoreThanOnce?: () => void,\n didClickOut?: () => void,\n didDismissForever?: () => void,\n onSuccess?: () => void,\n onError?: OnErrorCallbackType\n ) => void;\n showInApp: (\n inAppParams: InAppParams,\n onShowTimeFinished?: OnInAppCallbackType,\n didExpired?: OnErrorCallbackType,\n didShowManyTimes?: OnErrorCallbackType,\n didClickOut?: OnErrorCallbackType,\n dismissForever?: OnErrorCallbackType,\n didClicked?: OnInAppActionCallbackType,\n didFormSubmit?: () => void,\n didFormError?: OnErrorCallbackType,\n onSuccess?: OnInAppCallbackType,\n onError?: OnErrorCallbackType\n ) => void;\n showMultipleInApp: (\n inAppParams: MultipleInAppParams,\n onShowTimeFinished?: OnInAppCallbackType,\n didExpired?: OnErrorCallbackType,\n didShowManyTimes?: OnErrorCallbackType,\n didClickOut?: OnErrorCallbackType,\n dismissForever?: OnErrorCallbackType,\n didClicked?: OnInAppActionCallbackType,\n didFormSubmit?: () => void,\n didFormError?: OnErrorCallbackType,\n onSuccess?: OnInAppCallbackType,\n onError?: OnErrorCallbackType\n ) => void; \n topicsList: (\n onSuccess?: OnTopicSuccessType,\n onError?: OnErrorCallbackType\n ) => void;\n topicsSubscribe: (\n topics: string[], \n onSuccess?: OnInAppTopicSuccessType,\n onError?: OnErrorCallbackType\n ) => void;\n topicsUnsubscribe: (\n topics: string[], \n onSuccess?: OnInAppTopicSuccessType,\n onError?: OnErrorCallbackType\n ) => void; \n }\n "]}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { OnIndigitallInitializedType, OnDeviceSuccessType, OnPushSuccessType, OnTopicSuccessType, OnErrorCallbackType, OnMessageReceivedSuccessType, OnTokenSuccessType } from '../callbacks/callbacksType';
|
|
1
|
+
import type { OnIndigitallInitializedType, OnDeviceSuccessType, OnPushSuccessType, OnStatusSuccessType, OnTopicSuccessType, OnErrorCallbackType, OnMessageReceivedSuccessType, OnTokenSuccessType } from '../callbacks/callbacksType';
|
|
2
2
|
import type { InitParams, EventParams } from '../params/pushParams';
|
|
3
3
|
export interface IndigitallCpPlugin {
|
|
4
|
+
requestPushPermission(): Promise<any>;
|
|
5
|
+
getPushPermissionStatus(): Promise<any>;
|
|
4
6
|
initialize(params: {
|
|
5
7
|
config: any;
|
|
6
8
|
}): Promise<any>;
|
|
@@ -29,11 +31,13 @@ export interface IndigitallCpPlugin {
|
|
|
29
31
|
notification: any;
|
|
30
32
|
}): Promise<any>;
|
|
31
33
|
logIn(param: {
|
|
32
|
-
|
|
34
|
+
externalCode: string;
|
|
33
35
|
}): Promise<any>;
|
|
34
36
|
logOut(): Promise<any>;
|
|
35
37
|
}
|
|
36
38
|
export interface IndigitallPlugin {
|
|
39
|
+
requestPushPermission: () => void;
|
|
40
|
+
getPushPermissionStatus: (onSuccess: OnStatusSuccessType) => void;
|
|
37
41
|
init: (config: InitParams, onIndigitallInitializedType?: OnIndigitallInitializedType, onError?: OnErrorCallbackType) => void;
|
|
38
42
|
deviceGet: (onSuccess: OnDeviceSuccessType, onError?: OnErrorCallbackType) => void;
|
|
39
43
|
deviceEnable: (onSuccess?: OnDeviceSuccessType, onError?: OnErrorCallbackType) => void;
|
|
@@ -49,6 +53,6 @@ export interface IndigitallPlugin {
|
|
|
49
53
|
onMessageReceived: (onSuccess: OnMessageReceivedSuccessType) => void;
|
|
50
54
|
getToken: (onSuccess: OnTokenSuccessType, onError?: OnErrorCallbackType) => void;
|
|
51
55
|
isIndigitallPushNotification: (notification: any, onSuccess: () => void, onError?: OnErrorCallbackType) => void;
|
|
52
|
-
logIn: (
|
|
56
|
+
logIn: (externalCode: string, onSuccess?: OnDeviceSuccessType, onError?: OnErrorCallbackType) => void;
|
|
53
57
|
logOut: (onSuccess?: OnDeviceSuccessType, onError?: OnErrorCallbackType) => void;
|
|
54
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pushDefinitions.js","sourceRoot":"","sources":["../../../src/definitions/pushDefinitions.ts"],"names":[],"mappings":"","sourcesContent":["\nimport type {\n OnIndigitallInitializedType,\n OnDeviceSuccessType,\n OnPushSuccessType,\n OnTopicSuccessType,\n OnErrorCallbackType,\n //OnInAppCallbackType,\n OnMessageReceivedSuccessType,\n OnTokenSuccessType,\n } from '../callbacks/callbacksType';\n import type { \n InitParams,\n EventParams } from '../params/pushParams';\n\n \nexport interface IndigitallCpPlugin { \n initialize(params: { config: any }): Promise<any>; \n deviceGet(): Promise<any>;\n deviceEnable(): Promise<any>;\n deviceDisable(): Promise<any>;\n topicsList(): Promise<any>;\n topicsSubscribe(params: { topics: string[] }): Promise<any>;\n topicsUnsubscribe(params: { topics: string[] }): Promise<any>;\n sendCustomEvent(params: { customEvent: any}): Promise<void>;\n // Callback can be keeping alive, promise only return once\n getPush(onSuccess: OnPushSuccessType,\n onError?: OnErrorCallbackType): OnPushSuccessType;\n onIndigitallGetPush(onSuccess: OnPushSuccessType,\n onError?: OnErrorCallbackType): OnPushSuccessType;\n clearViewUrl(): void;\n setDefaultViewUrl(params: { defaultView: string}): void;\n onMessageReceived(onSuccess: OnMessageReceivedSuccessType): OnMessageReceivedSuccessType;\n getToken(): Promise<any>;\n isIndigitallPushNotification(params: {notification: any}): Promise<any>;\n logIn(param: {
|
|
1
|
+
{"version":3,"file":"pushDefinitions.js","sourceRoot":"","sources":["../../../src/definitions/pushDefinitions.ts"],"names":[],"mappings":"","sourcesContent":["\nimport type {\n OnIndigitallInitializedType,\n OnDeviceSuccessType,\n OnPushSuccessType,\n OnStatusSuccessType,\n OnTopicSuccessType,\n OnErrorCallbackType,\n //OnInAppCallbackType,\n OnMessageReceivedSuccessType,\n OnTokenSuccessType,\n } from '../callbacks/callbacksType';\n import type { \n InitParams,\n EventParams } from '../params/pushParams';\n\n \nexport interface IndigitallCpPlugin { \n requestPushPermission(): Promise<any>;\n getPushPermissionStatus(): Promise<any>;\n initialize(params: { config: any }): Promise<any>; \n deviceGet(): Promise<any>;\n deviceEnable(): Promise<any>;\n deviceDisable(): Promise<any>;\n topicsList(): Promise<any>;\n topicsSubscribe(params: { topics: string[] }): Promise<any>;\n topicsUnsubscribe(params: { topics: string[] }): Promise<any>;\n sendCustomEvent(params: { customEvent: any}): Promise<void>;\n // Callback can be keeping alive, promise only return once\n getPush(onSuccess: OnPushSuccessType,\n onError?: OnErrorCallbackType): OnPushSuccessType;\n onIndigitallGetPush(onSuccess: OnPushSuccessType,\n onError?: OnErrorCallbackType): OnPushSuccessType;\n clearViewUrl(): void;\n setDefaultViewUrl(params: { defaultView: string}): void;\n onMessageReceived(onSuccess: OnMessageReceivedSuccessType): OnMessageReceivedSuccessType;\n getToken(): Promise<any>;\n isIndigitallPushNotification(params: {notification: any}): Promise<any>;\n logIn(param: { externalCode: string }): Promise<any>;\n logOut(): Promise<any>;\n }\n \n export interface IndigitallPlugin {\n requestPushPermission: () => void;\n getPushPermissionStatus: (onSuccess: OnStatusSuccessType) => void;\n init: (\n config: InitParams,\n onIndigitallInitializedType?: OnIndigitallInitializedType,\n onError?: OnErrorCallbackType\n ) => void;\n deviceGet: (\n onSuccess: OnDeviceSuccessType,\n onError?: OnErrorCallbackType\n ) => void;\n deviceEnable: (\n onSuccess?: OnDeviceSuccessType,\n onError?: OnErrorCallbackType\n ) => void;\n deviceDisable: (\n onSuccess?: OnDeviceSuccessType,\n onError?: OnErrorCallbackType\n ) => void;\n topicsList: (\n onSuccess?: OnTopicSuccessType,\n onError?: OnErrorCallbackType\n ) => void;\n topicsSubscribe: (\n topics: string[], \n onSuccess?: OnTopicSuccessType,\n onError?: OnErrorCallbackType\n ) => void;\n topicsUnsubscribe: (\n topics: string[], \n onSuccess?: OnTopicSuccessType,\n onError?: OnErrorCallbackType\n ) => void;\n sendCustomEvent: (\n customEvent: EventParams,\n onSuccess?: () => void,\n onError?: OnErrorCallbackType\n ) => void;\n getPush: (\n onSuccess: OnPushSuccessType,\n onError?: OnErrorCallbackType\n ) => void;\n onIndigitallGetPush: (\n onSuccess: OnPushSuccessType,\n onError?: OnErrorCallbackType\n ) => void;\n clearViewUrl: () => void;\n setDefaultViewUrl: (\n defaultView: string,\n ) => void;\n onMessageReceived: (\n onSuccess: OnMessageReceivedSuccessType\n ) => void;\n getToken: (\n onSuccess: OnTokenSuccessType,\n onError?: OnErrorCallbackType\n ) => void;\n isIndigitallPushNotification: (\n notification: any,\n onSuccess: () => void,\n onError?: OnErrorCallbackType\n ) => void;\n\n logIn: (\n externalCode: string,\n onSuccess?: OnDeviceSuccessType,\n onError?: OnErrorCallbackType\n ) => void;\n logOut: (\n onSuccess?: OnDeviceSuccessType,\n onError?: OnErrorCallbackType\n ) => void;\n }"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InInApp.js","sourceRoot":"","sources":["../../../src/models/InInApp.ts"],"names":[],"mappings":"","sourcesContent":["export type InApp = {\n inAppId: number;\n lastVersionId: number;\n showOnce: boolean;\n creationDate: string;\n expiredDate: string;\n properties: InAppProperties;\n renewalTime: string;\n schema: InAppSchema;\n };\n \n type InAppSchema = {\n code: string;\n width: number;\n height: number;\n };\n \n type InAppProperties = {\n contentUrl: string;\n showTime: number;\n layout: InAppLayout;\n action: InAppAction;\n numberOfShows: number;\n numberOfClicks: number;\n dismissForever: boolean;\n };\n \n\ntype InAppLayout = {\n borderRadius: string;\n //more fields that is not in use\n };\n \n type InAppAction = {\n url: string;\n };\n "]}
|
|
1
|
+
{"version":3,"file":"InInApp.js","sourceRoot":"","sources":["../../../src/models/InInApp.ts"],"names":[],"mappings":"","sourcesContent":["export type InApp = {\n inAppId: number;\n lastVersionId: number;\n showOnce: boolean;\n creationDate: string;\n expiredDate: string;\n properties: InAppProperties;\n renewalTime: string;\n schema: InAppSchema;\n };\n \n type InAppSchema = {\n code: string;\n width: number;\n height: number;\n };\n \n type InAppProperties = {\n contentUrl: string;\n showTime: number;\n layout: InAppLayout;\n action: InAppAction;\n numberOfShows: number;\n numberOfClicks: number;\n dismissForever: boolean;\n };\n \n\ntype InAppLayout = {\n borderRadius: string;\n //more fields that is not in use\n };\n \n export type InAppAction = {\n url: string;\n };\n "]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InInbox.js","sourceRoot":"","sources":["../../../src/models/InInbox.ts"],"names":[],"mappings":"AA8BE,MAAM,CAAN,IAAY,WAIb;AAJC,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,kCAAmB,CAAA;AACvB,CAAC,EAJa,WAAW,KAAX,WAAW,QAIxB;AAAA,CAAC","sourcesContent":["import type { Push } from \"./InPush\";\n\nexport type Inbox = {\n lastAccess: string;\n notifications: [InboxNotifications];\n newNotifications: [InboxNotifications] | null;\n count: number;\n pagesize: number;\n numPage: number;\n };\n \n export type InboxNotifications = {\n id: string;\n
|
|
1
|
+
{"version":3,"file":"InInbox.js","sourceRoot":"","sources":["../../../src/models/InInbox.ts"],"names":[],"mappings":"AA8BE,MAAM,CAAN,IAAY,WAIb;AAJC,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,kCAAmB,CAAA;AACvB,CAAC,EAJa,WAAW,KAAX,WAAW,QAIxB;AAAA,CAAC","sourcesContent":["import type { Push } from \"./InPush\";\n\nexport type Inbox = {\n lastAccess: string;\n notifications: [InboxNotifications];\n newNotifications: [InboxNotifications] | null;\n count: number;\n pagesize: number;\n numPage: number;\n };\n \n export type InboxNotifications = {\n id: string;\n externalCode: string;\n sentAt: string;\n status: string;\n sendingId: number;\n campaign: number;\n message: Push;\n read: boolean;\n };\n \n export type MessageCount = {\n click: number;\n sent: number;\n deleted: number;\n lastAccess: number;\n count: number;\n };\n\n export enum InboxStatus {\n sent = \"sent\",\n click = \"click\",\n deleted = \"deleted\"\n};"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customerParams.js","sourceRoot":"","sources":["../../../src/params/customerParams.ts"],"names":[],"mappings":"AAAA,UAAU","sourcesContent":["//Customer\n\nimport type { Channel } from \"../models/InCustomer\";\n\nexport type OnCustomerFieldParams = {\n fields: any\n};\n\nexport type OnLinkCustomerParams = {\n
|
|
1
|
+
{"version":3,"file":"customerParams.js","sourceRoot":"","sources":["../../../src/params/customerParams.ts"],"names":[],"mappings":"AAAA,UAAU","sourcesContent":["//Customer\n\nimport type { Channel } from \"../models/InCustomer\";\n\nexport type OnCustomerFieldParams = {\n fields: any\n};\n\nexport type OnLinkCustomerParams = {\n externalCode?: string;\n channel: Channel;\n};\n\nexport type OnCustomerDeleteValuesParams = {\n fieldNames: [string];\n};"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pushParams.js","sourceRoot":"","sources":["../../../src/params/pushParams.ts"],"names":[],"mappings":"","sourcesContent":["import type { Topic } from '../models/InDevice';\n \n//INIT\nexport type InitParams = {\n appKey: string;\n senderId: string;\n requestLocation?: boolean;\n wifiFilterEnabled?: boolean;\n urlDeviceApi?: string;\n urlInAppApi?: string;\n urlInboxApi?: string;\n debugMode?: boolean;\n forceSimulatorToken?: boolean;\n};\n\nexport type TopicStringParams = {\n code: [string];\n};\n\nexport type TopicParams = {\n code: [Topic];\n};\n\nexport type EventParams = {\n event: string;\n customData: any;\n};\n\n"]}
|
|
1
|
+
{"version":3,"file":"pushParams.js","sourceRoot":"","sources":["../../../src/params/pushParams.ts"],"names":[],"mappings":"","sourcesContent":["import type { Topic } from '../models/InDevice';\n \n//INIT\nexport type InitParams = {\n appKey: string;\n senderId: string;\n requestLocation?: boolean;\n wifiFilterEnabled?: boolean;\n urlDeviceApi?: string;\n urlInAppApi?: string;\n urlInboxApi?: string;\n debugMode?: boolean;\n forceSimulatorToken?: boolean;\n alwaysLaunchOnInit?: boolean;\n autoRequestPushPermission?: boolean;\n};\n\nexport type TopicStringParams = {\n code: [string];\n};\n\nexport type TopicParams = {\n code: [Topic];\n};\n\nexport type EventParams = {\n event: string;\n customData: any;\n};\n\n"]}
|