@pitcher/js-api 1.30.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 (113) hide show
  1. package/js-api.esm.js +80 -17
  2. package/js-api.esm.js.map +1 -1
  3. package/js-api.umd.min.js +15 -15
  4. package/js-api.umd.min.js.map +1 -1
  5. package/lib/apps/browser/components/ContextMenu/TranslateFileButton.test.d.ts +1 -0
  6. package/lib/apps/browser/stores/api.filesFoldersDeleter.test.d.ts +1 -0
  7. package/lib/apps/canvas-builder/components/container/PopupApps/PopupAppModal.spec.d.ts +1 -0
  8. package/lib/apps/canvas-builder/components/container/PresentationTools/PresentationToolsButtons.spec.d.ts +1 -0
  9. package/lib/apps/canvas-builder/components/ui/BottomSheetModal/BottomSheetModal.integration.spec.d.ts +1 -0
  10. package/lib/apps/canvas-builder/components/ui/BottomSheetModal/BottomSheetModal.spec.d.ts +1 -0
  11. package/lib/apps/canvas-builder/components/ui/DynamicContent/section-component-bindings.util.d.ts +32 -0
  12. package/lib/apps/canvas-builder/components/ui/DynamicContent/useDynamicContent.d.ts +4 -0
  13. package/lib/apps/canvas-builder/components/ui/Link/Link.util.d.ts +8 -1
  14. package/lib/apps/canvas-builder/components/ui/Link/Link.util.test.d.ts +1 -0
  15. package/lib/apps/canvas-builder/components/ui/SectionList/SectionItemModal.spec.d.ts +1 -0
  16. package/lib/apps/canvas-builder/composables/useCanvas.d.ts +83 -9
  17. package/lib/apps/canvas-builder/composables/useCanvasBlocks.d.ts +4 -2
  18. package/lib/apps/canvas-builder/composables/useCanvasHistory.d.ts +2 -2
  19. package/lib/apps/canvas-builder/composables/useCanvasTheme.d.ts +2 -2
  20. package/lib/apps/canvas-builder/composables/useNavigatorDrawer.d.ts +25 -0
  21. package/lib/apps/canvas-builder/composables/useNavigatorDrawer.spec.d.ts +1 -0
  22. package/lib/apps/canvas-builder/composables/usePopupApps.d.ts +41 -4
  23. package/lib/apps/canvas-builder/composables/usePopupApps.spec.d.ts +1 -0
  24. package/lib/apps/canvas-builder/composables/usePresentationTools.d.ts +112 -0
  25. package/lib/apps/canvas-builder/composables/usePresentationTools.spec.d.ts +1 -0
  26. package/lib/apps/canvas-builder/types/canvas.d.ts +13 -0
  27. package/lib/apps/canvas-builder/util/canvas.util.d.ts +12 -0
  28. package/lib/apps/canvas-builder/util/completionWizard.util.d.ts +251 -11
  29. package/lib/apps/canvas-builder/util/iframe.util.d.ts +24 -2
  30. package/lib/apps/canvas-builder/util/iframe.util.test.d.ts +1 -0
  31. package/lib/apps/canvas-selector/stores/app.d.ts +14 -0
  32. package/lib/apps/collection-player/components/AppHeader.spec.d.ts +1 -0
  33. package/lib/apps/collection-player/composables/speaker-notes.use.d.ts +14 -0
  34. package/lib/apps/collection-player/composables/speaker-notes.use.spec.d.ts +1 -0
  35. package/lib/apps/collection-player/stores/app.store.d.ts +5 -1
  36. package/lib/apps/collection-player/stores/showNotesToggle.spec.d.ts +1 -0
  37. package/lib/apps/content-selector/appTypes.d.ts +16 -0
  38. package/lib/apps/content-selector/components/Content/AllContent/List/expandFileGuard.spec.d.ts +1 -0
  39. package/lib/apps/notes/NotesApp.accountNotes.spec.d.ts +1 -0
  40. package/lib/apps/notes/NotesApp.speakerNotes.spec.d.ts +1 -0
  41. package/lib/apps/notes/composables/useAccountNotes.d.ts +14 -0
  42. package/lib/apps/notes/composables/useAccountNotes.spec.d.ts +1 -0
  43. package/lib/apps/notes/composables/useAccountOnlyNotesGate.d.ts +21 -0
  44. package/lib/apps/notes/composables/useAccountOnlyNotesGate.spec.d.ts +1 -0
  45. package/lib/apps/notes/composables/useActiveSlideNotes.d.ts +42 -0
  46. package/lib/apps/notes/composables/useActiveSlideNotes.spec.d.ts +1 -0
  47. package/lib/components/CFileAccessManagement/collaborationApi.d.ts +2 -0
  48. package/lib/components/CFilePanel/Details.spec.d.ts +1 -0
  49. package/lib/components/CFilePanel/KeyMessages.spec.d.ts +1 -0
  50. package/lib/components/CFilePanel/Summary.spec.d.ts +1 -0
  51. package/lib/components/CFileViewer/pdf/CFileViewer.pdf.util.d.ts +52 -0
  52. package/lib/components/CGlobalLoader/CGlobalLoaderMark.spec.d.ts +1 -0
  53. package/lib/components/CGlobalLoader/globalLoader.paths.d.ts +2 -0
  54. package/lib/components/CGlobalSearch/globalSearchTarget.util.d.ts +31 -0
  55. package/lib/components/CGlobalSearch/globalSearchTarget.util.test.d.ts +1 -0
  56. package/lib/components/CRichTextEditor/extensions/paragraphExtended.d.ts +7 -1
  57. package/lib/components/CRichTextEditor/extensions/paragraphExtended.test.d.ts +1 -0
  58. package/lib/components/canvases/CanvasesManagementBulk.use.d.ts +12 -2
  59. package/lib/components/masterCanvases/CMasterCanvasesManagement.use.d.ts +86 -0
  60. package/lib/components/masterCanvases/CMasterCanvasesManagement.use.spec.d.ts +1 -0
  61. package/lib/components/masterCanvases/CMasterCanvasesPendingShareCell.spec.d.ts +1 -0
  62. package/lib/components/masterCanvases/CMasterCanvasesSharedWithCell.use.d.ts +39 -0
  63. package/lib/components/masterCanvases/CMasterCanvasesSharedWithCell.use.spec.d.ts +1 -0
  64. package/lib/components/masterCanvases/createFromMaster.use.d.ts +255 -0
  65. package/lib/components/masterCanvases/createFromMaster.use.spec.d.ts +1 -0
  66. package/lib/components/masterCanvases/masterCanvasDocuments.use.d.ts +56 -0
  67. package/lib/components/masterCanvases/masterCanvasDocuments.use.spec.d.ts +1 -0
  68. package/lib/components/masterCanvases/masterCanvasShares.use.d.ts +103 -0
  69. package/lib/components/masterCanvases/masterCanvasShares.use.spec.d.ts +1 -0
  70. package/lib/components/masterCanvases/masterFromCanvas.use.d.ts +122 -0
  71. package/lib/components/masterCanvases/masterFromCanvas.use.spec.d.ts +1 -0
  72. package/lib/components/masterCanvases/masterFromTemplate.use.d.ts +50 -0
  73. package/lib/components/masterCanvases/masterFromTemplate.use.spec.d.ts +1 -0
  74. package/lib/components/savedCanvases/CSavedCanvasesManagement.use.d.ts +203 -0
  75. package/lib/components/savedCanvases/savedCanvasDocuments.use.d.ts +111 -0
  76. package/lib/components/savedCanvases/savedCanvasDocuments.use.spec.d.ts +1 -0
  77. package/lib/components/savedCanvases/smartFolders/SmartFolders.use.d.ts +4 -0
  78. package/lib/constants/cdp.const.d.ts +1 -0
  79. package/lib/constants/translationLanguages.const.d.ts +86 -8
  80. package/lib/constants/translationLanguages.const.spec.d.ts +1 -0
  81. package/lib/main.lib.d.ts +5 -0
  82. package/lib/sdk/api/HighLevelApi.d.ts +2 -0
  83. package/lib/sdk/api/modules/appsDb.d.ts +4 -4
  84. package/lib/sdk/api/modules/canvas.d.ts +12 -0
  85. package/lib/sdk/api/modules/ui/types.ui.d.ts +18 -0
  86. package/lib/sdk/interfaces.d.ts +31 -1
  87. package/lib/sdk/main.d.ts +38 -0
  88. package/lib/sdk/payload.types.d.ts +45 -0
  89. package/lib/sdk/platform.d.ts +27 -0
  90. package/lib/sdk/platform.spec.d.ts +1 -0
  91. package/lib/sdk/singleton-scope.spec.d.ts +1 -0
  92. package/lib/sdk/utils/httpFetch.spec.d.ts +1 -0
  93. package/lib/theme/canvasUiUnoPreset.test.d.ts +1 -0
  94. package/lib/types/app.d.ts +55 -1
  95. package/lib/types/canvases.d.ts +15 -0
  96. package/lib/types/launchDarkly.types.d.ts +8 -1
  97. package/lib/types/organizationSettings.types.d.ts +29 -0
  98. package/lib/util/aiSummary.d.ts +30 -0
  99. package/lib/util/aiSummary.spec.d.ts +1 -0
  100. package/lib/util/network.d.ts +35 -0
  101. package/package.json +1 -1
  102. package/types/openapi/models/Canvas.d.ts +1 -0
  103. package/types/openapi/models/CanvasCreate.d.ts +1 -0
  104. package/types/openapi/models/CanvasCreateRequest.d.ts +1 -0
  105. package/types/openapi/models/CanvasRecommendedFile.d.ts +1 -1
  106. package/types/openapi/models/CanvasRetrieve.d.ts +1 -0
  107. package/types/openapi/models/CanvasUpdate.d.ts +1 -0
  108. package/types/openapi/models/CanvasUpdateRequest.d.ts +1 -0
  109. package/types/openapi/models/DeletedCanvas.d.ts +1 -0
  110. package/types/openapi/models/File.d.ts +1 -1
  111. package/types/openapi/models/PatchedCanvasUpdateRequest.d.ts +1 -0
  112. package/types/openapi/models/SharedLink.d.ts +6 -0
  113. package/types/openapi/models/SharedLinkCreateRequest.d.ts +5 -0
