@attrove/sdk 0.1.7 → 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 +2 -22
- package/cjs/client.js +8 -74
- package/cjs/constants.js +1 -1
- package/cjs/resources/calendars.js +112 -0
- package/cjs/resources/events.js +90 -0
- package/cjs/resources/index.js +11 -1
- package/cjs/resources/integrations.js +32 -2
- package/cjs/resources/meetings.js +171 -0
- package/cjs/resources/settings.js +71 -0
- package/cjs/resources/threads.js +103 -0
- package/cjs/types/index.js +1 -0
- package/esm/admin-client.d.ts +5 -19
- package/esm/admin-client.d.ts.map +1 -1
- package/esm/admin-client.js +2 -22
- package/esm/admin-client.js.map +1 -1
- package/esm/client.d.ts +20 -65
- package/esm/client.d.ts.map +1 -1
- package/esm/client.js +8 -74
- package/esm/client.js.map +1 -1
- package/esm/constants.d.ts +1 -1
- package/esm/constants.js +1 -1
- package/esm/index.d.ts +4 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js.map +1 -1
- package/esm/resources/calendars.d.ts +91 -0
- package/esm/resources/calendars.d.ts.map +1 -0
- package/esm/resources/calendars.js +109 -0
- package/esm/resources/calendars.js.map +1 -0
- package/esm/resources/events.d.ts +68 -0
- package/esm/resources/events.d.ts.map +1 -0
- package/esm/resources/events.js +87 -0
- package/esm/resources/events.js.map +1 -0
- package/esm/resources/index.d.ts +9 -0
- package/esm/resources/index.d.ts.map +1 -1
- package/esm/resources/index.js +5 -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 +120 -0
- package/esm/resources/meetings.d.ts.map +1 -0
- package/esm/resources/meetings.js +168 -0
- package/esm/resources/meetings.js.map +1 -0
- package/esm/resources/settings.d.ts +62 -0
- package/esm/resources/settings.d.ts.map +1 -0
- package/esm/resources/settings.js +68 -0
- package/esm/resources/settings.js.map +1 -0
- 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 +252 -14
- package/esm/types/index.d.ts.map +1 -1
- package/esm/types/index.js +1 -0
- package/esm/types/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calendars Resource
|
|
3
|
+
*
|
|
4
|
+
* Provides methods for listing, retrieving, and updating calendars
|
|
5
|
+
* from connected calendar integrations (e.g. Google Calendar).
|
|
6
|
+
*/
|
|
7
|
+
import { HttpClient } from "../utils/fetch.js";
|
|
8
|
+
import { Calendar, Pagination, ListCalendarsOptions, UpdateCalendarOptions } from "../types/index.js";
|
|
9
|
+
/**
|
|
10
|
+
* Paginated calendars response.
|
|
11
|
+
*/
|
|
12
|
+
export interface CalendarsPage {
|
|
13
|
+
data: Calendar[];
|
|
14
|
+
pagination: Pagination;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Calendars resource for managing calendar sync preferences.
|
|
18
|
+
*
|
|
19
|
+
* Users may have multiple calendars per integration (e.g. "Work", "Personal",
|
|
20
|
+
* "Holidays" in Google Calendar). By default only the primary calendar is
|
|
21
|
+
* active. Use `update()` to activate or deactivate calendars — only active
|
|
22
|
+
* calendars have their events synced.
|
|
23
|
+
*/
|
|
24
|
+
export declare class CalendarsResource {
|
|
25
|
+
private readonly http;
|
|
26
|
+
private readonly userId;
|
|
27
|
+
constructor(http: HttpClient, userId: string);
|
|
28
|
+
/**
|
|
29
|
+
* List calendars with optional filtering.
|
|
30
|
+
*
|
|
31
|
+
* @param options - Filtering, pagination, and expansion options
|
|
32
|
+
* @returns Paginated list of calendars
|
|
33
|
+
* @throws {AuthenticationError} If the API key is invalid
|
|
34
|
+
* @throws {AuthorizationError} If the user lacks access
|
|
35
|
+
* @throws {NetworkError} If the request fails due to a network issue
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* // List all calendars
|
|
40
|
+
* const { data } = await attrove.calendars.list();
|
|
41
|
+
*
|
|
42
|
+
* // List only active calendars
|
|
43
|
+
* const { data } = await attrove.calendars.list({ active: true });
|
|
44
|
+
*
|
|
45
|
+
* // List calendars for a specific integration
|
|
46
|
+
* const { data } = await attrove.calendars.list({ integrationId: '67890' });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
list(options?: ListCalendarsOptions): Promise<CalendarsPage>;
|
|
50
|
+
/**
|
|
51
|
+
* Get a single calendar by ID.
|
|
52
|
+
*
|
|
53
|
+
* @param id - Calendar ID
|
|
54
|
+
* @returns The requested calendar
|
|
55
|
+
* @throws {NotFoundError} If the calendar does not exist
|
|
56
|
+
* @throws {AuthenticationError} If the API key is invalid
|
|
57
|
+
* @throws {NetworkError} If the request fails due to a network issue
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const calendar = await attrove.calendars.get('12345');
|
|
62
|
+
* console.log(calendar.title, calendar.active);
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
get(id: string): Promise<Calendar>;
|
|
66
|
+
/**
|
|
67
|
+
* Update a calendar's properties (e.g. toggle sync on/off).
|
|
68
|
+
*
|
|
69
|
+
* When a calendar is activated, its events begin syncing on the next
|
|
70
|
+
* sync cycle (within 5 minutes).
|
|
71
|
+
*
|
|
72
|
+
* @param id - Calendar ID
|
|
73
|
+
* @param options - Fields to update (currently only `active`)
|
|
74
|
+
* @returns The updated calendar
|
|
75
|
+
* @throws {NotFoundError} If the calendar does not exist
|
|
76
|
+
* @throws {ValidationError} If the options are invalid
|
|
77
|
+
* @throws {AuthenticationError} If the API key is invalid
|
|
78
|
+
* @throws {NetworkError} If the request fails due to a network issue
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* // Activate a calendar for syncing
|
|
83
|
+
* const updated = await attrove.calendars.update('12345', { active: true });
|
|
84
|
+
*
|
|
85
|
+
* // Deactivate a calendar
|
|
86
|
+
* const updated = await attrove.calendars.update('12345', { active: false });
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
update(id: string, options: UpdateCalendarOptions): Promise<Calendar>;
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=calendars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendars.d.ts","sourceRoot":"","sources":["../../../../../packages/sdk/src/resources/calendars.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EACL,QAAQ,EAER,UAAU,EACV,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,UAAU,EAAE,UAAU,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,qBAAa,iBAAiB;IAE1B,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM;IAGjC;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,IAAI,CAAC,OAAO,GAAE,oBAAyB,GAAG,OAAO,CAAC,aAAa,CAAC;IA+BtE;;;;;;;;;;;;;;OAcG;IACG,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAIxC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC;CAM5E"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calendars Resource
|
|
3
|
+
*
|
|
4
|
+
* Provides methods for listing, retrieving, and updating calendars
|
|
5
|
+
* from connected calendar integrations (e.g. Google Calendar).
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Calendars resource for managing calendar sync preferences.
|
|
9
|
+
*
|
|
10
|
+
* Users may have multiple calendars per integration (e.g. "Work", "Personal",
|
|
11
|
+
* "Holidays" in Google Calendar). By default only the primary calendar is
|
|
12
|
+
* active. Use `update()` to activate or deactivate calendars — only active
|
|
13
|
+
* calendars have their events synced.
|
|
14
|
+
*/
|
|
15
|
+
export class CalendarsResource {
|
|
16
|
+
constructor(http, userId) {
|
|
17
|
+
this.http = http;
|
|
18
|
+
this.userId = userId;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* List calendars with optional filtering.
|
|
22
|
+
*
|
|
23
|
+
* @param options - Filtering, pagination, and expansion options
|
|
24
|
+
* @returns Paginated list of calendars
|
|
25
|
+
* @throws {AuthenticationError} If the API key is invalid
|
|
26
|
+
* @throws {AuthorizationError} If the user lacks access
|
|
27
|
+
* @throws {NetworkError} If the request fails due to a network issue
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* // List all calendars
|
|
32
|
+
* const { data } = await attrove.calendars.list();
|
|
33
|
+
*
|
|
34
|
+
* // List only active calendars
|
|
35
|
+
* const { data } = await attrove.calendars.list({ active: true });
|
|
36
|
+
*
|
|
37
|
+
* // List calendars for a specific integration
|
|
38
|
+
* const { data } = await attrove.calendars.list({ integrationId: '67890' });
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
async list(options = {}) {
|
|
42
|
+
const params = {};
|
|
43
|
+
if (options.integrationId) {
|
|
44
|
+
params.integration_id = options.integrationId;
|
|
45
|
+
}
|
|
46
|
+
if (options.active !== undefined) {
|
|
47
|
+
params.active = String(options.active);
|
|
48
|
+
}
|
|
49
|
+
if (options.limit !== undefined) {
|
|
50
|
+
params.limit = String(options.limit);
|
|
51
|
+
}
|
|
52
|
+
if (options.offset !== undefined) {
|
|
53
|
+
params.offset = String(options.offset);
|
|
54
|
+
}
|
|
55
|
+
if (options.expand?.length) {
|
|
56
|
+
params.expand = options.expand.join(",");
|
|
57
|
+
}
|
|
58
|
+
const response = await this.http.request(`/v1/users/${this.userId}/calendars`, { method: "GET" }, params);
|
|
59
|
+
return {
|
|
60
|
+
data: response.data,
|
|
61
|
+
pagination: response.pagination,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Get a single calendar by ID.
|
|
66
|
+
*
|
|
67
|
+
* @param id - Calendar ID
|
|
68
|
+
* @returns The requested calendar
|
|
69
|
+
* @throws {NotFoundError} If the calendar does not exist
|
|
70
|
+
* @throws {AuthenticationError} If the API key is invalid
|
|
71
|
+
* @throws {NetworkError} If the request fails due to a network issue
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* const calendar = await attrove.calendars.get('12345');
|
|
76
|
+
* console.log(calendar.title, calendar.active);
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
async get(id) {
|
|
80
|
+
return this.http.get(`/v1/users/${this.userId}/calendars/${id}`);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Update a calendar's properties (e.g. toggle sync on/off).
|
|
84
|
+
*
|
|
85
|
+
* When a calendar is activated, its events begin syncing on the next
|
|
86
|
+
* sync cycle (within 5 minutes).
|
|
87
|
+
*
|
|
88
|
+
* @param id - Calendar ID
|
|
89
|
+
* @param options - Fields to update (currently only `active`)
|
|
90
|
+
* @returns The updated calendar
|
|
91
|
+
* @throws {NotFoundError} If the calendar does not exist
|
|
92
|
+
* @throws {ValidationError} If the options are invalid
|
|
93
|
+
* @throws {AuthenticationError} If the API key is invalid
|
|
94
|
+
* @throws {NetworkError} If the request fails due to a network issue
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```ts
|
|
98
|
+
* // Activate a calendar for syncing
|
|
99
|
+
* const updated = await attrove.calendars.update('12345', { active: true });
|
|
100
|
+
*
|
|
101
|
+
* // Deactivate a calendar
|
|
102
|
+
* const updated = await attrove.calendars.update('12345', { active: false });
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
async update(id, options) {
|
|
106
|
+
return this.http.patch(`/v1/users/${this.userId}/calendars/${id}`, options);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=calendars.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendars.js","sourceRoot":"","sources":["../../../../../packages/sdk/src/resources/calendars.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAmBH;;;;;;;GAOG;AACH,MAAM,OAAO,iBAAiB;IAC5B,YACmB,IAAgB,EAChB,MAAc;QADd,SAAI,GAAJ,IAAI,CAAY;QAChB,WAAM,GAAN,MAAM,CAAQ;IAC9B,CAAC;IAEJ;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,KAAK,CAAC,IAAI,CAAC,UAAgC,EAAE;QAC3C,MAAM,MAAM,GAAuC,EAAE,CAAC;QAEtD,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;YAC1B,MAAM,CAAC,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;QAChD,CAAC;QACD,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACzC,CAAC;QACD,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC;QACD,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACzC,CAAC;QACD,IAAI,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;YAC3B,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CACtC,aAAa,IAAI,CAAC,MAAM,YAAY,EACpC,EAAE,MAAM,EAAE,KAAK,EAAE,EACjB,MAAM,CACP,CAAC;QAEF,OAAO;YACL,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,UAAU,EAAE,QAAQ,CAAC,UAAU;SAChC,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,GAAG,CAAC,EAAU;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAW,aAAa,IAAI,CAAC,MAAM,cAAc,EAAE,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,OAA8B;QACrD,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CACpB,aAAa,IAAI,CAAC,MAAM,cAAc,EAAE,EAAE,EAC1C,OAAO,CACR,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Events Resource
|
|
3
|
+
*
|
|
4
|
+
* Provides methods for accessing calendar events from connected integrations.
|
|
5
|
+
*/
|
|
6
|
+
import { HttpClient } from "../utils/fetch.js";
|
|
7
|
+
import { CalendarEvent, Pagination, ListEventsOptions } from "../types/index.js";
|
|
8
|
+
/**
|
|
9
|
+
* Paginated events response.
|
|
10
|
+
*/
|
|
11
|
+
export interface EventsPage {
|
|
12
|
+
data: CalendarEvent[];
|
|
13
|
+
pagination: Pagination;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Events resource for accessing calendar event data.
|
|
17
|
+
*
|
|
18
|
+
* Provides methods for listing and retrieving calendar events from
|
|
19
|
+
* connected integrations (Google Calendar, etc.).
|
|
20
|
+
*/
|
|
21
|
+
export declare class EventsResource {
|
|
22
|
+
private readonly http;
|
|
23
|
+
private readonly userId;
|
|
24
|
+
constructor(http: HttpClient, userId: string);
|
|
25
|
+
/**
|
|
26
|
+
* List calendar events with optional filtering.
|
|
27
|
+
*
|
|
28
|
+
* @param options - Filtering, pagination, and expansion options
|
|
29
|
+
* @returns Paginated list of calendar events
|
|
30
|
+
*
|
|
31
|
+
* @throws {AuthenticationError} If the API key is invalid or expired
|
|
32
|
+
* @throws {ValidationError} If the filter parameters are invalid
|
|
33
|
+
* @throws {NetworkError} If unable to reach the API
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* // List upcoming events
|
|
38
|
+
* const { data, pagination } = await attrove.events.list({
|
|
39
|
+
* startDate: '2025-01-15T00:00:00Z',
|
|
40
|
+
* endDate: '2025-01-16T00:00:00Z',
|
|
41
|
+
* });
|
|
42
|
+
*
|
|
43
|
+
* // List events with attendee details
|
|
44
|
+
* const { data } = await attrove.events.list({
|
|
45
|
+
* expand: ['attendees', 'description'],
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
list(options?: ListEventsOptions): Promise<EventsPage>;
|
|
50
|
+
/**
|
|
51
|
+
* Get a single calendar event by ID.
|
|
52
|
+
*
|
|
53
|
+
* @param id - Event ID
|
|
54
|
+
* @returns The requested calendar event
|
|
55
|
+
*
|
|
56
|
+
* @throws {AuthenticationError} If the API key is invalid or expired
|
|
57
|
+
* @throws {NotFoundError} If the event does not exist
|
|
58
|
+
* @throws {NetworkError} If unable to reach the API
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const event = await attrove.events.get('event-id');
|
|
63
|
+
* console.log(event.title, event.start_time);
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
get(id: string): Promise<CalendarEvent>;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../../packages/sdk/src/resources/events.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EACL,aAAa,EAEb,UAAU,EACV,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC;CACxB;AAED;;;;;GAKG;AACH,qBAAa,cAAc;IAEvB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM;IAGjC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACG,IAAI,CAAC,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC;IAkChE;;;;;;;;;;;;;;;OAeG;IACG,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAK9C"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Events Resource
|
|
3
|
+
*
|
|
4
|
+
* Provides methods for accessing calendar events from connected integrations.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Events resource for accessing calendar event data.
|
|
8
|
+
*
|
|
9
|
+
* Provides methods for listing and retrieving calendar events from
|
|
10
|
+
* connected integrations (Google Calendar, etc.).
|
|
11
|
+
*/
|
|
12
|
+
export class EventsResource {
|
|
13
|
+
constructor(http, userId) {
|
|
14
|
+
this.http = http;
|
|
15
|
+
this.userId = userId;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* List calendar events with optional filtering.
|
|
19
|
+
*
|
|
20
|
+
* @param options - Filtering, pagination, and expansion options
|
|
21
|
+
* @returns Paginated list of calendar events
|
|
22
|
+
*
|
|
23
|
+
* @throws {AuthenticationError} If the API key is invalid or expired
|
|
24
|
+
* @throws {ValidationError} If the filter parameters are invalid
|
|
25
|
+
* @throws {NetworkError} If unable to reach the API
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* // List upcoming events
|
|
30
|
+
* const { data, pagination } = await attrove.events.list({
|
|
31
|
+
* startDate: '2025-01-15T00:00:00Z',
|
|
32
|
+
* endDate: '2025-01-16T00:00:00Z',
|
|
33
|
+
* });
|
|
34
|
+
*
|
|
35
|
+
* // List events with attendee details
|
|
36
|
+
* const { data } = await attrove.events.list({
|
|
37
|
+
* expand: ['attendees', 'description'],
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
async list(options = {}) {
|
|
42
|
+
const params = {};
|
|
43
|
+
if (options.calendarId) {
|
|
44
|
+
params.calendar_id = options.calendarId;
|
|
45
|
+
}
|
|
46
|
+
if (options.startDate) {
|
|
47
|
+
params.start_date = options.startDate;
|
|
48
|
+
}
|
|
49
|
+
if (options.endDate) {
|
|
50
|
+
params.end_date = options.endDate;
|
|
51
|
+
}
|
|
52
|
+
if (options.limit !== undefined) {
|
|
53
|
+
params.limit = String(options.limit);
|
|
54
|
+
}
|
|
55
|
+
if (options.offset !== undefined) {
|
|
56
|
+
params.offset = String(options.offset);
|
|
57
|
+
}
|
|
58
|
+
if (options.expand?.length) {
|
|
59
|
+
params.expand = options.expand.join(",");
|
|
60
|
+
}
|
|
61
|
+
const response = await this.http.request(`/v1/users/${this.userId}/events`, { method: "GET" }, params);
|
|
62
|
+
return {
|
|
63
|
+
data: response.data,
|
|
64
|
+
pagination: response.pagination,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Get a single calendar event by ID.
|
|
69
|
+
*
|
|
70
|
+
* @param id - Event ID
|
|
71
|
+
* @returns The requested calendar event
|
|
72
|
+
*
|
|
73
|
+
* @throws {AuthenticationError} If the API key is invalid or expired
|
|
74
|
+
* @throws {NotFoundError} If the event does not exist
|
|
75
|
+
* @throws {NetworkError} If unable to reach the API
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* const event = await attrove.events.get('event-id');
|
|
80
|
+
* console.log(event.title, event.start_time);
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
async get(id) {
|
|
84
|
+
return this.http.get(`/v1/users/${this.userId}/events/${id}`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../../../packages/sdk/src/resources/events.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkBH;;;;;GAKG;AACH,MAAM,OAAO,cAAc;IACzB,YACmB,IAAgB,EAChB,MAAc;QADd,SAAI,GAAJ,IAAI,CAAY;QAChB,WAAM,GAAN,MAAM,CAAQ;IAC9B,CAAC;IAEJ;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,KAAK,CAAC,IAAI,CAAC,UAA6B,EAAE;QACxC,MAAM,MAAM,GAAuC,EAAE,CAAC;QAEtD,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;YACvB,MAAM,CAAC,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;QAC1C,CAAC;QACD,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;YACtB,MAAM,CAAC,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC;QACxC,CAAC;QACD,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;QACpC,CAAC;QACD,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC;QACD,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACzC,CAAC;QACD,IAAI,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;YAC3B,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CACtC,aAAa,IAAI,CAAC,MAAM,SAAS,EACjC,EAAE,MAAM,EAAE,KAAK,EAAE,EACjB,MAAM,CACP,CAAC;QAEF,OAAO;YACL,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,UAAU,EAAE,QAAQ,CAAC,UAAU;SAChC,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,GAAG,CAAC,EAAU;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAClB,aAAa,IAAI,CAAC,MAAM,WAAW,EAAE,EAAE,CACxC,CAAC;IACJ,CAAC;CACF"}
|
package/esm/resources/index.d.ts
CHANGED
|
@@ -8,5 +8,14 @@ export type { MessagesPage } from "./messages.js";
|
|
|
8
8
|
export { ConversationsResource } from "./conversations.js";
|
|
9
9
|
export type { ConversationsPage, ConversationSyncUpdate, } from "./conversations.js";
|
|
10
10
|
export { IntegrationsResource } from "./integrations.js";
|
|
11
|
+
export { CalendarsResource } from "./calendars.js";
|
|
12
|
+
export type { CalendarsPage } from "./calendars.js";
|
|
13
|
+
export { EventsResource } from "./events.js";
|
|
14
|
+
export type { EventsPage } from "./events.js";
|
|
15
|
+
export { MeetingsResource } from "./meetings.js";
|
|
16
|
+
export type { MeetingsPage } from "./meetings.js";
|
|
17
|
+
export { ThreadsResource } from "./threads.js";
|
|
11
18
|
export { QueryResource } from "./query.js";
|
|
19
|
+
export { AdminSettingsResource } from "./settings.js";
|
|
20
|
+
export type { UpdateSettingsOptions, SettingsResponse } from "./settings.js";
|
|
12
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/sdk/src/resources/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,YAAY,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EACV,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/sdk/src/resources/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,YAAY,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EACV,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
package/esm/resources/index.js
CHANGED
|
@@ -5,5 +5,10 @@ export { UsersResource } from "./users.js";
|
|
|
5
5
|
export { MessagesResource } from "./messages.js";
|
|
6
6
|
export { ConversationsResource } from "./conversations.js";
|
|
7
7
|
export { IntegrationsResource } from "./integrations.js";
|
|
8
|
+
export { CalendarsResource } from "./calendars.js";
|
|
9
|
+
export { EventsResource } from "./events.js";
|
|
10
|
+
export { MeetingsResource } from "./meetings.js";
|
|
11
|
+
export { ThreadsResource } from "./threads.js";
|
|
8
12
|
export { QueryResource } from "./query.js";
|
|
13
|
+
export { AdminSettingsResource } from "./settings.js";
|
|
9
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/sdk/src/resources/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAM3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/sdk/src/resources/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAM3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGnD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGjD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* Provides methods for managing connected integrations (Gmail, Slack, etc.).
|
|
5
5
|
*/
|
|
6
6
|
import { HttpClient } from "../utils/fetch.js";
|
|
7
|
-
import { Integration } from "../types/index.js";
|
|
7
|
+
import { Integration, IntegrationDetail } from "../types/index.js";
|
|
8
8
|
/**
|
|
9
9
|
* Integrations resource for managing connected services.
|
|
10
10
|
*
|
|
11
|
-
* Provides methods for listing and disconnecting
|
|
12
|
-
* (Gmail, Slack, Google Calendar, etc.).
|
|
11
|
+
* Provides methods for listing, retrieving, and disconnecting
|
|
12
|
+
* integrations (Gmail, Slack, Google Calendar, etc.).
|
|
13
13
|
*/
|
|
14
14
|
export declare class IntegrationsResource {
|
|
15
15
|
private readonly http;
|
|
@@ -33,6 +33,30 @@ export declare class IntegrationsResource {
|
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
35
|
list(): Promise<Integration[]>;
|
|
36
|
+
/**
|
|
37
|
+
* Get a single integration by ID.
|
|
38
|
+
*
|
|
39
|
+
* Returns detailed information including type, email, and last sync time.
|
|
40
|
+
*
|
|
41
|
+
* @param id - Integration ID
|
|
42
|
+
* @returns Detailed integration information
|
|
43
|
+
*
|
|
44
|
+
* @throws {ValidationError} If id is empty (client-side)
|
|
45
|
+
* @throws {AuthenticationError} If the API key is invalid or expired
|
|
46
|
+
* @throws {NotFoundError} If the integration does not exist
|
|
47
|
+
* @throws {ServerError} If the server encounters an internal error
|
|
48
|
+
* @throws {TimeoutError} If the request times out
|
|
49
|
+
* @throws {RateLimitError} If the API rate limit is exceeded
|
|
50
|
+
* @throws {NetworkError} If unable to reach the API
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const integration = await attrove.integrations.get('integration-id');
|
|
55
|
+
* console.log(`${integration.provider}: ${integration.auth_status}`);
|
|
56
|
+
* console.log(`Last synced: ${integration.last_synced_at}`);
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
get(id: string): Promise<IntegrationDetail>;
|
|
36
60
|
/**
|
|
37
61
|
* Disconnect an integration.
|
|
38
62
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../../../../packages/sdk/src/resources/integrations.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../../../../packages/sdk/src/resources/integrations.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEnE;;;;;GAKG;AACH,qBAAa,oBAAoB;IAE7B,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM;IAGjC;;;;;;;;;;;;;;;;OAgBG;IACG,IAAI,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAQpC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACG,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAUjD;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACG,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;CAK5D"}
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Provides methods for managing connected integrations (Gmail, Slack, etc.).
|
|
5
5
|
*/
|
|
6
|
+
import { ValidationError } from "../errors/index.js";
|
|
6
7
|
/**
|
|
7
8
|
* Integrations resource for managing connected services.
|
|
8
9
|
*
|
|
9
|
-
* Provides methods for listing and disconnecting
|
|
10
|
-
* (Gmail, Slack, Google Calendar, etc.).
|
|
10
|
+
* Provides methods for listing, retrieving, and disconnecting
|
|
11
|
+
* integrations (Gmail, Slack, Google Calendar, etc.).
|
|
11
12
|
*/
|
|
12
13
|
export class IntegrationsResource {
|
|
13
14
|
constructor(http, userId) {
|
|
@@ -35,6 +36,35 @@ export class IntegrationsResource {
|
|
|
35
36
|
const response = await this.http.get(`/v1/users/${this.userId}`);
|
|
36
37
|
return response.integrations;
|
|
37
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Get a single integration by ID.
|
|
41
|
+
*
|
|
42
|
+
* Returns detailed information including type, email, and last sync time.
|
|
43
|
+
*
|
|
44
|
+
* @param id - Integration ID
|
|
45
|
+
* @returns Detailed integration information
|
|
46
|
+
*
|
|
47
|
+
* @throws {ValidationError} If id is empty (client-side)
|
|
48
|
+
* @throws {AuthenticationError} If the API key is invalid or expired
|
|
49
|
+
* @throws {NotFoundError} If the integration does not exist
|
|
50
|
+
* @throws {ServerError} If the server encounters an internal error
|
|
51
|
+
* @throws {TimeoutError} If the request times out
|
|
52
|
+
* @throws {RateLimitError} If the API rate limit is exceeded
|
|
53
|
+
* @throws {NetworkError} If unable to reach the API
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const integration = await attrove.integrations.get('integration-id');
|
|
58
|
+
* console.log(`${integration.provider}: ${integration.auth_status}`);
|
|
59
|
+
* console.log(`Last synced: ${integration.last_synced_at}`);
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
async get(id) {
|
|
63
|
+
if (!id) {
|
|
64
|
+
throw new ValidationError("id is required and must be a non-empty string");
|
|
65
|
+
}
|
|
66
|
+
return this.http.get(`/v1/users/${this.userId}/integrations/${id}`);
|
|
67
|
+
}
|
|
38
68
|
/**
|
|
39
69
|
* Disconnect an integration.
|
|
40
70
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.js","sourceRoot":"","sources":["../../../../../packages/sdk/src/resources/integrations.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"integrations.js","sourceRoot":"","sources":["../../../../../packages/sdk/src/resources/integrations.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD;;;;;GAKG;AACH,MAAM,OAAO,oBAAoB;IAC/B,YACmB,IAAgB,EAChB,MAAc;QADd,SAAI,GAAJ,IAAI,CAAY;QAChB,WAAM,GAAN,MAAM,CAAQ;IAC9B,CAAC;IAEJ;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,IAAI;QACR,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAGjC,aAAa,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QAC/B,OAAO,QAAQ,CAAC,YAAY,CAAC;IAC/B,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,KAAK,CAAC,GAAG,CAAC,EAAU;QAClB,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,MAAM,IAAI,eAAe,CAAC,+CAA+C,CAAC,CAAC;QAC7E,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAClB,aAAa,IAAI,CAAC,MAAM,iBAAiB,EAAE,EAAE,CAC9C,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,KAAK,CAAC,UAAU,CAAC,EAAU;QACzB,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CACrB,aAAa,IAAI,CAAC,MAAM,iBAAiB,EAAE,EAAE,CAC9C,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Meetings Resource
|
|
3
|
+
*
|
|
4
|
+
* Provides methods for accessing meetings with AI-generated summaries.
|
|
5
|
+
*/
|
|
6
|
+
import { HttpClient } from "../utils/fetch.js";
|
|
7
|
+
import { Meeting, Pagination, ListMeetingsOptions, UpdateMeetingOptions, RegenerateSummaryResponse } from "../types/index.js";
|
|
8
|
+
/**
|
|
9
|
+
* Paginated meetings response.
|
|
10
|
+
*/
|
|
11
|
+
export interface MeetingsPage {
|
|
12
|
+
data: Meeting[];
|
|
13
|
+
pagination: Pagination;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Meetings resource for accessing meeting data with AI summaries.
|
|
17
|
+
*
|
|
18
|
+
* Provides methods for listing, retrieving, updating, and regenerating
|
|
19
|
+
* summaries for meetings from connected integrations (Google Meet, Zoom, Teams).
|
|
20
|
+
*/
|
|
21
|
+
export declare class MeetingsResource {
|
|
22
|
+
private readonly http;
|
|
23
|
+
private readonly userId;
|
|
24
|
+
constructor(http: HttpClient, userId: string);
|
|
25
|
+
/**
|
|
26
|
+
* List meetings with optional filtering.
|
|
27
|
+
*
|
|
28
|
+
* @param options - Filtering, pagination, and expansion options
|
|
29
|
+
* @returns Paginated list of meetings
|
|
30
|
+
*
|
|
31
|
+
* @throws {AuthenticationError} If the API key is invalid or expired
|
|
32
|
+
* @throws {ValidationError} If the filter parameters are invalid
|
|
33
|
+
* @throws {NetworkError} If unable to reach the API
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* // List recent meetings with summaries
|
|
38
|
+
* const { data, pagination } = await attrove.meetings.list({
|
|
39
|
+
* expand: ['summary', 'action_items', 'attendees'],
|
|
40
|
+
* });
|
|
41
|
+
*
|
|
42
|
+
* // List meetings from a specific provider
|
|
43
|
+
* const { data } = await attrove.meetings.list({
|
|
44
|
+
* provider: 'google_meet',
|
|
45
|
+
* hasSummary: true,
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
list(options?: ListMeetingsOptions): Promise<MeetingsPage>;
|
|
50
|
+
/**
|
|
51
|
+
* Get a single meeting by ID.
|
|
52
|
+
*
|
|
53
|
+
* @param id - Meeting ID
|
|
54
|
+
* @returns The requested meeting
|
|
55
|
+
*
|
|
56
|
+
* @throws {AuthenticationError} If the API key is invalid or expired
|
|
57
|
+
* @throws {NotFoundError} If the meeting does not exist
|
|
58
|
+
* @throws {NetworkError} If unable to reach the API
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const meeting = await attrove.meetings.get('meeting-id');
|
|
63
|
+
* console.log(meeting.title, meeting.summary);
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
get(id: string): Promise<Meeting>;
|
|
67
|
+
/**
|
|
68
|
+
* Update a meeting's summary and action items.
|
|
69
|
+
*
|
|
70
|
+
* @param id - Meeting ID
|
|
71
|
+
* @param options - Fields to update (summary, shortSummary, actionItems)
|
|
72
|
+
* @returns The updated meeting
|
|
73
|
+
*
|
|
74
|
+
* @throws {ValidationError} If id is empty or no fields are provided (client-side), or if the server rejects the update parameters
|
|
75
|
+
* @throws {AuthenticationError} If the API key is invalid or expired
|
|
76
|
+
* @throws {NotFoundError} If the meeting does not exist
|
|
77
|
+
* @throws {ServerError} If the server encounters an internal error
|
|
78
|
+
* @throws {TimeoutError} If the request times out
|
|
79
|
+
* @throws {RateLimitError} If the API rate limit is exceeded
|
|
80
|
+
* @throws {NetworkError} If unable to reach the API
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* const updated = await attrove.meetings.update('meeting-id', {
|
|
85
|
+
* summary: 'Revised summary of the meeting.',
|
|
86
|
+
* actionItems: [
|
|
87
|
+
* { description: 'Follow up with client', assignee: 'Alice' },
|
|
88
|
+
* ],
|
|
89
|
+
* });
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
update(id: string, options: UpdateMeetingOptions): Promise<Meeting>;
|
|
93
|
+
/**
|
|
94
|
+
* Regenerate the AI summary for a meeting from its transcript.
|
|
95
|
+
*
|
|
96
|
+
* Triggers server-side AI processing and may take longer than typical
|
|
97
|
+
* API calls. The response contains the newly generated summary without
|
|
98
|
+
* the full meeting object.
|
|
99
|
+
*
|
|
100
|
+
* @param id - Meeting ID
|
|
101
|
+
* @returns The regenerated summary, short summary, and action items
|
|
102
|
+
*
|
|
103
|
+
* @throws {ValidationError} If id is empty (client-side)
|
|
104
|
+
* @throws {AuthenticationError} If the API key is invalid or expired
|
|
105
|
+
* @throws {NotFoundError} If the meeting does not exist
|
|
106
|
+
* @throws {ServerError} If the server encounters an internal error
|
|
107
|
+
* @throws {TimeoutError} If the request times out
|
|
108
|
+
* @throws {RateLimitError} If the API rate limit is exceeded
|
|
109
|
+
* @throws {NetworkError} If unable to reach the API
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```ts
|
|
113
|
+
* const result = await attrove.meetings.regenerateSummary('meeting-id');
|
|
114
|
+
* console.log(result.summary);
|
|
115
|
+
* console.log(`Action items: ${result.action_items.length}`);
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
regenerateSummary(id: string): Promise<RegenerateSummaryResponse>;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=meetings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meetings.d.ts","sourceRoot":"","sources":["../../../../../packages/sdk/src/resources/meetings.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EACL,OAAO,EAEP,UAAU,EACV,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,UAAU,EAAE,UAAU,CAAC;CACxB;AAED;;;;;GAKG;AACH,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM;IAGjC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACG,IAAI,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,YAAY,CAAC;IAqCpE;;;;;;;;;;;;;;;OAeG;IACG,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIvC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;IAiCzE;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC;CASxE"}
|