@7365admin1/layer-common 1.8.0
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/.changeset/README.md +8 -0
- package/.changeset/config.json +11 -0
- package/.editorconfig +12 -0
- package/.github/workflows/main.yml +17 -0
- package/.github/workflows/publish.yml +39 -0
- package/.nuxtrc +1 -0
- package/.playground/app.vue +41 -0
- package/.playground/eslint.config.mjs +6 -0
- package/.playground/nuxt.config.ts +22 -0
- package/.playground/pages/feedback.vue +30 -0
- package/CHANGELOG.md +263 -0
- package/README.md +73 -0
- package/app.vue +3 -0
- package/components/AccessCardAddForm.vue +363 -0
- package/components/AccessManagement.vue +420 -0
- package/components/Avatar/Main.vue +68 -0
- package/components/BillingMain.vue +66 -0
- package/components/BtnUploadFile.vue +139 -0
- package/components/BuildingForm.vue +303 -0
- package/components/BuildingManagement/buildings.vue +335 -0
- package/components/BuildingManagement/units.vue +350 -0
- package/components/BuildingUnitFormAdd.vue +441 -0
- package/components/BuildingUnitFormEdit.vue +429 -0
- package/components/CameraForm.vue +264 -0
- package/components/CameraMain.vue +352 -0
- package/components/Card/DeleteConfirmation.vue +51 -0
- package/components/Card/MemberInfoSummary.vue +44 -0
- package/components/Card/Toggle.vue +25 -0
- package/components/Chat/Bubbles.vue +53 -0
- package/components/Chat/Information.vue +416 -0
- package/components/Chat/ListCard.vue +62 -0
- package/components/Chat/Message.vue +158 -0
- package/components/Chat/Navigation.vue +150 -0
- package/components/ConfirmDialog.vue +66 -0
- package/components/Container/Standard.vue +33 -0
- package/components/DashboardPlaceholder.vue +1524 -0
- package/components/Dialog/DeleteConfirmation.vue +51 -0
- package/components/Dialog/ReplaceAutofillPrompt.vue +49 -0
- package/components/Dialog/UpdateMoreAction.vue +103 -0
- package/components/DocumentForm.vue +187 -0
- package/components/DocumentManagement.vue +376 -0
- package/components/Editor.vue +95 -0
- package/components/EntryPassMain.vue +518 -0
- package/components/Feedback/Form.vue +173 -0
- package/components/FeedbackDetail.vue +599 -0
- package/components/FeedbackMain.vue +588 -0
- package/components/FormDialog.vue +65 -0
- package/components/ImageCarousel.vue +138 -0
- package/components/Input/Date.vue +177 -0
- package/components/Input/DateTimePicker.vue +131 -0
- package/components/Input/File.vue +236 -0
- package/components/Input/FileV2.vue +234 -0
- package/components/Input/InputPhoneNumberV2.vue +164 -0
- package/components/Input/ListGroupSelection.vue +96 -0
- package/components/Input/NRICNumber.vue +53 -0
- package/components/Input/NewDate.vue +123 -0
- package/components/Input/Number.vue +124 -0
- package/components/Input/Password.vue +22 -0
- package/components/Input/PhoneNumber.vue +188 -0
- package/components/Input/VehicleNumber.vue +49 -0
- package/components/InputLabel.vue +22 -0
- package/components/InvitationForm.vue +359 -0
- package/components/InvitationMain.vue +310 -0
- package/components/Layout/Header.vue +129 -0
- package/components/Layout/NavigationDrawer.vue +44 -0
- package/components/ListItem.vue +35 -0
- package/components/ListView.vue +87 -0
- package/components/LocalPagination.vue +31 -0
- package/components/MemberMain.vue +459 -0
- package/components/NFC/NFCPatrolReportMain.vue +591 -0
- package/components/NFC/NFCPatrolRouteForm.vue +596 -0
- package/components/NFC/NFCPatrolRouteMain.vue +539 -0
- package/components/NFC/NFCTagForm.vue +236 -0
- package/components/NFC/NFCTagMain.vue +337 -0
- package/components/NFC/PatrolSettings.vue +130 -0
- package/components/NavigationItem.vue +83 -0
- package/components/NumberSettingField.vue +107 -0
- package/components/OnlineFormConfigurationForm.vue +290 -0
- package/components/OnlineFormsConfiguration.vue +429 -0
- package/components/PeopleForm.vue +452 -0
- package/components/PlaceholderComponent.vue +34 -0
- package/components/RolePermissionFormCreate.vue +161 -0
- package/components/RolePermissionFormPreviewUpdate.vue +183 -0
- package/components/RolePermissionMain.vue +361 -0
- package/components/SearchVehicleNumberUser.vue +91 -0
- package/components/ServiceProviderFormCreate.vue +154 -0
- package/components/ServiceProviderMain.vue +547 -0
- package/components/SignaturePad.vue +73 -0
- package/components/Snackbar.vue +23 -0
- package/components/SpecificAttr.vue +53 -0
- package/components/SupplyManagement.vue +292 -0
- package/components/SwitchContext.vue +108 -0
- package/components/TableList.vue +150 -0
- package/components/TableListSecondary.vue +164 -0
- package/components/TableMain.vue +142 -0
- package/components/TableWithButton.vue +94 -0
- package/components/VehicleUpdateMoreAction.vue +84 -0
- package/components/VideoPlayer.vue +125 -0
- package/components/VisitorForm.vue +659 -0
- package/components/VisitorFormSelection.vue +53 -0
- package/components/VisitorManagement.vue +490 -0
- package/components/WorkOrder/Create.vue +284 -0
- package/components/WorkOrder/Detail.vue +71 -0
- package/components/WorkOrder/ListView.vue +96 -0
- package/components/WorkOrder/Main.vue +489 -0
- package/components/Workorder.vue +1 -0
- package/composables/useAddress.ts +107 -0
- package/composables/useBuilding.ts +250 -0
- package/composables/useBuildingUnit.ts +116 -0
- package/composables/useCard.ts +46 -0
- package/composables/useCommonPermission.ts +207 -0
- package/composables/useCustomer.ts +113 -0
- package/composables/useCustomerSite.ts +56 -0
- package/composables/useDashboard.ts +31 -0
- package/composables/useDashboardData.ts +425 -0
- package/composables/useDocument.ts +57 -0
- package/composables/useFacility.ts +246 -0
- package/composables/useFeedback.ts +119 -0
- package/composables/useFile.ts +55 -0
- package/composables/useInvoice.ts +18 -0
- package/composables/useLocal.ts +131 -0
- package/composables/useLocalAuth.ts +137 -0
- package/composables/useLocalSetup.ts +13 -0
- package/composables/useMember.ts +111 -0
- package/composables/useNFCPatrolRoute.ts +77 -0
- package/composables/useNFCPatrolSettings.ts +19 -0
- package/composables/useNFCPatrolTag.ts +53 -0
- package/composables/useOnlineForm.ts +67 -0
- package/composables/useOrg.ts +129 -0
- package/composables/usePDFDownload.ts +25 -0
- package/composables/usePaymentMethod.ts +101 -0
- package/composables/usePeople.ts +81 -0
- package/composables/usePermission.ts +54 -0
- package/composables/usePhoneCountries.ts +561 -0
- package/composables/usePrice.ts +15 -0
- package/composables/usePromoCode.ts +36 -0
- package/composables/useRecapPermission.ts +26 -0
- package/composables/useRole.ts +104 -0
- package/composables/useSecurityUtils.ts +18 -0
- package/composables/useServiceProvider.ts +224 -0
- package/composables/useSite.ts +109 -0
- package/composables/useSiteEntryPassSettings.ts +46 -0
- package/composables/useSiteSettings.ts +123 -0
- package/composables/useSubscription.ts +150 -0
- package/composables/useUser.ts +132 -0
- package/composables/useUtils.ts +445 -0
- package/composables/useVerification.ts +34 -0
- package/composables/useVisitor.ts +120 -0
- package/composables/useWorkOrder.ts +85 -0
- package/error.vue +41 -0
- package/layouts/plain.vue +7 -0
- package/middleware/01.auth.ts +20 -0
- package/middleware/02.org.ts +21 -0
- package/middleware/03.customer.ts +13 -0
- package/middleware/member.ts +4 -0
- package/nuxt.config.ts +54 -0
- package/package.json +39 -0
- package/pages/index.vue +3 -0
- package/pages/payment-method-linked.vue +31 -0
- package/pages/require-customer.vue +56 -0
- package/pages/require-organization-membership.vue +47 -0
- package/pages/unauthorized.vue +29 -0
- package/plugins/API.ts +21 -0
- package/plugins/iconify.client.ts +5 -0
- package/plugins/secure-member.client.ts +86 -0
- package/plugins/vuetify.ts +62 -0
- package/public/bg-camera.jpg +0 -0
- package/public/bg-city.jpg +0 -0
- package/public/bg-condo.jpg +0 -0
- package/public/images/icons/delete-icon.png +0 -0
- package/public/sprite.svg +1 -0
- package/tsconfig.json +3 -0
- package/types/address.d.ts +13 -0
- package/types/building.d.ts +27 -0
- package/types/camera.d.ts +31 -0
- package/types/card.d.ts +22 -0
- package/types/customer.d.ts +27 -0
- package/types/document.d.ts +6 -0
- package/types/feedback.d.ts +68 -0
- package/types/local.d.ts +74 -0
- package/types/member.d.ts +21 -0
- package/types/online-form.d.ts +15 -0
- package/types/org.d.ts +13 -0
- package/types/people.d.ts +24 -0
- package/types/permission.d.ts +25 -0
- package/types/phone-number.d.ts +10 -0
- package/types/price.d.ts +17 -0
- package/types/promo-code.d.ts +19 -0
- package/types/role.d.ts +11 -0
- package/types/select.d.ts +4 -0
- package/types/service-provider.d.ts +15 -0
- package/types/site.d.ts +20 -0
- package/types/subscription.d.ts +23 -0
- package/types/user.d.ts +19 -0
- package/types/verification.d.ts +20 -0
- package/types/visitor.d.ts +42 -0
- package/types/work-order.d.ts +42 -0
- package/utils/phoneMasks.ts +1703 -0
package/tsconfig.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare type TBuilding = {
|
|
2
|
+
_id?: string;
|
|
3
|
+
site: string;
|
|
4
|
+
name: string;
|
|
5
|
+
block: number | null;
|
|
6
|
+
levels: string[];
|
|
7
|
+
buildingFloorPlan: string[]
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
declare type TBuildingUnit = {
|
|
11
|
+
_id?: string;
|
|
12
|
+
site: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
owner?: string;
|
|
15
|
+
ownerName?: string;
|
|
16
|
+
building: string;
|
|
17
|
+
buildingName?: string;
|
|
18
|
+
block: number | null;
|
|
19
|
+
level: string | null;
|
|
20
|
+
category: string;
|
|
21
|
+
status: string;
|
|
22
|
+
buildingUnitFiles: string[];
|
|
23
|
+
companyName: string;
|
|
24
|
+
companyRegistrationNumber: number | string;
|
|
25
|
+
leaseStart: string;
|
|
26
|
+
leaseEnd: string;
|
|
27
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare type TCamera = {
|
|
2
|
+
site: string;
|
|
3
|
+
cameras: {
|
|
4
|
+
host: string;
|
|
5
|
+
username: string;
|
|
6
|
+
password: string;
|
|
7
|
+
type: TCameraTypes;
|
|
8
|
+
}[];
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
declare type TCameraConfig = {
|
|
12
|
+
host: string;
|
|
13
|
+
username: string;
|
|
14
|
+
password: string;
|
|
15
|
+
type: TCameraTypes;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
declare type TCameraTypes = "ip" | "exit" | "entry" | "both";
|
|
19
|
+
|
|
20
|
+
declare type TSiteCamera = {
|
|
21
|
+
_id?: string;
|
|
22
|
+
site: string;
|
|
23
|
+
host: string;
|
|
24
|
+
username: string;
|
|
25
|
+
password: string;
|
|
26
|
+
type: "ip" | "anpr";
|
|
27
|
+
category: "standard" | "resident" | "visitor";
|
|
28
|
+
direction: "entry" | "exit" | "both" | "none";
|
|
29
|
+
guardPost: number | null;
|
|
30
|
+
status: string;
|
|
31
|
+
};
|
package/types/card.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare type TCard = {
|
|
2
|
+
_id?: string;
|
|
3
|
+
name: string;
|
|
4
|
+
accessCardType?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
cardNumber?: string;
|
|
7
|
+
startDate?: string | Date;
|
|
8
|
+
endDate?: string | Date;
|
|
9
|
+
door?: string;
|
|
10
|
+
accessGroup?: string[];
|
|
11
|
+
cardType?: string;
|
|
12
|
+
pinNo?: string;
|
|
13
|
+
useAsLiftCard?: boolean;
|
|
14
|
+
liftAccessLevel?: string;
|
|
15
|
+
isActivate?: boolean;
|
|
16
|
+
isAntiPassBack?: boolean;
|
|
17
|
+
status?: string;
|
|
18
|
+
org?: string | ObjectId;
|
|
19
|
+
site?: string | ObjectId;
|
|
20
|
+
unit: string;
|
|
21
|
+
assign: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare type TCustomer = {
|
|
2
|
+
_id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
orgId: string;
|
|
5
|
+
customerOrgId: string;
|
|
6
|
+
createdAt: string;
|
|
7
|
+
updatedAt: string;
|
|
8
|
+
siteName?: string;
|
|
9
|
+
siteDescription?: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
declare type TCustomerCreate = Pick<
|
|
13
|
+
TCustomer,
|
|
14
|
+
"name" | "orgId" | "siteName" | "siteDescription"
|
|
15
|
+
>;
|
|
16
|
+
|
|
17
|
+
declare type TCustomerSite = {
|
|
18
|
+
name: string;
|
|
19
|
+
site?: string;
|
|
20
|
+
siteOrg: string;
|
|
21
|
+
siteOrgName: string;
|
|
22
|
+
org: string;
|
|
23
|
+
status?: string;
|
|
24
|
+
createdAt?: string;
|
|
25
|
+
updatedAt?: string;
|
|
26
|
+
deletedAt?: string;
|
|
27
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
declare type TFeedback = {
|
|
2
|
+
_id: string;
|
|
3
|
+
attachments?: string[];
|
|
4
|
+
category: string;
|
|
5
|
+
categoryInfo?: string;
|
|
6
|
+
subject: string;
|
|
7
|
+
location: string;
|
|
8
|
+
description: string;
|
|
9
|
+
createdBy: string;
|
|
10
|
+
createdAt?: string;
|
|
11
|
+
updatedAt?: string;
|
|
12
|
+
status?: string;
|
|
13
|
+
metadata?: TFeedbackMetadata;
|
|
14
|
+
createdByName?: string;
|
|
15
|
+
organization?: string;
|
|
16
|
+
site?: string;
|
|
17
|
+
signature?: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
highPriority?: boolean;
|
|
20
|
+
serviceProvider?: string;
|
|
21
|
+
assignee?: string;
|
|
22
|
+
createdBy?: string;
|
|
23
|
+
workOrderNo?: string;
|
|
24
|
+
workOrderId?: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
declare type TFeedbackMetadata = {
|
|
28
|
+
serviceProvider: string;
|
|
29
|
+
assignee: string;
|
|
30
|
+
organization: string;
|
|
31
|
+
site: string;
|
|
32
|
+
name: string;
|
|
33
|
+
signature: string;
|
|
34
|
+
attachments: string;
|
|
35
|
+
completedAt: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
declare type TFeedbackCreate = Pick<
|
|
39
|
+
TFeedback,
|
|
40
|
+
| "subject"
|
|
41
|
+
| "category"
|
|
42
|
+
| "location"
|
|
43
|
+
| "description"
|
|
44
|
+
| "attachments"
|
|
45
|
+
| "highPriority"
|
|
46
|
+
| "serviceProvider"
|
|
47
|
+
| "assignee"
|
|
48
|
+
| "organization"
|
|
49
|
+
| "site"
|
|
50
|
+
| "createdBy"
|
|
51
|
+
>;
|
|
52
|
+
|
|
53
|
+
declare type TFeedbackUpdate = Pick<
|
|
54
|
+
TFeedback,
|
|
55
|
+
"subject" | "category" | "location" | "description" | "attachments"
|
|
56
|
+
>;
|
|
57
|
+
|
|
58
|
+
declare type TFeedbackUpdate = Pick<
|
|
59
|
+
TFeedback,
|
|
60
|
+
"attachments" | "category" | "subject" | "location" | "description"
|
|
61
|
+
>;
|
|
62
|
+
|
|
63
|
+
declare type TFeedbackStatusComplete = Pick<
|
|
64
|
+
TFeedback,
|
|
65
|
+
"status" | "name" | "signature" | "attachments"
|
|
66
|
+
>;
|
|
67
|
+
|
|
68
|
+
declare type TFeedbackUpdateStatus = Pick<TFeedback, "status">;
|
package/types/local.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
declare type TToken = {
|
|
2
|
+
accessToken: string;
|
|
3
|
+
refreshToken: string;
|
|
4
|
+
id: string;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
declare type TNavigationRoute = {
|
|
8
|
+
name: string;
|
|
9
|
+
params?: TKeyValuePair;
|
|
10
|
+
query?: TKeyValuePair;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
declare type TNavigationItem = {
|
|
14
|
+
title: string;
|
|
15
|
+
icon?: string;
|
|
16
|
+
route?: TNavigationRoute;
|
|
17
|
+
children?: TNavigationItem[];
|
|
18
|
+
link?: string
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
declare type TKeyValuePair<
|
|
22
|
+
K extends string | number | symbol = string,
|
|
23
|
+
V = string | number | object | Array | TKeyValuePair
|
|
24
|
+
> = {
|
|
25
|
+
[key in K]: V;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
declare type TFeedbackPaginatedResponse = {
|
|
29
|
+
items: TFeedback[];
|
|
30
|
+
totalItems: number;
|
|
31
|
+
page: number;
|
|
32
|
+
pages: number;
|
|
33
|
+
pageRange: string;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
declare type TCustomerPaginatedResponse = {
|
|
37
|
+
items: TCustomer[];
|
|
38
|
+
totalItems: number;
|
|
39
|
+
page: number;
|
|
40
|
+
pages: number;
|
|
41
|
+
pageRange: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
declare type TSitePaginatedResponse = {
|
|
45
|
+
items: TSite[];
|
|
46
|
+
totalItems: number;
|
|
47
|
+
page: number;
|
|
48
|
+
pages: number;
|
|
49
|
+
pageRange: string;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
declare type TServiceProviderPaginatedResponse = {
|
|
53
|
+
items: TServiceProvider[];
|
|
54
|
+
totalItems: number;
|
|
55
|
+
page: number;
|
|
56
|
+
pages: number;
|
|
57
|
+
pageRange: string;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
declare type TWorkOrderPaginatedResponse = {
|
|
61
|
+
items: TWorkOrder[];
|
|
62
|
+
totalItems: number;
|
|
63
|
+
page: number;
|
|
64
|
+
pages: number;
|
|
65
|
+
pageRange: string;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
declare type TMemberPaginatedResponse = {
|
|
69
|
+
items: TMember[];
|
|
70
|
+
totalItems: number;
|
|
71
|
+
page: number;
|
|
72
|
+
pages: number;
|
|
73
|
+
pageRange: string;
|
|
74
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare type TMember = {
|
|
2
|
+
_id: string;
|
|
3
|
+
org?: string;
|
|
4
|
+
orgName?: string;
|
|
5
|
+
roleName?: string;
|
|
6
|
+
name: string;
|
|
7
|
+
user: string;
|
|
8
|
+
role: string;
|
|
9
|
+
type: string;
|
|
10
|
+
customerOrgId?: string;
|
|
11
|
+
customerSiteId?: string;
|
|
12
|
+
status?: string;
|
|
13
|
+
createdAt?: string;
|
|
14
|
+
updatedAt?: string;
|
|
15
|
+
deletedAt?: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
declare type TMemberUserCreateVerification = Pick<
|
|
19
|
+
TUser,
|
|
20
|
+
"name" | "password" | "type"
|
|
21
|
+
>;
|
package/types/org.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare type TPeople = {
|
|
2
|
+
_id?: string
|
|
3
|
+
name?: string;
|
|
4
|
+
block?: number | string;
|
|
5
|
+
level?: string;
|
|
6
|
+
unit?: string
|
|
7
|
+
companyName?: sring[];
|
|
8
|
+
unitName?: string;
|
|
9
|
+
contact?: string;
|
|
10
|
+
plateNumber?: string;
|
|
11
|
+
nric?: string;
|
|
12
|
+
contact?: string;
|
|
13
|
+
remarks?: string;
|
|
14
|
+
start?: string;
|
|
15
|
+
end?: string;
|
|
16
|
+
org?: string;
|
|
17
|
+
site?: string,
|
|
18
|
+
type?: TPeoplePayload;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
declare type TPeoplePayload = Pick<TGuest, "name" | "block" | "level" | "unit" | "unitName" | "contact" | "plateNumber" | "nric" | "contact" | "remarks" | "org" | "site" | "start" | "end" | "type">
|
|
23
|
+
|
|
24
|
+
declare type TPeopleType = "guest" | "resident" | "tenant"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare type TPermissionCheck =
|
|
2
|
+
| boolean
|
|
3
|
+
| ((user: TRole, data?: any) => boolean);
|
|
4
|
+
|
|
5
|
+
declare type TPermission = {
|
|
6
|
+
check: TPermissionCheck;
|
|
7
|
+
description: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
declare type TPermissions = {
|
|
11
|
+
[resource: string]: {
|
|
12
|
+
[action: string]: TPermission;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
declare type TRole = {
|
|
17
|
+
_id?: string;
|
|
18
|
+
default?: boolean;
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
permissions: string[];
|
|
22
|
+
createdAt?: string;
|
|
23
|
+
updatedAt?: string;
|
|
24
|
+
deletedAt?: string;
|
|
25
|
+
};
|
package/types/price.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare type TPriceType =
|
|
2
|
+
| "monthly-subscription"
|
|
3
|
+
| "yearly-subscription"
|
|
4
|
+
| "one-time-payment"
|
|
5
|
+
| "other";
|
|
6
|
+
|
|
7
|
+
declare type TPrice = {
|
|
8
|
+
_id?: string;
|
|
9
|
+
value: number;
|
|
10
|
+
saleValue?: number;
|
|
11
|
+
saleExpiry?: Date;
|
|
12
|
+
name: string;
|
|
13
|
+
type?: TPriceType;
|
|
14
|
+
createdAt?: Date;
|
|
15
|
+
updatedAt?: Date;
|
|
16
|
+
deletedAt?: Date;
|
|
17
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare type TPromoTier = {
|
|
2
|
+
min: number;
|
|
3
|
+
max: number;
|
|
4
|
+
price: number;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
declare type TPromoCode = {
|
|
8
|
+
_id?: ObjectId;
|
|
9
|
+
code: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
type: "tiered" | "fixed";
|
|
12
|
+
tiers?: TPromoTier[];
|
|
13
|
+
fixed_rate?: number;
|
|
14
|
+
appliesTo?: string; // "subscription" | "order"
|
|
15
|
+
createdAt?: string; // Date of creation
|
|
16
|
+
expiresAt?: string; // Optional expiry
|
|
17
|
+
assignedTo?: string | ObjectId; // Store the only ape who used it
|
|
18
|
+
status?: "active" | "expired" | "disabled";
|
|
19
|
+
};
|
package/types/role.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare type TServiceProvider = {
|
|
2
|
+
_id?: string;
|
|
3
|
+
name: string;
|
|
4
|
+
orgId: string;
|
|
5
|
+
customerOrgId: string;
|
|
6
|
+
siteId: string;
|
|
7
|
+
serviceProviderOrgId: string;
|
|
8
|
+
type: string;
|
|
9
|
+
nature: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
declare type TServiceProviderName = {
|
|
13
|
+
_id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
};
|
package/types/site.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare type TSiteCreate = Pick<TSite, "name" | "description" | "orgId">;
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
declare type TSite = {
|
|
5
|
+
_id?: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
orgId: string;
|
|
9
|
+
metadata?: TSiteMetadata;
|
|
10
|
+
status?: string;
|
|
11
|
+
createdAt?: string;
|
|
12
|
+
updatedAt?: string | string;
|
|
13
|
+
deletedAt?: string | string;
|
|
14
|
+
blocks?: number;
|
|
15
|
+
customerOrgId?: string;
|
|
16
|
+
customerSiteId?: string;
|
|
17
|
+
createdAt?: string;
|
|
18
|
+
updatedAt?: string;
|
|
19
|
+
deletedAt?: string;
|
|
20
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare type TSubscription = {
|
|
2
|
+
_id?: string;
|
|
3
|
+
user?: string;
|
|
4
|
+
org?: string;
|
|
5
|
+
customerId: string;
|
|
6
|
+
paymentMethodId: string;
|
|
7
|
+
amount: number;
|
|
8
|
+
description?: string;
|
|
9
|
+
currency: string;
|
|
10
|
+
promoCode?: string;
|
|
11
|
+
type: string;
|
|
12
|
+
paidSeats?: number;
|
|
13
|
+
currentSeats?: number;
|
|
14
|
+
maxSeats?: number;
|
|
15
|
+
status?: string;
|
|
16
|
+
billingCycle: "monthly" | "yearly";
|
|
17
|
+
nextBillingDate?: string;
|
|
18
|
+
lastPaymentStatus?: string;
|
|
19
|
+
failedAttempts?: number;
|
|
20
|
+
createdAt?: string;
|
|
21
|
+
updatedAt?: string;
|
|
22
|
+
deletedAt?: string;
|
|
23
|
+
};
|
package/types/user.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare type TUser = {
|
|
2
|
+
_id: string;
|
|
3
|
+
email: string;
|
|
4
|
+
password: string;
|
|
5
|
+
name: string;
|
|
6
|
+
suffix?: string;
|
|
7
|
+
month?: string;
|
|
8
|
+
day?: number;
|
|
9
|
+
year?: number;
|
|
10
|
+
profile?: string;
|
|
11
|
+
defaultOrg: string;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
updatedAt: string;
|
|
14
|
+
status: string;
|
|
15
|
+
deletedAt: string;
|
|
16
|
+
gender: string;
|
|
17
|
+
contact: string;
|
|
18
|
+
type?: string;
|
|
19
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare type TVerificationMetadata = {
|
|
2
|
+
app?: string;
|
|
3
|
+
role?: string;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
declare type TMiniVerification = Pick<
|
|
7
|
+
TVerification,
|
|
8
|
+
"createdAt" | "email" | "_id"
|
|
9
|
+
>;
|
|
10
|
+
|
|
11
|
+
declare type TVerification = {
|
|
12
|
+
_id?: string;
|
|
13
|
+
type: string;
|
|
14
|
+
email: string;
|
|
15
|
+
metadata?: TVerificationMetadata;
|
|
16
|
+
status?: string;
|
|
17
|
+
createdAt?: string;
|
|
18
|
+
updatedAt?: string | null;
|
|
19
|
+
expireAt?: string;
|
|
20
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare type TVisitor = {
|
|
2
|
+
name?: string;
|
|
3
|
+
type: TVisitorType;
|
|
4
|
+
company?: string | "";
|
|
5
|
+
block?: number | string;
|
|
6
|
+
level?: string;
|
|
7
|
+
unit?: string;
|
|
8
|
+
unitName?: string; // only for display purpose
|
|
9
|
+
contact: string;
|
|
10
|
+
plateNumber: string;
|
|
11
|
+
checkIn?: string;
|
|
12
|
+
checkOut?: string | null;
|
|
13
|
+
contractorType?: string;
|
|
14
|
+
deliveryType?: string;
|
|
15
|
+
nric?: string;
|
|
16
|
+
contact?: string;
|
|
17
|
+
remarks?: string;
|
|
18
|
+
attachments: string[];
|
|
19
|
+
org: string;
|
|
20
|
+
site: string,
|
|
21
|
+
manualCheckout?: boolean;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
declare type TVisitorType = "contractor" | "delivery" | "walk-in" | "pick-up" | "drop-off" | "guest";
|
|
25
|
+
|
|
26
|
+
declare type TVisitorPayload = Pick<TVisitor, "name" | "type" | "company" | "block" | "level" | "unit" | "unitName" | "contact" | "plateNumber" | "checkOut" | "contractorType" | "deliveryType" | "nric" | "contact" | "remarks" | "attachments" | "org" | "site"> & {
|
|
27
|
+
members?: TMemberInfo[]
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
declare type TDefaultOptionObj = {
|
|
33
|
+
title: string;
|
|
34
|
+
value: any;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare type TMemberInfo = {
|
|
38
|
+
name: string;
|
|
39
|
+
nric: string;
|
|
40
|
+
visitorPass: string;
|
|
41
|
+
contact: string
|
|
42
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare type TWorkOrder = {
|
|
2
|
+
_id: string;
|
|
3
|
+
subject: string;
|
|
4
|
+
category: string;
|
|
5
|
+
categoryInfo?: string;
|
|
6
|
+
description: string;
|
|
7
|
+
createdBy: string;
|
|
8
|
+
createdByName?: string;
|
|
9
|
+
service: string;
|
|
10
|
+
provider: string;
|
|
11
|
+
assignee?: string;
|
|
12
|
+
organization: string;
|
|
13
|
+
site: string;
|
|
14
|
+
location: string;
|
|
15
|
+
attachments?: string[];
|
|
16
|
+
feedback?: string;
|
|
17
|
+
status?: string;
|
|
18
|
+
createdAt?: string;
|
|
19
|
+
updatedAt?: string;
|
|
20
|
+
highPriority?: boolean;
|
|
21
|
+
block: string;
|
|
22
|
+
level: string;
|
|
23
|
+
unit: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
declare type TWorkOrderCreate = Pick<
|
|
27
|
+
TWorkOrder,
|
|
28
|
+
| "subject"
|
|
29
|
+
| "description"
|
|
30
|
+
| "attachments"
|
|
31
|
+
| "location"
|
|
32
|
+
| "organization"
|
|
33
|
+
| "site"
|
|
34
|
+
| "block"
|
|
35
|
+
| "level"
|
|
36
|
+
| "unit"
|
|
37
|
+
| "highPriority"
|
|
38
|
+
| "assignee"
|
|
39
|
+
| "feedback"
|
|
40
|
+
| "category"
|
|
41
|
+
| "serviceProvider"
|
|
42
|
+
>;
|