@ipetsadmin/contracts 1.6.0 → 1.7.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 +9 -0
- package/dist/index.d.mts +13 -3
- package/dist/index.d.ts +13 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -19,6 +19,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
19
19
|
|
|
20
20
|
### Security
|
|
21
21
|
|
|
22
|
+
## [1.7.0] - 2026-06-12
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- **`IVaccine.sourceTreatmentId`** — optional link when a vaccine record is synced from a completed vaccination treatment.
|
|
27
|
+
- **`VaccinationCompletionInput`** (`laboratory`, `lotNumber`, `administeredAt`) for treatment completion sync.
|
|
28
|
+
- **`ITreatmentService.createTreatment`** optional third arg **`extras.vaccinationDetails`** (retrospective completed vaccination).
|
|
29
|
+
- **`ITreatmentService.updateTreatmentStatus`** optional **`vaccinationDetails`** when completing a vaccination treatment.
|
|
30
|
+
|
|
22
31
|
## [1.6.0] - 2026-06-12
|
|
23
32
|
|
|
24
33
|
### Added
|
package/dist/index.d.mts
CHANGED
|
@@ -120,6 +120,7 @@ interface IVaccine {
|
|
|
120
120
|
laboratory: string;
|
|
121
121
|
lotNumber: string;
|
|
122
122
|
date: Date;
|
|
123
|
+
sourceTreatmentId?: string;
|
|
123
124
|
}
|
|
124
125
|
interface IBasePet {
|
|
125
126
|
id: string;
|
|
@@ -436,6 +437,12 @@ type CreateTreatmentInput = {
|
|
|
436
437
|
endDate?: Date;
|
|
437
438
|
};
|
|
438
439
|
|
|
440
|
+
type VaccinationCompletionInput = {
|
|
441
|
+
laboratory: string;
|
|
442
|
+
lotNumber: string;
|
|
443
|
+
administeredAt: Date;
|
|
444
|
+
};
|
|
445
|
+
|
|
439
446
|
type CreateDoseInput = {
|
|
440
447
|
treatmentId: string;
|
|
441
448
|
petId: string;
|
|
@@ -618,7 +625,7 @@ interface IPetRepository {
|
|
|
618
625
|
id: string;
|
|
619
626
|
input: Partial<CreatePetInput>;
|
|
620
627
|
}, options?: RepositoryOperationOptions): Promise<IPet | null>;
|
|
621
|
-
addVaccine(petId: string, input: Pick<IVaccine, 'name' | 'laboratory' | 'lotNumber' | 'date'>, options?: RepositoryOperationOptions): Promise<IPet>;
|
|
628
|
+
addVaccine(petId: string, input: Pick<IVaccine, 'name' | 'laboratory' | 'lotNumber' | 'date' | 'sourceTreatmentId'>, options?: RepositoryOperationOptions): Promise<IPet>;
|
|
622
629
|
}
|
|
623
630
|
|
|
624
631
|
type RefreshTokenRecord = {
|
|
@@ -772,7 +779,9 @@ interface IPetService {
|
|
|
772
779
|
}
|
|
773
780
|
|
|
774
781
|
interface ITreatmentService {
|
|
775
|
-
createTreatment(input: CreateTreatmentInput, options?: RepositoryOperationOptions
|
|
782
|
+
createTreatment(input: CreateTreatmentInput, options?: RepositoryOperationOptions, extras?: {
|
|
783
|
+
vaccinationDetails?: VaccinationCompletionInput;
|
|
784
|
+
}): Promise<ITreatment>;
|
|
776
785
|
updateTreatment(params: {
|
|
777
786
|
id: string;
|
|
778
787
|
petId: string;
|
|
@@ -784,6 +793,7 @@ interface ITreatmentService {
|
|
|
784
793
|
petId: string;
|
|
785
794
|
ownerId: string;
|
|
786
795
|
status: TreatmentStatus;
|
|
796
|
+
vaccinationDetails?: VaccinationCompletionInput;
|
|
787
797
|
}, options?: RepositoryOperationOptions): Promise<ITreatment>;
|
|
788
798
|
getTreatmentById(params: {
|
|
789
799
|
id: string;
|
|
@@ -896,4 +906,4 @@ declare class UnauthorizedError extends BaseError {
|
|
|
896
906
|
constructor(message: string, details?: Record<string, unknown>);
|
|
897
907
|
}
|
|
898
908
|
|
|
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 };
|
|
909
|
+
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 VaccinationCompletionInput, type VerifyEmailRequest, WeightUnit, WorkerName };
|
package/dist/index.d.ts
CHANGED
|
@@ -120,6 +120,7 @@ interface IVaccine {
|
|
|
120
120
|
laboratory: string;
|
|
121
121
|
lotNumber: string;
|
|
122
122
|
date: Date;
|
|
123
|
+
sourceTreatmentId?: string;
|
|
123
124
|
}
|
|
124
125
|
interface IBasePet {
|
|
125
126
|
id: string;
|
|
@@ -436,6 +437,12 @@ type CreateTreatmentInput = {
|
|
|
436
437
|
endDate?: Date;
|
|
437
438
|
};
|
|
438
439
|
|
|
440
|
+
type VaccinationCompletionInput = {
|
|
441
|
+
laboratory: string;
|
|
442
|
+
lotNumber: string;
|
|
443
|
+
administeredAt: Date;
|
|
444
|
+
};
|
|
445
|
+
|
|
439
446
|
type CreateDoseInput = {
|
|
440
447
|
treatmentId: string;
|
|
441
448
|
petId: string;
|
|
@@ -618,7 +625,7 @@ interface IPetRepository {
|
|
|
618
625
|
id: string;
|
|
619
626
|
input: Partial<CreatePetInput>;
|
|
620
627
|
}, options?: RepositoryOperationOptions): Promise<IPet | null>;
|
|
621
|
-
addVaccine(petId: string, input: Pick<IVaccine, 'name' | 'laboratory' | 'lotNumber' | 'date'>, options?: RepositoryOperationOptions): Promise<IPet>;
|
|
628
|
+
addVaccine(petId: string, input: Pick<IVaccine, 'name' | 'laboratory' | 'lotNumber' | 'date' | 'sourceTreatmentId'>, options?: RepositoryOperationOptions): Promise<IPet>;
|
|
622
629
|
}
|
|
623
630
|
|
|
624
631
|
type RefreshTokenRecord = {
|
|
@@ -772,7 +779,9 @@ interface IPetService {
|
|
|
772
779
|
}
|
|
773
780
|
|
|
774
781
|
interface ITreatmentService {
|
|
775
|
-
createTreatment(input: CreateTreatmentInput, options?: RepositoryOperationOptions
|
|
782
|
+
createTreatment(input: CreateTreatmentInput, options?: RepositoryOperationOptions, extras?: {
|
|
783
|
+
vaccinationDetails?: VaccinationCompletionInput;
|
|
784
|
+
}): Promise<ITreatment>;
|
|
776
785
|
updateTreatment(params: {
|
|
777
786
|
id: string;
|
|
778
787
|
petId: string;
|
|
@@ -784,6 +793,7 @@ interface ITreatmentService {
|
|
|
784
793
|
petId: string;
|
|
785
794
|
ownerId: string;
|
|
786
795
|
status: TreatmentStatus;
|
|
796
|
+
vaccinationDetails?: VaccinationCompletionInput;
|
|
787
797
|
}, options?: RepositoryOperationOptions): Promise<ITreatment>;
|
|
788
798
|
getTreatmentById(params: {
|
|
789
799
|
id: string;
|
|
@@ -896,4 +906,4 @@ declare class UnauthorizedError extends BaseError {
|
|
|
896
906
|
constructor(message: string, details?: Record<string, unknown>);
|
|
897
907
|
}
|
|
898
908
|
|
|
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 };
|
|
909
|
+
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 VaccinationCompletionInput, type VerifyEmailRequest, WeightUnit, WorkerName };
|