@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 +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
- package/src/services/user.service.ts +3 -3
- package/src/types/index.ts +3 -3
- package/src/validations/schemas.ts +3 -3
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:
|
|
5940
|
-
updatedAt:
|
|
5941
|
-
lastLoginAt:
|
|
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.
|
|
8631
|
-
updatedAt: z.
|
|
8632
|
-
lastLoginAt: z.
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
5940
|
-
updatedAt:
|
|
5941
|
-
lastLoginAt:
|
|
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.
|
|
8631
|
-
updatedAt: z.
|
|
8632
|
-
lastLoginAt: z.
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
927
|
-
updatedAt:
|
|
928
|
-
lastLoginAt:
|
|
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
|
|
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:
|
|
702
|
-
updatedAt:
|
|
703
|
-
lastLoginAt:
|
|
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
|
|
5863
|
+
return users.map((userData) => userSchema.parse(userData));
|
|
5864
5864
|
}
|
|
5865
5865
|
/**
|
|
5866
5866
|
* Ažurira timestamp poslednjeg logovanja
|
package/package.json
CHANGED
|
@@ -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
|
|
292
|
+
return users.map((userData) => userSchema.parse(userData) as User);
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
/**
|
package/src/types/index.ts
CHANGED
|
@@ -14,9 +14,9 @@ export interface User {
|
|
|
14
14
|
email: string | null;
|
|
15
15
|
roles: UserRole[];
|
|
16
16
|
isAnonymous: boolean;
|
|
17
|
-
createdAt:
|
|
18
|
-
updatedAt:
|
|
19
|
-
lastLoginAt:
|
|
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:
|
|
94
|
-
updatedAt:
|
|
95
|
-
lastLoginAt:
|
|
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(),
|