@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.
Files changed (198) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/config.json +11 -0
  3. package/.editorconfig +12 -0
  4. package/.github/workflows/main.yml +17 -0
  5. package/.github/workflows/publish.yml +39 -0
  6. package/.nuxtrc +1 -0
  7. package/.playground/app.vue +41 -0
  8. package/.playground/eslint.config.mjs +6 -0
  9. package/.playground/nuxt.config.ts +22 -0
  10. package/.playground/pages/feedback.vue +30 -0
  11. package/CHANGELOG.md +263 -0
  12. package/README.md +73 -0
  13. package/app.vue +3 -0
  14. package/components/AccessCardAddForm.vue +363 -0
  15. package/components/AccessManagement.vue +420 -0
  16. package/components/Avatar/Main.vue +68 -0
  17. package/components/BillingMain.vue +66 -0
  18. package/components/BtnUploadFile.vue +139 -0
  19. package/components/BuildingForm.vue +303 -0
  20. package/components/BuildingManagement/buildings.vue +335 -0
  21. package/components/BuildingManagement/units.vue +350 -0
  22. package/components/BuildingUnitFormAdd.vue +441 -0
  23. package/components/BuildingUnitFormEdit.vue +429 -0
  24. package/components/CameraForm.vue +264 -0
  25. package/components/CameraMain.vue +352 -0
  26. package/components/Card/DeleteConfirmation.vue +51 -0
  27. package/components/Card/MemberInfoSummary.vue +44 -0
  28. package/components/Card/Toggle.vue +25 -0
  29. package/components/Chat/Bubbles.vue +53 -0
  30. package/components/Chat/Information.vue +416 -0
  31. package/components/Chat/ListCard.vue +62 -0
  32. package/components/Chat/Message.vue +158 -0
  33. package/components/Chat/Navigation.vue +150 -0
  34. package/components/ConfirmDialog.vue +66 -0
  35. package/components/Container/Standard.vue +33 -0
  36. package/components/DashboardPlaceholder.vue +1524 -0
  37. package/components/Dialog/DeleteConfirmation.vue +51 -0
  38. package/components/Dialog/ReplaceAutofillPrompt.vue +49 -0
  39. package/components/Dialog/UpdateMoreAction.vue +103 -0
  40. package/components/DocumentForm.vue +187 -0
  41. package/components/DocumentManagement.vue +376 -0
  42. package/components/Editor.vue +95 -0
  43. package/components/EntryPassMain.vue +518 -0
  44. package/components/Feedback/Form.vue +173 -0
  45. package/components/FeedbackDetail.vue +599 -0
  46. package/components/FeedbackMain.vue +588 -0
  47. package/components/FormDialog.vue +65 -0
  48. package/components/ImageCarousel.vue +138 -0
  49. package/components/Input/Date.vue +177 -0
  50. package/components/Input/DateTimePicker.vue +131 -0
  51. package/components/Input/File.vue +236 -0
  52. package/components/Input/FileV2.vue +234 -0
  53. package/components/Input/InputPhoneNumberV2.vue +164 -0
  54. package/components/Input/ListGroupSelection.vue +96 -0
  55. package/components/Input/NRICNumber.vue +53 -0
  56. package/components/Input/NewDate.vue +123 -0
  57. package/components/Input/Number.vue +124 -0
  58. package/components/Input/Password.vue +22 -0
  59. package/components/Input/PhoneNumber.vue +188 -0
  60. package/components/Input/VehicleNumber.vue +49 -0
  61. package/components/InputLabel.vue +22 -0
  62. package/components/InvitationForm.vue +359 -0
  63. package/components/InvitationMain.vue +310 -0
  64. package/components/Layout/Header.vue +129 -0
  65. package/components/Layout/NavigationDrawer.vue +44 -0
  66. package/components/ListItem.vue +35 -0
  67. package/components/ListView.vue +87 -0
  68. package/components/LocalPagination.vue +31 -0
  69. package/components/MemberMain.vue +459 -0
  70. package/components/NFC/NFCPatrolReportMain.vue +591 -0
  71. package/components/NFC/NFCPatrolRouteForm.vue +596 -0
  72. package/components/NFC/NFCPatrolRouteMain.vue +539 -0
  73. package/components/NFC/NFCTagForm.vue +236 -0
  74. package/components/NFC/NFCTagMain.vue +337 -0
  75. package/components/NFC/PatrolSettings.vue +130 -0
  76. package/components/NavigationItem.vue +83 -0
  77. package/components/NumberSettingField.vue +107 -0
  78. package/components/OnlineFormConfigurationForm.vue +290 -0
  79. package/components/OnlineFormsConfiguration.vue +429 -0
  80. package/components/PeopleForm.vue +452 -0
  81. package/components/PlaceholderComponent.vue +34 -0
  82. package/components/RolePermissionFormCreate.vue +161 -0
  83. package/components/RolePermissionFormPreviewUpdate.vue +183 -0
  84. package/components/RolePermissionMain.vue +361 -0
  85. package/components/SearchVehicleNumberUser.vue +91 -0
  86. package/components/ServiceProviderFormCreate.vue +154 -0
  87. package/components/ServiceProviderMain.vue +547 -0
  88. package/components/SignaturePad.vue +73 -0
  89. package/components/Snackbar.vue +23 -0
  90. package/components/SpecificAttr.vue +53 -0
  91. package/components/SupplyManagement.vue +292 -0
  92. package/components/SwitchContext.vue +108 -0
  93. package/components/TableList.vue +150 -0
  94. package/components/TableListSecondary.vue +164 -0
  95. package/components/TableMain.vue +142 -0
  96. package/components/TableWithButton.vue +94 -0
  97. package/components/VehicleUpdateMoreAction.vue +84 -0
  98. package/components/VideoPlayer.vue +125 -0
  99. package/components/VisitorForm.vue +659 -0
  100. package/components/VisitorFormSelection.vue +53 -0
  101. package/components/VisitorManagement.vue +490 -0
  102. package/components/WorkOrder/Create.vue +284 -0
  103. package/components/WorkOrder/Detail.vue +71 -0
  104. package/components/WorkOrder/ListView.vue +96 -0
  105. package/components/WorkOrder/Main.vue +489 -0
  106. package/components/Workorder.vue +1 -0
  107. package/composables/useAddress.ts +107 -0
  108. package/composables/useBuilding.ts +250 -0
  109. package/composables/useBuildingUnit.ts +116 -0
  110. package/composables/useCard.ts +46 -0
  111. package/composables/useCommonPermission.ts +207 -0
  112. package/composables/useCustomer.ts +113 -0
  113. package/composables/useCustomerSite.ts +56 -0
  114. package/composables/useDashboard.ts +31 -0
  115. package/composables/useDashboardData.ts +425 -0
  116. package/composables/useDocument.ts +57 -0
  117. package/composables/useFacility.ts +246 -0
  118. package/composables/useFeedback.ts +119 -0
  119. package/composables/useFile.ts +55 -0
  120. package/composables/useInvoice.ts +18 -0
  121. package/composables/useLocal.ts +131 -0
  122. package/composables/useLocalAuth.ts +137 -0
  123. package/composables/useLocalSetup.ts +13 -0
  124. package/composables/useMember.ts +111 -0
  125. package/composables/useNFCPatrolRoute.ts +77 -0
  126. package/composables/useNFCPatrolSettings.ts +19 -0
  127. package/composables/useNFCPatrolTag.ts +53 -0
  128. package/composables/useOnlineForm.ts +67 -0
  129. package/composables/useOrg.ts +129 -0
  130. package/composables/usePDFDownload.ts +25 -0
  131. package/composables/usePaymentMethod.ts +101 -0
  132. package/composables/usePeople.ts +81 -0
  133. package/composables/usePermission.ts +54 -0
  134. package/composables/usePhoneCountries.ts +561 -0
  135. package/composables/usePrice.ts +15 -0
  136. package/composables/usePromoCode.ts +36 -0
  137. package/composables/useRecapPermission.ts +26 -0
  138. package/composables/useRole.ts +104 -0
  139. package/composables/useSecurityUtils.ts +18 -0
  140. package/composables/useServiceProvider.ts +224 -0
  141. package/composables/useSite.ts +109 -0
  142. package/composables/useSiteEntryPassSettings.ts +46 -0
  143. package/composables/useSiteSettings.ts +123 -0
  144. package/composables/useSubscription.ts +150 -0
  145. package/composables/useUser.ts +132 -0
  146. package/composables/useUtils.ts +445 -0
  147. package/composables/useVerification.ts +34 -0
  148. package/composables/useVisitor.ts +120 -0
  149. package/composables/useWorkOrder.ts +85 -0
  150. package/error.vue +41 -0
  151. package/layouts/plain.vue +7 -0
  152. package/middleware/01.auth.ts +20 -0
  153. package/middleware/02.org.ts +21 -0
  154. package/middleware/03.customer.ts +13 -0
  155. package/middleware/member.ts +4 -0
  156. package/nuxt.config.ts +54 -0
  157. package/package.json +39 -0
  158. package/pages/index.vue +3 -0
  159. package/pages/payment-method-linked.vue +31 -0
  160. package/pages/require-customer.vue +56 -0
  161. package/pages/require-organization-membership.vue +47 -0
  162. package/pages/unauthorized.vue +29 -0
  163. package/plugins/API.ts +21 -0
  164. package/plugins/iconify.client.ts +5 -0
  165. package/plugins/secure-member.client.ts +86 -0
  166. package/plugins/vuetify.ts +62 -0
  167. package/public/bg-camera.jpg +0 -0
  168. package/public/bg-city.jpg +0 -0
  169. package/public/bg-condo.jpg +0 -0
  170. package/public/images/icons/delete-icon.png +0 -0
  171. package/public/sprite.svg +1 -0
  172. package/tsconfig.json +3 -0
  173. package/types/address.d.ts +13 -0
  174. package/types/building.d.ts +27 -0
  175. package/types/camera.d.ts +31 -0
  176. package/types/card.d.ts +22 -0
  177. package/types/customer.d.ts +27 -0
  178. package/types/document.d.ts +6 -0
  179. package/types/feedback.d.ts +68 -0
  180. package/types/local.d.ts +74 -0
  181. package/types/member.d.ts +21 -0
  182. package/types/online-form.d.ts +15 -0
  183. package/types/org.d.ts +13 -0
  184. package/types/people.d.ts +24 -0
  185. package/types/permission.d.ts +25 -0
  186. package/types/phone-number.d.ts +10 -0
  187. package/types/price.d.ts +17 -0
  188. package/types/promo-code.d.ts +19 -0
  189. package/types/role.d.ts +11 -0
  190. package/types/select.d.ts +4 -0
  191. package/types/service-provider.d.ts +15 -0
  192. package/types/site.d.ts +20 -0
  193. package/types/subscription.d.ts +23 -0
  194. package/types/user.d.ts +19 -0
  195. package/types/verification.d.ts +20 -0
  196. package/types/visitor.d.ts +42 -0
  197. package/types/work-order.d.ts +42 -0
  198. package/utils/phoneMasks.ts +1703 -0
