@ipetsadmin/contracts 1.3.2 → 1.3.3
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 +7 -0
- package/dist/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -19,6 +19,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
19
19
|
|
|
20
20
|
### Security
|
|
21
21
|
|
|
22
|
+
## [1.3.3] - 2026-05-22
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- **`IPetRepository`**: **`addVaccine`** — appends a record to the pet’s **`vaccines`** array (`Pick<IVaccine, 'name' | 'laboratory' | 'lotNumber' | 'date'>`); returns the updated **`IPet`** (optional **`RepositoryOperationOptions`**).
|
|
27
|
+
- **`IPetService`**: **`addPetVaccine`** — verifies the pet exists and **`params.ownerId`** matches **`pet.ownerId`**, then persists via **`addVaccine`**; returns **`PetResponse`**. **`getPetVaccines`** — returns **`IVaccine[]`** for the pet; implementations enforce the same ownership rules as **`addPetVaccine`** (e.g. **`@ipetsadmin/api-main`** **`PetService`**).
|
|
28
|
+
|
|
22
29
|
## [1.3.2] - 2026-05-15
|
|
23
30
|
|
|
24
31
|
### Added
|
package/dist/index.d.mts
CHANGED
|
@@ -492,6 +492,7 @@ interface IPetRepository {
|
|
|
492
492
|
id: string;
|
|
493
493
|
input: Partial<CreatePetInput>;
|
|
494
494
|
}, options?: RepositoryOperationOptions): Promise<IPet | null>;
|
|
495
|
+
addVaccine(petId: string, input: Pick<IVaccine, 'name' | 'laboratory' | 'lotNumber' | 'date'>, options?: RepositoryOperationOptions): Promise<IPet>;
|
|
495
496
|
}
|
|
496
497
|
|
|
497
498
|
type RefreshTokenRecord = {
|
|
@@ -609,6 +610,12 @@ interface IPetService {
|
|
|
609
610
|
ownerId: string;
|
|
610
611
|
input: Partial<CreatePetInput>;
|
|
611
612
|
}, options?: RepositoryOperationOptions): Promise<PetResponse>;
|
|
613
|
+
addPetVaccine(params: {
|
|
614
|
+
petId: string;
|
|
615
|
+
ownerId: string;
|
|
616
|
+
input: Pick<IVaccine, 'name' | 'laboratory' | 'lotNumber' | 'date'>;
|
|
617
|
+
}, options?: RepositoryOperationOptions): Promise<PetResponse>;
|
|
618
|
+
getPetVaccines(petId: string, ownerId: string, options?: RepositoryOperationOptions): Promise<IVaccine[]>;
|
|
612
619
|
}
|
|
613
620
|
|
|
614
621
|
interface ITreatmentService {
|
|
@@ -701,4 +708,4 @@ declare class UnauthorizedError extends BaseError {
|
|
|
701
708
|
constructor(message: string, details?: Record<string, unknown>);
|
|
702
709
|
}
|
|
703
710
|
|
|
704
|
-
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 IApiResponse, type IAuth0GoogleOAuthService, type IAuthService, type IConfig, type IDose, type IDoseRepository, type IEmailConfig, type IEmailProviderAdapter, type IEmailService, type IEmailVerificationConfig, type IEmailVerificationTokenRepository, type IJwtTokensService, type IOAuthStateRepository, type IPaginatedResponse, type IPet, type IPetRepository, type IPetService, type IRefreshTokenRepository, type IServerInit, type ITreatment, type ITreatmentRepository, type ITreatmentService, type IUser, type IUserRepository, type IUserService, type LoginRequest, type LogoutRequest, NotFoundError, type OAuthAccessTokenResult, type OAuthGoogleCallbackRequest, type OAuthGoogleStartQuery, type OAuthGoogleStartResponse, OAuthProvider, type OAuthStateRecord, type PatchUserProfileInput, type PetResponse, PetStatus, type RefreshRequest, type RefreshTokenRecord, type RegisterRequest, type RepositoryOperationOptions, type SendEmailInput, type SendEmailResult, ServerError, Species, type TokenPair, type TreatmentResponse, TreatmentStatus, TreatmentType, UnauthorizedError, type UserProfileResponse, UserRole, type VerifyEmailRequest, WeightUnit, WorkerName };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -492,6 +492,7 @@ interface IPetRepository {
|
|
|
492
492
|
id: string;
|
|
493
493
|
input: Partial<CreatePetInput>;
|
|
494
494
|
}, options?: RepositoryOperationOptions): Promise<IPet | null>;
|
|
495
|
+
addVaccine(petId: string, input: Pick<IVaccine, 'name' | 'laboratory' | 'lotNumber' | 'date'>, options?: RepositoryOperationOptions): Promise<IPet>;
|
|
495
496
|
}
|
|
496
497
|
|
|
497
498
|
type RefreshTokenRecord = {
|
|
@@ -609,6 +610,12 @@ interface IPetService {
|
|
|
609
610
|
ownerId: string;
|
|
610
611
|
input: Partial<CreatePetInput>;
|
|
611
612
|
}, options?: RepositoryOperationOptions): Promise<PetResponse>;
|
|
613
|
+
addPetVaccine(params: {
|
|
614
|
+
petId: string;
|
|
615
|
+
ownerId: string;
|
|
616
|
+
input: Pick<IVaccine, 'name' | 'laboratory' | 'lotNumber' | 'date'>;
|
|
617
|
+
}, options?: RepositoryOperationOptions): Promise<PetResponse>;
|
|
618
|
+
getPetVaccines(petId: string, ownerId: string, options?: RepositoryOperationOptions): Promise<IVaccine[]>;
|
|
612
619
|
}
|
|
613
620
|
|
|
614
621
|
interface ITreatmentService {
|
|
@@ -701,4 +708,4 @@ declare class UnauthorizedError extends BaseError {
|
|
|
701
708
|
constructor(message: string, details?: Record<string, unknown>);
|
|
702
709
|
}
|
|
703
710
|
|
|
704
|
-
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 IApiResponse, type IAuth0GoogleOAuthService, type IAuthService, type IConfig, type IDose, type IDoseRepository, type IEmailConfig, type IEmailProviderAdapter, type IEmailService, type IEmailVerificationConfig, type IEmailVerificationTokenRepository, type IJwtTokensService, type IOAuthStateRepository, type IPaginatedResponse, type IPet, type IPetRepository, type IPetService, type IRefreshTokenRepository, type IServerInit, type ITreatment, type ITreatmentRepository, type ITreatmentService, type IUser, type IUserRepository, type IUserService, type LoginRequest, type LogoutRequest, NotFoundError, type OAuthAccessTokenResult, type OAuthGoogleCallbackRequest, type OAuthGoogleStartQuery, type OAuthGoogleStartResponse, OAuthProvider, type OAuthStateRecord, type PatchUserProfileInput, type PetResponse, PetStatus, type RefreshRequest, type RefreshTokenRecord, type RegisterRequest, type RepositoryOperationOptions, type SendEmailInput, type SendEmailResult, ServerError, Species, type TokenPair, type TreatmentResponse, TreatmentStatus, TreatmentType, UnauthorizedError, type UserProfileResponse, UserRole, type VerifyEmailRequest, WeightUnit, WorkerName };
|
|
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 };
|