@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.
Files changed (88) hide show
  1. package/dist/ai.d.ts +43 -0
  2. package/dist/ai.d.ts.map +1 -0
  3. package/dist/ai.js +57 -0
  4. package/dist/auth.d.ts +46 -0
  5. package/dist/auth.d.ts.map +1 -0
  6. package/dist/auth.js +47 -0
  7. package/dist/calendar.d.ts +99 -0
  8. package/dist/calendar.d.ts.map +1 -0
  9. package/dist/calendar.js +94 -0
  10. package/dist/chat.d.ts +46 -0
  11. package/dist/chat.d.ts.map +1 -0
  12. package/dist/chat.js +67 -0
  13. package/dist/client.d.ts +35 -0
  14. package/dist/client.d.ts.map +1 -0
  15. package/dist/client.js +216 -0
  16. package/dist/education.d.ts +167 -0
  17. package/dist/education.d.ts.map +1 -0
  18. package/dist/education.js +288 -0
  19. package/dist/external-projects.d.ts +425 -0
  20. package/dist/external-projects.d.ts.map +1 -0
  21. package/dist/external-projects.js +466 -0
  22. package/dist/finance.d.ts +109 -0
  23. package/dist/finance.d.ts.map +1 -0
  24. package/dist/finance.js +143 -0
  25. package/dist/habit-trackers.d.ts +25 -0
  26. package/dist/habit-trackers.d.ts.map +1 -0
  27. package/dist/habit-trackers.js +108 -0
  28. package/dist/index.d.ts +34 -0
  29. package/dist/index.d.ts.map +1 -0
  30. package/dist/index.js +280 -0
  31. package/dist/infrastructure.d.ts +354 -0
  32. package/dist/infrastructure.d.ts.map +1 -0
  33. package/dist/infrastructure.js +100 -0
  34. package/dist/inquiries.d.ts +12 -0
  35. package/dist/inquiries.d.ts.map +1 -0
  36. package/dist/inquiries.js +28 -0
  37. package/dist/mail.d.ts +19 -0
  38. package/dist/mail.d.ts.map +1 -0
  39. package/dist/mail.js +12 -0
  40. package/dist/nova.d.ts +5 -0
  41. package/dist/nova.d.ts.map +1 -0
  42. package/dist/nova.js +10 -0
  43. package/dist/posts.d.ts +9 -0
  44. package/dist/posts.d.ts.map +1 -0
  45. package/dist/posts.js +15 -0
  46. package/dist/promotions.d.ts +11 -0
  47. package/dist/promotions.d.ts.map +1 -0
  48. package/dist/promotions.js +15 -0
  49. package/dist/reports.d.ts +42 -0
  50. package/dist/reports.d.ts.map +1 -0
  51. package/dist/reports.js +48 -0
  52. package/dist/roles.d.ts +45 -0
  53. package/dist/roles.d.ts.map +1 -0
  54. package/dist/roles.js +96 -0
  55. package/dist/settings.d.ts +48 -0
  56. package/dist/settings.d.ts.map +1 -0
  57. package/dist/settings.js +66 -0
  58. package/dist/storage.d.ts +187 -0
  59. package/dist/storage.d.ts.map +1 -0
  60. package/dist/storage.js +371 -0
  61. package/dist/tasks-scheduling.d.ts +14 -0
  62. package/dist/tasks-scheduling.d.ts.map +1 -0
  63. package/dist/tasks-scheduling.js +14 -0
  64. package/dist/tasks.d.ts +311 -0
  65. package/dist/tasks.d.ts.map +1 -0
  66. package/dist/tasks.js +396 -0
  67. package/dist/templates.d.ts +48 -0
  68. package/dist/templates.d.ts.map +1 -0
  69. package/dist/templates.js +19 -0
  70. package/dist/time-tracking.d.ts +88 -0
  71. package/dist/time-tracking.d.ts.map +1 -0
  72. package/dist/time-tracking.js +101 -0
  73. package/dist/users-feedbacks.d.ts +66 -0
  74. package/dist/users-feedbacks.d.ts.map +1 -0
  75. package/dist/users-feedbacks.js +46 -0
  76. package/dist/users.d.ts +89 -0
  77. package/dist/users.d.ts.map +1 -0
  78. package/dist/users.js +139 -0
  79. package/dist/workspace-configs.d.ts +24 -0
  80. package/dist/workspace-configs.d.ts.map +1 -0
  81. package/dist/workspace-configs.js +76 -0
  82. package/dist/workspace-user-audit.d.ts +66 -0
  83. package/dist/workspace-user-audit.d.ts.map +1 -0
  84. package/dist/workspace-user-audit.js +23 -0
  85. package/dist/workspaces.d.ts +59 -0
  86. package/dist/workspaces.d.ts.map +1 -0
  87. package/dist/workspaces.js +131 -0
  88. package/package.json +141 -0
