Skip to content

Commit 2a3cdd3

Browse files
committed
Profile Picture APIs
1 parent 6515b64 commit 2a3cdd3

File tree

4 files changed

+98
-1
lines changed

4 files changed

+98
-1
lines changed

model/equaliq.smithy

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ service EqualIQ {
1818
ShareContract
1919
GetContractReadURL
2020
GetProfile
21+
GetProfilePicture
2122
UpdateProfile
2223
Ping
2324
]
@@ -365,6 +366,28 @@ structure GetProfileOutput {
365366
profile: UserProfile
366367
}
367368

369+
@http(method: "POST", uri: "/getProfilePicture")
370+
operation GetProfilePicture {
371+
input: GetProfilePictureInput
372+
output: GetProfilePictureOutput
373+
errors: [
374+
AuthenticationError
375+
ResourceNotFoundError
376+
InternalServerError
377+
]
378+
}
379+
380+
structure GetProfilePictureInput {
381+
userId: UserId
382+
383+
// Optional - defaults to authenticated user if not provided
384+
}
385+
386+
structure GetProfilePictureOutput {
387+
@required
388+
profilePictureURL: String
389+
}
390+
368391
structure UserProfile {
369392
userId: UserId
370393
firstName: String

python/api_model/types/models.py

Lines changed: 9 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-04-08T11:31:40+00:00
3+
# timestamp: 2025-05-13T05:26:33+00:00
44

55
from __future__ import annotations
66

@@ -64,6 +64,14 @@ class GetContractRequestContent(BaseModel):
6464
contractId: str = Field(..., pattern='^[A-Za-z0-9-]+$')
6565

6666

67+
class GetProfilePictureRequestContent(BaseModel):
68+
userId: Optional[str] = Field(None, pattern='^[A-Za-z0-9-]+$')
69+
70+
71+
class GetProfilePictureResponseContent(BaseModel):
72+
profilePictureURL: str
73+
74+
6775
class GetProfileRequestContent(BaseModel):
6876
userId: Optional[str] = Field(None, pattern='^[A-Za-z0-9-]+$')
6977

typescript/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export type GetContractReadURLRequestContent = ExtractSchema<'GetContractReadURL
2222
export type GetContractReadURLResponseContent = ExtractSchema<'GetContractReadURLResponseContent'>
2323
export type GetContractRequestContent = ExtractSchema<'GetContractRequestContent'>
2424
export type GetContractResponseContent = ExtractSchema<'GetContractResponseContent'>
25+
export type GetProfilePictureRequestContent = ExtractSchema<'GetProfilePictureRequestContent'>
26+
export type GetProfilePictureResponseContent = ExtractSchema<'GetProfilePictureResponseContent'>
2527
export type GetProfileRequestContent = ExtractSchema<'GetProfileRequestContent'>
2628
export type GetProfileResponseContent = ExtractSchema<'GetProfileResponseContent'>
2729
export type GetUploadURLRequestContent = ExtractSchema<'GetUploadURLRequestContent'>

typescript/src/models.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,22 @@ export interface paths {
6868
patch?: never;
6969
trace?: never;
7070
};
71+
"/getProfilePicture": {
72+
parameters: {
73+
query?: never;
74+
header?: never;
75+
path?: never;
76+
cookie?: never;
77+
};
78+
get?: never;
79+
put?: never;
80+
post: operations["GetProfilePicture"];
81+
delete?: never;
82+
options?: never;
83+
head?: never;
84+
patch?: never;
85+
trace?: never;
86+
};
7187
"/listContracts": {
7288
parameters: {
7389
query?: never;
@@ -215,6 +231,12 @@ export interface components {
215231
ownerId: string;
216232
sharedWith: string[];
217233
};
234+
GetProfilePictureRequestContent: {
235+
userId?: string;
236+
};
237+
GetProfilePictureResponseContent: {
238+
profilePictureURL: string;
239+
};
218240
GetProfileRequestContent: {
219241
userId?: string;
220242
};
@@ -488,6 +510,48 @@ export interface operations {
488510
};
489511
};
490512
};
513+
GetProfilePicture: {
514+
parameters: {
515+
query?: never;
516+
header?: never;
517+
path?: never;
518+
cookie?: never;
519+
};
520+
requestBody?: {
521+
content: {
522+
"application/json": components["schemas"]["GetProfilePictureRequestContent"];
523+
};
524+
};
525+
responses: {
526+
/** @description GetProfilePicture 200 response */
527+
200: {
528+
headers: {
529+
[name: string]: unknown;
530+
};
531+
content: {
532+
"application/json": components["schemas"]["GetProfilePictureResponseContent"];
533+
};
534+
};
535+
/** @description ResourceNotFoundError 400 response */
536+
400: {
537+
headers: {
538+
[name: string]: unknown;
539+
};
540+
content: {
541+
"application/json": components["schemas"]["ResourceNotFoundErrorResponseContent"];
542+
};
543+
};
544+
/** @description InternalServerError 500 response */
545+
500: {
546+
headers: {
547+
[name: string]: unknown;
548+
};
549+
content: {
550+
"application/json": components["schemas"]["InternalServerErrorResponseContent"];
551+
};
552+
};
553+
};
554+
};
491555
ListContracts: {
492556
parameters: {
493557
query?: never;

0 commit comments

Comments
 (0)