Skip to content

Commit 3234a27

Browse files
committed
feat: add response model for update answer
1 parent 7ecdf83 commit 3234a27

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

src/responses/models.tsp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,18 @@ namespace CoreSystem.Responses {
8787
id: uuid;
8888
}
8989

90+
@doc("Response model for updating a form response")
91+
model UpdateResponse {
92+
@doc("The response's unique identifier.")
93+
id: uuid;
94+
95+
@doc("The last updated timestamp of the response.")
96+
updatedAt: utcDateTime;
97+
98+
@doc("The updated answer data.")
99+
answers: (AnswerJSON | ScaleAnswerJSON | OauthAnswerJSON)[];
100+
}
101+
90102
@doc("Response model for a single response in list view")
91103
model ResponseJSON {
92104
@doc("The response's unique identifier.")

src/responses/operations.tsp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ namespace CoreSystem.Responses {
3131
@patch(#{ implicitOptionality: true })
3232
op updateFormResponse(@path id: uuid, @body req: AnswersRequest): {
3333
@statusCode statusCode: 200;
34+
@body response: UpdateResponse;
3435
};
3536

3637
@summary("Connect OAuth Account")

0 commit comments

Comments
 (0)