@pinwheel/react-native-pinwheel 3.5.2 → 3.5.4
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/android/build.gradle +1 -1
- package/android/src/main/java/com/rtnpinwheel/Pinwheel.kt +1 -1
- package/android/src/main/java/com/rtnpinwheel/PinwheelEventsModule.kt +76 -38
- package/ios/RTNPinwheelView.mm +2 -6
- package/package.json +1 -1
- package/src/client-events/registry/v2.3.d.ts +80 -99
- package/src/client-events/registry/v2.3.ts +2 -1
package/android/build.gradle
CHANGED
|
@@ -89,7 +89,7 @@ class Pinwheel : FrameLayout {
|
|
|
89
89
|
Handler(Looper.getMainLooper()).post {
|
|
90
90
|
if (this.pinwheelFragment == null) {
|
|
91
91
|
this.token?.let {
|
|
92
|
-
val pinwheelFragment = PinwheelFragment.newInstanceWithAdvancedOptions(it, "react native", "3.5.
|
|
92
|
+
val pinwheelFragment = PinwheelFragment.newInstanceWithAdvancedOptions(it, "react native", "3.5.4", getReactNativeVersion(), this.handleInsets, this.useDarkMode)
|
|
93
93
|
pinwheelEventListener?.let { listener ->
|
|
94
94
|
pinwheelFragment.pinwheelEventListener = listener
|
|
95
95
|
}
|
|
@@ -14,6 +14,7 @@ import com.underdog_tech.pinwheel_android.model.PinwheelEventType
|
|
|
14
14
|
import com.underdog_tech.pinwheel_android.model.PinwheelInputAllocationPayload
|
|
15
15
|
import com.underdog_tech.pinwheel_android.model.PinwheelTarget
|
|
16
16
|
import com.underdog_tech.pinwheel_android.model.PinwheelAllocation
|
|
17
|
+
import com.underdog_tech.pinwheel_android.model.PinwheelBillSwitchEventPayload
|
|
17
18
|
import com.underdog_tech.pinwheel_android.model.PinwheelParams
|
|
18
19
|
import com.underdog_tech.pinwheel_android.model.PinwheelResult
|
|
19
20
|
import com.underdog_tech.pinwheel_android.model.PinwheelError
|
|
@@ -22,56 +23,58 @@ import com.underdog_tech.pinwheel_android.model.PinwheelSelectedPlatformPayload
|
|
|
22
23
|
import com.underdog_tech.pinwheel_android.model.PinwheelLoginPayload
|
|
23
24
|
import com.underdog_tech.pinwheel_android.model.PinwheelLoginAttemptPayload
|
|
24
25
|
import com.underdog_tech.pinwheel_android.model.PinwheelDDFormCreatePayload
|
|
26
|
+
import com.underdog_tech.pinwheel_android.model.PinwheelExternalAccountConnectedPayload
|
|
27
|
+
import com.underdog_tech.pinwheel_android.model.PinwheelOtherEventPayload
|
|
25
28
|
import com.underdog_tech.pinwheel_android.model.PinwheelScreenTransitionPayload
|
|
26
29
|
|
|
27
30
|
@ReactModule(name = PinwheelEventsModule.NAME)
|
|
28
31
|
class PinwheelEventsModule(private val context: ReactApplicationContext) : ReactContextBaseJavaModule(context), PinwheelEventListener {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
init {
|
|
33
|
+
Companion.context = context
|
|
34
|
+
}
|
|
32
35
|
|
|
33
|
-
|
|
36
|
+
override fun getName(): String = NAME
|
|
34
37
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
@ReactMethod
|
|
39
|
+
fun setListener() {
|
|
40
|
+
hasListeners = true;
|
|
41
|
+
}
|
|
39
42
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
@ReactMethod
|
|
44
|
+
fun removeListener() {
|
|
45
|
+
hasListeners = false;
|
|
46
|
+
}
|
|
44
47
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
@ReactMethod
|
|
49
|
+
fun addListener(eventName: String) {
|
|
50
|
+
// Keep: Required for RN built in Event Emitter Calls.
|
|
51
|
+
}
|
|
49
52
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
@ReactMethod
|
|
54
|
+
fun removeListeners(count: Int) {
|
|
55
|
+
// Keep: Required for RN built in Event Emitter Calls.
|
|
56
|
+
}
|
|
54
57
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
val params = WritableNativeMap()
|
|
59
|
-
params.putString("name", eventName.toString())
|
|
60
|
-
if (payload != null) {
|
|
61
|
-
params.putMap("payload", payload.toWritableMap())
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
context
|
|
65
|
-
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
|
|
66
|
-
.emit(Companion.PinwheelEventName, params)
|
|
67
|
-
}
|
|
58
|
+
override fun onEvent(eventName: PinwheelEventType, payload: PinwheelEventPayload?) {
|
|
59
|
+
if (!hasListeners) return
|
|
68
60
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
private var hasListeners = false;
|
|
61
|
+
val params = WritableNativeMap()
|
|
62
|
+
params.putString("name", eventName.toString())
|
|
63
|
+
if (payload != null) {
|
|
64
|
+
params.putMap("payload", payload.toWritableMap())
|
|
74
65
|
}
|
|
66
|
+
|
|
67
|
+
context
|
|
68
|
+
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
|
|
69
|
+
.emit(Companion.PinwheelEventName, params)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
companion object {
|
|
73
|
+
const val NAME = "RTNPinwheelEvents"
|
|
74
|
+
const val PinwheelEventName = "PINWHEEL_EVENT"
|
|
75
|
+
private var context: ReactApplicationContext? = null
|
|
76
|
+
private var hasListeners = false;
|
|
77
|
+
}
|
|
75
78
|
}
|
|
76
79
|
|
|
77
80
|
fun PinwheelTarget.toWritableMap(): WritableMap {
|
|
@@ -109,30 +112,37 @@ fun PinwheelEventPayload.toWritableMap(): WritableMap = when (this) {
|
|
|
109
112
|
putString("job", this@toWritableMap.job)
|
|
110
113
|
putMap("params", this@toWritableMap.params?.toWritableMap())
|
|
111
114
|
}
|
|
115
|
+
|
|
112
116
|
is PinwheelError -> Arguments.createMap().apply {
|
|
113
117
|
putString("type", this@toWritableMap.type)
|
|
114
118
|
putString("code", this@toWritableMap.code)
|
|
115
119
|
putString("message", this@toWritableMap.message)
|
|
116
120
|
putBoolean("pendingRetry", this@toWritableMap.pendingRetry)
|
|
117
121
|
}
|
|
122
|
+
|
|
118
123
|
is PinwheelSelectedEmployerPayload -> Arguments.createMap().apply {
|
|
119
124
|
putString("selectedEmployerId", this@toWritableMap.selectedEmployerId)
|
|
120
125
|
putString("selectedEmployerName", this@toWritableMap.selectedEmployerName)
|
|
121
126
|
}
|
|
127
|
+
|
|
122
128
|
is PinwheelSelectedPlatformPayload -> Arguments.createMap().apply {
|
|
123
129
|
putString("selectedPlatformId", this@toWritableMap.selectedPlatformId)
|
|
124
130
|
putString("selectedPlatformName", this@toWritableMap.selectedPlatformName)
|
|
125
131
|
}
|
|
132
|
+
|
|
126
133
|
is PinwheelLoginPayload -> Arguments.createMap().apply {
|
|
127
134
|
putString("accountId", this@toWritableMap.accountId)
|
|
128
135
|
putString("platformId", this@toWritableMap.platformId)
|
|
129
136
|
}
|
|
137
|
+
|
|
130
138
|
is PinwheelLoginAttemptPayload -> Arguments.createMap().apply {
|
|
131
139
|
putString("platformId", this@toWritableMap.platformId)
|
|
132
140
|
}
|
|
141
|
+
|
|
133
142
|
is PinwheelDDFormCreatePayload -> Arguments.createMap().apply {
|
|
134
143
|
putString("url", this@toWritableMap.url)
|
|
135
144
|
}
|
|
145
|
+
|
|
136
146
|
is PinwheelScreenTransitionPayload -> Arguments.createMap().apply {
|
|
137
147
|
putString("screenName", this@toWritableMap.screenName)
|
|
138
148
|
putString("selectedEmployerId", this@toWritableMap.selectedEmployerId)
|
|
@@ -140,5 +150,33 @@ fun PinwheelEventPayload.toWritableMap(): WritableMap = when (this) {
|
|
|
140
150
|
putString("selectedPlatformId", this@toWritableMap.selectedPlatformId)
|
|
141
151
|
putString("selectedPlatformName", this@toWritableMap.selectedPlatformName)
|
|
142
152
|
}
|
|
153
|
+
|
|
154
|
+
is PinwheelOtherEventPayload -> Arguments.createMap().apply {
|
|
155
|
+
putString("name", this@toWritableMap.name)
|
|
156
|
+
val payloadArray = Arguments.createArray()
|
|
157
|
+
this@toWritableMap.payload.forEach { item ->
|
|
158
|
+
val map = Arguments.createMap()
|
|
159
|
+
map.putString("key", item.key)
|
|
160
|
+
map.putString("value", item.value)
|
|
161
|
+
map.putString("type", item.type.name)
|
|
162
|
+
payloadArray.pushMap(map)
|
|
163
|
+
}
|
|
164
|
+
putArray("payload", payloadArray)
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
is PinwheelBillSwitchEventPayload -> Arguments.createMap().apply {
|
|
168
|
+
putString("platformId", this@toWritableMap.platformId)
|
|
169
|
+
putString("platformName", this@toWritableMap.platformName)
|
|
170
|
+
putBoolean("isIntegratedSwitch", this@toWritableMap.isIntegratedSwitch)
|
|
171
|
+
putString("frequency", this@toWritableMap.frequency)
|
|
172
|
+
putString("nextPaymentDate", this@toWritableMap.nextPaymentDate)
|
|
173
|
+
putInt("amountCents", this@toWritableMap.amountCents)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
is PinwheelExternalAccountConnectedPayload -> Arguments.createMap().apply {
|
|
177
|
+
putString("institutionName", this@toWritableMap.institutionName)
|
|
178
|
+
putString("accountName", this@toWritableMap.accountName)
|
|
179
|
+
}
|
|
180
|
+
|
|
143
181
|
else -> throw IllegalArgumentException("Unsupported PinwheelEventPayload type")
|
|
144
182
|
}
|
package/ios/RTNPinwheelView.mm
CHANGED
|
@@ -74,7 +74,7 @@ using namespace facebook::react;
|
|
|
74
74
|
[[PinwheelWrapperVC alloc] initWithToken:self.token
|
|
75
75
|
delegate:self
|
|
76
76
|
sdk:@"react native"
|
|
77
|
-
version:@"3.5.
|
|
77
|
+
version:@"3.5.4"
|
|
78
78
|
useDarkMode:self.useDarkMode
|
|
79
79
|
useAppBoundDomains:NO
|
|
80
80
|
useAppBoundDomainsForNativeLink:NO];
|
|
@@ -97,8 +97,6 @@ using namespace facebook::react;
|
|
|
97
97
|
if (!self.pinwheelWrapperVC) {
|
|
98
98
|
[self initPinwheelWrapperVC];
|
|
99
99
|
}
|
|
100
|
-
} else {
|
|
101
|
-
[self cleanUpPinwheelWrapperVC];
|
|
102
100
|
}
|
|
103
101
|
}
|
|
104
102
|
|
|
@@ -239,7 +237,7 @@ Class<RCTComponentViewProtocol> RTNPinwheelCls(void) {
|
|
|
239
237
|
[[PinwheelWrapperVC alloc] initWithToken:self.token
|
|
240
238
|
delegate:self
|
|
241
239
|
sdk:@"react native"
|
|
242
|
-
version:@"3.5.
|
|
240
|
+
version:@"3.5.4"
|
|
243
241
|
useDarkMode:self.useDarkMode
|
|
244
242
|
useAppBoundDomains:NO
|
|
245
243
|
useAppBoundDomainsForNativeLink:NO];
|
|
@@ -262,8 +260,6 @@ Class<RCTComponentViewProtocol> RTNPinwheelCls(void) {
|
|
|
262
260
|
if (!self.pinwheelWrapperVC) {
|
|
263
261
|
[self initPinwheelWrapperVC];
|
|
264
262
|
}
|
|
265
|
-
} else {
|
|
266
|
-
[self cleanUpPinwheelWrapperVC];
|
|
267
263
|
}
|
|
268
264
|
}
|
|
269
265
|
|
package/package.json
CHANGED
|
@@ -1,80 +1,67 @@
|
|
|
1
1
|
import type { AdditionsType, ModificationsType, RemovalsType } from '../utils';
|
|
2
|
-
export type PinwheelErrorType =
|
|
3
|
-
| 'sandboxError'
|
|
4
|
-
| 'clientError'
|
|
5
|
-
| 'systemError'
|
|
6
|
-
| 'userActionRequired'
|
|
7
|
-
| 'platformError'
|
|
8
|
-
| 'invalidAccountsConfiguration'
|
|
9
|
-
| 'invalidUserInput'
|
|
10
|
-
| 'invalidLinkToken'
|
|
11
|
-
| 'networkError';
|
|
2
|
+
export type PinwheelErrorType = 'sandboxError' | 'clientError' | 'systemError' | 'userActionRequired' | 'platformError' | 'invalidAccountsConfiguration' | 'invalidUserInput' | 'invalidLinkToken' | 'networkError';
|
|
12
3
|
export type LinkApiJob = 'login' | 'direct_deposit_switch' | 'card_switch';
|
|
13
4
|
export type OpenEventPayload = {};
|
|
14
5
|
export type SelectEmployerEventPayload = {
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
selectedEmployerId: string;
|
|
7
|
+
selectedEmployerName: string;
|
|
17
8
|
};
|
|
18
9
|
export type SelectPlatformEventPayload = {
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
selectedPlatformId: string;
|
|
11
|
+
selectedPlatformName: string;
|
|
21
12
|
};
|
|
22
13
|
export type IncorrectPlatformGivenEventPayload = {};
|
|
23
14
|
export type LoginAttemptEventPayload = {
|
|
24
|
-
|
|
15
|
+
platformId: string;
|
|
25
16
|
};
|
|
26
17
|
export type LoginEventPayload = {
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
accountId: string;
|
|
19
|
+
platformId: string;
|
|
29
20
|
};
|
|
30
21
|
export type InputAmountEventPayload = {
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
value: number;
|
|
23
|
+
unit: '$' | '%';
|
|
33
24
|
};
|
|
34
25
|
type _PartialSwitch<T> = {
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
action: 'partial_switch';
|
|
27
|
+
allocation: T;
|
|
37
28
|
};
|
|
38
29
|
type InputAllocationPercentage = _PartialSwitch<{
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
type: 'percentage';
|
|
31
|
+
value: number;
|
|
41
32
|
}>;
|
|
42
33
|
type InputAllocationAmount = _PartialSwitch<{
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
type: 'amount';
|
|
35
|
+
value: number;
|
|
45
36
|
}>;
|
|
46
37
|
type InputAllocationRemainder = _PartialSwitch<{
|
|
47
|
-
|
|
38
|
+
type: 'remainder';
|
|
48
39
|
}>;
|
|
49
|
-
export type InputAllocationEventPayload =
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
| InputAllocationRemainder
|
|
54
|
-
| InputAllocationAmount
|
|
55
|
-
| InputAllocationPercentage;
|
|
40
|
+
export type InputAllocationEventPayload = {
|
|
41
|
+
action: 'full_switch';
|
|
42
|
+
} | InputAllocationRemainder | InputAllocationAmount | InputAllocationPercentage;
|
|
56
43
|
/**
|
|
57
44
|
* @deprecated - Use `InputAllocationEventPayload` instead.
|
|
58
45
|
*/
|
|
59
46
|
export type InputAllocation = InputAllocationEventPayload;
|
|
60
47
|
export type CardSwitchBeginEventPayload = {};
|
|
61
48
|
export type DocUploadsBeginEventPayload = {
|
|
62
|
-
|
|
49
|
+
uploadedDocumentsSubmittedCount?: number;
|
|
63
50
|
};
|
|
64
51
|
export type DocUploadsSubmittedEventPayload = {
|
|
65
|
-
|
|
52
|
+
uploadedDocumentSubmittedCount: number;
|
|
66
53
|
};
|
|
67
54
|
export type DdFormBeginEventPayload = {};
|
|
68
55
|
export type DdFormCreateEventPayload = {
|
|
69
|
-
|
|
56
|
+
url: string;
|
|
70
57
|
};
|
|
71
58
|
export type DdFormDownloadEventPayload = {};
|
|
72
59
|
export type ScreenTransitionEventPayload = {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
60
|
+
screenName: string;
|
|
61
|
+
selectedEmployerId?: string;
|
|
62
|
+
selectedEmployerName?: string;
|
|
63
|
+
selectedPlatformId?: string;
|
|
64
|
+
selectedPlatformName?: string;
|
|
78
65
|
};
|
|
79
66
|
/**
|
|
80
67
|
* @deprecated - Use `ScreenTransitionEventPayload` instead.
|
|
@@ -82,80 +69,74 @@ export type ScreenTransitionEventPayload = {
|
|
|
82
69
|
export type ScreenTransition = ScreenTransitionEventPayload;
|
|
83
70
|
export type ExitEventPayload = Record<string, never>;
|
|
84
71
|
export type SuccessEventPayload = {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
72
|
+
accountId: string;
|
|
73
|
+
platformId: string;
|
|
74
|
+
job: LinkApiJob;
|
|
75
|
+
params?: {
|
|
76
|
+
amount?: {
|
|
77
|
+
value: number;
|
|
78
|
+
unit: '%' | '$';
|
|
79
|
+
};
|
|
92
80
|
};
|
|
93
|
-
};
|
|
94
81
|
};
|
|
95
82
|
export type ErrorEventPayload = {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
83
|
+
type: PinwheelErrorType;
|
|
84
|
+
code: string;
|
|
85
|
+
message: string;
|
|
86
|
+
pendingRetry: boolean;
|
|
100
87
|
};
|
|
101
88
|
export type OtherEventPayload = {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
89
|
+
name: string;
|
|
90
|
+
payload: {
|
|
91
|
+
key: string;
|
|
92
|
+
value: string;
|
|
93
|
+
type: 'string' | 'boolean' | 'number';
|
|
94
|
+
}[];
|
|
108
95
|
};
|
|
109
96
|
export type BillSwitchPayload = {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
97
|
+
platformId: string;
|
|
98
|
+
platformName: string;
|
|
99
|
+
isGuidedSwitch: boolean;
|
|
100
|
+
isIntegratedSwitch: boolean;
|
|
101
|
+
frequency: string;
|
|
102
|
+
nextPaymentDate: string;
|
|
103
|
+
amountCents: number;
|
|
116
104
|
};
|
|
117
105
|
export type ExternalAccountConnectedPayload = {
|
|
118
|
-
|
|
119
|
-
|
|
106
|
+
institutionName: string;
|
|
107
|
+
accountName: string;
|
|
120
108
|
};
|
|
121
109
|
/**
|
|
122
110
|
* @deprecated - Use `ErrorEventPayload` instead.
|
|
123
111
|
*/
|
|
124
112
|
export type PinwheelError = ErrorEventPayload;
|
|
125
113
|
type EventPayloadAdditions = {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
114
|
+
open: OpenEventPayload;
|
|
115
|
+
select_employer: SelectEmployerEventPayload;
|
|
116
|
+
select_platform: SelectPlatformEventPayload;
|
|
117
|
+
incorrect_platform_given: IncorrectPlatformGivenEventPayload;
|
|
118
|
+
login_attempt: LoginAttemptEventPayload;
|
|
119
|
+
login: LoginEventPayload;
|
|
120
|
+
input_amount: InputAmountEventPayload;
|
|
121
|
+
input_allocation: InputAllocationEventPayload;
|
|
122
|
+
card_switch_begin: CardSwitchBeginEventPayload;
|
|
123
|
+
doc_uploads_begin: DocUploadsBeginEventPayload;
|
|
124
|
+
doc_uploads_submitted: DocUploadsSubmittedEventPayload;
|
|
125
|
+
dd_form_begin: DdFormBeginEventPayload;
|
|
126
|
+
dd_form_create: DdFormCreateEventPayload;
|
|
127
|
+
dd_form_download: DdFormDownloadEventPayload;
|
|
128
|
+
screen_transition: ScreenTransitionEventPayload;
|
|
129
|
+
exit: ErrorEventPayload | ExitEventPayload;
|
|
130
|
+
other_event: OtherEventPayload;
|
|
131
|
+
success: SuccessEventPayload;
|
|
132
|
+
error: ErrorEventPayload;
|
|
133
|
+
bill_switch_success: BillSwitchPayload;
|
|
134
|
+
bill_removed: BillSwitchPayload;
|
|
135
|
+
external_account_connected: ExternalAccountConnectedPayload;
|
|
136
|
+
merchant_login_success: LoginEventPayload;
|
|
149
137
|
};
|
|
150
138
|
type EventPayloadModifications = {};
|
|
151
139
|
type EventPayloadRemovals = [];
|
|
152
|
-
export type EventPayloadMap = Omit<
|
|
153
|
-
|
|
154
|
-
ModificationsType<EventPayloadModifications>,
|
|
155
|
-
keyof RemovalsType<EventPayloadRemovals>
|
|
156
|
-
>;
|
|
157
|
-
export type EventHandler = <T extends keyof EventPayloadMap>(
|
|
158
|
-
eventName: T,
|
|
159
|
-
payload: EventPayloadMap[T]
|
|
160
|
-
) => void;
|
|
140
|
+
export type EventPayloadMap = Omit<AdditionsType<EventPayloadAdditions> & ModificationsType<EventPayloadModifications>, keyof RemovalsType<EventPayloadRemovals>>;
|
|
141
|
+
export type EventHandler = <T extends keyof EventPayloadMap>(eventName: T, payload: EventPayloadMap[T]) => void;
|
|
161
142
|
export {};
|
|
@@ -126,7 +126,8 @@ export type OtherEventPayload = {
|
|
|
126
126
|
export type BillSwitchPayload = {
|
|
127
127
|
platformId: string;
|
|
128
128
|
platformName: string;
|
|
129
|
-
isGuidedSwitch: boolean;
|
|
129
|
+
isGuidedSwitch: boolean; // deprecated: will be removed in future version
|
|
130
|
+
isIntegratedSwitch: boolean;
|
|
130
131
|
frequency: string;
|
|
131
132
|
nextPaymentDate: string;
|
|
132
133
|
amountCents: number;
|