flamerest 1.0.59 → 1.0.60
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/REST.d.ts +4 -4
- package/REST.js +2 -2
- package/package.json +1 -1
package/REST.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export function one<T>(table: string, IDOrWhere: number | string | object, extfi
|
|
|
63
63
|
* @param table
|
|
64
64
|
* @param values
|
|
65
65
|
*/
|
|
66
|
-
export function create<T>(table: string, values: object, appendTo
|
|
66
|
+
export function create<T>(table: string, values: object, appendTo?: number | string | null, insertAfter?: number | string | null, insertFirst?: number | string | null): Promise<SavedObject<T>>
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* Удалить запись
|
|
@@ -79,7 +79,7 @@ export function remove(table: string, id: number | string, byFields?: object): P
|
|
|
79
79
|
* @param ID
|
|
80
80
|
* @param values
|
|
81
81
|
*/
|
|
82
|
-
export function edit<T>(table: string, ID: number | string, values: object, appendTo: number | string | null
|
|
82
|
+
export function edit<T>(table: string, ID: number | string, values: object, appendTo: number | string | null, insertAfter: number | string | null, insertFirst: number | string | null): Promise<SavedObject<T>>
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
/**
|
|
@@ -111,7 +111,7 @@ export function auth(username?: string, password?: string): Promise<Authorized>;
|
|
|
111
111
|
* @param username
|
|
112
112
|
* @param password
|
|
113
113
|
*/
|
|
114
|
-
export function signup(username: string, password: string): Promise<Authorized>;
|
|
114
|
+
export function signup(email: string, username: string, password: string): Promise<Authorized>;
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
117
|
* Результат авторизации
|
|
@@ -132,7 +132,7 @@ type Authorized = {
|
|
|
132
132
|
/**
|
|
133
133
|
* Выйти из системы
|
|
134
134
|
*/
|
|
135
|
-
export function logout(): object
|
|
135
|
+
export function logout(): Promise<object>;
|
|
136
136
|
|
|
137
137
|
/**
|
|
138
138
|
* Подготовить объект под загрузку: загрузить данные из элементов [type=file]
|
package/REST.js
CHANGED
|
@@ -479,9 +479,9 @@ class FLAMEREST {
|
|
|
479
479
|
|
|
480
480
|
}
|
|
481
481
|
|
|
482
|
-
async signup(username, password) {
|
|
482
|
+
async signup(email, username, password) {
|
|
483
483
|
|
|
484
|
-
let resp = await this.request(this.SERVER + '/auth/signup', JSON.stringify({ login: username, password: password }), 'POST');
|
|
484
|
+
let resp = await this.request(this.SERVER + '/auth/signup', JSON.stringify({ login: username, email: email, password: password }), 'POST');
|
|
485
485
|
|
|
486
486
|
if (resp.errors) return resp;
|
|
487
487
|
if (resp.data.length === 0) { resp.errors = []; return resp; }
|