UNPKG

@planet-a/affinity-node

Version:
116 lines (115 loc) 9.24 kB
import { BaseAPIRequestFactory } from './baseapi.js'; import { Configuration } from '../configuration.js'; import { RequestContext, ResponseContext, HttpInfo } from '../http/http.js'; import { FieldMetadataPaged } from '../models/FieldMetadataPaged.js'; import { ListEntryPaged } from '../models/ListEntryPaged.js'; import { ListPaged } from '../models/ListPaged.js'; import { NotesNotesPaged } from '../models/NotesNotesPaged.js'; import { Person } from '../models/Person.js'; import { PersonPaged } from '../models/PersonPaged.js'; /** * no description */ export declare class PersonsApiRequestFactory extends BaseAPIRequestFactory { /** * Returns metadata on non-list-specific Person Fields. Use the returned Field IDs to request field data from the GET `/v2/persons` and GET `/v2/persons/{id}` endpoints. * Get metadata on Person Fields * @param cursor Cursor for the next or previous page * @param limit Number of items to include in the page */ v2PersonsFieldsGET(cursor?: string, limit?: number, _options?: Configuration): Promise<RequestContext>; /** * Paginate through Persons in Affinity. Returns basic information and non-list-specific field data on each Person. 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/persons/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, Persons 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 People directory\" [permission](#section/Getting-Started/Permissions). * Get all Persons * @param cursor Cursor for the next or previous page * @param limit Number of items to include in the page * @param ids People IDs * @param fieldIds Field IDs for which to return field data * @param fieldTypes Field Types for which to return field data */ v2PersonsGET(cursor?: string, limit?: number, ids?: Array<number>, fieldIds?: Array<string>, fieldTypes?: Array<'enriched' | 'global' | 'relationship-intelligence'>, _options?: Configuration): Promise<RequestContext>; /** * Returns basic information and non-list-specific field data on the requested Person. 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/persons/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, Persons 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 People directory\" [permission](#section/Getting-Started/Permissions). * Get a single Person * @param personId Person ID * @param fieldIds Field IDs for which to return field data * @param fieldTypes Field Types for which to return field data */ v2PersonsPersonIdGET(personId: number, fieldIds?: Array<string>, fieldTypes?: Array<'enriched' | 'global' | 'relationship-intelligence'>, _options?: Configuration): Promise<RequestContext>; /** * Paginate through the List Entries (AKA rows) for the given Person across all Lists. Each List Entry includes field data for the Person, 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 Person\'s List Entries * @param personId Persons ID * @param cursor Cursor for the next or previous page * @param limit Number of items to include in the page */ v2PersonsPersonIdListEntriesGET(personId: number, cursor?: string, limit?: number, _options?: Configuration): Promise<RequestContext>; /** * Paginate through all Lists where the given Person appears as an entry and that you have access to view. Returns basic List information for each List that contains this Person. * Get a Person\'s Lists * @param personId Persons ID * @param cursor Cursor for the next or previous page * @param limit Number of items to include in the page */ v2PersonsPersonIdListsGET(personId: number, cursor?: string, limit?: number, _options?: Configuration): Promise<RequestContext>; /** * | ⚠️ This endpoint is currently in BETA | |--| Returns notes for a given person id which includes directly attached notes, notes on meetings this person attended, and notes where this person is mentioned. You can filter notes using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties. | **Property Name** | **Description** | **Type** | **Allowed Operators** | **Examples** | |-----------------------------|-----------------------------------------------------------------|------------|--------------------------------------|---------------------------------| | `creator.id` | Filter notes by the creator of the note | `int32` | `=` | `creator.id=1` | | `createdAt` | Filter notes by when it was created | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-02-04T10:48:24Z` | | `updatedAt` | Filter notes by when it was updated | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-02-03T10:48:24Z`| * Get Notes for a Person * @param personId Persons ID * @param filter Filter options * @param cursor Cursor for the next or previous page * @param limit Number of items to include in the page * @param totalCount Include total count of the collection in the pagination response */ v2PersonsPersonIdNotesGET(personId: number, filter?: string, cursor?: string, limit?: number, totalCount?: boolean, _options?: Configuration): Promise<RequestContext>; } export declare class PersonsApiResponseProcessor { /** * 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 v2PersonsFieldsGET * @throws ApiException if the response code was not in [200, 299] */ v2PersonsFieldsGETWithHttpInfo(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 v2PersonsGET * @throws ApiException if the response code was not in [200, 299] */ v2PersonsGETWithHttpInfo(response: ResponseContext): Promise<HttpInfo<PersonPaged>>; /** * 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 v2PersonsPersonIdGET * @throws ApiException if the response code was not in [200, 299] */ v2PersonsPersonIdGETWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Person>>; /** * 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 v2PersonsPersonIdListEntriesGET * @throws ApiException if the response code was not in [200, 299] */ v2PersonsPersonIdListEntriesGETWithHttpInfo(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 v2PersonsPersonIdListsGET * @throws ApiException if the response code was not in [200, 299] */ v2PersonsPersonIdListsGETWithHttpInfo(response: ResponseContext): Promise<HttpInfo<ListPaged>>; /** * 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 v2PersonsPersonIdNotesGET * @throws ApiException if the response code was not in [200, 299] */ v2PersonsPersonIdNotesGETWithHttpInfo(response: ResponseContext): Promise<HttpInfo<NotesNotesPaged>>; }