skapi-js 0.1.124 → 0.2.0-alpha.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/dist/skapi.js +1 -1
- package/dist/skapi.js.LICENSE.txt +15 -0
- package/dist/skapi.js.map +1 -1
- package/esm/Main.d.ts +3 -0
- package/esm/Main.js +3 -0
- package/esm/Types.d.ts +194 -0
- package/esm/Types.js +1 -0
- package/esm/main/error.d.ts +8 -0
- package/esm/main/error.js +38 -0
- package/esm/main/skapi.d.ts +79 -0
- package/esm/main/skapi.js +296 -0
- package/esm/methods/database.d.ts +83 -0
- package/esm/methods/database.js +952 -0
- package/esm/methods/request.d.ts +36 -0
- package/esm/methods/request.js +687 -0
- package/esm/methods/subscription.d.ts +46 -0
- package/esm/methods/subscription.js +273 -0
- package/esm/methods/user.d.ts +67 -0
- package/esm/methods/user.js +790 -0
- package/esm/utils/utils.d.ts +20 -0
- package/esm/utils/utils.js +286 -0
- package/esm/utils/validator.d.ts +19 -0
- package/esm/utils/validator.js +295 -0
- package/package.json +9 -6
- package/dist/skapi.module.js +0 -3
- package/dist/skapi.module.js.LICENSE.txt +0 -21
- package/dist/skapi.module.js.map +0 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { DatabaseResponse, FetchOptions, FormSubmitCallback, Form, Newsletters, SubscriptionGroup } from '../Types';
|
|
2
|
+
export declare function getSubscriptions(params: {
|
|
3
|
+
subscriber?: string;
|
|
4
|
+
subscription?: string;
|
|
5
|
+
group?: number;
|
|
6
|
+
blocked?: boolean;
|
|
7
|
+
}, fetchOptions?: FetchOptions, _mapper?: Function): Promise<DatabaseResponse<{
|
|
8
|
+
subscriber: string;
|
|
9
|
+
subscription: string;
|
|
10
|
+
group: number;
|
|
11
|
+
timestamp: number;
|
|
12
|
+
blocked: boolean;
|
|
13
|
+
}>>;
|
|
14
|
+
export declare function subscribe(option: SubscriptionGroup<number>): Promise<'SUCCESS: the user has subscribed.'>;
|
|
15
|
+
export declare function unsubscribe(option: SubscriptionGroup<number | '*'>): Promise<'SUCCESS: the user has unsubscribed.'>;
|
|
16
|
+
export declare function blockSubscriber(option: SubscriptionGroup<number | '*'>): Promise<'SUCCESS: blocked user id "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".'>;
|
|
17
|
+
export declare function unblockSubscriber(option: SubscriptionGroup<number | '*'>): Promise<'SUCCESS: unblocked user id "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".'>;
|
|
18
|
+
export declare function getSubscribedTo(option: SubscriptionGroup<number | undefined> & {
|
|
19
|
+
blocked?: boolean;
|
|
20
|
+
}, fetchOptions: FetchOptions): Promise<DatabaseResponse<any>>;
|
|
21
|
+
export declare function getSubscribers(option: SubscriptionGroup<number | undefined> & {
|
|
22
|
+
blocked?: boolean;
|
|
23
|
+
}, fetchOptions: FetchOptions): Promise<DatabaseResponse<any>>;
|
|
24
|
+
export declare function getNewsletterSubscription(params: {
|
|
25
|
+
group?: number;
|
|
26
|
+
}): Promise<{
|
|
27
|
+
active: boolean;
|
|
28
|
+
timestamp: number;
|
|
29
|
+
group: number;
|
|
30
|
+
subscribed_email: string;
|
|
31
|
+
}[]>;
|
|
32
|
+
export declare function subscribeNewsletter(form: Form<{
|
|
33
|
+
email?: string;
|
|
34
|
+
group: number | 'public' | 'authorized';
|
|
35
|
+
redirect?: string;
|
|
36
|
+
}>, callbacks: FormSubmitCallback): Promise<string>;
|
|
37
|
+
export declare function unsubscribeNewsletter(params: {
|
|
38
|
+
group: number | 'public' | 'authorized' | null;
|
|
39
|
+
}): Promise<string>;
|
|
40
|
+
export declare function getNewsletters(params?: {
|
|
41
|
+
searchFor: 'message_id' | 'timestamp' | 'read' | 'complaint' | 'subject';
|
|
42
|
+
value: string | number;
|
|
43
|
+
range: string | number;
|
|
44
|
+
condition?: '>' | '>=' | '=' | '<' | '<=' | 'gt' | 'gte' | 'eq' | 'lt' | 'lte';
|
|
45
|
+
group: 'public' | 'authorized' | number;
|
|
46
|
+
}, fetchOptions?: FetchOptions): Promise<Newsletters>;
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import SkapiError from '../main/error';
|
|
11
|
+
import validator from '../utils/validator';
|
|
12
|
+
import { request } from './request';
|
|
13
|
+
function subscriptionGroupCheck(option) {
|
|
14
|
+
option = validator.Params(option, {
|
|
15
|
+
user_id: (v) => validator.UserId(v, '"user_id"'),
|
|
16
|
+
group: (v) => {
|
|
17
|
+
if (v === '*') {
|
|
18
|
+
return v;
|
|
19
|
+
}
|
|
20
|
+
if (typeof v !== 'number') {
|
|
21
|
+
throw new SkapiError('"group" should be type: number.', { code: 'INVALID_PARAMETER' });
|
|
22
|
+
}
|
|
23
|
+
else if (v < 1 && v > 99) {
|
|
24
|
+
throw new SkapiError('"group" should be within range 1 ~ 99.', { code: 'INVALID_PARAMETER' });
|
|
25
|
+
}
|
|
26
|
+
return v;
|
|
27
|
+
}
|
|
28
|
+
}, ['user_id', 'group']);
|
|
29
|
+
if (this.__user && option.user_id === this.__user.user_id) {
|
|
30
|
+
throw new SkapiError(`"user_id" cannot be the user's own ID.`, { code: 'INVALID_PARAMETER' });
|
|
31
|
+
}
|
|
32
|
+
return option;
|
|
33
|
+
}
|
|
34
|
+
;
|
|
35
|
+
export function getSubscriptions(params, fetchOptions, _mapper) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
params = validator.Params(params, {
|
|
38
|
+
subscriber: (v) => validator.UserId(v, 'User ID in "subscriber"'),
|
|
39
|
+
group: 'number',
|
|
40
|
+
subscription: (v) => validator.UserId(v, 'User ID in "subscription"'),
|
|
41
|
+
blocked: 'boolean'
|
|
42
|
+
});
|
|
43
|
+
if (!params.subscriber && !params.subscription) {
|
|
44
|
+
throw new SkapiError('At least either "subscriber" or "subscription" should have a value.', { code: 'INVALID_PARAMETER' });
|
|
45
|
+
}
|
|
46
|
+
let response = yield request.bind(this)('get-subscription', params, Object.assign({ auth: true }, { fetchOptions }));
|
|
47
|
+
response.list = response.list.map(_mapper || ((s) => {
|
|
48
|
+
let subscription = {};
|
|
49
|
+
let subSplit = s.sub.split('#');
|
|
50
|
+
subscription.subscriber = subSplit[2];
|
|
51
|
+
subscription.subscription = subSplit[0];
|
|
52
|
+
subscription.group = parseInt(subSplit[1]);
|
|
53
|
+
subscription.timestamp = s.stmp;
|
|
54
|
+
subscription.blocked = s.grp.substring(0, 1) === 'N';
|
|
55
|
+
return subscription;
|
|
56
|
+
}));
|
|
57
|
+
return response;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
export function subscribe(option) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
yield this.__connection;
|
|
63
|
+
let { user_id, group } = subscriptionGroupCheck.bind(this)(option);
|
|
64
|
+
if (typeof group !== 'number') {
|
|
65
|
+
throw new SkapiError('"group" should be type: number.', { code: 'INVALID_PARAMETER' });
|
|
66
|
+
}
|
|
67
|
+
return yield request.bind(this)('subscription', {
|
|
68
|
+
subscribe: user_id,
|
|
69
|
+
group
|
|
70
|
+
}, { auth: true });
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
export function unsubscribe(option) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
yield this.__connection;
|
|
76
|
+
let { user_id, group } = subscriptionGroupCheck.bind(this)(option);
|
|
77
|
+
return yield request.bind(this)('subscription', {
|
|
78
|
+
unsubscribe: user_id,
|
|
79
|
+
group
|
|
80
|
+
}, { auth: true });
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
export function blockSubscriber(option) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
yield this.__connection;
|
|
86
|
+
let { user_id, group } = subscriptionGroupCheck.bind(this)(option);
|
|
87
|
+
return yield request.bind(this)('subscription', { block: user_id, group }, { auth: true });
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
export function unblockSubscriber(option) {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
yield this.__connection;
|
|
93
|
+
let { user_id, group } = subscriptionGroupCheck.bind(this)(option);
|
|
94
|
+
return yield request.bind(this)('subscription', { unblock: user_id, group }, { auth: true });
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
export function getSubscribedTo(option, fetchOptions) {
|
|
98
|
+
var _a;
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
yield this.__connection;
|
|
101
|
+
option = validator.Params(option, {
|
|
102
|
+
user_id: (v) => validator.UserId(v, '"user_id"'),
|
|
103
|
+
group: 'number',
|
|
104
|
+
blocked: 'boolean'
|
|
105
|
+
}) || {};
|
|
106
|
+
return getSubscriptions.bind(this)({
|
|
107
|
+
subscriber: option.user_id || ((_a = this.__user) === null || _a === void 0 ? void 0 : _a.user_id),
|
|
108
|
+
group: option.group,
|
|
109
|
+
blocked: option.blocked
|
|
110
|
+
}, fetchOptions);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
;
|
|
114
|
+
export function getSubscribers(option, fetchOptions) {
|
|
115
|
+
var _a;
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
yield this.__connection;
|
|
118
|
+
option = validator.Params(option, {
|
|
119
|
+
user_id: (v) => validator.UserId(v, '"user_id"'),
|
|
120
|
+
group: 'number',
|
|
121
|
+
blocked: 'boolean'
|
|
122
|
+
}) || {};
|
|
123
|
+
let subParams = {
|
|
124
|
+
subscription: option.user_id || ((_a = this.__user) === null || _a === void 0 ? void 0 : _a.user_id),
|
|
125
|
+
group: option.group,
|
|
126
|
+
blocked: option.blocked
|
|
127
|
+
};
|
|
128
|
+
return getSubscriptions.bind(this)(subParams, fetchOptions);
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
;
|
|
132
|
+
export function getNewsletterSubscription(params) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
+
yield this.__connection;
|
|
135
|
+
let isAdmin = yield this.checkAdmin();
|
|
136
|
+
params = validator.Params(params, {
|
|
137
|
+
user_id: v => {
|
|
138
|
+
if (v !== this.__user.user_id && !isAdmin) {
|
|
139
|
+
throw new SkapiError(`No access.`, { code: 'INVALID_REQUEST' });
|
|
140
|
+
}
|
|
141
|
+
return v;
|
|
142
|
+
},
|
|
143
|
+
group: 'number'
|
|
144
|
+
});
|
|
145
|
+
let list = yield request.bind(this)('get-newsletter-subscription', params, { auth: true });
|
|
146
|
+
let result = [];
|
|
147
|
+
for (let sub of list) {
|
|
148
|
+
let subt = sub['subt'].split('#');
|
|
149
|
+
let active = true;
|
|
150
|
+
if (subt[0].charAt(0) === '@') {
|
|
151
|
+
active = false;
|
|
152
|
+
subt[0] = subt[0].substring(1);
|
|
153
|
+
}
|
|
154
|
+
let group = parseInt(subt[0]);
|
|
155
|
+
result.push({
|
|
156
|
+
timestamp: sub['stmp'],
|
|
157
|
+
group,
|
|
158
|
+
subscribed_email: subt[1],
|
|
159
|
+
active
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
return result;
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
export function subscribeNewsletter(form, callbacks) {
|
|
166
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
+
yield this.__connection;
|
|
168
|
+
let params = validator.Params(form || {}, {
|
|
169
|
+
email: (v) => validator.Email(v),
|
|
170
|
+
group: ['number', 'public', 'authorized'],
|
|
171
|
+
redirect: (v) => validator.Url(v)
|
|
172
|
+
}, this.__user ? ['group'] : ['email', 'group']);
|
|
173
|
+
return request.bind(this)(`subscribe-${this.__user ? '' : 'public-'}newsletter`, params, { fetchOptions: callbacks, auth: !!this.__user });
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
export function unsubscribeNewsletter(params) {
|
|
177
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
+
yield this.__connection;
|
|
179
|
+
params = validator.Params(params, {
|
|
180
|
+
group: ['number', 'public', 'authorized']
|
|
181
|
+
}, ['group']);
|
|
182
|
+
let param_send = Object.assign({
|
|
183
|
+
action: 'unsubscribe'
|
|
184
|
+
}, params);
|
|
185
|
+
return request.bind(this)('subscribe-newsletter', param_send, { auth: true });
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
export function getNewsletters(params, fetchOptions) {
|
|
189
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
190
|
+
let isAdmin = yield this.checkAdmin();
|
|
191
|
+
let searchType = {
|
|
192
|
+
'message_id': 'string',
|
|
193
|
+
'timestamp': 'number',
|
|
194
|
+
'read': 'number',
|
|
195
|
+
'complaint': 'number',
|
|
196
|
+
'subject': 'string'
|
|
197
|
+
};
|
|
198
|
+
if (!params) {
|
|
199
|
+
if (!fetchOptions) {
|
|
200
|
+
fetchOptions = {};
|
|
201
|
+
}
|
|
202
|
+
fetchOptions.ascending = false;
|
|
203
|
+
}
|
|
204
|
+
let _params = params || {
|
|
205
|
+
searchFor: 'timestamp',
|
|
206
|
+
value: 0,
|
|
207
|
+
condition: '>'
|
|
208
|
+
};
|
|
209
|
+
params = validator.Params(_params, {
|
|
210
|
+
searchFor: ['message_id', 'timestamp', 'read', 'complaint', 'group', 'subject'],
|
|
211
|
+
value: (v) => {
|
|
212
|
+
if (typeof v !== searchType[_params.searchFor]) {
|
|
213
|
+
throw new SkapiError(`"value" type does not match the type of "${_params.searchFor}" index.`, { code: 'INVALID_PARAMETER' });
|
|
214
|
+
}
|
|
215
|
+
else if (typeof v === 'string' && !v) {
|
|
216
|
+
throw new SkapiError('"value" should not be empty string.', { code: 'INVALID_PARAMETER' });
|
|
217
|
+
}
|
|
218
|
+
return v;
|
|
219
|
+
},
|
|
220
|
+
range: (v) => {
|
|
221
|
+
if (!_params.hasOwnProperty('value') || typeof v !== typeof _params.value) {
|
|
222
|
+
throw new SkapiError('"range" should match type of "value".', { code: 'INVALID_PARAMETER' });
|
|
223
|
+
}
|
|
224
|
+
return v;
|
|
225
|
+
},
|
|
226
|
+
condition: ['>', '>=', '=', '<', '<=', 'gt', 'gte', 'eq', 'lt', 'lte', () => '='],
|
|
227
|
+
group: (x) => {
|
|
228
|
+
if (!this.session) {
|
|
229
|
+
throw new SkapiError('User should be logged in.', { code: 'INVALID_REQUEST' });
|
|
230
|
+
}
|
|
231
|
+
if (x === 'public') {
|
|
232
|
+
return 0;
|
|
233
|
+
}
|
|
234
|
+
else if (x === 'authorized') {
|
|
235
|
+
return 1;
|
|
236
|
+
}
|
|
237
|
+
else if (typeof x === 'number') {
|
|
238
|
+
if (!isAdmin && x > parseInt(this.session.idToken.payload.access_group)) {
|
|
239
|
+
throw new SkapiError('User has no access.', { code: 'INVALID_REQUEST' });
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return x;
|
|
243
|
+
}
|
|
244
|
+
}, ['searchFor', 'value', 'group']);
|
|
245
|
+
let mails = yield request.bind(this)(params.group === 0 ? 'get-public-newsletters' : 'get-newsletters', params, Object.assign({ method: 'get', auth: params.group !== 0 }, { fetchOptions }));
|
|
246
|
+
let remap = {
|
|
247
|
+
'message_id': 'mid',
|
|
248
|
+
'timestamp': 'stmp',
|
|
249
|
+
'complaint': 'cmpl',
|
|
250
|
+
'read': 'read',
|
|
251
|
+
'subject': 'subj',
|
|
252
|
+
'bounced': 'bnce',
|
|
253
|
+
'url': 'url'
|
|
254
|
+
};
|
|
255
|
+
let defaults = {
|
|
256
|
+
'message_id': '',
|
|
257
|
+
'timestamp': 0,
|
|
258
|
+
'complaint': 0,
|
|
259
|
+
'read': 0,
|
|
260
|
+
'subject': '',
|
|
261
|
+
'bounced': 0,
|
|
262
|
+
'url': ''
|
|
263
|
+
};
|
|
264
|
+
mails.list = mails.list.map(m => {
|
|
265
|
+
let remapped = {};
|
|
266
|
+
for (let k in remap) {
|
|
267
|
+
remapped[k] = m[remap[k]] || defaults[remap[k]];
|
|
268
|
+
}
|
|
269
|
+
return remapped;
|
|
270
|
+
});
|
|
271
|
+
return mails;
|
|
272
|
+
});
|
|
273
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { CognitoUser, CognitoUserSession, CognitoUserPool } from 'amazon-cognito-identity-js';
|
|
2
|
+
import { User, Form, FormSubmitCallback, UserProfile, FetchOptions, DatabaseResponse, QueryParams, UserAttributes } from '../Types';
|
|
3
|
+
export declare let userPool: CognitoUserPool | null;
|
|
4
|
+
export declare function setUserPool(params: {
|
|
5
|
+
UserPoolId: string;
|
|
6
|
+
ClientId: string;
|
|
7
|
+
}): void;
|
|
8
|
+
export declare function authentication(): {
|
|
9
|
+
getSession: (option?: {
|
|
10
|
+
refreshToken?: boolean;
|
|
11
|
+
}) => Promise<CognitoUserSession>;
|
|
12
|
+
authenticateUser: (email: string, password: string) => Promise<User>;
|
|
13
|
+
createCognitoUser: (email: string) => Promise<{
|
|
14
|
+
cognitoUser: CognitoUser;
|
|
15
|
+
cognitoUsername: string;
|
|
16
|
+
}>;
|
|
17
|
+
getUser: () => Promise<UserProfile | null>;
|
|
18
|
+
};
|
|
19
|
+
export declare function getProfile(options?: {
|
|
20
|
+
refreshToken: boolean;
|
|
21
|
+
}): Promise<User | null>;
|
|
22
|
+
export declare function checkAdmin(): Promise<boolean>;
|
|
23
|
+
export declare function logout(e: SubmitEvent): Promise<'SUCCESS: The user has been logged out.'>;
|
|
24
|
+
export declare function resendSignupConfirmation(redirect: string): Promise<'SUCCESS: Signup confirmation E-Mail has been sent.'>;
|
|
25
|
+
export declare function recoverAccount(redirect?: boolean | string): Promise<"SUCCESS: Recovery e-mail has been sent.">;
|
|
26
|
+
export declare function login(form: Form<{
|
|
27
|
+
email: string;
|
|
28
|
+
password: string;
|
|
29
|
+
}>, option?: FormSubmitCallback & {
|
|
30
|
+
logout: boolean;
|
|
31
|
+
}): Promise<User>;
|
|
32
|
+
export declare function signup(form: Form<UserAttributes & {
|
|
33
|
+
email: String;
|
|
34
|
+
password: String;
|
|
35
|
+
}>, option?: {
|
|
36
|
+
signup_confirmation?: boolean | string;
|
|
37
|
+
email_subscription?: boolean;
|
|
38
|
+
login?: boolean;
|
|
39
|
+
} & FormSubmitCallback): Promise<User | "SUCCESS: The account has been created. User's signup confirmation is required." | 'SUCCESS: The account has been created.'>;
|
|
40
|
+
export declare function disableAccount(): Promise<'SUCCESS: account has been disabled.'>;
|
|
41
|
+
export declare function resetPassword(form: Form<{
|
|
42
|
+
email: string;
|
|
43
|
+
code: string | number;
|
|
44
|
+
new_password: string;
|
|
45
|
+
}>, option?: FormSubmitCallback): Promise<"SUCCESS: New password has been set.">;
|
|
46
|
+
export declare function verifyPhoneNumber(form: Form<{
|
|
47
|
+
code: string;
|
|
48
|
+
}>): Promise<'SUCCESS: Verification code has been sent.' | 'SUCCESS: "phone_number" is verified.'>;
|
|
49
|
+
export declare function verifyEmail(form: Form<{
|
|
50
|
+
code: string;
|
|
51
|
+
}>): Promise<'SUCCESS: Verification code has been sent.' | 'SUCCESS: "email" is verified.'>;
|
|
52
|
+
export declare function forgotPassword(form: Form<{
|
|
53
|
+
email: string;
|
|
54
|
+
}>, option?: FormSubmitCallback): Promise<"SUCCESS: Verification code has been sent.">;
|
|
55
|
+
export declare function changePassword(params: {
|
|
56
|
+
new_password: string;
|
|
57
|
+
current_password: string;
|
|
58
|
+
}): Promise<unknown>;
|
|
59
|
+
export declare function updateProfile(form: Form<UserAttributes>, option?: FormSubmitCallback): Promise<any>;
|
|
60
|
+
export declare function getUsers(params?: QueryParams | null, fetchOptions?: FetchOptions): Promise<DatabaseResponse<UserAttributes>>;
|
|
61
|
+
export declare function lastVerifiedEmail(params?: {
|
|
62
|
+
revert: boolean;
|
|
63
|
+
}): Promise<string | UserProfile>;
|
|
64
|
+
export declare function requestUsernameChange(params: {
|
|
65
|
+
redirect?: string;
|
|
66
|
+
username: string;
|
|
67
|
+
}): Promise<'SUCCESS: ...'>;
|