@tuturuuu/internal-api 0.14.1 → 0.17.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.
Files changed (49) hide show
  1. package/dist/ai.d.ts +1 -0
  2. package/dist/ai.d.ts.map +1 -1
  3. package/dist/auth.d.ts.map +1 -1
  4. package/dist/auth.js +7 -0
  5. package/dist/client.d.ts +17 -0
  6. package/dist/client.d.ts.map +1 -1
  7. package/dist/client.js +178 -0
  8. package/dist/education.d.ts +1 -1
  9. package/dist/education.d.ts.map +1 -1
  10. package/dist/education.js +44 -44
  11. package/dist/external-app-drive.d.ts +51 -0
  12. package/dist/external-app-drive.d.ts.map +1 -0
  13. package/dist/external-app-drive.js +72 -0
  14. package/dist/external-projects.d.ts +3 -42
  15. package/dist/external-projects.d.ts.map +1 -1
  16. package/dist/finance.d.ts.map +1 -1
  17. package/dist/finance.js +75 -75
  18. package/dist/index.d.ts +8 -5
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +62 -16
  21. package/dist/infrastructure/types.d.ts +1 -1
  22. package/dist/infrastructure/types.d.ts.map +1 -1
  23. package/dist/inventory.d.ts +50 -0
  24. package/dist/inventory.d.ts.map +1 -1
  25. package/dist/inventory.js +8 -0
  26. package/dist/mail-types.d.ts +288 -0
  27. package/dist/mail-types.d.ts.map +1 -0
  28. package/dist/mail-types.js +2 -0
  29. package/dist/mail.d.ts +58 -110
  30. package/dist/mail.d.ts.map +1 -1
  31. package/dist/mail.js +229 -0
  32. package/dist/meetings.d.ts +26 -0
  33. package/dist/meetings.d.ts.map +1 -0
  34. package/dist/meetings.js +77 -0
  35. package/dist/pay.d.ts +64 -0
  36. package/dist/pay.d.ts.map +1 -0
  37. package/dist/pay.js +75 -0
  38. package/dist/tasks.d.ts +10 -2
  39. package/dist/tasks.d.ts.map +1 -1
  40. package/dist/teach.d.ts +122 -2
  41. package/dist/teach.d.ts.map +1 -1
  42. package/dist/teach.js +76 -21
  43. package/dist/tulearn.d.ts +3 -1
  44. package/dist/tulearn.d.ts.map +1 -1
  45. package/dist/tulearn.js +19 -18
  46. package/dist/users.d.ts +22 -0
  47. package/dist/users.d.ts.map +1 -1
  48. package/dist/users.js +20 -1
  49. package/package.json +10 -5
package/dist/mail.d.ts CHANGED
@@ -1,114 +1,6 @@
1
1
  import { type InternalApiClientOptions } from './client';
