@speakableio/core 0.1.58 → 0.1.59

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.
@@ -336,6 +336,95 @@ declare function useAssignment({ assignmentId, enabled, analyticType, userId, }:
336
336
  language?: string;
337
337
  } | null, Error>;
338
338
 
339
+ declare const scoreQueryKeys: {
340
+ all: readonly ["scores"];
341
+ byId: (id: string) => readonly ["scores", string];
342
+ list: () => readonly ["scores", "list"];
343
+ };
344
+ declare function useScore({ isAssignment, activityId, userId, courseId, enabled, googleClassroomUserId, }: {
345
+ userId: string;
346
+ isAssignment: boolean;
347
+ activityId: string;
348
+ courseId?: string;
349
+ enabled?: boolean;
350
+ googleClassroomUserId?: string;
351
+ }): _tanstack_react_query.UseQueryResult<ScoreWithId, Error>;
352
+ declare function useUpdateScore(): {
353
+ mutationUpdateScore: _tanstack_react_query.UseMutationResult<Promise<void>, Error, {
354
+ userId: string;
355
+ data: Partial<Score>;
356
+ isAssignment: boolean;
357
+ activityId: string;
358
+ }, {
359
+ previousData: Partial<Score> | undefined;
360
+ }>;
361
+ };
362
+ declare function useUpdateCardScore({ isAssignment, activityId, userId, cardIds, weights, }: {
363
+ isAssignment: boolean;
364
+ userId: string;
365
+ activityId: string;
366
+ cardIds: string[];
367
+ weights: Record<string, number>;
368
+ }): {
369
+ mutationUpdateCardScore: _tanstack_react_query.UseMutationResult<{
370
+ cardId: string;
371
+ scoresUpdated: Score;
372
+ }, Error, {
373
+ cardId: string;
374
+ cardScore: CardScore;
375
+ }, void>;
376
+ };
377
+ declare function useClearScore(): {
378
+ mutationClearScore: _tanstack_react_query.UseMutationResult<{
379
+ update: Partial<Score>;
380
+ activityId: string;
381
+ }, Error, {
382
+ isAssignment: boolean;
383
+ cardId: string;
384
+ cardScores: CardScore;
385
+ userId: string;
386
+ activityId: string;
387
+ }, unknown>;
388
+ };
389
+ declare function useSubmitAssignmentScore({ onAssignmentSubmitted, studentName, }: {
390
+ onAssignmentSubmitted: (assignmentId: string) => void;
391
+ studentName: string;
392
+ }): {
393
+ submitAssignmentScore: _tanstack_react_query.UseMutateAsyncFunction<{
394
+ success: boolean;
395
+ message: string;
396
+ error?: undefined;
397
+ } | {
398
+ success: boolean;
399
+ error: unknown;
400
+ message?: undefined;
401
+ }, Error, {
402
+ assignment: AssignmentWithId;
403
+ userId: string;
404
+ cardIds: string[];
405
+ weights: Record<string, number>;
406
+ scores: Score;
407
+ status: "FINALIZED" | "IN_PROGRESS" | "PENDING_REVIEW";
408
+ }, unknown>;
409
+ isLoading: boolean;
410
+ };
411
+ declare function useSubmitPracticeScore(): {
412
+ submitPracticeScore: _tanstack_react_query.UseMutateAsyncFunction<{
413
+ success: boolean;
414
+ message: string;
415
+ error?: undefined;
416
+ } | {
417
+ success: boolean;
418
+ error: unknown;
419
+ message?: undefined;
420
+ }, Error, {
421
+ setId: string;
422
+ userId: string;
423
+ scores: Score;
424
+ }, unknown>;
425
+ isLoading: boolean;
426
+ };
427
+
339
428
  declare const enum FeedbackTypesCard {
340
429
  SuggestedResponse = "suggested_response",
341
430
  Wida = "wida",
@@ -2598,4 +2687,4 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
2598
2687
  };
2599
2688
  };
