@mivis/petmart-api 1.2.4 → 1.2.5

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 +39 -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.5",
4
4
  "main": "index.js",
5
5
  "types": "type.d.ts",
6
6
  "license": "ISC",
package/type.d.ts CHANGED
@@ -1,29 +1,47 @@
1
1
  declare namespace Components {
2
2
  namespace Schemas {
3
- export interface ICodeRequestDto {
4
- tel: number;
5
- }
6
- export interface IAuthRequest {
7
- token: string;
8
- code: string;
3
+ export interface ILoginRequest {
4
+ email: string;
5
+ password: string;
6
+ type: ELoginTypes;
9
7
  }
10
- export interface IAppleAuthRequest {
8
+ export interface ISignUpRequest {
11
9
  email: string;
12
- tel: number;
10
+ password: string;
13
11
  }
14
-
15
- export interface IAuthResponse {
12
+ export interface ILoginResponse {
16
13
  message: string;
17
14
  token: string;
18
15
  }
16
+ export interface IRefreshRequest {
17
+ refreshToken: string;
18
+ }
19
19
 
20
- export type ISecureCheckCodeRequest = IAuthRequest;
20
+ export interface ISendActivationMail {
21
+ to: string;
22
+ code: number;
23
+ }
21
24
 
22
- export type IAppleAuthResponse = IAuthResponse;
25
+ export interface ITokenPayload {
26
+ email: string;
27
+ role: ERoles;
28
+ _id: string;
29
+ }
30
+
31
+ export enum ELoginTypes {
32
+ SELLER = 'SELLER',
33
+ USER = 'USER',
34
+ }
23
35
 
24
- export type ICodeResponse = IAuthResponse;
36
+ export interface ISendEmailRequest {
37
+ email: string;
38
+ type: ESendEmailTypes;
39
+ }
25
40
 
26
- export type ISecureAuthResponse = IAuthResponse;
41
+ export enum ESendEmailTypes {
42
+ RECOVERY = 'RECOVERY',
43
+ ACTIVATE = 'ACTIVATE',
44
+ }
27
45
 
28
46
  export enum ERoles {
29
47
  ADMIN = 'ADMIN',
@@ -270,10 +288,17 @@ declare namespace Components {
270
288
  delivery_ways: IDeliveryWays;
271
289
  balance: number;
272
290
  commission: number;
291
+ is_activated: boolean;
273
292
  createdAt: Date;
274
293
  updatedAt: Date;
275
294
  }
276
295
 
296
+ export interface ICreateSellerRequest {
297
+ name: string;
298
+ tel: number;
299
+ INN: number;
300
+ }
301
+
277
302
  export interface ICreateSeller {
278
303
  user_id: string;
279
304
  banking_details?: IBankingDetails;