@pitcher/js-api 1.29.0 → 1.31.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.
Files changed (158) hide show
  1. package/js-api.esm.js +488 -56
  2. package/js-api.esm.js.map +1 -1
  3. package/js-api.umd.min.js +32 -11
  4. package/js-api.umd.min.js.map +1 -1
  5. package/lib/ai-tasks/__tests__/weekly-focus.spec.d.ts +1 -0
  6. package/lib/ai-tasks/weekly-focus.d.ts +241 -0
  7. package/lib/apps/browser/appTypes.d.ts +28 -0
  8. package/lib/apps/browser/components/ContextMenu/TranslateFileButton.test.d.ts +1 -0
  9. package/lib/apps/browser/stores/api.d.ts +6 -1
  10. package/lib/apps/browser/stores/api.filesFoldersDeleter.test.d.ts +1 -0
  11. package/lib/apps/browser/stores/app.d.ts +5 -0
  12. package/lib/apps/browser/stores/app.selectionPruneScope.test.d.ts +1 -0
  13. package/lib/apps/browser/stores/upload.d.ts +26 -1
  14. package/lib/apps/browser/stores/upload.types.d.ts +9 -0
  15. package/lib/apps/browser/util/lifecycle.d.ts +57 -0
  16. package/lib/apps/browser/util/lifecycle.test.d.ts +1 -0
  17. package/lib/apps/canvas-builder/components/container/PopupApps/PopupAppModal.spec.d.ts +1 -0
  18. package/lib/apps/canvas-builder/components/container/PresentationTools/PresentationToolsButtons.spec.d.ts +1 -0
  19. package/lib/apps/canvas-builder/components/ui/BottomSheetModal/BottomSheetModal.integration.spec.d.ts +1 -0
  20. package/lib/apps/canvas-builder/components/ui/BottomSheetModal/BottomSheetModal.spec.d.ts +1 -0
  21. package/lib/apps/canvas-builder/components/ui/DynamicContent/section-component-bindings.util.d.ts +32 -0
  22. package/lib/apps/canvas-builder/components/ui/DynamicContent/useDynamicContent.d.ts +6 -0
  23. package/lib/apps/canvas-builder/components/ui/Link/Link.util.d.ts +8 -1
  24. package/lib/apps/canvas-builder/components/ui/Link/Link.util.test.d.ts +1 -0
  25. package/lib/apps/canvas-builder/components/ui/Multimedia/Multimedia.ldAsset.spec.d.ts +1 -0
  26. package/lib/apps/canvas-builder/components/ui/SectionList/SectionItemModal.spec.d.ts +1 -0
  27. package/lib/apps/canvas-builder/composables/useCanvas.d.ts +286 -10
  28. package/lib/apps/canvas-builder/composables/useCanvas.saveEcho.spec.d.ts +1 -0
  29. package/lib/apps/canvas-builder/composables/useCanvasBlocks.d.ts +40 -2
  30. package/lib/apps/canvas-builder/composables/useCanvasExit.d.ts +1 -0
  31. package/lib/apps/canvas-builder/composables/useCanvasHistory.d.ts +38 -2
  32. package/lib/apps/canvas-builder/composables/useCanvasTheme.d.ts +4 -2
  33. package/lib/apps/canvas-builder/composables/useContentSelector.d.ts +8 -1
  34. package/lib/apps/canvas-builder/composables/useInstalledEmbeddables.d.ts +1 -1
  35. package/lib/apps/canvas-builder/composables/useNavigatorDrawer.d.ts +27 -0
  36. package/lib/apps/canvas-builder/composables/useNavigatorDrawer.spec.d.ts +1 -0
  37. package/lib/apps/canvas-builder/composables/usePopupApps.d.ts +43 -4
  38. package/lib/apps/canvas-builder/composables/usePopupApps.spec.d.ts +1 -0
  39. package/lib/apps/canvas-builder/composables/usePresentationTools.d.ts +112 -0
  40. package/lib/apps/canvas-builder/composables/usePresentationTools.spec.d.ts +1 -0
  41. package/lib/apps/canvas-builder/types/canvas.d.ts +66 -3
  42. package/lib/apps/canvas-builder/util/canvas.util.d.ts +12 -0
  43. package/lib/apps/canvas-builder/util/completionWizard.util.d.ts +347 -0
  44. package/lib/apps/canvas-builder/util/completionWizard.util.test.d.ts +1 -0
  45. package/lib/apps/canvas-builder/util/fullscreenMode.util.d.ts +7 -0
  46. package/lib/apps/canvas-builder/util/fullscreenMode.util.test.d.ts +1 -0
  47. package/lib/apps/canvas-builder/util/iframe.util.d.ts +24 -2
  48. package/lib/apps/canvas-builder/util/iframe.util.test.d.ts +1 -0
  49. package/lib/apps/canvas-builder/util/lazySections.util.d.ts +35 -0
  50. package/lib/apps/canvas-builder/util/lazySections.util.test.d.ts +1 -0
  51. package/lib/apps/canvas-selector/stores/app.d.ts +14 -0
  52. package/lib/apps/collection-player/components/AppHeader.spec.d.ts +1 -0
  53. package/lib/apps/collection-player/composables/collection-navigation.util.d.ts +27 -0
  54. package/lib/apps/collection-player/composables/collection-navigation.util.spec.d.ts +1 -0
  55. package/lib/apps/collection-player/composables/speaker-notes.use.d.ts +14 -0
  56. package/lib/apps/collection-player/composables/speaker-notes.use.spec.d.ts +1 -0
  57. package/lib/apps/collection-player/stores/app.store.d.ts +8 -1
  58. package/lib/apps/collection-player/stores/showNotesToggle.spec.d.ts +1 -0
  59. package/lib/apps/content-selector/appTypes.d.ts +16 -0
  60. package/lib/apps/content-selector/components/Assets.uploaderRefresh.spec.d.ts +1 -0
  61. package/lib/apps/content-selector/components/Content/AllContent/List/expandFileGuard.spec.d.ts +1 -0
  62. package/lib/apps/content-selector/stores/app.d.ts +1 -1
  63. package/lib/apps/notes/NotesApp.accountNotes.spec.d.ts +1 -0
  64. package/lib/apps/notes/NotesApp.speakerNotes.spec.d.ts +1 -0
  65. package/lib/apps/notes/composables/useAccountNotes.d.ts +14 -0
  66. package/lib/apps/notes/composables/useAccountNotes.spec.d.ts +1 -0
  67. package/lib/apps/notes/composables/useAccountOnlyNotesGate.d.ts +21 -0
  68. package/lib/apps/notes/composables/useAccountOnlyNotesGate.spec.d.ts +1 -0
  69. package/lib/apps/notes/composables/useActiveSlideNotes.d.ts +42 -0
  70. package/lib/apps/notes/composables/useActiveSlideNotes.spec.d.ts +1 -0
  71. package/lib/components/CFileAccessManagement/collaborationApi.d.ts +2 -0
  72. package/lib/components/CFilePanel/Details.spec.d.ts +1 -0
  73. package/lib/components/CFilePanel/KeyMessages.spec.d.ts +1 -0
  74. package/lib/components/CFilePanel/Summary.spec.d.ts +1 -0
  75. package/lib/components/CFileViewer/pdf/CFileViewer.pdf.annotations.use.d.ts +5 -1
  76. package/lib/components/CFileViewer/pdf/CFileViewer.pdf.formFields.use.d.ts +8 -0
  77. package/lib/components/CFileViewer/pdf/CFileViewer.pdf.link.use.d.ts +1 -1
  78. package/lib/components/CFileViewer/pdf/CFileViewer.pdf.overlayItems.use.d.ts +1 -1
  79. package/lib/components/CFileViewer/pdf/CFileViewer.pdf.use.d.ts +4 -9
  80. package/lib/components/CFileViewer/pdf/CFileViewer.pdf.util.d.ts +53 -1
  81. package/lib/components/CFileViewer/pdf/CFileViewerFullscreen.pdf.use.d.ts +1 -1
  82. package/lib/components/CFileViewer/pdf/__tests__/CFileViewer.pdf.annotations.text.test.d.ts +1 -0
  83. package/lib/components/CGlobalLoader/CGlobalLoaderMark.spec.d.ts +1 -0
  84. package/lib/components/CGlobalLoader/globalLoader.paths.d.ts +2 -0
  85. package/lib/components/CGlobalSearch/globalSearchTarget.util.d.ts +31 -0
  86. package/lib/components/CGlobalSearch/globalSearchTarget.util.test.d.ts +1 -0
  87. package/lib/components/CRichTextEditor/extensions/paragraphExtended.d.ts +7 -1
  88. package/lib/components/CRichTextEditor/extensions/paragraphExtended.test.d.ts +1 -0
  89. package/lib/components/canvases/CanvasesManagementBulk.use.d.ts +12 -2
  90. package/lib/components/masterCanvases/CMasterCanvasesManagement.use.d.ts +86 -0
  91. package/lib/components/masterCanvases/CMasterCanvasesManagement.use.spec.d.ts +1 -0
  92. package/lib/components/masterCanvases/CMasterCanvasesPendingShareCell.spec.d.ts +1 -0
  93. package/lib/components/masterCanvases/CMasterCanvasesSharedWithCell.use.d.ts +39 -0
  94. package/lib/components/masterCanvases/CMasterCanvasesSharedWithCell.use.spec.d.ts +1 -0
  95. package/lib/components/masterCanvases/createFromMaster.use.d.ts +255 -0
  96. package/lib/components/masterCanvases/createFromMaster.use.spec.d.ts +1 -0
  97. package/lib/components/masterCanvases/masterCanvasDocuments.use.d.ts +56 -0
  98. package/lib/components/masterCanvases/masterCanvasDocuments.use.spec.d.ts +1 -0
  99. package/lib/components/masterCanvases/masterCanvasShares.use.d.ts +103 -0
  100. package/lib/components/masterCanvases/masterCanvasShares.use.spec.d.ts +1 -0
  101. package/lib/components/masterCanvases/masterFromCanvas.use.d.ts +122 -0
  102. package/lib/components/masterCanvases/masterFromCanvas.use.spec.d.ts +1 -0
  103. package/lib/components/masterCanvases/masterFromTemplate.use.d.ts +50 -0
  104. package/lib/components/masterCanvases/masterFromTemplate.use.spec.d.ts +1 -0
  105. package/lib/components/savedCanvases/CSavedCanvasesManagement.use.d.ts +204 -0
  106. package/lib/components/savedCanvases/savedCanvasDocuments.use.d.ts +111 -0
  107. package/lib/components/savedCanvases/savedCanvasDocuments.use.spec.d.ts +1 -0
  108. package/lib/components/savedCanvases/smartFolders/SmartFolders.use.d.ts +4 -0
  109. package/lib/composables/useCourseOnlyApps.d.ts +1 -1
  110. package/lib/composables/usePdfInterpolation.d.ts +2 -2
  111. package/lib/composables/useWindowEvents.d.ts +1 -1
  112. package/lib/constants/cdp.const.d.ts +2 -0
  113. package/lib/constants/translationLanguages.const.d.ts +150 -0
  114. package/lib/constants/translationLanguages.const.spec.d.ts +1 -0
  115. package/lib/main.lib.d.ts +7 -0
  116. package/lib/sdk/api/HighLevelApi.d.ts +19 -6
  117. package/lib/sdk/api/modules/ai.d.ts +43 -1
  118. package/lib/sdk/api/modules/ai.spec.d.ts +1 -0
  119. package/lib/sdk/api/modules/appsDb.d.ts +4 -4
  120. package/lib/sdk/api/modules/canvas.d.ts +20 -0
  121. package/lib/sdk/api/modules/ui/types.ui.d.ts +25 -0
  122. package/lib/sdk/interfaces.d.ts +31 -1
  123. package/lib/sdk/main.d.ts +46 -0
  124. package/lib/sdk/payload.types.d.ts +149 -0
  125. package/lib/sdk/platform.d.ts +27 -0
  126. package/lib/sdk/platform.spec.d.ts +1 -0
  127. package/lib/sdk/singleton-scope.spec.d.ts +1 -0
  128. package/lib/sdk/utils/httpFetch.spec.d.ts +1 -0
  129. package/lib/theme/canvasUiUnoPreset.test.d.ts +1 -0
  130. package/lib/types/ai-tasks.const.d.ts +39 -1
  131. package/lib/types/app.d.ts +55 -1
  132. package/lib/types/call.d.ts +14 -0
  133. package/lib/types/canvases.d.ts +15 -0
  134. package/lib/types/launchDarkly.types.d.ts +8 -3
  135. package/lib/types/organizationSettings.types.d.ts +39 -0
  136. package/lib/util/aiSummary.d.ts +30 -0
  137. package/lib/util/aiSummary.spec.d.ts +1 -0
  138. package/lib/util/network.d.ts +35 -0
  139. package/lib/util/user.d.ts +18 -0
  140. package/lib/util/user.test.d.ts +1 -0
  141. package/package.json +1 -1
  142. package/types/openapi/models/Canvas.d.ts +1 -0
  143. package/types/openapi/models/CanvasCreate.d.ts +1 -0
  144. package/types/openapi/models/CanvasCreateRequest.d.ts +1 -0
  145. package/types/openapi/models/CanvasRecommendedFile.d.ts +1 -1
  146. package/types/openapi/models/CanvasRetrieve.d.ts +1 -0
  147. package/types/openapi/models/CanvasUpdate.d.ts +1 -0
  148. package/types/openapi/models/CanvasUpdateRequest.d.ts +1 -0
  149. package/types/openapi/models/DeletedCanvas.d.ts +1 -0
  150. package/types/openapi/models/DeletedEnvironment.d.ts +0 -1
  151. package/types/openapi/models/Environment.d.ts +0 -1
  152. package/types/openapi/models/EnvironmentRequest.d.ts +0 -1
  153. package/types/openapi/models/File.d.ts +3 -1
  154. package/types/openapi/models/FileRetrieve.d.ts +2 -0
  155. package/types/openapi/models/PatchedCanvasUpdateRequest.d.ts +1 -0
  156. package/types/openapi/models/PatchedEnvironmentRequest.d.ts +0 -1
  157. package/types/openapi/models/SharedLink.d.ts +6 -0
  158. package/types/openapi/models/SharedLinkCreateRequest.d.ts +5 -0
