@attrove/sdk 0.1.8 → 0.1.9
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/README.md +52 -0
- package/cjs/admin-client.js +0 -22
- package/cjs/client.js +2 -74
- package/cjs/constants.js +1 -1
- package/cjs/resources/index.js +3 -1
- package/cjs/resources/integrations.js +32 -2
- package/cjs/resources/meetings.js +80 -2
- package/cjs/resources/threads.js +103 -0
- package/esm/admin-client.d.ts +0 -19
- package/esm/admin-client.d.ts.map +1 -1
- package/esm/admin-client.js +0 -22
- package/esm/admin-client.js.map +1 -1
- package/esm/client.d.ts +5 -65
- package/esm/client.d.ts.map +1 -1
- package/esm/client.js +2 -74
- package/esm/client.js.map +1 -1
- package/esm/constants.d.ts +1 -1
- package/esm/constants.js +1 -1
- package/esm/resources/index.d.ts +1 -0
- package/esm/resources/index.d.ts.map +1 -1
- package/esm/resources/index.js +1 -0
- package/esm/resources/index.js.map +1 -1
- package/esm/resources/integrations.d.ts +27 -3
- package/esm/resources/integrations.d.ts.map +1 -1
- package/esm/resources/integrations.js +32 -2
- package/esm/resources/integrations.js.map +1 -1
- package/esm/resources/meetings.d.ts +55 -3
- package/esm/resources/meetings.d.ts.map +1 -1
- package/esm/resources/meetings.js +80 -2
- package/esm/resources/meetings.js.map +1 -1
- package/esm/resources/threads.d.ts +74 -0
- package/esm/resources/threads.d.ts.map +1 -0
- package/esm/resources/threads.js +100 -0
- package/esm/resources/threads.js.map +1 -0
- package/esm/types/index.d.ts +154 -1
- package/esm/types/index.d.ts.map +1 -1
- package/esm/types/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -129,10 +129,62 @@ await attrove.conversations.updateSync([
|
|
|
129
129
|
// List integrations
|
|
130
130
|
const integrations = await attrove.integrations.list();
|
|
131
131
|
|
|
132
|
+
// Get a single integration
|
|
133
|
+
const integration = await attrove.integrations.get('integration-id');
|
|
134
|
+
console.log(`${integration.provider}: last synced ${integration.last_synced_at}`);
|
|
135
|
+
|
|
132
136
|
// Disconnect an integration
|
|
133
137
|
await attrove.integrations.disconnect('integration-uuid');
|
|
134
138
|
```
|
|
135
139
|
|
|
140
|
+
### Threads
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
// Discover relevant threads via semantic search
|
|
144
|
+
const { threads } = await attrove.threads.discover('Q4 budget discussion', {
|
|
145
|
+
integrationTypes: ['slack'],
|
|
146
|
+
afterDate: '2024-01-01T00:00:00Z',
|
|
147
|
+
limit: 5,
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
for (const thread of threads) {
|
|
151
|
+
console.log(`${thread.title} (score: ${thread.relevance_score})`);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Analyze a thread for structured insights
|
|
155
|
+
const analysis = await attrove.threads.analyze('conversation-uuid');
|
|
156
|
+
console.log(analysis.summary);
|
|
157
|
+
console.log(`Sentiment: ${analysis.sentiment}`);
|
|
158
|
+
console.log(`Action items: ${analysis.action_items.length}`);
|
|
159
|
+
console.log(`Decisions: ${analysis.decisions.length}`);
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Meetings
|
|
163
|
+
|
|
164
|
+
```typescript
|
|
165
|
+
// List meetings
|
|
166
|
+
const { data: meetings } = await attrove.meetings.list({
|
|
167
|
+
expand: ['summary', 'action_items', 'attendees'],
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
// Get a single meeting
|
|
171
|
+
const meeting = await attrove.meetings.get('meeting-id');
|
|
172
|
+
|
|
173
|
+
// Update a meeting's summary or action items
|
|
174
|
+
const updated = await attrove.meetings.update('meeting-id', {
|
|
175
|
+
summary: 'Revised meeting summary.',
|
|
176
|
+
shortSummary: 'Brief revision.',
|
|
177
|
+
actionItems: [
|
|
178
|
+
{ description: 'Follow up with client', assignee: 'Alice' },
|
|
179
|
+
],
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
// Regenerate the AI summary from the transcript
|
|
183
|
+
const result = await attrove.meetings.regenerateSummary('meeting-id');
|
|
184
|
+
console.log(result.summary);
|
|
185
|
+
console.log(`Action items: ${result.action_items.length}`);
|
|
186
|
+
```
|
|
187
|
+
|
|
136
188
|
## Server-to-Server (Admin) API
|
|
137
189
|
|
|
138
190
|
Use the admin client for operations that require partner authentication:
|
package/cjs/admin-client.js
CHANGED
|
@@ -131,28 +131,6 @@ class AdminUsersResource {
|
|
|
131
131
|
// Route: POST /v1/users/:user_id/tokens with X-Auth-Type: partner header
|
|
132
132
|
return this.http.post(`/v1/users/${userId}/tokens`, body);
|
|
133
133
|
}
|
|
134
|
-
/**
|
|
135
|
-
* Delete a user.
|
|
136
|
-
*
|
|
137
|
-
* Permanently deletes a user and all associated data.
|
|
138
|
-
*
|
|
139
|
-
* @experimental This method is not yet implemented and will throw an error.
|
|
140
|
-
*
|
|
141
|
-
* @param userId - User ID (UUID format)
|
|
142
|
-
*
|
|
143
|
-
* @throws {Error} Always throws - not yet implemented
|
|
144
|
-
*
|
|
145
|
-
* @example
|
|
146
|
-
* ```ts
|
|
147
|
-
* // Not yet available
|
|
148
|
-
* const admin = Attrove.admin({ clientId, clientSecret });
|
|
149
|
-
* await admin.users.delete(userId);
|
|
150
|
-
* ```
|
|
151
|
-
*/
|
|
152
|
-
async delete(userId) {
|
|
153
|
-
// TODO: Implement user deletion endpoint
|
|
154
|
-
throw new Error("User deletion not yet implemented. This feature is coming soon.");
|
|
155
|
-
}
|
|
156
134
|
}
|
|
157
135
|
exports.AdminUsersResource = AdminUsersResource;
|
|
158
136
|
/**
|
package/cjs/client.js
CHANGED
|
@@ -16,6 +16,7 @@ const integrations_js_1 = require("./resources/integrations.js");
|
|
|
16
16
|
const calendars_js_1 = require("./resources/calendars.js");
|
|
17
17
|
const events_js_1 = require("./resources/events.js");
|
|
18
18
|
const meetings_js_1 = require("./resources/meetings.js");
|
|
19
|
+
const threads_js_1 = require("./resources/threads.js");
|
|
19
20
|
const query_js_1 = require("./resources/query.js");
|
|
20
21
|
const index_js_1 = require("./errors/index.js");
|
|
21
22
|
const index_js_2 = require("./types/index.js");
|
|
@@ -120,6 +121,7 @@ class Attrove {
|
|
|
120
121
|
this.calendars = new calendars_js_1.CalendarsResource(this.http, this.config.userId);
|
|
121
122
|
this.events = new events_js_1.EventsResource(this.http, this.config.userId);
|
|
122
123
|
this.meetings = new meetings_js_1.MeetingsResource(this.http, this.config.userId);
|
|
124
|
+
this.threads = new threads_js_1.ThreadsResource(this.http, this.config.userId);
|
|
123
125
|
this.queryResource = new query_js_1.QueryResource(this.http, this.config.userId);
|
|
124
126
|
}
|
|
125
127
|
/**
|
|
@@ -241,79 +243,5 @@ class Attrove {
|
|
|
241
243
|
streaming.close();
|
|
242
244
|
}
|
|
243
245
|
}
|
|
244
|
-
/**
|
|
245
|
-
* Get meeting preparation brief.
|
|
246
|
-
*
|
|
247
|
-
* Retrieves context about attendees, recent conversations, and relevant
|
|
248
|
-
* information to help prepare for an upcoming meeting.
|
|
249
|
-
*
|
|
250
|
-
* @experimental This method is not yet implemented and will throw an error.
|
|
251
|
-
*
|
|
252
|
-
* @param meetingId - Meeting ID (UUID format)
|
|
253
|
-
* @returns Meeting brief with attendee info and relevant context
|
|
254
|
-
*
|
|
255
|
-
* @throws {Error} Always throws - not yet implemented
|
|
256
|
-
*
|
|
257
|
-
* @example
|
|
258
|
-
* ```ts
|
|
259
|
-
* // Not yet available
|
|
260
|
-
* const brief = await attrove.brief('meeting-uuid-here');
|
|
261
|
-
* console.log(brief.summary);
|
|
262
|
-
* console.log('Attendees:', brief.attendees);
|
|
263
|
-
* ```
|
|
264
|
-
*/
|
|
265
|
-
async brief(meetingId) {
|
|
266
|
-
// TODO: Implement meeting brief endpoint
|
|
267
|
-
throw new Error("Meeting brief not yet implemented. This feature is coming soon.");
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Get information about an entity (person, company, etc.).
|
|
271
|
-
*
|
|
272
|
-
* Retrieves profile information and interaction history for an entity
|
|
273
|
-
* identified from the user's communications.
|
|
274
|
-
*
|
|
275
|
-
* @experimental This method is not yet implemented and will throw an error.
|
|
276
|
-
*
|
|
277
|
-
* @param entityId - Entity ID (UUID format)
|
|
278
|
-
* @returns Entity profile with interaction history
|
|
279
|
-
*
|
|
280
|
-
* @throws {Error} Always throws - not yet implemented
|
|
281
|
-
*
|
|
282
|
-
* @example
|
|
283
|
-
* ```ts
|
|
284
|
-
* // Not yet available
|
|
285
|
-
* const entity = await attrove.entity('entity-uuid');
|
|
286
|
-
* console.log(`${entity.name}: ${entity.message_count} messages`);
|
|
287
|
-
* ```
|
|
288
|
-
*/
|
|
289
|
-
async entity(entityId) {
|
|
290
|
-
// TODO: Implement entity endpoint
|
|
291
|
-
throw new Error("Entity lookup not yet implemented. This feature is coming soon.");
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* Get a conversation thread.
|
|
295
|
-
*
|
|
296
|
-
* Retrieves all messages in a specific conversation thread.
|
|
297
|
-
*
|
|
298
|
-
* @experimental This method is not yet implemented and will throw an error.
|
|
299
|
-
*
|
|
300
|
-
* @param conversationId - Conversation ID (UUID format)
|
|
301
|
-
* @returns Conversation thread with messages
|
|
302
|
-
*
|
|
303
|
-
* @throws {Error} Always throws - not yet implemented
|
|
304
|
-
*
|
|
305
|
-
* @example
|
|
306
|
-
* ```ts
|
|
307
|
-
* // Not yet available
|
|
308
|
-
* const thread = await attrove.thread('conversation-uuid-here');
|
|
309
|
-
* for (const msg of thread.messages) {
|
|
310
|
-
* console.log(`${msg.sender_name}: ${msg.body_text}`);
|
|
311
|
-
* }
|
|
312
|
-
* ```
|
|
313
|
-
*/
|
|
314
|
-
async thread(conversationId) {
|
|
315
|
-
// TODO: Implement thread endpoint
|
|
316
|
-
throw new Error("Thread retrieval not yet implemented. This feature is coming soon.");
|
|
317
|
-
}
|
|
318
246
|
}
|
|
319
247
|
exports.Attrove = Attrove;
|
package/cjs/constants.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.getWsCloseReason = exports.WS_CLOSE_CODES = exports.RETRYABLE_STATUS_SET
|
|
|
13
13
|
* Automatically synchronized with package.json during the release process.
|
|
14
14
|
* For programmatic access, use `getVersion()` from './version'.
|
|
15
15
|
*/
|
|
16
|
-
exports.SDK_VERSION = "0.1.
|
|
16
|
+
exports.SDK_VERSION = "0.1.9"; // auto-synced from package.json during release
|
|
17
17
|
/**
|
|
18
18
|
* Default API base URL for Attrove services.
|
|
19
19
|
*/
|
package/cjs/resources/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Resource exports
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.AdminSettingsResource = exports.QueryResource = exports.MeetingsResource = exports.EventsResource = exports.CalendarsResource = exports.IntegrationsResource = exports.ConversationsResource = exports.MessagesResource = exports.UsersResource = void 0;
|
|
6
|
+
exports.AdminSettingsResource = exports.QueryResource = exports.ThreadsResource = exports.MeetingsResource = exports.EventsResource = exports.CalendarsResource = exports.IntegrationsResource = exports.ConversationsResource = exports.MessagesResource = exports.UsersResource = void 0;
|
|
7
7
|
var users_js_1 = require("./users.js");
|
|
8
8
|
Object.defineProperty(exports, "UsersResource", { enumerable: true, get: function () { return users_js_1.UsersResource; } });
|
|
9
9
|
var messages_js_1 = require("./messages.js");
|
|
@@ -18,6 +18,8 @@ var events_js_1 = require("./events.js");
|
|
|
18
18
|
Object.defineProperty(exports, "EventsResource", { enumerable: true, get: function () { return events_js_1.EventsResource; } });
|
|
19
19
|
var meetings_js_1 = require("./meetings.js");
|
|
20
20
|
Object.defineProperty(exports, "MeetingsResource", { enumerable: true, get: function () { return meetings_js_1.MeetingsResource; } });
|
|
21
|
+
var threads_js_1 = require("./threads.js");
|
|
22
|
+
Object.defineProperty(exports, "ThreadsResource", { enumerable: true, get: function () { return threads_js_1.ThreadsResource; } });
|
|
21
23
|
var query_js_1 = require("./query.js");
|
|
22
24
|
Object.defineProperty(exports, "QueryResource", { enumerable: true, get: function () { return query_js_1.QueryResource; } });
|
|
23
25
|
var settings_js_1 = require("./settings.js");
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.IntegrationsResource = void 0;
|
|
9
|
+
const index_js_1 = require("../errors/index.js");
|
|
9
10
|
/**
|
|
10
11
|
* Integrations resource for managing connected services.
|
|
11
12
|
*
|
|
12
|
-
* Provides methods for listing and disconnecting
|
|
13
|
-
* (Gmail, Slack, Google Calendar, etc.).
|
|
13
|
+
* Provides methods for listing, retrieving, and disconnecting
|
|
14
|
+
* integrations (Gmail, Slack, Google Calendar, etc.).
|
|
14
15
|
*/
|
|
15
16
|
class IntegrationsResource {
|
|
16
17
|
constructor(http, userId) {
|
|
@@ -38,6 +39,35 @@ class IntegrationsResource {
|
|
|
38
39
|
const response = await this.http.get(`/v1/users/${this.userId}`);
|
|
39
40
|
return response.integrations;
|
|
40
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Get a single integration by ID.
|
|
44
|
+
*
|
|
45
|
+
* Returns detailed information including type, email, and last sync time.
|
|
46
|
+
*
|
|
47
|
+
* @param id - Integration ID
|
|
48
|
+
* @returns Detailed integration information
|
|
49
|
+
*
|
|
50
|
+
* @throws {ValidationError} If id is empty (client-side)
|
|
51
|
+
* @throws {AuthenticationError} If the API key is invalid or expired
|
|
52
|
+
* @throws {NotFoundError} If the integration does not exist
|
|
53
|
+
* @throws {ServerError} If the server encounters an internal error
|
|
54
|
+
* @throws {TimeoutError} If the request times out
|
|
55
|
+
* @throws {RateLimitError} If the API rate limit is exceeded
|
|
56
|
+
* @throws {NetworkError} If unable to reach the API
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const integration = await attrove.integrations.get('integration-id');
|
|
61
|
+
* console.log(`${integration.provider}: ${integration.auth_status}`);
|
|
62
|
+
* console.log(`Last synced: ${integration.last_synced_at}`);
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
async get(id) {
|
|
66
|
+
if (!id) {
|
|
67
|
+
throw new index_js_1.ValidationError("id is required and must be a non-empty string");
|
|
68
|
+
}
|
|
69
|
+
return this.http.get(`/v1/users/${this.userId}/integrations/${id}`);
|
|
70
|
+
}
|
|
41
71
|
/**
|
|
42
72
|
* Disconnect an integration.
|
|
43
73
|
*
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.MeetingsResource = void 0;
|
|
9
|
+
const index_js_1 = require("../errors/index.js");
|
|
9
10
|
/**
|
|
10
11
|
* Meetings resource for accessing meeting data with AI summaries.
|
|
11
12
|
*
|
|
12
|
-
* Provides methods for listing
|
|
13
|
-
* connected integrations (Google Meet, Zoom, Teams).
|
|
13
|
+
* Provides methods for listing, retrieving, updating, and regenerating
|
|
14
|
+
* summaries for meetings from connected integrations (Google Meet, Zoom, Teams).
|
|
14
15
|
*/
|
|
15
16
|
class MeetingsResource {
|
|
16
17
|
constructor(http, userId) {
|
|
@@ -89,5 +90,82 @@ class MeetingsResource {
|
|
|
89
90
|
async get(id) {
|
|
90
91
|
return this.http.get(`/v1/users/${this.userId}/meetings/${id}`);
|
|
91
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Update a meeting's summary and action items.
|
|
95
|
+
*
|
|
96
|
+
* @param id - Meeting ID
|
|
97
|
+
* @param options - Fields to update (summary, shortSummary, actionItems)
|
|
98
|
+
* @returns The updated meeting
|
|
99
|
+
*
|
|
100
|
+
* @throws {ValidationError} If id is empty or no fields are provided (client-side), or if the server rejects the update parameters
|
|
101
|
+
* @throws {AuthenticationError} If the API key is invalid or expired
|
|
102
|
+
* @throws {NotFoundError} If the meeting does not exist
|
|
103
|
+
* @throws {ServerError} If the server encounters an internal error
|
|
104
|
+
* @throws {TimeoutError} If the request times out
|
|
105
|
+
* @throws {RateLimitError} If the API rate limit is exceeded
|
|
106
|
+
* @throws {NetworkError} If unable to reach the API
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```ts
|
|
110
|
+
* const updated = await attrove.meetings.update('meeting-id', {
|
|
111
|
+
* summary: 'Revised summary of the meeting.',
|
|
112
|
+
* actionItems: [
|
|
113
|
+
* { description: 'Follow up with client', assignee: 'Alice' },
|
|
114
|
+
* ],
|
|
115
|
+
* });
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
async update(id, options) {
|
|
119
|
+
if (!id) {
|
|
120
|
+
throw new index_js_1.ValidationError("id is required and must be a non-empty string");
|
|
121
|
+
}
|
|
122
|
+
if (options.summary == null &&
|
|
123
|
+
options.shortSummary == null &&
|
|
124
|
+
options.actionItems == null) {
|
|
125
|
+
throw new index_js_1.ValidationError("At least one field (summary, shortSummary, or actionItems) must be provided");
|
|
126
|
+
}
|
|
127
|
+
const body = {};
|
|
128
|
+
if (options.summary != null) {
|
|
129
|
+
body.summary = options.summary;
|
|
130
|
+
}
|
|
131
|
+
if (options.shortSummary != null) {
|
|
132
|
+
body.short_summary = options.shortSummary;
|
|
133
|
+
}
|
|
134
|
+
if (options.actionItems != null) {
|
|
135
|
+
body.action_items = options.actionItems;
|
|
136
|
+
}
|
|
137
|
+
return this.http.patch(`/v1/users/${this.userId}/meetings/${id}`, body);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Regenerate the AI summary for a meeting from its transcript.
|
|
141
|
+
*
|
|
142
|
+
* Triggers server-side AI processing and may take longer than typical
|
|
143
|
+
* API calls. The response contains the newly generated summary without
|
|
144
|
+
* the full meeting object.
|
|
145
|
+
*
|
|
146
|
+
* @param id - Meeting ID
|
|
147
|
+
* @returns The regenerated summary, short summary, and action items
|
|
148
|
+
*
|
|
149
|
+
* @throws {ValidationError} If id is empty (client-side)
|
|
150
|
+
* @throws {AuthenticationError} If the API key is invalid or expired
|
|
151
|
+
* @throws {NotFoundError} If the meeting does not exist
|
|
152
|
+
* @throws {ServerError} If the server encounters an internal error
|
|
153
|
+
* @throws {TimeoutError} If the request times out
|
|
154
|
+
* @throws {RateLimitError} If the API rate limit is exceeded
|
|
155
|
+
* @throws {NetworkError} If unable to reach the API
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* ```ts
|
|
159
|
+
* const result = await attrove.meetings.regenerateSummary('meeting-id');
|
|
160
|
+
* console.log(result.summary);
|
|
161
|
+
* console.log(`Action items: ${result.action_items.length}`);
|
|
162
|
+
* ```
|
|
163
|
+
*/
|
|
164
|
+
async regenerateSummary(id) {
|
|
165
|
+
if (!id) {
|
|
166
|
+
throw new index_js_1.ValidationError("id is required and must be a non-empty string");
|
|
167
|
+
}
|
|
168
|
+
return this.http.post(`/v1/users/${this.userId}/meetings/${id}/regenerate-summary`);
|
|
169
|
+
}
|
|
92
170
|
}
|
|
93
171
|
exports.MeetingsResource = MeetingsResource;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Threads Resource
|
|
4
|
+
*
|
|
5
|
+
* Provides methods for discovering and analyzing conversation threads.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ThreadsResource = void 0;
|
|
9
|
+
const index_js_1 = require("../errors/index.js");
|
|
10
|
+
/**
|
|
11
|
+
* Threads resource for discovering and analyzing conversation threads.
|
|
12
|
+
*
|
|
13
|
+
* Provides semantic search over conversation threads and AI-powered
|
|
14
|
+
* analysis including summaries, sentiment, action items, and decisions.
|
|
15
|
+
*/
|
|
16
|
+
class ThreadsResource {
|
|
17
|
+
constructor(http, userId) {
|
|
18
|
+
this.http = http;
|
|
19
|
+
this.userId = userId;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Discover conversation threads via semantic search.
|
|
23
|
+
*
|
|
24
|
+
* @param query - Semantic search query to find relevant threads
|
|
25
|
+
* @param options - Filtering options (integration IDs, integration types, date range, limit)
|
|
26
|
+
* @returns Discovered threads ranked by relevance
|
|
27
|
+
*
|
|
28
|
+
* @throws {ValidationError} If query is empty (client-side) or filter parameters are invalid (server-side)
|
|
29
|
+
* @throws {AuthenticationError} If the API key is invalid or expired
|
|
30
|
+
* @throws {ServerError} If the server encounters an internal error
|
|
31
|
+
* @throws {TimeoutError} If the request times out
|
|
32
|
+
* @throws {RateLimitError} If the API rate limit is exceeded
|
|
33
|
+
* @throws {NetworkError} If unable to reach the API
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const { threads } = await attrove.threads.discover('Q4 budget discussion', {
|
|
38
|
+
* integrationTypes: ['slack'],
|
|
39
|
+
* afterDate: '2024-01-01T00:00:00Z',
|
|
40
|
+
* limit: 5,
|
|
41
|
+
* });
|
|
42
|
+
*
|
|
43
|
+
* for (const thread of threads) {
|
|
44
|
+
* console.log(`${thread.title} (score: ${thread.relevance_score})`);
|
|
45
|
+
* }
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
async discover(query, options = {}) {
|
|
49
|
+
if (!query) {
|
|
50
|
+
throw new index_js_1.ValidationError("query is required and must be a non-empty string");
|
|
51
|
+
}
|
|
52
|
+
const body = { query };
|
|
53
|
+
if (options.integrationIds?.length) {
|
|
54
|
+
body.integration_ids = options.integrationIds;
|
|
55
|
+
}
|
|
56
|
+
if (options.integrationTypes?.length) {
|
|
57
|
+
body.integration_types = options.integrationTypes;
|
|
58
|
+
}
|
|
59
|
+
if (options.afterDate !== undefined) {
|
|
60
|
+
body.after_date = options.afterDate;
|
|
61
|
+
}
|
|
62
|
+
if (options.beforeDate !== undefined) {
|
|
63
|
+
body.before_date = options.beforeDate;
|
|
64
|
+
}
|
|
65
|
+
if (options.limit !== undefined) {
|
|
66
|
+
body.limit = options.limit;
|
|
67
|
+
}
|
|
68
|
+
return this.http.post(`/v1/users/${this.userId}/threads/discover`, body);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Analyze a conversation thread to extract structured insights.
|
|
72
|
+
*
|
|
73
|
+
* Returns a comprehensive analysis including summary, sentiment,
|
|
74
|
+
* action items, decisions, blockers, participants, message count,
|
|
75
|
+
* and date range for the given conversation.
|
|
76
|
+
*
|
|
77
|
+
* @param conversationId - The conversation ID to analyze
|
|
78
|
+
* @returns Structured thread analysis
|
|
79
|
+
*
|
|
80
|
+
* @throws {ValidationError} If conversationId is empty (client-side)
|
|
81
|
+
* @throws {AuthenticationError} If the API key is invalid or expired
|
|
82
|
+
* @throws {NotFoundError} If the conversation does not exist
|
|
83
|
+
* @throws {ServerError} If the server encounters an internal error
|
|
84
|
+
* @throws {TimeoutError} If the request times out
|
|
85
|
+
* @throws {RateLimitError} If the API rate limit is exceeded
|
|
86
|
+
* @throws {NetworkError} If unable to reach the API
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* const analysis = await attrove.threads.analyze('conversation-uuid');
|
|
91
|
+
* console.log(analysis.summary);
|
|
92
|
+
* console.log(`Sentiment: ${analysis.sentiment}`);
|
|
93
|
+
* console.log(`Action items: ${analysis.action_items.length}`);
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
async analyze(conversationId) {
|
|
97
|
+
if (!conversationId) {
|
|
98
|
+
throw new index_js_1.ValidationError("conversationId is required and must be a non-empty string");
|
|
99
|
+
}
|
|
100
|
+
return this.http.post(`/v1/users/${this.userId}/threads/${conversationId}/analyze`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.ThreadsResource = ThreadsResource;
|
package/esm/admin-client.d.ts
CHANGED
|
@@ -72,25 +72,6 @@ export declare class AdminUsersResource {
|
|
|
72
72
|
* ```
|
|
73
73
|
*/
|
|
74
74
|
createConnectToken(userId: string): Promise<CreateTokenResponse>;
|
|
75
|
-
/**
|
|
76
|
-
* Delete a user.
|
|
77
|
-
*
|
|
78
|
-
* Permanently deletes a user and all associated data.
|
|
79
|
-
*
|
|
80
|
-
* @experimental This method is not yet implemented and will throw an error.
|
|
81
|
-
*
|
|
82
|
-
* @param userId - User ID (UUID format)
|
|
83
|
-
*
|
|
84
|
-
* @throws {Error} Always throws - not yet implemented
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```ts
|
|
88
|
-
* // Not yet available
|
|
89
|
-
* const admin = Attrove.admin({ clientId, clientSecret });
|
|
90
|
-
* await admin.users.delete(userId);
|
|
91
|
-
* ```
|
|
92
|
-
*/
|
|
93
|
-
delete(userId: string): Promise<void>;
|
|
94
75
|
}
|
|
95
76
|
/**
|
|
96
77
|
* Admin client for server-to-server operations.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-client.d.ts","sourceRoot":"","sources":["../../../../packages/sdk/src/admin-client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EAEpB,MAAM,kBAAkB,CAAC;AAM1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAkDhE;;;;;GAKG;AACH,qBAAa,kBAAkB;IAE3B,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBADR,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,MAAM;IAGnC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACG,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAsBrE;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"admin-client.d.ts","sourceRoot":"","sources":["../../../../packages/sdk/src/admin-client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EAEpB,MAAM,kBAAkB,CAAC;AAM1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAkDhE;;;;;GAKG;AACH,qBAAa,kBAAkB;IAE3B,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBADR,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,MAAM;IAGnC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACG,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAsBrE;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAqBvE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CACe;IAEtC;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;IAEnC;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;IAEzC;;;;;;;;;;;;;;OAcG;gBACS,MAAM,EAAE,kBAAkB;CA0BvC"}
|
package/esm/admin-client.js
CHANGED
|
@@ -128,28 +128,6 @@ export class AdminUsersResource {
|
|
|
128
128
|
// Route: POST /v1/users/:user_id/tokens with X-Auth-Type: partner header
|
|
129
129
|
return this.http.post(`/v1/users/${userId}/tokens`, body);
|
|
130
130
|
}
|
|
131
|
-
/**
|
|
132
|
-
* Delete a user.
|
|
133
|
-
*
|
|
134
|
-
* Permanently deletes a user and all associated data.
|
|
135
|
-
*
|
|
136
|
-
* @experimental This method is not yet implemented and will throw an error.
|
|
137
|
-
*
|
|
138
|
-
* @param userId - User ID (UUID format)
|
|
139
|
-
*
|
|
140
|
-
* @throws {Error} Always throws - not yet implemented
|
|
141
|
-
*
|
|
142
|
-
* @example
|
|
143
|
-
* ```ts
|
|
144
|
-
* // Not yet available
|
|
145
|
-
* const admin = Attrove.admin({ clientId, clientSecret });
|
|
146
|
-
* await admin.users.delete(userId);
|
|
147
|
-
* ```
|
|
148
|
-
*/
|
|
149
|
-
async delete(userId) {
|
|
150
|
-
// TODO: Implement user deletion endpoint
|
|
151
|
-
throw new Error("User deletion not yet implemented. This feature is coming soon.");
|
|
152
|
-
}
|
|
153
131
|
}
|
|
154
132
|
/**
|
|
155
133
|
* Admin client for server-to-server operations.
|
package/esm/admin-client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-client.js","sourceRoot":"","sources":["../../../../packages/sdk/src/admin-client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAKL,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;GAIG;AACH,SAAS,mBAAmB,CAAC,MAA0B;IACrD,oBAAoB;IACpB,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC5D,MAAM,IAAI,eAAe,CACvB,qDAAqD,EACrD,UAAU,CAAC,yBAAyB,EACpC,EAAE,KAAK,EAAE,UAAU,EAAE,CACtB,CAAC;IACJ,CAAC;I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AAM,CAAC,QAAQ,CAAC,CAAC;IAC7E,CAAC;CACF"}
|
package/esm/client.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { IntegrationsResource } from "./resources/integrations.js";
|
|
|
12
12
|
import { CalendarsResource } from "./resources/calendars.js";
|
|
13
13
|
import { EventsResource } from "./resources/events.js";
|
|
14
14
|
import { MeetingsResource } from "./resources/meetings.js";
|
|
15
|
+
import { ThreadsResource } from "./resources/threads.js";
|
|
15
16
|
import { AttroveConfig, QueryOptions, QueryResponse, SearchOptions, SearchResponse } from "./types/index.js";
|
|
16
17
|
/**
|
|
17
18
|
* The Attrove client for accessing user context.
|
|
@@ -70,6 +71,10 @@ export declare class Attrove {
|
|
|
70
71
|
* Meetings resource for accessing meetings with AI summaries.
|
|
71
72
|
*/
|
|
72
73
|
readonly meetings: MeetingsResource;
|
|
74
|
+
/**
|
|
75
|
+
* Threads resource for discovering and analyzing conversation threads.
|
|
76
|
+
*/
|
|
77
|
+
readonly threads: ThreadsResource;
|
|
73
78
|
/**
|
|
74
79
|
* Create a new Attrove client.
|
|
75
80
|
*
|
|
@@ -179,70 +184,5 @@ export declare class Attrove {
|
|
|
179
184
|
* ```
|
|
180
185
|
*/
|
|
181
186
|
stream(prompt: string, options?: QueryOptions & StreamOptions): Promise<StreamResult>;
|
|
182
|
-
/**
|
|
183
|
-
* Get meeting preparation brief.
|
|
184
|
-
*
|
|
185
|
-
* Retrieves context about attendees, recent conversations, and relevant
|
|
186
|
-
* information to help prepare for an upcoming meeting.
|
|
187
|
-
*
|
|
188
|
-
* @experimental This method is not yet implemented and will throw an error.
|
|
189
|
-
*
|
|
190
|
-
* @param meetingId - Meeting ID (UUID format)
|
|
191
|
-
* @returns Meeting brief with attendee info and relevant context
|
|
192
|
-
*
|
|
193
|
-
* @throws {Error} Always throws - not yet implemented
|
|
194
|
-
*
|
|
195
|
-
* @example
|
|
196
|
-
* ```ts
|
|
197
|
-
* // Not yet available
|
|
198
|
-
* const brief = await attrove.brief('meeting-uuid-here');
|
|
199
|
-
* console.log(brief.summary);
|
|
200
|
-
* console.log('Attendees:', brief.attendees);
|
|
201
|
-
* ```
|
|
202
|
-
*/
|
|
203
|
-
brief(meetingId: string): Promise<unknown>;
|
|
204
|
-
/**
|
|
205
|
-
* Get information about an entity (person, company, etc.).
|
|
206
|
-
*
|
|
207
|
-
* Retrieves profile information and interaction history for an entity
|
|
208
|
-
* identified from the user's communications.
|
|
209
|
-
*
|
|
210
|
-
* @experimental This method is not yet implemented and will throw an error.
|
|
211
|
-
*
|
|
212
|
-
* @param entityId - Entity ID (UUID format)
|
|
213
|
-
* @returns Entity profile with interaction history
|
|
214
|
-
*
|
|
215
|
-
* @throws {Error} Always throws - not yet implemented
|
|
216
|
-
*
|
|
217
|
-
* @example
|
|
218
|
-
* ```ts
|
|
219
|
-
* // Not yet available
|
|
220
|
-
* const entity = await attrove.entity('entity-uuid');
|
|
221
|
-
* console.log(`${entity.name}: ${entity.message_count} messages`);
|
|
222
|
-
* ```
|
|
223
|
-
*/
|
|
224
|
-
entity(entityId: string): Promise<unknown>;
|
|
225
|
-
/**
|
|
226
|
-
* Get a conversation thread.
|
|
227
|
-
*
|
|
228
|
-
* Retrieves all messages in a specific conversation thread.
|
|
229
|
-
*
|
|
230
|
-
* @experimental This method is not yet implemented and will throw an error.
|
|
231
|
-
*
|
|
232
|
-
* @param conversationId - Conversation ID (UUID format)
|
|
233
|
-
* @returns Conversation thread with messages
|
|
234
|
-
*
|
|
235
|
-
* @throws {Error} Always throws - not yet implemented
|
|
236
|
-
*
|
|
237
|
-
* @example
|
|
238
|
-
* ```ts
|
|
239
|
-
* // Not yet available
|
|
240
|
-
* const thread = await attrove.thread('conversation-uuid-here');
|
|
241
|
-
* for (const msg of thread.messages) {
|
|
242
|
-
* console.log(`${msg.sender_name}: ${msg.body_text}`);
|
|
243
|
-
* }
|
|
244
|
-
* ```
|
|
245
|
-
*/
|
|
246
|
-
thread(conversationId: string): Promise<unknown>;
|
|
247
187
|
}
|
|
248
188
|
//# sourceMappingURL=client.d.ts.map
|
package/esm/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../packages/sdk/src/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAEL,aAAa,EACb,YAAY,EAEb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../packages/sdk/src/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAEL,aAAa,EACb,YAAY,EAEb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAIzD,OAAO,EACL,aAAa,EACb,YAAY,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