@7365admin1/core 3.6.0 → 3.7.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @iservice365/core
2
2
 
3
+ ## 3.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 79d1fd3: Hotfix issue for accepting already blocklisted vehicles
8
+
9
+ ## 3.7.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 3f8198b: release changes in preloved api, push notification, billing api, etc.
14
+
3
15
  ## 3.6.0
4
16
 
5
17
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -428,12 +428,12 @@ type TKeyValuePair<K extends string | number | symbol = string, V = any> = {
428
428
  };
429
429
 
430
430
  declare function useVerificationService(): {
431
- createUserInvite: ({ email, metadata }: {
431
+ createUserInvite: ({ email, metadata, }: {
432
432
  email: string;
433
433
  metadata: TKeyValuePair;
434
434
  }) => Promise<bson.ObjectId>;
435
435
  createForgetPassword: (email: string) => Promise<string>;
436
- createServiceProviderInvite: ({ email, orgId, siteId, siteName }: {
436
+ createServiceProviderInvite: ({ email, orgId, siteId, siteName, }: {
437
437
  email: string;
438
438
  orgId: string;
439
439
  siteId: string;
@@ -443,20 +443,20 @@ declare function useVerificationService(): {
443
443
  verify: (id: string) => Promise<TVerification>;
444
444
  cancelUserInvitation: (id: string) => Promise<void>;
445
445
  updateStatusById: (_id: string, status: string) => Promise<string>;
446
- signUp: ({ email, metadata }: {
446
+ signUp: ({ email, metadata, }: {
447
447
  email: string;
448
448
  metadata: TKeyValuePair;
449
449
  }) => Promise<bson.ObjectId>;
450
450
  checkExpiredInvitation: () => Promise<string>;
451
- createSimpleUserInvite: ({ email, metadata }: {
451
+ createSimpleUserInvite: ({ email, metadata, }: {
452
452
  email: string;
453
453
  metadata: TKeyValuePair;
454
454
  }) => Promise<string[]>;
455
- createSimpleMemberInvite: ({ email, metadata }: {
455
+ createSimpleMemberInvite: ({ email, metadata, }: {
456
456
  email: string;
457
457
  metadata: TKeyValuePair;
458
458
  }) => Promise<bson.ObjectId>;
459
- createSimpleServiceProviderInvite: ({ email, app, name, role, orgId, siteId, siteName }: {
459
+ createSimpleServiceProviderInvite: ({ email, app, name, role, orgId, siteId, siteName, }: {
460
460
  email: string;
461
461
  app?: string | undefined;
462
462
  name?: string | undefined;
@@ -2357,6 +2357,7 @@ declare function useVehicleRepo(): {
2357
2357
  pageRange: string;
2358
2358
  }>;
2359
2359
  getVehicleBySiteAndPlateNumber: (plateNumber: string, site: string | ObjectId, category: string | ObjectId, status: string) => Promise<TVehicle | null>;
2360
+ getBlocklistedVehicleByPlateNumber: (plateNumber: string, site?: string) => Promise<bson.Document>;
2360
2361
  };
2361
2362
 
2362
2363
  declare function formatDahuaDate(date: Date): string;
@@ -2889,7 +2890,7 @@ declare function useVisitorTransactionRepo(): {
2889
2890
  pages: number;
2890
2891
  pageRange: string;
2891
2892
  }>;
2892
- getOpenByPlateNumber: (plateNumber: string, site: string | ObjectId) => Promise<TVisitorTransaction | null>;
2893
+ getOpenByPlateNumber: (plateNumber: string, site: string | ObjectId) => Promise<TVisitorTransaction | null | undefined>;
2893
2894
  updateById: (_id: string | ObjectId, value: Partial<TVisitorTransaction>, session?: ClientSession, isManualCheckOut?: boolean) => Promise<mongodb.UpdateResult<bson.Document>>;
2894
2895
  deleteVisitorTransaction: (_id: string | ObjectId) => Promise<number>;
2895
2896
  createTextIndex: () => Promise<void>;
@@ -6005,105 +6006,10 @@ declare function getPeriodRangeWithPrevious(period: Period): {
6005
6006
  };
6006
6007
  declare function calculatePercentage(current: number, previous: number): number;
6007
6008
  declare function useNewDashboardRepo(): {
6008
- getSecurityDashboard: ({ siteId, feedback, workOrder, vehicle, building, visitor, incident, guest, }: {
6009
+ getSecurityDashboard: ({ siteId, period, type, }: {
6009
6010
  siteId: string;
6010
- feedback?: Period | undefined;
6011
- workOrder?: Period | undefined;
6012
- vehicle?: Period | undefined;
6013
- building?: Period | undefined;
6014
- visitor?: Period | undefined;
6015
- incident?: Period | undefined;
6016
- guest?: Period | undefined;
6017
- }) => Promise<{
6018
- feedbacks: {
6019
- count: number;
6020
- percentage: number;
6021
- };
6022
- workOrders: {
6023
- count: number;
6024
- percentage: number;
6025
- };
6026
- vehicles: {
6027
- count: number;
6028
- percentage: number;
6029
- };
6030
- buildings: {
6031
- count: number;
6032
- percentage: number;
6033
- };
6034
- visitors: {
6035
- count: number;
6036
- percentage: number;
6037
- };
6038
- incidents: {
6039
- count: number;
6040
- percentage: number;
6041
- };
6042
- guests: {
6043
- count: number;
6044
- percentage: number;
6045
- };
6046
- }>;
6047
- getPropertyManagementDashboard: ({ siteId, feedback, workOrder, sitePeople, facilityBooking, bulletinBoard, event, vehicle, building, visitor, incident, }: {
6048
- siteId: string;
6049
- feedback?: Period | undefined;
6050
- workOrder?: Period | undefined;
6051
- sitePeople?: Period | undefined;
6052
- facilityBooking?: Period | undefined;
6053
- bulletinBoard?: Period | undefined;
6054
- event?: Period | undefined;
6055
- vehicle?: Period | undefined;
6056
- building?: Period | undefined;
6057
- visitor?: Period | undefined;
6058
- incident?: Period | undefined;
6059
- }) => Promise<{
6060
- feedbacks: {
6061
- count: number;
6062
- percentage: number;
6063
- };
6064
- workOrders: {
6065
- count: number;
6066
- percentage: number;
6067
- };
6068
- vehicles: {
6069
- count: number;
6070
- percentage: number;
6071
- };
6072
- buildings: {
6073
- count: number;
6074
- percentage: number;
6075
- };
6076
- visitors: {
6077
- count: number;
6078
- percentage: number;
6079
- };
6080
- incidents: {
6081
- count: number;
6082
- percentage: number;
6083
- };
6084
- sitePeople: {
6085
- count: number;
6086
- percentage: number;
6087
- };
6088
- bulletinBoards: {
6089
- count: number;
6090
- percentage: number;
6091
- };
6092
- events: {
6093
- count: number;
6094
- percentage: number;
6095
- };
6096
- facilityBookings: {
6097
- count: number;
6098
- percentage: number;
6099
- };
6100
- }>;
6101
- getServiceDashboard: ({ site, serviceType, period, type, facility, }: {
6102
- site: string | ObjectId;
6103
- serviceType: TAppServiceType;
6104
6011
  period?: Period | undefined;
6105
6012
  type?: string | undefined;
6106
- facility?: string | undefined;
6107
6013
  }) => Promise<{
6108
6014
  openWorkOrder: {
6109
6015
  count: any;
@@ -6120,13 +6026,22 @@ declare function useNewDashboardRepo(): {
6120
6026
  currentlyOnSite: number;
6121
6027
  percentage: number;
6122
6028
  };
6123
- facilityBooking: {
6124
- count: any;
6125
- ongoing: any;
6126
- waitingApproval: any;
6029
+ patrolCompliance: {
6030
+ count: number;
6031
+ missedCheckpoints: any;
6032
+ missed: any;
6127
6033
  percentage: number;
6128
6034
  };
6129
- } | {
6035
+ activePatrolItems: {
6036
+ id: string;
6037
+ title: any;
6038
+ subtitle: string;
6039
+ person: string;
6040
+ status: string;
6041
+ time: string;
6042
+ }[];
6043
+ }>;
6044
+ getPropertyManagementDashboard: (siteId: string, period?: Period, type?: string, facility?: string) => Promise<{
6130
6045
  openWorkOrder: {
6131
6046
  count: any;
6132
6047
  inProgress: any;
@@ -6142,13 +6057,21 @@ declare function useNewDashboardRepo(): {
6142
6057
  currentlyOnSite: number;
6143
6058
  percentage: number;
6144
6059
  };
6145
- patrolCompliance: {
6146
- count: number;
6147
- missedCheckpoints: any;
6148
- missed: any;
6060
+ facilityBooking: {
6061
+ count: any;
6062
+ ongoing: any;
6063
+ waitingApproval: any;
6149
6064
  percentage: number;
6150
6065
  };
6151
- } | {
6066
+ upcomingEvents: mongodb.WithId<bson.Document>[];
6067
+ todayReminders: mongodb.WithId<bson.Document>[];
6068
+ todayAttentions: any[];
6069
+ }>;
6070
+ getServiceDashboard: ({ site, serviceType, period, }: {
6071
+ site: string | ObjectId;
6072
+ serviceType: TAppServiceType;
6073
+ period?: Period | undefined;
6074
+ }) => Promise<{
6152
6075
  openWorkOrder: {
6153
6076
  count: any;
6154
6077
  inProgress: any;
@@ -7393,10 +7316,16 @@ declare function MChannelPreloved(value: TChannelPreloved): {
7393
7316
  declare function useChannelPrelovedRepo(): {
7394
7317
  add: (value: TChannelPreloved, session?: any) => Promise<string | ObjectId>;
7395
7318
  getByParticipants: (senderId: string | ObjectId, receiverId: string | ObjectId, postId: string | ObjectId, session?: any) => Promise<mongodb.WithId<TChannelPreloved> | null>;
7319
+ getChannelMessages: (channelId: string | ObjectId, page?: number, limit?: number, isLoadMore?: boolean, lastMessageId?: string | null) => Promise<{
7320
+ items: any[];
7321
+ pages: number;
7322
+ pageRange: string;
7323
+ }>;
7396
7324
  };
7397
7325
 
7398
7326
  declare function useChannelPrelovedController(): {
7399
7327
  add: (req: Request, res: Response, next: NextFunction) => Promise<void>;
7328
+ getChannelMessages: (req: Request, res: Response, next: NextFunction) => Promise<void>;
7400
7329
  };
7401
7330
 
7402
7331
  declare enum FormEntryStatus {