@mivis/petmart-api 1.2.4 → 1.2.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/type.d.ts +48 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mivis/petmart-api",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "main": "index.js",
5
5
  "types": "type.d.ts",
6
6
  "license": "ISC",
package/type.d.ts CHANGED
@@ -1,29 +1,56 @@
1
1
  declare namespace Components {
2
2
  namespace Schemas {
3
- export interface ICodeRequestDto {
4
- tel: number;
3
+ export interface ITokensResponse {
4
+ access_token: string;
5
+ refresh_token: string;
5
6
  }
6
- export interface IAuthRequest {
7
- token: string;
8
- code: string;
7
+ export interface ILoginRequest {
8
+ email: string;
9
+ password: string;
10
+ type: ELoginTypes;
9
11
  }
10
- export interface IAppleAuthRequest {
12
+ export interface ISignUpRequest {
11
13
  email: string;
12
- tel: number;
14
+ password: string;
15
+ }
16
+ export interface ILoginResponse {
17
+ isSeller?: boolean;
18
+ isActivated?: boolean;
19
+ role: ERoles;
13
20
  }
14
21
 
15
- export interface IAuthResponse {
16
- message: string;
17
- token: string;
22
+ export type ISignUpResponse = ITokensResponse;
23
+
24
+ export interface IRefreshRequest {
25
+ refreshToken: string;
18
26
  }
19
27
 
20
- export type ISecureCheckCodeRequest = IAuthRequest;
28
+ export type IRefreshResponse = ITokensResponse;
21
29
 
22
- export type IAppleAuthResponse = IAuthResponse;
30
+ export interface ITokenPayload {
31
+ email: string;
32
+ role: ERoles;
33
+ _id: string;
34
+ }
23
35
 
24
- export type ICodeResponse = IAuthResponse;
36
+ export enum ELoginTypes {
37
+ SELLER = 'SELLER',
38
+ USER = 'USER',
39
+ }
40
+
41
+ export interface ISendEmailRequest {
42
+ email: string;
43
+ type: ESendEmailTypes;
44
+ }
45
+
46
+ export interface ISendEmailResponse {
47
+ activation_code: number;
48
+ }
25
49
 
26
- export type ISecureAuthResponse = IAuthResponse;
50
+ export enum ESendEmailTypes {
51
+ RECOVERY = 'RECOVERY',
52
+ ACTIVATE = 'ACTIVATE',
53
+ }
27
54
 
28
55
  export enum ERoles {
29
56
  ADMIN = 'ADMIN',
@@ -270,10 +297,17 @@ declare namespace Components {
270
297
  delivery_ways: IDeliveryWays;
271
298
  balance: number;
272
299
  commission: number;
300
+ is_activated: boolean;
273
301
  createdAt: Date;
274
302
  updatedAt: Date;
275
303
  }
276
304
 
305
+ export interface ICreateSellerRequest {
306
+ name: string;
307
+ tel: number;
308
+ INN: number;
309
+ }
310
+
277
311
  export interface ICreateSeller {
278
312
  user_id: string;
279
313
  banking_details?: IBankingDetails;