@quad-education/sdk 0.7.0 → 0.9.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/README.md +5 -2
- package/dist/contract-tests/apps.d.ts +617 -0
- package/dist/contract-tests/apps.js +215 -1
- package/dist/contract-tests/harness.d.ts +1 -1
- package/dist/contract-tests/harness.js +7 -0
- package/dist/contract-tests/lists-and-files.d.ts +19 -0
- package/dist/contract-tests/lists-and-files.js +279 -0
- package/dist/contract-tests/live.d.ts +3 -0
- package/dist/contract-tests/live.js +156 -0
- package/dist/contract-tests/notifications.d.ts +3 -0
- package/dist/contract-tests/notifications.js +218 -0
- package/dist/contract-tests/search-and-totals.d.ts +13 -0
- package/dist/contract-tests/search-and-totals.js +226 -0
- package/dist/contract-tests/suite.d.ts +7 -0
- package/dist/contract-tests/suite.js +180 -2
- package/dist/contract-tests/writes.d.ts +3 -0
- package/dist/contract-tests/writes.js +265 -0
- package/dist/src/base64.d.ts +3 -0
- package/dist/src/base64.js +52 -0
- package/dist/src/client/connect.d.ts +1 -0
- package/dist/src/client/connect.js +1 -0
- package/dist/src/client/create-client.js +39 -5
- package/dist/src/client/save-file.d.ts +16 -0
- package/dist/src/client/save-file.js +28 -0
- package/dist/src/client/watch.d.ts +20 -0
- package/dist/src/client/watch.js +175 -0
- package/dist/src/contract/errors.d.ts +1 -1
- package/dist/src/contract/types.d.ts +220 -10
- package/dist/src/contract/types.js +4 -1
- package/dist/src/engine/engine.d.ts +91 -2
- package/dist/src/engine/engine.js +604 -67
- package/dist/src/engine/files.d.ts +25 -0
- package/dist/src/engine/files.js +88 -0
- package/dist/src/engine/index.d.ts +1 -1
- package/dist/src/engine/memory-store.d.ts +33 -3
- package/dist/src/engine/memory-store.js +116 -8
- package/dist/src/engine/notify-content.d.ts +9 -0
- package/dist/src/engine/notify-content.js +88 -0
- package/dist/src/engine/query.d.ts +14 -2
- package/dist/src/engine/query.js +45 -13
- package/dist/src/engine/search.d.ts +8 -0
- package/dist/src/engine/search.js +32 -0
- package/dist/src/engine/state.d.ts +5 -0
- package/dist/src/engine/storage.d.ts +46 -1
- package/dist/src/engine/storage.js +46 -3
- package/dist/src/engine/store.d.ts +39 -2
- package/dist/src/engine/summary.d.ts +25 -0
- package/dist/src/engine/summary.js +107 -0
- package/dist/src/engine/validate-input.d.ts +7 -1
- package/dist/src/engine/validate-input.js +28 -1
- package/dist/src/engine/working-copy.d.ts +30 -0
- package/dist/src/engine/working-copy.js +91 -0
- package/dist/src/platform-types.d.ts +11 -1
- package/dist/src/protocol.d.ts +1 -1
- package/dist/src/protocol.js +9 -0
- package/dist/src/testing/index.d.ts +9 -0
- package/dist/src/testing/index.js +16 -1
- package/package.json +4 -4
|
@@ -28,6 +28,8 @@ export declare const TEST_SCHEMA: {
|
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
30
|
readonly indexes: readonly [readonly ["studentId"], readonly ["message"], readonly ["tone", "message"]];
|
|
31
|
+
readonly unique?: readonly (readonly string[])[];
|
|
32
|
+
readonly search?: readonly string[];
|
|
31
33
|
readonly subject?: "studentId";
|
|
32
34
|
readonly access?: {
|
|
33
35
|
readonly staff: {
|
|
@@ -58,6 +60,8 @@ export declare const TEST_SCHEMA: {
|
|
|
58
60
|
};
|
|
59
61
|
};
|
|
60
62
|
readonly indexes: readonly [];
|
|
63
|
+
readonly unique?: readonly (readonly string[])[];
|
|
64
|
+
readonly search?: readonly string[];
|
|
61
65
|
readonly subject?: "message" | "greetingId";
|
|
62
66
|
readonly access?: import("@quad-education/schema").AccessPolicy;
|
|
63
67
|
};
|
|
@@ -90,6 +94,8 @@ export declare const ROLES_SCHEMA: {
|
|
|
90
94
|
};
|
|
91
95
|
};
|
|
92
96
|
readonly indexes: readonly [];
|
|
97
|
+
readonly unique?: readonly (readonly string[])[];
|
|
98
|
+
readonly search?: readonly string[];
|
|
93
99
|
readonly subject?: "body";
|
|
94
100
|
readonly access?: {
|
|
95
101
|
readonly Staff: {
|
|
@@ -122,6 +128,8 @@ export declare const ACCESS_SCHEMA: {
|
|
|
122
128
|
};
|
|
123
129
|
};
|
|
124
130
|
readonly indexes: readonly [];
|
|
131
|
+
readonly unique?: readonly (readonly string[])[];
|
|
132
|
+
readonly search?: readonly string[];
|
|
125
133
|
readonly subject?: "title";
|
|
126
134
|
readonly access?: import("@quad-education/schema").AccessPolicy;
|
|
127
135
|
};
|
|
@@ -155,6 +163,8 @@ export declare const ACCESS_SCHEMA: {
|
|
|
155
163
|
};
|
|
156
164
|
};
|
|
157
165
|
readonly indexes: readonly [];
|
|
166
|
+
readonly unique?: readonly (readonly string[])[];
|
|
167
|
+
readonly search?: readonly string[];
|
|
158
168
|
readonly subject?: "studentId";
|
|
159
169
|
readonly access?: {
|
|
160
170
|
readonly staff: {
|
|
@@ -194,6 +204,8 @@ export declare const ACCESS_SCHEMA: {
|
|
|
194
204
|
};
|
|
195
205
|
};
|
|
196
206
|
readonly indexes: readonly [readonly ["body"]];
|
|
207
|
+
readonly unique?: readonly (readonly string[])[];
|
|
208
|
+
readonly search?: readonly string[];
|
|
197
209
|
readonly subject?: "studentId";
|
|
198
210
|
readonly access?: {
|
|
199
211
|
readonly staff: {
|
|
@@ -214,6 +226,211 @@ export declare const ACCESS_APP: {
|
|
|
214
226
|
manifest: Manifest;
|
|
215
227
|
schema: typeof ACCESS_SCHEMA;
|
|
216
228
|
};
|
|
229
|
+
/**
|
|
230
|
+
* D143: an app with roles of its own that the school assigns. Staff and students use it as themselves, a Wellbeing
|
|
231
|
+
* lead reads every note, and a Coach (anyone the school chooses, even a parent, whom the app does not otherwise
|
|
232
|
+
* serve) keeps plans.
|
|
233
|
+
*/
|
|
234
|
+
export declare const APP_ROLES_SCHEMA: {
|
|
235
|
+
readonly note: {
|
|
236
|
+
readonly fields: {
|
|
237
|
+
readonly body: {
|
|
238
|
+
readonly kind: "text";
|
|
239
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
readonly indexes: readonly [];
|
|
243
|
+
readonly unique?: readonly (readonly string[])[];
|
|
244
|
+
readonly search?: readonly string[];
|
|
245
|
+
readonly subject?: "body";
|
|
246
|
+
readonly access?: {
|
|
247
|
+
readonly staff: {
|
|
248
|
+
readonly read: "own";
|
|
249
|
+
readonly create: "own";
|
|
250
|
+
};
|
|
251
|
+
readonly student: {
|
|
252
|
+
readonly read: "own";
|
|
253
|
+
readonly create: "own";
|
|
254
|
+
};
|
|
255
|
+
readonly 'Wellbeing lead': {
|
|
256
|
+
readonly read: "all";
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
readonly plan: {
|
|
261
|
+
readonly fields: {
|
|
262
|
+
readonly title: {
|
|
263
|
+
readonly kind: "text";
|
|
264
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
readonly indexes: readonly [];
|
|
268
|
+
readonly unique?: readonly (readonly string[])[];
|
|
269
|
+
readonly search?: readonly string[];
|
|
270
|
+
readonly subject?: "title";
|
|
271
|
+
readonly access?: {
|
|
272
|
+
readonly Coach: {
|
|
273
|
+
readonly read: "all";
|
|
274
|
+
readonly create: "own";
|
|
275
|
+
readonly delete: "own";
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
export declare const APP_ROLES_APP: {
|
|
281
|
+
manifest: Manifest;
|
|
282
|
+
schema: typeof APP_ROLES_SCHEMA;
|
|
283
|
+
};
|
|
284
|
+
/**
|
|
285
|
+
* D142: rules that follow the app admin flag and a table of people the app keeps. `leads` lists staff and only app
|
|
286
|
+
* admins change it; `monitors` lists students and any staff member changes it; `signups` is a list anyone on staff
|
|
287
|
+
* can add themselves to, which is allowed.
|
|
288
|
+
*/
|
|
289
|
+
export declare const LISTED_SCHEMA: {
|
|
290
|
+
readonly leads: {
|
|
291
|
+
readonly fields: {
|
|
292
|
+
readonly staffId: {
|
|
293
|
+
readonly kind: "ref";
|
|
294
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
295
|
+
} & {
|
|
296
|
+
to: "school.staff";
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
readonly indexes: readonly [];
|
|
300
|
+
readonly unique?: readonly (readonly string[])[];
|
|
301
|
+
readonly search?: readonly string[];
|
|
302
|
+
readonly subject?: "staffId";
|
|
303
|
+
readonly access?: {
|
|
304
|
+
readonly staff: {
|
|
305
|
+
readonly read: "all";
|
|
306
|
+
readonly create: "appAdmin";
|
|
307
|
+
readonly update: "appAdmin";
|
|
308
|
+
readonly delete: "appAdmin";
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
readonly checkin: {
|
|
313
|
+
readonly fields: {
|
|
314
|
+
readonly mood: {
|
|
315
|
+
readonly kind: "text";
|
|
316
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
readonly indexes: readonly [];
|
|
320
|
+
readonly unique?: readonly (readonly string[])[];
|
|
321
|
+
readonly search?: readonly string[];
|
|
322
|
+
readonly subject?: "mood";
|
|
323
|
+
readonly access?: {
|
|
324
|
+
readonly staff: {
|
|
325
|
+
readonly read: readonly ["own", "listed:leads"];
|
|
326
|
+
readonly create: "own";
|
|
327
|
+
readonly delete: readonly ["own", "appAdmin"];
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
readonly setting: {
|
|
332
|
+
readonly fields: {
|
|
333
|
+
readonly label: {
|
|
334
|
+
readonly kind: "text";
|
|
335
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
readonly indexes: readonly [];
|
|
339
|
+
readonly unique?: readonly (readonly string[])[];
|
|
340
|
+
readonly search?: readonly string[];
|
|
341
|
+
readonly subject?: "label";
|
|
342
|
+
readonly access?: {
|
|
343
|
+
readonly staff: {
|
|
344
|
+
readonly read: "all";
|
|
345
|
+
readonly create: "appAdmin";
|
|
346
|
+
readonly update: "appAdmin";
|
|
347
|
+
readonly delete: "appAdmin";
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
readonly monitors: {
|
|
352
|
+
readonly fields: {
|
|
353
|
+
readonly studentId: {
|
|
354
|
+
readonly kind: "ref";
|
|
355
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
356
|
+
} & {
|
|
357
|
+
to: "school.students";
|
|
358
|
+
};
|
|
359
|
+
readonly addedBy: {
|
|
360
|
+
readonly kind: "ref";
|
|
361
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
362
|
+
} & {
|
|
363
|
+
to: "school.staff";
|
|
364
|
+
} & {
|
|
365
|
+
readonly optional: true;
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
readonly indexes: readonly [];
|
|
369
|
+
readonly unique?: readonly (readonly string[])[];
|
|
370
|
+
readonly search?: readonly string[];
|
|
371
|
+
readonly subject?: "studentId" | "addedBy";
|
|
372
|
+
readonly access?: import("@quad-education/schema").AccessPolicy;
|
|
373
|
+
};
|
|
374
|
+
readonly loan: {
|
|
375
|
+
readonly fields: {
|
|
376
|
+
readonly title: {
|
|
377
|
+
readonly kind: "text";
|
|
378
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
readonly indexes: readonly [];
|
|
382
|
+
readonly unique?: readonly (readonly string[])[];
|
|
383
|
+
readonly search?: readonly string[];
|
|
384
|
+
readonly subject?: "title";
|
|
385
|
+
readonly access?: {
|
|
386
|
+
readonly staff: {
|
|
387
|
+
readonly read: "all";
|
|
388
|
+
readonly create: "all";
|
|
389
|
+
};
|
|
390
|
+
readonly student: {
|
|
391
|
+
readonly read: readonly ["own", "listed:monitors"];
|
|
392
|
+
readonly create: "own";
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
};
|
|
396
|
+
readonly signups: {
|
|
397
|
+
readonly fields: {
|
|
398
|
+
readonly staffId: {
|
|
399
|
+
readonly kind: "ref";
|
|
400
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
401
|
+
} & {
|
|
402
|
+
to: "school.staff";
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
readonly indexes: readonly [];
|
|
406
|
+
readonly unique?: readonly (readonly string[])[];
|
|
407
|
+
readonly search?: readonly string[];
|
|
408
|
+
readonly subject?: "staffId";
|
|
409
|
+
readonly access?: import("@quad-education/schema").AccessPolicy;
|
|
410
|
+
};
|
|
411
|
+
readonly roster: {
|
|
412
|
+
readonly fields: {
|
|
413
|
+
readonly day: {
|
|
414
|
+
readonly kind: "text";
|
|
415
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
readonly indexes: readonly [];
|
|
419
|
+
readonly unique?: readonly (readonly string[])[];
|
|
420
|
+
readonly search?: readonly string[];
|
|
421
|
+
readonly subject?: "day";
|
|
422
|
+
readonly access?: {
|
|
423
|
+
readonly staff: {
|
|
424
|
+
readonly read: "listed:signups";
|
|
425
|
+
readonly create: "listed:signups";
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
export declare const LISTED_APP: {
|
|
431
|
+
manifest: Manifest;
|
|
432
|
+
schema: typeof LISTED_SCHEMA;
|
|
433
|
+
};
|
|
217
434
|
/** A staff-only log that test jobs write to, so tests can see what ran and as whom. */
|
|
218
435
|
export declare const JOBS_SCHEMA: {
|
|
219
436
|
/** What a job could see and do, recorded by the job itself (D7 run-as tests). */
|
|
@@ -241,6 +458,8 @@ export declare const JOBS_SCHEMA: {
|
|
|
241
458
|
};
|
|
242
459
|
};
|
|
243
460
|
readonly indexes: readonly [];
|
|
461
|
+
readonly unique?: readonly (readonly string[])[];
|
|
462
|
+
readonly search?: readonly string[];
|
|
244
463
|
readonly subject?: "runId" | "principal" | "studentsSeen" | "otherFamilyVisible" | "staffOnlyWriteAllowed";
|
|
245
464
|
readonly access?: {
|
|
246
465
|
readonly staff: {
|
|
@@ -283,6 +502,8 @@ export declare const JOBS_SCHEMA: {
|
|
|
283
502
|
};
|
|
284
503
|
};
|
|
285
504
|
readonly indexes: readonly [];
|
|
505
|
+
readonly unique?: readonly (readonly string[])[];
|
|
506
|
+
readonly search?: readonly string[];
|
|
286
507
|
readonly subject?: "note" | "runId" | "jobName" | "scheduledFor" | "principal";
|
|
287
508
|
readonly access?: import("@quad-education/schema").AccessPolicy;
|
|
288
509
|
};
|
|
@@ -312,6 +533,8 @@ export declare const JOBS_SCHEMA: {
|
|
|
312
533
|
};
|
|
313
534
|
};
|
|
314
535
|
readonly indexes: readonly [readonly ["studentId"], readonly ["message"], readonly ["tone", "message"]];
|
|
536
|
+
readonly unique?: readonly (readonly string[])[];
|
|
537
|
+
readonly search?: readonly string[];
|
|
315
538
|
readonly subject?: "studentId";
|
|
316
539
|
readonly access?: {
|
|
317
540
|
readonly staff: {
|
|
@@ -342,6 +565,8 @@ export declare const JOBS_SCHEMA: {
|
|
|
342
565
|
};
|
|
343
566
|
};
|
|
344
567
|
readonly indexes: readonly [];
|
|
568
|
+
readonly unique?: readonly (readonly string[])[];
|
|
569
|
+
readonly search?: readonly string[];
|
|
345
570
|
readonly subject?: "message" | "greetingId";
|
|
346
571
|
readonly access?: import("@quad-education/schema").AccessPolicy;
|
|
347
572
|
};
|
|
@@ -366,4 +591,396 @@ export declare const JOBS_APP: {
|
|
|
366
591
|
schema: typeof JOBS_SCHEMA;
|
|
367
592
|
jobs: typeof TEST_JOBS;
|
|
368
593
|
};
|
|
594
|
+
/**
|
|
595
|
+
* Lists and files (D147, D148). Staff reach every incident; a student reaches the ones they wrote, so one student
|
|
596
|
+
* can't read another's files. `staffNotes` is hidden from students by `visibleTo`.
|
|
597
|
+
*/
|
|
598
|
+
export declare const FILES_SCHEMA: {
|
|
599
|
+
readonly incident: {
|
|
600
|
+
readonly fields: {
|
|
601
|
+
readonly summary: {
|
|
602
|
+
readonly kind: "text";
|
|
603
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
604
|
+
};
|
|
605
|
+
readonly students: {
|
|
606
|
+
readonly kind: "list";
|
|
607
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
608
|
+
} & {
|
|
609
|
+
of: Omit<{
|
|
610
|
+
readonly kind: "ref";
|
|
611
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
612
|
+
} & {
|
|
613
|
+
to: "school.students";
|
|
614
|
+
}, "optional" | "tier" | "visibleTo">;
|
|
615
|
+
} & {
|
|
616
|
+
readonly optional: true;
|
|
617
|
+
};
|
|
618
|
+
readonly tags: {
|
|
619
|
+
readonly kind: "list";
|
|
620
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
621
|
+
} & {
|
|
622
|
+
of: Omit<{
|
|
623
|
+
readonly kind: "text";
|
|
624
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
625
|
+
}, "optional" | "tier" | "visibleTo">;
|
|
626
|
+
} & {
|
|
627
|
+
readonly optional: true;
|
|
628
|
+
};
|
|
629
|
+
readonly days: {
|
|
630
|
+
readonly kind: "list";
|
|
631
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
632
|
+
} & {
|
|
633
|
+
of: Omit<{
|
|
634
|
+
readonly kind: "enum";
|
|
635
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
636
|
+
} & {
|
|
637
|
+
values: readonly ["mon", "tue", "wed"];
|
|
638
|
+
}, "optional" | "tier" | "visibleTo">;
|
|
639
|
+
} & {
|
|
640
|
+
readonly optional: true;
|
|
641
|
+
};
|
|
642
|
+
readonly scores: {
|
|
643
|
+
readonly kind: "list";
|
|
644
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
645
|
+
} & {
|
|
646
|
+
of: Omit<{
|
|
647
|
+
readonly kind: "number";
|
|
648
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
649
|
+
}, "optional" | "tier" | "visibleTo">;
|
|
650
|
+
} & {
|
|
651
|
+
readonly optional: true;
|
|
652
|
+
};
|
|
653
|
+
readonly related: {
|
|
654
|
+
readonly kind: "list";
|
|
655
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
656
|
+
} & {
|
|
657
|
+
of: Omit<{
|
|
658
|
+
readonly kind: "ref";
|
|
659
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
660
|
+
} & {
|
|
661
|
+
to: "incident";
|
|
662
|
+
}, "optional" | "tier" | "visibleTo">;
|
|
663
|
+
} & {
|
|
664
|
+
readonly optional: true;
|
|
665
|
+
};
|
|
666
|
+
readonly photo: {
|
|
667
|
+
readonly kind: "file";
|
|
668
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
669
|
+
} & {
|
|
670
|
+
readonly accept: readonly ["image"];
|
|
671
|
+
} & {
|
|
672
|
+
readonly optional: true;
|
|
673
|
+
};
|
|
674
|
+
readonly evidence: {
|
|
675
|
+
readonly kind: "list";
|
|
676
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
677
|
+
} & {
|
|
678
|
+
of: Omit<{
|
|
679
|
+
readonly kind: "file";
|
|
680
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
681
|
+
} & object, "optional" | "tier" | "visibleTo">;
|
|
682
|
+
} & {
|
|
683
|
+
readonly optional: true;
|
|
684
|
+
};
|
|
685
|
+
readonly staffNotes: {
|
|
686
|
+
readonly kind: "list";
|
|
687
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
688
|
+
} & {
|
|
689
|
+
of: Omit<{
|
|
690
|
+
readonly kind: "file";
|
|
691
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
692
|
+
} & object, "optional" | "tier" | "visibleTo">;
|
|
693
|
+
} & {
|
|
694
|
+
readonly optional: true;
|
|
695
|
+
} & {
|
|
696
|
+
readonly visibleTo: readonly ["staff"];
|
|
697
|
+
};
|
|
698
|
+
};
|
|
699
|
+
readonly indexes: readonly [readonly ["summary"]];
|
|
700
|
+
readonly unique?: readonly (readonly string[])[];
|
|
701
|
+
readonly search?: readonly string[];
|
|
702
|
+
readonly subject?: "students" | "summary" | "related" | "days" | "tags" | "scores" | "photo" | "evidence" | "staffNotes";
|
|
703
|
+
readonly access?: {
|
|
704
|
+
readonly staff: {
|
|
705
|
+
readonly read: "all";
|
|
706
|
+
readonly create: "all";
|
|
707
|
+
readonly update: "all";
|
|
708
|
+
readonly delete: "all";
|
|
709
|
+
};
|
|
710
|
+
readonly student: {
|
|
711
|
+
readonly read: "own";
|
|
712
|
+
readonly create: "own";
|
|
713
|
+
readonly update: "own";
|
|
714
|
+
readonly delete: "own";
|
|
715
|
+
};
|
|
716
|
+
};
|
|
717
|
+
};
|
|
718
|
+
};
|
|
719
|
+
export declare const FILES_APP: {
|
|
720
|
+
manifest: Manifest;
|
|
721
|
+
schema: typeof FILES_SCHEMA;
|
|
722
|
+
};
|
|
723
|
+
/**
|
|
724
|
+
* Unique rules, batches and conditional writes (D149, D150). A student reaches only the bookings they made, so a
|
|
725
|
+
* unique rule is seen refusing a value held by a record the writer cannot read.
|
|
726
|
+
*/
|
|
727
|
+
export declare const WRITES_SCHEMA: {
|
|
728
|
+
readonly slot: {
|
|
729
|
+
readonly fields: {
|
|
730
|
+
readonly label: {
|
|
731
|
+
readonly kind: "text";
|
|
732
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
733
|
+
};
|
|
734
|
+
readonly status: {
|
|
735
|
+
readonly kind: "enum";
|
|
736
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
737
|
+
} & {
|
|
738
|
+
values: readonly ["free", "taken"];
|
|
739
|
+
};
|
|
740
|
+
readonly seats: {
|
|
741
|
+
readonly kind: "number";
|
|
742
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
743
|
+
} & {
|
|
744
|
+
readonly optional: true;
|
|
745
|
+
};
|
|
746
|
+
readonly secret: {
|
|
747
|
+
readonly kind: "text";
|
|
748
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
749
|
+
} & {
|
|
750
|
+
readonly optional: true;
|
|
751
|
+
} & {
|
|
752
|
+
readonly visibleTo: readonly ["staff"];
|
|
753
|
+
};
|
|
754
|
+
};
|
|
755
|
+
readonly indexes: readonly [];
|
|
756
|
+
readonly unique?: readonly (readonly string[])[];
|
|
757
|
+
readonly search?: readonly string[];
|
|
758
|
+
readonly subject?: "status" | "label" | "seats" | "secret";
|
|
759
|
+
readonly access?: {
|
|
760
|
+
readonly staff: {
|
|
761
|
+
readonly read: "all";
|
|
762
|
+
readonly create: "all";
|
|
763
|
+
readonly update: "all";
|
|
764
|
+
readonly delete: "all";
|
|
765
|
+
};
|
|
766
|
+
};
|
|
767
|
+
};
|
|
768
|
+
readonly booking: {
|
|
769
|
+
readonly fields: {
|
|
770
|
+
readonly slotLabel: {
|
|
771
|
+
readonly kind: "text";
|
|
772
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
773
|
+
};
|
|
774
|
+
readonly who: {
|
|
775
|
+
readonly kind: "text";
|
|
776
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
777
|
+
} & {
|
|
778
|
+
readonly optional: true;
|
|
779
|
+
};
|
|
780
|
+
readonly term: {
|
|
781
|
+
readonly kind: "text";
|
|
782
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
783
|
+
} & {
|
|
784
|
+
readonly optional: true;
|
|
785
|
+
};
|
|
786
|
+
readonly proof: {
|
|
787
|
+
readonly kind: "file";
|
|
788
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
789
|
+
} & object & {
|
|
790
|
+
readonly optional: true;
|
|
791
|
+
};
|
|
792
|
+
};
|
|
793
|
+
readonly indexes: readonly [];
|
|
794
|
+
readonly unique?: readonly (readonly string[])[];
|
|
795
|
+
readonly search?: readonly string[];
|
|
796
|
+
readonly subject?: "who" | "slotLabel" | "term" | "proof";
|
|
797
|
+
readonly access?: {
|
|
798
|
+
readonly staff: {
|
|
799
|
+
readonly read: "all";
|
|
800
|
+
readonly create: "all";
|
|
801
|
+
readonly update: "all";
|
|
802
|
+
readonly delete: "all";
|
|
803
|
+
};
|
|
804
|
+
readonly student: {
|
|
805
|
+
readonly read: "own";
|
|
806
|
+
readonly create: "own";
|
|
807
|
+
readonly update: "own";
|
|
808
|
+
readonly delete: "own";
|
|
809
|
+
};
|
|
810
|
+
};
|
|
811
|
+
};
|
|
812
|
+
};
|
|
813
|
+
export declare const WRITES_APP: {
|
|
814
|
+
manifest: Manifest;
|
|
815
|
+
schema: typeof WRITES_SCHEMA;
|
|
816
|
+
};
|
|
817
|
+
/**
|
|
818
|
+
* Formatted notifications and attachments (D151, D152). `staffNote` is hidden from students and parents, and
|
|
819
|
+
* `review` is at a staff-only level, so neither may be sent to them.
|
|
820
|
+
*/
|
|
821
|
+
export declare const NOTIFY_SCHEMA: {
|
|
822
|
+
readonly notice: {
|
|
823
|
+
readonly fields: {
|
|
824
|
+
readonly title: {
|
|
825
|
+
readonly kind: "text";
|
|
826
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
827
|
+
};
|
|
828
|
+
readonly slip: {
|
|
829
|
+
readonly kind: "file";
|
|
830
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
831
|
+
} & object & {
|
|
832
|
+
readonly optional: true;
|
|
833
|
+
};
|
|
834
|
+
readonly pages: {
|
|
835
|
+
readonly kind: "list";
|
|
836
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
837
|
+
} & {
|
|
838
|
+
of: Omit<{
|
|
839
|
+
readonly kind: "file";
|
|
840
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
841
|
+
} & object, "optional" | "tier" | "visibleTo">;
|
|
842
|
+
} & {
|
|
843
|
+
readonly optional: true;
|
|
844
|
+
};
|
|
845
|
+
readonly staffNote: {
|
|
846
|
+
readonly kind: "file";
|
|
847
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
848
|
+
} & object & {
|
|
849
|
+
readonly optional: true;
|
|
850
|
+
} & {
|
|
851
|
+
readonly visibleTo: readonly ["staff"];
|
|
852
|
+
};
|
|
853
|
+
readonly review: {
|
|
854
|
+
readonly kind: "file";
|
|
855
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
856
|
+
} & object & {
|
|
857
|
+
readonly optional: true;
|
|
858
|
+
};
|
|
859
|
+
};
|
|
860
|
+
readonly indexes: readonly [];
|
|
861
|
+
readonly unique?: readonly (readonly string[])[];
|
|
862
|
+
readonly search?: readonly string[];
|
|
863
|
+
readonly subject?: "title" | "staffNote" | "slip" | "pages" | "review";
|
|
864
|
+
readonly access?: {
|
|
865
|
+
readonly staff: {
|
|
866
|
+
readonly read: "all";
|
|
867
|
+
readonly create: "all";
|
|
868
|
+
readonly update: "all";
|
|
869
|
+
readonly delete: "all";
|
|
870
|
+
};
|
|
871
|
+
readonly student: {
|
|
872
|
+
readonly read: "own";
|
|
873
|
+
readonly create: "own";
|
|
874
|
+
};
|
|
875
|
+
};
|
|
876
|
+
};
|
|
877
|
+
};
|
|
878
|
+
export declare const NOTIFY_APP: {
|
|
879
|
+
manifest: Manifest;
|
|
880
|
+
schema: typeof NOTIFY_SCHEMA;
|
|
881
|
+
};
|
|
882
|
+
/**
|
|
883
|
+
* Search and totals (D153, D154). `secret` and `margin` are hidden from students, so neither a search nor a
|
|
884
|
+
* total may tell a student anything about them. `plain` names no searchable fields.
|
|
885
|
+
*/
|
|
886
|
+
export declare const SEARCH_SCHEMA: {
|
|
887
|
+
readonly request: {
|
|
888
|
+
readonly fields: {
|
|
889
|
+
readonly title: {
|
|
890
|
+
readonly kind: "text";
|
|
891
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
892
|
+
};
|
|
893
|
+
readonly body: {
|
|
894
|
+
readonly kind: "text";
|
|
895
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
896
|
+
} & {
|
|
897
|
+
readonly optional: true;
|
|
898
|
+
};
|
|
899
|
+
readonly tags: {
|
|
900
|
+
readonly kind: "list";
|
|
901
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
902
|
+
} & {
|
|
903
|
+
of: Omit<{
|
|
904
|
+
readonly kind: "text";
|
|
905
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
906
|
+
}, "optional" | "tier" | "visibleTo">;
|
|
907
|
+
} & {
|
|
908
|
+
readonly optional: true;
|
|
909
|
+
};
|
|
910
|
+
readonly secret: {
|
|
911
|
+
readonly kind: "text";
|
|
912
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
913
|
+
} & {
|
|
914
|
+
readonly optional: true;
|
|
915
|
+
} & {
|
|
916
|
+
readonly visibleTo: readonly ["staff"];
|
|
917
|
+
};
|
|
918
|
+
readonly status: {
|
|
919
|
+
readonly kind: "enum";
|
|
920
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
921
|
+
} & {
|
|
922
|
+
values: readonly ["open", "closed"];
|
|
923
|
+
};
|
|
924
|
+
readonly term: {
|
|
925
|
+
readonly kind: "text";
|
|
926
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
927
|
+
} & {
|
|
928
|
+
readonly optional: true;
|
|
929
|
+
};
|
|
930
|
+
readonly cost: {
|
|
931
|
+
readonly kind: "number";
|
|
932
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
933
|
+
} & {
|
|
934
|
+
readonly optional: true;
|
|
935
|
+
};
|
|
936
|
+
readonly margin: {
|
|
937
|
+
readonly kind: "number";
|
|
938
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
939
|
+
} & {
|
|
940
|
+
readonly optional: true;
|
|
941
|
+
} & {
|
|
942
|
+
readonly visibleTo: readonly ["staff"];
|
|
943
|
+
};
|
|
944
|
+
readonly proof: {
|
|
945
|
+
readonly kind: "file";
|
|
946
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
947
|
+
} & object & {
|
|
948
|
+
readonly optional: true;
|
|
949
|
+
};
|
|
950
|
+
};
|
|
951
|
+
readonly indexes: readonly [readonly ["title"], readonly ["cost"]];
|
|
952
|
+
readonly unique?: readonly (readonly string[])[];
|
|
953
|
+
readonly search?: readonly string[];
|
|
954
|
+
readonly subject?: "title" | "status" | "body" | "tags" | "secret" | "term" | "proof" | "cost" | "margin";
|
|
955
|
+
readonly access?: {
|
|
956
|
+
readonly staff: {
|
|
957
|
+
readonly read: "all";
|
|
958
|
+
readonly create: "all";
|
|
959
|
+
readonly update: "all";
|
|
960
|
+
readonly delete: "all";
|
|
961
|
+
};
|
|
962
|
+
readonly student: {
|
|
963
|
+
readonly read: "own";
|
|
964
|
+
readonly create: "own";
|
|
965
|
+
};
|
|
966
|
+
};
|
|
967
|
+
};
|
|
968
|
+
readonly plain: {
|
|
969
|
+
readonly fields: {
|
|
970
|
+
readonly label: {
|
|
971
|
+
readonly kind: "text";
|
|
972
|
+
readonly tier: import("@quad-education/canonical").Tier;
|
|
973
|
+
};
|
|
974
|
+
};
|
|
975
|
+
readonly indexes: readonly [];
|
|
976
|
+
readonly unique?: readonly (readonly string[])[];
|
|
977
|
+
readonly search?: readonly string[];
|
|
978
|
+
readonly subject?: "label";
|
|
979
|
+
readonly access?: import("@quad-education/schema").AccessPolicy;
|
|
980
|
+
};
|
|
981
|
+
};
|
|
982
|
+
export declare const SEARCH_APP: {
|
|
983
|
+
manifest: Manifest;
|
|
984
|
+
schema: typeof SEARCH_SCHEMA;
|
|
985
|
+
};
|
|
369
986
|
export {};
|