@ipetsadmin/contracts 1.2.0 → 1.3.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.
package/dist/index.d.mts CHANGED
@@ -115,6 +115,12 @@ interface IAllergy {
115
115
  name: string;
116
116
  severity: number;
117
117
  }
118
+ interface IVaccine {
119
+ name: string;
120
+ laboratory: string;
121
+ lotNumber: string;
122
+ date: Date;
123
+ }
118
124
  interface IBasePet {
119
125
  id: string;
120
126
  name: string;
@@ -132,6 +138,7 @@ interface IBasePet {
132
138
  description: string;
133
139
  status: PetStatus;
134
140
  ownerId: string;
141
+ vaccines: IVaccine[];
135
142
  photos: string[];
136
143
  createdAt: Date;
137
144
  updatedAt: Date;
@@ -146,6 +153,64 @@ interface ICatPet extends IBasePet {
146
153
  }
147
154
  type IPet = IDogPet | ICatPet;
148
155
 
156
+ declare enum TreatmentStatus {
157
+ WAITING_START = "waiting_start",
158
+ PENDING = "pending",
159
+ IN_PROGRESS = "in_progress",
160
+ COMPLETED = "completed",
161
+ CANCELLED = "cancelled"
162
+ }
163
+
164
+ declare enum TreatmentType {
165
+ MEDICATION = "medication",
166
+ SURGERY = "surgery",
167
+ DIAGNOSIS = "diagnosis",
168
+ DESPARASITIZATION = "desparasitization",
169
+ VACCINATION = "vaccination",
170
+ EXAM = "exam",
171
+ DENTAL = "dental",
172
+ OTHER = "other"
173
+ }
174
+
175
+ interface ITreatment {
176
+ id: string;
177
+ petId: string;
178
+ ownerId: string;
179
+ medicationName: string;
180
+ dosage: string;
181
+ instructions?: string;
182
+ frequencyHours: number;
183
+ durationDays: number;
184
+ totalDoses: number;
185
+ status: TreatmentStatus;
186
+ treatmentType: TreatmentType;
187
+ startDate?: Date;
188
+ endDate?: Date;
189
+ createdAt: Date;
190
+ updatedAt: Date;
191
+ }
192
+
193
+ declare enum DoseStatus {
194
+ PENDING = "pending",
195
+ ADMINISTERED = "administered",
196
+ SKIPPED = "skipped",
197
+ SNOOZED = "snoozed"
198
+ }
199
+
200
+ interface IDose {
201
+ id: string;
202
+ treatmentId: string;
203
+ petId: string;
204
+ ownerId: string;
205
+ doseNumber: number;
206
+ scheduledDate: Date;
207
+ actualAdministeredDate?: Date;
208
+ status: DoseStatus;
209
+ notes?: string;
210
+ createdAt: Date;
211
+ updatedAt: Date;
212
+ }
213
+
149
214
  declare enum HealthStatus {
150
215
  HEALTHY = "healthy",
151
216
  UNHEALTHY = "unhealthy"
@@ -163,6 +228,38 @@ type TokenPair = {
163
228
  readonly tokenType: 'Bearer';
164
229
  };
165
230
 
231
+ type RepositoryOperationOptions = {
232
+ readonly transactionContext?: unknown;
233
+ };
234
+
235
+ type Auth0UserProfile = {
236
+ readonly sub: string;
237
+ readonly email?: string;
238
+ readonly email_verified?: boolean;
239
+ readonly name?: string;
240
+ readonly given_name?: string;
241
+ readonly family_name?: string;
242
+ readonly picture?: string;
243
+ readonly nickname?: string;
244
+ readonly locale?: string;
245
+ };
246
+
247
+ type EmailAddress = {
248
+ email: string;
249
+ name?: string;
250
+ };
251
+
252
+ type OAuthGoogleStartQuery = {
253
+ readonly redirectUri: string;
254
+ };
255
+
256
+ type Auth0AuthorizationParams = {
257
+ readonly state: string;
258
+ readonly nonce: string;
259
+ readonly redirectUri: string;
260
+ readonly connection?: string;
261
+ };
262
+
166
263
  type RegisterRequest = {
167
264
  readonly email: string;
168
265
  readonly password: string;
@@ -181,27 +278,16 @@ type LogoutRequest = {
181
278
  readonly refreshToken: string;
182
279
  };
183
280
 
184
- type AuthUserResponse = Pick<IUser, 'id' | 'email' | 'emailVerified' | 'authMethod' | 'oauth'>;
185
-
186
- type AuthSessionResponse = TokenPair & {
187
- readonly user: AuthUserResponse;
188
- };
189
-
190
- type OAuthGoogleStartQuery = {
191
- readonly redirectUri: string;
192
- };
193
-
194
- type OAuthGoogleStartResponse = {
195
- readonly authorizationUrl: string;
196
- readonly state: string;
197
- };
198
-
199
281
  type OAuthGoogleCallbackRequest = {
200
282
  readonly code: string;
201
283
  readonly state: string;
202
284
  readonly redirectUri: string;
203
285
  };
204
286
 
287
+ type VerifyEmailRequest = {
288
+ readonly token: string;
289
+ };
290
+
205
291
  type CreateUserInput = {
206
292
  readonly email: string;
207
293
  readonly emailVerified: boolean;
@@ -237,36 +323,24 @@ type CreatePetInput = {
237
323
  updatedAt: Date;
238
324
  };
239
325
 
240
- type Auth0UserProfile = {
241
- readonly sub: string;
326
+ type PatchUserProfileInput = {
327
+ readonly firstName?: string;
328
+ readonly lastName?: string;
329
+ readonly fullName?: string;
330
+ readonly location?: {
331
+ readonly country?: string;
332
+ readonly city?: string;
333
+ readonly address?: string;
334
+ readonly postalCode?: string;
335
+ };
336
+ readonly phone?: string;
242
337
  readonly email?: string;
243
- readonly email_verified?: boolean;
244
- readonly name?: string;
245
- readonly given_name?: string;
246
- readonly family_name?: string;
247
- readonly picture?: string;
248
- readonly nickname?: string;
249
- readonly locale?: string;
250
- };
251
-
252
- type Auth0AuthorizationParams = {
253
- readonly state: string;
254
- readonly nonce: string;
255
- readonly redirectUri: string;
256
- readonly connection?: string;
257
- };
258
-
259
- type OAuthAccessTokenResult = {
260
- readonly accessToken: string;
261
- };
262
-
263
- type RepositoryOperationOptions = {
264
- readonly transactionContext?: unknown;
265
- };
266
-
267
- type EmailAddress = {
268
- email: string;
269
- name?: string;
338
+ readonly website?: string;
339
+ readonly social?: {
340
+ readonly twitter?: string;
341
+ readonly facebook?: string;
342
+ readonly instagram?: string;
343
+ };
270
344
  };
271
345
 
272
346
  type SendEmailInput = {
@@ -277,36 +351,59 @@ type SendEmailInput = {
277
351
  text?: string;
278
352
  };
279
353
 
354
+ type CreateTreatmentInput = {
355
+ petId: string;
356
+ ownerId: string;
357
+ medicationName: string;
358
+ dosage: string;
359
+ instructions?: string;
360
+ frequencyHours: number;
361
+ durationDays: number;
362
+ totalDoses: number;
363
+ status: TreatmentStatus;
364
+ treatmentType: TreatmentType;
365
+ startDate?: Date;
366
+ endDate?: Date;
367
+ };
368
+
369
+ type CreateDoseInput = {
370
+ treatmentId: string;
371
+ petId: string;
372
+ ownerId: string;
373
+ doseNumber: number;
374
+ scheduledDate: Date;
375
+ actualAdministeredDate?: Date;
376
+ status: DoseStatus;
377
+ notes?: string;
378
+ };
379
+
380
+ type OAuthAccessTokenResult = {
381
+ readonly accessToken: string;
382
+ };
383
+
280
384
  type SendEmailResult = {
281
385
  provider: string;
282
386
  messageId: string;
283
387
  accepted: boolean;
284
388
  };
285
389
 
286
- type VerifyEmailRequest = {
287
- readonly token: string;
390
+ type UserProfileResponse = Pick<IUser, 'id' | 'email' | 'emailVerified' | 'role' | 'isActive' | 'profile'>;
391
+
392
+ type PetResponse = IPet;
393
+
394
+ type TreatmentResponse = ITreatment;
395
+
396
+ type DoseResponse = IDose;
397
+
398
+ type OAuthGoogleStartResponse = {
399
+ readonly authorizationUrl: string;
400
+ readonly state: string;
288
401
  };
289
402
 
290
- type UserProfileResponse = Pick<IUser, 'id' | 'email' | 'emailVerified' | 'role' | 'isActive' | 'profile'>;
403
+ type AuthUserResponse = Pick<IUser, 'id' | 'email' | 'emailVerified' | 'authMethod' | 'oauth'>;
291
404
 
292
- type PatchUserProfileInput = {
293
- readonly firstName?: string;
294
- readonly lastName?: string;
295
- readonly fullName?: string;
296
- readonly location?: {
297
- readonly country?: string;
298
- readonly city?: string;
299
- readonly address?: string;
300
- readonly postalCode?: string;
301
- };
302
- readonly phone?: string;
303
- readonly email?: string;
304
- readonly website?: string;
305
- readonly social?: {
306
- readonly twitter?: string;
307
- readonly facebook?: string;
308
- readonly instagram?: string;
309
- };
405
+ type AuthSessionResponse = TokenPair & {
406
+ readonly user: AuthUserResponse;
310
407
  };
311
408
 
312
409
  interface IConfig {
@@ -382,6 +479,10 @@ interface IPetRepository {
382
479
  create(input: CreatePetInput, options?: RepositoryOperationOptions): Promise<IPet>;
383
480
  findById(id: string, options?: RepositoryOperationOptions): Promise<IPet | null>;
384
481
  findByOwnerId(ownerId: string, options?: RepositoryOperationOptions): Promise<IPet[]>;
482
+ update(params: {
483
+ id: string;
484
+ input: Partial<CreatePetInput>;
485
+ }, options?: RepositoryOperationOptions): Promise<IPet | null>;
385
486
  }
386
487
 
387
488
  type RefreshTokenRecord = {
@@ -420,6 +521,25 @@ interface IEmailVerificationTokenRepository {
420
521
  consumeByHash(tokenHash: string, options?: RepositoryOperationOptions): Promise<EmailVerificationTokenRecord | null>;
421
522
  }
422
523
 
524
+ interface ITreatmentRepository {
525
+ create(input: CreateTreatmentInput, options?: RepositoryOperationOptions): Promise<ITreatment>;
526
+ update(params: {
527
+ id: string;
528
+ patch: Partial<CreateTreatmentInput>;
529
+ }, options?: RepositoryOperationOptions): Promise<void>;
530
+ findById(id: string, options?: RepositoryOperationOptions): Promise<ITreatment | null>;
531
+ findByPetId(petId: string, options?: RepositoryOperationOptions): Promise<ITreatment[]>;
532
+ delete(id: string, options?: RepositoryOperationOptions): Promise<void>;
533
+ }
534
+
535
+ interface IDoseRepository {
536
+ create(input: CreateDoseInput, options?: RepositoryOperationOptions): Promise<IDose>;
537
+ findById(id: string, options?: RepositoryOperationOptions): Promise<IDose | null>;
538
+ findByTreatmentId(treatmentId: string, options?: RepositoryOperationOptions): Promise<IDose[]>;
539
+ delete(id: string, options?: RepositoryOperationOptions): Promise<void>;
540
+ deleteByTreatmentId(treatmentId: string, options?: RepositoryOperationOptions): Promise<void>;
541
+ }
542
+
423
543
  interface IAuthService {
424
544
  register(email: string, password: string, options?: RepositoryOperationOptions): Promise<AuthSessionResponse>;
425
545
  loginWithUser(user: IUser, options?: RepositoryOperationOptions): Promise<AuthSessionResponse>;
@@ -471,11 +591,40 @@ interface IUserService {
471
591
  patchProfileForUserId(userId: string, input: PatchUserProfileInput, options?: RepositoryOperationOptions): Promise<UserProfileResponse>;
472
592
  }
473
593
 
474
- type PetResponse = IPet;
475
-
476
594
  interface IPetService {
595
+ getPetById(id: string, options?: RepositoryOperationOptions): Promise<PetResponse>;
477
596
  getPetsByUserId(userId: string, options?: RepositoryOperationOptions): Promise<PetResponse[]>;
478
597
  createPet(input: CreatePetInput, options?: RepositoryOperationOptions): Promise<PetResponse>;
598
+ updatePet(params: {
599
+ id: string;
600
+ ownerId: string;
601
+ input: Partial<CreatePetInput>;
602
+ }, options?: RepositoryOperationOptions): Promise<PetResponse>;
603
+ }
604
+
605
+ interface ITreatmentService {
606
+ createTreatment(input: CreateTreatmentInput, options?: RepositoryOperationOptions): Promise<ITreatment>;
607
+ updateTreatment(params: {
608
+ id: string;
609
+ petId: string;
610
+ ownerId: string;
611
+ input: Partial<CreateTreatmentInput>;
612
+ }, options?: RepositoryOperationOptions): Promise<ITreatment>;
613
+ updateTreatmentStatus(params: {
614
+ id: string;
615
+ petId: string;
616
+ ownerId: string;
617
+ status: TreatmentStatus;
618
+ }, options?: RepositoryOperationOptions): Promise<ITreatment>;
619
+ getTreatmentById(params: {
620
+ id: string;
621
+ petId: string;
622
+ ownerId: string;
623
+ }, options?: RepositoryOperationOptions): Promise<ITreatment & {
624
+ doses: IDose[];
625
+ }>;
626
+ getTreatmentsByPetId(petId: string, options?: RepositoryOperationOptions): Promise<ITreatment[]>;
627
+ deleteTreatment(id: string, options?: RepositoryOperationOptions): Promise<void>;
479
628
  }
480
629
 
481
630
  declare enum Errors {
@@ -528,4 +677,4 @@ declare class UnauthorizedError extends BaseError {
528
677
  constructor(message: string, details?: Record<string, unknown>);
529
678
  }
530
679
 
531
- export { type Auth0AuthorizationParams, type Auth0UserProfile, AuthMethod, type AuthSessionResponse, type AuthUserResponse, BaseError, BusinessError, CatBreed, type CreatePetInput, type CreateUserInput, DogBreed, type EmailAddress, EmailProvider, type EmailVerificationTokenRecord, Errors, ForbiddenError, Gender, type HealthCheck, HealthStatus, type IApiResponse, type IAuth0GoogleOAuthService, type IAuthService, type IConfig, type IEmailConfig, type IEmailProviderAdapter, type IEmailService, type IEmailVerificationConfig, type IEmailVerificationTokenRepository, type IJwtTokensService, type IOAuthStateRepository, type IPaginatedResponse, type IPet, type IPetRepository, type IPetService, type IRefreshTokenRepository, type IServerInit, type IUser, type IUserRepository, type IUserService, type LoginRequest, type LogoutRequest, NotFoundError, type OAuthAccessTokenResult, type OAuthGoogleCallbackRequest, type OAuthGoogleStartQuery, type OAuthGoogleStartResponse, OAuthProvider, type OAuthStateRecord, type PatchUserProfileInput, PetStatus, type RefreshRequest, type RefreshTokenRecord, type RegisterRequest, type RepositoryOperationOptions, type SendEmailInput, type SendEmailResult, ServerError, Species, type TokenPair, UnauthorizedError, type UserProfileResponse, UserRole, type VerifyEmailRequest, WeightUnit };
680
+ export { type Auth0AuthorizationParams, type Auth0UserProfile, AuthMethod, type AuthSessionResponse, type AuthUserResponse, BaseError, BusinessError, CatBreed, type CreateDoseInput, type CreatePetInput, type CreateTreatmentInput, type CreateUserInput, DogBreed, type DoseResponse, DoseStatus, type EmailAddress, EmailProvider, type EmailVerificationTokenRecord, Errors, ForbiddenError, Gender, type HealthCheck, HealthStatus, type IApiResponse, type IAuth0GoogleOAuthService, type IAuthService, type IConfig, type IDose, type IDoseRepository, type IEmailConfig, type IEmailProviderAdapter, type IEmailService, type IEmailVerificationConfig, type IEmailVerificationTokenRepository, type IJwtTokensService, type IOAuthStateRepository, type IPaginatedResponse, type IPet, type IPetRepository, type IPetService, type IRefreshTokenRepository, type IServerInit, type ITreatment, type ITreatmentRepository, type ITreatmentService, type IUser, type IUserRepository, type IUserService, type LoginRequest, type LogoutRequest, NotFoundError, type OAuthAccessTokenResult, type OAuthGoogleCallbackRequest, type OAuthGoogleStartQuery, type OAuthGoogleStartResponse, OAuthProvider, type OAuthStateRecord, type PatchUserProfileInput, type PetResponse, PetStatus, type RefreshRequest, type RefreshTokenRecord, type RegisterRequest, type RepositoryOperationOptions, type SendEmailInput, type SendEmailResult, ServerError, Species, type TokenPair, type TreatmentResponse, TreatmentStatus, TreatmentType, UnauthorizedError, type UserProfileResponse, UserRole, type VerifyEmailRequest, WeightUnit };
package/dist/index.d.ts CHANGED
@@ -115,6 +115,12 @@ interface IAllergy {
115
115
  name: string;
116
116
  severity: number;
117
117
  }
118
+ interface IVaccine {
119
+ name: string;
120
+ laboratory: string;
121
+ lotNumber: string;
122
+ date: Date;
123
+ }
118
124
  interface IBasePet {
119
125
  id: string;
120
126
  name: string;
@@ -132,6 +138,7 @@ interface IBasePet {
132
138
  description: string;
133
139
  status: PetStatus;
134
140
  ownerId: string;
141
+ vaccines: IVaccine[];
135
142
  photos: string[];
136
143
  createdAt: Date;
137
144
  updatedAt: Date;
@@ -146,6 +153,64 @@ interface ICatPet extends IBasePet {
146
153
  }
147
154
  type IPet = IDogPet | ICatPet;
148
155
 
156
+ declare enum TreatmentStatus {
157
+ WAITING_START = "waiting_start",
158
+ PENDING = "pending",
159
+ IN_PROGRESS = "in_progress",
160
+ COMPLETED = "completed",
161
+ CANCELLED = "cancelled"
162
+ }
163
+
164
+ declare enum TreatmentType {
165
+ MEDICATION = "medication",
166
+ SURGERY = "surgery",
167
+ DIAGNOSIS = "diagnosis",
168
+ DESPARASITIZATION = "desparasitization",
169
+ VACCINATION = "vaccination",
170
+ EXAM = "exam",
171
+ DENTAL = "dental",
172
+ OTHER = "other"
173
+ }
174
+
175
+ interface ITreatment {
176
+ id: string;
177
+ petId: string;
178
+ ownerId: string;
179
+ medicationName: string;
180
+ dosage: string;
181
+ instructions?: string;
182
+ frequencyHours: number;
183
+ durationDays: number;
184
+ totalDoses: number;
185
+ status: TreatmentStatus;
186
+ treatmentType: TreatmentType;
187
+ startDate?: Date;
188
+ endDate?: Date;
189
+ createdAt: Date;
190
+ updatedAt: Date;
191
+ }
192
+
193
+ declare enum DoseStatus {
194
+ PENDING = "pending",
195
+ ADMINISTERED = "administered",
196
+ SKIPPED = "skipped",
197
+ SNOOZED = "snoozed"
198
+ }
199
+
200
+ interface IDose {
201
+ id: string;
202
+ treatmentId: string;
203
+ petId: string;
204
+ ownerId: string;
205
+ doseNumber: number;
206
+ scheduledDate: Date;
207
+ actualAdministeredDate?: Date;
208
+ status: DoseStatus;
209
+ notes?: string;
210
+ createdAt: Date;
211
+ updatedAt: Date;
212
+ }
213
+
149
214
  declare enum HealthStatus {
150
215
  HEALTHY = "healthy",
151
216
  UNHEALTHY = "unhealthy"
@@ -163,6 +228,38 @@ type TokenPair = {
163
228
  readonly tokenType: 'Bearer';
164
229
  };
165
230
 
231
+ type RepositoryOperationOptions = {
232
+ readonly transactionContext?: unknown;
233
+ };
234
+
235
+ type Auth0UserProfile = {
236
+ readonly sub: string;
237
+ readonly email?: string;
238
+ readonly email_verified?: boolean;
239
+ readonly name?: string;
240
+ readonly given_name?: string;
241
+ readonly family_name?: string;
242
+ readonly picture?: string;
243
+ readonly nickname?: string;
244
+ readonly locale?: string;
245
+ };
246
+
247
+ type EmailAddress = {
248
+ email: string;
249
+ name?: string;
250
+ };
251
+
252
+ type OAuthGoogleStartQuery = {
253
+ readonly redirectUri: string;
254
+ };
255
+
256
+ type Auth0AuthorizationParams = {
257
+ readonly state: string;
258
+ readonly nonce: string;
259
+ readonly redirectUri: string;
260
+ readonly connection?: string;
261
+ };
262
+
166
263
  type RegisterRequest = {
167
264
  readonly email: string;
168
265
  readonly password: string;
@@ -181,27 +278,16 @@ type LogoutRequest = {
181
278
  readonly refreshToken: string;
182
279
  };
183
280
 
184
- type AuthUserResponse = Pick<IUser, 'id' | 'email' | 'emailVerified' | 'authMethod' | 'oauth'>;
185
-
186
- type AuthSessionResponse = TokenPair & {
187
- readonly user: AuthUserResponse;
188
- };
189
-
190
- type OAuthGoogleStartQuery = {
191
- readonly redirectUri: string;
192
- };
193
-
194
- type OAuthGoogleStartResponse = {
195
- readonly authorizationUrl: string;
196
- readonly state: string;
197
- };
198
-
199
281
  type OAuthGoogleCallbackRequest = {
200
282
  readonly code: string;
201
283
  readonly state: string;
202
284
  readonly redirectUri: string;
203
285
  };
204
286
 
287
+ type VerifyEmailRequest = {
288
+ readonly token: string;
289
+ };
290
+
205
291
  type CreateUserInput = {
206
292
  readonly email: string;
207
293
  readonly emailVerified: boolean;
@@ -237,36 +323,24 @@ type CreatePetInput = {
237
323
  updatedAt: Date;
238
324
  };
239
325
 
240
- type Auth0UserProfile = {
241
- readonly sub: string;
326
+ type PatchUserProfileInput = {
327
+ readonly firstName?: string;
328
+ readonly lastName?: string;
329
+ readonly fullName?: string;
330
+ readonly location?: {
331
+ readonly country?: string;
332
+ readonly city?: string;
333
+ readonly address?: string;
334
+ readonly postalCode?: string;
335
+ };
336
+ readonly phone?: string;
242
337
  readonly email?: string;
243
- readonly email_verified?: boolean;
244
- readonly name?: string;
245
- readonly given_name?: string;
246
- readonly family_name?: string;
247
- readonly picture?: string;
248
- readonly nickname?: string;
249
- readonly locale?: string;
250
- };
251
-
252
- type Auth0AuthorizationParams = {
253
- readonly state: string;
254
- readonly nonce: string;
255
- readonly redirectUri: string;
256
- readonly connection?: string;
257
- };
258
-
259
- type OAuthAccessTokenResult = {
260
- readonly accessToken: string;
261
- };
262
-
263
- type RepositoryOperationOptions = {
264
- readonly transactionContext?: unknown;
265
- };
266
-
267
- type EmailAddress = {
268
- email: string;
269
- name?: string;
338
+ readonly website?: string;
339
+ readonly social?: {
340
+ readonly twitter?: string;
341
+ readonly facebook?: string;
342
+ readonly instagram?: string;
343
+ };
270
344
  };
271
345
 
272
346
  type SendEmailInput = {
@@ -277,36 +351,59 @@ type SendEmailInput = {
277
351
  text?: string;
278
352
  };
279
353
 
354
+ type CreateTreatmentInput = {
355
+ petId: string;
356
+ ownerId: string;
357
+ medicationName: string;
358
+ dosage: string;
359
+ instructions?: string;
360
+ frequencyHours: number;
361
+ durationDays: number;
362
+ totalDoses: number;
363
+ status: TreatmentStatus;
364
+ treatmentType: TreatmentType;
365
+ startDate?: Date;
366
+ endDate?: Date;
367
+ };
368
+
369
+ type CreateDoseInput = {
370
+ treatmentId: string;
371
+ petId: string;
372
+ ownerId: string;
373
+ doseNumber: number;
374
+ scheduledDate: Date;
375
+ actualAdministeredDate?: Date;
376
+ status: DoseStatus;
377
+ notes?: string;
378
+ };
379
+
380
+ type OAuthAccessTokenResult = {
381
+ readonly accessToken: string;
382
+ };
383
+
280
384
  type SendEmailResult = {
281
385
  provider: string;
282
386
  messageId: string;
283
387
  accepted: boolean;
284
388
  };
285
389
 
286
- type VerifyEmailRequest = {
287
- readonly token: string;
390
+ type UserProfileResponse = Pick<IUser, 'id' | 'email' | 'emailVerified' | 'role' | 'isActive' | 'profile'>;
391
+
392
+ type PetResponse = IPet;
393
+
394
+ type TreatmentResponse = ITreatment;
395
+
396
+ type DoseResponse = IDose;
397
+
398
+ type OAuthGoogleStartResponse = {
399
+ readonly authorizationUrl: string;
400
+ readonly state: string;
288
401
  };
289
402
 
290
- type UserProfileResponse = Pick<IUser, 'id' | 'email' | 'emailVerified' | 'role' | 'isActive' | 'profile'>;
403
+ type AuthUserResponse = Pick<IUser, 'id' | 'email' | 'emailVerified' | 'authMethod' | 'oauth'>;
291
404
 
292
- type PatchUserProfileInput = {
293
- readonly firstName?: string;
294
- readonly lastName?: string;
295
- readonly fullName?: string;
296
- readonly location?: {
297
- readonly country?: string;
298
- readonly city?: string;
299
- readonly address?: string;
300
- readonly postalCode?: string;
301
- };
302
- readonly phone?: string;
303
- readonly email?: string;
304
- readonly website?: string;
305
- readonly social?: {
306
- readonly twitter?: string;
307
- readonly facebook?: string;
308
- readonly instagram?: string;
309
- };
405
+ type AuthSessionResponse = TokenPair & {
406
+ readonly user: AuthUserResponse;
310
407
  };
311
408
 
312
409
  interface IConfig {
@@ -382,6 +479,10 @@ interface IPetRepository {
382
479
  create(input: CreatePetInput, options?: RepositoryOperationOptions): Promise<IPet>;
383
480
  findById(id: string, options?: RepositoryOperationOptions): Promise<IPet | null>;
384
481
  findByOwnerId(ownerId: string, options?: RepositoryOperationOptions): Promise<IPet[]>;
482
+ update(params: {
483
+ id: string;
484
+ input: Partial<CreatePetInput>;
485
+ }, options?: RepositoryOperationOptions): Promise<IPet | null>;
385
486
  }
386
487
 
387
488
  type RefreshTokenRecord = {
@@ -420,6 +521,25 @@ interface IEmailVerificationTokenRepository {
420
521
  consumeByHash(tokenHash: string, options?: RepositoryOperationOptions): Promise<EmailVerificationTokenRecord | null>;
421
522
  }
422
523
 
524
+ interface ITreatmentRepository {
525
+ create(input: CreateTreatmentInput, options?: RepositoryOperationOptions): Promise<ITreatment>;
526
+ update(params: {
527
+ id: string;
528
+ patch: Partial<CreateTreatmentInput>;
529
+ }, options?: RepositoryOperationOptions): Promise<void>;
530
+ findById(id: string, options?: RepositoryOperationOptions): Promise<ITreatment | null>;
531
+ findByPetId(petId: string, options?: RepositoryOperationOptions): Promise<ITreatment[]>;
532
+ delete(id: string, options?: RepositoryOperationOptions): Promise<void>;
533
+ }
534
+
535
+ interface IDoseRepository {
536
+ create(input: CreateDoseInput, options?: RepositoryOperationOptions): Promise<IDose>;
537
+ findById(id: string, options?: RepositoryOperationOptions): Promise<IDose | null>;
538
+ findByTreatmentId(treatmentId: string, options?: RepositoryOperationOptions): Promise<IDose[]>;
539
+ delete(id: string, options?: RepositoryOperationOptions): Promise<void>;
540
+ deleteByTreatmentId(treatmentId: string, options?: RepositoryOperationOptions): Promise<void>;
541
+ }
542
+
423
543
  interface IAuthService {
424
544
  register(email: string, password: string, options?: RepositoryOperationOptions): Promise<AuthSessionResponse>;
425
545
  loginWithUser(user: IUser, options?: RepositoryOperationOptions): Promise<AuthSessionResponse>;
@@ -471,11 +591,40 @@ interface IUserService {
471
591
  patchProfileForUserId(userId: string, input: PatchUserProfileInput, options?: RepositoryOperationOptions): Promise<UserProfileResponse>;
472
592
  }
473
593
 
474
- type PetResponse = IPet;
475
-
476
594
  interface IPetService {
595
+ getPetById(id: string, options?: RepositoryOperationOptions): Promise<PetResponse>;
477
596
  getPetsByUserId(userId: string, options?: RepositoryOperationOptions): Promise<PetResponse[]>;
478
597
  createPet(input: CreatePetInput, options?: RepositoryOperationOptions): Promise<PetResponse>;
598
+ updatePet(params: {
599
+ id: string;
600
+ ownerId: string;
601
+ input: Partial<CreatePetInput>;
602
+ }, options?: RepositoryOperationOptions): Promise<PetResponse>;
603
+ }
604
+
605
+ interface ITreatmentService {
606
+ createTreatment(input: CreateTreatmentInput, options?: RepositoryOperationOptions): Promise<ITreatment>;
607
+ updateTreatment(params: {
608
+ id: string;
609
+ petId: string;
610
+ ownerId: string;
611
+ input: Partial<CreateTreatmentInput>;
612
+ }, options?: RepositoryOperationOptions): Promise<ITreatment>;
613
+ updateTreatmentStatus(params: {
614
+ id: string;
615
+ petId: string;
616
+ ownerId: string;
617
+ status: TreatmentStatus;
618
+ }, options?: RepositoryOperationOptions): Promise<ITreatment>;
619
+ getTreatmentById(params: {
620
+ id: string;
621
+ petId: string;
622
+ ownerId: string;
623
+ }, options?: RepositoryOperationOptions): Promise<ITreatment & {
624
+ doses: IDose[];
625
+ }>;
626
+ getTreatmentsByPetId(petId: string, options?: RepositoryOperationOptions): Promise<ITreatment[]>;
627
+ deleteTreatment(id: string, options?: RepositoryOperationOptions): Promise<void>;
479
628
  }
480
629
 
481
630
  declare enum Errors {
@@ -528,4 +677,4 @@ declare class UnauthorizedError extends BaseError {
528
677
  constructor(message: string, details?: Record<string, unknown>);
529
678
  }
530
679
 
531
- export { type Auth0AuthorizationParams, type Auth0UserProfile, AuthMethod, type AuthSessionResponse, type AuthUserResponse, BaseError, BusinessError, CatBreed, type CreatePetInput, type CreateUserInput, DogBreed, type EmailAddress, EmailProvider, type EmailVerificationTokenRecord, Errors, ForbiddenError, Gender, type HealthCheck, HealthStatus, type IApiResponse, type IAuth0GoogleOAuthService, type IAuthService, type IConfig, type IEmailConfig, type IEmailProviderAdapter, type IEmailService, type IEmailVerificationConfig, type IEmailVerificationTokenRepository, type IJwtTokensService, type IOAuthStateRepository, type IPaginatedResponse, type IPet, type IPetRepository, type IPetService, type IRefreshTokenRepository, type IServerInit, type IUser, type IUserRepository, type IUserService, type LoginRequest, type LogoutRequest, NotFoundError, type OAuthAccessTokenResult, type OAuthGoogleCallbackRequest, type OAuthGoogleStartQuery, type OAuthGoogleStartResponse, OAuthProvider, type OAuthStateRecord, type PatchUserProfileInput, PetStatus, type RefreshRequest, type RefreshTokenRecord, type RegisterRequest, type RepositoryOperationOptions, type SendEmailInput, type SendEmailResult, ServerError, Species, type TokenPair, UnauthorizedError, type UserProfileResponse, UserRole, type VerifyEmailRequest, WeightUnit };
680
+ export { type Auth0AuthorizationParams, type Auth0UserProfile, AuthMethod, type AuthSessionResponse, type AuthUserResponse, BaseError, BusinessError, CatBreed, type CreateDoseInput, type CreatePetInput, type CreateTreatmentInput, type CreateUserInput, DogBreed, type DoseResponse, DoseStatus, type EmailAddress, EmailProvider, type EmailVerificationTokenRecord, Errors, ForbiddenError, Gender, type HealthCheck, HealthStatus, type IApiResponse, type IAuth0GoogleOAuthService, type IAuthService, type IConfig, type IDose, type IDoseRepository, type IEmailConfig, type IEmailProviderAdapter, type IEmailService, type IEmailVerificationConfig, type IEmailVerificationTokenRepository, type IJwtTokensService, type IOAuthStateRepository, type IPaginatedResponse, type IPet, type IPetRepository, type IPetService, type IRefreshTokenRepository, type IServerInit, type ITreatment, type ITreatmentRepository, type ITreatmentService, type IUser, type IUserRepository, type IUserService, type LoginRequest, type LogoutRequest, NotFoundError, type OAuthAccessTokenResult, type OAuthGoogleCallbackRequest, type OAuthGoogleStartQuery, type OAuthGoogleStartResponse, OAuthProvider, type OAuthStateRecord, type PatchUserProfileInput, type PetResponse, PetStatus, type RefreshRequest, type RefreshTokenRecord, type RegisterRequest, type RepositoryOperationOptions, type SendEmailInput, type SendEmailResult, ServerError, Species, type TokenPair, type TreatmentResponse, TreatmentStatus, TreatmentType, UnauthorizedError, type UserProfileResponse, UserRole, type VerifyEmailRequest, WeightUnit };
package/dist/index.js CHANGED
@@ -124,6 +124,38 @@ var WeightUnit = /* @__PURE__ */ ((WeightUnit2) => {
124
124
  return WeightUnit2;
125
125
  })(WeightUnit || {});
126
126
 
127
+ // src/enums/treatment-status.ts
128
+ var TreatmentStatus = /* @__PURE__ */ ((TreatmentStatus2) => {
129
+ TreatmentStatus2["WAITING_START"] = "waiting_start";
130
+ TreatmentStatus2["PENDING"] = "pending";
131
+ TreatmentStatus2["IN_PROGRESS"] = "in_progress";
132
+ TreatmentStatus2["COMPLETED"] = "completed";
133
+ TreatmentStatus2["CANCELLED"] = "cancelled";
134
+ return TreatmentStatus2;
135
+ })(TreatmentStatus || {});
136
+
137
+ // src/enums/dose-status.ts
138
+ var DoseStatus = /* @__PURE__ */ ((DoseStatus2) => {
139
+ DoseStatus2["PENDING"] = "pending";
140
+ DoseStatus2["ADMINISTERED"] = "administered";
141
+ DoseStatus2["SKIPPED"] = "skipped";
142
+ DoseStatus2["SNOOZED"] = "snoozed";
143
+ return DoseStatus2;
144
+ })(DoseStatus || {});
145
+
146
+ // src/enums/treatment-type.ts
147
+ var TreatmentType = /* @__PURE__ */ ((TreatmentType2) => {
148
+ TreatmentType2["MEDICATION"] = "medication";
149
+ TreatmentType2["SURGERY"] = "surgery";
150
+ TreatmentType2["DIAGNOSIS"] = "diagnosis";
151
+ TreatmentType2["DESPARASITIZATION"] = "desparasitization";
152
+ TreatmentType2["VACCINATION"] = "vaccination";
153
+ TreatmentType2["EXAM"] = "exam";
154
+ TreatmentType2["DENTAL"] = "dental";
155
+ TreatmentType2["OTHER"] = "other";
156
+ return TreatmentType2;
157
+ })(TreatmentType || {});
158
+
127
159
  // src/errors/BaseError.ts
128
160
  var BaseError = class extends Error {
129
161
  toErrorRecord() {
@@ -190,6 +222,7 @@ exports.BaseError = BaseError;
190
222
  exports.BusinessError = BusinessError;
191
223
  exports.CatBreed = CatBreed;
192
224
  exports.DogBreed = DogBreed;
225
+ exports.DoseStatus = DoseStatus;
193
226
  exports.EmailProvider = EmailProvider;
194
227
  exports.Errors = Errors;
195
228
  exports.ForbiddenError = ForbiddenError;
@@ -200,6 +233,8 @@ exports.OAuthProvider = OAuthProvider;
200
233
  exports.PetStatus = PetStatus;
201
234
  exports.ServerError = ServerError;
202
235
  exports.Species = Species;
236
+ exports.TreatmentStatus = TreatmentStatus;
237
+ exports.TreatmentType = TreatmentType;
203
238
  exports.UnauthorizedError = UnauthorizedError;
204
239
  exports.UserRole = UserRole;
205
240
  exports.WeightUnit = WeightUnit;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/enums/errors.ts","../src/enums/health-status.ts","../src/enums/roles.ts","../src/enums/auth-method.ts","../src/enums/oauth-provider.ts","../src/enums/email-providers.ts","../src/enums/species.ts","../src/enums/dog-breed.ts","../src/enums/cat-breed.ts","../src/enums/gender.ts","../src/enums/pet-status.ts","../src/enums/weight-unit.ts","../src/errors/BaseError.ts","../src/errors/BusinessError.ts","../src/errors/ForbiddenError.ts","../src/errors/NotFoundError.ts","../src/errors/ServerError.ts","../src/errors/UnauthorizedError.ts"],"names":["Errors","HealthStatus","UserRole","AuthMethod","OAuthProvider","EmailProvider","Species","DogBreed","CatBreed","Gender","PetStatus","WeightUnit"],"mappings":";;;AAAO,IAAK,MAAA,qBAAAA,OAAAA,KAAL;AACL,EAAAA,QAAA,iBAAA,CAAA,GAAkB,eAAA;AAClB,EAAAA,QAAA,gBAAA,CAAA,GAAiB,eAAA;AACjB,EAAAA,QAAA,iBAAA,CAAA,GAAkB,gBAAA;AAClB,EAAAA,QAAA,cAAA,CAAA,GAAe,aAAA;AACf,EAAAA,QAAA,oBAAA,CAAA,GAAqB,mBAAA;AACrB,EAAAA,QAAA,mBAAA,CAAA,GAAoB,iBAAA;AACpB,EAAAA,QAAA,4BAAA,CAAA,GAA6B,0BAAA;AAC7B,EAAAA,QAAA,yBAAA,CAAA,GAA0B,sBAAA;AAC1B,EAAAA,QAAA,uBAAA,CAAA,GAAwB,qBAAA;AACxB,EAAAA,QAAA,2BAAA,CAAA,GAA4B,yBAAA;AAC5B,EAAAA,QAAA,uBAAA,CAAA,GAAwB,qBAAA;AACxB,EAAAA,QAAA,mBAAA,CAAA,GAAoB,iBAAA;AACpB,EAAAA,QAAA,2BAAA,CAAA,GAA4B,yBAAA;AAC5B,EAAAA,QAAA,yBAAA,CAAA,G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A,EACnD;AACF;;;ACRO,IAAM,iBAAA,GAAN,MAAM,kBAAA,SAA0B,SAAA,CAAU;AAAA,EAExC,WAAA,CAAY,SAAiB,OAAA,EAAmC;AACrE,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAA,mBAAA;AACL,IAAA,IAAA,CAAK,OAAA,GAAU,WAAW,EAAC;AAC3B,IAAA,MAAA,CAAO,cAAA,CAAe,IAAA,EAAM,kBAAA,CAAkB,SAAS,CAAA;AAAA,EACzD;AACF","file":"index.js","sourcesContent":["export enum Errors {\n NOT_FOUND_ERROR = 'NotFoundError',\n BUSINESS_ERROR = 'BusinessError',\n FORBIDDEN_ERROR = 'ForbiddenError',\n SERVER_ERROR = 'ServerError',\n UNAUTHORIZED_ERROR = 'UnauthorizedError',\n BAD_REQUEST_ERROR = 'BadRequestError',\n UNPROCESSABLE_ENTITY_ERROR = 'UnprocessableEntityError',\n TOO_MANY_REQUESTS_ERROR = 'TooManyRequestsError',\n INTERNAL_SERVER_ERROR = 'InternalServerError',\n SERVICE_UNAVAILABLE_ERROR = 'ServiceUnavailableError',\n GATEWAY_TIMEOUT_ERROR = 'GatewayTimeoutError',\n BAD_GATEWAY_ERROR = 'BadGatewayError',\n PRECONDITION_FAILED_ERROR = 'PreconditionFailedError',\n PAYLOAD_TOO_LARGE_ERROR = 'PayloadTooLargeError',\n}\n","export enum HealthStatus {\n HEALTHY = 'healthy',\n UNHEALTHY = 'unhealthy',\n}\n","export enum UserRole {\n ADMIN = 'admin',\n USER = 'user',\n}\n","/**\n * How the user primarily authenticates. Switching methods is admin-only (future).\n */\nexport enum AuthMethod {\n PASSWORD = 'password',\n OAUTH = 'oauth',\n}\n","/**\n * OAuth identity provider (Auth0 connection / social). MVP: Google only; extend for Microsoft, GitHub, etc.\n */\nexport enum OAuthProvider {\n GOOGLE = 'google',\n}\n","export enum EmailProvider {\n RESEND = 'resend',\n}\n","/**\n * Enum of the animal species admitted.\n */\nexport enum Species {\n DOG = 'Dog',\n CAT = 'Cat',\n}\n","/**\n * Enum of the most common dog breeds.\n */\nexport enum DogBreed {\n LABRADOR_RETRIEVER = 'Labrador Retriever',\n GOLDEN_RETRIEVER = 'Golden Retriever',\n PASTOR_ALEMAN = 'Pastor Alemán',\n BULLDOG_FRANCES = 'Bulldog Francés',\n BULLDOG_INGLES = 'Bulldog Inglés',\n CANICHE = 'Caniche',\n BEAGLE = 'Beagle',\n ROTTWEILER = 'Rottweiler',\n CHIHUAHUA = 'Chihuahua',\n PUG = 'Pug',\n HUSKY_SIBERIANO = 'Husky Siberiano',\n BOXER = 'Bóxer',\n YORKSHIRE_TERRIER = 'Yorkshire Terrier',\n DALMATA = 'Dálmata',\n MESTIZO = 'Mestizo', // Option for common or mixed dogs\n}\n","/**\n * Enum of the most common cat breeds.\n */\nexport enum CatBreed {\n PERSA = 'Persa',\n MAINE_COON = 'Maine Coon',\n SIAMES = 'Siamés',\n RAGDOLL = 'Ragdoll',\n BENGALI = 'Bengalí',\n ESFINGE = 'Esfinge (Sphynx)',\n BRITISH_SHORTHAIR = 'Británico de pelo corto',\n ABISINIO = 'Abisinio',\n SCOTTISH_FOLD = 'Scottish Fold',\n AZUL_RUSO = 'Azul Ruso',\n ANGORA_TURCO = 'Angora Turco',\n BOSQUE_DE_NORUEGA = 'Bosque de Noruega',\n EUROPEO_COMUN = 'Europeo Común',\n MESTIZO = 'Mestizo', // Option for common or mixed cats\n}\n","/**\n * Enum of the animal gender.\n */\nexport enum Gender {\n MALE = 'Male',\n FEMALE = 'Female',\n}\n","export enum PetStatus {\n ACTIVE = 'active',\n INACTIVE = 'inactive',\n SOLD = 'sold',\n ADOPTED = 'adopted',\n LOST = 'lost',\n FOUND = 'found',\n DECEASED = 'deceased',\n}\n","export enum WeightUnit {\n KG = 'KG',\n LB = 'LB',\n}\n","export class BaseError extends Error {\n public details?: Record<string, unknown>;\n public toErrorRecord(): { error: string; details?: unknown } {\n const obj: { error: string; details?: unknown } = { error: this.message };\n if (this.details) {\n obj.details = this.details;\n }\n return obj;\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class BusinessError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.BUSINESS_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, BusinessError.prototype);\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class ForbiddenError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.FORBIDDEN_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, ForbiddenError.prototype);\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class NotFoundError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.NOT_FOUND_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, NotFoundError.prototype);\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class ServerError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.SERVER_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, ServerError.prototype);\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class UnauthorizedError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.UNAUTHORIZED_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, UnauthorizedError.prototype);\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/enums/errors.ts","../src/enums/health-status.ts","../src/enums/roles.ts","../src/enums/auth-method.ts","../src/enums/oauth-provider.ts","../src/enums/email-providers.ts","../src/enums/species.ts","../src/enums/dog-breed.ts","../src/enums/cat-breed.ts","../src/enums/gender.ts","../src/enums/pet-status.ts","../src/enums/weight-unit.ts","../src/enums/treatment-status.ts","../src/enums/dose-status.ts","../src/enums/treatment-type.ts","../src/errors/BaseError.ts","../src/errors/BusinessError.ts","../src/errors/ForbiddenError.ts","../src/errors/NotFoundError.ts","../src/errors/ServerError.ts","../src/errors/UnauthorizedError.ts"],"names":["Errors","HealthStatus","UserRole","AuthMethod","OAuthProvider","EmailProvider","Species","DogBreed","CatBreed","Gender","PetStatus","WeightUnit","TreatmentStatus","DoseStatus","TreatmentType"],"mappings":";;;AAAO,IAAK,MAAA,qBAAAA,OAAAA,KAAL;AACL,EAAAA,QAAA,iBAAA,CAAA,GAAkB,eAAA;AAClB,EAAAA,QAAA,gBAAA,CAAA,GAAiB,eAAA;AACjB,EAAAA,QAAA,iBAAA,CAAA,GAAkB,gBAAA;AAClB,EAAAA,QAAA,cAAA,CAAA,GAAe,aAAA;AACf,EAAAA,QAAA,oBAAA,CAAA,GAAqB,mBAAA;AACrB,EAAAA,QAAA,mBAAA,CAAA,GAAoB,iBAAA;AACpB,EAAAA,QAAA,4BAAA,CAAA,GAA6B,0BAAA;AAC7B,EAAAA,QAAA,yBAAA,CAAA,GAA0B,sBAAA;AAC1B,EAAAA,QAAA,uBAAA,CAAA,GAAwB,qBAAA;AACxB,EAAAA,QAAA,2BAAA,CAAA,GAA4B,yBAAA;AAC5B,EAAAA,QAAA,uBAAA,CAAA,GAAwB,qBAAA;AACxB,EAAAA,QAAA,mBAAA,CAAA,GAAoB,iBAAA;AACpB,EAAAA,QAAA,2BAAA,CAAA,GAA4B,yBAAA;AAC5B,EAAAA,QAAA,yBAAA,CAAA,GAA0B,sBAAA;AAdhB,EAAA,OAAAA,OAAAA;AAAA,CAAA,EAAA,MAAA,IAAA,EAAA;;;ACAL,IAAK,YAAA,qBAAAC,aAAAA,KAAL;AACL,EAAAA,cAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,cA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{\n NOT_FOUND_ERROR = 'NotFoundError',\n BUSINESS_ERROR = 'BusinessError',\n FORBIDDEN_ERROR = 'ForbiddenError',\n SERVER_ERROR = 'ServerError',\n UNAUTHORIZED_ERROR = 'UnauthorizedError',\n BAD_REQUEST_ERROR = 'BadRequestError',\n UNPROCESSABLE_ENTITY_ERROR = 'UnprocessableEntityError',\n TOO_MANY_REQUESTS_ERROR = 'TooManyRequestsError',\n INTERNAL_SERVER_ERROR = 'InternalServerError',\n SERVICE_UNAVAILABLE_ERROR = 'ServiceUnavailableError',\n GATEWAY_TIMEOUT_ERROR = 'GatewayTimeoutError',\n BAD_GATEWAY_ERROR = 'BadGatewayError',\n PRECONDITION_FAILED_ERROR = 'PreconditionFailedError',\n PAYLOAD_TOO_LARGE_ERROR = 'PayloadTooLargeError',\n}\n","export enum HealthStatus {\n HEALTHY = 'healthy',\n UNHEALTHY = 'unhealthy',\n}\n","export enum UserRole {\n ADMIN = 'admin',\n USER = 'user',\n}\n","/**\n * How the user primarily authenticates. Switching methods is admin-only (future).\n */\nexport enum AuthMethod {\n PASSWORD = 'password',\n OAUTH = 'oauth',\n}\n","/**\n * OAuth identity provider (Auth0 connection / social). MVP: Google only; extend for Microsoft, GitHub, etc.\n */\nexport enum OAuthProvider {\n GOOGLE = 'google',\n}\n","export enum EmailProvider {\n RESEND = 'resend',\n}\n","/**\n * Enum of the animal species admitted.\n */\nexport enum Species {\n DOG = 'Dog',\n CAT = 'Cat',\n}\n","/**\n * Enum of the most common dog breeds.\n */\nexport enum DogBreed {\n LABRADOR_RETRIEVER = 'Labrador Retriever',\n GOLDEN_RETRIEVER = 'Golden Retriever',\n PASTOR_ALEMAN = 'Pastor Alemán',\n BULLDOG_FRANCES = 'Bulldog Francés',\n BULLDOG_INGLES = 'Bulldog Inglés',\n CANICHE = 'Caniche',\n BEAGLE = 'Beagle',\n ROTTWEILER = 'Rottweiler',\n CHIHUAHUA = 'Chihuahua',\n PUG = 'Pug',\n HUSKY_SIBERIANO = 'Husky Siberiano',\n BOXER = 'Bóxer',\n YORKSHIRE_TERRIER = 'Yorkshire Terrier',\n DALMATA = 'Dálmata',\n MESTIZO = 'Mestizo', // Option for common or mixed dogs\n}\n","/**\n * Enum of the most common cat breeds.\n */\nexport enum CatBreed {\n PERSA = 'Persa',\n MAINE_COON = 'Maine Coon',\n SIAMES = 'Siamés',\n RAGDOLL = 'Ragdoll',\n BENGALI = 'Bengalí',\n ESFINGE = 'Esfinge (Sphynx)',\n BRITISH_SHORTHAIR = 'Británico de pelo corto',\n ABISINIO = 'Abisinio',\n SCOTTISH_FOLD = 'Scottish Fold',\n AZUL_RUSO = 'Azul Ruso',\n ANGORA_TURCO = 'Angora Turco',\n BOSQUE_DE_NORUEGA = 'Bosque de Noruega',\n EUROPEO_COMUN = 'Europeo Común',\n MESTIZO = 'Mestizo', // Option for common or mixed cats\n}\n","/**\n * Enum of the animal gender.\n */\nexport enum Gender {\n MALE = 'Male',\n FEMALE = 'Female',\n}\n","export enum PetStatus {\n ACTIVE = 'active',\n INACTIVE = 'inactive',\n SOLD = 'sold',\n ADOPTED = 'adopted',\n LOST = 'lost',\n FOUND = 'found',\n DECEASED = 'deceased',\n}\n","export enum WeightUnit {\n KG = 'KG',\n LB = 'LB',\n}\n","export enum TreatmentStatus {\n WAITING_START = 'waiting_start',\n PENDING = 'pending',\n IN_PROGRESS = 'in_progress',\n COMPLETED = 'completed',\n CANCELLED = 'cancelled',\n}\n","export enum DoseStatus {\n PENDING = 'pending',\n ADMINISTERED = 'administered',\n SKIPPED = 'skipped',\n SNOOZED = 'snoozed',\n}\n","export enum TreatmentType {\n MEDICATION = 'medication',\n SURGERY = 'surgery',\n DIAGNOSIS = 'diagnosis',\n DESPARASITIZATION = 'desparasitization',\n VACCINATION = 'vaccination',\n EXAM = 'exam',\n DENTAL = 'dental',\n OTHER = 'other',\n}\n","export class BaseError extends Error {\n public details?: Record<string, unknown>;\n public toErrorRecord(): { error: string; details?: unknown } {\n const obj: { error: string; details?: unknown } = { error: this.message };\n if (this.details) {\n obj.details = this.details;\n }\n return obj;\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class BusinessError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.BUSINESS_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, BusinessError.prototype);\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class ForbiddenError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.FORBIDDEN_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, ForbiddenError.prototype);\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class NotFoundError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.NOT_FOUND_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, NotFoundError.prototype);\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class ServerError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.SERVER_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, ServerError.prototype);\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class UnauthorizedError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.UNAUTHORIZED_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, UnauthorizedError.prototype);\n }\n}\n"]}
package/dist/index.mjs CHANGED
@@ -122,6 +122,38 @@ var WeightUnit = /* @__PURE__ */ ((WeightUnit2) => {
122
122
  return WeightUnit2;
123
123
  })(WeightUnit || {});
124
124
 
125
+ // src/enums/treatment-status.ts
126
+ var TreatmentStatus = /* @__PURE__ */ ((TreatmentStatus2) => {
127
+ TreatmentStatus2["WAITING_START"] = "waiting_start";
128
+ TreatmentStatus2["PENDING"] = "pending";
129
+ TreatmentStatus2["IN_PROGRESS"] = "in_progress";
130
+ TreatmentStatus2["COMPLETED"] = "completed";
131
+ TreatmentStatus2["CANCELLED"] = "cancelled";
132
+ return TreatmentStatus2;
133
+ })(TreatmentStatus || {});
134
+
135
+ // src/enums/dose-status.ts
136
+ var DoseStatus = /* @__PURE__ */ ((DoseStatus2) => {
137
+ DoseStatus2["PENDING"] = "pending";
138
+ DoseStatus2["ADMINISTERED"] = "administered";
139
+ DoseStatus2["SKIPPED"] = "skipped";
140
+ DoseStatus2["SNOOZED"] = "snoozed";
141
+ return DoseStatus2;
142
+ })(DoseStatus || {});
143
+
144
+ // src/enums/treatment-type.ts
145
+ var TreatmentType = /* @__PURE__ */ ((TreatmentType2) => {
146
+ TreatmentType2["MEDICATION"] = "medication";
147
+ TreatmentType2["SURGERY"] = "surgery";
148
+ TreatmentType2["DIAGNOSIS"] = "diagnosis";
149
+ TreatmentType2["DESPARASITIZATION"] = "desparasitization";
150
+ TreatmentType2["VACCINATION"] = "vaccination";
151
+ TreatmentType2["EXAM"] = "exam";
152
+ TreatmentType2["DENTAL"] = "dental";
153
+ TreatmentType2["OTHER"] = "other";
154
+ return TreatmentType2;
155
+ })(TreatmentType || {});
156
+
125
157
  // src/errors/BaseError.ts
126
158
  var BaseError = class extends Error {
127
159
  toErrorRecord() {
@@ -183,6 +215,6 @@ var UnauthorizedError = class _UnauthorizedError extends BaseError {
183
215
  }
184
216
  };
185
217
 
186
- export { AuthMethod, BaseError, BusinessError, CatBreed, DogBreed, EmailProvider, Errors, ForbiddenError, Gender, HealthStatus, NotFoundError, OAuthProvider, PetStatus, ServerError, Species, UnauthorizedError, UserRole, WeightUnit };
218
+ export { AuthMethod, BaseError, BusinessError, CatBreed, DogBreed, DoseStatus, EmailProvider, Errors, ForbiddenError, Gender, HealthStatus, NotFoundError, OAuthProvider, PetStatus, ServerError, Species, TreatmentStatus, TreatmentType, UnauthorizedError, UserRole, WeightUnit };
187
219
  //# sourceMappingURL=index.mjs.map
188
220
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/enums/errors.ts","../src/enums/health-status.ts","../src/enums/roles.ts","../src/enums/auth-method.ts","../src/enums/oauth-provider.ts","../src/enums/email-providers.ts","../src/enums/species.ts","../src/enums/dog-breed.ts","../src/enums/cat-breed.ts","../src/enums/gender.ts","../src/enums/pet-status.ts","../src/enums/weight-unit.ts","../src/errors/BaseError.ts","../src/errors/BusinessError.ts","../src/errors/ForbiddenError.ts","../src/errors/NotFoundError.ts","../src/errors/ServerError.ts","../src/errors/UnauthorizedError.ts"],"names":["Errors","HealthStatus","UserRole","AuthMethod","OAuthProvider","EmailProvider","Species","DogBreed","CatBreed","Gender","PetStatus","WeightUnit"],"mappings":";AAAO,IAAK,MAAA,qBAAAA,OAAAA,KAAL;AACL,EAAAA,QAAA,iBAAA,CAAA,GAAkB,eAAA;AAClB,EAAAA,QAAA,gBAAA,CAAA,GAAiB,eAAA;AACjB,EAAAA,QAAA,iBAAA,CAAA,GAAkB,gBAAA;AAClB,EAAAA,QAAA,cAAA,CAAA,GAAe,aAAA;AACf,EAAAA,QAAA,oBAAA,CAAA,GAAqB,mBAAA;AACrB,EAAAA,QAAA,mBAAA,CAAA,GAAoB,iBAAA;AACpB,EAAAA,QAAA,4BAAA,CAAA,GAA6B,0BAAA;AAC7B,EAAAA,QAAA,yBAAA,CAAA,GAA0B,sBAAA;AAC1B,EAAAA,QAAA,uBAAA,CAAA,GAAwB,qBAAA;AACxB,EAAAA,QAAA,2BAAA,CAAA,GAA4B,yBAAA;AAC5B,EAAAA,QAAA,uBAAA,CAAA,GAAwB,qBAAA;AACxB,EAAAA,QAAA,mBAAA,CAAA,GAAoB,iBAAA;AACpB,EAAAA,QAAA,2BAA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CAAO,cAAA,CAAe,IAAA,EAAM,YAAA,CAAY,SAAS,CAAA;AAAA,EACnD;AACF;;;ACRO,IAAM,iBAAA,GAAN,MAAM,kBAAA,SAA0B,SAAA,CAAU;AAAA,EAExC,WAAA,CAAY,SAAiB,OAAA,EAAmC;AACrE,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAA,mBAAA;AACL,IAAA,IAAA,CAAK,OAAA,GAAU,WAAW,EAAC;AAC3B,IAAA,MAAA,CAAO,cAAA,CAAe,IAAA,EAAM,kBAAA,CAAkB,SAAS,CAAA;AAAA,EACzD;AACF","file":"index.mjs","sourcesContent":["export enum Errors {\n NOT_FOUND_ERROR = 'NotFoundError',\n BUSINESS_ERROR = 'BusinessError',\n FORBIDDEN_ERROR = 'ForbiddenError',\n SERVER_ERROR = 'ServerError',\n UNAUTHORIZED_ERROR = 'UnauthorizedError',\n BAD_REQUEST_ERROR = 'BadRequestError',\n UNPROCESSABLE_ENTITY_ERROR = 'UnprocessableEntityError',\n TOO_MANY_REQUESTS_ERROR = 'TooManyRequestsError',\n INTERNAL_SERVER_ERROR = 'InternalServerError',\n SERVICE_UNAVAILABLE_ERROR = 'ServiceUnavailableError',\n GATEWAY_TIMEOUT_ERROR = 'GatewayTimeoutError',\n BAD_GATEWAY_ERROR = 'BadGatewayError',\n PRECONDITION_FAILED_ERROR = 'PreconditionFailedError',\n PAYLOAD_TOO_LARGE_ERROR = 'PayloadTooLargeError',\n}\n","export enum HealthStatus {\n HEALTHY = 'healthy',\n UNHEALTHY = 'unhealthy',\n}\n","export enum UserRole {\n ADMIN = 'admin',\n USER = 'user',\n}\n","/**\n * How the user primarily authenticates. Switching methods is admin-only (future).\n */\nexport enum AuthMethod {\n PASSWORD = 'password',\n OAUTH = 'oauth',\n}\n","/**\n * OAuth identity provider (Auth0 connection / social). MVP: Google only; extend for Microsoft, GitHub, etc.\n */\nexport enum OAuthProvider {\n GOOGLE = 'google',\n}\n","export enum EmailProvider {\n RESEND = 'resend',\n}\n","/**\n * Enum of the animal species admitted.\n */\nexport enum Species {\n DOG = 'Dog',\n CAT = 'Cat',\n}\n","/**\n * Enum of the most common dog breeds.\n */\nexport enum DogBreed {\n LABRADOR_RETRIEVER = 'Labrador Retriever',\n GOLDEN_RETRIEVER = 'Golden Retriever',\n PASTOR_ALEMAN = 'Pastor Alemán',\n BULLDOG_FRANCES = 'Bulldog Francés',\n BULLDOG_INGLES = 'Bulldog Inglés',\n CANICHE = 'Caniche',\n BEAGLE = 'Beagle',\n ROTTWEILER = 'Rottweiler',\n CHIHUAHUA = 'Chihuahua',\n PUG = 'Pug',\n HUSKY_SIBERIANO = 'Husky Siberiano',\n BOXER = 'Bóxer',\n YORKSHIRE_TERRIER = 'Yorkshire Terrier',\n DALMATA = 'Dálmata',\n MESTIZO = 'Mestizo', // Option for common or mixed dogs\n}\n","/**\n * Enum of the most common cat breeds.\n */\nexport enum CatBreed {\n PERSA = 'Persa',\n MAINE_COON = 'Maine Coon',\n SIAMES = 'Siamés',\n RAGDOLL = 'Ragdoll',\n BENGALI = 'Bengalí',\n ESFINGE = 'Esfinge (Sphynx)',\n BRITISH_SHORTHAIR = 'Británico de pelo corto',\n ABISINIO = 'Abisinio',\n SCOTTISH_FOLD = 'Scottish Fold',\n AZUL_RUSO = 'Azul Ruso',\n ANGORA_TURCO = 'Angora Turco',\n BOSQUE_DE_NORUEGA = 'Bosque de Noruega',\n EUROPEO_COMUN = 'Europeo Común',\n MESTIZO = 'Mestizo', // Option for common or mixed cats\n}\n","/**\n * Enum of the animal gender.\n */\nexport enum Gender {\n MALE = 'Male',\n FEMALE = 'Female',\n}\n","export enum PetStatus {\n ACTIVE = 'active',\n INACTIVE = 'inactive',\n SOLD = 'sold',\n ADOPTED = 'adopted',\n LOST = 'lost',\n FOUND = 'found',\n DECEASED = 'deceased',\n}\n","export enum WeightUnit {\n KG = 'KG',\n LB = 'LB',\n}\n","export class BaseError extends Error {\n public details?: Record<string, unknown>;\n public toErrorRecord(): { error: string; details?: unknown } {\n const obj: { error: string; details?: unknown } = { error: this.message };\n if (this.details) {\n obj.details = this.details;\n }\n return obj;\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class BusinessError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.BUSINESS_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, BusinessError.prototype);\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class ForbiddenError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.FORBIDDEN_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, ForbiddenError.prototype);\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class NotFoundError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.NOT_FOUND_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, NotFoundError.prototype);\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class ServerError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.SERVER_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, ServerError.prototype);\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class UnauthorizedError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.UNAUTHORIZED_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, UnauthorizedError.prototype);\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/enums/errors.ts","../src/enums/health-status.ts","../src/enums/roles.ts","../src/enums/auth-method.ts","../src/enums/oauth-provider.ts","../src/enums/email-providers.ts","../src/enums/species.ts","../src/enums/dog-breed.ts","../src/enums/cat-breed.ts","../src/enums/gender.ts","../src/enums/pet-status.ts","../src/enums/weight-unit.ts","../src/enums/treatment-status.ts","../src/enums/dose-status.ts","../src/enums/treatment-type.ts","../src/errors/BaseError.ts","../src/errors/BusinessError.ts","../src/errors/ForbiddenError.ts","../src/errors/NotFoundError.ts","../src/errors/ServerError.ts","../src/errors/UnauthorizedError.ts"],"names":["Errors","HealthStatus","UserRole","AuthMethod","OAuthProvider","EmailProvider","Species","DogBreed","CatBreed","Gender","PetStatus","WeightUnit","TreatmentStatus","DoseStatus","TreatmentType"],"mappings":";AAAO,IAAK,MAAA,qBAAAA,OAAAA,KAAL;AACL,EAAAA,QAAA,iBAAA,CAAA,GAAkB,eAAA;AAClB,EAAAA,QAAA,gBAAA,CAAA,GAAiB,eAAA;AACjB,EAAAA,QAAA,iBAAA,CAAA,GAAkB,gBAAA;AAClB,EAAAA,QAAA,cAAA,CAAA,GAAe,aAAA;AACf,EAAAA,QAAA,oBAAA,CAAA,GAAqB,mBAAA;AACrB,EAAAA,QAAA,mBAAA,CAAA,GAAoB,iBAAA;AACpB,EAAAA,QAAA,4BAAA,CAAA,GAA6B,0BAAA;AAC7B,EAAAA,QAAA,yBAAA,CAAA,GAA0B,sBAAA;AAC1B,EAAAA,QAAA,uBAAA,CAAA,GAAwB,qBAAA;AACxB,EAAAA,QAAA,2BAAA,CAAA,GAA4B,yBAAA;AAC5B,EAAAA,QAAA,uBAAA,CAAA,GAAwB,qBAAA;AACxB,EAAAA,QAAA,mBAAA,CAAA,GAAoB,iBAAA;AACpB,EAAAA,QAAA,2BAAA,CAAA,GAA4B,yBAAA;AAC5B,EAAAA,QAAA,yBAAA,CAAA,GAA0B,sBAAA;AAdhB,EAAA,OAAAA,OAAAA;AAAA,CAAA,EAAA,MAAA,IAAA,EAAA;;;ACAL,IAAK,YAAA,qBAAAC,aAAAA,KAAL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kB,SAAS,CAAA;AAAA,EACzD;AACF","file":"index.mjs","sourcesContent":["export enum Errors {\n NOT_FOUND_ERROR = 'NotFoundError',\n BUSINESS_ERROR = 'BusinessError',\n FORBIDDEN_ERROR = 'ForbiddenError',\n SERVER_ERROR = 'ServerError',\n UNAUTHORIZED_ERROR = 'UnauthorizedError',\n BAD_REQUEST_ERROR = 'BadRequestError',\n UNPROCESSABLE_ENTITY_ERROR = 'UnprocessableEntityError',\n TOO_MANY_REQUESTS_ERROR = 'TooManyRequestsError',\n INTERNAL_SERVER_ERROR = 'InternalServerError',\n SERVICE_UNAVAILABLE_ERROR = 'ServiceUnavailableError',\n GATEWAY_TIMEOUT_ERROR = 'GatewayTimeoutError',\n BAD_GATEWAY_ERROR = 'BadGatewayError',\n PRECONDITION_FAILED_ERROR = 'PreconditionFailedError',\n PAYLOAD_TOO_LARGE_ERROR = 'PayloadTooLargeError',\n}\n","export enum HealthStatus {\n HEALTHY = 'healthy',\n UNHEALTHY = 'unhealthy',\n}\n","export enum UserRole {\n ADMIN = 'admin',\n USER = 'user',\n}\n","/**\n * How the user primarily authenticates. Switching methods is admin-only (future).\n */\nexport enum AuthMethod {\n PASSWORD = 'password',\n OAUTH = 'oauth',\n}\n","/**\n * OAuth identity provider (Auth0 connection / social). MVP: Google only; extend for Microsoft, GitHub, etc.\n */\nexport enum OAuthProvider {\n GOOGLE = 'google',\n}\n","export enum EmailProvider {\n RESEND = 'resend',\n}\n","/**\n * Enum of the animal species admitted.\n */\nexport enum Species {\n DOG = 'Dog',\n CAT = 'Cat',\n}\n","/**\n * Enum of the most common dog breeds.\n */\nexport enum DogBreed {\n LABRADOR_RETRIEVER = 'Labrador Retriever',\n GOLDEN_RETRIEVER = 'Golden Retriever',\n PASTOR_ALEMAN = 'Pastor Alemán',\n BULLDOG_FRANCES = 'Bulldog Francés',\n BULLDOG_INGLES = 'Bulldog Inglés',\n CANICHE = 'Caniche',\n BEAGLE = 'Beagle',\n ROTTWEILER = 'Rottweiler',\n CHIHUAHUA = 'Chihuahua',\n PUG = 'Pug',\n HUSKY_SIBERIANO = 'Husky Siberiano',\n BOXER = 'Bóxer',\n YORKSHIRE_TERRIER = 'Yorkshire Terrier',\n DALMATA = 'Dálmata',\n MESTIZO = 'Mestizo', // Option for common or mixed dogs\n}\n","/**\n * Enum of the most common cat breeds.\n */\nexport enum CatBreed {\n PERSA = 'Persa',\n MAINE_COON = 'Maine Coon',\n SIAMES = 'Siamés',\n RAGDOLL = 'Ragdoll',\n BENGALI = 'Bengalí',\n ESFINGE = 'Esfinge (Sphynx)',\n BRITISH_SHORTHAIR = 'Británico de pelo corto',\n ABISINIO = 'Abisinio',\n SCOTTISH_FOLD = 'Scottish Fold',\n AZUL_RUSO = 'Azul Ruso',\n ANGORA_TURCO = 'Angora Turco',\n BOSQUE_DE_NORUEGA = 'Bosque de Noruega',\n EUROPEO_COMUN = 'Europeo Común',\n MESTIZO = 'Mestizo', // Option for common or mixed cats\n}\n","/**\n * Enum of the animal gender.\n */\nexport enum Gender {\n MALE = 'Male',\n FEMALE = 'Female',\n}\n","export enum PetStatus {\n ACTIVE = 'active',\n INACTIVE = 'inactive',\n SOLD = 'sold',\n ADOPTED = 'adopted',\n LOST = 'lost',\n FOUND = 'found',\n DECEASED = 'deceased',\n}\n","export enum WeightUnit {\n KG = 'KG',\n LB = 'LB',\n}\n","export enum TreatmentStatus {\n WAITING_START = 'waiting_start',\n PENDING = 'pending',\n IN_PROGRESS = 'in_progress',\n COMPLETED = 'completed',\n CANCELLED = 'cancelled',\n}\n","export enum DoseStatus {\n PENDING = 'pending',\n ADMINISTERED = 'administered',\n SKIPPED = 'skipped',\n SNOOZED = 'snoozed',\n}\n","export enum TreatmentType {\n MEDICATION = 'medication',\n SURGERY = 'surgery',\n DIAGNOSIS = 'diagnosis',\n DESPARASITIZATION = 'desparasitization',\n VACCINATION = 'vaccination',\n EXAM = 'exam',\n DENTAL = 'dental',\n OTHER = 'other',\n}\n","export class BaseError extends Error {\n public details?: Record<string, unknown>;\n public toErrorRecord(): { error: string; details?: unknown } {\n const obj: { error: string; details?: unknown } = { error: this.message };\n if (this.details) {\n obj.details = this.details;\n }\n return obj;\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class BusinessError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.BUSINESS_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, BusinessError.prototype);\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class ForbiddenError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.FORBIDDEN_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, ForbiddenError.prototype);\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class NotFoundError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.NOT_FOUND_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, NotFoundError.prototype);\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class ServerError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.SERVER_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, ServerError.prototype);\n }\n}\n","import { BaseError } from '@/errors/BaseError';\nimport { Errors } from '@/enums/errors';\n\nexport class UnauthorizedError extends BaseError {\n public details?: Record<string, unknown>;\n public constructor(message: string, details?: Record<string, unknown>) {\n super(message);\n this.name = Errors.UNAUTHORIZED_ERROR;\n this.details = details || {};\n Object.setPrototypeOf(this, UnauthorizedError.prototype);\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ipetsadmin/contracts",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Shared types, enums, and interfaces for Truffa projects",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",