@ipetsadmin/contracts 1.1.6 → 1.1.8

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,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
19
 
20
20
  ### Security
21
21
 
22
+ ## [1.1.8] - 2026-04-25
23
+
24
+ ### Added
25
+
26
+ - **`Auth0UserProfile`**: optional OIDC fields from Auth0 **`/userinfo`** (`name`, `given_name`, `family_name`, `picture`, `nickname`, `locale`) for Google / social flows.
27
+ - **`CreateUserInput`**: optional **`profile`** (`IUser['profile']`) for persisting IdP profile on OAuth sign-up.
28
+
29
+ ### Changed
30
+
31
+ - **`IUserRepository.update`**: **`patch`** may include **`profile`** (e.g. admin or in-app profile edits; not used for OAuth re-login profile sync in `api-main` by default).
32
+
33
+ ## [1.1.7] - 2026-04-25
34
+
35
+ ## Added
36
+
37
+ - **VerifyEmailRequest**: Add request type for be used in client function
38
+
22
39
  ## [1.1.6] - 2026-04-25
23
40
 
24
41
  ### Added
package/dist/index.d.mts CHANGED
@@ -116,12 +116,19 @@ type CreateUserInput = {
116
116
  readonly provider: OAuthProvider;
117
117
  readonly providerSubject: string;
118
118
  };
119
+ readonly profile?: IUser['profile'];
119
120
  };
120
121
 
121
122
  type Auth0UserProfile = {
122
123
  readonly sub: string;
123
124
  readonly email?: string;
124
125
  readonly email_verified?: boolean;
126
+ readonly name?: string;
127
+ readonly given_name?: string;
128
+ readonly family_name?: string;
129
+ readonly picture?: string;
130
+ readonly nickname?: string;
131
+ readonly locale?: string;
125
132
  };
126
133
 
127
134
  type Auth0AuthorizationParams = {
@@ -158,6 +165,10 @@ type SendEmailResult = {
158
165
  accepted: boolean;
159
166
  };
160
167
 
168
+ type VerifyEmailRequest = {
169
+ readonly token: string;
170
+ };
171
+
161
172
  interface IConfig {
162
173
  port: number;
163
174
  cors: {
@@ -222,7 +233,7 @@ interface IUserRepository {
222
233
  findById(id: string, options?: RepositoryOperationOptions): Promise<IUser | null>;
223
234
  findByEmail(email: string, options?: RepositoryOperationOptions): Promise<IUser | null>;
224
235
  findByOAuth(provider: OAuthProvider, providerSubject: string, options?: RepositoryOperationOptions): Promise<IUser | null>;
225
- update(id: string, patch: Partial<Pick<IUser, 'email' | 'emailVerified' | 'authMethod' | 'oauth'>> & {
236
+ update(id: string, patch: Partial<Pick<IUser, 'email' | 'emailVerified' | 'authMethod' | 'oauth' | 'profile'>> & {
226
237
  passwordHash?: string | null;
227
238
  }, options?: RepositoryOperationOptions): Promise<void>;
228
239
  }
@@ -359,4 +370,4 @@ declare class UnauthorizedError extends BaseError {
359
370
  constructor(message: string, details?: Record<string, unknown>);
360
371
  }
361
372
 
362
- 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 };
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 };
package/dist/index.d.ts CHANGED
@@ -116,12 +116,19 @@ type CreateUserInput = {
116
116
  readonly provider: OAuthProvider;
117
117
  readonly providerSubject: string;
118
118
  };
119
+ readonly profile?: IUser['profile'];
119
120
  };
120
121
 
121
122
  type Auth0UserProfile = {
122
123
  readonly sub: string;
123
124
  readonly email?: string;
124
125
  readonly email_verified?: boolean;
126
+ readonly name?: string;
127
+ readonly given_name?: string;
128
+ readonly family_name?: string;
129
+ readonly picture?: string;
130
+ readonly nickname?: string;
131
+ readonly locale?: string;
125
132
  };
126
133
 
127
134
  type Auth0AuthorizationParams = {
@@ -158,6 +165,10 @@ type SendEmailResult = {
158
165
  accepted: boolean;
159
166
  };
160
167
 
168
+ type VerifyEmailRequest = {
169
+ readonly token: string;
170
+ };
171
+
161
172
  interface IConfig {
162
173
  port: number;
163
174
  cors: {
@@ -222,7 +233,7 @@ interface IUserRepository {
222
233
  findById(id: string, options?: RepositoryOperationOptions): Promise<IUser | null>;
223
234
  findByEmail(email: string, options?: RepositoryOperationOptions): Promise<IUser | null>;
224
235
  findByOAuth(provider: OAuthProvider, providerSubject: string, options?: RepositoryOperationOptions): Promise<IUser | null>;
225
- update(id: string, patch: Partial<Pick<IUser, 'email' | 'emailVerified' | 'authMethod' | 'oauth'>> & {
236
+ update(id: string, patch: Partial<Pick<IUser, 'email' | 'emailVerified' | 'authMethod' | 'oauth' | 'profile'>> & {
226
237
  passwordHash?: string | null;
227
238
  }, options?: RepositoryOperationOptions): Promise<void>;
228
239
  }
@@ -359,4 +370,4 @@ declare class UnauthorizedError extends BaseError {
359
370
  constructor(message: string, details?: Record<string, unknown>);
360
371
  }
361
372
 
362
- 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 };
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ipetsadmin/contracts",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "Shared types, enums, and interfaces for Truffa projects",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",