Skip to content

Commit 69a5808

Browse files
committed
UploadProfilePicture
1 parent c7f7b37 commit 69a5808

File tree

4 files changed

+102
-1
lines changed

4 files changed

+102
-1
lines changed

model/equaliq.smithy

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ service EqualIQ {
1919
GetContractReadURL
2020
GetProfile
2121
GetProfilePicture
22+
UploadProfilePicture
2223
UpdateProfile
2324
Ping
2425
]
@@ -388,6 +389,28 @@ structure GetProfilePictureOutput {
388389
profilePictureURL: String
389390
}
390391

392+
393+
@http(method: "POST", uri: "/uploadProfilePicture")
394+
operation UploadProfilePicture {
395+
input: UploadProfilePictureInput
396+
output: UploadProfilePictureOutput
397+
errors: [
398+
AuthenticationError
399+
ResourceNotFoundError
400+
InternalServerError
401+
]
402+
}
403+
404+
structure UploadProfilePictureInput {
405+
image: String,
406+
userId: UserId
407+
}
408+
409+
structure UploadProfilePictureOutput {
410+
message: String
411+
picture_id: String
412+
}
413+
391414
structure UserProfile {
392415
userId: UserId
393416
firstName: String

python/api_model/types/models.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: api.json
3-
# timestamp: 2025-05-13T05:26:33+00:00
3+
# timestamp: 2025-05-13T05:52:27+00:00
44

55
from __future__ import annotations
66

@@ -143,6 +143,16 @@ class UpdateProfileResponseContent(BaseModel):
143143
updatedFields: Optional[List[str]] = None
144144

145145

146+
class UploadProfilePictureRequestContent(BaseModel):
147+
image: Optional[str] = None
148+
userId: Optional[str] = Field(None, pattern='^[A-Za-z0-9-]+$')
149+
150+
151+
class UploadProfilePictureResponseContent(BaseModel):
152+
message: Optional[str] = None
153+
picture_id: Optional[str] = None
154+
155+
146156
class UserProfile(BaseModel):
147157
userId: Optional[str] = Field(None, pattern='^[A-Za-z0-9-]+$')
148158
firstName: Optional[str] = None

typescript/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,7 @@ export type UpdateContractRequestContent = ExtractSchema<'UpdateContractRequestC
4444
export type UpdateContractResponseContent = ExtractSchema<'UpdateContractResponseContent'>
4545
export type UpdateProfileRequestContent = ExtractSchema<'UpdateProfileRequestContent'>
4646
export type UpdateProfileResponseContent = ExtractSchema<'UpdateProfileResponseContent'>
47+
export type UploadProfilePictureRequestContent = ExtractSchema<'UploadProfilePictureRequestContent'>
48+
export type UploadProfilePictureResponseContent = ExtractSchema<'UploadProfilePictureResponseContent'>
4749
export type UserProfile = ExtractSchema<'UserProfile'>
4850
export type ValidationErrorResponseContent = ExtractSchema<'ValidationErrorResponseContent'>

typescript/src/models.ts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,22 @@ export interface paths {
164164
patch?: never;
165165
trace?: never;
166166
};
167+
"/uploadProfilePicture": {
168+
parameters: {
169+
query?: never;
170+
header?: never;
171+
path?: never;
172+
cookie?: never;
173+
};
174+
get?: never;
175+
put?: never;
176+
post: operations["UploadProfilePicture"];
177+
delete?: never;
178+
options?: never;
179+
head?: never;
180+
patch?: never;
181+
trace?: never;
182+
};
167183
"/uploadURL": {
168184
parameters: {
169185
query?: never;
@@ -321,6 +337,14 @@ export interface components {
321337
userId: string;
322338
updatedFields?: string[];
323339
};
340+
UploadProfilePictureRequestContent: {
341+
image?: string;
342+
userId?: string;
343+
};
344+
UploadProfilePictureResponseContent: {
345+
message?: string;
346+
picture_id?: string;
347+
};
324348
UserProfile: {
325349
userId?: string;
326350
firstName?: string;
@@ -736,6 +760,48 @@ export interface operations {
736760
};
737761
};
738762
};
763+
UploadProfilePicture: {
764+
parameters: {
765+
query?: never;
766+
header?: never;
767+
path?: never;
768+
cookie?: never;
769+
};
770+
requestBody?: {
771+
content: {
772+
"application/json": components["schemas"]["UploadProfilePictureRequestContent"];
773+
};
774+
};
775+
responses: {
776+
/** @description UploadProfilePicture 200 response */
777+
200: {
778+
headers: {
779+
[name: string]: unknown;
780+
};
781+
content: {
782+
"application/json": components["schemas"]["UploadProfilePictureResponseContent"];
783+
};
784+
};
785+
/** @description ResourceNotFoundError 400 response */
786+
400: {
787+
headers: {
788+
[name: string]: unknown;
789+
};
790+
content: {
791+
"application/json": components["schemas"]["ResourceNotFoundErrorResponseContent"];
792+
};
793+
};
794+
/** @description InternalServerError 500 response */
795+
500: {
796+
headers: {
797+
[name: string]: unknown;
798+
};
799+
content: {
800+
"application/json": components["schemas"]["InternalServerErrorResponseContent"];
801+
};
802+
};
803+
};
804+
};
739805
GetUploadURL: {
740806
parameters: {
741807
query?: never;

0 commit comments

Comments
 (0)