@@ -0,0 +1,288 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.listWorkspaceCourseModules = listWorkspaceCourseModules;
4
+ exports.listWorkspaceCourseModuleGroupModules = listWorkspaceCourseModuleGroupModules;
5
+ exports.createWorkspaceCourse = createWorkspaceCourse;
6
+ exports.updateWorkspaceCourse = updateWorkspaceCourse;
7
+ exports.deleteWorkspaceCourse = deleteWorkspaceCourse;
8
+ exports.createWorkspaceCourseModule = createWorkspaceCourseModule;
9
+ exports.updateWorkspaceCourseModule = updateWorkspaceCourseModule;
10
+ exports.reorderWorkspaceCourseModules = reorderWorkspaceCourseModules;
11
+ exports.deleteWorkspaceCourseModule = deleteWorkspaceCourseModule;
12
+ exports.listWorkspaceCourseModuleGroups = listWorkspaceCourseModuleGroups;
13
+ exports.createWorkspaceCourseModuleGroup = createWorkspaceCourseModuleGroup;
14
+ exports.updateWorkspaceCourseModuleGroup = updateWorkspaceCourseModuleGroup;
15
+ exports.deleteWorkspaceCourseModuleGroup = deleteWorkspaceCourseModuleGroup;
16
+ exports.reorderWorkspaceCourseModuleGroups = reorderWorkspaceCourseModuleGroups;
17
+ exports.reorderWorkspaceCourseModulesInModuleGroup = reorderWorkspaceCourseModulesInModuleGroup;
18
+ exports.linkQuizSetModules = linkQuizSetModules;
19
+ exports.unlinkQuizSetModule = unlinkQuizSetModule;
20
+ exports.createWorkspaceQuiz = createWorkspaceQuiz;
21
+ exports.updateWorkspaceQuiz = updateWorkspaceQuiz;
22
+ exports.deleteWorkspaceQuiz = deleteWorkspaceQuiz;
23
+ exports.createWorkspaceQuizSet = createWorkspaceQuizSet;
24
+ exports.updateWorkspaceQuizSet = updateWorkspaceQuizSet;
25
+ exports.deleteWorkspaceQuizSet = deleteWorkspaceQuizSet;
26
+ exports.createWorkspaceFlashcard = createWorkspaceFlashcard;
27
+ exports.updateWorkspaceFlashcard = updateWorkspaceFlashcard;
28
+ exports.deleteWorkspaceFlashcard = deleteWorkspaceFlashcard;
29
+ exports.listWorkspaceEducationAttempts = listWorkspaceEducationAttempts;
30
+ exports.getWorkspaceEducationAttemptDetail = getWorkspaceEducationAttemptDetail;
31
+ exports.deleteWorkspaceStorageObject = deleteWorkspaceStorageObject;
32
+ const client_1 = require("./client");
33
+ async function listWorkspaceCourseModules(workspaceId, groupId, options) {
34
+ const client = (0, client_1.getInternalApiClient)(options);
35
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/user-groups/${(0, client_1.encodePathSegment)(groupId)}/modules`, { cache: 'no-store' });
36
+ }
37
+ async function listWorkspaceCourseModuleGroupModules(workspaceId, groupId, moduleGroupId, options) {
38
+ const client = (0, client_1.getInternalApiClient)(options);
39
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/user-groups/${(0, client_1.encodePathSegment)(groupId)}/module-groups/${(0, client_1.encodePathSegment)(moduleGroupId)}/modules`, { cache: 'no-store' });
40
+ }
41
+ async function createWorkspaceCourse(workspaceId, payload, options) {
42
+ const client = (0, client_1.getInternalApiClient)(options);
43
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/courses`, {
44
+ method: 'POST',
45
+ headers: { 'Content-Type': 'application/json' },
46
+ body: JSON.stringify(payload),
47
+ cache: 'no-store',
48
+ });
49
+ }
50
+ async function updateWorkspaceCourse(workspaceId, courseId, payload, options) {
51
+ const client = (0, client_1.getInternalApiClient)(options);
52
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/courses/${(0, client_1.encodePathSegment)(courseId)}`, {
53
+ method: 'PUT',
54
+ headers: { 'Content-Type': 'application/json' },
55
+ body: JSON.stringify(payload),
56
+ cache: 'no-store',
57
+ });
58
+ }
59
+ async function deleteWorkspaceCourse(workspaceId, courseId, options) {
60
+ const client = (0, client_1.getInternalApiClient)(options);
61
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/courses/${(0, client_1.encodePathSegment)(courseId)}`, {
62
+ method: 'DELETE',
63
+ cache: 'no-store',
64
+ });
65
+ }
66
+ async function createWorkspaceCourseModule(workspaceId, groupId, payload, options) {
67
+ const client = (0, client_1.getInternalApiClient)(options);
68
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/user-groups/${(0, client_1.encodePathSegment)(groupId)}/modules`, {
69
+ method: 'POST',
70
+ headers: { 'Content-Type': 'application/json' },
71
+ body: JSON.stringify(payload),
72
+ cache: 'no-store',
73
+ });
74
+ }
75
+ async function updateWorkspaceCourseModule(workspaceId, moduleId, payload, options) {
76
+ const client = (0, client_1.getInternalApiClient)(options);
77
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/course-modules/${(0, client_1.encodePathSegment)(moduleId)}`, {
78
+ method: 'PUT',
79
+ headers: {
80
+ 'Content-Type': 'application/json',
81
+ },
82
+ body: JSON.stringify(payload),
83
+ cache: 'no-store',
84
+ });
85
+ }
86
+ /**
87
+ * @deprecated Prefer {@link reorderWorkspaceCourseModulesInModuleGroup} for
88
+ * per-group reorder, or {@link reorderWorkspaceCourseModuleGroups} for group-level
89
+ * reorder. This legacy wrapper calls the upgraded `reorder_workspace_course_modules`
90
+ * RPC which preserves sort_key within each module_group.
91
+ */
92
+ async function reorderWorkspaceCourseModules(workspaceId, groupId, moduleIds, options) {
93
+ const client = (0, client_1.getInternalApiClient)(options);
94
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/user-groups/${(0, client_1.encodePathSegment)(groupId)}/module-order`, {
95
+ method: 'PATCH',
96
+ headers: { 'Content-Type': 'application/json' },
97
+ body: JSON.stringify({ moduleIds }),
98
+ cache: 'no-store',
99
+ });
100
+ }
101
+ async function deleteWorkspaceCourseModule(workspaceId, moduleId, options) {
102
+ const client = (0, client_1.getInternalApiClient)(options);
103
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/course-modules/${(0, client_1.encodePathSegment)(moduleId)}`, {
104
+ method: 'DELETE',
105
+ cache: 'no-store',
106
+ });
107
+ }
108
+ async function listWorkspaceCourseModuleGroups(workspaceId, groupId, options) {
109
+ const client = (0, client_1.getInternalApiClient)(options);
110
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/user-groups/${(0, client_1.encodePathSegment)(groupId)}/module-groups`, { cache: 'no-store' });
111
+ }
112
+ async function createWorkspaceCourseModuleGroup(workspaceId, groupId, payload, options) {
113
+ const client = (0, client_1.getInternalApiClient)(options);
114
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/user-groups/${(0, client_1.encodePathSegment)(groupId)}/module-groups`, {
115
+ method: 'POST',
116
+ headers: { 'Content-Type': 'application/json' },
117
+ body: JSON.stringify(payload),
118
+ cache: 'no-store',
119
+ });
120
+ }
121
+ async function updateWorkspaceCourseModuleGroup(workspaceId, groupId, moduleGroupId, payload, options) {
122
+ const client = (0, client_1.getInternalApiClient)(options);
123
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/user-groups/${(0, client_1.encodePathSegment)(groupId)}/module-groups/${(0, client_1.encodePathSegment)(moduleGroupId)}`, {
124
+ method: 'PUT',
125
+ headers: { 'Content-Type': 'application/json' },
126
+ body: JSON.stringify(payload),
127
+ cache: 'no-store',
128
+ });
129
+ }
130
+ async function deleteWorkspaceCourseModuleGroup(workspaceId, groupId, moduleGroupId, options) {
131
+ const client = (0, client_1.getInternalApiClient)(options);
132
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/user-groups/${(0, client_1.encodePathSegment)(groupId)}/module-groups/${(0, client_1.encodePathSegment)(moduleGroupId)}`, {
133
+ method: 'DELETE',
134
+ cache: 'no-store',
135
+ });
136
+ }
137
+ async function reorderWorkspaceCourseModuleGroups(workspaceId, groupId, moduleGroupIds, options) {
138
+ const client = (0, client_1.getInternalApiClient)(options);
139
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/user-groups/${(0, client_1.encodePathSegment)(groupId)}/module-groups/order`, {
140
+ method: 'PATCH',
141
+ headers: { 'Content-Type': 'application/json' },
142
+ body: JSON.stringify({ moduleGroupIds }),
143
+ cache: 'no-store',
144
+ });
145
+ }
146
+ async function reorderWorkspaceCourseModulesInModuleGroup(workspaceId, groupId, moduleGroupId, moduleIds, options) {
147
+ const client = (0, client_1.getInternalApiClient)(options);
148
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/user-groups/${(0, client_1.encodePathSegment)(groupId)}/module-groups/${(0, client_1.encodePathSegment)(moduleGroupId)}/module-order`, {
149
+ method: 'PATCH',
150
+ headers: { 'Content-Type': 'application/json' },
151
+ body: JSON.stringify({ moduleIds }),
152
+ cache: 'no-store',
153
+ });
154
+ }
155
+ async function linkQuizSetModules(workspaceId, setId, moduleIds, options) {
156
+ const client = (0, client_1.getInternalApiClient)(options);
157
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/quiz-sets/${(0, client_1.encodePathSegment)(setId)}/modules`, {
158
+ method: 'POST',
159
+ headers: {
160
+ 'Content-Type': 'application/json',
161
+ },
162
+ body: JSON.stringify({ moduleIds }),
163
+ cache: 'no-store',
164
+ });
165
+ }
166
+ async function unlinkQuizSetModule(workspaceId, setId, moduleId, options) {
167
+ const client = (0, client_1.getInternalApiClient)(options);
168
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/quiz-sets/${(0, client_1.encodePathSegment)(setId)}/modules/${(0, client_1.encodePathSegment)(moduleId)}`, {
169
+ method: 'DELETE',
170
+ cache: 'no-store',
171
+ });
172
+ }
173
+ async function createWorkspaceQuiz(workspaceId, payload, options) {
174
+ const client = (0, client_1.getInternalApiClient)(options);
175
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/quizzes`, {
176
+ method: 'POST',
177
+ headers: { 'Content-Type': 'application/json' },
178
+ body: JSON.stringify(payload),
179
+ cache: 'no-store',
180
+ });
181
+ }
182
+ async function updateWorkspaceQuiz(workspaceId, quizId, payload, options) {
183
+ const client = (0, client_1.getInternalApiClient)(options);
184
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/quizzes/${(0, client_1.encodePathSegment)(quizId)}`, {
185
+ method: 'PUT',
186
+ headers: { 'Content-Type': 'application/json' },
187
+ body: JSON.stringify(payload),
188
+ cache: 'no-store',
189
+ });
190
+ }
191
+ async function deleteWorkspaceQuiz(workspaceId, quizId, options) {
192
+ const client = (0, client_1.getInternalApiClient)(options);
193
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/quizzes/${(0, client_1.encodePathSegment)(quizId)}`, {
194
+ method: 'DELETE',
195
+ cache: 'no-store',
196
+ });
197
+ }
198
+ async function createWorkspaceQuizSet(workspaceId, payload, options) {
199
+ const client = (0, client_1.getInternalApiClient)(options);
200
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/quiz-sets`, {
201
+ method: 'POST',
202
+ headers: { 'Content-Type': 'application/json' },
203
+ body: JSON.stringify(payload),
204
+ cache: 'no-store',
205
+ });
206
+ }
207
+ async function updateWorkspaceQuizSet(workspaceId, setId, payload, options) {
208
+ const client = (0, client_1.getInternalApiClient)(options);
209
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/quiz-sets/${(0, client_1.encodePathSegment)(setId)}`, {
210
+ method: 'PUT',
211
+ headers: { 'Content-Type': 'application/json' },
212
+ body: JSON.stringify(payload),
213
+ cache: 'no-store',
214
+ });
215
+ }
216
+ async function deleteWorkspaceQuizSet(workspaceId, setId, options) {
217
+ const client = (0, client_1.getInternalApiClient)(options);
218
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/quiz-sets/${(0, client_1.encodePathSegment)(setId)}`, {
219
+ method: 'DELETE',
220
+ cache: 'no-store',
221
+ });
222
+ }
223
+ async function createWorkspaceFlashcard(workspaceId, payload, options) {
224
+ const client = (0, client_1.getInternalApiClient)(options);
225
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/flashcards`, {
226
+ method: 'POST',
227
+ headers: { 'Content-Type': 'application/json' },
228
+ body: JSON.stringify(payload),
229
+ cache: 'no-store',
230
+ });
231
+ }
232
+ async function updateWorkspaceFlashcard(workspaceId, flashcardId, payload, options) {
233
+ const client = (0, client_1.getInternalApiClient)(options);
234
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/flashcards/${(0, client_1.encodePathSegment)(flashcardId)}`, {
235
+ method: 'PUT',
236
+ headers: { 'Content-Type': 'application/json' },
237
+ body: JSON.stringify(payload),
238
+ cache: 'no-store',
239
+ });
240
+ }
241
+ async function deleteWorkspaceFlashcard(workspaceId, flashcardId, options) {
242
+ const client = (0, client_1.getInternalApiClient)(options);
243
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/flashcards/${(0, client_1.encodePathSegment)(flashcardId)}`, {
244
+ method: 'DELETE',
245
+ cache: 'no-store',
246
+ });
247
+ }
248
+ async function listWorkspaceEducationAttempts(workspaceId, query = {}, options) {
249
+ const client = (0, client_1.getInternalApiClient)(options);
250
+ const search = new URLSearchParams();
251
+ if (query.page)
252
+ search.set('page', `${query.page}`);
253
+ if (query.pageSize)
254
+ search.set('pageSize', `${query.pageSize}`);
255
+ if (query.setId)
256
+ search.set('setId', query.setId);
257
+ if (query.learnerId)
258
+ search.set('learnerId', query.learnerId);
259
+ if (query.status)
260
+ search.set('status', query.status);
261
+ if (query.dateFrom)
262
+ search.set('dateFrom', query.dateFrom);
263
+ if (query.dateTo)
264
+ search.set('dateTo', query.dateTo);
265
+ if (query.sortBy)
266
+ search.set('sortBy', query.sortBy);
267
+ if (query.sortDirection)
268
+ search.set('sortDirection', query.sortDirection);
269
+ const suffix = search.size > 0 ? `?${search.toString()}` : '';
270
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/education/attempts${suffix}`, { cache: 'no-store' });
271
+ }
272
+ async function getWorkspaceEducationAttemptDetail(workspaceId, attemptId, options) {
273
+ const client = (0, client_1.getInternalApiClient)(options);
274
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/education/attempts/${(0, client_1.encodePathSegment)(attemptId)}`, {
275
+ cache: 'no-store',
276
+ });
277
+ }
278
+ async function deleteWorkspaceStorageObject(workspaceId, path, options) {
279
+ const client = (0, client_1.getInternalApiClient)(options);
280
+ return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/storage/object`, {
281
+ method: 'DELETE',
282
+ headers: {
283
+ 'Content-Type': 'application/json',
284
+ },
285
+ body: JSON.stringify({ path }),
286
+ cache: 'no-store',
287
+ });
288
+ }