import { WebSocketChannelRequest } from './websocketChannelRequest.js'; import { UserType } from '../userType.js'; import '../websocketChannel.js'; import '../viberChannel.js'; import '../whatsappChannel.js'; import '../mmsChannel.js'; import '../smsChannel.js'; import '../vbcChannel.js'; import '../messengerChannel.js'; import '../pstnChannel.js'; import '../sipChannel.js'; /** * Represents a request to create or update a user's properties. * * @remarks * Vonage API's will return information using `snake_case`. This represents the * pure response before the client will transform the keys into `camelCase`. */ type UserPropertiesRequest = { /** * Custom key-value pairs associated with the user. * * @remarks Data here will not have their properties transformed */ custom_data: Record; }; /** * Represents a request to create or update a user's channels. * * @remarks * Vonage API's will return information using `snake_case`. This represents the * pure response before the client will transform the keys into `camelCase`. */ type UserChannelsRequest = { /** * An array of WebSocket channel requests. */ websocket: Array; } & Omit, 'websocket'>; /** * Represents a request to create or update a user. * * @remarks * Vonage API's will return information using `snake_case`. This represents the * pure response before the client will transform the keys into `camelCase`. */ type UserRequest = { /** * The URL of the user's image. */ image_url: string; /** * User properties including custom data. */ properties: UserPropertiesRequest; /** * Channels for communication, specifically WebSocket channels. */ channels: UserChannelsRequest; } & Omit; export type { UserChannelsRequest, UserPropertiesRequest, UserRequest };