@@ -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
  */
@@ -641,6 +657,38 @@ export interface AppsDbDeleteEntryPayload {
641
657
  export interface AppsDbPsqlPayload {
642
658
  query: string;
643
659
  }
660
+ /**
661
+ * Page-level attribution for ONE cited file (PIT-8062).
662
+ *
663
+ * `page_indices` is **0-based** — the same base `openFile(fileId, pageIndex)`
664
+ * and the iOS `page_index` → `pdfPageIndex` bridge take, so a consumer passes
665
+ * the value straight through and only adds 1 for a user-facing label. The model
666
+ * emits 1-based page numbers (it echoes the label it was shown); next-core's
667
+ * pia-search route converts them exactly once, server-side.
668
+ */
669
+ export interface PiaSearchCitation {
670
+ /**
671
+ * A file id that also appears in `cited_file_ids`.
672
+ *
673
+ * That superset relation is a **server guarantee**, not something this SDK
674
+ * enforces: next-core's pia-search route builds `cited_file_ids` as the union
675
+ * of the model's own list and every citation's `file_id`, so a file can be
676
+ * added by a citation but never removed by one. The SDK coerces the two
677
+ * fields independently and does not cross-check them — it has no way to tell a
678
+ * contract violation from a backend newer than itself.
679
+ */
680
+ file_id: string;
681
+ /**
682
+ * 0-based viewer page indices.
683
+ *
684
+ * The route emits them ascending, deduped, one entry per file and at most 5
685
+ * per file. Those are again **server** guarantees, restated here so a consumer
686
+ * knows what to expect; this SDK passes the array through untouched rather
687
+ * than re-normalizing it, so it cannot drift from whatever the route decides.
688
+ * A consumer that renders fixed-width chips should still cap what it draws.
689
+ */
690
+ page_indices: number[];
691
+ }
644
692
  /**
645
693
  * Unified `piaSearchAnswer` result across both serving paths.
646
694
  */
@@ -653,6 +701,19 @@ export interface PiaSearchAnswerResult {
653
701
  * File ids (from the candidate context) the answer drew on. Online path only.
654
702
  */
655
703
  cited_file_ids?: string[];
704
+ /**
705
+ * Which page(s) of each cited file the answer was grounded in (PIT-8062).
706
+ * Online, document-grounded path only, and only when the instance has the
707
+ * `pia_search_page_citations` flag on.
708
+ *
709
+ * **Optional at RUNTIME, not merely in the types.** Consumers load this SDK
710
+ * from an unversioned CDN tag, so the bundle a rep runs may predate the field
711
+ * entirely; and a backend with the flag off omits it from the body. The key is
712
+ * absent in those cases — never `null`, never `[]`. A cited file with no page
713
+ * information still appears in `cited_file_ids`: degrade to a file-level
714
+ * citation, never to an empty state.
715
+ */
716
+ citations?: PiaSearchCitation[];
656
717
  /**
657
718
  * Model self-reported confidence. Online path only.
658
719
  */
@@ -842,3 +903,91 @@ export interface TtsSpeakResult {
842
903
  */
843
904
  completed: boolean;
844
905
  }
906
+ /**
907
+ * Payload for `weeklyFocusRank` — one high-level call that ranks the rep's
908
+ * next-7-days meetings, routed on-device (iOS Gemma) or online (next-core
909
+ * Bedrock route). Calendar fetching stays caller-side: the caller owns the
910
+ * meeting list and passes it in.
911
+ */
912
+ export interface WeeklyFocusRankPayload {
913
+ /**
914
+ * The rep's meetings. Windowed to today + 6 days by the SDK/route — send the
915
+ * whole calendar if that is what you have.
916
+ */
917
+ meetings: WeeklyFocusRankMeeting[];
918
+ /**
919
+ * One CRM context bundle per UNIQUE account, keyed by `account_id` (open
920
+ * tasks, opportunity state, recent calls — whatever the admin mapped).
921
+ */
922
+ context?: Record<string, WeeklyFocusRankAccountContext>;
923
+ /**
924
+ * Instance to rank in. Defaults to the env's active instance.
925
+ */
926
+ instance_id?: string;
927
+ /**
928
+ * IANA zone the 7-day window is measured in. Defaults to the device's zone,
929
+ * which is the rep's zone on-device; ALWAYS sent to the online route, whose
930
+ * server clock is UTC.
931
+ */
932
+ time_zone?: string;
933
+ /**
934
+ * How many meetings to pick (1-8, default 5).
935
+ */
936
+ max_picks?: number;
937
+ /**
938
+ * Keep at most one pick per account. Default true.
939
+ */
940
+ one_per_account?: boolean;
941
+ }
942
+ export interface WeeklyFocusRankMeeting {
943
+ event_id: string;
944
+ account_id: string;
945
+ account_name: string;
946
+ meeting_subject: string;
947
+ /** ISO datetime, or a date-only 'YYYY-MM-DD'. */
948
+ meeting_time: string;
949
+ attendee_count?: number;
950
+ }
951
+ export interface WeeklyFocusRankAccountContext {
952
+ sections: Array<{
953
+ label: string;
954
+ items: Array<{
955
+ title: string;
956
+ fields?: Array<{
957
+ label: string;
958
+ value: string;
959
+ }>;
960
+ days_ago?: number | null;
961
+ }>;
962
+ fields_curated?: boolean;
963
+ }>;
964
+ }
965
+ /** One ranked pick, resolved back to a real meeting id. */
966
+ export interface WeeklyFocusRankPick {
967
+ event_id: string;
968
+ /** 1 = highest priority; unique and contiguous from 1. */
969
+ rank: number;
970
+ reason: string;
971
+ }
972
+ /**
973
+ * Unified `weeklyFocusRank` result across both serving paths.
974
+ */
975
+ export interface WeeklyFocusRankResult {
976
+ /**
977
+ * One or two sentences summarising the week. Empty when the week is empty.
978
+ */
979
+ hero: string;
980
+ /**
981
+ * The picked meetings, highest priority first.
982
+ */
983
+ top: WeeklyFocusRankPick[];
984
+ /**
985
+ * Meetings in the 7-day window that were NOT picked — including those the
986
+ * ranking never saw. The surface renders this as "+N more this week".
987
+ */
988
+ collapsed_count: number;
989
+ /**
990
+ * Which runtime produced the ranking.
991
+ */
992
+ source: 'on_device' | 'online';
993
+ }
@@ -0,0 +1,27 @@
1
+ import { PLATFORM_TYPE } from '../constants/cdp.const';
2
+ import { PitcherEnv } from './interfaces';
3
+ export type PitcherMode = PitcherEnv['mode'];
4
+ export type PitcherPlatformType = (typeof PLATFORM_TYPE)[keyof typeof PLATFORM_TYPE];
5
+ /** The one value a browser reports. Every other `mode` comes from a native shell's bridge. */
6
+ export declare const WEB_MODE = "WEB";
7
+ /**
8
+ * Is this host a NATIVE shell rather than a browser?
9
+ *
10
+ * `env.mode` names the platform (`WEB`, `IOS`, `MACOS`, `WINDOWS`, `ANDROID`). Only the browser
11
+ * builds (Impact web, Admin) ever say `WEB`; every other value is a shell that answers `getEnv`
12
+ * over a JS bridge and keeps an offline mirror. The distinction most platform branches actually
13
+ * want is "bridge + offline mirror or plain HTTP", NOT "iPad" — for years there was only one
14
+ * native host, so the two were spelled the same (`mode === 'IOS'`).
15
+ *
16
+ * **Backward and forward compatible by construction:** the check is `mode !== 'WEB'`, not a
17
+ * lookup in a closed list. An SDK or Slotty bundle built today keeps treating a host it has never
18
+ * heard of (a future `LINUX`, say) as native, so a new host never needs a lockstep web deploy to
19
+ * keep its offline paths, and an old host reporting `IOS` is unchanged.
20
+ *
21
+ * Use this wherever the branch means "the host answers this over its bridge / has local files /
22
+ * has no on-demand fetch". Keep a literal `mode === 'IOS'` ONLY for iPad HARDWARE — Multipeer
23
+ * peer session, the Salesforce Mobile SDK's SmartStore, on-device inference — which no other
24
+ * host implements and which answer `requestTypeDoesNotExists` there.
25
+ */
26
+ export declare function isNativeHost(mode: PitcherMode | string | null | undefined): boolean;
27
+ export declare function platformTypeForMode(mode: PitcherMode | string | null | undefined): PitcherPlatformType | undefined;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -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
@@ -73,7 +73,9 @@ type AppTypeJsonOptions = {
73
73
  width?: number | string;
74
74
  height?: number | string;
75
75
  };
76
- placement?: 'top-left' | 'top-center' | 'top-right' | 'left' | 'center' | 'right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
76
+ placement?: 'top-left' | 'top-center' | 'top-right' | 'left' | 'center' | 'right' | 'bottom-left' | 'bottom-center' | 'bottom-right'
77
+ /** canvas-popup only: full-width sheet sliding up from the bottom (the presentation-tools shell); `dimensions` are ignored. ui-global-popup apps fall back to `center`. */
78
+ | 'bottom-sheet';
77
79
  mode_config?: {
78
80
  fullscreen?: {
79
81
  show?: boolean;
@@ -92,6 +94,57 @@ type AppTypeJsonOptions = {
92
94
  };
93
95
  };
94
96
  };
97
+ /**
98
+ * One field of an app's `secrets_schema`.
99
+ *
100
+ * `type` drives how Admin renders the input, and the rules differ by schema shape — see
101
+ * `client/src/admin/util/appSecrets.ts` and the vocabulary table in next-core's
102
+ * `api/protected/apps/[app_name]/secrets/README.md`. In short: a flat schema masks everything
103
+ * except an explicit `'text'`; a `_strategy` schema treats `'string'` as readable and `'password'`
104
+ * as masked. `required` is absent-means-true — only `false` marks a field optional.
105
+ */
106
+ export type SecretFieldSchema = {
107
+ type?: 'string' | 'password' | 'text' | 'select';
108
+ description?: string;
109
+ required?: boolean;
110
+ /** `type: 'select'` only. */
111
+ options?: {
112
+ label: string;
113
+ value: string;
114
+ }[];
115
+ };
116
+ /** The `_strategy` entry: lets one app offer alternative credential sets (e.g. user/pass vs ECA). */
117
+ export type SecretStrategySchema = {
118
+ key: string;
119
+ label: string;
120
+ default: string;
121
+ options: Record<string, {
122
+ label: string;
123
+ }>;
124
+ };
125
+ /** A schema with no `_strategy`: every entry is a field. The common case. */
126
+ export type FlatSecretsSchema = Record<string, SecretFieldSchema>;
127
+ /**
128
+ * A schema that offers alternative credential sets: the `_strategy` entry, plus one GROUP of
129
+ * fields per strategy key (e.g. `user_pass` and `eca` in sfdc-activity-tracking).
130
+ */
131
+ export type StrategySecretsSchema = {
132
+ _strategy: SecretStrategySchema;
133
+ [group: string]: SecretStrategySchema | FlatSecretsSchema;
134
+ };
135
+ /**
136
+ * An app's `secrets_schema`, in either shape.
137
+ *
138
+ * A UNION, not an intersection: the two shapes disagree about what a value is, and `_strategy`
139
+ * cannot be both a {@link SecretFieldSchema} and a {@link SecretStrategySchema} — `options` alone
140
+ * is an array of `{label, value}` in one and a `Record<string, {label}>` in the other. Modelling it
141
+ * as one indexed object made every strategy schema unconstructible without a cast.
142
+ *
143
+ * Narrow with `secretsStrategyOf()` in `client/src/admin/util/appSecrets.ts` rather than testing
144
+ * `_strategy` for truthiness: under {@link FlatSecretsSchema} a field could legitimately be NAMED
145
+ * `_strategy`, and a truthiness test would then read that field as strategy config.
146
+ */
147
+ export type SecretsSchema = FlatSecretsSchema | StrategySecretsSchema;
95
148
  export type AppJson = {
96
149
  name: string;
97
150
  display_name: string;
@@ -108,6 +161,7 @@ export type AppJson = {
108
161
  order_override?: number;
109
162
  has_multiple_routes?: boolean;
110
163
  configure_entry?: string;
164
+ secrets_schema?: SecretsSchema;
111
165
  };
112
166
  export type AppFile = File & {
113
167
  app_metadata?: AppJson;
@@ -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;
@@ -4,6 +4,7 @@ export interface GetCanvasesParams {
4
4
  instance_id?: string;
5
5
  is_draft?: boolean;
6
6
  is_editable?: boolean;
7
+ is_master?: boolean;
7
8
  is_section?: boolean;
8
9
  is_template?: boolean;
9
10
  is_default?: boolean;
@@ -16,6 +17,20 @@ export interface GetCanvasesParams {
16
17
  id__in?: string;
17
18
  access_type?: string;
18
19
  template__id?: string;
20
+ /**
21
+ * `'member'` resolves visibility as a plain member even for admins/editors —
22
+ * only canvases distributed to the caller's groups, public ones, or their own
23
+ * are returned (PIT-8022). Honored by the next-core distributed endpoint;
24
+ * ignored (harmless) by the Django list endpoint and the iOS bridge.
25
+ */
26
+ scope?: 'member';
27
+ /**
28
+ * Skips the `COUNT(DISTINCT c.id)` pagination query. The response then
29
+ * reports `count: 0`, so only pass it when the caller does not paginate.
30
+ * Honored by the next-core distributed endpoint; ignored (harmless)
31
+ * elsewhere.
32
+ */
33
+ skip_count?: boolean;
19
34
  }
20
35
  export interface CanvasMetadataRetrieve {
21
36
  config: Record<string, any> & {
@@ -1,4 +1,4 @@
1
- export type LaunchDarklyBooleanFlagKey = 'ai_image_generation_model' | 'ai_video_generation_model' | '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_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_multimedia_component_ai_images' | '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' | 'skip_pspdfkit_tile_size_workaround' | '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';
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_master_pitchdecks' | '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_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;
@@ -47,6 +45,13 @@ export type CanvasManagerTableColumns = {
47
45
  canvases: CanvasManagerVisibility;
48
46
  section_templates: CanvasManagerVisibility;
49
47
  sections: CanvasManagerVisibility;
48
+ /**
49
+ * PIT-7488 — the master pitchdeck tab. Optional because the LD flag predates it and no
50
+ * environment configures it yet; `getVisibleColumns` degrades to "show every column" when the
51
+ * key is absent, so masters must NOT inherit the `canvases` config (hiding a column on the
52
+ * Pitchdecks tab would otherwise silently hide it here too).
53
+ */
54
+ master_canvases?: CanvasManagerVisibility;
50
55
  };
51
56
  export type LaunchDarklyEnv = {
52
57
  [K in LaunchDarklyBooleanFlagKey]?: boolean;
@@ -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,14 @@ 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_wizard_add_group?: boolean;
44
+ enable_presentation_tools?: boolean;
45
+ enable_hub_bottom_sheet?: boolean;
46
+ presentation_tools_frameless?: boolean;
47
+ enable_toc_open_by_default?: boolean;
48
+ use_canvas_exit_confirmation?: boolean;
40
49
  locks_polling_interval?: number;
41
50
  shared_link?: {
42
51
  title?: string;
@@ -55,6 +64,26 @@ export type OrganizationSettings = {
55
64
  }>;
56
65
  };
57
66
  };
67
+ /**
68
+ * PIT-7682 — open-ended list of brands the rep can pick from when creating a shared link.
69
+ * Supersedes the single-value `shared_link_brand_slug` / `canvas_dot_page_subdomain_to_use`
70
+ * keys, which stay readable as a fallback while instances are migrated.
71
+ *
72
+ * An instance-level list REPLACES the org-level one wholesale (that is how Django merges
73
+ * settings — its deep merge recurses into objects only), so never resolve it through
74
+ * `createPitcherSettings`, whose lodash `merge` combines arrays element-wise instead.
75
+ *
76
+ * Per entry: `id` is the stable reference sent to the API as `brand_id`, `name` is the
77
+ * rep-facing label, and at least one of `subdomain` (needs one-time Rebrandly setup) or
78
+ * `slug` (self-serve) must be set or the entry is skipped. `subdomain` wins over `slug`.
79
+ */
80
+ shared_link_brands?: {
81
+ id: string;
82
+ name?: string;
83
+ subdomain?: string;
84
+ slug?: string;
85
+ is_default?: boolean;
86
+ }[];
58
87
  allow_dsr_forwarding?: boolean;
59
88
  allow_revoke_shared_link?: boolean;
60
89
  enable_slotty_ui_asset_manager?: boolean;
@@ -76,6 +105,7 @@ export type OrganizationSettings = {
76
105
  minimum_event_duration_in_call?: number;
77
106
  enable_content_rating_in_call?: boolean;
78
107
  enable_speaker_notes?: boolean;
108
+ enable_account_only_meeting_notes?: boolean;
79
109
  display_metadata_filters_in_modal?: boolean;
80
110
  enable_js_api_recommended_files?: boolean;
81
111
  metadata_highlight_properties?: MetadataHighlightProperty[];
@@ -117,15 +147,24 @@ export type OrganizationSettings = {
117
147
  location_prompt_message?: string;
118
148
  use_collection_player_with_annotations?: boolean;
119
149
  disable_core_canvas_metadata?: boolean;
150
+ enable_account_widgets?: boolean;
120
151
  enable_folder_description_via_name?: boolean;
121
152
  enable_download_original_file_in_impact?: boolean;
122
153
  alternative_canvas_fullscreen?: boolean;
154
+ enable_impact_web_presentation_browser_fullscreen?: boolean;
155
+ default_presentation_fullscreen_mode?: FullscreenMode;
123
156
  enable_presentation_annotations?: boolean;
124
157
  max_files_limit?: number;
125
158
  is_meeting_bar_account_selection_disabled?: boolean;
126
159
  meeting_bar_show_account_context?: 'off' | 'no-call-only' | 'always';
127
160
  meeting_bar_allow_attendee_edit_on_existing_events?: boolean;
128
161
  disable_postcall?: boolean;
162
+ preserve_account_after_call_stop?: boolean;
163
+ meeting_bar_show_meetings?: boolean;
164
+ postcall_event_hooks?: {
165
+ on_submit?: Record<string, string | number | boolean | null>;
166
+ on_cancel?: Record<string, string | number | boolean | null>;
167
+ };
129
168
  launch_in_present_mode_on_creation?: boolean;
130
169
  slotty_ui_route_config?: {
131
170
  name: string;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Parse a stored `metadata.aiAnalysis.summary` value into plain display text.
3
+ *
4
+ * `next-core`'s file-analysis.parse.ts prompts the model for a fenced
5
+ * ```json block and extracts `summary` on a successful JSON.parse — but on a
6
+ * JSON.parse failure (malformed model output) it falls back to storing the
7
+ * RAW text (the fence and all, sliced to 200 chars) directly as `summary`.
8
+ * That raw-fallback shape is what showed up as a literal ```json blob in the
9
+ * Hub's Summary section (PIT-8049). Handles three shapes:
10
+ * (a) a plain string — the common, already-clean case
11
+ * (b) a string containing a ```json fenced blob (complete OR truncated/
12
+ * unterminated) whose JSON has a `summary` key
13
+ * (c) an object carrying a `summary` field directly (recurses, so a
14
+ * double-wrapped value is also unwrapped)
15
+ *
16
+ * This function's body (and its test suite) is identical to the Hub's
17
+ * `utils/fileMetadata.ts` copy — Hub (React) and canvas-ui (Vue) share no
18
+ * runtime code, so it's duplicated rather than shared. The surrounding FILES
19
+ * differ (helper order, doc comments); only `parseAiSummary` itself and the
20
+ * tests must stay in lockstep.
21
+ */
22
+ export declare function parseAiSummary(value: unknown): string | undefined;
23
+ /**
24
+ * Normalize a file's AI key messages to a string array. Prefers the newer
25
+ * `metadata.aiAnalysis.keyPoints`, falls back to legacy `metadata.key_messages`.
26
+ *
27
+ * Ported from the Hub's `utils/fileMetadata.ts` (PIT-8049 round 2) — data-only,
28
+ * no React/Vue-specific logic, so a straight copy.
29
+ */
30
+ export declare function normalizeKeyMessages(metadata: Record<string, any> | null | undefined): string[];
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,40 @@
1
1
  import { PaginatedData } from '../types/paginatedData';
2
+ /** What the `*WithStatus` fetchers return: the rows, plus whether they are all of them. */
3
+ export interface FetchAllResult<T> {
4
+ /** The fetched rows, capped at `maxLimit`. */
5
+ items: T[];
6
+ /** True when the server had more rows than the cap allowed us to fetch. */
7
+ truncated: boolean;
8
+ /** The server-reported total, regardless of the cap. */
9
+ total: number;
10
+ }
11
+ /**
12
+ * `fetchAll`, but the caller can tell whether it got everything.
13
+ *
14
+ * The cap has always been silent — a Sentry message nobody sees at the call
15
+ * site, and a plain array indistinguishable from a complete one, so callers
16
+ * that persist or present the result treat 2000 of 5000 rows as the whole
17
+ * library (PIT-8408). Use this wherever "is this all of it?" changes what the
18
+ * caller should do or show; `fetchAll` stays the shorthand for the rest.
19
+ */
20
+ export declare const fetchAllWithStatus: <T>(reqFunction: (reqParams: any) => Promise<PaginatedData<T>>, reqParams?: any, maxLimit?: number) => Promise<FetchAllResult<T>>;
2
21
  export declare const fetchAll: <T>(reqFunction: (reqParams: any) => Promise<PaginatedData<T>>, reqParams?: any, maxLimit?: number) => Promise<T[]>;
22
+ /**
23
+ * `fetchAllWithOffset`, but the caller can tell whether it got everything.
24
+ *
25
+ * The offset-based twin of `fetchAllWithStatus`, and it carried the same silent
26
+ * cap: a Sentry message nobody sees at the call site, and a plain array that a
27
+ * caller cannot distinguish from a complete one (PIT-8408). Use this wherever
28
+ * "is this all of it?" changes what the caller should do or show.
29
+ */
30
+ export declare const fetchAllWithOffsetStatus: <T>(reqFunction: (reqParams: any) => Promise<{
31
+ pagination: {
32
+ limit: number;
33
+ offset: number;
34
+ total: number;
35
+ };
36
+ data: T[];
37
+ }>, reqParams?: any, maxLimit?: number) => Promise<FetchAllResult<T>>;
3
38
  export declare const fetchAllWithOffset: <T>(reqFunction: (reqParams: any) => Promise<{
4
39
  pagination: {
5
40
  limit: number;
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pitcher/js-api",
3
- "version": "1.29.0",
3
+ "version": "1.31.0",
4
4
  "type": "module",
5
5
  "main": "js-api.umd.min.js",
6
6
  "module": "js-api.esm.js",