opticedge-types 1.0.37 → 1.0.38

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.
@@ -1,5 +1,5 @@
1
1
  import { CardApprovalStatus, CardGradingType } from '../enums/card';
2
- import { User } from './user';
2
+ import { FbUser } from './user';
3
3
  type MarketReport = {
4
4
  data: string;
5
5
  title: string;
@@ -12,7 +12,7 @@ type MarketReport = {
12
12
  max: number;
13
13
  };
14
14
  };
15
- export type FBCard = {
15
+ export type FbCard = {
16
16
  _createdAt: number;
17
17
  _statusAt?: number;
18
18
  _updatedAt: number;
@@ -69,11 +69,18 @@ export type FBCard = {
69
69
  userId: string;
70
70
  version?: string;
71
71
  };
72
- export type DBCard = {
72
+ export type DbCard = {
73
73
  id: string;
74
+ record: FbCard;
75
+ user: Partial<Pick<FbUser, 'firstName' | 'lastName' | 'email' | '_collectorType'>>;
76
+ insertedAt: Date;
77
+ updatedAt: Date;
78
+ };
79
+ export type DbCardDto = {
80
+ id: string;
81
+ record: FbCard;
82
+ user: Partial<Pick<FbUser, 'firstName' | 'lastName' | 'email' | '_collectorType'>>;
74
83
  insertedAt: string;
75
84
  updatedAt: string;
76
- record: FBCard;
77
- user: Partial<Pick<User, 'firstName' | 'lastName' | 'email' | '_collectorType'>>;
78
85
  };
79
86
  export {};
@@ -1,5 +1,5 @@
1
1
  import { UserCollectorType } from '../enums/user';
2
- export type User = {
2
+ export type FbUser = {
3
3
  cards: {
4
4
  count: number;
5
5
  };
@@ -30,9 +30,9 @@ export type User = {
30
30
  _id: string;
31
31
  _updatedAt: number;
32
32
  };
33
- export type DBUser = {
33
+ export type DbUser = {
34
34
  id: string;
35
- record: User;
35
+ record: FbUser;
36
36
  insertedAt: Date;
37
37
  updatedAt: Date;
38
38
  isDeleted?: Boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opticedge-types",
3
- "version": "1.0.37",
3
+ "version": "1.0.38",
4
4
  "description": "Common type for opticedge",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/types/card.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CardApprovalStatus, CardGradingType } from '../enums/card'
2
- import { User } from './user'
2
+ import { FbUser } from './user'
3
3
 
4
4
  type MarketReport = {
5
5
  data: string
@@ -14,7 +14,7 @@ type MarketReport = {
14
14
  }
15
15
  }
16
16
 
17
- export type FBCard = {
17
+ export type FbCard = {
18
18
  _createdAt: number
19
19
  _statusAt?: number
20
20
  _updatedAt: number
@@ -72,10 +72,18 @@ export type FBCard = {
72
72
  version?: string
73
73
  }
74
74
 
75
- export type DBCard = {
75
+ export type DbCard = {
76
76
  id: string
77
+ record: FbCard
78
+ user: Partial<Pick<FbUser, 'firstName' | 'lastName' | 'email' | '_collectorType'>>
79
+ insertedAt: Date
80
+ updatedAt: Date
81
+ }
82
+
83
+ export type DbCardDto = {
84
+ id: string
85
+ record: FbCard
86
+ user: Partial<Pick<FbUser, 'firstName' | 'lastName' | 'email' | '_collectorType'>>
77
87
  insertedAt: string
78
88
  updatedAt: string
79
- record: FBCard
80
- user: Partial<Pick<User, 'firstName' | 'lastName' | 'email' | '_collectorType'>>
81
89
  }
package/src/types/user.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { UserCollectorType } from '../enums/user'
2
2
 
3
- export type User = {
3
+ export type FbUser = {
4
4
  cards: {
5
5
  count: number
6
6
  }
@@ -32,9 +32,9 @@ export type User = {
32
32
  _updatedAt: number
33
33
  }
34
34
 
35
- export type DBUser = {
35
+ export type DbUser = {
36
36
  id: string
37
- record: User
37
+ record: FbUser
38
38
  insertedAt: Date
39
39
  updatedAt: Date
40
40
  isDeleted?: Boolean