@blackcode_sa/metaestetics-api 1.5.0 → 1.5.2

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
@@ -340,6 +340,7 @@ interface CertificationRequirement {
340
340
  }
341
341
 
342
342
  declare const PRACTITIONERS_COLLECTION = "practitioners";
343
+ declare const REGISTER_TOKENS_COLLECTION = "register_tokens";
343
344
  /**
344
345
  * Osnovne informacije o zdravstvenom radniku
345
346
  */
@@ -406,6 +407,22 @@ interface PractitionerClinicWorkingHours {
406
407
  createdAt: Timestamp;
407
408
  updatedAt: Timestamp;
408
409
  }
410
+ /**
411
+ * Status of practitioner profile
412
+ */
413
+ declare enum PractitionerStatus {
414
+ DRAFT = "draft",
415
+ ACTIVE = "active"
416
+ }
417
+ /**
418
+ * Token status for practitioner invitations
419
+ */
420
+ declare enum PractitionerTokenStatus {
421
+ ACTIVE = "active",
422
+ USED = "used",
423
+ EXPIRED = "expired",
424
+ REVOKED = "revoked"
425
+ }
409
426
  /**
410
427
  * Interfejs za zdravstvenog radnika
411
428
  */
@@ -418,6 +435,7 @@ interface Practitioner {
418
435
  clinicWorkingHours: PractitionerClinicWorkingHours[];
419
436
  isActive: boolean;
420
437
  isVerified: boolean;
438
+ status: PractitionerStatus;
421
439
  createdAt: Timestamp;
422
440
  updatedAt: Timestamp;
423
441
  }
@@ -432,6 +450,18 @@ interface CreatePractitionerData {
432
450
  clinicWorkingHours?: PractitionerClinicWorkingHours[];
433
451
  isActive: boolean;
434
452
  isVerified: boolean;
453
+ status?: PractitionerStatus;
454
+ }
455
+ /**
456
+ * Tip za kreiranje draft profila zdravstvenog radnika
457
+ */
458
+ interface CreateDraftPractitionerData {
459
+ basicInfo: PractitionerBasicInfo;
460
+ certification: PractitionerCertification;
461
+ clinics?: string[];
462
+ clinicWorkingHours?: PractitionerClinicWorkingHours[];
463
+ isActive?: boolean;
464
+ isVerified?: boolean;
435
465
  }
436
466
  /**
437
467
  * Tip za ažuriranje zdravstvenog radnika
@@ -501,6 +531,31 @@ interface PractitionerWorkingHours {
501
531
  createdAt: Timestamp;
502
532
  updatedAt: Timestamp;
503
533
  }
534
+ /**
535
+ * Token za pozivanje zdravstvenog radnika
536
+ */
537
+ interface PractitionerToken {
538
+ id: string;
539
+ token: string;
540
+ practitionerId: string;
541
+ email: string;
542
+ clinicId: string;
543
+ status: PractitionerTokenStatus;
544
+ createdBy: string;
545
+ createdAt: Timestamp;
546
+ expiresAt: Timestamp;
547
+ usedBy?: string;
548
+ usedAt?: Timestamp;
549
+ }
550
+ /**
551
+ * Tip za kreiranje tokena za zdravstvenog radnika
552
+ */
553
+ interface CreatePractitionerTokenData {
554
+ practitionerId: string;
555
+ email: string;
556
+ clinicId: string;
557
+ expiresAt?: Date;
558
+ }
504
559
 
505
560
  /**
506
561
  * Blokirajući uslovi koji mogu sprečiti proceduru
@@ -3881,6 +3936,44 @@ declare class PractitionerService extends BaseService {
3881
3936
  * Kreira novog zdravstvenog radnika
3882
3937
  */
3883
3938
  createPractitioner(data: CreatePractitionerData): Promise<Practitioner>;
3939
+ /**
3940
+ * Kreira novi draft profil zdravstvenog radnika bez povezanog korisnika
3941
+ * Koristi se od strane administratora klinike za kreiranje profila i kasnije pozivanje
3942
+ * @param data Podaci za kreiranje draft profila
3943
+ * @param createdBy ID administratora koji kreira profil
3944
+ * @param clinicId ID klinike za koju se kreira profil
3945
+ * @returns Objekt koji sadrži kreirani draft profil i token za registraciju
3946
+ */
3947
+ createDraftPractitioner(data: CreateDraftPractitionerData, createdBy: string, clinicId: string): Promise<{
3948
+ practitioner: Practitioner;
3949
+ token: PractitionerToken;
3950
+ }>;
3951
+ /**
3952
+ * Creates a token for inviting practitioner to claim their profile
3953
+ * @param data Data for creating token
3954
+ * @param createdBy ID of the user creating the token
3955
+ * @returns Created token
3956
+ */
3957
+ createPractitionerToken(data: CreatePractitionerTokenData, createdBy: string): Promise<PractitionerToken>;
3958
+ /**
3959
+ * Gets active tokens for a practitioner
3960
+ * @param practitionerId ID of the practitioner
3961
+ * @returns Array of active tokens
3962
+ */
3963
+ getPractitionerActiveTokens(practitionerId: string): Promise<PractitionerToken[]>;
3964
+ /**
3965
+ * Gets a token by its string value and validates it
3966
+ * @param tokenString The token string to find
3967
+ * @returns The token if found and valid, null otherwise
3968
+ */
3969
+ validateToken(tokenString: string): Promise<PractitionerToken | null>;
3970
+ /**
3971
+ * Marks a token as used
3972
+ * @param tokenId ID of the token
3973
+ * @param practitionerId ID of the practitioner
3974
+ * @param userId ID of the user using the token
3975
+ */
3976
+ markTokenAsUsed(tokenId: string, practitionerId: string, userId: string): Promise<void>;
3884
3977
  /**
3885
3978
  * Dohvata zdravstvenog radnika po ID-u
3886
3979
  */
