@pitcher/js-api 1.26.1 → 1.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/js-api.esm.d.ts +0 -1
- package/js-api.esm.js +141 -0
- package/js-api.esm.js.map +1 -1
- package/js-api.umd.min.js +17 -10
- package/js-api.umd.min.js.map +1 -1
- package/lib/apps/browser/appTypes.d.ts +2 -1
- package/lib/apps/browser/stores/api.d.ts +22 -2
- package/lib/apps/browser/stores/app.d.ts +6 -1
- package/lib/apps/browser/util/sortOrder.d.ts +36 -0
- package/lib/apps/browser/util/sortOrder.test.d.ts +1 -0
- package/lib/apps/canvas-builder/components/ui/DataCharts/types.d.ts +7 -1
- package/lib/apps/canvas-builder/components/ui/DataCharts/types.spec.d.ts +1 -0
- package/lib/apps/canvas-builder/components/ui/DynamicContent/useDynamicContent.d.ts +11 -1
- package/lib/apps/canvas-builder/composables/lazySections.d.ts +53 -0
- package/lib/apps/canvas-builder/composables/lazySections.spec.d.ts +1 -0
- package/lib/apps/canvas-builder/composables/useCanvas.d.ts +108 -14
- package/lib/apps/canvas-builder/composables/useCanvasBlocks.d.ts +4 -0
- package/lib/apps/canvas-builder/composables/useHtmlUserPropertyFields.d.ts +4 -0
- package/lib/apps/canvas-builder/courseMode.spec.d.ts +1 -0
- package/lib/apps/canvas-builder/types/canvas.d.ts +77 -2
- package/lib/apps/canvas-selector/stores/app.d.ts +14 -0
- package/lib/apps/collection-player/stores/app.store.d.ts +1 -0
- package/lib/components/savedCanvases/CSavedCanvasesManagement.use.d.ts +2 -0
- package/lib/components/savedCanvases/smartFolders/SmartFolders.use.d.ts +8 -0
- package/lib/composables/useCanvasRendererExcludedTags.d.ts +15 -0
- package/lib/composables/useCanvasRendererExcludedTags.spec.d.ts +1 -0
- package/lib/composables/useThemeVars.d.ts +2 -0
- package/lib/constants/cdp.const.d.ts +1 -0
- package/lib/main.lib.d.ts +5 -1
- package/lib/sdk/api/HighLevelApi.d.ts +17 -0
- package/lib/sdk/api/modules/ai.d.ts +52 -0
- package/lib/sdk/api/modules/canvas.d.ts +42 -1
- package/lib/sdk/api/modules/index.d.ts +1 -0
- package/lib/sdk/interfaces.d.ts +13 -1
- package/lib/sdk/main.d.ts +39 -0
- package/lib/sdk/payload.types.d.ts +121 -0
- package/lib/theme/light.d.ts +2 -0
- package/lib/theme/theme.types.d.ts +1 -0
- package/lib/types/ai-tasks.const.d.ts +80 -0
- package/lib/types/instanceSettings.types.d.ts +2 -0
- package/lib/types/launchDarkly.types.d.ts +16 -7
- package/lib/types/organizationSettings.types.d.ts +18 -0
- package/lib/util/fullscreen.util.d.ts +12 -1
- package/lib/util/handlebars.d.ts +19 -0
- package/lib/util/network.d.ts +21 -0
- package/lib/util/network.test.d.ts +1 -0
- package/lib/util/string.d.ts +13 -0
- package/package.json +1 -1
- package/types/openapi/index.d.ts +1 -0
- package/types/openapi/models/Canvas.d.ts +2 -2
- package/types/openapi/models/CanvasCreate.d.ts +2 -2
- package/types/openapi/models/CanvasRetrieve.d.ts +10 -2
- package/types/openapi/models/CanvasUpdate.d.ts +2 -2
- package/types/openapi/models/DeletedCanvas.d.ts +2 -2
- package/types/openapi/models/FolderFolder.d.ts +4 -0
- package/types/openapi/models/FolderRetrieve.d.ts +1 -0
- package/types/openapi/models/MetadataTemplateFieldTypeEnum.d.ts +3 -1
- package/types/openapi/models/MiniCanvasWithTags.d.ts +5 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface CanvasRendererTabConfig {
|
|
2
|
+
name: string;
|
|
3
|
+
canvas_tag: string;
|
|
4
|
+
}
|
|
5
|
+
interface CanvasRendererRouteConfig {
|
|
6
|
+
canvas_tag?: string;
|
|
7
|
+
tabs?: CanvasRendererTabConfig[];
|
|
8
|
+
}
|
|
9
|
+
export declare function extractCanvasTagsFromConfig(routesConfig: Record<string, CanvasRendererRouteConfig>): string[];
|
|
10
|
+
export default function useCanvasRendererExcludedTags(): {
|
|
11
|
+
excludedTags: import('vue').Ref<string[], string[]>;
|
|
12
|
+
isLoading: import('vue').Ref<boolean, boolean>;
|
|
13
|
+
fetchExcludedTags: () => Promise<string[]>;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -23,6 +23,7 @@ declare const _default: () => import('vue').Ref<{
|
|
|
23
23
|
info: string;
|
|
24
24
|
info2: string;
|
|
25
25
|
info3: string;
|
|
26
|
+
info4: string;
|
|
26
27
|
boxShadow: string;
|
|
27
28
|
boxShadow2: string;
|
|
28
29
|
boxShadow3: string;
|
|
@@ -51,6 +52,7 @@ declare const _default: () => import('vue').Ref<{
|
|
|
51
52
|
info: string;
|
|
52
53
|
info2: string;
|
|
53
54
|
info3: string;
|
|
55
|
+
info4: string;
|
|
54
56
|
boxShadow: string;
|
|
55
57
|
boxShadow2: string;
|
|
56
58
|
boxShadow3: string;
|
package/lib/main.lib.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export { default as CSwitch } from './components/CSwitch/CSwitch.vue';
|
|
|
48
48
|
export { default as CFeedback } from './components/CFeedback/CFeedback.vue';
|
|
49
49
|
export { default as CHelpText } from './components/CHelpText/CHelpText.vue';
|
|
50
50
|
export { default as CPillSelect } from './components/CPillSelect/CPillSelect.vue';
|
|
51
|
+
export { default as AITaskOutputFallback } from './components/AITaskOutputFallback/AITaskOutputFallback.vue';
|
|
51
52
|
export { default as CConfirmationModal } from './components/CConfirmationModal/CConfirmationModal.vue';
|
|
52
53
|
export { default as CConfirmationHeader } from './components/CConfirmation/CConfirmationHeader.vue';
|
|
53
54
|
export { default as CConfirmationContent } from './components/CConfirmation/CConfirmationContent.vue';
|
|
@@ -84,7 +85,7 @@ export { default as CSavedCanvasesManagement } from './components/savedCanvases/
|
|
|
84
85
|
export { default as CAssignedCanvasesManagement } from './components/assignedCanvases/CAssignedCanvasesManagement.vue';
|
|
85
86
|
export { default as CAssignedCanvasesManagementToolbar } from './components/assignedCanvases/CAssignedCanvasesManagementToolbar.vue';
|
|
86
87
|
export { default as useShareCanvas } from './components/savedCanvases/CSavedCanvasesManagementShareCanvas.use';
|
|
87
|
-
export { getFreezeStatus, type FreezeStatus } from './components/savedCanvases/CSavedCanvasesManagement.use';
|
|
88
|
+
export { getFreezeStatus, SYSTEM_EXCLUDED_TAGS, type FreezeStatus } from './components/savedCanvases/CSavedCanvasesManagement.use';
|
|
88
89
|
export { default as CConfigEditor } from './components/CConfigEditor/CConfigEditor.vue';
|
|
89
90
|
export { default as CTableInput } from './components/CTableInput/CTableInput.vue';
|
|
90
91
|
export { default as CTableTag } from './components/CTableTag/CTableTag.vue';
|
|
@@ -170,6 +171,7 @@ export { default as useMetadataTemplates } from './composables/useMetadataTempla
|
|
|
170
171
|
export { default as useMetadataSearch } from './composables/useMetadataSearch';
|
|
171
172
|
export * from './composables/appsDb.use';
|
|
172
173
|
export { default as useCanvasLocks } from './composables/useCanvasLocks';
|
|
174
|
+
export { default as useCanvasRendererExcludedTags, extractCanvasTagsFromConfig, } from './composables/useCanvasRendererExcludedTags';
|
|
173
175
|
export { useCommentTracking } from './composables/useCommentTracking';
|
|
174
176
|
export { useSharedCommentsStorage } from './composables/useSharedCommentsStorage';
|
|
175
177
|
export { usePolling } from './composables/usePolling';
|
|
@@ -207,6 +209,7 @@ export * from './util/userAgents';
|
|
|
207
209
|
export * from './util/pitcher-settings.util';
|
|
208
210
|
export * from './util/eval';
|
|
209
211
|
export * from './util/storage.util';
|
|
212
|
+
export { sanitizeHtml, sanitizeUserHtml } from './util/string';
|
|
210
213
|
export * from './util/handlebars';
|
|
211
214
|
export * from './apps/collection-selector/utils/content-selector-adapter.util';
|
|
212
215
|
export * from './util/soql.util.ts';
|
|
@@ -245,6 +248,7 @@ export * from './types/launchDarkly.types';
|
|
|
245
248
|
export * from './types/toast';
|
|
246
249
|
export * from './types/instanceSettings.types';
|
|
247
250
|
export * from './types/organizationSettings.types';
|
|
251
|
+
export * from './types/ai-tasks.const';
|
|
248
252
|
export * from './components/CConfigEditor/CConfigEditor.types';
|
|
249
253
|
export * from './types/search';
|
|
250
254
|
export * from './types/selections';
|
|
@@ -123,6 +123,9 @@ export declare function createHighLevelApi(options?: ApiOptions): {
|
|
|
123
123
|
* @returns {Promise<void>}
|
|
124
124
|
*/
|
|
125
125
|
unsubscribe: () => Promise<any>;
|
|
126
|
+
aiGetCapabilities(): Promise<import('../payload.types').AIRuntimeCapabilities>;
|
|
127
|
+
aiComplete(payload: import('../payload.types').AICompletePayload): Promise<import('../payload.types').AICompleteResult>;
|
|
128
|
+
piaSearchAnswer(payload: import('../payload.types').PiaSearchAnswerPayload): Promise<import('../payload.types').PiaSearchAnswerResult>;
|
|
126
129
|
open(payload?: import('../payload.types').OpenRequestPayload): Promise<string>;
|
|
127
130
|
openExternalUrl(payload: import('../payload.types').OpenExternalUrlRequestPayload): Promise<void>;
|
|
128
131
|
getEnv(): Promise<import('../interfaces').PitcherEnv>;
|
|
@@ -152,7 +155,21 @@ export declare function createHighLevelApi(options?: ApiOptions): {
|
|
|
152
155
|
getCanvas(payload: {
|
|
153
156
|
id: import('../../main.lib').CanvasRetrieve["id"];
|
|
154
157
|
fields?: string;
|
|
158
|
+
lazy_sections? /**
|
|
159
|
+
* Subscribe to updates.
|
|
160
|
+
*
|
|
161
|
+
* @returns {Promise<void>}
|
|
162
|
+
*/: boolean;
|
|
155
163
|
}): Promise<import('../../main.lib').CanvasRetrieve>;
|
|
164
|
+
getSectionsByIds(payload: {
|
|
165
|
+
canvas_id: import('../../main.lib').CanvasRetrieve["id"];
|
|
166
|
+
section_ids: string[];
|
|
167
|
+
exclude_drafts?: boolean;
|
|
168
|
+
include_expired_files?: boolean;
|
|
169
|
+
include_pending_files?: boolean;
|
|
170
|
+
}): Promise<{
|
|
171
|
+
sections: import('../../main.lib').CanvasSection[];
|
|
172
|
+
}>;
|
|
156
173
|
shareCanvas(payload: {
|
|
157
174
|
id: import('../../main.lib').CanvasRetrieve["id"];
|
|
158
175
|
}): Promise<import('../../main.lib').SharedLink>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { AICompletePayload, AICompleteResult, AIRuntimeCapabilities, PiaSearchAnswerPayload, PiaSearchAnswerResult } from '../../payload.types';
|
|
2
|
+
/**
|
|
3
|
+
* Capabilities of the AI completion runtime on the current platform.
|
|
4
|
+
*
|
|
5
|
+
* On iOS this asks the native on-device bridge (`ai.get_capabilities`); on web
|
|
6
|
+
* it resolves statically to the online (Bedrock) runtime — no postMessage
|
|
7
|
+
* round-trip.
|
|
8
|
+
*
|
|
9
|
+
* @returns {Promise<AIRuntimeCapabilities>} - Promise resolving with the runtime capabilities.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const capabilities = await api.aiGetCapabilities()
|
|
13
|
+
* if (capabilities.available) { ... }
|
|
14
|
+
*/
|
|
15
|
+
export declare function aiGetCapabilities(): Promise<AIRuntimeCapabilities>;
|
|
16
|
+
/**
|
|
17
|
+
* Run an AI completion on the on-device model (iOS only). On web the host
|
|
18
|
+
* rejects with a clear error — use `piaSearchAnswer` (or the next-core AI
|
|
19
|
+
* routes) for online inference instead.
|
|
20
|
+
*
|
|
21
|
+
* The payload is the EXACT iOS wire contract: `{ prompt, max_tokens?, stream? }`
|
|
22
|
+
* → `{ text, tokens_generated, elapsed_seconds, time_to_first_token_seconds }`.
|
|
23
|
+
*
|
|
24
|
+
* @param {AICompletePayload} payload - The completion payload.
|
|
25
|
+
* @returns {Promise<AICompleteResult>} - Promise resolving with the completion.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* const completion = await api.aiComplete({ prompt: 'Summarize ...', max_tokens: 256 })
|
|
29
|
+
* console.log(completion.text)
|
|
30
|
+
*/
|
|
31
|
+
export declare function aiComplete(payload: AICompletePayload): Promise<AICompleteResult>;
|
|
32
|
+
/**
|
|
33
|
+
* Answer a rep's natural-language question over the instance's content — the
|
|
34
|
+
* ONE high-level PIA Search call (PIT-6863). Routing follows the
|
|
35
|
+
* `pia_search_config` flag mode (see `resolvePiaSearchMode`):
|
|
36
|
+
*
|
|
37
|
+
* - `on_device` on iOS with an available local model → `aiComplete` over the
|
|
38
|
+
* caller-assembled `context_text` (the Hub has the file metadata
|
|
39
|
+
* client-side). Unavailable/downloading models fall through to online.
|
|
40
|
+
* - `online` (or any on-device fallback) → POST to the next-core
|
|
41
|
+
* `pia-prepare/pia-search` Bedrock route, which assembles its own candidate
|
|
42
|
+
* context server-side.
|
|
43
|
+
* - `off` → rejects.
|
|
44
|
+
*
|
|
45
|
+
* @param {PiaSearchAnswerPayload} payload - The question + optional context/narrowing.
|
|
46
|
+
* @returns {Promise<PiaSearchAnswerResult>} - Unified answer with the serving `source`.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* const result = await api.piaSearchAnswer({ query: 'What is our pricing for oncology?' })
|
|
50
|
+
* console.log(result.answer, result.cited_file_ids, result.source)
|
|
51
|
+
*/
|
|
52
|
+
export declare function piaSearchAnswer(payload: PiaSearchAnswerPayload): Promise<PiaSearchAnswerResult>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CanvasRetrieve, CanvasCreateRequest, PatchedCanvasUpdateRequest, SharedLink, Instance, CanvasRecommendedFiles } from '../../../../types/openapi';
|
|
1
|
+
import { CanvasRetrieve, CanvasCreateRequest, PatchedCanvasUpdateRequest, SharedLink, Instance, CanvasRecommendedFiles, CanvasSection } from '../../../../types/openapi';
|
|
2
2
|
import { GetCanvasesParams, CanvasIndicator } from '../../../types/canvases';
|
|
3
3
|
import { PaginatedData } from '../../../types/paginatedData';
|
|
4
4
|
import { CanvasThemeRetrieve } from '../../../types/canvasTheme';
|
|
@@ -70,10 +70,51 @@ export declare function updateCanvasIndicators(payload: {
|
|
|
70
70
|
id: CanvasRetrieve['id'];
|
|
71
71
|
instance_id?: Instance['id'];
|
|
72
72
|
}): Promise<CanvasRetrieve>;
|
|
73
|
+
/**
|
|
74
|
+
* Fetches a single canvas by ID.
|
|
75
|
+
*
|
|
76
|
+
* Pass `lazy_sections: true` to request the opt-in lazy "shell": when the
|
|
77
|
+
* org/instance `lazy_load_sections` setting is also on, the response returns
|
|
78
|
+
* ordered `section_ids` instead of the heavy inline `sections`, and you hydrate
|
|
79
|
+
* section bodies on demand via {@link getSectionsByIds}. With the setting off
|
|
80
|
+
* (or the param omitted) the response is the legacy fully-expanded canvas.
|
|
81
|
+
*/
|
|
73
82
|
export declare function getCanvas(payload: {
|
|
74
83
|
id: CanvasRetrieve['id'];
|
|
75
84
|
fields?: string;
|
|
85
|
+
lazy_sections?: boolean;
|
|
76
86
|
}): Promise<CanvasRetrieve>;
|
|
87
|
+
/**
|
|
88
|
+
* Batch-hydrate section bodies for a canvas fetched as a lazy shell.
|
|
89
|
+
*
|
|
90
|
+
* Companion to `getCanvas({ lazy_sections: true })`: pass the canvas ID and a
|
|
91
|
+
* slice of its `section_ids` (≤100 per call) and receive the full section
|
|
92
|
+
* bodies, serialized identically to a normal canvas retrieve's inline
|
|
93
|
+
* `sections`. Only sections actually referenced by the canvas are returned.
|
|
94
|
+
*
|
|
95
|
+
* Pass the SAME `exclude_drafts` / `include_expired_files` / `include_pending_files`
|
|
96
|
+
* the shell was fetched with so hydration filters identically to the shell that
|
|
97
|
+
* advertised the IDs — otherwise admin decks (fetched with `exclude_drafts:false`,
|
|
98
|
+
* expired/pending on) list draft/expired sections the batch would silently drop,
|
|
99
|
+
* leaving them blank. Omit them to get the rep defaults (drafts excluded,
|
|
100
|
+
* expired/pending off). `include_expired_files`/`include_pending_files` are
|
|
101
|
+
* server-side role-gated (admin/editor only), matching the inline retrieve.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* const { sections } = await api.getSectionsByIds({
|
|
105
|
+
* canvas_id: '01HH4RCBH631K4JDHWAQB0RPR6',
|
|
106
|
+
* section_ids: ['01SEC...', '02SEC...'],
|
|
107
|
+
* })
|
|
108
|
+
*/
|
|
109
|
+
export declare function getSectionsByIds(payload: {
|
|
110
|
+
canvas_id: CanvasRetrieve['id'];
|
|
111
|
+
section_ids: string[];
|
|
112
|
+
exclude_drafts?: boolean;
|
|
113
|
+
include_expired_files?: boolean;
|
|
114
|
+
include_pending_files?: boolean;
|
|
115
|
+
}): Promise<{
|
|
116
|
+
sections: CanvasSection[];
|
|
117
|
+
}>;
|
|
77
118
|
export declare function shareCanvas(payload: {
|
|
78
119
|
id: CanvasRetrieve['id'];
|
|
79
120
|
}): Promise<SharedLink>;
|
package/lib/sdk/interfaces.d.ts
CHANGED
|
@@ -118,6 +118,16 @@ export interface StartCallPitcherEvent {
|
|
|
118
118
|
post_action?: string;
|
|
119
119
|
post_action_path?: string;
|
|
120
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Preselects an account in the meeting bar without starting a call.
|
|
123
|
+
* Used by the SFDC passthrough Prepare flow.
|
|
124
|
+
*/
|
|
125
|
+
export interface SelectAccountPitcherEvent {
|
|
126
|
+
account?: {
|
|
127
|
+
id: string;
|
|
128
|
+
name?: string;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
121
131
|
export interface RouteChangedPitcherEvent {
|
|
122
132
|
route_name: string;
|
|
123
133
|
route_path: string;
|
|
@@ -171,7 +181,8 @@ export declare enum PitcherBroadcastedEventName {
|
|
|
171
181
|
export declare enum PitcherExternalEventName {
|
|
172
182
|
CREATE_AND_OPEN_CANVAS = "create_and_open_canvas",
|
|
173
183
|
OPEN_CANVAS = "open_canvas",
|
|
174
|
-
START_CALL = "start_call"
|
|
184
|
+
START_CALL = "start_call",
|
|
185
|
+
SELECT_ACCOUNT = "select_account"
|
|
175
186
|
}
|
|
176
187
|
/**
|
|
177
188
|
* Base interface for update location actions.
|
|
@@ -512,6 +523,7 @@ export interface PitcherEventMap {
|
|
|
512
523
|
[PitcherExternalEventName.OPEN_CANVAS]: OpenCanvasPitcherEvent;
|
|
513
524
|
[PitcherExternalEventName.START_CALL]: StartCallPitcherEvent;
|
|
514
525
|
[PitcherExternalEventName.CREATE_AND_OPEN_CANVAS]: CreateAndOpenCanvasEvent;
|
|
526
|
+
[PitcherExternalEventName.SELECT_ACCOUNT]: SelectAccountPitcherEvent;
|
|
515
527
|
}
|
|
516
528
|
export interface PitcherEvent {
|
|
517
529
|
type: keyof PitcherEventMap;
|
package/lib/sdk/main.d.ts
CHANGED
|
@@ -195,6 +195,9 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
195
195
|
broadcastToWebviews: (event: import('./interfaces').PitcherEvent) => Promise<any>;
|
|
196
196
|
subscribe: () => Promise<any>;
|
|
197
197
|
unsubscribe: () => Promise<any>;
|
|
198
|
+
aiGetCapabilities(): Promise<import('./payload.types').AIRuntimeCapabilities>;
|
|
199
|
+
aiComplete(payload: import('./payload.types').AICompletePayload): Promise<import('./payload.types').AICompleteResult>;
|
|
200
|
+
piaSearchAnswer(payload: import('./payload.types').PiaSearchAnswerPayload): Promise<import('./payload.types').PiaSearchAnswerResult>;
|
|
198
201
|
open(payload?: import('./payload.types').OpenRequestPayload): Promise<string>;
|
|
199
202
|
openExternalUrl(payload: import('./payload.types').OpenExternalUrlRequestPayload): Promise<void>;
|
|
200
203
|
getEnv(): Promise<import('./interfaces').PitcherEnv>;
|
|
@@ -224,7 +227,17 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
224
227
|
getCanvas(payload: {
|
|
225
228
|
id: import('../main.lib').CanvasRetrieve["id"];
|
|
226
229
|
fields?: string;
|
|
230
|
+
lazy_sections?: boolean;
|
|
227
231
|
}): Promise<import('../main.lib').CanvasRetrieve>;
|
|
232
|
+
getSectionsByIds(payload: {
|
|
233
|
+
canvas_id: import('../main.lib').CanvasRetrieve["id"];
|
|
234
|
+
section_ids: string[];
|
|
235
|
+
exclude_drafts?: boolean;
|
|
236
|
+
include_expired_files?: boolean;
|
|
237
|
+
include_pending_files?: boolean;
|
|
238
|
+
}): Promise<{
|
|
239
|
+
sections: import('../main.lib').CanvasSection[];
|
|
240
|
+
}>;
|
|
228
241
|
shareCanvas(payload: {
|
|
229
242
|
id: import('../main.lib').CanvasRetrieve["id"];
|
|
230
243
|
}): Promise<import('../main.lib').SharedLink>;
|
|
@@ -475,6 +488,9 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
475
488
|
broadcastToWebviews: (event: import('./interfaces').PitcherEvent) => Promise<any>;
|
|
476
489
|
subscribe: () => Promise<any>;
|
|
477
490
|
unsubscribe: () => Promise<any>;
|
|
491
|
+
aiGetCapabilities(): Promise<import('./payload.types').AIRuntimeCapabilities>;
|
|
492
|
+
aiComplete(payload: import('./payload.types').AICompletePayload): Promise<import('./payload.types').AICompleteResult>;
|
|
493
|
+
piaSearchAnswer(payload: import('./payload.types').PiaSearchAnswerPayload): Promise<import('./payload.types').PiaSearchAnswerResult>;
|
|
478
494
|
open(payload?: import('./payload.types').OpenRequestPayload): Promise<string>;
|
|
479
495
|
openExternalUrl(payload: import('./payload.types').OpenExternalUrlRequestPayload): Promise<void>;
|
|
480
496
|
getEnv(): Promise<import('./interfaces').PitcherEnv>;
|
|
@@ -504,7 +520,17 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
504
520
|
getCanvas(payload: {
|
|
505
521
|
id: import('../main.lib').CanvasRetrieve["id"];
|
|
506
522
|
fields?: string;
|
|
523
|
+
lazy_sections?: boolean;
|
|
507
524
|
}): Promise<import('../main.lib').CanvasRetrieve>;
|
|
525
|
+
getSectionsByIds(payload: {
|
|
526
|
+
canvas_id: import('../main.lib').CanvasRetrieve["id"];
|
|
527
|
+
section_ids: string[];
|
|
528
|
+
exclude_drafts?: boolean;
|
|
529
|
+
include_expired_files?: boolean;
|
|
530
|
+
include_pending_files?: boolean;
|
|
531
|
+
}): Promise<{
|
|
532
|
+
sections: import('../main.lib').CanvasSection[];
|
|
533
|
+
}>;
|
|
508
534
|
shareCanvas(payload: {
|
|
509
535
|
id: import('../main.lib').CanvasRetrieve["id"];
|
|
510
536
|
}): Promise<import('../main.lib').SharedLink>;
|
|
@@ -701,6 +727,9 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
701
727
|
broadcastToWebviews: (event: import('./interfaces').PitcherEvent) => Promise<any>;
|
|
702
728
|
subscribe: () => Promise<any>;
|
|
703
729
|
unsubscribe: () => Promise<any>;
|
|
730
|
+
aiGetCapabilities(): Promise<import('./payload.types').AIRuntimeCapabilities>;
|
|
731
|
+
aiComplete(payload: import('./payload.types').AICompletePayload): Promise<import('./payload.types').AICompleteResult>;
|
|
732
|
+
piaSearchAnswer(payload: import('./payload.types').PiaSearchAnswerPayload): Promise<import('./payload.types').PiaSearchAnswerResult>;
|
|
704
733
|
openExternalUrl(payload: import('./payload.types').OpenExternalUrlRequestPayload): Promise<void>;
|
|
705
734
|
getEnv(): Promise<import('./interfaces').PitcherEnv>;
|
|
706
735
|
updateMyUser(payload: {
|
|
@@ -724,7 +753,17 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
724
753
|
getCanvas(payload: {
|
|
725
754
|
id: import('../main.lib').CanvasRetrieve["id"];
|
|
726
755
|
fields?: string;
|
|
756
|
+
lazy_sections?: boolean;
|
|
727
757
|
}): Promise<import('../main.lib').CanvasRetrieve>;
|
|
758
|
+
getSectionsByIds(payload: {
|
|
759
|
+
canvas_id: import('../main.lib').CanvasRetrieve["id"];
|
|
760
|
+
section_ids: string[];
|
|
761
|
+
exclude_drafts?: boolean;
|
|
762
|
+
include_expired_files?: boolean;
|
|
763
|
+
include_pending_files?: boolean;
|
|
764
|
+
}): Promise<{
|
|
765
|
+
sections: import('../main.lib').CanvasSection[];
|
|
766
|
+
}>;
|
|
728
767
|
shareCanvas(payload: {
|
|
729
768
|
id: import('../main.lib').CanvasRetrieve["id"];
|
|
730
769
|
}): Promise<import('../main.lib').SharedLink>;
|
|
@@ -468,3 +468,124 @@ export interface CRMLayoutPayload {
|
|
|
468
468
|
*/
|
|
469
469
|
service?: CRMServiceType;
|
|
470
470
|
}
|
|
471
|
+
/**
|
|
472
|
+
* Capabilities of the AI runtime serving `ai.complete` on the current platform.
|
|
473
|
+
* On iOS this is the native on-device (Gemma) bridge answer — snake_case wire
|
|
474
|
+
* fields come straight from the native handler. On web there is no local model;
|
|
475
|
+
* the SDK answers statically with the online (Bedrock) runtime.
|
|
476
|
+
*/
|
|
477
|
+
export interface AIRuntimeCapabilities {
|
|
478
|
+
/**
|
|
479
|
+
* Whether an AI completion runtime is available right now.
|
|
480
|
+
*/
|
|
481
|
+
available: boolean;
|
|
482
|
+
/**
|
|
483
|
+
* Whether the runtime works offline (true for the iOS on-device model).
|
|
484
|
+
*/
|
|
485
|
+
offline?: boolean;
|
|
486
|
+
/**
|
|
487
|
+
* Serving runtime hint, e.g. 'bedrock-online' (web) — iOS reports its model
|
|
488
|
+
* via `llm_model` instead.
|
|
489
|
+
*/
|
|
490
|
+
runtime?: string;
|
|
491
|
+
/**
|
|
492
|
+
* The on-device model identifier (iOS only).
|
|
493
|
+
*/
|
|
494
|
+
llm_model?: string;
|
|
495
|
+
/**
|
|
496
|
+
* Whether the on-device model is currently downloading (iOS only).
|
|
497
|
+
*/
|
|
498
|
+
model_downloading?: boolean;
|
|
499
|
+
/**
|
|
500
|
+
* Download progress 0-100 while `model_downloading` (iOS only).
|
|
501
|
+
*/
|
|
502
|
+
download_progress_percent?: number;
|
|
503
|
+
/**
|
|
504
|
+
* Whether an on-device model can be downloaded for this instance (iOS only).
|
|
505
|
+
*/
|
|
506
|
+
model_available_for_download?: boolean;
|
|
507
|
+
/**
|
|
508
|
+
* Why the runtime is unavailable, when `available` is false (iOS only).
|
|
509
|
+
*/
|
|
510
|
+
unavailability_reason?: string;
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Payload for an on-device AI completion (`ai.complete`, iOS only). The exact
|
|
514
|
+
* iOS wire contract — keys are already snake_case, do not rename.
|
|
515
|
+
*/
|
|
516
|
+
export interface AICompletePayload {
|
|
517
|
+
/**
|
|
518
|
+
* The full prompt to complete.
|
|
519
|
+
*/
|
|
520
|
+
prompt: string;
|
|
521
|
+
/**
|
|
522
|
+
* Maximum number of tokens to generate.
|
|
523
|
+
*/
|
|
524
|
+
max_tokens?: number;
|
|
525
|
+
/**
|
|
526
|
+
* Whether to stream the completion (v1 SDK callers should omit/false).
|
|
527
|
+
*/
|
|
528
|
+
stream?: boolean;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Result of an on-device AI completion (`ai.complete`, iOS only).
|
|
532
|
+
*/
|
|
533
|
+
export interface AICompleteResult {
|
|
534
|
+
/**
|
|
535
|
+
* The generated completion text.
|
|
536
|
+
*/
|
|
537
|
+
text: string;
|
|
538
|
+
tokens_generated?: number;
|
|
539
|
+
elapsed_seconds?: number;
|
|
540
|
+
time_to_first_token_seconds?: number;
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Payload for `piaSearchAnswer` — one high-level question-answering call over
|
|
544
|
+
* the instance's content, routed on-device (iOS Gemma) or online (next-core
|
|
545
|
+
* Bedrock route) based on the `pia_search_config` flag mode.
|
|
546
|
+
*/
|
|
547
|
+
export interface PiaSearchAnswerPayload {
|
|
548
|
+
/**
|
|
549
|
+
* The rep's natural-language question.
|
|
550
|
+
*/
|
|
551
|
+
query: string;
|
|
552
|
+
/**
|
|
553
|
+
* Instance to search in. Defaults to the env's active instance.
|
|
554
|
+
*/
|
|
555
|
+
instance_id?: string;
|
|
556
|
+
/**
|
|
557
|
+
* Client-assembled content context (file names/tags/summaries). Used ONLY by
|
|
558
|
+
* the on-device path — the online route assembles its own context
|
|
559
|
+
* server-side.
|
|
560
|
+
*/
|
|
561
|
+
context_text?: string;
|
|
562
|
+
/**
|
|
563
|
+
* Optional narrowing of the online route's candidate pool to these file ids.
|
|
564
|
+
*/
|
|
565
|
+
file_ids?: string[];
|
|
566
|
+
/**
|
|
567
|
+
* Token budget for the on-device completion.
|
|
568
|
+
*/
|
|
569
|
+
max_tokens?: number;
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* Unified `piaSearchAnswer` result across both serving paths.
|
|
573
|
+
*/
|
|
574
|
+
export interface PiaSearchAnswerResult {
|
|
575
|
+
/**
|
|
576
|
+
* The answer text.
|
|
577
|
+
*/
|
|
578
|
+
answer: string;
|
|
579
|
+
/**
|
|
580
|
+
* File ids (from the candidate context) the answer drew on. Online path only.
|
|
581
|
+
*/
|
|
582
|
+
cited_file_ids?: string[];
|
|
583
|
+
/**
|
|
584
|
+
* Model self-reported confidence. Online path only.
|
|
585
|
+
*/
|
|
586
|
+
confidence?: 'high' | 'medium' | 'low';
|
|
587
|
+
/**
|
|
588
|
+
* Which runtime produced the answer.
|
|
589
|
+
*/
|
|
590
|
+
source: 'on_device' | 'online';
|
|
591
|
+
}
|
package/lib/theme/light.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare const lightPalette: import('vue').Ref<{
|
|
|
25
25
|
info: string;
|
|
26
26
|
info2: string;
|
|
27
27
|
info3: string;
|
|
28
|
+
info4: string;
|
|
28
29
|
boxShadow: string;
|
|
29
30
|
boxShadow2: string;
|
|
30
31
|
boxShadow3: string;
|
|
@@ -53,6 +54,7 @@ export declare const lightPalette: import('vue').Ref<{
|
|
|
53
54
|
info: string;
|
|
54
55
|
info2: string;
|
|
55
56
|
info3: string;
|
|
57
|
+
info4: string;
|
|
56
58
|
boxShadow: string;
|
|
57
59
|
boxShadow2: string;
|
|
58
60
|
boxShadow3: string;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared AITask Registry (PIT-6047).
|
|
3
|
+
*
|
|
4
|
+
* Vue-FREE leaf module — imports nothing so it can be consumed as a plain
|
|
5
|
+
* type/const module by any backend (next-core Bedrock, iOS Gemma spec) without
|
|
6
|
+
* dragging in the Vue component bundle. next-core imports the TYPES only
|
|
7
|
+
* (`import type ...`) and keeps its OWN authoritative registry value; it must
|
|
8
|
+
* NOT import `AI_TASK_REGISTRY` at runtime (that would pull the Vue barrel into
|
|
9
|
+
* Node). See ADR-002.
|
|
10
|
+
*
|
|
11
|
+
* The four AITask ids (`meeting_prep`, `discussion_points`, `pitch_deck`,
|
|
12
|
+
* `post_call_summary`) are a LOCKED cross-backend wire contract shared with
|
|
13
|
+
* iOS — do NOT rename them.
|
|
14
|
+
*
|
|
15
|
+
* `account_insights` (PIT-6122) is a NEW, bedrock-only task added alongside the
|
|
16
|
+
* locked four (NOT a rename/removal of any). It is the richer PIA "4-section
|
|
17
|
+
* account brief" that replaces the generic `meeting_prep`, and it can absorb
|
|
18
|
+
* `discussion_points` later — it always emits `key_discussion_points`.
|
|
19
|
+
* Deprecating `discussion_points` via a 1-version dual-emit window is DEFERRED
|
|
20
|
+
* pending Joan's design-review confirm; `meeting_prep` + `discussion_points` are
|
|
21
|
+
* NOT deprecated here.
|
|
22
|
+
*
|
|
23
|
+
* `precall_notes` (PIT-6123) is another NEW task added alongside the locked four
|
|
24
|
+
* (NOT a rename/removal). One task that ENHANCES existing precall notes when
|
|
25
|
+
* present, else GENERATES them from CRM context + recent interactions (+ an
|
|
26
|
+
* optional pre-computed upstream `account_insights` output). Unlike
|
|
27
|
+
* `account_insights` it does NOT depend on the server-side content-recommendation
|
|
28
|
+
* engine — its context comes from the caller / iOS SmartStore — so it is
|
|
29
|
+
* offline/Gemma-capable (`backends: ['bedrock', 'gemma']`).
|
|
30
|
+
*
|
|
31
|
+
* `pia_search` (PIT-6863) is another NEW task added alongside the locked four
|
|
32
|
+
* (NOT a rename/removal). It answers a rep's natural-language question over the
|
|
33
|
+
* instance's content + metadata (Postgres/Django candidates + aiAnalysis
|
|
34
|
+
* summaries as context). Online it is served by the next-core Bedrock route;
|
|
35
|
+
* on-device (iOS) the SAME task is served client-side through the `ai.complete`
|
|
36
|
+
* Gemma bridge with a hub-assembled context — hence `backends:
|
|
37
|
+
* ['bedrock', 'gemma']`. `requires` is empty: its inputs (query + instance) are
|
|
38
|
+
* request-envelope fields, not AITaskRequirement vocabulary, and candidate
|
|
39
|
+
* retrieval happens server-side.
|
|
40
|
+
*/
|
|
41
|
+
/** 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';
|
|
43
|
+
/**
|
|
44
|
+
* Vocabulary of declarative input requirements a task can depend on. A task's
|
|
45
|
+
* `requires` list is server-enforced in next-core (missing → 400
|
|
46
|
+
* `missing_requirement`) and documents to iOS what context to assemble before
|
|
47
|
+
* invoking. Not every value is used by every task.
|
|
48
|
+
*/
|
|
49
|
+
export type AITaskRequirement = 'crm_account' | 'crm_opportunity' | 'files_listing' | 'call_transcript' | 'content_engagement_90d' | 'content_metadata_rules' | 'data_cloud_insights';
|
|
50
|
+
/** Backends that can serve a task. `bedrock` = next-core; `gemma` = iOS offline. */
|
|
51
|
+
export type AITaskBackend = 'bedrock' | 'gemma';
|
|
52
|
+
/**
|
|
53
|
+
* Public, backend-agnostic description of an AITask. This is the shape the
|
|
54
|
+
* next-core catalog endpoint (`GET /core/api/protected/ai-tasks/catalog`)
|
|
55
|
+
* serves. Runtime serving/logic (prompt template, output schema, extractor)
|
|
56
|
+
* lives ONLY in the next-core registry, never here.
|
|
57
|
+
*/
|
|
58
|
+
export type AITaskDefinition = {
|
|
59
|
+
id: AITask;
|
|
60
|
+
display_name: string;
|
|
61
|
+
description: string;
|
|
62
|
+
backends: AITaskBackend[];
|
|
63
|
+
requires: AITaskRequirement[];
|
|
64
|
+
/** Bumped when the task's structured output contract changes shape. */
|
|
65
|
+
output_schema_version: number;
|
|
66
|
+
/** next-core route that serves the task, if any. */
|
|
67
|
+
route?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Whether this task may be exposed as a callable function in the future
|
|
70
|
+
* Function Catalog (PIA / MCP). Defaults to false in v1.
|
|
71
|
+
*/
|
|
72
|
+
expose_as_function?: boolean;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Shared spec of the four tasks. iOS reads this at cold-start; next-core keeps
|
|
76
|
+
* a parallel authoritative registry (with templates/schemas/extractors) whose
|
|
77
|
+
* ids + requires MUST stay in lockstep with this list (asserted by a
|
|
78
|
+
* conformance test in next-core).
|
|
79
|
+
*/
|
|
80
|
+
export declare const AI_TASK_REGISTRY: AITaskDefinition[];
|
|
@@ -53,6 +53,8 @@ export type InstanceSettings = OrganizationSettings & {
|
|
|
53
53
|
hide_meeting_bar?: boolean;
|
|
54
54
|
sync_from_template?: string[];
|
|
55
55
|
show_home_template_in_create_canvas_modal?: boolean;
|
|
56
|
+
dynamic_content_date_created_field?: string;
|
|
57
|
+
dynamic_content_date_modified_field?: string;
|
|
56
58
|
};
|
|
57
59
|
custom_event?: string;
|
|
58
60
|
enable_multipeer_connectivity?: boolean;
|