UNPKG

zendesk-messaging-client

Version:
395 lines (394 loc) 34.5 kB
import { type Options as ClientOptions, type TDataShape, type Client } from './client'; import type { ListAppsData, ListAppsResponses, ListAppsErrors, CreateAppData, CreateAppResponses, CreateAppErrors, DeleteAppData, DeleteAppResponses, DeleteAppErrors, GetAppData, GetAppResponses, GetAppErrors, UpdateAppData, UpdateAppResponses, UpdateAppErrors, ListAppKeysData, ListAppKeysResponses, CreateAppKeyData, CreateAppKeyResponses, DeleteAppKeyData, DeleteAppKeyResponses, DeleteAppKeyErrors, GetAppKeyData, GetAppKeyResponses, GetAppKeyErrors, UploadAttachmentData, UploadAttachmentResponses, UploadAttachmentErrors, DeleteAttachmentData, DeleteAttachmentResponses, DeleteAttachmentErrors, ListConversationsData, ListConversationsResponses, ListConversationsErrors, CreateConversationData, CreateConversationResponses, CreateConversationErrors, DeleteConversationData, DeleteConversationResponses, DeleteConversationErrors, GetConversationData, GetConversationResponses, GetConversationErrors, UpdateConversationData, UpdateConversationResponses, UpdateConversationErrors, JoinConversationData, JoinConversationResponses, JoinConversationErrors, ListParticipantsData, ListParticipantsResponses, ListParticipantsErrors, LeaveConversationData, LeaveConversationResponses, LeaveConversationErrors, DeleteAllMessagesData, DeleteAllMessagesResponses, DeleteAllMessagesErrors, ListMessagesData, ListMessagesResponses, ListMessagesErrors, PostMessageData, PostMessageResponses, PostMessageErrors, DeleteMessageData, DeleteMessageResponses, DeleteMessageErrors, PostActivityData, PostActivityResponses, AcceptControlData, AcceptControlResponses, AcceptControlErrors, OfferControlData, OfferControlResponses, OfferControlErrors, PassControlData, PassControlResponses, PassControlErrors, ReleaseControlData, ReleaseControlResponses, ReleaseControlErrors, DownloadMessageRefData, DownloadMessageRefResponses, ListIntegrationsData, ListIntegrationsResponses, ListIntegrationsErrors, CreateIntegrationData, CreateIntegrationResponses, CreateIntegrationErrors, DeleteIntegrationData, DeleteIntegrationResponses, DeleteIntegrationErrors, GetIntegrationData, GetIntegrationResponses, GetIntegrationErrors, UpdateIntegrationData, UpdateIntegrationResponses, UpdateIntegrationErrors, ListCustomIntegrationKeysData, ListCustomIntegrationKeysResponses, ListCustomIntegrationKeysErrors, CreateCustomIntegrationKeyData, CreateCustomIntegrationKeyResponses, DeleteCustomIntegrationKeyData, DeleteCustomIntegrationKeyResponses, GetCustomIntegrationKeyData, GetCustomIntegrationKeyResponses, ListWebhooksData, ListWebhooksResponses, ListWebhooksErrors, CreateWebhookData, CreateWebhookResponses, CreateWebhookErrors, DeleteWebhookData, DeleteWebhookResponses, DeleteWebhookErrors, GetWebhookData, GetWebhookResponses, GetWebhookErrors, UpdateWebhookData, UpdateWebhookResponses, UpdateWebhookErrors, ListSwitchboardsData, ListSwitchboardsResponses, ListSwitchboardsErrors, CreateSwitchboardData, CreateSwitchboardResponses, CreateSwitchboardErrors, DeleteSwitchboardData, DeleteSwitchboardResponses, DeleteSwitchboardErrors, UpdateSwitchboardData, UpdateSwitchboardResponses, UpdateSwitchboardErrors, ListSwitchboardIntegrationsData, ListSwitchboardIntegrationsResponses, ListSwitchboardIntegrationsErrors, CreateSwitchboardIntegrationData, CreateSwitchboardIntegrationResponses, CreateSwitchboardIntegrationErrors, DeleteSwitchboardIntegrationData, DeleteSwitchboardIntegrationResponses, DeleteSwitchboardIntegrationErrors, UpdateSwitchboardIntegrationData, UpdateSwitchboardIntegrationResponses, UpdateSwitchboardIntegrationErrors, CreateUserData, CreateUserResponses, CreateUserErrors, DeleteUserData, DeleteUserResponses, DeleteUserErrors, GetUserData, GetUserResponses, GetUserErrors, UpdateUserData, UpdateUserResponses, UpdateUserErrors, ListClientsData, ListClientsResponses, ListClientsErrors, CreateClientData, CreateClientResponses, RemoveClientData, RemoveClientResponses, RemoveClientErrors, ListDevicesData, ListDevicesResponses, GetDeviceData, GetDeviceResponses, GetDeviceErrors, DeleteUserPersonalInformationData, DeleteUserPersonalInformationResponses, DeleteUserPersonalInformationErrors, SyncUserData, SyncUserResponses, AuthorizeData, GetTokenData, GetTokenResponses, RevokeAccessData, RevokeAccessResponses } from './types.gen'; export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & { /** * You can provide a client instance returned by `createClient()` instead of * individual options. This might be also useful if you want to implement a * custom client. */ client: Client; /** * You can pass arbitrary values through the `meta` object. This can be * used to access values that aren't defined as part of the SDK function. */ meta?: Record<string, unknown>; }; /** * List Apps * Lists all apps that a user is part of. This API is paginated through [cursor pagination](#section/Introduction/API-pagination-and-records-limits). * ```shell * /v2/apps?page[after]=5e1606762556d93e9c176f69&page[size]=10 * ``` * */ export declare const listApps: <ThrowOnError extends boolean = true>(options: Options<ListAppsData, ThrowOnError>) => import("./client").RequestResult<ListAppsResponses, ListAppsErrors, ThrowOnError, "fields">; /** * Create App * Creates a new app. When using [service account](#service-accounts) credentials, the service account is automatically granted access to the app. */ export declare const createApp: <ThrowOnError extends boolean = true>(options: Options<CreateAppData, ThrowOnError>) => import("./client").RequestResult<CreateAppResponses, CreateAppErrors, ThrowOnError, "fields">; /** * Delete App * Removes the specified app, including all its enabled integrations. */ export declare const deleteApp: <ThrowOnError extends boolean = true>(options: Options<DeleteAppData, ThrowOnError>) => import("./client").RequestResult<DeleteAppResponses, DeleteAppErrors, ThrowOnError, "fields">; /** * Get App * Fetches an individual app. */ export declare const getApp: <ThrowOnError extends boolean = true>(options: Options<GetAppData, ThrowOnError>) => import("./client").RequestResult<GetAppResponses, GetAppErrors, ThrowOnError, "fields">; /** * Update App * Updates an app. */ export declare const updateApp: <ThrowOnError extends boolean = true>(options: Options<UpdateAppData, ThrowOnError>) => import("./client").RequestResult<UpdateAppResponses, UpdateAppErrors, ThrowOnError, "fields">; /** * List App Keys * Lists all API keys for a given app. */ export declare const listAppKeys: <ThrowOnError extends boolean = true>(options: Options<ListAppKeysData, ThrowOnError>) => import("./client").RequestResult<ListAppKeysResponses, unknown, ThrowOnError, "fields">; /** * Create App Key * Creates an API key for the specified app. The response body will include a secret * as well as its corresponding id, which you can use to generate JSON Web Tokens to * securely make API calls on behalf of the app. * */ export declare const createAppKey: <ThrowOnError extends boolean = true>(options: Options<CreateAppKeyData, ThrowOnError>) => import("./client").RequestResult<CreateAppKeyResponses, unknown, ThrowOnError, "fields">; /** * Delete App Key * Removes an API key. */ export declare const deleteAppKey: <ThrowOnError extends boolean = true>(options: Options<DeleteAppKeyData, ThrowOnError>) => import("./client").RequestResult<DeleteAppKeyResponses, DeleteAppKeyErrors, ThrowOnError, "fields">; /** * Get App Key * Returns an API key. */ export declare const getAppKey: <ThrowOnError extends boolean = true>(options: Options<GetAppKeyData, ThrowOnError>) => import("./client").RequestResult<GetAppKeyResponses, GetAppKeyErrors, ThrowOnError, "fields">; /** * Upload Attachment * Upload an attachment to Sunshine Conversations to use in future messages. Files are uploaded using the multipart/form-data content type. Use the returned mediaUrl to send a file, image or carousel message. * <aside class="notice">Note that Sunshine Conversations limits the size and type of file you can upload to the platform. See the <a href="https://docs.smooch.io/guide/validating-files">file validation</a> guide for more details.</aside> * */ export declare const uploadAttachment: <ThrowOnError extends boolean = true>(options: Options<UploadAttachmentData, ThrowOnError>) => import("./client").RequestResult<UploadAttachmentResponses, UploadAttachmentErrors, ThrowOnError, "fields">; /** * Delete Attachment * Remove an attachment uploaded to Sunshine Conversations through the Upload attachment API. * See [Attachments for Messages](#section/Attachments-for-Messages) to have attachments automatically deleted when deleting messages, conversations or users. * <aside class="notice">Note that deleted attachments can remain available on our CDN’s cache up to 15 minutes after the delete call.</aside> * */ export declare const deleteAttachment: <ThrowOnError extends boolean = true>(options: Options<DeleteAttachmentData, ThrowOnError>) => import("./client").RequestResult<DeleteAttachmentResponses, DeleteAttachmentErrors, ThrowOnError, "fields">; /** * List Conversations * Lists all conversations that a user is part of. This API is paginated through [cursor pagination](#section/Introduction/API-pagination-and-records-limits). * ```shell * /v2/apps/:appId/conversations?filter[userId]=42589ad070d43be9b00ff7e5 * ``` * */ export declare const listConversations: <ThrowOnError extends boolean = true>(options: Options<ListConversationsData, ThrowOnError>) => import("./client").RequestResult<ListConversationsResponses, ListConversationsErrors, ThrowOnError, "fields">; /** * Create Conversation * Create a conversation for the specified user(s). */ export declare const createConversation: <ThrowOnError extends boolean = true>(options: Options<CreateConversationData, ThrowOnError>) => import("./client").RequestResult<CreateConversationResponses, CreateConversationErrors, ThrowOnError, "fields">; /** * Delete Conversation * Delete an entire conversation record, along with its messages and attachments. Note that the default conversation cannot be deleted, but the messages contained [can be](#deleteAllMessages). */ export declare const deleteConversation: <ThrowOnError extends boolean = true>(options: Options<DeleteConversationData, ThrowOnError>) => import("./client").RequestResult<DeleteConversationResponses, DeleteConversationErrors, ThrowOnError, "fields">; /** * Get Conversation * Fetches an individual conversation. */ export declare const getConversation: <ThrowOnError extends boolean = true>(options: Options<GetConversationData, ThrowOnError>) => import("./client").RequestResult<GetConversationResponses, GetConversationErrors, ThrowOnError, "fields">; /** * Update Conversation * Updates a conversation record. */ export declare const updateConversation: <ThrowOnError extends boolean = true>(options: Options<UpdateConversationData, ThrowOnError>) => import("./client").RequestResult<UpdateConversationResponses, UpdateConversationErrors, ThrowOnError, "fields">; /** * Join Conversation * Adds a user to a conversation using either their userId or userExternalId. The endpoint only * supports adding a participant to a sdkGroup conversation. * */ export declare const joinConversation: <ThrowOnError extends boolean = true>(options: Options<JoinConversationData, ThrowOnError>) => import("./client").RequestResult<JoinConversationResponses, JoinConversationErrors, ThrowOnError, "fields">; /** * List Participants * Lists all the participants of a particular conversation. This API is paginated through [cursor pagination](#section/Introduction/API-pagination-and-records-limits). * * ```shell * /v2/apps/:appId/conversations/:conversationId/participants?page[before]=26508c10541a4b0ff472e5e2 * ``` * */ export declare const listParticipants: <ThrowOnError extends boolean = true>(options: Options<ListParticipantsData, ThrowOnError>) => import("./client").RequestResult<ListParticipantsResponses, ListParticipantsErrors, ThrowOnError, "fields">; /** * Leave Conversation * Removes a user from a conversation using either their userId, userExternalId, or participantId. * */ export declare const leaveConversation: <ThrowOnError extends boolean = true>(options: Options<LeaveConversationData, ThrowOnError>) => import("./client").RequestResult<LeaveConversationResponses, LeaveConversationErrors, ThrowOnError, "fields">; /** * Delete All Messages * Delete all messages of a particular conversation. */ export declare const deleteAllMessages: <ThrowOnError extends boolean = true>(options: Options<DeleteAllMessagesData, ThrowOnError>) => import("./client").RequestResult<DeleteAllMessagesResponses, DeleteAllMessagesErrors, ThrowOnError, "fields">; /** * List Messages * List all messages for a particular conversation. This API is paginated through * [cursor pagination](#section/Introduction/API-pagination-and-records-limits), in the _backwards_ direction, with the * most recent (i.e. last) page of messages being returned by default. The `hasMore` flag indicates whether more messages * exist in the direction you are currently paginating through. To page backwards in the history, use the `beforeCursor` or follow the `prev` * link. The page size limit is fixed at 100 messages per page. * * ```shell * /v2/apps/:appId/conversations/:conversationId/messages?page[before]=5f32b88acf6bf25073b2be56 * ``` * */ export declare const listMessages: <ThrowOnError extends boolean = true>(options: Options<ListMessagesData, ThrowOnError>) => import("./client").RequestResult<ListMessagesResponses, ListMessagesErrors, ThrowOnError, "fields">; /** * Post Message * Send a message in a particular conversation. */ export declare const postMessage: <ThrowOnError extends boolean = true>(options: Options<PostMessageData, ThrowOnError>) => import("./client").RequestResult<PostMessageResponses, PostMessageErrors, ThrowOnError, "fields">; /** * Delete Message * Delete a single message of a particular conversation. */ export declare const deleteMessage: <ThrowOnError extends boolean = true>(options: Options<DeleteMessageData, ThrowOnError>) => import("./client").RequestResult<DeleteMessageResponses, DeleteMessageErrors, ThrowOnError, "fields">; /** * Post Activity * Notify Sunshine Conversations of different conversation activities. Supported activity types are: * * Typing activity * * Conversation read event * */ export declare const postActivity: <ThrowOnError extends boolean = true>(options: Options<PostActivityData, ThrowOnError>) => import("./client").RequestResult<PostActivityResponses, unknown, ThrowOnError, "fields">; /** * Accept Control * The acceptControl action transfers the control of the conversation to the pending switchboard integration. When using integration auth scope, a 403 is returned if the pending switchboard integration is not the authenticated integration. */ export declare const acceptControl: <ThrowOnError extends boolean = true>(options: Options<AcceptControlData, ThrowOnError>) => import("./client").RequestResult<AcceptControlResponses, AcceptControlErrors, ThrowOnError, "fields">; /** * Offer Control * The offerControl action will invite a switchboard integration to accept control of the conversation (changing its status to pending), and trigger a webhook signal to that integration indicating that they have been offered control of the conversation. Invalidates previous offerControl actions. */ export declare const offerControl: <ThrowOnError extends boolean = true>(options: Options<OfferControlData, ThrowOnError>) => import("./client").RequestResult<OfferControlResponses, OfferControlErrors, ThrowOnError, "fields">; /** * Pass Control * The passControl action marks the named switchboard integration as active and transitions all the other switchboard integrations to standby status. The `passControl` action is idempotent if either the target `switchboardIntegration` is specified explicitly by its `id` or `name`, or the `next` keyword is used for the `switchboardIntegration` field, and the invoking integration can be identified by its [OAuth token](https://docs.smooch.io/guide/oauth/#redirect-and-acquiring-an-oauth-token) or [Custom Integration API Key](https://docs.smooch.io/rest/#tag/CustomIntegrationApiKeys) credentials. Duplicate passControl actions using the `next` keyword and their metadata are disregarded. For more information, see [Switchboard passControl](https://docs.smooch.io/guide/switchboard/#pass-control). */ export declare const passControl: <ThrowOnError extends boolean = true>(options: Options<PassControlData, ThrowOnError>) => import("./client").RequestResult<PassControlResponses, PassControlErrors, ThrowOnError, "fields">; /** * Release Control * The releaseControl action releases the control of the conversation by nullifying its switchboard state. When using integration auth scope, a 403 is returned if the active switchboard integration is not the authenticated integration. */ export declare const releaseControl: <ThrowOnError extends boolean = true>(options: Options<ReleaseControlData, ThrowOnError>) => import("./client").RequestResult<ReleaseControlResponses, ReleaseControlErrors, ThrowOnError, "fields">; /** * Download Message Ref * When a third party channel provides a reference of a data, this API can be used to download the reference and fetch the full data. Currently, only apple channel is supported. */ export declare const downloadMessageRef: <ThrowOnError extends boolean = true>(options: Options<DownloadMessageRefData, ThrowOnError>) => import("./client").RequestResult<DownloadMessageRefResponses, unknown, ThrowOnError, "fields">; /** * List Integrations * List available integrations. This API is paginated through [cursor pagination](#section/Introduction/API-pagination-and-records-limits). * ```shell * /v2/apps/:appId/integrations?page[after]=5e1606762556d93e9c176f69&page[size]=10&filter[types]=custom,web * ``` * */ export declare const listIntegrations: <ThrowOnError extends boolean = true>(options: Options<ListIntegrationsData, ThrowOnError>) => import("./client").RequestResult<ListIntegrationsResponses, ListIntegrationsErrors, ThrowOnError, "fields">; /** * Create Integration * The Create Integration endpoint allows you to provision apps with front-end messaging channels. Selecting a `custom` integration allows the creation of webhooks. */ export declare const createIntegration: <ThrowOnError extends boolean = true>(options: Options<CreateIntegrationData, ThrowOnError>) => import("./client").RequestResult<CreateIntegrationResponses, CreateIntegrationErrors, ThrowOnError, "fields">; /** * Delete Integration * Delete the specified integration. */ export declare const deleteIntegration: <ThrowOnError extends boolean = true>(options: Options<DeleteIntegrationData, ThrowOnError>) => import("./client").RequestResult<DeleteIntegrationResponses, DeleteIntegrationErrors, ThrowOnError, "fields">; /** * Get Integration * Get integration. */ export declare const getIntegration: <ThrowOnError extends boolean = true>(options: Options<GetIntegrationData, ThrowOnError>) => import("./client").RequestResult<GetIntegrationResponses, GetIntegrationErrors, ThrowOnError, "fields">; /** * Update Integration * Allows you to update certain fields of existing integrations. If updating a specific property is not supported, you must delete the integration and re-create it with the new data. */ export declare const updateIntegration: <ThrowOnError extends boolean = true>(options: Options<UpdateIntegrationData, ThrowOnError>) => import("./client").RequestResult<UpdateIntegrationResponses, UpdateIntegrationErrors, ThrowOnError, "fields">; /** * List Integration Keys * Lists all API keys for a given integration. */ export declare const listCustomIntegrationKeys: <ThrowOnError extends boolean = true>(options: Options<ListCustomIntegrationKeysData, ThrowOnError>) => import("./client").RequestResult<ListCustomIntegrationKeysResponses, ListCustomIntegrationKeysErrors, ThrowOnError, "fields">; /** * Create Integration Key * Creates an API key for the specified custom integration. The response body will include a secret as well it’s corresponding id, which you can use to generate JSON Web Tokens to securely make API calls on behalf of the integration. */ export declare const createCustomIntegrationKey: <ThrowOnError extends boolean = true>(options: Options<CreateCustomIntegrationKeyData, ThrowOnError>) => import("./client").RequestResult<CreateCustomIntegrationKeyResponses, unknown, ThrowOnError, "fields">; /** * Delete Integration Key * Removes an API key. */ export declare const deleteCustomIntegrationKey: <ThrowOnError extends boolean = true>(options: Options<DeleteCustomIntegrationKeyData, ThrowOnError>) => import("./client").RequestResult<DeleteCustomIntegrationKeyResponses, unknown, ThrowOnError, "fields">; /** * Get Integration Key * Get the specified API key. */ export declare const getCustomIntegrationKey: <ThrowOnError extends boolean = true>(options: Options<GetCustomIntegrationKeyData, ThrowOnError>) => import("./client").RequestResult<GetCustomIntegrationKeyResponses, unknown, ThrowOnError, "fields">; /** * List Webhooks * Lists all webhooks for a given Sunshine Conversations Connect integration or custom integration. */ export declare const listWebhooks: <ThrowOnError extends boolean = true>(options: Options<ListWebhooksData, ThrowOnError>) => import("./client").RequestResult<ListWebhooksResponses, ListWebhooksErrors, ThrowOnError, "fields">; /** * Create Webhook * Creates a new webhook associated with a Sunshine Conversations Connect integration or a custom integration. */ export declare const createWebhook: <ThrowOnError extends boolean = true>(options: Options<CreateWebhookData, ThrowOnError>) => import("./client").RequestResult<CreateWebhookResponses, CreateWebhookErrors, ThrowOnError, "fields">; /** * Delete Webhook * Deletes the specified webhook associated with a Sunshine Conversations Connect integration or a custom integration. */ export declare const deleteWebhook: <ThrowOnError extends boolean = true>(options: Options<DeleteWebhookData, ThrowOnError>) => import("./client").RequestResult<DeleteWebhookResponses, DeleteWebhookErrors, ThrowOnError, "fields">; /** * Get Webhook * Gets the specified webhook associated with a Sunshine Conversations Connect integration or a custom integration. */ export declare const getWebhook: <ThrowOnError extends boolean = true>(options: Options<GetWebhookData, ThrowOnError>) => import("./client").RequestResult<GetWebhookResponses, GetWebhookErrors, ThrowOnError, "fields">; /** * Update Webhook * Updates the specified webhook associated with a Sunshine Conversations Connect integration or a custom integration. */ export declare const updateWebhook: <ThrowOnError extends boolean = true>(options: Options<UpdateWebhookData, ThrowOnError>) => import("./client").RequestResult<UpdateWebhookResponses, UpdateWebhookErrors, ThrowOnError, "fields">; /** * List Switchboards * Lists all switchboards belonging to the app. * */ export declare const listSwitchboards: <ThrowOnError extends boolean = true>(options: Options<ListSwitchboardsData, ThrowOnError>) => import("./client").RequestResult<ListSwitchboardsResponses, ListSwitchboardsErrors, ThrowOnError, "fields">; /** * Create Switchboard * Create a switchboard. */ export declare const createSwitchboard: <ThrowOnError extends boolean = true>(options: Options<CreateSwitchboardData, ThrowOnError>) => import("./client").RequestResult<CreateSwitchboardResponses, CreateSwitchboardErrors, ThrowOnError, "fields">; /** * Delete Switchboard * Deletes the switchboard and all its switchboard integrations. The integrations linked to these switchboard integrations are not deleted and will start receiving all conversation events. */ export declare const deleteSwitchboard: <ThrowOnError extends boolean = true>(options: Options<DeleteSwitchboardData, ThrowOnError>) => import("./client").RequestResult<DeleteSwitchboardResponses, DeleteSwitchboardErrors, ThrowOnError, "fields">; /** * Update Switchboard * Updates a switchboard record. */ export declare const updateSwitchboard: <ThrowOnError extends boolean = true>(options: Options<UpdateSwitchboardData, ThrowOnError>) => import("./client").RequestResult<UpdateSwitchboardResponses, UpdateSwitchboardErrors, ThrowOnError, "fields">; /** * List Switchboard Integrations * Lists all switchboard integrations linked to the switchboard. * */ export declare const listSwitchboardIntegrations: <ThrowOnError extends boolean = true>(options: Options<ListSwitchboardIntegrationsData, ThrowOnError>) => import("./client").RequestResult<ListSwitchboardIntegrationsResponses, ListSwitchboardIntegrationsErrors, ThrowOnError, "fields">; /** * Create Switchboard Integration * Create a switchboard integration. */ export declare const createSwitchboardIntegration: <ThrowOnError extends boolean = true>(options: Options<CreateSwitchboardIntegrationData, ThrowOnError>) => import("./client").RequestResult<CreateSwitchboardIntegrationResponses, CreateSwitchboardIntegrationErrors, ThrowOnError, "fields">; /** * Delete Switchboard Integration * Deletes the switchboard integration. If the deleted switchboard integration had an active status for some conversations, the default switchboard integration will replace it. Note that it is forbidden to delete a switchboard integration if it's the default one (a new one must be chosen first) or if another switchboard integration's `nextSwitchboardIntegrationId` refers to it. The integration that was linked to the deleted switchboard integration will start receiving all conversation events, regardless of the switchboard status. */ export declare const deleteSwitchboardIntegration: <ThrowOnError extends boolean = true>(options: Options<DeleteSwitchboardIntegrationData, ThrowOnError>) => import("./client").RequestResult<DeleteSwitchboardIntegrationResponses, DeleteSwitchboardIntegrationErrors, ThrowOnError, "fields">; /** * Update Switchboard Integration * Updates a switchboard integration record. */ export declare const updateSwitchboardIntegration: <ThrowOnError extends boolean = true>(options: Options<UpdateSwitchboardIntegrationData, ThrowOnError>) => import("./client").RequestResult<UpdateSwitchboardIntegrationResponses, UpdateSwitchboardIntegrationErrors, ThrowOnError, "fields">; /** * Create User * Creates a new user. */ export declare const createUser: <ThrowOnError extends boolean = true>(options: Options<CreateUserData, ThrowOnError>) => import("./client").RequestResult<CreateUserResponses, CreateUserErrors, ThrowOnError, "fields">; /** * Delete User * Delete a user, its clients and its conversation history. The user is considered completely deleted once the `user:delete` webhook is fired. To only delete a user’s personal information, see [Delete User Personal Information](#operation/deleteUserPersonalInformation). */ export declare const deleteUser: <ThrowOnError extends boolean = true>(options: Options<DeleteUserData, ThrowOnError>) => import("./client").RequestResult<DeleteUserResponses, DeleteUserErrors, ThrowOnError, "fields">; /** * Get User * Fetches an individual user. */ export declare const getUser: <ThrowOnError extends boolean = true>(options: Options<GetUserData, ThrowOnError>) => import("./client").RequestResult<GetUserResponses, GetUserErrors, ThrowOnError, "fields">; /** * Update User * Updates a user. */ export declare const updateUser: <ThrowOnError extends boolean = true>(options: Options<UpdateUserData, ThrowOnError>) => import("./client").RequestResult<UpdateUserResponses, UpdateUserErrors, ThrowOnError, "fields">; /** * List Clients * Get all the clients for a particular user, including both linked clients and pending clients. * This API is paginated through [cursor pagination](#section/Introduction/API-pagination-and-records-limits). * * ```shell * /v2/apps/:appId/users/:userId/clients?page[after]=5ebee0975ac5304b664a12fa * ``` * */ export declare const listClients: <ThrowOnError extends boolean = true>(options: Options<ListClientsData, ThrowOnError>) => import("./client").RequestResult<ListClientsResponses, ListClientsErrors, ThrowOnError, "fields">; /** * Create Client * Create a client and link it to a channel specified by the `matchCriteria.type`. Note that the client is initially created with a `pending` status. The status of the linking request can be tracked by listening to the `link:match`, `link:success` and `link:failure` webhooks (only available in v1). For more information, see [link-events](https://docs.smooch.io/rest/v1/#link-events). */ export declare const createClient: <ThrowOnError extends boolean = true>(options: Options<CreateClientData, ThrowOnError>) => import("./client").RequestResult<CreateClientResponses, unknown, ThrowOnError, "fields">; /** * Remove Client * Remove a particular client and unsubscribe it from all connected conversations. */ export declare const removeClient: <ThrowOnError extends boolean = true>(options: Options<RemoveClientData, ThrowOnError>) => import("./client").RequestResult<RemoveClientResponses, RemoveClientErrors, ThrowOnError, "fields">; /** * List Devices * Get all the devices for a particular user. * The Devices are sorted based on last seen time. * */ export declare const listDevices: <ThrowOnError extends boolean = true>(options: Options<ListDevicesData, ThrowOnError>) => import("./client").RequestResult<ListDevicesResponses, unknown, ThrowOnError, "fields">; /** * Get Device * Fetches a specific Device. * */ export declare const getDevice: <ThrowOnError extends boolean = true>(options: Options<GetDeviceData, ThrowOnError>) => import("./client").RequestResult<GetDeviceResponses, GetDeviceErrors, ThrowOnError, "fields">; /** * Delete User Personal Information * Delete a user’s personal information. Calling this API will clear `givenName`, `surname`, `email` and `avatarUrl` and every custom property for the specified user. For every client owned by the user, it will also clear `displayName`, `avatarUrl` and any channel specific information stored in the info and raw fields. Calling this API doesn’t delete the user’s conversation history. To fully delete the user, see [Delete User](#operation/deleteUser). */ export declare const deleteUserPersonalInformation: <ThrowOnError extends boolean = true>(options: Options<DeleteUserPersonalInformationData, ThrowOnError>) => import("./client").RequestResult<DeleteUserPersonalInformationResponses, DeleteUserPersonalInformationErrors, ThrowOnError, "fields">; /** * Synchronize User * Synchronize a messaging user with its core Zendesk user counterpart. Messaging users are separate objects linked to a core Zendesk user record by `zendeskId`. It is possible for changes to be made to the core Zendesk user record in a way that causes the messaging user to fall out of sync. The core Zendesk user might have their primary email changed, for example. This endpoint can be used to update the messaging user with the `profile.givenName`, `profile.surname`, `externalId`, and primary email identity of its core Zendesk user counterpart.<br/><br/>It is also possible for two Zendesk users to be merged. In such a case, this API can be used to apply that merger on the messaging side. The surviving Zendesk user id can be specified via the `survivingZendeskId` parameter of the request body, and the outgoing `zendeskId` is specified in the request path. * <aside class="notice">Only the primary email identity of the core Zendesk user will be synchronized, and it will be set on the identities array, not in the profile.</aside> <br/> <aside class="notice">In some circumstances, a single call to this API might produce changes on more than one messaging user. If the externalId or email being synchronized already exists on a different messaging user within the account, the conflict will be resolved by merging those messaging users together, if possible. If a conflicting messaging user is already linked to a core Zendesk user by zendeskId it cannot be merged. In this case, the conflicting externalId or email will instead be removed and reassigned to the messaging user that is being synchronized.</aside> */ export declare const syncUser: <ThrowOnError extends boolean = true>(options: Options<SyncUserData, ThrowOnError>) => import("./client").RequestResult<SyncUserResponses, unknown, ThrowOnError, "fields">; /** * Authorize * This endpoint begins the OAuth flow. It relies on a browser session for authentication. If the user is not logged in to Sunshine Conversations they will be redirected to the login page. If the user has many apps, they will first be prompted to select the one they wish to integrate with. They will then be presented with an Allow/Deny dialog, describing details of the access your integration is requesting. */ export declare const authorize: <ThrowOnError extends boolean = true>(options: Options<AuthorizeData, ThrowOnError>) => import("./client").RequestResult<unknown, unknown, ThrowOnError, "fields">; /** * Get Token * This endpoint is used to exchange an authorization code for an access token. It should only be used in server-to-server calls. */ export declare const getToken: <ThrowOnError extends boolean = true>(options: Options<GetTokenData, ThrowOnError>) => import("./client").RequestResult<GetTokenResponses, unknown, ThrowOnError, "fields">; /** * Revoke Access * This endpoint is used to revoke your integration’s access to the user’s Sunshine Conversations app. Revoking access means your integration will no longer be able to interact with the app, and any webhooks the integration had previously configured will be removed. * Calling this endpoint is equivalent to the user removing your integration manually in the Sunshine Conversations web app. Your integration’s `removeUrl` (if configured) will also be called when an integration is removed in this way. * */ export declare const revokeAccess: <ThrowOnError extends boolean = true>(options: Options<RevokeAccessData, ThrowOnError>) => import("./client").RequestResult<RevokeAccessResponses, unknown, ThrowOnError, "fields">;