@@ -3893,6 +3986,10 @@ declare class PractitionerService extends BaseService {
3893
3986
  * Dohvata sve zdravstvene radnike za određenu kliniku
3894
3987
  */
3895
3988
  getPractitionersByClinic(clinicId: string): Promise<Practitioner[]>;
3989
+ /**
3990
+ * Dohvata sve draft zdravstvene radnike za određenu kliniku
3991
+ */
3992
+ getDraftPractitionersByClinic(clinicId: string): Promise<Practitioner[]>;
3896
3993
  /**
3897
3994
  * Ažurira profil zdravstvenog radnika
3898
3995
  */
@@ -3917,6 +4014,13 @@ declare class PractitionerService extends BaseService {
3917
4014
  * Briše profil zdravstvenog radnika
3918
4015
  */
3919
4016
  deletePractitioner(practitionerId: string): Promise<void>;
4017
+ /**
4018
+ * Validates a registration token and claims the associated draft practitioner profile
4019
+ * @param tokenString The token provided by the practitioner
4020
+ * @param userId The ID of the user claiming the profile
4021
+ * @returns The claimed practitioner profile or null if token is invalid
4022
+ */
4023
+ validateTokenAndClaimProfile(tokenString: string, userId: string): Promise<Practitioner | null>;
3920
4024
  }
3921
4025
 
3922
4026
  declare class UserService extends BaseService {
@@ -8523,6 +8627,7 @@ declare const practitionerSchema: z.ZodObject<{
8523
8627
  }>, "many">;
8524
8628
  isActive: z.ZodBoolean;
8525
8629
  isVerified: z.ZodBoolean;
8630
+ status: z.ZodNativeEnum<typeof PractitionerStatus>;
8526
8631
  createdAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
8527
8632
  updatedAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
8528
8633
  }, "strip", z.ZodTypeAny, {
@@ -8588,6 +8693,7 @@ declare const practitionerSchema: z.ZodObject<{
8588
8693
  }[];
8589
8694
  isActive: boolean;
8590
8695
  isVerified: boolean;
8696
+ status: PractitionerStatus;
8591
8697
  updatedAt: Timestamp;
8592
8698
  createdAt: Timestamp;
8593
8699
  }, {
@@ -8653,6 +8759,7 @@ declare const practitionerSchema: z.ZodObject<{
8653
8759
  }[];
8654
8760
  isActive: boolean;
8655
8761
  isVerified: boolean;
8762
+ status: PractitionerStatus;
8656
8763
  updatedAt: Timestamp;
8657
8764
  createdAt: Timestamp;
8658
8765
  }>;
@@ -8929,6 +9036,7 @@ declare const createPractitionerSchema: z.ZodObject<{
8929
9036
  }>, "many">>;
8930
9037
  isActive: z.ZodBoolean;
8931
9038
  isVerified: z.ZodBoolean;
9039
+ status: z.ZodOptional<z.ZodNativeEnum<typeof PractitionerStatus>>;
8932
9040
  }, "strip", z.ZodTypeAny, {
8933
9041
  userRef: string;
8934
9042
  basicInfo: {
@@ -8991,6 +9099,7 @@ declare const createPractitionerSchema: z.ZodObject<{
8991
9099
  createdAt: Timestamp;
8992
9100
  clinicId: string;
8993
9101
  }[] | undefined;
9102
+ status?: PractitionerStatus | undefined;
8994
9103
  }, {
8995
9104
  userRef: string;
8996
9105
  basicInfo: {
@@ -9053,6 +9162,461 @@ declare const createPractitionerSchema: z.ZodObject<{
9053
9162
  createdAt: Timestamp;
9054
9163
  clinicId: string;
9055
9164
  }[] | undefined;
9165
+ status?: PractitionerStatus | undefined;
9166
+ }>;
9167
+ /**
9168
+ * Šema za validaciju podataka pri kreiranju draft profila zdravstvenog radnika
9169
+ */
9170
+ declare const createDraftPractitionerSchema: z.ZodObject<{
9171
+ basicInfo: z.ZodObject<{
9172
+ firstName: z.ZodString;
9173
+ lastName: z.ZodString;
9174
+ title: z.ZodString;
9175
+ email: z.ZodString;
9176
+ phoneNumber: z.ZodString;
9177
+ dateOfBirth: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
9178
+ gender: z.ZodEnum<["male", "female", "other"]>;
9179
+ profileImageUrl: z.ZodOptional<z.ZodString>;
9180
+ bio: z.ZodOptional<z.ZodString>;
9181
+ languages: z.ZodArray<z.ZodString, "many">;
9182
+ }, "strip", z.ZodTypeAny, {
9183
+ firstName: string;
9184
+ lastName: string;
9185
+ dateOfBirth: Timestamp;
9186
+ gender: "male" | "female" | "other";
9187
+ email: string;
9188
+ phoneNumber: string;
9189
+ languages: string[];
9190
+ title: string;
9191
+ profileImageUrl?: string | undefined;
9192
+ bio?: string | undefined;
9193
+ }, {
9194
+ firstName: string;
9195
+ lastName: string;
9196
+ dateOfBirth: Timestamp;
9197
+ gender: "male" | "female" | "other";
9198
+ email: string;
9199
+ phoneNumber: string;
9200
+ languages: string[];
9201
+ title: string;
9202
+ profileImageUrl?: string | undefined;
9203
+ bio?: string | undefined;
9204
+ }>;
9205
+ certification: z.ZodObject<{
9206
+ level: z.ZodNativeEnum<typeof CertificationLevel>;
9207
+ specialties: z.ZodArray<z.ZodNativeEnum<typeof CertificationSpecialty>, "many">;
9208
+ licenseNumber: z.ZodString;
9209
+ issuingAuthority: z.ZodString;
9210
+ issueDate: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
9211
+ expiryDate: z.ZodOptional<z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>>;
9212
+ verificationStatus: z.ZodEnum<["pending", "verified", "rejected"]>;
9213
+ }, "strip", z.ZodTypeAny, {
9214
+ level: CertificationLevel;
9215
+ specialties: CertificationSpecialty[];
9216
+ licenseNumber: string;
9217
+ issuingAuthority: string;
9218
+ issueDate: Timestamp;
9219
+ verificationStatus: "pending" | "verified" | "rejected";
9220
+ expiryDate?: Timestamp | undefined;
9221
+ }, {
9222
+ level: CertificationLevel;
9223
+ specialties: CertificationSpecialty[];
9224
+ licenseNumber: string;
9225
+ issuingAuthority: string;
9226
+ issueDate: Timestamp;
9227
+ verificationStatus: "pending" | "verified" | "rejected";
9228
+ expiryDate?: Timestamp | undefined;
9229
+ }>;
9230
+ clinics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9231
+ clinicWorkingHours: z.ZodOptional<z.ZodArray<z.ZodObject<{
9232
+ clinicId: z.ZodString;
9233
+ workingHours: z.ZodObject<{
9234
+ monday: z.ZodNullable<z.ZodObject<{
9235
+ start: z.ZodString;
9236
+ end: z.ZodString;
9237
+ }, "strip", z.ZodTypeAny, {
9238
+ start: string;
9239
+ end: string;
9240
+ }, {
9241
+ start: string;
9242
+ end: string;
9243
+ }>>;
9244
+ tuesday: z.ZodNullable<z.ZodObject<{
9245
+ start: z.ZodString;
9246
+ end: z.ZodString;
9247
+ }, "strip", z.ZodTypeAny, {
9248
+ start: string;
9249
+ end: string;
9250
+ }, {
9251
+ start: string;
9252
+ end: string;
9253
+ }>>;
9254
+ wednesday: z.ZodNullable<z.ZodObject<{
9255
+ start: z.ZodString;
9256
+ end: z.ZodString;
9257
+ }, "strip", z.ZodTypeAny, {
9258
+ start: string;
9259
+ end: string;
9260
+ }, {
9261
+ start: string;
9262
+ end: string;
9263
+ }>>;
9264
+ thursday: z.ZodNullable<z.ZodObject<{
9265
+ start: z.ZodString;
9266
+ end: z.ZodString;
9267
+ }, "strip", z.ZodTypeAny, {
9268
+ start: string;
9269
+ end: string;
9270
+ }, {
9271
+ start: string;
9272
+ end: string;
9273
+ }>>;
9274
+ friday: z.ZodNullable<z.ZodObject<{
9275
+ start: z.ZodString;
9276
+ end: z.ZodString;
9277
+ }, "strip", z.ZodTypeAny, {
9278
+ start: string;
9279
+ end: string;
9280
+ }, {
9281
+ start: string;
9282
+ end: string;
9283
+ }>>;
9284
+ saturday: z.ZodNullable<z.ZodObject<{
9285
+ start: z.ZodString;
9286
+ end: z.ZodString;
9287
+ }, "strip", z.ZodTypeAny, {
9288
+ start: string;
9289
+ end: string;
9290
+ }, {
9291
+ start: string;
9292
+ end: string;
9293
+ }>>;
9294
+ sunday: z.ZodNullable<z.ZodObject<{
9295
+ start: z.ZodString;
9296
+ end: z.ZodString;
9297
+ }, "strip", z.ZodTypeAny, {
9298
+ start: string;
9299
+ end: string;
9300
+ }, {
9301
+ start: string;
9302
+ end: string;
9303
+ }>>;
9304
+ }, "strip", z.ZodTypeAny, {
9305
+ monday: {
9306
+ start: string;
9307
+ end: string;
9308
+ } | null;
9309
+ tuesday: {
9310
+ start: string;
9311
+ end: string;
9312
+ } | null;
9313
+ wednesday: {
9314
+ start: string;
9315
+ end: string;
9316
+ } | null;
9317
+ thursday: {
9318
+ start: string;
9319
+ end: string;
9320
+ } | null;
9321
+ friday: {
9322
+ start: string;
9323
+ end: string;
9324
+ } | null;
9325
+ saturday: {
9326
+ start: string;
9327
+ end: string;
9328
+ } | null;
9329
+ sunday: {
9330
+ start: string;
9331
+ end: string;
9332
+ } | null;
9333
+ }, {
9334
+ monday: {
9335
+ start: string;
9336
+ end: string;
9337
+ } | null;
9338
+ tuesday: {
9339
+ start: string;
9340
+ end: string;
9341
+ } | null;
9342
+ wednesday: {
9343
+ start: string;
9344
+ end: string;
9345
+ } | null;
9346
+ thursday: {
9347
+ start: string;
9348
+ end: string;
9349
+ } | null;
9350
+ friday: {
9351
+ start: string;
9352
+ end: string;
9353
+ } | null;
9354
+ saturday: {
9355
+ start: string;
9356
+ end: string;
9357
+ } | null;
9358
+ sunday: {
9359
+ start: string;
9360
+ end: string;
9361
+ } | null;
9362
+ }>;
9363
+ isActive: z.ZodBoolean;
9364
+ createdAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
9365
+ updatedAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
9366
+ }, "strip", z.ZodTypeAny, {
9367
+ isActive: boolean;
9368
+ updatedAt: Timestamp;
9369
+ workingHours: {
9370
+ monday: {
9371
+ start: string;
9372
+ end: string;
9373
+ } | null;
9374
+ tuesday: {
9375
+ start: string;
9376
+ end: string;
9377
+ } | null;
9378
+ wednesday: {
9379
+ start: string;
9380
+ end: string;
9381
+ } | null;
9382
+ thursday: {
9383
+ start: string;
9384
+ end: string;
9385
+ } | null;
9386
+ friday: {
9387
+ start: string;
9388
+ end: string;
9389
+ } | null;
9390
+ saturday: {
9391
+ start: string;
9392
+ end: string;
9393
+ } | null;
9394
+ sunday: {
9395
+ start: string;
9396
+ end: string;
9397
+ } | null;
9398
+ };
9399
+ createdAt: Timestamp;
9400
+ clinicId: string;
9401
+ }, {
9402
+ isActive: boolean;
9403
+ updatedAt: Timestamp;
9404
+ workingHours: {
9405
+ monday: {
9406
+ start: string;
9407
+ end: string;
9408
+ } | null;
9409
+ tuesday: {
9410
+ start: string;
9411
+ end: string;
9412
+ } | null;
9413
+ wednesday: {
9414
+ start: string;
9415
+ end: string;
9416
+ } | null;
9417
+ thursday: {
9418
+ start: string;
9419
+ end: string;
9420
+ } | null;
9421
+ friday: {
9422
+ start: string;
9423
+ end: string;
9424
+ } | null;
9425
+ saturday: {
9426
+ start: string;
9427
+ end: string;
9428
+ } | null;
9429
+ sunday: {
9430
+ start: string;
9431
+ end: string;
9432
+ } | null;
9433
+ };
9434
+ createdAt: Timestamp;
9435
+ clinicId: string;
9436
+ }>, "many">>;
9437
+ isActive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
9438
+ isVerified: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
9439
+ }, "strip", z.ZodTypeAny, {
9440
+ basicInfo: {
9441
+ firstName: string;
9442
+ lastName: string;
9443
+ dateOfBirth: Timestamp;
9444
+ gender: "male" | "female" | "other";
9445
+ email: string;
9446
+ phoneNumber: string;
9447
+ languages: string[];
9448
+ title: string;
9449
+ profileImageUrl?: string | undefined;
9450
+ bio?: string | undefined;
9451
+ };
9452
+ certification: {
9453
+ level: CertificationLevel;
9454
+ specialties: CertificationSpecialty[];
9455
+ licenseNumber: string;
9456
+ issuingAuthority: string;
9457
+ issueDate: Timestamp;
9458
+ verificationStatus: "pending" | "verified" | "rejected";
9459
+ expiryDate?: Timestamp | undefined;
9460
+ };
9461
+ isActive: boolean;
9462
+ isVerified: boolean;
9463
+ clinics?: string[] | undefined;
9464
+ clinicWorkingHours?: {
9465
+ isActive: boolean;
9466
+ updatedAt: Timestamp;
9467
+ workingHours: {
9468
+ monday: {
9469
+ start: string;
9470
+ end: string;
9471
+ } | null;
9472
+ tuesday: {
9473
+ start: string;
9474
+ end: string;
9475
+ } | null;
9476
+ wednesday: {
9477
+ start: string;
9478
+ end: string;
9479
+ } | null;
9480
+ thursday: {
9481
+ start: string;
9482
+ end: string;
9483
+ } | null;
9484
+ friday: {
9485
+ start: string;
9486
+ end: string;
9487
+ } | null;
9488
+ saturday: {
9489
+ start: string;
9490
+ end: string;
9491
+ } | null;
9492
+ sunday: {
9493
+ start: string;
9494
+ end: string;
9495
+ } | null;
9496
+ };
9497
+ createdAt: Timestamp;
9498
+ clinicId: string;
9499
+ }[] | undefined;
9500
+ }, {
9501
+ basicInfo: {
9502
+ firstName: string;
9503
+ lastName: string;
9504
+ dateOfBirth: Timestamp;
9505
+ gender: "male" | "female" | "other";
9506
+ email: string;
9507
+ phoneNumber: string;
9508
+ languages: string[];
9509
+ title: string;
9510
+ profileImageUrl?: string | undefined;
9511
+ bio?: string | undefined;
9512
+ };
9513
+ certification: {
9514
+ level: CertificationLevel;
9515
+ specialties: CertificationSpecialty[];
9516
+ licenseNumber: string;
9517
+ issuingAuthority: string;
9518
+ issueDate: Timestamp;
9519
+ verificationStatus: "pending" | "verified" | "rejected";
9520
+ expiryDate?: Timestamp | undefined;
9521
+ };
9522
+ clinics?: string[] | undefined;
9523
+ clinicWorkingHours?: {
9524
+ isActive: boolean;
9525
+ updatedAt: Timestamp;
9526
+ workingHours: {
9527
+ monday: {
9528
+ start: string;
9529
+ end: string;
9530
+ } | null;
9531
+ tuesday: {
9532
+ start: string;
9533
+ end: string;
9534
+ } | null;
9535
+ wednesday: {
9536
+ start: string;
9537
+ end: string;
9538
+ } | null;
9539
+ thursday: {
9540
+ start: string;
9541
+ end: string;
9542
+ } | null;
9543
+ friday: {
9544
+ start: string;
9545
+ end: string;
9546
+ } | null;
9547
+ saturday: {
9548
+ start: string;
9549
+ end: string;
9550
+ } | null;
9551
+ sunday: {
9552
+ start: string;
9553
+ end: string;
9554
+ } | null;
9555
+ };
9556
+ createdAt: Timestamp;
9557
+ clinicId: string;
9558
+ }[] | undefined;
9559
+ isActive?: boolean | undefined;
9560
+ isVerified?: boolean | undefined;
9561
+ }>;
9562
+ /**
9563
+ * Šema za validaciju tokena za zdravstvenog radnika
9564
+ */
9565
+ declare const practitionerTokenSchema: z.ZodObject<{
9566
+ id: z.ZodString;
9567
+ token: z.ZodString;
9568
+ practitionerId: z.ZodString;
9569
+ email: z.ZodString;
9570
+ clinicId: z.ZodString;
9571
+ status: z.ZodNativeEnum<typeof PractitionerTokenStatus>;
9572
+ createdBy: z.ZodString;
9573
+ createdAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
9574
+ expiresAt: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
9575
+ usedBy: z.ZodOptional<z.ZodString>;
9576
+ usedAt: z.ZodOptional<z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>>;
9577
+ }, "strip", z.ZodTypeAny, {
9578
+ id: string;
9579
+ status: PractitionerTokenStatus;
9580
+ email: string;
9581
+ createdAt: Timestamp;
9582
+ createdBy: string;
9583
+ practitionerId: string;
9584
+ clinicId: string;
9585
+ token: string;
9586
+ expiresAt: Timestamp;
9587
+ usedBy?: string | undefined;
9588
+ usedAt?: Timestamp | undefined;
9589
+ }, {
9590
+ id: string;
9591
+ status: PractitionerTokenStatus;
9592
+ email: string;
9593
+ createdAt: Timestamp;
9594
+ createdBy: string;
9595
+ practitionerId: string;
9596
+ clinicId: string;
9597
+ token: string;
9598
+ expiresAt: Timestamp;
9599
+ usedBy?: string | undefined;
9600
+ usedAt?: Timestamp | undefined;
9601
+ }>;
9602
+ /**
9603
+ * Šema za validaciju podataka pri kreiranju tokena za zdravstvenog radnika
9604
+ */
9605
+ declare const createPractitionerTokenSchema: z.ZodObject<{
9606
+ practitionerId: z.ZodString;
9607
+ email: z.ZodString;
9608
+ clinicId: z.ZodString;
9609
+ expiresAt: z.ZodOptional<z.ZodDate>;
9610
+ }, "strip", z.ZodTypeAny, {
9611
+ email: string;
9612
+ practitionerId: string;
9613
+ clinicId: string;
9614
+ expiresAt?: Date | undefined;
9615
+ }, {
9616
+ email: string;
9617
+ practitionerId: string;
9618
+ clinicId: string;
9619
+ expiresAt?: Date | undefined;
9056
9620
  }>;
9057
9621
 
9058
9622
  /**
@@ -13691,8 +14255,8 @@ declare const updateAppointmentSchema: z.ZodObject<{
13691
14255
  clinicId: string;
13692
14256
  appointmentId: string;
13693
14257
  doctorId: string;
13694
- description?: string | undefined;
13695
14258
  status?: CalendarEventStatus | undefined;
14259
+ description?: string | undefined;
13696
14260
  eventTime?: {
13697
14261
  start: Timestamp | Date;
13698
14262
  end: Timestamp | Date;
@@ -13702,8 +14266,8 @@ declare const updateAppointmentSchema: z.ZodObject<{
13702
14266
  clinicId: string;
13703
14267
  appointmentId: string;
13704
14268
  doctorId: string;
13705
- description?: string | undefined;
13706
14269
  status?: CalendarEventStatus | undefined;
14270
+ description?: string | undefined;
13707
14271
  eventTime?: {
13708
14272
  start: Timestamp | Date;
13709
14273
  end: Timestamp | Date;
@@ -14033,9 +14597,9 @@ declare const updateCalendarEventSchema: z.ZodObject<{
14033
14597
  eventType: z.ZodOptional<z.ZodNativeEnum<typeof CalendarEventType>>;
14034
14598
  updatedAt: z.ZodAny;
14035
14599
  }, "strip", z.ZodTypeAny, {
14600
+ status?: CalendarEventStatus | undefined;
14036
14601
  updatedAt?: any;
14037
14602
  description?: string | undefined;
14038
- status?: CalendarEventStatus | undefined;
14039
14603
  appointmentId?: string | null | undefined;
14040
14604
  eventTime?: {
14041
14605
  start: Timestamp | Date;
@@ -14050,9 +14614,9 @@ declare const updateCalendarEventSchema: z.ZodObject<{
14050
14614
  syncStatus?: CalendarSyncStatus | undefined;
14051
14615
  eventType?: CalendarEventType | undefined;
14052
14616
  }, {
14617
+ status?: CalendarEventStatus | undefined;
14053
14618
  updatedAt?: any;
14054
14619
  description?: string | undefined;
14055
- status?: CalendarEventStatus | undefined;
14056
14620
  appointmentId?: string | null | undefined;
14057
14621
  eventTime?: {
14058
14622
  start: Timestamp | Date;
@@ -14269,8 +14833,8 @@ declare const calendarEventSchema: z.ZodObject<{
14269
14833
  updatedAt: z.ZodUnion<[z.ZodType<Date, z.ZodTypeDef, Date>, z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>]>;
14270
14834
  }, "strip", z.ZodTypeAny, {
14271
14835
  id: string;
14272
- updatedAt: Timestamp | Date;
14273
14836
  status: CalendarEventStatus;
14837
+ updatedAt: Timestamp | Date;
14274
14838
  createdAt: Timestamp | Date;
14275
14839
  eventTime: {
14276
14840
  start: Timestamp | Date;
@@ -14340,8 +14904,8 @@ declare const calendarEventSchema: z.ZodObject<{
14340
14904
  } | null | undefined;
14341
14905
  }, {
14342
14906
  id: string;
14343
- updatedAt: Timestamp | Date;
14344
14907
  status: CalendarEventStatus;
14908
+ updatedAt: Timestamp | Date;
14345
14909
  createdAt: Timestamp | Date;
14346
14910
  eventTime: {
14347
14911
  start: Timestamp | Date;
@@ -14540,4 +15104,4 @@ declare enum FirebaseErrorCode {
14540
15104
  POPUP_ALREADY_OPEN = "auth/cancelled-popup-request"
14541
15105
  }
14542
15106
 
14543
- export { AUTH_ERRORS, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type AdminInfo, type AdminToken, AdminTokenStatus, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, type AppointmentNotification, type AppointmentReminderNotification, AuthError, AuthService, type BaseNotification, BlockingCondition, type Brand, CALENDAR_COLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_GROUPS_COLLECTION, type CalendarEvent, CalendarEventStatus, type CalendarEventTime, CalendarEventType, CalendarServiceV2, CalendarSyncStatus, type Category, CertificationLevel, CertificationSpecialty, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicAdminSignupData, type ClinicBranchSetupData, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicGroupSetupData, type ClinicInfo, type ClinicLocation, ClinicPhotoTag, type ClinicReview, ClinicService, ClinicTag, type ClinicTags, type ContactPerson, Contraindication, CosmeticAllergySubtype, type CreateAdminTokenData, type CreateAppointmentParams, type CreateCalendarEventData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePractitionerData, type CreateSyncedCalendarData, type CreateUserData, Currency, DOCUMENTATION_TEMPLATES_COLLECTION, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, DynamicVariable, type EmergencyContact, EnvironmentalAllergySubtype, FILLED_DOCUMENTS_COLLECTION, type FilledDocument, FilledDocumentService, FilledDocumentStatus, FirebaseErrorCode, type FirebaseUser, FoodAllergySubtype, type GamificationInfo, Gender, HeadingLevel, Language, ListType, type LocationData, MedicationAllergySubtype, type Notification, NotificationService, NotificationStatus, NotificationType, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_SENSITIVE_INFO_COLLECTION, PRACTITIONERS_COLLECTION, type PatientClinic, type PatientDoctor, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientProfileInfo, type PatientSensitiveInfo, PatientService, type PostRequirementNotification, PracticeType, type Practitioner, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerClinicWorkingHours, type PractitionerProfileInfo, type PractitionerReview, PractitionerService, type PractitionerWorkingHours, type PreRequirementNotification, PricingMeasure, type ProcedureCategorization, ProcedureFamily, type ProcedureInfo, type Product, type Requirement, type ReviewInfo, SYNCED_CALENDARS_COLLECTION, type ServiceInfo, type Subcategory, SubscriptionModel, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, type Technology, type TimeSlot, TreatmentBenefit, USER_ERRORS, type UpdateAllergyData, type UpdateAppointmentParams, type UpdateBlockingConditionData, type UpdateCalendarEventData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type ValidationSchema, type VitalStats, type WorkingHours, addAllergySchema, addBlockingConditionSchema, addContraindicationSchema, addMedicationSchema, addressDataSchema, adminInfoSchema, adminTokenSchema, allergySchema, allergySubtypeSchema, appointmentNotificationSchema, appointmentReminderNotificationSchema, baseNotificationSchema, blockingConditionSchema, calendarEventSchema, calendarEventTimeSchema, clinicAdminOptionsSchema, clinicAdminSchema, clinicAdminSignupSchema, clinicBranchSetupSchema, clinicContactInfoSchema, clinicGroupSchema, clinicGroupSetupSchema, clinicInfoSchema, clinicLocationSchema, clinicReviewSchema, clinicSchema, clinicTagsSchema, contactPersonSchema, contraindicationSchema, createAdminTokenSchema, createAppointmentSchema, createCalendarEventSchema, createClinicAdminSchema, createClinicGroupSchema, createClinicSchema, createDefaultClinicGroupSchema, createDocumentTemplateSchema, createPatientLocationInfoSchema, createPatientMedicalInfoSchema, createPatientProfileSchema, createPatientSensitiveInfoSchema, createPractitionerSchema, createUserOptionsSchema, doctorInfoSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, emailSchema, emergencyContactSchema, gamificationSchema, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseInstance, initializeFirebase, locationDataSchema, medicationSchema, notificationSchema, passwordSchema, patientClinicSchema, patientDoctorSchema, patientLocationInfoSchema, patientMedicalInfoSchema, patientProfileInfoSchema, patientProfileSchema, patientSensitiveInfoSchema, postRequirementNotificationSchema, practitionerBasicInfoSchema, practitionerCertificationSchema, practitionerClinicProceduresSchema, practitionerClinicWorkingHoursSchema, practitionerProfileInfoSchema, practitionerReviewSchema, practitionerSchema, practitionerWorkingHoursSchema, preRequirementNotificationSchema, procedureCategorizationSchema, procedureInfoSchema, reviewInfoSchema, serviceInfoSchema, syncedCalendarEventSchema, timeSlotSchema, timestampSchema, updateAllergySchema, updateAppointmentSchema, updateBlockingConditionSchema, updateCalendarEventSchema, updateClinicAdminSchema, updateClinicGroupSchema, updateClinicSchema, updateContraindicationSchema, updateDocumentTemplateSchema, updateMedicationSchema, updatePatientMedicalInfoSchema, updateVitalStatsSchema, userRoleSchema, userRolesSchema, userSchema, vitalStatsSchema, workingHoursSchema };
15107
+ export { AUTH_ERRORS, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type AdminInfo, type AdminToken, AdminTokenStatus, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, type AppointmentNotification, type AppointmentReminderNotification, AuthError, AuthService, type BaseNotification, BlockingCondition, type Brand, CALENDAR_COLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_GROUPS_COLLECTION, type CalendarEvent, CalendarEventStatus, type CalendarEventTime, CalendarEventType, CalendarServiceV2, CalendarSyncStatus, type Category, CertificationLevel, CertificationSpecialty, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicAdminSignupData, type ClinicBranchSetupData, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicGroupSetupData, type ClinicInfo, type ClinicLocation, ClinicPhotoTag, type ClinicReview, ClinicService, ClinicTag, type ClinicTags, type ContactPerson, Contraindication, CosmeticAllergySubtype, type CreateAdminTokenData, type CreateAppointmentParams, type CreateCalendarEventData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreateDraftPractitionerData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePractitionerData, type CreatePractitionerTokenData, type CreateSyncedCalendarData, type CreateUserData, Currency, DOCUMENTATION_TEMPLATES_COLLECTION, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, DynamicVariable, type EmergencyContact, EnvironmentalAllergySubtype, FILLED_DOCUMENTS_COLLECTION, type FilledDocument, FilledDocumentService, FilledDocumentStatus, FirebaseErrorCode, type FirebaseUser, FoodAllergySubtype, type GamificationInfo, Gender, HeadingLevel, Language, ListType, type LocationData, MedicationAllergySubtype, type Notification, NotificationService, NotificationStatus, NotificationType, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_SENSITIVE_INFO_COLLECTION, PRACTITIONERS_COLLECTION, type PatientClinic, type PatientDoctor, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientProfileInfo, type PatientSensitiveInfo, PatientService, type PostRequirementNotification, PracticeType, type Practitioner, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerClinicWorkingHours, type PractitionerProfileInfo, type PractitionerReview, PractitionerService, PractitionerStatus, type PractitionerToken, PractitionerTokenStatus, type PractitionerWorkingHours, type PreRequirementNotification, PricingMeasure, type ProcedureCategorization, ProcedureFamily, type ProcedureInfo, type Product, REGISTER_TOKENS_COLLECTION, type Requirement, type ReviewInfo, SYNCED_CALENDARS_COLLECTION, type ServiceInfo, type Subcategory, SubscriptionModel, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, type Technology, type TimeSlot, TreatmentBenefit, USER_ERRORS, type UpdateAllergyData, type UpdateAppointmentParams, type UpdateBlockingConditionData, type UpdateCalendarEventData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type ValidationSchema, type VitalStats, type WorkingHours, addAllergySchema, addBlockingConditionSchema, addContraindicationSchema, addMedicationSchema, addressDataSchema, adminInfoSchema, adminTokenSchema, allergySchema, allergySubtypeSchema, appointmentNotificationSchema, appointmentReminderNotificationSchema, baseNotificationSchema, blockingConditionSchema, calendarEventSchema, calendarEventTimeSchema, clinicAdminOptionsSchema, clinicAdminSchema, clinicAdminSignupSchema, clinicBranchSetupSchema, clinicContactInfoSchema, clinicGroupSchema, clinicGroupSetupSchema, clinicInfoSchema, clinicLocationSchema, clinicReviewSchema, clinicSchema, clinicTagsSchema, contactPersonSchema, contraindicationSchema, createAdminTokenSchema, createAppointmentSchema, createCalendarEventSchema, createClinicAdminSchema, createClinicGroupSchema, createClinicSchema, createDefaultClinicGroupSchema, createDocumentTemplateSchema, createDraftPractitionerSchema, createPatientLocationInfoSchema, createPatientMedicalInfoSchema, createPatientProfileSchema, createPatientSensitiveInfoSchema, createPractitionerSchema, createPractitionerTokenSchema, createUserOptionsSchema, doctorInfoSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, emailSchema, emergencyContactSchema, gamificationSchema, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseInstance, initializeFirebase, locationDataSchema, medicationSchema, notificationSchema, passwordSchema, patientClinicSchema, patientDoctorSchema, patientLocationInfoSchema, patientMedicalInfoSchema, patientProfileInfoSchema, patientProfileSchema, patientSensitiveInfoSchema, postRequirementNotificationSchema, practitionerBasicInfoSchema, practitionerCertificationSchema, practitionerClinicProceduresSchema, practitionerClinicWorkingHoursSchema, practitionerProfileInfoSchema, practitionerReviewSchema, practitionerSchema, practitionerTokenSchema, practitionerWorkingHoursSchema, preRequirementNotificationSchema, procedureCategorizationSchema, procedureInfoSchema, reviewInfoSchema, serviceInfoSchema, syncedCalendarEventSchema, timeSlotSchema, timestampSchema, updateAllergySchema, updateAppointmentSchema, updateBlockingConditionSchema, updateCalendarEventSchema, updateClinicAdminSchema, updateClinicGroupSchema, updateClinicSchema, updateContraindicationSchema, updateDocumentTemplateSchema, updateMedicationSchema, updatePatientMedicalInfoSchema, updateVitalStatsSchema, userRoleSchema, userRolesSchema, userSchema, vitalStatsSchema, workingHoursSchema };