import { RpcMethod } from './commonTypes'; export type SendRateService_Get = RpcMethod; export type SendRateService_Update = RpcMethod; export interface SendRateService { /** Returns the per-channel send-rate throttling limits (push, email, SMS, in-app) configured for an application, each as a count-per-seconds pair. Use to inspect how fast an application code XXXXX-XXXXX is allowed to dispatch messages before calling update_send_rate. */ Get: SendRateService_Get; /** Sets the per-channel send-rate throttling limits (push, email, SMS, in-app) for an application, creating the record if none exists and overwriting only the channels supplied. Use to change how many messages per second an application code XXXXX-XXXXX may dispatch. */ Update: SendRateService_Update; } export type Info = { count: number; seconds: number; }; export type SendRate = { push: Info; email: Info; sms: Info; inApp: Info; }; export type GetSendRateRequest = { /** Application code (XXXXX-XXXXX) whose send-rate limits to read. */ application?: string; }; export type GetSendRateResponse = { sendRate: SendRate; }; export type CreateSendRateRequest = { application: string; push: Info; email: Info; sms: Info; inApp: Info; }; export type CreateSendRateResponse = { sendRate: SendRate; }; export type UpdateSendRateRequest = { /** Application code (XXXXX-XXXXX) whose send-rate limits to set. */ application?: string; /** Push send-rate limit as count messages per seconds; omit to leave the push limit unchanged. */ push?: Info; /** Email send-rate limit as count messages per seconds; omit to leave the email limit unchanged. */ email?: Info; /** SMS send-rate limit as count messages per seconds; omit to leave the SMS limit unchanged. */ sms?: Info; /** In-app send-rate limit as count messages per seconds; omit to leave the in-app limit unchanged. */ inApp?: Info; }; export type UpdateSendRateResponse = {};