@blackcode_sa/metaestetics-api 1.7.8 → 1.7.10
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
|
@@ -6128,8 +6128,8 @@ declare class AuthService extends BaseService {
|
|
|
6128
6128
|
signUpPractitioner(data: {
|
|
6129
6129
|
email: string;
|
|
6130
6130
|
password: string;
|
|
6131
|
-
firstName
|
|
6132
|
-
lastName
|
|
6131
|
+
firstName?: string;
|
|
6132
|
+
lastName?: string;
|
|
6133
6133
|
token?: string;
|
|
6134
6134
|
profileData?: Partial<CreatePractitionerData>;
|
|
6135
6135
|
}): Promise<{
|
|
@@ -13128,8 +13128,8 @@ declare const createPractitionerTokenSchema: z.ZodObject<{
|
|
|
13128
13128
|
declare const practitionerSignupSchema: z.ZodObject<{
|
|
13129
13129
|
email: z.ZodString;
|
|
13130
13130
|
password: z.ZodString;
|
|
13131
|
-
firstName: z.ZodString
|
|
13132
|
-
lastName: z.ZodString
|
|
13131
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
13132
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
13133
13133
|
token: z.ZodOptional<z.ZodString>;
|
|
13134
13134
|
profileData: z.ZodOptional<z.ZodObject<{
|
|
13135
13135
|
basicInfo: z.ZodOptional<z.ZodObject<{
|
|
@@ -13167,10 +13167,10 @@ declare const practitionerSignupSchema: z.ZodObject<{
|
|
|
13167
13167
|
certification?: any;
|
|
13168
13168
|
}>>;
|
|
13169
13169
|
}, "strip", z.ZodTypeAny, {
|
|
13170
|
-
firstName: string;
|
|
13171
|
-
lastName: string;
|
|
13172
13170
|
email: string;
|
|
13173
13171
|
password: string;
|
|
13172
|
+
firstName?: string | undefined;
|
|
13173
|
+
lastName?: string | undefined;
|
|
13174
13174
|
token?: string | undefined;
|
|
13175
13175
|
profileData?: {
|
|
13176
13176
|
basicInfo?: {
|
|
@@ -13182,10 +13182,10 @@ declare const practitionerSignupSchema: z.ZodObject<{
|
|
|
13182
13182
|
certification?: any;
|
|
13183
13183
|
} | undefined;
|
|
13184
13184
|
}, {
|
|
13185
|
-
firstName: string;
|
|
13186
|
-
lastName: string;
|
|
13187
13185
|
email: string;
|
|
13188
13186
|
password: string;
|
|
13187
|
+
firstName?: string | undefined;
|
|
13188
|
+
lastName?: string | undefined;
|
|
13189
13189
|
token?: string | undefined;
|
|
13190
13190
|
profileData?: {
|
|
13191
13191
|
basicInfo?: {
|
package/dist/index.d.ts
CHANGED
|
@@ -6128,8 +6128,8 @@ declare class AuthService extends BaseService {
|
|
|
6128
6128
|
signUpPractitioner(data: {
|
|
6129
6129
|
email: string;
|
|
6130
6130
|
password: string;
|
|
6131
|
-
firstName
|
|
6132
|
-
lastName
|
|
6131
|
+
firstName?: string;
|
|
6132
|
+
lastName?: string;
|
|
6133
6133
|
token?: string;
|
|
6134
6134
|
profileData?: Partial<CreatePractitionerData>;
|
|
6135
6135
|
}): Promise<{
|
|
@@ -13128,8 +13128,8 @@ declare const createPractitionerTokenSchema: z.ZodObject<{
|
|
|
13128
13128
|
declare const practitionerSignupSchema: z.ZodObject<{
|
|
13129
13129
|
email: z.ZodString;
|
|
13130
13130
|
password: z.ZodString;
|
|
13131
|
-
firstName: z.ZodString
|
|
13132
|
-
lastName: z.ZodString
|
|
13131
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
13132
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
13133
13133
|
token: z.ZodOptional<z.ZodString>;
|
|
13134
13134
|
profileData: z.ZodOptional<z.ZodObject<{
|
|
13135
13135
|
basicInfo: z.ZodOptional<z.ZodObject<{
|
|
@@ -13167,10 +13167,10 @@ declare const practitionerSignupSchema: z.ZodObject<{
|
|
|
13167
13167
|
certification?: any;
|
|
13168
13168
|
}>>;
|
|
13169
13169
|
}, "strip", z.ZodTypeAny, {
|
|
13170
|
-
firstName: string;
|
|
13171
|
-
lastName: string;
|
|
13172
13170
|
email: string;
|
|
13173
13171
|
password: string;
|
|
13172
|
+
firstName?: string | undefined;
|
|
13173
|
+
lastName?: string | undefined;
|
|
13174
13174
|
token?: string | undefined;
|
|
13175
13175
|
profileData?: {
|
|
13176
13176
|
basicInfo?: {
|
|
@@ -13182,10 +13182,10 @@ declare const practitionerSignupSchema: z.ZodObject<{
|
|
|
13182
13182
|
certification?: any;
|
|
13183
13183
|
} | undefined;
|
|
13184
13184
|
}, {
|
|
13185
|
-
firstName: string;
|
|
13186
|
-
lastName: string;
|
|
13187
13185
|
email: string;
|
|
13188
13186
|
password: string;
|
|
13187
|
+
firstName?: string | undefined;
|
|
13188
|
+
lastName?: string | undefined;
|
|
13189
13189
|
token?: string | undefined;
|
|
13190
13190
|
profileData?: {
|
|
13191
13191
|
basicInfo?: {
|
package/dist/index.js
CHANGED
|
@@ -4183,8 +4183,8 @@ var createPractitionerTokenSchema = import_zod13.z.object({
|
|
|
4183
4183
|
var practitionerSignupSchema = import_zod13.z.object({
|
|
4184
4184
|
email: import_zod13.z.string().email(),
|
|
4185
4185
|
password: import_zod13.z.string().min(8),
|
|
4186
|
-
firstName: import_zod13.z.string().min(2).max(50),
|
|
4187
|
-
lastName: import_zod13.z.string().min(2).max(50),
|
|
4186
|
+
firstName: import_zod13.z.string().min(2).max(50).optional(),
|
|
4187
|
+
lastName: import_zod13.z.string().min(2).max(50).optional(),
|
|
4188
4188
|
token: import_zod13.z.string().optional(),
|
|
4189
4189
|
profileData: import_zod13.z.object({
|
|
4190
4190
|
basicInfo: import_zod13.z.object({
|
|
@@ -4990,6 +4990,9 @@ var UserService = class extends BaseService {
|
|
|
4990
4990
|
lastLoginAt: (0, import_firestore17.serverTimestamp)()
|
|
4991
4991
|
};
|
|
4992
4992
|
await (0, import_firestore17.setDoc)((0, import_firestore17.doc)(this.db, USERS_COLLECTION, userData.uid), userData);
|
|
4993
|
+
if (options == null ? void 0 : options.skipProfileCreation) {
|
|
4994
|
+
return this.getUserById(userData.uid);
|
|
4995
|
+
}
|
|
4993
4996
|
const profiles = await this.createProfilesForRoles(
|
|
4994
4997
|
userData.uid,
|
|
4995
4998
|
roles,
|
|
@@ -7916,8 +7919,8 @@ var AuthService = class extends BaseService {
|
|
|
7916
7919
|
data.profileData = {};
|
|
7917
7920
|
}
|
|
7918
7921
|
const basicInfo = {
|
|
7919
|
-
firstName: data.firstName,
|
|
7920
|
-
lastName: data.lastName,
|
|
7922
|
+
firstName: data.firstName || "",
|
|
7923
|
+
lastName: data.lastName || "",
|
|
7921
7924
|
email: data.email,
|
|
7922
7925
|
phoneNumber: ((_a = data.profileData.basicInfo) == null ? void 0 : _a.phoneNumber) || "",
|
|
7923
7926
|
profileImageUrl: ((_b = data.profileData.basicInfo) == null ? void 0 : _b.profileImageUrl) || "",
|
package/dist/index.mjs
CHANGED
|
@@ -4076,8 +4076,8 @@ var createPractitionerTokenSchema = z13.object({
|
|
|
4076
4076
|
var practitionerSignupSchema = z13.object({
|
|
4077
4077
|
email: z13.string().email(),
|
|
4078
4078
|
password: z13.string().min(8),
|
|
4079
|
-
firstName: z13.string().min(2).max(50),
|
|
4080
|
-
lastName: z13.string().min(2).max(50),
|
|
4079
|
+
firstName: z13.string().min(2).max(50).optional(),
|
|
4080
|
+
lastName: z13.string().min(2).max(50).optional(),
|
|
4081
4081
|
token: z13.string().optional(),
|
|
4082
4082
|
profileData: z13.object({
|
|
4083
4083
|
basicInfo: z13.object({
|
|
@@ -4883,6 +4883,9 @@ var UserService = class extends BaseService {
|
|
|
4883
4883
|
lastLoginAt: serverTimestamp10()
|
|
4884
4884
|
};
|
|
4885
4885
|
await setDoc8(doc9(this.db, USERS_COLLECTION, userData.uid), userData);
|
|
4886
|
+
if (options == null ? void 0 : options.skipProfileCreation) {
|
|
4887
|
+
return this.getUserById(userData.uid);
|
|
4888
|
+
}
|
|
4886
4889
|
const profiles = await this.createProfilesForRoles(
|
|
4887
4890
|
userData.uid,
|
|
4888
4891
|
roles,
|
|
@@ -7881,8 +7884,8 @@ var AuthService = class extends BaseService {
|
|
|
7881
7884
|
data.profileData = {};
|
|
7882
7885
|
}
|
|
7883
7886
|
const basicInfo = {
|
|
7884
|
-
firstName: data.firstName,
|
|
7885
|
-
lastName: data.lastName,
|
|
7887
|
+
firstName: data.firstName || "",
|
|
7888
|
+
lastName: data.lastName || "",
|
|
7886
7889
|
email: data.email,
|
|
7887
7890
|
phoneNumber: ((_a = data.profileData.basicInfo) == null ? void 0 : _a.phoneNumber) || "",
|
|
7888
7891
|
profileImageUrl: ((_b = data.profileData.basicInfo) == null ? void 0 : _b.profileImageUrl) || "",
|
package/package.json
CHANGED
|
@@ -884,8 +884,8 @@ export class AuthService extends BaseService {
|
|
|
884
884
|
async signUpPractitioner(data: {
|
|
885
885
|
email: string;
|
|
886
886
|
password: string;
|
|
887
|
-
firstName
|
|
888
|
-
lastName
|
|
887
|
+
firstName?: string;
|
|
888
|
+
lastName?: string;
|
|
889
889
|
token?: string;
|
|
890
890
|
profileData?: Partial<CreatePractitionerData>;
|
|
891
891
|
}): Promise<{
|
|
@@ -996,8 +996,8 @@ export class AuthService extends BaseService {
|
|
|
996
996
|
|
|
997
997
|
// We need to create a full PractitionerBasicInfo object
|
|
998
998
|
const basicInfo: PractitionerBasicInfo = {
|
|
999
|
-
firstName: data.firstName,
|
|
1000
|
-
lastName: data.lastName,
|
|
999
|
+
firstName: data.firstName || "",
|
|
1000
|
+
lastName: data.lastName || "",
|
|
1001
1001
|
email: data.email,
|
|
1002
1002
|
phoneNumber: data.profileData.basicInfo?.phoneNumber || "",
|
|
1003
1003
|
profileImageUrl: data.profileData.basicInfo?.profileImageUrl || "",
|
|
@@ -103,6 +103,10 @@ export class UserService extends BaseService {
|
|
|
103
103
|
await setDoc(doc(this.db, USERS_COLLECTION, userData.uid), userData);
|
|
104
104
|
|
|
105
105
|
// Kreiramo odgovarajuće profile na osnovu rola
|
|
106
|
+
if (options?.skipProfileCreation) {
|
|
107
|
+
return this.getUserById(userData.uid);
|
|
108
|
+
}
|
|
109
|
+
|
|
106
110
|
const profiles = await this.createProfilesForRoles(
|
|
107
111
|
userData.uid,
|
|
108
112
|
roles,
|
|
@@ -196,8 +196,8 @@ export const createPractitionerTokenSchema = z.object({
|
|
|
196
196
|
export const practitionerSignupSchema = z.object({
|
|
197
197
|
email: z.string().email(),
|
|
198
198
|
password: z.string().min(8),
|
|
199
|
-
firstName: z.string().min(2).max(50),
|
|
200
|
-
lastName: z.string().min(2).max(50),
|
|
199
|
+
firstName: z.string().min(2).max(50).optional(),
|
|
200
|
+
lastName: z.string().min(2).max(50).optional(),
|
|
201
201
|
token: z.string().optional(),
|
|
202
202
|
profileData: z
|
|
203
203
|
.object({
|