sinch.domains.conversation.api.v1.apps_apis module
- class sinch.domains.conversation.api.v1.apps_apis.Apps(sinch)[source]
Bases:
BaseConversation- create(
- channel_credentials: ConversationChannelCredentialsDict,
- display_name: str,
- conversation_metadata_report_view: Literal['NONE', 'FULL'] | Annotated[str, Strict(strict=True)] | None | Unset = UNSET,
- retention_policy: RetentionPolicyDict | None | Unset = UNSET,
- dispatch_retention_policy: DispatchRetentionPolicyDict | None | Unset = UNSET,
- processing_mode: Literal['CONVERSATION', 'DISPATCH'] | Annotated[str, Strict(strict=True)] | None | Unset = UNSET,
- smart_conversation: SmartConversationDict | None | Unset = UNSET,
- event_destination_settings: EventDestinationSettingsDict | None | Unset = UNSET,
- message_retry_settings: MessageRetrySettingsDict | None | Unset = UNSET,
- delivery_report_based_fallback: DeliveryReportBasedFallbackDict | None | Unset = UNSET,
- *,
- raw_response: Literal[False] = False,
- **kwargs,
- create(
- channel_credentials: ConversationChannelCredentialsDict,
- display_name: str,
- conversation_metadata_report_view: Literal['NONE', 'FULL'] | Annotated[str, Strict(strict=True)] | None | Unset = UNSET,
- retention_policy: RetentionPolicyDict | None | Unset = UNSET,
- dispatch_retention_policy: DispatchRetentionPolicyDict | None | Unset = UNSET,
- processing_mode: Literal['CONVERSATION', 'DISPATCH'] | Annotated[str, Strict(strict=True)] | None | Unset = UNSET,
- smart_conversation: SmartConversationDict | None | Unset = UNSET,
- event_destination_settings: EventDestinationSettingsDict | None | Unset = UNSET,
- message_retry_settings: MessageRetrySettingsDict | None | Unset = UNSET,
- delivery_report_based_fallback: DeliveryReportBasedFallbackDict | None | Unset = UNSET,
- *,
- raw_response: Literal[True],
- **kwargs,
Creates a new Conversation API app for one or more channels. The app ID is generated at creation and returned in the response.
- Parameters:
channel_credentials (ConversationChannelCredentialsDict) – Channel credentials, keyed by channel. The order of the entries defines the app channel priority.
display_name (str) – The display name for the app.
conversation_metadata_report_view (UnsetOr[Optional[ConversationMetadataReportViewType]]) – Whether conversation metadata is included in reports.
retention_policy (UnsetOr[Optional[RetentionPolicyDict]]) – The retention policy for messages and conversations.
dispatch_retention_policy (UnsetOr[Optional[DispatchRetentionPolicyDict]]) – The retention policy for messages in dispatch mode.
processing_mode (UnsetOr[Optional[ProcessingModeType]]) – The processing mode for the app.
smart_conversation (UnsetOr[Optional[SmartConversationDict]]) – Smart Conversation settings for the app.
event_destination_settings (UnsetOr[Optional[EventDestinationSettingsDict]]) – Settings for the destination of Sinch events.
message_retry_settings (UnsetOr[Optional[MessageRetrySettingsDict]]) – Settings controlling message retry behavior.
delivery_report_based_fallback (UnsetOr[Optional[DeliveryReportBasedFallbackDict]]) – Delivery-report-based channel fallback settings.
raw_response (bool) – When
False(default) the response exposeschannel_credentialsas a channel-keyed model. Set toTrueto get the rawAppResponsewithchannel_credentialsas the server array.**kwargs –
Additional parameters for the request.
- Returns:
The created app.
- Return type:
Union[AppResponse, AppCustomResponse]
- update(
- app_id: str,
- channel_credentials: ConversationChannelCredentialsDict | None | Unset = UNSET,
- display_name: str | None | Unset = UNSET,
- conversation_metadata_report_view: Literal['NONE', 'FULL'] | Annotated[str, Strict(strict=True)] | None | Unset = UNSET,
- retention_policy: RetentionPolicyDict | None | Unset = UNSET,
- dispatch_retention_policy: DispatchRetentionPolicyDict | None | Unset = UNSET,
- processing_mode: Literal['CONVERSATION', 'DISPATCH'] | Annotated[str, Strict(strict=True)] | None | Unset = UNSET,
- smart_conversation: SmartConversationDict | None | Unset = UNSET,
- event_destination_settings: EventDestinationSettingsDict | None | Unset = UNSET,
- message_retry_settings: MessageRetrySettingsDict | None | Unset = UNSET,
- delivery_report_based_fallback: DeliveryReportBasedFallbackDict | None | Unset = UNSET,
- *,
- raw_response: Literal[False] = False,
- **kwargs,
- update(
- app_id: str,
- channel_credentials: ConversationChannelCredentialsDict | None | Unset = UNSET,
- display_name: str | None | Unset = UNSET,
- conversation_metadata_report_view: Literal['NONE', 'FULL'] | Annotated[str, Strict(strict=True)] | None | Unset = UNSET,
- retention_policy: RetentionPolicyDict | None | Unset = UNSET,
- dispatch_retention_policy: DispatchRetentionPolicyDict | None | Unset = UNSET,
- processing_mode: Literal['CONVERSATION', 'DISPATCH'] | Annotated[str, Strict(strict=True)] | None | Unset = UNSET,
- smart_conversation: SmartConversationDict | None | Unset = UNSET,
- event_destination_settings: EventDestinationSettingsDict | None | Unset = UNSET,
- message_retry_settings: MessageRetrySettingsDict | None | Unset = UNSET,
- delivery_report_based_fallback: DeliveryReportBasedFallbackDict | None | Unset = UNSET,
- *,
- raw_response: Literal[True],
- **kwargs,
Updates a particular app as specified by the App ID. Note that this is a
PATCHoperation, so any specified field values will replace existing values. If you’d like to add configurations to an existing app, make sure to include the existing values AND the new values in the call (for example, get the app, merge your changes into itschannel_credentialsmap, and send the updated map here).Omitted parameters are left untouched on the server; passing
Noneexplicitly clears the field.- Parameters:
app_id (str) – The ID of the app to update.
channel_credentials (UnsetOr[Optional[ConversationChannelCredentialsDict]]) – Channel credentials, keyed by channel. The order of the entries defines the app channel priority.
display_name (UnsetOr[Optional[str]]) – The display name for the app.
conversation_metadata_report_view (UnsetOr[Optional[ConversationMetadataReportViewType]]) – Whether conversation metadata is included in reports.
retention_policy (UnsetOr[Optional[RetentionPolicyDict]]) – The retention policy for messages and conversations.
dispatch_retention_policy (UnsetOr[Optional[DispatchRetentionPolicyDict]]) – The retention policy for messages in dispatch mode.
processing_mode (UnsetOr[Optional[ProcessingModeType]]) – The processing mode for the app.
smart_conversation (UnsetOr[Optional[SmartConversationDict]]) – Smart Conversation settings for the app.
event_destination_settings (UnsetOr[Optional[EventDestinationSettingsDict]]) – Settings for the destination of Sinch events.
message_retry_settings (UnsetOr[Optional[MessageRetrySettingsDict]]) – Settings controlling message retry behavior.
delivery_report_based_fallback (UnsetOr[Optional[DeliveryReportBasedFallbackDict]]) – Delivery-report-based channel fallback settings.
raw_response (bool) – When
False(default) the response exposeschannel_credentialsas a channel-keyed model. Set toTrueto get the rawAppResponsewithchannel_credentialsas the server array.**kwargs –
Additional parameters for the request.
- Returns:
The updated app.
- Return type:
Union[AppResponse, AppCustomResponse]
- delete(app_id: str, **kwargs) None[source]
Deletes the app specified by the App ID. Note that this operation will not delete contacts (which are stored at the project level) nor any channel-specific resources (for example, WhatsApp Sender Identities will not be deleted).
- Parameters:
app_id (str) – The ID of the app to delete.
- Returns:
None
- Return type:
None
For detailed documentation, visit https://developers.sinch.com/docs/conversation/.
- get(
- app_id: str,
- *,
- raw_response: Literal[False] = False,
- **kwargs,
- get(
- app_id: str,
- *,
- raw_response: Literal[True],
- **kwargs,
Returns a particular app as specified by the App ID.
- Parameters:
app_id (str) – The ID of the app to retrieve.
raw_response (bool) – When
False(default) the response exposeschannel_credentialsas a channel-keyed model. Set toTrueto get the rawAppResponsewithchannel_credentialsas the server array.
- Returns:
The app details.
- Return type:
Union[AppResponse, AppCustomResponse]
For detailed documentation, visit https://developers.sinch.com/docs/conversation/.
- list(
- *,
- raw_response: Literal[False] = False,
- **kwargs,
- list(
- *,
- raw_response: Literal[True],
- **kwargs,
List all apps for the current project.
- Parameters:
raw_response (bool) – When
False(default) each app exposeschannel_credentialsas a channel-keyed model. Set toTrueto iterate rawAppResponseobjects withchannel_credentialsas the server array.- Returns:
A paginator for iterating through the apps.
- Return type:
Union[Paginator[ListAppsResponse, AppResponse], Paginator[ListAppsCustomResponse, AppCustomResponse]]
For detailed documentation, visit https://developers.sinch.com/docs/conversation/.