Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/form/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ namespace CoreSystem.Forms {

@doc("Archived: form is hidden from default listings but is still stored and can be accessed directly.")
archived: "ARCHIVED",

@doc("Closed: form is no longer accepting responses, but remains visible or accessible depending on visibility.")
closed: "CLOSED",
}

@doc("The visibility setting of a form. Public forms are visible to all logged-in users. Private forms require a direct link to access.")
Expand Down
9 changes: 9 additions & 0 deletions src/form/operations.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ namespace CoreSystem.Forms {
@body response: FormResponse;
};

@summary("Close Form")
@doc("Close a form. Set status to 'CLOSED'. Closed forms are no longer accepting responses.")
@route("/forms/{formId}/close")
@post
op closeForm(@path formId: uuid): {
@statusCode statusCode: 200;
@body response: FormResponse;
};

// === Cover Image Operations ===
@summary("Get Form Cover Image")
@doc("Get the cover image binary data. Returns the image in WebP format.")
Expand Down
Loading