@ipetsadmin/contracts 1.1.8 → 1.1.9

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,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
19
 
20
20
  ### Security
21
21
 
22
+ ## [1.1.9] - 2026-04-25
23
+
24
+ ### Added
25
+
26
+ - **`UserProfileResponse`**: id, account fields, and `profile` for the user profile API (no secrets).
27
+ - **`PatchUserProfileInput`**: partial profile update; **`avatar`** is intentionally excluded (separate upload flow).
28
+ - **`IUserService`**: `getProfileForUserId`, `patchProfileForUserId` (optional `RepositoryOperationOptions`).
29
+
22
30
  ## [1.1.8] - 2026-04-25
23
31
 
24
32
  ### Added
package/dist/index.d.mts CHANGED
@@ -169,6 +169,28 @@ type VerifyEmailRequest = {
169
169
  readonly token: string;
170
170
  };
171
171
 
172
+ type UserProfileResponse = Pick<IUser, 'id' | 'email' | 'emailVerified' | 'role' | 'isActive' | 'profile'>;
173
+
174
+ type PatchUserProfileInput = {
175
+ readonly firstName?: string;
176
+ readonly lastName?: string;
177
+ readonly fullName?: string;
178
+ readonly location?: {
179
+ readonly country?: string;
180
+ readonly city?: string;
181
+ readonly address?: string;
182
+ readonly postalCode?: string;
183
+ };
184
+ readonly phone?: string;
185
+ readonly email?: string;
186
+ readonly website?: string;
187
+ readonly social?: {
188
+ readonly twitter?: string;
189
+ readonly facebook?: string;
190
+ readonly instagram?: string;
191
+ };
192
+ };
193
+
172
194
  interface IConfig {
173
195
  port: number;
174
196
  cors: {
@@ -320,6 +342,11 @@ interface IEmailVerificationConfig {
320
342
  tokenExpiresInSeconds: number;
321
343
  }
322
344
 
345
+ interface IUserService {
346
+ getProfileForUserId(userId: string, options?: RepositoryOperationOptions): Promise<UserProfileResponse>;
347
+ patchProfileForUserId(userId: string, input: PatchUserProfileInput, options?: RepositoryOperationOptions): Promise<UserProfileResponse>;
348
+ }
349
+
323
350
  declare enum Errors {
324
351
  NOT_FOUND_ERROR = "NotFoundError",
325
352
  BUSINESS_ERROR = "BusinessError",
@@ -370,4 +397,4 @@ declare class UnauthorizedError extends BaseError {
370
397
  constructor(message: string, details?: Record<string, unknown>);
371
398
  }
372
399
 
373
- export { type Auth0AuthorizationParams, type Auth0UserProfile, AuthMethod, type AuthSessionResponse, type AuthUserResponse, BaseError, BusinessError, type CreateUserInput, type EmailAddress, EmailProvider, type EmailVerificationTokenRecord, Errors, ForbiddenError, type HealthCheck, HealthStatus, type IApiResponse, type IAuth0GoogleOAuthService, type IAuthService, type IConfig, type IEmailConfig, type IEmailProviderAdapter, type IEmailService, type IEmailVerificationConfig, type IEmailVerificationTokenRepository, type IJwtTokensService, type IOAuthStateRepository, type IPaginatedResponse, type IRefreshTokenRepository, type IServerInit, type IUser, type IUserRepository, type LoginRequest, type LogoutRequest, NotFoundError, type OAuthAccessTokenResult, type OAuthGoogleCallbackRequest, type OAuthGoogleStartQuery, type OAuthGoogleStartResponse, OAuthProvider, type OAuthStateRecord, type RefreshRequest, type RefreshTokenRecord, type RegisterRequest, type RepositoryOperationOptions, type SendEmailInput, type SendEmailResult, ServerError, type TokenPair, UnauthorizedError, UserRole, type VerifyEmailRequest };
400
+ export { type Auth0AuthorizationParams, type Auth0UserProfile, AuthMethod, type AuthSessionResponse, type AuthUserResponse, BaseError, BusinessError, type CreateUserInput, type EmailAddress, EmailProvider, type EmailVerificationTokenRecord, Errors, ForbiddenError, type HealthCheck, HealthStatus, type IApiResponse, type IAuth0GoogleOAuthService, type IAuthService, type IConfig, type IEmailConfig, type IEmailProviderAdapter, type IEmailService, type IEmailVerificationConfig, type IEmailVerificationTokenRepository, type IJwtTokensService, type IOAuthStateRepository, type IPaginatedResponse, type IRefreshTokenRepository, type IServerInit, type IUser, type IUserRepository, type IUserService, type LoginRequest, type LogoutRequest, NotFoundError, type OAuthAccessTokenResult, type OAuthGoogleCallbackRequest, type OAuthGoogleStartQuery, type OAuthGoogleStartResponse, OAuthProvider, type OAuthStateRecord, type PatchUserProfileInput, type RefreshRequest, type RefreshTokenRecord, type RegisterRequest, type RepositoryOperationOptions, type SendEmailInput, type SendEmailResult, ServerError, type TokenPair, UnauthorizedError, type UserProfileResponse, UserRole, type VerifyEmailRequest };
package/dist/index.d.ts CHANGED
@@ -169,6 +169,28 @@ type VerifyEmailRequest = {
169
169
  readonly token: string;
170
170
  };
171
171
 
172
+ type UserProfileResponse = Pick<IUser, 'id' | 'email' | 'emailVerified' | 'role' | 'isActive' | 'profile'>;
173
+
174
+ type PatchUserProfileInput = {
175
+ readonly firstName?: string;
176
+ readonly lastName?: string;
177
+ readonly fullName?: string;
178
+ readonly location?: {
179
+ readonly country?: string;
180
+ readonly city?: string;
181
+ readonly address?: string;
182
+ readonly postalCode?: string;
183
+ };
184
+ readonly phone?: string;
185
+ readonly email?: string;
186
+ readonly website?: string;
187
+ readonly social?: {
188
+ readonly twitter?: string;
189
+ readonly facebook?: string;
190
+ readonly instagram?: string;
191
+ };
192
+ };
193
+
172
194
  interface IConfig {
173
195
  port: number;
174
196
  cors: {
@@ -320,6 +342,11 @@ interface IEmailVerificationConfig {
320
342
  tokenExpiresInSeconds: number;
321
343
  }
322
344
 
345
+ interface IUserService {
346
+ getProfileForUserId(userId: string, options?: RepositoryOperationOptions): Promise<UserProfileResponse>;
347
+ patchProfileForUserId(userId: string, input: PatchUserProfileInput, options?: RepositoryOperationOptions): Promise<UserProfileResponse>;
348
+ }
349
+
323
350
  declare enum Errors {
324
351
  NOT_FOUND_ERROR = "NotFoundError",
325
352
  BUSINESS_ERROR = "BusinessError",
@@ -370,4 +397,4 @@ declare class UnauthorizedError extends BaseError {
370
397
  constructor(message: string, details?: Record<string, unknown>);
371
398
  }
372
399
 
373
- export { type Auth0AuthorizationParams, type Auth0UserProfile, AuthMethod, type AuthSessionResponse, type AuthUserResponse, BaseError, BusinessError, type CreateUserInput, type EmailAddress, EmailProvider, type EmailVerificationTokenRecord, Errors, ForbiddenError, type HealthCheck, HealthStatus, type IApiResponse, type IAuth0GoogleOAuthService, type IAuthService, type IConfig, type IEmailConfig, type IEmailProviderAdapter, type IEmailService, type IEmailVerificationConfig, type IEmailVerificationTokenRepository, type IJwtTokensService, type IOAuthStateRepository, type IPaginatedResponse, type IRefreshTokenRepository, type IServerInit, type IUser, type IUserRepository, type LoginRequest, type LogoutRequest, NotFoundError, type OAuthAccessTokenResult, type OAuthGoogleCallbackRequest, type OAuthGoogleStartQuery, type OAuthGoogleStartResponse, OAuthProvider, type OAuthStateRecord, type RefreshRequest, type RefreshTokenRecord, type RegisterRequest, type RepositoryOperationOptions, type SendEmailInput, type SendEmailResult, ServerError, type TokenPair, UnauthorizedError, UserRole, type VerifyEmailRequest };
400
+ export { type Auth0AuthorizationParams, type Auth0UserProfile, AuthMethod, type AuthSessionResponse, type AuthUserResponse, BaseError, BusinessError, type CreateUserInput, type EmailAddress, EmailProvider, type EmailVerificationTokenRecord, Errors, ForbiddenError, type HealthCheck, HealthStatus, type IApiResponse, type IAuth0GoogleOAuthService, type IAuthService, type IConfig, type IEmailConfig, type IEmailProviderAdapter, type IEmailService, type IEmailVerificationConfig, type IEmailVerificationTokenRepository, type IJwtTokensService, type IOAuthStateRepository, type IPaginatedResponse, type IRefreshTokenRepository, type IServerInit, type IUser, type IUserRepository, type IUserService, type LoginRequest, type LogoutRequest, NotFoundError, type OAuthAccessTokenResult, type OAuthGoogleCallbackRequest, type OAuthGoogleStartQuery, type OAuthGoogleStartResponse, OAuthProvider, type OAuthStateRecord, type PatchUserProfileInput, type RefreshRequest, type RefreshTokenRecord, type RegisterRequest, type RepositoryOperationOptions, type SendEmailInput, type SendEmailResult, ServerError, type TokenPair, UnauthorizedError, type UserProfileResponse, UserRole, type VerifyEmailRequest };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ipetsadmin/contracts",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "Shared types, enums, and interfaces for Truffa projects",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",