-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
20081984
authored and
20081984
committed
Feb 13, 2024
1 parent
79a2152
commit 6d76f04
Showing
11 changed files
with
187 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
"""Описание моделей для интеграции.""" | ||
from typing import Optional | ||
|
||
from pydantic import BaseModel | ||
|
||
from nlpf_statemachine.example.app.sc.enums.integration_message_names import ( | ||
IntegrationRequestMessageName, IntegrationResponseMessageName, | ||
) | ||
from nlpf_statemachine.models import UUID, BaseMessage, IntegrationPayload, IntegrationResponse | ||
|
||
|
||
class GetDataPayload(BaseModel): | ||
"""Payload для запроса данных.""" | ||
|
||
uuid: UUID | ||
"""UUID текущего запроса.""" | ||
|
||
project: str | ||
"""Текущий project.""" | ||
|
||
|
||
class GetDataRequest(IntegrationResponse): | ||
"""Описание запроса получения данных.""" | ||
|
||
messageName: str = IntegrationRequestMessageName.GENERATE_DATA | ||
"""messageName запроса.""" | ||
|
||
payload: GetDataPayload | ||
"""payload запроса.""" | ||
|
||
|
||
class GetDataResponseData(BaseModel): | ||
"""Основная часть ответа от интеграции.""" | ||
|
||
data: str | ||
"""Данные.""" | ||
|
||
|
||
class GetDataResponsePayload(IntegrationPayload): | ||
"""Описание payload ответа от интеграции.""" | ||
|
||
data: Optional[GetDataResponseData] | ||
"""Данные.""" | ||
|
||
|
||
class GetDataResponse(BaseMessage): | ||
"""Описание ответа от интеграции.""" | ||
|
||
messageName: str = IntegrationResponseMessageName.GENERATE_DATA | ||
"""Наименование (тип) запроса.""" | ||
|
||
payload: GetDataResponsePayload | ||
"""payload ответа.""" |
57 changes: 0 additions & 57 deletions
57
nlpf_statemachine/example/app/sc/models/token_service_integration.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.