@speakableio/core 0.1.99 → 0.1.101
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/assignment.constants-BIKM6fYi.d.mts +32 -0
- package/dist/assignment.model-Bcbxx8oI.d.mts +299 -0
- package/dist/card.constants-DhKFipX3.d.mts +54 -0
- package/dist/const.d.mts +26 -0
- package/dist/const.js +185 -0
- package/dist/const.js.map +1 -0
- package/dist/hooks.d.mts +294 -0
- package/dist/hooks.js +1571 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.native.d.mts +30 -2266
- package/dist/index.native.d.ts +30 -2266
- package/dist/index.native.js +97 -2910
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +120 -2933
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.web.d.mts +8 -2430
- package/dist/index.web.js +120 -2933
- package/dist/index.web.js.map +1 -1
- package/dist/models.d.mts +56 -0
- package/dist/models.js +52 -0
- package/dist/models.js.map +1 -0
- package/dist/notification.constants-B72fb734.d.mts +21 -0
- package/dist/repos.d.mts +209 -0
- package/dist/repos.js +453 -0
- package/dist/repos.js.map +1 -0
- package/dist/utils.d.mts +39 -0
- package/dist/utils.js +340 -0
- package/dist/utils.js.map +1 -0
- package/package.json +56 -1
package/dist/hooks.d.mts
ADDED
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
3
|
+
import { A as AssignmentWithId, b as CustomTimestamp, c as ActivityPageType, S as ScoreWithId, e as Score, f as PageScore, d as PageActivityWithId, P as PageActivity } from './assignment.model-Bcbxx8oI.mjs';
|
|
4
|
+
import { A as AssignmentAnalyticsType } from './assignment.constants-BIKM6fYi.mjs';
|
|
5
|
+
import { V as VerificationCardStatus } from './card.constants-DhKFipX3.mjs';
|
|
6
|
+
import { a as SpeakableNotificationType } from './notification.constants-B72fb734.mjs';
|
|
7
|
+
import { SetWithId } from './models.mjs';
|
|
8
|
+
import '@react-native-firebase/firestore';
|
|
9
|
+
import 'firebase/firestore';
|
|
10
|
+
|
|
11
|
+
declare const assignmentQueryKeys: {
|
|
12
|
+
all: readonly ["assignments"];
|
|
13
|
+
byId: (id: string) => readonly ["assignments", string];
|
|
14
|
+
list: () => readonly ["assignments", "list"];
|
|
15
|
+
};
|
|
16
|
+
declare function useAssignment({ assignmentId, enabled, analyticType, userId, }: {
|
|
17
|
+
assignmentId: string;
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
analyticType?: AssignmentAnalyticsType;
|
|
20
|
+
userId: string;
|
|
21
|
+
}): _tanstack_react_query.UseQueryResult<AssignmentWithId | {
|
|
22
|
+
scores: any;
|
|
23
|
+
id: string;
|
|
24
|
+
isAvailable: boolean;
|
|
25
|
+
name: string;
|
|
26
|
+
description: string;
|
|
27
|
+
scheduledTime?: string | null;
|
|
28
|
+
dueTime?: {
|
|
29
|
+
hours: number;
|
|
30
|
+
minutes: number;
|
|
31
|
+
nanos: number;
|
|
32
|
+
};
|
|
33
|
+
speakableio: boolean;
|
|
34
|
+
owners: string[];
|
|
35
|
+
image: {
|
|
36
|
+
path: string | null;
|
|
37
|
+
url: string;
|
|
38
|
+
};
|
|
39
|
+
dueDate: {
|
|
40
|
+
day: number;
|
|
41
|
+
month: number;
|
|
42
|
+
year: number;
|
|
43
|
+
};
|
|
44
|
+
teacherName: string;
|
|
45
|
+
courseWorkId: string | null;
|
|
46
|
+
dueDateTimestamp: CustomTimestamp;
|
|
47
|
+
scheduledTimeTimestamp: number;
|
|
48
|
+
active: boolean;
|
|
49
|
+
voice: string | null;
|
|
50
|
+
setId: string;
|
|
51
|
+
dateMade: {
|
|
52
|
+
seconds: number;
|
|
53
|
+
nanoseconds: number;
|
|
54
|
+
};
|
|
55
|
+
maxPoints: number;
|
|
56
|
+
courseId: string;
|
|
57
|
+
isAssessment: boolean;
|
|
58
|
+
ltiDeeplink?: string;
|
|
59
|
+
content?: string[];
|
|
60
|
+
weights?: Record<string, number>;
|
|
61
|
+
language?: string;
|
|
62
|
+
types?: { [key in ActivityPageType]?: number; };
|
|
63
|
+
aiEnabled?: boolean;
|
|
64
|
+
chat_experience?: boolean;
|
|
65
|
+
} | null, Error>;
|
|
66
|
+
|
|
67
|
+
declare const scoreQueryKeys: {
|
|
68
|
+
all: readonly ["scores"];
|
|
69
|
+
byId: (id: string) => readonly ["scores", string];
|
|
70
|
+
list: () => readonly ["scores", "list"];
|
|
71
|
+
};
|
|
72
|
+
declare function useScore({ isAssignment, activityId, userId, courseId, enabled, googleClassroomUserId, }: {
|
|
73
|
+
userId: string;
|
|
74
|
+
isAssignment: boolean;
|
|
75
|
+
activityId: string;
|
|
76
|
+
courseId?: string;
|
|
77
|
+
enabled?: boolean;
|
|
78
|
+
googleClassroomUserId?: string;
|
|
79
|
+
}): _tanstack_react_query.UseQueryResult<ScoreWithId, Error>;
|
|
80
|
+
declare function useUpdateScore(): {
|
|
81
|
+
mutationUpdateScore: _tanstack_react_query.UseMutationResult<Promise<void>, Error, {
|
|
82
|
+
userId: string;
|
|
83
|
+
data: Partial<Score>;
|
|
84
|
+
isAssignment: boolean;
|
|
85
|
+
activityId: string;
|
|
86
|
+
}, {
|
|
87
|
+
previousData: Partial<Score> | undefined;
|
|
88
|
+
}>;
|
|
89
|
+
};
|
|
90
|
+
declare function useUpdateCardScore({ isAssignment, activityId, userId, cardIds, weights, }: {
|
|
91
|
+
isAssignment: boolean;
|
|
92
|
+
userId: string;
|
|
93
|
+
activityId: string;
|
|
94
|
+
cardIds: string[];
|
|
95
|
+
weights: Record<string, number>;
|
|
96
|
+
}): {
|
|
97
|
+
mutationUpdateCardScore: _tanstack_react_query.UseMutationResult<{
|
|
98
|
+
cardId: string;
|
|
99
|
+
scoresUpdated: Score;
|
|
100
|
+
}, Error, {
|
|
101
|
+
cardId: string;
|
|
102
|
+
cardScore: PageScore;
|
|
103
|
+
}, void>;
|
|
104
|
+
};
|
|
105
|
+
declare function useClearScore(): {
|
|
106
|
+
mutationClearScore: _tanstack_react_query.UseMutationResult<{
|
|
107
|
+
update: Partial<Score>;
|
|
108
|
+
activityId: string;
|
|
109
|
+
}, Error, {
|
|
110
|
+
isAssignment: boolean;
|
|
111
|
+
cardId: string;
|
|
112
|
+
cardScores: PageScore;
|
|
113
|
+
userId: string;
|
|
114
|
+
activityId: string;
|
|
115
|
+
}, unknown>;
|
|
116
|
+
};
|
|
117
|
+
declare function useSubmitAssignmentScore({ onAssignmentSubmitted, studentName, }: {
|
|
118
|
+
onAssignmentSubmitted: (assignmentId: string) => void;
|
|
119
|
+
studentName: string;
|
|
120
|
+
}): {
|
|
121
|
+
submitAssignmentScore: _tanstack_react_query.UseMutateAsyncFunction<{
|
|
122
|
+
success: boolean;
|
|
123
|
+
message: string;
|
|
124
|
+
error?: undefined;
|
|
125
|
+
} | {
|
|
126
|
+
success: boolean;
|
|
127
|
+
error: unknown;
|
|
128
|
+
message?: undefined;
|
|
129
|
+
}, Error, {
|
|
130
|
+
assignment: {
|
|
131
|
+
id: string;
|
|
132
|
+
name: string;
|
|
133
|
+
owners: string[];
|
|
134
|
+
courseId: string;
|
|
135
|
+
courseWorkId: string;
|
|
136
|
+
isAssessment: boolean;
|
|
137
|
+
maxPoints: number;
|
|
138
|
+
};
|
|
139
|
+
userId: string;
|
|
140
|
+
cardIds: string[];
|
|
141
|
+
weights: Record<string, number>;
|
|
142
|
+
scores: Score;
|
|
143
|
+
status: "FINALIZED" | "IN_PROGRESS" | "PENDING_REVIEW";
|
|
144
|
+
}, unknown>;
|
|
145
|
+
isLoading: boolean;
|
|
146
|
+
};
|
|
147
|
+
declare function useSubmitPracticeScore(): {
|
|
148
|
+
submitPracticeScore: _tanstack_react_query.UseMutateAsyncFunction<{
|
|
149
|
+
success: boolean;
|
|
150
|
+
message: string;
|
|
151
|
+
error?: undefined;
|
|
152
|
+
} | {
|
|
153
|
+
success: boolean;
|
|
154
|
+
error: unknown;
|
|
155
|
+
message?: undefined;
|
|
156
|
+
}, Error, {
|
|
157
|
+
setId: string;
|
|
158
|
+
userId: string;
|
|
159
|
+
scores: Score;
|
|
160
|
+
}, unknown>;
|
|
161
|
+
isLoading: boolean;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
declare const cardsQueryKeys: {
|
|
165
|
+
all: string[];
|
|
166
|
+
one: (params: {
|
|
167
|
+
cardId: string;
|
|
168
|
+
}) => string[];
|
|
169
|
+
};
|
|
170
|
+
declare function useCards({ cardIds, enabled, asObject, }: {
|
|
171
|
+
cardIds: string[];
|
|
172
|
+
enabled: boolean;
|
|
173
|
+
asObject?: boolean;
|
|
174
|
+
}): {
|
|
175
|
+
cards: PageActivityWithId[];
|
|
176
|
+
cardsObject: Record<string, PageActivityWithId> | null;
|
|
177
|
+
cardsQueries: _tanstack_react_query.UseQueryResult<PageActivityWithId | null, Error>[];
|
|
178
|
+
};
|
|
179
|
+
declare function useCreateCard(): {
|
|
180
|
+
mutationCreateCard: _tanstack_react_query.UseMutationResult<{
|
|
181
|
+
id: string;
|
|
182
|
+
} & Partial<PageActivity>, Error, {
|
|
183
|
+
data: Partial<PageActivity>;
|
|
184
|
+
}, unknown>;
|
|
185
|
+
};
|
|
186
|
+
declare function useCreateCards(): {
|
|
187
|
+
mutationCreateCards: _tanstack_react_query.UseMutationResult<{
|
|
188
|
+
id: string;
|
|
189
|
+
owners: string[];
|
|
190
|
+
checked?: boolean;
|
|
191
|
+
completed?: boolean;
|
|
192
|
+
media_area_id?: string | null;
|
|
193
|
+
media_area_layout?: "left" | "right" | null;
|
|
194
|
+
score?: number;
|
|
195
|
+
verificationStatus?: VerificationCardStatus;
|
|
196
|
+
native_text?: string;
|
|
197
|
+
repeat?: number;
|
|
198
|
+
language?: string | null;
|
|
199
|
+
image?: {
|
|
200
|
+
path?: string | null;
|
|
201
|
+
url?: string;
|
|
202
|
+
};
|
|
203
|
+
audio?: {
|
|
204
|
+
path?: string | null;
|
|
205
|
+
url?: string;
|
|
206
|
+
} | null;
|
|
207
|
+
notes?: string;
|
|
208
|
+
difficulty?: string;
|
|
209
|
+
default_language?: string;
|
|
210
|
+
target_text?: string;
|
|
211
|
+
type: ActivityPageType;
|
|
212
|
+
grading_criteria?: string;
|
|
213
|
+
scoring_type?: string;
|
|
214
|
+
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
215
|
+
feedback_types?: string[];
|
|
216
|
+
rubricId?: string;
|
|
217
|
+
prompt?: string;
|
|
218
|
+
title?: string;
|
|
219
|
+
passing_score?: number;
|
|
220
|
+
maxCharacters?: number;
|
|
221
|
+
answer?: string[];
|
|
222
|
+
choices?: {
|
|
223
|
+
value: string;
|
|
224
|
+
option: string;
|
|
225
|
+
}[];
|
|
226
|
+
MCQType?: string;
|
|
227
|
+
multipleAttemptsAllowed?: boolean;
|
|
228
|
+
allowRetries?: boolean;
|
|
229
|
+
question?: string;
|
|
230
|
+
respondTime?: number;
|
|
231
|
+
hidePrompt?: boolean;
|
|
232
|
+
videoUrl?: string;
|
|
233
|
+
link?: string;
|
|
234
|
+
text?: string;
|
|
235
|
+
isListenAloud?: boolean;
|
|
236
|
+
embedCode?: string;
|
|
237
|
+
attempt?: number;
|
|
238
|
+
correct?: number;
|
|
239
|
+
autoGrade?: boolean;
|
|
240
|
+
points?: number;
|
|
241
|
+
shuffle?: boolean;
|
|
242
|
+
translation?: string;
|
|
243
|
+
includeAIContext?: boolean;
|
|
244
|
+
media_area_context_ref?: string | null;
|
|
245
|
+
standardId?: string;
|
|
246
|
+
target_proficiency_level?: string;
|
|
247
|
+
allowTTS?: boolean;
|
|
248
|
+
feedback_language?: string | null;
|
|
249
|
+
correct_answer?: string | null;
|
|
250
|
+
limit_attempts?: boolean;
|
|
251
|
+
max_attempts?: number;
|
|
252
|
+
rich_text?: string;
|
|
253
|
+
}[], Error, {
|
|
254
|
+
cards: PageActivity[];
|
|
255
|
+
}, unknown>;
|
|
256
|
+
};
|
|
257
|
+
declare function getCardFromCache({ cardId, queryClient, }: {
|
|
258
|
+
cardId: string;
|
|
259
|
+
queryClient: QueryClient;
|
|
260
|
+
}): PageActivityWithId | undefined;
|
|
261
|
+
declare function updateCardInCache({ cardId, card, queryClient, }: {
|
|
262
|
+
cardId: string;
|
|
263
|
+
card: PageActivityWithId | null;
|
|
264
|
+
queryClient: QueryClient;
|
|
265
|
+
}): void;
|
|
266
|
+
declare function useGetCard({ cardId, enabled }: {
|
|
267
|
+
cardId: string;
|
|
268
|
+
enabled?: boolean;
|
|
269
|
+
}): _tanstack_react_query.UseQueryResult<PageActivityWithId | null, Error>;
|
|
270
|
+
|
|
271
|
+
declare const useCreateNotification: () => {
|
|
272
|
+
createNotification: (type: SpeakableNotificationType, data: any) => Promise<any>;
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
declare const setsQueryKeys: {
|
|
276
|
+
all: string[];
|
|
277
|
+
one: (params: {
|
|
278
|
+
setId: string;
|
|
279
|
+
}) => string[];
|
|
280
|
+
};
|
|
281
|
+
declare const useSet: ({ setId, enabled }: {
|
|
282
|
+
setId: string;
|
|
283
|
+
enabled?: boolean;
|
|
284
|
+
}) => _tanstack_react_query.UseQueryResult<SetWithId | null, Error>;
|
|
285
|
+
declare function getSetFromCache({ setId, queryClient, }: {
|
|
286
|
+
setId: string | undefined;
|
|
287
|
+
queryClient: QueryClient;
|
|
288
|
+
}): SetWithId | null | undefined;
|
|
289
|
+
declare function updateSetInCache({ set, queryClient, }: {
|
|
290
|
+
set: SetWithId;
|
|
291
|
+
queryClient: QueryClient;
|
|
292
|
+
}): void;
|
|
293
|
+
|
|
294
|
+
export { assignmentQueryKeys, cardsQueryKeys, getCardFromCache, getSetFromCache, scoreQueryKeys, setsQueryKeys, updateCardInCache, updateSetInCache, useAssignment, useCards, useClearScore, useCreateCard, useCreateCards, useCreateNotification, useGetCard, useScore, useSet, useSubmitAssignmentScore, useSubmitPracticeScore, useUpdateCardScore, useUpdateScore };
|