@blackcode_sa/metaestetics-api 1.7.43 → 1.7.44

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/dist/index.d.mts CHANGED
@@ -5936,9 +5936,9 @@ interface User {
5936
5936
  email: string | null;
5937
5937
  roles: UserRole[];
5938
5938
  isAnonymous: boolean;
5939
- createdAt: Timestamp | FieldValue | Date;
5940
- updatedAt: Timestamp | FieldValue | Date;
5941
- lastLoginAt: Timestamp | FieldValue | Date;
5939
+ createdAt: any;
5940
+ updatedAt: any;
5941
+ lastLoginAt: any;
5942
5942
  patientProfile?: string;
5943
5943
  practitionerProfile?: string;
5944
5944
  adminProfile?: string;
@@ -8627,31 +8627,31 @@ declare const userSchema: z.ZodObject<{
8627
8627
  email: z.ZodNullable<z.ZodString>;
8628
8628
  roles: z.ZodArray<z.ZodNativeEnum<typeof UserRole>, "many">;
8629
8629
  isAnonymous: z.ZodBoolean;
8630
- createdAt: z.ZodType<Date | Timestamp | FieldValue, z.ZodTypeDef, Date | Timestamp | FieldValue>;
8631
- updatedAt: z.ZodType<Date | Timestamp | FieldValue, z.ZodTypeDef, Date | Timestamp | FieldValue>;
8632
- lastLoginAt: z.ZodType<Date | Timestamp | FieldValue, z.ZodTypeDef, Date | Timestamp | FieldValue>;
8630
+ createdAt: z.ZodAny;
8631
+ updatedAt: z.ZodAny;
8632
+ lastLoginAt: z.ZodAny;
8633
8633
  patientProfile: z.ZodOptional<z.ZodString>;
8634
8634
  practitionerProfile: z.ZodOptional<z.ZodString>;
8635
8635
  adminProfile: z.ZodOptional<z.ZodString>;
8636
8636
  }, "strip", z.ZodTypeAny, {
8637
- createdAt: Date | Timestamp | FieldValue;
8638
- updatedAt: Date | Timestamp | FieldValue;
8639
8637
  email: string | null;
8640
8638
  uid: string;
8641
8639
  roles: UserRole[];
8642
8640
  isAnonymous: boolean;
8643
- lastLoginAt: Date | Timestamp | FieldValue;
8641
+ createdAt?: any;
8642
+ updatedAt?: any;
8643
+ lastLoginAt?: any;
8644
8644
  patientProfile?: string | undefined;
8645
8645
  practitionerProfile?: string | undefined;
8646
8646
  adminProfile?: string | undefined;
8647
8647
  }, {
8648
- createdAt: Date | Timestamp | FieldValue;
8649
- updatedAt: Date | Timestamp | FieldValue;
8650
8648
  email: string | null;
8651
8649
  uid: string;
8652
8650
  roles: UserRole[];
8653
8651
  isAnonymous: boolean;
8654
- lastLoginAt: Date | Timestamp | FieldValue;
8652
+ createdAt?: any;
8653
+ updatedAt?: any;
8654
+ lastLoginAt?: any;
8655
8655
  patientProfile?: string | undefined;
8656
8656
  practitionerProfile?: string | undefined;
8657
8657
  adminProfile?: string | undefined;
package/dist/index.d.ts CHANGED
@@ -5936,9 +5936,9 @@ interface User {
5936
5936
  email: string | null;
5937
5937
  roles: UserRole[];
5938
5938
  isAnonymous: boolean;
5939
- createdAt: Timestamp | FieldValue | Date;
5940
- updatedAt: Timestamp | FieldValue | Date;
5941
- lastLoginAt: Timestamp | FieldValue | Date;
5939
+ createdAt: any;
5940
+ updatedAt: any;
5941
+ lastLoginAt: any;
5942
5942
  patientProfile?: string;
5943
5943
  practitionerProfile?: string;
5944
5944
  adminProfile?: string;
@@ -8627,31 +8627,31 @@ declare const userSchema: z.ZodObject<{
8627
8627
  email: z.ZodNullable<z.ZodString>;
8628
8628
  roles: z.ZodArray<z.ZodNativeEnum<typeof UserRole>, "many">;
8629
8629
  isAnonymous: z.ZodBoolean;
8630
- createdAt: z.ZodType<Date | Timestamp | FieldValue, z.ZodTypeDef, Date | Timestamp | FieldValue>;
8631
- updatedAt: z.ZodType<Date | Timestamp | FieldValue, z.ZodTypeDef, Date | Timestamp | FieldValue>;
8632
- lastLoginAt: z.ZodType<Date | Timestamp | FieldValue, z.ZodTypeDef, Date | Timestamp | FieldValue>;
8630
+ createdAt: z.ZodAny;
8631
+ updatedAt: z.ZodAny;
8632
+ lastLoginAt: z.ZodAny;
8633
8633
  patientProfile: z.ZodOptional<z.ZodString>;
8634
8634
  practitionerProfile: z.ZodOptional<z.ZodString>;
8635
8635
  adminProfile: z.ZodOptional<z.ZodString>;
8636
8636
  }, "strip", z.ZodTypeAny, {
8637
- createdAt: Date | Timestamp | FieldValue;
8638
- updatedAt: Date | Timestamp | FieldValue;
8639
8637
  email: string | null;
8640
8638
  uid: string;
8641
8639
  roles: UserRole[];
8642
8640
  isAnonymous: boolean;
8643
- lastLoginAt: Date | Timestamp | FieldValue;
8641
+ createdAt?: any;
8642
+ updatedAt?: any;
8643
+ lastLoginAt?: any;
8644
8644
  patientProfile?: string | undefined;
8645
8645
  practitionerProfile?: string | undefined;
8646
8646
  adminProfile?: string | undefined;
8647
8647
  }, {
8648
- createdAt: Date | Timestamp | FieldValue;
8649
- updatedAt: Date | Timestamp | FieldValue;
8650
8648
  email: string | null;
8651
8649
  uid: string;
8652
8650
  roles: UserRole[];
8653
8651
  isAnonymous: boolean;
8654
- lastLoginAt: Date | Timestamp | FieldValue;
8652
+ createdAt?: any;
8653
+ updatedAt?: any;
8654
+ lastLoginAt?: any;
8655
8655
  patientProfile?: string | undefined;
8656
8656
  practitionerProfile?: string | undefined;
8657
8657
  adminProfile?: string | undefined;
package/dist/index.js CHANGED
@@ -923,9 +923,9 @@ var userSchema = import_zod4.z.object({
923
923
  email: import_zod4.z.string().email().nullable(),
924
924
  roles: import_zod4.z.array(userRoleSchema),
925
925
  isAnonymous: import_zod4.z.boolean(),
926
- createdAt: timestampSchema,
927
- updatedAt: timestampSchema,
928
- lastLoginAt: timestampSchema,
926
+ createdAt: import_zod4.z.any(),
927
+ updatedAt: import_zod4.z.any(),
928
+ lastLoginAt: import_zod4.z.any(),
929
929
  patientProfile: import_zod4.z.string().optional(),
930
930
  practitionerProfile: import_zod4.z.string().optional(),
931
931
  adminProfile: import_zod4.z.string().optional()
@@ -5955,7 +5955,7 @@ var UserService = class extends BaseService {
5955
5955
  const q = (0, import_firestore19.query)((0, import_firestore19.collection)(this.db, USERS_COLLECTION), ...constraints);
5956
5956
  const querySnapshot = await (0, import_firestore19.getDocs)(q);
5957
5957
  const users = querySnapshot.docs.map((doc36) => doc36.data());
5958
- return Promise.all(users.map((userData) => userSchema.parse(userData)));
5958
+ return users.map((userData) => userSchema.parse(userData));
5959
5959
  }
5960
5960
  /**
5961
5961
  * Ažurira timestamp poslednjeg logovanja
package/dist/index.mjs CHANGED
@@ -698,9 +698,9 @@ var userSchema = z4.object({
698
698
  email: z4.string().email().nullable(),
699
699
  roles: z4.array(userRoleSchema),
700
700
  isAnonymous: z4.boolean(),
701
- createdAt: timestampSchema,
702
- updatedAt: timestampSchema,
703
- lastLoginAt: timestampSchema,
701
+ createdAt: z4.any(),
702
+ updatedAt: z4.any(),
703
+ lastLoginAt: z4.any(),
704
704
  patientProfile: z4.string().optional(),
705
705
  practitionerProfile: z4.string().optional(),
706
706
  adminProfile: z4.string().optional()
@@ -5860,7 +5860,7 @@ var UserService = class extends BaseService {
5860
5860
  const q = query8(collection8(this.db, USERS_COLLECTION), ...constraints);
5861
5861
  const querySnapshot = await getDocs8(q);
5862
5862
  const users = querySnapshot.docs.map((doc36) => doc36.data());
5863
- return Promise.all(users.map((userData) => userSchema.parse(userData)));
5863
+ return users.map((userData) => userSchema.parse(userData));
5864
5864
  }
5865
5865
  /**
5866
5866
  * Ažurira timestamp poslednjeg logovanja
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@blackcode_sa/metaestetics-api",
3
3
  "private": false,
4
- "version": "1.7.43",
4
+ "version": "1.7.44",
5
5
  "description": "Firebase authentication service with anonymous upgrade support",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
@@ -264,7 +264,7 @@ export class UserService extends BaseService {
264
264
  }
265
265
 
266
266
  const userData = userDoc.data();
267
- return userSchema.parse(userData);
267
+ return userSchema.parse(userData) as User;
268
268
  }
269
269
 
270
270
  /**
@@ -278,7 +278,7 @@ export class UserService extends BaseService {
278
278
  if (querySnapshot.empty) return null;
279
279
 
280
280
  const userData = querySnapshot.docs[0].data();
281
- return userSchema.parse(userData);
281
+ return userSchema.parse(userData) as User;
282
282
  }
283
283
 
284
284
  async getUsersByRole(role: UserRole): Promise<User[]> {
@@ -289,7 +289,7 @@ export class UserService extends BaseService {
289
289
  const querySnapshot = await getDocs(q);
290
290
 
291
291
  const users = querySnapshot.docs.map((doc) => doc.data());
292
- return Promise.all(users.map((userData) => userSchema.parse(userData)));
292
+ return users.map((userData) => userSchema.parse(userData) as User);
293
293
  }
294
294
 
295
295
  /**
@@ -14,9 +14,9 @@ export interface User {
14
14
  email: string | null;
15
15
  roles: UserRole[];
16
16
  isAnonymous: boolean;
17
- createdAt: Timestamp | FieldValue | Date;
18
- updatedAt: Timestamp | FieldValue | Date;
19
- lastLoginAt: Timestamp | FieldValue | Date;
17
+ createdAt: any;
18
+ updatedAt: any;
19
+ lastLoginAt: any;
20
20
  patientProfile?: string;
21
21
  practitionerProfile?: string;
22
22
  adminProfile?: string;
@@ -90,9 +90,9 @@ export const userSchema = z.object({
90
90
  email: z.string().email().nullable(),
91
91
  roles: z.array(userRoleSchema),
92
92
  isAnonymous: z.boolean(),
93
- createdAt: timestampSchema,
94
- updatedAt: timestampSchema,
95
- lastLoginAt: timestampSchema,
93
+ createdAt: z.any(),
94
+ updatedAt: z.any(),
95
+ lastLoginAt: z.any(),
96
96
  patientProfile: z.string().optional(),
97
97
  practitionerProfile: z.string().optional(),
98
98
  adminProfile: z.string().optional(),