UNPKG

intercom-client

Version:

Official Node bindings to the Intercom API

112 lines (111 loc) 5.64 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 CustomObjectInstancesClient { interface Options extends BaseClientOptions { } interface RequestOptions extends BaseRequestOptions { } } /** * Everything about your Custom Object instances. * {% admonition type="warning" name="Permission Requirements" %} * From now on, to access this endpoint, you need additional permissions. Please head over to the [Developer Hub](https://app.intercom.com/a/apps/_/developer-hub) app package authentication settings to configure the required permissions. * {% /admonition %} */ export declare class CustomObjectInstancesClient { protected readonly _options: NormalizedClientOptionsWithAuth<CustomObjectInstancesClient.Options>; constructor(options?: CustomObjectInstancesClient.Options); /** * Fetch a Custom Object Instance by external_id. * * @param {Intercom.GetCustomObjectInstancesByExternalIdRequest} request * @param {CustomObjectInstancesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.UnauthorizedError} * @throws {@link Intercom.NotFoundError} * * @example * await client.customObjectInstances.getCustomObjectInstancesByExternalId({ * custom_object_type_identifier: "Order", * external_id: "external_id" * }) */ getCustomObjectInstancesByExternalId(request: Intercom.GetCustomObjectInstancesByExternalIdRequest, requestOptions?: CustomObjectInstancesClient.RequestOptions): core.HttpResponsePromise<Intercom.CustomObjectInstance | undefined>; private __getCustomObjectInstancesByExternalId; /** * Create or update a custom object instance * * @param {Intercom.CreateOrUpdateCustomObjectInstanceRequest} request * @param {CustomObjectInstancesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.UnauthorizedError} * @throws {@link Intercom.NotFoundError} * * @example * await client.customObjectInstances.createCustomObjectInstances({ * custom_object_type_identifier: "Order", * external_id: "123", * external_created_at: 1392036272, * external_updated_at: 1392036272, * custom_attributes: { * "order_number": "ORDER-12345", * "total_amount": "custom_attributes" * } * }) */ createCustomObjectInstances(request: Intercom.CreateOrUpdateCustomObjectInstanceRequest, requestOptions?: CustomObjectInstancesClient.RequestOptions): core.HttpResponsePromise<Intercom.CustomObjectInstance | undefined>; private __createCustomObjectInstances; /** * Delete a single Custom Object instance by external_id. * * @param {Intercom.DeleteCustomObjectInstancesByIdRequest} request * @param {CustomObjectInstancesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.UnauthorizedError} * @throws {@link Intercom.NotFoundError} * * @example * await client.customObjectInstances.deleteCustomObjectInstancesById({ * custom_object_type_identifier: "Order", * external_id: "external_id" * }) */ deleteCustomObjectInstancesById(request: Intercom.DeleteCustomObjectInstancesByIdRequest, requestOptions?: CustomObjectInstancesClient.RequestOptions): core.HttpResponsePromise<Intercom.CustomObjectInstanceDeleted>; private __deleteCustomObjectInstancesById; /** * Fetch a Custom Object Instance by id. * * @param {Intercom.GetCustomObjectInstancesByIdRequest} request * @param {CustomObjectInstancesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.UnauthorizedError} * @throws {@link Intercom.NotFoundError} * * @example * await client.customObjectInstances.getCustomObjectInstancesById({ * custom_object_type_identifier: "Order", * custom_object_instance_id: "custom_object_instance_id" * }) */ getCustomObjectInstancesById(request: Intercom.GetCustomObjectInstancesByIdRequest, requestOptions?: CustomObjectInstancesClient.RequestOptions): core.HttpResponsePromise<Intercom.CustomObjectInstance | undefined>; private __getCustomObjectInstancesById; /** * Delete a single Custom Object instance using the Intercom defined id. * * @param {Intercom.DeleteCustomObjectInstancesByExternalIdRequest} request * @param {CustomObjectInstancesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.UnauthorizedError} * @throws {@link Intercom.NotFoundError} * * @example * await client.customObjectInstances.deleteCustomObjectInstancesByExternalId({ * custom_object_type_identifier: "Order", * custom_object_instance_id: "custom_object_instance_id" * }) */ deleteCustomObjectInstancesByExternalId(request: Intercom.DeleteCustomObjectInstancesByExternalIdRequest, requestOptions?: CustomObjectInstancesClient.RequestOptions): core.HttpResponsePromise<Intercom.CustomObjectInstanceDeleted>; private __deleteCustomObjectInstancesByExternalId; }