@tuturuuu/internal-api 0.15.0 → 0.18.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 +7 -4
  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 +77 -0
  24. package/dist/inventory.d.ts.map +1 -1
  25. package/dist/inventory.js +20 -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 +127 -2
  41. package/dist/teach.d.ts.map +1 -1
  42. package/dist/teach.js +86 -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 +21 -0
  47. package/dist/users.d.ts.map +1 -1
  48. package/dist/users.js +18 -0
  49. package/package.json +10 -5
package/dist/mail.js CHANGED
@@ -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":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S,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,IAAI,EACX,OAAO,CAAC,EAAE,wBAAwB,cAQnC;AAED,wBAAsB,oCAAoC,CAAC,CAAC,EAC1D,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,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
+ }
package/dist/pay.d.ts ADDED
@@ -0,0 +1,64 @@
1
+ import { type InternalApiClientOptions } from './client';
2
+ export type WorkspaceBillingSummary = {
3
+ isPersonalWorkspace: boolean;
4
+ subscription: null | {
5
+ billingCycle: string | null;
6
+ cancelAtPeriodEnd: boolean;
7
+ currentPeriodEnd: string | null;
8
+ maxSeats: number | null;
9
+ name: string;
10
+ seatCount: number | null;
11
+ status: string;
12
+ tier: string | null;
13
+ };
14
+ };
15
+ export type WorkspaceAiCreditStatus = {
16
+ bonusCredits: number;
17
+ included: {
18
+ bonusCredits: number;
19
+ remaining: number;
20
+ totalAllocated: number;
21
+ totalUsed: number;
22
+ };
23
+ payg: {
24
+ nextExpiry: string | null;
25
+ remaining: number;
26
+ totalGranted: number;
27
+ totalUsed: number;
28
+ };
29
+ percentUsed: number;
30
+ remaining: number;
31
+ totalAllocated: number;
32
+ totalUsed: number;
33
+ };
34
+ export declare function getPayWorkspaceBillingSummary(workspaceId: string, options?: InternalApiClientOptions): Promise<WorkspaceBillingSummary>;
35
+ export declare function getPayWorkspaceAiCreditStatus(workspaceId: string, options?: InternalApiClientOptions): Promise<WorkspaceAiCreditStatus>;
36
+ export declare function createPayCreditPackCheckout(payload: {
37
+ creditPackId: string;
38
+ wsId: string;
39
+ }, options?: InternalApiClientOptions): Promise<{
40
+ url: string;
41
+ }>;
42
+ export declare function createPaySubscriptionCheckout(subscriptionId: string, payload: {
43
+ productId: string;
44
+ wsId: string;
45
+ }, options?: InternalApiClientOptions): Promise<{
46
+ url: string;
47
+ }>;
48
+ export declare function getPaySubscriptionChangePreview<T>(subscriptionId: string, productId: string, options?: InternalApiClientOptions): Promise<T>;
49
+ export declare function changePaySubscriptionPlan(subscriptionId: string, productId: string, options?: InternalApiClientOptions): Promise<{
50
+ success?: boolean;
51
+ }>;
52
+ export declare function updatePaySubscriptionCancellation(subscriptionId: string, cancelAtPeriodEnd: boolean, options?: InternalApiClientOptions): Promise<{
53
+ success?: boolean;
54
+ }>;
55
+ export declare function updatePaySubscriptionSeats(payload: {
56
+ newSeatCount: number;
57
+ wsId: string;
58
+ }, options?: InternalApiClientOptions): Promise<{
59
+ newSeats: number;
60
+ }>;
61
+ export declare function getPayOrderInvoiceUrl(orderId: string, options?: InternalApiClientOptions): Promise<{
62
+ url?: string;
63
+ }>;
64
+ //# sourceMappingURL=pay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pay.d.ts","sourceRoot":"","sources":["../src/pay.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,wBAAwB,EAE9B,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,uBAAuB,GA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;GAShD;AAED,wBAAgB,6BAA6B,CAC3C,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAC5C,OAAO,CAAC,EAAE,wBAAwB;SAEO,MAAM;GAShD;AAED,wBAAgB,+BAA+B,CAAC,CAAC,EAC/C,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,wBAAwB,cAWnC;AAED,wBAAgB,yBAAyB,CACvC,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,wBAAwB;cAEY,OAAO;GAStD;AAED,wBAAgB,iCAAiC,CAC/C,cAAc,EAAE,MAAM,EACtB,iBAAiB,EAAE,OAAO,EAC1B,OAAO,CAAC,EAAE,wBAAwB;cAEY,OAAO;GAQtD;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAC/C,OAAO,CAAC,EAAE,wBAAwB;cAEY,MAAM;GASrD;AAED,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,wBAAwB;UAMP,MAAM;GAClC"}
package/dist/pay.js ADDED
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPayWorkspaceBillingSummary = getPayWorkspaceBillingSummary;
4
+ exports.getPayWorkspaceAiCreditStatus = getPayWorkspaceAiCreditStatus;
5
+ exports.createPayCreditPackCheckout = createPayCreditPackCheckout;
6
+ exports.createPaySubscriptionCheckout = createPaySubscriptionCheckout;
7
+ exports.getPaySubscriptionChangePreview = getPaySubscriptionChangePreview;
8
+ exports.changePaySubscriptionPlan = changePaySubscriptionPlan;
9
+ exports.updatePaySubscriptionCancellation = updatePaySubscriptionCancellation;
10
+ exports.updatePaySubscriptionSeats = updatePaySubscriptionSeats;
11
+ exports.getPayOrderInvoiceUrl = getPayOrderInvoiceUrl;
12
+ const client_1 = require("./client");
13
+ function getPayWorkspaceBillingSummary(workspaceId, options) {
14
+ const client = (0, client_1.getInternalApiClient)((0, client_1.withPayApiBaseUrl)(options));
15
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/billing/summary`, { cache: 'no-store' });
16
+ }
17
+ function getPayWorkspaceAiCreditStatus(workspaceId, options) {
18
+ return getPayClient(options).json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/ai/credits`, { cache: 'no-store' });
19
+ }
20
+ function getPayClient(options) {
21
+ return (0, client_1.getInternalApiClient)((0, client_1.withPayApiBaseUrl)(options));
22
+ }
23
+ function createPayCreditPackCheckout(payload, options) {
24
+ return getPayClient(options).json('/api/payment/credit-packs/checkouts', {
25
+ body: JSON.stringify(payload),
26
+ cache: 'no-store',
27
+ headers: { 'Content-Type': 'application/json' },
28
+ method: 'POST',
29
+ });
30
+ }
31
+ function createPaySubscriptionCheckout(subscriptionId, payload, options) {
32
+ return getPayClient(options).json(`/api/payment/subscriptions/${(0, client_1.encodePathSegment)(subscriptionId)}/checkouts`, {
33
+ body: JSON.stringify(payload),
34
+ cache: 'no-store',
35
+ headers: { 'Content-Type': 'application/json' },
36
+ method: 'POST',
37
+ });
38
+ }
39
+ function getPaySubscriptionChangePreview(subscriptionId, productId, options) {
40
+ return getPayClient(options).json(`/api/payment/subscriptions/${(0, client_1.encodePathSegment)(subscriptionId)}/preview`, {
41
+ body: JSON.stringify({ productId }),
42
+ cache: 'no-store',
43
+ headers: { 'Content-Type': 'application/json' },
44
+ method: 'POST',
45
+ });
46
+ }
47
+ function changePaySubscriptionPlan(subscriptionId, productId, options) {
48
+ return getPayClient(options).json(`/api/payment/subscriptions/${(0, client_1.encodePathSegment)(subscriptionId)}/change`, {
49
+ body: JSON.stringify({ productId }),
50
+ cache: 'no-store',
51
+ headers: { 'Content-Type': 'application/json' },
52
+ method: 'POST',
53
+ });
54
+ }
55
+ function updatePaySubscriptionCancellation(subscriptionId, cancelAtPeriodEnd, options) {
56
+ return getPayClient(options).json(`/api/payment/customer-portal/subscriptions/${(0, client_1.encodePathSegment)(subscriptionId)}`, {
57
+ cache: 'no-store',
58
+ headers: { 'Content-Type': 'application/json' },
59
+ method: cancelAtPeriodEnd ? 'DELETE' : 'PATCH',
60
+ });
61
+ }
62
+ function updatePaySubscriptionSeats(payload, options) {
63
+ return getPayClient(options).json('/api/payment/seats', {
64
+ body: JSON.stringify(payload),
65
+ cache: 'no-store',
66
+ headers: { 'Content-Type': 'application/json' },
67
+ method: 'POST',
68
+ });
69
+ }
70
+ async function getPayOrderInvoiceUrl(orderId, options) {
71
+ const path = `/api/payment/orders/${(0, client_1.encodePathSegment)(orderId)}/invoice`;
72
+ const client = getPayClient(options);
73
+ await client.json(path, { cache: 'no-store', method: 'POST' });
74
+ return client.json(path, { cache: 'no-store' });
75
+ }
package/dist/tasks.d.ts CHANGED
@@ -281,6 +281,7 @@ export interface CurrentUserTaskPersonalPlacementPayload {
281
281
  personal_sort_key?: number | null;
282
282
  previous_task_id?: string | null;
283
283
  next_task_id?: string | null;
284
+ terminal_status?: 'done' | 'closed';
284
285
  }
