@7365admin1/core 2.75.0 → 2.77.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @iservice365/core
2
2
 
3
+ ## 2.77.0
4
+
5
+ ### Minor Changes
6
+
7
+ - de47b20: release changes for preloved api, org api, member api, online forms api, etc
8
+
9
+ ## 2.76.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 1875fe7: release latest changes for subcategory api, user api, person api, and etc.
14
+
3
15
  ## 2.75.0
4
16
 
5
17
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -171,6 +171,7 @@ declare function useUserRepo(): {
171
171
  password: string;
172
172
  sid: string;
173
173
  }, session?: ClientSession) => Promise<mongodb.UpdateResult<bson.Document>>;
174
+ updateUserOrgById: (id: string | ObjectId, org: string | ObjectId, session?: ClientSession) => Promise<string>;
174
175
  };
175
176
 
176
177
  declare function useUserController(): {
@@ -312,17 +313,13 @@ declare function useMemberRepo(): {
312
313
  pages: number;
313
314
  pageRange: string;
314
315
  } | TMember>;
315
- getOrgsByMembership: ({ search, page, limit, user, type, }: {
316
+ getOrgsByMembership: ({ search, page, limit, user, type }: {
316
317
  search?: string | undefined;
317
318
  page?: number | undefined;
318
319
  limit?: number | undefined;
319
320
  user?: string | ObjectId | undefined;
320
321
  type?: string | undefined;
321
- }) => Promise<{
322
- items: any[];
323
- pages: number;
324
- pageRange: string;
325
- } | TMember>;
322
+ }) => Promise<any>;
326
323
  getOrgsByUserId: ({ search, page, limit, sort, user, status, }: {
327
324
  search?: string | undefined;
328
325
  page?: number | undefined;
@@ -523,6 +520,9 @@ type TOrg = {
523
520
  busInst?: string;
524
521
  status?: string;
525
522
  defaultSite?: string;
523
+ onboardingRequired?: boolean;
524
+ onboardingCompleted?: boolean;
525
+ onboardingCompletedAt?: string | Date | null;
526
526
  terms?: string;
527
527
  policies?: string;
528
528
  createdAt?: string | Date;
@@ -2123,6 +2123,17 @@ declare function useDahuaService(): {
2123
2123
  vehicleType?: string;
2124
2124
  vehicleColor?: string;
2125
2125
  }) => Promise<urllib.HttpClientResponse<any>>;
2126
+ openBarrier: (value: {
2127
+ host: string;
2128
+ username: string;
2129
+ password: string;
2130
+ plateNumber: string;
2131
+ channel?: number;
2132
+ }) => Promise<{
2133
+ success: boolean;
2134
+ message: string;
2135
+ raw: any;
2136
+ }>;
2126
2137
  };
2127
2138
 
2128
2139
  type TVehicleUpdate = Partial<Pick<TVehicle, "name" | "phoneNumber" | "block" | "level" | "unit" | "plateNumber" | "recNo" | "type">>;
@@ -2391,6 +2402,7 @@ declare function useSiteCameraRepo(): {
2391
2402
  category?: string;
2392
2403
  guardPost?: number;
2393
2404
  }) => Promise<{} | null>;
2405
+ getVisitorsInBySite: (site: string | ObjectId) => Promise<Document | undefined>;
2394
2406
  getBySites: (site: string | ObjectId, options?: {
2395
2407
  type?: string;
2396
2408
  category?: string;
@@ -4446,6 +4458,7 @@ interface AdditionalSettings {
4446
4458
  subText: string | null;
4447
4459
  date: string | null;
4448
4460
  };
4461
+ validityMinutes: number;
4449
4462
  url: string | null;
4450
4463
  }
4451
4464
  type TAccessMngmntSettings = {
@@ -6993,6 +7006,7 @@ declare function MPostFavorite(value: TPostFavorite): {
6993
7006
  declare function usePostFavoriteRepo(): {
6994
7007
  addFavorite: (value: TPostFavorite, session?: any) => Promise<string | ObjectId>;
6995
7008
  getById: (_id: string | ObjectId) => Promise<mongodb.WithId<TPostFavorite>>;
7009
+ getByPostId: (postId: string | ObjectId) => Promise<mongodb.WithId<TPostFavorite>>;
6996
7010
  updateById: (_id: string | ObjectId, userId: string | ObjectId, session?: any) => Promise<"removed" | "added">;
6997
7011
  };
6998
7012
 
@@ -7004,6 +7018,7 @@ declare function usePostFavoriteService(): {
7004
7018
  declare function usePostFavoriteController(): {
7005
7019
  addFavorite: (req: Request, res: Response, next: NextFunction) => Promise<void>;
7006
7020
  getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
7021
+ getByPostId: (req: Request, res: Response, next: NextFunction) => Promise<void>;
7007
7022
  updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
7008
7023
  };
7009
7024
 
@@ -7067,11 +7082,17 @@ declare function useSubcategoryPrelovedRepo(): {
7067
7082
  category_id?: string | ObjectId | undefined;
7068
7083
  }) => Promise<mongodb.WithId<bson.Document>[]>;
7069
7084
  getById: (_id: string | ObjectId) => Promise<mongodb.WithId<bson.Document>>;
7085
+ addSubcategory: (item: TSubcategoryPreloved, session?: any) => Promise<ObjectId>;
7086
+ updateById: (_id: string | ObjectId, value: Partial<TSubcategoryPreloved>, session?: any) => Promise<mongodb.UpdateResult<bson.Document>>;
7087
+ deleteById: (_id: string | ObjectId, session?: any) => Promise<number>;
7070
7088
  };
7071
7089
 
7072
7090
  declare function useSubcategoryPrelovedController(): {
7073
7091
  getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
7074
7092
  getById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
7093
+ addSubcategory: (req: Request, res: Response, next: NextFunction) => Promise<void>;
7094
+ updateById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
7095
+ deleteById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
7075
7096
  };
7076
7097
 
7077
7098
  declare enum FormEntryStatus {
@@ -7107,11 +7128,27 @@ declare function MFormEntry(value: TFormEntry): {
7107
7128
  declare const online_forms_namespace_collection = "online-forms";
7108
7129
  declare function useFormEntryRepo(): {
7109
7130
  add: (value: TFormEntry, session?: ClientSession) => Promise<ObjectId>;
7131
+ getAll: ({ search, page, limit, sort, status, org, site, }: {
7132
+ search?: string | undefined;
7133
+ page?: number | undefined;
7134
+ limit?: number | undefined;
7135
+ sort?: Record<string, any> | undefined;
7136
+ status: string;
7137
+ org?: string | undefined;
7138
+ site?: string | ObjectId | undefined;
7139
+ }) => Promise<{
7140
+ items: any[];
7141
+ pages: number;
7142
+ pageRange: string;
7143
+ } | TFormEntry>;
7144
+ getFormEntryById: (_id: string | ObjectId) => Promise<bson.Document>;
7110
7145
  createTextIndex: () => Promise<void>;
7111
7146
  };
7112
7147
 
7113
7148
  declare function useFormEntryController(): {
7114
7149
  uploadFormEntrys: (req: Request, res: Response, next: NextFunction) => Promise<void>;
7150
+ getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
7151
+ getFormEntryById: (req: Request, res: Response, next: NextFunction) => Promise<void>;
7115
7152
  };
7116
7153
 
7117
7154
  declare enum BuildingLevelStatus {