orangeslice 2.1.4-beta.1 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/cli.js +19 -9
  2. package/dist/ctx.d.ts +12 -7
  3. package/dist/ctx.js +6 -46
  4. package/dist/index.d.ts +1 -20
  5. package/dist/index.js +0 -2
  6. package/docs/integrations/attio/assertEntry.md +44 -0
  7. package/docs/integrations/attio/assertRecord.md +51 -0
  8. package/docs/integrations/attio/createAttribute.md +59 -0
  9. package/docs/integrations/attio/createComment.md +60 -0
  10. package/docs/integrations/attio/createEntry.md +44 -0
  11. package/docs/integrations/attio/createFolder.md +58 -0
  12. package/docs/integrations/attio/createList.md +51 -0
  13. package/docs/integrations/attio/createNote.md +47 -0
  14. package/docs/integrations/attio/createObject.md +39 -0
  15. package/docs/integrations/attio/createRecord.md +49 -0
  16. package/docs/integrations/attio/createSelectOption.md +37 -0
  17. package/docs/integrations/attio/createStatus.md +45 -0
  18. package/docs/integrations/attio/createTask.md +58 -0
  19. package/docs/integrations/attio/createWebhook.md +43 -0
  20. package/docs/integrations/attio/deleteComment.md +21 -0
  21. package/docs/integrations/attio/deleteEntry.md +23 -0
  22. package/docs/integrations/attio/deleteFile.md +21 -0
  23. package/docs/integrations/attio/deleteNote.md +21 -0
  24. package/docs/integrations/attio/deleteRecord.md +23 -0
  25. package/docs/integrations/attio/deleteTask.md +21 -0
  26. package/docs/integrations/attio/deleteWebhook.md +19 -0
  27. package/docs/integrations/attio/getAttribute.md +39 -0
  28. package/docs/integrations/attio/getCallRecording.md +33 -0
  29. package/docs/integrations/attio/getCallTranscript.md +38 -0
  30. package/docs/integrations/attio/getComment.md +31 -0
  31. package/docs/integrations/attio/getEntry.md +33 -0
  32. package/docs/integrations/attio/getFile.md +36 -0
  33. package/docs/integrations/attio/getList.md +33 -0
  34. package/docs/integrations/attio/getMeeting.md +39 -0
  35. package/docs/integrations/attio/getNote.md +33 -0
  36. package/docs/integrations/attio/getObject.md +31 -0
  37. package/docs/integrations/attio/getRecord.md +32 -0
  38. package/docs/integrations/attio/getSelf.md +27 -0
  39. package/docs/integrations/attio/getTask.md +34 -0
  40. package/docs/integrations/attio/getThread.md +36 -0
  41. package/docs/integrations/attio/getWebhook.md +31 -0
  42. package/docs/integrations/attio/getWorkspaceMember.md +32 -0
  43. package/docs/integrations/attio/index.md +122 -0
  44. package/docs/integrations/attio/listAttributes.md +38 -0
  45. package/docs/integrations/attio/listCallRecordings.md +35 -0
  46. package/docs/integrations/attio/listEntries.md +44 -0
  47. package/docs/integrations/attio/listEntryAttributeValues.md +36 -0
  48. package/docs/integrations/attio/listFiles.md +51 -0
  49. package/docs/integrations/attio/listLists.md +28 -0
  50. package/docs/integrations/attio/listMeetings.md +63 -0
  51. package/docs/integrations/attio/listNotes.md +39 -0
  52. package/docs/integrations/attio/listObjects.md +26 -0
  53. package/docs/integrations/attio/listRecordAttributeValues.md +35 -0
  54. package/docs/integrations/attio/listRecordEntries.md +37 -0
  55. package/docs/integrations/attio/listRecords.md +55 -0
  56. package/docs/integrations/attio/listSelectOptions.md +35 -0
  57. package/docs/integrations/attio/listStatuses.md +37 -0
  58. package/docs/integrations/attio/listTasks.md +45 -0
  59. package/docs/integrations/attio/listThreads.md +51 -0
  60. package/docs/integrations/attio/listWebhooks.md +31 -0
  61. package/docs/integrations/attio/listWorkspaceMembers.md +27 -0
  62. package/docs/integrations/attio/overwriteEntry.md +42 -0
  63. package/docs/integrations/attio/overwriteRecord.md +41 -0
  64. package/docs/integrations/attio/searchRecords.md +40 -0
  65. package/docs/integrations/attio/updateAttribute.md +53 -0
  66. package/docs/integrations/attio/updateEntry.md +42 -0
  67. package/docs/integrations/attio/updateList.md +49 -0
  68. package/docs/integrations/attio/updateObject.md +40 -0
  69. package/docs/integrations/attio/updateRecord.md +41 -0
  70. package/docs/integrations/attio/updateSelectOption.md +40 -0
  71. package/docs/integrations/attio/updateStatus.md +47 -0
  72. package/docs/integrations/attio/updateTask.md +57 -0
  73. package/docs/integrations/attio/updateWebhook.md +41 -0
  74. package/docs/integrations/index.md +42 -0
  75. package/docs/services/ctx/index.md +10 -9
  76. package/docs/services/index.md +0 -1
  77. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -48,6 +48,16 @@ const CONFIG_PATH = path.join(CONFIG_DIR, "config.json");
