diff --git a/integrations/.nango/nango.json b/integrations/.nango/nango.json index 5a068d3fa..52636b893 100644 --- a/integrations/.nango/nango.json +++ b/integrations/.nango/nango.json @@ -851,7 +851,494 @@ }, { "providerConfigKey": "attio", - "actions": [], + "actions": [ + { + "type": "action", + "description": "Creates a new company record in Attio", + "endpoint": { + "method": "POST", + "path": "/companies", + "group": "Companies" + }, + "input": "ActionInput_attio_createcompany", + "name": "create-company", + "output": [ + "ActionOutput_attio_createcompany" + ], + "scopes": [ + "record_permission:read-write", + "object_configuration:read" + ], + "usedModels": [ + "ActionInput_attio_createcompany", + "ActionOutput_attio_createcompany" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Adds a record as an entry to a list.", + "endpoint": { + "method": "POST", + "path": "/lists/:list_id/entries", + "group": "Lists" + }, + "input": "ActionInput_attio_createlistentry", + "name": "create-list-entry", + "output": [ + "ActionOutput_attio_createlistentry" + ], + "scopes": [ + "list_entry:read-write" + ], + "usedModels": [ + "ActionInput_attio_createlistentry", + "ActionOutput_attio_createlistentry" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Creates a note on a record.", + "endpoint": { + "method": "POST", + "path": "/notes", + "group": "Notes" + }, + "input": "ActionInput_attio_createnote", + "name": "create-note", + "output": [ + "ActionOutput_attio_createnote" + ], + "scopes": [ + "note:read-write" + ], + "usedModels": [ + "ActionInput_attio_createnote", + "ActionOutput_attio_createnote" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Creates a new person record in Attio", + "endpoint": { + "method": "POST", + "path": "/people", + "group": "People" + }, + "input": "ActionInput_attio_createperson", + "name": "create-person", + "output": [ + "ActionOutput_attio_createperson" + ], + "scopes": [ + "record_permission:read-write", + "object_configuration:read" + ], + "usedModels": [ + "ActionInput_attio_createperson", + "ActionOutput_attio_createperson" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Creates a new record for a specified object type.", + "endpoint": { + "method": "POST", + "path": "/objects/:object_slug/records", + "group": "Records" + }, + "input": "ActionInput_attio_createrecord", + "name": "create-record", + "output": [ + "ActionOutput_attio_createrecord" + ], + "scopes": [ + "record_permission:read-write" + ], + "usedModels": [ + "ActionInput_attio_createrecord", + "ActionOutput_attio_createrecord" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Creates a task.", + "endpoint": { + "method": "POST", + "path": "/tasks", + "group": "Tasks" + }, + "input": "ActionInput_attio_createtask", + "name": "create-task", + "output": [ + "ActionOutput_attio_createtask" + ], + "scopes": [ + "task:read-write" + ], + "usedModels": [ + "ActionInput_attio_createtask", + "ActionOutput_attio_createtask" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Creates a new webhook in the Attio workspace", + "endpoint": { + "method": "POST", + "path": "/webhooks", + "group": "Webhooks" + }, + "input": "ActionInput_attio_createwebhook", + "name": "create-webhook", + "output": [ + "ActionOutput_attio_createwebhook" + ], + "scopes": [ + "webhook:read-write" + ], + "usedModels": [ + "ActionInput_attio_createwebhook", + "ActionOutput_attio_createwebhook" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Removes an entry from a list.", + "endpoint": { + "method": "DELETE", + "path": "/lists/:list_id/entries/:entry_id", + "group": "Lists" + }, + "input": "ActionInput_attio_deletelistentry", + "name": "delete-list-entry", + "output": [ + "ActionOutput_attio_deletelistentry" + ], + "scopes": [ + "list_entry:read-write" + ], + "usedModels": [ + "ActionInput_attio_deletelistentry", + "ActionOutput_attio_deletelistentry" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Deletes a note.", + "endpoint": { + "method": "DELETE", + "path": "/notes/:note_id", + "group": "Notes" + }, + "input": "ActionInput_attio_deletenote", + "name": "delete-note", + "output": [ + "ActionOutput_attio_deletenote" + ], + "scopes": [ + "note:read-write" + ], + "usedModels": [ + "ActionInput_attio_deletenote", + "ActionOutput_attio_deletenote" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Deletes a record permanently.", + "endpoint": { + "method": "DELETE", + "path": "/objects/:object_slug/records/:record_id", + "group": "Records" + }, + "input": "ActionInput_attio_deleterecord", + "name": "delete-record", + "output": [ + "ActionOutput_attio_deleterecord" + ], + "scopes": [ + "record_permission:read-write" + ], + "usedModels": [ + "ActionInput_attio_deleterecord", + "ActionOutput_attio_deleterecord" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Deletes a webhook from the Attio workspace", + "endpoint": { + "method": "DELETE", + "path": "/webhooks/{webhook_id}", + "group": "Webhooks" + }, + "input": "ActionInput_attio_deletewebhook", + "name": "delete-webhook", + "output": [ + "ActionOutput_attio_deletewebhook" + ], + "scopes": [ + "webhook:read-write" + ], + "usedModels": [ + "ActionInput_attio_deletewebhook", + "ActionOutput_attio_deletewebhook" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Gets a specific object by ID or slug.", + "endpoint": { + "method": "GET", + "path": "/objects/:object_id", + "group": "Objects" + }, + "input": "ActionInput_attio_getobject", + "name": "get-object", + "output": [ + "ActionOutput_attio_getobject" + ], + "scopes": [ + "object_configuration:read" + ], + "usedModels": [ + "ActionInput_attio_getobject", + "ActionOutput_attio_getobject" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Gets a specific record by ID.", + "endpoint": { + "method": "GET", + "path": "/objects/:object_slug/records/:record_id", + "group": "Records" + }, + "input": "ActionInput_attio_getrecord", + "name": "get-record", + "output": [ + "ActionOutput_attio_getrecord" + ], + "scopes": [ + "record_permission:read" + ], + "usedModels": [ + "ActionInput_attio_getrecord", + "ActionOutput_attio_getrecord" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Gets a single webhook by its ID from the Attio workspace", + "endpoint": { + "method": "GET", + "path": "/webhooks/{webhook_id}", + "group": "Webhooks" + }, + "input": "ActionInput_attio_getwebhook", + "name": "get-webhook", + "output": [ + "ActionOutput_attio_getwebhook" + ], + "scopes": [ + "webhook:read" + ], + "usedModels": [ + "ActionInput_attio_getwebhook", + "ActionOutput_attio_getwebhook" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Lists all lists in the workspace.", + "endpoint": { + "method": "GET", + "path": "/lists", + "group": "Lists" + }, + "input": "ActionInput_attio_listlists", + "name": "list-lists", + "output": [ + "ActionOutput_attio_listlists" + ], + "scopes": [ + "list_configuration:read" + ], + "usedModels": [ + "ActionInput_attio_listlists", + "ActionOutput_attio_listlists" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Lists notes for a record.", + "endpoint": { + "method": "GET", + "path": "/notes", + "group": "Notes" + }, + "input": "ActionInput_attio_listnotes", + "name": "list-notes", + "output": [ + "ActionOutput_attio_listnotes" + ], + "scopes": [ + "note:read" + ], + "usedModels": [ + "ActionInput_attio_listnotes", + "ActionOutput_attio_listnotes" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Lists all available objects (system and custom-defined) in the Attio workspace.", + "endpoint": { + "method": "GET", + "path": "/objects", + "group": "Objects" + }, + "input": "ActionInput_attio_listobjects", + "name": "list-objects", + "output": [ + "ActionOutput_attio_listobjects" + ], + "scopes": [ + "object_configuration:read" + ], + "usedModels": [ + "ActionInput_attio_listobjects", + "ActionOutput_attio_listobjects" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Lists records from a specific object type.", + "endpoint": { + "method": "POST", + "path": "/objects/:object_slug/records/query", + "group": "Records" + }, + "input": "ActionInput_attio_listrecords", + "name": "list-records", + "output": [ + "ActionOutput_attio_listrecords" + ], + "scopes": [ + "record_permission:read" + ], + "usedModels": [ + "ActionInput_attio_listrecords", + "ActionOutput_attio_listrecords" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Lists tasks.", + "endpoint": { + "method": "GET", + "path": "/tasks", + "group": "Tasks" + }, + "input": "ActionInput_attio_listtasks", + "name": "list-tasks", + "output": [ + "ActionOutput_attio_listtasks" + ], + "scopes": [ + "task:read" + ], + "usedModels": [ + "ActionInput_attio_listtasks", + "ActionOutput_attio_listtasks" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Lists all webhooks configured in the Attio workspace", + "endpoint": { + "method": "GET", + "path": "/webhooks", + "group": "Webhooks" + }, + "input": "ActionInput_attio_listwebhooks", + "name": "list-webhooks", + "output": [ + "ActionOutput_attio_listwebhooks" + ], + "scopes": [ + "webhook:read" + ], + "usedModels": [ + "ActionInput_attio_listwebhooks", + "ActionOutput_attio_listwebhooks" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Updates an existing record.", + "endpoint": { + "method": "PATCH", + "path": "/objects/:object_slug/records/:record_id", + "group": "Records" + }, + "input": "ActionInput_attio_updaterecord", + "name": "update-record", + "output": [ + "ActionOutput_attio_updaterecord" + ], + "scopes": [ + "record_permission:read-write" + ], + "usedModels": [ + "ActionInput_attio_updaterecord", + "ActionOutput_attio_updaterecord" + ], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Updates an existing webhook configuration in Attio", + "endpoint": { + "method": "PATCH", + "path": "/webhooks/{webhook_id}", + "group": "Webhooks" + }, + "input": "ActionInput_attio_updatewebhook", + "name": "update-webhook", + "output": [ + "ActionOutput_attio_updatewebhook" + ], + "scopes": [ + "webhook:read-write" + ], + "usedModels": [ + "ActionInput_attio_updatewebhook", + "ActionOutput_attio_updatewebhook" + ], + "version": "1.0.0" + } + ], "syncs": [ { "type": "sync", diff --git a/integrations/.nango/schema.json b/integrations/.nango/schema.json index f53566796..f6a92f8e9 100644 --- a/integrations/.nango/schema.json +++ b/integrations/.nango/schema.json @@ -7158,6 +7158,1847 @@ ], "additionalProperties": false }, + "ActionInput_attio_createcompany": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "domains": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "type": "string" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + }, + "ActionOutput_attio_createcompany": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "record_id": { + "type": "string" + } + }, + "required": [ + "workspace_id", + "object_id", + "record_id" + ], + "additionalProperties": false + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "domains": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "created_at": { + "type": "string" + }, + "web_url": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "domains", + "description", + "created_at", + "web_url" + ], + "additionalProperties": false + }, + "ActionInput_attio_createlistentry": { + "type": "object", + "properties": { + "list_id": { + "type": "string" + }, + "record_id": { + "type": "string" + } + }, + "required": [ + "list_id", + "record_id" + ], + "additionalProperties": false + }, + "ActionOutput_attio_createlistentry": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "list_id": { + "type": "string" + }, + "entry_id": { + "type": "string" + } + }, + "required": [ + "workspace_id", + "list_id", + "entry_id" + ], + "additionalProperties": false + }, + "record_id": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "record_id", + "created_at" + ], + "additionalProperties": false + } + }, + "required": [ + "data" + ], + "additionalProperties": false + }, + "ActionInput_attio_createnote": { + "type": "object", + "properties": { + "parent_object": { + "type": "string" + }, + "parent_record_id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + } + }, + "required": [ + "parent_object", + "parent_record_id", + "title", + "content" + ], + "additionalProperties": false + }, + "ActionOutput_attio_createnote": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "note_id": { + "type": "string" + } + }, + "required": [ + "workspace_id", + "note_id" + ], + "additionalProperties": false + }, + "title": { + "type": "string" + }, + "content_plaintext": { + "type": "string" + }, + "parent_object": { + "type": "string" + }, + "parent_record_id": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "title", + "content_plaintext", + "parent_object", + "parent_record_id", + "created_at" + ], + "additionalProperties": false + } + }, + "required": [ + "data" + ], + "additionalProperties": false + }, + "ActionInput_attio_createperson": { + "type": "object", + "properties": { + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "email_addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "phone_numbers": { + "type": "array", + "items": { + "type": "string" + } + }, + "job_title": { + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "additionalProperties": false + }, + "ActionOutput_attio_createperson": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "record_id": { + "type": "string" + } + }, + "required": [ + "workspace_id", + "object_id", + "record_id" + ], + "additionalProperties": false + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "phone": { + "type": [ + "string", + "null" + ] + }, + "job_title": { + "type": [ + "string", + "null" + ] + }, + "created_at": { + "type": "string" + }, + "web_url": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "email", + "phone", + "job_title", + "created_at", + "web_url" + ], + "additionalProperties": false + }, + "ActionInput_attio_createrecord": { + "type": "object", + "properties": { + "object_slug": { + "type": "string" + }, + "values": { + "type": "object", + "additionalProperties": { + "anyOf": [ + {}, + { + "not": {} + } + ] + } + } + }, + "required": [ + "object_slug", + "values" + ], + "additionalProperties": false + }, + "ActionOutput_attio_createrecord": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "record_id": { + "type": "string" + } + }, + "required": [ + "workspace_id", + "object_id", + "record_id" + ], + "additionalProperties": false + }, + "created_at": { + "type": "string" + }, + "values": { + "type": "object", + "additionalProperties": { + "anyOf": [ + {}, + { + "not": {} + } + ] + } + } + }, + "required": [ + "id", + "created_at", + "values" + ], + "additionalProperties": false + } + }, + "required": [ + "data" + ], + "additionalProperties": false + }, + "ActionInput_attio_createtask": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "deadline": { + "type": "string" + }, + "assignee_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "linked_records": { + "type": "array", + "items": { + "type": "object", + "properties": { + "target_object": { + "type": "string" + }, + "target_record_id": { + "type": "string" + } + }, + "required": [ + "target_object", + "target_record_id" + ], + "additionalProperties": false + } + } + }, + "required": [ + "content" + ], + "additionalProperties": false + }, + "ActionOutput_attio_createtask": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "task_id": { + "type": "string" + } + }, + "required": [ + "workspace_id", + "task_id" + ], + "additionalProperties": false + }, + "content_plaintext": { + "type": "string" + }, + "deadline_at": { + "type": [ + "string", + "null" + ] + }, + "is_completed": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "content_plaintext", + "deadline_at", + "is_completed", + "created_at" + ], + "additionalProperties": false + } + }, + "required": [ + "data" + ], + "additionalProperties": false + }, + "ActionInput_attio_createwebhook": { + "type": "object", + "properties": { + "target_url": { + "type": "string" + }, + "subscriptions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "event_type": { + "type": "string" + }, + "filter": { + "anyOf": [ + { + "type": "object", + "properties": { + "$and": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "field", + "operator", + "value" + ], + "additionalProperties": false + } + }, + "$or": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "field", + "operator", + "value" + ], + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "event_type" + ], + "additionalProperties": false + } + } + }, + "required": [ + "target_url", + "subscriptions" + ], + "additionalProperties": false + }, + "ActionOutput_attio_createwebhook": { + "type": "object", + "properties": { + "target_url": { + "type": "string" + }, + "subscriptions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "event_type": { + "type": "string" + }, + "filter": { + "anyOf": [ + { + "type": "object", + "properties": { + "$and": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "field", + "operator", + "value" + ], + "additionalProperties": false + } + }, + "$or": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "field", + "operator", + "value" + ], + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "event_type", + "filter" + ], + "additionalProperties": false + } + }, + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "webhook_id": { + "type": "string" + } + }, + "required": [ + "workspace_id", + "webhook_id" + ], + "additionalProperties": false + }, + "status": { + "type": "string", + "enum": [ + "active", + "degraded", + "inactive" + ] + }, + "created_at": { + "type": "string" + }, + "secret": { + "type": "string" + } + }, + "required": [ + "target_url", + "subscriptions", + "id", + "status", + "created_at", + "secret" + ], + "additionalProperties": false + }, + "ActionInput_attio_deletelistentry": { + "type": "object", + "properties": { + "list_id": { + "type": "string" + }, + "entry_id": { + "type": "string" + } + }, + "required": [ + "list_id", + "entry_id" + ], + "additionalProperties": false + }, + "ActionOutput_attio_deletelistentry": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ], + "additionalProperties": false + }, + "ActionInput_attio_deletenote": { + "type": "object", + "properties": { + "note_id": { + "type": "string" + } + }, + "required": [ + "note_id" + ], + "additionalProperties": false + }, + "ActionOutput_attio_deletenote": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ], + "additionalProperties": false + }, + "ActionInput_attio_deleterecord": { + "type": "object", + "properties": { + "object_slug": { + "type": "string" + }, + "record_id": { + "type": "string" + } + }, + "required": [ + "object_slug", + "record_id" + ], + "additionalProperties": false + }, + "ActionOutput_attio_deleterecord": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ], + "additionalProperties": false + }, + "ActionInput_attio_deletewebhook": { + "type": "object", + "properties": { + "webhook_id": { + "type": "string" + } + }, + "required": [ + "webhook_id" + ], + "additionalProperties": false + }, + "ActionOutput_attio_deletewebhook": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ], + "additionalProperties": false + }, + "ActionInput_attio_getobject": { + "type": "object", + "properties": { + "object_id": { + "type": "string" + } + }, + "required": [ + "object_id" + ], + "additionalProperties": false + }, + "ActionOutput_attio_getobject": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "object_id": { + "type": "string" + } + }, + "required": [ + "workspace_id", + "object_id" + ], + "additionalProperties": false + }, + "api_slug": { + "type": "string" + }, + "singular_noun": { + "type": "string" + }, + "plural_noun": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "api_slug", + "singular_noun", + "plural_noun", + "created_at" + ], + "additionalProperties": false + } + }, + "required": [ + "data" + ], + "additionalProperties": false + }, + "ActionInput_attio_getrecord": { + "type": "object", + "properties": { + "object_slug": { + "type": "string" + }, + "record_id": { + "type": "string" + } + }, + "required": [ + "object_slug", + "record_id" + ], + "additionalProperties": false + }, + "ActionOutput_attio_getrecord": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "record_id": { + "type": "string" + } + }, + "required": [ + "workspace_id", + "object_id", + "record_id" + ], + "additionalProperties": false + }, + "created_at": { + "type": "string" + }, + "values": { + "type": "object", + "additionalProperties": { + "anyOf": [ + {}, + { + "not": {} + } + ] + } + } + }, + "required": [ + "id", + "created_at", + "values" + ], + "additionalProperties": false + } + }, + "required": [ + "data" + ], + "additionalProperties": false + }, + "ActionInput_attio_getwebhook": { + "type": "object", + "properties": { + "webhook_id": { + "type": "string" + } + }, + "required": [ + "webhook_id" + ], + "additionalProperties": false + }, + "ActionOutput_attio_getwebhook": { + "type": "object", + "properties": { + "target_url": { + "type": "string" + }, + "subscriptions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "event_type": { + "type": "string" + }, + "filter": { + "anyOf": [ + { + "type": "object", + "properties": { + "$and": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "field", + "operator", + "value" + ], + "additionalProperties": false + } + }, + "$or": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "field", + "operator", + "value" + ], + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "event_type", + "filter" + ], + "additionalProperties": false + } + }, + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "webhook_id": { + "type": "string" + } + }, + "required": [ + "workspace_id", + "webhook_id" + ], + "additionalProperties": false + }, + "status": { + "type": "string", + "enum": [ + "active", + "degraded", + "inactive" + ] + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "target_url", + "subscriptions", + "id", + "status", + "created_at" + ], + "additionalProperties": false + }, + "ActionInput_attio_listlists": { + "type": "object", + "additionalProperties": false + }, + "ActionOutput_attio_listlists": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "list_id": { + "type": "string" + } + }, + "required": [ + "workspace_id", + "list_id" + ], + "additionalProperties": false + }, + "api_slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parent_object": { + "type": "array", + "items": { + "type": "string" + } + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "api_slug", + "name", + "parent_object", + "created_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "data" + ], + "additionalProperties": false + }, + "ActionInput_attio_listnotes": { + "type": "object", + "properties": { + "parent_object": { + "type": "string" + }, + "parent_record_id": { + "type": "string" + }, + "limit": { + "type": "number" + }, + "offset": { + "type": "number" + } + }, + "required": [ + "parent_object", + "parent_record_id" + ], + "additionalProperties": false + }, + "ActionOutput_attio_listnotes": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "note_id": { + "type": "string" + } + }, + "required": [ + "workspace_id", + "note_id" + ], + "additionalProperties": false + }, + "title": { + "type": [ + "string", + "null" + ] + }, + "content_plaintext": { + "type": "string" + }, + "parent_object": { + "type": "string" + }, + "parent_record_id": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "title", + "content_plaintext", + "parent_object", + "parent_record_id", + "created_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "data" + ], + "additionalProperties": false + }, + "ActionInput_attio_listobjects": { + "type": "object", + "additionalProperties": false + }, + "ActionOutput_attio_listobjects": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "object_id": { + "type": "string" + } + }, + "required": [ + "workspace_id", + "object_id" + ], + "additionalProperties": false + }, + "api_slug": { + "type": "string" + }, + "singular_noun": { + "type": "string" + }, + "plural_noun": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "api_slug", + "singular_noun", + "plural_noun", + "created_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "data" + ], + "additionalProperties": false + }, + "ActionInput_attio_listrecords": { + "type": "object", + "properties": { + "object_slug": { + "type": "string" + }, + "limit": { + "type": "number" + }, + "offset": { + "type": "number" + } + }, + "required": [ + "object_slug" + ], + "additionalProperties": false + }, + "ActionOutput_attio_listrecords": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "record_id": { + "type": "string" + } + }, + "required": [ + "workspace_id", + "object_id", + "record_id" + ], + "additionalProperties": false + }, + "created_at": { + "type": "string" + }, + "values": { + "type": "object", + "additionalProperties": { + "anyOf": [ + {}, + { + "not": {} + } + ] + } + } + }, + "required": [ + "id", + "created_at", + "values" + ], + "additionalProperties": false + } + } + }, + "required": [ + "data" + ], + "additionalProperties": false + }, + "ActionInput_attio_listtasks": { + "type": "object", + "properties": { + "limit": { + "type": "number" + }, + "offset": { + "type": "number" + } + }, + "additionalProperties": false + }, + "ActionOutput_attio_listtasks": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "task_id": { + "type": "string" + } + }, + "required": [ + "workspace_id", + "task_id" + ], + "additionalProperties": false + }, + "content_plaintext": { + "type": "string" + }, + "deadline_at": { + "type": [ + "string", + "null" + ] + }, + "is_completed": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "id", + "content_plaintext", + "deadline_at", + "is_completed", + "created_at" + ], + "additionalProperties": false + } + } + }, + "required": [ + "data" + ], + "additionalProperties": false + }, + "ActionInput_attio_listwebhooks": { + "type": "object", + "properties": { + "limit": { + "type": "number" + }, + "cursor": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ActionOutput_attio_listwebhooks": { + "type": "object", + "properties": { + "webhooks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "target_url": { + "type": "string" + }, + "subscriptions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "event_type": { + "type": "string" + }, + "filter": { + "anyOf": [ + { + "type": "object", + "properties": { + "$and": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "field", + "operator", + "value" + ], + "additionalProperties": false + } + }, + "$or": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "field", + "operator", + "value" + ], + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "event_type", + "filter" + ], + "additionalProperties": false + } + }, + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "webhook_id": { + "type": "string" + } + }, + "required": [ + "workspace_id", + "webhook_id" + ], + "additionalProperties": false + }, + "status": { + "type": "string", + "enum": [ + "active", + "degraded", + "inactive" + ] + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "target_url", + "subscriptions", + "id", + "status", + "created_at" + ], + "additionalProperties": false + } + }, + "next_cursor": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "webhooks", + "next_cursor" + ], + "additionalProperties": false + }, + "ActionInput_attio_updaterecord": { + "type": "object", + "properties": { + "object_slug": { + "type": "string" + }, + "record_id": { + "type": "string" + }, + "values": { + "type": "object", + "additionalProperties": { + "anyOf": [ + {}, + { + "not": {} + } + ] + } + } + }, + "required": [ + "object_slug", + "record_id", + "values" + ], + "additionalProperties": false + }, + "ActionOutput_attio_updaterecord": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "record_id": { + "type": "string" + } + }, + "required": [ + "workspace_id", + "object_id", + "record_id" + ], + "additionalProperties": false + }, + "created_at": { + "type": "string" + }, + "values": { + "type": "object", + "additionalProperties": { + "anyOf": [ + {}, + { + "not": {} + } + ] + } + } + }, + "required": [ + "id", + "created_at", + "values" + ], + "additionalProperties": false + } + }, + "required": [ + "data" + ], + "additionalProperties": false + }, + "ActionInput_attio_updatewebhook": { + "type": "object", + "properties": { + "webhook_id": { + "type": "string" + }, + "target_url": { + "type": "string" + }, + "subscriptions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "event_type": { + "type": "string" + }, + "filter": { + "anyOf": [ + { + "type": "object", + "properties": { + "$and": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "field", + "operator", + "value" + ], + "additionalProperties": false + } + }, + "$or": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "field", + "operator", + "value" + ], + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "event_type" + ], + "additionalProperties": false + } + } + }, + "required": [ + "webhook_id" + ], + "additionalProperties": false + }, + "ActionOutput_attio_updatewebhook": { + "type": "object", + "properties": { + "target_url": { + "type": "string" + }, + "subscriptions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "event_type": { + "type": "string" + }, + "filter": { + "anyOf": [ + { + "type": "object", + "properties": { + "$and": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "field", + "operator", + "value" + ], + "additionalProperties": false + } + }, + "$or": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "field", + "operator", + "value" + ], + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "event_type", + "filter" + ], + "additionalProperties": false + } + }, + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "webhook_id": { + "type": "string" + } + }, + "required": [ + "workspace_id", + "webhook_id" + ], + "additionalProperties": false + }, + "status": { + "type": "string", + "enum": [ + "active", + "degraded", + "inactive" + ] + }, + "created_at": { + "type": "string" + } + }, + "required": [ + "target_url", + "subscriptions", + "id", + "status", + "created_at" + ], + "additionalProperties": false + }, "SyncMetadata_avalara_transactions": { "type": "object", "properties": { diff --git a/integrations/.nango/schema.ts b/integrations/.nango/schema.ts index 639bcca8c..53eb6d6ea 100644 --- a/integrations/.nango/schema.ts +++ b/integrations/.nango/schema.ts @@ -1257,6 +1257,340 @@ export interface AttioPerson { country_code?: string | undefined;}; }; +export interface ActionInput_attio_createcompany { + name: string; + domains?: string[] | undefined; + description?: string | undefined; +}; + +export interface ActionOutput_attio_createcompany { + id: { workspace_id: string; + object_id: string; + record_id: string;}; + name: string | null; + domains: string[]; + description: string | null; + created_at: string; + web_url: string; +}; + +export interface ActionInput_attio_createlistentry { + list_id: string; + record_id: string; +}; + +export interface ActionOutput_attio_createlistentry { + data: { id: { workspace_id: string; + list_id: string; + entry_id: string;}; + record_id: string; + created_at: string;}; +}; + +export interface ActionInput_attio_createnote { + parent_object: string; + parent_record_id: string; + title: string; + content: string; +}; + +export interface ActionOutput_attio_createnote { + data: { id: { workspace_id: string; + note_id: string;}; + title: string; + content_plaintext: string; + parent_object: string; + parent_record_id: string; + created_at: string;}; +}; + +export interface ActionInput_attio_createperson { + first_name: string; + last_name: string; + email_addresses?: string[] | undefined; + phone_numbers?: string[] | undefined; + job_title?: string | undefined; +}; + +export interface ActionOutput_attio_createperson { + id: { workspace_id: string; + object_id: string; + record_id: string;}; + name: string | null; + email: string | null; + phone: string | null; + job_title: string | null; + created_at: string; + web_url: string; +}; + +export interface ActionInput_attio_createrecord { + object_slug: string; + values: { [key: string]: any | undefined;}; +}; + +export interface ActionOutput_attio_createrecord { + data: { id: { workspace_id: string; + object_id: string; + record_id: string;}; + created_at: string; + values: { [key: string]: any | undefined;};}; +}; + +export interface ActionInput_attio_createtask { + content: string; + deadline?: string | undefined; + assignee_ids?: string[] | undefined; + linked_records?: ({ target_object: string; + target_record_id: string;})[] | undefined; +}; + +export interface ActionOutput_attio_createtask { + data: { id: { workspace_id: string; + task_id: string;}; + content_plaintext: string; + deadline_at: string | null; + is_completed: boolean; + created_at: string;}; +}; + +export interface ActionInput_attio_createwebhook { + target_url: string; + subscriptions: ({ event_type: string; + filter?: { "$and"?: ({ field: string; + operator: string; + value: string;})[] | undefined; + "$or"?: ({ field: string; + operator: string; + value: string;})[] | undefined;} | null;})[]; +}; + +export interface ActionOutput_attio_createwebhook { + target_url: string; + subscriptions: ({ event_type: string; + filter: { "$and"?: ({ field: string; + operator: string; + value: string;})[] | undefined; + "$or"?: ({ field: string; + operator: string; + value: string;})[] | undefined;} | null;})[]; + id: { workspace_id: string; + webhook_id: string;}; + status: 'active' | 'degraded' | 'inactive'; + created_at: string; + secret: string; +}; + +export interface ActionInput_attio_deletelistentry { + list_id: string; + entry_id: string; +}; + +export interface ActionOutput_attio_deletelistentry { + success: boolean; +}; + +export interface ActionInput_attio_deletenote { + note_id: string; +}; + +export interface ActionOutput_attio_deletenote { + success: boolean; +}; + +export interface ActionInput_attio_deleterecord { + object_slug: string; + record_id: string; +}; + +export interface ActionOutput_attio_deleterecord { + success: boolean; +}; + +export interface ActionInput_attio_deletewebhook { + webhook_id: string; +}; + +export interface ActionOutput_attio_deletewebhook { + success: boolean; +}; + +export interface ActionInput_attio_getobject { + object_id: string; +}; + +export interface ActionOutput_attio_getobject { + data: { id: { workspace_id: string; + object_id: string;}; + api_slug: string; + singular_noun: string; + plural_noun: string; + created_at: string;}; +}; + +export interface ActionInput_attio_getrecord { + object_slug: string; + record_id: string; +}; + +export interface ActionOutput_attio_getrecord { + data: { id: { workspace_id: string; + object_id: string; + record_id: string;}; + created_at: string; + values: { [key: string]: any | undefined;};}; +}; + +export interface ActionInput_attio_getwebhook { + webhook_id: string; +}; + +export interface ActionOutput_attio_getwebhook { + target_url: string; + subscriptions: ({ event_type: string; + filter: { "$and"?: ({ field: string; + operator: string; + value: string;})[] | undefined; + "$or"?: ({ field: string; + operator: string; + value: string;})[] | undefined;} | null;})[]; + id: { workspace_id: string; + webhook_id: string;}; + status: 'active' | 'degraded' | 'inactive'; + created_at: string; +}; + +export interface ActionInput_attio_listlists { +}; + +export interface ActionOutput_attio_listlists { + data: ({ id: { workspace_id: string; + list_id: string;}; + api_slug: string; + name: string; + parent_object: string[]; + created_at: string;})[]; +}; + +export interface ActionInput_attio_listnotes { + parent_object: string; + parent_record_id: string; + limit?: number | undefined; + offset?: number | undefined; +}; + +export interface ActionOutput_attio_listnotes { + data: ({ id: { workspace_id: string; + note_id: string;}; + title: string | null; + content_plaintext: string; + parent_object: string; + parent_record_id: string; + created_at: string;})[]; +}; + +export interface ActionInput_attio_listobjects { +}; + +export interface ActionOutput_attio_listobjects { + data: ({ id: { workspace_id: string; + object_id: string;}; + api_slug: string; + singular_noun: string; + plural_noun: string; + created_at: string;})[]; +}; + +export interface ActionInput_attio_listrecords { + object_slug: string; + limit?: number | undefined; + offset?: number | undefined; +}; + +export interface ActionOutput_attio_listrecords { + data: ({ id: { workspace_id: string; + object_id: string; + record_id: string;}; + created_at: string; + values: { [key: string]: any | undefined;};})[]; +}; + +export interface ActionInput_attio_listtasks { + limit?: number | undefined; + offset?: number | undefined; +}; + +export interface ActionOutput_attio_listtasks { + data: ({ id: { workspace_id: string; + task_id: string;}; + content_plaintext: string; + deadline_at: string | null; + is_completed: boolean; + created_at: string;})[]; +}; + +export interface ActionInput_attio_listwebhooks { + limit?: number | undefined; + cursor?: string | undefined; +}; + +export interface ActionOutput_attio_listwebhooks { + webhooks: ({ target_url: string; + subscriptions: ({ event_type: string; + filter: { "$and"?: ({ field: string; + operator: string; + value: string;})[] | undefined; + "$or"?: ({ field: string; + operator: string; + value: string;})[] | undefined;} | null;})[]; + id: { workspace_id: string; + webhook_id: string;}; + status: 'active' | 'degraded' | 'inactive'; + created_at: string;})[]; + next_cursor: string | null; +}; + +export interface ActionInput_attio_updaterecord { + object_slug: string; + record_id: string; + values: { [key: string]: any | undefined;}; +}; + +export interface ActionOutput_attio_updaterecord { + data: { id: { workspace_id: string; + object_id: string; + record_id: string;}; + created_at: string; + values: { [key: string]: any | undefined;};}; +}; + +export interface ActionInput_attio_updatewebhook { + webhook_id: string; + target_url?: string | undefined; + subscriptions?: ({ event_type: string; + filter?: { "$and"?: ({ field: string; + operator: string; + value: string;})[] | undefined; + "$or"?: ({ field: string; + operator: string; + value: string;})[] | undefined;} | null;})[]; +}; + +export interface ActionOutput_attio_updatewebhook { + target_url: string; + subscriptions: ({ event_type: string; + filter: { "$and"?: ({ field: string; + operator: string; + value: string;})[] | undefined; + "$or"?: ({ field: string; + operator: string; + value: string;})[] | undefined;} | null;})[]; + id: { workspace_id: string; + webhook_id: string;}; + status: 'active' | 'degraded' | 'inactive'; + created_at: string; +}; + export interface SyncMetadata_avalara_transactions { company: string; backfillPeriodMs?: number | undefined; diff --git a/integrations/attio/actions/create-company.ts b/integrations/attio/actions/create-company.ts new file mode 100644 index 000000000..a4b9455b0 --- /dev/null +++ b/integrations/attio/actions/create-company.ts @@ -0,0 +1,142 @@ +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +/** + * Creates a new company record in Attio. + * API Docs: https://docs.attio.com/rest-api/endpoint-reference/records/create-a-record + */ + +// Input schema - company fields based on Attio standard object +const CreateCompanyInput = z.object({ + name: z.string(), + domains: z.array(z.string()).optional(), + description: z.string().optional() +}); + +// Attio record ID structure +const RecordId = z.object({ + workspace_id: z.string(), + object_id: z.string(), + record_id: z.string() +}); + +// Output schema +const CreateCompanyOutput = z.object({ + id: RecordId, + name: z.union([z.string(), z.null()]), + domains: z.array(z.string()), + description: z.union([z.string(), z.null()]), + created_at: z.string(), + web_url: z.string() +}); + +// Attio API response types +interface AttioRecordResponse { + data: { + id: { + workspace_id: string; + object_id: string; + record_id: string; + }; + created_at: string; + web_url: string; + values: Record; + }; +} + +interface AttioAttributeValue { + value?: string; + domain?: string; + original_value?: string; +} + +const action = createAction({ + description: 'Creates a new company record in Attio', + version: '1.0.0', + + endpoint: { + method: 'POST', + path: '/companies', + group: 'Companies' + }, + + input: CreateCompanyInput, + output: CreateCompanyOutput, + scopes: ['record_permission:read-write', 'object_configuration:read'], + + exec: async (nango, input): Promise> => { + // Build values object with only provided fields + const values: Record = { + name: input.name + }; + + // Add domains if provided + if (input.domains && input.domains.length > 0) { + values['domains'] = input.domains.map((d) => ({ domain: d })); + } + + // Add optional text fields + if (input.description) { + values['description'] = input.description; + } + + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/records/create-a-record + endpoint: 'v2/objects/companies/records', + data: { + data: { + values + } + }, + retries: 3 + }; + + const response = await nango.post(config); + const record = response.data.data; + + // Extract domains from response + const responseDomains: string[] = []; + const domainValues = record.values['domains']; + if (domainValues && Array.isArray(domainValues)) { + for (const d of domainValues) { + if (d.domain) { + responseDomains.push(d.domain); + } + } + } + + return { + id: { + workspace_id: record.id.workspace_id, + object_id: record.id.object_id, + record_id: record.id.record_id + }, + name: getAttributeValue(record.values['name']) ?? null, + domains: responseDomains, + description: getAttributeValue(record.values['description']) ?? null, + created_at: record.created_at, + web_url: record.web_url + }; + } +}); + +function getAttributeValue(attr: AttioAttributeValue[] | undefined): string | null { + if (!attr || attr.length === 0) { + return null; + } + const value = attr[0]; + if (!value) { + return null; + } + if (value.value) { + return value.value; + } + if (value.original_value) { + return value.original_value; + } + return null; +} + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/create-list-entry.ts b/integrations/attio/actions/create-list-entry.ts new file mode 100644 index 000000000..9dfefbda5 --- /dev/null +++ b/integrations/attio/actions/create-list-entry.ts @@ -0,0 +1,73 @@ +/** + * Instructions: Adds a record as an entry to a list. + * API: https://docs.attio.com/rest-api/endpoint-reference/list-entries/add-entry-to-list + */ + +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +// Inline schema definitions +const CreateListEntryInput = z.object({ + list_id: z.string().describe('The list slug or UUID to add the entry to. Example: "my-sales-list"'), + record_id: z.string().describe('The record ID to add to the list. Example: "5829dd6c-0577-40dc-a858-8bd9a0d6aa58"') +}); + +const EntryId = z.object({ + workspace_id: z.string(), + list_id: z.string(), + entry_id: z.string() +}); + +const CreateListEntryOutput = z.object({ + data: z.object({ + id: EntryId, + record_id: z.string(), + created_at: z.string() + }) +}); + +const action = createAction({ + description: 'Adds a record as an entry to a list.', + version: '1.0.0', + + endpoint: { + method: 'POST', + path: '/lists/:list_id/entries', + group: 'Lists' + }, + + input: CreateListEntryInput, + output: CreateListEntryOutput, + scopes: ['list_entry:read-write'], + + exec: async (nango, input): Promise> => { + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/list-entries/add-entry-to-list + endpoint: `v2/lists/${input.list_id}/entries`, + data: { + data: { + parent_record_id: input.record_id + } + }, + retries: 3 + }; + + const response = await nango.post(config); + + return { + data: { + id: { + workspace_id: response.data.data.id.workspace_id, + list_id: response.data.data.id.list_id, + entry_id: response.data.data.id.entry_id + }, + record_id: response.data.data.parent_record_id, + created_at: response.data.data.created_at + } + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/create-note.ts b/integrations/attio/actions/create-note.ts new file mode 100644 index 000000000..864247561 --- /dev/null +++ b/integrations/attio/actions/create-note.ts @@ -0,0 +1,83 @@ +/** + * Instructions: Creates a note on a record. + * API: https://docs.attio.com/rest-api/endpoint-reference/notes/create-a-note + */ + +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +// Inline schema definitions +const CreateNoteInput = z.object({ + parent_object: z.string().describe('The object type of the parent record. Example: "people" or "companies"'), + parent_record_id: z.string().describe('The record ID to attach the note to. Example: "5829dd6c-0577-40dc-a858-8bd9a0d6aa58"'), + title: z.string().describe('The note title. Example: "Meeting Notes"'), + content: z.string().describe('The note content in plain text or markdown. Example: "Discussed Q4 planning..."') +}); + +const NoteId = z.object({ + workspace_id: z.string(), + note_id: z.string() +}); + +const CreateNoteOutput = z.object({ + data: z.object({ + id: NoteId, + title: z.string(), + content_plaintext: z.string(), + parent_object: z.string(), + parent_record_id: z.string(), + created_at: z.string() + }) +}); + +const action = createAction({ + description: 'Creates a note on a record.', + version: '1.0.0', + + endpoint: { + method: 'POST', + path: '/notes', + group: 'Notes' + }, + + input: CreateNoteInput, + output: CreateNoteOutput, + scopes: ['note:read-write'], + + exec: async (nango, input): Promise> => { + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/notes/create-a-note + endpoint: 'v2/notes', + data: { + data: { + parent_object: input.parent_object, + parent_record_id: input.parent_record_id, + title: input.title, + format: 'plaintext', + content: input.content + } + }, + retries: 3 + }; + + const response = await nango.post(config); + + return { + data: { + id: { + workspace_id: response.data.data.id.workspace_id, + note_id: response.data.data.id.note_id + }, + title: response.data.data.title, + content_plaintext: response.data.data.content_plaintext, + parent_object: response.data.data.parent_object, + parent_record_id: response.data.data.parent_record_id, + created_at: response.data.data.created_at + } + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/create-person.ts b/integrations/attio/actions/create-person.ts new file mode 100644 index 000000000..8fa69cf02 --- /dev/null +++ b/integrations/attio/actions/create-person.ts @@ -0,0 +1,202 @@ +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +/** + * Creates a new person record in Attio. + * API Docs: https://docs.attio.com/rest-api/endpoint-reference/records/create-a-record + */ + +// Input schema - person fields based on Attio standard object +const CreatePersonInput = z.object({ + first_name: z.string(), + last_name: z.string(), + email_addresses: z.array(z.string()).optional(), + phone_numbers: z.array(z.string()).optional(), + job_title: z.string().optional() +}); + +// Attio record ID structure +const RecordId = z.object({ + workspace_id: z.string(), + object_id: z.string(), + record_id: z.string() +}); + +// Output schema +const CreatePersonOutput = z.object({ + id: RecordId, + name: z.union([z.string(), z.null()]), + email: z.union([z.string(), z.null()]), + phone: z.union([z.string(), z.null()]), + job_title: z.union([z.string(), z.null()]), + created_at: z.string(), + web_url: z.string() +}); + +// Attio API response types +interface AttioRecordResponse { + data: { + id: { + workspace_id: string; + object_id: string; + record_id: string; + }; + created_at: string; + web_url: string; + values: Record; + }; +} + +interface AttioAttributeValue { + value?: string; + original_value?: string; + full_name?: string; + first_name?: string; + last_name?: string; + email_address?: string; + phone_number?: string; + original_phone_number?: string; +} + +const action = createAction({ + description: 'Creates a new person record in Attio', + version: '1.0.0', + + endpoint: { + method: 'POST', + path: '/people', + group: 'People' + }, + + input: CreatePersonInput, + output: CreatePersonOutput, + scopes: ['record_permission:read-write', 'object_configuration:read'], + + exec: async (nango, input): Promise> => { + // Build values object with only provided fields + const values: Record = { + // Personal name attribute + name: { + first_name: input.first_name, + last_name: input.last_name, + full_name: `${input.first_name} ${input.last_name}` + } + }; + + // Add email addresses if provided + if (input.email_addresses && input.email_addresses.length > 0) { + values['email_addresses'] = input.email_addresses.map((email) => ({ + email_address: email + })); + } + + // Add phone numbers if provided + if (input.phone_numbers && input.phone_numbers.length > 0) { + values['phone_numbers'] = input.phone_numbers.map((phone) => ({ + original_phone_number: phone + })); + } + + // Add optional text fields + if (input.job_title) { + values['job_title'] = input.job_title; + } + + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/records/create-a-record + endpoint: 'v2/objects/people/records', + data: { + data: { + values + } + }, + retries: 3 + }; + + const response = await nango.post(config); + const record = response.data.data; + + return { + id: { + workspace_id: record.id.workspace_id, + object_id: record.id.object_id, + record_id: record.id.record_id + }, + name: getPersonName(record.values['name']) ?? null, + email: getEmailAddress(record.values['email_addresses']) ?? null, + phone: getPhoneNumber(record.values['phone_numbers']) ?? null, + job_title: getAttributeValue(record.values['job_title']) ?? null, + created_at: record.created_at, + web_url: record.web_url + }; + } +}); + +function getPersonName(attr: AttioAttributeValue[] | undefined): string | null { + if (!attr || attr.length === 0) { + return null; + } + const value = attr[0]; + if (!value) { + return null; + } + if (value.full_name) { + return value.full_name; + } + if (value.first_name && value.last_name) { + return `${value.first_name} ${value.last_name}`.trim(); + } + return null; +} + +function getEmailAddress(attr: AttioAttributeValue[] | undefined): string | null { + if (!attr || attr.length === 0) { + return null; + } + const value = attr[0]; + if (!value) { + return null; + } + if (value.email_address) { + return value.email_address; + } + return null; +} + +function getPhoneNumber(attr: AttioAttributeValue[] | undefined): string | null { + if (!attr || attr.length === 0) { + return null; + } + const value = attr[0]; + if (!value) { + return null; + } + if (value.phone_number) { + return value.phone_number; + } + if (value.original_phone_number) { + return value.original_phone_number; + } + return null; +} + +function getAttributeValue(attr: AttioAttributeValue[] | undefined): string | null { + if (!attr || attr.length === 0) { + return null; + } + const value = attr[0]; + if (!value) { + return null; + } + if (value.value) { + return value.value; + } + if (value.original_value) { + return value.original_value; + } + return null; +} + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/create-record.ts b/integrations/attio/actions/create-record.ts new file mode 100644 index 000000000..20ee8b789 --- /dev/null +++ b/integrations/attio/actions/create-record.ts @@ -0,0 +1,73 @@ +/** + * Instructions: Creates a new record for a specified object type. + * API: https://docs.attio.com/rest-api/endpoint-reference/records/create-a-record + */ + +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +// Inline schema definitions +const CreateRecordInput = z.object({ + object_slug: z.string().describe('The object type slug to create record in. Example: "people" or "companies"'), + values: z.record(z.string(), z.any()).describe('Object containing attribute values to set. Example: {"name": [{"first_name": "John", "last_name": "Doe"}]}') +}); + +const RecordId = z.object({ + workspace_id: z.string(), + object_id: z.string(), + record_id: z.string() +}); + +const CreateRecordOutput = z.object({ + data: z.object({ + id: RecordId, + created_at: z.string(), + values: z.record(z.string(), z.any()) + }) +}); + +const action = createAction({ + description: 'Creates a new record for a specified object type.', + version: '1.0.0', + + endpoint: { + method: 'POST', + path: '/objects/:object_slug/records', + group: 'Records' + }, + + input: CreateRecordInput, + output: CreateRecordOutput, + scopes: ['record_permission:read-write'], + + exec: async (nango, input): Promise> => { + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/records/create-a-record + endpoint: `v2/objects/${input.object_slug}/records`, + data: { + data: { + values: input.values + } + }, + retries: 3 + }; + + const response = await nango.post(config); + + return { + data: { + id: { + workspace_id: response.data.data.id.workspace_id, + object_id: response.data.data.id.object_id, + record_id: response.data.data.id.record_id + }, + created_at: response.data.data.created_at, + values: response.data.data.values + } + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/create-task.ts b/integrations/attio/actions/create-task.ts new file mode 100644 index 000000000..b576adcac --- /dev/null +++ b/integrations/attio/actions/create-task.ts @@ -0,0 +1,88 @@ +/** + * Instructions: Creates a task. + * API: https://docs.attio.com/rest-api/endpoint-reference/tasks/create-a-task + */ + +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +// Inline schema definitions +const LinkedRecord = z.object({ + target_object: z.string().describe('Object type. Example: "people"'), + target_record_id: z.string().describe('Record ID') +}); + +const CreateTaskInput = z.object({ + content: z.string().describe('Task description. Example: "Follow up with customer"'), + deadline: z.string().optional().describe('Due date in ISO format. Example: "2025-12-31T23:59:59.000Z"'), + assignee_ids: z.array(z.string()).optional().describe('Array of workspace member IDs to assign. Example: ["user-id-123"]'), + linked_records: z.array(LinkedRecord).optional().describe('Records to link to this task') +}); + +const TaskId = z.object({ + workspace_id: z.string(), + task_id: z.string() +}); + +const CreateTaskOutput = z.object({ + data: z.object({ + id: TaskId, + content_plaintext: z.string(), + deadline_at: z.union([z.string(), z.null()]), + is_completed: z.boolean(), + created_at: z.string() + }) +}); + +const action = createAction({ + description: 'Creates a task.', + version: '1.0.0', + + endpoint: { + method: 'POST', + path: '/tasks', + group: 'Tasks' + }, + + input: CreateTaskInput, + output: CreateTaskOutput, + scopes: ['task:read-write'], + + exec: async (nango, input): Promise> => { + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/tasks/create-a-task + endpoint: 'v2/tasks', + data: { + data: { + format: 'plaintext', + content: input.content, + ...(input.deadline && { deadline_at: input.deadline }), + ...(input.assignee_ids && { + assignees: input.assignee_ids.map((id) => ({ referenced_actor_type: 'workspace-member', referenced_actor_id: id })) + }), + ...(input.linked_records && { linked_records: input.linked_records }) + } + }, + retries: 3 + }; + + const response = await nango.post(config); + + return { + data: { + id: { + workspace_id: response.data.data.id.workspace_id, + task_id: response.data.data.id.task_id + }, + content_plaintext: response.data.data.content_plaintext, + deadline_at: response.data.data.deadline_at ?? null, + is_completed: response.data.data.is_completed, + created_at: response.data.data.created_at + } + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/create-webhook.ts b/integrations/attio/actions/create-webhook.ts new file mode 100644 index 000000000..ae7b1cd8e --- /dev/null +++ b/integrations/attio/actions/create-webhook.ts @@ -0,0 +1,119 @@ +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +/** + * Creates a new webhook in the Attio workspace to receive event notifications. + * API Docs: https://docs.attio.com/rest-api/endpoint-reference/webhooks/create-a-webhook + */ + +// Subscription filter schema for input +const SubscriptionFilterInput = z.object({ + field: z.string(), + operator: z.string(), + value: z.string() +}); + +const FilterGroupInput = z.object({ + $and: z.array(SubscriptionFilterInput).optional(), + $or: z.array(SubscriptionFilterInput).optional() +}); + +// Subscription schema for input +const SubscriptionInput = z.object({ + event_type: z.string(), + filter: z.union([FilterGroupInput, z.null()]).optional() +}); + +// Input schema +const CreateWebhookInput = z.object({ + target_url: z.string(), + subscriptions: z.array(SubscriptionInput) +}); + +// Subscription filter schema for output +const SubscriptionFilter = z.object({ + field: z.string(), + operator: z.string(), + value: z.string() +}); + +const FilterGroup = z.object({ + $and: z.array(SubscriptionFilter).optional(), + $or: z.array(SubscriptionFilter).optional() +}); + +// Subscription schema for output +const Subscription = z.object({ + event_type: z.string(), + filter: z.union([FilterGroup, z.null()]) +}); + +// Webhook ID schema +const WebhookId = z.object({ + workspace_id: z.string(), + webhook_id: z.string() +}); + +// Output schema - includes secret which is only shown on creation +const CreateWebhookOutput = z.object({ + target_url: z.string(), + subscriptions: z.array(Subscription), + id: WebhookId, + status: z.enum(['active', 'degraded', 'inactive']), + created_at: z.string(), + secret: z.string() +}); + +const action = createAction({ + description: 'Creates a new webhook in the Attio workspace', + version: '1.0.0', + + endpoint: { + method: 'POST', + path: '/webhooks', + group: 'Webhooks' + }, + + input: CreateWebhookInput, + output: CreateWebhookOutput, + scopes: ['webhook:read-write'], + + exec: async (nango, input): Promise> => { + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/webhooks/create-a-webhook + endpoint: 'v2/webhooks', + data: { + data: { + target_url: input.target_url, + subscriptions: input.subscriptions.map((sub) => ({ + event_type: sub.event_type, + filter: sub.filter ?? null + })) + } + }, + retries: 3 + }; + + const response = await nango.post(config); + const webhook = response.data.data; + + return { + target_url: webhook.target_url, + subscriptions: webhook.subscriptions.map((sub: any) => ({ + event_type: sub.event_type, + filter: sub.filter ?? null + })), + id: { + workspace_id: webhook.id.workspace_id, + webhook_id: webhook.id.webhook_id + }, + status: webhook.status, + created_at: webhook.created_at, + secret: webhook.secret + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/delete-list-entry.ts b/integrations/attio/actions/delete-list-entry.ts new file mode 100644 index 000000000..f4faef6b3 --- /dev/null +++ b/integrations/attio/actions/delete-list-entry.ts @@ -0,0 +1,50 @@ +/** + * Instructions: Removes an entry from a list. + * API: https://docs.attio.com/rest-api/endpoint-reference/list-entries/delete-list-entry + */ + +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +// Inline schema definitions +const DeleteListEntryInput = z.object({ + list_id: z.string().describe('The list slug or UUID. Example: "my-sales-list"'), + entry_id: z.string().describe('The entry ID to remove. Example: "abc123-def456"') +}); + +const DeleteListEntryOutput = z.object({ + success: z.boolean().describe('Whether the deletion was successful') +}); + +const action = createAction({ + description: 'Removes an entry from a list.', + version: '1.0.0', + + endpoint: { + method: 'DELETE', + path: '/lists/:list_id/entries/:entry_id', + group: 'Lists' + }, + + input: DeleteListEntryInput, + output: DeleteListEntryOutput, + scopes: ['list_entry:read-write'], + + exec: async (nango, input): Promise> => { + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/list-entries/delete-list-entry + endpoint: `v2/lists/${input.list_id}/entries/${input.entry_id}`, + retries: 3 + }; + + await nango.delete(config); + + return { + success: true + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/delete-note.ts b/integrations/attio/actions/delete-note.ts new file mode 100644 index 000000000..2266b928b --- /dev/null +++ b/integrations/attio/actions/delete-note.ts @@ -0,0 +1,49 @@ +/** + * Instructions: Deletes a note. + * API: https://docs.attio.com/rest-api/endpoint-reference/notes/delete-a-note + */ + +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +// Inline schema definitions +const DeleteNoteInput = z.object({ + note_id: z.string().describe('The note ID to delete. Example: "abc123-def456"') +}); + +const DeleteNoteOutput = z.object({ + success: z.boolean().describe('Whether the deletion was successful') +}); + +const action = createAction({ + description: 'Deletes a note.', + version: '1.0.0', + + endpoint: { + method: 'DELETE', + path: '/notes/:note_id', + group: 'Notes' + }, + + input: DeleteNoteInput, + output: DeleteNoteOutput, + scopes: ['note:read-write'], + + exec: async (nango, input): Promise> => { + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/notes/delete-a-note + endpoint: `v2/notes/${input.note_id}`, + retries: 3 + }; + + await nango.delete(config); + + return { + success: true + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/delete-record.ts b/integrations/attio/actions/delete-record.ts new file mode 100644 index 000000000..6fab19c89 --- /dev/null +++ b/integrations/attio/actions/delete-record.ts @@ -0,0 +1,50 @@ +/** + * Instructions: Deletes a record permanently. + * API: https://docs.attio.com/rest-api/endpoint-reference/records/delete-a-record + */ + +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +// Inline schema definitions +const DeleteRecordInput = z.object({ + object_slug: z.string().describe('The object type slug. Example: "people" or "companies"'), + record_id: z.string().describe('The record ID to delete. Example: "5829dd6c-0577-40dc-a858-8bd9a0d6aa58"') +}); + +const DeleteRecordOutput = z.object({ + success: z.boolean().describe('Whether the deletion was successful') +}); + +const action = createAction({ + description: 'Deletes a record permanently.', + version: '1.0.0', + + endpoint: { + method: 'DELETE', + path: '/objects/:object_slug/records/:record_id', + group: 'Records' + }, + + input: DeleteRecordInput, + output: DeleteRecordOutput, + scopes: ['record_permission:read-write'], + + exec: async (nango, input): Promise> => { + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/records/delete-a-record + endpoint: `v2/objects/${input.object_slug}/records/${input.record_id}`, + retries: 3 + }; + + await nango.delete(config); + + return { + success: true + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/delete-webhook.ts b/integrations/attio/actions/delete-webhook.ts new file mode 100644 index 000000000..0579f05ea --- /dev/null +++ b/integrations/attio/actions/delete-webhook.ts @@ -0,0 +1,50 @@ +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +/** + * Deletes a webhook from the Attio workspace. + * API Docs: https://docs.attio.com/rest-api/endpoint-reference/webhooks/delete-a-webhook + */ + +// Input schema +const DeleteWebhookInput = z.object({ + webhook_id: z.string() +}); + +// Output schema - empty object on success +const DeleteWebhookOutput = z.object({ + success: z.boolean() +}); + +const action = createAction({ + description: 'Deletes a webhook from the Attio workspace', + version: '1.0.0', + + endpoint: { + method: 'DELETE', + path: '/webhooks/{webhook_id}', + group: 'Webhooks' + }, + + input: DeleteWebhookInput, + output: DeleteWebhookOutput, + scopes: ['webhook:read-write'], + + exec: async (nango, input): Promise> => { + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/webhooks/delete-a-webhook + endpoint: `v2/webhooks/${input.webhook_id}`, + retries: 3 + }; + + await nango.delete(config); + + return { + success: true + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/get-object.ts b/integrations/attio/actions/get-object.ts new file mode 100644 index 000000000..b572797b4 --- /dev/null +++ b/integrations/attio/actions/get-object.ts @@ -0,0 +1,67 @@ +/** + * Instructions: Gets a specific object by ID or slug. + * API: https://docs.attio.com/rest-api/endpoint-reference/objects/get-an-object + */ + +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +// Inline schema definitions +const GetObjectInput = z.object({ + object_id: z.string().describe('UUID or slug to identify the object. Example: "people" or "97052eb9-e65e-443f-a297-f2d9a4a7f795"') +}); + +const GetObjectOutput = z.object({ + data: z.object({ + id: z.object({ + workspace_id: z.string().describe('Workspace ID. Example: "6f73b7c5-b2d4-48a9-a82b-e68b48c315a6"'), + object_id: z.string().describe('Object ID. Example: "97052eb9-e65e-443f-a297-f2d9a4a7f795"') + }), + api_slug: z.string().describe('Unique, human-readable slug for the object. Example: "people"'), + singular_noun: z.string().describe('Singular form of the object name. Example: "Person"'), + plural_noun: z.string().describe('Plural form of the object name. Example: "People"'), + created_at: z.string().describe('When the object was created. Example: "2023-01-01T00:00:00.000Z"') + }) +}); + +const action = createAction({ + description: 'Gets a specific object by ID or slug.', + version: '1.0.0', + + endpoint: { + method: 'GET', + path: '/objects/:object_id', + group: 'Objects' + }, + + input: GetObjectInput, + output: GetObjectOutput, + scopes: ['object_configuration:read'], + + exec: async (nango, input): Promise> => { + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/objects/get-an-object + endpoint: `v2/objects/${input.object_id}`, + retries: 3 + }; + + const response = await nango.get(config); + + return { + data: { + id: { + workspace_id: response.data.data.id.workspace_id, + object_id: response.data.data.id.object_id + }, + api_slug: response.data.data.api_slug, + singular_noun: response.data.data.singular_noun, + plural_noun: response.data.data.plural_noun, + created_at: response.data.data.created_at + } + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/get-record.ts b/integrations/attio/actions/get-record.ts new file mode 100644 index 000000000..4e70cf09d --- /dev/null +++ b/integrations/attio/actions/get-record.ts @@ -0,0 +1,68 @@ +/** + * Instructions: Gets a specific record by ID. + * API: https://docs.attio.com/rest-api/endpoint-reference/records/get-a-record + */ + +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +// Inline schema definitions +const GetRecordInput = z.object({ + object_slug: z.string().describe('The object type slug. Example: "people" or "companies"'), + record_id: z.string().describe('The record ID to retrieve. Example: "5829dd6c-0577-40dc-a858-8bd9a0d6aa58"') +}); + +const RecordId = z.object({ + workspace_id: z.string(), + object_id: z.string(), + record_id: z.string() +}); + +const GetRecordOutput = z.object({ + data: z.object({ + id: RecordId, + created_at: z.string(), + values: z.record(z.string(), z.any()) + }) +}); + +const action = createAction({ + description: 'Gets a specific record by ID.', + version: '1.0.0', + + endpoint: { + method: 'GET', + path: '/objects/:object_slug/records/:record_id', + group: 'Records' + }, + + input: GetRecordInput, + output: GetRecordOutput, + scopes: ['record_permission:read'], + + exec: async (nango, input): Promise> => { + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/records/get-a-record + endpoint: `v2/objects/${input.object_slug}/records/${input.record_id}`, + retries: 3 + }; + + const response = await nango.get(config); + + return { + data: { + id: { + workspace_id: response.data.data.id.workspace_id, + object_id: response.data.data.id.object_id, + record_id: response.data.data.id.record_id + }, + created_at: response.data.data.created_at, + values: response.data.data.values + } + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/get-webhook.ts b/integrations/attio/actions/get-webhook.ts new file mode 100644 index 000000000..46a2dacae --- /dev/null +++ b/integrations/attio/actions/get-webhook.ts @@ -0,0 +1,89 @@ +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +/** + * Gets a single webhook by its ID from the Attio workspace. + * API Docs: https://docs.attio.com/rest-api/endpoint-reference/webhooks/get-a-webhook + */ + +// Input schema +const GetWebhookInput = z.object({ + webhook_id: z.string() +}); + +// Subscription filter schema +const SubscriptionFilter = z.object({ + field: z.string(), + operator: z.string(), + value: z.string() +}); + +const FilterGroup = z.object({ + $and: z.array(SubscriptionFilter).optional(), + $or: z.array(SubscriptionFilter).optional() +}); + +// Subscription schema +const Subscription = z.object({ + event_type: z.string(), + filter: z.union([FilterGroup, z.null()]) +}); + +// Webhook ID schema +const WebhookId = z.object({ + workspace_id: z.string(), + webhook_id: z.string() +}); + +// Output schema +const GetWebhookOutput = z.object({ + target_url: z.string(), + subscriptions: z.array(Subscription), + id: WebhookId, + status: z.enum(['active', 'degraded', 'inactive']), + created_at: z.string() +}); + +const action = createAction({ + description: 'Gets a single webhook by its ID from the Attio workspace', + version: '1.0.0', + + endpoint: { + method: 'GET', + path: '/webhooks/{webhook_id}', + group: 'Webhooks' + }, + + input: GetWebhookInput, + output: GetWebhookOutput, + scopes: ['webhook:read'], + + exec: async (nango, input): Promise> => { + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/webhooks/get-a-webhook + endpoint: `v2/webhooks/${input.webhook_id}`, + retries: 3 + }; + + const response = await nango.get(config); + const webhook = response.data.data; + + return { + target_url: webhook.target_url, + subscriptions: webhook.subscriptions.map((sub: any) => ({ + event_type: sub.event_type, + filter: sub.filter ?? null + })), + id: { + workspace_id: webhook.id.workspace_id, + webhook_id: webhook.id.webhook_id + }, + status: webhook.status, + created_at: webhook.created_at + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/list-lists.ts b/integrations/attio/actions/list-lists.ts new file mode 100644 index 000000000..5c5ab0929 --- /dev/null +++ b/integrations/attio/actions/list-lists.ts @@ -0,0 +1,69 @@ +/** + * Instructions: Lists all lists in the workspace. + * API: https://docs.attio.com/rest-api/endpoint-reference/lists/list-all-lists + */ + +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +// Inline schema definitions +const ListListsInput = z.object({}); + +const ListId = z.object({ + workspace_id: z.string(), + list_id: z.string() +}); + +const AttioList = z.object({ + id: ListId, + api_slug: z.string().describe('Unique slug for the list. Example: "my-sales-list"'), + name: z.string().describe('Display name of the list. Example: "My Sales List"'), + parent_object: z.array(z.string()).describe('Object types this list is for. Example: ["people"]'), + created_at: z.string().describe('When the list was created') +}); + +const ListListsOutput = z.object({ + data: z.array(AttioList).describe('Array of list objects') +}); + +const action = createAction({ + description: 'Lists all lists in the workspace.', + version: '1.0.0', + + endpoint: { + method: 'GET', + path: '/lists', + group: 'Lists' + }, + + input: ListListsInput, + output: ListListsOutput, + scopes: ['list_configuration:read'], + + exec: async (nango, _input): Promise> => { + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/lists/list-all-lists + endpoint: 'v2/lists', + retries: 3 + }; + + const response = await nango.get(config); + + return { + data: response.data.data.map((list: any) => ({ + id: { + workspace_id: list.id.workspace_id, + list_id: list.id.list_id + }, + api_slug: list.api_slug, + name: list.name, + parent_object: list.parent_object, + created_at: list.created_at + })) + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/list-notes.ts b/integrations/attio/actions/list-notes.ts new file mode 100644 index 000000000..913023b2e --- /dev/null +++ b/integrations/attio/actions/list-notes.ts @@ -0,0 +1,82 @@ +/** + * Instructions: Lists notes for a record. + * API: https://docs.attio.com/rest-api/endpoint-reference/notes/list-notes + */ + +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +// Inline schema definitions +const ListNotesInput = z.object({ + parent_object: z.string().describe('The object type of the parent record. Example: "people" or "companies"'), + parent_record_id: z.string().describe('The record ID to list notes for. Example: "5829dd6c-0577-40dc-a858-8bd9a0d6aa58"'), + limit: z.number().optional().describe('Maximum number of notes to return'), + offset: z.number().optional().describe('Number of notes to skip') +}); + +const NoteId = z.object({ + workspace_id: z.string(), + note_id: z.string() +}); + +const Note = z.object({ + id: NoteId, + title: z.union([z.string(), z.null()]), + content_plaintext: z.string(), + parent_object: z.string(), + parent_record_id: z.string(), + created_at: z.string() +}); + +const ListNotesOutput = z.object({ + data: z.array(Note).describe('Array of notes') +}); + +const action = createAction({ + description: 'Lists notes for a record.', + version: '1.0.0', + + endpoint: { + method: 'GET', + path: '/notes', + group: 'Notes' + }, + + input: ListNotesInput, + output: ListNotesOutput, + scopes: ['note:read'], + + exec: async (nango, input): Promise> => { + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/notes/list-notes + endpoint: 'v2/notes', + params: { + parent_object: input.parent_object, + parent_record_id: input.parent_record_id, + ...(input.limit && { limit: input.limit.toString() }), + ...(input.offset && { offset: input.offset.toString() }) + }, + retries: 3 + }; + + const response = await nango.get(config); + + return { + data: response.data.data.map((note: any) => ({ + id: { + workspace_id: note.id.workspace_id, + note_id: note.id.note_id + }, + title: note.title ?? null, + content_plaintext: note.content_plaintext, + parent_object: note.parent_object, + parent_record_id: note.parent_record_id, + created_at: note.created_at + })) + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/list-objects.ts b/integrations/attio/actions/list-objects.ts new file mode 100644 index 000000000..cf0950f7d --- /dev/null +++ b/integrations/attio/actions/list-objects.ts @@ -0,0 +1,67 @@ +/** + * Instructions: Lists all available objects (both system and custom-defined) in the Attio workspace. + * API: https://docs.attio.com/rest-api/endpoint-reference/objects/list-objects + */ + +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +// Inline schema definitions +const ListObjectsInput = z.object({}); + +const AttioObject = z.object({ + id: z.object({ + workspace_id: z.string().describe('Workspace ID. Example: "6f73b7c5-b2d4-48a9-a82b-e68b48c315a6"'), + object_id: z.string().describe('Object ID. Example: "97052eb9-e65e-443f-a297-f2d9a4a7f795"') + }), + api_slug: z.string().describe('Unique, human-readable slug for the object. Example: "people"'), + singular_noun: z.string().describe('Singular form of the object name. Example: "Person"'), + plural_noun: z.string().describe('Plural form of the object name. Example: "People"'), + created_at: z.string().describe('When the object was created. Example: "2023-01-01T00:00:00.000Z"') +}); + +const ListObjectsOutput = z.object({ + data: z.array(AttioObject).describe('Array of object definitions') +}); + +const action = createAction({ + description: 'Lists all available objects (system and custom-defined) in the Attio workspace.', + version: '1.0.0', + + endpoint: { + method: 'GET', + path: '/objects', + group: 'Objects' + }, + + input: ListObjectsInput, + output: ListObjectsOutput, + scopes: ['object_configuration:read'], + + exec: async (nango, _input): Promise> => { + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/objects/list-objects + endpoint: 'v2/objects', + retries: 3 + }; + + const response = await nango.get(config); + + return { + data: response.data.data.map((obj: any) => ({ + id: { + workspace_id: obj.id.workspace_id, + object_id: obj.id.object_id + }, + api_slug: obj.api_slug, + singular_noun: obj.singular_noun, + plural_noun: obj.plural_noun, + created_at: obj.created_at + })) + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/list-records.ts b/integrations/attio/actions/list-records.ts new file mode 100644 index 000000000..6b55b928f --- /dev/null +++ b/integrations/attio/actions/list-records.ts @@ -0,0 +1,75 @@ +/** + * Instructions: Lists records from a specific object type. + * API: https://docs.attio.com/rest-api/endpoint-reference/records/list-records + */ + +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +// Inline schema definitions +const ListRecordsInput = z.object({ + object_slug: z.string().describe('The object type slug to query records from. Example: "people" or "companies"'), + limit: z.number().optional().describe('Maximum number of records to return. Default: 25'), + offset: z.number().optional().describe('Number of records to skip. Default: 0') +}); + +const RecordId = z.object({ + workspace_id: z.string(), + object_id: z.string(), + record_id: z.string() +}); + +const Record = z.object({ + id: RecordId, + created_at: z.string(), + values: z.record(z.string(), z.any()).describe('Object containing attribute values keyed by attribute slug') +}); + +const ListRecordsOutput = z.object({ + data: z.array(Record).describe('Array of record objects') +}); + +const action = createAction({ + description: 'Lists records from a specific object type.', + version: '1.0.0', + + endpoint: { + method: 'POST', + path: '/objects/:object_slug/records/query', + group: 'Records' + }, + + input: ListRecordsInput, + output: ListRecordsOutput, + scopes: ['record_permission:read'], + + exec: async (nango, input): Promise> => { + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/records/list-records + endpoint: `v2/objects/${input.object_slug}/records/query`, + data: { + ...(input.limit && { limit: input.limit }), + ...(input.offset && { offset: input.offset }) + }, + retries: 3 + }; + + const response = await nango.post(config); + + return { + data: response.data.data.map((record: any) => ({ + id: { + workspace_id: record.id.workspace_id, + object_id: record.id.object_id, + record_id: record.id.record_id + }, + created_at: record.created_at, + values: record.values + })) + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/list-tasks.ts b/integrations/attio/actions/list-tasks.ts new file mode 100644 index 000000000..c73218839 --- /dev/null +++ b/integrations/attio/actions/list-tasks.ts @@ -0,0 +1,76 @@ +/** + * Instructions: Lists tasks. + * API: https://docs.attio.com/rest-api/endpoint-reference/tasks/list-tasks + */ + +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +// Inline schema definitions +const ListTasksInput = z.object({ + limit: z.number().optional().describe('Maximum number of tasks to return'), + offset: z.number().optional().describe('Number of tasks to skip') +}); + +const TaskId = z.object({ + workspace_id: z.string(), + task_id: z.string() +}); + +const Task = z.object({ + id: TaskId, + content_plaintext: z.string(), + deadline_at: z.union([z.string(), z.null()]), + is_completed: z.boolean(), + created_at: z.string() +}); + +const ListTasksOutput = z.object({ + data: z.array(Task).describe('Array of tasks') +}); + +const action = createAction({ + description: 'Lists tasks.', + version: '1.0.0', + + endpoint: { + method: 'GET', + path: '/tasks', + group: 'Tasks' + }, + + input: ListTasksInput, + output: ListTasksOutput, + scopes: ['task:read'], + + exec: async (nango, input): Promise> => { + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/tasks/list-tasks + endpoint: 'v2/tasks', + params: { + ...(input.limit && { limit: input.limit.toString() }), + ...(input.offset && { offset: input.offset.toString() }) + }, + retries: 3 + }; + + const response = await nango.get(config); + + return { + data: response.data.data.map((task: any) => ({ + id: { + workspace_id: task.id.workspace_id, + task_id: task.id.task_id + }, + content_plaintext: task.content_plaintext, + deadline_at: task.deadline_at ?? null, + is_completed: task.is_completed, + created_at: task.created_at + })) + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/list-webhooks.ts b/integrations/attio/actions/list-webhooks.ts new file mode 100644 index 000000000..5a815098e --- /dev/null +++ b/integrations/attio/actions/list-webhooks.ts @@ -0,0 +1,111 @@ +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +/** + * Lists all webhooks configured in the Attio workspace with pagination support. + * API Docs: https://docs.attio.com/rest-api/endpoint-reference/webhooks/list-webhooks + */ + +// Input schema with standard pagination +const ListWebhooksInput = z.object({ + limit: z.number().optional(), + cursor: z.string().optional() +}); + +// Subscription filter schema +const SubscriptionFilter = z.object({ + field: z.string(), + operator: z.string(), + value: z.string() +}); + +const FilterGroup = z.object({ + $and: z.array(SubscriptionFilter).optional(), + $or: z.array(SubscriptionFilter).optional() +}); + +// Subscription schema +const Subscription = z.object({ + event_type: z.string(), + filter: z.union([FilterGroup, z.null()]) +}); + +// Webhook ID schema +const WebhookId = z.object({ + workspace_id: z.string(), + webhook_id: z.string() +}); + +// Webhook schema +const Webhook = z.object({ + target_url: z.string(), + subscriptions: z.array(Subscription), + id: WebhookId, + status: z.enum(['active', 'degraded', 'inactive']), + created_at: z.string() +}); + +// Output schema with standard pagination +const ListWebhooksOutput = z.object({ + webhooks: z.array(Webhook), + next_cursor: z.union([z.string(), z.null()]) +}); + +const action = createAction({ + description: 'Lists all webhooks configured in the Attio workspace', + version: '1.0.0', + + endpoint: { + method: 'GET', + path: '/webhooks', + group: 'Webhooks' + }, + + input: ListWebhooksInput, + output: ListWebhooksOutput, + scopes: ['webhook:read'], + + exec: async (nango, input): Promise> => { + const limit = input?.limit || 10; + const offset = input?.cursor ? parseInt(input.cursor, 10) : 0; + + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/webhooks/list-webhooks + endpoint: 'v2/webhooks', + params: { + limit: limit.toString(), + offset: offset.toString() + }, + retries: 3 + }; + + const response = await nango.get(config); + + const webhooks = response.data.data.map((webhook: any) => ({ + target_url: webhook.target_url, + subscriptions: webhook.subscriptions.map((sub: any) => ({ + event_type: sub.event_type, + filter: sub.filter ?? null + })), + id: { + workspace_id: webhook.id.workspace_id, + webhook_id: webhook.id.webhook_id + }, + status: webhook.status, + created_at: webhook.created_at + })); + + // Calculate next cursor based on offset pagination + const hasMore = webhooks.length === limit; + const nextOffset = offset + webhooks.length; + + return { + webhooks, + next_cursor: hasMore ? nextOffset.toString() : null + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/update-record.ts b/integrations/attio/actions/update-record.ts new file mode 100644 index 000000000..4df053eb8 --- /dev/null +++ b/integrations/attio/actions/update-record.ts @@ -0,0 +1,74 @@ +/** + * Instructions: Updates an existing record. + * API: https://docs.attio.com/rest-api/endpoint-reference/records/update-a-record + */ + +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +// Inline schema definitions +const UpdateRecordInput = z.object({ + object_slug: z.string().describe('The object type slug. Example: "people" or "companies"'), + record_id: z.string().describe('The record ID to update. Example: "5829dd6c-0577-40dc-a858-8bd9a0d6aa58"'), + values: z.record(z.string(), z.any()).describe('Object containing attribute values to update. Example: {"job_title": [{"value": "CTO"}]}') +}); + +const RecordId = z.object({ + workspace_id: z.string(), + object_id: z.string(), + record_id: z.string() +}); + +const UpdateRecordOutput = z.object({ + data: z.object({ + id: RecordId, + created_at: z.string(), + values: z.record(z.string(), z.any()) + }) +}); + +const action = createAction({ + description: 'Updates an existing record.', + version: '1.0.0', + + endpoint: { + method: 'PATCH', + path: '/objects/:object_slug/records/:record_id', + group: 'Records' + }, + + input: UpdateRecordInput, + output: UpdateRecordOutput, + scopes: ['record_permission:read-write'], + + exec: async (nango, input): Promise> => { + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/records/update-a-record + endpoint: `v2/objects/${input.object_slug}/records/${input.record_id}`, + data: { + data: { + values: input.values + } + }, + retries: 3 + }; + + const response = await nango.patch(config); + + return { + data: { + id: { + workspace_id: response.data.data.id.workspace_id, + object_id: response.data.data.id.object_id, + record_id: response.data.data.id.record_id + }, + created_at: response.data.data.created_at, + values: response.data.data.values + } + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/actions/update-webhook.ts b/integrations/attio/actions/update-webhook.ts new file mode 100644 index 000000000..d8467e99d --- /dev/null +++ b/integrations/attio/actions/update-webhook.ts @@ -0,0 +1,123 @@ +import { z } from 'zod'; +import { createAction } from 'nango'; +import type { ProxyConfiguration } from 'nango'; + +/** + * Updates an existing webhook configuration in Attio. + * API Docs: https://docs.attio.com/rest-api/endpoint-reference/webhooks/update-a-webhook + */ + +// Subscription filter schema for input +const SubscriptionFilterInput = z.object({ + field: z.string(), + operator: z.string(), + value: z.string() +}); + +const FilterGroupInput = z.object({ + $and: z.array(SubscriptionFilterInput).optional(), + $or: z.array(SubscriptionFilterInput).optional() +}); + +// Subscription schema for input +const SubscriptionInput = z.object({ + event_type: z.string(), + filter: z.union([FilterGroupInput, z.null()]).optional() +}); + +// Input schema +const UpdateWebhookInput = z.object({ + webhook_id: z.string(), + target_url: z.string().optional(), + subscriptions: z.array(SubscriptionInput).optional() +}); + +// Subscription filter schema for output +const SubscriptionFilter = z.object({ + field: z.string(), + operator: z.string(), + value: z.string() +}); + +const FilterGroup = z.object({ + $and: z.array(SubscriptionFilter).optional(), + $or: z.array(SubscriptionFilter).optional() +}); + +// Subscription schema for output +const Subscription = z.object({ + event_type: z.string(), + filter: z.union([FilterGroup, z.null()]) +}); + +// Webhook ID schema +const WebhookId = z.object({ + workspace_id: z.string(), + webhook_id: z.string() +}); + +// Output schema +const UpdateWebhookOutput = z.object({ + target_url: z.string(), + subscriptions: z.array(Subscription), + id: WebhookId, + status: z.enum(['active', 'degraded', 'inactive']), + created_at: z.string() +}); + +const action = createAction({ + description: 'Updates an existing webhook configuration in Attio', + version: '1.0.0', + + endpoint: { + method: 'PATCH', + path: '/webhooks/{webhook_id}', + group: 'Webhooks' + }, + + input: UpdateWebhookInput, + output: UpdateWebhookOutput, + scopes: ['webhook:read-write'], + + exec: async (nango, input): Promise> => { + const data: Record = {}; + + if (input.target_url) { + data['target_url'] = input.target_url; + } + + if (input.subscriptions) { + data['subscriptions'] = input.subscriptions.map((sub) => ({ + event_type: sub.event_type, + filter: sub.filter ?? null + })); + } + + const config: ProxyConfiguration = { + // https://docs.attio.com/rest-api/endpoint-reference/webhooks/update-a-webhook + endpoint: `v2/webhooks/${input.webhook_id}`, + data: { data }, + retries: 3 + }; + + const response = await nango.patch(config); + const webhook = response.data.data; + + return { + target_url: webhook.target_url, + subscriptions: webhook.subscriptions.map((sub: any) => ({ + event_type: sub.event_type, + filter: sub.filter ?? null + })), + id: { + workspace_id: webhook.id.workspace_id, + webhook_id: webhook.id.webhook_id + }, + status: webhook.status, + created_at: webhook.created_at + }; + } +}); + +export type NangoActionLocal = Parameters<(typeof action)['exec']>[0]; +export default action; diff --git a/integrations/attio/mocks/create-list-entry/input.json b/integrations/attio/mocks/create-list-entry/input.json new file mode 100644 index 000000000..558af5d51 --- /dev/null +++ b/integrations/attio/mocks/create-list-entry/input.json @@ -0,0 +1,4 @@ +{ + "list_id": "my-sales-list", + "record_id": "5829dd6c-0577-40dc-a858-8bd9a0d6aa58" +} \ No newline at end of file diff --git a/integrations/attio/mocks/create-list-entry/output.json b/integrations/attio/mocks/create-list-entry/output.json new file mode 100644 index 000000000..e45c8c4c6 --- /dev/null +++ b/integrations/attio/mocks/create-list-entry/output.json @@ -0,0 +1,11 @@ +{ + "data": { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "list_id": "my-sales-list", + "entry_id": "entry-123" + }, + "record_id": "5829dd6c-0577-40dc-a858-8bd9a0d6aa58", + "created_at": "2025-01-01T00:00:00.000Z" + } +} \ No newline at end of file diff --git a/integrations/attio/mocks/create-note/input.json b/integrations/attio/mocks/create-note/input.json new file mode 100644 index 000000000..1c4e5a2e5 --- /dev/null +++ b/integrations/attio/mocks/create-note/input.json @@ -0,0 +1,6 @@ +{ + "parent_object": "people", + "parent_record_id": "5829dd6c-0577-40dc-a858-8bd9a0d6aa58", + "title": "Test Note", + "content": "This is a test note." +} \ No newline at end of file diff --git a/integrations/attio/mocks/create-note/output.json b/integrations/attio/mocks/create-note/output.json new file mode 100644 index 000000000..82351985d --- /dev/null +++ b/integrations/attio/mocks/create-note/output.json @@ -0,0 +1,13 @@ +{ + "data": { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "note_id": "note-123" + }, + "title": "Test Note", + "content_plaintext": "This is a test note.", + "parent_object": "people", + "parent_record_id": "5829dd6c-0577-40dc-a858-8bd9a0d6aa58", + "created_at": "2025-01-01T00:00:00.000Z" + } +} \ No newline at end of file diff --git a/integrations/attio/mocks/create-record/input.json b/integrations/attio/mocks/create-record/input.json new file mode 100644 index 000000000..e7bc8d3e5 --- /dev/null +++ b/integrations/attio/mocks/create-record/input.json @@ -0,0 +1,7 @@ +{ + "object_slug": "people", + "values": { + "name": [{"first_name": "Test", "last_name": "User", "full_name": "Test User"}], + "email_addresses": [{"email_address": "test@example.com"}] + } +} \ No newline at end of file diff --git a/integrations/attio/mocks/create-record/output.json b/integrations/attio/mocks/create-record/output.json new file mode 100644 index 000000000..8b85077f4 --- /dev/null +++ b/integrations/attio/mocks/create-record/output.json @@ -0,0 +1,11 @@ +{ + "data": { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "12345678-1234-1234-1234-123456789012" + }, + "created_at": "2025-01-01T00:00:00.000Z", + "values": {} + } +} \ No newline at end of file diff --git a/integrations/attio/mocks/create-task/input.json b/integrations/attio/mocks/create-task/input.json new file mode 100644 index 000000000..81930ea76 --- /dev/null +++ b/integrations/attio/mocks/create-task/input.json @@ -0,0 +1,3 @@ +{ + "content": "Follow up with customer" +} \ No newline at end of file diff --git a/integrations/attio/mocks/create-task/output.json b/integrations/attio/mocks/create-task/output.json new file mode 100644 index 000000000..eb4603f1d --- /dev/null +++ b/integrations/attio/mocks/create-task/output.json @@ -0,0 +1,12 @@ +{ + "data": { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "task_id": "task-123" + }, + "content_plaintext": "Follow up with customer", + "deadline_at": null, + "is_completed": false, + "created_at": "2025-01-01T00:00:00.000Z" + } +} \ No newline at end of file diff --git a/integrations/attio/mocks/delete-list-entry/input.json b/integrations/attio/mocks/delete-list-entry/input.json new file mode 100644 index 000000000..e33068df0 --- /dev/null +++ b/integrations/attio/mocks/delete-list-entry/input.json @@ -0,0 +1,4 @@ +{ + "list_id": "my-sales-list", + "entry_id": "entry-123" +} \ No newline at end of file diff --git a/integrations/attio/mocks/delete-list-entry/output.json b/integrations/attio/mocks/delete-list-entry/output.json new file mode 100644 index 000000000..28e7be11d --- /dev/null +++ b/integrations/attio/mocks/delete-list-entry/output.json @@ -0,0 +1,3 @@ +{ + "success": true +} \ No newline at end of file diff --git a/integrations/attio/mocks/delete-note/input.json b/integrations/attio/mocks/delete-note/input.json new file mode 100644 index 000000000..a01afcd9c --- /dev/null +++ b/integrations/attio/mocks/delete-note/input.json @@ -0,0 +1,3 @@ +{ + "note_id": "note-123" +} \ No newline at end of file diff --git a/integrations/attio/mocks/delete-note/output.json b/integrations/attio/mocks/delete-note/output.json new file mode 100644 index 000000000..28e7be11d --- /dev/null +++ b/integrations/attio/mocks/delete-note/output.json @@ -0,0 +1,3 @@ +{ + "success": true +} \ No newline at end of file diff --git a/integrations/attio/mocks/delete-record/input.json b/integrations/attio/mocks/delete-record/input.json new file mode 100644 index 000000000..aebfdaf96 --- /dev/null +++ b/integrations/attio/mocks/delete-record/input.json @@ -0,0 +1,4 @@ +{ + "object_slug": "people", + "record_id": "12345678-1234-1234-1234-123456789012" +} \ No newline at end of file diff --git a/integrations/attio/mocks/delete-record/output.json b/integrations/attio/mocks/delete-record/output.json new file mode 100644 index 000000000..28e7be11d --- /dev/null +++ b/integrations/attio/mocks/delete-record/output.json @@ -0,0 +1,3 @@ +{ + "success": true +} \ No newline at end of file diff --git a/integrations/attio/mocks/get-object/input.json b/integrations/attio/mocks/get-object/input.json new file mode 100644 index 000000000..ce72ef9dc --- /dev/null +++ b/integrations/attio/mocks/get-object/input.json @@ -0,0 +1,3 @@ +{ + "object_id": "people" +} \ No newline at end of file diff --git a/integrations/attio/mocks/get-object/output.json b/integrations/attio/mocks/get-object/output.json new file mode 100644 index 000000000..7644ae94e --- /dev/null +++ b/integrations/attio/mocks/get-object/output.json @@ -0,0 +1,12 @@ +{ + "data": { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f" + }, + "api_slug": "people", + "singular_noun": "Person", + "plural_noun": "People", + "created_at": "2025-11-27T12:21:27.862000000Z" + } +} \ No newline at end of file diff --git a/integrations/attio/mocks/get-record/input.json b/integrations/attio/mocks/get-record/input.json new file mode 100644 index 000000000..8e49e0b77 --- /dev/null +++ b/integrations/attio/mocks/get-record/input.json @@ -0,0 +1,4 @@ +{ + "object_slug": "people", + "record_id": "5829dd6c-0577-40dc-a858-8bd9a0d6aa58" +} \ No newline at end of file diff --git a/integrations/attio/mocks/get-record/output.json b/integrations/attio/mocks/get-record/output.json new file mode 100644 index 000000000..e7933d740 --- /dev/null +++ b/integrations/attio/mocks/get-record/output.json @@ -0,0 +1,11 @@ +{ + "data": { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "5829dd6c-0577-40dc-a858-8bd9a0d6aa58" + }, + "created_at": "2025-11-27T14:45:32.141000000Z", + "values": {} + } +} \ No newline at end of file diff --git a/integrations/attio/mocks/list-lists/input.json b/integrations/attio/mocks/list-lists/input.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/integrations/attio/mocks/list-lists/input.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/integrations/attio/mocks/list-lists/output.json b/integrations/attio/mocks/list-lists/output.json new file mode 100644 index 000000000..3a4b0de10 --- /dev/null +++ b/integrations/attio/mocks/list-lists/output.json @@ -0,0 +1,3 @@ +{ + "data": [] +} \ No newline at end of file diff --git a/integrations/attio/mocks/list-notes/input.json b/integrations/attio/mocks/list-notes/input.json new file mode 100644 index 000000000..16f9cdcbe --- /dev/null +++ b/integrations/attio/mocks/list-notes/input.json @@ -0,0 +1,4 @@ +{ + "parent_object": "people", + "parent_record_id": "5829dd6c-0577-40dc-a858-8bd9a0d6aa58" +} \ No newline at end of file diff --git a/integrations/attio/mocks/list-notes/output.json b/integrations/attio/mocks/list-notes/output.json new file mode 100644 index 000000000..3a4b0de10 --- /dev/null +++ b/integrations/attio/mocks/list-notes/output.json @@ -0,0 +1,3 @@ +{ + "data": [] +} \ No newline at end of file diff --git a/integrations/attio/mocks/list-objects/input.json b/integrations/attio/mocks/list-objects/input.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/integrations/attio/mocks/list-objects/input.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/integrations/attio/mocks/list-objects/output.json b/integrations/attio/mocks/list-objects/output.json new file mode 100644 index 000000000..341db6368 --- /dev/null +++ b/integrations/attio/mocks/list-objects/output.json @@ -0,0 +1,34 @@ +{ + "data": [ + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "047b0f6d-0fd3-4c4b-9b7b-bc726a73aea9" + }, + "api_slug": "companies", + "singular_noun": "Company", + "plural_noun": "Companies", + "created_at": "2025-11-27T12:21:27.862000000Z" + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f" + }, + "api_slug": "people", + "singular_noun": "Person", + "plural_noun": "People", + "created_at": "2025-11-27T12:21:27.862000000Z" + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "d2be3215-3948-4c22-88b4-21688b28398d" + }, + "api_slug": "deals", + "singular_noun": "Deal", + "plural_noun": "Deals", + "created_at": "2025-11-27T12:21:27.862000000Z" + } + ] +} \ No newline at end of file diff --git a/integrations/attio/mocks/list-records/input.json b/integrations/attio/mocks/list-records/input.json new file mode 100644 index 000000000..7fdaa3bee --- /dev/null +++ b/integrations/attio/mocks/list-records/input.json @@ -0,0 +1,3 @@ +{ + "object_slug": "people" +} \ No newline at end of file diff --git a/integrations/attio/mocks/list-records/output.json b/integrations/attio/mocks/list-records/output.json new file mode 100644 index 000000000..48db04fab --- /dev/null +++ b/integrations/attio/mocks/list-records/output.json @@ -0,0 +1,1120 @@ +{ + "data": [ + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "5829dd6c-0577-40dc-a858-8bd9a0d6aa58" + }, + "created_at": "2025-11-27T14:45:32.141000000Z", + "values": { + "record_id": [ + { + "active_from": "2025-11-27T14:45:32.141000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "5829dd6c-0577-40dc-a858-8bd9a0d6aa58", + "attribute_type": "text" + } + ], + "name": [ + { + "active_from": "2025-11-27T14:45:32.141000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "first_name": "Emily", + "last_name": "Thompson", + "full_name": "Emily Thompson", + "attribute_type": "personal-name" + } + ], + "email_addresses": [ + { + "active_from": "2025-11-27T14:45:32.141000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "original_email_address": "emily.t@dataflow.ai", + "email_address": "emily.t@dataflow.ai", + "email_domain": "dataflow.ai", + "email_root_domain": "dataflow.ai", + "email_local_specifier": "emily.t", + "attribute_type": "email-address" + } + ], + "description": [], + "company": [ + { + "active_from": "2025-11-27T14:45:32.506000000Z", + "active_until": null, + "created_by_actor": { + "type": "system", + "id": null + }, + "target_object": "companies", + "target_record_id": "d0918404-f762-4723-b00e-1e6ec25e7205", + "attribute_type": "record-reference" + } + ], + "job_title": [ + { + "active_from": "2025-11-27T14:45:32.141000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "Head of Engineering", + "attribute_type": "text" + } + ], + "avatar_url": [], + "phone_numbers": [], + "primary_location": [], + "angellist": [], + "facebook": [], + "instagram": [], + "linkedin": [], + "twitter": [], + "twitter_follower_count": [], + "first_calendar_interaction": [], + "last_calendar_interaction": [], + "next_calendar_interaction": [], + "first_email_interaction": [], + "last_email_interaction": [], + "first_interaction": [], + "last_interaction": [], + "next_interaction": [], + "strongest_connection_strength_legacy": [], + "strongest_connection_strength": [], + "strongest_connection_user": [], + "associated_deals": [], + "created_at": [ + { + "active_from": "2025-11-27T14:45:32.141000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "2025-11-27T14:45:32.155000000Z", + "attribute_type": "timestamp" + } + ], + "created_by": [ + { + "active_from": "2025-11-27T14:45:32.141000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "referenced_actor_type": "app", + "referenced_actor_id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3", + "attribute_type": "actor-reference" + } + ] + } + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "5c85ee2d-081a-4561-8989-069166f1bafb" + }, + "created_at": "2025-11-27T14:46:24.409000000Z", + "values": { + "record_id": [ + { + "active_from": "2025-11-27T14:46:24.409000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "5c85ee2d-081a-4561-8989-069166f1bafb", + "attribute_type": "text" + } + ], + "name": [ + { + "active_from": "2025-11-27T14:46:24.409000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "first_name": "Amanda", + "last_name": "Foster", + "full_name": "Amanda Foster", + "attribute_type": "personal-name" + } + ], + "email_addresses": [ + { + "active_from": "2025-11-27T14:46:24.409000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "original_email_address": "a.foster@fincore.bank", + "email_address": "a.foster@fincore.bank", + "email_domain": "fincore.bank", + "email_root_domain": "fincore.bank", + "email_local_specifier": "a.foster", + "attribute_type": "email-address" + } + ], + "description": [], + "company": [ + { + "active_from": "2025-11-27T14:46:25.044000000Z", + "active_until": null, + "created_by_actor": { + "type": "system", + "id": null + }, + "target_object": "companies", + "target_record_id": "ff183d30-38a4-4eb1-9fc4-fd4eccf0b684", + "attribute_type": "record-reference" + } + ], + "job_title": [ + { + "active_from": "2025-11-27T14:46:24.409000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "CFO", + "attribute_type": "text" + } + ], + "avatar_url": [], + "phone_numbers": [], + "primary_location": [], + "angellist": [], + "facebook": [], + "instagram": [], + "linkedin": [], + "twitter": [], + "twitter_follower_count": [], + "first_calendar_interaction": [], + "last_calendar_interaction": [], + "next_calendar_interaction": [], + "first_email_interaction": [], + "last_email_interaction": [], + "first_interaction": [], + "last_interaction": [], + "next_interaction": [], + "strongest_connection_strength_legacy": [], + "strongest_connection_strength": [], + "strongest_connection_user": [], + "associated_deals": [], + "created_at": [ + { + "active_from": "2025-11-27T14:46:24.409000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "2025-11-27T14:46:24.427000000Z", + "attribute_type": "timestamp" + } + ], + "created_by": [ + { + "active_from": "2025-11-27T14:46:24.409000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "referenced_actor_type": "app", + "referenced_actor_id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3", + "attribute_type": "actor-reference" + } + ] + } + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "5dc342c2-cd1f-4736-a0cd-a83526899a12" + }, + "created_at": "2025-11-27T14:45:43.879000000Z", + "values": { + "record_id": [ + { + "active_from": "2025-11-27T14:45:43.879000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "5dc342c2-cd1f-4736-a0cd-a83526899a12", + "attribute_type": "text" + } + ], + "name": [ + { + "active_from": "2025-11-27T14:45:43.879000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "first_name": "David", + "last_name": "Kim", + "full_name": "David Kim", + "attribute_type": "personal-name" + } + ], + "email_addresses": [ + { + "active_from": "2025-11-27T14:45:43.879000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "original_email_address": "david.kim@securevault.com", + "email_address": "david.kim@securevault.com", + "email_domain": "securevault.com", + "email_root_domain": "securevault.com", + "email_local_specifier": "david.kim", + "attribute_type": "email-address" + } + ], + "description": [], + "company": [ + { + "active_from": "2025-11-27T14:45:45.145000000Z", + "active_until": null, + "created_by_actor": { + "type": "system", + "id": null + }, + "target_object": "companies", + "target_record_id": "3b2815d9-53e7-4cb0-8fbf-d11abd13d89a", + "attribute_type": "record-reference" + } + ], + "job_title": [ + { + "active_from": "2025-11-27T14:45:43.879000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "CISO", + "attribute_type": "text" + } + ], + "avatar_url": [], + "phone_numbers": [], + "primary_location": [], + "angellist": [], + "facebook": [], + "instagram": [], + "linkedin": [], + "twitter": [], + "twitter_follower_count": [], + "first_calendar_interaction": [], + "last_calendar_interaction": [], + "next_calendar_interaction": [], + "first_email_interaction": [], + "last_email_interaction": [], + "first_interaction": [], + "last_interaction": [], + "next_interaction": [], + "strongest_connection_strength_legacy": [], + "strongest_connection_strength": [], + "strongest_connection_user": [], + "associated_deals": [], + "created_at": [ + { + "active_from": "2025-11-27T14:45:43.879000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "2025-11-27T14:45:43.912000000Z", + "attribute_type": "timestamp" + } + ], + "created_by": [ + { + "active_from": "2025-11-27T14:45:43.879000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "referenced_actor_type": "app", + "referenced_actor_id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3", + "attribute_type": "actor-reference" + } + ] + } + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "70f7a640-38c1-40b3-9953-93d8f59fc310" + }, + "created_at": "2025-11-27T14:45:18.878000000Z", + "values": { + "record_id": [ + { + "active_from": "2025-11-27T14:45:18.878000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "70f7a640-38c1-40b3-9953-93d8f59fc310", + "attribute_type": "text" + } + ], + "name": [ + { + "active_from": "2025-11-27T14:45:18.878000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "first_name": "Michael", + "last_name": "Rodriguez", + "full_name": "Michael Rodriguez", + "attribute_type": "personal-name" + } + ], + "email_addresses": [ + { + "active_from": "2025-11-27T14:45:18.878000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "original_email_address": "m.rodriguez@cloudnine.co", + "email_address": "m.rodriguez@cloudnine.co", + "email_domain": "cloudnine.co", + "email_root_domain": "cloudnine.co", + "email_local_specifier": "m.rodriguez", + "attribute_type": "email-address" + } + ], + "description": [], + "company": [ + { + "active_from": "2025-11-27T14:45:19.317000000Z", + "active_until": null, + "created_by_actor": { + "type": "system", + "id": null + }, + "target_object": "companies", + "target_record_id": "4c50e22a-fdc5-4baf-8249-1c43e90cdfdd", + "attribute_type": "record-reference" + } + ], + "job_title": [ + { + "active_from": "2025-11-27T14:45:18.878000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "CTO", + "attribute_type": "text" + } + ], + "avatar_url": [], + "phone_numbers": [], + "primary_location": [], + "angellist": [], + "facebook": [], + "instagram": [], + "linkedin": [], + "twitter": [], + "twitter_follower_count": [], + "first_calendar_interaction": [], + "last_calendar_interaction": [], + "next_calendar_interaction": [], + "first_email_interaction": [], + "last_email_interaction": [], + "first_interaction": [], + "last_interaction": [], + "next_interaction": [], + "strongest_connection_strength_legacy": [], + "strongest_connection_strength": [], + "strongest_connection_user": [], + "associated_deals": [], + "created_at": [ + { + "active_from": "2025-11-27T14:45:18.878000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "2025-11-27T14:45:18.904000000Z", + "attribute_type": "timestamp" + } + ], + "created_by": [ + { + "active_from": "2025-11-27T14:45:18.878000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "referenced_actor_type": "app", + "referenced_actor_id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3", + "attribute_type": "actor-reference" + } + ] + } + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "b1317daf-a990-43b0-96cf-e4b232c3b192" + }, + "created_at": "2025-11-27T14:45:10.410000000Z", + "values": { + "record_id": [ + { + "active_from": "2025-11-27T14:45:10.410000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "b1317daf-a990-43b0-96cf-e4b232c3b192", + "attribute_type": "text" + } + ], + "name": [ + { + "active_from": "2025-11-27T14:45:10.410000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "first_name": "Sarah", + "last_name": "Chen", + "full_name": "Sarah Chen", + "attribute_type": "personal-name" + } + ], + "email_addresses": [ + { + "active_from": "2025-11-27T14:45:10.410000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "original_email_address": "sarah.chen@techstart.io", + "email_address": "sarah.chen@techstart.io", + "email_domain": "techstart.io", + "email_root_domain": "techstart.io", + "email_local_specifier": "sarah.chen", + "attribute_type": "email-address" + } + ], + "description": [], + "company": [ + { + "active_from": "2025-11-27T14:45:10.845000000Z", + "active_until": null, + "created_by_actor": { + "type": "system", + "id": null + }, + "target_object": "companies", + "target_record_id": "f373c1c3-93d8-4099-9f0b-6b25a63e6e49", + "attribute_type": "record-reference" + } + ], + "job_title": [ + { + "active_from": "2025-11-27T14:45:10.410000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "CEO", + "attribute_type": "text" + } + ], + "avatar_url": [], + "phone_numbers": [], + "primary_location": [], + "angellist": [], + "facebook": [], + "instagram": [], + "linkedin": [], + "twitter": [], + "twitter_follower_count": [], + "first_calendar_interaction": [], + "last_calendar_interaction": [], + "next_calendar_interaction": [], + "first_email_interaction": [], + "last_email_interaction": [], + "first_interaction": [], + "last_interaction": [], + "next_interaction": [], + "strongest_connection_strength_legacy": [], + "strongest_connection_strength": [], + "strongest_connection_user": [], + "associated_deals": [], + "created_at": [ + { + "active_from": "2025-11-27T14:45:10.410000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "2025-11-27T14:45:10.430000000Z", + "attribute_type": "timestamp" + } + ], + "created_by": [ + { + "active_from": "2025-11-27T14:45:10.410000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "referenced_actor_type": "app", + "referenced_actor_id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3", + "attribute_type": "actor-reference" + } + ] + } + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "b599621b-0951-4613-8afe-6df88f51675c" + }, + "created_at": "2025-11-27T14:45:54.054000000Z", + "values": { + "record_id": [ + { + "active_from": "2025-11-27T14:45:54.054000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "b599621b-0951-4613-8afe-6df88f51675c", + "attribute_type": "text" + } + ], + "name": [ + { + "active_from": "2025-11-27T14:45:54.054000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "first_name": "Lisa", + "last_name": "Patel", + "full_name": "Lisa Patel", + "attribute_type": "personal-name" + } + ], + "email_addresses": [ + { + "active_from": "2025-11-27T14:45:54.054000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "original_email_address": "lisa@greenleaf.energy", + "email_address": "lisa@greenleaf.energy", + "email_domain": "greenleaf.energy", + "email_root_domain": "greenleaf.energy", + "email_local_specifier": "lisa", + "attribute_type": "email-address" + } + ], + "description": [], + "company": [ + { + "active_from": "2025-11-27T14:45:54.940000000Z", + "active_until": null, + "created_by_actor": { + "type": "system", + "id": null + }, + "target_object": "companies", + "target_record_id": "4ae467ca-ca1e-439a-8315-54c38fe2d81e", + "attribute_type": "record-reference" + } + ], + "job_title": [ + { + "active_from": "2025-11-27T14:45:54.054000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "VP Operations", + "attribute_type": "text" + } + ], + "avatar_url": [], + "phone_numbers": [], + "primary_location": [], + "angellist": [], + "facebook": [], + "instagram": [], + "linkedin": [], + "twitter": [], + "twitter_follower_count": [], + "first_calendar_interaction": [], + "last_calendar_interaction": [], + "next_calendar_interaction": [], + "first_email_interaction": [], + "last_email_interaction": [], + "first_interaction": [], + "last_interaction": [], + "next_interaction": [], + "strongest_connection_strength_legacy": [], + "strongest_connection_strength": [], + "strongest_connection_user": [], + "associated_deals": [], + "created_at": [ + { + "active_from": "2025-11-27T14:45:54.054000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "2025-11-27T14:45:54.068000000Z", + "attribute_type": "timestamp" + } + ], + "created_by": [ + { + "active_from": "2025-11-27T14:45:54.054000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "referenced_actor_type": "app", + "referenced_actor_id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3", + "attribute_type": "actor-reference" + } + ] + } + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "cad2c312-2a70-4dac-95d8-6744d3f991b6" + }, + "created_at": "2025-11-27T14:46:34.367000000Z", + "values": { + "record_id": [ + { + "active_from": "2025-11-27T14:46:34.367000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "cad2c312-2a70-4dac-95d8-6744d3f991b6", + "attribute_type": "text" + } + ], + "name": [ + { + "active_from": "2025-11-27T14:46:34.367000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "first_name": "Robert", + "last_name": "Martinez", + "full_name": "Robert Martinez", + "attribute_type": "personal-name" + } + ], + "email_addresses": [ + { + "active_from": "2025-11-27T14:46:34.367000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "original_email_address": "robert@logitrack.com", + "email_address": "robert@logitrack.com", + "email_domain": "logitrack.com", + "email_root_domain": "logitrack.com", + "email_local_specifier": "robert", + "attribute_type": "email-address" + } + ], + "description": [], + "company": [ + { + "active_from": "2025-11-27T14:46:34.642000000Z", + "active_until": null, + "created_by_actor": { + "type": "system", + "id": null + }, + "target_object": "companies", + "target_record_id": "a4ec1676-e637-41db-9e59-caddc405c7db", + "attribute_type": "record-reference" + } + ], + "job_title": [ + { + "active_from": "2025-11-27T14:46:34.367000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "COO", + "attribute_type": "text" + } + ], + "avatar_url": [], + "phone_numbers": [], + "primary_location": [], + "angellist": [], + "facebook": [], + "instagram": [], + "linkedin": [], + "twitter": [], + "twitter_follower_count": [], + "first_calendar_interaction": [], + "last_calendar_interaction": [], + "next_calendar_interaction": [], + "first_email_interaction": [], + "last_email_interaction": [], + "first_interaction": [], + "last_interaction": [], + "next_interaction": [], + "strongest_connection_strength_legacy": [], + "strongest_connection_strength": [], + "strongest_connection_user": [], + "associated_deals": [], + "created_at": [ + { + "active_from": "2025-11-27T14:46:34.367000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "2025-11-27T14:46:34.377000000Z", + "attribute_type": "timestamp" + } + ], + "created_by": [ + { + "active_from": "2025-11-27T14:46:34.367000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "referenced_actor_type": "app", + "referenced_actor_id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3", + "attribute_type": "actor-reference" + } + ] + } + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "d9ce1f13-9acf-4c88-a747-64f27c33072d" + }, + "created_at": "2025-11-27T14:46:14.955000000Z", + "values": { + "record_id": [ + { + "active_from": "2025-11-27T14:46:14.955000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "d9ce1f13-9acf-4c88-a747-64f27c33072d", + "attribute_type": "text" + } + ], + "name": [ + { + "active_from": "2025-11-27T14:46:14.955000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "first_name": "James", + "last_name": "Wilson", + "full_name": "James Wilson", + "attribute_type": "personal-name" + } + ], + "email_addresses": [ + { + "active_from": "2025-11-27T14:46:14.955000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "original_email_address": "james.w@healthbridge.med", + "email_address": "james.w@healthbridge.med", + "email_domain": "healthbridge.med", + "email_root_domain": "healthbridge.med", + "email_local_specifier": "james.w", + "attribute_type": "email-address" + } + ], + "description": [], + "company": [ + { + "active_from": "2025-11-27T14:46:15.639000000Z", + "active_until": null, + "created_by_actor": { + "type": "system", + "id": null + }, + "target_object": "companies", + "target_record_id": "f94657fc-c887-455d-9598-35024f2e4347", + "attribute_type": "record-reference" + } + ], + "job_title": [ + { + "active_from": "2025-11-27T14:46:14.955000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "CMO", + "attribute_type": "text" + } + ], + "avatar_url": [], + "phone_numbers": [], + "primary_location": [], + "angellist": [], + "facebook": [], + "instagram": [], + "linkedin": [], + "twitter": [], + "twitter_follower_count": [], + "first_calendar_interaction": [], + "last_calendar_interaction": [], + "next_calendar_interaction": [], + "first_email_interaction": [], + "last_email_interaction": [], + "first_interaction": [], + "last_interaction": [], + "next_interaction": [], + "strongest_connection_strength_legacy": [], + "strongest_connection_strength": [], + "strongest_connection_user": [], + "associated_deals": [], + "created_at": [ + { + "active_from": "2025-11-27T14:46:14.955000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "2025-11-27T14:46:14.977000000Z", + "attribute_type": "timestamp" + } + ], + "created_by": [ + { + "active_from": "2025-11-27T14:46:14.955000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "referenced_actor_type": "app", + "referenced_actor_id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3", + "attribute_type": "actor-reference" + } + ] + } + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "e9002be5-e744-4f91-81c8-29485789c1e4" + }, + "created_at": "2025-11-27T14:42:13.535000000Z", + "values": { + "record_id": [ + { + "active_from": "2025-11-27T14:42:13.535000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "e9002be5-e744-4f91-81c8-29485789c1e4", + "attribute_type": "text" + } + ], + "name": [ + { + "active_from": "2025-11-27T14:42:13.535000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "first_name": "John", + "last_name": "Doe", + "full_name": "John Doe", + "attribute_type": "personal-name" + } + ], + "email_addresses": [ + { + "active_from": "2025-11-27T14:42:13.535000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "original_email_address": "john.doe@acme.com", + "email_address": "john.doe@acme.com", + "email_domain": "acme.com", + "email_root_domain": "acme.com", + "email_local_specifier": "john.doe", + "attribute_type": "email-address" + } + ], + "description": [], + "company": [ + { + "active_from": "2025-11-27T14:42:13.848000000Z", + "active_until": null, + "created_by_actor": { + "type": "system", + "id": null + }, + "target_object": "companies", + "target_record_id": "f9de702f-923c-44ef-baba-30ad7a87408b", + "attribute_type": "record-reference" + } + ], + "job_title": [ + { + "active_from": "2025-11-27T14:42:13.535000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "CEO", + "attribute_type": "text" + } + ], + "avatar_url": [], + "phone_numbers": [], + "primary_location": [], + "angellist": [], + "facebook": [], + "instagram": [], + "linkedin": [], + "twitter": [], + "twitter_follower_count": [], + "first_calendar_interaction": [], + "last_calendar_interaction": [], + "next_calendar_interaction": [], + "first_email_interaction": [], + "last_email_interaction": [], + "first_interaction": [], + "last_interaction": [], + "next_interaction": [], + "strongest_connection_strength_legacy": [], + "strongest_connection_strength": [], + "strongest_connection_user": [], + "associated_deals": [], + "created_at": [ + { + "active_from": "2025-11-27T14:42:13.535000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "2025-11-27T14:42:13.549000000Z", + "attribute_type": "timestamp" + } + ], + "created_by": [ + { + "active_from": "2025-11-27T14:42:13.535000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "referenced_actor_type": "app", + "referenced_actor_id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3", + "attribute_type": "actor-reference" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/integrations/attio/mocks/list-tasks/input.json b/integrations/attio/mocks/list-tasks/input.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/integrations/attio/mocks/list-tasks/input.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/integrations/attio/mocks/list-tasks/output.json b/integrations/attio/mocks/list-tasks/output.json new file mode 100644 index 000000000..3a4b0de10 --- /dev/null +++ b/integrations/attio/mocks/list-tasks/output.json @@ -0,0 +1,3 @@ +{ + "data": [] +} \ No newline at end of file diff --git a/integrations/attio/mocks/meta.json b/integrations/attio/mocks/meta.json new file mode 100644 index 000000000..c738d86e4 --- /dev/null +++ b/integrations/attio/mocks/meta.json @@ -0,0 +1,3 @@ +{ + "connection_id": "mobile" +} \ No newline at end of file diff --git a/integrations/attio/mocks/nango/get/proxy/v2/objects/list-objects.json b/integrations/attio/mocks/nango/get/proxy/v2/objects/list-objects.json new file mode 100644 index 000000000..a74577afb --- /dev/null +++ b/integrations/attio/mocks/nango/get/proxy/v2/objects/list-objects.json @@ -0,0 +1,34 @@ +{ + "data": [ + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "047b0f6d-0fd3-4c4b-9b7b-bc726a73aea9" + }, + "api_slug": "companies", + "singular_noun": "Company", + "plural_noun": "Companies", + "created_at": "2025-11-27T12:21:27.862000000Z" + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f" + }, + "api_slug": "people", + "singular_noun": "Person", + "plural_noun": "People", + "created_at": "2025-11-27T12:21:27.862000000Z" + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "d2be3215-3948-4c22-88b4-21688b28398d" + }, + "api_slug": "deals", + "singular_noun": "Deal", + "plural_noun": "Deals", + "created_at": "2025-11-27T12:21:27.862000000Z" + } + ] +} diff --git a/integrations/attio/mocks/nango/get/proxy/v2/objects/list-objects/038fd4b33cc4ecc65ec86cf92905885772a799bf.json b/integrations/attio/mocks/nango/get/proxy/v2/objects/list-objects/038fd4b33cc4ecc65ec86cf92905885772a799bf.json new file mode 100644 index 000000000..df118142d --- /dev/null +++ b/integrations/attio/mocks/nango/get/proxy/v2/objects/list-objects/038fd4b33cc4ecc65ec86cf92905885772a799bf.json @@ -0,0 +1,71 @@ +{ + "method": "get", + "endpoint": "v2/objects", + "requestIdentityHash": "038fd4b33cc4ecc65ec86cf92905885772a799bf", + "requestIdentity": { + "method": "get", + "endpoint": "v2/objects", + "params": [], + "headers": [] + }, + "response": { + "data": [ + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "047b0f6d-0fd3-4c4b-9b7b-bc726a73aea9" + }, + "api_slug": "companies", + "singular_noun": "Company", + "plural_noun": "Companies", + "created_at": "2025-11-27T12:21:27.862000000Z" + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f" + }, + "api_slug": "people", + "singular_noun": "Person", + "plural_noun": "People", + "created_at": "2025-11-27T12:21:27.862000000Z" + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "d2be3215-3948-4c22-88b4-21688b28398d" + }, + "api_slug": "deals", + "singular_noun": "Deal", + "plural_noun": "Deals", + "created_at": "2025-11-27T12:21:27.862000000Z" + } + ] + }, + "status": 200, + "headers": { + "date": "Mon, 01 Dec 2025 14:18:56 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "x-xss-protection": "0", + "x-content-type-options": "nosniff", + "x-download-options": "noopen", + "x-frame-options": "DENY", + "x-dns-prefetch-control": "off", + "strict-transport-security": "max-age=7776000; includeSubDomains; preload", + "content-security-policy-report-only": "default-src 'self' https://app.nango.dev https://api.nango.dev https://connect.nango.dev;child-src 'self';connect-src 'self' https://*.google-analytics.com https://*.sentry.io https://app.nango.dev https://api.nango.dev wss://api.nango.dev/ https://connect.nango.dev https://*.posthog.com https://*.stripe.com https://api.apidownwatch.com;font-src 'self' https://*.googleapis.com https://*.gstatic.com;frame-src 'self' https://accounts.google.com https://app.nango.dev https://api.nango.dev https://connect.nango.dev https://www.youtube.com https://*.stripe.com;img-src 'self' data: https://app.nango.dev https://api.nango.dev https://*.google-analytics.com https://*.googleapis.com https://*.posthog.com https://img.logo.dev https://*.ytimg.com;manifest-src 'self';media-src 'self';object-src 'self';script-src 'self' 'unsafe-eval' 'unsafe-inline' https://app.nango.dev https://api.nango.dev https://*.stripe.com https://*.google-analytics.com https://*.googleapis.com https://apis.google.com https://*.posthog.com https://www.youtube.com https://api.apidownwatch.com;style-src blob: 'self' 'unsafe-inline' https://*.googleapis.com https://app.nango.dev https://api.nango.dev;worker-src blob: 'self' https://app.nango.dev https://api.nango.dev https://*.googleapis.com https://*.posthog.com;base-uri 'self';form-action 'self';frame-ancestors 'self';script-src-attr 'none';upgrade-insecure-requests", + "access-control-allow-origin": "*", + "access-control-expose-headers": "x-attio-client,x-attio-execution-id,x-attio-platform,x-attio-platform-version,x-attio-record-query-score,x-attio-app-installation-bundle-id", + "x-ratelimit-limit": "1000", + "x-ratelimit-remaining": "994", + "x-ratelimit-reset": "1764598782", + "x-attio-execution-id": "8e9ad979-ad63-4b83-ae9e-b7dec7475946", + "vary": "Origin", + "x-accurate-at": "2025-12-01T14:18:55.893797000Z", + "via": "1.1 google", + "cf-cache-status": "DYNAMIC", + "server": "cloudflare", + "cf-ray": "9a733772596088dc-PDX" + } +} \ No newline at end of file diff --git a/integrations/attio/mocks/nango/get/proxy/v2/objects/people/get-object/a301de507248730c7a5b724abe16ef629d890e96.json b/integrations/attio/mocks/nango/get/proxy/v2/objects/people/get-object/a301de507248730c7a5b724abe16ef629d890e96.json new file mode 100644 index 000000000..04233b922 --- /dev/null +++ b/integrations/attio/mocks/nango/get/proxy/v2/objects/people/get-object/a301de507248730c7a5b724abe16ef629d890e96.json @@ -0,0 +1,49 @@ +{ + "method": "get", + "endpoint": "v2/objects/people", + "requestIdentityHash": "a301de507248730c7a5b724abe16ef629d890e96", + "requestIdentity": { + "method": "get", + "endpoint": "v2/objects/people", + "params": [], + "headers": [] + }, + "response": { + "data": { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f" + }, + "api_slug": "people", + "singular_noun": "Person", + "plural_noun": "People", + "created_at": "2025-11-27T12:21:27.862000000Z" + } + }, + "status": 200, + "headers": { + "date": "Mon, 01 Dec 2025 14:20:58 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "x-xss-protection": "0", + "x-content-type-options": "nosniff", + "x-download-options": "noopen", + "x-frame-options": "DENY", + "x-dns-prefetch-control": "off", + "strict-transport-security": "max-age=7776000; includeSubDomains; preload", + "content-security-policy-report-only": "default-src 'self' https://app.nango.dev https://api.nango.dev https://connect.nango.dev;child-src 'self';connect-src 'self' https://*.google-analytics.com https://*.sentry.io https://app.nango.dev https://api.nango.dev wss://api.nango.dev/ https://connect.nango.dev https://*.posthog.com https://*.stripe.com https://api.apidownwatch.com;font-src 'self' https://*.googleapis.com https://*.gstatic.com;frame-src 'self' https://accounts.google.com https://app.nango.dev https://api.nango.dev https://connect.nango.dev https://www.youtube.com https://*.stripe.com;img-src 'self' data: https://app.nango.dev https://api.nango.dev https://*.google-analytics.com https://*.googleapis.com https://*.posthog.com https://img.logo.dev https://*.ytimg.com;manifest-src 'self';media-src 'self';object-src 'self';script-src 'self' 'unsafe-eval' 'unsafe-inline' https://app.nango.dev https://api.nango.dev https://*.stripe.com https://*.google-analytics.com https://*.googleapis.com https://apis.google.com https://*.posthog.com https://www.youtube.com https://api.apidownwatch.com;style-src blob: 'self' 'unsafe-inline' https://*.googleapis.com https://app.nango.dev https://api.nango.dev;worker-src blob: 'self' https://app.nango.dev https://api.nango.dev https://*.googleapis.com https://*.posthog.com;base-uri 'self';form-action 'self';frame-ancestors 'self';script-src-attr 'none';upgrade-insecure-requests", + "access-control-allow-origin": "*", + "access-control-expose-headers": "x-attio-client,x-attio-execution-id,x-attio-platform,x-attio-platform-version,x-attio-record-query-score,x-attio-app-installation-bundle-id", + "x-ratelimit-limit": "1000", + "x-ratelimit-remaining": "994", + "x-ratelimit-reset": "1764598901", + "x-attio-execution-id": "e8e9971b-abea-4c0b-862c-accc9c113111", + "vary": "Origin", + "x-accurate-at": "2025-12-01T14:20:58.433832000Z", + "via": "1.1 google", + "cf-cache-status": "DYNAMIC", + "server": "cloudflare", + "cf-ray": "9a733a6fe9955939-PDX" + } +} \ No newline at end of file diff --git a/integrations/attio/mocks/nango/post/proxy/v2/objects/people/records/query/list-records/2bd179605d33db6a2efa97c58dbe81a417e0140e.json b/integrations/attio/mocks/nango/post/proxy/v2/objects/people/records/query/list-records/2bd179605d33db6a2efa97c58dbe81a417e0140e.json new file mode 100644 index 000000000..409ee638e --- /dev/null +++ b/integrations/attio/mocks/nango/post/proxy/v2/objects/people/records/query/list-records/2bd179605d33db6a2efa97c58dbe81a417e0140e.json @@ -0,0 +1,1168 @@ +{ + "method": "post", + "endpoint": "v2/objects/people/records/query", + "requestIdentityHash": "2bd179605d33db6a2efa97c58dbe81a417e0140e", + "requestIdentity": { + "method": "post", + "endpoint": "v2/objects/people/records/query", + "params": [], + "headers": [], + "data": "{}" + }, + "response": { + "data": [ + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "5829dd6c-0577-40dc-a858-8bd9a0d6aa58" + }, + "created_at": "2025-11-27T14:45:32.141000000Z", + "web_url": "https://app.attio.com/nango-mobile/person/5829dd6c-0577-40dc-a858-8bd9a0d6aa58", + "values": { + "record_id": [ + { + "active_from": "2025-11-27T14:45:32.141000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "5829dd6c-0577-40dc-a858-8bd9a0d6aa58", + "attribute_type": "text" + } + ], + "name": [ + { + "active_from": "2025-11-27T14:45:32.141000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "first_name": "Emily", + "last_name": "Thompson", + "full_name": "Emily Thompson", + "attribute_type": "personal-name" + } + ], + "email_addresses": [ + { + "active_from": "2025-11-27T14:45:32.141000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "original_email_address": "emily.t@dataflow.ai", + "email_address": "emily.t@dataflow.ai", + "email_domain": "dataflow.ai", + "email_root_domain": "dataflow.ai", + "email_local_specifier": "emily.t", + "attribute_type": "email-address" + } + ], + "description": [], + "company": [ + { + "active_from": "2025-11-27T14:45:32.506000000Z", + "active_until": null, + "created_by_actor": { + "type": "system", + "id": null + }, + "target_object": "companies", + "target_record_id": "d0918404-f762-4723-b00e-1e6ec25e7205", + "attribute_type": "record-reference" + } + ], + "job_title": [ + { + "active_from": "2025-11-27T14:45:32.141000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "Head of Engineering", + "attribute_type": "text" + } + ], + "avatar_url": [], + "phone_numbers": [], + "primary_location": [], + "angellist": [], + "facebook": [], + "instagram": [], + "linkedin": [], + "twitter": [], + "twitter_follower_count": [], + "first_calendar_interaction": [], + "last_calendar_interaction": [], + "next_calendar_interaction": [], + "first_email_interaction": [], + "last_email_interaction": [], + "first_interaction": [], + "last_interaction": [], + "next_interaction": [], + "strongest_connection_strength_legacy": [], + "strongest_connection_strength": [], + "strongest_connection_user": [], + "associated_deals": [], + "created_at": [ + { + "active_from": "2025-11-27T14:45:32.141000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "2025-11-27T14:45:32.155000000Z", + "attribute_type": "timestamp" + } + ], + "created_by": [ + { + "active_from": "2025-11-27T14:45:32.141000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "referenced_actor_type": "app", + "referenced_actor_id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3", + "attribute_type": "actor-reference" + } + ] + } + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "5c85ee2d-081a-4561-8989-069166f1bafb" + }, + "created_at": "2025-11-27T14:46:24.409000000Z", + "web_url": "https://app.attio.com/nango-mobile/person/5c85ee2d-081a-4561-8989-069166f1bafb", + "values": { + "record_id": [ + { + "active_from": "2025-11-27T14:46:24.409000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "5c85ee2d-081a-4561-8989-069166f1bafb", + "attribute_type": "text" + } + ], + "name": [ + { + "active_from": "2025-11-27T14:46:24.409000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "first_name": "Amanda", + "last_name": "Foster", + "full_name": "Amanda Foster", + "attribute_type": "personal-name" + } + ], + "email_addresses": [ + { + "active_from": "2025-11-27T14:46:24.409000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "original_email_address": "a.foster@fincore.bank", + "email_address": "a.foster@fincore.bank", + "email_domain": "fincore.bank", + "email_root_domain": "fincore.bank", + "email_local_specifier": "a.foster", + "attribute_type": "email-address" + } + ], + "description": [], + "company": [ + { + "active_from": "2025-11-27T14:46:25.044000000Z", + "active_until": null, + "created_by_actor": { + "type": "system", + "id": null + }, + "target_object": "companies", + "target_record_id": "ff183d30-38a4-4eb1-9fc4-fd4eccf0b684", + "attribute_type": "record-reference" + } + ], + "job_title": [ + { + "active_from": "2025-11-27T14:46:24.409000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "CFO", + "attribute_type": "text" + } + ], + "avatar_url": [], + "phone_numbers": [], + "primary_location": [], + "angellist": [], + "facebook": [], + "instagram": [], + "linkedin": [], + "twitter": [], + "twitter_follower_count": [], + "first_calendar_interaction": [], + "last_calendar_interaction": [], + "next_calendar_interaction": [], + "first_email_interaction": [], + "last_email_interaction": [], + "first_interaction": [], + "last_interaction": [], + "next_interaction": [], + "strongest_connection_strength_legacy": [], + "strongest_connection_strength": [], + "strongest_connection_user": [], + "associated_deals": [], + "created_at": [ + { + "active_from": "2025-11-27T14:46:24.409000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "2025-11-27T14:46:24.427000000Z", + "attribute_type": "timestamp" + } + ], + "created_by": [ + { + "active_from": "2025-11-27T14:46:24.409000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "referenced_actor_type": "app", + "referenced_actor_id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3", + "attribute_type": "actor-reference" + } + ] + } + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "5dc342c2-cd1f-4736-a0cd-a83526899a12" + }, + "created_at": "2025-11-27T14:45:43.879000000Z", + "web_url": "https://app.attio.com/nango-mobile/person/5dc342c2-cd1f-4736-a0cd-a83526899a12", + "values": { + "record_id": [ + { + "active_from": "2025-11-27T14:45:43.879000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "5dc342c2-cd1f-4736-a0cd-a83526899a12", + "attribute_type": "text" + } + ], + "name": [ + { + "active_from": "2025-11-27T14:45:43.879000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "first_name": "David", + "last_name": "Kim", + "full_name": "David Kim", + "attribute_type": "personal-name" + } + ], + "email_addresses": [ + { + "active_from": "2025-11-27T14:45:43.879000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "original_email_address": "david.kim@securevault.com", + "email_address": "david.kim@securevault.com", + "email_domain": "securevault.com", + "email_root_domain": "securevault.com", + "email_local_specifier": "david.kim", + "attribute_type": "email-address" + } + ], + "description": [], + "company": [ + { + "active_from": "2025-11-27T14:45:45.145000000Z", + "active_until": null, + "created_by_actor": { + "type": "system", + "id": null + }, + "target_object": "companies", + "target_record_id": "3b2815d9-53e7-4cb0-8fbf-d11abd13d89a", + "attribute_type": "record-reference" + } + ], + "job_title": [ + { + "active_from": "2025-11-27T14:45:43.879000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "CISO", + "attribute_type": "text" + } + ], + "avatar_url": [], + "phone_numbers": [], + "primary_location": [], + "angellist": [], + "facebook": [], + "instagram": [], + "linkedin": [], + "twitter": [], + "twitter_follower_count": [], + "first_calendar_interaction": [], + "last_calendar_interaction": [], + "next_calendar_interaction": [], + "first_email_interaction": [], + "last_email_interaction": [], + "first_interaction": [], + "last_interaction": [], + "next_interaction": [], + "strongest_connection_strength_legacy": [], + "strongest_connection_strength": [], + "strongest_connection_user": [], + "associated_deals": [], + "created_at": [ + { + "active_from": "2025-11-27T14:45:43.879000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "2025-11-27T14:45:43.912000000Z", + "attribute_type": "timestamp" + } + ], + "created_by": [ + { + "active_from": "2025-11-27T14:45:43.879000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "referenced_actor_type": "app", + "referenced_actor_id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3", + "attribute_type": "actor-reference" + } + ] + } + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "70f7a640-38c1-40b3-9953-93d8f59fc310" + }, + "created_at": "2025-11-27T14:45:18.878000000Z", + "web_url": "https://app.attio.com/nango-mobile/person/70f7a640-38c1-40b3-9953-93d8f59fc310", + "values": { + "record_id": [ + { + "active_from": "2025-11-27T14:45:18.878000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "70f7a640-38c1-40b3-9953-93d8f59fc310", + "attribute_type": "text" + } + ], + "name": [ + { + "active_from": "2025-11-27T14:45:18.878000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "first_name": "Michael", + "last_name": "Rodriguez", + "full_name": "Michael Rodriguez", + "attribute_type": "personal-name" + } + ], + "email_addresses": [ + { + "active_from": "2025-11-27T14:45:18.878000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "original_email_address": "m.rodriguez@cloudnine.co", + "email_address": "m.rodriguez@cloudnine.co", + "email_domain": "cloudnine.co", + "email_root_domain": "cloudnine.co", + "email_local_specifier": "m.rodriguez", + "attribute_type": "email-address" + } + ], + "description": [], + "company": [ + { + "active_from": "2025-11-27T14:45:19.317000000Z", + "active_until": null, + "created_by_actor": { + "type": "system", + "id": null + }, + "target_object": "companies", + "target_record_id": "4c50e22a-fdc5-4baf-8249-1c43e90cdfdd", + "attribute_type": "record-reference" + } + ], + "job_title": [ + { + "active_from": "2025-11-27T14:45:18.878000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "CTO", + "attribute_type": "text" + } + ], + "avatar_url": [], + "phone_numbers": [], + "primary_location": [], + "angellist": [], + "facebook": [], + "instagram": [], + "linkedin": [], + "twitter": [], + "twitter_follower_count": [], + "first_calendar_interaction": [], + "last_calendar_interaction": [], + "next_calendar_interaction": [], + "first_email_interaction": [], + "last_email_interaction": [], + "first_interaction": [], + "last_interaction": [], + "next_interaction": [], + "strongest_connection_strength_legacy": [], + "strongest_connection_strength": [], + "strongest_connection_user": [], + "associated_deals": [], + "created_at": [ + { + "active_from": "2025-11-27T14:45:18.878000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "2025-11-27T14:45:18.904000000Z", + "attribute_type": "timestamp" + } + ], + "created_by": [ + { + "active_from": "2025-11-27T14:45:18.878000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "referenced_actor_type": "app", + "referenced_actor_id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3", + "attribute_type": "actor-reference" + } + ] + } + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "b1317daf-a990-43b0-96cf-e4b232c3b192" + }, + "created_at": "2025-11-27T14:45:10.410000000Z", + "web_url": "https://app.attio.com/nango-mobile/person/b1317daf-a990-43b0-96cf-e4b232c3b192", + "values": { + "record_id": [ + { + "active_from": "2025-11-27T14:45:10.410000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "b1317daf-a990-43b0-96cf-e4b232c3b192", + "attribute_type": "text" + } + ], + "name": [ + { + "active_from": "2025-11-27T14:45:10.410000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "first_name": "Sarah", + "last_name": "Chen", + "full_name": "Sarah Chen", + "attribute_type": "personal-name" + } + ], + "email_addresses": [ + { + "active_from": "2025-11-27T14:45:10.410000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "original_email_address": "sarah.chen@techstart.io", + "email_address": "sarah.chen@techstart.io", + "email_domain": "techstart.io", + "email_root_domain": "techstart.io", + "email_local_specifier": "sarah.chen", + "attribute_type": "email-address" + } + ], + "description": [], + "company": [ + { + "active_from": "2025-11-27T14:45:10.845000000Z", + "active_until": null, + "created_by_actor": { + "type": "system", + "id": null + }, + "target_object": "companies", + "target_record_id": "f373c1c3-93d8-4099-9f0b-6b25a63e6e49", + "attribute_type": "record-reference" + } + ], + "job_title": [ + { + "active_from": "2025-11-27T14:45:10.410000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "CEO", + "attribute_type": "text" + } + ], + "avatar_url": [], + "phone_numbers": [], + "primary_location": [], + "angellist": [], + "facebook": [], + "instagram": [], + "linkedin": [], + "twitter": [], + "twitter_follower_count": [], + "first_calendar_interaction": [], + "last_calendar_interaction": [], + "next_calendar_interaction": [], + "first_email_interaction": [], + "last_email_interaction": [], + "first_interaction": [], + "last_interaction": [], + "next_interaction": [], + "strongest_connection_strength_legacy": [], + "strongest_connection_strength": [], + "strongest_connection_user": [], + "associated_deals": [], + "created_at": [ + { + "active_from": "2025-11-27T14:45:10.410000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "2025-11-27T14:45:10.430000000Z", + "attribute_type": "timestamp" + } + ], + "created_by": [ + { + "active_from": "2025-11-27T14:45:10.410000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "referenced_actor_type": "app", + "referenced_actor_id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3", + "attribute_type": "actor-reference" + } + ] + } + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "b599621b-0951-4613-8afe-6df88f51675c" + }, + "created_at": "2025-11-27T14:45:54.054000000Z", + "web_url": "https://app.attio.com/nango-mobile/person/b599621b-0951-4613-8afe-6df88f51675c", + "values": { + "record_id": [ + { + "active_from": "2025-11-27T14:45:54.054000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "b599621b-0951-4613-8afe-6df88f51675c", + "attribute_type": "text" + } + ], + "name": [ + { + "active_from": "2025-11-27T14:45:54.054000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "first_name": "Lisa", + "last_name": "Patel", + "full_name": "Lisa Patel", + "attribute_type": "personal-name" + } + ], + "email_addresses": [ + { + "active_from": "2025-11-27T14:45:54.054000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "original_email_address": "lisa@greenleaf.energy", + "email_address": "lisa@greenleaf.energy", + "email_domain": "greenleaf.energy", + "email_root_domain": "greenleaf.energy", + "email_local_specifier": "lisa", + "attribute_type": "email-address" + } + ], + "description": [], + "company": [ + { + "active_from": "2025-11-27T14:45:54.940000000Z", + "active_until": null, + "created_by_actor": { + "type": "system", + "id": null + }, + "target_object": "companies", + "target_record_id": "4ae467ca-ca1e-439a-8315-54c38fe2d81e", + "attribute_type": "record-reference" + } + ], + "job_title": [ + { + "active_from": "2025-11-27T14:45:54.054000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "VP Operations", + "attribute_type": "text" + } + ], + "avatar_url": [], + "phone_numbers": [], + "primary_location": [], + "angellist": [], + "facebook": [], + "instagram": [], + "linkedin": [], + "twitter": [], + "twitter_follower_count": [], + "first_calendar_interaction": [], + "last_calendar_interaction": [], + "next_calendar_interaction": [], + "first_email_interaction": [], + "last_email_interaction": [], + "first_interaction": [], + "last_interaction": [], + "next_interaction": [], + "strongest_connection_strength_legacy": [], + "strongest_connection_strength": [], + "strongest_connection_user": [], + "associated_deals": [], + "created_at": [ + { + "active_from": "2025-11-27T14:45:54.054000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "2025-11-27T14:45:54.068000000Z", + "attribute_type": "timestamp" + } + ], + "created_by": [ + { + "active_from": "2025-11-27T14:45:54.054000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "referenced_actor_type": "app", + "referenced_actor_id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3", + "attribute_type": "actor-reference" + } + ] + } + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "cad2c312-2a70-4dac-95d8-6744d3f991b6" + }, + "created_at": "2025-11-27T14:46:34.367000000Z", + "web_url": "https://app.attio.com/nango-mobile/person/cad2c312-2a70-4dac-95d8-6744d3f991b6", + "values": { + "record_id": [ + { + "active_from": "2025-11-27T14:46:34.367000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "cad2c312-2a70-4dac-95d8-6744d3f991b6", + "attribute_type": "text" + } + ], + "name": [ + { + "active_from": "2025-11-27T14:46:34.367000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "first_name": "Robert", + "last_name": "Martinez", + "full_name": "Robert Martinez", + "attribute_type": "personal-name" + } + ], + "email_addresses": [ + { + "active_from": "2025-11-27T14:46:34.367000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "original_email_address": "robert@logitrack.com", + "email_address": "robert@logitrack.com", + "email_domain": "logitrack.com", + "email_root_domain": "logitrack.com", + "email_local_specifier": "robert", + "attribute_type": "email-address" + } + ], + "description": [], + "company": [ + { + "active_from": "2025-11-27T14:46:34.642000000Z", + "active_until": null, + "created_by_actor": { + "type": "system", + "id": null + }, + "target_object": "companies", + "target_record_id": "a4ec1676-e637-41db-9e59-caddc405c7db", + "attribute_type": "record-reference" + } + ], + "job_title": [ + { + "active_from": "2025-11-27T14:46:34.367000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "COO", + "attribute_type": "text" + } + ], + "avatar_url": [], + "phone_numbers": [], + "primary_location": [], + "angellist": [], + "facebook": [], + "instagram": [], + "linkedin": [], + "twitter": [], + "twitter_follower_count": [], + "first_calendar_interaction": [], + "last_calendar_interaction": [], + "next_calendar_interaction": [], + "first_email_interaction": [], + "last_email_interaction": [], + "first_interaction": [], + "last_interaction": [], + "next_interaction": [], + "strongest_connection_strength_legacy": [], + "strongest_connection_strength": [], + "strongest_connection_user": [], + "associated_deals": [], + "created_at": [ + { + "active_from": "2025-11-27T14:46:34.367000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "2025-11-27T14:46:34.377000000Z", + "attribute_type": "timestamp" + } + ], + "created_by": [ + { + "active_from": "2025-11-27T14:46:34.367000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "referenced_actor_type": "app", + "referenced_actor_id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3", + "attribute_type": "actor-reference" + } + ] + } + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "d9ce1f13-9acf-4c88-a747-64f27c33072d" + }, + "created_at": "2025-11-27T14:46:14.955000000Z", + "web_url": "https://app.attio.com/nango-mobile/person/d9ce1f13-9acf-4c88-a747-64f27c33072d", + "values": { + "record_id": [ + { + "active_from": "2025-11-27T14:46:14.955000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "d9ce1f13-9acf-4c88-a747-64f27c33072d", + "attribute_type": "text" + } + ], + "name": [ + { + "active_from": "2025-11-27T14:46:14.955000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "first_name": "James", + "last_name": "Wilson", + "full_name": "James Wilson", + "attribute_type": "personal-name" + } + ], + "email_addresses": [ + { + "active_from": "2025-11-27T14:46:14.955000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "original_email_address": "james.w@healthbridge.med", + "email_address": "james.w@healthbridge.med", + "email_domain": "healthbridge.med", + "email_root_domain": "healthbridge.med", + "email_local_specifier": "james.w", + "attribute_type": "email-address" + } + ], + "description": [], + "company": [ + { + "active_from": "2025-11-27T14:46:15.639000000Z", + "active_until": null, + "created_by_actor": { + "type": "system", + "id": null + }, + "target_object": "companies", + "target_record_id": "f94657fc-c887-455d-9598-35024f2e4347", + "attribute_type": "record-reference" + } + ], + "job_title": [ + { + "active_from": "2025-11-27T14:46:14.955000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "CMO", + "attribute_type": "text" + } + ], + "avatar_url": [], + "phone_numbers": [], + "primary_location": [], + "angellist": [], + "facebook": [], + "instagram": [], + "linkedin": [], + "twitter": [], + "twitter_follower_count": [], + "first_calendar_interaction": [], + "last_calendar_interaction": [], + "next_calendar_interaction": [], + "first_email_interaction": [], + "last_email_interaction": [], + "first_interaction": [], + "last_interaction": [], + "next_interaction": [], + "strongest_connection_strength_legacy": [], + "strongest_connection_strength": [], + "strongest_connection_user": [], + "associated_deals": [], + "created_at": [ + { + "active_from": "2025-11-27T14:46:14.955000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "2025-11-27T14:46:14.977000000Z", + "attribute_type": "timestamp" + } + ], + "created_by": [ + { + "active_from": "2025-11-27T14:46:14.955000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "referenced_actor_type": "app", + "referenced_actor_id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3", + "attribute_type": "actor-reference" + } + ] + } + }, + { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "e9002be5-e744-4f91-81c8-29485789c1e4" + }, + "created_at": "2025-11-27T14:42:13.535000000Z", + "web_url": "https://app.attio.com/nango-mobile/person/e9002be5-e744-4f91-81c8-29485789c1e4", + "values": { + "record_id": [ + { + "active_from": "2025-11-27T14:42:13.535000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "e9002be5-e744-4f91-81c8-29485789c1e4", + "attribute_type": "text" + } + ], + "name": [ + { + "active_from": "2025-11-27T14:42:13.535000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "first_name": "John", + "last_name": "Doe", + "full_name": "John Doe", + "attribute_type": "personal-name" + } + ], + "email_addresses": [ + { + "active_from": "2025-11-27T14:42:13.535000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "original_email_address": "john.doe@acme.com", + "email_address": "john.doe@acme.com", + "email_domain": "acme.com", + "email_root_domain": "acme.com", + "email_local_specifier": "john.doe", + "attribute_type": "email-address" + } + ], + "description": [], + "company": [ + { + "active_from": "2025-11-27T14:42:13.848000000Z", + "active_until": null, + "created_by_actor": { + "type": "system", + "id": null + }, + "target_object": "companies", + "target_record_id": "f9de702f-923c-44ef-baba-30ad7a87408b", + "attribute_type": "record-reference" + } + ], + "job_title": [ + { + "active_from": "2025-11-27T14:42:13.535000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "CEO", + "attribute_type": "text" + } + ], + "avatar_url": [], + "phone_numbers": [], + "primary_location": [], + "angellist": [], + "facebook": [], + "instagram": [], + "linkedin": [], + "twitter": [], + "twitter_follower_count": [], + "first_calendar_interaction": [], + "last_calendar_interaction": [], + "next_calendar_interaction": [], + "first_email_interaction": [], + "last_email_interaction": [], + "first_interaction": [], + "last_interaction": [], + "next_interaction": [], + "strongest_connection_strength_legacy": [], + "strongest_connection_strength": [], + "strongest_connection_user": [], + "associated_deals": [], + "created_at": [ + { + "active_from": "2025-11-27T14:42:13.535000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "value": "2025-11-27T14:42:13.549000000Z", + "attribute_type": "timestamp" + } + ], + "created_by": [ + { + "active_from": "2025-11-27T14:42:13.535000000Z", + "active_until": null, + "created_by_actor": { + "type": "app", + "id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3" + }, + "referenced_actor_type": "app", + "referenced_actor_id": "ddce52e1-853a-43cc-9f33-81f0690d1ff3", + "attribute_type": "actor-reference" + } + ] + } + } + ] + }, + "status": 200, + "headers": { + "date": "Mon, 01 Dec 2025 14:23:07 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "x-xss-protection": "0", + "x-content-type-options": "nosniff", + "x-download-options": "noopen", + "x-frame-options": "DENY", + "x-dns-prefetch-control": "off", + "strict-transport-security": "max-age=7776000; includeSubDomains; preload", + "content-security-policy-report-only": "default-src 'self' https://app.nango.dev https://api.nango.dev https://connect.nango.dev;child-src 'self';connect-src 'self' https://*.google-analytics.com https://*.sentry.io https://app.nango.dev https://api.nango.dev wss://api.nango.dev/ https://connect.nango.dev https://*.posthog.com https://*.stripe.com https://api.apidownwatch.com;font-src 'self' https://*.googleapis.com https://*.gstatic.com;frame-src 'self' https://accounts.google.com https://app.nango.dev https://api.nango.dev https://connect.nango.dev https://www.youtube.com https://*.stripe.com;img-src 'self' data: https://app.nango.dev https://api.nango.dev https://*.google-analytics.com https://*.googleapis.com https://*.posthog.com https://img.logo.dev https://*.ytimg.com;manifest-src 'self';media-src 'self';object-src 'self';script-src 'self' 'unsafe-eval' 'unsafe-inline' https://app.nango.dev https://api.nango.dev https://*.stripe.com https://*.google-analytics.com https://*.googleapis.com https://apis.google.com https://*.posthog.com https://www.youtube.com https://api.apidownwatch.com;style-src blob: 'self' 'unsafe-inline' https://*.googleapis.com https://app.nango.dev https://api.nango.dev;worker-src blob: 'self' https://app.nango.dev https://api.nango.dev https://*.googleapis.com https://*.posthog.com;base-uri 'self';form-action 'self';frame-ancestors 'self';script-src-attr 'none';upgrade-insecure-requests", + "access-control-allow-origin": "*", + "access-control-expose-headers": "x-attio-client,x-attio-execution-id,x-attio-platform,x-attio-platform-version,x-attio-record-query-score,x-attio-app-installation-bundle-id", + "x-ratelimit-limit": "1000", + "x-ratelimit-remaining": "994", + "x-ratelimit-reset": "1764599023", + "x-attio-execution-id": "a535a80e-23cf-4e1e-9965-62a1f559de8e", + "vary": "Origin", + "x-attio-record-query-score": "0", + "x-accurate-at": "2025-12-01T14:23:04.775000000Z", + "via": "1.1 google", + "cf-cache-status": "DYNAMIC", + "server": "cloudflare", + "cf-ray": "9a733d852f56c54c-PDX" + } +} \ No newline at end of file diff --git a/integrations/attio/mocks/update-record/input.json b/integrations/attio/mocks/update-record/input.json new file mode 100644 index 000000000..ab97e9732 --- /dev/null +++ b/integrations/attio/mocks/update-record/input.json @@ -0,0 +1,7 @@ +{ + "object_slug": "people", + "record_id": "5829dd6c-0577-40dc-a858-8bd9a0d6aa58", + "values": { + "job_title": [{"value": "CTO"}] + } +} \ No newline at end of file diff --git a/integrations/attio/mocks/update-record/output.json b/integrations/attio/mocks/update-record/output.json new file mode 100644 index 000000000..e7933d740 --- /dev/null +++ b/integrations/attio/mocks/update-record/output.json @@ -0,0 +1,11 @@ +{ + "data": { + "id": { + "workspace_id": "805cbc5a-e82b-42b0-b96f-4c34d366628d", + "object_id": "b30a0c93-0ea9-43c7-afa7-cf6e41e7d18f", + "record_id": "5829dd6c-0577-40dc-a858-8bd9a0d6aa58" + }, + "created_at": "2025-11-27T14:45:32.141000000Z", + "values": {} + } +} \ No newline at end of file diff --git a/integrations/attio/tests/attio-list-objects.test.ts b/integrations/attio/tests/attio-list-objects.test.ts new file mode 100644 index 000000000..a9aa19932 --- /dev/null +++ b/integrations/attio/tests/attio-list-objects.test.ts @@ -0,0 +1,20 @@ +import { vi, expect, it, describe } from 'vitest'; + +import createAction from '../actions/list-objects.js'; + +describe('attio list-objects tests', () => { + const nangoMock = new global.vitest.NangoActionMock({ + dirname: __dirname, + name: 'list-objects', + Model: 'AttioObject' + }); + + it('should output the action output that is expected', async () => { + const input = await nangoMock.getInput(); + const response = await createAction.exec(nangoMock, input); + const output = await nangoMock.getOutput(); + + expect(response).toEqual(output); + }); +}); + \ No newline at end of file diff --git a/integrations/index.ts b/integrations/index.ts index 6dd3bc66d..5609483f8 100644 --- a/integrations/index.ts +++ b/integrations/index.ts @@ -50,6 +50,28 @@ import './ashby/actions/interview-stage.js'; import './attio/syncs/companies.js'; import './attio/syncs/deals.js'; import './attio/syncs/people.js'; +import './attio/actions/create-company.js'; +import './attio/actions/create-list-entry.js'; +import './attio/actions/create-note.js'; +import './attio/actions/create-person.js'; +import './attio/actions/create-record.js'; +import './attio/actions/create-task.js'; +import './attio/actions/create-webhook.js'; +import './attio/actions/delete-list-entry.js'; +import './attio/actions/delete-note.js'; +import './attio/actions/delete-record.js'; +import './attio/actions/delete-webhook.js'; +import './attio/actions/get-object.js'; +import './attio/actions/get-record.js'; +import './attio/actions/get-webhook.js'; +import './attio/actions/list-lists.js'; +import './attio/actions/list-notes.js'; +import './attio/actions/list-objects.js'; +import './attio/actions/list-records.js'; +import './attio/actions/list-tasks.js'; +import './attio/actions/list-webhooks.js'; +import './attio/actions/update-record.js'; +import './attio/actions/update-webhook.js'; // -- Integration: avalara import './avalara/syncs/transactions.js'; diff --git a/internal/flows.zero.json b/internal/flows.zero.json index 0c7462f2d..b79c3b8fa 100644 --- a/internal/flows.zero.json +++ b/internal/flows.zero.json @@ -6781,7 +6781,338 @@ }, { "providerConfigKey": "attio", - "actions": [], + "actions": [ + { + "type": "action", + "description": "Creates a new company record in Attio", + "endpoint": { + "method": "POST", + "path": "/companies", + "group": "Companies" + }, + "input": "ActionInput_attio_createcompany", + "name": "create-company", + "output": ["ActionOutput_attio_createcompany"], + "scopes": ["record_permission:read-write", "object_configuration:read"], + "usedModels": ["ActionInput_attio_createcompany", "ActionOutput_attio_createcompany"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Adds a record as an entry to a list.", + "endpoint": { + "method": "POST", + "path": "/lists/:list_id/entries", + "group": "Lists" + }, + "input": "ActionInput_attio_createlistentry", + "name": "create-list-entry", + "output": ["ActionOutput_attio_createlistentry"], + "scopes": ["list_entry:read-write"], + "usedModels": ["ActionInput_attio_createlistentry", "ActionOutput_attio_createlistentry"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Creates a note on a record.", + "endpoint": { + "method": "POST", + "path": "/notes", + "group": "Notes" + }, + "input": "ActionInput_attio_createnote", + "name": "create-note", + "output": ["ActionOutput_attio_createnote"], + "scopes": ["note:read-write"], + "usedModels": ["ActionInput_attio_createnote", "ActionOutput_attio_createnote"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Creates a new person record in Attio", + "endpoint": { + "method": "POST", + "path": "/people", + "group": "People" + }, + "input": "ActionInput_attio_createperson", + "name": "create-person", + "output": ["ActionOutput_attio_createperson"], + "scopes": ["record_permission:read-write", "object_configuration:read"], + "usedModels": ["ActionInput_attio_createperson", "ActionOutput_attio_createperson"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Creates a new record for a specified object type.", + "endpoint": { + "method": "POST", + "path": "/objects/:object_slug/records", + "group": "Records" + }, + "input": "ActionInput_attio_createrecord", + "name": "create-record", + "output": ["ActionOutput_attio_createrecord"], + "scopes": ["record_permission:read-write"], + "usedModels": ["ActionInput_attio_createrecord", "ActionOutput_attio_createrecord"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Creates a task.", + "endpoint": { + "method": "POST", + "path": "/tasks", + "group": "Tasks" + }, + "input": "ActionInput_attio_createtask", + "name": "create-task", + "output": ["ActionOutput_attio_createtask"], + "scopes": ["task:read-write"], + "usedModels": ["ActionInput_attio_createtask", "ActionOutput_attio_createtask"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Creates a new webhook in the Attio workspace", + "endpoint": { + "method": "POST", + "path": "/webhooks", + "group": "Webhooks" + }, + "input": "ActionInput_attio_createwebhook", + "name": "create-webhook", + "output": ["ActionOutput_attio_createwebhook"], + "scopes": ["webhook:read-write"], + "usedModels": ["ActionInput_attio_createwebhook", "ActionOutput_attio_createwebhook"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Removes an entry from a list.", + "endpoint": { + "method": "DELETE", + "path": "/lists/:list_id/entries/:entry_id", + "group": "Lists" + }, + "input": "ActionInput_attio_deletelistentry", + "name": "delete-list-entry", + "output": ["ActionOutput_attio_deletelistentry"], + "scopes": ["list_entry:read-write"], + "usedModels": ["ActionInput_attio_deletelistentry", "ActionOutput_attio_deletelistentry"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Deletes a note.", + "endpoint": { + "method": "DELETE", + "path": "/notes/:note_id", + "group": "Notes" + }, + "input": "ActionInput_attio_deletenote", + "name": "delete-note", + "output": ["ActionOutput_attio_deletenote"], + "scopes": ["note:read-write"], + "usedModels": ["ActionInput_attio_deletenote", "ActionOutput_attio_deletenote"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Deletes a record permanently.", + "endpoint": { + "method": "DELETE", + "path": "/objects/:object_slug/records/:record_id", + "group": "Records" + }, + "input": "ActionInput_attio_deleterecord", + "name": "delete-record", + "output": ["ActionOutput_attio_deleterecord"], + "scopes": ["record_permission:read-write"], + "usedModels": ["ActionInput_attio_deleterecord", "ActionOutput_attio_deleterecord"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Deletes a webhook from the Attio workspace", + "endpoint": { + "method": "DELETE", + "path": "/webhooks/{webhook_id}", + "group": "Webhooks" + }, + "input": "ActionInput_attio_deletewebhook", + "name": "delete-webhook", + "output": ["ActionOutput_attio_deletewebhook"], + "scopes": ["webhook:read-write"], + "usedModels": ["ActionInput_attio_deletewebhook", "ActionOutput_attio_deletewebhook"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Gets a specific object by ID or slug.", + "endpoint": { + "method": "GET", + "path": "/objects/:object_id", + "group": "Objects" + }, + "input": "ActionInput_attio_getobject", + "name": "get-object", + "output": ["ActionOutput_attio_getobject"], + "scopes": ["object_configuration:read"], + "usedModels": ["ActionInput_attio_getobject", "ActionOutput_attio_getobject"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Gets a specific record by ID.", + "endpoint": { + "method": "GET", + "path": "/objects/:object_slug/records/:record_id", + "group": "Records" + }, + "input": "ActionInput_attio_getrecord", + "name": "get-record", + "output": ["ActionOutput_attio_getrecord"], + "scopes": ["record_permission:read"], + "usedModels": ["ActionInput_attio_getrecord", "ActionOutput_attio_getrecord"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Gets a single webhook by its ID from the Attio workspace", + "endpoint": { + "method": "GET", + "path": "/webhooks/{webhook_id}", + "group": "Webhooks" + }, + "input": "ActionInput_attio_getwebhook", + "name": "get-webhook", + "output": ["ActionOutput_attio_getwebhook"], + "scopes": ["webhook:read"], + "usedModels": ["ActionInput_attio_getwebhook", "ActionOutput_attio_getwebhook"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Lists all lists in the workspace.", + "endpoint": { + "method": "GET", + "path": "/lists", + "group": "Lists" + }, + "input": "ActionInput_attio_listlists", + "name": "list-lists", + "output": ["ActionOutput_attio_listlists"], + "scopes": ["list_configuration:read"], + "usedModels": ["ActionInput_attio_listlists", "ActionOutput_attio_listlists"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Lists notes for a record.", + "endpoint": { + "method": "GET", + "path": "/notes", + "group": "Notes" + }, + "input": "ActionInput_attio_listnotes", + "name": "list-notes", + "output": ["ActionOutput_attio_listnotes"], + "scopes": ["note:read"], + "usedModels": ["ActionInput_attio_listnotes", "ActionOutput_attio_listnotes"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Lists all available objects (system and custom-defined) in the Attio workspace.", + "endpoint": { + "method": "GET", + "path": "/objects", + "group": "Objects" + }, + "input": "ActionInput_attio_listobjects", + "name": "list-objects", + "output": ["ActionOutput_attio_listobjects"], + "scopes": ["object_configuration:read"], + "usedModels": ["ActionInput_attio_listobjects", "ActionOutput_attio_listobjects"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Lists records from a specific object type.", + "endpoint": { + "method": "POST", + "path": "/objects/:object_slug/records/query", + "group": "Records" + }, + "input": "ActionInput_attio_listrecords", + "name": "list-records", + "output": ["ActionOutput_attio_listrecords"], + "scopes": ["record_permission:read"], + "usedModels": ["ActionInput_attio_listrecords", "ActionOutput_attio_listrecords"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Lists tasks.", + "endpoint": { + "method": "GET", + "path": "/tasks", + "group": "Tasks" + }, + "input": "ActionInput_attio_listtasks", + "name": "list-tasks", + "output": ["ActionOutput_attio_listtasks"], + "scopes": ["task:read"], + "usedModels": ["ActionInput_attio_listtasks", "ActionOutput_attio_listtasks"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Lists all webhooks configured in the Attio workspace", + "endpoint": { + "method": "GET", + "path": "/webhooks", + "group": "Webhooks" + }, + "input": "ActionInput_attio_listwebhooks", + "name": "list-webhooks", + "output": ["ActionOutput_attio_listwebhooks"], + "scopes": ["webhook:read"], + "usedModels": ["ActionInput_attio_listwebhooks", "ActionOutput_attio_listwebhooks"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Updates an existing record.", + "endpoint": { + "method": "PATCH", + "path": "/objects/:object_slug/records/:record_id", + "group": "Records" + }, + "input": "ActionInput_attio_updaterecord", + "name": "update-record", + "output": ["ActionOutput_attio_updaterecord"], + "scopes": ["record_permission:read-write"], + "usedModels": ["ActionInput_attio_updaterecord", "ActionOutput_attio_updaterecord"], + "version": "1.0.0" + }, + { + "type": "action", + "description": "Updates an existing webhook configuration in Attio", + "endpoint": { + "method": "PATCH", + "path": "/webhooks/{webhook_id}", + "group": "Webhooks" + }, + "input": "ActionInput_attio_updatewebhook", + "name": "update-webhook", + "output": ["ActionOutput_attio_updatewebhook"], + "scopes": ["webhook:read-write"], + "usedModels": ["ActionInput_attio_updatewebhook", "ActionOutput_attio_updatewebhook"], + "version": "1.0.0" + } + ], "syncs": [ { "type": "sync", @@ -7257,6 +7588,1485 @@ "SyncMetadata_attio_people": { "type": "object", "additionalProperties": false + }, + "ActionInput_attio_createcompany": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "domains": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "type": "string" + } + }, + "required": ["name"], + "additionalProperties": false + }, + "ActionOutput_attio_createcompany": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "record_id": { + "type": "string" + } + }, + "required": ["workspace_id", "object_id", "record_id"], + "additionalProperties": false + }, + "name": { + "type": ["string", "null"] + }, + "domains": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "type": ["string", "null"] + }, + "created_at": { + "type": "string" + }, + "web_url": { + "type": "string" + } + }, + "required": ["id", "name", "domains", "description", "created_at", "web_url"], + "additionalProperties": false + }, + "ActionInput_attio_createlistentry": { + "type": "object", + "properties": { + "list_id": { + "type": "string" + }, + "record_id": { + "type": "string" + } + }, + "required": ["list_id", "record_id"], + "additionalProperties": false + }, + "ActionOutput_attio_createlistentry": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "list_id": { + "type": "string" + }, + "entry_id": { + "type": "string" + } + }, + "required": ["workspace_id", "list_id", "entry_id"], + "additionalProperties": false + }, + "record_id": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": ["id", "record_id", "created_at"], + "additionalProperties": false + } + }, + "required": ["data"], + "additionalProperties": false + }, + "ActionInput_attio_createnote": { + "type": "object", + "properties": { + "parent_object": { + "type": "string" + }, + "parent_record_id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + } + }, + "required": ["parent_object", "parent_record_id", "title", "content"], + "additionalProperties": false + }, + "ActionOutput_attio_createnote": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "note_id": { + "type": "string" + } + }, + "required": ["workspace_id", "note_id"], + "additionalProperties": false + }, + "title": { + "type": "string" + }, + "content_plaintext": { + "type": "string" + }, + "parent_object": { + "type": "string" + }, + "parent_record_id": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": ["id", "title", "content_plaintext", "parent_object", "parent_record_id", "created_at"], + "additionalProperties": false + } + }, + "required": ["data"], + "additionalProperties": false + }, + "ActionInput_attio_createperson": { + "type": "object", + "properties": { + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "email_addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "phone_numbers": { + "type": "array", + "items": { + "type": "string" + } + }, + "job_title": { + "type": "string" + } + }, + "required": ["first_name", "last_name"], + "additionalProperties": false + }, + "ActionOutput_attio_createperson": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "record_id": { + "type": "string" + } + }, + "required": ["workspace_id", "object_id", "record_id"], + "additionalProperties": false + }, + "name": { + "type": ["string", "null"] + }, + "email": { + "type": ["string", "null"] + }, + "phone": { + "type": ["string", "null"] + }, + "job_title": { + "type": ["string", "null"] + }, + "created_at": { + "type": "string" + }, + "web_url": { + "type": "string" + } + }, + "required": ["id", "name", "email", "phone", "job_title", "created_at", "web_url"], + "additionalProperties": false + }, + "ActionInput_attio_createrecord": { + "type": "object", + "properties": { + "object_slug": { + "type": "string" + }, + "values": { + "type": "object", + "additionalProperties": { + "anyOf": [ + {}, + { + "not": {} + } + ] + } + } + }, + "required": ["object_slug", "values"], + "additionalProperties": false + }, + "ActionOutput_attio_createrecord": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "record_id": { + "type": "string" + } + }, + "required": ["workspace_id", "object_id", "record_id"], + "additionalProperties": false + }, + "created_at": { + "type": "string" + }, + "values": { + "type": "object", + "additionalProperties": { + "anyOf": [ + {}, + { + "not": {} + } + ] + } + } + }, + "required": ["id", "created_at", "values"], + "additionalProperties": false + } + }, + "required": ["data"], + "additionalProperties": false + }, + "ActionInput_attio_createtask": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "deadline": { + "type": "string" + }, + "assignee_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "linked_records": { + "type": "array", + "items": { + "type": "object", + "properties": { + "target_object": { + "type": "string" + }, + "target_record_id": { + "type": "string" + } + }, + "required": ["target_object", "target_record_id"], + "additionalProperties": false + } + } + }, + "required": ["content"], + "additionalProperties": false + }, + "ActionOutput_attio_createtask": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "task_id": { + "type": "string" + } + }, + "required": ["workspace_id", "task_id"], + "additionalProperties": false + }, + "content_plaintext": { + "type": "string" + }, + "deadline_at": { + "type": ["string", "null"] + }, + "is_completed": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": ["id", "content_plaintext", "deadline_at", "is_completed", "created_at"], + "additionalProperties": false + } + }, + "required": ["data"], + "additionalProperties": false + }, + "ActionInput_attio_createwebhook": { + "type": "object", + "properties": { + "target_url": { + "type": "string" + }, + "subscriptions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "event_type": { + "type": "string" + }, + "filter": { + "anyOf": [ + { + "type": "object", + "properties": { + "$and": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["field", "operator", "value"], + "additionalProperties": false + } + }, + "$or": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["field", "operator", "value"], + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] + } + }, + "required": ["event_type"], + "additionalProperties": false + } + } + }, + "required": ["target_url", "subscriptions"], + "additionalProperties": false + }, + "ActionOutput_attio_createwebhook": { + "type": "object", + "properties": { + "target_url": { + "type": "string" + }, + "subscriptions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "event_type": { + "type": "string" + }, + "filter": { + "anyOf": [ + { + "type": "object", + "properties": { + "$and": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["field", "operator", "value"], + "additionalProperties": false + } + }, + "$or": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["field", "operator", "value"], + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] + } + }, + "required": ["event_type", "filter"], + "additionalProperties": false + } + }, + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "webhook_id": { + "type": "string" + } + }, + "required": ["workspace_id", "webhook_id"], + "additionalProperties": false + }, + "status": { + "type": "string", + "enum": ["active", "degraded", "inactive"] + }, + "created_at": { + "type": "string" + }, + "secret": { + "type": "string" + } + }, + "required": ["target_url", "subscriptions", "id", "status", "created_at", "secret"], + "additionalProperties": false + }, + "ActionInput_attio_deletelistentry": { + "type": "object", + "properties": { + "list_id": { + "type": "string" + }, + "entry_id": { + "type": "string" + } + }, + "required": ["list_id", "entry_id"], + "additionalProperties": false + }, + "ActionOutput_attio_deletelistentry": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + }, + "required": ["success"], + "additionalProperties": false + }, + "ActionInput_attio_deletenote": { + "type": "object", + "properties": { + "note_id": { + "type": "string" + } + }, + "required": ["note_id"], + "additionalProperties": false + }, + "ActionOutput_attio_deletenote": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + }, + "required": ["success"], + "additionalProperties": false + }, + "ActionInput_attio_deleterecord": { + "type": "object", + "properties": { + "object_slug": { + "type": "string" + }, + "record_id": { + "type": "string" + } + }, + "required": ["object_slug", "record_id"], + "additionalProperties": false + }, + "ActionOutput_attio_deleterecord": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + }, + "required": ["success"], + "additionalProperties": false + }, + "ActionInput_attio_deletewebhook": { + "type": "object", + "properties": { + "webhook_id": { + "type": "string" + } + }, + "required": ["webhook_id"], + "additionalProperties": false + }, + "ActionOutput_attio_deletewebhook": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + }, + "required": ["success"], + "additionalProperties": false + }, + "ActionInput_attio_getobject": { + "type": "object", + "properties": { + "object_id": { + "type": "string" + } + }, + "required": ["object_id"], + "additionalProperties": false + }, + "ActionOutput_attio_getobject": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "object_id": { + "type": "string" + } + }, + "required": ["workspace_id", "object_id"], + "additionalProperties": false + }, + "api_slug": { + "type": "string" + }, + "singular_noun": { + "type": "string" + }, + "plural_noun": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": ["id", "api_slug", "singular_noun", "plural_noun", "created_at"], + "additionalProperties": false + } + }, + "required": ["data"], + "additionalProperties": false + }, + "ActionInput_attio_getrecord": { + "type": "object", + "properties": { + "object_slug": { + "type": "string" + }, + "record_id": { + "type": "string" + } + }, + "required": ["object_slug", "record_id"], + "additionalProperties": false + }, + "ActionOutput_attio_getrecord": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "record_id": { + "type": "string" + } + }, + "required": ["workspace_id", "object_id", "record_id"], + "additionalProperties": false + }, + "created_at": { + "type": "string" + }, + "values": { + "type": "object", + "additionalProperties": { + "anyOf": [ + {}, + { + "not": {} + } + ] + } + } + }, + "required": ["id", "created_at", "values"], + "additionalProperties": false + } + }, + "required": ["data"], + "additionalProperties": false + }, + "ActionInput_attio_getwebhook": { + "type": "object", + "properties": { + "webhook_id": { + "type": "string" + } + }, + "required": ["webhook_id"], + "additionalProperties": false + }, + "ActionOutput_attio_getwebhook": { + "type": "object", + "properties": { + "target_url": { + "type": "string" + }, + "subscriptions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "event_type": { + "type": "string" + }, + "filter": { + "anyOf": [ + { + "type": "object", + "properties": { + "$and": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["field", "operator", "value"], + "additionalProperties": false + } + }, + "$or": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["field", "operator", "value"], + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] + } + }, + "required": ["event_type", "filter"], + "additionalProperties": false + } + }, + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "webhook_id": { + "type": "string" + } + }, + "required": ["workspace_id", "webhook_id"], + "additionalProperties": false + }, + "status": { + "type": "string", + "enum": ["active", "degraded", "inactive"] + }, + "created_at": { + "type": "string" + } + }, + "required": ["target_url", "subscriptions", "id", "status", "created_at"], + "additionalProperties": false + }, + "ActionInput_attio_listlists": { + "type": "object", + "additionalProperties": false + }, + "ActionOutput_attio_listlists": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "list_id": { + "type": "string" + } + }, + "required": ["workspace_id", "list_id"], + "additionalProperties": false + }, + "api_slug": { + "type": "string" + }, + "name": { + "type": "string" + }, + "parent_object": { + "type": "array", + "items": { + "type": "string" + } + }, + "created_at": { + "type": "string" + } + }, + "required": ["id", "api_slug", "name", "parent_object", "created_at"], + "additionalProperties": false + } + } + }, + "required": ["data"], + "additionalProperties": false + }, + "ActionInput_attio_listnotes": { + "type": "object", + "properties": { + "parent_object": { + "type": "string" + }, + "parent_record_id": { + "type": "string" + }, + "limit": { + "type": "number" + }, + "offset": { + "type": "number" + } + }, + "required": ["parent_object", "parent_record_id"], + "additionalProperties": false + }, + "ActionOutput_attio_listnotes": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "note_id": { + "type": "string" + } + }, + "required": ["workspace_id", "note_id"], + "additionalProperties": false + }, + "title": { + "type": ["string", "null"] + }, + "content_plaintext": { + "type": "string" + }, + "parent_object": { + "type": "string" + }, + "parent_record_id": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": ["id", "title", "content_plaintext", "parent_object", "parent_record_id", "created_at"], + "additionalProperties": false + } + } + }, + "required": ["data"], + "additionalProperties": false + }, + "ActionInput_attio_listobjects": { + "type": "object", + "additionalProperties": false + }, + "ActionOutput_attio_listobjects": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "object_id": { + "type": "string" + } + }, + "required": ["workspace_id", "object_id"], + "additionalProperties": false + }, + "api_slug": { + "type": "string" + }, + "singular_noun": { + "type": "string" + }, + "plural_noun": { + "type": "string" + }, + "created_at": { + "type": "string" + } + }, + "required": ["id", "api_slug", "singular_noun", "plural_noun", "created_at"], + "additionalProperties": false + } + } + }, + "required": ["data"], + "additionalProperties": false + }, + "ActionInput_attio_listrecords": { + "type": "object", + "properties": { + "object_slug": { + "type": "string" + }, + "limit": { + "type": "number" + }, + "offset": { + "type": "number" + } + }, + "required": ["object_slug"], + "additionalProperties": false + }, + "ActionOutput_attio_listrecords": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "record_id": { + "type": "string" + } + }, + "required": ["workspace_id", "object_id", "record_id"], + "additionalProperties": false + }, + "created_at": { + "type": "string" + }, + "values": { + "type": "object", + "additionalProperties": { + "anyOf": [ + {}, + { + "not": {} + } + ] + } + } + }, + "required": ["id", "created_at", "values"], + "additionalProperties": false + } + } + }, + "required": ["data"], + "additionalProperties": false + }, + "ActionInput_attio_listtasks": { + "type": "object", + "properties": { + "limit": { + "type": "number" + }, + "offset": { + "type": "number" + } + }, + "additionalProperties": false + }, + "ActionOutput_attio_listtasks": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "task_id": { + "type": "string" + } + }, + "required": ["workspace_id", "task_id"], + "additionalProperties": false + }, + "content_plaintext": { + "type": "string" + }, + "deadline_at": { + "type": ["string", "null"] + }, + "is_completed": { + "type": "boolean" + }, + "created_at": { + "type": "string" + } + }, + "required": ["id", "content_plaintext", "deadline_at", "is_completed", "created_at"], + "additionalProperties": false + } + } + }, + "required": ["data"], + "additionalProperties": false + }, + "ActionInput_attio_listwebhooks": { + "type": "object", + "properties": { + "limit": { + "type": "number" + }, + "cursor": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ActionOutput_attio_listwebhooks": { + "type": "object", + "properties": { + "webhooks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "target_url": { + "type": "string" + }, + "subscriptions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "event_type": { + "type": "string" + }, + "filter": { + "anyOf": [ + { + "type": "object", + "properties": { + "$and": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["field", "operator", "value"], + "additionalProperties": false + } + }, + "$or": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["field", "operator", "value"], + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] + } + }, + "required": ["event_type", "filter"], + "additionalProperties": false + } + }, + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "webhook_id": { + "type": "string" + } + }, + "required": ["workspace_id", "webhook_id"], + "additionalProperties": false + }, + "status": { + "type": "string", + "enum": ["active", "degraded", "inactive"] + }, + "created_at": { + "type": "string" + } + }, + "required": ["target_url", "subscriptions", "id", "status", "created_at"], + "additionalProperties": false + } + }, + "next_cursor": { + "type": ["string", "null"] + } + }, + "required": ["webhooks", "next_cursor"], + "additionalProperties": false + }, + "ActionInput_attio_updaterecord": { + "type": "object", + "properties": { + "object_slug": { + "type": "string" + }, + "record_id": { + "type": "string" + }, + "values": { + "type": "object", + "additionalProperties": { + "anyOf": [ + {}, + { + "not": {} + } + ] + } + } + }, + "required": ["object_slug", "record_id", "values"], + "additionalProperties": false + }, + "ActionOutput_attio_updaterecord": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "object_id": { + "type": "string" + }, + "record_id": { + "type": "string" + } + }, + "required": ["workspace_id", "object_id", "record_id"], + "additionalProperties": false + }, + "created_at": { + "type": "string" + }, + "values": { + "type": "object", + "additionalProperties": { + "anyOf": [ + {}, + { + "not": {} + } + ] + } + } + }, + "required": ["id", "created_at", "values"], + "additionalProperties": false + } + }, + "required": ["data"], + "additionalProperties": false + }, + "ActionInput_attio_updatewebhook": { + "type": "object", + "properties": { + "webhook_id": { + "type": "string" + }, + "target_url": { + "type": "string" + }, + "subscriptions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "event_type": { + "type": "string" + }, + "filter": { + "anyOf": [ + { + "type": "object", + "properties": { + "$and": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["field", "operator", "value"], + "additionalProperties": false + } + }, + "$or": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["field", "operator", "value"], + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] + } + }, + "required": ["event_type"], + "additionalProperties": false + } + } + }, + "required": ["webhook_id"], + "additionalProperties": false + }, + "ActionOutput_attio_updatewebhook": { + "type": "object", + "properties": { + "target_url": { + "type": "string" + }, + "subscriptions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "event_type": { + "type": "string" + }, + "filter": { + "anyOf": [ + { + "type": "object", + "properties": { + "$and": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["field", "operator", "value"], + "additionalProperties": false + } + }, + "$or": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["field", "operator", "value"], + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ] + } + }, + "required": ["event_type", "filter"], + "additionalProperties": false + } + }, + "id": { + "type": "object", + "properties": { + "workspace_id": { + "type": "string" + }, + "webhook_id": { + "type": "string" + } + }, + "required": ["workspace_id", "webhook_id"], + "additionalProperties": false + }, + "status": { + "type": "string", + "enum": ["active", "degraded", "inactive"] + }, + "created_at": { + "type": "string" + } + }, + "required": ["target_url", "subscriptions", "id", "status", "created_at"], + "additionalProperties": false } } },