@wirecat/attio-cli 0.7.0 → 0.8.0
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.
- package/CHANGELOG.md +11 -0
- package/README.md +2 -2
- package/dist/activities.d.ts.map +1 -1
- package/dist/activities.js +2 -1
- package/dist/activities.js.map +1 -1
- package/dist/bin/attio.js +2 -2
- package/dist/bundle/attio.js +2 -2
- package/dist/bundle/{chunk-X5UPBSTP.js → chunk-UXJZISVL.js} +1 -1
- package/dist/bundle/{program-F37JH2SO.js → program-Z5NUNXME.js} +299 -207
- package/dist/hooks.d.ts +1 -8
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +50 -49
- package/dist/hooks.js.map +1 -1
- package/dist/links.d.ts +10 -0
- package/dist/links.d.ts.map +1 -0
- package/dist/links.js +7 -0
- package/dist/links.js.map +1 -0
- package/dist/meetings.d.ts +57 -0
- package/dist/meetings.d.ts.map +1 -0
- package/dist/meetings.js +96 -0
- package/dist/meetings.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/skills/attio-cli/SKILL.md +3 -1
package/dist/hooks.d.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import type { CrmActivity, CrmKind } from "@wirecat/cli-core";
|
|
2
2
|
import type { CrmManifestHooks } from "@wirecat/cli-core/crm";
|
|
3
|
-
type Actor
|
|
4
|
-
referenced_actor_type?: string;
|
|
5
|
-
referenced_actor_id?: string;
|
|
6
|
-
type?: string;
|
|
7
|
-
id?: string;
|
|
8
|
-
} | undefined;
|
|
3
|
+
import { type Actor } from "./links.js";
|
|
9
4
|
export type Note = {
|
|
10
5
|
id: {
|
|
11
6
|
note_id: string;
|
|
@@ -32,9 +27,7 @@ export type Task = {
|
|
|
32
27
|
assignees: Actor[];
|
|
33
28
|
created_at: string;
|
|
34
29
|
};
|
|
35
|
-
export declare const KINDS: Record<string, CrmKind>;
|
|
36
30
|
export declare const noteActivity: (note: Note) => CrmActivity;
|
|
37
31
|
export declare const taskActivity: (task: Task, objects: Map<string, CrmKind>) => CrmActivity;
|
|
38
32
|
export declare const hooks: CrmManifestHooks;
|
|
39
|
-
export {};
|
|
40
33
|
//# sourceMappingURL=hooks.d.ts.map
|
package/dist/hooks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,EAAE,KAAK,KAAK,EAAiB,MAAM,YAAY,CAAA;AAetD,MAAM,MAAM,IAAI,GAAG;IACjB,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,MAAM,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,gBAAgB,CAAC,EAAE,KAAK,CAAA;IACxB,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AACD,MAAM,MAAM,IAAI,GAAG;IACjB,EAAE,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,YAAY,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,cAAc,EAAE;QAAE,gBAAgB,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACxE,SAAS,EAAE,KAAK,EAAE,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAKD,eAAO,MAAM,YAAY,SAAU,IAAI,KAAG,WAczC,CAAA;AAED,eAAO,MAAM,YAAY,SAAU,IAAI,WAAW,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,WAkBxE,CAAA;AAKD,eAAO,MAAM,KAAK,EAAE,gBA8DnB,CAAA"}
|
package/dist/hooks.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { CliError } from "@wirecat/cli-base";
|
|
2
|
+
import { KINDS, member } from "./links.js";
|
|
3
|
+
import { meetingsPage } from "./meetings.js";
|
|
2
4
|
// Attio's description is a system attribute, so the account's own fields leave it out; an agent asking about what a
|
|
3
5
|
// client does finds it only here.
|
|
4
6
|
const described = (record, raw) => {
|
|
@@ -8,14 +10,8 @@ const described = (record, raw) => {
|
|
|
8
10
|
? { ...record, metadata: { ...record.metadata, description: { label: "Description", value: text } } }
|
|
9
11
|
: record;
|
|
10
12
|
};
|
|
11
|
-
export const KINDS = { deals: "deal", people: "person", companies: "organization" };
|
|
12
13
|
const NOTES_PAGE = 50;
|
|
13
14
|
const TASKS_PAGE = 200;
|
|
14
|
-
const member = (actor) => actor?.referenced_actor_type === "workspace-member"
|
|
15
|
-
? actor.referenced_actor_id
|
|
16
|
-
: actor?.type === "workspace-member"
|
|
17
|
-
? actor.id
|
|
18
|
-
: null;
|
|
19
15
|
export const noteActivity = (note) => {
|
|
20
16
|
const at = Date.parse(note.created_at);
|
|
21
17
|
const kind = KINDS[note.parent_object];
|
|
@@ -52,50 +48,55 @@ export const taskActivity = (task, objects) => {
|
|
|
52
48
|
};
|
|
53
49
|
const refused = (error) => error instanceof CliError && (error.code === "permission_error" || typeof error.details?.scope === "string");
|
|
54
50
|
export const hooks = {
|
|
55
|
-
// Attio's notes
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
extend: (_base, { call }) =>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return (
|
|
51
|
+
// Attio's notes, tasks and meetings are read whole at every sync, as every record is, and the last page of meetings
|
|
52
|
+
// says so: one stored and no longer listed was deleted. A token may have one of their scopes and not another: the
|
|
53
|
+
// list it may not read is a gap, the others are still read, and the gap keeps the sync from removing any.
|
|
54
|
+
extend: (_base, { call }) => {
|
|
55
|
+
const run = {};
|
|
56
|
+
return {
|
|
57
|
+
activities: async (_since, page, context) => {
|
|
58
|
+
const cursor = page ?? "notes:0";
|
|
59
|
+
const list = cursor.slice(0, cursor.indexOf(":"));
|
|
60
|
+
const at = cursor.slice(cursor.indexOf(":") + 1);
|
|
61
|
+
if (list === "meetings")
|
|
62
|
+
return meetingsPage(call, at, run, context);
|
|
63
|
+
const offset = Number(at);
|
|
64
|
+
const query = (limit) => ({ limit: String(limit), offset: String(offset) });
|
|
65
|
+
const input = { path: {}, headers: {}, fields: {} };
|
|
66
|
+
const read = async (operation, limit, scope) => {
|
|
67
|
+
try {
|
|
68
|
+
return (await call(operation, { ...input, query: query(limit) })).data;
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
if (!refused(error))
|
|
72
|
+
throw error;
|
|
73
|
+
context?.gap({ kind: "activities", scope, message: `${scope} scope missing: no ${list} were read` });
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
if (list === "notes") {
|
|
78
|
+
const data = await read("getV2Notes", NOTES_PAGE, "note:read");
|
|
79
|
+
const next = !data || data.length < NOTES_PAGE ? "tasks:0" : `notes:${offset + NOTES_PAGE}`;
|
|
80
|
+
return { items: (data ?? []).map(noteActivity), hasMore: true, nextCursor: next };
|
|
67
81
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const
|
|
78
|
-
return {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const { data: types } = (await call("getV2Objects", { ...input, query: {} }));
|
|
87
|
-
const objects = new Map(types.flatMap((one) => {
|
|
88
|
-
const kind = KINDS[one.api_slug];
|
|
89
|
-
return kind ? [[one.id.object_id, kind]] : [];
|
|
90
|
-
}));
|
|
91
|
-
const more = data.length === TASKS_PAGE;
|
|
92
|
-
return {
|
|
93
|
-
items: data.map((task) => taskActivity(task, objects)),
|
|
94
|
-
hasMore: more,
|
|
95
|
-
...(more ? { nextCursor: `tasks:${offset + TASKS_PAGE}` } : { listedAll: true }),
|
|
96
|
-
};
|
|
97
|
-
},
|
|
98
|
-
}),
|
|
82
|
+
const data = await read("getV2Tasks", TASKS_PAGE, "task:read");
|
|
83
|
+
if (!data?.length)
|
|
84
|
+
return { items: [], hasMore: true, nextCursor: "meetings:" };
|
|
85
|
+
context?.spend();
|
|
86
|
+
const { data: types } = (await call("getV2Objects", { ...input, query: {} }));
|
|
87
|
+
const objects = new Map(types.flatMap((one) => {
|
|
88
|
+
const kind = KINDS[one.api_slug];
|
|
89
|
+
return kind ? [[one.id.object_id, kind]] : [];
|
|
90
|
+
}));
|
|
91
|
+
const more = data.length === TASKS_PAGE;
|
|
92
|
+
return {
|
|
93
|
+
items: data.map((task) => taskActivity(task, objects)),
|
|
94
|
+
hasMore: true,
|
|
95
|
+
nextCursor: more ? `tasks:${offset + TASKS_PAGE}` : "meetings:",
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
},
|
|
99
100
|
after: { organization: described, person: described },
|
|
100
101
|
// Attio's stages carry no outcome. A won one is celebrated or named so, since a workspace may turn the celebration
|
|
101
102
|
// off; a lost one has only its title to tell it. A new workspace's deal stages are Lead, In Progress, Won 🎉 and Lost.
|
package/dist/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAG5C,OAAO,EAAc,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACtD,OAAO,EAAoB,YAAY,EAAE,MAAM,eAAe,CAAA;AAE9D,oHAAoH;AACpH,kCAAkC;AAClC,MAAM,SAAS,GAAG,CAAkC,MAAS,EAAE,GAAY,EAAK,EAAE;IAChF,MAAM,CAAC,KAAK,CAAC,GAAG,CAAE,GAA4D,CAAC,MAAM,EAAE,WAAW,IAAI,EAAE,CAErG,CAAA;IACH,MAAM,IAAI,GAAG,OAAO,KAAK,EAAE,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IACvE,OAAO,IAAI;QACT,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;QACrG,CAAC,CAAC,MAAM,CAAA;AACZ,CAAC,CAAA;AAsBD,MAAM,UAAU,GAAG,EAAE,CAAA;AACrB,MAAM,UAAU,GAAG,GAAG,CAAA;AAEtB,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAU,EAAe,EAAE;IACtD,MAAM,EAAE,GAAG,IAAI,CAAC,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E,CAAC,CAAC,CAAC,WAAW;iBAChE,CAAA;YACH,CAAC;SACF,CAAA;IACH,CAAC;IACD,KAAK,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;IACrD,mHAAmH;IACnH,uHAAuH;IACvH,SAAS,EAAE;QACT,IAAI,EAAE;YACJ,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE;gBAC3B,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;gBACjC,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;oBAAE,OAAO,MAAM,CAAA;gBAC1C,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;YAC/C,CAAC;SACF;KACF;CACF,CAAA"}
|
package/dist/links.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CrmKind } from "@wirecat/cli-core";
|
|
2
|
+
export type Actor = {
|
|
3
|
+
referenced_actor_type?: string;
|
|
4
|
+
referenced_actor_id?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
} | undefined;
|
|
8
|
+
export declare const KINDS: Record<string, CrmKind>;
|
|
9
|
+
export declare const member: (actor: Actor) => string | null | undefined;
|
|
10
|
+
//# sourceMappingURL=links.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../src/links.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAEhD,MAAM,MAAM,KAAK,GACb;IAAE,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5F,SAAS,CAAA;AAEb,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAkE,CAAA;AAE5G,eAAO,MAAM,MAAM,UAAW,KAAK,8BAKvB,CAAA"}
|
package/dist/links.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const KINDS = { deals: "deal", people: "person", companies: "organization" };
|
|
2
|
+
export const member = (actor) => actor?.referenced_actor_type === "workspace-member"
|
|
3
|
+
? actor.referenced_actor_id
|
|
4
|
+
: actor?.type === "workspace-member"
|
|
5
|
+
? actor.id
|
|
6
|
+
: null;
|
|
7
|
+
//# sourceMappingURL=links.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"links.js","sourceRoot":"","sources":["../src/links.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,KAAK,GAA4B,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,CAAA;AAE5G,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAY,EAAE,EAAE,CACrC,KAAK,EAAE,qBAAqB,KAAK,kBAAkB;IACjD,CAAC,CAAC,KAAK,CAAC,mBAAmB;IAC3B,CAAC,CAAC,KAAK,EAAE,IAAI,KAAK,kBAAkB;QAClC,CAAC,CAAC,KAAK,CAAC,EAAE;QACV,CAAC,CAAC,IAAI,CAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { CrmActivity } from "@wirecat/cli-core";
|
|
2
|
+
import type { CrmCallContext, CrmManifestActivities } from "@wirecat/cli-core/crm";
|
|
3
|
+
type Send = Parameters<CrmManifestActivities["create"]>[1];
|
|
4
|
+
export type Meeting = {
|
|
5
|
+
id: {
|
|
6
|
+
meeting_id: string;
|
|
7
|
+
};
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
start: {
|
|
11
|
+
datetime?: string;
|
|
12
|
+
date?: string;
|
|
13
|
+
};
|
|
14
|
+
linked_records: {
|
|
15
|
+
object_slug: string;
|
|
16
|
+
record_id: string;
|
|
17
|
+
}[];
|
|
18
|
+
created_at: string;
|
|
19
|
+
created_by_actor?: {
|
|
20
|
+
type?: string;
|
|
21
|
+
id?: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export type Segment = {
|
|
25
|
+
speech: string;
|
|
26
|
+
speaker?: {
|
|
27
|
+
name?: string | null;
|
|
28
|
+
} | null;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* One meeting with what was said in its recorded calls. Attio links a meeting to the people and companies who took
|
|
32
|
+
* part and to a deal only by hand, so it also goes on the deals of those people and companies: a deal's search reads
|
|
33
|
+
* the activities on the deal alone.
|
|
34
|
+
*/
|
|
35
|
+
export declare const meetingActivity: (meeting: Meeting, transcripts: readonly Segment[][], dealsOf: ReadonlyMap<string, readonly string[]>) => CrmActivity;
|
|
36
|
+
export interface MeetingsRun {
|
|
37
|
+
scopes?: Promise<Set<string>>;
|
|
38
|
+
dealsOf?: Promise<Map<string, string[]>>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A page of meetings, each with the transcripts of its finished recordings. A token without `meeting:read` reads none
|
|
42
|
+
* and reports no gap: tokens made for notes and tasks lack it, and a gap would stop every sync from removing a note
|
|
43
|
+
* or a task deleted in Attio. Without `call_recording:read` the meetings come without what was said.
|
|
44
|
+
*/
|
|
45
|
+
export declare const meetingsPage: (send: Send, cursor: string, run: MeetingsRun, context?: CrmCallContext) => Promise<{
|
|
46
|
+
items: CrmActivity[];
|
|
47
|
+
hasMore: boolean;
|
|
48
|
+
nextCursor: string;
|
|
49
|
+
listedAll?: undefined;
|
|
50
|
+
} | {
|
|
51
|
+
nextCursor?: undefined;
|
|
52
|
+
items: CrmActivity[];
|
|
53
|
+
hasMore: boolean;
|
|
54
|
+
listedAll: boolean;
|
|
55
|
+
}>;
|
|
56
|
+
export {};
|
|
57
|
+
//# source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AAE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;CACzC;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,SAAgB,IAAI,UAAU,MAAM,OAAO,WAAW,YAAY,cAAc;;;;;;;;;;EAuCxG,CAAA"}
|
package/dist/meetings.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { KINDS, member } from "./links.js";
|
|
2
|
+
const MEETINGS_PAGE = 50;
|
|
3
|
+
const DEALS_PAGE = 500;
|
|
4
|
+
const lines = (segments) => segments.map(({ speech, speaker }) => (speaker?.name ? `${speaker.name}: ${speech}` : speech)).join("\n");
|
|
5
|
+
/**
|
|
6
|
+
* One meeting with what was said in its recorded calls. Attio links a meeting to the people and companies who took
|
|
7
|
+
* part and to a deal only by hand, so it also goes on the deals of those people and companies: a deal's search reads
|
|
8
|
+
* the activities on the deal alone.
|
|
9
|
+
*/
|
|
10
|
+
export const meetingActivity = (meeting, transcripts, dealsOf) => {
|
|
11
|
+
const at = Date.parse(meeting.start.datetime ?? meeting.start.date ?? meeting.created_at);
|
|
12
|
+
const on = new Map();
|
|
13
|
+
for (const link of meeting.linked_records) {
|
|
14
|
+
const kind = KINDS[link.object_slug];
|
|
15
|
+
if (!kind)
|
|
16
|
+
continue;
|
|
17
|
+
on.set(`${kind}:${link.record_id}`, { kind, externalId: link.record_id });
|
|
18
|
+
for (const deal of dealsOf.get(link.record_id) ?? [])
|
|
19
|
+
on.set(`deal:${deal}`, { kind: "deal", externalId: deal });
|
|
20
|
+
}
|
|
21
|
+
const body = [meeting.description?.trim(), ...transcripts.map(lines)].filter(Boolean).join("\n\n");
|
|
22
|
+
return {
|
|
23
|
+
externalId: `meeting:${meeting.id.meeting_id}`,
|
|
24
|
+
kind: "meeting",
|
|
25
|
+
subject: meeting.title ?? "",
|
|
26
|
+
body: body || null,
|
|
27
|
+
done: true,
|
|
28
|
+
assignee: member(meeting.created_by_actor) ?? null,
|
|
29
|
+
createdAt: at,
|
|
30
|
+
updatedAt: at,
|
|
31
|
+
on: [...on.values()],
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
const current = (entries) => (entries ?? []).flatMap((one) => one.active_until == null && one.target_record_id ? [one.target_record_id] : []);
|
|
35
|
+
/** Each person's and company's deals, as the deals name them. */
|
|
36
|
+
const dealsByContact = async (send, context) => {
|
|
37
|
+
const found = new Map();
|
|
38
|
+
for (let offset = 0;; offset += DEALS_PAGE) {
|
|
39
|
+
context?.spend();
|
|
40
|
+
const { data } = (await send("postV2ObjectsByObjectRecordsQuery", {
|
|
41
|
+
path: { object: "deals" },
|
|
42
|
+
query: {},
|
|
43
|
+
headers: {},
|
|
44
|
+
fields: {},
|
|
45
|
+
body: JSON.stringify({ limit: DEALS_PAGE, offset, sorts: [{ direction: "desc", attribute: "created_at" }] }),
|
|
46
|
+
}));
|
|
47
|
+
for (const deal of data)
|
|
48
|
+
for (const contact of [...current(deal.values.associated_people), ...current(deal.values.associated_company)])
|
|
49
|
+
found.set(contact, [...(found.get(contact) ?? []), deal.id.record_id]);
|
|
50
|
+
if (data.length < DEALS_PAGE)
|
|
51
|
+
return found;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* A page of meetings, each with the transcripts of its finished recordings. A token without `meeting:read` reads none
|
|
56
|
+
* and reports no gap: tokens made for notes and tasks lack it, and a gap would stop every sync from removing a note
|
|
57
|
+
* or a task deleted in Attio. Without `call_recording:read` the meetings come without what was said.
|
|
58
|
+
*/
|
|
59
|
+
export const meetingsPage = async (send, cursor, run, context) => {
|
|
60
|
+
const input = { path: {}, headers: {}, fields: {} };
|
|
61
|
+
run.scopes ??= send("getV2Self", { ...input, query: {} }).then((self) => new Set(String(self.scope ?? "").split(/\s+/)));
|
|
62
|
+
const scopes = await run.scopes;
|
|
63
|
+
if (!scopes.has("meeting:read") && !scopes.has("meeting:read-write"))
|
|
64
|
+
return { items: [], hasMore: false, listedAll: true };
|
|
65
|
+
const recordings = scopes.has("call_recording:read") || scopes.has("call_recording:read-write");
|
|
66
|
+
run.dealsOf ??= dealsByContact(send, context);
|
|
67
|
+
const dealsOf = await run.dealsOf;
|
|
68
|
+
context?.spend();
|
|
69
|
+
const page = (await send("getV2Meetings", {
|
|
70
|
+
...input,
|
|
71
|
+
query: { limit: String(MEETINGS_PAGE), ...(cursor ? { cursor } : {}) },
|
|
72
|
+
}));
|
|
73
|
+
const items = [];
|
|
74
|
+
for (const meeting of page.data) {
|
|
75
|
+
const transcripts = [];
|
|
76
|
+
if (recordings) {
|
|
77
|
+
const path = { meeting_id: meeting.id.meeting_id };
|
|
78
|
+
context?.spend();
|
|
79
|
+
const { data } = (await send("getV2MeetingsByMeetingIdCallRecordings", { ...input, path, query: {} }));
|
|
80
|
+
for (const recording of data.filter((one) => one.status === "completed")) {
|
|
81
|
+
context?.spend();
|
|
82
|
+
const { data: full } = (await send("getV2MeetingsByMeetingIdCallRecordingsByCallRecordingId", {
|
|
83
|
+
...input,
|
|
84
|
+
path: { ...path, call_recording_id: recording.id.call_recording_id },
|
|
85
|
+
query: {},
|
|
86
|
+
}));
|
|
87
|
+
if (full.transcript?.segments.length)
|
|
88
|
+
transcripts.push(full.transcript.segments);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
items.push(meetingActivity(meeting, transcripts, dealsOf));
|
|
92
|
+
}
|
|
93
|
+
const next = page.pagination.next_cursor;
|
|
94
|
+
return next ? { items, hasMore: true, nextCursor: `meetings:${next}` } : { items, hasMore: false, listedAll: true };
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=meetings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meetings.js","sourceRoot":"","sources":["../src/meetings.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,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,SAAS,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,KAAK,WAAW,CAAC,EAAE,CAAC;gBACzE,OAAO,EAAE,KAAK,EAAE,CAAA;gBAChB,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,MAAM,IAAI,CAAC,yDAAyD,EAAE;oBAC5F,GAAG,KAAK;oBACR,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,iBAAiB,EAAE,SAAS,CAAC,EAAE,CAAC,iBAAiB,EAAE;oBACpE,KAAK,EAAE,EAAE;iBACV,CAAC,CAAwB,CAAA;gBAC1B,IAAI,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM;oBAAE,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;YAClF,CAAC;QACH,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,CAAA;IAC5D,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,CAAA;IACxC,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,CAAA;AACrH,CAAC,CAAA"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.8.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "0.
|
|
1
|
+
export const VERSION = "0.8.0";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -51,7 +51,9 @@ unless the task says.
|
|
|
51
51
|
something is not there, search in other words, and `sync` if the store is old.
|
|
52
52
|
- **Notes and tasks.** With the owner's `activities` setting on, `deals show` lists a deal's notes and tasks and
|
|
53
53
|
`search all` finds a deal by the words of its notes, and by their meaning after `sync --embed`; `activities list`
|
|
54
|
-
lists them.
|
|
54
|
+
lists them. Meetings come the same way, with what was said in their recorded calls, on the deals of the people and
|
|
55
|
+
companies who took part. Without it, or for a note on no kept deal, read them through `api notes-list`,
|
|
56
|
+
`api tasks-list` and `api meetings-list`.
|
|
55
57
|
Only the owner turns the setting on.
|
|
56
58
|
- **Ask by meaning before reading every note.** "Who complained the launch slipped" or "who got a cheaper offer" is
|
|
57
59
|
one `search all "<the question in plain words>" --json`: with the `activities` setting on, it finds deals by what
|