UNPKG

intercom-client

Version:

Official Node bindings to the Intercom API

104 lines (103 loc) 4.08 kB
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs"; import * as core from "../../../../core/index.mjs"; import * as Intercom from "../../../index.mjs"; export declare namespace AdminsClient { interface Options extends BaseClientOptions { } interface RequestOptions extends BaseRequestOptions { } } /** * Everything about your Admins */ export declare class AdminsClient { protected readonly _options: NormalizedClientOptionsWithAuth<AdminsClient.Options>; constructor(options?: AdminsClient.Options); /** * * You can view the currently authorised admin along with the embedded app object (a "workspace" in legacy terminology). * * > 🚧 Single Sign On * > * > If you are building a custom "Log in with Intercom" flow for your site, and you call the `/me` endpoint to identify the logged-in user, you should not accept any sign-ins from users with unverified email addresses as it poses a potential impersonation security risk. * * @param {AdminsClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.admins.identify() */ identify(requestOptions?: AdminsClient.RequestOptions): core.HttpResponsePromise<Intercom.AdminWithApp | undefined>; private __identify; /** * You can set an Admin as away for the Inbox. * * @param {Intercom.ConfigureAwayAdminRequest} request * @param {AdminsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.BadRequestError} * @throws {@link Intercom.UnauthorizedError} * @throws {@link Intercom.NotFoundError} * * @example * await client.admins.away({ * admin_id: 1, * away_mode_enabled: true, * away_mode_reassign: true, * away_status_reason_id: 12345 * }) * * @example * await client.admins.away({ * admin_id: 1, * away_mode_enabled: true, * away_mode_reassign: true * }) */ away(request: Intercom.ConfigureAwayAdminRequest, requestOptions?: AdminsClient.RequestOptions): core.HttpResponsePromise<Intercom.Admin | undefined>; private __away; /** * You can get a log of activities by all admins in an app. * * @param {Intercom.ListAllActivityLogsRequest} request * @param {AdminsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.UnauthorizedError} * * @example * await client.admins.listAllActivityLogs({ * created_at_after: "1677253093", * created_at_before: "1677861493" * }) */ listAllActivityLogs(request: Intercom.ListAllActivityLogsRequest, requestOptions?: AdminsClient.RequestOptions): core.HttpResponsePromise<Intercom.ActivityLogList>; private __listAllActivityLogs; /** * You can fetch a list of admins for a given workspace. * * @param {AdminsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.UnauthorizedError} * * @example * await client.admins.list() */ list(requestOptions?: AdminsClient.RequestOptions): core.HttpResponsePromise<Intercom.AdminList>; private __list; /** * You can retrieve the details of a single admin. * * @param {Intercom.FindAdminRequest} request * @param {AdminsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.UnauthorizedError} * @throws {@link Intercom.NotFoundError} * * @example * await client.admins.find({ * admin_id: 1 * }) */ find(request: Intercom.FindAdminRequest, requestOptions?: AdminsClient.RequestOptions): core.HttpResponsePromise<Intercom.Admin | undefined>; private __find; }