Inactive Sessions Purging designed

This commit is contained in:
aodulov
2025-10-16 12:59:43 +03:00
parent 3a71ac9cc4
commit 319e3221a3
8 changed files with 454 additions and 0 deletions

View File

@@ -0,0 +1,67 @@
openapi: 3.0.0
info:
title: Session and Form Persistence API
version: 1.0.0
paths:
/api/session/form-data/{formId}:
get:
summary: Retrieve persisted form data for a specific form
parameters:
- in: path
name: formId
schema:
type: string
required: true
description: Identifier of the form
responses:
'200':
description: Successfully retrieved form data
content:
application/json:
schema:
type: object
additionalProperties:
type: string
'404':
description: Form data not found
delete:
summary: Clear persisted form data for a specific form
parameters:
- in: path
name: formId
schema:
type: string
required: true
description: Identifier of the form
responses:
'204':
description: Form data successfully cleared
'404':
description: Form data not found
components:
schemas:
FormInput:
type: object
properties:
fieldId:
type: string
description: Identifier for the input field
value:
type: string
description: The current value of the input field
# WebSocket API (conceptual, not directly in OpenAPI)
# The WebSocket API will handle real-time updates for form persistence.
# Messages from client to server:
# - type: "FORM_UPDATE"
# payload:
# formId: string
# fieldId: string
# value: string
# Messages from server to client:
# - type: "FORM_STATE_SYNC"
# payload:
# formId: string
# formState: object (map of fieldId to value)