edfapay-softpos-sdk-rn 1.0.2 → 1.0.3-dev.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/android/build.gradle +5 -1
- package/package.json +4 -3
- package/src/EdfaPayPlugin.ts +0 -551
- package/src/NativeEdfapaySoftposSdkRn.ts +0 -7
- package/src/bridge.ts +0 -106
- package/src/enums/Env.ts +0 -7
- package/src/enums/FlowType.ts +0 -5
- package/src/enums/FunctionCode.ts +0 -8
- package/src/enums/PaymentMethod.ts +0 -4
- package/src/enums/Presentation.ts +0 -12
- package/src/enums/PurchaseSecondaryAction.ts +0 -5
- package/src/enums/TransactionType.ts +0 -11
- package/src/globals.d.ts +0 -1
- package/src/index.tsx +0 -52
- package/src/models/BnplResponse.ts +0 -31
- package/src/models/EdfaPayCredentials.ts +0 -36
- package/src/models/InvoiceRequest.ts +0 -93
- package/src/models/Location.ts +0 -14
- package/src/models/Pagination.ts +0 -29
- package/src/models/PresentationConfig.ts +0 -105
- package/src/models/SdkTheme.ts +0 -64
- package/src/models/Terminal.ts +0 -41
- package/src/models/TerminalBindingTask.ts +0 -32
- package/src/models/Transaction.ts +0 -39
- package/src/models/TxnParams.ts +0 -26
- package/src/models/UserInfo.ts +0 -50
- package/src/multiply.native.tsx +0 -5
- package/src/multiply.tsx +0 -5
- package/src/namespaces/Extension.ts +0 -194
- package/src/namespaces/RemoteChannel.ts +0 -43
- package/src/namespaces/Utils.ts +0 -91
- package/src/types.ts +0 -30
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { TransactionType } from '../enums/TransactionType';
|
|
2
|
-
|
|
3
|
-
/// Lightweight transaction reference used for reverse/void/capture/refund.
|
|
4
|
-
/// Matches: Transaction.withRRN(...) / Transaction.withTxnNumber(...) in native SDK.
|
|
5
|
-
export class Transaction {
|
|
6
|
-
private constructor(
|
|
7
|
-
public readonly rrn?: string,
|
|
8
|
-
public readonly txnNumber?: string,
|
|
9
|
-
public readonly txnDate?: string, // ISO date string formatted as YYYY-MM-DD
|
|
10
|
-
public readonly type?: TransactionType
|
|
11
|
-
) {}
|
|
12
|
-
|
|
13
|
-
/// Create a transaction reference using RRN (for refund, capture, reversal).
|
|
14
|
-
static withRRN(
|
|
15
|
-
rrn: string,
|
|
16
|
-
txnDate?: string,
|
|
17
|
-
type?: TransactionType
|
|
18
|
-
): Transaction {
|
|
19
|
-
return new Transaction(rrn, undefined, txnDate, type);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/// Create a transaction reference using transaction number.
|
|
23
|
-
static withTxnNumber(
|
|
24
|
-
txnNumber: string,
|
|
25
|
-
txnDate?: string,
|
|
26
|
-
type?: TransactionType
|
|
27
|
-
): Transaction {
|
|
28
|
-
return new Transaction(undefined, txnNumber, txnDate, type);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
toJSON(): Record<string, any> {
|
|
32
|
-
return {
|
|
33
|
-
rrn: this.rrn,
|
|
34
|
-
txnNumber: this.txnNumber,
|
|
35
|
-
txnDate: this.txnDate,
|
|
36
|
-
type: this.type,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
}
|
package/src/models/TxnParams.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Transaction } from './Transaction';
|
|
2
|
-
|
|
3
|
-
/// Transaction parameters. Matches: TxnParams in native SDK.
|
|
4
|
-
export class TxnParams {
|
|
5
|
-
public originalTransaction?: Transaction;
|
|
6
|
-
|
|
7
|
-
constructor(
|
|
8
|
-
public readonly amount: string,
|
|
9
|
-
public readonly orderId?: string,
|
|
10
|
-
originalTransaction?: Transaction,
|
|
11
|
-
) {
|
|
12
|
-
this.originalTransaction = originalTransaction;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
setOriginalTransaction(txn: Transaction): void {
|
|
16
|
-
this.originalTransaction = txn;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
toJSON(): Record<string, any> {
|
|
20
|
-
return {
|
|
21
|
-
amount: this.amount,
|
|
22
|
-
orderId: this.orderId,
|
|
23
|
-
originalTransaction: this.originalTransaction?.toJSON(),
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
}
|
package/src/models/UserInfo.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/// User information returned by Extension.getUserInfo().
|
|
2
|
-
/// Mirrors native UserInfo class.
|
|
3
|
-
export class UserInfo {
|
|
4
|
-
constructor(
|
|
5
|
-
public readonly id: number,
|
|
6
|
-
public readonly userId: string,
|
|
7
|
-
public readonly username: string,
|
|
8
|
-
public readonly businessUnitId: string,
|
|
9
|
-
public readonly keyHash: string,
|
|
10
|
-
public readonly status: boolean,
|
|
11
|
-
public readonly deleted: boolean,
|
|
12
|
-
public readonly role: string,
|
|
13
|
-
public readonly createdAt: number,
|
|
14
|
-
public readonly updatedAt?: number,
|
|
15
|
-
) {}
|
|
16
|
-
|
|
17
|
-
static fromJSON(json: Record<string, any>): UserInfo {
|
|
18
|
-
return new UserInfo(
|
|
19
|
-
(json['id'] as number) ?? 0,
|
|
20
|
-
(json['userID'] as string) ?? '',
|
|
21
|
-
(json['username'] as string) ?? '',
|
|
22
|
-
(json['businessUnitID'] as string) ?? '',
|
|
23
|
-
(json['keyHash'] as string) ?? '',
|
|
24
|
-
(json['status'] as boolean) ?? false,
|
|
25
|
-
(json['deleted'] as boolean) ?? false,
|
|
26
|
-
(json['role'] as string) ?? '',
|
|
27
|
-
(json['createdAt'] as number) ?? 0,
|
|
28
|
-
json['updatedAt'] as number | undefined,
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
toJSON(): Record<string, any> {
|
|
33
|
-
return {
|
|
34
|
-
id: this.id,
|
|
35
|
-
userID: this.userId,
|
|
36
|
-
username: this.username,
|
|
37
|
-
businessUnitID: this.businessUnitId,
|
|
38
|
-
keyHash: this.keyHash,
|
|
39
|
-
status: this.status,
|
|
40
|
-
deleted: this.deleted,
|
|
41
|
-
role: this.role,
|
|
42
|
-
createdAt: this.createdAt,
|
|
43
|
-
updatedAt: this.updatedAt,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
toString(): string {
|
|
48
|
-
return `UserInfo(id: ${this.id}, username: ${this.username}, role: ${this.role})`;
|
|
49
|
-
}
|
|
50
|
-
}
|
package/src/multiply.native.tsx
DELETED
package/src/multiply.tsx
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { EdfaPayBridge } from '../bridge';
|
|
2
|
-
import { Location } from '../models/Location';
|
|
3
|
-
import { FunctionCode } from '../enums/FunctionCode';
|
|
4
|
-
import type {
|
|
5
|
-
OnSuccessCallback,
|
|
6
|
-
OnErrorCallback,
|
|
7
|
-
OnTerminalBindingTask,
|
|
8
|
-
} from '../types';
|
|
9
|
-
|
|
10
|
-
/// EdfaPayPlugin.Extension — advanced methods for custom integrations.
|
|
11
|
-
/// Matches: EdfaPayPlugin.Extension in native SDK.
|
|
12
|
-
export class PluginExtension {
|
|
13
|
-
private constructor() {}
|
|
14
|
-
|
|
15
|
-
static create(): PluginExtension {
|
|
16
|
-
return new PluginExtension();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
init(params: {
|
|
20
|
-
onSuccess: OnSuccessCallback;
|
|
21
|
-
onError: OnErrorCallback;
|
|
22
|
-
}): void {
|
|
23
|
-
EdfaPayBridge.invoke('Extension.init', {}, {
|
|
24
|
-
onSuccess: params.onSuccess,
|
|
25
|
-
onError: params.onError,
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
loginWithCredentials(params: {
|
|
30
|
-
email: string;
|
|
31
|
-
password: string;
|
|
32
|
-
location: Location;
|
|
33
|
-
onSuccess: OnSuccessCallback;
|
|
34
|
-
onError: OnErrorCallback;
|
|
35
|
-
}): void {
|
|
36
|
-
EdfaPayBridge.invoke(
|
|
37
|
-
'Extension.loginWithCredentials',
|
|
38
|
-
{ email: params.email, password: params.password, location: params.location.toJSON() },
|
|
39
|
-
{
|
|
40
|
-
onSuccess: params.onSuccess,
|
|
41
|
-
onError: params.onError,
|
|
42
|
-
},
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
loginWithToken(params: {
|
|
47
|
-
token: string;
|
|
48
|
-
location: Location;
|
|
49
|
-
onSuccess: OnSuccessCallback;
|
|
50
|
-
onError: OnErrorCallback;
|
|
51
|
-
}): void {
|
|
52
|
-
EdfaPayBridge.invoke(
|
|
53
|
-
'Extension.loginWithToken',
|
|
54
|
-
{ token: params.token, location: params.location.toJSON() },
|
|
55
|
-
{
|
|
56
|
-
onSuccess: params.onSuccess,
|
|
57
|
-
onError: params.onError,
|
|
58
|
-
},
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
verifyOtp(params: {
|
|
63
|
-
sessionId: string;
|
|
64
|
-
otp: string;
|
|
65
|
-
onSuccess: OnSuccessCallback;
|
|
66
|
-
onError: OnErrorCallback;
|
|
67
|
-
}): void {
|
|
68
|
-
EdfaPayBridge.invoke(
|
|
69
|
-
'Extension.verifyOtp',
|
|
70
|
-
{ sessionId: params.sessionId, otp: params.otp },
|
|
71
|
-
{
|
|
72
|
-
onSuccess: params.onSuccess,
|
|
73
|
-
onError: params.onError,
|
|
74
|
-
},
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
resendOtp(params: {
|
|
79
|
-
sessionId: string;
|
|
80
|
-
onSuccess: OnSuccessCallback;
|
|
81
|
-
onError: OnErrorCallback;
|
|
82
|
-
}): void {
|
|
83
|
-
EdfaPayBridge.invoke(
|
|
84
|
-
'Extension.resendOtp',
|
|
85
|
-
{ sessionId: params.sessionId },
|
|
86
|
-
{
|
|
87
|
-
onSuccess: params.onSuccess,
|
|
88
|
-
onError: params.onError,
|
|
89
|
-
},
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
getAvailableTerminal(params: {
|
|
94
|
-
onSuccess: OnSuccessCallback;
|
|
95
|
-
onError: OnErrorCallback;
|
|
96
|
-
}): void {
|
|
97
|
-
EdfaPayBridge.invoke('Extension.getAvailableTerminal', {}, {
|
|
98
|
-
onSuccess: params.onSuccess,
|
|
99
|
-
onError: params.onError,
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
registerTerminal(params: {
|
|
104
|
-
trsm: string;
|
|
105
|
-
onSuccess: OnSuccessCallback;
|
|
106
|
-
onError: OnErrorCallback;
|
|
107
|
-
}): void {
|
|
108
|
-
EdfaPayBridge.invoke(
|
|
109
|
-
'Extension.registerTerminal',
|
|
110
|
-
{ trsm: params.trsm },
|
|
111
|
-
{
|
|
112
|
-
onSuccess: params.onSuccess,
|
|
113
|
-
onError: params.onError,
|
|
114
|
-
},
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
getTerminalConfig(params: {
|
|
119
|
-
forceDownload?: boolean;
|
|
120
|
-
configurationType?: FunctionCode;
|
|
121
|
-
onSuccess: OnSuccessCallback;
|
|
122
|
-
onError: OnErrorCallback;
|
|
123
|
-
}): void {
|
|
124
|
-
EdfaPayBridge.invoke(
|
|
125
|
-
'Extension.getTerminalConfig',
|
|
126
|
-
{
|
|
127
|
-
forceDownload: params.forceDownload ?? false,
|
|
128
|
-
configurationType: params.configurationType ?? FunctionCode.FULL_TERMINAL_CONFIGURATION,
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
onSuccess: params.onSuccess,
|
|
132
|
-
onError: params.onError,
|
|
133
|
-
},
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
getInitialKey(params: {
|
|
138
|
-
onSuccess: OnSuccessCallback;
|
|
139
|
-
onError: OnErrorCallback;
|
|
140
|
-
}): void {
|
|
141
|
-
EdfaPayBridge.invoke('Extension.getInitialKey', {}, {
|
|
142
|
-
onSuccess: params.onSuccess,
|
|
143
|
-
onError: params.onError,
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
renewSessionIfRequiredAndPossible(params: {
|
|
148
|
-
onSuccess: OnSuccessCallback;
|
|
149
|
-
onError: OnErrorCallback;
|
|
150
|
-
}): void {
|
|
151
|
-
EdfaPayBridge.invoke('Extension.renewSessionIfRequiredAndPossible', {}, {
|
|
152
|
-
onSuccess: params.onSuccess,
|
|
153
|
-
onError: params.onError,
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
initKernels(params: {
|
|
158
|
-
onSuccess: OnSuccessCallback;
|
|
159
|
-
onError: OnErrorCallback;
|
|
160
|
-
}): void {
|
|
161
|
-
EdfaPayBridge.invoke('Extension.initKernels', {}, {
|
|
162
|
-
onSuccess: params.onSuccess,
|
|
163
|
-
onError: params.onError,
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
prepareTerminalWithToken(params: {
|
|
168
|
-
token: string;
|
|
169
|
-
location: Location;
|
|
170
|
-
onTerminalBindingTask: OnTerminalBindingTask;
|
|
171
|
-
onSuccess: OnSuccessCallback;
|
|
172
|
-
onError: OnErrorCallback;
|
|
173
|
-
}): void {
|
|
174
|
-
EdfaPayBridge.invoke(
|
|
175
|
-
'Extension.prepareTerminalWithToken',
|
|
176
|
-
{ token: params.token, location: params.location.toJSON() },
|
|
177
|
-
{
|
|
178
|
-
onTerminalBindingTask: params.onTerminalBindingTask,
|
|
179
|
-
onSuccess: params.onSuccess,
|
|
180
|
-
onError: params.onError,
|
|
181
|
-
},
|
|
182
|
-
);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
getUserInfo(params: {
|
|
186
|
-
onSuccess: OnSuccessCallback;
|
|
187
|
-
onError: OnErrorCallback;
|
|
188
|
-
}): void {
|
|
189
|
-
EdfaPayBridge.invoke('Extension.getUserInfo', {}, {
|
|
190
|
-
onSuccess: params.onSuccess,
|
|
191
|
-
onError: params.onError,
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { EdfaPayBridge } from '../bridge';
|
|
2
|
-
|
|
3
|
-
/// Builder returned by RemoteAccess.LocalNetwork(...). Call .open() to start.
|
|
4
|
-
export class LocalNetworkChannel {
|
|
5
|
-
constructor(
|
|
6
|
-
private readonly port: number,
|
|
7
|
-
private readonly timeout: number,
|
|
8
|
-
) {}
|
|
9
|
-
|
|
10
|
-
open(): void {
|
|
11
|
-
EdfaPayBridge.invoke('RemoteChannel.LocalNetwork.open', {
|
|
12
|
-
port: this.port,
|
|
13
|
-
timeout: this.timeout,
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
close(): void {
|
|
18
|
-
EdfaPayBridge.invoke('RemoteChannel.LocalNetwork.close', {});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/// EdfaPayPlugin.RemoteChannel — local network remote access.
|
|
23
|
-
/// Matches: EdfaPayPlugin.RemoteChannel in native SDK.
|
|
24
|
-
export class RemoteAccess {
|
|
25
|
-
private constructor() {}
|
|
26
|
-
|
|
27
|
-
static create(): RemoteAccess {
|
|
28
|
-
return new RemoteAccess();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Configure and return a local network channel builder.
|
|
33
|
-
* Usage: EdfaPayPlugin.RemoteChannel.LocalNetwork({ port: 8080, timeout: 30 }).open()
|
|
34
|
-
*/
|
|
35
|
-
LocalNetwork(params: { port: number; timeout: number }): LocalNetworkChannel {
|
|
36
|
-
return new LocalNetworkChannel(params.port, params.timeout);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/** Alias with camelCase for idiomatic TS: .localNetwork(...) */
|
|
40
|
-
localNetwork(params: { port: number; timeout: number }): LocalNetworkChannel {
|
|
41
|
-
return this.LocalNetwork(params);
|
|
42
|
-
}
|
|
43
|
-
}
|
package/src/namespaces/Utils.ts
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { EdfaPayBridge } from '../bridge';
|
|
2
|
-
import { Location } from '../models/Location';
|
|
3
|
-
import type { OnErrorCallback } from '../types';
|
|
4
|
-
|
|
5
|
-
/// EdfaPayPlugin.Utils — device and location utilities.
|
|
6
|
-
/// Matches: EdfaPayPlugin.Utils in native SDK.
|
|
7
|
-
export class PluginUtils {
|
|
8
|
-
private constructor() {}
|
|
9
|
-
|
|
10
|
-
static create(): PluginUtils {
|
|
11
|
-
return new PluginUtils();
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/// Returns unique device identifier.
|
|
15
|
-
async getDeviceId(merchantId?: number): Promise<string | null> {
|
|
16
|
-
const result = await EdfaPayBridge.invokeAsync('Utils.getDeviceId', { merchantId });
|
|
17
|
-
return result as string | null;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/// Returns true if location permission is granted.
|
|
21
|
-
async haveLocationPermission(): Promise<boolean> {
|
|
22
|
-
const result = await EdfaPayBridge.invokeAsync('Utils.haveLocationPermission');
|
|
23
|
-
return (result as boolean) ?? false;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/// Requests location permission. [callback] receives true if granted.
|
|
27
|
-
requestLocationPermission(params: { callback: (permitted: boolean) => void }): void {
|
|
28
|
-
EdfaPayBridge.invoke('Utils.requestLocationPermission', {}, {
|
|
29
|
-
onSuccess: (p: Record<string, any>) => params.callback((p['permitted'] as boolean) ?? false),
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/// Gets current device location.
|
|
34
|
-
/// [completion] receives (location Map?, hasPermission).
|
|
35
|
-
currentLocation(params: {
|
|
36
|
-
completion: (location: Record<string, any> | null, hasPermission: boolean) => void;
|
|
37
|
-
}): void {
|
|
38
|
-
EdfaPayBridge.invoke('Utils.currentLocation', {}, {
|
|
39
|
-
onSuccess: (p: Record<string, any>) =>
|
|
40
|
-
params.completion(
|
|
41
|
-
p['location'] as Record<string, any> | null,
|
|
42
|
-
(p['permission'] as boolean) ?? false,
|
|
43
|
-
),
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/// Checks if [location] is mocked/fake.
|
|
48
|
-
async isLocationMocked(location: Location): Promise<boolean> {
|
|
49
|
-
const result = await EdfaPayBridge.invokeAsync('Utils.isLocationMocked', {
|
|
50
|
-
location: location.toJSON(),
|
|
51
|
-
});
|
|
52
|
-
return (result as boolean) ?? false;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/// Shows an SDK-styled message dialog.
|
|
56
|
-
showMessageDialog(params: {
|
|
57
|
-
title: string;
|
|
58
|
-
message: string;
|
|
59
|
-
onClose?: () => void;
|
|
60
|
-
}): void {
|
|
61
|
-
EdfaPayBridge.invoke(
|
|
62
|
-
'Utils.showMessageDialog',
|
|
63
|
-
{ title: params.title, message: params.message },
|
|
64
|
-
params.onClose ? { onSuccess: (_: any) => params.onClose!() } : undefined,
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/// Saves a value encrypted to DataStore.
|
|
69
|
-
saveData(params: {
|
|
70
|
-
key: string;
|
|
71
|
-
value: string;
|
|
72
|
-
onSuccess: (success: boolean) => void;
|
|
73
|
-
onError: OnErrorCallback;
|
|
74
|
-
}): void {
|
|
75
|
-
EdfaPayBridge.invoke(
|
|
76
|
-
'Utils.saveData',
|
|
77
|
-
{ key: params.key, value: params.value },
|
|
78
|
-
{
|
|
79
|
-
onSuccess: (p: Record<string, any>) =>
|
|
80
|
-
params.onSuccess((p['success'] as boolean) ?? false),
|
|
81
|
-
onError: params.onError,
|
|
82
|
-
},
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/// Retrieves a value from encrypted DataStore.
|
|
87
|
-
async getData(key: string): Promise<string | null> {
|
|
88
|
-
const result = await EdfaPayBridge.invokeAsync('Utils.getData', { key });
|
|
89
|
-
return result as string | null;
|
|
90
|
-
}
|
|
91
|
-
}
|
package/src/types.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Terminal } from './models/Terminal';
|
|
2
|
-
import { TerminalBindingTask } from './models/TerminalBindingTask';
|
|
3
|
-
|
|
4
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
5
|
-
// Callback type aliases — mirror native Kotlin typealiases exactly
|
|
6
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
7
|
-
|
|
8
|
-
export type ProcessCompleteCallback = (
|
|
9
|
-
status: boolean,
|
|
10
|
-
code: string | null,
|
|
11
|
-
transaction: Record<string, any> | null,
|
|
12
|
-
isFlowComplete: boolean
|
|
13
|
-
) => void;
|
|
14
|
-
|
|
15
|
-
/** Alias for ProcessCompleteCallback — mirrors Dart's onProcessComplete typedef */
|
|
16
|
-
export type OnProcessComplete = ProcessCompleteCallback;
|
|
17
|
-
|
|
18
|
-
export type TimeOutCallback = () => void;
|
|
19
|
-
|
|
20
|
-
export type CancelByUserCallback = () => void;
|
|
21
|
-
|
|
22
|
-
export type OnErrorCallback = (error: Record<string, any>) => void;
|
|
23
|
-
|
|
24
|
-
export type OnSuccessCallback = (result: Record<string, any>) => void;
|
|
25
|
-
|
|
26
|
-
export type OnTerminalBindingTask = (task: TerminalBindingTask) => void;
|
|
27
|
-
export type OnTerminalRefresh = (
|
|
28
|
-
error: Record<string, any>,
|
|
29
|
-
list: Terminal[]
|
|
30
|
-
) => void;
|