This repository was archived by the owner on Dec 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathindex.d.ts
150 lines (119 loc) · 3.59 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/// <reference types="angular" />
/// <reference types="angular-ui-router" />
import * as angular from 'angular';
declare var _: string;
export = _;
declare module 'angular' {
export namespace stormpath {
/**
* STORMPATH_CONFIG
*/
interface IStormpathConfig {
AUTHENTICATION_ENDPOINT: string;
AUTHENTICATION_FAILURE_EVENT_NAME: string;
AUTHENTICATION_SUCCESS_EVENT_NAME: string;
AUTH_SERVICE_NAME: string;
CHANGE_PASSWORD_ENDPOINT: string;
CURRENT_USER_URI: string;
DESTROY_SESSION_ENDPOINT: string;
EMAIL_VERIFICATION_ENDPOINT: string;
ENDPOINT_PREFIX: string;
FORGOT_PASSWORD_ENDPOINT: string;
FORM_CONTENT_TYPE: string;
GET_USER_EVENT: string;
NOT_LOGGED_IN_EVENT: string;
REGISTERED_EVENT_NAME: string;
REGISTER_URI: string;
ROUTE_CHANGE_UNAUTHENTICATED: string;
ROUTE_CHANGE_UNAUTHORIZED: string;
SESSION_END_EVENT: string;
SOCIAL_LOGIN_SERVICE_NAME: string;
STATE_CHANGE_UNAUTHENTICATED: string;
STATE_CHANGE_UNAUTHORIZED: string;
}
/**
* $stormpath
*/
interface IStormpathService {
ngRouter(config: INgRouterConfig): void;
uiRouter(config: IUiRouterConfig): void;
}
interface IRouterConfig {
autoRedirect?: boolean;
defaultPostLoginState?: string;
forbiddenState?: string;
loginState?: string;
}
interface INgRouterConfig extends IRouterConfig {}
interface IUiRouterConfig extends IRouterConfig {}
/**
* sp config
*/
interface ISpConfig {
authenticate?: boolean;
authorize?: {
group: string;
};
waitForUser?: boolean;
}
interface ISpStateConfig extends ISpConfig {}
interface ISpRouteConfig extends ISpConfig {}
/**
* $auth
*/
interface IAuthService {
authenticate<T>(credentialData: any): angular.IPromise<angular.IHttpPromiseCallbackArg<T>>;
endSession<T>(): angular.IPromise<angular.IHttpPromiseCallbackArg<T>>;
}
interface IAuthProvider extends angular.IServiceProvider {}
/**
* $user
*/
interface IUserService {
currentUser: IUser;
create(accountData: IUserAccountData): angular.IPromise<IUser>;
get(bypassCache: boolean): angular.IPromise<IUser>;
passwordResetRequest<T>(data: any): angular.IPromise<angular.IHttpPromiseCallbackArg<T>>;
resendVerificationEmail<T>(data: any): angular.IPromise<angular.IHttpPromiseCallbackArg<T>>;
resetPassword<T>(token: string, data: any): angular.IPromise<angular.IHttpPromiseCallbackArg<T>>;
verify<T>(sptoken: string): angular.IPromise<angular.IHttpPromiseCallbackArg<T>>;
verifyPasswordResetToken<T>(sptoken: string): angular.IPromise<angular.IHttpPromiseCallbackArg<T>>;
}
interface IUserProvider extends angular.IServiceProvider {}
interface IUserAccountData {
givenName: string;
surname: string;
email: string;
password: string;
}
interface IUser {
href: string;
username: string;
email: string;
givenName: string;
middleName: string;
surname: string;
fullName: string;
status: 'ENABLED' | 'UNVERIFIED';
createdAt: string;
modifiedAt: string;
}
/**
* $socialLogin
*/
interface ISocialLoginService {}
interface ISocialLoginProvider extends angular.IServiceProvider {}
/**
* $spJsLoader
*/
interface ISpJsLoader {}
}
/**
* Augment ui-router state
*/
export namespace ui {
interface IState {
sp?: stormpath.ISpStateConfig;
}
}
}