48
48
  const AGENTS_IMPORT_LINE = "@orangeslice-docs/AGENTS.md";
49
49
  const CLAUDE_IMPORT_LINE = "@orangeslice-docs/CLAUDE.md";
50
50
  const SUPPORTED_RUNNERS = ["npm", "bun", "pnpm", "yarn"];
51
+ function getOwnVersion() {
52
+ try {
53
+ const pkgPath = path.join(__dirname, "..", "package.json");
54
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
55
+ return pkg.version || "latest";
56
+ }
57
+ catch {
58
+ return "latest";
59
+ }
60
+ }
51
61
  function isDir(p) {
52
62
  try {
53
63
  return fs.statSync(p).isDirectory();
@@ -58,10 +68,8 @@ function isDir(p) {
58
68
  }
59
69
  function resolveDocsDir() {
60
70
  const envSource = process.env.ORANGESLICE_DOCS_SOURCE?.trim();
61
- const home = process.env.HOME || "";
62
71
  const candidates = [
63
72
  envSource || "",
64
- home ? path.join(home, "Documents", "Dev", "nextjs-flask", "lib", "vfs", "sheet-chat") : "",
65
73
  path.join(process.cwd(), "lib", "vfs", "sheet-chat"),
66
74
  path.join(process.cwd(), "sheet-chat"),
67
75
  LEGACY_DOCS_DIR
@@ -126,13 +134,15 @@ function getRunnerCommand(packageManager, suffix = "") {
126
134
  return suffix ? `${command} ${suffix}` : command;
127
135
  }
128
136
  function getInstallCommand(packageManager) {
137
+ const version = getOwnVersion();
138
+ const spec = version === "latest" ? "orangeslice" : `orangeslice@${version}`;
129
139
  if (packageManager === "bun")
130
- return "bun add orangeslice";
140
+ return `bun add ${spec}`;
131
141
  if (packageManager === "pnpm")
132
- return "pnpm add orangeslice";
142
+ return `pnpm add ${spec}`;
133
143
  if (packageManager === "yarn")
134
- return "yarn add orangeslice";
135
- return "npm install orangeslice";
144
+ return `yarn add ${spec}`;
145
+ return `npm install ${spec}`;
136
146
  }
137
147
  function getSupportedRunnerExamples() {
138
148
  return SUPPORTED_RUNNERS.map((packageManager) => getRunnerCommand(packageManager));
@@ -321,14 +331,14 @@ function getStoredApiKey() {
321
331
  function openBrowser(url) {
322
332
  try {
323
333
  if (process.platform === "darwin") {
324
- (0, child_process_1.execSync)(`open "${url}"`, { stdio: "ignore" });
334
+ (0, child_process_1.execFileSync)("open", [url], { stdio: "ignore" });
325
335
  return;
326
336
  }
327
337
  if (process.platform === "win32") {
328
- (0, child_process_1.execSync)(`start "" "${url}"`, { stdio: "ignore", shell: "cmd.exe" });
338
+ (0, child_process_1.execFileSync)("cmd.exe", ["/c", "start", "", url], { stdio: "ignore" });
329
339
  return;
330
340
  }
331
- (0, child_process_1.execSync)(`xdg-open "${url}"`, { stdio: "ignore" });
341
+ (0, child_process_1.execFileSync)("xdg-open", [url], { stdio: "ignore" });
332
342
  }
333
343
  catch {
334
344
  console.log(` Open this URL in your browser:\n ${url}\n`);
package/dist/ctx.d.ts CHANGED
@@ -2,18 +2,16 @@
2
2
  * Spreadsheet context API for the orangeslice SDK.
3
3
  *
4
4
  * Usage:
5
- * import { services } from "orangeslice";
6
- * const { ctx } = services;
5
+ * import { ctx } from "orangeslice";
7
6
  *
8
7
  * const ss = await ctx.createSpreadsheet({ name: "Leads" });
9
8
  * await ctx.sql(ss.id, 'CREATE TABLE contacts (name, email, website)');
10
- * await ctx.sql(ss.id, "INSERT INTO contacts (name, email) VALUES ('Acme', 'hi@acme.com')");
11
9
  * const { rows } = await ctx.sql(ss.id, "SELECT * FROM contacts");
12
10
  *
13
11
  * // Or bind to a spreadsheet for convenience:
14
12
  * const bound = ctx.spreadsheet(ss.id);
15
13
  * await bound.sql("SELECT * FROM contacts WHERE name = 'Acme'");
16
- * await bound.sheet("contacts").addRow({ name: "Corp", email: "corp@example.com" });
14
+ * await bound.sheet("contacts").addRows({ name: "Corp", email: "corp@example.com" });
17
15
  */
18
16
  export interface Spreadsheet {
19
17
  id: string;
@@ -41,12 +39,20 @@ export interface SqlActionResult {
41
39
  name: string;
42
40
  }>;
43
41
  }
42
+ export interface RowsAddResult {
43
+ success: boolean;
44
+ rowCount: number;
45
+ rowIds: string[];
46
+ }
44
47
  export type SqlResult = SqlQueryResult | SqlActionResult;
45
48
  export declare const ctx: {
46
49
  createSpreadsheet: (opts: {
47
50
  name: string;
48
51
  }) => Promise<Spreadsheet>;
49
- listSpreadsheets: () => Promise<{
52
+ listSpreadsheets: (opts?: {
53
+ limit?: number;
54
+ offset?: number;
55
+ }) => Promise<{
50
56
  spreadsheets: SpreadsheetListItem[];
51
57
  }>;
52
58
  deleteSpreadsheet: (spreadsheetId: string) => Promise<{
@@ -56,8 +62,7 @@ export declare const ctx: {
56
62
  spreadsheet: (spreadsheetId: string) => {
57
63
  sql: (sql: string) => Promise<SqlResult>;
58
64
  sheet: (sheetName: string) => {
59
- addRow: (row: Record<string, unknown>) => Promise<SqlResult>;
60
- addRows: (rows: Record<string, unknown>[]) => Promise<SqlResult>;
65
+ addRows: (rows: Record<string, unknown> | Record<string, unknown>[]) => Promise<RowsAddResult>;
61
66
  };
62
67
  };
63
68
  };
package/dist/ctx.js CHANGED
@@ -3,58 +3,21 @@
3
3
  * Spreadsheet context API for the orangeslice SDK.
4
4
  *
5
5
  * Usage:
6
- * import { services } from "orangeslice";
7
- * const { ctx } = services;
6
+ * import { ctx } from "orangeslice";
8
7
  *
9
8
  * const ss = await ctx.createSpreadsheet({ name: "Leads" });
10
9
  * await ctx.sql(ss.id, 'CREATE TABLE contacts (name, email, website)');
11
- * await ctx.sql(ss.id, "INSERT INTO contacts (name, email) VALUES ('Acme', 'hi@acme.com')");
12
10
  * const { rows } = await ctx.sql(ss.id, "SELECT * FROM contacts");
13
11
  *
14
12
  * // Or bind to a spreadsheet for convenience:
15
13
  * const bound = ctx.spreadsheet(ss.id);
16
14
  * await bound.sql("SELECT * FROM contacts WHERE name = 'Acme'");
17
- * await bound.sheet("contacts").addRow({ name: "Corp", email: "corp@example.com" });
15
+ * await bound.sheet("contacts").addRows({ name: "Corp", email: "corp@example.com" });
18
16
  */
19
17
  Object.defineProperty(exports, "__esModule", { value: true });
20
18
  exports.ctx = void 0;
21
19
  const api_1 = require("./api");
22
20
  // ---------------------------------------------------------------------------
23
- // SQL builder helpers
24
- // ---------------------------------------------------------------------------
25
- function escapeValue(val) {
26
- if (val === null || val === undefined)
27
- return "NULL";
28
- if (typeof val === "number") {
29
- if (!Number.isFinite(val))
30
- throw new Error(`[orangeslice] Cannot use ${val} as a SQL value`);
31
- return String(val);
32
- }
33
- if (typeof val === "boolean")
34
- return String(val);
35
- const str = String(val).replace(/'/g, "''");
36
- return `'${str}'`;
37
- }
38
- function escapeName(name) {
39
- return `"${name.replace(/"/g, '""')}"`;
40
- }
41
- function buildInsertSQL(sheetName, rows) {
42
- if (rows.length === 0)
43
- throw new Error("[orangeslice] addRows requires at least one row");
44
- const allKeys = new Set();
45
- for (const row of rows) {
46
- for (const key of Object.keys(row))
47
- allKeys.add(key);
48
- }
49
- const columns = Array.from(allKeys);
50
- const colList = columns.map(escapeName).join(", ");
51
- const valueClauses = rows.map((row) => {
52
- const vals = columns.map((col) => escapeValue(row[col]));
53
- return `(${vals.join(", ")})`;
54
- });
55
- return `INSERT INTO ${escapeName(sheetName)} (${colList}) VALUES ${valueClauses.join(", ")}`;
56
- }
57
- // ---------------------------------------------------------------------------
58
21
  // Validation
59
22
  // ---------------------------------------------------------------------------
60
23
  function assertNotRun(sql) {
@@ -68,13 +31,10 @@ function assertNotRun(sql) {
68
31
  // ---------------------------------------------------------------------------
69
32
  function createSheetHandle(spreadsheetId, sheetName) {
70
33
  return {
71
- addRow: (row) => (0, api_1.post)("/ctx/sql", {
72
- spreadsheetId,
73
- sql: buildInsertSQL(sheetName, [row])
74
- }),
75
- addRows: (rows) => (0, api_1.post)("/ctx/sql", {
34
+ addRows: (rows) => (0, api_1.post)("/ctx/rows/add", {
76
35
  spreadsheetId,
77
- sql: buildInsertSQL(sheetName, rows)
36
+ sheetName,
37
+ rows: Array.isArray(rows) ? rows : [rows]
78
38
  })
79
39
  };
80
40
  }
@@ -92,7 +52,7 @@ function createSpreadsheetHandle(spreadsheetId) {
92
52
  // ---------------------------------------------------------------------------
93
53
  exports.ctx = {
94
54
  createSpreadsheet: (opts) => (0, api_1.post)("/ctx/spreadsheet/create", opts),
95
- listSpreadsheets: () => (0, api_1.post)("/ctx/spreadsheet/list", {}),
55
+ listSpreadsheets: (opts) => (0, api_1.post)("/ctx/spreadsheet/list", opts ?? {}),
96
56
  deleteSpreadsheet: (spreadsheetId) => (0, api_1.post)("/ctx/spreadsheet/delete", { spreadsheetId }),
97
57
  sql: (spreadsheetId, sql) => {
98
58
  assertNotRun(sql);
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { configure } from "./api";
2
2
  export type { OrangesliceConfig } from "./api";
3
3
  export { ctx } from "./ctx";
4
- export type { Spreadsheet, SpreadsheetListItem, SqlResult, SqlQueryResult, SqlActionResult } from "./ctx";
4
+ export type { Spreadsheet, SpreadsheetListItem, SqlResult, SqlQueryResult, SqlActionResult, RowsAddResult } from "./ctx";
5
5
  export { linkedinSearch } from "./b2b";
6
6
  export type { LinkedInSearchParams, LinkedInSearchResponse } from "./b2b";
7
7
  export { crunchbaseSearch } from "./crunchbase";
@@ -32,25 +32,6 @@ import { generateObject } from "./generateObject";
32
32
  import { googleMapsScrape } from "./googleMaps";
33
33
  import { webBatchSearch, webSearch } from "./serp";
34
34
  export declare const services: {
35
- ctx: {
36
- createSpreadsheet: (opts: {
37
- name: string;
38
- }) => Promise<import("./ctx").Spreadsheet>;
39
- listSpreadsheets: () => Promise<{
40
- spreadsheets: import("./ctx").SpreadsheetListItem[];
41
- }>;
42
- deleteSpreadsheet: (spreadsheetId: string) => Promise<{
43
- success: boolean;
44
- }>;
45
- sql: (spreadsheetId: string, sql: string) => Promise<import("./ctx").SqlResult>;
46
- spreadsheet: (spreadsheetId: string) => {
47
- sql: (sql: string) => Promise<import("./ctx").SqlResult>;
48
- sheet: (sheetName: string) => {
49
- addRow: (row: Record<string, unknown>) => Promise<import("./ctx").SqlResult>;
50
- addRows: (rows: Record<string, unknown>[]) => Promise<import("./ctx").SqlResult>;
51
- };
52
- };
53
- };
54
35
  crunchbase: {
55
36
  search: typeof crunchbaseSearch;
56
37
  };
package/dist/index.js CHANGED
@@ -41,7 +41,6 @@ const apify_2 = require("./apify");
41
41
  const b2b_2 = require("./b2b");
42
42
  const browser_2 = require("./browser");
43
43
  const crunchbase_2 = require("./crunchbase");
44
- const ctx_2 = require("./ctx");
45
44
  const expansion_2 = require("./expansion");
46
45
  const firecrawl_2 = require("./firecrawl");
47
46
  const generateObject_2 = require("./generateObject");
@@ -49,7 +48,6 @@ const googleMaps_2 = require("./googleMaps");
49
48
  const predictLeads_2 = require("./predictLeads");
50
49
  const serp_2 = require("./serp");
51
50
  exports.services = {
52
- ctx: ctx_2.ctx,
53
51
  crunchbase: {
54
52
  search: crunchbase_2.crunchbaseSearch
55
53
  },
@@ -0,0 +1,44 @@
1
+ # assertEntry
2
+
3
+ Create or update a list entry by parent record. If an entry with the specified parent record exists, it is updated. If not found, a new entry is created.
4
+
5
+ ```typescript
6
+ // Attribute slugs in entry_values depend on your list's configuration
7
+ const result = await integrations.attio.assertEntry({
8
+ list_id: "list_01abc123def456",
9
+ data: {
10
+ parent_record_id: "rec_01abc123def456",
11
+ parent_object: "companies",
12
+ entry_values: {
13
+ // Use your list's attribute api_slugs (e.g. "stage", "priority", etc.)
14
+ },
15
+ },
16
+ });
17
+ ```
18
+
19
+ ## Input
20
+
21
+ ```typescript
22
+ {
23
+ list_id: string;
24
+ data: {
25
+ parent_record_id: string;
26
+ parent_object: string;
27
+ entry_values: Record<string, any>;
28
+ };
29
+ }
30
+ ```
31
+
32
+ ## Output
33
+
34
+ ```typescript
35
+ {
36
+ data: {
37
+ id: { workspace_id: string; entry_id: string; list_id: string };
38
+ parent_record_id: string;
39
+ parent_object: string;
40
+ created_at: string;
41
+ entry_values: Record<string, Array<{ active_from?: string; active_until?: string | null; attribute_type?: string; [key: string]: any }>>;
42
+ };
43
+ }
44
+ ```
@@ -0,0 +1,51 @@
1
+ # assertRecord
2
+
3
+ Create or update a record by matching attribute (upsert). If a record with the same value for matching_attribute exists, it is updated. Otherwise a new record is created.
4
+
5
+ ```typescript
6
+ const result = await integrations.attio.assertRecord({
7
+ object: "people",
8
+ matching_attribute: "email_addresses",
9
+ data: {
10
+ values: {
11
+ email_addresses: [{ email_address: "jane@acme.com" }],
12
+ name: [{ first_name: "Jane", last_name: "Smith", full_name: "Jane Smith" }],
13
+ job_title: "CTO"
14
+ }
15
+ }
16
+ });
17
+ ```
18
+
19
+ ## Input
20
+
21
+ ```typescript
22
+ {
23
+ object: string;
24
+ matching_attribute: string;
25
+ data: {
26
+ values: Record<string, any>;
27
+ }
28
+ }
29
+ ```
30
+
31
+ `object` is a path parameter. `matching_attribute` is sent as a query parameter. The `data` wrapper is sent as the request body.
32
+
33
+ ## Output
34
+
35
+ ```typescript
36
+ {
37
+ data: {
38
+ id: {
39
+ workspace_id: string;
40
+ object_id: string;
41
+ record_id: string;
42
+ }
43
+ created_at: string;
44
+ web_url: string;
45
+ values: Record<
46
+ string,
47
+ Array<{ active_from?: string; active_until?: string | null; attribute_type?: string; [key: string]: any }>
48
+ >;
49
+ }
50
+ }
51
+ ```
@@ -0,0 +1,59 @@
1
+ # createAttribute
2
+
3
+ Create an attribute on an object or list.
4
+
5
+ ```typescript
6
+ const result = await integrations.attio.createAttribute({
7
+ target: "objects",
8
+ target_identifier: "companies",
9
+ data: {
10
+ title: "Annual Revenue",
11
+ description: "Company annual revenue in USD",
12
+ api_slug: "annual_revenue",
13
+ type: "number",
14
+ is_required: false,
15
+ is_unique: false,
16
+ is_multiselect: false,
17
+ config: { currency: "USD" },
18
+ },
19
+ });
20
+ ```
21
+
22
+ ## Input
23
+
24
+ ```typescript
25
+ {
26
+ target: "objects" | "lists";
27
+ target_identifier: string;
28
+ data: {
29
+ title: string;
30
+ description: string | null;
31
+ api_slug: string;
32
+ type: string;
33
+ is_required: boolean;
34
+ is_unique: boolean;
35
+ is_multiselect: boolean;
36
+ config: Record<string, any>;
37
+ default_value?: any;
38
+ relationship?: Record<string, any>;
39
+ };
40
+ }
41
+ ```
42
+
43
+ ## Output
44
+
45
+ ```typescript
46
+ {
47
+ data: {
48
+ id: { attribute_id: string; object_id?: string; list_id?: string };
49
+ title: string;
50
+ api_slug: string;
51
+ type: string;
52
+ is_required: boolean;
53
+ is_unique: boolean;
54
+ is_multiselect: boolean;
55
+ is_writable: boolean;
56
+ created_at: string;
57
+ };
58
+ }
59
+ ```
@@ -0,0 +1,60 @@
1
+ # createComment
2
+
3
+ Create a comment on a record, entry, or as a reply to a thread. Requires an author (workspace member).
4
+
5
+ ```typescript
6
+ // Reply to a thread
7
+ const reply = await integrations.attio.createComment({
8
+ data: {
9
+ format: "plaintext",
10
+ content: "Good point — let's circle back after the demo.",
11
+ author: { type: "workspace-member", id: "wm_01abc123def456" },
12
+ thread_id: "thr_01xyz789ghi012",
13
+ },
14
+ });
15
+
16
+ // Comment on a record
17
+ const recordComment = await integrations.attio.createComment({
18
+ data: {
19
+ format: "plaintext",
20
+ content: "Reached out via email, waiting on response.",
21
+ author: { type: "workspace-member", id: "wm_01abc123def456" },
22
+ record: { object: "companies", record_id: "rec_01abc123def456" },
23
+ },
24
+ });
25
+
26
+ // Comment on a list entry
27
+ const entryComment = await integrations.attio.createComment({
28
+ data: {
29
+ format: "plaintext",
30
+ content: "Moved to negotiation stage after last call.",
31
+ author: { type: "workspace-member", id: "wm_01abc123def456" },
32
+ entry: { list: "sales_pipeline", entry_id: "ent_01abc123def456" },
33
+ },
34
+ });
35
+ ```
36
+
37
+ ## Input
38
+
39
+ ```typescript
40
+ {
41
+ data:
42
+ | { format: "plaintext"; content: string; author: { type: "workspace-member"; id: string }; created_at?: string; thread_id: string }
43
+ | { format: "plaintext"; content: string; author: { type: "workspace-member"; id: string }; created_at?: string; record: { object: string; record_id: string } }
44
+ | { format: "plaintext"; content: string; author: { type: "workspace-member"; id: string }; created_at?: string; entry: { list: string; entry_id: string } }
45
+ }
46
+ ```
47
+
48
+ ## Output
49
+
50
+ ```typescript
51
+ {
52
+ data: {
53
+ id: { comment_id: string };
54
+ thread_id: string;
55
+ content_plaintext: string;
56
+ created_at: string;
57
+ author: { type: string; id: string | null };
58
+ };
59
+ }
60
+ ```
@@ -0,0 +1,44 @@
1
+ # createEntry
2
+
3
+ Add a record to a list as a new entry.
4
+
5
+ ```typescript
6
+ // Attribute slugs in entry_values depend on your list's configuration
7
+ const result = await integrations.attio.createEntry({
8
+ list_id: "list_01abc123def456",
9
+ data: {
10
+ parent_record_id: "rec_01abc123def456",
11
+ parent_object: "companies",
12
+ entry_values: {
13
+ // Use your list's attribute api_slugs (e.g. "stage", "notes", etc.)
14
+ },
15
+ },
16
+ });
17
+ ```
18
+
19
+ ## Input
20
+
21
+ ```typescript
22
+ {
23
+ list_id: string;
24
+ data: {
25
+ parent_record_id: string;
26
+ parent_object: string;
27
+ entry_values: Record<string, any>;
28
+ };
29
+ }
30
+ ```
31
+
32
+ ## Output
33
+
34
+ ```typescript
35
+ {
36
+ data: {
37
+ id: { workspace_id: string; entry_id: string; list_id: string };
38
+ parent_record_id: string;
39
+ parent_object: string;
40
+ created_at: string;
41
+ entry_values: Record<string, Array<{ active_from?: string; active_until?: string | null; attribute_type?: string; [key: string]: any }>>;
42
+ };
43
+ }
44
+ ```
@@ -0,0 +1,58 @@
1
+ # createFolder
2
+
3
+ Create a folder on a record.
4
+
5
+ ```typescript
6
+ const result = await integrations.attio.createFolder({
7
+ data: {
8
+ object: "companies",
9
+ record_id: "rec_01abc123def456",
10
+ file_type: "folder",
11
+ name: "Contracts",
12
+ },
13
+ });
14
+
15
+ // Create a nested folder
16
+ const nested = await integrations.attio.createFolder({
17
+ data: {
18
+ object: "companies",
19
+ record_id: "rec_01abc123def456",
20
+ file_type: "folder",
21
+ name: "2025 Renewals",
22
+ parent_folder_id: "fil_01xyz789ghi012",
23
+ },
24
+ });
25
+ ```
26
+
27
+ ## Input
28
+
29
+ ```typescript
30
+ {
31
+ data: {
32
+ object: string;
33
+ record_id: string;
34
+ file_type: "folder";
35
+ name: string;
36
+ parent_folder_id?: string;
37
+ };
38
+ }
39
+ ```
40
+
41
+ ## Output
42
+
43
+ ```typescript
44
+ {
45
+ data: {
46
+ id: { file_id: string };
47
+ name: string;
48
+ type: "file" | "folder";
49
+ mime_type: string | null;
50
+ size: number | null;
51
+ parent_folder_id: string | null;
52
+ record_id: string;
53
+ object_id: string;
54
+ storage_provider: string;
55
+ created_at: string;
56
+ };
57
+ }
58
+ ```
@@ -0,0 +1,51 @@
1
+ # createList
2
+
3
+ Create a new list.
4
+
5
+ ```typescript
6
+ const result = await integrations.attio.createList({
7
+ data: {
8
+ name: "Enterprise Prospects",
9
+ api_slug: "enterprise_prospects",
10
+ parent_object: "companies",
11
+ workspace_access: "full-access",
12
+ workspace_member_access: [
13
+ { workspace_member_id: "wm_01abc123", level: "full-access" },
14
+ { workspace_member_id: "wm_01def456", level: "read-only" },
15
+ ],
16
+ },
17
+ });
18
+ ```
19
+
20
+ ## Input
21
+
22
+ ```typescript
23
+ {
24
+ data: {
25
+ name: string;
26
+ api_slug: string;
27
+ parent_object: string;
28
+ workspace_access: string | null;
29
+ workspace_member_access: Array<{
30
+ workspace_member_id: string;
31
+ level: "full-access" | "read-and-write" | "read-only";
32
+ }>;
33
+ };
34
+ }
35
+ ```
36
+
37
+ ## Output
38
+
39
+ ```typescript
40
+ {
41
+ data: {
42
+ id: { list_id: string; workspace_id: string };
43
+ api_slug: string;
44
+ name: string;
45
+ parent_object: string[];
46
+ workspace_access: string;
47
+ created_by_actor: { type: string; id: string | null };
48
+ created_at: string;
49
+ };
50
+ }
51
+ ```
@@ -0,0 +1,47 @@
1
+ # createNote
2
+
3
+ Create a note on a record.
4
+
5
+ ```typescript
6
+ const result = await integrations.attio.createNote({
7
+ data: {
8
+ parent_object: "companies",
9
+ parent_record_id: "rec_01abc123def456",
10
+ title: "Discovery Call Notes",
11
+ format: "plaintext",
12
+ content: "Discussed pricing tiers and implementation timeline. Decision maker is VP of Engineering. Follow up next Tuesday.",
13
+ },
14
+ });
15
+ ```
16
+
17
+ ## Input
18
+
19
+ ```typescript
20
+ {
21
+ data: {
22
+ parent_object: string;
23
+ parent_record_id: string;
24
+ title: string;
25
+ format: "plaintext" | "markdown";
26
+ content: string;
27
+ created_at?: string;
28
+ meeting_id?: string | null;
29
+ };
30
+ }
31
+ ```
32
+
33
+ ## Output
34
+
35
+ ```typescript
36
+ {
37
+ data: {
38
+ id: { note_id: string };
39
+ parent_object: string;
40
+ parent_record_id: string;
41
+ title: string;
42
+ content_plaintext: string;
43
+ created_at: string;
44
+ created_by_actor: { type: string; id: string | null };
45
+ };
46
+ }
47
+ ```