@planet-a/affinity-node
Version:
API wrapper for the affinity.co API
516 lines (515 loc) • 90.1 kB
JavaScript
import { ObservableAuthApi } from "./ObservableAPI.js";
export class ObjectAuthApi {
constructor(configuration, requestFactory, responseProcessor) {
Object.defineProperty(this, "api", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.api = new ObservableAuthApi(configuration, requestFactory, responseProcessor);
}
/**
* Returns information about the authenticated user, their current organization, and API key permissions. Use this endpoint to verify your authentication and understand your available API access levels.
* Get current user
* @param param the request object
*/
v2AuthWhoamiGETWithHttpInfo(param = {}, options) {
return this.api.v2AuthWhoamiGETWithHttpInfo(options).toPromise();
}
/**
* Returns information about the authenticated user, their current organization, and API key permissions. Use this endpoint to verify your authentication and understand your available API access levels.
* Get current user
* @param param the request object
*/
v2AuthWhoamiGET(param = {}, options) {
return this.api.v2AuthWhoamiGET(options).toPromise();
}
}
import { ObservableCallsApi } from "./ObservableAPI.js";
export class ObjectCallsApi {
constructor(configuration, requestFactory, responseProcessor) {
Object.defineProperty(this, "api", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.api = new ObservableCallsApi(configuration, requestFactory, responseProcessor);
}
/**
* Paginate through all calls in Affinity. Returns basic information about the call interaction and its participants. Will only return calls that the current authenticated user has permission to see. You can filter calls 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** | |-----------------------------|-----------------------------------------------------------------|------------|--------------------------------------|----------------------------------| | `id` | Unique identifier for Calls | `int64` | `=` | `id=1` | | `startTime` | Start time of when the Call was held | `datetime` | `>`, `<`, `>=`, `<=` | `sentAt>2025-01-01T01:00:00Z` | | `createdAt` | When the Call was created in Affinity | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` | | `updatedAt` | When the Call was updated in Affinity | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z`|
* Get metadata on all Calls
* @param param the request object
*/
v2CallsGETWithHttpInfo(param = {}, options) {
return this.api.v2CallsGETWithHttpInfo(param.cursor, param.limit, param.filter, options).toPromise();
}
/**
* Paginate through all calls in Affinity. Returns basic information about the call interaction and its participants. Will only return calls that the current authenticated user has permission to see. You can filter calls 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** | |-----------------------------|-----------------------------------------------------------------|------------|--------------------------------------|----------------------------------| | `id` | Unique identifier for Calls | `int64` | `=` | `id=1` | | `startTime` | Start time of when the Call was held | `datetime` | `>`, `<`, `>=`, `<=` | `sentAt>2025-01-01T01:00:00Z` | | `createdAt` | When the Call was created in Affinity | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` | | `updatedAt` | When the Call was updated in Affinity | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z`|
* Get metadata on all Calls
* @param param the request object
*/
v2CallsGET(param = {}, options) {
return this.api.v2CallsGET(param.cursor, param.limit, param.filter, options).toPromise();
}
}
import { ObservableChatMessagesApi } from "./ObservableAPI.js";
export class ObjectChatMessagesApi {
constructor(configuration, requestFactory, responseProcessor) {
Object.defineProperty(this, "api", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.api = new ObservableChatMessagesApi(configuration, requestFactory, responseProcessor);
}
/**
* Paginate through all chat messages in Affinity. Returns basic information about the chat message interaction and its participants. Will only return chat messages that the current authenticated user has permission to see. You can filter chat messages 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** | |-----------------------------|-----------------------------------------------------------------|------------|--------------------------------------|----------------------------------| | `id` | Unique identifier for Chat Messages | `int64` | `=` | `id=1` | | `sentAt` | When the Chat Message was sent at | `datetime` | `>`, `<`, `>=`, `<=` | `sentAt>2025-01-01T01:00:00Z` | | `createdAt` | When the Chat Message was created in Affinity | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` | | `updatedAt` | When the Chat Message was updated in Affinity | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z`|
* Get metadata on all Chat Messages
* @param param the request object
*/
v2ChatMessagesGETWithHttpInfo(param = {}, options) {
return this.api.v2ChatMessagesGETWithHttpInfo(param.cursor, param.limit, param.filter, options).toPromise();
}
/**
* Paginate through all chat messages in Affinity. Returns basic information about the chat message interaction and its participants. Will only return chat messages that the current authenticated user has permission to see. You can filter chat messages 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** | |-----------------------------|-----------------------------------------------------------------|------------|--------------------------------------|----------------------------------| | `id` | Unique identifier for Chat Messages | `int64` | `=` | `id=1` | | `sentAt` | When the Chat Message was sent at | `datetime` | `>`, `<`, `>=`, `<=` | `sentAt>2025-01-01T01:00:00Z` | | `createdAt` | When the Chat Message was created in Affinity | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` | | `updatedAt` | When the Chat Message was updated in Affinity | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z`|
* Get metadata on all Chat Messages
* @param param the request object
*/
v2ChatMessagesGET(param = {}, options) {
return this.api.v2ChatMessagesGET(param.cursor, param.limit, param.filter, options).toPromise();
}
}
import { ObservableCompaniesApi } from "./ObservableAPI.js";
export class ObjectCompaniesApi {
constructor(configuration, requestFactory, responseProcessor) {
Object.defineProperty(this, "api", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.api = new ObservableCompaniesApi(configuration, requestFactory, responseProcessor);
}
/**
* 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 param the request object
*/
v2CompaniesCompanyIdGETWithHttpInfo(param, options) {
return this.api.v2CompaniesCompanyIdGETWithHttpInfo(param.companyId, param.fieldIds, param.fieldTypes, options).toPromise();
}
/**
* 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 param the request object
*/
v2CompaniesCompanyIdGET(param, options) {
return this.api.v2CompaniesCompanyIdGET(param.companyId, param.fieldIds, param.fieldTypes, options).toPromise();
}
/**
* 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 param the request object
*/
v2CompaniesCompanyIdListEntriesGETWithHttpInfo(param, options) {
return this.api.v2CompaniesCompanyIdListEntriesGETWithHttpInfo(param.companyId, param.cursor, param.limit, options).toPromise();
}
/**
* 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 param the request object
*/
v2CompaniesCompanyIdListEntriesGET(param, options) {
return this.api.v2CompaniesCompanyIdListEntriesGET(param.companyId, param.cursor, param.limit, options).toPromise();
}
/**
* Paginate through all Lists where the given Company appears as an entry and that you have access to view. Returns basic List information for each List that contains this Company.
* Get a Company\'s Lists
* @param param the request object
*/
v2CompaniesCompanyIdListsGETWithHttpInfo(param, options) {
return this.api.v2CompaniesCompanyIdListsGETWithHttpInfo(param.companyId, param.cursor, param.limit, options).toPromise();
}
/**
* Paginate through all Lists where the given Company appears as an entry and that you have access to view. Returns basic List information for each List that contains this Company.
* Get a Company\'s Lists
* @param param the request object
*/
v2CompaniesCompanyIdListsGET(param, options) {
return this.api.v2CompaniesCompanyIdListsGET(param.companyId, param.cursor, param.limit, options).toPromise();
}
/**
* | ⚠️ This endpoint is currently in BETA | |--| Returns relevant notes for a given company which includes directly attached notes and notes attached to persons on this company. 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 Company
* @param param the request object
*/
v2CompaniesCompanyIdNotesGETWithHttpInfo(param, options) {
return this.api.v2CompaniesCompanyIdNotesGETWithHttpInfo(param.companyId, param.filter, param.cursor, param.limit, param.totalCount, options).toPromise();
}
/**
* | ⚠️ This endpoint is currently in BETA | |--| Returns relevant notes for a given company which includes directly attached notes and notes attached to persons on this company. 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 Company
* @param param the request object
*/
v2CompaniesCompanyIdNotesGET(param, options) {
return this.api.v2CompaniesCompanyIdNotesGET(param.companyId, param.filter, param.cursor, param.limit, param.totalCount, options).toPromise();
}
/**
* 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 param the request object
*/
v2CompaniesFieldsGETWithHttpInfo(param = {}, options) {
return this.api.v2CompaniesFieldsGETWithHttpInfo(param.cursor, param.limit, options).toPromise();
}
/**
* 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 param the request object
*/
v2CompaniesFieldsGET(param = {}, options) {
return this.api.v2CompaniesFieldsGET(param.cursor, param.limit, options).toPromise();
}
/**
* 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 param the request object
*/
v2CompaniesGETWithHttpInfo(param = {}, options) {
return this.api.v2CompaniesGETWithHttpInfo(param.cursor, param.limit, param.ids, param.fieldIds, param.fieldTypes, options).toPromise();
}
/**
* 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 param the request object
*/
v2CompaniesGET(param = {}, options) {
return this.api.v2CompaniesGET(param.cursor, param.limit, param.ids, param.fieldIds, param.fieldTypes, options).toPromise();
}
}
import { ObservableCompanyMergesApi } from "./ObservableAPI.js";
export class ObjectCompanyMergesApi {
constructor(configuration, requestFactory, responseProcessor) {
Object.defineProperty(this, "api", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.api = new ObservableCompanyMergesApi(configuration, requestFactory, responseProcessor);
}
/**
* Retrieve paginated company merges for the organization. Returns all company merges initiated by users in your organization, including their current status, the companies involved, and merge details. You can filter company merges using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties: | Property | Type | Operators | Values | Examples | |----------|------|-----------|--------|----------| | `status` | `enum` | `=` | `in-progress`, `success`, `failed` | `status=failed` | | `taskId` | `string` | `=` | | `taskId=789e0123-e45b-67c8-d901-234567890123` | Company merges are returned in reverse chronological order (most recent first). Requires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.
* Get All Company Merges
* @param param the request object
*/
v2CompanyMergesGETWithHttpInfo(param = {}, options) {
return this.api.v2CompanyMergesGETWithHttpInfo(param.cursor, param.limit, param.filter, options).toPromise();
}
/**
* Retrieve paginated company merges for the organization. Returns all company merges initiated by users in your organization, including their current status, the companies involved, and merge details. You can filter company merges using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties: | Property | Type | Operators | Values | Examples | |----------|------|-----------|--------|----------| | `status` | `enum` | `=` | `in-progress`, `success`, `failed` | `status=failed` | | `taskId` | `string` | `=` | | `taskId=789e0123-e45b-67c8-d901-234567890123` | Company merges are returned in reverse chronological order (most recent first). Requires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.
* Get All Company Merges
* @param param the request object
*/
v2CompanyMergesGET(param = {}, options) {
return this.api.v2CompanyMergesGET(param.cursor, param.limit, param.filter, options).toPromise();
}
/**
* Retrieve the status and details of a specific company merge. Returns information about the company merge including its current status, the companies involved, timestamps, and any error information if the merge failed. The `mergeId` can be obtained from the response of the [Get All Company Merges](#tag/companyMerges/operation/v2_company-merges__GET) endpoint, or by filtering company merges by task ID using `/v2/company-merges?filter=taskId={taskId}` after initiating a merge. Requires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.
* Get Company Merge
* @param param the request object
*/
v2CompanyMergesMergeIdGETWithHttpInfo(param, options) {
return this.api.v2CompanyMergesMergeIdGETWithHttpInfo(param.mergeId, options).toPromise();
}
/**
* Retrieve the status and details of a specific company merge. Returns information about the company merge including its current status, the companies involved, timestamps, and any error information if the merge failed. The `mergeId` can be obtained from the response of the [Get All Company Merges](#tag/companyMerges/operation/v2_company-merges__GET) endpoint, or by filtering company merges by task ID using `/v2/company-merges?filter=taskId={taskId}` after initiating a merge. Requires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.
* Get Company Merge
* @param param the request object
*/
v2CompanyMergesMergeIdGET(param, options) {
return this.api.v2CompanyMergesMergeIdGET(param.mergeId, options).toPromise();
}
/**
* Initiate a company merge to combine a duplicate company profile into a primary company profile. This is an asynchronous process that will merge all data from the duplicate company into the primary company. Once the merge is initiated, you can track its progress using the returned [task URL](#tag/companyMerges/operation/v2_tasks_company-merges_taskId__GET). Requires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.
* Initiate Company Merge
* @param param the request object
*/
v2CompanyMergesPOSTWithHttpInfo(param, options) {
return this.api.v2CompanyMergesPOSTWithHttpInfo(param.companyMergeRequest, options).toPromise();
}
/**
* Initiate a company merge to combine a duplicate company profile into a primary company profile. This is an asynchronous process that will merge all data from the duplicate company into the primary company. Once the merge is initiated, you can track its progress using the returned [task URL](#tag/companyMerges/operation/v2_tasks_company-merges_taskId__GET). Requires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.
* Initiate Company Merge
* @param param the request object
*/
v2CompanyMergesPOST(param, options) {
return this.api.v2CompanyMergesPOST(param.companyMergeRequest, options).toPromise();
}
/**
* Retrieve paginated company merge tasks for the organization. Returns all merge tasks initiated by users in your organization, including their current status, the companies involved, and task details. You can filter tasks using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties: | Property | Type | Operators | Values | Examples | |----------|------|-----------|--------|----------| | `status` | `enum` | `=` | `in-progress`, `success`, `failed` | `status=failed` | Tasks are returned in reverse chronological order (most recent first). Requires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.
* Get All Company Merge Tasks
* @param param the request object
*/
v2TasksCompanyMergesGETWithHttpInfo(param = {}, options) {
return this.api.v2TasksCompanyMergesGETWithHttpInfo(param.cursor, param.limit, param.filter, options).toPromise();
}
/**
* Retrieve paginated company merge tasks for the organization. Returns all merge tasks initiated by users in your organization, including their current status, the companies involved, and task details. You can filter tasks using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties: | Property | Type | Operators | Values | Examples | |----------|------|-----------|--------|----------| | `status` | `enum` | `=` | `in-progress`, `success`, `failed` | `status=failed` | Tasks are returned in reverse chronological order (most recent first). Requires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.
* Get All Company Merge Tasks
* @param param the request object
*/
v2TasksCompanyMergesGET(param = {}, options) {
return this.api.v2TasksCompanyMergesGET(param.cursor, param.limit, param.filter, options).toPromise();
}
/**
* Retrieve the status and details of a specific task for company merges. Returns information about the company merges for a specific task including its overall status, number of merges in-progress, completed, and failed. Detailed information about individual merges for this task can be found by querying: `/v2/company-merges?filter=taskId={taskId}` See [Company Merges](#tag/companyMerges/operation/v2_company-merges__GET) for more details. Task statuses: - `in-progress`: The merge task is currently being processed. - `success`: The merge task completed successfully. - `failed`: The merge task failed. Requires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.
* Get Company Merge Task
* @param param the request object
*/
v2TasksCompanyMergesTaskIdGETWithHttpInfo(param, options) {
return this.api.v2TasksCompanyMergesTaskIdGETWithHttpInfo(param.taskId, options).toPromise();
}
/**
* Retrieve the status and details of a specific task for company merges. Returns information about the company merges for a specific task including its overall status, number of merges in-progress, completed, and failed. Detailed information about individual merges for this task can be found by querying: `/v2/company-merges?filter=taskId={taskId}` See [Company Merges](#tag/companyMerges/operation/v2_company-merges__GET) for more details. Task statuses: - `in-progress`: The merge task is currently being processed. - `success`: The merge task completed successfully. - `failed`: The merge task failed. Requires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.
* Get Company Merge Task
* @param param the request object
*/
v2TasksCompanyMergesTaskIdGET(param, options) {
return this.api.v2TasksCompanyMergesTaskIdGET(param.taskId, options).toPromise();
}
}
import { ObservableEmailsApi } from "./ObservableAPI.js";
export class ObjectEmailsApi {
constructor(configuration, requestFactory, responseProcessor) {
Object.defineProperty(this, "api", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.api = new ObservableEmailsApi(configuration, requestFactory, responseProcessor);
}
/**
* Paginate through all emails in Affinity. Returns basic information about the email interaction and its participants. Will only return emails or subject lines that the current authenticated user has permission to see. You can filter emails 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** | |-----------------------------|-----------------------------------------------------------------|------------|--------------------------------------|----------------------------------| | `id` | Unique identifier for Emails | `int64` | `=` | `id=1` | | `sentAt` | When the Email was sent at | `datetime` | `>`, `<`, `>=`, `<=` | `sentAt>2025-01-01T01:00:00Z` | | `createdAt` | When the Email was created in Affinity | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` | | `updatedAt` | When the Email was updated in Affinity | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z`|
* Get metadata on all Emails
* @param param the request object
*/
v2EmailsGETWithHttpInfo(param = {}, options) {
return this.api.v2EmailsGETWithHttpInfo(param.cursor, param.limit, param.filter, options).toPromise();
}
/**
* Paginate through all emails in Affinity. Returns basic information about the email interaction and its participants. Will only return emails or subject lines that the current authenticated user has permission to see. You can filter emails 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** | |-----------------------------|-----------------------------------------------------------------|------------|--------------------------------------|----------------------------------| | `id` | Unique identifier for Emails | `int64` | `=` | `id=1` | | `sentAt` | When the Email was sent at | `datetime` | `>`, `<`, `>=`, `<=` | `sentAt>2025-01-01T01:00:00Z` | | `createdAt` | When the Email was created in Affinity | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` | | `updatedAt` | When the Email was updated in Affinity | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z`|
* Get metadata on all Emails
* @param param the request object
*/
v2EmailsGET(param = {}, options) {
return this.api.v2EmailsGET(param.cursor, param.limit, param.filter, options).toPromise();
}
}
import { ObservableListsApi } from "./ObservableAPI.js";
export class ObjectListsApi {
constructor(configuration, requestFactory, responseProcessor) {
Object.defineProperty(this, "api", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.api = new ObservableListsApi(configuration, requestFactory, responseProcessor);
}
/**
* Paginate through all Lists in your organization that you have access to view. Returns basic information about each List, including name, owner, and privacy settings.
* Get metadata on all Lists
* @param param the request object
*/
v2ListsGETWithHttpInfo(param = {}, options) {
return this.api.v2ListsGETWithHttpInfo(param.cursor, param.limit, options).toPromise();
}
/**
* Paginate through all Lists in your organization that you have access to view. Returns basic information about each List, including name, owner, and privacy settings.
* Get metadata on all Lists
* @param param the request object
*/
v2ListsGET(param = {}, options) {
return this.api.v2ListsGET(param.cursor, param.limit, options).toPromise();
}
/**
* Returns metadata on the Fields available on a single List. Use the returned Field IDs to request field data from the GET `/v2/lists/{listId}/list-entries` endpoint.
* Get metadata on a single List\'s Fields
* @param param the request object
*/
v2ListsListIdFieldsGETWithHttpInfo(param, options) {
return this.api.v2ListsListIdFieldsGETWithHttpInfo(param.listId, param.cursor, param.limit, options).toPromise();
}
/**
* Returns metadata on the Fields available on a single List. Use the returned Field IDs to request field data from the GET `/v2/lists/{listId}/list-entries` endpoint.
* Get metadata on a single List\'s Fields
* @param param the request object
*/
v2ListsListIdFieldsGET(param, options) {
return this.api.v2ListsListIdFieldsGET(param.listId, param.cursor, param.limit, options).toPromise();
}
/**
* Retrieve detailed information about a specific List you have access to view. Returns List configuration including name, owner, privacy settings, and creation details.
* Get metadata on a single List
* @param param the request object
*/
v2ListsListIdGETWithHttpInfo(param, options) {
return this.api.v2ListsListIdGETWithHttpInfo(param.listId, options).toPromise();
}
/**
* Retrieve detailed information about a specific List you have access to view. Returns List configuration including name, owner, privacy settings, and creation details.
* Get metadata on a single List
* @param param the request object
*/
v2ListsListIdGET(param, options) {
return this.api.v2ListsListIdGET(param.listId, options).toPromise();
}
/**
* Paginate through the List Entries (AKA rows) on a given List. Returns basic information and field data, including list-specific field data, on each Company, Person, or Opportunity on the List. List Entries also include metadata about their creation, i.e., when they were added to the List and by whom. 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/lists/{listId}/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, List Entries 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 data from Lists\" [permission](#section/Getting-Started/Permissions).
* Get all List Entries on a List
* @param param the request object
*/
v2ListsListIdListEntriesGETWithHttpInfo(param, options) {
return this.api.v2ListsListIdListEntriesGETWithHttpInfo(param.listId, param.cursor, param.limit, param.fieldIds, param.fieldTypes, options).toPromise();
}
/**
* Paginate through the List Entries (AKA rows) on a given List. Returns basic information and field data, including list-specific field data, on each Company, Person, or Opportunity on the List. List Entries also include metadata about their creation, i.e., when they were added to the List and by whom. 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/lists/{listId}/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, List Entries 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 data from Lists\" [permission](#section/Getting-Started/Permissions).
* Get all List Entries on a List
* @param param the request object
*/
v2ListsListIdListEntriesGET(param, options) {
return this.api.v2ListsListIdListEntriesGET(param.listId, param.cursor, param.limit, param.fieldIds, param.fieldTypes, options).toPromise();
}
/**
* Returns a single field value on a list entry. Requires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).
* Get a single field value
* @param param the request object
*/
v2ListsListIdListEntriesListEntryIdFieldsFieldIdGETWithHttpInfo(param, options) {
return this.api.v2ListsListIdListEntriesListEntryIdFieldsFieldIdGETWithHttpInfo(param.listId, param.listEntryId, param.fieldId, options).toPromise();
}
/**
* Returns a single field value on a list entry. Requires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).
* Get a single field value
* @param param the request object
*/
v2ListsListIdListEntriesListEntryIdFieldsFieldIdGET(param, options) {
return this.api.v2ListsListIdListEntriesListEntryIdFieldsFieldIdGET(param.listId, param.listEntryId, param.fieldId, options).toPromise();
}
/**
* Update a single field value. Requires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).
* Update a single field value on a List Entry
* @param param the request object
*/
v2ListsListIdListEntriesListEntryIdFieldsFieldIdPOSTWithHttpInfo(param, options) {
return this.api.v2ListsListIdListEntriesListEntryIdFieldsFieldIdPOSTWithHttpInfo(param.listId, param.listEntryId, param.fieldId, param.fieldUpdate, options).toPromise();
}
/**
* Update a single field value. Requires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).
* Update a single field value on a List Entry
* @param param the request object
*/
v2ListsListIdListEntriesListEntryIdFieldsFieldIdPOST(param, options) {
return this.api.v2ListsListIdListEntriesListEntryIdFieldsFieldIdPOST(param.listId, param.listEntryId, param.fieldId, param.fieldUpdate, options).toPromise();
}
/**
* Paginate through all field values on a single list entry. All fields will be included by default. The `ids` and `types` parameters can be used to filter the collection. Requires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).
* Get field values on a single List Entry
* @param param the request object
*/
v2ListsListIdListEntriesListEntryIdFieldsGETWithHttpInfo(param, options) {
return this.api.v2ListsListIdListEntriesListEntryIdFieldsGETWithHttpInfo(param.listId, param.listEntryId, param.ids, param.types, param.cursor, param.limit, options).toPromise();
}
/**
* Paginate through all field values on a single list entry. All fields will be included by default. The `ids` and `types` parameters can be used to filter the collection. Requires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).
* Get field values on a single List Entry
* @param param the request object
*/
v2ListsListIdListEntriesListEntryIdFieldsGET(param, options) {
return this.api.v2ListsListIdListEntriesListEntryIdFieldsGET(param.listId, param.listEntryId, param.ids, param.types, param.cursor, param.limit, options).toPromise();
}
/**
* Perform batch operations on a list entry\'s fields. Currently the only operation at the endpoint is `update-fields`, which allows you to update multiple field values with a single request. This is equivalent to calling [the single field update](#operation/v2_lists_listId_list-entries_listEntryId_fields_fieldId__POST) endpoint multiple times. Requires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).
* Perform batch operations on a list entry\'s fields
* @param param the request object
*/
v2ListsListIdListEntriesListEntryIdFieldsPATCHWithHttpInfo(param, options) {
return this.api.v2ListsListIdListEntriesListEntryIdFieldsPATCHWithHttpInfo(param.listId, param.listEntryId, param.body, options).toPromise();
}
/**
* Perform batch operations on a list entry\'s fields. Currently the only operation at the endpoint is `update-fields`, which allows you to update multiple field values with a single request. This is equivalent to calling [the single field update](#operation/v2_lists_listId_list-entries_listEntryId_fields_fieldId__POST) endpoint multiple times. Requires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).
* Perform batch operations on a list entry\'s fields
* @param param the request object
*/
v2ListsListIdListEntriesListEntryIdFieldsPATCH(param, options) {
return this.api.v2ListsListIdListEntriesListEntryIdFieldsPATCH(param.listId, param.listEntryId, param.body, options).toPromise();
}
/**
* Retrieve a single list entry. Returns basic information and field data, including list-specific field data. 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/lists/{listId}/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, the List Entry 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 data from Lists\" [permission](#section/Getting-Started/Permissions).
* Get a single List Entry on a List
* @param param the request object
*/
v2ListsListIdListEntriesListEntryIdGETWithHttpInfo(param, options) {
return this.api.v2ListsListIdListEntriesListEntryIdGETWithHttpInfo(param.listId, param.listEntryId, param.fieldIds, param.fieldTypes, options).toPromise();
}
/**
* Retrieve a single list entry. Returns basic information and field data, including list-specific field data. 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/lists/{listId}/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, the List Entry 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 data from Lists\" [permission](#section/Getting-Started/Permissions).
* Get a single List Entry on a List
* @param param the request object
*/
v2ListsListIdListEntriesListEntryIdGET(param, options) {
return this.api.v2ListsListIdListEntriesListEntryIdGET(param.listId, param.listEntryId, param.fieldIds, param.fieldTypes, options).toPromise();
}
/**
* Paginate through all Saved Views you have access to view for a specific List. Returns Saved View configurations including name, column settings, and owner information.
* Get metadata on Saved Views
* @param param the request object
*/
v2ListsListIdSavedViewsGETWithHttpInfo(param, options) {
return this.api.v2ListsListIdSavedViewsGETWithHttpInfo(param.listId, param.cursor, param.limit, options).toPromise();
}
/**
* Paginate through all Saved Views you have access to view for a specific List. Returns Saved View configurations including name, column settings, and owner information.
* Get metadata on Saved Views
* @param param the request object
*/
v2ListsListIdSavedViewsGET(param, options) {
return this.api.v2ListsListIdSavedViewsGET(param.listId, param.cursor, param.limit, options).toPromise();
}
/**
* Retrieve detailed information about a specific Saved View you have access to view. Returns complete Saved View configuration including name, sorting, and column visibility settings.
* Get metadata on a single Saved View
* @param param the request object
*/
v2ListsListIdSavedViewsViewIdGETWithHttpInfo(param, options) {
return this.api.v2ListsListIdSavedViewsViewIdGETWithHttpInfo(param.listId, param.viewId, options).toPromise();
}
/**
* Retrieve detailed information about a specific Saved View you have access to view. Returns complete Saved View configuration including name, sorting, and column visibility settings.
* Get metadata on a single Saved View
* @param param the request object
*/
v2ListsListIdSavedViewsViewIdGET(param, options) {
return this.api.v2ListsListIdSavedViewsViewIdGET(param.listId, param.viewId, options).toPromise();
}
/**
* Paginate through the List Entries (AKA rows) on a given Saved View. Use this endpoint when you need to filter entities or only want **some** field data to be returned: This endpoint respects the filters set on a Saved View via web app, and only returns field data corresponding to the columns that have been pulled into the Saved View via web app. Though this endpoint respects the Saved View\'s filters and column/Field selection, it does not yet preserve sort order. This endpoint also only supports **sheet-type Saved Views**, and not board- or dashboard-type Saved Views. See the [Data Model](#section/Data-Model) section for more information about Saved Views. Requires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).
* Get all List Entries on a Saved View
* @param param the request object
*/
v2ListsListIdSavedViewsViewIdListEntriesGETWithHttpInfo(param, options) {
return this.api.v2ListsListIdSavedViewsViewIdListEntriesGETWithHttpInfo(param.listId, param.viewId, param.cursor, param.limit, options).toPromise();
}
/**
* Paginate through the List Entries (AKA rows) on a given Saved View. Use this endpoint when you need to filter entities or only want **some** field data to be returned: This endpoint respects the filters set on a Saved View via web app, and only returns field data corresponding to the columns that have been pulled into the Saved View via web app. Though this endpoint respects the Saved View\'s filters and column/Field selection, it does not yet preserve sort order. This endpoint also only supports **sheet-type Saved Views**, and not board- or dashboard-type Saved Views. See the [Data Model](#section/Data-Model) section for more information about Saved Views. Requires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).
* Get all List Entries on a Saved View
* @param param the request object
*/
v2ListsListIdSavedViewsViewIdListEntriesGET(param, options) {
return this.api.v2ListsListIdSavedViewsViewIdListEntriesGET(param.listId, param.viewId, param.cursor, param.limit, options).toPromise();
}