import { RpcMethod } from './commonTypes'; export type SubscriptionPromptService_GetUseCase = RpcMethod; export type SubscriptionPromptService_SetUseCase = RpcMethod; export type SubscriptionPromptService_GetWidget = RpcMethod; export type SubscriptionPromptService_SetWidget = RpcMethod; export interface SubscriptionPromptService { /** Returns the subscription-prompt use case configured for an application (one of not-used, default, topic-based, or not-set when unconfigured). Use to check how an application asks visitors for push permission. */ GetUseCase: SubscriptionPromptService_GetUseCase; /** Sets the subscription-prompt use case for an application (must be not-used, default or topic-based), overwriting any previous value. Use to switch how the application requests push subscription; get_subscription_prompt_use_case reads the current value. */ SetUseCase: SubscriptionPromptService_SetUseCase; /** Returns the subscription-prompt widget configured for an application, including its code, type and params, or empty when none is set. Use to inspect the current prompt widget before updating it. */ GetWidget: SubscriptionPromptService_GetWidget; /** Creates or overwrites the subscription-prompt widget for an application with the given type and params. Use to configure the prompt widget; when the use case is default it also syncs the widget into the application property. */ SetWidget: SubscriptionPromptService_SetWidget; } export type GetUseCaseRequest = { /** Application code (XXXXX-XXXXX) whose subscription-prompt use case is read. */ applicationCode?: string; }; export type GetUseCaseResponse = { useCase: string; }; export type SetUseCaseRequest = { /** Application code (XXXXX-XXXXX) whose subscription-prompt use case is set. */ applicationCode?: string; /** Use case to apply: not-used, default or topic-based. */ useCase?: string; }; export type SetUseCaseResponse = {}; export type GetWidgetRequest = { /** Application code (XXXXX-XXXXX) whose subscription-prompt widget is read. */ applicationCode?: string; }; export type GetWidgetResponse = { code: string; type: string; params: object; }; export type SetWidgetRequest = { /** Application code (XXXXX-XXXXX) whose subscription-prompt widget is created or overwritten. */ applicationCode?: string; /** Widget type identifier to store for the prompt. */ type?: string; /** Arbitrary widget configuration stored as JSON params. */ params?: object; }; export type SetWidgetResponse = {};