@@ -49,7 +49,18 @@ export interface OrgConfigResponse {
49
49
  sentry_region: 'us' | 'eu';
50
50
  }
51
51
  export interface PitcherEnv {
52
- mode: 'WEB' | 'IOS' | 'WINDOWS' | 'ANDROID';
52
+ /**
53
+ * The HOST the web layer is running inside — `mode` IS the platform, one value per OS.
54
+ *
55
+ * `WEB` is the browser; everything else is a NATIVE shell with a JS bridge and an offline
56
+ * mirror (`IOS` the iPad, `MACOS`/`WINDOWS`/`ANDROID` the Tauri desktop/Android shell). Never
57
+ * write `mode === 'IOS'` to mean "native" — use `isNativeHost(mode)` (`@sdk/platform`), which
58
+ * is `mode !== 'WEB'` so a host newer than this bundle still takes the native branch. Values are
59
+ * only ever ADDED to this union — never renamed or removed, apps in the field compare them. `IOS` stays
60
+ * the right test only for iPad HARDWARE: MultipeerConnectivity (peer session), the Salesforce
61
+ * Mobile SDK's SmartStore, on-device inference — subsystems no other host has.
62
+ */
63
+ mode: 'WEB' | 'IOS' | 'WINDOWS' | 'ANDROID' | 'MACOS';
53
64
  pitcher: {
54
65
  token_claims: Record<string, any>;
55
66
  organization: PitcherOrg;
@@ -78,6 +89,25 @@ export interface PitcherEnv {
78
89
  ui_locale?: string;
79
90
  device_locale?: string;
80
91
  sync_badge_value?: number;
92
+ /**
93
+ * Bridge capabilities the running native host advertises (PIT-7682). Only web posts to the API
94
+ * directly and needs no capability check — every NATIVE host (`isNativeHost(env.mode)`) routes
95
+ * requests through its own bridge handlers.
96
+ *
97
+ * That includes the **Tauri desktop/Android shell** (`pitcher-impact-tauri-ng`), which reports
98
+ * its own build target as `mode` (`MACOS` / `WINDOWS` / `ANDROID`) and states what it supports
99
+ * here. A host that omits a token behaves exactly like an old iPad build — consumers that treat
100
+ * absent as unsupported degrade it safely — so gaining a capability means implementing the
101
+ * forwarding first.
102
+ *
103
+ * Tokens are `<request_type>.<field>`, e.g. `share_canvas.brand_id`. Feature-detect on them
104
+ * rather than on `version`: an older host omits the key entirely, so **absent must be treated as
105
+ * unsupported**. The shape is not guaranteed either — it crosses a bridge from native code — so
106
+ * check `Array.isArray` before `.includes`, or a string value substring-matches the gate open.
107
+ * Defined natively in `BridgeCapabilities` (pitcher-impact-ios-ng); the strings are a permanent
108
+ * contract because web builds in the wild keep checking them.
109
+ */
110
+ capabilities?: string[];
81
111
  }
82
112
  export interface PitcherAPI extends Emitter<ApiEventMap> {
83
113
  request(type: string, body: any, callback: () => any): Promise<PitcherResponse>;
package/lib/sdk/main.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { ApiOptions } from './interfaces';
2
2
  import { createHighLevelApi } from './api/HighLevelApi';
3
3
  export * from './interfaces';
4
+ export * from './platform';
4
5
  export * from './payload.types';
5
6
  export * from './api/modules/ui/types.ui';
6
7
  export * from './api/modules/admin/types.admin';
@@ -9,8 +10,39 @@ export * from './peer-connectivity';
9
10
  export declare let highLevelApi: ReturnType<typeof createHighLevelApi>;
10
11
  /**
11
12
  * Check out the returned object documentation for the list of available methods.
13
+ *
14
+ * `options` CONFIGURES THE SHARED SINGLETON — it is not component-scoped. The
15
+ * host app is expected to pass them exactly once at boot (slotty does this in
16
+ * `api/client.ts`, supplying the Sentry `errorLogger` and the org's `fetchMode`).
17
+ *
18
+ * A call with NO options is a plain accessor and must never rebuild: canvas-ui
19
+ * has ~40 bare `usePitcherApi()` call sites (composables, comment components,
20
+ * `useBroadcastRouteChange` on every sidebar navigation). Rebuilding on those
21
+ * reset the singleton to `LowLevelApi`'s constructor defaults — dropping the
22
+ * host's `fetchMode` back to 'postmessage' and silently replacing the Sentry
23
+ * errorLogger with a no-op for the rest of the session. Because `highLevelApi`
24
+ * is an exported `let` with ESM live binding, every later importer picked up the
25
+ * downgraded instance. Each rebuild also registered another never-removed
26
+ * `window` 'message' listener and fired another `subscribe`, so listeners grew
27
+ * without bound.
28
+ *
29
+ * If you need different options for one call site, use `createScopedPitcherApi`
30
+ * — do not pass options here.
12
31
  */
13
32
  export declare function usePitcherApi(options?: ApiOptions): ReturnType<typeof createHighLevelApi>;
33
+ /**
34
+ * A DEDICATED api instance for a call site that needs different options, without
35
+ * touching the shared singleton every other consumer holds.
36
+ *
37
+ * Inherits whatever the host configured (so the Sentry errorLogger and casing
38
+ * survive) and applies `options` on top.
39
+ *
40
+ * Each instance registers its own `window` 'message' listener and its own
41
+ * `subscribe`, so create ONE per call site at module scope — never inside a
42
+ * component `setup()`, which would leak a listener per mount. Responses are
43
+ * matched by callback id and unknown ids are ignored, so instances coexist.
44
+ */
45
+ export declare function createScopedPitcherApi(options?: ApiOptions): ReturnType<typeof createHighLevelApi>;
14
46
  /**
15
47
  * API methods available in the CatalogIQ default UI.
16
48
  *
@@ -234,6 +266,7 @@ export declare function useApi(options?: ApiOptions): {
234
266
  id: import('../main.lib').CanvasRetrieve["id"];
235
267
  fields?: string;
236
268
  lazy_sections?: boolean;
269
+ skip_error_toast?: boolean;
237
270
  }): Promise<import('../main.lib').CanvasRetrieve>;
238
271
  getSectionsByIds(payload: {
239
272
  canvas_id: import('../main.lib').CanvasRetrieve["id"];
@@ -246,6 +279,7 @@ export declare function useApi(options?: ApiOptions): {
246
279
  }>;
247
280
  shareCanvas(payload: {
248
281
  id: import('../main.lib').CanvasRetrieve["id"];
282
+ brand_id?: string;
249
283
  }): Promise<import('../main.lib').SharedLink>;
250
284
  getCanvasRecommendedFiles(payload: {
251
285
  canvas_id: import('../main.lib').CanvasRetrieve["id"];
@@ -541,6 +575,7 @@ export declare function useApi(options?: ApiOptions): {
541
575
  id: import('../main.lib').CanvasRetrieve["id"];
542
576
  fields?: string;
543
577
  lazy_sections?: boolean;
578
+ skip_error_toast?: boolean;
544
579
  }): Promise<import('../main.lib').CanvasRetrieve>;
545
580
  getSectionsByIds(payload: {
546
581
  canvas_id: import('../main.lib').CanvasRetrieve["id"];
@@ -553,6 +588,7 @@ export declare function useApi(options?: ApiOptions): {
553
588
  }>;
554
589
  shareCanvas(payload: {
555
590
  id: import('../main.lib').CanvasRetrieve["id"];
591
+ brand_id?: string;
556
592
  }): Promise<import('../main.lib').SharedLink>;
557
593
  getCanvasRecommendedFiles(payload: {
558
594
  canvas_id: import('../main.lib').CanvasRetrieve["id"];
@@ -787,6 +823,7 @@ export declare function useApi(options?: ApiOptions): {
787
823
  id: import('../main.lib').CanvasRetrieve["id"];
788
824
  fields?: string;
789
825
  lazy_sections?: boolean;
826
+ skip_error_toast?: boolean;
790
827
  }): Promise<import('../main.lib').CanvasRetrieve>;
791
828
  getSectionsByIds(payload: {
792
829
  canvas_id: import('../main.lib').CanvasRetrieve["id"];
@@ -799,6 +836,7 @@ export declare function useApi(options?: ApiOptions): {
799
836
  }>;
800
837
  shareCanvas(payload: {
801
838
  id: import('../main.lib').CanvasRetrieve["id"];
839
+ brand_id?: string;
802
840
  }): Promise<import('../main.lib').SharedLink>;
803
841
  getCanvasRecommendedFiles(payload: {
804
842
  canvas_id: import('../main.lib').CanvasRetrieve["id"];
@@ -657,6 +657,38 @@ export interface AppsDbDeleteEntryPayload {
657
657
  export interface AppsDbPsqlPayload {
658
658
  query: string;
659
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
+ }
660
692
  /**
661
693
  * Unified `piaSearchAnswer` result across both serving paths.
662
694
  */
@@ -669,6 +701,19 @@ export interface PiaSearchAnswerResult {
669
701
  * File ids (from the candidate context) the answer drew on. Online path only.
670
702
  */
671
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[];
672
717
  /**
673
718
  * Model self-reported confidence. Online path only.
674
719
  */
@@ -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 {};
@@ -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;
@@ -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 = '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';
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';
@@ -45,6 +45,13 @@ export type CanvasManagerTableColumns = {
45
45
  canvases: CanvasManagerVisibility;
46
46
  section_templates: CanvasManagerVisibility;
47
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;
48
55
  };
49
56
  export type LaunchDarklyEnv = {
50
57
  [K in LaunchDarklyBooleanFlagKey]?: boolean;
@@ -40,6 +40,10 @@ export type OrganizationSettings = {
40
40
  enable_wizard_preview_button?: boolean;
41
41
  enable_edit_opens_completion_wizard?: boolean;
42
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;
43
47
  enable_toc_open_by_default?: boolean;
44
48
  use_canvas_exit_confirmation?: boolean;
45
49
  locks_polling_interval?: number;
@@ -60,6 +64,26 @@ export type OrganizationSettings = {
60
64
  }>;
61
65
  };
62
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
+ }[];
63
87
  allow_dsr_forwarding?: boolean;
64
88
  allow_revoke_shared_link?: boolean;
65
89
  enable_slotty_ui_asset_manager?: boolean;
@@ -81,6 +105,7 @@ export type OrganizationSettings = {
81
105
  minimum_event_duration_in_call?: number;
82
106
  enable_content_rating_in_call?: boolean;
83
107
  enable_speaker_notes?: boolean;
108
+ enable_account_only_meeting_notes?: boolean;
84
109
  display_metadata_filters_in_modal?: boolean;
85
110
  enable_js_api_recommended_files?: boolean;
86
111
  metadata_highlight_properties?: MetadataHighlightProperty[];
@@ -136,6 +161,10 @@ export type OrganizationSettings = {
136
161
  disable_postcall?: boolean;
137
162
  preserve_account_after_call_stop?: boolean;
138
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
+ };
139
168
  launch_in_present_mode_on_creation?: boolean;
140
169
  slotty_ui_route_config?: {
141
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pitcher/js-api",
3
- "version": "1.30.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",
@@ -11,6 +11,7 @@ export type Canvas = {
11
11
  is_template?: boolean;
12
12
  is_section?: boolean;
13
13
  is_block?: boolean;
14
+ is_master?: boolean;
14
15
  is_editable?: boolean;
15
16
  is_default?: boolean;
16
17
  metadata?: any;
@@ -16,6 +16,7 @@ export type CanvasCreate = {
16
16
  is_template?: boolean;
17
17
  is_section?: boolean;
18
18
  is_block?: boolean;
19
+ is_master?: boolean;
19
20
  is_editable?: boolean;
20
21
  is_default?: boolean;
21
22
  metadata?: any;
@@ -11,6 +11,7 @@ export type CanvasCreateRequest = {
11
11
  is_template?: boolean;
12
12
  is_section?: boolean;
13
13
  is_block?: boolean;
14
+ is_master?: boolean;
14
15
  is_editable?: boolean;
15
16
  is_default?: boolean;
16
17
  metadata?: any;
@@ -45,5 +45,5 @@ export type CanvasRecommendedFile = {
45
45
  readonly created_at: string;
46
46
  readonly created_by: MiniUser;
47
47
  readonly modified_at: string;
48
- readonly modified_by: MiniUser;
48
+ readonly modified_by: MiniUser | null;
49
49
  };
@@ -16,6 +16,7 @@ export type CanvasRetrieve = {
16
16
  is_template?: boolean;
17
17
  is_section?: boolean;
18
18
  is_block?: boolean;
19
+ is_master?: boolean;
19
20
  is_editable?: boolean;
20
21
  is_default?: boolean;
21
22
  metadata?: any;
@@ -16,6 +16,7 @@ export type CanvasUpdate = {
16
16
  is_template?: boolean;
17
17
  is_section?: boolean;
18
18
  is_block?: boolean;
19
+ is_master?: boolean;
19
20
  is_editable?: boolean;
20
21
  is_default?: boolean;
21
22
  metadata?: any;
@@ -10,6 +10,7 @@ export type CanvasUpdateRequest = {
10
10
  is_template?: boolean;
11
11
  is_section?: boolean;
12
12
  is_block?: boolean;
13
+ is_master?: boolean;
13
14
  is_editable?: boolean;
14
15
  is_default?: boolean;
15
16
  metadata?: any;
@@ -11,6 +11,7 @@ export type DeletedCanvas = {
11
11
  is_template?: boolean;
12
12
  is_section?: boolean;
13
13
  is_block?: boolean;
14
+ is_master?: boolean;
14
15
  is_editable?: boolean;
15
16
  is_default?: boolean;
16
17
  metadata?: any;
@@ -47,5 +47,5 @@ export type File = {
47
47
  readonly created_at: string;
48
48
  readonly created_by: MiniUser;
49
49
  readonly modified_at: string;
50
- readonly modified_by: MiniUser;
50
+ readonly modified_by: MiniUser | null;
51
51
  };
@@ -10,6 +10,7 @@ export type PatchedCanvasUpdateRequest = {
10
10
  is_template?: boolean;
11
11
  is_section?: boolean;
12
12
  is_block?: boolean;
13
+ is_master?: boolean;
13
14
  is_editable?: boolean;
14
15
  is_default?: boolean;
15
16
  metadata?: any;
@@ -11,4 +11,10 @@ export type SharedLink = {
11
11
  readonly status: string;
12
12
  readonly url: string;
13
13
  short_url?: string | null;
14
+ /**
15
+ * PIT-7682 - CLIENT-SET, never returned by the API. Marks a link that was re-created without
16
+ * the rep's chosen brand after the server rejected it, so the UI can say the pick was not
17
+ * applied. Set by `canvas.api.ts` on web and by the iOS bridge handler (`brand_fallback_applied`).
18
+ */
19
+ brand_fallback_applied?: boolean;
14
20
  };