cordova-plugin-pushizo 0.1.0 → 0.3.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/LICENSE +21 -21
- package/README.md +495 -350
- package/package.json +54 -54
- package/plugin.xml +96 -96
- package/src/android/com/pushizo/cordova/PushizoBridgeCore.kt +856 -493
- package/src/android/com/pushizo/cordova/PushizoConfigStore.kt +41 -41
- package/src/android/com/pushizo/cordova/PushizoCordovaPlugin.kt +163 -141
- package/src/android/com/pushizo/cordova/PushizoInitProvider.kt +34 -34
- package/src/android/pushizo.gradle +6 -6
- package/src/ios/PushizoAppDelegateHook.swift +54 -54
- package/src/ios/PushizoBridgeCore.swift +719 -465
- package/src/ios/PushizoCordovaPlugin.swift +186 -157
- package/types/index.d.ts +76 -54
- package/www/core.d.ts +169 -11
- package/www/core.js +413 -10
- package/www/definitions.d.ts +240 -0
|
@@ -1,157 +1,186 @@
|
|
|
1
|
-
#if canImport(Cordova)
|
|
2
|
-
import Cordova
|
|
3
|
-
#endif
|
|
4
|
-
import Foundation
|
|
5
|
-
import Pushizo
|
|
6
|
-
#if canImport(PushizoCore)
|
|
7
|
-
import PushizoCore
|
|
8
|
-
#endif
|
|
9
|
-
import UIKit
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
Cordova → Pushizo iOS SDK köprüsü (`cordova.exec` servisi "Pushizo", `onload` ile uygulama açılışında
|
|
13
|
-
yüklenir). Metotlar `PushizoBridgeCore` üzerinden SDK'ya iletilir. SDK olayları JS'in `setEventCallback`
|
|
14
|
-
ile açtığı tek `keepCallback` kanalından `{ type, payload }` olarak gönderilir; kanal açılmadan gelen olaylar
|
|
15
|
-
tamponlanır. APNs token geri çağrıları `PushizoAppDelegateHook` ile yakalanır.
|
|
16
|
-
*/
|
|
17
|
-
@objc(PushizoCordovaPlugin)
|
|
18
|
-
class PushizoCordovaPlugin: CDVPlugin {
|
|
19
|
-
// CDVCommandStatus üye adları cordova-ios sürümleri arasında farklı (Swift adı); ham değerler sabittir.
|
|
20
|
-
private static let statusNoResult = CDVCommandStatus(rawValue: 0)!
|
|
21
|
-
private static let statusOk = CDVCommandStatus(rawValue: 1)!
|
|
22
|
-
private static let statusError = CDVCommandStatus(rawValue: 9)!
|
|
23
|
-
private static let maxBufferedEvents = 50
|
|
24
|
-
|
|
25
|
-
private var core: PushizoBridgeCore!
|
|
26
|
-
private var eventCallbackId: String?
|
|
27
|
-
private var bufferedEvents: [[String: Any]] = []
|
|
28
|
-
|
|
29
|
-
override func pluginInitialize() {
|
|
30
|
-
super.pluginInitialize()
|
|
31
|
-
core = PushizoBridgeCore { [weak self] type, payload in
|
|
32
|
-
DispatchQueue.main.async { self?.sendEvent(["type": type, "payload": payload]) }
|
|
33
|
-
}
|
|
34
|
-
PushizoAppDelegateHook.install()
|
|
35
|
-
// Daha önce JS ile başlatıldıysa SDK hemen kayıtlı ayarlarla başlatılır; bildirimden açılış tıklaması kaybolmaz.
|
|
36
|
-
if !Pushizo.isInitialized, let config = PushizoBridgeConfig.load() {
|
|
37
|
-
config.initializeSdk()
|
|
38
|
-
}
|
|
39
|
-
core.attachIfInitialized()
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
override func onReset() {
|
|
43
|
-
// Sayfa yeniden yüklendi: eski JS kanalı geçersiz; yeni sayfa `setEventCallback` ile yeniden açar.
|
|
44
|
-
eventCallbackId = nil
|
|
45
|
-
core.foregroundHandlerEnabled = false
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// MARK: Olay kanalı
|
|
49
|
-
|
|
50
|
-
@objc(setEventCallback:) func setEventCallback(_ command: CDVInvokedUrlCommand) {
|
|
51
|
-
eventCallbackId = command.callbackId
|
|
52
|
-
let opened = CDVPluginResult(status: Self.statusNoResult)
|
|
53
|
-
opened?.setKeepCallbackAs(true)
|
|
54
|
-
commandDelegate.send(opened, callbackId: command.callbackId)
|
|
55
|
-
let buffered = bufferedEvents
|
|
56
|
-
bufferedEvents.removeAll()
|
|
57
|
-
buffered.forEach { sendEvent($0) }
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/// Ana iş parçacığında çağrılır.
|
|
61
|
-
private func sendEvent(_ message: [String: Any]) {
|
|
62
|
-
guard let callbackId = eventCallbackId else {
|
|
63
|
-
bufferedEvents.append(message)
|
|
64
|
-
if bufferedEvents.count > Self.maxBufferedEvents { bufferedEvents.removeFirst(bufferedEvents.count - Self.maxBufferedEvents) }
|
|
65
|
-
return
|
|
66
|
-
}
|
|
67
|
-
let result = CDVPluginResult(status: Self.statusOk, messageAs: message)
|
|
68
|
-
result?.setKeepCallbackAs(true)
|
|
69
|
-
commandDelegate.send(result, callbackId: callbackId)
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// MARK: Metotlar
|
|
73
|
-
|
|
74
|
-
private func dispatch(_ command: CDVInvokedUrlCommand) {
|
|
75
|
-
let args = command.argument(at: 0) as? [String: Any] ?? [:]
|
|
76
|
-
let callbackId = command.callbackId
|
|
77
|
-
let handled = core.handle(command.methodName ?? "", args) { [weak self] result in
|
|
78
|
-
guard let self else { return }
|
|
79
|
-
let pluginResult: CDVPluginResult?
|
|
80
|
-
switch result {
|
|
81
|
-
case .success(let data):
|
|
82
|
-
pluginResult = data.map { CDVPluginResult(status: Self.statusOk, messageAs: $0) } ?? CDVPluginResult(status: Self.statusOk)
|
|
83
|
-
case .failure(let code, let message):
|
|
84
|
-
pluginResult = CDVPluginResult(status: Self.statusError, messageAs: ["code": code, "message": message])
|
|
85
|
-
}
|
|
86
|
-
self.commandDelegate.send(pluginResult, callbackId: callbackId)
|
|
87
|
-
}
|
|
88
|
-
if !handled {
|
|
89
|
-
let error = CDVPluginResult(status: Self.statusError, messageAs: ["code": "NOT_IMPLEMENTED", "message": "Pushizo: \(command.methodName ?? "") desteklenmiyor"])
|
|
90
|
-
commandDelegate.send(error, callbackId: callbackId)
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
@objc(initialize:) func initializeSdk(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
95
|
-
@objc(setConsentGiven:) func setConsentGiven(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
96
|
-
@objc(login:) func login(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
97
|
-
@objc(updateUserJwt:) func updateUserJwt(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
98
|
-
@objc(logout:) func logout(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
99
|
-
@objc(addTags:) func addTags(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
100
|
-
@objc(removeTags:) func removeTags(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
101
|
-
@objc(getTags:) func getTags(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
102
|
-
@objc(addAliases:) func addAliases(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
103
|
-
@objc(removeAlias:) func removeAlias(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
104
|
-
@objc(setLanguage:) func setLanguage(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
105
|
-
@objc(addEmail:) func addEmail(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
106
|
-
@objc(removeEmail:) func removeEmail(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
107
|
-
@objc(addSms:) func addSms(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
108
|
-
@objc(removeSms:) func removeSms(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
109
|
-
@objc(getUser:) func getUser(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
110
|
-
@objc(getContacts:) func getContacts(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
111
|
-
@objc(getPreferences:) func getPreferences(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
112
|
-
@objc(setPreferences:) func setPreferences(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
113
|
-
@objc(getPushSubscription:) func getPushSubscription(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
114
|
-
@objc(optIn:) func optIn(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
115
|
-
@objc(optOut:) func optOut(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
116
|
-
@objc(getPermission:) func getPermission(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
117
|
-
@objc(requestPermission:) func requestPermission(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
118
|
-
@objc(clearAll:) func clearAll(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
119
|
-
@objc(removeNotification:) func removeNotification(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
120
|
-
@objc(removeGroupedNotifications:) func removeGroupedNotifications(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
121
|
-
@objc(setForegroundHandlerEnabled:) func setForegroundHandlerEnabled(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
122
|
-
@objc(displayNotification:) func displayNotification(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
123
|
-
@objc(sendEvent:) func sendEvent(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
124
|
-
@objc(setLogLevel:) func setLogLevel(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
125
|
-
@objc(addTriggers:) func addTriggers(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
126
|
-
@objc(removeTriggers:) func removeTriggers(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
127
|
-
@objc(clearTriggers:) func clearTriggers(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
128
|
-
@objc(getTriggers:) func getTriggers(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
129
|
-
@objc(setScreen:) func setScreen(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
130
|
-
@objc(setInAppPaused:) func setInAppPaused(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
131
|
-
@objc(getInAppPaused:) func getInAppPaused(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
132
|
-
@objc(inboxList:) func inboxList(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
133
|
-
@objc(inboxMarkRead:) func inboxMarkRead(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
134
|
-
@objc(inboxMarkAllRead:) func inboxMarkAllRead(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
135
|
-
@objc(inboxArchive:) func inboxArchive(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
136
|
-
@objc(inboxUnreadCount:) func inboxUnreadCount(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
137
|
-
@objc(
|
|
138
|
-
@objc(
|
|
139
|
-
@objc(
|
|
140
|
-
@objc(
|
|
141
|
-
@objc(
|
|
142
|
-
@objc(
|
|
143
|
-
@objc(
|
|
144
|
-
@objc(
|
|
145
|
-
@objc(
|
|
146
|
-
@objc(
|
|
147
|
-
@objc(
|
|
148
|
-
@objc(
|
|
149
|
-
@objc(
|
|
150
|
-
@objc(
|
|
151
|
-
@objc(
|
|
152
|
-
@objc(
|
|
153
|
-
@objc(
|
|
154
|
-
@objc(
|
|
155
|
-
@objc(
|
|
156
|
-
@objc(
|
|
157
|
-
}
|
|
1
|
+
#if canImport(Cordova)
|
|
2
|
+
import Cordova
|
|
3
|
+
#endif
|
|
4
|
+
import Foundation
|
|
5
|
+
import Pushizo
|
|
6
|
+
#if canImport(PushizoCore)
|
|
7
|
+
import PushizoCore
|
|
8
|
+
#endif
|
|
9
|
+
import UIKit
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
Cordova → Pushizo iOS SDK köprüsü (`cordova.exec` servisi "Pushizo", `onload` ile uygulama açılışında
|
|
13
|
+
yüklenir). Metotlar `PushizoBridgeCore` üzerinden SDK'ya iletilir. SDK olayları JS'in `setEventCallback`
|
|
14
|
+
ile açtığı tek `keepCallback` kanalından `{ type, payload }` olarak gönderilir; kanal açılmadan gelen olaylar
|
|
15
|
+
tamponlanır. APNs token geri çağrıları `PushizoAppDelegateHook` ile yakalanır.
|
|
16
|
+
*/
|
|
17
|
+
@objc(PushizoCordovaPlugin)
|
|
18
|
+
class PushizoCordovaPlugin: CDVPlugin {
|
|
19
|
+
// CDVCommandStatus üye adları cordova-ios sürümleri arasında farklı (Swift adı); ham değerler sabittir.
|
|
20
|
+
private static let statusNoResult = CDVCommandStatus(rawValue: 0)!
|
|
21
|
+
private static let statusOk = CDVCommandStatus(rawValue: 1)!
|
|
22
|
+
private static let statusError = CDVCommandStatus(rawValue: 9)!
|
|
23
|
+
private static let maxBufferedEvents = 50
|
|
24
|
+
|
|
25
|
+
private var core: PushizoBridgeCore!
|
|
26
|
+
private var eventCallbackId: String?
|
|
27
|
+
private var bufferedEvents: [[String: Any]] = []
|
|
28
|
+
|
|
29
|
+
override func pluginInitialize() {
|
|
30
|
+
super.pluginInitialize()
|
|
31
|
+
core = PushizoBridgeCore { [weak self] type, payload in
|
|
32
|
+
DispatchQueue.main.async { self?.sendEvent(["type": type, "payload": payload]) }
|
|
33
|
+
}
|
|
34
|
+
PushizoAppDelegateHook.install()
|
|
35
|
+
// Daha önce JS ile başlatıldıysa SDK hemen kayıtlı ayarlarla başlatılır; bildirimden açılış tıklaması kaybolmaz.
|
|
36
|
+
if !Pushizo.isInitialized, let config = PushizoBridgeConfig.load() {
|
|
37
|
+
config.initializeSdk()
|
|
38
|
+
}
|
|
39
|
+
core.attachIfInitialized()
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
override func onReset() {
|
|
43
|
+
// Sayfa yeniden yüklendi: eski JS kanalı geçersiz; yeni sayfa `setEventCallback` ile yeniden açar.
|
|
44
|
+
eventCallbackId = nil
|
|
45
|
+
core.foregroundHandlerEnabled = false
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// MARK: Olay kanalı
|
|
49
|
+
|
|
50
|
+
@objc(setEventCallback:) func setEventCallback(_ command: CDVInvokedUrlCommand) {
|
|
51
|
+
eventCallbackId = command.callbackId
|
|
52
|
+
let opened = CDVPluginResult(status: Self.statusNoResult)
|
|
53
|
+
opened?.setKeepCallbackAs(true)
|
|
54
|
+
commandDelegate.send(opened, callbackId: command.callbackId)
|
|
55
|
+
let buffered = bufferedEvents
|
|
56
|
+
bufferedEvents.removeAll()
|
|
57
|
+
buffered.forEach { sendEvent($0) }
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/// Ana iş parçacığında çağrılır.
|
|
61
|
+
private func sendEvent(_ message: [String: Any]) {
|
|
62
|
+
guard let callbackId = eventCallbackId else {
|
|
63
|
+
bufferedEvents.append(message)
|
|
64
|
+
if bufferedEvents.count > Self.maxBufferedEvents { bufferedEvents.removeFirst(bufferedEvents.count - Self.maxBufferedEvents) }
|
|
65
|
+
return
|
|
66
|
+
}
|
|
67
|
+
let result = CDVPluginResult(status: Self.statusOk, messageAs: message)
|
|
68
|
+
result?.setKeepCallbackAs(true)
|
|
69
|
+
commandDelegate.send(result, callbackId: callbackId)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// MARK: Metotlar
|
|
73
|
+
|
|
74
|
+
private func dispatch(_ command: CDVInvokedUrlCommand) {
|
|
75
|
+
let args = command.argument(at: 0) as? [String: Any] ?? [:]
|
|
76
|
+
let callbackId = command.callbackId
|
|
77
|
+
let handled = core.handle(command.methodName ?? "", args) { [weak self] result in
|
|
78
|
+
guard let self else { return }
|
|
79
|
+
let pluginResult: CDVPluginResult?
|
|
80
|
+
switch result {
|
|
81
|
+
case .success(let data):
|
|
82
|
+
pluginResult = data.map { CDVPluginResult(status: Self.statusOk, messageAs: $0) } ?? CDVPluginResult(status: Self.statusOk)
|
|
83
|
+
case .failure(let code, let message):
|
|
84
|
+
pluginResult = CDVPluginResult(status: Self.statusError, messageAs: ["code": code, "message": message])
|
|
85
|
+
}
|
|
86
|
+
self.commandDelegate.send(pluginResult, callbackId: callbackId)
|
|
87
|
+
}
|
|
88
|
+
if !handled {
|
|
89
|
+
let error = CDVPluginResult(status: Self.statusError, messageAs: ["code": "NOT_IMPLEMENTED", "message": "Pushizo: \(command.methodName ?? "") desteklenmiyor"])
|
|
90
|
+
commandDelegate.send(error, callbackId: callbackId)
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@objc(initialize:) func initializeSdk(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
95
|
+
@objc(setConsentGiven:) func setConsentGiven(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
96
|
+
@objc(login:) func login(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
97
|
+
@objc(updateUserJwt:) func updateUserJwt(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
98
|
+
@objc(logout:) func logout(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
99
|
+
@objc(addTags:) func addTags(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
100
|
+
@objc(removeTags:) func removeTags(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
101
|
+
@objc(getTags:) func getTags(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
102
|
+
@objc(addAliases:) func addAliases(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
103
|
+
@objc(removeAlias:) func removeAlias(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
104
|
+
@objc(setLanguage:) func setLanguage(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
105
|
+
@objc(addEmail:) func addEmail(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
106
|
+
@objc(removeEmail:) func removeEmail(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
107
|
+
@objc(addSms:) func addSms(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
108
|
+
@objc(removeSms:) func removeSms(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
109
|
+
@objc(getUser:) func getUser(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
110
|
+
@objc(getContacts:) func getContacts(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
111
|
+
@objc(getPreferences:) func getPreferences(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
112
|
+
@objc(setPreferences:) func setPreferences(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
113
|
+
@objc(getPushSubscription:) func getPushSubscription(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
114
|
+
@objc(optIn:) func optIn(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
115
|
+
@objc(optOut:) func optOut(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
116
|
+
@objc(getPermission:) func getPermission(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
117
|
+
@objc(requestPermission:) func requestPermission(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
118
|
+
@objc(clearAll:) func clearAll(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
119
|
+
@objc(removeNotification:) func removeNotification(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
120
|
+
@objc(removeGroupedNotifications:) func removeGroupedNotifications(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
121
|
+
@objc(setForegroundHandlerEnabled:) func setForegroundHandlerEnabled(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
122
|
+
@objc(displayNotification:) func displayNotification(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
123
|
+
@objc(sendEvent:) func sendEvent(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
124
|
+
@objc(setLogLevel:) func setLogLevel(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
125
|
+
@objc(addTriggers:) func addTriggers(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
126
|
+
@objc(removeTriggers:) func removeTriggers(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
127
|
+
@objc(clearTriggers:) func clearTriggers(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
128
|
+
@objc(getTriggers:) func getTriggers(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
129
|
+
@objc(setScreen:) func setScreen(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
130
|
+
@objc(setInAppPaused:) func setInAppPaused(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
131
|
+
@objc(getInAppPaused:) func getInAppPaused(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
132
|
+
@objc(inboxList:) func inboxList(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
133
|
+
@objc(inboxMarkRead:) func inboxMarkRead(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
134
|
+
@objc(inboxMarkAllRead:) func inboxMarkAllRead(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
135
|
+
@objc(inboxArchive:) func inboxArchive(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
136
|
+
@objc(inboxUnreadCount:) func inboxUnreadCount(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
137
|
+
@objc(contentCardsList:) func contentCardsList(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
138
|
+
@objc(contentCardEvent:) func contentCardEvent(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
139
|
+
@objc(setupDefaultLiveActivity:) func setupDefaultLiveActivity(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
140
|
+
@objc(startDefaultLiveActivity:) func startDefaultLiveActivity(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
141
|
+
@objc(setLocationShared:) func setLocationShared(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
142
|
+
@objc(isLocationShared:) func isLocationShared(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
143
|
+
@objc(setGeofencingEnabled:) func setGeofencingEnabled(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
144
|
+
@objc(isGeofencingEnabled:) func isGeofencingEnabled(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
145
|
+
@objc(deliveryStatus:) func deliveryStatus(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
146
|
+
@objc(deliveryShouldShowGuidance:) func deliveryShouldShowGuidance(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
147
|
+
@objc(deliveryOpenSettings:) func deliveryOpenSettings(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
148
|
+
@objc(deliveryShowGuidance:) func deliveryShowGuidance(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
149
|
+
@objc(featureFlagsRefresh:) func featureFlagsRefresh(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
150
|
+
@objc(featureFlagsIsEnabled:) func featureFlagsIsEnabled(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
151
|
+
@objc(featureFlagsGetValue:) func featureFlagsGetValue(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
152
|
+
@objc(placementsList:) func placementsList(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
153
|
+
@objc(placementsReportImpression:) func placementsReportImpression(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
154
|
+
@objc(placementsReportClick:) func placementsReportClick(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
155
|
+
@objc(placementsReportDismiss:) func placementsReportDismiss(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
156
|
+
@objc(chatStart:) func chatStart(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
157
|
+
@objc(chatGetConfig:) func chatGetConfig(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
158
|
+
@objc(chatGetConversation:) func chatGetConversation(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
159
|
+
@objc(chatGetMessages:) func chatGetMessages(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
160
|
+
@objc(chatSendMessage:) func chatSendMessage(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
161
|
+
@objc(chatSendAttachment:) func chatSendAttachment(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
162
|
+
@objc(chatMarkRead:) func chatMarkRead(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
163
|
+
@objc(chatRefreshUnreadCount:) func chatRefreshUnreadCount(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
164
|
+
@objc(chatGetUnreadCount:) func chatGetUnreadCount(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
165
|
+
@objc(chatLeaveOfflineMessage:) func chatLeaveOfflineMessage(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
166
|
+
@objc(chatSetTyping:) func chatSetTyping(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
167
|
+
@objc(chatStartListening:) func chatStartListening(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
168
|
+
@objc(chatStopListening:) func chatStopListening(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
169
|
+
@objc(chatAttachmentUrl:) func chatAttachmentUrl(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
170
|
+
@objc(chatGetVisitorId:) func chatGetVisitorId(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
171
|
+
@objc(requestLocationPermission:) func requestLocationPermission(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
172
|
+
@objc(isInitialized:) func isInitialized(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
173
|
+
@objc(setAdsPersonalizationConsent:) func setAdsPersonalizationConsent(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
174
|
+
@objc(getConsents:) func getConsents(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
175
|
+
@objc(registerAdm:) func registerAdm(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
176
|
+
@objc(setAdvertisingId:) func setAdvertisingId(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
177
|
+
@objc(setBadgeCount:) func setBadgeCount(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
178
|
+
@objc(getLocationPermission:) func getLocationPermission(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
179
|
+
@objc(requestBackgroundLocationPermission:) func requestBackgroundLocationPermission(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
180
|
+
@objc(chatIsListening:) func chatIsListening(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
181
|
+
@objc(chatShow:) func chatShow(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
182
|
+
@objc(chatHide:) func chatHide(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
183
|
+
@objc(chatIsPresented:) func chatIsPresented(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
184
|
+
@objc(setUserProperty:) func setUserProperty(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
185
|
+
@objc(getBadgeCount:) func getBadgeCount(_ command: CDVInvokedUrlCommand) { dispatch(command) }
|
|
186
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,54 +1,76 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* cordova-plugin-pushizo tip tanımları. Eklenti `window.Pushizo` ve `window.plugins.Pushizo`
|
|
3
|
-
* olarak yüklenir; TypeScript projelerinde `import Pushizo = require('cordova-plugin-pushizo')`
|
|
4
|
-
* yerine çoğunlukla genel `Pushizo` değişkeni kullanılır.
|
|
5
|
-
*/
|
|
6
|
-
import type { PushizoCore } from '../www/core';
|
|
7
|
-
import type * as Definitions from '../www/definitions';
|
|
8
|
-
|
|
9
|
-
declare const Pushizo: PushizoCore;
|
|
10
|
-
|
|
11
|
-
declare namespace Pushizo {
|
|
12
|
-
type LogLevel = Definitions.LogLevel;
|
|
13
|
-
type InitializeOptions = Definitions.InitializeOptions;
|
|
14
|
-
type LoginOptions = Definitions.LoginOptions;
|
|
15
|
-
type
|
|
16
|
-
type
|
|
17
|
-
type
|
|
18
|
-
type
|
|
19
|
-
type
|
|
20
|
-
type
|
|
21
|
-
type
|
|
22
|
-
type
|
|
23
|
-
type
|
|
24
|
-
type
|
|
25
|
-
type
|
|
26
|
-
type
|
|
27
|
-
type
|
|
28
|
-
type
|
|
29
|
-
type
|
|
30
|
-
type
|
|
31
|
-
type
|
|
32
|
-
type
|
|
33
|
-
type
|
|
34
|
-
type
|
|
35
|
-
type
|
|
36
|
-
type
|
|
37
|
-
type
|
|
38
|
-
type
|
|
39
|
-
type
|
|
40
|
-
type
|
|
41
|
-
type
|
|
42
|
-
type
|
|
43
|
-
type
|
|
44
|
-
type
|
|
45
|
-
type
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
1
|
+
/*
|
|
2
|
+
* cordova-plugin-pushizo tip tanımları. Eklenti `window.Pushizo` ve `window.plugins.Pushizo`
|
|
3
|
+
* olarak yüklenir; TypeScript projelerinde `import Pushizo = require('cordova-plugin-pushizo')`
|
|
4
|
+
* yerine çoğunlukla genel `Pushizo` değişkeni kullanılır.
|
|
5
|
+
*/
|
|
6
|
+
import type { PushizoCore } from '../www/core';
|
|
7
|
+
import type * as Definitions from '../www/definitions';
|
|
8
|
+
|
|
9
|
+
declare const Pushizo: PushizoCore;
|
|
10
|
+
|
|
11
|
+
declare namespace Pushizo {
|
|
12
|
+
type LogLevel = Definitions.LogLevel;
|
|
13
|
+
type InitializeOptions = Definitions.InitializeOptions;
|
|
14
|
+
type LoginOptions = Definitions.LoginOptions;
|
|
15
|
+
type UserProfile = Definitions.UserProfile;
|
|
16
|
+
type UserPropertyValue = Definitions.UserPropertyValue;
|
|
17
|
+
type SendEventOptions = Definitions.SendEventOptions;
|
|
18
|
+
type PushizoNotification = Definitions.PushizoNotification;
|
|
19
|
+
type NotificationClickEvent = Definitions.NotificationClickEvent;
|
|
20
|
+
type ForegroundWillDisplayEvent = Definitions.ForegroundWillDisplayEvent;
|
|
21
|
+
type PushSubscriptionState = Definitions.PushSubscriptionState;
|
|
22
|
+
type PermissionChangeEvent = Definitions.PermissionChangeEvent;
|
|
23
|
+
type InAppClickEvent = Definitions.InAppClickEvent;
|
|
24
|
+
type InAppLifecycleEvent = Definitions.InAppLifecycleEvent;
|
|
25
|
+
type InAppLifecycleListener = Definitions.InAppLifecycleListener;
|
|
26
|
+
type InAppTriggerValue = Definitions.InAppTriggerValue;
|
|
27
|
+
type FeatureFlagValue = Definitions.FeatureFlagValue;
|
|
28
|
+
type InAppMessage = Definitions.InAppMessage;
|
|
29
|
+
type InAppDisplay = Definitions.InAppDisplay;
|
|
30
|
+
type InAppLayout = Definitions.InAppLayout;
|
|
31
|
+
type InAppBlock = Definitions.InAppBlock;
|
|
32
|
+
type InAppButton = Definitions.InAppButton;
|
|
33
|
+
type InAppCarouselCard = Definitions.InAppCarouselCard;
|
|
34
|
+
type InAppAction = Definitions.InAppAction;
|
|
35
|
+
type InAppTrigger = Definitions.InAppTrigger;
|
|
36
|
+
type PlacementListOptions = Definitions.PlacementListOptions;
|
|
37
|
+
type LiveActivityValue = Definitions.LiveActivityValue;
|
|
38
|
+
type InboxItem = Definitions.InboxItem;
|
|
39
|
+
type InboxPage = Definitions.InboxPage;
|
|
40
|
+
type InboxListOptions = Definitions.InboxListOptions;
|
|
41
|
+
type InboxChangeEvent = Definitions.InboxChangeEvent;
|
|
42
|
+
type ContentCard = Definitions.ContentCard;
|
|
43
|
+
type ContentCardFeed = Definitions.ContentCardFeed;
|
|
44
|
+
type ContentCardType = Definitions.ContentCardType;
|
|
45
|
+
type DeliveryRisk = Definitions.DeliveryRisk;
|
|
46
|
+
type DeliverySetting = Definitions.DeliverySetting;
|
|
47
|
+
type DeliveryStatus = Definitions.DeliveryStatus;
|
|
48
|
+
type DeliveryGuidanceOptions = Definitions.DeliveryGuidanceOptions;
|
|
49
|
+
type PreferenceChannel = Definitions.PreferenceChannel;
|
|
50
|
+
type UserPreference = Definitions.UserPreference;
|
|
51
|
+
type PreferenceCategory = Definitions.PreferenceCategory;
|
|
52
|
+
type UserPreferences = Definitions.UserPreferences;
|
|
53
|
+
type PreferenceInput = Definitions.PreferenceInput;
|
|
54
|
+
type UserConsent = Definitions.UserConsent;
|
|
55
|
+
type ChatMessage = Definitions.ChatMessage;
|
|
56
|
+
type ChatAttachment = Definitions.ChatAttachment;
|
|
57
|
+
type ChatQuickReply = Definitions.ChatQuickReply;
|
|
58
|
+
type ChatConversation = Definitions.ChatConversation;
|
|
59
|
+
type ChatConversationState = Definitions.ChatConversationState;
|
|
60
|
+
type ChatMessagePage = Definitions.ChatMessagePage;
|
|
61
|
+
type ChatIdentifyResult = Definitions.ChatIdentifyResult;
|
|
62
|
+
type ChatConfig = Definitions.ChatConfig;
|
|
63
|
+
type ChatStartOptions = Definitions.ChatStartOptions;
|
|
64
|
+
type ChatMessagesOptions = Definitions.ChatMessagesOptions;
|
|
65
|
+
type ChatAttachmentSource = Definitions.ChatAttachmentSource;
|
|
66
|
+
type ChatAttachmentOptions = Definitions.ChatAttachmentOptions;
|
|
67
|
+
type ChatEventMap = Definitions.ChatEventMap;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export = Pushizo;
|
|
71
|
+
|
|
72
|
+
declare global {
|
|
73
|
+
interface Window {
|
|
74
|
+
Pushizo: PushizoCore;
|
|
75
|
+
}
|
|
76
|
+
}
|