@merkaly/api 0.1.7 → 0.1.9-4
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 -97
- package/src/account/auth/auth.decorator.d.ts +5 -4
- package/src/account/auth/auth.decorator.d.ts.map +1 -0
- package/src/account/auth/auth.decorator.ts +10 -10
- package/src/account/auth/auth.guard.d.ts +16 -15
- package/src/account/auth/auth.guard.d.ts.map +1 -0
- package/src/account/auth/auth.guard.ts +41 -41
- package/src/account/auth/auth.strategy.d.ts +18 -17
- package/src/account/auth/auth.strategy.d.ts.map +1 -0
- package/src/account/auth/auth.strategy.ts +31 -31
- package/src/account/auth/auth.validator.d.ts +5 -4
- package/src/account/auth/auth.validator.d.ts.map +1 -0
- package/src/account/auth/auth.validator.ts +11 -11
- package/src/account/auth/index.d.ts +2 -1
- package/src/account/auth/index.d.ts.map +1 -0
- package/src/account/auth/index.ts +1 -1
- package/src/account/index.d.ts +5 -4
- package/src/account/index.d.ts.map +1 -0
- package/src/account/index.ts +4 -4
- package/src/account/organizations/index.d.ts +4 -3
- package/src/account/organizations/index.d.ts.map +1 -0
- package/src/account/organizations/index.ts +3 -3
- package/src/account/organizations/members/index.d.ts +2 -1
- package/src/account/organizations/members/index.d.ts.map +1 -0
- package/src/account/organizations/members/index.ts +1 -1
- package/src/account/organizations/members/member.entity.d.ts +10 -9
- package/src/account/organizations/members/member.entity.d.ts.map +1 -0
- package/src/account/organizations/members/member.entity.ts +11 -11
- package/src/account/organizations/members/member.validator.d.ts +3 -0
- package/src/account/organizations/members/member.validator.d.ts.map +1 -0
- package/src/account/organizations/members/member.validator.ts +3 -0
- package/src/account/organizations/organization.entity.d.ts +18 -15
- package/src/account/organizations/organization.entity.d.ts.map +1 -0
- package/src/account/organizations/organization.entity.ts +24 -21
- package/src/account/organizations/organization.validator.d.ts +14 -13
- package/src/account/organizations/organization.validator.d.ts.map +1 -0
- package/src/account/organizations/organization.validator.ts +41 -41
- package/src/account/roles/index.d.ts +4 -3
- package/src/account/roles/index.d.ts.map +1 -0
- package/src/account/roles/index.ts +3 -3
- package/src/account/roles/role.entity.d.ts +8 -7
- package/src/account/roles/role.entity.d.ts.map +1 -0
- package/src/account/roles/role.entity.ts +9 -9
- package/src/account/roles/role.validator.d.ts +10 -9
- package/src/account/roles/role.validator.d.ts.map +1 -0
- package/src/account/roles/role.validator.ts +21 -21
- package/src/account/roles/users/index.d.ts +3 -2
- package/src/account/roles/users/index.d.ts.map +1 -0
- package/src/account/roles/users/index.ts +2 -2
- package/src/account/roles/users/user.entity.d.ts +10 -9
- package/src/account/roles/users/user.entity.d.ts.map +1 -0
- package/src/account/roles/users/user.entity.ts +11 -11
- package/src/account/roles/users/user.validator.d.ts +3 -4
- package/src/account/roles/users/user.validator.d.ts.map +1 -0
- package/src/account/roles/users/user.validator.ts +3 -10
- package/src/account/users/index.d.ts +4 -3
- package/src/account/users/index.d.ts.map +1 -0
- package/src/account/users/index.ts +3 -3
- package/src/account/users/roles/index.d.ts +3 -2
- package/src/account/users/roles/index.d.ts.map +1 -0
- package/src/account/users/roles/index.ts +2 -2
- package/src/account/users/roles/role.entity.d.ts +10 -9
- package/src/account/users/roles/role.entity.d.ts.map +1 -0
- package/src/account/users/roles/role.entity.ts +11 -11
- package/src/account/users/roles/role.validator.d.ts +3 -4
- package/src/account/users/roles/role.validator.d.ts.map +1 -0
- package/src/account/users/roles/role.validator.ts +3 -10
- package/src/account/users/user.entity.d.ts +33 -32
- package/src/account/users/user.entity.d.ts.map +1 -0
- package/src/account/users/user.entity.ts +36 -36
- package/src/account/users/user.validator.d.ts +12 -11
- package/src/account/users/user.validator.d.ts.map +1 -0
- package/src/account/users/user.validator.ts +29 -29
- package/src/app.d.ts +2 -0
- package/src/app.d.ts.map +1 -0
- package/src/app.emitter.d.ts +17 -0
- package/src/app.emitter.d.ts.map +1 -0
- package/src/app.emitter.ts +27 -0
- package/src/app.entity.d.ts +8 -0
- package/src/app.entity.d.ts.map +1 -0
- package/src/app.entity.ts +13 -13
- package/src/app.routes.d.ts +4 -0
- package/src/app.routes.d.ts.map +1 -0
- package/src/app.routes.ts +61 -0
- package/src/index.d.ts +4 -3
- package/src/index.d.ts.map +1 -0
- package/src/index.ts +3 -3
- package/src/inventory/brands/brand.entity.d.ts +6 -5
- package/src/inventory/brands/brand.entity.d.ts.map +1 -0
- package/src/inventory/brands/brand.entity.ts +10 -10
- package/src/inventory/brands/brand.validator.d.ts +7 -6
- package/src/inventory/brands/brand.validator.d.ts.map +1 -0
- package/src/inventory/brands/brand.validator.ts +12 -12
- package/src/inventory/brands/index.d.ts +3 -2
- package/src/inventory/brands/index.d.ts.map +1 -0
- package/src/inventory/brands/index.ts +2 -2
- package/src/inventory/categories/category.entity.d.ts +6 -5
- package/src/inventory/categories/category.entity.d.ts.map +1 -0
- package/src/inventory/categories/category.entity.ts +10 -10
- package/src/inventory/categories/category.validator.d.ts +7 -6
- package/src/inventory/categories/category.validator.d.ts.map +1 -0
- package/src/inventory/categories/category.validator.ts +11 -11
- package/src/inventory/categories/index.d.ts +3 -2
- package/src/inventory/categories/index.d.ts.map +1 -0
- package/src/inventory/categories/index.ts +2 -2
- package/src/inventory/index.d.ts +6 -5
- package/src/inventory/index.d.ts.map +1 -0
- package/src/inventory/index.ts +6 -6
- package/src/inventory/products/index.d.ts +5 -4
- package/src/inventory/products/index.d.ts.map +1 -0
- package/src/inventory/products/index.ts +4 -4
- package/src/inventory/products/media/index.d.ts +3 -2
- package/src/inventory/products/media/index.d.ts.map +1 -0
- package/src/inventory/products/media/index.ts +2 -2
- package/src/inventory/products/media/media.entity.d.ts +7 -6
- package/src/inventory/products/media/media.entity.d.ts.map +1 -0
- package/src/inventory/products/media/media.entity.ts +10 -10
- package/src/inventory/products/media/media.validator.d.ts +5 -4
- package/src/inventory/products/media/media.validator.d.ts.map +1 -0
- package/src/inventory/products/media/media.validator.ts +7 -7
- package/src/inventory/products/product.entity.d.ts +32 -31
- package/src/inventory/products/product.entity.d.ts.map +1 -0
- package/src/inventory/products/product.entity.ts +63 -63
- package/src/inventory/products/product.validator.d.ts +22 -21
- package/src/inventory/products/product.validator.d.ts.map +1 -0
- package/src/inventory/products/product.validator.ts +70 -70
- package/src/inventory/products/variants/index.d.ts +3 -2
- package/src/inventory/products/variants/index.d.ts.map +1 -0
- package/src/inventory/products/variants/index.ts +2 -2
- package/src/inventory/products/variants/variant.entity.d.ts +7 -6
- package/src/inventory/products/variants/variant.entity.d.ts.map +1 -0
- package/src/inventory/products/variants/variant.entity.ts +11 -11
- package/src/inventory/products/variants/variant.validator.d.ts +5 -4
- package/src/inventory/products/variants/variant.validator.d.ts.map +1 -0
- package/src/inventory/products/variants/variant.validator.ts +7 -7
- package/src/inventory/properties/index.d.ts +3 -2
- package/src/inventory/properties/index.d.ts.map +1 -0
- package/src/inventory/properties/index.ts +2 -2
- package/src/inventory/properties/property.entity.d.ts +9 -8
- package/src/inventory/properties/property.entity.d.ts.map +1 -0
- package/src/inventory/properties/property.entity.ts +19 -19
- package/src/inventory/properties/property.validator.d.ts +9 -8
- package/src/inventory/properties/property.validator.d.ts.map +1 -0
- package/src/inventory/properties/property.validator.ts +20 -20
- package/src/store/carts/cart.entity.d.ts +15 -14
- package/src/store/carts/cart.entity.d.ts.map +1 -0
- package/src/store/carts/cart.entity.ts +21 -21
- package/src/store/carts/cart.validator.d.ts +5 -4
- package/src/store/carts/cart.validator.d.ts.map +1 -0
- package/src/store/carts/cart.validator.ts +7 -7
- package/src/store/carts/index.d.ts +3 -2
- package/src/store/carts/index.d.ts.map +1 -0
- package/src/store/carts/index.ts +2 -2
- package/src/store/index.d.ts +4 -3
- package/src/store/index.d.ts.map +1 -0
- package/src/store/index.ts +4 -4
- package/src/store/orders/index.d.ts +4 -3
- package/src/store/orders/index.d.ts.map +1 -0
- package/src/store/orders/index.ts +3 -3
- package/src/store/orders/items/index.d.ts +3 -2
- package/src/store/orders/items/index.d.ts.map +1 -0
- package/src/store/orders/items/index.ts +2 -2
- package/src/store/orders/items/item.entity.d.ts +8 -7
- package/src/store/orders/items/item.entity.d.ts.map +1 -0
- package/src/store/orders/items/item.entity.ts +14 -14
- package/src/store/orders/items/item.validator.d.ts +5 -4
- package/src/store/orders/items/item.validator.d.ts.map +1 -0
- package/src/store/orders/items/item.validator.ts +7 -7
- package/src/store/orders/order.entity.d.ts +10 -9
- package/src/store/orders/order.entity.d.ts.map +1 -0
- package/src/store/orders/order.entity.ts +18 -18
- package/src/store/orders/order.validator.d.ts +5 -4
- package/src/store/orders/order.validator.d.ts.map +1 -0
- package/src/store/orders/order.validator.ts +7 -7
- package/src/app.ts +0 -40
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import AppEntity from '../../../app.entity';
|
|
2
|
-
import { UserEntity } from '../user.entity';
|
|
3
|
-
export declare class UserRoleEntity extends AppEntity implements Pick<UserEntity, 'user_id' | 'email' | 'name' | 'picture'> {
|
|
4
|
-
static readonly $path = "roles";
|
|
5
|
-
user_id: string;
|
|
6
|
-
email: string;
|
|
7
|
-
name: string;
|
|
8
|
-
picture: string;
|
|
9
|
-
}
|
|
1
|
+
import AppEntity from '../../../app.entity';
|
|
2
|
+
import { UserEntity } from '../user.entity';
|
|
3
|
+
export declare class UserRoleEntity extends AppEntity implements Pick<UserEntity, 'user_id' | 'email' | 'name' | 'picture'> {
|
|
4
|
+
static readonly $path = "roles";
|
|
5
|
+
user_id: string;
|
|
6
|
+
email: string;
|
|
7
|
+
name: string;
|
|
8
|
+
picture: string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=role.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role.entity.d.ts","sourceRoot":"","sources":["role.entity.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAE3C,qBAAa,cAAe,SAAQ,SAAU,YAAW,IAAI,CAAC,UAAU,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IACjH,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAU;IAExB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CACvB"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import AppEntity from '../../../app.entity'
|
|
2
|
-
import { UserEntity } from '../user.entity'
|
|
3
|
-
|
|
4
|
-
export class UserRoleEntity extends AppEntity implements Pick<UserEntity, 'user_id' | 'email' | 'name' | 'picture'> {
|
|
5
|
-
static readonly $path = 'roles'
|
|
6
|
-
|
|
7
|
-
public user_id: string
|
|
8
|
-
public email: string
|
|
9
|
-
public name: string
|
|
10
|
-
public picture: string
|
|
11
|
-
}
|
|
1
|
+
import AppEntity from '../../../app.entity'
|
|
2
|
+
import { UserEntity } from '../user.entity'
|
|
3
|
+
|
|
4
|
+
export class UserRoleEntity extends AppEntity implements Pick<UserEntity, 'user_id' | 'email' | 'name' | 'picture'> {
|
|
5
|
+
static readonly $path = 'roles'
|
|
6
|
+
|
|
7
|
+
public user_id: string
|
|
8
|
+
public email: string
|
|
9
|
+
public name: string
|
|
10
|
+
public picture: string
|
|
11
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
1
|
+
export declare type AddUserRole = string[];
|
|
2
|
+
export declare type RemoveUserRole = string[];
|
|
3
|
+
//# sourceMappingURL=role.validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role.validator.d.ts","sourceRoot":"","sources":["role.validator.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG,MAAM,EAAE,CAAA;AAElC,oBAAY,cAAc,GAAG,MAAM,EAAE,CAAA"}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
@IsString()
|
|
5
|
-
name: string
|
|
6
|
-
|
|
7
|
-
@IsString()
|
|
8
|
-
@IsOptional()
|
|
9
|
-
description: string
|
|
10
|
-
}
|
|
1
|
+
export type AddUserRole = string[]
|
|
2
|
+
|
|
3
|
+
export type RemoveUserRole = string[]
|
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import { AppMetadata, Identity, User, UserMetadata } from 'auth0';
|
|
2
|
-
import AppEntity from '../../app.entity';
|
|
3
|
-
export interface UserData extends UserMetadata {
|
|
4
|
-
[propName: string]: any;
|
|
5
|
-
}
|
|
6
|
-
export interface AppData extends AppMetadata {
|
|
7
|
-
[propName: string]: any;
|
|
8
|
-
}
|
|
9
|
-
export declare class UserEntity extends AppEntity implements User<AppData, UserData> {
|
|
10
|
-
static readonly $path: string;
|
|
11
|
-
blocked: boolean | undefined;
|
|
12
|
-
created_at: string | undefined;
|
|
13
|
-
email: string | undefined;
|
|
14
|
-
email_verified: boolean | undefined;
|
|
15
|
-
family_name: string | undefined;
|
|
16
|
-
given_name: string | undefined;
|
|
17
|
-
identities: Identity[] | undefined;
|
|
18
|
-
last_ip: string | undefined;
|
|
19
|
-
last_login: string | undefined;
|
|
20
|
-
last_password_reset: string | undefined;
|
|
21
|
-
logins_count: number | undefined;
|
|
22
|
-
multifactor: string[] | undefined;
|
|
23
|
-
name: string | undefined;
|
|
24
|
-
nickname: string | undefined;
|
|
25
|
-
phone_number: string | undefined;
|
|
26
|
-
phone_verified: boolean | undefined;
|
|
27
|
-
picture: string | undefined;
|
|
28
|
-
updated_at: string | undefined;
|
|
29
|
-
user_id: string | undefined;
|
|
30
|
-
user_metadata: UserData | undefined;
|
|
31
|
-
username: string | undefined;
|
|
32
|
-
}
|
|
1
|
+
import { AppMetadata, Identity, User, UserMetadata } from 'auth0';
|
|
2
|
+
import AppEntity from '../../app.entity';
|
|
3
|
+
export interface UserData extends UserMetadata {
|
|
4
|
+
[propName: string]: any;
|
|
5
|
+
}
|
|
6
|
+
export interface AppData extends AppMetadata {
|
|
7
|
+
[propName: string]: any;
|
|
8
|
+
}
|
|
9
|
+
export declare class UserEntity extends AppEntity implements User<AppData, UserData> {
|
|
10
|
+
static readonly $path: string;
|
|
11
|
+
blocked: boolean | undefined;
|
|
12
|
+
created_at: string | undefined;
|
|
13
|
+
email: string | undefined;
|
|
14
|
+
email_verified: boolean | undefined;
|
|
15
|
+
family_name: string | undefined;
|
|
16
|
+
given_name: string | undefined;
|
|
17
|
+
identities: Identity[] | undefined;
|
|
18
|
+
last_ip: string | undefined;
|
|
19
|
+
last_login: string | undefined;
|
|
20
|
+
last_password_reset: string | undefined;
|
|
21
|
+
logins_count: number | undefined;
|
|
22
|
+
multifactor: string[] | undefined;
|
|
23
|
+
name: string | undefined;
|
|
24
|
+
nickname: string | undefined;
|
|
25
|
+
phone_number: string | undefined;
|
|
26
|
+
phone_verified: boolean | undefined;
|
|
27
|
+
picture: string | undefined;
|
|
28
|
+
updated_at: string | undefined;
|
|
29
|
+
user_id: string | undefined;
|
|
30
|
+
user_metadata: UserData | undefined;
|
|
31
|
+
username: string | undefined;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=user.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.entity.d.ts","sourceRoot":"","sources":["user.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACjE,OAAO,SAAS,MAAM,kBAAkB,CAAA;AAExC,MAAM,WAAW,QAAS,SAAQ,YAAY;IAC5C,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC;CACzB;AAED,MAAM,WAAW,OAAQ,SAAQ,WAAW;IAC1C,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC;CACzB;AAED,qBAAa,UAAW,SAAQ,SAAU,YAAW,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC;IAC1E,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAU;IAEhC,OAAO,EAAE,OAAO,GAAG,SAAS,CAAA;IAC5B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,cAAc,EAAE,OAAO,GAAG,SAAS,CAAA;IACnC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,UAAU,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAA;IAClC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAA;IACvC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,WAAW,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IACjC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,cAAc,EAAE,OAAO,GAAG,SAAS,CAAA;IACnC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,aAAa,EAAE,QAAQ,GAAG,SAAS,CAAA;IACnC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;CACpC"}
|
|
@@ -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,12 @@
|
|
|
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
|
+
}
|
|
12
|
+
//# sourceMappingURL=user.validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.validator.d.ts","sourceRoot":"","sources":["user.validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAGhD,qBAAa,mBAAoB,YAAW,QAAQ;IAElD,KAAK,EAAE,MAAM,CAAA;IAGb,QAAQ,EAAE,MAAM,CAAA;IAIhB,IAAI,EAAE,MAAM,CAAA;CAEb;AAED,qBAAa,mBAAoB,YAAW,cAAc;IAGxD,IAAI,CAAC,EAAE,MAAM,CAAA;IAIb,QAAQ,CAAC,EAAE,MAAM,CAAA;IAIjB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB"}
|
|
@@ -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
package/src/app.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
}
|
|
17
|
+
//# sourceMappingURL=app.emitter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.emitter.d.ts","sourceRoot":"","sources":["app.emitter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAW,MAAM,uBAAuB,CAAA;AAC9D,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE9C,oBAAY,aAAa;IACvB,aAAa,oBAAoB;IACjC,aAAa,oBAAoB;IACjC,cAAc,qBAAqB;IACnC,cAAc,qBAAqB;IACnC,cAAc,qBAAqB;IACnC,gBAAgB,uBAAuB;IACvC,aAAa,oBAAoB;CAClC;AAGD,MAAM,CAAC,OAAO,OAAO,UAAU;IACnB,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAA;IAE5C,IAAI,CAAE,KAAK,EAAE,KAAK,GAAG,OAAO,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE;IAKrD,OAAO,CAAC,eAAe;CAGxB"}
|
|
@@ -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,8 @@
|
|
|
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
|
+
}
|
|
8
|
+
//# sourceMappingURL=app.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.entity.d.ts","sourceRoot":"","sources":["app.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEjC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,SAAU,YAAW,OAAO;IACxD,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IAEtB,EAAE,EAAE,MAAM,CAAA;WAEH,sBAAsB,CAAE,EAAE,KAAK,EAAE,EAAE,iBAAiB,GAAG,MAAM;CAI5E"}
|
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 @@
|
|
|
1
|
+
{"version":3,"file":"app.routes.d.ts","sourceRoot":"","sources":["app.routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAA;AA2B3E,QAAA,MAAM,MAAM,aA+BX,CAAA;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -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,4 @@
|
|
|
1
|
-
export * from './account';
|
|
2
|
-
export * from './inventory';
|
|
3
|
-
export * from './store';
|
|
1
|
+
export * from './account';
|
|
2
|
+
export * from './inventory';
|
|
3
|
+
export * from './store';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA"}
|
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,6 @@
|
|
|
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
|
+
}
|
|
6
|
+
//# sourceMappingURL=brand.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand.entity.d.ts","sourceRoot":"","sources":["brand.entity.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,kBAAkB,CAAA;AAExC,qBACa,WAAY,SAAQ,SAAS;IACxC,MAAM,CAAC,QAAQ,CAAC,KAAK,YAAW;IAEhC,IAAI,EAAE,MAAM,CAAA;CAEb"}
|
|
@@ -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,7 @@
|
|
|
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
|
+
}
|
|
7
|
+
//# sourceMappingURL=brand.validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand.validator.d.ts","sourceRoot":"","sources":["brand.validator.ts"],"names":[],"mappings":"AAEA,qBAAa,oBAAoB;IAE/B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,qBAAa,oBAAoB;IAG/B,IAAI,CAAC,EAAE,MAAM,CAAA;CACd"}
|
|
@@ -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,3 @@
|
|
|
1
|
-
export * from './brand.validator';
|
|
2
|
-
export * from './brand.entity';
|
|
1
|
+
export * from './brand.validator';
|
|
2
|
+
export * from './brand.entity';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA"}
|
|
@@ -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,6 @@
|
|
|
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
|
+
}
|
|
6
|
+
//# sourceMappingURL=category.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.entity.d.ts","sourceRoot":"","sources":["category.entity.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,kBAAkB,CAAA;AAExC,qBACa,cAAe,SAAQ,SAAS;IAC3C,MAAM,CAAC,QAAQ,CAAC,KAAK,gBAAe;IAEpC,IAAI,EAAE,MAAM,CAAA;CAEb"}
|
|
@@ -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
|
+
}
|