@tuturuuu/internal-api 0.0.1
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.d.ts +43 -0
- package/dist/ai.d.ts.map +1 -0
- package/dist/ai.js +57 -0
- package/dist/auth.d.ts +46 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +47 -0
- package/dist/calendar.d.ts +99 -0
- package/dist/calendar.d.ts.map +1 -0
- package/dist/calendar.js +94 -0
- package/dist/chat.d.ts +46 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +67 -0
- package/dist/client.d.ts +35 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +216 -0
- package/dist/education.d.ts +167 -0
- package/dist/education.d.ts.map +1 -0
- package/dist/education.js +288 -0
- package/dist/external-projects.d.ts +425 -0
- package/dist/external-projects.d.ts.map +1 -0
- package/dist/external-projects.js +466 -0
- package/dist/finance.d.ts +109 -0
- package/dist/finance.d.ts.map +1 -0
- package/dist/finance.js +143 -0
- package/dist/habit-trackers.d.ts +25 -0
- package/dist/habit-trackers.d.ts.map +1 -0
- package/dist/habit-trackers.js +108 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +280 -0
- package/dist/infrastructure.d.ts +354 -0
- package/dist/infrastructure.d.ts.map +1 -0
- package/dist/infrastructure.js +100 -0
- package/dist/inquiries.d.ts +12 -0
- package/dist/inquiries.d.ts.map +1 -0
- package/dist/inquiries.js +28 -0
- package/dist/mail.d.ts +19 -0
- package/dist/mail.d.ts.map +1 -0
- package/dist/mail.js +12 -0
- package/dist/nova.d.ts +5 -0
- package/dist/nova.d.ts.map +1 -0
- package/dist/nova.js +10 -0
- package/dist/posts.d.ts +9 -0
- package/dist/posts.d.ts.map +1 -0
- package/dist/posts.js +15 -0
- package/dist/promotions.d.ts +11 -0
- package/dist/promotions.d.ts.map +1 -0
- package/dist/promotions.js +15 -0
- package/dist/reports.d.ts +42 -0
- package/dist/reports.d.ts.map +1 -0
- package/dist/reports.js +48 -0
- package/dist/roles.d.ts +45 -0
- package/dist/roles.d.ts.map +1 -0
- package/dist/roles.js +96 -0
- package/dist/settings.d.ts +48 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +66 -0
- package/dist/storage.d.ts +187 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +371 -0
- package/dist/tasks-scheduling.d.ts +14 -0
- package/dist/tasks-scheduling.d.ts.map +1 -0
- package/dist/tasks-scheduling.js +14 -0
- package/dist/tasks.d.ts +311 -0
- package/dist/tasks.d.ts.map +1 -0
- package/dist/tasks.js +396 -0
- package/dist/templates.d.ts +48 -0
- package/dist/templates.d.ts.map +1 -0
- package/dist/templates.js +19 -0
- package/dist/time-tracking.d.ts +88 -0
- package/dist/time-tracking.d.ts.map +1 -0
- package/dist/time-tracking.js +101 -0
- package/dist/users-feedbacks.d.ts +66 -0
- package/dist/users-feedbacks.d.ts.map +1 -0
- package/dist/users-feedbacks.js +46 -0
- package/dist/users.d.ts +89 -0
- package/dist/users.d.ts.map +1 -0
- package/dist/users.js +139 -0
- package/dist/workspace-configs.d.ts +24 -0
- package/dist/workspace-configs.d.ts.map +1 -0
- package/dist/workspace-configs.js +76 -0
- package/dist/workspace-user-audit.d.ts +66 -0
- package/dist/workspace-user-audit.d.ts.map +1 -0
- package/dist/workspace-user-audit.js +23 -0
- package/dist/workspaces.d.ts +59 -0
- package/dist/workspaces.d.ts.map +1 -0
- package/dist/workspaces.js +131 -0
- package/package.json +141 -0
package/dist/client.js
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.internalApiClient = void 0;
|
|
4
|
+
exports.encodePathSegment = encodePathSegment;
|
|
5
|
+
exports.getConfiguredInternalApiBaseUrl = getConfiguredInternalApiBaseUrl;
|
|
6
|
+
exports.resolveInternalApiUrl = resolveInternalApiUrl;
|
|
7
|
+
exports.createInternalApiClient = createInternalApiClient;
|
|
8
|
+
exports.withForwardedInternalApiAuth = withForwardedInternalApiAuth;
|
|
9
|
+
exports.getInternalApiClient = getInternalApiClient;
|
|
10
|
+
function tryParseAbsoluteUrl(value) {
|
|
11
|
+
try {
|
|
12
|
+
return new URL(value);
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function resolveConfiguredOrigin(value) {
|
|
19
|
+
if (!value) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
const [firstValue] = value
|
|
23
|
+
.split(/[,\n]/u)
|
|
24
|
+
.map((entry) => entry.trim())
|
|
25
|
+
.filter(Boolean);
|
|
26
|
+
if (!firstValue) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
const normalized = /^[a-z]+:\/\//iu.test(firstValue)
|
|
30
|
+
? firstValue
|
|
31
|
+
: `https://${firstValue}`;
|
|
32
|
+
return tryParseAbsoluteUrl(normalized)?.origin ?? null;
|
|
33
|
+
}
|
|
34
|
+
function encodePathSegment(value) {
|
|
35
|
+
return encodeURIComponent(value);
|
|
36
|
+
}
|
|
37
|
+
function normalizeBaseUrl(baseUrl) {
|
|
38
|
+
let end = baseUrl.length;
|
|
39
|
+
while (end > 0 && baseUrl.charCodeAt(end - 1) === 47) {
|
|
40
|
+
end -= 1;
|
|
41
|
+
}
|
|
42
|
+
return end === baseUrl.length ? baseUrl : baseUrl.slice(0, end);
|
|
43
|
+
}
|
|
44
|
+
function isProductionDeployment() {
|
|
45
|
+
if (process.env.VERCEL_ENV) {
|
|
46
|
+
return process.env.VERCEL_ENV === 'production';
|
|
47
|
+
}
|
|
48
|
+
return process.env.NODE_ENV === 'production';
|
|
49
|
+
}
|
|
50
|
+
function normalizePath(path) {
|
|
51
|
+
if (/^https?:\/\//.test(path)) {
|
|
52
|
+
return path;
|
|
53
|
+
}
|
|
54
|
+
return path.startsWith('/') ? path : `/${path}`;
|
|
55
|
+
}
|
|
56
|
+
function appendQuery(path, query) {
|
|
57
|
+
if (!query || Object.keys(query).length === 0) {
|
|
58
|
+
return path;
|
|
59
|
+
}
|
|
60
|
+
const normalizedPath = normalizePath(path);
|
|
61
|
+
const isAbsoluteUrl = /^https?:\/\//.test(normalizedPath);
|
|
62
|
+
const url = isAbsoluteUrl
|
|
63
|
+
? new URL(normalizedPath)
|
|
64
|
+
: new URL(normalizedPath, 'http://internal-api.local');
|
|
65
|
+
for (const [key, value] of Object.entries(query)) {
|
|
66
|
+
if (value === undefined || value === null) {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
url.searchParams.set(key, String(value));
|
|
70
|
+
}
|
|
71
|
+
return isAbsoluteUrl ? url.toString() : `${url.pathname}${url.search}`;
|
|
72
|
+
}
|
|
73
|
+
function getConfiguredInternalApiBaseUrl() {
|
|
74
|
+
return normalizeBaseUrl(resolveConfiguredOrigin(process.env.INTERNAL_WEB_API_ORIGIN) ||
|
|
75
|
+
resolveConfiguredOrigin(process.env.WEB_APP_URL) ||
|
|
76
|
+
resolveConfiguredOrigin(process.env.NEXT_PUBLIC_WEB_APP_URL) ||
|
|
77
|
+
resolveConfiguredOrigin(process.env.NEXT_PUBLIC_APP_URL) ||
|
|
78
|
+
resolveConfiguredOrigin(process.env.COOLIFY_URL) ||
|
|
79
|
+
resolveConfiguredOrigin(process.env.COOLIFY_FQDN) ||
|
|
80
|
+
(isProductionDeployment()
|
|
81
|
+
? 'https://tuturuuu.com'
|
|
82
|
+
: 'http://localhost:7803'));
|
|
83
|
+
}
|
|
84
|
+
function resolveInternalApiUrl(path, baseUrl) {
|
|
85
|
+
const normalizedPath = normalizePath(path);
|
|
86
|
+
if (/^https?:\/\//.test(normalizedPath)) {
|
|
87
|
+
return normalizedPath;
|
|
88
|
+
}
|
|
89
|
+
const resolvedBaseUrl = baseUrl
|
|
90
|
+
? normalizeBaseUrl(baseUrl)
|
|
91
|
+
: typeof window === 'undefined'
|
|
92
|
+
? getConfiguredInternalApiBaseUrl()
|
|
93
|
+
: undefined;
|
|
94
|
+
if (!resolvedBaseUrl) {
|
|
95
|
+
return normalizedPath;
|
|
96
|
+
}
|
|
97
|
+
return new URL(normalizedPath, resolvedBaseUrl).toString();
|
|
98
|
+
}
|
|
99
|
+
function mergeHeaders(defaultHeaders, requestHeaders) {
|
|
100
|
+
const headers = new Headers(defaultHeaders);
|
|
101
|
+
if (requestHeaders) {
|
|
102
|
+
const nextHeaders = new Headers(requestHeaders);
|
|
103
|
+
nextHeaders.forEach((value, key) => {
|
|
104
|
+
headers.set(key, value);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
if (!headers.has('Accept')) {
|
|
108
|
+
headers.set('Accept', 'application/json');
|
|
109
|
+
}
|
|
110
|
+
return headers;
|
|
111
|
+
}
|
|
112
|
+
function createInternalApiClient(options = {}) {
|
|
113
|
+
const doFetch = (path, init = {}) => {
|
|
114
|
+
const fetchImpl = options.fetch ?? globalThis.fetch;
|
|
115
|
+
const { baseUrl, headers: requestHeaders, query, ...requestInit } = init;
|
|
116
|
+
const requestPath = appendQuery(path, query);
|
|
117
|
+
const url = resolveInternalApiUrl(requestPath, baseUrl || options.baseUrl);
|
|
118
|
+
const headers = mergeHeaders(options.defaultHeaders, requestHeaders);
|
|
119
|
+
return fetchImpl(url, {
|
|
120
|
+
...requestInit,
|
|
121
|
+
headers,
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
return {
|
|
125
|
+
fetch: doFetch,
|
|
126
|
+
async json(path, init = {}) {
|
|
127
|
+
const response = await doFetch(path, init);
|
|
128
|
+
if (!response.ok) {
|
|
129
|
+
const fallbackMessage = `Internal API request failed: ${response.status}`;
|
|
130
|
+
let message;
|
|
131
|
+
try {
|
|
132
|
+
const data = (await response.json());
|
|
133
|
+
message = data.message || data.error || fallbackMessage;
|
|
134
|
+
}
|
|
135
|
+
catch {
|
|
136
|
+
message = fallbackMessage;
|
|
137
|
+
}
|
|
138
|
+
throw new Error(message);
|
|
139
|
+
}
|
|
140
|
+
if (response.status === 204) {
|
|
141
|
+
return undefined;
|
|
142
|
+
}
|
|
143
|
+
return (await response.json());
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Creates Internal API client options that forward auth-relevant headers
|
|
149
|
+
* from an incoming request context (for example `next/headers()` in RSC).
|
|
150
|
+
*/
|
|
151
|
+
function withForwardedInternalApiAuth(requestHeaders, options = {}) {
|
|
152
|
+
const cookieHeader = requestHeaders.get('cookie');
|
|
153
|
+
const authorizationHeader = requestHeaders.get('authorization');
|
|
154
|
+
if (!cookieHeader && !authorizationHeader) {
|
|
155
|
+
return options;
|
|
156
|
+
}
|
|
157
|
+
const allowedOrigins = new Set();
|
|
158
|
+
if (options.baseUrl) {
|
|
159
|
+
const parsed = tryParseAbsoluteUrl(normalizeBaseUrl(options.baseUrl));
|
|
160
|
+
if (parsed) {
|
|
161
|
+
allowedOrigins.add(parsed.origin);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
const configuredBaseUrl = tryParseAbsoluteUrl(getConfiguredInternalApiBaseUrl());
|
|
165
|
+
if (configuredBaseUrl) {
|
|
166
|
+
allowedOrigins.add(configuredBaseUrl.origin);
|
|
167
|
+
}
|
|
168
|
+
const runtimeLocation = typeof globalThis === 'object' && 'location' in globalThis
|
|
169
|
+
? globalThis.location
|
|
170
|
+
: undefined;
|
|
171
|
+
if (runtimeLocation?.origin) {
|
|
172
|
+
allowedOrigins.add(runtimeLocation.origin);
|
|
173
|
+
}
|
|
174
|
+
const baseFetch = options.fetch || globalThis.fetch;
|
|
175
|
+
const forwardedFetch = async (input, init) => {
|
|
176
|
+
const requestUrl = typeof input === 'string'
|
|
177
|
+
? input
|
|
178
|
+
: input instanceof URL
|
|
179
|
+
? input.toString()
|
|
180
|
+
: input.url;
|
|
181
|
+
const isRelativeRequest = typeof requestUrl === 'string' && requestUrl.startsWith('/');
|
|
182
|
+
const parsedRequestUrl = isRelativeRequest
|
|
183
|
+
? null
|
|
184
|
+
: tryParseAbsoluteUrl(requestUrl);
|
|
185
|
+
const shouldForwardAuth = isRelativeRequest ||
|
|
186
|
+
(parsedRequestUrl ? allowedOrigins.has(parsedRequestUrl.origin) : false);
|
|
187
|
+
if (!shouldForwardAuth) {
|
|
188
|
+
return baseFetch(input, init);
|
|
189
|
+
}
|
|
190
|
+
const headers = new Headers(input instanceof Request ? input.headers : undefined);
|
|
191
|
+
if (init?.headers) {
|
|
192
|
+
const initHeaders = new Headers(init.headers);
|
|
193
|
+
initHeaders.forEach((value, key) => {
|
|
194
|
+
headers.set(key, value);
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
if (cookieHeader && !headers.has('cookie')) {
|
|
198
|
+
headers.set('cookie', cookieHeader);
|
|
199
|
+
}
|
|
200
|
+
if (authorizationHeader && !headers.has('authorization')) {
|
|
201
|
+
headers.set('authorization', authorizationHeader);
|
|
202
|
+
}
|
|
203
|
+
return baseFetch(input, {
|
|
204
|
+
...init,
|
|
205
|
+
headers,
|
|
206
|
+
});
|
|
207
|
+
};
|
|
208
|
+
return {
|
|
209
|
+
...options,
|
|
210
|
+
fetch: forwardedFetch,
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
exports.internalApiClient = createInternalApiClient();
|
|
214
|
+
function getInternalApiClient(options) {
|
|
215
|
+
return options ? createInternalApiClient(options) : exports.internalApiClient;
|
|
216
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import type { WorkspaceCourseModule } from '@tuturuuu/types';
|
|
2
|
+
import type { WorkspaceCourseBuilderModule } from '@tuturuuu/types/db';
|
|
3
|
+
import { type InternalApiClientOptions } from './client';
|
|
4
|
+
export interface UpsertWorkspaceCoursePayload {
|
|
5
|
+
id?: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
cert_template?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface UpsertWorkspaceCourseModulePayload {
|
|
11
|
+
id?: string;
|
|
12
|
+
name: string;
|
|
13
|
+
module_group_id: string;
|
|
14
|
+
content?: unknown;
|
|
15
|
+
extra_content?: unknown;
|
|
16
|
+
is_public?: boolean;
|
|
17
|
+
is_published?: boolean;
|
|
18
|
+
youtube_links?: string[];
|
|
19
|
+
}
|
|
20
|
+
export declare function listWorkspaceCourseModules(workspaceId: string, groupId: string, options?: InternalApiClientOptions): Promise<WorkspaceCourseModule[]>;
|
|
21
|
+
export declare function listWorkspaceCourseModuleGroupModules(workspaceId: string, groupId: string, moduleGroupId: string, options?: InternalApiClientOptions): Promise<WorkspaceCourseBuilderModule[]>;
|
|
22
|
+
export interface UpsertWorkspaceCourseModuleGroupPayload {
|
|
23
|
+
id?: string;
|
|
24
|
+
title: string;
|
|
25
|
+
icon?: string | null;
|
|
26
|
+
color?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface UpsertWorkspaceQuizPayload {
|
|
29
|
+
id?: string;
|
|
30
|
+
question: string;
|
|
31
|
+
quiz_options: Array<{
|
|
32
|
+
id?: string;
|
|
33
|
+
value: string;
|
|
34
|
+
is_correct: boolean;
|
|
35
|
+
explanation?: string | null;
|
|
36
|
+
}>;
|
|
37
|
+
}
|
|
38
|
+
export interface CreateWorkspaceQuizPayload {
|
|
39
|
+
moduleId?: string;
|
|
40
|
+
quizzes: UpsertWorkspaceQuizPayload[];
|
|
41
|
+
setId?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface UpsertWorkspaceQuizSetPayload {
|
|
44
|
+
id?: string;
|
|
45
|
+
moduleId?: string;
|
|
46
|
+
name: string;
|
|
47
|
+
}
|
|
48
|
+
export interface UpsertWorkspaceFlashcardPayload {
|
|
49
|
+
id?: string;
|
|
50
|
+
moduleId?: string;
|
|
51
|
+
front: string;
|
|
52
|
+
back: string;
|
|
53
|
+
}
|
|
54
|
+
export interface WorkspaceEducationAttemptListQuery {
|
|
55
|
+
dateFrom?: string;
|
|
56
|
+
dateTo?: string;
|
|
57
|
+
learnerId?: string;
|
|
58
|
+
page?: number;
|
|
59
|
+
pageSize?: number;
|
|
60
|
+
setId?: string;
|
|
61
|
+
sortBy?: 'duration' | 'newest' | 'score';
|
|
62
|
+
sortDirection?: 'asc' | 'desc';
|
|
63
|
+
status?: 'all' | 'completed' | 'incomplete';
|
|
64
|
+
}
|
|
65
|
+
export declare function createWorkspaceCourse(workspaceId: string, payload: UpsertWorkspaceCoursePayload, options?: InternalApiClientOptions): Promise<{
|
|
66
|
+
message: string;
|
|
67
|
+
}>;
|
|
68
|
+
export declare function updateWorkspaceCourse(workspaceId: string, courseId: string, payload: Partial<UpsertWorkspaceCoursePayload>, options?: InternalApiClientOptions): Promise<{
|
|
69
|
+
message: string;
|
|
70
|
+
}>;
|
|
71
|
+
export declare function deleteWorkspaceCourse(workspaceId: string, courseId: string, options?: InternalApiClientOptions): Promise<{
|
|
72
|
+
message: string;
|
|
73
|
+
}>;
|
|
74
|
+
export declare function createWorkspaceCourseModule(workspaceId: string, groupId: string, payload: UpsertWorkspaceCourseModulePayload, options?: InternalApiClientOptions): Promise<WorkspaceCourseModule>;
|
|
75
|
+
export declare function updateWorkspaceCourseModule(workspaceId: string, moduleId: string, payload: Record<string, unknown>, options?: InternalApiClientOptions): Promise<{
|
|
76
|
+
message: string;
|
|
77
|
+
}>;
|
|
78
|
+
/**
|
|
79
|
+
* @deprecated Prefer {@link reorderWorkspaceCourseModulesInModuleGroup} for
|
|
80
|
+
* per-group reorder, or {@link reorderWorkspaceCourseModuleGroups} for group-level
|
|
81
|
+
* reorder. This legacy wrapper calls the upgraded `reorder_workspace_course_modules`
|
|
82
|
+
* RPC which preserves sort_key within each module_group.
|
|
83
|
+
*/
|
|
84
|
+
export declare function reorderWorkspaceCourseModules(workspaceId: string, groupId: string, moduleIds: string[], options?: InternalApiClientOptions): Promise<{
|
|
85
|
+
message: string;
|
|
86
|
+
}>;
|
|
87
|
+
export declare function deleteWorkspaceCourseModule(workspaceId: string, moduleId: string, options?: InternalApiClientOptions): Promise<{
|
|
88
|
+
message: string;
|
|
89
|
+
}>;
|
|
90
|
+
export declare function listWorkspaceCourseModuleGroups(workspaceId: string, groupId: string, options?: InternalApiClientOptions): Promise<{
|
|
91
|
+
color: string | null;
|
|
92
|
+
created_at: string;
|
|
93
|
+
group_id: string;
|
|
94
|
+
icon: string | null;
|
|
95
|
+
id: string;
|
|
96
|
+
sort_key: number;
|
|
97
|
+
title: string;
|
|
98
|
+
}[]>;
|
|
99
|
+
export declare function createWorkspaceCourseModuleGroup(workspaceId: string, groupId: string, payload: UpsertWorkspaceCourseModuleGroupPayload, options?: InternalApiClientOptions): Promise<{
|
|
100
|
+
color: string | null;
|
|
101
|
+
created_at: string;
|
|
102
|
+
group_id: string;
|
|
103
|
+
icon: string | null;
|
|
104
|
+
id: string;
|
|
105
|
+
sort_key: number;
|
|
106
|
+
title: string;
|
|
107
|
+
}>;
|
|
108
|
+
export declare function updateWorkspaceCourseModuleGroup(workspaceId: string, groupId: string, moduleGroupId: string, payload: Partial<UpsertWorkspaceCourseModuleGroupPayload>, options?: InternalApiClientOptions): Promise<{
|
|
109
|
+
message: string;
|
|
110
|
+
}>;
|
|
111
|
+
export declare function deleteWorkspaceCourseModuleGroup(workspaceId: string, groupId: string, moduleGroupId: string, options?: InternalApiClientOptions): Promise<{
|
|
112
|
+
message: string;
|
|
113
|
+
}>;
|
|
114
|
+
export declare function reorderWorkspaceCourseModuleGroups(workspaceId: string, groupId: string, moduleGroupIds: string[], options?: InternalApiClientOptions): Promise<{
|
|
115
|
+
message: string;
|
|
116
|
+
}>;
|
|
117
|
+
export declare function reorderWorkspaceCourseModulesInModuleGroup(workspaceId: string, groupId: string, moduleGroupId: string, moduleIds: string[], options?: InternalApiClientOptions): Promise<{
|
|
118
|
+
message: string;
|
|
119
|
+
}>;
|
|
120
|
+
export declare function linkQuizSetModules(workspaceId: string, setId: string, moduleIds: string[], options?: InternalApiClientOptions): Promise<{
|
|
121
|
+
message: string;
|
|
122
|
+
}>;
|
|
123
|
+
export declare function unlinkQuizSetModule(workspaceId: string, setId: string, moduleId: string, options?: InternalApiClientOptions): Promise<{
|
|
124
|
+
message: string;
|
|
125
|
+
}>;
|
|
126
|
+
export declare function createWorkspaceQuiz(workspaceId: string, payload: CreateWorkspaceQuizPayload, options?: InternalApiClientOptions): Promise<{
|
|
127
|
+
message: string;
|
|
128
|
+
}>;
|
|
129
|
+
export declare function updateWorkspaceQuiz(workspaceId: string, quizId: string, payload: Partial<UpsertWorkspaceQuizPayload>, options?: InternalApiClientOptions): Promise<{
|
|
130
|
+
message: string;
|
|
131
|
+
}>;
|
|
132
|
+
export declare function deleteWorkspaceQuiz(workspaceId: string, quizId: string, options?: InternalApiClientOptions): Promise<{
|
|
133
|
+
message: string;
|
|
134
|
+
}>;
|
|
135
|
+
export declare function createWorkspaceQuizSet(workspaceId: string, payload: UpsertWorkspaceQuizSetPayload, options?: InternalApiClientOptions): Promise<{
|
|
136
|
+
message: string;
|
|
137
|
+
}>;
|
|
138
|
+
export declare function updateWorkspaceQuizSet(workspaceId: string, setId: string, payload: Partial<UpsertWorkspaceQuizSetPayload>, options?: InternalApiClientOptions): Promise<{
|
|
139
|
+
message: string;
|
|
140
|
+
}>;
|
|
141
|
+
export declare function deleteWorkspaceQuizSet(workspaceId: string, setId: string, options?: InternalApiClientOptions): Promise<{
|
|
142
|
+
message: string;
|
|
143
|
+
}>;
|
|
144
|
+
export declare function createWorkspaceFlashcard(workspaceId: string, payload: UpsertWorkspaceFlashcardPayload, options?: InternalApiClientOptions): Promise<{
|
|
145
|
+
message: string;
|
|
146
|
+
}>;
|
|
147
|
+
export declare function updateWorkspaceFlashcard(workspaceId: string, flashcardId: string, payload: Partial<UpsertWorkspaceFlashcardPayload>, options?: InternalApiClientOptions): Promise<{
|
|
148
|
+
message: string;
|
|
149
|
+
}>;
|
|
150
|
+
export declare function deleteWorkspaceFlashcard(workspaceId: string, flashcardId: string, options?: InternalApiClientOptions): Promise<{
|
|
151
|
+
message: string;
|
|
152
|
+
}>;
|
|
153
|
+
export declare function listWorkspaceEducationAttempts(workspaceId: string, query?: WorkspaceEducationAttemptListQuery, options?: InternalApiClientOptions): Promise<{
|
|
154
|
+
attempts: Array<Record<string, unknown>>;
|
|
155
|
+
count: number;
|
|
156
|
+
page: number;
|
|
157
|
+
pageSize: number;
|
|
158
|
+
}>;
|
|
159
|
+
export declare function getWorkspaceEducationAttemptDetail(workspaceId: string, attemptId: string, options?: InternalApiClientOptions): Promise<{
|
|
160
|
+
attempt: Record<string, unknown>;
|
|
161
|
+
learner: Record<string, unknown> | null;
|
|
162
|
+
answers: Array<Record<string, unknown>>;
|
|
163
|
+
}>;
|
|
164
|
+
export declare function deleteWorkspaceStorageObject(workspaceId: string, path: string, options?: InternalApiClientOptions): Promise<{
|
|
165
|
+
success: true;
|
|
166
|
+
}>;
|
|
167
|
+
//# sourceMappingURL=education.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"education.d.ts","sourceRoot":"","sources":["../src/education.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,KAAK,EACV,4BAA4B,EAE7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,4BAA4B;IAC3C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,kCAAkC;IACjD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IAC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