@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.
@@ -0,0 +1,56 @@
1
+ import { c as ActivityPageType } from './assignment.model-Bcbxx8oI.mjs';
2
+ export { g as Assignment, A as AssignmentWithId, M as MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES, P as PageActivity, d as PageActivityWithId, f as PageScore, h as REPEAT_PAGE_ACTIVITY_TYPES, j as RESPOND_AUDIO_PAGE_ACTIVITY_TYPES, R as RESPOND_PAGE_ACTIVITY_TYPES, i as RESPOND_WRITE_PAGE_ACTIVITY_TYPES, e as Score, S as ScoreWithId } from './assignment.model-Bcbxx8oI.mjs';
3
+ import { FieldValue } from 'firebase/firestore';
4
+ import '@react-native-firebase/firestore';
5
+ import './card.constants-DhKFipX3.mjs';
6
+
7
+ interface SetWithId extends Set {
8
+ id: string;
9
+ }
10
+ interface Set {
11
+ id: string;
12
+ language: string;
13
+ ownerName: string;
14
+ weights: Record<string, number>;
15
+ repeat?: number;
16
+ voice?: string;
17
+ averagePhraseLength?: number;
18
+ passing_score?: number;
19
+ organizations?: string[];
20
+ description: string;
21
+ image: {
22
+ url: string;
23
+ path: null | string;
24
+ };
25
+ additionalLanguages?: string[];
26
+ owners: string[];
27
+ name: string;
28
+ content: string[];
29
+ types: {
30
+ [key in ActivityPageType]?: number;
31
+ };
32
+ defaultLanguage: string;
33
+ createdAt: FieldValue;
34
+ public: boolean;
35
+ defaultRubricId?: string;
36
+ difficulty?: string;
37
+ end_screen?: {
38
+ variant: 0 | 1 | 2;
39
+ title: string;
40
+ description: string;
41
+ };
42
+ mcAllowRetries?: boolean;
43
+ welcome_screen?: {
44
+ variant: 'colored' | 'blank';
45
+ };
46
+ poorFunctionalityWarning?: boolean;
47
+ status?: 'draft' | 'published';
48
+ subjects?: any[];
49
+ respondAllowRetries?: boolean;
50
+ respondAllowTTS?: boolean;
51
+ feedbackLanguage?: string;
52
+ respondMaxCharacters?: number;
53
+ respondMaxTime?: number;
54
+ }
55
+
56
+ export { ActivityPageType, type Set, type SetWithId };
package/dist/models.js ADDED
@@ -0,0 +1,52 @@
1
+ // src/domains/cards/card.model.ts
2
+ var ActivityPageType = /* @__PURE__ */ ((ActivityPageType2) => {
3
+ ActivityPageType2["READ_REPEAT"] = "READ_REPEAT";
4
+ ActivityPageType2["VIDEO"] = "VIDEO";
5
+ ActivityPageType2["TEXT"] = "TEXT";
6
+ ActivityPageType2["READ_RESPOND"] = "READ_RESPOND";
7
+ ActivityPageType2["FREE_RESPONSE"] = "FREE_RESPONSE";
8
+ ActivityPageType2["REPEAT"] = "REPEAT";
9
+ ActivityPageType2["RESPOND"] = "RESPOND";
10
+ ActivityPageType2["RESPOND_WRITE"] = "RESPOND_WRITE";
11
+ ActivityPageType2["TEXT_TO_SPEECH"] = "TEXT_TO_SPEECH";
12
+ ActivityPageType2["MULTIPLE_CHOICE"] = "MULTIPLE_CHOICE";
13
+ ActivityPageType2["PODCAST"] = "PODCAST";
14
+ ActivityPageType2["MEDIA_PAGE"] = "MEDIA_PAGE";
15
+ ActivityPageType2["WRITE"] = "WRITE";
16
+ ActivityPageType2["SHORT_ANSWER"] = "SHORT_ANSWER";
17
+ ActivityPageType2["SHORT_STORY"] = "SHORT_STORY";
18
+ ActivityPageType2["SPEAK"] = "SPEAK";
19
+ ActivityPageType2["CONVERSATION"] = "CONVERSATION";
20
+ ActivityPageType2["CONVERSATION_WRITE"] = "CONVERSATION_WRITE";
21
+ ActivityPageType2["DIALOGUE"] = "DIALOGUE";
22
+ ActivityPageType2["INSTRUCTION"] = "INSTRUCTION";
23
+ ActivityPageType2["LISTEN"] = "LISTEN";
24
+ ActivityPageType2["READ"] = "READ";
25
+ ActivityPageType2["ANSWER"] = "ANSWER";
26
+ return ActivityPageType2;
27
+ })(ActivityPageType || {});
28
+ var RESPOND_PAGE_ACTIVITY_TYPES = [
29
+ "READ_RESPOND" /* READ_RESPOND */,
30
+ "RESPOND" /* RESPOND */,
31
+ "RESPOND_WRITE" /* RESPOND_WRITE */,
32
+ "FREE_RESPONSE" /* FREE_RESPONSE */
33
+ ];
34
+ var MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES = ["MULTIPLE_CHOICE" /* MULTIPLE_CHOICE */];
35
+ var REPEAT_PAGE_ACTIVITY_TYPES = ["READ_REPEAT" /* READ_REPEAT */, "REPEAT" /* REPEAT */];
36
+ var RESPOND_WRITE_PAGE_ACTIVITY_TYPES = [
37
+ "RESPOND_WRITE" /* RESPOND_WRITE */,
38
+ "FREE_RESPONSE" /* FREE_RESPONSE */
39
+ ];
40
+ var RESPOND_AUDIO_PAGE_ACTIVITY_TYPES = [
41
+ "RESPOND" /* RESPOND */,
42
+ "READ_RESPOND" /* READ_RESPOND */
43
+ ];
44
+ export {
45
+ ActivityPageType,
46
+ MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES,
47
+ REPEAT_PAGE_ACTIVITY_TYPES,
48
+ RESPOND_AUDIO_PAGE_ACTIVITY_TYPES,
49
+ RESPOND_PAGE_ACTIVITY_TYPES,
50
+ RESPOND_WRITE_PAGE_ACTIVITY_TYPES
51
+ };
52
+ //# sourceMappingURL=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/domains/cards/card.model.ts"],"sourcesContent":["import { type VerificationCardStatus } from './card.constants'\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport interface PageActivityWithId extends PageActivity {\n id: string\n}\n\nexport interface PageActivity {\n owners: string[]\n checked?: boolean\n completed?: boolean\n media_area_id?: string | null\n media_area_layout?: 'left' | 'right' | null\n score?: number\n verificationStatus?: VerificationCardStatus\n native_text?: string\n repeat?: number\n language?: string | null\n image?: {\n path?: string | null\n url?: string\n }\n audio?: {\n path?: string | null\n url?: string\n } | null\n notes?: string\n difficulty?: string\n default_language?: string\n target_text?: string\n type: ActivityPageType\n grading_criteria?: string\n scoring_type?: string\n grading_method?: 'simple' | 'rubric' | 'manual' | 'standards_based'\n feedback_types?: string[]\n rubricId?: string\n prompt?: string\n title?: string\n passing_score?: number\n maxCharacters?: number\n answer?: string[]\n choices?: {\n value: string\n option: string\n }[]\n MCQType?: string\n multipleAttemptsAllowed?: boolean\n allowRetries?: boolean\n question?: string\n respondTime?: number\n hidePrompt?: boolean\n videoUrl?: string\n link?: string\n text?: string\n isListenAloud?: boolean\n embedCode?: string\n attempt?: number\n correct?: number\n autoGrade?: boolean\n points?: number\n shuffle?: boolean\n translation?: string\n includeAIContext?: boolean\n media_area_context_ref?: string | null\n standardId?: string\n target_proficiency_level?: string\n allowTTS?: boolean\n feedback_language?: string | null\n correct_answer?: string | null\n limit_attempts?: boolean\n max_attempts?: number\n rich_text?: string\n}\n\nexport enum ActivityPageType {\n // DEFAULT = 'READ_REPEAT',\n READ_REPEAT = 'READ_REPEAT',\n VIDEO = 'VIDEO',\n TEXT = 'TEXT',\n READ_RESPOND = 'READ_RESPOND',\n FREE_RESPONSE = 'FREE_RESPONSE',\n REPEAT = 'REPEAT',\n RESPOND = 'RESPOND',\n RESPOND_WRITE = 'RESPOND_WRITE',\n TEXT_TO_SPEECH = 'TEXT_TO_SPEECH',\n MULTIPLE_CHOICE = 'MULTIPLE_CHOICE',\n PODCAST = 'PODCAST',\n MEDIA_PAGE = 'MEDIA_PAGE',\n WRITE = 'WRITE',\n SHORT_ANSWER = 'SHORT_ANSWER',\n SHORT_STORY = 'SHORT_STORY',\n SPEAK = 'SPEAK',\n CONVERSATION = 'CONVERSATION',\n CONVERSATION_WRITE = 'CONVERSATION_WRITE',\n DIALOGUE = 'DIALOGUE',\n INSTRUCTION = 'INSTRUCTION',\n LISTEN = 'LISTEN',\n READ = 'READ',\n ANSWER = 'ANSWER',\n}\n\nexport const RESPOND_PAGE_ACTIVITY_TYPES = [\n ActivityPageType.READ_RESPOND,\n ActivityPageType.RESPOND,\n ActivityPageType.RESPOND_WRITE,\n ActivityPageType.FREE_RESPONSE,\n]\n\nexport const MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES = [ActivityPageType.MULTIPLE_CHOICE]\n\nexport const REPEAT_PAGE_ACTIVITY_TYPES = [ActivityPageType.READ_REPEAT, ActivityPageType.REPEAT]\n\nexport const RESPOND_WRITE_PAGE_ACTIVITY_TYPES = [\n ActivityPageType.RESPOND_WRITE,\n ActivityPageType.FREE_RESPONSE,\n]\n\nexport const RESPOND_AUDIO_PAGE_ACTIVITY_TYPES = [\n ActivityPageType.RESPOND,\n ActivityPageType.READ_RESPOND,\n]\n"],"mappings":";AA0EO,IAAK,mBAAL,kBAAKA,sBAAL;AAEL,EAAAA,kBAAA,iBAAc;AACd,EAAAA,kBAAA,WAAQ;AACR,EAAAA,kBAAA,UAAO;AACP,EAAAA,kBAAA,kBAAe;AACf,EAAAA,kBAAA,mBAAgB;AAChB,EAAAA,kBAAA,YAAS;AACT,EAAAA,kBAAA,aAAU;AACV,EAAAA,kBAAA,mBAAgB;AAChB,EAAAA,kBAAA,oBAAiB;AACjB,EAAAA,kBAAA,qBAAkB;AAClB,EAAAA,kBAAA,aAAU;AACV,EAAAA,kBAAA,gBAAa;AACb,EAAAA,kBAAA,WAAQ;AACR,EAAAA,kBAAA,kBAAe;AACf,EAAAA,kBAAA,iBAAc;AACd,EAAAA,kBAAA,WAAQ;AACR,EAAAA,kBAAA,kBAAe;AACf,EAAAA,kBAAA,wBAAqB;AACrB,EAAAA,kBAAA,cAAW;AACX,EAAAA,kBAAA,iBAAc;AACd,EAAAA,kBAAA,YAAS;AACT,EAAAA,kBAAA,UAAO;AACP,EAAAA,kBAAA,YAAS;AAxBC,SAAAA;AAAA,GAAA;AA2BL,IAAM,8BAA8B;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,sCAAsC,CAAC,uCAAgC;AAE7E,IAAM,6BAA6B,CAAC,iCAA8B,qBAAuB;AAEzF,IAAM,oCAAoC;AAAA,EAC/C;AAAA,EACA;AACF;AAEO,IAAM,oCAAoC;AAAA,EAC/C;AAAA,EACA;AACF;","names":["ActivityPageType"]}
@@ -0,0 +1,21 @@
1
+ declare const SPEAKABLE_NOTIFICATIONS: {
2
+ readonly NEW_ASSIGNMENT: "new_assignment";
3
+ readonly ASSESSMENT_SUBMITTED: "assessment_submitted";
4
+ readonly ASSESSMENT_SCORED: "assessment_scored";
5
+ readonly NEW_COMMENT: "NEW_COMMENT";
6
+ };
7
+ type SpeakableNotificationType = (typeof SPEAKABLE_NOTIFICATIONS)[keyof typeof SPEAKABLE_NOTIFICATIONS];
8
+ declare const SpeakableNotificationTypes: {
9
+ NEW_ASSIGNMENT: string;
10
+ FEEDBACK_FROM_TEACHER: string;
11
+ MESSAGE_FROM_STUDENT: string;
12
+ PHRASE_MARKED_CORRECT: string;
13
+ STUDENT_PROGRESS: string;
14
+ PLAYLIST_FOLLOWERS: string;
15
+ PLAYLIST_PLAYS: string;
16
+ ASSESSMENT_SUBMITTED: string;
17
+ ASSESSMENT_SCORED: string;
18
+ NEW_COMMENT: string;
19
+ };
20
+
21
+ export { SPEAKABLE_NOTIFICATIONS as S, type SpeakableNotificationType as a, SpeakableNotificationTypes as b };
@@ -0,0 +1,209 @@
1
+ import { A as AssignmentWithId, b as CustomTimestamp, c as ActivityPageType, P as PageActivity, d as PageActivityWithId } from './assignment.model-Bcbxx8oI.mjs';
2
+ import { A as AssignmentAnalyticsType } from './assignment.constants-BIKM6fYi.mjs';
3
+ import { V as VerificationCardStatus } from './card.constants-DhKFipX3.mjs';
4
+ import { SetWithId } from './models.mjs';
5
+ import '@react-native-firebase/firestore';
6
+ import 'firebase/firestore';
7
+
8
+ declare const createAssignmentRepo: () => {
9
+ getAssignment: (params: {
10
+ assignmentId: string;
11
+ currentUserId: string;
12
+ analyticType?: AssignmentAnalyticsType;
13
+ studentId?: string;
14
+ }) => Promise<AssignmentWithId | {
15
+ scores: any;
16
+ id: string;
17
+ isAvailable: boolean;
18
+ name: string;
19
+ description: string;
20
+ scheduledTime?: string | null;
21
+ dueTime?: {
22
+ hours: number;
23
+ minutes: number;
24
+ nanos: number;
25
+ };
26
+ speakableio: boolean;
27
+ owners: string[];
28
+ image: {
29
+ path: string | null;
30
+ url: string;
31
+ };
32
+ dueDate: {
33
+ day: number;
34
+ month: number;
35
+ year: number;
36
+ };
37
+ teacherName: string;
38
+ courseWorkId: string | null;
39
+ dueDateTimestamp: CustomTimestamp;
40
+ scheduledTimeTimestamp: number;
41
+ active: boolean;
42
+ voice: string | null;
43
+ setId: string;
44
+ dateMade: {
45
+ seconds: number;
46
+ nanoseconds: number;
47
+ };
48
+ maxPoints: number;
49
+ courseId: string;
50
+ isAssessment: boolean;
51
+ ltiDeeplink?: string;
52
+ content?: string[];
53
+ weights?: Record<string, number>;
54
+ language?: string;
55
+ types?: { [key in ActivityPageType]?: number; };
56
+ aiEnabled?: boolean;
57
+ chat_experience?: boolean;
58
+ } | null>;
59
+ attachScoresAssignment: (args_0: {
60
+ assignments: AssignmentWithId[];
61
+ analyticType: AssignmentAnalyticsType;
62
+ studentId?: string;
63
+ currentUserId: string;
64
+ }) => Promise<{
65
+ scores: any;
66
+ id: string;
67
+ isAvailable: boolean;
68
+ name: string;
69
+ description: string;
70
+ scheduledTime?: string | null;
71
+ dueTime?: {
72
+ hours: number;
73
+ minutes: number;
74
+ nanos: number;
75
+ };
76
+ speakableio: boolean;
77
+ owners: string[];
78
+ image: {
79
+ path: string | null;
80
+ url: string;
81
+ };
82
+ dueDate: {
83
+ day: number;
84
+ month: number;
85
+ year: number;
86
+ };
87
+ teacherName: string;
88
+ courseWorkId: string | null;
89
+ dueDateTimestamp: CustomTimestamp;
90
+ scheduledTimeTimestamp: number;
91
+ active: boolean;
92
+ voice: string | null;
93
+ setId: string;
94
+ dateMade: {
95
+ seconds: number;
96
+ nanoseconds: number;
97
+ };
98
+ maxPoints: number;
99
+ courseId: string;
100
+ isAssessment: boolean;
101
+ ltiDeeplink?: string;
102
+ content?: string[];
103
+ weights?: Record<string, number>;
104
+ language?: string;
105
+ types?: { [key in ActivityPageType]?: number; };
106
+ aiEnabled?: boolean;
107
+ chat_experience?: boolean;
108
+ }[]>;
109
+ getAssignmentScores: (args_0: {
110
+ assignmentId: string;
111
+ currentUserId: string;
112
+ analyticType?: AssignmentAnalyticsType;
113
+ studentId?: string;
114
+ }) => Promise<{
115
+ scores: unknown;
116
+ id: string;
117
+ } | undefined>;
118
+ getAllAssignments: () => Promise<(AssignmentWithId & {
119
+ id: string;
120
+ })[]>;
121
+ };
122
+
123
+ declare const createCardRepo: () => {
124
+ createCard: (args_0: {
125
+ data: Partial<PageActivity>;
126
+ }) => Promise<{
127
+ id: string;
128
+ } & Partial<PageActivity>>;
129
+ createCards: (args_0: {
130
+ cards: PageActivity[];
131
+ }) => Promise<{
132
+ id: string;
133
+ owners: string[];
134
+ checked?: boolean;
135
+ completed?: boolean;
136
+ media_area_id?: string | null;
137
+ media_area_layout?: "left" | "right" | null;
138
+ score?: number;
139
+ verificationStatus?: VerificationCardStatus;
140
+ native_text?: string;
141
+ repeat?: number;
142
+ language?: string | null;
143
+ image?: {
144
+ path?: string | null;
145
+ url?: string;
146
+ };
147
+ audio?: {
148
+ path?: string | null;
149
+ url?: string;
150
+ } | null;
151
+ notes?: string;
152
+ difficulty?: string;
153
+ default_language?: string;
154
+ target_text?: string;
155
+ type: ActivityPageType;
156
+ grading_criteria?: string;
157
+ scoring_type?: string;
158
+ grading_method?: "simple" | "rubric" | "manual" | "standards_based";
159
+ feedback_types?: string[];
160
+ rubricId?: string;
161
+ prompt?: string;
162
+ title?: string;
163
+ passing_score?: number;
164
+ maxCharacters?: number;
165
+ answer?: string[];
166
+ choices?: {
167
+ value: string;
168
+ option: string;
169
+ }[];
170
+ MCQType?: string;
171
+ multipleAttemptsAllowed?: boolean;
172
+ allowRetries?: boolean;
173
+ question?: string;
174
+ respondTime?: number;
175
+ hidePrompt?: boolean;
176
+ videoUrl?: string;
177
+ link?: string;
178
+ text?: string;
179
+ isListenAloud?: boolean;
180
+ embedCode?: string;
181
+ attempt?: number;
182
+ correct?: number;
183
+ autoGrade?: boolean;
184
+ points?: number;
185
+ shuffle?: boolean;
186
+ translation?: string;
187
+ includeAIContext?: boolean;
188
+ media_area_context_ref?: string | null;
189
+ standardId?: string;
190
+ target_proficiency_level?: string;
191
+ allowTTS?: boolean;
192
+ feedback_language?: string | null;
193
+ correct_answer?: string | null;
194
+ limit_attempts?: boolean;
195
+ max_attempts?: number;
196
+ rich_text?: string;
197
+ }[]>;
198
+ getCard: (params: {
199
+ cardId: string;
200
+ }) => Promise<PageActivityWithId | null>;
201
+ };
202
+
203
+ declare const createSetRepo: () => {
204
+ getSet: (args_0: {
205
+ setId: string;
206
+ }) => Promise<SetWithId | null>;
207
+ };
208
+
209
+ export { createAssignmentRepo, createCardRepo, createSetRepo };