@pitcher/js-api 1.29.0 → 1.30.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 +408 -39
- package/js-api.esm.js.map +1 -1
- package/js-api.umd.min.js +32 -11
- package/js-api.umd.min.js.map +1 -1
- package/lib/ai-tasks/__tests__/weekly-focus.spec.d.ts +1 -0
- package/lib/ai-tasks/weekly-focus.d.ts +241 -0
- package/lib/apps/browser/appTypes.d.ts +28 -0
- package/lib/apps/browser/stores/api.d.ts +6 -1
- package/lib/apps/browser/stores/app.d.ts +5 -0
- package/lib/apps/browser/stores/app.selectionPruneScope.test.d.ts +1 -0
- package/lib/apps/browser/stores/upload.d.ts +26 -1
- package/lib/apps/browser/stores/upload.types.d.ts +9 -0
- package/lib/apps/browser/util/lifecycle.d.ts +57 -0
- package/lib/apps/browser/util/lifecycle.test.d.ts +1 -0
- package/lib/apps/canvas-builder/components/ui/DynamicContent/useDynamicContent.d.ts +2 -0
- package/lib/apps/canvas-builder/components/ui/Multimedia/Multimedia.ldAsset.spec.d.ts +1 -0
- package/lib/apps/canvas-builder/composables/useCanvas.d.ts +203 -1
- package/lib/apps/canvas-builder/composables/useCanvas.saveEcho.spec.d.ts +1 -0
- package/lib/apps/canvas-builder/composables/useCanvasBlocks.d.ts +36 -0
- package/lib/apps/canvas-builder/composables/useCanvasExit.d.ts +1 -0
- package/lib/apps/canvas-builder/composables/useCanvasHistory.d.ts +36 -0
- package/lib/apps/canvas-builder/composables/useCanvasTheme.d.ts +2 -0
- package/lib/apps/canvas-builder/composables/useContentSelector.d.ts +8 -1
- package/lib/apps/canvas-builder/composables/useInstalledEmbeddables.d.ts +1 -1
- package/lib/apps/canvas-builder/composables/useNavigatorDrawer.d.ts +2 -0
- package/lib/apps/canvas-builder/composables/usePopupApps.d.ts +2 -0
- package/lib/apps/canvas-builder/types/canvas.d.ts +53 -3
- package/lib/apps/canvas-builder/util/completionWizard.util.d.ts +107 -0
- package/lib/apps/canvas-builder/util/completionWizard.util.test.d.ts +1 -0
- package/lib/apps/canvas-builder/util/fullscreenMode.util.d.ts +7 -0
- package/lib/apps/canvas-builder/util/fullscreenMode.util.test.d.ts +1 -0
- package/lib/apps/canvas-builder/util/lazySections.util.d.ts +35 -0
- package/lib/apps/canvas-builder/util/lazySections.util.test.d.ts +1 -0
- package/lib/apps/collection-player/composables/collection-navigation.util.d.ts +27 -0
- package/lib/apps/collection-player/composables/collection-navigation.util.spec.d.ts +1 -0
- package/lib/apps/collection-player/stores/app.store.d.ts +3 -0
- package/lib/apps/content-selector/components/Assets.uploaderRefresh.spec.d.ts +1 -0
- package/lib/apps/content-selector/stores/app.d.ts +1 -1
- package/lib/components/CFileViewer/pdf/CFileViewer.pdf.annotations.use.d.ts +5 -1
- package/lib/components/CFileViewer/pdf/CFileViewer.pdf.formFields.use.d.ts +8 -0
- package/lib/components/CFileViewer/pdf/CFileViewer.pdf.link.use.d.ts +1 -1
- package/lib/components/CFileViewer/pdf/CFileViewer.pdf.overlayItems.use.d.ts +1 -1
- package/lib/components/CFileViewer/pdf/CFileViewer.pdf.use.d.ts +4 -9
- package/lib/components/CFileViewer/pdf/CFileViewer.pdf.util.d.ts +1 -1
- package/lib/components/CFileViewer/pdf/CFileViewerFullscreen.pdf.use.d.ts +1 -1
- package/lib/components/CFileViewer/pdf/__tests__/CFileViewer.pdf.annotations.text.test.d.ts +1 -0
- package/lib/components/savedCanvases/CSavedCanvasesManagement.use.d.ts +1 -0
- package/lib/composables/useCourseOnlyApps.d.ts +1 -1
- package/lib/composables/usePdfInterpolation.d.ts +2 -2
- package/lib/composables/useWindowEvents.d.ts +1 -1
- package/lib/constants/cdp.const.d.ts +1 -0
- package/lib/constants/translationLanguages.const.d.ts +72 -0
- package/lib/main.lib.d.ts +2 -0
- package/lib/sdk/api/HighLevelApi.d.ts +17 -6
- package/lib/sdk/api/modules/ai.d.ts +43 -1
- package/lib/sdk/api/modules/ai.spec.d.ts +1 -0
- package/lib/sdk/api/modules/canvas.d.ts +8 -0
- package/lib/sdk/api/modules/ui/types.ui.d.ts +7 -0
- package/lib/sdk/main.d.ts +8 -0
- package/lib/sdk/payload.types.d.ts +104 -0
- package/lib/types/ai-tasks.const.d.ts +39 -1
- package/lib/types/call.d.ts +14 -0
- package/lib/types/launchDarkly.types.d.ts +1 -3
- package/lib/types/organizationSettings.types.d.ts +10 -0
- package/lib/util/user.d.ts +18 -0
- package/lib/util/user.test.d.ts +1 -0
- package/package.json +1 -1
- package/types/openapi/models/DeletedEnvironment.d.ts +0 -1
- package/types/openapi/models/Environment.d.ts +0 -1
- package/types/openapi/models/EnvironmentRequest.d.ts +0 -1
- package/types/openapi/models/File.d.ts +2 -0
- package/types/openapi/models/FileRetrieve.d.ts +2 -0
- package/types/openapi/models/PatchedEnvironmentRequest.d.ts +0 -1
|
@@ -9,7 +9,7 @@ export type InactiveEventPayload = {
|
|
|
9
9
|
file_id?: string;
|
|
10
10
|
[key: string]: any;
|
|
11
11
|
};
|
|
12
|
-
export default function (track: (eventName: string, payload: any) => void, pitcherApi?: ReturnType<typeof usePitcherApi>, flushTrack?: (eventName: string, payload: any) => void): {
|
|
12
|
+
export default function (track: (eventName: string, payload: any) => void, pitcherApi?: ReturnType<typeof usePitcherApi>, flushTrack?: (eventName: string, payload: any) => void, heartbeatIntervalMs?: number): {
|
|
13
13
|
registerInactiveEvent: ({ id, payload, enterEvent, exitEvent, type, }: {
|
|
14
14
|
id: string;
|
|
15
15
|
payload: InactiveEventPayload | ((type?: EventLifecycle) => InactiveEventPayload);
|
|
@@ -10,6 +10,7 @@ export declare const CDP_EVENT_TYPE: {
|
|
|
10
10
|
readonly appExited: "App Exited";
|
|
11
11
|
readonly canvasEntered: "Canvas Entered";
|
|
12
12
|
readonly canvasExited: "Canvas Exited";
|
|
13
|
+
readonly canvasHeartbeat: "Canvas Heartbeat";
|
|
13
14
|
readonly wizardEntered: "Wizard Entered";
|
|
14
15
|
readonly wizardExited: "Wizard Exited";
|
|
15
16
|
readonly canvasShared: "Canvas Shared";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Target languages offered by the content-translation feature.
|
|
3
|
+
*
|
|
4
|
+
* ⚠️ MIRROR — the single source of truth is
|
|
5
|
+
* `packages/next-core/src/services/translation/languages.ts`
|
|
6
|
+
* (`TRANSLATION_LANGUAGES`). next-core cannot be imported from canvas-ui or the
|
|
7
|
+
* admin client, so the list is duplicated here for the UI pickers only. Keep the
|
|
8
|
+
* `locale` values byte-identical with that file: the backend resolves the DeepL
|
|
9
|
+
* target code and the English language name from the locale we post, so a locale
|
|
10
|
+
* that exists here and not there is rejected by the route.
|
|
11
|
+
*
|
|
12
|
+
* The admin client imports this from `@pitcher/canvas-ui` rather than keeping a
|
|
13
|
+
* third copy, so there are exactly two lists to reconcile, never more.
|
|
14
|
+
*
|
|
15
|
+
* `label` is intentionally NOT an i18n key: language names are shown in their own
|
|
16
|
+
* language (the endonym), which is what every locale picker in the product does,
|
|
17
|
+
* and it keeps the list free of the dynamic-key lookups the i18n extractor strips.
|
|
18
|
+
*/
|
|
19
|
+
export interface TranslationLanguageOption {
|
|
20
|
+
/** Platform locale, matching the locale JSON filenames. Posted to the backend. */
|
|
21
|
+
locale: string;
|
|
22
|
+
/** Endonym shown in the picker. */
|
|
23
|
+
label: string;
|
|
24
|
+
/** Uppercase suffix the backend appends to a translated record's name. */
|
|
25
|
+
suffix: string;
|
|
26
|
+
}
|
|
27
|
+
export declare const TRANSLATION_LANGUAGES: readonly TranslationLanguageOption[];
|
|
28
|
+
/**
|
|
29
|
+
* Uppercase language suffix of a TRANSLATED record, read from the provenance stamp
|
|
30
|
+
* `metadata.pitcher.translation.language` that the duplicate-translate route writes.
|
|
31
|
+
* Returns undefined for an untranslated record or an unrecognised locale, so a caller
|
|
32
|
+
* can use the result directly as the "show a badge" condition.
|
|
33
|
+
*/
|
|
34
|
+
export declare function translatedLanguageSuffix(metadata: unknown): string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* File extensions the row action and the upload picker offer.
|
|
37
|
+
*
|
|
38
|
+
* ⚠️ MIRROR — the source of truth is `DEEPL_SUPPORTED_EXTENSIONS` in
|
|
39
|
+
* `packages/next-core/src/services/deepl.service.ts`, which is what the
|
|
40
|
+
* `files/translate` route actually validates against. Every entry here MUST exist
|
|
41
|
+
* there, or the UI offers a translation the route answers with
|
|
42
|
+
* `400 invalid_request`.
|
|
43
|
+
*
|
|
44
|
+
* Legacy `.doc` and `.ppt` are deliberately absent: DeepL rejects the legacy
|
|
45
|
+
* binary formats, so offering them only produced that 400. The DeepL list is a
|
|
46
|
+
* superset (it also accepts `xlf`, `xliff`, `srt`); those stay out of the UI until
|
|
47
|
+
* there is a reason to surface localisation-interchange formats to admins, and a
|
|
48
|
+
* subset is safe in a way a superset is not.
|
|
49
|
+
*/
|
|
50
|
+
export declare const TRANSLATABLE_FILE_EXTENSIONS: readonly string[];
|
|
51
|
+
export declare function isTranslatableFileExtension(extension?: string | null): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Extension of a file record, resolved the way the route resolves it.
|
|
54
|
+
*
|
|
55
|
+
* ⚠️ MIRROR of `resolveExtension` in
|
|
56
|
+
* `packages/next-core/src/app/api/protected/files/translate/route.ts`: prefer the
|
|
57
|
+
* explicit extension field, fall back to parsing the name. A UI gate that only
|
|
58
|
+
* read the explicit field hid the action on records whose extension column is
|
|
59
|
+
* empty even though the route would have accepted them. The API field is called
|
|
60
|
+
* `extension` on the detail serializer and `original_extension` on the compact
|
|
61
|
+
* one the browser list uses, so both are accepted here.
|
|
62
|
+
*/
|
|
63
|
+
export declare function resolveFileExtension(file?: {
|
|
64
|
+
name?: string | null;
|
|
65
|
+
extension?: string | null;
|
|
66
|
+
original_extension?: string | null;
|
|
67
|
+
} | null): string;
|
|
68
|
+
/** Naive UI / CSelect option shape for the language pickers. */
|
|
69
|
+
export declare function translationLanguageOptions(): {
|
|
70
|
+
label: string;
|
|
71
|
+
value: string;
|
|
72
|
+
}[];
|
package/lib/main.lib.d.ts
CHANGED
|
@@ -178,6 +178,7 @@ export { usePolling } from './composables/usePolling';
|
|
|
178
178
|
export { default as useBroadcastRouteChange } from './composables/useBroadcastRouteChange';
|
|
179
179
|
export * from './plugins/vueQuery';
|
|
180
180
|
export * from './apps/canvas-builder/util/canvas.util';
|
|
181
|
+
export * from './apps/canvas-builder/util/completionWizard.util';
|
|
181
182
|
export * from './apps/canvas-builder/util/tree';
|
|
182
183
|
export * from './apps/canvas-builder/util/print.util';
|
|
183
184
|
export * from './components/filters/filter.util';
|
|
@@ -267,6 +268,7 @@ export * from './constants/conventions.const';
|
|
|
267
268
|
export * from './constants/config.const';
|
|
268
269
|
export * from './constants/pitcherSettings.const';
|
|
269
270
|
export * from './constants/appsDb.const';
|
|
271
|
+
export * from './constants/translationLanguages.const';
|
|
270
272
|
export * from './apps/canvas-builder/constants/theme.const';
|
|
271
273
|
export * from './constants/roles.const';
|
|
272
274
|
export type { RolePermissions } from './constants/roles.const';
|
|
@@ -122,9 +122,11 @@ export declare function createHighLevelApi(options?: ApiOptions): {
|
|
|
122
122
|
* @returns {Promise<void>}
|
|
123
123
|
*/
|
|
124
124
|
unsubscribe: () => Promise<any>;
|
|
125
|
+
postJsonWithTimeout<T>(url: string, body: unknown, accessToken: string, timeoutMs: number, label: string): Promise<T>;
|
|
125
126
|
aiGetCapabilities(): Promise<import('../payload.types').AIRuntimeCapabilities>;
|
|
126
127
|
aiComplete(payload: import('../payload.types').AICompletePayload): Promise<import('../payload.types').AICompleteResult>;
|
|
127
128
|
piaSearchAnswer(payload: import('../payload.types').PiaSearchAnswerPayload): Promise<import('../payload.types').PiaSearchAnswerResult>;
|
|
129
|
+
weeklyFocusRank(payload: import('../payload.types').WeeklyFocusRankPayload): Promise<import('../payload.types').WeeklyFocusRankResult>;
|
|
128
130
|
appsDbGetEntries(payload: import('../payload.types').AppsDbGetEntriesPayload): Promise<import('../payload.types').AppsDbEntriesResult>;
|
|
129
131
|
appsDbUpsertEntry(payload: import('../payload.types').AppsDbUpsertEntryPayload): Promise<import('../payload.types').AppsDbEntry>;
|
|
130
132
|
appsDbDeleteEntry(payload: import('../payload.types').AppsDbDeleteEntryPayload): Promise<void>;
|
|
@@ -147,7 +149,20 @@ export declare function createHighLevelApi(options?: ApiOptions): {
|
|
|
147
149
|
updateCanvas(payload: import('../../main.lib').PatchedCanvasUpdateRequest & {
|
|
148
150
|
id: import('../../main.lib').CanvasRetrieve["id"];
|
|
149
151
|
instance_id?: import('../../main.lib').Instance["id"];
|
|
150
|
-
fields
|
|
152
|
+
fields
|
|
153
|
+
/**
|
|
154
|
+
* Make the entire CatalogIQ fullscreen.
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* usePitcherApi().enterFullscreen()
|
|
158
|
+
*/
|
|
159
|
+
? /**
|
|
160
|
+
* Make the entire CatalogIQ fullscreen.
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* usePitcherApi().enterFullscreen()
|
|
164
|
+
*/: string;
|
|
165
|
+
lazy_sections?: boolean;
|
|
151
166
|
}): Promise<import('../../main.lib').CanvasRetrieve>;
|
|
152
167
|
updateCanvasIndicators(payload: {
|
|
153
168
|
indicators: Record<string, import('../../main.lib').CanvasIndicator>;
|
|
@@ -157,11 +172,7 @@ export declare function createHighLevelApi(options?: ApiOptions): {
|
|
|
157
172
|
getCanvas(payload: {
|
|
158
173
|
id: import('../../main.lib').CanvasRetrieve["id"];
|
|
159
174
|
fields?: string;
|
|
160
|
-
lazy_sections
|
|
161
|
-
* Subscribe to updates.
|
|
162
|
-
*
|
|
163
|
-
* @returns {Promise<void>}
|
|
164
|
-
*/: boolean;
|
|
175
|
+
lazy_sections?: boolean;
|
|
165
176
|
}): Promise<import('../../main.lib').CanvasRetrieve>;
|
|
166
177
|
getSectionsByIds(payload: {
|
|
167
178
|
canvas_id: import('../../main.lib').CanvasRetrieve["id"];
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
import { AICompletePayload, AICompleteResult, AIRuntimeCapabilities, PiaSearchAnswerPayload, PiaSearchAnswerResult } from '../../payload.types';
|
|
1
|
+
import { AICompletePayload, AICompleteResult, AIRuntimeCapabilities, PiaSearchAnswerPayload, PiaSearchAnswerResult, WeeklyFocusRankPayload, WeeklyFocusRankResult } from '../../payload.types';
|
|
2
|
+
/**
|
|
3
|
+
* POST JSON to a next-core route with a hard deadline, returning the parsed body.
|
|
4
|
+
* The shared scaffold behind the SDK's online AI calls (`piaSearchAnswer`,
|
|
5
|
+
* `weeklyFocusRank`).
|
|
6
|
+
*
|
|
7
|
+
* Bounds the WHOLE request including the body read: `fetch()` resolves on headers
|
|
8
|
+
* alone, so reading `.json()` INSIDE the timed window (and letting the abort
|
|
9
|
+
* cancel that read too — hence `clearTimeout` in `finally`) is what stops a
|
|
10
|
+
* response that stalls mid-body from hanging unbounded. `label` names the route
|
|
11
|
+
* in BOTH the non-2xx error (`<label> <status>`) and the timeout error, so each
|
|
12
|
+
* caller keeps its exact error strings.
|
|
13
|
+
*/
|
|
14
|
+
export declare function postJsonWithTimeout<T>(url: string, body: unknown, accessToken: string, timeoutMs: number, label: string): Promise<T>;
|
|
2
15
|
/**
|
|
3
16
|
* Capabilities of the AI completion runtime on the current platform.
|
|
4
17
|
*
|
|
@@ -50,3 +63,32 @@ export declare function aiComplete(payload: AICompletePayload): Promise<AIComple
|
|
|
50
63
|
* console.log(result.answer, result.cited_file_ids, result.source)
|
|
51
64
|
*/
|
|
52
65
|
export declare function piaSearchAnswer(payload: PiaSearchAnswerPayload): Promise<PiaSearchAnswerResult>;
|
|
66
|
+
/**
|
|
67
|
+
* Rank the rep's next-7-days meetings by how much preparation they need — the
|
|
68
|
+
* ONE high-level Weekly Focus call (PIT-7257), the `weekly_focus` AITask.
|
|
69
|
+
*
|
|
70
|
+
* The on-device path runs the prompt, window, parser and ordinal resolver from
|
|
71
|
+
* `@lib/ai-tasks/weekly-focus`; the online route runs next-core's parallel copy
|
|
72
|
+
* of the same logic. The two are kept in lockstep by matching test suites, not a
|
|
73
|
+
* shared import (see that module's header / ADR-002), so the two paths produce
|
|
74
|
+
* the same shape:
|
|
75
|
+
*
|
|
76
|
+
* - iOS with an available local model → `aiComplete` over the caller-supplied
|
|
77
|
+
* meetings + account context. Unavailable models / unusable output fall through.
|
|
78
|
+
* - Otherwise → POST to the next-core Bedrock route.
|
|
79
|
+
*
|
|
80
|
+
* The model picks meetings by ORDINAL and the resolver maps them back to
|
|
81
|
+
* event_ids, dropping out-of-range ones — so a returned id can only come from
|
|
82
|
+
* the `meetings` passed in.
|
|
83
|
+
*
|
|
84
|
+
* This does NOT cache, lock or prewarm: an app that generates on a schedule (as
|
|
85
|
+
* pre-call-brief does) owns those mechanics and calls this underneath.
|
|
86
|
+
*
|
|
87
|
+
* @param {WeeklyFocusRankPayload} payload - The meetings + optional account context.
|
|
88
|
+
* @returns {Promise<WeeklyFocusRankResult>} - Ranking with the serving `source`.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* const focus = await api.weeklyFocusRank({ meetings, context })
|
|
92
|
+
* console.log(focus.hero, focus.top, focus.collapsed_count)
|
|
93
|
+
*/
|
|
94
|
+
export declare function weeklyFocusRank(payload: WeeklyFocusRankPayload): Promise<WeeklyFocusRankResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -44,6 +44,14 @@ export declare function updateCanvas(payload: PatchedCanvasUpdateRequest & {
|
|
|
44
44
|
id: CanvasRetrieve['id'];
|
|
45
45
|
instance_id?: Instance['id'];
|
|
46
46
|
fields?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Request the lazy "shell" on the PATCH response (section stubs +
|
|
49
|
+
* `section_ids` instead of expanded bodies). No-op unless the instance's
|
|
50
|
+
* `lazy_load_sections` setting is on (server-side double-gate). With a
|
|
51
|
+
* `fields` list that excludes `sections`, the response is byte-identical —
|
|
52
|
+
* only the server-side cost drops (PIT-7073).
|
|
53
|
+
*/
|
|
54
|
+
lazy_sections?: boolean;
|
|
47
55
|
}): Promise<CanvasRetrieve>;
|
|
48
56
|
/**
|
|
49
57
|
* Updates canvas indicators by canvas ID. It merges the passed object into existing canvas indicators adding new keys if they were empty and overriding pre-existing keys.
|
|
@@ -58,6 +58,13 @@ export declare const UI_MESSAGE_TYPES: {
|
|
|
58
58
|
export declare const UI_NATIVE_MESSAGE_TYPES: readonly ["ui_app_set_data", "ui_app_update_data", "ui_canvas_updated"];
|
|
59
59
|
export type UiBroadcastRequest = Record<string, any>;
|
|
60
60
|
export type UiSelectContentRequest = {
|
|
61
|
+
/**
|
|
62
|
+
* Named sub-embedding of the content selector, forwarded verbatim to the selector app's
|
|
63
|
+
* `window.initialize` payload so ONE selector app can present itself differently per
|
|
64
|
+
* caller (PIT-7510: `ng-wizard` for the pitchdeck wizard). `embed_location` itself is set
|
|
65
|
+
* by the HOST and always wins, so a caller-specific context needs its own field.
|
|
66
|
+
*/
|
|
67
|
+
embed_variant?: string;
|
|
61
68
|
/** Array of selections */
|
|
62
69
|
selections?: Selection[];
|
|
63
70
|
content_type?: 'file' | 'slide' | 'content';
|
package/lib/sdk/main.d.ts
CHANGED
|
@@ -195,9 +195,11 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
195
195
|
broadcastToWebviews: (event: import('./interfaces').PitcherEvent) => Promise<any>;
|
|
196
196
|
subscribe: () => Promise<any>;
|
|
197
197
|
unsubscribe: () => Promise<any>;
|
|
198
|
+
postJsonWithTimeout<T>(url: string, body: unknown, accessToken: string, timeoutMs: number, label: string): Promise<T>;
|
|
198
199
|
aiGetCapabilities(): Promise<import('./payload.types').AIRuntimeCapabilities>;
|
|
199
200
|
aiComplete(payload: import('./payload.types').AICompletePayload): Promise<import('./payload.types').AICompleteResult>;
|
|
200
201
|
piaSearchAnswer(payload: import('./payload.types').PiaSearchAnswerPayload): Promise<import('./payload.types').PiaSearchAnswerResult>;
|
|
202
|
+
weeklyFocusRank(payload: import('./payload.types').WeeklyFocusRankPayload): Promise<import('./payload.types').WeeklyFocusRankResult>;
|
|
201
203
|
appsDbGetEntries(payload: import('./payload.types').AppsDbGetEntriesPayload): Promise<import('./payload.types').AppsDbEntriesResult>;
|
|
202
204
|
appsDbUpsertEntry(payload: import('./payload.types').AppsDbUpsertEntryPayload): Promise<import('./payload.types').AppsDbEntry>;
|
|
203
205
|
appsDbDeleteEntry(payload: import('./payload.types').AppsDbDeleteEntryPayload): Promise<void>;
|
|
@@ -221,6 +223,7 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
221
223
|
id: import('../main.lib').CanvasRetrieve["id"];
|
|
222
224
|
instance_id?: import('../main.lib').Instance["id"];
|
|
223
225
|
fields?: string;
|
|
226
|
+
lazy_sections?: boolean;
|
|
224
227
|
}): Promise<import('../main.lib').CanvasRetrieve>;
|
|
225
228
|
updateCanvasIndicators(payload: {
|
|
226
229
|
indicators: Record<string, import('../main.lib').CanvasIndicator>;
|
|
@@ -499,9 +502,11 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
499
502
|
broadcastToWebviews: (event: import('./interfaces').PitcherEvent) => Promise<any>;
|
|
500
503
|
subscribe: () => Promise<any>;
|
|
501
504
|
unsubscribe: () => Promise<any>;
|
|
505
|
+
postJsonWithTimeout<T>(url: string, body: unknown, accessToken: string, timeoutMs: number, label: string): Promise<T>;
|
|
502
506
|
aiGetCapabilities(): Promise<import('./payload.types').AIRuntimeCapabilities>;
|
|
503
507
|
aiComplete(payload: import('./payload.types').AICompletePayload): Promise<import('./payload.types').AICompleteResult>;
|
|
504
508
|
piaSearchAnswer(payload: import('./payload.types').PiaSearchAnswerPayload): Promise<import('./payload.types').PiaSearchAnswerResult>;
|
|
509
|
+
weeklyFocusRank(payload: import('./payload.types').WeeklyFocusRankPayload): Promise<import('./payload.types').WeeklyFocusRankResult>;
|
|
505
510
|
appsDbGetEntries(payload: import('./payload.types').AppsDbGetEntriesPayload): Promise<import('./payload.types').AppsDbEntriesResult>;
|
|
506
511
|
appsDbUpsertEntry(payload: import('./payload.types').AppsDbUpsertEntryPayload): Promise<import('./payload.types').AppsDbEntry>;
|
|
507
512
|
appsDbDeleteEntry(payload: import('./payload.types').AppsDbDeleteEntryPayload): Promise<void>;
|
|
@@ -525,6 +530,7 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
525
530
|
id: import('../main.lib').CanvasRetrieve["id"];
|
|
526
531
|
instance_id?: import('../main.lib').Instance["id"];
|
|
527
532
|
fields?: string;
|
|
533
|
+
lazy_sections?: boolean;
|
|
528
534
|
}): Promise<import('../main.lib').CanvasRetrieve>;
|
|
529
535
|
updateCanvasIndicators(payload: {
|
|
530
536
|
indicators: Record<string, import('../main.lib').CanvasIndicator>;
|
|
@@ -749,9 +755,11 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
749
755
|
broadcastToWebviews: (event: import('./interfaces').PitcherEvent) => Promise<any>;
|
|
750
756
|
subscribe: () => Promise<any>;
|
|
751
757
|
unsubscribe: () => Promise<any>;
|
|
758
|
+
postJsonWithTimeout<T>(url: string, body: unknown, accessToken: string, timeoutMs: number, label: string): Promise<T>;
|
|
752
759
|
aiGetCapabilities(): Promise<import('./payload.types').AIRuntimeCapabilities>;
|
|
753
760
|
aiComplete(payload: import('./payload.types').AICompletePayload): Promise<import('./payload.types').AICompleteResult>;
|
|
754
761
|
piaSearchAnswer(payload: import('./payload.types').PiaSearchAnswerPayload): Promise<import('./payload.types').PiaSearchAnswerResult>;
|
|
762
|
+
weeklyFocusRank(payload: import('./payload.types').WeeklyFocusRankPayload): Promise<import('./payload.types').WeeklyFocusRankResult>;
|
|
755
763
|
appsDbGetEntries(payload: import('./payload.types').AppsDbGetEntriesPayload): Promise<import('./payload.types').AppsDbEntriesResult>;
|
|
756
764
|
appsDbUpsertEntry(payload: import('./payload.types').AppsDbUpsertEntryPayload): Promise<import('./payload.types').AppsDbEntry>;
|
|
757
765
|
appsDbDeleteEntry(payload: import('./payload.types').AppsDbDeleteEntryPayload): Promise<void>;
|
|
@@ -563,6 +563,22 @@ export interface PiaSearchAnswerPayload {
|
|
|
563
563
|
* Optional narrowing of the online route's candidate pool to these file ids.
|
|
564
564
|
*/
|
|
565
565
|
file_ids?: string[];
|
|
566
|
+
/**
|
|
567
|
+
* Opt in to server-side document grounding: the online route fetches the
|
|
568
|
+
* transcripts of `file_ids` and adds query-relevant verbatim passages to the
|
|
569
|
+
* prompt. Requires `file_ids`; ignored without them.
|
|
570
|
+
*
|
|
571
|
+
* Explicit rather than inferred from `file_ids` so that a caller which
|
|
572
|
+
* already narrows by ids keeps its exact prompt. Online path only — the
|
|
573
|
+
* on-device token budget cannot absorb document excerpts.
|
|
574
|
+
*/
|
|
575
|
+
include_document_text?: boolean;
|
|
576
|
+
/**
|
|
577
|
+
* Client-derived synonym terms for the query. Used only to choose WHICH
|
|
578
|
+
* passages of `file_ids` are excerpted — they can never add a file, and the
|
|
579
|
+
* server re-validates them. Ignored unless `include_document_text` is set.
|
|
580
|
+
*/
|
|
581
|
+
expansion_terms?: string[];
|
|
566
582
|
/**
|
|
567
583
|
* Token budget for the on-device completion.
|
|
568
584
|
*/
|
|
@@ -842,3 +858,91 @@ export interface TtsSpeakResult {
|
|
|
842
858
|
*/
|
|
843
859
|
completed: boolean;
|
|
844
860
|
}
|
|
861
|
+
/**
|
|
862
|
+
* Payload for `weeklyFocusRank` — one high-level call that ranks the rep's
|
|
863
|
+
* next-7-days meetings, routed on-device (iOS Gemma) or online (next-core
|
|
864
|
+
* Bedrock route). Calendar fetching stays caller-side: the caller owns the
|
|
865
|
+
* meeting list and passes it in.
|
|
866
|
+
*/
|
|
867
|
+
export interface WeeklyFocusRankPayload {
|
|
868
|
+
/**
|
|
869
|
+
* The rep's meetings. Windowed to today + 6 days by the SDK/route — send the
|
|
870
|
+
* whole calendar if that is what you have.
|
|
871
|
+
*/
|
|
872
|
+
meetings: WeeklyFocusRankMeeting[];
|
|
873
|
+
/**
|
|
874
|
+
* One CRM context bundle per UNIQUE account, keyed by `account_id` (open
|
|
875
|
+
* tasks, opportunity state, recent calls — whatever the admin mapped).
|
|
876
|
+
*/
|
|
877
|
+
context?: Record<string, WeeklyFocusRankAccountContext>;
|
|
878
|
+
/**
|
|
879
|
+
* Instance to rank in. Defaults to the env's active instance.
|
|
880
|
+
*/
|
|
881
|
+
instance_id?: string;
|
|
882
|
+
/**
|
|
883
|
+
* IANA zone the 7-day window is measured in. Defaults to the device's zone,
|
|
884
|
+
* which is the rep's zone on-device; ALWAYS sent to the online route, whose
|
|
885
|
+
* server clock is UTC.
|
|
886
|
+
*/
|
|
887
|
+
time_zone?: string;
|
|
888
|
+
/**
|
|
889
|
+
* How many meetings to pick (1-8, default 5).
|
|
890
|
+
*/
|
|
891
|
+
max_picks?: number;
|
|
892
|
+
/**
|
|
893
|
+
* Keep at most one pick per account. Default true.
|
|
894
|
+
*/
|
|
895
|
+
one_per_account?: boolean;
|
|
896
|
+
}
|
|
897
|
+
export interface WeeklyFocusRankMeeting {
|
|
898
|
+
event_id: string;
|
|
899
|
+
account_id: string;
|
|
900
|
+
account_name: string;
|
|
901
|
+
meeting_subject: string;
|
|
902
|
+
/** ISO datetime, or a date-only 'YYYY-MM-DD'. */
|
|
903
|
+
meeting_time: string;
|
|
904
|
+
attendee_count?: number;
|
|
905
|
+
}
|
|
906
|
+
export interface WeeklyFocusRankAccountContext {
|
|
907
|
+
sections: Array<{
|
|
908
|
+
label: string;
|
|
909
|
+
items: Array<{
|
|
910
|
+
title: string;
|
|
911
|
+
fields?: Array<{
|
|
912
|
+
label: string;
|
|
913
|
+
value: string;
|
|
914
|
+
}>;
|
|
915
|
+
days_ago?: number | null;
|
|
916
|
+
}>;
|
|
917
|
+
fields_curated?: boolean;
|
|
918
|
+
}>;
|
|
919
|
+
}
|
|
920
|
+
/** One ranked pick, resolved back to a real meeting id. */
|
|
921
|
+
export interface WeeklyFocusRankPick {
|
|
922
|
+
event_id: string;
|
|
923
|
+
/** 1 = highest priority; unique and contiguous from 1. */
|
|
924
|
+
rank: number;
|
|
925
|
+
reason: string;
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* Unified `weeklyFocusRank` result across both serving paths.
|
|
929
|
+
*/
|
|
930
|
+
export interface WeeklyFocusRankResult {
|
|
931
|
+
/**
|
|
932
|
+
* One or two sentences summarising the week. Empty when the week is empty.
|
|
933
|
+
*/
|
|
934
|
+
hero: string;
|
|
935
|
+
/**
|
|
936
|
+
* The picked meetings, highest priority first.
|
|
937
|
+
*/
|
|
938
|
+
top: WeeklyFocusRankPick[];
|
|
939
|
+
/**
|
|
940
|
+
* Meetings in the 7-day window that were NOT picked — including those the
|
|
941
|
+
* ranking never saw. The surface renders this as "+N more this week".
|
|
942
|
+
*/
|
|
943
|
+
collapsed_count: number;
|
|
944
|
+
/**
|
|
945
|
+
* Which runtime produced the ranking.
|
|
946
|
+
*/
|
|
947
|
+
source: 'on_device' | 'online';
|
|
948
|
+
}
|
|
@@ -28,6 +28,19 @@
|
|
|
28
28
|
* engine — its context comes from the caller / iOS SmartStore — so it is
|
|
29
29
|
* offline/Gemma-capable (`backends: ['bedrock', 'gemma']`).
|
|
30
30
|
*
|
|
31
|
+
* `weekly_focus` (PIT-7257) is another NEW task added alongside the locked four
|
|
32
|
+
* (NOT a rename/removal). It ranks the rep's next-7-days meetings by how much
|
|
33
|
+
* they need preparation, using each account's CRM context. Unlike every other
|
|
34
|
+
* task it is a PORT of a shipped implementation: it has been running on-device
|
|
35
|
+
* (Gemma `ai.complete`) inside the pre-call-brief app since PIT-6305, so
|
|
36
|
+
* `backends: ['bedrock', 'gemma']` is validated in practice rather than aspired
|
|
37
|
+
* to. `requires` is empty for the same reason as `pia_search`: the meeting list
|
|
38
|
+
* and per-account context are request-envelope fields, not AITaskRequirement
|
|
39
|
+
* vocabulary. Its prompt/window/parser are implemented twice — in
|
|
40
|
+
* `src/lib/ai-tasks/weekly-focus.ts` (SDK + app) and in next-core's
|
|
41
|
+
* `prompts/weekly-focus.ts` (Bedrock route) — kept behaviourally in lockstep by
|
|
42
|
+
* each side's tests, since next-core imports canvas-ui types only (ADR-002).
|
|
43
|
+
*
|
|
31
44
|
* `pia_search` (PIT-6863) is another NEW task added alongside the locked four
|
|
32
45
|
* (NOT a rename/removal). It answers a rep's natural-language question over the
|
|
33
46
|
* instance's content + metadata (Postgres/Django candidates + aiAnalysis
|
|
@@ -37,9 +50,34 @@
|
|
|
37
50
|
* ['bedrock', 'gemma']`. `requires` is empty: its inputs (query + instance) are
|
|
38
51
|
* request-envelope fields, not AITaskRequirement vocabulary, and candidate
|
|
39
52
|
* retrieval happens server-side.
|
|
53
|
+
*
|
|
54
|
+
* `content_metadata` (cluster F / R137) is another NEW task added alongside the
|
|
55
|
+
* locked four (NOT a rename/removal). It proposes metadata field values and tags
|
|
56
|
+
* for ONE content file, constrained to the instance's own metadata template —
|
|
57
|
+
* Django validates `File.metadata` writes against that template, so select
|
|
58
|
+
* fields must stay inside the template's allowed option values. `backends:
|
|
59
|
+
* ['bedrock']` only: it is an admin-context bulk operation, with no on-device
|
|
60
|
+
* (Gemma) serving. `requires` is empty for the same reason as `pia_search`: the
|
|
61
|
+
* file facts and template fields are request-envelope inputs, not
|
|
62
|
+
* AITaskRequirement vocabulary.
|
|
63
|
+
*
|
|
64
|
+
* `translate` (Gartner R128 / cluster G) is another NEW task added alongside the
|
|
65
|
+
* locked four (NOT a rename/removal). It translates keyed prose segments of a
|
|
66
|
+
* canvas template into ONE target language — N segments in, N translations out,
|
|
67
|
+
* keyed, with per-segment error isolation: a segment whose translation loses a
|
|
68
|
+
* Handlebars placeholder or an HTML tag keeps its source text and is reported,
|
|
69
|
+
* rather than failing the whole template. It is the FIRST task whose output must
|
|
70
|
+
* line up 1:1 with its input, and because JSON Schema cannot express that, the
|
|
71
|
+
* parity guarantee lives in next-core code (`reconcileTranslations`, called
|
|
72
|
+
* route-side after the model call) and not in the output schema. `backends:
|
|
73
|
+
* ['bedrock']` only: it is an admin-context content-governance operation with no
|
|
74
|
+
* on-device (Gemma) serving, and binary documents take the DeepL document path
|
|
75
|
+
* instead, which is not an AITask. `requires` is empty for the same reason as
|
|
76
|
+
* `pia_search`: the segments and the target language are request-envelope inputs,
|
|
77
|
+
* not AITaskRequirement vocabulary.
|
|
40
78
|
*/
|
|
41
79
|
/** Locked cross-backend task ids. AITask id === the wire-contract string. */
|
|
42
|
-
export type AITask = 'meeting_prep' | 'discussion_points' | 'pitch_deck' | 'post_call_summary' | 'account_insights' | 'precall_notes' | 'pia_search';
|
|
80
|
+
export type AITask = 'meeting_prep' | 'discussion_points' | 'pitch_deck' | 'post_call_summary' | 'account_insights' | 'precall_notes' | 'pia_search' | 'weekly_focus' | 'content_metadata' | 'translate';
|
|
43
81
|
/**
|
|
44
82
|
* Vocabulary of declarative input requirements a task can depend on. A task's
|
|
45
83
|
* `requires` list is server-enforced in next-core (missing → 400
|
package/lib/types/call.d.ts
CHANGED
|
@@ -54,5 +54,19 @@ export interface Call {
|
|
|
54
54
|
presentationHistory?: CallPresentationHistory;
|
|
55
55
|
presentationHistoryMetadata?: CallPresentationHistoryMetadata;
|
|
56
56
|
recentAccounts?: SfAccount[];
|
|
57
|
+
/**
|
|
58
|
+
* Context accounts beyond the primary.
|
|
59
|
+
*
|
|
60
|
+
* The React meeting bar's "Set context" overlay is **single-select** — it writes exactly one
|
|
61
|
+
* account — so it no longer produces entries here; the field is kept because other flows (CRM
|
|
62
|
+
* Hub launches, passthrough, cross-account attendees) and calls persisted by older bundles can
|
|
63
|
+
* still carry them. `selectedAccount` stays the primary and remains the only account the
|
|
64
|
+
* single-account consumers see (the meeting-notes recording bridge, recents, and the deck
|
|
65
|
+
* scope), so this is purely additive — nothing existing reads it.
|
|
66
|
+
*
|
|
67
|
+
* Optional because `Call` is persisted in localStorage: a call object written by an older
|
|
68
|
+
* bundle has no such key.
|
|
69
|
+
*/
|
|
70
|
+
additionalAccounts?: SfAccountMini[];
|
|
57
71
|
}
|
|
58
72
|
export declare const INITIAL_CALL_STATE: Call;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type LaunchDarklyBooleanFlagKey = '
|
|
1
|
+
export type LaunchDarklyBooleanFlagKey = 'allow_ai_prompts_in_canvas_text' | 'allow_bulk_actions_canvases_files' | 'allow_content_grid_autofill' | 'allow_canvas_duplication' | 'allow_canvases_tables_columns_settings' | 'allow_table_column_resizing' | 'allow_creating_canvas_with_no_template' | 'allow_dynamic_data_table_for_scribble_component' | 'allow_html_for_scribble_component' | 'allow_embeddable_for_scribble_component' | 'allow_embeddable_hiding' | 'allow_multimedia_for_scribble_component' | 'allow_note_taking' | 'allow_rep_canvas_metadata_edit' | 'allow_rep_file_distributions' | 'allow_rep_file_rating' | 'allow_rep_file_upload' | 'allow_saving_annotations_in_personal_layer' | 'allow_user_to_edit_font_size_and_color_in_canvas_tokens' | 'are_sections_system_controlled' | 'enable_canvas_core_distributions' | 'copy_context_to_canvas' | 'copy_template_metadata_to_canvas' | 'disable_canvas_edit_for_reps' | 'disable_custom_tooltips' | 'disable_file_edit_content' | 'enable_inline_wopi_edit_button' | 'disable_fullscreen_canvas_builder' | 'disable_impact_web_browser_fullscreen' | 'disable_user_invitations' | 'display_section_list_name' | 'disable_download_canvas' | 'enable_ai_generated_thumbnails' | 'enable_analytics' | 'enable_app_developer_role' | 'enable_algolia_search' | 'enable_background_image_theme_options' | 'enable_better_canvas_builder_control_bars_on_zoom' | 'enable_bulk_update_file_attributes' | 'enable_canvas_as_home' | 'enable_canvas_blocks' | 'enable_canvas_node_debugging' | 'enable_canvas_freeze' | 'enable_canvas_locks' | 'enable_canvas_template_edit_in_impact' | 'enable_canvas_tokens' | 'enable_collaborations' | 'enable_collection_player_data_accessor' | 'enable_content_grid_data_accessor' | 'enable_content_translation' | 'enable_content_type_change_in_content_selector' | 'enable_cross_tab_instance_reload_for_ld_sync' | 'enable_create_section_from_section_template' | 'enable_custom_display_overrides' | 'enable_default_crm_shape' | 'enable_detailed_date_format' | 'enable_dsr_readonly_annotations' | 'enable_dnd_html_editor' | 'enable_dynamic_content_component' | 'enable_dynamic_data_table_component' | 'enable_custom_data_tables' | 'enable_embedded_video_autoplay' | 'enable_embedded_video' | 'enable_enhanced_canvas_drawer_app' | 'enable_enhanced_indicators' | 'enable_enhanced_section_execution_states' | 'enable_experimental_canvas_builder_dnd' | 'enable_extra_file_data' | 'enable_file_copy' | 'enable_file_pages_metadata' | 'enable_file_revisions' | 'enable_file_divisible_permission' | 'enable_folder_details_edit' | 'enable_folder_distributions' | 'enable_handlebar_template_support' | 'enable_height_in_component_theming' | 'enable_home_customization' | 'enable_hotspot_visibility' | 'enable_improved_canvas_node_updating' | 'enable_individual_users_in_file_distribution' | 'enable_inline_filter_options' | 'enable_insearch_in_section_selector' | 'enable_instance_cloner' | 'enable_advanced_cloner' | 'enable_content_promotion' | 'enable_instance_editor_role' | 'enable_instance_navigation_from_management' | 'enable_knock_notifications' | 'enable_maintain_section_theme_control' | 'enable_metadata_in_file_uploads_with_default_values' | 'enable_more_intuitive_component_spacing' | 'enable_multi_destination_upload' | 'enable_new_meeting_bar' | 'enable_provider_agnostic_meeting_bar' | 'enable_original_pdf_link' | 'enable_scale_content' | 'enable_sorting_in_tiptap_table' | 'enable_stt_dictation' | 'enable_cloud_stt_fallback' | 'enable_theme_assets' | 'enable_toc_enhancements_to_support_same_section_in_section_list' | 'enable_pia_assistant' | 'enable_pipe_character_multi_search' | 'enable_popup_apps' | 'enable_pre_send_validation' | 'enable_reorder_search' | 'enable_reorder_scribble_isolation' | 'enable_reorder_component_options_menu' | 'enable_resizable_multimedia_component' | 'enable_responsive_scribble_component' | 'enable_saved_canvases_filters' | 'enable_short_tag_column_in_tables' | 'enable_scribble_component' | 'enable_scribble_content_as_background' | 'enable_search_and_filters_in_multimedia_component' | 'enable_section_context_in_dsr' | 'enable_selectors_dnd' | 'enable_section_selector_edit_section' | 'enable_smart_folders' | 'enable_smart_folders_for_sections' | 'enable_smart_folders_in_section_selector' | 'enable_smart_folders_in_files' | 'enable_sorting_in_sections' | 'enable_suggested_tags' | 'enable_template_component_permissions' | 'enable_template_folders' | 'enable_theme_options_border_radius' | 'enable_themes' | 'hide_asset_uploader' | 'hide_user_feedback_widget' | 'include_files_content_in_print' | 'interpolate_rep_canvases_on_edit_mode' | 'is_timeline_component_allowed' | 'launch_in_full_screen_on_present_mode' | 'prefer_online_handlers' | 'restrict_owned_files_from_admins' | 'show_asset_manager_for_multimedia' | 'show_clear_all_annotations_button' | 'show_content_selector_list_view' | 'show_metadata_filters_in_all_canvas_things' | 'show_only_preview_mode_for_html_component' | 'show_popularity_icons' | 'use_core_endpoint_for_analytics' | 'convert_pptx_to_section_with_scribble_pdfjs' | 'use_short_url_for_shared_link' | 'use_zoho_instead_of_ms_wopi' | 'enable_new_section_list' | 'enable_sharebox_apps' | 'enable_sharebox_bulk_filtering' | 'enable_back_to_previous_location_in_canvas' | 'enable_crm_shape_for_external_links' | 'enable_adaptive_popup_apps' | 'enable_file_version_polling' | 'skip_pspdfkit_wait_for_high_res_thumbs' | 'enable_reactive_scribble_component_toolbar' | 'enable_embeddable_full_screen_mode' | 'enable_enhanced_user_management' | 'enable_impersonation' | 'enable_instance_admin_user_assignment' | 'keep_static_pptx_editable' | 'enable_canvas_pdf_dimensions' | 'enable_editable_pptx_of_canvas' | 'enable_editable_pptx_of_canvas_with_fonts' | 'enable_aspose_pptx_of_canvas' | 'enable_canvas_control_bars_collapse' | 'enable_rep_app_visibility_order' | 'enable_file_sharing_print_permissions' | 'enable_section_sharing_print_permissions' | 'enable_marketplace_tab' | 'enable_sfdc_account_visibility_for_canvases' | 'sfdc_offline_enabled' | 'enable_granular_permissions' | 'enable_hub_collections' | 'enable_hub_recommended_smart_folder' | 'enable_custom_user_properties';
|
|
2
2
|
export type LaunchDarklyNumberFlagKey = 'canvas_section_selector_page_size' | 'canvas_section_selector_selected_items_with_thumbnail_size';
|
|
3
3
|
/** How PIA Search serves inference (PIT-6863). */
|
|
4
4
|
export type PiaSearchMode = 'off' | 'on_device' | 'online';
|
|
@@ -29,8 +29,6 @@ declare const _LaunchDarklyStringFlags: {
|
|
|
29
29
|
readonly pspdfkit_client_version: readonly ["", "pspdfkit-web/2024.6.0/pspdfkit.js", "pspdfkit-web/1.14.0/nutrient-viewer.js"];
|
|
30
30
|
readonly slotty_ui_remote_script_url: readonly ["https://anyvalidurl.xyz", ""];
|
|
31
31
|
readonly dsr_remote_script_url: readonly ["https://anyvalidurl.xyz", ""];
|
|
32
|
-
readonly ai_image_generation_model: readonly ["minimax/image-01", ""];
|
|
33
|
-
readonly ai_video_generation_model: readonly ["minimax/video-01", ""];
|
|
34
32
|
readonly sharebox_format: readonly ["content-grid", "content-grid-default", "collection-player-default"];
|
|
35
33
|
};
|
|
36
34
|
type LaunchDarklyStringFlagValue<K extends LaunchDarklyStringFlagKey = LaunchDarklyStringFlagKey> = K extends LaunchDarklyStringFlagKey ? (typeof _LaunchDarklyStringFlags)[K][number] : never;
|
|
@@ -10,6 +10,7 @@ export type ContentMatchRule = {
|
|
|
10
10
|
target_metadata_key: string;
|
|
11
11
|
required?: boolean;
|
|
12
12
|
};
|
|
13
|
+
export type FullscreenMode = 'focus' | 'fullscreen';
|
|
13
14
|
type SmartFolderRuleAttribute = {
|
|
14
15
|
name: string;
|
|
15
16
|
type: 'string' | 'boolean' | 'number' | 'date' | 'array';
|
|
@@ -37,6 +38,10 @@ export type OrganizationSettings = {
|
|
|
37
38
|
enable_read_only_canvas_creation_account?: boolean;
|
|
38
39
|
scribble_file_renderer?: 'image' | 'pdfjs' | 'pspdfkit';
|
|
39
40
|
enable_wizard_preview_button?: boolean;
|
|
41
|
+
enable_edit_opens_completion_wizard?: boolean;
|
|
42
|
+
enable_react_completion_wizard?: boolean;
|
|
43
|
+
enable_toc_open_by_default?: boolean;
|
|
44
|
+
use_canvas_exit_confirmation?: boolean;
|
|
40
45
|
locks_polling_interval?: number;
|
|
41
46
|
shared_link?: {
|
|
42
47
|
title?: string;
|
|
@@ -117,15 +122,20 @@ export type OrganizationSettings = {
|
|
|
117
122
|
location_prompt_message?: string;
|
|
118
123
|
use_collection_player_with_annotations?: boolean;
|
|
119
124
|
disable_core_canvas_metadata?: boolean;
|
|
125
|
+
enable_account_widgets?: boolean;
|
|
120
126
|
enable_folder_description_via_name?: boolean;
|
|
121
127
|
enable_download_original_file_in_impact?: boolean;
|
|
122
128
|
alternative_canvas_fullscreen?: boolean;
|
|
129
|
+
enable_impact_web_presentation_browser_fullscreen?: boolean;
|
|
130
|
+
default_presentation_fullscreen_mode?: FullscreenMode;
|
|
123
131
|
enable_presentation_annotations?: boolean;
|
|
124
132
|
max_files_limit?: number;
|
|
125
133
|
is_meeting_bar_account_selection_disabled?: boolean;
|
|
126
134
|
meeting_bar_show_account_context?: 'off' | 'no-call-only' | 'always';
|
|
127
135
|
meeting_bar_allow_attendee_edit_on_existing_events?: boolean;
|
|
128
136
|
disable_postcall?: boolean;
|
|
137
|
+
preserve_account_after_call_stop?: boolean;
|
|
138
|
+
meeting_bar_show_meetings?: boolean;
|
|
129
139
|
launch_in_present_mode_on_creation?: boolean;
|
|
130
140
|
slotty_ui_route_config?: {
|
|
131
141
|
name: string;
|
package/lib/util/user.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { User } from '../../types/openapi';
|
|
1
2
|
export declare const splitUserName: (name?: string) => {
|
|
2
3
|
first_name: string;
|
|
3
4
|
last_name: string;
|
|
@@ -51,4 +52,21 @@ export declare function pickTemplateUserFields<T extends Record<string, any>>(us
|
|
|
51
52
|
* without per-app code changes.
|
|
52
53
|
*/
|
|
53
54
|
export declare function flattenUserProperties<T extends Record<string, any>>(user: T | null | undefined, schema?: CustomUserPropertiesSchema | null): T | null;
|
|
55
|
+
export interface CrmServiceLink {
|
|
56
|
+
/** Absolute URL opening the CRM web UI (e.g. the Salesforce custom domain). */
|
|
57
|
+
url: string;
|
|
58
|
+
/** Brand display name shown as the menu label — brand names are not translated. */
|
|
59
|
+
label: string;
|
|
60
|
+
/** Font Awesome icon name (without the `fa-` prefix). */
|
|
61
|
+
icon: string;
|
|
62
|
+
faType: 'fab' | 'far';
|
|
63
|
+
provider: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Resolve a browser link to the user's connected CRM from `connected_services`
|
|
67
|
+
* (the `/users/me/` response — `urls` is only populated on the `me`/`token` actions).
|
|
68
|
+
* Returns the first CRM service with a usable URL, or `null` when the user has
|
|
69
|
+
* no CRM connection to link to.
|
|
70
|
+
*/
|
|
71
|
+
export declare function getCrmServiceLink(user: Pick<User, 'connected_services'> | null | undefined): CrmServiceLink | null;
|
|
54
72
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED