@ipetsadmin/contracts 1.3.3 → 1.4.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,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
19
 
20
20
  ### Security
21
21
 
22
+ ## [1.4.0] - 2026-06-12
23
+
24
+ ### Added
25
+
26
+ - **`AppointmentType`** enum (`src/enums/appointment-type.ts`): **`veterinary`**, **`dental`**, **`grooming`**, **`training`**, **`other`**.
27
+ - **`IAppointment`** entity (expanded): **`scheduledAt`**, **`appointmentType`**, nested **`provider`** (**`IAppointmentProvider`**) and **`location`** (**`IAppointmentLocation`**), optional **`durationMinutes`**, **`reason`**, **`notes`**, **`completedAt`**, **`cancelledAt`**; **`status`** uses **`AppointmentStatus`**.
28
+ - **`CreateAppointmentInput`**, **`AppointmentResponse`** under **`src/types/appointment/`**.
29
+ - **`IAppointmentRepository`**: **`create`**, **`update`**, **`findById`**, **`findByPetId`**, **`delete`** (optional **`RepositoryOperationOptions`**).
30
+ - **`IAppointmentService`**: **`createAppointment`**, **`updateAppointment`**, **`updateAppointmentStatus`**, **`getAppointmentById`**, **`getAppointmentsByPetId`**, **`deleteAppointment`**.
31
+ - Barrel exports for appointment types, ports, and nested provider/location types from **`src/index.ts`**.
32
+
22
33
  ## [1.3.3] - 2026-05-22
23
34
 
24
35
  ### Added
package/dist/index.d.mts CHANGED
@@ -211,6 +211,53 @@ interface IDose {
211
211
  updatedAt: Date;
212
212
  }
213
213
 
214
+ declare enum AppointmentStatus {
215
+ PENDING = "pending",
216
+ CONFIRMED = "confirmed",
217
+ CANCELLED = "cancelled",
218
+ COMPLETED = "completed"
219
+ }
220
+
221
+ declare enum AppointmentType {
222
+ VETERINARY = "veterinary",
223
+ DENTAL = "dental",
224
+ GROOMING = "grooming",
225
+ TRAINING = "training",
226
+ OTHER = "other"
227
+ }
228
+
229
+ interface IAppointmentProvider {
230
+ name: string;
231
+ organizationName?: string;
232
+ phone?: string;
233
+ email?: string;
234
+ }
235
+ interface IAppointmentLocation {
236
+ locationName: string;
237
+ address: string;
238
+ city: string;
239
+ state?: string;
240
+ zip?: string;
241
+ country?: string;
242
+ }
243
+ interface IAppointment {
244
+ id: string;
245
+ petId: string;
246
+ ownerId: string;
247
+ appointmentType: AppointmentType;
248
+ scheduledAt: Date;
249
+ durationMinutes?: number;
250
+ provider: IAppointmentProvider;
251
+ location: IAppointmentLocation;
252
+ reason?: string;
253
+ notes?: string;
254
+ status: AppointmentStatus;
255
+ completedAt?: Date;
256
+ cancelledAt?: Date;
257
+ createdAt: Date;
258
+ updatedAt: Date;
259
+ }
260
+
214
261
  declare enum HealthStatus {
215
262
  HEALTHY = "healthy",
216
263
  UNHEALTHY = "unhealthy"
@@ -377,6 +424,19 @@ type CreateDoseInput = {
377
424
  notes?: string;
378
425
  };
379
426
 
427
+ type CreateAppointmentInput = {
428
+ petId: string;
429
+ ownerId: string;
430
+ appointmentType: AppointmentType;
431
+ scheduledAt: Date;
432
+ durationMinutes?: number;
433
+ provider: IAppointmentProvider;
434
+ location: IAppointmentLocation;
435
+ reason?: string;
436
+ notes?: string;
437
+ status: AppointmentStatus;
438
+ };
439
+
380
440
  type OAuthAccessTokenResult = {
381
441
  readonly accessToken: string;
382
442
  };
@@ -395,6 +455,8 @@ type TreatmentResponse = ITreatment;
395
455
 
396
456
  type DoseResponse = IDose;
397
457
 
458
+ type AppointmentResponse = IAppointment;
459
+
398
460
  type OAuthGoogleStartResponse = {
399
461
  readonly authorizationUrl: string;
400
462
  readonly state: string;
@@ -550,6 +612,17 @@ interface IDoseRepository {
550
612
  deleteByTreatmentId(treatmentId: string, options?: RepositoryOperationOptions): Promise<void>;
551
613
  }
552
614
 
615
+ interface IAppointmentRepository {
616
+ create(input: CreateAppointmentInput, options?: RepositoryOperationOptions): Promise<IAppointment>;
617
+ update(params: {
618
+ id: string;
619
+ patch: Partial<CreateAppointmentInput> & Partial<Pick<IAppointment, 'completedAt' | 'cancelledAt'>>;
620
+ }, options?: RepositoryOperationOptions): Promise<void>;
621
+ findById(id: string, options?: RepositoryOperationOptions): Promise<IAppointment | null>;
622
+ findByPetId(petId: string, options?: RepositoryOperationOptions): Promise<IAppointment[]>;
623
+ delete(id: string, options?: RepositoryOperationOptions): Promise<void>;
624
+ }
625
+
553
626
  interface IAuthService {
554
627
  register(email: string, password: string, options?: RepositoryOperationOptions): Promise<AuthSessionResponse>;
555
628
  loginWithUser(user: IUser, options?: RepositoryOperationOptions): Promise<AuthSessionResponse>;
@@ -654,6 +727,33 @@ interface ITreatmentService {
654
727
  }, options?: RepositoryOperationOptions): Promise<IDose>;
655
728
  }
656
729
 
730
+ interface IAppointmentService {
731
+ createAppointment(input: CreateAppointmentInput, options?: RepositoryOperationOptions): Promise<IAppointment>;
732
+ updateAppointment(params: {
733
+ id: string;
734
+ petId: string;
735
+ ownerId: string;
736
+ input: Partial<Omit<CreateAppointmentInput, 'petId' | 'ownerId' | 'status'>>;
737
+ }, options?: RepositoryOperationOptions): Promise<IAppointment>;
738
+ updateAppointmentStatus(params: {
739
+ id: string;
740
+ petId: string;
741
+ ownerId: string;
742
+ status: AppointmentStatus;
743
+ }, options?: RepositoryOperationOptions): Promise<IAppointment>;
744
+ getAppointmentById(params: {
745
+ id: string;
746
+ petId: string;
747
+ ownerId: string;
748
+ }, options?: RepositoryOperationOptions): Promise<IAppointment>;
749
+ getAppointmentsByPetId(petId: string, options?: RepositoryOperationOptions): Promise<IAppointment[]>;
750
+ deleteAppointment(params: {
751
+ id: string;
752
+ petId: string;
753
+ ownerId: string;
754
+ }, options?: RepositoryOperationOptions): Promise<void>;
755
+ }
756
+
657
757
  declare enum Errors {
658
758
  NOT_FOUND_ERROR = "NotFoundError",
659
759
  BUSINESS_ERROR = "BusinessError",
@@ -708,4 +808,4 @@ declare class UnauthorizedError extends BaseError {
708
808
  constructor(message: string, details?: Record<string, unknown>);
709
809
  }
710
810
 
711
- export { type Auth0AuthorizationParams, type Auth0UserProfile, AuthMethod, type AuthSessionResponse, type AuthUserResponse, BaseError, BusinessError, CatBreed, 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 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 };
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 };
package/dist/index.d.ts CHANGED
@@ -211,6 +211,53 @@ interface IDose {
211
211
  updatedAt: Date;
212
212
  }
213
213
 
214
+ declare enum AppointmentStatus {
215
+ PENDING = "pending",
216
+ CONFIRMED = "confirmed",
217
+ CANCELLED = "cancelled",
218
+ COMPLETED = "completed"
219
+ }
220
+
221
+ declare enum AppointmentType {
222
+ VETERINARY = "veterinary",
223
+ DENTAL = "dental",
224
+ GROOMING = "grooming",
225
+ TRAINING = "training",
226
+ OTHER = "other"
227
+ }
228
+
229
+ interface IAppointmentProvider {
230
+ name: string;
231
+ organizationName?: string;
232
+ phone?: string;
233
+ email?: string;
234
+ }
235
+ interface IAppointmentLocation {
236
+ locationName: string;
237
+ address: string;
238
+ city: string;
239
+ state?: string;
240
+ zip?: string;
241
+ country?: string;
242
+ }
243
+ interface IAppointment {
244
+ id: string;
245
+ petId: string;
246
+ ownerId: string;
247
+ appointmentType: AppointmentType;
248
+ scheduledAt: Date;
249
+ durationMinutes?: number;
250
+ provider: IAppointmentProvider;
251
+ location: IAppointmentLocation;
252
+ reason?: string;
253
+ notes?: string;
254
+ status: AppointmentStatus;
255
+ completedAt?: Date;
256
+ cancelledAt?: Date;
257
+ createdAt: Date;
258
+ updatedAt: Date;
259
+ }
260
+
214
261
  declare enum HealthStatus {
215
262
  HEALTHY = "healthy",
216
263
  UNHEALTHY = "unhealthy"
@@ -377,6 +424,19 @@ type CreateDoseInput = {
377
424
  notes?: string;
378
425
  };
379
426
 
427
+ type CreateAppointmentInput = {
428
+ petId: string;
429
+ ownerId: string;
430
+ appointmentType: AppointmentType;
431
+ scheduledAt: Date;
432
+ durationMinutes?: number;
433
+ provider: IAppointmentProvider;
434
+ location: IAppointmentLocation;
435
+ reason?: string;
436
+ notes?: string;
437
+ status: AppointmentStatus;
438
+ };
439
+
380
440
  type OAuthAccessTokenResult = {
381
441
  readonly accessToken: string;
382
442
  };
@@ -395,6 +455,8 @@ type TreatmentResponse = ITreatment;
395
455
 
396
456
  type DoseResponse = IDose;
397
457
 
458
+ type AppointmentResponse = IAppointment;
459
+
398
460
  type OAuthGoogleStartResponse = {
399
461
  readonly authorizationUrl: string;
400
462
  readonly state: string;
@@ -550,6 +612,17 @@ interface IDoseRepository {
550
612
  deleteByTreatmentId(treatmentId: string, options?: RepositoryOperationOptions): Promise<void>;
551
613
  }
552
614
 
615
+ interface IAppointmentRepository {
616
+ create(input: CreateAppointmentInput, options?: RepositoryOperationOptions): Promise<IAppointment>;
617
+ update(params: {
618
+ id: string;
619
+ patch: Partial<CreateAppointmentInput> & Partial<Pick<IAppointment, 'completedAt' | 'cancelledAt'>>;
620
+ }, options?: RepositoryOperationOptions): Promise<void>;
621
+ findById(id: string, options?: RepositoryOperationOptions): Promise<IAppointment | null>;
622
+ findByPetId(petId: string, options?: RepositoryOperationOptions): Promise<IAppointment[]>;
623
+ delete(id: string, options?: RepositoryOperationOptions): Promise<void>;
624
+ }
625
+
553
626
  interface IAuthService {
554
627
  register(email: string, password: string, options?: RepositoryOperationOptions): Promise<AuthSessionResponse>;
555
628
  loginWithUser(user: IUser, options?: RepositoryOperationOptions): Promise<AuthSessionResponse>;
@@ -654,6 +727,33 @@ interface ITreatmentService {
654
727
  }, options?: RepositoryOperationOptions): Promise<IDose>;
655
728
  }
656
729
 
730
+ interface IAppointmentService {
731
+ createAppointment(input: CreateAppointmentInput, options?: RepositoryOperationOptions): Promise<IAppointment>;
732
+ updateAppointment(params: {
733
+ id: string;
734
+ petId: string;
735
+ ownerId: string;
736
+ input: Partial<Omit<CreateAppointmentInput, 'petId' | 'ownerId' | 'status'>>;
737
+ }, options?: RepositoryOperationOptions): Promise<IAppointment>;
738
+ updateAppointmentStatus(params: {
739
+ id: string;
740
+ petId: string;
741
+ ownerId: string;
742
+ status: AppointmentStatus;
743
+ }, options?: RepositoryOperationOptions): Promise<IAppointment>;
744
+ getAppointmentById(params: {
745
+ id: string;
746
+ petId: string;
747
+ ownerId: string;
748
+ }, options?: RepositoryOperationOptions): Promise<IAppointment>;
749
+ getAppointmentsByPetId(petId: string, options?: RepositoryOperationOptions): Promise<IAppointment[]>;
750
+ deleteAppointment(params: {
751
+ id: string;
752
+ petId: string;
753
+ ownerId: string;
754
+ }, options?: RepositoryOperationOptions): Promise<void>;
755
+ }
756
+
657
757
  declare enum Errors {
658
758
  NOT_FOUND_ERROR = "NotFoundError",
659
759
  BUSINESS_ERROR = "BusinessError",
@@ -708,4 +808,4 @@ declare class UnauthorizedError extends BaseError {
708
808
  constructor(message: string, details?: Record<string, unknown>);
709
809
  }
710
810
 
711
- export { type Auth0AuthorizationParams, type Auth0UserProfile, AuthMethod, type AuthSessionResponse, type AuthUserResponse, BaseError, BusinessError, CatBreed, 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 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 };
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 };
package/dist/index.js CHANGED
@@ -162,6 +162,25 @@ var WorkerName = /* @__PURE__ */ ((WorkerName2) => {
162
162
  return WorkerName2;
163
163
  })(WorkerName || {});
164
164
 
165
+ // src/enums/appointment-status.ts
166
+ var AppointmentStatus = /* @__PURE__ */ ((AppointmentStatus2) => {
167
+ AppointmentStatus2["PENDING"] = "pending";
168
+ AppointmentStatus2["CONFIRMED"] = "confirmed";
169
+ AppointmentStatus2["CANCELLED"] = "cancelled";
170
+ AppointmentStatus2["COMPLETED"] = "completed";
171
+ return AppointmentStatus2;
172
+ })(AppointmentStatus || {});
173
+
174
+ // src/enums/appointment-type.ts
175
+ var AppointmentType = /* @__PURE__ */ ((AppointmentType2) => {
176
+ AppointmentType2["VETERINARY"] = "veterinary";
177
+ AppointmentType2["DENTAL"] = "dental";
178
+ AppointmentType2["GROOMING"] = "grooming";
179
+ AppointmentType2["TRAINING"] = "training";
180
+ AppointmentType2["OTHER"] = "other";
181
+ return AppointmentType2;
182
+ })(AppointmentType || {});
183
+
165
184
  // src/errors/BaseError.ts
166
185
  var BaseError = class extends Error {
167
186
  toErrorRecord() {
@@ -223,6 +242,8 @@ var UnauthorizedError = class _UnauthorizedError extends BaseError {
223
242
  }
224
243
  };
225
244
 
245
+ exports.AppointmentStatus = AppointmentStatus;
246
+ exports.AppointmentType = AppointmentType;
226
247
  exports.AuthMethod = AuthMethod;
227
248
  exports.BaseError = BaseError;
228
249
  exports.BusinessError = BusinessError;
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/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"],"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,C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AY,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 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/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,QAA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AAS,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"]}
package/dist/index.mjs CHANGED
@@ -160,6 +160,25 @@ var WorkerName = /* @__PURE__ */ ((WorkerName2) => {
160
160
  return WorkerName2;
161
161
  })(WorkerName || {});
162
162
 
163
+ // src/enums/appointment-status.ts
164
+ var AppointmentStatus = /* @__PURE__ */ ((AppointmentStatus2) => {
165
+ AppointmentStatus2["PENDING"] = "pending";
166
+ AppointmentStatus2["CONFIRMED"] = "confirmed";
167
+ AppointmentStatus2["CANCELLED"] = "cancelled";
168
+ AppointmentStatus2["COMPLETED"] = "completed";
169
+ return AppointmentStatus2;
170
+ })(AppointmentStatus || {});
171
+
172
+ // src/enums/appointment-type.ts
173
+ var AppointmentType = /* @__PURE__ */ ((AppointmentType2) => {
174
+ AppointmentType2["VETERINARY"] = "veterinary";
175
+ AppointmentType2["DENTAL"] = "dental";
176
+ AppointmentType2["GROOMING"] = "grooming";
177
+ AppointmentType2["TRAINING"] = "training";
178
+ AppointmentType2["OTHER"] = "other";
179
+ return AppointmentType2;
180
+ })(AppointmentType || {});
181
+
163
182
  // src/errors/BaseError.ts
164
183
  var BaseError = class extends Error {
165
184
  toErrorRecord() {
@@ -221,6 +240,6 @@ var UnauthorizedError = class _UnauthorizedError extends BaseError {
221
240
  }
222
241
  };
223
242
 
224
- export { AuthMethod, BaseError, BusinessError, CatBreed, DogBreed, DoseStatus, EmailProvider, Errors, ForbiddenError, Gender, HealthStatus, NotFoundError, OAuthProvider, PetStatus, ServerError, Species, TreatmentStatus, TreatmentType, UnauthorizedError, UserRole, WeightUnit, WorkerName };
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 };
225
244
  //# sourceMappingURL=index.mjs.map
226
245
  //# 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/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"],"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,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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 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/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,CA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AAU,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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ipetsadmin/contracts",
3
- "version": "1.3.3",
3
+ "version": "1.4.0",
4
4
  "description": "Shared types, enums, and interfaces for Truffa projects",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",