@ipetsadmin/contracts 1.4.0 → 1.6.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/CHANGELOG.md CHANGED
@@ -19,6 +19,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
19
 
20
20
  ### Security
21
21
 
22
+ ## [1.6.0] - 2026-06-12
23
+
24
+ ### Added
25
+
26
+ - **`ITip`** entity: **`title`**, **`message`**, **`species`**, **`category`**, **`tags`**, **`isActive`**, optional **`priority`** / **`locale`**, timestamps.
27
+ - **`TipCategory`** enum: **`nutrition`**, **`safety`**, **`health`**, **`grooming`**, **`behavior`**, **`general`**.
28
+ - **`TipResponse`**, **`CreateTipInput`** under **`src/types/tip/`**.
29
+ - **`ITipRepository.findRandomActive`** — fetch one random active tip.
30
+ - **`ITipService.getRandomTipForUser(userId)`** — dashboard tip for authenticated user (v1: uniform random, no preference filter).
31
+ - Barrel exports from **`src/index.ts`**.
32
+
33
+ ## [1.5.0] - 2026-06-12
34
+
35
+ ### Added
36
+
37
+ - **`AgendaItemType`** enum: **`appointment`**, **`treatment_dose`**, **`birthday`**.
38
+ - **`UserAgendaItem`** (discriminated union), **`UserAgendaResponse`** (`windowStart`, `windowEnd`, `days`, sorted **`items`**) under **`src/types/agenda/`**.
39
+ - **`IAgendaService`**: **`getUpcomingAgenda(userId, days)`** — unified upcoming feed for appointments, pending doses, and pet birthdays.
40
+ - **`IAppointmentRepository.findUpcomingByOwnerId`** — query by **`ownerId`**, **`scheduledAt`** range, and **`status`** filter.
41
+ - **`IDoseRepository.findUpcomingByOwnerId`** — query by **`ownerId`**, **`scheduledDate`** range, and **`status`** filter.
42
+ - Barrel exports from **`src/index.ts`**.
43
+
22
44
  ## [1.4.0] - 2026-06-12
23
45
 
24
46
  ### Added
package/dist/index.d.mts CHANGED
@@ -258,6 +258,29 @@ interface IAppointment {
258
258
  updatedAt: Date;
259
259
  }
260
260
 
