Skip to content

Commit

Permalink
feat(type): user permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
AliMD committed May 7, 2023
1 parent d785e5f commit aff0853
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/type/src/customer-order-management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ export interface OrderShippingInfo extends StringifyableRecord {
timePeriod: (typeof timePeriodCS)[number];
}

export const userPermissionsCS = ['*', 'user/patch'] as const;
export type UserPermission = typeof userPermissionsCS[number];

export interface ComUser extends User {
permissions: Array<UserPermission>;
shopName?: string;
}

Expand Down
8 changes: 8 additions & 0 deletions core/type/src/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ export interface User extends AlwatrDocumentObject {
*/
lpe: number;

/**
* User authorization permissions list.
*/
permissions?: Array<string>;

fullName: string;

phoneNumber: number;
Expand Down Expand Up @@ -44,5 +49,8 @@ export interface User extends AlwatrDocumentObject {
*/
address?: string;

/**
* Postal code
*/
postalCode?: string;
}

0 comments on commit aff0853

Please sign in to comment.