2600
2689
 
2601
- export { ALLOWED_CARD_ACTIVITY_TYPES_FOR_SUMMARY, type Assignment, type AssignmentWithId, BASE_MULTIPLE_CHOICE_FIELD_VALUES, BASE_REPEAT_FIELD_VALUES, BASE_RESPOND_FIELD_VALUES, type CardActivity, CardActivityType, type CardActivityWithId, type CardScore, type CreditContract, FeedbackTypesCard, FsCtx, type InstitutionSubscription, LENIENCY_OPTIONS, LeniencyCard, MULTIPLE_CHOICE_CARD_ACTIVITY_TYPES, type Organization, type OrganizationAccess, REPEAT_CARD_ACTIVITY_TYPES, RESPOND_AUDIO_CARD_ACTIVITY_TYPES, RESPOND_CARD_ACTIVITY_TYPES, RESPOND_WRITE_CARD_ACTIVITY_TYPES, type RefsCardsFiresotre, type RefsSetsFirestore, SPEAKABLE_NOTIFICATIONS, STUDENT_LEVELS_OPTIONS, type Score, type ScoreWithId, type Set, type SetWithId, type SpeakableNotificationType, SpeakableNotificationTypes, SpeakableProvider, VerificationCardStatus, assignmentQueryKeys, cardsQueryKeys, cleanString, createAssignmentRepo, createCardRepo, createFsClientNative as createFsClient, createSetRepo, creditQueryKeys, debounce, getCardFromCache, getRespondCardTool, getSetFromCache, getWordHash, purify, refsCardsFiresotre, refsSetsFirestore, setsQueryKeys, updateCardInCache, updateSetInCache, useActivity, useActivityFeedbackAccess, useAssignment, useBaseOpenAI, useCards, useCreateCard, useCreateCards, useCreateNotification, useGetCard, useOrganizationAccess, useSet, useSpeakableApi, useUserCredits };
2690
+ export { ALLOWED_CARD_ACTIVITY_TYPES_FOR_SUMMARY, type Assignment, type AssignmentWithId, BASE_MULTIPLE_CHOICE_FIELD_VALUES, BASE_REPEAT_FIELD_VALUES, BASE_RESPOND_FIELD_VALUES, type CardActivity, CardActivityType, type CardActivityWithId, type CardScore, type CreditContract, FeedbackTypesCard, FsCtx, type InstitutionSubscription, LENIENCY_OPTIONS, LeniencyCard, MULTIPLE_CHOICE_CARD_ACTIVITY_TYPES, type Organization, type OrganizationAccess, REPEAT_CARD_ACTIVITY_TYPES, RESPOND_AUDIO_CARD_ACTIVITY_TYPES, RESPOND_CARD_ACTIVITY_TYPES, RESPOND_WRITE_CARD_ACTIVITY_TYPES, type RefsCardsFiresotre, type RefsSetsFirestore, SPEAKABLE_NOTIFICATIONS, STUDENT_LEVELS_OPTIONS, type Score, type ScoreWithId, type Set, type SetWithId, type SpeakableNotificationType, SpeakableNotificationTypes, SpeakableProvider, VerificationCardStatus, assignmentQueryKeys, cardsQueryKeys, cleanString, createAssignmentRepo, createCardRepo, createFsClientNative as createFsClient, createSetRepo, creditQueryKeys, debounce, getCardFromCache, getRespondCardTool, getSetFromCache, getWordHash, purify, refsCardsFiresotre, refsSetsFirestore, scoreQueryKeys, setsQueryKeys, updateCardInCache, updateSetInCache, useActivity, useActivityFeedbackAccess, useAssignment, useBaseOpenAI, useCards, useClearScore, useCreateCard, useCreateCards, useCreateNotification, useGetCard, useOrganizationAccess, useScore, useSet, useSpeakableApi, useSubmitAssignmentScore, useSubmitPracticeScore, useUpdateCardScore, useUpdateScore, useUserCredits };