UNPKG

@planet-a/affinity-node

Version:
97 lines (96 loc) 6.82 kB
import { BaseAPIRequestFactory } from './baseapi.js'; import { Configuration } from '../configuration.js'; import { RequestContext, ResponseContext, HttpInfo } from '../http/http.js'; import { Company } from '../models/Company.js'; import { CompanyPaged } from '../models/CompanyPaged.js'; import { FieldMetadataPaged } from '../models/FieldMetadataPaged.js'; import { ListEntryPaged } from '../models/ListEntryPaged.js'; import { ListPaged } from '../models/ListPaged.js'; /** * no description */ export declare class CompaniesApiRequestFactory extends BaseAPIRequestFactory { /** * Paginate through Companies in Affinity. Returns basic information and non-list-specific field data on each Company. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/companies/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, Companies will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. Requires the \"Export All Organizations directory\" [permission](#section/Getting-Started/Permissions). * Get all Companies * @param cursor Cursor for the next or previous page * @param limit Number of items to include in the page * @param ids Company IDs * @param fieldIds Field IDs for which to return field data * @param fieldTypes Field Types for which to return field data */ getV2Companies(cursor?: string, limit?: number, ids?: Array<number>, fieldIds?: Array<string>, fieldTypes?: Array<'enriched' | 'global' | 'relationship-intelligence'>, _options?: Configuration): Promise<RequestContext>; /** * Returns metadata on non-list-specific Company Fields. Use the returned Field IDs to request field data from the GET `/v2/companies` and GET `/v2/companies/{id}` endpoints. * Get metadata on Company Fields * @param cursor Cursor for the next or previous page * @param limit Number of items to include in the page */ getV2CompaniesFields(cursor?: string, limit?: number, _options?: Configuration): Promise<RequestContext>; /** * Returns basic information and non-list-specific field data on the requested Company. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/companies/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, Companies will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. Requires the \"Export All Organizations directory\" [permission](#section/Getting-Started/Permissions). * Get a single Company * @param id Company ID * @param fieldIds Field IDs for which to return field data * @param fieldTypes Field Types for which to return field data */ getV2CompaniesId(id: number, fieldIds?: Array<string>, fieldTypes?: Array<'enriched' | 'global' | 'relationship-intelligence'>, _options?: Configuration): Promise<RequestContext>; /** * Paginate through the List Entries (AKA rows) for the given Company across all Lists. Each List Entry includes field data for the Company, including list-specific field data. Each List Entry also includes metadata about its creation, i.e., when it was added to the List and by whom. Requires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions). * Get a Company\'s List Entries * @param id Company ID * @param cursor Cursor for the next or previous page * @param limit Number of items to include in the page */ getV2CompaniesIdListEntries(id: number, cursor?: string, limit?: number, _options?: Configuration): Promise<RequestContext>; /** * Returns metadata for all the Lists on which the given Company appears. * Get a Company\'s Lists * @param id Company ID * @param cursor Cursor for the next or previous page * @param limit Number of items to include in the page */ getV2CompaniesIdLists(id: number, cursor?: string, limit?: number, _options?: Configuration): Promise<RequestContext>; } export declare class CompaniesApiResponseProcessor { /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getV2Companies * @throws ApiException if the response code was not in [200, 299] */ getV2CompaniesWithHttpInfo(response: ResponseContext): Promise<HttpInfo<CompanyPaged>>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getV2CompaniesFields * @throws ApiException if the response code was not in [200, 299] */ getV2CompaniesFieldsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<FieldMetadataPaged>>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getV2CompaniesId * @throws ApiException if the response code was not in [200, 299] */ getV2CompaniesIdWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Company>>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getV2CompaniesIdListEntries * @throws ApiException if the response code was not in [200, 299] */ getV2CompaniesIdListEntriesWithHttpInfo(response: ResponseContext): Promise<HttpInfo<ListEntryPaged>>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getV2CompaniesIdLists * @throws ApiException if the response code was not in [200, 299] */ getV2CompaniesIdListsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<ListPaged>>; }