@mitreka/coreflow-types 0.0.19 → 0.0.20
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/README.md +5 -4
- package/package.json +1 -1
- package/plan.ts +7 -5
package/README.md
CHANGED
|
@@ -44,11 +44,11 @@ export interface UserEntity extends BaseEntity {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export type User = Omit<UserEntity, 'id' | keyof BaseEntity>;
|
|
47
|
-
export type UserRequest = QueryFilters & BaseEntityFilters &
|
|
47
|
+
export type UserRequest = QueryFilters & BaseEntityFilters &
|
|
48
|
+
Omit<UserEntity, 'password' | keyof BaseEntity>;
|
|
48
49
|
```
|
|
49
50
|
|
|
50
51
|
## Relation Entity
|
|
51
|
-
|
|
52
52
|
If you have relation schema like this:
|
|
53
53
|
|
|
54
54
|
```sql
|
|
@@ -71,6 +71,7 @@ export interface UserRoleEntity extends RelationEntity {
|
|
|
71
71
|
role_id: string;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
export type
|
|
75
|
-
export type
|
|
74
|
+
export type UserRole = Omit<UserEntity, 'id' | keyof BaseEntity>;
|
|
75
|
+
export type UserRoleRequest = QueryFilters & BaseEntityFilters &
|
|
76
|
+
Omit<UserRoleEntity, keyof BaseEntity>;
|
|
76
77
|
```
|
package/package.json
CHANGED
package/plan.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseEntity, RelationEntity } from './entity.js';
|
|
2
2
|
import { type BaseEntityFilters, type QueryFilters, type RelationEntityFilters } from './filter.js';
|
|
3
3
|
|
|
4
|
-
export enum
|
|
4
|
+
export enum PlanPeriodType {
|
|
5
5
|
MONTH = 'month',
|
|
6
6
|
YEAR = 'year'
|
|
7
7
|
};
|
|
@@ -13,11 +13,12 @@ export interface PlanEntity extends BaseEntity {
|
|
|
13
13
|
price: number;
|
|
14
14
|
promo_price: number;
|
|
15
15
|
period_duration: number;
|
|
16
|
-
period_type:
|
|
16
|
+
period_type: PlanPeriodType;
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
|
|
19
19
|
export type Plan = Omit<PlanEntity, 'id' | keyof BaseEntity>;
|
|
20
|
-
export type PlanRequest = QueryFilters & BaseEntityFilters &
|
|
20
|
+
export type PlanRequest = QueryFilters & BaseEntityFilters &
|
|
21
|
+
Omit<PlanEntity, keyof BaseEntity>;
|
|
21
22
|
|
|
22
23
|
export interface PlanPermissionEntity extends RelationEntity {
|
|
23
24
|
id: string;
|
|
@@ -26,4 +27,5 @@ export interface PlanPermissionEntity extends RelationEntity {
|
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
export type PlanPermission = Omit<PlanPermissionEntity, 'id' | keyof RelationEntity>;
|
|
29
|
-
export type PlanPermissionRequest = QueryFilters & RelationEntityFilters &
|
|
30
|
+
export type PlanPermissionRequest = QueryFilters & RelationEntityFilters &
|
|
31
|
+
Omit<PlanPermissionEntity, keyof RelationEntity>;
|