@pitcher/js-api 1.27.3 → 1.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/js-api.esm.js +325 -7
- package/js-api.esm.js.map +1 -1
- package/js-api.umd.min.js +11 -11
- package/js-api.umd.min.js.map +1 -1
- package/lib/apps/canvas-builder/components/ui/DynamicContent/dynamicContent.util.d.ts +36 -0
- package/lib/apps/canvas-builder/components/ui/DynamicContent/dynamicContent.util.spec.d.ts +1 -0
- package/lib/apps/canvas-builder/composables/useCanvas.d.ts +63 -0
- package/lib/apps/canvas-builder/composables/useCanvasBlocks.d.ts +14 -0
- package/lib/apps/canvas-builder/composables/useCanvasHistory.d.ts +14 -0
- package/lib/apps/canvas-builder/composables/useCanvasTheme.d.ts +18 -18
- package/lib/apps/canvas-builder/composables/usePopupApps.d.ts +28 -0
- package/lib/apps/canvas-builder/types/canvas.d.ts +7 -0
- package/lib/apps/canvas-builder/util/canvas.util.d.ts +19 -0
- package/lib/components/CFileViewer/pdf/CFileViewer.pdf.util.d.ts +17 -0
- package/lib/components/CFileViewer/pdf/CFileViewer.pdf.util.spec.d.ts +1 -0
- package/lib/components/CRichTextEditor/components/CTextTypeSelect.test.d.ts +1 -0
- package/lib/composables/useCourseOnlyApps.d.ts +11 -0
- package/lib/sdk/api/HighLevelApi.d.ts +13 -3
- package/lib/sdk/api/modules/admin/types.admin.d.ts +1 -0
- package/lib/sdk/api/modules/appsDb.d.ts +57 -0
- package/lib/sdk/api/modules/appsDb.spec.d.ts +1 -0
- package/lib/sdk/api/modules/index.d.ts +3 -1
- package/lib/sdk/api/modules/stt.d.ts +65 -0
- package/lib/sdk/api/modules/stt.spec.d.ts +1 -0
- package/lib/sdk/api/modules/tts.d.ts +41 -0
- package/lib/sdk/api/modules/tts.spec.d.ts +1 -0
- package/lib/sdk/interfaces.d.ts +26 -1
- package/lib/sdk/main.d.ts +39 -6
- package/lib/sdk/payload.types.d.ts +253 -0
- package/lib/types/app.d.ts +14 -0
- package/lib/types/canvases.d.ts +0 -3
- package/lib/types/launchDarkly.types.d.ts +1 -1
- package/lib/types/sfdc.d.ts +15 -0
- package/lib/util/soql.util.d.ts +36 -0
- package/package.json +1 -1
- package/types/openapi/index.d.ts +0 -1
- package/types/openapi/models/PatchedUserRequest.d.ts +1 -2
- package/types/openapi/models/User.d.ts +1 -2
- package/types/openapi/models/UserRequest.d.ts +1 -2
- package/lib/sdk/api/modules/languages.d.ts +0 -8
- package/types/openapi/models/LanguageEnum.d.ts +0 -12
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AppFile } from '../types/app';
|
|
2
|
+
/**
|
|
3
|
+
* Course-only apps (`module.canvas.course_only`, e.g. the L&D assessment-canvas wrap, PIT-6978) are
|
|
4
|
+
* offered in the Add-Component / Embeddable pickers ONLY where the host opts in via
|
|
5
|
+
* `provide('allowCourseOnlyApps', true)` — course-canvas-host does; normal sales / DSR canvases don't.
|
|
6
|
+
* Shared by AddComponentModal + Embeddable.settings so the two filters can't drift.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useCourseOnlyApps(): {
|
|
9
|
+
allowCourseOnlyApps: boolean;
|
|
10
|
+
isAppAllowed: (app: AppFile) => boolean;
|
|
11
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { LowLevelApi } from './LowLevelApi';
|
|
2
2
|
import { PitcherEvent, ApiOptions } from '../interfaces';
|
|
3
|
-
import * as modules from './modules';
|
|
4
3
|
/**
|
|
5
4
|
* Creates a high-level API instance and caches it. Reterns a new instance only if new options are provided.
|
|
6
5
|
*/
|
|
@@ -126,14 +125,17 @@ export declare function createHighLevelApi(options?: ApiOptions): {
|
|
|
126
125
|
aiGetCapabilities(): Promise<import('../payload.types').AIRuntimeCapabilities>;
|
|
127
126
|
aiComplete(payload: import('../payload.types').AICompletePayload): Promise<import('../payload.types').AICompleteResult>;
|
|
128
127
|
piaSearchAnswer(payload: import('../payload.types').PiaSearchAnswerPayload): Promise<import('../payload.types').PiaSearchAnswerResult>;
|
|
128
|
+
appsDbGetEntries(payload: import('../payload.types').AppsDbGetEntriesPayload): Promise<import('../payload.types').AppsDbEntriesResult>;
|
|
129
|
+
appsDbUpsertEntry(payload: import('../payload.types').AppsDbUpsertEntryPayload): Promise<import('../payload.types').AppsDbEntry>;
|
|
130
|
+
appsDbDeleteEntry(payload: import('../payload.types').AppsDbDeleteEntryPayload): Promise<void>;
|
|
131
|
+
appsDbPsql(payload: import('../payload.types').AppsDbPsqlPayload): Promise<import('../payload.types').AppsDbEntriesResult>;
|
|
129
132
|
open(payload?: import('../payload.types').OpenRequestPayload): Promise<string>;
|
|
130
133
|
openExternalUrl(payload: import('../payload.types').OpenExternalUrlRequestPayload): Promise<void>;
|
|
131
134
|
getEnv(): Promise<import('../interfaces').PitcherEnv>;
|
|
132
135
|
updateMyUser(payload: {
|
|
133
|
-
language?:
|
|
136
|
+
language?: string | undefined;
|
|
134
137
|
}): Promise<import('../../main.lib').User>;
|
|
135
138
|
isOffline(): Promise<boolean>;
|
|
136
|
-
getLanguages(): Promise<modules.Language[]>;
|
|
137
139
|
getCanvases(payload: import('../../main.lib').GetCanvasesParams & {
|
|
138
140
|
filters?: Record<string, any>;
|
|
139
141
|
fields?: string;
|
|
@@ -301,5 +303,13 @@ export declare function createHighLevelApi(options?: ApiOptions): {
|
|
|
301
303
|
canvas_id: import('../../main.lib').CanvasRetrieve["id"];
|
|
302
304
|
theme_id: import('../../main.lib').CanvasThemeRetrieve["id"];
|
|
303
305
|
}>;
|
|
306
|
+
sttStart(payload: import('../payload.types').SttStartPayload): Promise<void>;
|
|
307
|
+
sttAvailability(): Promise<import('../payload.types').SttAvailabilityResult>;
|
|
308
|
+
sttWarmup(): Promise<void>;
|
|
309
|
+
sttStop(payload: import('../payload.types').SttStopPayload): Promise<import('../payload.types').SttStopResult>;
|
|
310
|
+
sttErrorCode(error: unknown): import('../payload.types').SttErrorCode | undefined;
|
|
311
|
+
ttsSpeak(payload: import('../payload.types').TtsSpeakPayload): Promise<import('../payload.types').TtsSpeakResult>;
|
|
312
|
+
ttsStop(): Promise<void>;
|
|
313
|
+
ttsErrorCode(error: unknown): import('../payload.types').TtsErrorCode | undefined;
|
|
304
314
|
API: LowLevelApi;
|
|
305
315
|
};
|
|
@@ -254,6 +254,7 @@ export type AdminEnv = {
|
|
|
254
254
|
mode?: PitcherEnv['mode'];
|
|
255
255
|
pitcher: PitcherEnv['pitcher'];
|
|
256
256
|
launch_darkly?: LaunchDarklyEnv;
|
|
257
|
+
ui_locale?: PitcherEnv['ui_locale'];
|
|
257
258
|
client_type?: (typeof CLIENT_TYPE)[keyof typeof CLIENT_TYPE];
|
|
258
259
|
crm_shape?: Record<string, any>;
|
|
259
260
|
state?: PitcherEnv['state'];
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { AppsDbDeleteEntryPayload, AppsDbEntriesResult, AppsDbEntry, AppsDbGetEntriesPayload, AppsDbPsqlPayload, AppsDbUpsertEntryPayload } from '../../payload.types';
|
|
2
|
+
/**
|
|
3
|
+
* Lists AppsDB entries of a type, adapting to the platform:
|
|
4
|
+
* - Web: GET to the next-core AppsDB REST API.
|
|
5
|
+
* - iOS: reads the local offline mirror via the `appsdb_get_entries` bridge
|
|
6
|
+
* request. Types not allowlisted in the `offline_appsdb_types` setting fail
|
|
7
|
+
* with `code = type_not_synced` and automatically fall back to the network.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const { entries } = await api.appsDbGetEntries({ type: 'favorite' })
|
|
11
|
+
*/
|
|
12
|
+
export declare function appsDbGetEntries(payload: AppsDbGetEntriesPayload): Promise<AppsDbEntriesResult>;
|
|
13
|
+
/**
|
|
14
|
+
* Creates or updates (deep-merges) an AppsDB entry, adapting to the platform:
|
|
15
|
+
* - Web: POST (create) or PUT (update, when `id` is set) to the next-core AppsDB REST API.
|
|
16
|
+
* - iOS: the `appsdb_upsert_entry` bridge request writes on the server and
|
|
17
|
+
* mirrors the authoritative result locally. Offline it rejects with
|
|
18
|
+
* `code = offline_write_not_supported` — AppsDB writes are online-only.
|
|
19
|
+
*
|
|
20
|
+
* The `data` blob is sent verbatim (no key-casing transformation), and all
|
|
21
|
+
* `appsDb*` responses are likewise returned verbatim — even for
|
|
22
|
+
* `casing: 'camel'` consumers — so bridge and REST results are identical.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* const entry = await api.appsDbUpsertEntry({ type: 'favorite', user_id: 1, data: { file_id: 'abc' } })
|
|
26
|
+
*/
|
|
27
|
+
export declare function appsDbUpsertEntry(payload: AppsDbUpsertEntryPayload): Promise<AppsDbEntry>;
|
|
28
|
+
/**
|
|
29
|
+
* Deletes an AppsDB entry (soft delete server-side), adapting to the platform:
|
|
30
|
+
* - Web: DELETE to the next-core AppsDB REST API.
|
|
31
|
+
* - iOS: the `appsdb_delete_entry` bridge request deletes on the server and
|
|
32
|
+
* removes the entry from the local offline mirror. Offline it rejects with
|
|
33
|
+
* `code = offline_write_not_supported`.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* await api.appsDbDeleteEntry({ id: '01H5ZXE7YP2JR6Q1Z2G3K4H5J6' })
|
|
37
|
+
*/
|
|
38
|
+
export declare function appsDbDeleteEntry(payload: AppsDbDeleteEntryPayload): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Runs a PSQL (SQL-like) query against AppsDB: POST to the next-core
|
|
41
|
+
* `/appsdb/psql` endpoint whenever the network is available.
|
|
42
|
+
*
|
|
43
|
+
* On iOS the local offline mirror (`appsdb_get_entries` + client-side
|
|
44
|
+
* evaluation of simple `field = literal` AND-chains) serves the query ONLY
|
|
45
|
+
* while the device is offline, or when an online fetch fails at the
|
|
46
|
+
* connection level. Online queries are always answered by the server: Hub
|
|
47
|
+
* flows use psql results to decide between creating and updating an entry,
|
|
48
|
+
* and the mirror can lag the server by a sync cycle (multi-device) — a stale
|
|
49
|
+
* empty read would turn an update into a duplicate create. Offline that same
|
|
50
|
+
* stale read is harmless because AppsDB writes are rejected offline anyway.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* const { entries } = await api.appsDbPsql({
|
|
54
|
+
* query: "SELECT * FROM personalfolders WHERE user_id = 1 AND data.custom_domain = 'acme.my.pitcher.com'",
|
|
55
|
+
* })
|
|
56
|
+
*/
|
|
57
|
+
export declare function appsDbPsql(payload: AppsDbPsqlPayload): Promise<AppsDbEntriesResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './ai';
|
|
2
|
+
export * from './appsDb';
|
|
2
3
|
export * from './open';
|
|
3
4
|
export * from './env';
|
|
4
|
-
export * from './languages';
|
|
5
5
|
export * from './canvas';
|
|
6
6
|
export * from './files';
|
|
7
7
|
export * from './filesRevisions';
|
|
@@ -20,3 +20,5 @@ export * from './feedback';
|
|
|
20
20
|
export * from './webView';
|
|
21
21
|
export * from './share';
|
|
22
22
|
export * from './theme';
|
|
23
|
+
export * from './stt';
|
|
24
|
+
export * from './tts';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { SttAvailabilityResult, SttErrorCode, SttStartPayload, SttStopPayload, SttStopResult } from '../../payload.types';
|
|
2
|
+
export declare function sttStart(payload: SttStartPayload): Promise<void>;
|
|
3
|
+
/**
|
|
4
|
+
* Check whether dictation can be offered — a side-effect-free capability probe
|
|
5
|
+
* to gate a mic button. Does NOT prompt for the microphone or download a model.
|
|
6
|
+
* Answered by the native bridge on iOS and the Impact host on web.
|
|
7
|
+
*
|
|
8
|
+
* @returns {Promise<SttAvailabilityResult>} `{ available, engine, reason? }` —
|
|
9
|
+
* `available` is true only when the feature is enabled AND an engine can run;
|
|
10
|
+
* `engine` is what would answer {@link sttStart} (`"webspeech"` sends audio
|
|
11
|
+
* off-device); `reason` is `"disabled"` or `"unsupported"` when not available.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* const { available, engine } = await api.sttAvailability()
|
|
15
|
+
* if (available) showMicButton({ warnCloud: engine === 'webspeech' })
|
|
16
|
+
*/
|
|
17
|
+
export declare function sttAvailability(): Promise<SttAvailabilityResult>;
|
|
18
|
+
/**
|
|
19
|
+
* Pre-load the on-device dictation model so a later {@link sttStart} resolves
|
|
20
|
+
* instantly (and the mic-permission prompt appears immediately instead of after
|
|
21
|
+
* a download). **Web only** — on iOS the native side manages its own model
|
|
22
|
+
* lifecycle, so the bridge has no `stt.warmup` type and calling it there rejects
|
|
23
|
+
* `requestTypeDoesNotExists`.
|
|
24
|
+
*
|
|
25
|
+
* Fire-and-forget: don't block your UI on it and ignore rejections. It is
|
|
26
|
+
* idempotent (repeated / concurrent calls collapse to a single download) and a
|
|
27
|
+
* no-op when the feature is disabled or the engine has nothing to warm (Web
|
|
28
|
+
* Speech fallback). Call it right after {@link sttAvailability} reports
|
|
29
|
+
* `available` with `engine === 'whisper'`.
|
|
30
|
+
*
|
|
31
|
+
* @returns {Promise<void>} Resolves once the model is ready (or immediately when
|
|
32
|
+
* there's nothing to warm).
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* const { available, engine } = await api.sttAvailability()
|
|
36
|
+
* if (available) {
|
|
37
|
+
* showMicButton()
|
|
38
|
+
* if (engine === 'whisper') api.sttWarmup().catch(() => {}) // background, non-blocking
|
|
39
|
+
* }
|
|
40
|
+
*/
|
|
41
|
+
export declare function sttWarmup(): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Finalize a dictation session. Resolves with the final full transcript;
|
|
44
|
+
* rejects with `STT_NOT_RECORDING` if the session isn't active.
|
|
45
|
+
*
|
|
46
|
+
* @param {SttStopPayload} payload
|
|
47
|
+
* @param {string} payload.session_id - The id passed to the matching {@link sttStart}.
|
|
48
|
+
* @returns {Promise<SttStopResult>} The final `{ transcript }`.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* const { transcript } = await api.sttStop({ session_id: 'notes-1' })
|
|
52
|
+
*/
|
|
53
|
+
export declare function sttStop(payload: SttStopPayload): Promise<SttStopResult>;
|
|
54
|
+
/**
|
|
55
|
+
* Extract the {@link SttErrorCode} from a rejected `sttStart` / `sttStop`,
|
|
56
|
+
* normalizing across hosts: the iOS bridge rejection (`error_code` /
|
|
57
|
+
* `errorCode`) and Impact web's `{ reason }` / error `message` string. Returns
|
|
58
|
+
* `undefined` if no known code is present.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* try { await api.sttStart({ session_id }) } catch (err) {
|
|
62
|
+
* if (api.sttErrorCode(err) === 'STT_BUSY') showMicInUseHint()
|
|
63
|
+
* }
|
|
64
|
+
*/
|
|
65
|
+
export declare function sttErrorCode(error: unknown): SttErrorCode | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { TtsErrorCode, TtsSpeakPayload, TtsSpeakResult } from '../../payload.types';
|
|
2
|
+
/**
|
|
3
|
+
* Speak text on the device speaker. Resolves when the utterance FINISHES;
|
|
4
|
+
* rejects with a {@link TtsErrorCode}.
|
|
5
|
+
*
|
|
6
|
+
* @param {TtsSpeakPayload} payload
|
|
7
|
+
* @param {string} payload.text - Text to speak. Empty/whitespace rejects with `TTS_EMPTY_TEXT`.
|
|
8
|
+
* @param {string} [payload.language] - BCP-47/ISO tag (e.g. `"en-US"`); requires
|
|
9
|
+
* an installed offline voice, else rejects with `TTS_VOICE_UNAVAILABLE`. Omit
|
|
10
|
+
* for the system voice.
|
|
11
|
+
* @param {number} [payload.rate] - Speech rate; clamped to the platform min…max.
|
|
12
|
+
* @param {number} [payload.pitch] - Speech pitch; clamped `0.5`…`2.0` (`1.0` = normal).
|
|
13
|
+
* @returns {Promise<TtsSpeakResult>} `{ completed }` — `true` if it finished
|
|
14
|
+
* naturally, `false` if stopped or replaced by a newer `ttsSpeak`.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* const { completed } = await api.ttsSpeak({ text: 'Meeting summary saved.', language: 'en-US' })
|
|
18
|
+
*/
|
|
19
|
+
export declare function ttsSpeak(payload: TtsSpeakPayload): Promise<TtsSpeakResult>;
|
|
20
|
+
/**
|
|
21
|
+
* Stop any in-flight speech. The in-flight {@link ttsSpeak} resolves with
|
|
22
|
+
* `{ completed: false }`.
|
|
23
|
+
*
|
|
24
|
+
* @returns {Promise<void>}
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* await api.ttsStop()
|
|
28
|
+
*/
|
|
29
|
+
export declare function ttsStop(): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Extract the {@link TtsErrorCode} from a rejected {@link ttsSpeak}, normalizing
|
|
32
|
+
* across hosts: the iOS bridge APIError (`code` / `error_code` / `errorCode`)
|
|
33
|
+
* and a host `{ reason }` / error `message` string. Returns `undefined` if no
|
|
34
|
+
* known code is present.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* try { await api.ttsSpeak({ text, language }) } catch (err) {
|
|
38
|
+
* if (api.ttsErrorCode(err) === 'TTS_VOICE_UNAVAILABLE') promptVoiceDownload()
|
|
39
|
+
* }
|
|
40
|
+
*/
|
|
41
|
+
export declare function ttsErrorCode(error: unknown): TtsErrorCode | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/sdk/interfaces.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { PitcherInstance } from '../types/instance.types';
|
|
|
5
5
|
import { LaunchDarklyEnv } from '../types/launchDarkly.types';
|
|
6
6
|
import { CDP_EVENT_TYPE, CLIENT_TYPE } from '../constants/cdp.const';
|
|
7
7
|
import { PeerConnectivityEvent } from './peer-connectivity';
|
|
8
|
+
import { SttPartialEvent, SttInterruptedEvent } from './payload.types';
|
|
8
9
|
export declare const PITCHER_EVENT: "PITCHER_EVENT";
|
|
9
10
|
export declare enum PitcherMessageType {
|
|
10
11
|
REQUEST = "PITCHER_REQUEST",
|
|
@@ -71,6 +72,10 @@ export interface PitcherEnv {
|
|
|
71
72
|
active_canvas_id?: CanvasRetrieve['id'];
|
|
72
73
|
canvas_correlation_id?: string;
|
|
73
74
|
};
|
|
75
|
+
/** Locale the user picked in the Pitcher shell. Web only — iOS has no picker
|
|
76
|
+
* and reports `device_locale` instead. Apps should prefer this and fall back:
|
|
77
|
+
* `ui_locale || device_locale`. */
|
|
78
|
+
ui_locale?: string;
|
|
74
79
|
device_locale?: string;
|
|
75
80
|
sync_badge_value?: number;
|
|
76
81
|
}
|
|
@@ -113,6 +118,12 @@ export interface StartCallPitcherEvent {
|
|
|
113
118
|
* instead of "Unscheduled".
|
|
114
119
|
*/
|
|
115
120
|
meeting_id?: string;
|
|
121
|
+
/**
|
|
122
|
+
* PIT-7462: start and immediately stop the call, opening the postcall form.
|
|
123
|
+
* The host seeds the call's eventDate from the scheduled meeting record
|
|
124
|
+
* (StartDateTime/EndDateTime) so the form never shows a 0-second duration.
|
|
125
|
+
*/
|
|
126
|
+
jump_to_postcall?: boolean;
|
|
116
127
|
canvas_id?: string;
|
|
117
128
|
edit_mode?: 'true' | 'false';
|
|
118
129
|
post_action?: string;
|
|
@@ -166,7 +177,9 @@ export declare enum PitcherEventName {
|
|
|
166
177
|
ITEM_SHAREBOX_ADD_COMPLETED = "item_sharebox_add_completed",
|
|
167
178
|
SYNC_BADGE_VALUE_REPORTED = "sync_badge_value_reported",
|
|
168
179
|
SYNC_BOX_RESOLVE_ERROR_TAPPED = "sync_box_resolve_error_tapped",
|
|
169
|
-
PEER_CONNECTIVITY_EVENT = "peer_connectivity_event"
|
|
180
|
+
PEER_CONNECTIVITY_EVENT = "peer_connectivity_event",
|
|
181
|
+
STT_PARTIAL = "stt.partial",
|
|
182
|
+
STT_INTERRUPTED = "stt.interrupted"
|
|
170
183
|
}
|
|
171
184
|
export declare enum PitcherBroadcastedEventName {
|
|
172
185
|
UI_SHOW_MODAL = "ui:show-modal",
|
|
@@ -487,6 +500,18 @@ export interface PitcherEventMap {
|
|
|
487
500
|
last_error: string;
|
|
488
501
|
};
|
|
489
502
|
[PitcherEventName.PEER_CONNECTIVITY_EVENT]: PeerConnectivityEvent;
|
|
503
|
+
/**
|
|
504
|
+
* Speech-to-text dictation partial (PITCHER_REQUEST `stt.start` session).
|
|
505
|
+
* Cross-platform (iOS bridge and the web host engine). `text` is the FULL
|
|
506
|
+
* transcript so far — replace, don't append.
|
|
507
|
+
*/
|
|
508
|
+
[PitcherEventName.STT_PARTIAL]: SttPartialEvent;
|
|
509
|
+
/**
|
|
510
|
+
* Speech-to-text dictation session ended WITHOUT a `stt.stop` (e.g. a call
|
|
511
|
+
* recording preempted the mic on iOS, or a fatal capture error on web). Stop
|
|
512
|
+
* waiting for partials and reset the field. Cross-platform.
|
|
513
|
+
*/
|
|
514
|
+
[PitcherEventName.STT_INTERRUPTED]: SttInterruptedEvent;
|
|
490
515
|
[PitcherBroadcastedEventName.UI_SHOW_MODAL]: void;
|
|
491
516
|
[PitcherBroadcastedEventName.UI_HIDE_MODAL]: void;
|
|
492
517
|
[PitcherBroadcastedEventName.FILE_DOWNLOAD]: {
|
package/lib/sdk/main.d.ts
CHANGED
|
@@ -198,14 +198,17 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
198
198
|
aiGetCapabilities(): Promise<import('./payload.types').AIRuntimeCapabilities>;
|
|
199
199
|
aiComplete(payload: import('./payload.types').AICompletePayload): Promise<import('./payload.types').AICompleteResult>;
|
|
200
200
|
piaSearchAnswer(payload: import('./payload.types').PiaSearchAnswerPayload): Promise<import('./payload.types').PiaSearchAnswerResult>;
|
|
201
|
+
appsDbGetEntries(payload: import('./payload.types').AppsDbGetEntriesPayload): Promise<import('./payload.types').AppsDbEntriesResult>;
|
|
202
|
+
appsDbUpsertEntry(payload: import('./payload.types').AppsDbUpsertEntryPayload): Promise<import('./payload.types').AppsDbEntry>;
|
|
203
|
+
appsDbDeleteEntry(payload: import('./payload.types').AppsDbDeleteEntryPayload): Promise<void>;
|
|
204
|
+
appsDbPsql(payload: import('./payload.types').AppsDbPsqlPayload): Promise<import('./payload.types').AppsDbEntriesResult>;
|
|
201
205
|
open(payload?: import('./payload.types').OpenRequestPayload): Promise<string>;
|
|
202
206
|
openExternalUrl(payload: import('./payload.types').OpenExternalUrlRequestPayload): Promise<void>;
|
|
203
207
|
getEnv(): Promise<import('./interfaces').PitcherEnv>;
|
|
204
208
|
updateMyUser(payload: {
|
|
205
|
-
language?:
|
|
209
|
+
language?: string | undefined;
|
|
206
210
|
}): Promise<import('../main.lib').User>;
|
|
207
211
|
isOffline(): Promise<boolean>;
|
|
208
|
-
getLanguages(): Promise<import('./api/modules').Language[]>;
|
|
209
212
|
getCanvases(payload: import('../main.lib').GetCanvasesParams & {
|
|
210
213
|
filters?: Record<string, any>;
|
|
211
214
|
fields?: string;
|
|
@@ -369,6 +372,14 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
369
372
|
canvas_id: import('../main.lib').CanvasRetrieve["id"];
|
|
370
373
|
theme_id: import('../main.lib').CanvasThemeRetrieve["id"];
|
|
371
374
|
}>;
|
|
375
|
+
sttStart(payload: import('./payload.types').SttStartPayload): Promise<void>;
|
|
376
|
+
sttAvailability(): Promise<import('./payload.types').SttAvailabilityResult>;
|
|
377
|
+
sttWarmup(): Promise<void>;
|
|
378
|
+
sttStop(payload: import('./payload.types').SttStopPayload): Promise<import('./payload.types').SttStopResult>;
|
|
379
|
+
sttErrorCode(error: unknown): import('./payload.types').SttErrorCode | undefined;
|
|
380
|
+
ttsSpeak(payload: import('./payload.types').TtsSpeakPayload): Promise<import('./payload.types').TtsSpeakResult>;
|
|
381
|
+
ttsStop(): Promise<void>;
|
|
382
|
+
ttsErrorCode(error: unknown): import('./payload.types').TtsErrorCode | undefined;
|
|
372
383
|
API: import('./api/LowLevelApi').LowLevelApi;
|
|
373
384
|
} | {
|
|
374
385
|
getUsers(payload?: import('../main.lib').GetUsersParams): Promise<import('../main.lib').PaginatedData<import('../main.lib').User>>;
|
|
@@ -491,14 +502,17 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
491
502
|
aiGetCapabilities(): Promise<import('./payload.types').AIRuntimeCapabilities>;
|
|
492
503
|
aiComplete(payload: import('./payload.types').AICompletePayload): Promise<import('./payload.types').AICompleteResult>;
|
|
493
504
|
piaSearchAnswer(payload: import('./payload.types').PiaSearchAnswerPayload): Promise<import('./payload.types').PiaSearchAnswerResult>;
|
|
505
|
+
appsDbGetEntries(payload: import('./payload.types').AppsDbGetEntriesPayload): Promise<import('./payload.types').AppsDbEntriesResult>;
|
|
506
|
+
appsDbUpsertEntry(payload: import('./payload.types').AppsDbUpsertEntryPayload): Promise<import('./payload.types').AppsDbEntry>;
|
|
507
|
+
appsDbDeleteEntry(payload: import('./payload.types').AppsDbDeleteEntryPayload): Promise<void>;
|
|
508
|
+
appsDbPsql(payload: import('./payload.types').AppsDbPsqlPayload): Promise<import('./payload.types').AppsDbEntriesResult>;
|
|
494
509
|
open(payload?: import('./payload.types').OpenRequestPayload): Promise<string>;
|
|
495
510
|
openExternalUrl(payload: import('./payload.types').OpenExternalUrlRequestPayload): Promise<void>;
|
|
496
511
|
getEnv(): Promise<import('./interfaces').PitcherEnv>;
|
|
497
512
|
updateMyUser(payload: {
|
|
498
|
-
language?:
|
|
513
|
+
language?: string | undefined;
|
|
499
514
|
}): Promise<import('../main.lib').User>;
|
|
500
515
|
isOffline(): Promise<boolean>;
|
|
501
|
-
getLanguages(): Promise<import('./api/modules').Language[]>;
|
|
502
516
|
getCanvases(payload: import('../main.lib').GetCanvasesParams & {
|
|
503
517
|
filters?: Record<string, any>;
|
|
504
518
|
fields?: string;
|
|
@@ -662,6 +676,14 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
662
676
|
canvas_id: import('../main.lib').CanvasRetrieve["id"];
|
|
663
677
|
theme_id: import('../main.lib').CanvasThemeRetrieve["id"];
|
|
664
678
|
}>;
|
|
679
|
+
sttStart(payload: import('./payload.types').SttStartPayload): Promise<void>;
|
|
680
|
+
sttAvailability(): Promise<import('./payload.types').SttAvailabilityResult>;
|
|
681
|
+
sttWarmup(): Promise<void>;
|
|
682
|
+
sttStop(payload: import('./payload.types').SttStopPayload): Promise<import('./payload.types').SttStopResult>;
|
|
683
|
+
sttErrorCode(error: unknown): import('./payload.types').SttErrorCode | undefined;
|
|
684
|
+
ttsSpeak(payload: import('./payload.types').TtsSpeakPayload): Promise<import('./payload.types').TtsSpeakResult>;
|
|
685
|
+
ttsStop(): Promise<void>;
|
|
686
|
+
ttsErrorCode(error: unknown): import('./payload.types').TtsErrorCode | undefined;
|
|
665
687
|
API: import('./api/LowLevelApi').LowLevelApi;
|
|
666
688
|
};
|
|
667
689
|
openSharingSettings(payload: import('./api/modules/ui/types.ui').UiOpenSharingSettingsRequest): Promise<import('./api/modules/ui/types.ui').UiOpenSharingSettingsResponse>;
|
|
@@ -730,13 +752,16 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
730
752
|
aiGetCapabilities(): Promise<import('./payload.types').AIRuntimeCapabilities>;
|
|
731
753
|
aiComplete(payload: import('./payload.types').AICompletePayload): Promise<import('./payload.types').AICompleteResult>;
|
|
732
754
|
piaSearchAnswer(payload: import('./payload.types').PiaSearchAnswerPayload): Promise<import('./payload.types').PiaSearchAnswerResult>;
|
|
755
|
+
appsDbGetEntries(payload: import('./payload.types').AppsDbGetEntriesPayload): Promise<import('./payload.types').AppsDbEntriesResult>;
|
|
756
|
+
appsDbUpsertEntry(payload: import('./payload.types').AppsDbUpsertEntryPayload): Promise<import('./payload.types').AppsDbEntry>;
|
|
757
|
+
appsDbDeleteEntry(payload: import('./payload.types').AppsDbDeleteEntryPayload): Promise<void>;
|
|
758
|
+
appsDbPsql(payload: import('./payload.types').AppsDbPsqlPayload): Promise<import('./payload.types').AppsDbEntriesResult>;
|
|
733
759
|
openExternalUrl(payload: import('./payload.types').OpenExternalUrlRequestPayload): Promise<void>;
|
|
734
760
|
getEnv(): Promise<import('./interfaces').PitcherEnv>;
|
|
735
761
|
updateMyUser(payload: {
|
|
736
|
-
language?:
|
|
762
|
+
language?: string | undefined;
|
|
737
763
|
}): Promise<import('../main.lib').User>;
|
|
738
764
|
isOffline(): Promise<boolean>;
|
|
739
|
-
getLanguages(): Promise<import('./api/modules').Language[]>;
|
|
740
765
|
getCanvases(payload: import('../main.lib').GetCanvasesParams & {
|
|
741
766
|
filters?: Record<string, any>;
|
|
742
767
|
fields?: string;
|
|
@@ -891,6 +916,14 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
891
916
|
canvas_id: import('../main.lib').CanvasRetrieve["id"];
|
|
892
917
|
theme_id: import('../main.lib').CanvasThemeRetrieve["id"];
|
|
893
918
|
}>;
|
|
919
|
+
sttStart(payload: import('./payload.types').SttStartPayload): Promise<void>;
|
|
920
|
+
sttAvailability(): Promise<import('./payload.types').SttAvailabilityResult>;
|
|
921
|
+
sttWarmup(): Promise<void>;
|
|
922
|
+
sttStop(payload: import('./payload.types').SttStopPayload): Promise<import('./payload.types').SttStopResult>;
|
|
923
|
+
sttErrorCode(error: unknown): import('./payload.types').SttErrorCode | undefined;
|
|
924
|
+
ttsSpeak(payload: import('./payload.types').TtsSpeakPayload): Promise<import('./payload.types').TtsSpeakResult>;
|
|
925
|
+
ttsStop(): Promise<void>;
|
|
926
|
+
ttsErrorCode(error: unknown): import('./payload.types').TtsErrorCode | undefined;
|
|
894
927
|
API: import('./api/LowLevelApi').LowLevelApi;
|
|
895
928
|
} | {
|
|
896
929
|
broadcast: (event: import('./interfaces').PitcherEvent) => Promise<any>;
|