@geophrase/core 1.0.0 → 1.0.1
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/index.d.ts +26 -0
- package/package.json +9 -2
package/index.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface GeophraseAddress {
|
|
2
|
+
phrase: string;
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface GeophraseError {
|
|
7
|
+
type: 'API_ERROR' | 'NETWORK_ERROR';
|
|
8
|
+
status?: number;
|
|
9
|
+
message: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface GeophraseOptions {
|
|
13
|
+
key: string;
|
|
14
|
+
order_id?: string;
|
|
15
|
+
phone?: string;
|
|
16
|
+
onSuccess: (address: GeophraseAddress) => void;
|
|
17
|
+
onError?: (error: GeophraseError) => void;
|
|
18
|
+
onClose?: () => void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default class Geophrase {
|
|
22
|
+
constructor(options: GeophraseOptions);
|
|
23
|
+
open(): void;
|
|
24
|
+
close(): void;
|
|
25
|
+
destroy(): void;
|
|
26
|
+
}
|
package/package.json
CHANGED