Реализована проверка версионности и требование soft\force обновлений приложения

This commit is contained in:
mi
2026-09-03 19:12:38 +03:00
parent 465a70d488
commit 44db38f6fe
37 changed files with 3057 additions and 53 deletions
@@ -19,20 +19,15 @@ paths:
/api/v1/public/app-config:
get:
operationId: getPublicAppConfig
parameters:
- {name: If-None-Match, in: header, schema: {type: string}}
responses:
"200":
description: Public application configuration
content:
application/json:
schema:
type: object
required: [messages]
properties:
messages:
type: object
required: [max_text_length]
properties:
max_text_length: {type: integer, minimum: 1, maximum: 10000}
schema: {$ref: "#/components/schemas/PublicAppConfigResponse"}
"304": {description: Cached configuration is still current}
/api/v1/public/content:
get:
operationId: getPublicContent
@@ -405,6 +400,105 @@ components:
description: Catalog action is not allowed
content: {application/json: {schema: {$ref: "#/components/schemas/ErrorEnvelope"}}}
schemas:
PublicAppConfigResponse:
type: object
additionalProperties: false
required: [auth, operator, messages, consents, attachments, notification, ux, mobile_update]
properties:
auth: {$ref: "#/components/schemas/PublicAuthConfig"}
operator: {$ref: "#/components/schemas/PublicOperatorConfig"}
messages: {$ref: "#/components/schemas/PublicMessagesConfig"}
consents: {$ref: "#/components/schemas/PublicConsentsConfig"}
attachments: {$ref: "#/components/schemas/PublicAttachmentsConfig"}
notification: {$ref: "#/components/schemas/PublicNotificationConfig"}
ux: {$ref: "#/components/schemas/PublicUxConfig"}
mobile_update: {$ref: "#/components/schemas/MobileUpdatePolicy"}
PublicAuthConfig:
type: object
additionalProperties: false
required: [phone_enabled, password_enabled]
properties:
phone_enabled: {type: boolean}
password_enabled: {type: boolean}
PublicOperatorConfig:
type: object
additionalProperties: false
required: [call_phone]
properties:
call_phone: {type: string, minLength: 1, maxLength: 32}
PublicMessagesConfig:
type: object
additionalProperties: false
required: [max_text_length]
properties:
max_text_length: {type: integer, minimum: 1, maximum: 10000}
PublicConsentConfig:
type: object
additionalProperties: false
required: [required, document_url, version]
properties:
required: {type: boolean}
document_url: {type: string, format: uri, minLength: 1}
version: {type: string, minLength: 1, maxLength: 64}
PublicPersonalDataConsentConfig:
allOf:
- {$ref: "#/components/schemas/PublicConsentConfig"}
- type: object
additionalProperties: false
required: [required, document_url, version, privacy_policy_document_url]
properties:
required: {type: boolean}
document_url: {type: string, format: uri, minLength: 1}
version: {type: string, minLength: 1, maxLength: 64}
privacy_policy_document_url: {type: string, format: uri, minLength: 1}
PublicConsentsConfig:
type: object
additionalProperties: false
required: [personal_data, user_agreement, marketing]
properties:
personal_data: {$ref: "#/components/schemas/PublicPersonalDataConsentConfig"}
user_agreement: {$ref: "#/components/schemas/PublicConsentConfig"}
marketing: {$ref: "#/components/schemas/PublicConsentConfig"}
PublicAttachmentsConfig:
type: object
additionalProperties: false
required: [allowed_extensions, allowed_mime_types, max_size_mb]
properties:
allowed_extensions: {type: array, items: {type: string}}
allowed_mime_types: {type: array, items: {type: string}}
max_size_mb: {type: integer, minimum: 1}
PublicNotificationConfig:
type: object
additionalProperties: false
required: [carousel_autoplay_enabled, carousel_autoplay_interval_ms]
properties:
carousel_autoplay_enabled: {type: boolean}
carousel_autoplay_interval_ms: {type: integer, minimum: 1}
PublicUxConfig:
type: object
additionalProperties: false
required: [idle_timeout_minutes]
properties:
idle_timeout_minutes: {type: integer, minimum: 1}
MobileStoreUpdatePolicy:
type: object
additionalProperties: false
required: [enabled, latest_build, minimum_build, latest_version, store_url, release_notes]
properties:
enabled: {type: boolean}
latest_build: {type: [integer, "null"], minimum: 1}
minimum_build: {type: [integer, "null"], minimum: 1}
latest_version: {type: [string, "null"], minLength: 1, maxLength: 64}
store_url: {type: [string, "null"], format: uri, minLength: 1}
release_notes: {type: [string, "null"], maxLength: 4000}
MobileUpdatePolicy:
type: object
additionalProperties: false
required: [google_play, rustore, app_store]
properties:
google_play: {$ref: "#/components/schemas/MobileStoreUpdatePolicy"}
rustore: {$ref: "#/components/schemas/MobileStoreUpdatePolicy"}
app_store: {$ref: "#/components/schemas/MobileStoreUpdatePolicy"}
OtpSettingsResponse:
type: object
additionalProperties: false