types-salon-management 1.0.9 → 1.0.12
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/dist/api/index.d.ts +2 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/staff/index.d.ts +4 -0
- package/dist/api/staff/index.d.ts.map +1 -0
- package/dist/api/staff/index.js +3 -0
- package/dist/api/staff/index.js.map +1 -0
- package/dist/api/staff/staff.dto.d.ts +38 -0
- package/dist/api/staff/staff.dto.d.ts.map +1 -0
- package/dist/api/staff/staff.dto.js +3 -0
- package/dist/api/staff/staff.dto.js.map +1 -0
- package/dist/api/staff/staff.requests.d.ts +53 -0
- package/dist/api/staff/staff.requests.d.ts.map +1 -0
- package/dist/api/staff/staff.requests.js +3 -0
- package/dist/api/staff/staff.requests.js.map +1 -0
- package/dist/api/user-roles/index.d.ts +2 -0
- package/dist/api/user-roles/index.d.ts.map +1 -0
- package/dist/api/user-roles/index.js +3 -0
- package/dist/api/user-roles/index.js.map +1 -0
- package/dist/api/user-roles/user-role.dto.d.ts +27 -0
- package/dist/api/user-roles/user-role.dto.d.ts.map +1 -0
- package/dist/api/user-roles/user-role.dto.js +3 -0
- package/dist/api/user-roles/user-role.dto.js.map +1 -0
- package/package.json +1 -1
- package/src/api/index.ts +2 -0
- package/src/api/staff/index.ts +8 -0
- package/src/api/staff/staff.dto.ts +40 -0
- package/src/api/staff/staff.requests.ts +56 -0
- package/src/api/user-roles/index.ts +7 -0
- package/src/api/user-roles/user-role.dto.ts +31 -0
package/dist/api/index.d.ts
CHANGED
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC"}
|
package/dist/api/index.js
CHANGED
|
@@ -28,4 +28,6 @@ __exportStar(require("./location"), exports);
|
|
|
28
28
|
__exportStar(require("./platform-terms"), exports);
|
|
29
29
|
__exportStar(require("./user/index"), exports);
|
|
30
30
|
__exportStar(require("./company-settings/index"), exports);
|
|
31
|
+
__exportStar(require("./staff/index"), exports);
|
|
32
|
+
__exportStar(require("./user-roles/index"), exports);
|
|
31
33
|
//# sourceMappingURL=index.js.map
|
package/dist/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qEAAqE;AACrE,0CAAwB;AACxB,4CAA0B;AAC1B,iDAA+B;AAC/B,+CAA6B;AAC7B,2CAAyB;AACzB,+CAA6B;AAC7B,8CAA4B;AAC5B,qDAAmC;AACnC,wDAAsC;AACtC,6CAA2B;AAC3B,mDAAiC;AACjC,+CAA6B;AAC7B,2DAAyC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qEAAqE;AACrE,0CAAwB;AACxB,4CAA0B;AAC1B,iDAA+B;AAC/B,+CAA6B;AAC7B,2CAAyB;AACzB,+CAA6B;AAC7B,8CAA4B;AAC5B,qDAAmC;AACnC,wDAAsC;AACtC,6CAA2B;AAC3B,mDAAiC;AACjC,+CAA6B;AAC7B,2DAAyC;AACzC,gDAA8B;AAC9B,qDAAmC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { StaffSummaryDto, StaffDetailDto, StaffRoleSummaryDto } from './staff.dto';
|
|
2
|
+
export type { UserRoleSummaryDto } from '../user-roles';
|
|
3
|
+
export type { ChangeStaffPasswordRequest, CreateStaffRequest, EnableStaffLoginRequest, UpdateStaffRequest, } from './staff.requests';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/staff/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACxF,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,YAAY,EACV,0BAA0B,EAC1B,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/staff/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { LocationAddressDto } from '../location/location.dto';
|
|
2
|
+
export interface StaffRoleSummaryDto {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
/** Company staff list / management summary */
|
|
8
|
+
export interface StaffSummaryDto {
|
|
9
|
+
id: string;
|
|
10
|
+
companyId: string;
|
|
11
|
+
userId: string | null;
|
|
12
|
+
firstName: string | null;
|
|
13
|
+
lastName: string | null;
|
|
14
|
+
displayName: string;
|
|
15
|
+
email: string | null;
|
|
16
|
+
color: string | null;
|
|
17
|
+
designation: string | null;
|
|
18
|
+
gender: string | null;
|
|
19
|
+
active: boolean;
|
|
20
|
+
hasLogin: boolean;
|
|
21
|
+
locationIds: string[];
|
|
22
|
+
role: StaffRoleSummaryDto | null;
|
|
23
|
+
}
|
|
24
|
+
/** Staff edit / detail */
|
|
25
|
+
export interface StaffDetailDto extends StaffSummaryDto {
|
|
26
|
+
title: string | null;
|
|
27
|
+
phone: unknown;
|
|
28
|
+
photoUrl: string | null;
|
|
29
|
+
roleId: string | null;
|
|
30
|
+
allowCalendarBooking: boolean;
|
|
31
|
+
onlineBooking: boolean;
|
|
32
|
+
showInStaffRoster: boolean;
|
|
33
|
+
employmentStartDate: string | null;
|
|
34
|
+
employmentEndDate: string | null;
|
|
35
|
+
note: string | null;
|
|
36
|
+
address: LocationAddressDto | null;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=staff.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staff.dto.d.ts","sourceRoot":"","sources":["../../../src/api/staff/staff.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,8CAA8C;AAC9C,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAAC;CAClC;AAED,0BAA0B;AAC1B,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,aAAa,EAAE,OAAO,CAAC;IACvB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staff.dto.js","sourceRoot":"","sources":["../../../src/api/staff/staff.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { LocationAddressDto } from '../location/location.dto';
|
|
2
|
+
export interface CreateStaffRequest {
|
|
3
|
+
title?: string | null;
|
|
4
|
+
firstName: string;
|
|
5
|
+
lastName: string;
|
|
6
|
+
gender?: string | null;
|
|
7
|
+
email?: string | null;
|
|
8
|
+
phone?: unknown;
|
|
9
|
+
photoUrl?: string | null;
|
|
10
|
+
color?: string | null;
|
|
11
|
+
designation?: string | null;
|
|
12
|
+
note?: string | null;
|
|
13
|
+
address?: LocationAddressDto | null;
|
|
14
|
+
locationIds: string[];
|
|
15
|
+
allowCalendarBooking?: boolean;
|
|
16
|
+
onlineBooking?: boolean;
|
|
17
|
+
showInStaffRoster?: boolean;
|
|
18
|
+
active?: boolean;
|
|
19
|
+
employmentStartDate?: string | null;
|
|
20
|
+
employmentEndDate?: string | null;
|
|
21
|
+
/** When set with roleId, creates Firebase user + users row and links staff. */
|
|
22
|
+
password?: string | null;
|
|
23
|
+
roleId?: string | null;
|
|
24
|
+
}
|
|
25
|
+
export interface UpdateStaffRequest {
|
|
26
|
+
title?: string | null;
|
|
27
|
+
firstName?: string;
|
|
28
|
+
lastName?: string;
|
|
29
|
+
gender?: string | null;
|
|
30
|
+
email?: string | null;
|
|
31
|
+
phone?: unknown;
|
|
32
|
+
photoUrl?: string | null;
|
|
33
|
+
color?: string | null;
|
|
34
|
+
designation?: string | null;
|
|
35
|
+
note?: string | null;
|
|
36
|
+
address?: LocationAddressDto | null;
|
|
37
|
+
locationIds?: string[];
|
|
38
|
+
allowCalendarBooking?: boolean;
|
|
39
|
+
onlineBooking?: boolean;
|
|
40
|
+
showInStaffRoster?: boolean;
|
|
41
|
+
active?: boolean;
|
|
42
|
+
employmentStartDate?: string | null;
|
|
43
|
+
employmentEndDate?: string | null;
|
|
44
|
+
roleId?: string | null;
|
|
45
|
+
}
|
|
46
|
+
export interface EnableStaffLoginRequest {
|
|
47
|
+
password: string;
|
|
48
|
+
roleId: string;
|
|
49
|
+
}
|
|
50
|
+
export interface ChangeStaffPasswordRequest {
|
|
51
|
+
password: string;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=staff.requests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staff.requests.d.ts","sourceRoot":"","sources":["../../../src/api/staff/staff.requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACpC,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staff.requests.js","sourceRoot":"","sources":["../../../src/api/staff/staff.requests.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/user-roles/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,WAAW,EACX,kBAAkB,GACnB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/user-roles/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AuditActor } from '../audit';
|
|
2
|
+
export interface UserRoleDto {
|
|
3
|
+
id: string;
|
|
4
|
+
companyId: string;
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
isSystem: boolean;
|
|
8
|
+
order: number;
|
|
9
|
+
createdBy: AuditActor | null;
|
|
10
|
+
updatedBy: AuditActor | null;
|
|
11
|
+
deletedBy: AuditActor | null;
|
|
12
|
+
}
|
|
13
|
+
export interface UserRoleDetailDto extends UserRoleDto {
|
|
14
|
+
permissions: Record<string, boolean>;
|
|
15
|
+
}
|
|
16
|
+
export interface CreateUserRoleRequest {
|
|
17
|
+
name: string;
|
|
18
|
+
value?: string;
|
|
19
|
+
permissions: Record<string, boolean>;
|
|
20
|
+
}
|
|
21
|
+
export interface UpdateUserRoleRequest {
|
|
22
|
+
name?: string;
|
|
23
|
+
permissions?: Record<string, boolean>;
|
|
24
|
+
}
|
|
25
|
+
/** Same shape as staff summary `role`; list item for pickers. */
|
|
26
|
+
export type UserRoleSummaryDto = Pick<UserRoleDto, 'id' | 'name' | 'value'>;
|
|
27
|
+
//# sourceMappingURL=user-role.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-role.dto.d.ts","sourceRoot":"","sources":["../../../src/api/user-roles/user-role.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED,iEAAiE;AACjE,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,WAAW,EAAE,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-role.dto.js","sourceRoot":"","sources":["../../../src/api/user-roles/user-role.dto.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
package/src/api/index.ts
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { StaffSummaryDto, StaffDetailDto, StaffRoleSummaryDto } from './staff.dto';
|
|
2
|
+
export type { UserRoleSummaryDto } from '../user-roles';
|
|
3
|
+
export type {
|
|
4
|
+
ChangeStaffPasswordRequest,
|
|
5
|
+
CreateStaffRequest,
|
|
6
|
+
EnableStaffLoginRequest,
|
|
7
|
+
UpdateStaffRequest,
|
|
8
|
+
} from './staff.requests';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { LocationAddressDto } from '../location/location.dto';
|
|
2
|
+
|
|
3
|
+
export interface StaffRoleSummaryDto {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** Company staff list / management summary */
|
|
10
|
+
export interface StaffSummaryDto {
|
|
11
|
+
id: string;
|
|
12
|
+
companyId: string;
|
|
13
|
+
userId: string | null;
|
|
14
|
+
firstName: string | null;
|
|
15
|
+
lastName: string | null;
|
|
16
|
+
displayName: string;
|
|
17
|
+
email: string | null;
|
|
18
|
+
color: string | null;
|
|
19
|
+
designation: string | null;
|
|
20
|
+
gender: string | null;
|
|
21
|
+
active: boolean;
|
|
22
|
+
hasLogin: boolean;
|
|
23
|
+
locationIds: string[];
|
|
24
|
+
role: StaffRoleSummaryDto | null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Staff edit / detail */
|
|
28
|
+
export interface StaffDetailDto extends StaffSummaryDto {
|
|
29
|
+
title: string | null;
|
|
30
|
+
phone: unknown;
|
|
31
|
+
photoUrl: string | null;
|
|
32
|
+
roleId: string | null;
|
|
33
|
+
allowCalendarBooking: boolean;
|
|
34
|
+
onlineBooking: boolean;
|
|
35
|
+
showInStaffRoster: boolean;
|
|
36
|
+
employmentStartDate: string | null;
|
|
37
|
+
employmentEndDate: string | null;
|
|
38
|
+
note: string | null;
|
|
39
|
+
address: LocationAddressDto | null;
|
|
40
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { LocationAddressDto } from '../location/location.dto';
|
|
2
|
+
|
|
3
|
+
export interface CreateStaffRequest {
|
|
4
|
+
title?: string | null;
|
|
5
|
+
firstName: string;
|
|
6
|
+
lastName: string;
|
|
7
|
+
gender?: string | null;
|
|
8
|
+
email?: string | null;
|
|
9
|
+
phone?: unknown;
|
|
10
|
+
photoUrl?: string | null;
|
|
11
|
+
color?: string | null;
|
|
12
|
+
designation?: string | null;
|
|
13
|
+
note?: string | null;
|
|
14
|
+
address?: LocationAddressDto | null;
|
|
15
|
+
locationIds: string[];
|
|
16
|
+
allowCalendarBooking?: boolean;
|
|
17
|
+
onlineBooking?: boolean;
|
|
18
|
+
showInStaffRoster?: boolean;
|
|
19
|
+
active?: boolean;
|
|
20
|
+
employmentStartDate?: string | null;
|
|
21
|
+
employmentEndDate?: string | null;
|
|
22
|
+
/** When set with roleId, creates Firebase user + users row and links staff. */
|
|
23
|
+
password?: string | null;
|
|
24
|
+
roleId?: string | null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface UpdateStaffRequest {
|
|
28
|
+
title?: string | null;
|
|
29
|
+
firstName?: string;
|
|
30
|
+
lastName?: string;
|
|
31
|
+
gender?: string | null;
|
|
32
|
+
email?: string | null;
|
|
33
|
+
phone?: unknown;
|
|
34
|
+
photoUrl?: string | null;
|
|
35
|
+
color?: string | null;
|
|
36
|
+
designation?: string | null;
|
|
37
|
+
note?: string | null;
|
|
38
|
+
address?: LocationAddressDto | null;
|
|
39
|
+
locationIds?: string[];
|
|
40
|
+
allowCalendarBooking?: boolean;
|
|
41
|
+
onlineBooking?: boolean;
|
|
42
|
+
showInStaffRoster?: boolean;
|
|
43
|
+
active?: boolean;
|
|
44
|
+
employmentStartDate?: string | null;
|
|
45
|
+
employmentEndDate?: string | null;
|
|
46
|
+
roleId?: string | null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface EnableStaffLoginRequest {
|
|
50
|
+
password: string;
|
|
51
|
+
roleId: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface ChangeStaffPasswordRequest {
|
|
55
|
+
password: string;
|
|
56
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { AuditActor } from '../audit';
|
|
2
|
+
|
|
3
|
+
export interface UserRoleDto {
|
|
4
|
+
id: string;
|
|
5
|
+
companyId: string;
|
|
6
|
+
name: string;
|
|
7
|
+
value: string;
|
|
8
|
+
isSystem: boolean;
|
|
9
|
+
order: number;
|
|
10
|
+
createdBy: AuditActor | null;
|
|
11
|
+
updatedBy: AuditActor | null;
|
|
12
|
+
deletedBy: AuditActor | null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface UserRoleDetailDto extends UserRoleDto {
|
|
16
|
+
permissions: Record<string, boolean>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface CreateUserRoleRequest {
|
|
20
|
+
name: string;
|
|
21
|
+
value?: string;
|
|
22
|
+
permissions: Record<string, boolean>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface UpdateUserRoleRequest {
|
|
26
|
+
name?: string;
|
|
27
|
+
permissions?: Record<string, boolean>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Same shape as staff summary `role`; list item for pickers. */
|
|
31
|
+
export type UserRoleSummaryDto = Pick<UserRoleDto, 'id' | 'name' | 'value'>;
|