-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
77 lines (60 loc) · 1.57 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
* Copyright (c) 2017-present Muneeb Samuels. All Rights Reserved. See License.txt for license information.
*/
import * as firebase from "firebase";
import {Action, Reducer, Store} from "redux";
export type GeoPoint = {
latitude: number;
longitude: number;
}
export type Address = {
address: string;
location?: GeoPoint;
postalCode?: string;
city?: string;
province?: string;
country?: string;
}
export type Customer = {
firstName: string;
lastName: string;
idNumber: string;
address: Address;
}
export interface UserActions {
loginRequest(phoneNumber: string, recaptureResult: string): Action & {
phoneNumber: string,
recaptureResult: string
};
confirmationRequest (confirmationResult: firebase.auth.ConfirmationResult, code: string): Action & {
confirmationResult: firebase.auth.ConfirmationResult,
code: string
};
signOutRequest(): Action;
getSessionTokenRequest(): Action;
}
export interface AppActions {
appInitStarted();
appInitFinished();
}
export interface CustomerActions {
createCustomerRequest(customer: Customer): Action & {
customer: Customer
};
deleteCustomerRequest(customerId: string): Action & {
customerId: string
};
customersRequest(): Action;
}
export interface SearchActions {
searchCustomersRequest(query: string): Action & {
query: string
};
}
export function configureStore(storage: Object, firebaseConfig: Object, rrfConfig: Object, appReducer?: Reducer): Store;
export namespace sagaMiddleware {
export function run(...sagas);
}
export namespace sagas {
const prototype = {};
}