285
286
  export interface CurrentUserTaskPersonalPlacementResponse {
286
287
  task: WorkspaceTaskApiTask;
@@ -404,15 +405,20 @@ export interface WorkspaceTaskListSummary {
404
405
  position: number | null;
405
406
  deleted?: boolean;
406
407
  }
408
+ export interface WorkspaceTaskBoardDefaultListColumns {
409
+ default_list_id?: string | null;
410
+ default_done_list_id?: string | null;
411
+ default_closed_list_id?: string | null;
412
+ }
407
413
  export type WorkspaceTaskBoardDetail = WorkspaceTaskBoardRow & {
408
414
  access_type?: 'member' | 'guest';
409
415
  guest_permission?: WorkspaceTaskBoardSharePermission | null;
410
416
  has_guest_access?: boolean;
411
417
  task_lists?: WorkspaceTaskListSummary[];
412
- };
418
+ } & WorkspaceTaskBoardDefaultListColumns;
413
419
  export type WorkspaceTaskBoardWithLists = Pick<WorkspaceTaskBoardRow, 'id' | 'name' | 'created_at'> & {
414
420
  task_lists: WorkspaceTaskListSummary[];
415
- };
421
+ } & WorkspaceTaskBoardDefaultListColumns;
416
422
  export interface ListWorkspaceTaskBoardsOptions {
417
423
  q?: string;
418
424
  page?: number;
@@ -444,6 +450,8 @@ export interface ListWorkspaceBoardsResponse {
444
450
  export type CreateWorkspaceTaskBoardPayload = Pick<Database['public']['Tables']['workspace_boards']['Insert'], 'name' | 'icon' | 'template_id'>;
445
451
  export type UpdateWorkspaceTaskBoardPayload = Pick<Database['public']['Tables']['workspace_boards']['Update'], 'name' | 'icon' | 'ticket_prefix' | 'default_list_id'> & {
446
452
  archived?: boolean;
453
+ default_done_list_id?: string | null;
454
+ default_closed_list_id?: string | null;
447
455
  group_ids?: string[];
448
456
  };
449
457
  export interface UpdateWorkspaceTaskBoardEstimationPayload {