@gyldendalas/gyldendal-divine-api 1.2.0 → 2.0.0
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/index.cjs +0 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -879
- package/dist/index.d.mts +1 -879
- package/dist/index.mjs +1 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AIChatCompletion, AIChatCompletionRequest, Bookmark, BookmarkUpdate, ClientSettings, ClientSettingsResponse, Continue, CookieConsentRequest, Folder, FolderContent, HighlightAddResult, HighlightCountResponse, HighlightDeleteResult, HighlightRequest, HighlightResponse, HighlightResultType, HighlightSearchRequest, HighlightSearchResponse, HighlightUpdateRequest, HighlightUpdateResponse, MRU, NotesRequest, PdfExportResult, PrintRequest, Quiz, QuizFormResponse, QuizFormType, QuizResult, QuizSession, QuizStartResponse, SaveAnswerResponse, SharedQuizData, SharedStudentQuiz, SharedTeacherQuiz, SiteMapRequest, SynthesisRequest, SynthesisResponse, Tag, TagOutput, WritingTaskAnswer, WritingTaskRequest, WritingTaskResponseBucket } from "@gyldendalsolutions/divine-contracts";
|
|
1
2
|
//#region src/jwt.d.ts
|
|
2
3
|
/**
|
|
3
4
|
* Extracts the expiry time from a JWT token's `exp` claim.
|
|
@@ -252,16 +253,6 @@ declare class BaseService {
|
|
|
252
253
|
}
|
|
253
254
|
//#endregion
|
|
254
255
|
//#region src/services/tagging_service.d.ts
|
|
255
|
-
export interface Tag {
|
|
256
|
-
identity: string;
|
|
257
|
-
resource_type: string;
|
|
258
|
-
resource_name: string;
|
|
259
|
-
tag_name: string;
|
|
260
|
-
tag_value: string;
|
|
261
|
-
}
|
|
262
|
-
export interface TagOutput extends Tag {
|
|
263
|
-
created_at: number;
|
|
264
|
-
}
|
|
265
256
|
export declare class TaggingService extends BaseService {
|
|
266
257
|
readonly serviceName: "tagging";
|
|
267
258
|
getTagsByResource({ identity, resource_type, resource_name, tag_name, timeout }: {
|
|
@@ -296,31 +287,6 @@ export declare class TaggingService extends BaseService {
|
|
|
296
287
|
}
|
|
297
288
|
//#endregion
|
|
298
289
|
//#region src/services/polly_service.d.ts
|
|
299
|
-
export declare enum SSMLSpeechSpeeds {
|
|
300
|
-
X_SLOW = 1,
|
|
301
|
-
SLOW = 2,
|
|
302
|
-
MEDIUM = 3,
|
|
303
|
-
FAST = 4,
|
|
304
|
-
X_FAST = 5
|
|
305
|
-
}
|
|
306
|
-
export type SpeechmarkEvent = {
|
|
307
|
-
time: number;
|
|
308
|
-
type?: string;
|
|
309
|
-
value: string;
|
|
310
|
-
start?: number;
|
|
311
|
-
end?: number;
|
|
312
|
-
};
|
|
313
|
-
export interface SynthesisResponse {
|
|
314
|
-
mp3url: string;
|
|
315
|
-
s3: string[];
|
|
316
|
-
SpeechMarks?: SpeechmarkEvent[];
|
|
317
|
-
}
|
|
318
|
-
export interface SynthesisRequest {
|
|
319
|
-
text: string;
|
|
320
|
-
includeSpeechMarks?: boolean;
|
|
321
|
-
voice: number;
|
|
322
|
-
speed?: SSMLSpeechSpeeds;
|
|
323
|
-
}
|
|
324
290
|
export declare class PollyService extends BaseService {
|
|
325
291
|
readonly serviceName: "polly";
|
|
326
292
|
synthesize({ body, timeout }: {
|
|
@@ -330,21 +296,6 @@ export declare class PollyService extends BaseService {
|
|
|
330
296
|
}
|
|
331
297
|
//#endregion
|
|
332
298
|
//#region src/services/cookie_consent_log.d.ts
|
|
333
|
-
export interface CookieConsentRequest {
|
|
334
|
-
consentState: CookieConsentState;
|
|
335
|
-
consentUrl: string;
|
|
336
|
-
timeStamp: number;
|
|
337
|
-
uuid: string;
|
|
338
|
-
}
|
|
339
|
-
export interface CookieConsentState {
|
|
340
|
-
func: number;
|
|
341
|
-
stat: number;
|
|
342
|
-
uuid: string;
|
|
343
|
-
version: number;
|
|
344
|
-
}
|
|
345
|
-
export interface CookieConsentResponse {
|
|
346
|
-
response: string;
|
|
347
|
-
}
|
|
348
299
|
export declare class CookieConsentLog extends BaseService {
|
|
349
300
|
readonly serviceName: "cookieConsentLog";
|
|
350
301
|
logCookieConsent({ body, timeout }: {
|
|
@@ -354,131 +305,6 @@ export declare class CookieConsentLog extends BaseService {
|
|
|
354
305
|
}
|
|
355
306
|
//#endregion
|
|
356
307
|
//#region src/services/highlight_service.d.ts
|
|
357
|
-
export declare enum HighlightResultType {
|
|
358
|
-
'highlight' = "highlight",
|
|
359
|
-
'note' = "note"
|
|
360
|
-
}
|
|
361
|
-
export interface HighlightRanges {
|
|
362
|
-
/** XPath of the start node, e.g. "/div[2]/div[1]/p[3]". */
|
|
363
|
-
start: string | null;
|
|
364
|
-
/** XPath of the end node. */
|
|
365
|
-
end: string | null;
|
|
366
|
-
startOffset: number;
|
|
367
|
-
endOffset: number;
|
|
368
|
-
}
|
|
369
|
-
export interface Highlight extends HighlightUpdate {
|
|
370
|
-
id: string;
|
|
371
|
-
recreationdata?: IRecreationData;
|
|
372
|
-
ranges?: HighlightRanges[];
|
|
373
|
-
lang?: string;
|
|
374
|
-
markedupText?: string;
|
|
375
|
-
createdtstamp?: number;
|
|
376
|
-
}
|
|
377
|
-
export interface HighlightRequest {
|
|
378
|
-
breadCrumb: string;
|
|
379
|
-
pageTitle: string;
|
|
380
|
-
externalUserId?: string;
|
|
381
|
-
highlight: Highlight;
|
|
382
|
-
}
|
|
383
|
-
export interface HighlightSearchRequest {
|
|
384
|
-
searchQuery: string;
|
|
385
|
-
resultType?: HighlightResultType;
|
|
386
|
-
isbn?: string;
|
|
387
|
-
maxResults?: number;
|
|
388
|
-
vectorMinConfidence?: number;
|
|
389
|
-
vectorHighConfidence?: number;
|
|
390
|
-
fulltextMinScore?: number;
|
|
391
|
-
}
|
|
392
|
-
export interface HiglightSearchMatch {
|
|
393
|
-
rangeKey: number;
|
|
394
|
-
confidence: number;
|
|
395
|
-
texttype: HighlightResultType;
|
|
396
|
-
isbn: string;
|
|
397
|
-
pid: number;
|
|
398
|
-
returnedItem: number;
|
|
399
|
-
}
|
|
400
|
-
export interface HighlightSearchResponse {
|
|
401
|
-
Items: HighlightResponse[];
|
|
402
|
-
Matches: HiglightSearchMatch[];
|
|
403
|
-
}
|
|
404
|
-
export interface HighlightResponse extends HighlightRequest {
|
|
405
|
-
debugHostname: string;
|
|
406
|
-
uidIsbnPidMyAccountIdPartitionKey: string;
|
|
407
|
-
timestampSortKey: number;
|
|
408
|
-
timeToDie: number;
|
|
409
|
-
pid: number;
|
|
410
|
-
uid: string;
|
|
411
|
-
myAccountid: string;
|
|
412
|
-
commentText: string;
|
|
413
|
-
quote: string;
|
|
414
|
-
hlcolor: string;
|
|
415
|
-
isbn: string;
|
|
416
|
-
}
|
|
417
|
-
export interface HighlightUpdate {
|
|
418
|
-
hlcolor: string;
|
|
419
|
-
quote: string;
|
|
420
|
-
text: string;
|
|
421
|
-
}
|
|
422
|
-
export interface HighlightUpdateRequest {
|
|
423
|
-
highlight: HighlightUpdate;
|
|
424
|
-
}
|
|
425
|
-
export interface HighlightCountResponse {
|
|
426
|
-
type: HighlightResultType;
|
|
427
|
-
isbn: string;
|
|
428
|
-
count: number;
|
|
429
|
-
}
|
|
430
|
-
export interface HighlightDeleteResult extends HighlightUpdateResponse {
|
|
431
|
-
changed: number;
|
|
432
|
-
}
|
|
433
|
-
export interface HighlightAddResult extends HighlightUpdateResponse {
|
|
434
|
-
timestampSortKey: number;
|
|
435
|
-
}
|
|
436
|
-
export interface HighlightUpdateResponse {
|
|
437
|
-
status: string;
|
|
438
|
-
}
|
|
439
|
-
interface IBKNGData {
|
|
440
|
-
prev20TextContent?: string | null;
|
|
441
|
-
next20TextContent?: string;
|
|
442
|
-
cid?: number;
|
|
443
|
-
isPageNote?: boolean;
|
|
444
|
-
domPath?: string;
|
|
445
|
-
newElementPath?: string;
|
|
446
|
-
elementPath?: string;
|
|
447
|
-
prevNextTextContent?: {
|
|
448
|
-
before: string | null;
|
|
449
|
-
after: string;
|
|
450
|
-
srcText: string | null;
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
export interface ICtype {
|
|
454
|
-
SiblingsCount: string;
|
|
455
|
-
classes: string;
|
|
456
|
-
}
|
|
457
|
-
export interface ICtypeDict {
|
|
458
|
-
[cid: string]: ICtype;
|
|
459
|
-
}
|
|
460
|
-
export interface ITextStartEndObject {
|
|
461
|
-
startSelectedText: string | undefined | null;
|
|
462
|
-
endSelectedText: string | undefined;
|
|
463
|
-
}
|
|
464
|
-
export interface IRecreationData {
|
|
465
|
-
startCID: number;
|
|
466
|
-
numberOfSiblingsOnStartNode?: number | undefined;
|
|
467
|
-
numberofPrevSiblingsOnCIDStartNode?: number | undefined;
|
|
468
|
-
startCtypes?: ICtypeDict | null | undefined;
|
|
469
|
-
endCID: number;
|
|
470
|
-
numberOfSiblingsOnEndNode?: number | undefined;
|
|
471
|
-
numberofPrevSiblingsOnCIDEndNode?: number | undefined;
|
|
472
|
-
endCTypes?: ICtypeDict | null | undefined;
|
|
473
|
-
startSelectionInnerText?: string | null | undefined;
|
|
474
|
-
endSelectionInnerText?: string | null | undefined;
|
|
475
|
-
mathObject?: string | null | undefined;
|
|
476
|
-
selectedTextStartAndEndObject?: ITextStartEndObject | undefined;
|
|
477
|
-
totalSiblingsToCIDs?: number | undefined;
|
|
478
|
-
ibkngData?: IBKNGData | null | undefined;
|
|
479
|
-
specialSelectedText?: string | undefined;
|
|
480
|
-
source?: any | null | undefined;
|
|
481
|
-
}
|
|
482
308
|
export declare class HighlightService extends BaseService {
|
|
483
309
|
readonly serviceName: "highlight";
|
|
484
310
|
search({ search, timeout }: {
|
|
@@ -521,74 +347,6 @@ declare class UserSettingsBase extends BaseService {
|
|
|
521
347
|
}
|
|
522
348
|
//#endregion
|
|
523
349
|
//#region src/services/user_settings_clientsettings.d.ts
|
|
524
|
-
export interface ClientSettingsResponse {
|
|
525
|
-
settings: ClientSettings;
|
|
526
|
-
}
|
|
527
|
-
export interface ClientSettings {
|
|
528
|
-
readabilities?: Readability;
|
|
529
|
-
darkMode?: boolean;
|
|
530
|
-
displayMode?: DisplayModeOption;
|
|
531
|
-
enableKeyboardShortcuts?: boolean;
|
|
532
|
-
showBookmarks?: boolean;
|
|
533
|
-
showNoteHighlights?: boolean;
|
|
534
|
-
featureGalleryVersion?: number;
|
|
535
|
-
highlightsSorting?: HighlightsSorting;
|
|
536
|
-
readAloudStore?: ReadAloudStore;
|
|
537
|
-
leftDrawerWidth?: number;
|
|
538
|
-
recentSearches?: string[];
|
|
539
|
-
materialListImagesView?: LayoutView;
|
|
540
|
-
frontPageSections?: FrontPageSection[];
|
|
541
|
-
activePublicationFilters?: ActivePublicationFilters;
|
|
542
|
-
cardsView?: LayoutView;
|
|
543
|
-
cardsSorting?: SortOptions;
|
|
544
|
-
foldersView?: LayoutView;
|
|
545
|
-
foldersSorting?: SortOptions;
|
|
546
|
-
onboardingPromptTime?: string;
|
|
547
|
-
showOnboardingPrompt?: boolean;
|
|
548
|
-
favoritesSorting?: SortOptions;
|
|
549
|
-
}
|
|
550
|
-
export type DisplayModeOption = 'light' | 'dark' | 'system';
|
|
551
|
-
export type LayoutView = 'list' | 'grid';
|
|
552
|
-
export interface ActivePublicationFilters {
|
|
553
|
-
educations?: string[];
|
|
554
|
-
displaySubjects?: string[];
|
|
555
|
-
categoriesNames?: string[];
|
|
556
|
-
categoriesLevels?: string[];
|
|
557
|
-
publishers?: string[];
|
|
558
|
-
}
|
|
559
|
-
export interface Readability {
|
|
560
|
-
letterSpacing?: number;
|
|
561
|
-
lineHeight?: number;
|
|
562
|
-
textSize?: number;
|
|
563
|
-
fontFamily?: FontFamily;
|
|
564
|
-
}
|
|
565
|
-
export interface FontFamily {
|
|
566
|
-
name?: string;
|
|
567
|
-
defaultSize?: string;
|
|
568
|
-
url?: string;
|
|
569
|
-
}
|
|
570
|
-
export interface ReadAloudStore {
|
|
571
|
-
currentVoiceSelection?: CurrentVoiceSelection;
|
|
572
|
-
currentSpeedSelection?: CurrentSpeedSelection;
|
|
573
|
-
}
|
|
574
|
-
export interface CurrentSpeedSelection {
|
|
575
|
-
speed?: number;
|
|
576
|
-
text?: string;
|
|
577
|
-
}
|
|
578
|
-
export interface CurrentVoiceSelection {
|
|
579
|
-
voice?: number;
|
|
580
|
-
gender?: number;
|
|
581
|
-
language?: number;
|
|
582
|
-
}
|
|
583
|
-
export interface FrontPageSection {
|
|
584
|
-
changeable?: boolean;
|
|
585
|
-
code?: string;
|
|
586
|
-
enabled?: boolean;
|
|
587
|
-
name?: string;
|
|
588
|
-
position?: number;
|
|
589
|
-
}
|
|
590
|
-
export type SortOptions = 'recent' | 'alphabetical';
|
|
591
|
-
export type HighlightsSorting = 'newest' | 'chapters';
|
|
592
350
|
export declare class UserSettingsClientSettings extends UserSettingsBase {
|
|
593
351
|
getSettings({ isbn, timeout }: {
|
|
594
352
|
isbn: string;
|
|
@@ -606,14 +364,6 @@ export declare class UserSettingsClientSettings extends UserSettingsBase {
|
|
|
606
364
|
}
|
|
607
365
|
//#endregion
|
|
608
366
|
//#region src/services/user_settings_bookmarks.d.ts
|
|
609
|
-
export interface Bookmark extends BookmarkUpdate {
|
|
610
|
-
createdTimeStamp: number;
|
|
611
|
-
isbn?: string;
|
|
612
|
-
}
|
|
613
|
-
export interface BookmarkUpdate {
|
|
614
|
-
pageId: number;
|
|
615
|
-
contentId: number;
|
|
616
|
-
}
|
|
617
367
|
export declare class UserSettingsBookmarks extends UserSettingsBase {
|
|
618
368
|
setBookmark({ isbn, bookmark, externalUserId, timeout }: {
|
|
619
369
|
isbn: string;
|
|
@@ -638,12 +388,6 @@ export declare class UserSettingsBookmarks extends UserSettingsBase {
|
|
|
638
388
|
}
|
|
639
389
|
//#endregion
|
|
640
390
|
//#region src/services/user_settings_continue.d.ts
|
|
641
|
-
export interface Continue extends ContinueUpdate {
|
|
642
|
-
createdTimeStamp?: number;
|
|
643
|
-
}
|
|
644
|
-
export interface ContinueUpdate {
|
|
645
|
-
pageId: number;
|
|
646
|
-
}
|
|
647
391
|
export declare class UserSettingsContinue extends UserSettingsBase {
|
|
648
392
|
setContinue({ isbn, pageId, externalUserId, timeout }: {
|
|
649
393
|
isbn: string;
|
|
@@ -662,11 +406,6 @@ export declare class UserSettingsContinue extends UserSettingsBase {
|
|
|
662
406
|
}
|
|
663
407
|
//#endregion
|
|
664
408
|
//#region src/services/user_settings_mru.d.ts
|
|
665
|
-
export interface MRU {
|
|
666
|
-
isbn: string;
|
|
667
|
-
link: string;
|
|
668
|
-
title: string;
|
|
669
|
-
}
|
|
670
409
|
export declare class UserSettingsMRU extends UserSettingsBase {
|
|
671
410
|
setMRU({ mru, externalUserId, timeout }: {
|
|
672
411
|
mru: MRU;
|
|
@@ -682,196 +421,12 @@ export declare class UserSettingsMRU extends UserSettingsBase {
|
|
|
682
421
|
}
|
|
683
422
|
//#endregion
|
|
684
423
|
//#region src/services/pdf_generator.d.ts
|
|
685
|
-
export interface NoteHighlight {
|
|
686
|
-
color: string;
|
|
687
|
-
comment: string;
|
|
688
|
-
selectedText: string;
|
|
689
|
-
}
|
|
690
|
-
export interface Notes {
|
|
691
|
-
created: string;
|
|
692
|
-
highlight: NoteHighlight;
|
|
693
|
-
link: string;
|
|
694
|
-
pid: string;
|
|
695
|
-
title: string;
|
|
696
|
-
/** Not read by the export; kept for callers that carry one. */
|
|
697
|
-
id?: string;
|
|
698
|
-
}
|
|
699
|
-
export interface NotesLabels {
|
|
700
|
-
amountOfNotesProse: string;
|
|
701
|
-
documentTitle: string;
|
|
702
|
-
markedText: string;
|
|
703
|
-
noContentLabel: string;
|
|
704
|
-
noSelectedTextLabel: string;
|
|
705
|
-
notesExportedAt: string;
|
|
706
|
-
yourNote: string;
|
|
707
|
-
}
|
|
708
|
-
export interface NotesData {
|
|
709
|
-
labels: NotesLabels;
|
|
710
|
-
notes: Notes[];
|
|
711
|
-
}
|
|
712
|
-
export interface NotesRequest {
|
|
713
|
-
exportedDate: string;
|
|
714
|
-
notesData: NotesData;
|
|
715
|
-
userId: string;
|
|
716
|
-
userName: string;
|
|
717
|
-
}
|
|
718
|
-
/** What every export answers with: a status and a link to the document. */
|
|
719
|
-
export interface PdfExportResult {
|
|
720
|
-
status: string;
|
|
721
|
-
url: string;
|
|
722
|
-
}
|
|
723
424
|
/**
|
|
724
425
|
* @deprecated Use {@link PdfExportResult}. This name shadows the DOM `Response`
|
|
725
426
|
* inside this module and for anyone importing it, which reads as though the
|
|
726
427
|
* exports resolve to a fetch response rather than the parsed body.
|
|
727
428
|
*/
|
|
728
429
|
type Response$1 = PdfExportResult;
|
|
729
|
-
export interface WritingTaskRequest {
|
|
730
|
-
pdftitle: string;
|
|
731
|
-
userId: string;
|
|
732
|
-
userName: string;
|
|
733
|
-
writingTaskData: WritingTaskData;
|
|
734
|
-
}
|
|
735
|
-
export interface WritingTaskData {
|
|
736
|
-
createdDate: string;
|
|
737
|
-
exportedDateTimeString: string;
|
|
738
|
-
header: string;
|
|
739
|
-
headerStripped: string;
|
|
740
|
-
host: string;
|
|
741
|
-
isbn: string;
|
|
742
|
-
publisher: string;
|
|
743
|
-
siteTitle: string;
|
|
744
|
-
userIdentity: string;
|
|
745
|
-
writingTaskItems: WritingTaskItem[];
|
|
746
|
-
}
|
|
747
|
-
/**
|
|
748
|
-
* One task on the export. Callers pass the TYPO3 rows they hold, so only the
|
|
749
|
-
* fields the export actually reads are described here and none are required:
|
|
750
|
-
* the template renders the parsed pair, the title and whether the task was
|
|
751
|
-
* answered, and the controller builds the images from the gallery.
|
|
752
|
-
*
|
|
753
|
-
* `gallery` and `images` are left open because their shapes come from the
|
|
754
|
-
* caller's own content model, and the export walks them defensively.
|
|
755
|
-
*/
|
|
756
|
-
export interface WritingTaskItem {
|
|
757
|
-
/** Rendered by the export; derive it from `answer` before sending. */
|
|
758
|
-
parsedAnswer?: string;
|
|
759
|
-
/** Rendered by the export; derive it from `question` before sending. */
|
|
760
|
-
parsedQuestion?: string;
|
|
761
|
-
title?: string;
|
|
762
|
-
userAnswered?: boolean;
|
|
763
|
-
/** Read for `position`, and for `rows[].columns[]` when building images. */
|
|
764
|
-
gallery?: unknown;
|
|
765
|
-
/** Filled in by the export from the gallery; senders may omit it. */
|
|
766
|
-
images?: unknown;
|
|
767
|
-
/** Only compared against zero, so a count or a list both work. */
|
|
768
|
-
files?: number | string[] | null;
|
|
769
|
-
answer?: string;
|
|
770
|
-
question?: string;
|
|
771
|
-
crdate?: number;
|
|
772
|
-
cruserId?: number;
|
|
773
|
-
cruser_id?: number;
|
|
774
|
-
deleted?: boolean | number;
|
|
775
|
-
hidden?: boolean | number;
|
|
776
|
-
imageorient?: number;
|
|
777
|
-
parentid?: number;
|
|
778
|
-
parenttable?: string;
|
|
779
|
-
pid?: number;
|
|
780
|
-
sorting?: number;
|
|
781
|
-
tstamp?: number;
|
|
782
|
-
uid?: number;
|
|
783
|
-
}
|
|
784
|
-
export interface SiteMapLabels {
|
|
785
|
-
pbook: string;
|
|
786
|
-
toc: string;
|
|
787
|
-
}
|
|
788
|
-
export interface SiteMapPageTreeItem {
|
|
789
|
-
chapterInfo?: SiteMapPageTreeItem;
|
|
790
|
-
characters: number;
|
|
791
|
-
iPages: number;
|
|
792
|
-
images: number;
|
|
793
|
-
interactiveElements: number;
|
|
794
|
-
lang: number;
|
|
795
|
-
math: number;
|
|
796
|
-
ogStandardPage: number;
|
|
797
|
-
originalMaterial: number;
|
|
798
|
-
quizzes: number;
|
|
799
|
-
soundFiles: number;
|
|
800
|
-
standardPage: number;
|
|
801
|
-
sys_language_uid: number;
|
|
802
|
-
uid: number;
|
|
803
|
-
videos: number;
|
|
804
|
-
words: number;
|
|
805
|
-
}
|
|
806
|
-
/**
|
|
807
|
-
* A page in the sitemap export. The template renders `link`, `title`, `uid`
|
|
808
|
-
* and `children`; everything else is whatever the caller's navigation happens
|
|
809
|
-
* to carry, so it is optional here.
|
|
810
|
-
*/
|
|
811
|
-
export interface SiteMapPage {
|
|
812
|
-
children: SiteMapPage[];
|
|
813
|
-
link: string;
|
|
814
|
-
title: string;
|
|
815
|
-
uid: number;
|
|
816
|
-
accessGranted?: boolean;
|
|
817
|
-
author?: null | string;
|
|
818
|
-
description?: null | string;
|
|
819
|
-
doktype?: number;
|
|
820
|
-
editor?: null | string;
|
|
821
|
-
fe_group?: string;
|
|
822
|
-
keywords?: null | string;
|
|
823
|
-
nav_hide?: number;
|
|
824
|
-
nav_title?: string;
|
|
825
|
-
pid?: number;
|
|
826
|
-
}
|
|
827
|
-
export type SiteMapPageTreeData = Record<string, SiteMapPageTreeItem>;
|
|
828
|
-
export interface SiteMapContent {
|
|
829
|
-
labels: SiteMapLabels;
|
|
830
|
-
pageTreeData: SiteMapPageTreeData;
|
|
831
|
-
pages: SiteMapPage[];
|
|
832
|
-
}
|
|
833
|
-
export interface SiteMapRequest {
|
|
834
|
-
baseUrl: string;
|
|
835
|
-
content: SiteMapContent;
|
|
836
|
-
exportedDate: string;
|
|
837
|
-
isbn: string;
|
|
838
|
-
siteTitle: string;
|
|
839
|
-
userId: string;
|
|
840
|
-
userName: string;
|
|
841
|
-
}
|
|
842
|
-
export interface PrintGlossary {
|
|
843
|
-
term: string;
|
|
844
|
-
description: string;
|
|
845
|
-
}
|
|
846
|
-
/**
|
|
847
|
-
* A content element as the reader hands it over. The export walks
|
|
848
|
-
* `content.content` for the body text, header, images and position, and the
|
|
849
|
-
* shapes differ per element type, so this stays open.
|
|
850
|
-
*/
|
|
851
|
-
export interface PrintContentElement {
|
|
852
|
-
[field: string]: unknown;
|
|
853
|
-
}
|
|
854
|
-
/**
|
|
855
|
-
* Body for the print export. `contentElements` is what gets rendered; the rest
|
|
856
|
-
* is page furniture. `lang` falls back to Danish server side when absent or
|
|
857
|
-
* not a plain language code.
|
|
858
|
-
*/
|
|
859
|
-
export interface PrintRequest {
|
|
860
|
-
contentElements: PrintContentElement[];
|
|
861
|
-
isbn: string;
|
|
862
|
-
userId: string;
|
|
863
|
-
userName: string;
|
|
864
|
-
baseUrl?: string;
|
|
865
|
-
copyright?: string;
|
|
866
|
-
disclaimer?: string;
|
|
867
|
-
filename?: string;
|
|
868
|
-
glossaries?: PrintGlossary[];
|
|
869
|
-
lang?: string;
|
|
870
|
-
pageTitle?: string;
|
|
871
|
-
pnLabel?: string;
|
|
872
|
-
publisher?: string;
|
|
873
|
-
siteTitle?: string;
|
|
874
|
-
}
|
|
875
430
|
export declare class PdfGeneratorService extends BaseService {
|
|
876
431
|
readonly serviceName: "pdfGenerator";
|
|
877
432
|
pdfFromSiteMap({ body, timeout }: {
|
|
@@ -893,20 +448,6 @@ export declare class PdfGeneratorService extends BaseService {
|
|
|
893
448
|
}
|
|
894
449
|
//#endregion
|
|
895
450
|
//#region src/services/highlevel/tagging/user_folders.d.ts
|
|
896
|
-
export interface FolderObject {
|
|
897
|
-
created_at: number;
|
|
898
|
-
}
|
|
899
|
-
export interface Folder extends FolderObject {
|
|
900
|
-
name: string;
|
|
901
|
-
color: string;
|
|
902
|
-
uuid: string;
|
|
903
|
-
parent?: string;
|
|
904
|
-
}
|
|
905
|
-
export interface FolderContent extends FolderObject {
|
|
906
|
-
type: string;
|
|
907
|
-
identifier: string;
|
|
908
|
-
folder_uuid: string;
|
|
909
|
-
}
|
|
910
451
|
/**
|
|
911
452
|
* UserFolders is a service that allows users to create folders in their account. It's built on top of the Tagging service.
|
|
912
453
|
* Folders are created with a name and an optional parent folder. If no parent folder is provided, the folder is created at the root level.
|
|
@@ -1066,35 +607,6 @@ export declare class UserFolders extends TaggingService {
|
|
|
1066
607
|
}
|
|
1067
608
|
//#endregion
|
|
1068
609
|
//#region src/services/ai_bot_service.d.ts
|
|
1069
|
-
export type AIChatRole = 'user' | 'assistant' | 'system';
|
|
1070
|
-
type GenericContext = Record<string, unknown>;
|
|
1071
|
-
export interface AIChatMessage<ContextType extends GenericContext = GenericContext> {
|
|
1072
|
-
role: AIChatRole;
|
|
1073
|
-
content: string;
|
|
1074
|
-
context?: ContextType;
|
|
1075
|
-
}
|
|
1076
|
-
export interface AIChatMessageDelta<ContextType extends GenericContext = GenericContext> {
|
|
1077
|
-
role?: AIChatRole;
|
|
1078
|
-
content?: string;
|
|
1079
|
-
context?: ContextType;
|
|
1080
|
-
}
|
|
1081
|
-
export interface AIChatCompletion<ContextType extends GenericContext = GenericContext> {
|
|
1082
|
-
message: AIChatMessage;
|
|
1083
|
-
sessionState?: unknown;
|
|
1084
|
-
context?: ContextType;
|
|
1085
|
-
}
|
|
1086
|
-
export interface AIChatCompletionDelta<ContextType extends GenericContext = GenericContext> {
|
|
1087
|
-
delta: AIChatMessageDelta;
|
|
1088
|
-
sessionState?: unknown;
|
|
1089
|
-
context?: ContextType;
|
|
1090
|
-
}
|
|
1091
|
-
export interface AIChatCompletionOptions<ContextType extends GenericContext = GenericContext> {
|
|
1092
|
-
context?: ContextType;
|
|
1093
|
-
sessionState?: unknown;
|
|
1094
|
-
}
|
|
1095
|
-
export type AIChatCompletionRequest = {
|
|
1096
|
-
messages: AIChatMessage[];
|
|
1097
|
-
} & AIChatCompletionOptions;
|
|
1098
610
|
export declare class AIBotService extends BaseService {
|
|
1099
611
|
readonly serviceName: "aiBot";
|
|
1100
612
|
constructChatUrl({ interactivityId, isbn, stream }: {
|
|
@@ -1117,356 +629,6 @@ export declare class AIBotService extends BaseService {
|
|
|
1117
629
|
}
|
|
1118
630
|
//#endregion
|
|
1119
631
|
//#region src/services/quiz_service.d.ts
|
|
1120
|
-
export interface QuizStartResponse {
|
|
1121
|
-
quizUnitId: number;
|
|
1122
|
-
}
|
|
1123
|
-
export interface Quiz {
|
|
1124
|
-
quizId: number;
|
|
1125
|
-
quizName: string;
|
|
1126
|
-
quizDescription: string;
|
|
1127
|
-
quizFinished: boolean;
|
|
1128
|
-
questions?: Question[];
|
|
1129
|
-
quizDeadline?: number;
|
|
1130
|
-
quizResultAvailable?: number;
|
|
1131
|
-
quizStartTime?: number;
|
|
1132
|
-
}
|
|
1133
|
-
export interface Question {
|
|
1134
|
-
questionId: number;
|
|
1135
|
-
name: string;
|
|
1136
|
-
introText: string;
|
|
1137
|
-
displayName: string;
|
|
1138
|
-
caseSensitive?: boolean;
|
|
1139
|
-
shuffle: boolean;
|
|
1140
|
-
answerChecked: boolean;
|
|
1141
|
-
questionType: string;
|
|
1142
|
-
questionTypeId: number;
|
|
1143
|
-
mediafile: Mediafile;
|
|
1144
|
-
medias: Mediafile[];
|
|
1145
|
-
answers: Answer[];
|
|
1146
|
-
chosenAnswer: ChosenAnswer[] | null;
|
|
1147
|
-
description: string;
|
|
1148
|
-
freeText: string;
|
|
1149
|
-
scores?: Score;
|
|
1150
|
-
answerBins: AnswerBins[];
|
|
1151
|
-
tokenized: Tokens[];
|
|
1152
|
-
'chosenAnswer correctness': string;
|
|
1153
|
-
isEnabled: boolean;
|
|
1154
|
-
}
|
|
1155
|
-
export interface FormattedQuestion extends Question {
|
|
1156
|
-
number: number;
|
|
1157
|
-
answerTime?: string | null;
|
|
1158
|
-
percentage: string;
|
|
1159
|
-
}
|
|
1160
|
-
export interface Mediafile {
|
|
1161
|
-
id: number;
|
|
1162
|
-
placement: string;
|
|
1163
|
-
caption: string;
|
|
1164
|
-
altText: string;
|
|
1165
|
-
identifier: string;
|
|
1166
|
-
extension: string;
|
|
1167
|
-
mimeType: string;
|
|
1168
|
-
credit: string;
|
|
1169
|
-
width?: number;
|
|
1170
|
-
}
|
|
1171
|
-
export interface ChosenAnswer {
|
|
1172
|
-
id: number | number[];
|
|
1173
|
-
answerText: string;
|
|
1174
|
-
created?: number;
|
|
1175
|
-
position: number | number[];
|
|
1176
|
-
mediafile: Mediafile;
|
|
1177
|
-
bins?: number[];
|
|
1178
|
-
bin?: number;
|
|
1179
|
-
answers?: Answer[];
|
|
1180
|
-
answerBins?: AnswerBins[];
|
|
1181
|
-
questionId: number;
|
|
1182
|
-
isCorrect: boolean;
|
|
1183
|
-
wordoption?: AnswerIcon;
|
|
1184
|
-
}
|
|
1185
|
-
export interface AnswerBins {
|
|
1186
|
-
txt: string;
|
|
1187
|
-
binindex: number;
|
|
1188
|
-
mediafile: Mediafile;
|
|
1189
|
-
}
|
|
1190
|
-
export interface Answer {
|
|
1191
|
-
id: number | number[];
|
|
1192
|
-
answerText: string;
|
|
1193
|
-
isCorrect: boolean;
|
|
1194
|
-
position: number | number[];
|
|
1195
|
-
mediafile?: Mediafile;
|
|
1196
|
-
bins?: number[];
|
|
1197
|
-
inputText?: {
|
|
1198
|
-
[key: string]: InputText;
|
|
1199
|
-
};
|
|
1200
|
-
dropdown?: DropdownMap;
|
|
1201
|
-
tableData?: TableData;
|
|
1202
|
-
wordoptions?: WordOptions;
|
|
1203
|
-
wordoption?: AnswerIcon;
|
|
1204
|
-
answerOptions?: AnswerIcon[];
|
|
1205
|
-
questionId?: number;
|
|
1206
|
-
answerBins?: AnswerBins[];
|
|
1207
|
-
index?: number;
|
|
1208
|
-
}
|
|
1209
|
-
export interface WordOptions {
|
|
1210
|
-
options: WordOptionsOption[];
|
|
1211
|
-
answerOptions?: string[] | AnswerIcon[];
|
|
1212
|
-
}
|
|
1213
|
-
export interface WordOptionsOption {
|
|
1214
|
-
words: string;
|
|
1215
|
-
answers: string;
|
|
1216
|
-
position: number;
|
|
1217
|
-
}
|
|
1218
|
-
export interface AnswerIcon {
|
|
1219
|
-
abbreviation: string;
|
|
1220
|
-
icon: string;
|
|
1221
|
-
description: string;
|
|
1222
|
-
display: string;
|
|
1223
|
-
}
|
|
1224
|
-
export interface InputText {
|
|
1225
|
-
answerText: string;
|
|
1226
|
-
bins: number[];
|
|
1227
|
-
id?: number;
|
|
1228
|
-
correctText: string;
|
|
1229
|
-
isCorrect: boolean;
|
|
1230
|
-
position: number;
|
|
1231
|
-
index?: number;
|
|
1232
|
-
maxCorrectValue?: number;
|
|
1233
|
-
minCorrectValue?: number;
|
|
1234
|
-
}
|
|
1235
|
-
export interface InputTextMap {
|
|
1236
|
-
[key: string]: InputText;
|
|
1237
|
-
}
|
|
1238
|
-
export interface DropdownMap {
|
|
1239
|
-
[key: string]: Dropdown[];
|
|
1240
|
-
}
|
|
1241
|
-
export interface Dropdown {
|
|
1242
|
-
option: string;
|
|
1243
|
-
isCorrect: boolean;
|
|
1244
|
-
position?: number;
|
|
1245
|
-
index?: number;
|
|
1246
|
-
}
|
|
1247
|
-
export interface DropdownFormattedOption {
|
|
1248
|
-
answerId: number;
|
|
1249
|
-
options: Dropdown[];
|
|
1250
|
-
originalOptions: Dropdown[];
|
|
1251
|
-
}
|
|
1252
|
-
export interface TableData {
|
|
1253
|
-
[key: string]: {
|
|
1254
|
-
[key: string]: TableDataColumn | string;
|
|
1255
|
-
};
|
|
1256
|
-
}
|
|
1257
|
-
export interface TableDataColumn {
|
|
1258
|
-
correctText: string;
|
|
1259
|
-
isCorrect: boolean;
|
|
1260
|
-
position: number;
|
|
1261
|
-
options: Dropdown[];
|
|
1262
|
-
minCorrectValue?: number;
|
|
1263
|
-
maxCorrectValue?: number;
|
|
1264
|
-
}
|
|
1265
|
-
export interface QuizResult {
|
|
1266
|
-
Problemdata: Question[];
|
|
1267
|
-
QuizSession?: {
|
|
1268
|
-
closesAt: string | null;
|
|
1269
|
-
description: string;
|
|
1270
|
-
name: string;
|
|
1271
|
-
opensAt: string | null;
|
|
1272
|
-
problems: number;
|
|
1273
|
-
quizSessionId: number;
|
|
1274
|
-
};
|
|
1275
|
-
QuizUnit?: Omit<QuizUnit, 'unitScore' | 'problemScores'>;
|
|
1276
|
-
Results: Results;
|
|
1277
|
-
}
|
|
1278
|
-
export interface Results {
|
|
1279
|
-
'Number of correct': number;
|
|
1280
|
-
'Number of incorrect': number;
|
|
1281
|
-
'Number of not answered': number;
|
|
1282
|
-
'Number of partially correct': number;
|
|
1283
|
-
'Number of questions': number;
|
|
1284
|
-
unitScore: CalculatedScore;
|
|
1285
|
-
}
|
|
1286
|
-
export interface Score {
|
|
1287
|
-
'Number of correct options': number;
|
|
1288
|
-
'Number of correct options chosen': number;
|
|
1289
|
-
'Number of options': number;
|
|
1290
|
-
'Number of options chosen': number;
|
|
1291
|
-
'Percentage score': number;
|
|
1292
|
-
'Student has answered'?: boolean;
|
|
1293
|
-
'Token check': Tokens[];
|
|
1294
|
-
}
|
|
1295
|
-
export interface WordOptionsAnswer {
|
|
1296
|
-
answerId?: number;
|
|
1297
|
-
options?: (string | AnswerIcon)[];
|
|
1298
|
-
text: WordOptionsAnswerText | undefined;
|
|
1299
|
-
index: number;
|
|
1300
|
-
selected?: undefined | string | AnswerIcon;
|
|
1301
|
-
}
|
|
1302
|
-
export interface WordOptionsAnswerText {
|
|
1303
|
-
answers: string;
|
|
1304
|
-
words: string;
|
|
1305
|
-
position: number;
|
|
1306
|
-
}
|
|
1307
|
-
export interface Tokens {
|
|
1308
|
-
correctText: string;
|
|
1309
|
-
diffCheck: TokensDiffCheck[];
|
|
1310
|
-
numberOfTokenErrors: number;
|
|
1311
|
-
studentAnswerText: string;
|
|
1312
|
-
}
|
|
1313
|
-
export interface TokensDiffCheck {
|
|
1314
|
-
error: boolean;
|
|
1315
|
-
studentWord: string;
|
|
1316
|
-
correctWord: string;
|
|
1317
|
-
}
|
|
1318
|
-
export interface NewAnswer {
|
|
1319
|
-
answerText: string;
|
|
1320
|
-
bins?: number[];
|
|
1321
|
-
id: number | number[];
|
|
1322
|
-
isCorrect: boolean;
|
|
1323
|
-
position: number | number[];
|
|
1324
|
-
questionId?: number;
|
|
1325
|
-
index?: number;
|
|
1326
|
-
}
|
|
1327
|
-
export interface SaveAnswerResponse {
|
|
1328
|
-
Result: string;
|
|
1329
|
-
}
|
|
1330
|
-
export interface SaveAnswer {
|
|
1331
|
-
'question-id': number;
|
|
1332
|
-
'question-type-id': number;
|
|
1333
|
-
'answer-id'?: number[];
|
|
1334
|
-
'answer-text'?: (string | {
|
|
1335
|
-
answers: string;
|
|
1336
|
-
} | null)[];
|
|
1337
|
-
'answer-position'?: number[];
|
|
1338
|
-
'answer-bin'?: number[];
|
|
1339
|
-
'answer-checked'?: boolean;
|
|
1340
|
-
}
|
|
1341
|
-
export type QuizTextSettings = Record<string, string | number>;
|
|
1342
|
-
export interface SharedQuizData {
|
|
1343
|
-
'quiz-id'?: string | undefined;
|
|
1344
|
-
isbn?: string | undefined;
|
|
1345
|
-
title: string;
|
|
1346
|
-
description: string;
|
|
1347
|
-
'quiz-open': number | null;
|
|
1348
|
-
'quiz-close': number | null;
|
|
1349
|
-
'result-available-time'?: number | null;
|
|
1350
|
-
'extra-teachers': string[];
|
|
1351
|
-
}
|
|
1352
|
-
export interface SharedQuizBase {
|
|
1353
|
-
quizUnitId?: number;
|
|
1354
|
-
quizSessionId?: number;
|
|
1355
|
-
name?: string;
|
|
1356
|
-
isArchived?: boolean;
|
|
1357
|
-
quizResultAvailable?: number | null;
|
|
1358
|
-
problems: number;
|
|
1359
|
-
}
|
|
1360
|
-
export interface SharedTeacherQuiz extends SharedQuizBase {
|
|
1361
|
-
createdAt?: number;
|
|
1362
|
-
deactivatedProblems?: number[];
|
|
1363
|
-
extraTeachers?: string[];
|
|
1364
|
-
isExtraTeacher?: boolean;
|
|
1365
|
-
isPinned?: boolean;
|
|
1366
|
-
studentsFinished?: number;
|
|
1367
|
-
}
|
|
1368
|
-
export interface FormattedSharedTeacherQuiz extends SharedTeacherQuiz {
|
|
1369
|
-
formattedCreatedAt?: string | null;
|
|
1370
|
-
}
|
|
1371
|
-
export interface SharedQuizUserInfo {
|
|
1372
|
-
eKeysUserId: string;
|
|
1373
|
-
email: string;
|
|
1374
|
-
name: string;
|
|
1375
|
-
myAccountId: string;
|
|
1376
|
-
}
|
|
1377
|
-
export interface SharedStudentQuiz extends SharedQuizBase {
|
|
1378
|
-
createdBy: SharedQuizUserInfo;
|
|
1379
|
-
startedAt: number | null;
|
|
1380
|
-
finishedAt: number | null;
|
|
1381
|
-
opensAt: number | null;
|
|
1382
|
-
closesAt: number | null;
|
|
1383
|
-
finished: boolean;
|
|
1384
|
-
description?: string;
|
|
1385
|
-
}
|
|
1386
|
-
export interface FormattedSharedStudentQuiz extends SharedStudentQuiz {
|
|
1387
|
-
formattedStartedAt?: string | null;
|
|
1388
|
-
formattedFinishedAt?: string | null;
|
|
1389
|
-
}
|
|
1390
|
-
export interface CalculatedScore {
|
|
1391
|
-
points: number;
|
|
1392
|
-
maxPoints: number;
|
|
1393
|
-
percentage: number;
|
|
1394
|
-
}
|
|
1395
|
-
export interface QuizSession extends SharedTeacherQuiz {
|
|
1396
|
-
description?: string;
|
|
1397
|
-
opensAt: number | null;
|
|
1398
|
-
closesAt: number | null;
|
|
1399
|
-
quizUnits?: QuizUnit[];
|
|
1400
|
-
averageScores?: {
|
|
1401
|
-
byProblem: CalculatedScore[];
|
|
1402
|
-
overall: CalculatedScore;
|
|
1403
|
-
};
|
|
1404
|
-
}
|
|
1405
|
-
export interface QuizUnit {
|
|
1406
|
-
quizUnitId: number;
|
|
1407
|
-
student: SharedQuizUserInfo;
|
|
1408
|
-
finished: boolean;
|
|
1409
|
-
finishedAt: number | null;
|
|
1410
|
-
startedAt: number | null;
|
|
1411
|
-
timeSpent: TimeSpent;
|
|
1412
|
-
unitScore: CalculatedScore;
|
|
1413
|
-
problemScores: ProblemScore[];
|
|
1414
|
-
}
|
|
1415
|
-
export interface TimeSpent {
|
|
1416
|
-
days: number;
|
|
1417
|
-
hours: number;
|
|
1418
|
-
minutes: number;
|
|
1419
|
-
seconds: number;
|
|
1420
|
-
}
|
|
1421
|
-
export interface FormattedQuizUnit extends QuizUnit {
|
|
1422
|
-
formattedTimeSpent?: string;
|
|
1423
|
-
formattedFinishedAt?: string | null;
|
|
1424
|
-
formattedStartedAt?: string | null;
|
|
1425
|
-
percentage?: string;
|
|
1426
|
-
total?: string;
|
|
1427
|
-
[key: `problem_${string}`]: ProblemField | null | undefined;
|
|
1428
|
-
}
|
|
1429
|
-
export interface ProblemScore {
|
|
1430
|
-
mathproblem: number;
|
|
1431
|
-
questionTypeId: number;
|
|
1432
|
-
questionTypeString: string;
|
|
1433
|
-
score: Score;
|
|
1434
|
-
}
|
|
1435
|
-
export interface ProblemField {
|
|
1436
|
-
value: string | null;
|
|
1437
|
-
status: ProblemAnswerState;
|
|
1438
|
-
}
|
|
1439
|
-
export type QuizTableAction = 'copy' | 'archive' | 'delete' | 'unarchive';
|
|
1440
|
-
export type QuizTableItem = SharedTeacherQuiz | FormattedQuizUnit | SharedStudentQuiz;
|
|
1441
|
-
export type SearchableKeys = 'name';
|
|
1442
|
-
export type ProblemAnswerState = 'correct' | 'incorrect' | 'partially-correct' | 'unanswered';
|
|
1443
|
-
export type QuizLocalState = {
|
|
1444
|
-
id: number;
|
|
1445
|
-
isLoading: boolean;
|
|
1446
|
-
isApiError: boolean;
|
|
1447
|
-
data: Quiz | null;
|
|
1448
|
-
originalData: Quiz | null;
|
|
1449
|
-
finished: boolean;
|
|
1450
|
-
results: QuizResult | null;
|
|
1451
|
-
instantFeedback: string | null;
|
|
1452
|
-
showAdvancedResults: boolean;
|
|
1453
|
-
};
|
|
1454
|
-
export interface QuizDescriptionData {
|
|
1455
|
-
quizName: string;
|
|
1456
|
-
quizDescription: string;
|
|
1457
|
-
questionsCount: number;
|
|
1458
|
-
opensAt: number | null;
|
|
1459
|
-
closesAt: number | null;
|
|
1460
|
-
}
|
|
1461
|
-
export type QuizFormType = 'copy' | 'edit' | 'create';
|
|
1462
|
-
export interface QuizFormError {
|
|
1463
|
-
Error: string;
|
|
1464
|
-
InvalidEmails?: string[];
|
|
1465
|
-
}
|
|
1466
|
-
export interface QuizFormSuccess {
|
|
1467
|
-
quizSessionId: number;
|
|
1468
|
-
}
|
|
1469
|
-
export type QuizFormResponse = QuizFormSuccess | QuizFormError;
|
|
1470
632
|
export declare class QuizService extends BaseService {
|
|
1471
633
|
readonly serviceName: "quiz";
|
|
1472
634
|
/**
|
|
@@ -1600,46 +762,6 @@ export declare class QuizService extends BaseService {
|
|
|
1600
762
|
}
|
|
1601
763
|
//#endregion
|
|
1602
764
|
//#region src/services/writing_task_service.d.ts
|
|
1603
|
-
/** One step of a user's answer, as the client stores it. */
|
|
1604
|
-
export interface StepwiseTaskDataItem {
|
|
1605
|
-
[field: string]: unknown;
|
|
1606
|
-
}
|
|
1607
|
-
/**
|
|
1608
|
-
* The steps of an answer. The service stores whatever it is handed and reads
|
|
1609
|
-
* it back the same way, and the reader keeps them keyed by uid rather than in
|
|
1610
|
-
* a list, so both shapes are allowed here rather than one being imposed on
|
|
1611
|
-
* data that already exists.
|
|
1612
|
-
*/
|
|
1613
|
-
export type StepwiseTaskData = StepwiseTaskDataItem[] | Record<string, StepwiseTaskDataItem>;
|
|
1614
|
-
export interface WritingTaskResponse {
|
|
1615
|
-
cid: string;
|
|
1616
|
-
createdtime?: number;
|
|
1617
|
-
dateString?: string;
|
|
1618
|
-
deleted?: boolean | string;
|
|
1619
|
-
deletedDate?: string | null;
|
|
1620
|
-
isbn: string;
|
|
1621
|
-
myaccountId?: string;
|
|
1622
|
-
pid: string;
|
|
1623
|
-
stepwiseTaskDataItems?: StepwiseTaskData;
|
|
1624
|
-
uid?: string;
|
|
1625
|
-
userId?: string;
|
|
1626
|
-
}
|
|
1627
|
-
/** The service answers with one bucket per requested cid. */
|
|
1628
|
-
export interface WritingTaskResponseBucket {
|
|
1629
|
-
Count?: number;
|
|
1630
|
-
ScannedCount?: number;
|
|
1631
|
-
Items?: WritingTaskResponse[];
|
|
1632
|
-
}
|
|
1633
|
-
export interface WritingTaskAnswer {
|
|
1634
|
-
cid: string;
|
|
1635
|
-
isbn: string;
|
|
1636
|
-
pid: string;
|
|
1637
|
-
stepwiseTaskData: StepwiseTaskData;
|
|
1638
|
-
dateString?: string;
|
|
1639
|
-
mainTitle?: string;
|
|
1640
|
-
/** Always empty for a real user; the service stores what it is given. */
|
|
1641
|
-
userName?: string;
|
|
1642
|
-
}
|
|
1643
765
|
/**
|
|
1644
766
|
* The writing task service authenticates on the bearer token but still reads
|
|
1645
767
|
* the user from the request body, and only accepts the token when its `sub`
|