@gyldendalas/gyldendal-divine-api 1.1.9 → 1.2.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.d.cts +164 -164
- package/dist/index.d.mts +164 -164
- package/package.json +6 -6
package/dist/index.d.cts
CHANGED
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
*
|
|
5
5
|
* The `exp` claim is a NumericDate (Unix timestamp in seconds, per RFC 7519).
|
|
6
6
|
*/
|
|
7
|
-
declare function getJwtExpiry(token: string): Date;
|
|
7
|
+
export declare function getJwtExpiry(token: string): Date;
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/services/service_urls.d.ts
|
|
10
10
|
/**
|
|
11
11
|
* The `installationpurpose` values a caller may pass as `environment`, which
|
|
12
12
|
* is more values than there are places to point them at.
|
|
13
13
|
*/
|
|
14
|
-
declare const ENVIRONMENTS: readonly ["production", "development", "testing", "local", "test"];
|
|
15
|
-
type ServiceEnvironment = (typeof ENVIRONMENTS)[number];
|
|
16
|
-
declare function isServiceEnvironment(value: string): value is ServiceEnvironment;
|
|
14
|
+
export declare const ENVIRONMENTS: readonly ["production", "development", "testing", "local", "test"];
|
|
15
|
+
export type ServiceEnvironment = (typeof ENVIRONMENTS)[number];
|
|
16
|
+
export declare function isServiceEnvironment(value: string): value is ServiceEnvironment;
|
|
17
17
|
/**
|
|
18
18
|
* The hosted hostnames are written out rather than derived from the service
|
|
19
19
|
* name: `solr-proxy-staging.eu-west-1`, `ai-bot-service-staging.eu-west-1`
|
|
@@ -22,7 +22,7 @@ declare function isServiceEnvironment(value: string): value is ServiceEnvironmen
|
|
|
22
22
|
*
|
|
23
23
|
* The local ports are the reserved 4110-4180 block documented in the README.
|
|
24
24
|
*/
|
|
25
|
-
declare const SERVICE_URLS: {
|
|
25
|
+
export declare const SERVICE_URLS: {
|
|
26
26
|
readonly userSettings: {
|
|
27
27
|
readonly production: (d: string) => string;
|
|
28
28
|
readonly staging: (d: string) => string;
|
|
@@ -84,7 +84,7 @@ declare const SERVICE_URLS: {
|
|
|
84
84
|
readonly mock: () => string;
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
|
-
type ServiceName = keyof typeof SERVICE_URLS;
|
|
87
|
+
export type ServiceName = keyof typeof SERVICE_URLS;
|
|
88
88
|
/**
|
|
89
89
|
* Gale CMS's QA installation, which is not a target of its own: `quiz` is the
|
|
90
90
|
* only service with a QA endpoint, and a fifth `Target` would oblige the other
|
|
@@ -100,9 +100,9 @@ type ServiceName = keyof typeof SERVICE_URLS;
|
|
|
100
100
|
* TYPO3 asks for it through `site.sso.sso_overrides.galeQaEndpointEnabled`,
|
|
101
101
|
* which is a testing arrangement: honour it outside production only.
|
|
102
102
|
*/
|
|
103
|
-
declare const GALE_QA_URL = "https://galecms.qa.tibalo.dk/api";
|
|
103
|
+
export declare const GALE_QA_URL = "https://galecms.qa.tibalo.dk/api";
|
|
104
104
|
/** Where `service` answers in `environment`. */
|
|
105
|
-
declare function resolveServiceUrl(service: ServiceName, environment: string, baseDomain: string): string;
|
|
105
|
+
export declare function resolveServiceUrl(service: ServiceName, environment: string, baseDomain: string): string;
|
|
106
106
|
//#endregion
|
|
107
107
|
//#region src/services/service_overrides.d.ts
|
|
108
108
|
/**
|
|
@@ -110,15 +110,15 @@ declare function resolveServiceUrl(service: ServiceName, environment: string, ba
|
|
|
110
110
|
* about. The union is written this way so an editor still suggests the
|
|
111
111
|
* environment names while accepting a URL alongside them.
|
|
112
112
|
*/
|
|
113
|
-
type ServiceOverride = ServiceEnvironment | (string & {});
|
|
114
|
-
type EnvironmentOverrides = Partial<Record<ServiceName, ServiceOverride>>;
|
|
113
|
+
export type ServiceOverride = ServiceEnvironment | (string & {});
|
|
114
|
+
export type EnvironmentOverrides = Partial<Record<ServiceName, ServiceOverride>>;
|
|
115
115
|
/**
|
|
116
116
|
* Where an override came from. Reporting it is most of the value: "highlight
|
|
117
117
|
* is on 127.0.0.1" is a puzzle on its own, and stops being one as soon as it
|
|
118
118
|
* says which knob did it.
|
|
119
119
|
*/
|
|
120
|
-
type OverrideSource = 'serviceUrl' | 'environmentOverrides' | 'env' | 'globalThis';
|
|
121
|
-
interface OverrideDetails {
|
|
120
|
+
export type OverrideSource = 'serviceUrl' | 'environmentOverrides' | 'env' | 'globalThis';
|
|
121
|
+
export interface OverrideDetails {
|
|
122
122
|
service: ServiceName;
|
|
123
123
|
/** The environment the service would have resolved in otherwise. */
|
|
124
124
|
environment: string;
|
|
@@ -128,9 +128,9 @@ interface OverrideDetails {
|
|
|
128
128
|
/** The one-line form the default reporter writes to the console. */
|
|
129
129
|
message: string;
|
|
130
130
|
}
|
|
131
|
-
type OverrideReporter = (details: OverrideDetails) => void;
|
|
131
|
+
export type OverrideReporter = (details: OverrideDetails) => void;
|
|
132
132
|
/** `pdfGenerator` is configured as `DIVINE_ENV_PDF_GENERATOR`. */
|
|
133
|
-
declare function overrideEnvVarName(service: ServiceName): string;
|
|
133
|
+
export declare function overrideEnvVarName(service: ServiceName): string;
|
|
134
134
|
/**
|
|
135
135
|
* An override the developer's machine carries rather than the application's
|
|
136
136
|
* code. `process.env` is read through a computed key so a bundler treats it
|
|
@@ -140,20 +140,20 @@ declare function overrideEnvVarName(service: ServiceName): string;
|
|
|
140
140
|
* The environment variable wins: it is set per run of the application, so it
|
|
141
141
|
* is the more deliberate of the two.
|
|
142
142
|
*/
|
|
143
|
-
declare function ambientOverride(service: ServiceName): {
|
|
143
|
+
export declare function ambientOverride(service: ServiceName): {
|
|
144
144
|
value: string;
|
|
145
145
|
source: OverrideSource;
|
|
146
146
|
} | undefined;
|
|
147
147
|
/** An override that is not an environment name has to be a URL we can call. */
|
|
148
|
-
declare function overrideToUrl(value: string, service: ServiceName, source: OverrideSource): string;
|
|
148
|
+
export declare function overrideToUrl(value: string, service: ServiceName, source: OverrideSource): string;
|
|
149
149
|
/** Test seam: forget what has already been reported. */
|
|
150
|
-
declare function resetOverrideReports(): void;
|
|
150
|
+
export declare function resetOverrideReports(): void;
|
|
151
151
|
/**
|
|
152
152
|
* Report an override the first time it resolves. Deliberately not silenced in
|
|
153
153
|
* production: an `environmentOverrides` entry that reached a release is the
|
|
154
154
|
* single thing this is here to catch.
|
|
155
155
|
*/
|
|
156
|
-
declare function reportOverride({ service, environment, resolved, source }: Omit<OverrideDetails, 'message'>, onOverride?: OverrideReporter): void;
|
|
156
|
+
export declare function reportOverride({ service, environment, resolved, source }: Omit<OverrideDetails, 'message'>, onOverride?: OverrideReporter): void;
|
|
157
157
|
//#endregion
|
|
158
158
|
//#region src/services/base_service.d.ts
|
|
159
159
|
declare class BaseService {
|
|
@@ -252,17 +252,17 @@ declare class BaseService {
|
|
|
252
252
|
}
|
|
253
253
|
//#endregion
|
|
254
254
|
//#region src/services/tagging_service.d.ts
|
|
255
|
-
interface Tag {
|
|
255
|
+
export interface Tag {
|
|
256
256
|
identity: string;
|
|
257
257
|
resource_type: string;
|
|
258
258
|
resource_name: string;
|
|
259
259
|
tag_name: string;
|
|
260
260
|
tag_value: string;
|
|
261
261
|
}
|
|
262
|
-
interface TagOutput extends Tag {
|
|
262
|
+
export interface TagOutput extends Tag {
|
|
263
263
|
created_at: number;
|
|
264
264
|
}
|
|
265
|
-
declare class TaggingService extends BaseService {
|
|
265
|
+
export declare class TaggingService extends BaseService {
|
|
266
266
|
readonly serviceName: "tagging";
|
|
267
267
|
getTagsByResource({ identity, resource_type, resource_name, tag_name, timeout }: {
|
|
268
268
|
identity: string;
|
|
@@ -296,32 +296,32 @@ declare class TaggingService extends BaseService {
|
|
|
296
296
|
}
|
|
297
297
|
//#endregion
|
|
298
298
|
//#region src/services/polly_service.d.ts
|
|
299
|
-
declare enum SSMLSpeechSpeeds {
|
|
299
|
+
export declare enum SSMLSpeechSpeeds {
|
|
300
300
|
X_SLOW = 1,
|
|
301
301
|
SLOW = 2,
|
|
302
302
|
MEDIUM = 3,
|
|
303
303
|
FAST = 4,
|
|
304
304
|
X_FAST = 5
|
|
305
305
|
}
|
|
306
|
-
type SpeechmarkEvent = {
|
|
306
|
+
export type SpeechmarkEvent = {
|
|
307
307
|
time: number;
|
|
308
308
|
type?: string;
|
|
309
309
|
value: string;
|
|
310
310
|
start?: number;
|
|
311
311
|
end?: number;
|
|
312
312
|
};
|
|
313
|
-
interface SynthesisResponse {
|
|
313
|
+
export interface SynthesisResponse {
|
|
314
314
|
mp3url: string;
|
|
315
315
|
s3: string[];
|
|
316
316
|
SpeechMarks?: SpeechmarkEvent[];
|
|
317
317
|
}
|
|
318
|
-
interface SynthesisRequest {
|
|
318
|
+
export interface SynthesisRequest {
|
|
319
319
|
text: string;
|
|
320
320
|
includeSpeechMarks?: boolean;
|
|
321
321
|
voice: number;
|
|
322
322
|
speed?: SSMLSpeechSpeeds;
|
|
323
323
|
}
|
|
324
|
-
declare class PollyService extends BaseService {
|
|
324
|
+
export declare class PollyService extends BaseService {
|
|
325
325
|
readonly serviceName: "polly";
|
|
326
326
|
synthesize({ body, timeout }: {
|
|
327
327
|
body: SynthesisRequest;
|
|
@@ -330,22 +330,22 @@ declare class PollyService extends BaseService {
|
|
|
330
330
|
}
|
|
331
331
|
//#endregion
|
|
332
332
|
//#region src/services/cookie_consent_log.d.ts
|
|
333
|
-
interface CookieConsentRequest {
|
|
333
|
+
export interface CookieConsentRequest {
|
|
334
334
|
consentState: CookieConsentState;
|
|
335
335
|
consentUrl: string;
|
|
336
336
|
timeStamp: number;
|
|
337
337
|
uuid: string;
|
|
338
338
|
}
|
|
339
|
-
interface CookieConsentState {
|
|
339
|
+
export interface CookieConsentState {
|
|
340
340
|
func: number;
|
|
341
341
|
stat: number;
|
|
342
342
|
uuid: string;
|
|
343
343
|
version: number;
|
|
344
344
|
}
|
|
345
|
-
interface CookieConsentResponse {
|
|
345
|
+
export interface CookieConsentResponse {
|
|
346
346
|
response: string;
|
|
347
347
|
}
|
|
348
|
-
declare class CookieConsentLog extends BaseService {
|
|
348
|
+
export declare class CookieConsentLog extends BaseService {
|
|
349
349
|
readonly serviceName: "cookieConsentLog";
|
|
350
350
|
logCookieConsent({ body, timeout }: {
|
|
351
351
|
body: CookieConsentRequest;
|
|
@@ -354,11 +354,11 @@ declare class CookieConsentLog extends BaseService {
|
|
|
354
354
|
}
|
|
355
355
|
//#endregion
|
|
356
356
|
//#region src/services/highlight_service.d.ts
|
|
357
|
-
declare enum HighlightResultType {
|
|
357
|
+
export declare enum HighlightResultType {
|
|
358
358
|
'highlight' = "highlight",
|
|
359
359
|
'note' = "note"
|
|
360
360
|
}
|
|
361
|
-
interface HighlightRanges {
|
|
361
|
+
export interface HighlightRanges {
|
|
362
362
|
/** XPath of the start node, e.g. "/div[2]/div[1]/p[3]". */
|
|
363
363
|
start: string | null;
|
|
364
364
|
/** XPath of the end node. */
|
|
@@ -366,7 +366,7 @@ interface HighlightRanges {
|
|
|
366
366
|
startOffset: number;
|
|
367
367
|
endOffset: number;
|
|
368
368
|
}
|
|
369
|
-
interface Highlight extends HighlightUpdate {
|
|
369
|
+
export interface Highlight extends HighlightUpdate {
|
|
370
370
|
id: string;
|
|
371
371
|
recreationdata?: IRecreationData;
|
|
372
372
|
ranges?: HighlightRanges[];
|
|
@@ -374,13 +374,13 @@ interface Highlight extends HighlightUpdate {
|
|
|
374
374
|
markedupText?: string;
|
|
375
375
|
createdtstamp?: number;
|
|
376
376
|
}
|
|
377
|
-
interface HighlightRequest {
|
|
377
|
+
export interface HighlightRequest {
|
|
378
378
|
breadCrumb: string;
|
|
379
379
|
pageTitle: string;
|
|
380
380
|
externalUserId?: string;
|
|
381
381
|
highlight: Highlight;
|
|
382
382
|
}
|
|
383
|
-
interface HighlightSearchRequest {
|
|
383
|
+
export interface HighlightSearchRequest {
|
|
384
384
|
searchQuery: string;
|
|
385
385
|
resultType?: HighlightResultType;
|
|
386
386
|
isbn?: string;
|
|
@@ -389,7 +389,7 @@ interface HighlightSearchRequest {
|
|
|
389
389
|
vectorHighConfidence?: number;
|
|
390
390
|
fulltextMinScore?: number;
|
|
391
391
|
}
|
|
392
|
-
interface HiglightSearchMatch {
|
|
392
|
+
export interface HiglightSearchMatch {
|
|
393
393
|
rangeKey: number;
|
|
394
394
|
confidence: number;
|
|
395
395
|
texttype: HighlightResultType;
|
|
@@ -397,11 +397,11 @@ interface HiglightSearchMatch {
|
|
|
397
397
|
pid: number;
|
|
398
398
|
returnedItem: number;
|
|
399
399
|
}
|
|
400
|
-
interface HighlightSearchResponse {
|
|
400
|
+
export interface HighlightSearchResponse {
|
|
401
401
|
Items: HighlightResponse[];
|
|
402
402
|
Matches: HiglightSearchMatch[];
|
|
403
403
|
}
|
|
404
|
-
interface HighlightResponse extends HighlightRequest {
|
|
404
|
+
export interface HighlightResponse extends HighlightRequest {
|
|
405
405
|
debugHostname: string;
|
|
406
406
|
uidIsbnPidMyAccountIdPartitionKey: string;
|
|
407
407
|
timestampSortKey: number;
|
|
@@ -414,26 +414,26 @@ interface HighlightResponse extends HighlightRequest {
|
|
|
414
414
|
hlcolor: string;
|
|
415
415
|
isbn: string;
|
|
416
416
|
}
|
|
417
|
-
interface HighlightUpdate {
|
|
417
|
+
export interface HighlightUpdate {
|
|
418
418
|
hlcolor: string;
|
|
419
419
|
quote: string;
|
|
420
420
|
text: string;
|
|
421
421
|
}
|
|
422
|
-
interface HighlightUpdateRequest {
|
|
422
|
+
export interface HighlightUpdateRequest {
|
|
423
423
|
highlight: HighlightUpdate;
|
|
424
424
|
}
|
|
425
|
-
interface HighlightCountResponse {
|
|
425
|
+
export interface HighlightCountResponse {
|
|
426
426
|
type: HighlightResultType;
|
|
427
427
|
isbn: string;
|
|
428
428
|
count: number;
|
|
429
429
|
}
|
|
430
|
-
interface HighlightDeleteResult extends HighlightUpdateResponse {
|
|
430
|
+
export interface HighlightDeleteResult extends HighlightUpdateResponse {
|
|
431
431
|
changed: number;
|
|
432
432
|
}
|
|
433
|
-
interface HighlightAddResult extends HighlightUpdateResponse {
|
|
433
|
+
export interface HighlightAddResult extends HighlightUpdateResponse {
|
|
434
434
|
timestampSortKey: number;
|
|
435
435
|
}
|
|
436
|
-
interface HighlightUpdateResponse {
|
|
436
|
+
export interface HighlightUpdateResponse {
|
|
437
437
|
status: string;
|
|
438
438
|
}
|
|
439
439
|
interface IBKNGData {
|
|
@@ -450,18 +450,18 @@ interface IBKNGData {
|
|
|
450
450
|
srcText: string | null;
|
|
451
451
|
};
|
|
452
452
|
}
|
|
453
|
-
interface ICtype {
|
|
453
|
+
export interface ICtype {
|
|
454
454
|
SiblingsCount: string;
|
|
455
455
|
classes: string;
|
|
456
456
|
}
|
|
457
|
-
interface ICtypeDict {
|
|
457
|
+
export interface ICtypeDict {
|
|
458
458
|
[cid: string]: ICtype;
|
|
459
459
|
}
|
|
460
|
-
interface ITextStartEndObject {
|
|
460
|
+
export interface ITextStartEndObject {
|
|
461
461
|
startSelectedText: string | undefined | null;
|
|
462
462
|
endSelectedText: string | undefined;
|
|
463
463
|
}
|
|
464
|
-
interface IRecreationData {
|
|
464
|
+
export interface IRecreationData {
|
|
465
465
|
startCID: number;
|
|
466
466
|
numberOfSiblingsOnStartNode?: number | undefined;
|
|
467
467
|
numberofPrevSiblingsOnCIDStartNode?: number | undefined;
|
|
@@ -479,7 +479,7 @@ interface IRecreationData {
|
|
|
479
479
|
specialSelectedText?: string | undefined;
|
|
480
480
|
source?: any | null | undefined;
|
|
481
481
|
}
|
|
482
|
-
declare class HighlightService extends BaseService {
|
|
482
|
+
export declare class HighlightService extends BaseService {
|
|
483
483
|
readonly serviceName: "highlight";
|
|
484
484
|
search({ search, timeout }: {
|
|
485
485
|
search: HighlightSearchRequest;
|
|
@@ -521,10 +521,10 @@ declare class UserSettingsBase extends BaseService {
|
|
|
521
521
|
}
|
|
522
522
|
//#endregion
|
|
523
523
|
//#region src/services/user_settings_clientsettings.d.ts
|
|
524
|
-
interface ClientSettingsResponse {
|
|
524
|
+
export interface ClientSettingsResponse {
|
|
525
525
|
settings: ClientSettings;
|
|
526
526
|
}
|
|
527
|
-
interface ClientSettings {
|
|
527
|
+
export interface ClientSettings {
|
|
528
528
|
readabilities?: Readability;
|
|
529
529
|
darkMode?: boolean;
|
|
530
530
|
displayMode?: DisplayModeOption;
|
|
@@ -547,49 +547,49 @@ interface ClientSettings {
|
|
|
547
547
|
showOnboardingPrompt?: boolean;
|
|
548
548
|
favoritesSorting?: SortOptions;
|
|
549
549
|
}
|
|
550
|
-
type DisplayModeOption = 'light' | 'dark' | 'system';
|
|
551
|
-
type LayoutView = 'list' | 'grid';
|
|
552
|
-
interface ActivePublicationFilters {
|
|
550
|
+
export type DisplayModeOption = 'light' | 'dark' | 'system';
|
|
551
|
+
export type LayoutView = 'list' | 'grid';
|
|
552
|
+
export interface ActivePublicationFilters {
|
|
553
553
|
educations?: string[];
|
|
554
554
|
displaySubjects?: string[];
|
|
555
555
|
categoriesNames?: string[];
|
|
556
556
|
categoriesLevels?: string[];
|
|
557
557
|
publishers?: string[];
|
|
558
558
|
}
|
|
559
|
-
interface Readability {
|
|
559
|
+
export interface Readability {
|
|
560
560
|
letterSpacing?: number;
|
|
561
561
|
lineHeight?: number;
|
|
562
562
|
textSize?: number;
|
|
563
563
|
fontFamily?: FontFamily;
|
|
564
564
|
}
|
|
565
|
-
interface FontFamily {
|
|
565
|
+
export interface FontFamily {
|
|
566
566
|
name?: string;
|
|
567
567
|
defaultSize?: string;
|
|
568
568
|
url?: string;
|
|
569
569
|
}
|
|
570
|
-
interface ReadAloudStore {
|
|
570
|
+
export interface ReadAloudStore {
|
|
571
571
|
currentVoiceSelection?: CurrentVoiceSelection;
|
|
572
572
|
currentSpeedSelection?: CurrentSpeedSelection;
|
|
573
573
|
}
|
|
574
|
-
interface CurrentSpeedSelection {
|
|
574
|
+
export interface CurrentSpeedSelection {
|
|
575
575
|
speed?: number;
|
|
576
576
|
text?: string;
|
|
577
577
|
}
|
|
578
|
-
interface CurrentVoiceSelection {
|
|
578
|
+
export interface CurrentVoiceSelection {
|
|
579
579
|
voice?: number;
|
|
580
580
|
gender?: number;
|
|
581
581
|
language?: number;
|
|
582
582
|
}
|
|
583
|
-
interface FrontPageSection {
|
|
583
|
+
export interface FrontPageSection {
|
|
584
584
|
changeable?: boolean;
|
|
585
585
|
code?: string;
|
|
586
586
|
enabled?: boolean;
|
|
587
587
|
name?: string;
|
|
588
588
|
position?: number;
|
|
589
589
|
}
|
|
590
|
-
type SortOptions = 'recent' | 'alphabetical';
|
|
591
|
-
type HighlightsSorting = 'newest' | 'chapters';
|
|
592
|
-
declare class UserSettingsClientSettings extends UserSettingsBase {
|
|
590
|
+
export type SortOptions = 'recent' | 'alphabetical';
|
|
591
|
+
export type HighlightsSorting = 'newest' | 'chapters';
|
|
592
|
+
export declare class UserSettingsClientSettings extends UserSettingsBase {
|
|
593
593
|
getSettings({ isbn, timeout }: {
|
|
594
594
|
isbn: string;
|
|
595
595
|
timeout?: number;
|
|
@@ -606,15 +606,15 @@ declare class UserSettingsClientSettings extends UserSettingsBase {
|
|
|
606
606
|
}
|
|
607
607
|
//#endregion
|
|
608
608
|
//#region src/services/user_settings_bookmarks.d.ts
|
|
609
|
-
interface Bookmark extends BookmarkUpdate {
|
|
609
|
+
export interface Bookmark extends BookmarkUpdate {
|
|
610
610
|
createdTimeStamp: number;
|
|
611
611
|
isbn?: string;
|
|
612
612
|
}
|
|
613
|
-
interface BookmarkUpdate {
|
|
613
|
+
export interface BookmarkUpdate {
|
|
614
614
|
pageId: number;
|
|
615
615
|
contentId: number;
|
|
616
616
|
}
|
|
617
|
-
declare class UserSettingsBookmarks extends UserSettingsBase {
|
|
617
|
+
export declare class UserSettingsBookmarks extends UserSettingsBase {
|
|
618
618
|
setBookmark({ isbn, bookmark, externalUserId, timeout }: {
|
|
619
619
|
isbn: string;
|
|
620
620
|
bookmark: BookmarkUpdate;
|
|
@@ -638,13 +638,13 @@ declare class UserSettingsBookmarks extends UserSettingsBase {
|
|
|
638
638
|
}
|
|
639
639
|
//#endregion
|
|
640
640
|
//#region src/services/user_settings_continue.d.ts
|
|
641
|
-
interface Continue extends ContinueUpdate {
|
|
641
|
+
export interface Continue extends ContinueUpdate {
|
|
642
642
|
createdTimeStamp?: number;
|
|
643
643
|
}
|
|
644
|
-
interface ContinueUpdate {
|
|
644
|
+
export interface ContinueUpdate {
|
|
645
645
|
pageId: number;
|
|
646
646
|
}
|
|
647
|
-
declare class UserSettingsContinue extends UserSettingsBase {
|
|
647
|
+
export declare class UserSettingsContinue extends UserSettingsBase {
|
|
648
648
|
setContinue({ isbn, pageId, externalUserId, timeout }: {
|
|
649
649
|
isbn: string;
|
|
650
650
|
pageId: number;
|
|
@@ -662,12 +662,12 @@ declare class UserSettingsContinue extends UserSettingsBase {
|
|
|
662
662
|
}
|
|
663
663
|
//#endregion
|
|
664
664
|
//#region src/services/user_settings_mru.d.ts
|
|
665
|
-
interface MRU {
|
|
665
|
+
export interface MRU {
|
|
666
666
|
isbn: string;
|
|
667
667
|
link: string;
|
|
668
668
|
title: string;
|
|
669
669
|
}
|
|
670
|
-
declare class UserSettingsMRU extends UserSettingsBase {
|
|
670
|
+
export declare class UserSettingsMRU extends UserSettingsBase {
|
|
671
671
|
setMRU({ mru, externalUserId, timeout }: {
|
|
672
672
|
mru: MRU;
|
|
673
673
|
externalUserId?: string;
|
|
@@ -682,12 +682,12 @@ declare class UserSettingsMRU extends UserSettingsBase {
|
|
|
682
682
|
}
|
|
683
683
|
//#endregion
|
|
684
684
|
//#region src/services/pdf_generator.d.ts
|
|
685
|
-
interface NoteHighlight {
|
|
685
|
+
export interface NoteHighlight {
|
|
686
686
|
color: string;
|
|
687
687
|
comment: string;
|
|
688
688
|
selectedText: string;
|
|
689
689
|
}
|
|
690
|
-
interface Notes {
|
|
690
|
+
export interface Notes {
|
|
691
691
|
created: string;
|
|
692
692
|
highlight: NoteHighlight;
|
|
693
693
|
link: string;
|
|
@@ -696,7 +696,7 @@ interface Notes {
|
|
|
696
696
|
/** Not read by the export; kept for callers that carry one. */
|
|
697
697
|
id?: string;
|
|
698
698
|
}
|
|
699
|
-
interface NotesLabels {
|
|
699
|
+
export interface NotesLabels {
|
|
700
700
|
amountOfNotesProse: string;
|
|
701
701
|
documentTitle: string;
|
|
702
702
|
markedText: string;
|
|
@@ -705,18 +705,18 @@ interface NotesLabels {
|
|
|
705
705
|
notesExportedAt: string;
|
|
706
706
|
yourNote: string;
|
|
707
707
|
}
|
|
708
|
-
interface NotesData {
|
|
708
|
+
export interface NotesData {
|
|
709
709
|
labels: NotesLabels;
|
|
710
710
|
notes: Notes[];
|
|
711
711
|
}
|
|
712
|
-
interface NotesRequest {
|
|
712
|
+
export interface NotesRequest {
|
|
713
713
|
exportedDate: string;
|
|
714
714
|
notesData: NotesData;
|
|
715
715
|
userId: string;
|
|
716
716
|
userName: string;
|
|
717
717
|
}
|
|
718
718
|
/** What every export answers with: a status and a link to the document. */
|
|
719
|
-
interface PdfExportResult {
|
|
719
|
+
export interface PdfExportResult {
|
|
720
720
|
status: string;
|
|
721
721
|
url: string;
|
|
722
722
|
}
|
|
@@ -726,13 +726,13 @@ interface PdfExportResult {
|
|
|
726
726
|
* exports resolve to a fetch response rather than the parsed body.
|
|
727
727
|
*/
|
|
728
728
|
type Response$1 = PdfExportResult;
|
|
729
|
-
interface WritingTaskRequest {
|
|
729
|
+
export interface WritingTaskRequest {
|
|
730
730
|
pdftitle: string;
|
|
731
731
|
userId: string;
|
|
732
732
|
userName: string;
|
|
733
733
|
writingTaskData: WritingTaskData;
|
|
734
734
|
}
|
|
735
|
-
interface WritingTaskData {
|
|
735
|
+
export interface WritingTaskData {
|
|
736
736
|
createdDate: string;
|
|
737
737
|
exportedDateTimeString: string;
|
|
738
738
|
header: string;
|
|
@@ -753,7 +753,7 @@ interface WritingTaskData {
|
|
|
753
753
|
* `gallery` and `images` are left open because their shapes come from the
|
|
754
754
|
* caller's own content model, and the export walks them defensively.
|
|
755
755
|
*/
|
|
756
|
-
interface WritingTaskItem {
|
|
756
|
+
export interface WritingTaskItem {
|
|
757
757
|
/** Rendered by the export; derive it from `answer` before sending. */
|
|
758
758
|
parsedAnswer?: string;
|
|
759
759
|
/** Rendered by the export; derive it from `question` before sending. */
|
|
@@ -781,11 +781,11 @@ interface WritingTaskItem {
|
|
|
781
781
|
tstamp?: number;
|
|
782
782
|
uid?: number;
|
|
783
783
|
}
|
|
784
|
-
interface SiteMapLabels {
|
|
784
|
+
export interface SiteMapLabels {
|
|
785
785
|
pbook: string;
|
|
786
786
|
toc: string;
|
|
787
787
|
}
|
|
788
|
-
interface SiteMapPageTreeItem {
|
|
788
|
+
export interface SiteMapPageTreeItem {
|
|
789
789
|
chapterInfo?: SiteMapPageTreeItem;
|
|
790
790
|
characters: number;
|
|
791
791
|
iPages: number;
|
|
@@ -808,7 +808,7 @@ interface SiteMapPageTreeItem {
|
|
|
808
808
|
* and `children`; everything else is whatever the caller's navigation happens
|
|
809
809
|
* to carry, so it is optional here.
|
|
810
810
|
*/
|
|
811
|
-
interface SiteMapPage {
|
|
811
|
+
export interface SiteMapPage {
|
|
812
812
|
children: SiteMapPage[];
|
|
813
813
|
link: string;
|
|
814
814
|
title: string;
|
|
@@ -824,13 +824,13 @@ interface SiteMapPage {
|
|
|
824
824
|
nav_title?: string;
|
|
825
825
|
pid?: number;
|
|
826
826
|
}
|
|
827
|
-
type SiteMapPageTreeData = Record<string, SiteMapPageTreeItem>;
|
|
828
|
-
interface SiteMapContent {
|
|
827
|
+
export type SiteMapPageTreeData = Record<string, SiteMapPageTreeItem>;
|
|
828
|
+
export interface SiteMapContent {
|
|
829
829
|
labels: SiteMapLabels;
|
|
830
830
|
pageTreeData: SiteMapPageTreeData;
|
|
831
831
|
pages: SiteMapPage[];
|
|
832
832
|
}
|
|
833
|
-
interface SiteMapRequest {
|
|
833
|
+
export interface SiteMapRequest {
|
|
834
834
|
baseUrl: string;
|
|
835
835
|
content: SiteMapContent;
|
|
836
836
|
exportedDate: string;
|
|
@@ -839,7 +839,7 @@ interface SiteMapRequest {
|
|
|
839
839
|
userId: string;
|
|
840
840
|
userName: string;
|
|
841
841
|
}
|
|
842
|
-
interface PrintGlossary {
|
|
842
|
+
export interface PrintGlossary {
|
|
843
843
|
term: string;
|
|
844
844
|
description: string;
|
|
845
845
|
}
|
|
@@ -848,7 +848,7 @@ interface PrintGlossary {
|
|
|
848
848
|
* `content.content` for the body text, header, images and position, and the
|
|
849
849
|
* shapes differ per element type, so this stays open.
|
|
850
850
|
*/
|
|
851
|
-
interface PrintContentElement {
|
|
851
|
+
export interface PrintContentElement {
|
|
852
852
|
[field: string]: unknown;
|
|
853
853
|
}
|
|
854
854
|
/**
|
|
@@ -856,7 +856,7 @@ interface PrintContentElement {
|
|
|
856
856
|
* is page furniture. `lang` falls back to Danish server side when absent or
|
|
857
857
|
* not a plain language code.
|
|
858
858
|
*/
|
|
859
|
-
interface PrintRequest {
|
|
859
|
+
export interface PrintRequest {
|
|
860
860
|
contentElements: PrintContentElement[];
|
|
861
861
|
isbn: string;
|
|
862
862
|
userId: string;
|
|
@@ -872,7 +872,7 @@ interface PrintRequest {
|
|
|
872
872
|
publisher?: string;
|
|
873
873
|
siteTitle?: string;
|
|
874
874
|
}
|
|
875
|
-
declare class PdfGeneratorService extends BaseService {
|
|
875
|
+
export declare class PdfGeneratorService extends BaseService {
|
|
876
876
|
readonly serviceName: "pdfGenerator";
|
|
877
877
|
pdfFromSiteMap({ body, timeout }: {
|
|
878
878
|
body: SiteMapRequest;
|
|
@@ -893,16 +893,16 @@ declare class PdfGeneratorService extends BaseService {
|
|
|
893
893
|
}
|
|
894
894
|
//#endregion
|
|
895
895
|
//#region src/services/highlevel/tagging/user_folders.d.ts
|
|
896
|
-
interface FolderObject {
|
|
896
|
+
export interface FolderObject {
|
|
897
897
|
created_at: number;
|
|
898
898
|
}
|
|
899
|
-
interface Folder extends FolderObject {
|
|
899
|
+
export interface Folder extends FolderObject {
|
|
900
900
|
name: string;
|
|
901
901
|
color: string;
|
|
902
902
|
uuid: string;
|
|
903
903
|
parent?: string;
|
|
904
904
|
}
|
|
905
|
-
interface FolderContent extends FolderObject {
|
|
905
|
+
export interface FolderContent extends FolderObject {
|
|
906
906
|
type: string;
|
|
907
907
|
identifier: string;
|
|
908
908
|
folder_uuid: string;
|
|
@@ -912,7 +912,7 @@ interface FolderContent extends FolderObject {
|
|
|
912
912
|
* 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.
|
|
913
913
|
* Folders are created with a unique UUID that can be used to reference the folder in future requests. The folder properties are stored as a base64 encoded JSON string.
|
|
914
914
|
**/
|
|
915
|
-
declare class UserFolders extends TaggingService {
|
|
915
|
+
export declare class UserFolders extends TaggingService {
|
|
916
916
|
private readonly hasNoParent;
|
|
917
917
|
private identity?;
|
|
918
918
|
getIdentity(): Promise<string>;
|
|
@@ -1066,36 +1066,36 @@ declare class UserFolders extends TaggingService {
|
|
|
1066
1066
|
}
|
|
1067
1067
|
//#endregion
|
|
1068
1068
|
//#region src/services/ai_bot_service.d.ts
|
|
1069
|
-
type AIChatRole = 'user' | 'assistant' | 'system';
|
|
1069
|
+
export type AIChatRole = 'user' | 'assistant' | 'system';
|
|
1070
1070
|
type GenericContext = Record<string, unknown>;
|
|
1071
|
-
interface AIChatMessage<ContextType extends GenericContext = GenericContext> {
|
|
1071
|
+
export interface AIChatMessage<ContextType extends GenericContext = GenericContext> {
|
|
1072
1072
|
role: AIChatRole;
|
|
1073
1073
|
content: string;
|
|
1074
1074
|
context?: ContextType;
|
|
1075
1075
|
}
|
|
1076
|
-
interface AIChatMessageDelta<ContextType extends GenericContext = GenericContext> {
|
|
1076
|
+
export interface AIChatMessageDelta<ContextType extends GenericContext = GenericContext> {
|
|
1077
1077
|
role?: AIChatRole;
|
|
1078
1078
|
content?: string;
|
|
1079
1079
|
context?: ContextType;
|
|
1080
1080
|
}
|
|
1081
|
-
interface AIChatCompletion<ContextType extends GenericContext = GenericContext> {
|
|
1081
|
+
export interface AIChatCompletion<ContextType extends GenericContext = GenericContext> {
|
|
1082
1082
|
message: AIChatMessage;
|
|
1083
1083
|
sessionState?: unknown;
|
|
1084
1084
|
context?: ContextType;
|
|
1085
1085
|
}
|
|
1086
|
-
interface AIChatCompletionDelta<ContextType extends GenericContext = GenericContext> {
|
|
1086
|
+
export interface AIChatCompletionDelta<ContextType extends GenericContext = GenericContext> {
|
|
1087
1087
|
delta: AIChatMessageDelta;
|
|
1088
1088
|
sessionState?: unknown;
|
|
1089
1089
|
context?: ContextType;
|
|
1090
1090
|
}
|
|
1091
|
-
interface AIChatCompletionOptions<ContextType extends GenericContext = GenericContext> {
|
|
1091
|
+
export interface AIChatCompletionOptions<ContextType extends GenericContext = GenericContext> {
|
|
1092
1092
|
context?: ContextType;
|
|
1093
1093
|
sessionState?: unknown;
|
|
1094
1094
|
}
|
|
1095
|
-
type AIChatCompletionRequest = {
|
|
1095
|
+
export type AIChatCompletionRequest = {
|
|
1096
1096
|
messages: AIChatMessage[];
|
|
1097
1097
|
} & AIChatCompletionOptions;
|
|
1098
|
-
declare class AIBotService extends BaseService {
|
|
1098
|
+
export declare class AIBotService extends BaseService {
|
|
1099
1099
|
readonly serviceName: "aiBot";
|
|
1100
1100
|
constructChatUrl({ interactivityId, isbn, stream }: {
|
|
1101
1101
|
interactivityId?: string;
|
|
@@ -1117,10 +1117,10 @@ declare class AIBotService extends BaseService {
|
|
|
1117
1117
|
}
|
|
1118
1118
|
//#endregion
|
|
1119
1119
|
//#region src/services/quiz_service.d.ts
|
|
1120
|
-
interface QuizStartResponse {
|
|
1120
|
+
export interface QuizStartResponse {
|
|
1121
1121
|
quizUnitId: number;
|
|
1122
1122
|
}
|
|
1123
|
-
interface Quiz {
|
|
1123
|
+
export interface Quiz {
|
|
1124
1124
|
quizId: number;
|
|
1125
1125
|
quizName: string;
|
|
1126
1126
|
quizDescription: string;
|
|
@@ -1130,7 +1130,7 @@ interface Quiz {
|
|
|
1130
1130
|
quizResultAvailable?: number;
|
|
1131
1131
|
quizStartTime?: number;
|
|
1132
1132
|
}
|
|
1133
|
-
interface Question {
|
|
1133
|
+
export interface Question {
|
|
1134
1134
|
questionId: number;
|
|
1135
1135
|
name: string;
|
|
1136
1136
|
introText: string;
|
|
@@ -1152,12 +1152,12 @@ interface Question {
|
|
|
1152
1152
|
'chosenAnswer correctness': string;
|
|
1153
1153
|
isEnabled: boolean;
|
|
1154
1154
|
}
|
|
1155
|
-
interface FormattedQuestion extends Question {
|
|
1155
|
+
export interface FormattedQuestion extends Question {
|
|
1156
1156
|
number: number;
|
|
1157
1157
|
answerTime?: string | null;
|
|
1158
1158
|
percentage: string;
|
|
1159
1159
|
}
|
|
1160
|
-
interface Mediafile {
|
|
1160
|
+
export interface Mediafile {
|
|
1161
1161
|
id: number;
|
|
1162
1162
|
placement: string;
|
|
1163
1163
|
caption: string;
|
|
@@ -1168,7 +1168,7 @@ interface Mediafile {
|
|
|
1168
1168
|
credit: string;
|
|
1169
1169
|
width?: number;
|
|
1170
1170
|
}
|
|
1171
|
-
interface ChosenAnswer {
|
|
1171
|
+
export interface ChosenAnswer {
|
|
1172
1172
|
id: number | number[];
|
|
1173
1173
|
answerText: string;
|
|
1174
1174
|
created?: number;
|
|
@@ -1182,12 +1182,12 @@ interface ChosenAnswer {
|
|
|
1182
1182
|
isCorrect: boolean;
|
|
1183
1183
|
wordoption?: AnswerIcon;
|
|
1184
1184
|
}
|
|
1185
|
-
interface AnswerBins {
|
|
1185
|
+
export interface AnswerBins {
|
|
1186
1186
|
txt: string;
|
|
1187
1187
|
binindex: number;
|
|
1188
1188
|
mediafile: Mediafile;
|
|
1189
1189
|
}
|
|
1190
|
-
interface Answer {
|
|
1190
|
+
export interface Answer {
|
|
1191
1191
|
id: number | number[];
|
|
1192
1192
|
answerText: string;
|
|
1193
1193
|
isCorrect: boolean;
|
|
@@ -1206,22 +1206,22 @@ interface Answer {
|
|
|
1206
1206
|
answerBins?: AnswerBins[];
|
|
1207
1207
|
index?: number;
|
|
1208
1208
|
}
|
|
1209
|
-
interface WordOptions {
|
|
1209
|
+
export interface WordOptions {
|
|
1210
1210
|
options: WordOptionsOption[];
|
|
1211
1211
|
answerOptions?: string[] | AnswerIcon[];
|
|
1212
1212
|
}
|
|
1213
|
-
interface WordOptionsOption {
|
|
1213
|
+
export interface WordOptionsOption {
|
|
1214
1214
|
words: string;
|
|
1215
1215
|
answers: string;
|
|
1216
1216
|
position: number;
|
|
1217
1217
|
}
|
|
1218
|
-
interface AnswerIcon {
|
|
1218
|
+
export interface AnswerIcon {
|
|
1219
1219
|
abbreviation: string;
|
|
1220
1220
|
icon: string;
|
|
1221
1221
|
description: string;
|
|
1222
1222
|
display: string;
|
|
1223
1223
|
}
|
|
1224
|
-
interface InputText {
|
|
1224
|
+
export interface InputText {
|
|
1225
1225
|
answerText: string;
|
|
1226
1226
|
bins: number[];
|
|
1227
1227
|
id?: number;
|
|
@@ -1232,29 +1232,29 @@ interface InputText {
|
|
|
1232
1232
|
maxCorrectValue?: number;
|
|
1233
1233
|
minCorrectValue?: number;
|
|
1234
1234
|
}
|
|
1235
|
-
interface InputTextMap {
|
|
1235
|
+
export interface InputTextMap {
|
|
1236
1236
|
[key: string]: InputText;
|
|
1237
1237
|
}
|
|
1238
|
-
interface DropdownMap {
|
|
1238
|
+
export interface DropdownMap {
|
|
1239
1239
|
[key: string]: Dropdown[];
|
|
1240
1240
|
}
|
|
1241
|
-
interface Dropdown {
|
|
1241
|
+
export interface Dropdown {
|
|
1242
1242
|
option: string;
|
|
1243
1243
|
isCorrect: boolean;
|
|
1244
1244
|
position?: number;
|
|
1245
1245
|
index?: number;
|
|
1246
1246
|
}
|
|
1247
|
-
interface DropdownFormattedOption {
|
|
1247
|
+
export interface DropdownFormattedOption {
|
|
1248
1248
|
answerId: number;
|
|
1249
1249
|
options: Dropdown[];
|
|
1250
1250
|
originalOptions: Dropdown[];
|
|
1251
1251
|
}
|
|
1252
|
-
interface TableData {
|
|
1252
|
+
export interface TableData {
|
|
1253
1253
|
[key: string]: {
|
|
1254
1254
|
[key: string]: TableDataColumn | string;
|
|
1255
1255
|
};
|
|
1256
1256
|
}
|
|
1257
|
-
interface TableDataColumn {
|
|
1257
|
+
export interface TableDataColumn {
|
|
1258
1258
|
correctText: string;
|
|
1259
1259
|
isCorrect: boolean;
|
|
1260
1260
|
position: number;
|
|
@@ -1262,7 +1262,7 @@ interface TableDataColumn {
|
|
|
1262
1262
|
minCorrectValue?: number;
|
|
1263
1263
|
maxCorrectValue?: number;
|
|
1264
1264
|
}
|
|
1265
|
-
interface QuizResult {
|
|
1265
|
+
export interface QuizResult {
|
|
1266
1266
|
Problemdata: Question[];
|
|
1267
1267
|
QuizSession?: {
|
|
1268
1268
|
closesAt: string | null;
|
|
@@ -1275,7 +1275,7 @@ interface QuizResult {
|
|
|
1275
1275
|
QuizUnit?: Omit<QuizUnit, 'unitScore' | 'problemScores'>;
|
|
1276
1276
|
Results: Results;
|
|
1277
1277
|
}
|
|
1278
|
-
interface Results {
|
|
1278
|
+
export interface Results {
|
|
1279
1279
|
'Number of correct': number;
|
|
1280
1280
|
'Number of incorrect': number;
|
|
1281
1281
|
'Number of not answered': number;
|
|
@@ -1283,7 +1283,7 @@ interface Results {
|
|
|
1283
1283
|
'Number of questions': number;
|
|
1284
1284
|
unitScore: CalculatedScore;
|
|
1285
1285
|
}
|
|
1286
|
-
interface Score {
|
|
1286
|
+
export interface Score {
|
|
1287
1287
|
'Number of correct options': number;
|
|
1288
1288
|
'Number of correct options chosen': number;
|
|
1289
1289
|
'Number of options': number;
|
|
@@ -1292,30 +1292,30 @@ interface Score {
|
|
|
1292
1292
|
'Student has answered'?: boolean;
|
|
1293
1293
|
'Token check': Tokens[];
|
|
1294
1294
|
}
|
|
1295
|
-
interface WordOptionsAnswer {
|
|
1295
|
+
export interface WordOptionsAnswer {
|
|
1296
1296
|
answerId?: number;
|
|
1297
1297
|
options?: (string | AnswerIcon)[];
|
|
1298
1298
|
text: WordOptionsAnswerText | undefined;
|
|
1299
1299
|
index: number;
|
|
1300
1300
|
selected?: undefined | string | AnswerIcon;
|
|
1301
1301
|
}
|
|
1302
|
-
interface WordOptionsAnswerText {
|
|
1302
|
+
export interface WordOptionsAnswerText {
|
|
1303
1303
|
answers: string;
|
|
1304
1304
|
words: string;
|
|
1305
1305
|
position: number;
|
|
1306
1306
|
}
|
|
1307
|
-
interface Tokens {
|
|
1307
|
+
export interface Tokens {
|
|
1308
1308
|
correctText: string;
|
|
1309
1309
|
diffCheck: TokensDiffCheck[];
|
|
1310
1310
|
numberOfTokenErrors: number;
|
|
1311
1311
|
studentAnswerText: string;
|
|
1312
1312
|
}
|
|
1313
|
-
interface TokensDiffCheck {
|
|
1313
|
+
export interface TokensDiffCheck {
|
|
1314
1314
|
error: boolean;
|
|
1315
1315
|
studentWord: string;
|
|
1316
1316
|
correctWord: string;
|
|
1317
1317
|
}
|
|
1318
|
-
interface NewAnswer {
|
|
1318
|
+
export interface NewAnswer {
|
|
1319
1319
|
answerText: string;
|
|
1320
1320
|
bins?: number[];
|
|
1321
1321
|
id: number | number[];
|
|
@@ -1324,10 +1324,10 @@ interface NewAnswer {
|
|
|
1324
1324
|
questionId?: number;
|
|
1325
1325
|
index?: number;
|
|
1326
1326
|
}
|
|
1327
|
-
interface SaveAnswerResponse {
|
|
1327
|
+
export interface SaveAnswerResponse {
|
|
1328
1328
|
Result: string;
|
|
1329
1329
|
}
|
|
1330
|
-
interface SaveAnswer {
|
|
1330
|
+
export interface SaveAnswer {
|
|
1331
1331
|
'question-id': number;
|
|
1332
1332
|
'question-type-id': number;
|
|
1333
1333
|
'answer-id'?: number[];
|
|
@@ -1338,8 +1338,8 @@ interface SaveAnswer {
|
|
|
1338
1338
|
'answer-bin'?: number[];
|
|
1339
1339
|
'answer-checked'?: boolean;
|
|
1340
1340
|
}
|
|
1341
|
-
type QuizTextSettings = Record<string, string | number>;
|
|
1342
|
-
interface SharedQuizData {
|
|
1341
|
+
export type QuizTextSettings = Record<string, string | number>;
|
|
1342
|
+
export interface SharedQuizData {
|
|
1343
1343
|
'quiz-id'?: string | undefined;
|
|
1344
1344
|
isbn?: string | undefined;
|
|
1345
1345
|
title: string;
|
|
@@ -1349,7 +1349,7 @@ interface SharedQuizData {
|
|
|
1349
1349
|
'result-available-time'?: number | null;
|
|
1350
1350
|
'extra-teachers': string[];
|
|
1351
1351
|
}
|
|
1352
|
-
interface SharedQuizBase {
|
|
1352
|
+
export interface SharedQuizBase {
|
|
1353
1353
|
quizUnitId?: number;
|
|
1354
1354
|
quizSessionId?: number;
|
|
1355
1355
|
name?: string;
|
|
@@ -1357,7 +1357,7 @@ interface SharedQuizBase {
|
|
|
1357
1357
|
quizResultAvailable?: number | null;
|
|
1358
1358
|
problems: number;
|
|
1359
1359
|
}
|
|
1360
|
-
interface SharedTeacherQuiz extends SharedQuizBase {
|
|
1360
|
+
export interface SharedTeacherQuiz extends SharedQuizBase {
|
|
1361
1361
|
createdAt?: number;
|
|
1362
1362
|
deactivatedProblems?: number[];
|
|
1363
1363
|
extraTeachers?: string[];
|
|
@@ -1365,16 +1365,16 @@ interface SharedTeacherQuiz extends SharedQuizBase {
|
|
|
1365
1365
|
isPinned?: boolean;
|
|
1366
1366
|
studentsFinished?: number;
|
|
1367
1367
|
}
|
|
1368
|
-
interface FormattedSharedTeacherQuiz extends SharedTeacherQuiz {
|
|
1368
|
+
export interface FormattedSharedTeacherQuiz extends SharedTeacherQuiz {
|
|
1369
1369
|
formattedCreatedAt?: string | null;
|
|
1370
1370
|
}
|
|
1371
|
-
interface SharedQuizUserInfo {
|
|
1371
|
+
export interface SharedQuizUserInfo {
|
|
1372
1372
|
eKeysUserId: string;
|
|
1373
1373
|
email: string;
|
|
1374
1374
|
name: string;
|
|
1375
1375
|
myAccountId: string;
|
|
1376
1376
|
}
|
|
1377
|
-
interface SharedStudentQuiz extends SharedQuizBase {
|
|
1377
|
+
export interface SharedStudentQuiz extends SharedQuizBase {
|
|
1378
1378
|
createdBy: SharedQuizUserInfo;
|
|
1379
1379
|
startedAt: number | null;
|
|
1380
1380
|
finishedAt: number | null;
|
|
@@ -1383,16 +1383,16 @@ interface SharedStudentQuiz extends SharedQuizBase {
|
|
|
1383
1383
|
finished: boolean;
|
|
1384
1384
|
description?: string;
|
|
1385
1385
|
}
|
|
1386
|
-
interface FormattedSharedStudentQuiz extends SharedStudentQuiz {
|
|
1386
|
+
export interface FormattedSharedStudentQuiz extends SharedStudentQuiz {
|
|
1387
1387
|
formattedStartedAt?: string | null;
|
|
1388
1388
|
formattedFinishedAt?: string | null;
|
|
1389
1389
|
}
|
|
1390
|
-
interface CalculatedScore {
|
|
1390
|
+
export interface CalculatedScore {
|
|
1391
1391
|
points: number;
|
|
1392
1392
|
maxPoints: number;
|
|
1393
1393
|
percentage: number;
|
|
1394
1394
|
}
|
|
1395
|
-
interface QuizSession extends SharedTeacherQuiz {
|
|
1395
|
+
export interface QuizSession extends SharedTeacherQuiz {
|
|
1396
1396
|
description?: string;
|
|
1397
1397
|
opensAt: number | null;
|
|
1398
1398
|
closesAt: number | null;
|
|
@@ -1402,7 +1402,7 @@ interface QuizSession extends SharedTeacherQuiz {
|
|
|
1402
1402
|
overall: CalculatedScore;
|
|
1403
1403
|
};
|
|
1404
1404
|
}
|
|
1405
|
-
interface QuizUnit {
|
|
1405
|
+
export interface QuizUnit {
|
|
1406
1406
|
quizUnitId: number;
|
|
1407
1407
|
student: SharedQuizUserInfo;
|
|
1408
1408
|
finished: boolean;
|
|
@@ -1412,13 +1412,13 @@ interface QuizUnit {
|
|
|
1412
1412
|
unitScore: CalculatedScore;
|
|
1413
1413
|
problemScores: ProblemScore[];
|
|
1414
1414
|
}
|
|
1415
|
-
interface TimeSpent {
|
|
1415
|
+
export interface TimeSpent {
|
|
1416
1416
|
days: number;
|
|
1417
1417
|
hours: number;
|
|
1418
1418
|
minutes: number;
|
|
1419
1419
|
seconds: number;
|
|
1420
1420
|
}
|
|
1421
|
-
interface FormattedQuizUnit extends QuizUnit {
|
|
1421
|
+
export interface FormattedQuizUnit extends QuizUnit {
|
|
1422
1422
|
formattedTimeSpent?: string;
|
|
1423
1423
|
formattedFinishedAt?: string | null;
|
|
1424
1424
|
formattedStartedAt?: string | null;
|
|
@@ -1426,21 +1426,21 @@ interface FormattedQuizUnit extends QuizUnit {
|
|
|
1426
1426
|
total?: string;
|
|
1427
1427
|
[key: `problem_${string}`]: ProblemField | null | undefined;
|
|
1428
1428
|
}
|
|
1429
|
-
interface ProblemScore {
|
|
1429
|
+
export interface ProblemScore {
|
|
1430
1430
|
mathproblem: number;
|
|
1431
1431
|
questionTypeId: number;
|
|
1432
1432
|
questionTypeString: string;
|
|
1433
1433
|
score: Score;
|
|
1434
1434
|
}
|
|
1435
|
-
interface ProblemField {
|
|
1435
|
+
export interface ProblemField {
|
|
1436
1436
|
value: string | null;
|
|
1437
1437
|
status: ProblemAnswerState;
|
|
1438
1438
|
}
|
|
1439
|
-
type QuizTableAction = 'copy' | 'archive' | 'delete' | 'unarchive';
|
|
1440
|
-
type QuizTableItem = SharedTeacherQuiz | FormattedQuizUnit | SharedStudentQuiz;
|
|
1441
|
-
type SearchableKeys = 'name';
|
|
1442
|
-
type ProblemAnswerState = 'correct' | 'incorrect' | 'partially-correct' | 'unanswered';
|
|
1443
|
-
type QuizLocalState = {
|
|
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
1444
|
id: number;
|
|
1445
1445
|
isLoading: boolean;
|
|
1446
1446
|
isApiError: boolean;
|
|
@@ -1451,23 +1451,23 @@ type QuizLocalState = {
|
|
|
1451
1451
|
instantFeedback: string | null;
|
|
1452
1452
|
showAdvancedResults: boolean;
|
|
1453
1453
|
};
|
|
1454
|
-
interface QuizDescriptionData {
|
|
1454
|
+
export interface QuizDescriptionData {
|
|
1455
1455
|
quizName: string;
|
|
1456
1456
|
quizDescription: string;
|
|
1457
1457
|
questionsCount: number;
|
|
1458
1458
|
opensAt: number | null;
|
|
1459
1459
|
closesAt: number | null;
|
|
1460
1460
|
}
|
|
1461
|
-
type QuizFormType = 'copy' | 'edit' | 'create';
|
|
1462
|
-
interface QuizFormError {
|
|
1461
|
+
export type QuizFormType = 'copy' | 'edit' | 'create';
|
|
1462
|
+
export interface QuizFormError {
|
|
1463
1463
|
Error: string;
|
|
1464
1464
|
InvalidEmails?: string[];
|
|
1465
1465
|
}
|
|
1466
|
-
interface QuizFormSuccess {
|
|
1466
|
+
export interface QuizFormSuccess {
|
|
1467
1467
|
quizSessionId: number;
|
|
1468
1468
|
}
|
|
1469
|
-
type QuizFormResponse = QuizFormSuccess | QuizFormError;
|
|
1470
|
-
declare class QuizService extends BaseService {
|
|
1469
|
+
export type QuizFormResponse = QuizFormSuccess | QuizFormError;
|
|
1470
|
+
export declare class QuizService extends BaseService {
|
|
1471
1471
|
readonly serviceName: "quiz";
|
|
1472
1472
|
/**
|
|
1473
1473
|
* Where a mediafile `identifier` is served from: the API prefix without its
|
|
@@ -1601,7 +1601,7 @@ declare class QuizService extends BaseService {
|
|
|
1601
1601
|
//#endregion
|
|
1602
1602
|
//#region src/services/writing_task_service.d.ts
|
|
1603
1603
|
/** One step of a user's answer, as the client stores it. */
|
|
1604
|
-
interface StepwiseTaskDataItem {
|
|
1604
|
+
export interface StepwiseTaskDataItem {
|
|
1605
1605
|
[field: string]: unknown;
|
|
1606
1606
|
}
|
|
1607
1607
|
/**
|
|
@@ -1610,8 +1610,8 @@ interface StepwiseTaskDataItem {
|
|
|
1610
1610
|
* a list, so both shapes are allowed here rather than one being imposed on
|
|
1611
1611
|
* data that already exists.
|
|
1612
1612
|
*/
|
|
1613
|
-
type StepwiseTaskData = StepwiseTaskDataItem[] | Record<string, StepwiseTaskDataItem>;
|
|
1614
|
-
interface WritingTaskResponse {
|
|
1613
|
+
export type StepwiseTaskData = StepwiseTaskDataItem[] | Record<string, StepwiseTaskDataItem>;
|
|
1614
|
+
export interface WritingTaskResponse {
|
|
1615
1615
|
cid: string;
|
|
1616
1616
|
createdtime?: number;
|
|
1617
1617
|
dateString?: string;
|
|
@@ -1625,12 +1625,12 @@ interface WritingTaskResponse {
|
|
|
1625
1625
|
userId?: string;
|
|
1626
1626
|
}
|
|
1627
1627
|
/** The service answers with one bucket per requested cid. */
|
|
1628
|
-
interface WritingTaskResponseBucket {
|
|
1628
|
+
export interface WritingTaskResponseBucket {
|
|
1629
1629
|
Count?: number;
|
|
1630
1630
|
ScannedCount?: number;
|
|
1631
1631
|
Items?: WritingTaskResponse[];
|
|
1632
1632
|
}
|
|
1633
|
-
interface WritingTaskAnswer {
|
|
1633
|
+
export interface WritingTaskAnswer {
|
|
1634
1634
|
cid: string;
|
|
1635
1635
|
isbn: string;
|
|
1636
1636
|
pid: string;
|
|
@@ -1647,7 +1647,7 @@ interface WritingTaskAnswer {
|
|
|
1647
1647
|
* account, so both travel in every body here rather than being taken from the
|
|
1648
1648
|
* token as the highlight service does.
|
|
1649
1649
|
*/
|
|
1650
|
-
declare class WritingTaskService extends BaseService {
|
|
1650
|
+
export declare class WritingTaskService extends BaseService {
|
|
1651
1651
|
readonly serviceName: "writingTask";
|
|
1652
1652
|
/** Answers stored for the given content ids, one bucket per cid. */
|
|
1653
1653
|
getResponse({ userId, isbn, pid, cids, timeout }: {
|
|
@@ -1677,9 +1677,9 @@ declare class WritingTaskService extends BaseService {
|
|
|
1677
1677
|
}
|
|
1678
1678
|
//#endregion
|
|
1679
1679
|
//#region src/services/solr_proxy_service.d.ts
|
|
1680
|
-
declare class SolrProxyService extends BaseService {
|
|
1680
|
+
export declare class SolrProxyService extends BaseService {
|
|
1681
1681
|
readonly serviceName: "solrProxy";
|
|
1682
1682
|
}
|
|
1683
1683
|
//#endregion
|
|
1684
|
-
export {
|
|
1684
|
+
export { Response$1 as Response };
|
|
1685
1685
|
//# sourceMappingURL=index.d.cts.map
|