|
|
@ -805,7 +805,7 @@ export class Api< |
|
|
|
* @tags Auth |
|
|
|
* @tags Auth |
|
|
|
* @name Signup |
|
|
|
* @name Signup |
|
|
|
* @summary Signup |
|
|
|
* @summary Signup |
|
|
|
* @request POST:/api/v1/db/auth/user/signup |
|
|
|
* @request POST:/api/v1/auth/user/signup |
|
|
|
* @response `200` `{ token?: string }` OK |
|
|
|
* @response `200` `{ token?: string }` OK |
|
|
|
* @response `400` `{ msg?: string }` Bad Request |
|
|
|
* @response `400` `{ msg?: string }` Bad Request |
|
|
|
* @response `401` `void` Unauthorized |
|
|
|
* @response `401` `void` Unauthorized |
|
|
@ -816,7 +816,7 @@ export class Api< |
|
|
|
params: RequestParams = {} |
|
|
|
params: RequestParams = {} |
|
|
|
) => |
|
|
|
) => |
|
|
|
this.request<{ token?: string }, { msg?: string } | void>({ |
|
|
|
this.request<{ token?: string }, { msg?: string } | void>({ |
|
|
|
path: `/api/v1/db/auth/user/signup`, |
|
|
|
path: `/api/v1/auth/user/signup`, |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
|
body: data, |
|
|
|
body: data, |
|
|
|
format: 'json', |
|
|
|
format: 'json', |
|
|
@ -829,7 +829,7 @@ export class Api< |
|
|
|
* @tags Auth |
|
|
|
* @tags Auth |
|
|
|
* @name Signin |
|
|
|
* @name Signin |
|
|
|
* @summary Signin |
|
|
|
* @summary Signin |
|
|
|
* @request POST:/api/v1/db/auth/user/signin |
|
|
|
* @request POST:/api/v1/auth/user/signin |
|
|
|
* @response `200` `{ token?: string }` OK |
|
|
|
* @response `200` `{ token?: string }` OK |
|
|
|
* @response `400` `{ msg?: string }` Bad Request |
|
|
|
* @response `400` `{ msg?: string }` Bad Request |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -838,7 +838,7 @@ export class Api< |
|
|
|
params: RequestParams = {} |
|
|
|
params: RequestParams = {} |
|
|
|
) => |
|
|
|
) => |
|
|
|
this.request<{ token?: string }, { msg?: string }>({ |
|
|
|
this.request<{ token?: string }, { msg?: string }>({ |
|
|
|
path: `/api/v1/db/auth/user/signin`, |
|
|
|
path: `/api/v1/auth/user/signin`, |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
|
body: data, |
|
|
|
body: data, |
|
|
|
type: ContentType.Json, |
|
|
|
type: ContentType.Json, |
|
|
@ -852,12 +852,12 @@ export class Api< |
|
|
|
* @tags Auth |
|
|
|
* @tags Auth |
|
|
|
* @name Me |
|
|
|
* @name Me |
|
|
|
* @summary User info |
|
|
|
* @summary User info |
|
|
|
* @request GET:/api/v1/db/auth/user/me |
|
|
|
* @request GET:/api/v1/auth/user/me |
|
|
|
* @response `200` `UserInfoType` OK |
|
|
|
* @response `200` `UserInfoType` OK |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
me: (query?: { project_id?: string }, params: RequestParams = {}) => |
|
|
|
me: (query?: { project_id?: string }, params: RequestParams = {}) => |
|
|
|
this.request<UserInfoType, any>({ |
|
|
|
this.request<UserInfoType, any>({ |
|
|
|
path: `/api/v1/db/auth/user/me`, |
|
|
|
path: `/api/v1/auth/user/me`, |
|
|
|
method: 'GET', |
|
|
|
method: 'GET', |
|
|
|
query: query, |
|
|
|
query: query, |
|
|
|
format: 'json', |
|
|
|
format: 'json', |
|
|
@ -870,13 +870,13 @@ export class Api< |
|
|
|
* @tags Auth |
|
|
|
* @tags Auth |
|
|
|
* @name PasswordForgot |
|
|
|
* @name PasswordForgot |
|
|
|
* @summary Password forgot |
|
|
|
* @summary Password forgot |
|
|
|
* @request POST:/api/v1/db/auth/password/forgot |
|
|
|
* @request POST:/api/v1/auth/password/forgot |
|
|
|
* @response `200` `void` OK |
|
|
|
* @response `200` `void` OK |
|
|
|
* @response `401` `void` Unauthorized |
|
|
|
* @response `401` `void` Unauthorized |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
passwordForgot: (data: { email?: string }, params: RequestParams = {}) => |
|
|
|
passwordForgot: (data: { email?: string }, params: RequestParams = {}) => |
|
|
|
this.request<void, void>({ |
|
|
|
this.request<void, void>({ |
|
|
|
path: `/api/v1/db/auth/password/forgot`, |
|
|
|
path: `/api/v1/auth/password/forgot`, |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
|
body: data, |
|
|
|
body: data, |
|
|
|
type: ContentType.Json, |
|
|
|
type: ContentType.Json, |
|
|
@ -889,7 +889,7 @@ export class Api< |
|
|
|
* @tags Auth |
|
|
|
* @tags Auth |
|
|
|
* @name PasswordChange |
|
|
|
* @name PasswordChange |
|
|
|
* @summary Password change |
|
|
|
* @summary Password change |
|
|
|
* @request POST:/api/v1/db/auth/password/change |
|
|
|
* @request POST:/api/v1/auth/password/change |
|
|
|
* @response `200` `{ msg?: string }` OK |
|
|
|
* @response `200` `{ msg?: string }` OK |
|
|
|
* @response `400` `{ msg?: string }` Bad request |
|
|
|
* @response `400` `{ msg?: string }` Bad request |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -898,7 +898,7 @@ export class Api< |
|
|
|
params: RequestParams = {} |
|
|
|
params: RequestParams = {} |
|
|
|
) => |
|
|
|
) => |
|
|
|
this.request<{ msg?: string }, { msg?: string }>({ |
|
|
|
this.request<{ msg?: string }, { msg?: string }>({ |
|
|
|
path: `/api/v1/db/auth/password/change`, |
|
|
|
path: `/api/v1/auth/password/change`, |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
|
body: data, |
|
|
|
body: data, |
|
|
|
type: ContentType.Json, |
|
|
|
type: ContentType.Json, |
|
|
@ -912,12 +912,12 @@ export class Api< |
|
|
|
* @tags Auth |
|
|
|
* @tags Auth |
|
|
|
* @name PasswordResetTokenValidate |
|
|
|
* @name PasswordResetTokenValidate |
|
|
|
* @summary Reset token verify |
|
|
|
* @summary Reset token verify |
|
|
|
* @request POST:/api/v1/db/auth/token/validate/{token} |
|
|
|
* @request POST:/api/v1/auth/token/validate/{token} |
|
|
|
* @response `200` `void` OK |
|
|
|
* @response `200` `void` OK |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
passwordResetTokenValidate: (token: string, params: RequestParams = {}) => |
|
|
|
passwordResetTokenValidate: (token: string, params: RequestParams = {}) => |
|
|
|
this.request<void, any>({ |
|
|
|
this.request<void, any>({ |
|
|
|
path: `/api/v1/db/auth/token/validate/${token}`, |
|
|
|
path: `/api/v1/auth/token/validate/${token}`, |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
|
...params, |
|
|
|
...params, |
|
|
|
}), |
|
|
|
}), |
|
|
@ -928,12 +928,12 @@ export class Api< |
|
|
|
* @tags Auth |
|
|
|
* @tags Auth |
|
|
|
* @name EmailValidate |
|
|
|
* @name EmailValidate |
|
|
|
* @summary Verify email |
|
|
|
* @summary Verify email |
|
|
|
* @request POST:/api/v1/db/auth/email/validate/{token} |
|
|
|
* @request POST:/api/v1/auth/email/validate/{token} |
|
|
|
* @response `200` `void` OK |
|
|
|
* @response `200` `void` OK |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
emailValidate: (token: string, params: RequestParams = {}) => |
|
|
|
emailValidate: (token: string, params: RequestParams = {}) => |
|
|
|
this.request<void, any>({ |
|
|
|
this.request<void, any>({ |
|
|
|
path: `/api/v1/db/auth/email/validate/${token}`, |
|
|
|
path: `/api/v1/auth/email/validate/${token}`, |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
|
...params, |
|
|
|
...params, |
|
|
|
}), |
|
|
|
}), |
|
|
@ -944,7 +944,7 @@ export class Api< |
|
|
|
* @tags Auth |
|
|
|
* @tags Auth |
|
|
|
* @name PasswordReset |
|
|
|
* @name PasswordReset |
|
|
|
* @summary Password reset |
|
|
|
* @summary Password reset |
|
|
|
* @request POST:/api/v1/db/auth/password/reset/{token} |
|
|
|
* @request POST:/api/v1/auth/password/reset/{token} |
|
|
|
* @response `200` `void` OK |
|
|
|
* @response `200` `void` OK |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
passwordReset: ( |
|
|
|
passwordReset: ( |
|
|
@ -953,7 +953,7 @@ export class Api< |
|
|
|
params: RequestParams = {} |
|
|
|
params: RequestParams = {} |
|
|
|
) => |
|
|
|
) => |
|
|
|
this.request<void, any>({ |
|
|
|
this.request<void, any>({ |
|
|
|
path: `/api/v1/db/auth/password/reset/${token}`, |
|
|
|
path: `/api/v1/auth/password/reset/${token}`, |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
|
body: data, |
|
|
|
body: data, |
|
|
|
type: ContentType.Json, |
|
|
|
type: ContentType.Json, |
|
|
@ -966,12 +966,12 @@ export class Api< |
|
|
|
* @tags Auth |
|
|
|
* @tags Auth |
|
|
|
* @name TokenRefresh |
|
|
|
* @name TokenRefresh |
|
|
|
* @summary Refresh token |
|
|
|
* @summary Refresh token |
|
|
|
* @request POST:/api/v1/db/auth/token/refresh |
|
|
|
* @request POST:/api/v1/auth/token/refresh |
|
|
|
* @response `200` `void` OK |
|
|
|
* @response `200` `void` OK |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
tokenRefresh: (params: RequestParams = {}) => |
|
|
|
tokenRefresh: (params: RequestParams = {}) => |
|
|
|
this.request<void, any>({ |
|
|
|
this.request<void, any>({ |
|
|
|
path: `/api/v1/db/auth/token/refresh`, |
|
|
|
path: `/api/v1/auth/token/refresh`, |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
|
...params, |
|
|
|
...params, |
|
|
|
}), |
|
|
|
}), |
|
|
|