@tuturuuu/internal-api 0.0.2 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-memory.d.ts +76 -0
- package/dist/ai-memory.d.ts.map +1 -0
- package/dist/ai-memory.js +59 -0
- package/dist/ai.d.ts +67 -3
- package/dist/ai.d.ts.map +1 -1
- package/dist/ai.js +121 -0
- package/dist/auth.d.ts +121 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +111 -0
- package/dist/calendar.d.ts +17 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +9 -0
- package/dist/chat-conversations.d.ts +81 -0
- package/dist/chat-conversations.d.ts.map +1 -0
- package/dist/chat-conversations.js +384 -0
- package/dist/chat-internal.d.ts +11 -0
- package/dist/chat-internal.d.ts.map +1 -0
- package/dist/chat-internal.js +39 -0
- package/dist/chat-legacy.d.ts +23 -0
- package/dist/chat-legacy.d.ts.map +1 -0
- package/dist/chat-legacy.js +68 -0
- package/dist/chat-types.d.ts +262 -0
- package/dist/chat-types.d.ts.map +1 -0
- package/dist/chat-types.js +2 -0
- package/dist/chat.d.ts +3 -45
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +17 -65
- package/dist/client.d.ts +5 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +50 -5
- package/dist/education.d.ts +288 -2
- package/dist/education.d.ts.map +1 -1
- package/dist/education.js +176 -0
- package/dist/external-project-team.d.ts +51 -0
- package/dist/external-project-team.d.ts.map +1 -0
- package/dist/external-project-team.js +137 -0
- package/dist/external-projects.d.ts +98 -10
- package/dist/external-projects.d.ts.map +1 -1
- package/dist/external-projects.js +92 -33
- package/dist/finance.d.ts +491 -3
- package/dist/finance.d.ts.map +1 -1
- package/dist/finance.js +611 -1
- package/dist/hive.d.ts +739 -0
- package/dist/hive.d.ts.map +1 -0
- package/dist/hive.js +333 -0
- package/dist/index.d.ts +31 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +350 -8
- package/dist/infrastructure.d.ts +955 -1
- package/dist/infrastructure.d.ts.map +1 -1
- package/dist/infrastructure.js +595 -0
- package/dist/inventory.d.ts +355 -0
- package/dist/inventory.d.ts.map +1 -0
- package/dist/inventory.js +268 -0
- package/dist/mail.d.ts +125 -0
- package/dist/mail.d.ts.map +1 -1
- package/dist/mail.js +112 -1
- package/dist/meet.d.ts +54 -0
- package/dist/meet.d.ts.map +1 -0
- package/dist/meet.js +37 -0
- package/dist/mind.d.ts +55 -0
- package/dist/mind.d.ts.map +1 -0
- package/dist/mind.js +84 -0
- package/dist/posts.d.ts +33 -0
- package/dist/posts.d.ts.map +1 -1
- package/dist/posts.js +42 -0
- package/dist/promotions.d.ts +54 -0
- package/dist/promotions.d.ts.map +1 -1
- package/dist/promotions.js +52 -0
- package/dist/settings.d.ts +28 -1
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +68 -0
- package/dist/storage.d.ts +32 -21
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +52 -32
- package/dist/tasks.d.ts +222 -4
- package/dist/tasks.d.ts.map +1 -1
- package/dist/tasks.js +202 -0
- package/dist/teach.d.ts +130 -0
- package/dist/teach.d.ts.map +1 -0
- package/dist/teach.js +110 -0
- package/dist/topic-announcements.d.ts +235 -0
- package/dist/topic-announcements.d.ts.map +1 -0
- package/dist/topic-announcements.js +182 -0
- package/dist/tulearn.d.ts +223 -0
- package/dist/tulearn.d.ts.map +1 -0
- package/dist/tulearn.js +97 -0
- package/dist/tutoring.d.ts +152 -0
- package/dist/tutoring.d.ts.map +1 -0
- package/dist/tutoring.js +58 -0
- package/dist/user-group-activity.d.ts +54 -0
- package/dist/user-group-activity.d.ts.map +1 -0
- package/dist/user-group-activity.js +11 -0
- package/dist/user-groups.d.ts +35 -0
- package/dist/user-groups.d.ts.map +1 -0
- package/dist/user-groups.js +84 -0
- package/dist/users.d.ts +83 -1
- package/dist/users.d.ts.map +1 -1
- package/dist/users.js +137 -0
- package/dist/workspace-configs.d.ts +2 -0
- package/dist/workspace-configs.d.ts.map +1 -1
- package/dist/workspace-configs.js +3 -1
- package/dist/workspace-user-audit.d.ts +1 -0
- package/dist/workspace-user-audit.d.ts.map +1 -1
- package/dist/workspaces.d.ts +57 -0
- package/dist/workspaces.d.ts.map +1 -1
- package/dist/workspaces.js +58 -1
- package/package.json +59 -6
package/dist/mail.d.ts
CHANGED
|
@@ -1,4 +1,114 @@
|
|
|
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
112
|
export declare function listWorkspaceEmails(workspaceId: string, query?: {
|
|
3
113
|
page?: number;
|
|
4
114
|
pageSize?: number;
|
|
@@ -16,4 +126,19 @@ export declare function listWorkspaceEmails(workspaceId: string, query?: {
|
|
|
16
126
|
user_id: string;
|
|
17
127
|
ws_id: string;
|
|
18
128
|
}[]>;
|
|
129
|
+
export declare function getMailBootstrap(workspaceId: string, options?: InternalApiClientOptions): Promise<MailBootstrapResponse>;
|
|
130
|
+
export declare function listMailMessages(workspaceId: string, mailboxId: string, params?: ListMailMessagesParams, options?: InternalApiClientOptions): Promise<MailMessagesResponse>;
|
|
131
|
+
export declare function getMailMessage(workspaceId: string, mailboxId: string, messageId: string, options?: InternalApiClientOptions): Promise<MailMessageDetail>;
|
|
132
|
+
export declare function createMailDraft(workspaceId: string, mailboxId: string, payload: CreateMailDraftPayload, options?: InternalApiClientOptions): Promise<MailMutationResponse>;
|
|
133
|
+
export declare function updateMailDraft(workspaceId: string, mailboxId: string, draftId: string, payload: UpdateMailDraftPayload, options?: InternalApiClientOptions): Promise<MailMutationResponse>;
|
|
134
|
+
export declare function deleteMailDraft(workspaceId: string, mailboxId: string, draftId: string, options?: InternalApiClientOptions): Promise<void>;
|
|
135
|
+
export declare function sendMailMessage(workspaceId: string, mailboxId: string, payload: SendMailMessagePayload, options?: InternalApiClientOptions): Promise<MailMutationResponse>;
|
|
136
|
+
export declare function updateMailMessageState(workspaceId: string, mailboxId: string, messageId: string, payload: UpdateMailMessageStatePayload, options?: InternalApiClientOptions): Promise<MailMutationResponse>;
|
|
137
|
+
export declare function listMailMailboxMembers(workspaceId: string, mailboxId: string, options?: InternalApiClientOptions): Promise<{
|
|
138
|
+
members: MailMailboxMember[];
|
|
139
|
+
}>;
|
|
140
|
+
export declare function upsertMailMailboxMember(workspaceId: string, mailboxId: string, payload: UpsertMailMailboxMemberPayload, options?: InternalApiClientOptions): Promise<{
|
|
141
|
+
member: MailMailboxMember;
|
|
142
|
+
}>;
|
|
143
|
+
export declare function removeMailMailboxMember(workspaceId: string, mailboxId: string, userId: string, options?: InternalApiClientOptions): Promise<void>;
|
|
19
144
|
//# sourceMappingURL=mail.d.ts.map
|
package/dist/mail.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mail.d.ts","sourceRoot":"","sources":["../src/mail.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,wBAAwB,
|
|
1
|
+
{"version":3,"file":"mail.d.ts","sourceRoot":"","sources":["../src/mail.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,wBAAwB,EAE9B,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACtE,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,QAAQ,CAAC;AACpD,MAAM,MAAM,iBAAiB,GACzB,QAAQ,GACR,UAAU,GACV,UAAU,GACV,aAAa,CAAC;AAElB,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;I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B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,wBAAwB,iBAcnC"}
|
package/dist/mail.js
CHANGED
|
@@ -1,12 +1,123 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.listWorkspaceEmails = listWorkspaceEmails;
|
|
4
|
+
exports.getMailBootstrap = getMailBootstrap;
|
|
5
|
+
exports.listMailMessages = listMailMessages;
|
|
6
|
+
exports.getMailMessage = getMailMessage;
|
|
7
|
+
exports.createMailDraft = createMailDraft;
|
|
8
|
+
exports.updateMailDraft = updateMailDraft;
|
|
9
|
+
exports.deleteMailDraft = deleteMailDraft;
|
|
10
|
+
exports.sendMailMessage = sendMailMessage;
|
|
11
|
+
exports.updateMailMessageState = updateMailMessageState;
|
|
12
|
+
exports.listMailMailboxMembers = listMailMailboxMembers;
|
|
13
|
+
exports.upsertMailMailboxMember = upsertMailMailboxMember;
|
|
14
|
+
exports.removeMailMailboxMember = removeMailMailboxMember;
|
|
4
15
|
const client_1 = require("./client");
|
|
16
|
+
function workspaceMailPath(workspaceId, suffix = '') {
|
|
17
|
+
return `/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/mail${suffix}`;
|
|
18
|
+
}
|
|
19
|
+
function mailboxPath(workspaceId, mailboxId, suffix = '') {
|
|
20
|
+
return workspaceMailPath(workspaceId, `/mailboxes/${(0, client_1.encodePathSegment)(mailboxId)}${suffix}`);
|
|
21
|
+
}
|
|
22
|
+
function jsonHeaders() {
|
|
23
|
+
return {
|
|
24
|
+
'Content-Type': 'application/json',
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function normalizeMessagesQuery(params) {
|
|
28
|
+
if (!params)
|
|
29
|
+
return undefined;
|
|
30
|
+
return Object.fromEntries(Object.entries(params).filter(([, value]) => value !== undefined));
|
|
31
|
+
}
|
|
5
32
|
async function listWorkspaceEmails(workspaceId, query, options) {
|
|
6
33
|
const client = (0, client_1.getInternalApiClient)(options);
|
|
7
|
-
const payload = await client.json(
|
|
34
|
+
const payload = await client.json(workspaceMailPath(workspaceId), {
|
|
8
35
|
query,
|
|
9
36
|
cache: 'no-store',
|
|
10
37
|
});
|
|
11
38
|
return payload.emails ?? [];
|
|
12
39
|
}
|
|
40
|
+
async function getMailBootstrap(workspaceId, options) {
|
|
41
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
42
|
+
return client.json(workspaceMailPath(workspaceId, '/bootstrap'), {
|
|
43
|
+
cache: 'no-store',
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
async function listMailMessages(workspaceId, mailboxId, params, options) {
|
|
47
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
48
|
+
return client.json(mailboxPath(workspaceId, mailboxId, '/messages'), {
|
|
49
|
+
cache: 'no-store',
|
|
50
|
+
query: normalizeMessagesQuery(params),
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
async function getMailMessage(workspaceId, mailboxId, messageId, options) {
|
|
54
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
55
|
+
return client.json(mailboxPath(workspaceId, mailboxId, `/messages/${(0, client_1.encodePathSegment)(messageId)}`), {
|
|
56
|
+
cache: 'no-store',
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
async function createMailDraft(workspaceId, mailboxId, payload, options) {
|
|
60
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
61
|
+
return client.json(mailboxPath(workspaceId, mailboxId, '/drafts'), {
|
|
62
|
+
body: JSON.stringify(payload),
|
|
63
|
+
cache: 'no-store',
|
|
64
|
+
headers: jsonHeaders(),
|
|
65
|
+
method: 'POST',
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
async function updateMailDraft(workspaceId, mailboxId, draftId, payload, options) {
|
|
69
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
70
|
+
return client.json(mailboxPath(workspaceId, mailboxId, `/drafts/${(0, client_1.encodePathSegment)(draftId)}`), {
|
|
71
|
+
body: JSON.stringify(payload),
|
|
72
|
+
cache: 'no-store',
|
|
73
|
+
headers: jsonHeaders(),
|
|
74
|
+
method: 'PATCH',
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
async function deleteMailDraft(workspaceId, mailboxId, draftId, options) {
|
|
78
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
79
|
+
return client.json(mailboxPath(workspaceId, mailboxId, `/drafts/${(0, client_1.encodePathSegment)(draftId)}`), {
|
|
80
|
+
cache: 'no-store',
|
|
81
|
+
method: 'DELETE',
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
async function sendMailMessage(workspaceId, mailboxId, payload, options) {
|
|
85
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
86
|
+
return client.json(mailboxPath(workspaceId, mailboxId, '/messages'), {
|
|
87
|
+
body: JSON.stringify(payload),
|
|
88
|
+
cache: 'no-store',
|
|
89
|
+
headers: jsonHeaders(),
|
|
90
|
+
method: 'POST',
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
async function updateMailMessageState(workspaceId, mailboxId, messageId, payload, options) {
|
|
94
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
95
|
+
return client.json(mailboxPath(workspaceId, mailboxId, `/messages/${(0, client_1.encodePathSegment)(messageId)}/state`), {
|
|
96
|
+
body: JSON.stringify(payload),
|
|
97
|
+
cache: 'no-store',
|
|
98
|
+
headers: jsonHeaders(),
|
|
99
|
+
method: 'PATCH',
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
async function listMailMailboxMembers(workspaceId, mailboxId, options) {
|
|
103
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
104
|
+
return client.json(mailboxPath(workspaceId, mailboxId, '/members'), {
|
|
105
|
+
cache: 'no-store',
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
async function upsertMailMailboxMember(workspaceId, mailboxId, payload, options) {
|
|
109
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
110
|
+
return client.json(mailboxPath(workspaceId, mailboxId, '/members'), {
|
|
111
|
+
body: JSON.stringify(payload),
|
|
112
|
+
cache: 'no-store',
|
|
113
|
+
headers: jsonHeaders(),
|
|
114
|
+
method: 'POST',
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
async function removeMailMailboxMember(workspaceId, mailboxId, userId, options) {
|
|
118
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
119
|
+
return client.json(mailboxPath(workspaceId, mailboxId, `/members/${(0, client_1.encodePathSegment)(userId)}`), {
|
|
120
|
+
cache: 'no-store',
|
|
121
|
+
method: 'DELETE',
|
|
122
|
+
});
|
|
123
|
+
}
|
package/dist/meet.d.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type InternalApiClientOptions } from './client';
|
|
2
|
+
export type MeetRealtimeRole = 'host' | 'speaker' | 'viewer';
|
|
3
|
+
export type MeetRealtimeRoomMode = 'call' | 'webinar' | 'stream';
|
|
4
|
+
export type WorkspaceMeetingRealtimeTokenRequest = {
|
|
5
|
+
mode?: MeetRealtimeRoomMode;
|
|
6
|
+
role?: MeetRealtimeRole;
|
|
7
|
+
};
|
|
8
|
+
export type WorkspaceMeetingRealtimeTokenResponse = {
|
|
9
|
+
expiresAt: string;
|
|
10
|
+
limits: {
|
|
11
|
+
maxPublishers: number;
|
|
12
|
+
maxViewers: number;
|
|
13
|
+
video: {
|
|
14
|
+
defaultCameraEnabled: boolean;
|
|
15
|
+
maxFrameRate: number;
|
|
16
|
+
maxHeight: number;
|
|
17
|
+
maxWidth: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
mode: MeetRealtimeRoomMode;
|
|
21
|
+
realtimeUrl: string;
|
|
22
|
+
role: MeetRealtimeRole;
|
|
23
|
+
roomId: string;
|
|
24
|
+
token: string;
|
|
25
|
+
};
|
|
26
|
+
export type WorkspaceMeetingStream = {
|
|
27
|
+
createdAt: string;
|
|
28
|
+
endedAt: string | null;
|
|
29
|
+
id: string;
|
|
30
|
+
liveInputUid: string;
|
|
31
|
+
playbackUrl: string;
|
|
32
|
+
publishUrl?: string;
|
|
33
|
+
status: string;
|
|
34
|
+
updatedAt: string;
|
|
35
|
+
};
|
|
36
|
+
export type WorkspaceMeetingStreamResponse = {
|
|
37
|
+
stream: WorkspaceMeetingStream | null;
|
|
38
|
+
};
|
|
39
|
+
export type CreateWorkspaceMeetingStreamResponse = {
|
|
40
|
+
created: boolean;
|
|
41
|
+
stream: WorkspaceMeetingStream;
|
|
42
|
+
};
|
|
43
|
+
export type UpdateWorkspaceMeetingStreamPayload = {
|
|
44
|
+
action: 'resume' | 'stop';
|
|
45
|
+
};
|
|
46
|
+
export type UpdateWorkspaceMeetingStreamResponse = {
|
|
47
|
+
created?: boolean;
|
|
48
|
+
stream: WorkspaceMeetingStream;
|
|
49
|
+
};
|
|
50
|
+
export declare function createWorkspaceMeetingRealtimeToken(wsId: string, meetingId: string, payload?: WorkspaceMeetingRealtimeTokenRequest, options?: InternalApiClientOptions): Promise<WorkspaceMeetingRealtimeTokenResponse>;
|
|
51
|
+
export declare function getWorkspaceMeetingStream(wsId: string, meetingId: string, options?: InternalApiClientOptions): Promise<WorkspaceMeetingStreamResponse>;
|
|
52
|
+
export declare function createWorkspaceMeetingStream(wsId: string, meetingId: string, options?: InternalApiClientOptions): Promise<CreateWorkspaceMeetingStreamResponse>;
|
|
53
|
+
export declare function updateWorkspaceMeetingStream(wsId: string, meetingId: string, payload: UpdateWorkspaceMeetingStreamPayload, options?: InternalApiClientOptions): Promise<UpdateWorkspaceMeetingStreamResponse>;
|
|
54
|
+
//# sourceMappingURL=meet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meet.d.ts","sourceRoot":"","sources":["../src/meet.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,gB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AAmC,GAAG;IAChD,MAAM,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,sBAAsB,CAAC;CAChC,CAAC;AAEF,wBAAsB,mCAAmC,CACvD,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,oCAAyC,EAClD,OAAO,CAAC,EAAE,wBAAwB,kDAenC;AAQD,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,wBAAwB,2CAKnC;AAED,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,wBAAwB,iDAUnC;AAED,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,mCAAmC,EAC5C,OAAO,CAAC,EAAE,wBAAwB,iDAcnC"}
|
package/dist/meet.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createWorkspaceMeetingRealtimeToken = createWorkspaceMeetingRealtimeToken;
|
|
4
|
+
exports.getWorkspaceMeetingStream = getWorkspaceMeetingStream;
|
|
5
|
+
exports.createWorkspaceMeetingStream = createWorkspaceMeetingStream;
|
|
6
|
+
exports.updateWorkspaceMeetingStream = updateWorkspaceMeetingStream;
|
|
7
|
+
const client_1 = require("./client");
|
|
8
|
+
async function createWorkspaceMeetingRealtimeToken(wsId, meetingId, payload = {}, options) {
|
|
9
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
10
|
+
return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(wsId)}/meetings/${(0, client_1.encodePathSegment)(meetingId)}/realtime-token`, {
|
|
11
|
+
body: JSON.stringify(payload),
|
|
12
|
+
headers: {
|
|
13
|
+
'Content-Type': 'application/json',
|
|
14
|
+
},
|
|
15
|
+
method: 'POST',
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function getWorkspaceMeetingStreamPath(wsId, meetingId) {
|
|
19
|
+
return `/api/v1/workspaces/${(0, client_1.encodePathSegment)(wsId)}/meetings/${(0, client_1.encodePathSegment)(meetingId)}/stream`;
|
|
20
|
+
}
|
|
21
|
+
async function getWorkspaceMeetingStream(wsId, meetingId, options) {
|
|
22
|
+
return (0, client_1.getInternalApiClient)(options).json(getWorkspaceMeetingStreamPath(wsId, meetingId));
|
|
23
|
+
}
|
|
24
|
+
async function createWorkspaceMeetingStream(wsId, meetingId, options) {
|
|
25
|
+
return (0, client_1.getInternalApiClient)(options).json(getWorkspaceMeetingStreamPath(wsId, meetingId), {
|
|
26
|
+
method: 'POST',
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
async function updateWorkspaceMeetingStream(wsId, meetingId, payload, options) {
|
|
30
|
+
return (0, client_1.getInternalApiClient)(options).json(getWorkspaceMeetingStreamPath(wsId, meetingId), {
|
|
31
|
+
body: JSON.stringify(payload),
|
|
32
|
+
headers: {
|
|
33
|
+
'Content-Type': 'application/json',
|
|
34
|
+
},
|
|
35
|
+
method: 'PATCH',
|
|
36
|
+
});
|
|
37
|
+
}
|
package/dist/mind.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { MindAiPatchRecord, MindBoardSnapshot, MindBoardSummary, MindEdge, MindNode } from '@tuturuuu/types/db';
|
|
2
|
+
import { type InternalApiClientOptions } from './client';
|
|
3
|
+
export type CreateMindBoardPayload = {
|
|
4
|
+
defaultHorizon?: MindBoardSummary['defaultHorizon'];
|
|
5
|
+
description?: string | null;
|
|
6
|
+
title: string;
|
|
7
|
+
};
|
|
8
|
+
export type UpdateMindBoardPayload = Partial<CreateMindBoardPayload> & {
|
|
9
|
+
canvasView?: MindBoardSummary['canvasView'];
|
|
10
|
+
settings?: MindBoardSummary['settings'];
|
|
11
|
+
status?: MindBoardSummary['status'];
|
|
12
|
+
};
|
|
13
|
+
export type SaveMindGraphPayload = {
|
|
14
|
+
deletedEdgeIds?: string[];
|
|
15
|
+
deletedNodeIds?: string[];
|
|
16
|
+
edges: Array<Pick<MindEdge, 'id' | 'sourceNodeId' | 'targetNodeId'> & Partial<MindEdge>>;
|
|
17
|
+
nodes: Array<Pick<MindNode, 'id' | 'positionX' | 'positionY' | 'title'> & Partial<MindNode>>;
|
|
18
|
+
};
|
|
19
|
+
export type MindBoardListResponse = {
|
|
20
|
+
boards: MindBoardSummary[];
|
|
21
|
+
};
|
|
22
|
+
export type MindBoardResponse = {
|
|
23
|
+
board: MindBoardSummary;
|
|
24
|
+
};
|
|
25
|
+
export type MindBoardSnapshotResponse = MindBoardSnapshot & {
|
|
26
|
+
patches: MindAiPatchRecord[];
|
|
27
|
+
};
|
|
28
|
+
export type MindBoardGraphSnapshotResponse = MindBoardSnapshot;
|
|
29
|
+
export type MindAiPatchListResponse = {
|
|
30
|
+
patches: MindAiPatchRecord[];
|
|
31
|
+
};
|
|
32
|
+
export type MindNodeSearchParams = {
|
|
33
|
+
boardId?: string;
|
|
34
|
+
q?: string;
|
|
35
|
+
};
|
|
36
|
+
export type MindNodeSearchResponse = {
|
|
37
|
+
nodes: MindNode[];
|
|
38
|
+
};
|
|
39
|
+
export declare function listMindBoards(options?: InternalApiClientOptions & {
|
|
40
|
+
workspaceId?: string;
|
|
41
|
+
}): Promise<MindBoardListResponse>;
|
|
42
|
+
export declare function createMindBoard(payload: CreateMindBoardPayload, options?: InternalApiClientOptions & {
|
|
43
|
+
workspaceId?: string;
|
|
44
|
+
}): Promise<MindBoardResponse>;
|
|
45
|
+
export declare function getMindBoardSnapshot(workspaceId: string, boardId: string, options?: InternalApiClientOptions): Promise<MindBoardSnapshotResponse>;
|
|
46
|
+
export declare function getMindBoardGraphSnapshot(workspaceId: string, boardId: string, options?: InternalApiClientOptions): Promise<MindBoardSnapshot>;
|
|
47
|
+
export declare function listMindAiPatches(workspaceId: string, boardId: string, options?: InternalApiClientOptions): Promise<MindAiPatchListResponse>;
|
|
48
|
+
export declare function updateMindBoard(workspaceId: string, boardId: string, payload: UpdateMindBoardPayload, options?: InternalApiClientOptions): Promise<MindBoardResponse>;
|
|
49
|
+
export declare function archiveMindBoard(workspaceId: string, boardId: string, options?: InternalApiClientOptions): Promise<MindBoardResponse>;
|
|
50
|
+
export declare function saveMindGraph(workspaceId: string, boardId: string, payload: SaveMindGraphPayload, options?: InternalApiClientOptions): Promise<MindBoardSnapshot>;
|
|
51
|
+
export declare function searchMindNodes(workspaceId: string, params: MindNodeSearchParams, options?: InternalApiClientOptions): Promise<MindNodeSearchResponse>;
|
|
52
|
+
export declare function applyMindAiPatch(workspaceId: string, patchId: string, options?: InternalApiClientOptions): Promise<{
|
|
53
|
+
patch: MindAiPatchRecord;
|
|
54
|
+
}>;
|
|
55
|
+
//# sourceMappingURL=mind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mind.d.ts","sourceRoot":"","sources":["../src/mind.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACT,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,sBAAsB,GAAG;IACnC,cAAc,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACpD,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC,GAAG;IACrE,UAAU,CAAC,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAC;IAC5C,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;AAED,wBAAsB,eAAe,CACnC,OAAO,EAAE,sBAAsB,EAC/B,OAAO,CAAC,EAAE,wBAAwB,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,8BAc9D;AAED,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,wBAAwB,sCAQnC;AAED,wBAAsB,yBAAyB,CAC7C,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,wBAAwB,8BAWnC;AAED,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,wBAAwB,oCAWnC;AAED,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,sBAAsB,EAC/B,OAAO,CAAC,EAAE,wBAAwB,8BAanC;AAED,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,wBAAwB,8BAWnC;AAED,wBAAsB,aAAa,CACjC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,oBAAoB,EAC7B,OAAO,CAAC,EAAE,wBAAwB,8BAgBnC;AAED,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,oBAAoB,EAC5B,OAAO,CAAC,EAAE,wBAAwB,mCAWnC;AAED,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,wBAAwB;WAIN,iBAAiB;GAU9C"}
|
package/dist/mind.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listMindBoards = listMindBoards;
|
|
4
|
+
exports.createMindBoard = createMindBoard;
|
|
5
|
+
exports.getMindBoardSnapshot = getMindBoardSnapshot;
|
|
6
|
+
exports.getMindBoardGraphSnapshot = getMindBoardGraphSnapshot;
|
|
7
|
+
exports.listMindAiPatches = listMindAiPatches;
|
|
8
|
+
exports.updateMindBoard = updateMindBoard;
|
|
9
|
+
exports.archiveMindBoard = archiveMindBoard;
|
|
10
|
+
exports.saveMindGraph = saveMindGraph;
|
|
11
|
+
exports.searchMindNodes = searchMindNodes;
|
|
12
|
+
exports.applyMindAiPatch = applyMindAiPatch;
|
|
13
|
+
const client_1 = require("./client");
|
|
14
|
+
function workspaceMindPath(workspaceId, path = '') {
|
|
15
|
+
return `/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/mind${path}`;
|
|
16
|
+
}
|
|
17
|
+
async function listMindBoards(options) {
|
|
18
|
+
const workspaceId = options?.workspaceId ?? 'personal';
|
|
19
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
20
|
+
return client.json(workspaceMindPath(workspaceId, '/boards'), {
|
|
21
|
+
cache: 'no-store',
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
async function createMindBoard(payload, options) {
|
|
25
|
+
const workspaceId = options?.workspaceId ?? 'personal';
|
|
26
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
27
|
+
return client.json(workspaceMindPath(workspaceId, '/boards'), {
|
|
28
|
+
body: JSON.stringify(payload),
|
|
29
|
+
cache: 'no-store',
|
|
30
|
+
headers: { 'Content-Type': 'application/json' },
|
|
31
|
+
method: 'POST',
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
async function getMindBoardSnapshot(workspaceId, boardId, options) {
|
|
35
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
36
|
+
return client.json(workspaceMindPath(workspaceId, `/boards/${(0, client_1.encodePathSegment)(boardId)}`), { cache: 'no-store' });
|
|
37
|
+
}
|
|
38
|
+
async function getMindBoardGraphSnapshot(workspaceId, boardId, options) {
|
|
39
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
40
|
+
return client.json(workspaceMindPath(workspaceId, `/boards/${(0, client_1.encodePathSegment)(boardId)}/graph`), { cache: 'no-store' });
|
|
41
|
+
}
|
|
42
|
+
async function listMindAiPatches(workspaceId, boardId, options) {
|
|
43
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
44
|
+
return client.json(workspaceMindPath(workspaceId, `/boards/${(0, client_1.encodePathSegment)(boardId)}/patches`), { cache: 'no-store' });
|
|
45
|
+
}
|
|
46
|
+
async function updateMindBoard(workspaceId, boardId, payload, options) {
|
|
47
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
48
|
+
return client.json(workspaceMindPath(workspaceId, `/boards/${(0, client_1.encodePathSegment)(boardId)}`), {
|
|
49
|
+
body: JSON.stringify(payload),
|
|
50
|
+
cache: 'no-store',
|
|
51
|
+
headers: { 'Content-Type': 'application/json' },
|
|
52
|
+
method: 'PATCH',
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
async function archiveMindBoard(workspaceId, boardId, options) {
|
|
56
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
57
|
+
return client.json(workspaceMindPath(workspaceId, `/boards/${(0, client_1.encodePathSegment)(boardId)}`), {
|
|
58
|
+
cache: 'no-store',
|
|
59
|
+
method: 'DELETE',
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
async function saveMindGraph(workspaceId, boardId, payload, options) {
|
|
63
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
64
|
+
return client.json(workspaceMindPath(workspaceId, `/boards/${(0, client_1.encodePathSegment)(boardId)}/graph`), {
|
|
65
|
+
body: JSON.stringify(payload),
|
|
66
|
+
cache: 'no-store',
|
|
67
|
+
headers: { 'Content-Type': 'application/json' },
|
|
68
|
+
method: 'PUT',
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
async function searchMindNodes(workspaceId, params, options) {
|
|
72
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
73
|
+
return client.json(workspaceMindPath(workspaceId, '/search'), {
|
|
74
|
+
cache: 'no-store',
|
|
75
|
+
query: params,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
async function applyMindAiPatch(workspaceId, patchId, options) {
|
|
79
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
80
|
+
return client.json(workspaceMindPath(workspaceId, `/ai/patches/${(0, client_1.encodePathSegment)(patchId)}/apply`), {
|
|
81
|
+
cache: 'no-store',
|
|
82
|
+
method: 'POST',
|
|
83
|
+
});
|
|
84
|
+
}
|
package/dist/posts.d.ts
CHANGED
|
@@ -3,6 +3,39 @@ export interface ForceSendWorkspacePostEmailPayload {
|
|
|
3
3
|
postId: string;
|
|
4
4
|
userId: string;
|
|
5
5
|
}
|
|
6
|
+
export interface GetWorkspacePostsQuery {
|
|
7
|
+
page?: number;
|
|
8
|
+
pageSize?: number;
|
|
9
|
+
start?: string;
|
|
10
|
+
end?: string;
|
|
11
|
+
includedGroups?: string[];
|
|
12
|
+
excludedGroups?: string[];
|
|
13
|
+
userId?: string;
|
|
14
|
+
stage?: string;
|
|
15
|
+
queueStatus?: string;
|
|
16
|
+
approvalStatus?: string;
|
|
17
|
+
showAll?: boolean;
|
|
18
|
+
cursor?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface GetWorkspacePostsResponse<TPost = unknown, TSummary = unknown> {
|
|
21
|
+
data: TPost[];
|
|
22
|
+
count: number;
|
|
23
|
+
summary: TSummary;
|
|
24
|
+
}
|
|
25
|
+
export interface GetWorkspacePostsBootstrapResponse {
|
|
26
|
+
wsId: string;
|
|
27
|
+
defaultDateRange: {
|
|
28
|
+
start: string;
|
|
29
|
+
end: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface GetWorkspacePostsPermissionsResponse {
|
|
33
|
+
canApprovePosts: boolean;
|
|
34
|
+
canForceSendPosts: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare function getWorkspacePosts<TPost = unknown, TSummary = unknown>(workspaceId: string, query?: GetWorkspacePostsQuery, options?: InternalApiClientOptions): Promise<GetWorkspacePostsResponse<TPost, TSummary>>;
|
|
37
|
+
export declare function getWorkspacePostsBootstrap(workspaceId: string, options?: InternalApiClientOptions): Promise<GetWorkspacePostsBootstrapResponse>;
|
|
38
|
+
export declare function getWorkspacePostsPermissions(workspaceId: string, options?: InternalApiClientOptions): Promise<GetWorkspacePostsPermissionsResponse>;
|
|
6
39
|
export declare function forceSendWorkspacePostEmail(workspaceId: string, payload: ForceSendWorkspacePostEmailPayload, options?: InternalApiClientOptions): Promise<{
|
|
7
40
|
success: true;
|
|
8
41
|
}>;
|
package/dist/posts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posts.d.ts","sourceRoot":"","sources":["../src/posts.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,kCAAkC;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,2BAA2B,CAC/C,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,kCAAkC,EAC3C,OAAO,CAAC,EAAE,wBAAwB;aAGJ,IAAI;GAWnC"}
|
|
1
|
+
{"version":3,"file":"posts.d.ts","sourceRoot":"","sources":["../src/posts.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,kCAAkC;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,M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"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWorkspacePosts = getWorkspacePosts;
|
|
4
|
+
exports.getWorkspacePostsBootstrap = getWorkspacePostsBootstrap;
|
|
5
|
+
exports.getWorkspacePostsPermissions = getWorkspacePostsPermissions;
|
|
3
6
|
exports.forceSendWorkspacePostEmail = forceSendWorkspacePostEmail;
|
|
4
7
|
const client_1 = require("./client");
|
|
8
|
+
async function getWorkspacePosts(workspaceId, query, options) {
|
|
9
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
10
|
+
const search = new URLSearchParams();
|
|
11
|
+
for (const groupId of query?.includedGroups ?? []) {
|
|
12
|
+
search.append('includedGroups', groupId);
|
|
13
|
+
}
|
|
14
|
+
for (const groupId of query?.excludedGroups ?? []) {
|
|
15
|
+
search.append('excludedGroups', groupId);
|
|
16
|
+
}
|
|
17
|
+
const scalarQuery = {
|
|
18
|
+
approvalStatus: query?.approvalStatus,
|
|
19
|
+
cursor: query?.cursor,
|
|
20
|
+
end: query?.end,
|
|
21
|
+
page: query?.page,
|
|
22
|
+
pageSize: query?.pageSize,
|
|
23
|
+
queueStatus: query?.queueStatus,
|
|
24
|
+
showAll: query?.showAll,
|
|
25
|
+
stage: query?.stage,
|
|
26
|
+
start: query?.start,
|
|
27
|
+
userId: query?.userId,
|
|
28
|
+
};
|
|
29
|
+
const suffix = search.toString();
|
|
30
|
+
return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/posts${suffix ? `?${suffix}` : ''}`, {
|
|
31
|
+
query: scalarQuery,
|
|
32
|
+
cache: 'no-store',
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
async function getWorkspacePostsBootstrap(workspaceId, options) {
|
|
36
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
37
|
+
return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/posts/bootstrap`, {
|
|
38
|
+
cache: 'no-store',
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
async function getWorkspacePostsPermissions(workspaceId, options) {
|
|
42
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
43
|
+
return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/posts/permissions`, {
|
|
44
|
+
cache: 'no-store',
|
|
45
|
+
});
|
|
46
|
+
}
|
|
5
47
|
async function forceSendWorkspacePostEmail(workspaceId, payload, options) {
|
|
6
48
|
const client = (0, client_1.getInternalApiClient)(options);
|
|
7
49
|
return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/posts/force-send`, {
|