@pitcher/js-api 1.27.3 → 1.28.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/js-api.esm.js +256 -2
- package/js-api.esm.js.map +1 -1
- package/js-api.umd.min.js +11 -11
- package/js-api.umd.min.js.map +1 -1
- package/lib/apps/canvas-builder/components/ui/DynamicContent/dynamicContent.util.d.ts +36 -0
- package/lib/apps/canvas-builder/components/ui/DynamicContent/dynamicContent.util.spec.d.ts +1 -0
- package/lib/apps/canvas-builder/composables/useCanvas.d.ts +63 -0
- package/lib/apps/canvas-builder/composables/useCanvasBlocks.d.ts +14 -0
- package/lib/apps/canvas-builder/composables/useCanvasHistory.d.ts +14 -0
- package/lib/apps/canvas-builder/composables/usePopupApps.d.ts +28 -0
- package/lib/apps/canvas-builder/types/canvas.d.ts +7 -0
- package/lib/apps/canvas-builder/util/canvas.util.d.ts +11 -0
- package/lib/components/CFileViewer/pdf/CFileViewer.pdf.util.d.ts +17 -0
- package/lib/components/CFileViewer/pdf/CFileViewer.pdf.util.spec.d.ts +1 -0
- package/lib/components/CRichTextEditor/components/CTextTypeSelect.test.d.ts +1 -0
- package/lib/composables/useCourseOnlyApps.d.ts +11 -0
- package/lib/sdk/api/HighLevelApi.d.ts +4 -0
- package/lib/sdk/api/modules/appsDb.d.ts +57 -0
- package/lib/sdk/api/modules/appsDb.spec.d.ts +1 -0
- package/lib/sdk/api/modules/index.d.ts +1 -0
- package/lib/sdk/main.d.ts +12 -0
- package/lib/sdk/payload.types.d.ts +73 -0
- package/lib/types/app.d.ts +14 -0
- package/package.json +1 -1
|
@@ -568,6 +568,79 @@ export interface PiaSearchAnswerPayload {
|
|
|
568
568
|
*/
|
|
569
569
|
max_tokens?: number;
|
|
570
570
|
}
|
|
571
|
+
/**
|
|
572
|
+
* A single AppsDB entry (next-core `core_appsdb_entries` row / iOS offline mirror record).
|
|
573
|
+
*/
|
|
574
|
+
export interface AppsDbEntry {
|
|
575
|
+
/**
|
|
576
|
+
* Unique identifier (ULID).
|
|
577
|
+
*/
|
|
578
|
+
id: string;
|
|
579
|
+
/**
|
|
580
|
+
* Object type the entry belongs to (e.g. `personalfolders`, `favorite`).
|
|
581
|
+
*/
|
|
582
|
+
type: string;
|
|
583
|
+
user_id?: number | null;
|
|
584
|
+
org_id?: string | null;
|
|
585
|
+
instance_id?: string | null;
|
|
586
|
+
/**
|
|
587
|
+
* Opaque application data. Keys are stored verbatim (no casing transformation).
|
|
588
|
+
*/
|
|
589
|
+
data: Record<string, any>;
|
|
590
|
+
created_at?: string;
|
|
591
|
+
updated_at?: string;
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* Payload for `appsDbGetEntries` — list AppsDB entries of a type.
|
|
595
|
+
*/
|
|
596
|
+
export interface AppsDbGetEntriesPayload {
|
|
597
|
+
/**
|
|
598
|
+
* The object type to read. On iOS only types allowlisted via the
|
|
599
|
+
* `offline_appsdb_types` instance/org setting are served from the offline mirror.
|
|
600
|
+
*/
|
|
601
|
+
type: string;
|
|
602
|
+
user_id?: number;
|
|
603
|
+
instance_id?: string;
|
|
604
|
+
limit?: number;
|
|
605
|
+
offset?: number;
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* Entry-list result shared by `appsDbGetEntries` and `appsDbPsql`.
|
|
609
|
+
*/
|
|
610
|
+
export interface AppsDbEntriesResult {
|
|
611
|
+
entries: AppsDbEntry[];
|
|
612
|
+
totalCount?: number;
|
|
613
|
+
hasMore?: boolean;
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
616
|
+
* Payload for `appsDbUpsertEntry`. With `id` the entry is updated (the server
|
|
617
|
+
* deep-merges `data`); without `id` a new entry is created.
|
|
618
|
+
*/
|
|
619
|
+
export interface AppsDbUpsertEntryPayload {
|
|
620
|
+
id?: string;
|
|
621
|
+
type?: string;
|
|
622
|
+
user_id?: number;
|
|
623
|
+
instance_id?: string;
|
|
624
|
+
/**
|
|
625
|
+
* Create an instance-wide entry with no user attribution (allowlist-gated
|
|
626
|
+
* server-side, see next-core `appsdb/ownership.ts`).
|
|
627
|
+
*/
|
|
628
|
+
no_user_id?: boolean;
|
|
629
|
+
data: Record<string, any>;
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Payload for `appsDbDeleteEntry`.
|
|
633
|
+
*/
|
|
634
|
+
export interface AppsDbDeleteEntryPayload {
|
|
635
|
+
id: string;
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* Payload for `appsDbPsql` — a PSQL (SQL-like) query against AppsDB, e.g.
|
|
639
|
+
* `SELECT * FROM favorite WHERE user_id = 1 AND data.file_id = 'abc'`.
|
|
640
|
+
*/
|
|
641
|
+
export interface AppsDbPsqlPayload {
|
|
642
|
+
query: string;
|
|
643
|
+
}
|
|
571
644
|
/**
|
|
572
645
|
* Unified `piaSearchAnswer` result across both serving paths.
|
|
573
646
|
*/
|
package/lib/types/app.d.ts
CHANGED
|
@@ -17,6 +17,13 @@ export type ModuleSettingsField = {
|
|
|
17
17
|
help_text?: string;
|
|
18
18
|
is_required?: boolean;
|
|
19
19
|
options?: ModuleSettingsOption[];
|
|
20
|
+
/**
|
|
21
|
+
* For SELECT fields whose options aren't known at publish time: a key the host resolves to a live
|
|
22
|
+
* option list injected via `provide('dynamicFieldOptions', { <key>: Option[] })`. The Embeddable
|
|
23
|
+
* settings panel uses that resolved list in place of the field's static `options`. Used by assessment-canvas (T2.4):
|
|
24
|
+
* `dynamic_options: 'assessments'` → the instance's assessments, forwarded by ld-app.
|
|
25
|
+
*/
|
|
26
|
+
dynamic_options?: string;
|
|
20
27
|
};
|
|
21
28
|
export type ModuleSettingsSection = {
|
|
22
29
|
label?: string;
|
|
@@ -43,6 +50,13 @@ export type Module = {
|
|
|
43
50
|
enabled: boolean;
|
|
44
51
|
headless?: boolean;
|
|
45
52
|
auto_install?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* L&D-only marker (module.canvas). When true, the app is offered in the Add-Component /
|
|
55
|
+
* Embeddable pickers ONLY where the host opts in via `provide('allowCourseOnlyApps', true)` —
|
|
56
|
+
* i.e. the L&D course host — and hidden in normal sales / DSR canvases where it can't function.
|
|
57
|
+
* Used by the assessment-canvas wrap app (T2.4 / PIT-6978).
|
|
58
|
+
*/
|
|
59
|
+
course_only?: boolean;
|
|
46
60
|
entry?: string;
|
|
47
61
|
settings?: ModuleSettings;
|
|
48
62
|
defaults: {
|