types-salon-management 1.0.1 → 1.0.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/.nmprc +1 -0
- package/dist/models/admin-session.model.js +3 -0
- package/dist/models/admin-session.model.js.map +1 -0
- package/dist/models/index.js +3 -0
- package/dist/models/index.js.map +1 -1
- package/dist/models/session.model.js +3 -0
- package/dist/models/session.model.js.map +1 -0
- package/dist/models/tax.model.js +3 -0
- package/dist/models/tax.model.js.map +1 -0
- package/package.json +2 -2
- package/src/models/admin-session.model.ts +20 -0
- package/src/models/index.ts +3 -0
- package/src/models/session.model.ts +156 -0
- package/src/models/tax.model.ts +34 -0
package/.nmprc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//registry.npmjs.org/:_authToken=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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-session.model.js","sourceRoot":"","sources":["../../src/models/admin-session.model.ts"],"names":[],"mappings":""}
|
package/dist/models/index.js
CHANGED
|
@@ -15,6 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./user.model"), exports);
|
|
18
|
+
__exportStar(require("./session.model"), exports);
|
|
19
|
+
__exportStar(require("./admin-session.model"), exports);
|
|
20
|
+
__exportStar(require("./tax.model"), exports);
|
|
18
21
|
__exportStar(require("./company.model"), exports);
|
|
19
22
|
__exportStar(require("./outlet.model"), exports);
|
|
20
23
|
__exportStar(require("./till.model"), exports);
|
package/dist/models/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,kDAAgC;AAChC,iDAA+B;AAC/B,+CAA8B;AAC9B,4DAA0C;AAC1C,kDAAgC;AAChC,oDAAkC;AAClC,+DAA6C;AAE7C,sDAAoC;AACpC,qDAAmC;AACnC,qDAAmC;AACnC,wDAAsC;AACtC,gDAA8B;AAC9B,sDAAoC;AACpC,kDAAgC;AAChC,6DAA2C;AAC3C,mDAAiC;AACjC,uDAAqC;AACrC,mDAAiC;AACjC,wCAAsB;AACtB,yCAAuB;AACvB,8CAA4B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,kDAAgC;AAChC,wDAAsC;AACtC,8CAA4B;AAC5B,kDAAgC;AAChC,iDAA+B;AAC/B,+CAA8B;AAC9B,4DAA0C;AAC1C,kDAAgC;AAChC,oDAAkC;AAClC,+DAA6C;AAE7C,sDAAoC;AACpC,qDAAmC;AACnC,qDAAmC;AACnC,wDAAsC;AACtC,gDAA8B;AAC9B,sDAAoC;AACpC,kDAAgC;AAChC,6DAA2C;AAC3C,mDAAiC;AACjC,uDAAqC;AACrC,mDAAiC;AACjC,wCAAsB;AACtB,yCAAuB;AACvB,8CAA4B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.model.js","sourceRoot":"","sources":["../../src/models/session.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tax.model.js","sourceRoot":"","sources":["../../src/models/tax.model.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "types-salon-management",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Types for Salon Management",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "tsc",
|
|
8
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"test": "echo \"Error: no test specified \" && exit 1",
|
|
9
9
|
"release": "bash ./publish_git.sh"
|
|
10
10
|
},
|
|
11
11
|
"repository": {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type AdminRole = 'super_admin' | 'onboarding_admin';
|
|
2
|
+
|
|
3
|
+
export interface AdminProfileDto {
|
|
4
|
+
firstName: string;
|
|
5
|
+
lastName: string;
|
|
6
|
+
phone?: unknown;
|
|
7
|
+
photoUrl?: string;
|
|
8
|
+
color?: string;
|
|
9
|
+
countryCode?: string;
|
|
10
|
+
timezone?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface AdminSessionDto {
|
|
14
|
+
admin: {
|
|
15
|
+
id: string;
|
|
16
|
+
email: string | null;
|
|
17
|
+
role: AdminRole;
|
|
18
|
+
profile: AdminProfileDto;
|
|
19
|
+
};
|
|
20
|
+
}
|
package/src/models/index.ts
CHANGED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
export interface UserProfileDto {
|
|
2
|
+
firstName: string;
|
|
3
|
+
lastName: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
photoUrl?: string;
|
|
7
|
+
countryCode: string;
|
|
8
|
+
timezone: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface UserDto {
|
|
12
|
+
id: string;
|
|
13
|
+
firebaseUid: string;
|
|
14
|
+
email: string | null;
|
|
15
|
+
companyId: string | null;
|
|
16
|
+
roleId: string | null;
|
|
17
|
+
staffId: string | null;
|
|
18
|
+
locationIds: string[] | null;
|
|
19
|
+
profile: UserProfileDto | null;
|
|
20
|
+
onboardingComplete: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CompanyCountryDto {
|
|
24
|
+
code: string;
|
|
25
|
+
name: string;
|
|
26
|
+
currencyCode: string;
|
|
27
|
+
currencySymbol: string;
|
|
28
|
+
locale: string;
|
|
29
|
+
taxLabel: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface CompanyBusinessCategoryDto {
|
|
33
|
+
id: string;
|
|
34
|
+
slug: string;
|
|
35
|
+
name: string;
|
|
36
|
+
isPrimary: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface CompanyDto {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
slug: string | null;
|
|
43
|
+
countryCode: string | null;
|
|
44
|
+
currency: string | null;
|
|
45
|
+
timezone: string | null;
|
|
46
|
+
adminStaffId: string | null;
|
|
47
|
+
adminLocationId: string | null;
|
|
48
|
+
country: CompanyCountryDto | null;
|
|
49
|
+
paymentGateway: string | null;
|
|
50
|
+
businessCategories: CompanyBusinessCategoryDto[];
|
|
51
|
+
primaryBusinessCategoryId: string | null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface LocationDto {
|
|
55
|
+
id: string;
|
|
56
|
+
companyId: string;
|
|
57
|
+
name: string;
|
|
58
|
+
slug: string | null;
|
|
59
|
+
description: string | null;
|
|
60
|
+
email: string | null;
|
|
61
|
+
address: unknown;
|
|
62
|
+
phones: unknown;
|
|
63
|
+
businessHours: unknown;
|
|
64
|
+
bookingSlotMinutes: number;
|
|
65
|
+
logoUrl: string | null;
|
|
66
|
+
photos: unknown;
|
|
67
|
+
privacy: string | null;
|
|
68
|
+
termsAndConditions: string | null;
|
|
69
|
+
/** Default service tax — tenant `taxes.id` (null = no tax; Firestore used 0) */
|
|
70
|
+
serviceTax: string | null;
|
|
71
|
+
/** Default product tax — tenant `taxes.id` (null = no tax; Firestore used 0) */
|
|
72
|
+
productTax: string | null;
|
|
73
|
+
onlineStatus: boolean;
|
|
74
|
+
isPublishedOnline: boolean;
|
|
75
|
+
timezone: string | null;
|
|
76
|
+
source: string | null;
|
|
77
|
+
active: boolean;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface RoleDto {
|
|
81
|
+
id: string;
|
|
82
|
+
name: string;
|
|
83
|
+
value: string;
|
|
84
|
+
isSystem: boolean;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** Granted permission keys for the current user's role */
|
|
88
|
+
export type PermissionMap = Record<string, boolean>;
|
|
89
|
+
|
|
90
|
+
export interface StaffDto {
|
|
91
|
+
id: string;
|
|
92
|
+
companyId: string;
|
|
93
|
+
userId: string | null;
|
|
94
|
+
firstName: string | null;
|
|
95
|
+
lastName: string | null;
|
|
96
|
+
displayName: string;
|
|
97
|
+
email: string | null;
|
|
98
|
+
locationIds: string[] | null;
|
|
99
|
+
designation: string | null;
|
|
100
|
+
active: boolean;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface SessionDto {
|
|
104
|
+
user: UserDto;
|
|
105
|
+
company: CompanyDto | null;
|
|
106
|
+
location: LocationDto | null;
|
|
107
|
+
staff: StaffDto | null;
|
|
108
|
+
role: RoleDto | null;
|
|
109
|
+
permissions: PermissionMap;
|
|
110
|
+
onboardingComplete: boolean;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface OnboardingUserResponseDto {
|
|
114
|
+
user: UserDto;
|
|
115
|
+
onboardingComplete: false;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface MasterCountryDto {
|
|
119
|
+
code: string;
|
|
120
|
+
name: string;
|
|
121
|
+
currencyCode: string;
|
|
122
|
+
currencySymbol: string;
|
|
123
|
+
locale: string;
|
|
124
|
+
taxLabel: string;
|
|
125
|
+
defaultTimezone: string;
|
|
126
|
+
paymentGateway: string;
|
|
127
|
+
signupActive: boolean;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface MasterBusinessCategoryDto {
|
|
131
|
+
id: string;
|
|
132
|
+
slug: string;
|
|
133
|
+
name: string;
|
|
134
|
+
description: string | null;
|
|
135
|
+
imageUrl: string | null;
|
|
136
|
+
active: boolean;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface CreateOnboardingUserRequest {
|
|
140
|
+
email: string;
|
|
141
|
+
firstName: string;
|
|
142
|
+
lastName: string;
|
|
143
|
+
phone?: unknown;
|
|
144
|
+
color?: string;
|
|
145
|
+
photoUrl?: string;
|
|
146
|
+
countryCode: string;
|
|
147
|
+
timezone: string;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface CreateOnboardingCompanyRequest {
|
|
151
|
+
companyName: string;
|
|
152
|
+
businessCategoryIds: string[];
|
|
153
|
+
address?: unknown;
|
|
154
|
+
countryCode: string;
|
|
155
|
+
timezone: string;
|
|
156
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { TaxCategory } from '../enum/tax-category';
|
|
2
|
+
|
|
3
|
+
export type TaxCatalogSource = 'system' | 'user';
|
|
4
|
+
|
|
5
|
+
export interface TaxDto {
|
|
6
|
+
id: string;
|
|
7
|
+
companyId: string;
|
|
8
|
+
name: string;
|
|
9
|
+
type: TaxCategory;
|
|
10
|
+
percentage: number | null;
|
|
11
|
+
isDefault: boolean;
|
|
12
|
+
source: TaxCatalogSource;
|
|
13
|
+
memberTaxIds: string[];
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string | null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface CreateTaxRequest {
|
|
19
|
+
name: string;
|
|
20
|
+
type: TaxCategory;
|
|
21
|
+
percentage?: number | null;
|
|
22
|
+
memberTaxIds?: string[];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface UpdateTaxRequest {
|
|
26
|
+
name?: string;
|
|
27
|
+
percentage?: number | null;
|
|
28
|
+
memberTaxIds?: string[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface UpdateLocationTaxConfigRequest {
|
|
32
|
+
serviceTaxId?: string | null;
|
|
33
|
+
productTaxId?: string | null;
|
|
34
|
+
}
|