@merkaly/api 0.1.6 → 0.1.9-3
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 +79 -79
- package/package.json +89 -96
- package/src/account/auth/auth.decorator.d.ts +4 -4
- package/src/account/auth/auth.decorator.ts +10 -10
- package/src/account/auth/auth.guard.d.ts +15 -15
- package/src/account/auth/auth.guard.ts +41 -41
- package/src/account/auth/auth.strategy.d.ts +17 -17
- package/src/account/auth/auth.strategy.ts +31 -31
- package/src/account/auth/auth.validator.d.ts +4 -4
- package/src/account/auth/auth.validator.ts +11 -11
- package/src/account/auth/index.d.ts +1 -1
- package/src/account/auth/index.ts +1 -1
- package/src/account/index.d.ts +4 -4
- package/src/account/index.ts +4 -4
- package/src/account/organizations/index.d.ts +3 -3
- package/src/account/organizations/index.ts +3 -3
- package/src/account/organizations/members/index.d.ts +1 -1
- package/src/account/organizations/members/index.ts +1 -1
- package/src/account/organizations/members/member.entity.d.ts +9 -9
- package/src/account/organizations/members/member.entity.ts +11 -11
- package/src/account/organizations/members/member.validator.d.ts +2 -0
- package/src/account/organizations/members/member.validator.ts +3 -0
- package/src/account/organizations/organization.entity.d.ts +17 -15
- package/src/account/organizations/organization.entity.ts +24 -21
- package/src/account/organizations/organization.validator.d.ts +13 -13
- package/src/account/organizations/organization.validator.ts +41 -41
- package/src/account/roles/index.d.ts +3 -3
- package/src/account/roles/index.ts +3 -3
- package/src/account/roles/role.entity.d.ts +7 -7
- package/src/account/roles/role.entity.ts +9 -9
- package/src/account/roles/role.validator.d.ts +9 -9
- package/src/account/roles/role.validator.ts +21 -21
- package/src/account/roles/users/index.d.ts +2 -2
- package/src/account/roles/users/index.ts +2 -2
- package/src/account/roles/users/user.entity.d.ts +9 -9
- package/src/account/roles/users/user.entity.ts +11 -11
- package/src/account/roles/users/user.validator.d.ts +2 -4
- package/src/account/roles/users/user.validator.ts +3 -10
- package/src/account/users/index.d.ts +3 -3
- package/src/account/users/index.ts +3 -3
- package/src/account/users/roles/index.d.ts +2 -2
- package/src/account/users/roles/index.ts +2 -2
- package/src/account/users/roles/role.entity.d.ts +9 -9
- package/src/account/users/roles/role.entity.ts +11 -11
- package/src/account/users/roles/role.validator.d.ts +2 -4
- package/src/account/users/roles/role.validator.ts +3 -10
- package/src/account/users/user.entity.d.ts +32 -32
- package/src/account/users/user.entity.ts +36 -36
- package/src/account/users/user.validator.d.ts +11 -11
- package/src/account/users/user.validator.ts +29 -29
- package/src/app.d.ts +1 -0
- package/src/app.emitter.d.ts +16 -0
- package/src/app.emitter.ts +27 -0
- package/src/app.entity.d.ts +7 -0
- package/src/app.entity.ts +13 -13
- package/src/app.routes.d.ts +3 -0
- package/src/app.routes.ts +61 -0
- package/src/index.d.ts +3 -3
- package/src/index.ts +3 -3
- package/src/inventory/brands/brand.entity.d.ts +5 -5
- package/src/inventory/brands/brand.entity.ts +10 -10
- package/src/inventory/brands/brand.validator.d.ts +6 -6
- package/src/inventory/brands/brand.validator.ts +12 -12
- package/src/inventory/brands/index.d.ts +2 -2
- package/src/inventory/brands/index.ts +2 -2
- package/src/inventory/categories/category.entity.d.ts +5 -5
- package/src/inventory/categories/category.entity.ts +10 -10
- package/src/inventory/categories/category.validator.d.ts +6 -6
- package/src/inventory/categories/category.validator.ts +11 -11
- package/src/inventory/categories/index.d.ts +2 -2
- package/src/inventory/categories/index.ts +2 -2
- package/src/inventory/index.d.ts +5 -5
- package/src/inventory/index.ts +6 -6
- package/src/inventory/products/index.d.ts +4 -4
- package/src/inventory/products/index.ts +4 -4
- package/src/inventory/products/media/index.d.ts +2 -2
- package/src/inventory/products/media/index.ts +2 -2
- package/src/inventory/products/media/media.entity.d.ts +6 -6
- package/src/inventory/products/media/media.entity.ts +10 -10
- package/src/inventory/products/media/media.validator.d.ts +4 -4
- package/src/inventory/products/media/media.validator.ts +7 -7
- package/src/inventory/products/product.entity.d.ts +31 -31
- package/src/inventory/products/product.entity.ts +63 -63
- package/src/inventory/products/product.validator.d.ts +21 -21
- package/src/inventory/products/product.validator.ts +70 -70
- package/src/inventory/products/variants/index.d.ts +2 -2
- package/src/inventory/products/variants/index.ts +2 -2
- package/src/inventory/products/variants/variant.entity.d.ts +6 -6
- package/src/inventory/products/variants/variant.entity.ts +11 -11
- package/src/inventory/products/variants/variant.validator.d.ts +4 -4
- package/src/inventory/products/variants/variant.validator.ts +7 -7
- package/src/inventory/properties/index.d.ts +2 -2
- package/src/inventory/properties/index.ts +2 -2
- package/src/inventory/properties/property.entity.d.ts +8 -8
- package/src/inventory/properties/property.entity.ts +19 -19
- package/src/inventory/properties/property.validator.d.ts +8 -8
- package/src/inventory/properties/property.validator.ts +20 -20
- package/src/store/carts/cart.entity.d.ts +14 -14
- package/src/store/carts/cart.entity.ts +21 -21
- package/src/store/carts/cart.validator.d.ts +4 -4
- package/src/store/carts/cart.validator.ts +7 -7
- package/src/store/carts/index.d.ts +2 -2
- package/src/store/carts/index.ts +2 -2
- package/src/store/index.d.ts +3 -3
- package/src/store/index.ts +4 -4
- package/src/store/orders/index.d.ts +3 -3
- package/src/store/orders/index.ts +3 -3
- package/src/store/orders/items/index.d.ts +2 -2
- package/src/store/orders/items/index.ts +2 -2
- package/src/store/orders/items/item.entity.d.ts +7 -7
- package/src/store/orders/items/item.entity.ts +14 -14
- package/src/store/orders/items/item.validator.d.ts +4 -4
- package/src/store/orders/items/item.validator.ts +7 -7
- package/src/store/orders/order.entity.d.ts +9 -9
- package/src/store/orders/order.entity.ts +18 -18
- package/src/store/orders/order.validator.d.ts +4 -4
- package/src/store/orders/order.validator.ts +7 -7
- package/src/app.ts +0 -40
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { AppMetadata, Identity, User, UserMetadata } from 'auth0'
|
|
2
|
-
import AppEntity from '../../app.entity'
|
|
3
|
-
|
|
4
|
-
export interface UserData extends UserMetadata {
|
|
5
|
-
[propName: string]: any;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface AppData extends AppMetadata {
|
|
9
|
-
[propName: string]: any;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export class UserEntity extends AppEntity implements User<AppData, UserData> {
|
|
13
|
-
static readonly $path: string = 'users'
|
|
14
|
-
|
|
15
|
-
public blocked: boolean | undefined
|
|
16
|
-
public created_at: string | undefined
|
|
17
|
-
public email: string | undefined
|
|
18
|
-
public email_verified: boolean | undefined
|
|
19
|
-
public family_name: string | undefined
|
|
20
|
-
public given_name: string | undefined
|
|
21
|
-
public identities: Identity[] | undefined
|
|
22
|
-
public last_ip: string | undefined
|
|
23
|
-
public last_login: string | undefined
|
|
24
|
-
public last_password_reset: string | undefined
|
|
25
|
-
public logins_count: number | undefined
|
|
26
|
-
public multifactor: string[] | undefined
|
|
27
|
-
public name: string | undefined
|
|
28
|
-
public nickname: string | undefined
|
|
29
|
-
public phone_number: string | undefined
|
|
30
|
-
public phone_verified: boolean | undefined
|
|
31
|
-
public picture: string | undefined
|
|
32
|
-
public updated_at: string | undefined
|
|
33
|
-
public user_id: string | undefined
|
|
34
|
-
public user_metadata: UserData | undefined
|
|
35
|
-
public username: string | undefined
|
|
36
|
-
}
|
|
1
|
+
import { AppMetadata, Identity, User, UserMetadata } from 'auth0'
|
|
2
|
+
import AppEntity from '../../app.entity'
|
|
3
|
+
|
|
4
|
+
export interface UserData extends UserMetadata {
|
|
5
|
+
[propName: string]: any;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface AppData extends AppMetadata {
|
|
9
|
+
[propName: string]: any;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class UserEntity extends AppEntity implements User<AppData, UserData> {
|
|
13
|
+
static readonly $path: string = 'users'
|
|
14
|
+
|
|
15
|
+
public blocked: boolean | undefined
|
|
16
|
+
public created_at: string | undefined
|
|
17
|
+
public email: string | undefined
|
|
18
|
+
public email_verified: boolean | undefined
|
|
19
|
+
public family_name: string | undefined
|
|
20
|
+
public given_name: string | undefined
|
|
21
|
+
public identities: Identity[] | undefined
|
|
22
|
+
public last_ip: string | undefined
|
|
23
|
+
public last_login: string | undefined
|
|
24
|
+
public last_password_reset: string | undefined
|
|
25
|
+
public logins_count: number | undefined
|
|
26
|
+
public multifactor: string[] | undefined
|
|
27
|
+
public name: string | undefined
|
|
28
|
+
public nickname: string | undefined
|
|
29
|
+
public phone_number: string | undefined
|
|
30
|
+
public phone_verified: boolean | undefined
|
|
31
|
+
public picture: string | undefined
|
|
32
|
+
public updated_at: string | undefined
|
|
33
|
+
public user_id: string | undefined
|
|
34
|
+
public user_metadata: UserData | undefined
|
|
35
|
+
public username: string | undefined
|
|
36
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { UpdateUserData, UserData } from 'auth0';
|
|
2
|
-
export declare class CreateUserValidator implements UserData {
|
|
3
|
-
email: string;
|
|
4
|
-
password: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
1
|
+
import { UpdateUserData, UserData } from 'auth0';
|
|
2
|
+
export declare class CreateUserValidator implements UserData {
|
|
3
|
+
email: string;
|
|
4
|
+
password: string;
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class UpdateUserValidator implements UpdateUserData {
|
|
8
|
+
name?: string;
|
|
9
|
+
nickname?: string;
|
|
10
|
+
picture?: string;
|
|
11
|
+
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { UpdateUserData, UserData } from 'auth0'
|
|
2
|
-
import { IsEmail, IsOptional, IsString } from 'class-validator'
|
|
3
|
-
|
|
4
|
-
export class CreateUserValidator implements UserData {
|
|
5
|
-
@IsEmail()
|
|
6
|
-
email: string
|
|
7
|
-
|
|
8
|
-
@IsString()
|
|
9
|
-
password: string
|
|
10
|
-
|
|
11
|
-
@IsOptional()
|
|
12
|
-
@IsString()
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
@IsOptional()
|
|
23
|
-
@IsString()
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
@IsOptional()
|
|
27
|
-
@
|
|
28
|
-
|
|
29
|
-
}
|
|
1
|
+
import { UpdateUserData, UserData } from 'auth0'
|
|
2
|
+
import { IsEmail, IsOptional, IsString, IsUrl } from 'class-validator'
|
|
3
|
+
|
|
4
|
+
export class CreateUserValidator implements UserData {
|
|
5
|
+
@IsEmail()
|
|
6
|
+
email: string
|
|
7
|
+
|
|
8
|
+
@IsString()
|
|
9
|
+
password: string
|
|
10
|
+
|
|
11
|
+
@IsOptional()
|
|
12
|
+
@IsString()
|
|
13
|
+
name: string
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class UpdateUserValidator implements UpdateUserData {
|
|
18
|
+
@IsOptional()
|
|
19
|
+
@IsString()
|
|
20
|
+
name?: string
|
|
21
|
+
|
|
22
|
+
@IsOptional()
|
|
23
|
+
@IsString()
|
|
24
|
+
nickname?: string
|
|
25
|
+
|
|
26
|
+
@IsOptional()
|
|
27
|
+
@IsUrl()
|
|
28
|
+
picture?: string
|
|
29
|
+
}
|
package/src/app.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EventEmitter2 } from '@nestjs/event-emitter';
|
|
2
|
+
import { event, eventNS } from 'eventemitter2';
|
|
3
|
+
export declare enum AbstractEvent {
|
|
4
|
+
ENTITY_LISTED = "entity.*.listed",
|
|
5
|
+
ENTITY_READED = "entity.*.readed",
|
|
6
|
+
ENTITY_CREATED = "entity.*.created",
|
|
7
|
+
ENTITY_UPDATED = "entity.*.updated",
|
|
8
|
+
ENTITY_DELETED = "entity.*.deleted",
|
|
9
|
+
ENTITY_NOT_FOUND = "entity.*.not_found",
|
|
10
|
+
ENTITY_SYNCED = "entity.*.synced"
|
|
11
|
+
}
|
|
12
|
+
export default class AppEmitter {
|
|
13
|
+
protected readonly emitter: EventEmitter2;
|
|
14
|
+
emit(event: event | eventNS, ...values: any[]): boolean;
|
|
15
|
+
private handleAllEvents;
|
|
16
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Inject, Injectable, Logger } from '@nestjs/common'
|
|
2
|
+
import { EventEmitter2, OnEvent } from '@nestjs/event-emitter'
|
|
3
|
+
import { event, eventNS } from 'eventemitter2'
|
|
4
|
+
|
|
5
|
+
export enum AbstractEvent {
|
|
6
|
+
ENTITY_LISTED = 'entity.*.listed',
|
|
7
|
+
ENTITY_READED = 'entity.*.readed',
|
|
8
|
+
ENTITY_CREATED = 'entity.*.created',
|
|
9
|
+
ENTITY_UPDATED = 'entity.*.updated',
|
|
10
|
+
ENTITY_DELETED = 'entity.*.deleted',
|
|
11
|
+
ENTITY_NOT_FOUND = 'entity.*.not_found',
|
|
12
|
+
ENTITY_SYNCED = 'entity.*.synced',
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@Injectable()
|
|
16
|
+
export default class AppEmitter {
|
|
17
|
+
@Inject() protected readonly emitter: EventEmitter2
|
|
18
|
+
|
|
19
|
+
public emit (event: event | eventNS, ...values: any[]) {
|
|
20
|
+
return this.emitter.emit(event, values)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@OnEvent('*.*.*')
|
|
24
|
+
private handleAllEvents (payload: any, name: string) {
|
|
25
|
+
return Logger.debug(`Event '${name}' has emitted an ${typeof payload}`, AppEmitter.name)
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TransformFnParams } from 'class-transformer';
|
|
2
|
+
import { IEntity } from 'fireorm';
|
|
3
|
+
export default abstract class AppEntity implements IEntity {
|
|
4
|
+
static readonly $path: string;
|
|
5
|
+
id: string;
|
|
6
|
+
static transformSubCollection({ value }: TransformFnParams): string;
|
|
7
|
+
}
|
package/src/app.entity.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { TransformFnParams } from 'class-transformer'
|
|
2
|
-
import { IEntity } from 'fireorm'
|
|
3
|
-
|
|
4
|
-
export default abstract class AppEntity implements IEntity {
|
|
5
|
-
static readonly $path: string
|
|
6
|
-
|
|
7
|
-
public id: string
|
|
8
|
-
|
|
9
|
-
public static transformSubCollection ({ value }: TransformFnParams): string {
|
|
10
|
-
return value.path
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
}
|
|
1
|
+
import { TransformFnParams } from 'class-transformer'
|
|
2
|
+
import { IEntity } from 'fireorm'
|
|
3
|
+
|
|
4
|
+
export default abstract class AppEntity implements IEntity {
|
|
5
|
+
static readonly $path: string
|
|
6
|
+
|
|
7
|
+
public id: string
|
|
8
|
+
|
|
9
|
+
public static transformSubCollection ({ value }: TransformFnParams): string {
|
|
10
|
+
return value.path
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { RouteTree } from '@nestjs/core/router/interfaces/routes.interface'
|
|
2
|
+
import { $AccountPath, OrganizationEntity, RoleEntity, UserEntity } from './account'
|
|
3
|
+
import AccountModule from './account/account.module'
|
|
4
|
+
import { $AuthPath as AccountAuthPath } from './account/auth'
|
|
5
|
+
import AuthModule from './account/auth/auth.module'
|
|
6
|
+
import MemberModule from './account/organizations/members/member.module'
|
|
7
|
+
import OrganizationModule from './account/organizations/organization.module'
|
|
8
|
+
import RoleModule from './account/roles/role.module'
|
|
9
|
+
import RoleUserModule from './account/roles/users/user.module'
|
|
10
|
+
import UserRoleModule from './account/users/roles/role.module'
|
|
11
|
+
import UserModule from './account/users/user.module'
|
|
12
|
+
import { $InventoryPath, ProductEntity } from './inventory'
|
|
13
|
+
import BrandModule from './inventory/brands/brand.module'
|
|
14
|
+
import CategoryModule from './inventory/categories/category.module'
|
|
15
|
+
import InventoryModule from './inventory/inventory.module'
|
|
16
|
+
import MediaModule from './inventory/products/media/media.module'
|
|
17
|
+
import ProductModule from './inventory/products/product.module'
|
|
18
|
+
import VariantModule from './inventory/products/variants/variant.module'
|
|
19
|
+
import PropertyModule from './inventory/properties/property.module'
|
|
20
|
+
import { $StorePath, OrderEntity } from './store'
|
|
21
|
+
import CartModule from './store/carts/cart.module'
|
|
22
|
+
import ItemModule from './store/orders/items/item.module'
|
|
23
|
+
import OrderModule from './store/orders/order.module'
|
|
24
|
+
import StoreModule from './store/store.module'
|
|
25
|
+
|
|
26
|
+
const addModule = (module, children = [], path = '/'): RouteTree => ({ path, module, children })
|
|
27
|
+
|
|
28
|
+
const routes = [
|
|
29
|
+
addModule(AuthModule, [], AccountAuthPath),
|
|
30
|
+
|
|
31
|
+
addModule(AccountModule, [
|
|
32
|
+
addModule(UserModule, [
|
|
33
|
+
addModule(UserRoleModule, [], UserEntity.$path)
|
|
34
|
+
]),
|
|
35
|
+
addModule(OrganizationModule, [
|
|
36
|
+
addModule(MemberModule, [], OrganizationEntity.$path)
|
|
37
|
+
]),
|
|
38
|
+
addModule(RoleModule, [
|
|
39
|
+
addModule(RoleUserModule, [], RoleEntity.$path)
|
|
40
|
+
])
|
|
41
|
+
], $AccountPath),
|
|
42
|
+
|
|
43
|
+
addModule(InventoryModule, [
|
|
44
|
+
addModule(BrandModule),
|
|
45
|
+
addModule(CategoryModule),
|
|
46
|
+
addModule(PropertyModule),
|
|
47
|
+
addModule(ProductModule, [
|
|
48
|
+
addModule(VariantModule, [], ProductEntity.$path),
|
|
49
|
+
addModule(MediaModule, [], ProductEntity.$path)
|
|
50
|
+
])
|
|
51
|
+
], $InventoryPath),
|
|
52
|
+
|
|
53
|
+
addModule(StoreModule, [
|
|
54
|
+
addModule(CartModule),
|
|
55
|
+
addModule(OrderModule, [
|
|
56
|
+
addModule(ItemModule, [], OrderEntity.$path)
|
|
57
|
+
])
|
|
58
|
+
], $StorePath)
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
export default routes
|
package/src/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './account';
|
|
2
|
-
export * from './inventory';
|
|
3
|
-
export * from './store';
|
|
1
|
+
export * from './account';
|
|
2
|
+
export * from './inventory';
|
|
3
|
+
export * from './store';
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './account'
|
|
2
|
-
export * from './inventory'
|
|
3
|
-
export * from './store'
|
|
1
|
+
export * from './account'
|
|
2
|
+
export * from './inventory'
|
|
3
|
+
export * from './store'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import AppEntity from '../../app.entity';
|
|
2
|
-
export declare class BrandEntity extends AppEntity {
|
|
3
|
-
static readonly $path = "brands";
|
|
4
|
-
name: string;
|
|
5
|
-
}
|
|
1
|
+
import AppEntity from '../../app.entity';
|
|
2
|
+
export declare class BrandEntity extends AppEntity {
|
|
3
|
+
static readonly $path = "brands";
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Collection } from 'fireorm'
|
|
2
|
-
import AppEntity from '../../app.entity'
|
|
3
|
-
|
|
4
|
-
@Collection(BrandEntity.$path)
|
|
5
|
-
export class BrandEntity extends AppEntity {
|
|
6
|
-
static readonly $path = 'brands'
|
|
7
|
-
|
|
8
|
-
name: string
|
|
9
|
-
|
|
10
|
-
}
|
|
1
|
+
import { Collection } from 'fireorm'
|
|
2
|
+
import AppEntity from '../../app.entity'
|
|
3
|
+
|
|
4
|
+
@Collection(BrandEntity.$path)
|
|
5
|
+
export class BrandEntity extends AppEntity {
|
|
6
|
+
static readonly $path = 'brands'
|
|
7
|
+
|
|
8
|
+
name: string
|
|
9
|
+
|
|
10
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare class CreateBrandValidator {
|
|
2
|
-
name: string;
|
|
3
|
-
}
|
|
4
|
-
export declare class UpdateBrandValidator {
|
|
5
|
-
name?: string;
|
|
6
|
-
}
|
|
1
|
+
export declare class CreateBrandValidator {
|
|
2
|
+
name: string;
|
|
3
|
+
}
|
|
4
|
+
export declare class UpdateBrandValidator {
|
|
5
|
+
name?: string;
|
|
6
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { IsOptional, IsString } from 'class-validator'
|
|
2
|
-
|
|
3
|
-
export class CreateBrandValidator {
|
|
4
|
-
@IsString()
|
|
5
|
-
name: string
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export class UpdateBrandValidator {
|
|
9
|
-
@IsString()
|
|
10
|
-
@IsOptional()
|
|
11
|
-
name?: string
|
|
12
|
-
}
|
|
1
|
+
import { IsOptional, IsString } from 'class-validator'
|
|
2
|
+
|
|
3
|
+
export class CreateBrandValidator {
|
|
4
|
+
@IsString()
|
|
5
|
+
name: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export class UpdateBrandValidator {
|
|
9
|
+
@IsString()
|
|
10
|
+
@IsOptional()
|
|
11
|
+
name?: string
|
|
12
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './brand.validator';
|
|
2
|
-
export * from './brand.entity';
|
|
1
|
+
export * from './brand.validator';
|
|
2
|
+
export * from './brand.entity';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './brand.validator'
|
|
2
|
-
export * from './brand.entity'
|
|
1
|
+
export * from './brand.validator'
|
|
2
|
+
export * from './brand.entity'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import AppEntity from '../../app.entity';
|
|
2
|
-
export declare class CategoryEntity extends AppEntity {
|
|
3
|
-
static readonly $path = "categories";
|
|
4
|
-
name: string;
|
|
5
|
-
}
|
|
1
|
+
import AppEntity from '../../app.entity';
|
|
2
|
+
export declare class CategoryEntity extends AppEntity {
|
|
3
|
+
static readonly $path = "categories";
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Collection } from 'fireorm'
|
|
2
|
-
import AppEntity from '../../app.entity'
|
|
3
|
-
|
|
4
|
-
@Collection(CategoryEntity.$path)
|
|
5
|
-
export class CategoryEntity extends AppEntity {
|
|
6
|
-
static readonly $path = 'categories'
|
|
7
|
-
|
|
8
|
-
name: string
|
|
9
|
-
|
|
10
|
-
}
|
|
1
|
+
import { Collection } from 'fireorm'
|
|
2
|
+
import AppEntity from '../../app.entity'
|
|
3
|
+
|
|
4
|
+
@Collection(CategoryEntity.$path)
|
|
5
|
+
export class CategoryEntity extends AppEntity {
|
|
6
|
+
static readonly $path = 'categories'
|
|
7
|
+
|
|
8
|
+
name: string
|
|
9
|
+
|
|
10
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare class CreateCategoryValidator {
|
|
2
|
-
name: string;
|
|
3
|
-
}
|
|
4
|
-
export declare class UpdateCategoryValidator {
|
|
5
|
-
name: string;
|
|
6
|
-
}
|
|
1
|
+
export declare class CreateCategoryValidator {
|
|
2
|
+
name: string;
|
|
3
|
+
}
|
|
4
|
+
export declare class UpdateCategoryValidator {
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { IsString } from 'class-validator'
|
|
2
|
-
|
|
3
|
-
export class CreateCategoryValidator {
|
|
4
|
-
@IsString()
|
|
5
|
-
name: string
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export class UpdateCategoryValidator {
|
|
9
|
-
@IsString()
|
|
10
|
-
name: string
|
|
11
|
-
}
|
|
1
|
+
import { IsString } from 'class-validator'
|
|
2
|
+
|
|
3
|
+
export class CreateCategoryValidator {
|
|
4
|
+
@IsString()
|
|
5
|
+
name: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export class UpdateCategoryValidator {
|
|
9
|
+
@IsString()
|
|
10
|
+
name: string
|
|
11
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './category.validator';
|
|
2
|
-
export * from './category.entity';
|
|
1
|
+
export * from './category.validator';
|
|
2
|
+
export * from './category.entity';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './category.validator'
|
|
2
|
-
export * from './category.entity'
|
|
1
|
+
export * from './category.validator'
|
|
2
|
+
export * from './category.entity'
|
package/src/inventory/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './brands';
|
|
2
|
-
export * from './categories';
|
|
3
|
-
export * from './products';
|
|
4
|
-
export * from './properties';
|
|
5
|
-
export declare const $InventoryPath = "inventory";
|
|
1
|
+
export * from './brands';
|
|
2
|
+
export * from './categories';
|
|
3
|
+
export * from './products';
|
|
4
|
+
export * from './properties';
|
|
5
|
+
export declare const $InventoryPath = "inventory";
|
package/src/inventory/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './brands'
|
|
2
|
-
export * from './categories'
|
|
3
|
-
export * from './products'
|
|
4
|
-
export * from './properties'
|
|
5
|
-
|
|
6
|
-
export const $InventoryPath = 'inventory'
|
|
1
|
+
export * from './brands'
|
|
2
|
+
export * from './categories'
|
|
3
|
+
export * from './products'
|
|
4
|
+
export * from './properties'
|
|
5
|
+
|
|
6
|
+
export const $InventoryPath = 'inventory'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './product.validator';
|
|
2
|
-
export * from './product.entity';
|
|
3
|
-
export * from './variants';
|
|
4
|
-
export * from './media';
|
|
1
|
+
export * from './product.validator';
|
|
2
|
+
export * from './product.entity';
|
|
3
|
+
export * from './variants';
|
|
4
|
+
export * from './media';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './product.validator'
|
|
2
|
-
export * from './product.entity'
|
|
3
|
-
export * from './variants'
|
|
4
|
-
export * from './media'
|
|
1
|
+
export * from './product.validator'
|
|
2
|
+
export * from './product.entity'
|
|
3
|
+
export * from './variants'
|
|
4
|
+
export * from './media'
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './media.entity';
|
|
2
|
-
export * from './media.validator';
|
|
1
|
+
export * from './media.entity';
|
|
2
|
+
export * from './media.validator';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './media.entity'
|
|
2
|
-
export * from './media.validator'
|
|
1
|
+
export * from './media.entity'
|
|
2
|
+
export * from './media.validator'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import AppEntity from '../../../app.entity';
|
|
2
|
-
export declare class ProductMediaEntity extends AppEntity {
|
|
3
|
-
static readonly $path = "images";
|
|
4
|
-
name: string;
|
|
5
|
-
src: string;
|
|
6
|
-
}
|
|
1
|
+
import AppEntity from '../../../app.entity';
|
|
2
|
+
export declare class ProductMediaEntity extends AppEntity {
|
|
3
|
+
static readonly $path = "images";
|
|
4
|
+
name: string;
|
|
5
|
+
src: string;
|
|
6
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import AppEntity from '../../../app.entity'
|
|
2
|
-
|
|
3
|
-
export class ProductMediaEntity extends AppEntity {
|
|
4
|
-
|
|
5
|
-
static readonly $path = 'images'
|
|
6
|
-
|
|
7
|
-
name: string
|
|
8
|
-
|
|
9
|
-
src: string
|
|
10
|
-
}
|
|
1
|
+
import AppEntity from '../../../app.entity'
|
|
2
|
+
|
|
3
|
+
export class ProductMediaEntity extends AppEntity {
|
|
4
|
+
|
|
5
|
+
static readonly $path = 'images'
|
|
6
|
+
|
|
7
|
+
name: string
|
|
8
|
+
|
|
9
|
+
src: string
|
|
10
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare class CreateProductMediaValidator {
|
|
2
|
-
}
|
|
3
|
-
export declare class UpdateProductMediaValidator {
|
|
4
|
-
}
|
|
1
|
+
export declare class CreateProductMediaValidator {
|
|
2
|
+
}
|
|
3
|
+
export declare class UpdateProductMediaValidator {
|
|
4
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export class CreateProductMediaValidator {
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
export class UpdateProductMediaValidator {
|
|
6
|
-
|
|
7
|
-
}
|
|
1
|
+
export class CreateProductMediaValidator {
|
|
2
|
+
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export class UpdateProductMediaValidator {
|
|
6
|
+
|
|
7
|
+
}
|