import { RpcMethod } from './commonTypes'; export type UsersService_UpdateUser = RpcMethod; export type UsersService_GetMailingSettings = RpcMethod; export type UsersService_UpdateMailingSettings = RpcMethod; export interface UsersService { /** Updates the current dashboard user's own profile settings (currently the timezone), validating the value against IANA timezone names. Use to change the signed-in account user's timezone; affects only the caller, not devices or end users. */ UpdateUser: UsersService_UpdateUser; /** Returns the current dashboard user's email notification (mailing) preferences: newsletters, global daily stats, and per-category system notification toggles. Use to read which Pushwoosh emails the signed-in user has opted into. */ GetMailingSettings: UsersService_GetMailingSettings; /** Overwrites all of the current dashboard user's email notification (mailing) preferences with the supplied flags, and mirrors the marketing-newsletter opt-in as a device tag. Use to change which Pushwoosh emails the signed-in user receives; every flag is set to the request value, so omitted flags become false. */ UpdateMailingSettings: UsersService_UpdateMailingSettings; } export type UpdateUserRequest = { /** IANA timezone name (e.g. Europe/London) to set for the current user; leave empty to keep the existing timezone. */ timezone?: string; }; export type UpdateUserResponse = {}; export type GetMailingSettingsRequest = {}; export type GetMailingSettingsResponse = { allowNewsletters: boolean; allowDailyStatsGlobal: boolean; allowNotificationSubscribers: boolean; allowNotificationIosLicense: boolean; allowNotificationUserInactivity: boolean; allowNotificationDisablePlatform: boolean; }; export type UpdateMailingSettingsRequest = { /** Opt in to marketing newsletter emails. */ allowNewsletters?: boolean; /** Opt in to the daily statistics summary email across all applications. */ allowDailyStatsGlobal?: boolean; /** Opt in to new-subscribers notification emails. */ allowNotificationSubscribers?: boolean; /** Opt in to iOS certificate/license expiration notification emails. */ allowNotificationIosLicense?: boolean; /** Opt in to user-inactivity notification emails. */ allowNotificationUserInactivity?: boolean; /** Opt in to platform-disabled notification emails. */ allowNotificationDisablePlatform?: boolean; }; export type UpdateMailingSettingsResponse = { allowNewsletters: boolean; allowDailyStatsGlobal: boolean; allowNotificationSubscribers: boolean; allowNotificationIosLicense: boolean; allowNotificationUserInactivity: boolean; allowNotificationDisablePlatform: boolean; };