2
- export type MailMailboxRole = 'admin' | 'owner' | 'sender' | 'viewer';
3
- export type MailMailboxType = 'personal' | 'shared';
4
- export type MailMailboxStatus = 'active' | 'archived' | 'disabled' | 'quarantined';
5
- export interface MailMailbox {
6
- address: string;
7
- displayName: string;
8
- id: string;
9
- role: MailMailboxRole;
10
- status: MailMailboxStatus;
11
- type: MailMailboxType;
12
- }
13
- export interface MailLabel {
14
- color: string | null;
15
- id: string;
16
- kind: 'custom' | 'system';
17
- name: string;
18
- slug: string;
19
- }
20
- export interface MailRecipient {
21
- address: string;
22
- displayName: string | null;
23
- kind: 'bcc' | 'cc' | 'from' | 'reply_to' | 'to';
24
- }
25
- export interface MailAttachment {
26
- contentId: string | null;
27
- contentType: string;
28
- disposition: 'attachment' | 'inline';
29
- filename: string;
30
- id: string;
31
- protectedUrl: string | null;
32
- sizeBytes: number;
33
- }
34
- export interface MailMessageSummary {
35
- bodyText: string | null;
36
- createdAt: string;
37
- fromAddress: string;
38
- fromName: string | null;
39
- hasAttachments: boolean;
40
- id: string;
41
- labels: MailLabel[];
42
- mailboxId: string;
43
- receivedAt: string | null;
44
- sentAt: string | null;
45
- snippet: string | null;
46
- starred: boolean;
47
- status: string;
48
- subject: string;
49
- threadId: string | null;
50
- unread: boolean;
51
- }
52
- export interface MailMessageDetail extends MailMessageSummary {
53
- bodyHtml: string | null;
54
- sanitizedHtml: string | null;
55
- attachments: MailAttachment[];
56
- recipients: MailRecipient[];
57
- }
58
- export interface MailBootstrapResponse {
59
- mailboxes: MailMailbox[];
60
- labels: MailLabel[];
61
- user: {
62
- email: string;
63
- id: string;
64
- };
65
- }
66
- export interface ListMailMessagesParams {
67
- folder?: 'archive' | 'drafts' | 'inbox' | 'sent' | 'spam' | 'starred' | 'trash';
68
- label?: string;
69
- page?: number;
70
- pageSize?: number;
71
- query?: string;
72
- }
73
- export interface MailMessagesResponse {
74
- messages: MailMessageSummary[];
75
- pagination: {
76
- page: number;
77
- pageSize: number;
78
- total: number;
79
- };
80
- }
81
- export interface CreateMailDraftPayload {
82
- bodyHtml?: string | null;
83
- bodyText?: string | null;
84
- bcc?: string[];
85
- cc?: string[];
86
- inReplyTo?: string | null;
87
- references?: string[];
88
- subject: string;
89
- to: string[];
90
- }
91
- export type UpdateMailDraftPayload = Partial<CreateMailDraftPayload>;
92
- export interface SendMailMessagePayload extends CreateMailDraftPayload {
93
- draftId?: string | null;
94
- }
95
- export interface MailMutationResponse {
96
- message: MailMessageDetail;
97
- }
98
- export interface UpdateMailMessageStatePayload {
99
- action: 'archive' | 'mark_read' | 'mark_unread' | 'restore' | 'star' | 'trash' | 'unstar';
100
- }
101
- export interface MailMailboxMember {
102
- createdAt: string;
103
- email: string | null;
104
- fullName: string | null;
105
- role: MailMailboxRole;
106
- userId: string;
107
- }
108
- export interface UpsertMailMailboxMemberPayload {
109
- role: MailMailboxRole;
110
- userId: string;
111
- }
2
+ import type { BulkUpdateMailPayload, BulkUpdateMailThreadsPayload, CreateMailDraftPayload, CreateMailOrganizationPayload, GenerateMailAiDraftPayload, GenerateMailAiDraftResponse, ListMailMessagesParams, ListMailThreadsParams, MailAttachment, MailBootstrapResponse, MailCatchAllConfiguration, MailDomain, MailFolderDefinition, MailLabel, MailMailboxMember, MailMailboxSettings, MailMessageDetail, MailMessagesResponse, MailMutationResponse, MailThreadDetail, MailThreadsResponse, SendMailMessagePayload, SuggestMailLabelsPayload, SuggestMailLabelsResponse, UpdateMailCatchAllPayload, UpdateMailDraftPayload, UpdateMailMailboxSettingsPayload, UpdateMailMessageStatePayload, UpdateMailOrganizationPayload, UpsertMailDomainPayload, UpsertMailMailboxMemberPayload } from './mail-types';
3
+ export * from './mail-types';
112
4
  export declare function listWorkspaceEmails(workspaceId: string, query?: {
113
5
  page?: number;
114
6
  pageSize?: number;
@@ -128,12 +20,60 @@ export declare function listWorkspaceEmails(workspaceId: string, query?: {
128
20
  }[]>;
129
21
  export declare function getMailBootstrap(workspaceId: string, options?: InternalApiClientOptions): Promise<MailBootstrapResponse>;
130
22
  export declare function listMailMessages(workspaceId: string, mailboxId: string, params?: ListMailMessagesParams, options?: InternalApiClientOptions): Promise<MailMessagesResponse>;
23
+ export declare function listMailThreads(workspaceId: string, mailboxId: string, params?: ListMailThreadsParams, options?: InternalApiClientOptions): Promise<MailThreadsResponse>;
131
24
  export declare function getMailMessage(workspaceId: string, mailboxId: string, messageId: string, options?: InternalApiClientOptions): Promise<MailMessageDetail>;
25
+ export declare function getMailThread(workspaceId: string, mailboxId: string, threadId: string, options?: InternalApiClientOptions): Promise<MailThreadDetail>;
26
+ export declare function updateMailThreadState(workspaceId: string, mailboxId: string, threadId: string, payload: UpdateMailMessageStatePayload, options?: InternalApiClientOptions): Promise<MailThreadDetail>;
27
+ export declare function bulkUpdateMailThreads(workspaceId: string, mailboxId: string, payload: BulkUpdateMailThreadsPayload, options?: InternalApiClientOptions): Promise<{
28
+ updated: number;
29
+ }>;
132
30
  export declare function createMailDraft(workspaceId: string, mailboxId: string, payload: CreateMailDraftPayload, options?: InternalApiClientOptions): Promise<MailMutationResponse>;
133
31
  export declare function updateMailDraft(workspaceId: string, mailboxId: string, draftId: string, payload: UpdateMailDraftPayload, options?: InternalApiClientOptions): Promise<MailMutationResponse>;
134
32
  export declare function deleteMailDraft(workspaceId: string, mailboxId: string, draftId: string, options?: InternalApiClientOptions): Promise<void>;
33
+ export declare function generateMailAiDraft(workspaceId: string, mailboxId: string, payload: GenerateMailAiDraftPayload, options?: InternalApiClientOptions): Promise<GenerateMailAiDraftResponse>;
34
+ export declare function suggestMailLabels(workspaceId: string, mailboxId: string, payload: SuggestMailLabelsPayload, options?: InternalApiClientOptions): Promise<SuggestMailLabelsResponse>;
35
+ export declare function uploadMailDraftAttachment(workspaceId: string, mailboxId: string, draftId: string, file: Blob, filename: string, metadata?: {
36
+ contentId?: string | null;
37
+ disposition?: 'attachment' | 'inline';
38
+ }, options?: InternalApiClientOptions): Promise<{
39
+ attachment: MailAttachment;
40
+ }>;
41
+ export declare function copyMailDraftAttachments(workspaceId: string, mailboxId: string, draftId: string, payload: {
42
+ attachmentIds: string[];
43
+ sourceMessageId: string;
44
+ }, options?: InternalApiClientOptions): Promise<{
45
+ attachments: MailAttachment[];
46
+ }>;
47
+ export declare function deleteMailDraftAttachment(workspaceId: string, mailboxId: string, draftId: string, attachmentId: string, options?: InternalApiClientOptions): Promise<void>;
48
+ export declare function getMailMailboxSettings(workspaceId: string, mailboxId: string, options?: InternalApiClientOptions): Promise<{
49
+ settings: MailMailboxSettings;
50
+ }>;
51
+ export declare function updateMailMailboxSettings(workspaceId: string, mailboxId: string, payload: UpdateMailMailboxSettingsPayload, options?: InternalApiClientOptions): Promise<{
52
+ settings: MailMailboxSettings;
53
+ }>;
135
54
  export declare function sendMailMessage(workspaceId: string, mailboxId: string, payload: SendMailMessagePayload, options?: InternalApiClientOptions): Promise<MailMutationResponse>;
136
55
  export declare function updateMailMessageState(workspaceId: string, mailboxId: string, messageId: string, payload: UpdateMailMessageStatePayload, options?: InternalApiClientOptions): Promise<MailMutationResponse>;
56
+ export declare function bulkUpdateMailMessages(workspaceId: string, mailboxId: string, payload: BulkUpdateMailPayload, options?: InternalApiClientOptions): Promise<{
57
+ updated: number;
58
+ }>;
59
+ export declare function getMailboxOrganization(workspaceId: string, mailboxId: string, options?: InternalApiClientOptions): Promise<{
60
+ folders: MailFolderDefinition[];
61
+ labels: MailLabel[];
62
+ }>;
63
+ export declare function createMailLabel(workspaceId: string, mailboxId: string, payload: CreateMailOrganizationPayload, options?: InternalApiClientOptions): Promise<{
64
+ label: MailLabel;
65
+ }>;
66
+ export declare function updateMailLabel(workspaceId: string, mailboxId: string, labelId: string, payload: UpdateMailOrganizationPayload, options?: InternalApiClientOptions): Promise<{
67
+ label: MailLabel;
68
+ }>;
69
+ export declare function deleteMailLabel(workspaceId: string, mailboxId: string, labelId: string, options?: InternalApiClientOptions): Promise<void>;
70
+ export declare function createMailFolder(workspaceId: string, mailboxId: string, payload: CreateMailOrganizationPayload, options?: InternalApiClientOptions): Promise<{
71
+ folder: MailFolderDefinition;
72
+ }>;
73
+ export declare function updateMailFolder(workspaceId: string, mailboxId: string, folderId: string, payload: UpdateMailOrganizationPayload, options?: InternalApiClientOptions): Promise<{
74
+ folder: MailFolderDefinition;
75
+ }>;
76
+ export declare function deleteMailFolder(workspaceId: string, mailboxId: string, folderId: string, options?: InternalApiClientOptions): Promise<void>;
137
77
  export declare function listMailMailboxMembers(workspaceId: string, mailboxId: string, options?: InternalApiClientOptions): Promise<{
138
78
  members: MailMailboxMember[];
139
79
  }>;
@@ -141,4 +81,12 @@ export declare function upsertMailMailboxMember(workspaceId: string, mailboxId:
141
81
  member: MailMailboxMember;
142
82
  }>;
143
83
  export declare function removeMailMailboxMember(workspaceId: string, mailboxId: string, userId: string, options?: InternalApiClientOptions): Promise<void>;
84
+ export declare function listMailDomains(options?: InternalApiClientOptions): Promise<{
85
+ domains: MailDomain[];
86
+ }>;
87
+ export declare function upsertMailDomain(payload: UpsertMailDomainPayload, options?: InternalApiClientOptions): Promise<{
88
+ domain: MailDomain;
89
+ }>;
90
+ export declare function getMailCatchAllConfiguration(domainId: string, options?: InternalApiClientOptions): Promise<MailCatchAllConfiguration>;
91
+ export declare function updateMailCatchAllConfiguration(domainId: string, payload: UpdateMailCatchAllPayload, options?: InternalApiClientOptions): Promise<MailCatchAllConfiguration>;
144
92
  //# sourceMappingURL=mail.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mail.d.ts","sourceRoot":"","sources":["../src/mail.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,wBAAwB,EAG9B,MAAM,UAAU,CAAC;AAElB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 -1,18 +1,56 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
17
  exports.listWorkspaceEmails = listWorkspaceEmails;
4
18
  exports.getMailBootstrap = getMailBootstrap;
5
19
  exports.listMailMessages = listMailMessages;
20
+ exports.listMailThreads = listMailThreads;
6
21
  exports.getMailMessage = getMailMessage;
22
+ exports.getMailThread = getMailThread;
23
+ exports.updateMailThreadState = updateMailThreadState;
24
+ exports.bulkUpdateMailThreads = bulkUpdateMailThreads;
7
25
  exports.createMailDraft = createMailDraft;
8
26
  exports.updateMailDraft = updateMailDraft;
9
27
  exports.deleteMailDraft = deleteMailDraft;
28
+ exports.generateMailAiDraft = generateMailAiDraft;
29
+ exports.suggestMailLabels = suggestMailLabels;
30
+ exports.uploadMailDraftAttachment = uploadMailDraftAttachment;
31
+ exports.copyMailDraftAttachments = copyMailDraftAttachments;
32
+ exports.deleteMailDraftAttachment = deleteMailDraftAttachment;
33
+ exports.getMailMailboxSettings = getMailMailboxSettings;
34
+ exports.updateMailMailboxSettings = updateMailMailboxSettings;
10
35
  exports.sendMailMessage = sendMailMessage;
11
36
  exports.updateMailMessageState = updateMailMessageState;
37
+ exports.bulkUpdateMailMessages = bulkUpdateMailMessages;
38
+ exports.getMailboxOrganization = getMailboxOrganization;
39
+ exports.createMailLabel = createMailLabel;
40
+ exports.updateMailLabel = updateMailLabel;
41
+ exports.deleteMailLabel = deleteMailLabel;
42
+ exports.createMailFolder = createMailFolder;
43
+ exports.updateMailFolder = updateMailFolder;
44
+ exports.deleteMailFolder = deleteMailFolder;
12
45
  exports.listMailMailboxMembers = listMailMailboxMembers;
13
46
  exports.upsertMailMailboxMember = upsertMailMailboxMember;
14
47
  exports.removeMailMailboxMember = removeMailMailboxMember;
48
+ exports.listMailDomains = listMailDomains;
49
+ exports.upsertMailDomain = upsertMailDomain;
50
+ exports.getMailCatchAllConfiguration = getMailCatchAllConfiguration;
51
+ exports.updateMailCatchAllConfiguration = updateMailCatchAllConfiguration;
15
52
  const client_1 = require("./client");
53
+ __exportStar(require("./mail-types"), exports);
16
54
  function workspaceMailPath(workspaceId, suffix = '') {
17
55
  return `/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/mail${suffix}`;
18
56
  }
@@ -24,6 +62,9 @@ function jsonHeaders() {
24
62
  'Content-Type': 'application/json',
25
63
  };
26
64
  }
65
+ function mailPlatformPath(suffix) {
66
+ return `/api/v1/mail${suffix}`;
67
+ }
27
68
  function normalizeMessagesQuery(params) {
28
69
  if (!params)
29
70
  return undefined;
@@ -53,6 +94,14 @@ async function listMailMessages(workspaceId, mailboxId, params, options) {
53
94
  query: normalizeMessagesQuery(params),
54
95
  });
55
96
  }
97
+ async function listMailThreads(workspaceId, mailboxId, params, options) {
98
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
99
+ return client.json(mailboxPath(workspaceId, mailboxId, '/threads'), {
100
+ cache: 'no-store',
101
+ credentials: 'include',
102
+ query: normalizeMessagesQuery(params),
103
+ });
104
+ }
56
105
  async function getMailMessage(workspaceId, mailboxId, messageId, options) {
57
106
  const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
58
107
  return client.json(mailboxPath(workspaceId, mailboxId, `/messages/${(0, client_1.encodePathSegment)(messageId)}`), {
@@ -60,6 +109,30 @@ async function getMailMessage(workspaceId, mailboxId, messageId, options) {
60
109
  credentials: 'include',
61
110
  });
62
111
  }
112
+ async function getMailThread(workspaceId, mailboxId, threadId, options) {
113
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
114
+ return client.json(mailboxPath(workspaceId, mailboxId, `/threads/${(0, client_1.encodePathSegment)(threadId)}`), { cache: 'no-store', credentials: 'include' });
115
+ }
116
+ async function updateMailThreadState(workspaceId, mailboxId, threadId, payload, options) {
117
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
118
+ return client.json(mailboxPath(workspaceId, mailboxId, `/threads/${(0, client_1.encodePathSegment)(threadId)}`), {
119
+ body: JSON.stringify(payload),
120
+ cache: 'no-store',
121
+ credentials: 'include',
122
+ headers: jsonHeaders(),
123
+ method: 'PATCH',
124
+ });
125
+ }
126
+ async function bulkUpdateMailThreads(workspaceId, mailboxId, payload, options) {
127
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
128
+ return client.json(mailboxPath(workspaceId, mailboxId, '/threads/bulk'), {
129
+ body: JSON.stringify(payload),
130
+ cache: 'no-store',
131
+ credentials: 'include',
132
+ headers: jsonHeaders(),
133
+ method: 'POST',
134
+ });
135
+ }
63
136
  async function createMailDraft(workspaceId, mailboxId, payload, options) {
64
137
  const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
65
138
  return client.json(mailboxPath(workspaceId, mailboxId, '/drafts'), {
@@ -88,6 +161,69 @@ async function deleteMailDraft(workspaceId, mailboxId, draftId, options) {
88
161
  method: 'DELETE',
89
162
  });
90
163
  }
164
+ async function generateMailAiDraft(workspaceId, mailboxId, payload, options) {
165
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
166
+ return client.json(mailboxPath(workspaceId, mailboxId, '/ai/draft'), {
167
+ body: JSON.stringify(payload),
168
+ cache: 'no-store',
169
+ credentials: 'include',
170
+ headers: jsonHeaders(),
171
+ method: 'POST',
172
+ });
173
+ }
174
+ async function suggestMailLabels(workspaceId, mailboxId, payload, options) {
175
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
176
+ return client.json(mailboxPath(workspaceId, mailboxId, '/ai/labels'), {
177
+ body: JSON.stringify(payload),
178
+ cache: 'no-store',
179
+ credentials: 'include',
180
+ headers: jsonHeaders(),
181
+ method: 'POST',
182
+ });
183
+ }
184
+ async function uploadMailDraftAttachment(workspaceId, mailboxId, draftId, file, filename, metadata, options) {
185
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
186
+ const body = new FormData();
187
+ body.append('file', file, filename);
188
+ if (metadata?.contentId)
189
+ body.append('contentId', metadata.contentId);
190
+ if (metadata?.disposition)
191
+ body.append('disposition', metadata.disposition);
192
+ return client.json(mailboxPath(workspaceId, mailboxId, `/drafts/${(0, client_1.encodePathSegment)(draftId)}/attachments`), {
193
+ body,
194
+ cache: 'no-store',
195
+ credentials: 'include',
196
+ method: 'POST',
197
+ });
198
+ }
199
+ async function copyMailDraftAttachments(workspaceId, mailboxId, draftId, payload, options) {
200
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
201
+ return client.json(mailboxPath(workspaceId, mailboxId, `/drafts/${(0, client_1.encodePathSegment)(draftId)}/attachments`), {
202
+ body: JSON.stringify(payload),
203
+ cache: 'no-store',
204
+ credentials: 'include',
205
+ headers: jsonHeaders(),
206
+ method: 'POST',
207
+ });
208
+ }
209
+ async function deleteMailDraftAttachment(workspaceId, mailboxId, draftId, attachmentId, options) {
210
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
211
+ return client.json(mailboxPath(workspaceId, mailboxId, `/drafts/${(0, client_1.encodePathSegment)(draftId)}/attachments/${(0, client_1.encodePathSegment)(attachmentId)}`), { cache: 'no-store', credentials: 'include', method: 'DELETE' });
212
+ }
213
+ async function getMailMailboxSettings(workspaceId, mailboxId, options) {
214
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
215
+ return client.json(mailboxPath(workspaceId, mailboxId, '/settings'), { cache: 'no-store', credentials: 'include' });
216
+ }
217
+ async function updateMailMailboxSettings(workspaceId, mailboxId, payload, options) {
218
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
219
+ return client.json(mailboxPath(workspaceId, mailboxId, '/settings'), {
220
+ body: JSON.stringify(payload),
221
+ cache: 'no-store',
222
+ credentials: 'include',
223
+ headers: jsonHeaders(),
224
+ method: 'PATCH',
225
+ });
226
+ }
91
227
  async function sendMailMessage(workspaceId, mailboxId, payload, options) {
92
228
  const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
93
229
  return client.json(mailboxPath(workspaceId, mailboxId, '/messages'), {
@@ -108,6 +244,68 @@ async function updateMailMessageState(workspaceId, mailboxId, messageId, payload
108
244
  method: 'PATCH',
109
245
  });
110
246
  }
247
+ async function bulkUpdateMailMessages(workspaceId, mailboxId, payload, options) {
248
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
249
+ return client.json(mailboxPath(workspaceId, mailboxId, '/messages/bulk'), {
250
+ body: JSON.stringify(payload),
251
+ cache: 'no-store',
252
+ credentials: 'include',
253
+ headers: jsonHeaders(),
254
+ method: 'PATCH',
255
+ });
256
+ }
257
+ async function getMailboxOrganization(workspaceId, mailboxId, options) {
258
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
259
+ return client.json(mailboxPath(workspaceId, mailboxId, '/organization'), { cache: 'no-store', credentials: 'include' });
260
+ }
261
+ async function createMailLabel(workspaceId, mailboxId, payload, options) {
262
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
263
+ return client.json(mailboxPath(workspaceId, mailboxId, '/labels'), {
264
+ body: JSON.stringify(payload),
265
+ cache: 'no-store',
266
+ credentials: 'include',
267
+ headers: jsonHeaders(),
268
+ method: 'POST',
269
+ });
270
+ }
271
+ async function updateMailLabel(workspaceId, mailboxId, labelId, payload, options) {
272
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
273
+ return client.json(mailboxPath(workspaceId, mailboxId, `/labels/${(0, client_1.encodePathSegment)(labelId)}`), {
274
+ body: JSON.stringify(payload),
275
+ cache: 'no-store',
276
+ credentials: 'include',
277
+ headers: jsonHeaders(),
278
+ method: 'PATCH',
279
+ });
280
+ }
281
+ async function deleteMailLabel(workspaceId, mailboxId, labelId, options) {
282
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
283
+ return client.json(mailboxPath(workspaceId, mailboxId, `/labels/${(0, client_1.encodePathSegment)(labelId)}`), { cache: 'no-store', credentials: 'include', method: 'DELETE' });
284
+ }
285
+ async function createMailFolder(workspaceId, mailboxId, payload, options) {
286
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
287
+ return client.json(mailboxPath(workspaceId, mailboxId, '/folders'), {
288
+ body: JSON.stringify(payload),
289
+ cache: 'no-store',
290
+ credentials: 'include',
291
+ headers: jsonHeaders(),
292
+ method: 'POST',
293
+ });
294
+ }
295
+ async function updateMailFolder(workspaceId, mailboxId, folderId, payload, options) {
296
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
297
+ return client.json(mailboxPath(workspaceId, mailboxId, `/folders/${(0, client_1.encodePathSegment)(folderId)}`), {
298
+ body: JSON.stringify(payload),
299
+ cache: 'no-store',
300
+ credentials: 'include',
301
+ headers: jsonHeaders(),
302
+ method: 'PATCH',
303
+ });
304
+ }
305
+ async function deleteMailFolder(workspaceId, mailboxId, folderId, options) {
306
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
307
+ return client.json(mailboxPath(workspaceId, mailboxId, `/folders/${(0, client_1.encodePathSegment)(folderId)}`), { cache: 'no-store', credentials: 'include', method: 'DELETE' });
308
+ }
111
309
  async function listMailMailboxMembers(workspaceId, mailboxId, options) {
112
310
  const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
113
311
  return client.json(mailboxPath(workspaceId, mailboxId, '/members'), {
@@ -133,3 +331,34 @@ async function removeMailMailboxMember(workspaceId, mailboxId, userId, options)
133
331
  method: 'DELETE',
134
332
  });
135
333
  }
334
+ async function listMailDomains(options) {
335
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
336
+ return client.json(mailPlatformPath('/domains'), {
337
+ cache: 'no-store',
338
+ credentials: 'include',
339
+ });
340
+ }
341
+ async function upsertMailDomain(payload, options) {
342
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
343
+ return client.json(mailPlatformPath('/domains'), {
344
+ body: JSON.stringify(payload),
345
+ cache: 'no-store',
346
+ credentials: 'include',
347
+ headers: jsonHeaders(),
348
+ method: 'PUT',
349
+ });
350
+ }
351
+ async function getMailCatchAllConfiguration(domainId, options) {
352
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
353
+ return client.json(mailPlatformPath(`/domains/${(0, client_1.encodePathSegment)(domainId)}/catch-all`), { cache: 'no-store', credentials: 'include' });
354
+ }
355
+ async function updateMailCatchAllConfiguration(domainId, payload, options) {
356
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withMailApiBaseUrl)(options));
357
+ return client.json(mailPlatformPath(`/domains/${(0, client_1.encodePathSegment)(domainId)}/catch-all`), {
358
+ body: JSON.stringify(payload),
359
+ cache: 'no-store',
360
+ credentials: 'include',
361
+ headers: jsonHeaders(),
362
+ method: 'PATCH',
363
+ });
364
+ }
@@ -0,0 +1,26 @@
1
+ import { type InternalApiClientOptions } from './client';
2
+ export declare function getWorkspaceMeetings<T>(workspaceId: string, query: {
3
+ page: number;
4
+ pageSize: number;
5
+ search?: string;
6
+ }, options?: InternalApiClientOptions): Promise<T>;
7
+ export declare function createWorkspaceMeeting<T>(workspaceId: string, payload: {
8
+ name: string;
9
+ time: string;
10
+ }, options?: InternalApiClientOptions): Promise<T>;
11
+ export declare function updateWorkspaceMeeting<T>(workspaceId: string, meetingId: string, payload: {
12
+ name: string;
13
+ time: string;
14
+ }, options?: InternalApiClientOptions): Promise<T>;
15
+ export declare function deleteWorkspaceMeeting(workspaceId: string, meetingId: string, options?: InternalApiClientOptions): Promise<void>;
16
+ export declare function getWorkspaceMeetingRecordings<T>(workspaceId: string, meetingId: string, query?: {
17
+ limit?: number;
18
+ status?: string;
19
+ }, options?: InternalApiClientOptions): Promise<T>;
20
+ export declare function toggleWorkspaceMeetingRecording<T>(workspaceId: string, meetingId: string, options?: InternalApiClientOptions): Promise<T>;
21
+ export declare function uploadWorkspaceMeetingRecording<T>(workspaceId: string, meetingId: string, sessionId: string, audio: Blob, options?: InternalApiClientOptions): Promise<T>;
22
+ export declare function getWorkspaceMeetingRecordingPlayback<T>(workspaceId: string, meetingId: string, sessionId: string, options?: InternalApiClientOptions): Promise<T>;
23
+ export declare function updateWorkspaceMeetingRecording<T>(workspaceId: string, meetingId: string, sessionId: string, payload: unknown, method: 'PATCH' | 'PUT', options?: InternalApiClientOptions): Promise<T>;
24
+ export declare function deleteWorkspaceMeetingRecording(workspaceId: string, meetingId: string, sessionId: string, options?: InternalApiClientOptions): Promise<void>;
25
+ export declare function transcribeWorkspaceMeetingAudio<T>(audio: Blob, options?: InternalApiClientOptions): Promise<T>;
26
+ //# sourceMappingURL=meetings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meetings.d.ts","sourceRoot":"","sources":["../src/meetings.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,UAAU,CAAC;AAgBlB,wBAAsB,oBAAoB,CAAC,CAAC,EAC1C,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE;IAAE,IA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AM,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,wBAAwB,cAMnC;AAED,wBAAsB,+BAA+B,CAAC,CAAC,EACrD,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,OAAO,GAAG,KAAK,EACvB,OAAO,CAAC,EAAE,wBAAwB,cAWnC;AAED,wBAAsB,+BAA+B,CACnD,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,wBAAwB,iBAMnC;AAED,wBAAsB,+BAA+B,CAAC,CAAC,EACrD,KAAK,EAAE,IAAI,EACX,OAAO,CAAC,EAAE,wBAAwB,cAQnC"}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getWorkspaceMeetings = getWorkspaceMeetings;
4
+ exports.createWorkspaceMeeting = createWorkspaceMeeting;
5
+ exports.updateWorkspaceMeeting = updateWorkspaceMeeting;
6
+ exports.deleteWorkspaceMeeting = deleteWorkspaceMeeting;
7
+ exports.getWorkspaceMeetingRecordings = getWorkspaceMeetingRecordings;
8
+ exports.toggleWorkspaceMeetingRecording = toggleWorkspaceMeetingRecording;
9
+ exports.uploadWorkspaceMeetingRecording = uploadWorkspaceMeetingRecording;
10
+ exports.getWorkspaceMeetingRecordingPlayback = getWorkspaceMeetingRecordingPlayback;
11
+ exports.updateWorkspaceMeetingRecording = updateWorkspaceMeetingRecording;
12
+ exports.deleteWorkspaceMeetingRecording = deleteWorkspaceMeetingRecording;
13
+ exports.transcribeWorkspaceMeetingAudio = transcribeWorkspaceMeetingAudio;
14
+ const client_1 = require("./client");
15
+ function meetingPath(workspaceId, meetingId) {
16
+ const base = `/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/meetings`;
17
+ return meetingId ? `${base}/${(0, client_1.encodePathSegment)(meetingId)}` : base;
18
+ }
19
+ function recordingPath(workspaceId, meetingId, sessionId) {
20
+ const base = `${meetingPath(workspaceId, meetingId)}/recordings`;
21
+ return sessionId ? `${base}/${(0, client_1.encodePathSegment)(sessionId)}` : base;
22
+ }
23
+ async function getWorkspaceMeetings(workspaceId, query, options) {
24
+ return (0, client_1.getInternalApiClient)(options).json(meetingPath(workspaceId), {
25
+ cache: 'no-store',
26
+ query,
27
+ });
28
+ }
29
+ async function createWorkspaceMeeting(workspaceId, payload, options) {
30
+ return (0, client_1.getInternalApiClient)(options).json(meetingPath(workspaceId), {
31
+ body: JSON.stringify(payload),
32
+ cache: 'no-store',
33
+ headers: { 'Content-Type': 'application/json' },
34
+ method: 'POST',
35
+ });
36
+ }
37
+ async function updateWorkspaceMeeting(workspaceId, meetingId, payload, options) {
38
+ return (0, client_1.getInternalApiClient)(options).json(meetingPath(workspaceId, meetingId), {
39
+ body: JSON.stringify(payload),
40
+ cache: 'no-store',
41
+ headers: { 'Content-Type': 'application/json' },
42
+ method: 'PUT',
43
+ });
44
+ }
45
+ async function deleteWorkspaceMeeting(workspaceId, meetingId, options) {
46
+ return (0, client_1.getInternalApiClient)(options).json(meetingPath(workspaceId, meetingId), { cache: 'no-store', method: 'DELETE' });
47
+ }
48
+ async function getWorkspaceMeetingRecordings(workspaceId, meetingId, query, options) {
49
+ return (0, client_1.getInternalApiClient)(options).json(recordingPath(workspaceId, meetingId), { cache: 'no-store', query });
50
+ }
51
+ async function toggleWorkspaceMeetingRecording(workspaceId, meetingId, options) {
52
+ return (0, client_1.getInternalApiClient)(options).json(`${meetingPath(workspaceId, meetingId)}/record`, { cache: 'no-store', method: 'POST' });
53
+ }
54
+ async function uploadWorkspaceMeetingRecording(workspaceId, meetingId, sessionId, audio, options) {
55
+ const body = new FormData();
56
+ body.append('audio', audio);
57
+ return (0, client_1.getInternalApiClient)(options).json(`${recordingPath(workspaceId, meetingId, sessionId)}/upload`, { body, cache: 'no-store', method: 'POST' });
58
+ }
59
+ async function getWorkspaceMeetingRecordingPlayback(workspaceId, meetingId, sessionId, options) {
60
+ return (0, client_1.getInternalApiClient)(options).json(`${recordingPath(workspaceId, meetingId, sessionId)}/play`, { cache: 'no-store' });
61
+ }
62
+ async function updateWorkspaceMeetingRecording(workspaceId, meetingId, sessionId, payload, method, options) {
63
+ return (0, client_1.getInternalApiClient)(options).json(recordingPath(workspaceId, meetingId, sessionId), {
64
+ body: JSON.stringify(payload),
65
+ cache: 'no-store',
66
+ headers: { 'Content-Type': 'application/json' },
67
+ method,
68
+ });
69
+ }
70
+ async function deleteWorkspaceMeetingRecording(workspaceId, meetingId, sessionId, options) {
71
+ return (0, client_1.getInternalApiClient)(options).json(recordingPath(workspaceId, meetingId, sessionId), { cache: 'no-store', method: 'DELETE' });
72
+ }
73
+ async function transcribeWorkspaceMeetingAudio(audio, options) {
74
+ const body = new FormData();
75
+ body.append('audio', audio, 'recording.mp3');
76
+ return (0, client_1.getInternalApiClient)(options).json('/api/ai/meetings/transcription', { body, cache: 'no-store', method: 'POST' });
77
+ }