261
+ declare enum TipCategory {
262
+ NUTRITION = "nutrition",
263
+ SAFETY = "safety",
264
+ HEALTH = "health",
265
+ GROOMING = "grooming",
266
+ BEHAVIOR = "behavior",
267
+ GENERAL = "general"
268
+ }
269
+
270
+ interface ITip {
271
+ id: string;
272
+ title: string;
273
+ message: string;
274
+ species: Species[];
275
+ category: TipCategory;
276
+ tags: string[];
277
+ isActive: boolean;
278
+ priority?: number;
279
+ locale?: string;
280
+ createdAt: Date;
281
+ updatedAt: Date;
282
+ }
283
+
261
284
  declare enum HealthStatus {
262
285
  HEALTHY = "healthy",
263
286
  UNHEALTHY = "unhealthy"
@@ -457,6 +480,10 @@ type DoseResponse = IDose;
457
480
 
458
481
  type AppointmentResponse = IAppointment;
459
482
 
483
+ type TipResponse = ITip;
484
+
485
+ type CreateTipInput = Omit<ITip, 'id' | 'createdAt' | 'updatedAt'>;
486
+
460
487
  type OAuthGoogleStartResponse = {
461
488
  readonly authorizationUrl: string;
462
489
  readonly state: string;
@@ -477,6 +504,43 @@ type DoseNotificationJobData = {
477
504
  doseNumber: number;
478
505
  };
479
506
 
507
+ declare enum AgendaItemType {
508
+ APPOINTMENT = "appointment",
509
+ TREATMENT_DOSE = "treatment_dose",
510
+ BIRTHDAY = "birthday"
511
+ }
512
+
513
+ type UserAgendaAppointmentItem = {
514
+ type: AgendaItemType.APPOINTMENT;
515
+ occursAt: Date;
516
+ petId: string;
517
+ petName: string;
518
+ appointment: AppointmentResponse;
519
+ };
520
+ type UserAgendaTreatmentDoseItem = {
521
+ type: AgendaItemType.TREATMENT_DOSE;
522
+ occursAt: Date;
523
+ petId: string;
524
+ petName: string;
525
+ dose: DoseResponse;
526
+ medicationName: string;
527
+ };
528
+ type UserAgendaBirthdayItem = {
529
+ type: AgendaItemType.BIRTHDAY;
530
+ occursAt: Date;
531
+ petId: string;
532
+ petName: string;
533
+ birthDate: Date;
534
+ ageTurning: number;
535
+ };
536
+ type UserAgendaItem = UserAgendaAppointmentItem | UserAgendaTreatmentDoseItem | UserAgendaBirthdayItem;
537
+ type UserAgendaResponse = {
538
+ windowStart: Date;
539
+ windowEnd: Date;
540
+ days: number;
541
+ items: UserAgendaItem[];
542
+ };
543
+
480
544
  interface IConfig {
481
545
  port: number;
482
546
  cors: {
@@ -608,6 +672,12 @@ interface IDoseRepository {
608
672
  create(input: CreateDoseInput, options?: RepositoryOperationOptions): Promise<IDose>;
609
673
  findById(id: string, options?: RepositoryOperationOptions): Promise<IDose | null>;
610
674
  findByTreatmentId(treatmentId: string, options?: RepositoryOperationOptions): Promise<IDose[]>;
675
+ findUpcomingByOwnerId(params: {
676
+ ownerId: string;
677
+ from: Date;
678
+ to: Date;
679
+ statuses: DoseStatus[];
680
+ }, options?: RepositoryOperationOptions): Promise<IDose[]>;
611
681
  delete(id: string, options?: RepositoryOperationOptions): Promise<void>;
612
682
  deleteByTreatmentId(treatmentId: string, options?: RepositoryOperationOptions): Promise<void>;
613
683
  }
@@ -620,9 +690,19 @@ interface IAppointmentRepository {
620
690
  }, options?: RepositoryOperationOptions): Promise<void>;
621
691
  findById(id: string, options?: RepositoryOperationOptions): Promise<IAppointment | null>;
622
692
  findByPetId(petId: string, options?: RepositoryOperationOptions): Promise<IAppointment[]>;
693
+ findUpcomingByOwnerId(params: {
694
+ ownerId: string;
695
+ from: Date;
696
+ to: Date;
697
+ statuses: AppointmentStatus[];
698
+ }, options?: RepositoryOperationOptions): Promise<IAppointment[]>;
623
699
  delete(id: string, options?: RepositoryOperationOptions): Promise<void>;
624
700
  }
625
701
 
702
+ interface ITipRepository {
703
+ findRandomActive(options?: RepositoryOperationOptions): Promise<ITip | null>;
704
+ }
705
+
626
706
  interface IAuthService {
627
707
  register(email: string, password: string, options?: RepositoryOperationOptions): Promise<AuthSessionResponse>;
628
708
  loginWithUser(user: IUser, options?: RepositoryOperationOptions): Promise<AuthSessionResponse>;
@@ -754,6 +834,14 @@ interface IAppointmentService {
754
834
  }, options?: RepositoryOperationOptions): Promise<void>;
755
835
  }
756
836
 
837
+ interface IAgendaService {
838
+ getUpcomingAgenda(userId: string, days: number, options?: RepositoryOperationOptions): Promise<UserAgendaResponse>;
839
+ }
840
+
841
+ interface ITipService {
842
+ getRandomTipForUser(userId: string, options?: RepositoryOperationOptions): Promise<TipResponse>;
843
+ }
844
+
757
845
  declare enum Errors {
758
846
  NOT_FOUND_ERROR = "NotFoundError",
759
847
  BUSINESS_ERROR = "BusinessError",
@@ -808,4 +896,4 @@ declare class UnauthorizedError extends BaseError {
808
896
  constructor(message: string, details?: Record<string, unknown>);
809
897
  }
810
898
 
811
- export { type AppointmentResponse, AppointmentStatus, AppointmentType, type Auth0AuthorizationParams, type Auth0UserProfile, AuthMethod, type AuthSessionResponse, type AuthUserResponse, BaseError, BusinessError, CatBreed, type CreateAppointmentInput, type CreateDoseInput, type CreatePetInput, type CreateTreatmentInput, type CreateUserInput, DogBreed, type DoseNotificationJobData, type DoseResponse, DoseStatus, type EmailAddress, EmailProvider, type EmailVerificationTokenRecord, Errors, ForbiddenError, Gender, type HealthCheck, HealthStatus, type IAllergy, type IApiResponse, type IAppointment, type IAppointmentLocation, type IAppointmentProvider, type IAppointmentRepository, type IAppointmentService, 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 IVaccine, 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, WorkerName };
899
+ export { AgendaItemType, type AppointmentResponse, AppointmentStatus, AppointmentType, type Auth0AuthorizationParams, type Auth0UserProfile, AuthMethod, type AuthSessionResponse, type AuthUserResponse, BaseError, BusinessError, CatBreed, type CreateAppointmentInput, type CreateDoseInput, type CreatePetInput, type CreateTipInput, type CreateTreatmentInput, type CreateUserInput, DogBreed, type DoseNotificationJobData, type DoseResponse, DoseStatus, type EmailAddress, EmailProvider, type EmailVerificationTokenRecord, Errors, ForbiddenError, Gender, type HealthCheck, HealthStatus, type IAgendaService, type IAllergy, type IApiResponse, type IAppointment, type IAppointmentLocation, type IAppointmentProvider, type IAppointmentRepository, type IAppointmentService, 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 ITip, type ITipRepository, type ITipService, type ITreatment, type ITreatmentRepository, type ITreatmentService, type IUser, type IUserRepository, type IUserService, type IVaccine, 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, TipCategory, type TipResponse, type TokenPair, type TreatmentResponse, TreatmentStatus, TreatmentType, UnauthorizedError, type UserAgendaAppointmentItem, type UserAgendaBirthdayItem, type UserAgendaItem, type UserAgendaResponse, type UserAgendaTreatmentDoseItem, type UserProfileResponse, UserRole, type VerifyEmailRequest, WeightUnit, WorkerName };
package/dist/index.d.ts CHANGED
@@ -258,6 +258,29 @@ interface IAppointment {
258
258
  updatedAt: Date;
259
259
  }
260
260
 
261
+ declare enum TipCategory {
262
+ NUTRITION = "nutrition",
263
+ SAFETY = "safety",
264
+ HEALTH = "health",
265
+ GROOMING = "grooming",
266
+ BEHAVIOR = "behavior",
267
+ GENERAL = "general"
268
+ }
269
+
270
+ interface ITip {
271
+ id: string;
272
+ title: string;
273
+ message: string;
274
+ species: Species[];
275
+ category: TipCategory;
276
+ tags: string[];
277
+ isActive: boolean;
278
+ priority?: number;
279
+ locale?: string;
280
+ createdAt: Date;
281
+ updatedAt: Date;
282
+ }
283
+
261
284
  declare enum HealthStatus {
262
285
  HEALTHY = "healthy",
263
286
  UNHEALTHY = "unhealthy"
@@ -457,6 +480,10 @@ type DoseResponse = IDose;
457
480
 
458
481
  type AppointmentResponse = IAppointment;
459
482
 
483
+ type TipResponse = ITip;
484
+
485
+ type CreateTipInput = Omit<ITip, 'id' | 'createdAt' | 'updatedAt'>;
486
+
460
487
  type OAuthGoogleStartResponse = {
461
488
  readonly authorizationUrl: string;
462
489
  readonly state: string;
@@ -477,6 +504,43 @@ type DoseNotificationJobData = {
477
504
  doseNumber: number;
478
505
  };
479
506
 
507
+ declare enum AgendaItemType {
508
+ APPOINTMENT = "appointment",
509
+ TREATMENT_DOSE = "treatment_dose",
510
+ BIRTHDAY = "birthday"
511
+ }
512
+
513
+ type UserAgendaAppointmentItem = {
514
+ type: AgendaItemType.APPOINTMENT;
515
+ occursAt: Date;
516
+ petId: string;
517
+ petName: string;
518
+ appointment: AppointmentResponse;
519
+ };
520
+ type UserAgendaTreatmentDoseItem = {
521
+ type: AgendaItemType.TREATMENT_DOSE;
522
+ occursAt: Date;
523
+ petId: string;
524
+ petName: string;
525
+ dose: DoseResponse;
526
+ medicationName: string;
527
+ };
528
+ type UserAgendaBirthdayItem = {
529
+ type: AgendaItemType.BIRTHDAY;
530
+ occursAt: Date;
531
+ petId: string;
532
+ petName: string;
533
+ birthDate: Date;
534
+ ageTurning: number;
535
+ };
536
+ type UserAgendaItem = UserAgendaAppointmentItem | UserAgendaTreatmentDoseItem | UserAgendaBirthdayItem;
537
+ type UserAgendaResponse = {
538
+ windowStart: Date;
539
+ windowEnd: Date;
540
+ days: number;
541
+ items: UserAgendaItem[];
542
+ };
543
+
480
544
  interface IConfig {
481
545
  port: number;
482
546
  cors: {
@@ -608,6 +672,12 @@ interface IDoseRepository {
608
672
  create(input: CreateDoseInput, options?: RepositoryOperationOptions): Promise<IDose>;
609
673
  findById(id: string, options?: RepositoryOperationOptions): Promise<IDose | null>;
610
674
  findByTreatmentId(treatmentId: string, options?: RepositoryOperationOptions): Promise<IDose[]>;
675
+ findUpcomingByOwnerId(params: {
676
+ ownerId: string;
677
+ from: Date;
678
+ to: Date;
679
+ statuses: DoseStatus[];
680
+ }, options?: RepositoryOperationOptions): Promise<IDose[]>;
611
681
  delete(id: string, options?: RepositoryOperationOptions): Promise<void>;
612
682
  deleteByTreatmentId(treatmentId: string, options?: RepositoryOperationOptions): Promise<void>;
613
683
  }
@@ -620,9 +690,19 @@ interface IAppointmentRepository {
620
690
  }, options?: RepositoryOperationOptions): Promise<void>;
621
691
  findById(id: string, options?: RepositoryOperationOptions): Promise<IAppointment | null>;
622
692
  findByPetId(petId: string, options?: RepositoryOperationOptions): Promise<IAppointment[]>;
693
+ findUpcomingByOwnerId(params: {
694
+ ownerId: string;
695
+ from: Date;
696
+ to: Date;
697
+ statuses: AppointmentStatus[];
698
+ }, options?: RepositoryOperationOptions): Promise<IAppointment[]>;
623
699
  delete(id: string, options?: RepositoryOperationOptions): Promise<void>;
624
700
  }
625
701
 
702
+ interface ITipRepository {
703
+ findRandomActive(options?: RepositoryOperationOptions): Promise<ITip | null>;
704
+ }
705
+
626
706
  interface IAuthService {
627
707
  register(email: string, password: string, options?: RepositoryOperationOptions): Promise<AuthSessionResponse>;
628
708
  loginWithUser(user: IUser, options?: RepositoryOperationOptions): Promise<AuthSessionResponse>;
@@ -754,6 +834,14 @@ interface IAppointmentService {
754
834
  }, options?: RepositoryOperationOptions): Promise<void>;
755
835
  }
756
836
 
837
+ interface IAgendaService {
838
+ getUpcomingAgenda(userId: string, days: number, options?: RepositoryOperationOptions): Promise<UserAgendaResponse>;
839
+ }
840
+
841
+ interface ITipService {
842
+ getRandomTipForUser(userId: string, options?: RepositoryOperationOptions): Promise<TipResponse>;
843
+ }
844
+
757
845
  declare enum Errors {
758
846
  NOT_FOUND_ERROR = "NotFoundError",
759
847
  BUSINESS_ERROR = "BusinessError",
@@ -808,4 +896,4 @@ declare class UnauthorizedError extends BaseError {
808
896
  constructor(message: string, details?: Record<string, unknown>);
809
897
  }
810
898
 
811
- export { type AppointmentResponse, AppointmentStatus, AppointmentType, type Auth0AuthorizationParams, type Auth0UserProfile, AuthMethod, type AuthSessionResponse, type AuthUserResponse, BaseError, BusinessError, CatBreed, type CreateAppointmentInput, type CreateDoseInput, type CreatePetInput, type CreateTreatmentInput, type CreateUserInput, DogBreed, type DoseNotificationJobData, type DoseResponse, DoseStatus, type EmailAddress, EmailProvider, type EmailVerificationTokenRecord, Errors, ForbiddenError, Gender, type HealthCheck, HealthStatus, type IAllergy, type IApiResponse, type IAppointment, type IAppointmentLocation, type IAppointmentProvider, type IAppointmentRepository, type IAppointmentService, 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 IVaccine, 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, WorkerName };
899
+ export { AgendaItemType, type AppointmentResponse, AppointmentStatus, AppointmentType, type Auth0AuthorizationParams, type Auth0UserProfile, AuthMethod, type AuthSessionResponse, type AuthUserResponse, BaseError, BusinessError, CatBreed, type CreateAppointmentInput, type CreateDoseInput, type CreatePetInput, type CreateTipInput, type CreateTreatmentInput, type CreateUserInput, DogBreed, type DoseNotificationJobData, type DoseResponse, DoseStatus, type EmailAddress, EmailProvider, type EmailVerificationTokenRecord, Errors, ForbiddenError, Gender, type HealthCheck, HealthStatus, type IAgendaService, type IAllergy, type IApiResponse, type IAppointment, type IAppointmentLocation, type IAppointmentProvider, type IAppointmentRepository, type IAppointmentService, 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 ITip, type ITipRepository, type ITipService, type ITreatment, type ITreatmentRepository, type ITreatmentService, type IUser, type IUserRepository, type IUserService, type IVaccine, 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, TipCategory, type TipResponse, type TokenPair, type TreatmentResponse, TreatmentStatus, TreatmentType, UnauthorizedError, type UserAgendaAppointmentItem, type UserAgendaBirthdayItem, type UserAgendaItem, type UserAgendaResponse, type UserAgendaTreatmentDoseItem, type UserProfileResponse, UserRole, type VerifyEmailRequest, WeightUnit, WorkerName };
package/dist/index.js CHANGED
@@ -181,6 +181,25 @@ var AppointmentType = /* @__PURE__ */ ((AppointmentType2) => {
181
181
  return AppointmentType2;
182
182
  })(AppointmentType || {});
183
183
 
184
+ // src/enums/agenda-item-type.ts
185
+ var AgendaItemType = /* @__PURE__ */ ((AgendaItemType2) => {
186
+ AgendaItemType2["APPOINTMENT"] = "appointment";
187
+ AgendaItemType2["TREATMENT_DOSE"] = "treatment_dose";
188
+ AgendaItemType2["BIRTHDAY"] = "birthday";
189
+ return AgendaItemType2;
190
+ })(AgendaItemType || {});
191
+
192
+ // src/enums/tip-category.ts
193
+ var TipCategory = /* @__PURE__ */ ((TipCategory2) => {
194
+ TipCategory2["NUTRITION"] = "nutrition";
195
+ TipCategory2["SAFETY"] = "safety";
196
+ TipCategory2["HEALTH"] = "health";
197
+ TipCategory2["GROOMING"] = "grooming";
198
+ TipCategory2["BEHAVIOR"] = "behavior";
199
+ TipCategory2["GENERAL"] = "general";
200
+ return TipCategory2;
201
+ })(TipCategory || {});
202
+
184
203
  // src/errors/BaseError.ts
185
204
  var BaseError = class extends Error {
186
205
  toErrorRecord() {
@@ -242,6 +261,7 @@ var UnauthorizedError = class _UnauthorizedError extends BaseError {
242
261
  }
243
262
  };
244
263
 
264
+ exports.AgendaItemType = AgendaItemType;
245
265
  exports.AppointmentStatus = AppointmentStatus;
246
266
  exports.AppointmentType = AppointmentType;
247
267
  exports.AuthMethod = AuthMethod;
@@ -260,6 +280,7 @@ exports.OAuthProvider = OAuthProvider;
260
280
  exports.PetStatus = PetStatus;
261
281
  exports.ServerError = ServerError;
262
282
  exports.Species = Species;
283
+ exports.TipCategory = TipCategory;
263
284
  exports.TreatmentStatus = TreatmentStatus;
264
285
  exports.TreatmentType = TreatmentType;
265
286
  exports.UnauthorizedError = UnauthorizedError;
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/enums/treatment-status.ts","../src/enums/dose-status.ts","../src/enums/treatment-type.ts","../src/enums/worker-name.ts","../src/enums/appointment-status.ts","../src/enums/appointment-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","WorkerName","AppointmentStatus","AppointmentType"],"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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AM,aAAA,GAAN,MAAM,cAAA,SAAsB,SAAA,CAAU;AAAA,EAEpC,WAAA,CAAY,SAAiB,OAAA,EAAmC;AACrE,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAA,eAAA;AACL,IAAA,IAAA,CAAK,OAAA,GAAU,WAAW,EAAC;AAC3B,IAAA,MAAA,CAAO,cAAA,CAAe,IAAA,EAAM,cAAA,CAAc,SAAS,CAAA;AAAA,EACrD;AACF;;;ACRO,IAAM,WAAA,GAAN,MAAM,YAAA,SAAoB,SAAA,CAAU;AAAA,EAElC,WAAA,CAAY,SAAiB,OAAA,EAAmC;AACrE,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAA,aAAA;AACL,IAAA,IAAA,CAAK,OAAA,GAAU,WAAW,EAAC;AAC3B,IAAA,MAAA,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.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 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 enum WorkerName {\n EMAIL_NOTIFICATION_WORKER = 'email-notification-worker',\n}\n","export enum AppointmentStatus {\n PENDING = 'pending',\n CONFIRMED = 'confirmed',\n CANCELLED = 'cancelled',\n COMPLETED = 'completed',\n}\n","export enum AppointmentType {\n VETERINARY = 'veterinary',\n DENTAL = 'dental',\n GROOMING = 'grooming',\n TRAINING = 'training',\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"]}
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/enums/worker-name.ts","../src/enums/appointment-status.ts","../src/enums/appointment-type.ts","../src/enums/agenda-item-type.ts","../src/enums/tip-category.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","WorkerName","AppointmentStatus","AppointmentType","AgendaItemType","TipCategory"],"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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AA,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 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 enum WorkerName {\n EMAIL_NOTIFICATION_WORKER = 'email-notification-worker',\n}\n","export enum AppointmentStatus {\n PENDING = 'pending',\n CONFIRMED = 'confirmed',\n CANCELLED = 'cancelled',\n COMPLETED = 'completed',\n}\n","export enum AppointmentType {\n VETERINARY = 'veterinary',\n DENTAL = 'dental',\n GROOMING = 'grooming',\n TRAINING = 'training',\n OTHER = 'other',\n}\n","export enum AgendaItemType {\n APPOINTMENT = 'appointment',\n TREATMENT_DOSE = 'treatment_dose',\n BIRTHDAY = 'birthday',\n}\n","export enum TipCategory {\n NUTRITION = 'nutrition',\n SAFETY = 'safety',\n HEALTH = 'health',\n GROOMING = 'grooming',\n BEHAVIOR = 'behavior',\n GENERAL = 'general',\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
@@ -179,6 +179,25 @@ var AppointmentType = /* @__PURE__ */ ((AppointmentType2) => {
179
179
  return AppointmentType2;
180
180
  })(AppointmentType || {});
181
181
 
182
+ // src/enums/agenda-item-type.ts
183
+ var AgendaItemType = /* @__PURE__ */ ((AgendaItemType2) => {
184
+ AgendaItemType2["APPOINTMENT"] = "appointment";
185
+ AgendaItemType2["TREATMENT_DOSE"] = "treatment_dose";
186
+ AgendaItemType2["BIRTHDAY"] = "birthday";
187
+ return AgendaItemType2;
188
+ })(AgendaItemType || {});
189
+
190
+ // src/enums/tip-category.ts
191
+ var TipCategory = /* @__PURE__ */ ((TipCategory2) => {
192
+ TipCategory2["NUTRITION"] = "nutrition";
193
+ TipCategory2["SAFETY"] = "safety";
194
+ TipCategory2["HEALTH"] = "health";
195
+ TipCategory2["GROOMING"] = "grooming";
196
+ TipCategory2["BEHAVIOR"] = "behavior";
197
+ TipCategory2["GENERAL"] = "general";
198
+ return TipCategory2;
199
+ })(TipCategory || {});
200
+
182
201
  // src/errors/BaseError.ts
183
202
  var BaseError = class extends Error {
184
203
  toErrorRecord() {
@@ -240,6 +259,6 @@ var UnauthorizedError = class _UnauthorizedError extends BaseError {
240
259
  }
241
260
  };
242
261
 
243
- export { AppointmentStatus, AppointmentType, AuthMethod, BaseError, BusinessError, CatBreed, DogBreed, DoseStatus, EmailProvider, Errors, ForbiddenError, Gender, HealthStatus, NotFoundError, OAuthProvider, PetStatus, ServerError, Species, TreatmentStatus, TreatmentType, UnauthorizedError, UserRole, WeightUnit, WorkerName };
262
+ export { AgendaItemType, AppointmentStatus, AppointmentType, AuthMethod, BaseError, BusinessError, CatBreed, DogBreed, DoseStatus, EmailProvider, Errors, ForbiddenError, Gender, HealthStatus, NotFoundError, OAuthProvider, PetStatus, ServerError, Species, TipCategory, TreatmentStatus, TreatmentType, UnauthorizedError, UserRole, WeightUnit, WorkerName };
244
263
  //# sourceMappingURL=index.mjs.map
245
264
  //# 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/enums/treatment-status.ts","../src/enums/dose-status.ts","../src/enums/treatment-type.ts","../src/enums/worker-name.ts","../src/enums/appointment-status.ts","../src/enums/appointment-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","WorkerName","AppointmentStatus","AppointmentType"],"mappings":";AAAO,IAAK,MAAA,qBAAAA,OAAAA,KAAL;A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O,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 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 enum WorkerName {\n EMAIL_NOTIFICATION_WORKER = 'email-notification-worker',\n}\n","export enum AppointmentStatus {\n PENDING = 'pending',\n CONFIRMED = 'confirmed',\n CANCELLED = 'cancelled',\n COMPLETED = 'completed',\n}\n","export enum AppointmentType {\n VETERINARY = 'veterinary',\n DENTAL = 'dental',\n GROOMING = 'grooming',\n TRAINING = 'training',\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"]}
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/enums/worker-name.ts","../src/enums/appointment-status.ts","../src/enums/appointment-type.ts","../src/enums/agenda-item-type.ts","../src/enums/tip-category.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","WorkerName","AppointmentStatus","AppointmentType","AgendaItemType","TipCategory"],"mappings":";AAAO,IAAK,MAAA,qBAAAA,OAAAA,KAAL;AACL,EAAAA,QAAA,iBAAA,CAAA,GAAkB,eAAA;AAClB,EAAAA,QAAA,gBAAA,CAAA,GAAiB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M,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAA,eAAA;AACL,IAAA,IAAA,CAAK,OAAA,GAAU,WAAW,EAAC;AAC3B,IAAA,MAAA,CAAO,cAAA,CAAe,IAAA,EAAM,cAAA,CAAc,SAAS,CAAA;AAAA,EACrD;AACF;;;ACRO,IAAM,WAAA,GAAN,MAAM,YAAA,SAAoB,SAAA,CAAU;AAAA,EAElC,WAAA,CAAY,SAAiB,OAAA,EAAmC;AACrE,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAA,aAAA;AACL,IAAA,IAAA,CAAK,OAAA,GAAU,WAAW,EAAC;AAC3B,IAAA,MAAA,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 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 enum WorkerName {\n EMAIL_NOTIFICATION_WORKER = 'email-notification-worker',\n}\n","export enum AppointmentStatus {\n PENDING = 'pending',\n CONFIRMED = 'confirmed',\n CANCELLED = 'cancelled',\n COMPLETED = 'completed',\n}\n","export enum AppointmentType {\n VETERINARY = 'veterinary',\n DENTAL = 'dental',\n GROOMING = 'grooming',\n TRAINING = 'training',\n OTHER = 'other',\n}\n","export enum AgendaItemType {\n APPOINTMENT = 'appointment',\n TREATMENT_DOSE = 'treatment_dose',\n BIRTHDAY = 'birthday',\n}\n","export enum TipCategory {\n NUTRITION = 'nutrition',\n SAFETY = 'safety',\n HEALTH = 'health',\n GROOMING = 'grooming',\n BEHAVIOR = 'behavior',\n GENERAL = 'general',\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.4.0",
3
+ "version": "1.6.0",
4
4
  "description": "Shared types, enums, and interfaces for Truffa projects",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",