@blackcode_sa/metaestetics-api 1.8.18 → 1.11.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.
@@ -196,6 +196,8 @@ export interface Appointment {
196
196
  clinicBranchId: string;
197
197
  /** Aggregated clinic information (snapshot) */
198
198
  clinicInfo: ClinicInfo;
199
+ /** IANA timezone of the clinic */
200
+ clinic_tz: string;
199
201
 
200
202
  /** ID of the practitioner */
201
203
  practitionerId: string;
@@ -299,6 +301,7 @@ export interface CreateAppointmentData {
299
301
  patientNotes?: string | null;
300
302
  initialStatus: AppointmentStatus;
301
303
  initialPaymentStatus?: PaymentStatus; // Defaults to UNPAID if not provided
304
+ clinic_tz: string;
302
305
  }
303
306
 
304
307
  /**
@@ -336,6 +339,7 @@ export interface UpdateAppointmentData {
336
339
  cost?: number; // If cost is adjusted
337
340
  clinicBranchId?: string; // If appointment is moved to another branch (complex scenario)
338
341
  practitionerId?: string; // If practitioner is changed
342
+ clinic_tz?: string;
339
343
 
340
344
  /** NEW: For updating linked forms - typically managed by dedicated methods */
341
345
  linkedFormIds?: string[] | FieldValue;
@@ -44,6 +44,7 @@ export interface ClinicLocation {
44
44
  latitude: number;
45
45
  longitude: number;
46
46
  geohash?: string | null;
47
+ tz?: string | null;
47
48
  }
48
49
 
49
50
  /**
@@ -228,6 +229,7 @@ export interface CreateClinicGroupData {
228
229
  calendarSyncEnabled?: boolean;
229
230
  autoConfirmAppointments?: boolean;
230
231
  businessIdentificationNumber?: string | null;
232
+ tz?: string | null;
231
233
  onboarding?: {
232
234
  completed?: boolean;
233
235
  step?: number;
@@ -248,6 +248,7 @@ export const createAppointmentSchema = z
248
248
  initialPaymentStatus: paymentStatusSchema
249
249
  .optional()
250
250
  .default(PaymentStatus.UNPAID),
251
+ clinic_tz: z.string().min(1, "Timezone is required"),
251
252
  })
252
253
  .refine((data) => data.appointmentEndTime > data.appointmentStartTime, {
253
254
  message: "Appointment end time must be after start time",
@@ -325,6 +326,7 @@ export const updateAppointmentSchema = z
325
326
  cost: z.number().min(0).optional(),
326
327
  clinicBranchId: z.string().min(MIN_STRING_LENGTH).optional(),
327
328
  practitionerId: z.string().min(MIN_STRING_LENGTH).optional(),
329
+ clinic_tz: z.string().min(MIN_STRING_LENGTH).optional(),
328
330
  linkedForms: z
329
331
  .union([z.array(linkedFormInfoSchema).max(MAX_ARRAY_LENGTH), z.any()])
330
332
  .optional(),
@@ -42,6 +42,7 @@ export const clinicLocationSchema = z.object({
42
42
  latitude: z.number().min(-90).max(90),
43
43
  longitude: z.number().min(-180).max(180),
44
44
  geohash: z.string().nullable().optional(),
45
+ tz: z.string().nullable().optional(),
45
46
  });
46
47
 
47
48
  /**
@@ -261,6 +262,7 @@ export const createClinicGroupSchema = z.object({
261
262
  calendarSyncEnabled: z.boolean().optional(),
262
263
  autoConfirmAppointments: z.boolean().optional(),
263
264
  businessIdentificationNumber: z.string().optional().nullable(),
265
+ tz: z.string().nullable().optional(),
264
266
  onboarding: z
265
267
  .object({
266
268
  completed: z.boolean().optional().default(false),
@@ -1,18 +1,16 @@
1
- import { z } from "zod";
2
- import { ProcedureFamily } from "../backoffice/types/static/procedure-family.types";
3
- import {
4
- Currency,
5
- PricingMeasure,
6
- } from "../backoffice/types/static/pricing.types";
7
- import { clinicInfoSchema, doctorInfoSchema } from "./shared.schema";
8
- import { procedureReviewInfoSchema } from "./reviews.schema";
9
- import { mediaResourceSchema } from "./media.schema";
1
+ import { z } from 'zod';
2
+ import { ProcedureFamily } from '../backoffice/types/static/procedure-family.types';
3
+ import { Currency, PricingMeasure } from '../backoffice/types/static/pricing.types';
4
+ import { clinicInfoSchema, doctorInfoSchema } from './shared.schema';
5
+ import { procedureReviewInfoSchema } from './reviews.schema';
6
+ import { mediaResourceSchema } from './media.schema';
10
7
  /**
11
8
  * Schema for creating a new procedure
12
9
  */
13
10
  export const createProcedureSchema = z.object({
14
11
  name: z.string().min(1).max(200),
15
- nameLower: z.string().min(1).max(200),
12
+ // Optional: service will derive from name if not provided by client
13
+ nameLower: z.string().min(1).max(200).optional(),
16
14
  description: z.string().min(1).max(2000),
17
15
  family: z.nativeEnum(ProcedureFamily),
18
16
  categoryId: z.string().min(1),