package/tsconfig.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "./.playground/.nuxt/tsconfig.json"
3
+ }
@@ -0,0 +1,13 @@
1
+ declare type TAddress = {
2
+ _id?: string;
3
+ type: string;
4
+ user?: string;
5
+ org?: string;
6
+ country: string;
7
+ address: string;
8
+ continuedAddress?: string;
9
+ city: string;
10
+ province: string;
11
+ postalCode: string;
12
+ taxId: string;
13
+ };
@@ -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
+ };
@@ -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,6 @@
1
+ declare type TDocument = {
2
+ _id?: string;
3
+ name: string;
4
+ attachment: string;
5
+ type: string;
6
+ };
@@ -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">;
@@ -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
+ >;
@@ -0,0 +1,15 @@
1
+ declare type TOnlineForm = {
2
+ _id?: string;
3
+ name: string;
4
+ attachment?: string;
5
+ inputs: [
6
+ {
7
+ label: string;
8
+ dataType: string;
9
+ required: boolean;
10
+ multiple: boolean;
11
+ }
12
+ ];
13
+ createdAt: string;
14
+ status: string;
15
+ };
package/types/org.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ declare type TOrg = {
2
+ _id?: string;
3
+ name: string;
4
+ email: string;
5
+ contact: string;
6
+ busInst: string;
7
+ type: string;
8
+ createdAt?: string;
9
+ updatedAt?: string;
10
+ status?: string;
11
+ deletedAt?: string;
12
+ nature?: string;
13
+ };
@@ -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
+ };
@@ -0,0 +1,10 @@
1
+ declare type TPhoneCountry = {
2
+ _id: string;
3
+ country: string;
4
+ dialCode: string;
5
+ minLength: number;
6
+ maxLength: number;
7
+ placeholder: string;
8
+ format?: RegExp;
9
+ label: string;
10
+ };
@@ -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
+ };
@@ -0,0 +1,11 @@
1
+ declare type TRole = {
2
+ _id?: string;
3
+ name?: string;
4
+ permissions?: Array<string>;
5
+ type?: string;
6
+ status?: string;
7
+ createdBy?: string;
8
+ createdAt?: string;
9
+ updatedAt?: string;
10
+ deletedAt?: string;
11
+ };
@@ -0,0 +1,4 @@
1
+ declare type TDefaultOptionObj = {
2
+ title: string;
3
+ value: any;
4
+ }
@@ -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
+ };
@@ -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
+ };
@@ -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
+ >;