@veltdev/types 5.0.2-beta.9 → 5.0.2
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/app/client/snippyly.model.d.ts +29 -1
- package/app/models/data/activity-resolver.data.model.d.ts +27 -0
- package/app/models/data/activity.data.model.d.ts +4 -0
- package/app/models/data/agent-suggestion.data.model.d.ts +57 -0
- package/app/models/data/autocomplete.data.model.d.ts +1 -0
- package/app/models/data/comment-actions.data.model.d.ts +10 -0
- package/app/models/data/comment-annotation.data.model.d.ts +63 -0
- package/app/models/data/comment-events.data.model.d.ts +23 -0
- package/app/models/data/comment-sidebar-config.model.d.ts +2 -0
- package/app/models/data/comment.data.model.d.ts +18 -0
- package/app/models/data/config.data.model.d.ts +21 -0
- package/app/models/data/core-events.data.model.d.ts +21 -0
- package/app/models/data/document-paths.data.model.d.ts +1 -0
- package/app/models/data/document.data.model.d.ts +2 -0
- package/app/models/data/notification.model.d.ts +20 -0
- package/app/models/data/page-info.model.d.ts +9 -0
- package/app/models/data/presence-user.data.model.d.ts +5 -0
- package/app/models/data/provider.data.model.d.ts +2 -0
- package/app/models/data/reaction-annotation.data.model.d.ts +5 -0
- package/app/models/data/recorder-events.data.model.d.ts +3 -0
- package/app/models/data/rewriter-events.data.model.d.ts +44 -0
- package/app/models/data/suggestion-events.data.model.d.ts +57 -0
- package/app/models/data/suggestion.data.model.d.ts +267 -0
- package/app/models/data/user-resolver.data.model.d.ts +2 -0
- package/app/models/data/user.data.model.d.ts +49 -0
- package/app/models/element/comment-element.model.d.ts +44 -0
- package/app/models/element/notification-element.model.d.ts +15 -1
- package/app/models/element/presence-element.model.d.ts +25 -0
- package/app/models/element/rewriter-element.model.d.ts +20 -0
- package/app/models/element/suggestion-element.model.d.ts +180 -0
- package/app/utils/console.d.ts +25 -0
- package/app/utils/constants.d.ts +202 -5
- package/app/utils/enums.d.ts +24 -3
- package/app/utils/page-info-store.d.ts +29 -0
- package/models.d.ts +5 -0
- package/package.json +1 -1
- package/types.d.ts +2 -0
|
@@ -24,6 +24,7 @@ import { TagElement } from "../models/element/tag-element.model";
|
|
|
24
24
|
import { FeatureType } from "../utils/enums";
|
|
25
25
|
import { UserContact } from "../models/data/user-contact.data.model";
|
|
26
26
|
import { DocumentMetadata } from "../models/data/document-metadata.model";
|
|
27
|
+
import { PageInfo } from "../models/data/page-info.model";
|
|
27
28
|
import { ReactionElement } from "../models/element/reaction-element.model";
|
|
28
29
|
import { CrdtElement } from "../models/element/crdt-element.model";
|
|
29
30
|
import { VeltEventMetadata, VeltDebugInfo } from "../models/data/event-metadata.data.model";
|
|
@@ -55,6 +56,23 @@ export declare class Snippyly {
|
|
|
55
56
|
* @param documentMetadata Document Metadata
|
|
56
57
|
*/
|
|
57
58
|
setDocument: (id: string, documentMetadata?: DocumentMetadata) => Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Provide custom page info that the SDK should use instead of generating it from the browser
|
|
61
|
+
* (`window.location` / `document.title`). Newly created data (comments, reactions, recordings,
|
|
62
|
+
* presence, cursors, etc.) will use the provided page info. Already saved/existing data is not
|
|
63
|
+
* affected.
|
|
64
|
+
* @param pageInfo client-provided page info
|
|
65
|
+
* @param options optional; pass a `documentId` to scope the page info to a specific document
|
|
66
|
+
* (per-document page info takes precedence over the global page info)
|
|
67
|
+
*/
|
|
68
|
+
setPageInfo: (pageInfo: PageInfo, options?: { documentId?: string; }) => void;
|
|
69
|
+
/**
|
|
70
|
+
* Clear custom page info previously set via `setPageInfo`. The SDK will resume generating
|
|
71
|
+
* page info from the browser.
|
|
72
|
+
* @param options optional; pass a `documentId` to clear only that document's page info,
|
|
73
|
+
* otherwise the global page info is cleared
|
|
74
|
+
*/
|
|
75
|
+
clearPageInfo: (options?: { documentId?: string; }) => void;
|
|
58
76
|
/**
|
|
59
77
|
* Tell us the unique ID of the current document/resource on which you want to enable collaboration.
|
|
60
78
|
* @param id unique document ID
|
|
@@ -365,7 +383,7 @@ export declare class Snippyly {
|
|
|
365
383
|
/**
|
|
366
384
|
* To update user contact list.
|
|
367
385
|
*/
|
|
368
|
-
updateContactList: (userContacts: UserContact[], config?: { merge: boolean }) => void;
|
|
386
|
+
updateContactList: (userContacts: UserContact[], config?: { merge: boolean, filters?: boolean }) => void;
|
|
369
387
|
|
|
370
388
|
/**
|
|
371
389
|
* To get document metadata.
|
|
@@ -408,6 +426,16 @@ export declare class Snippyly {
|
|
|
408
426
|
*/
|
|
409
427
|
disableSafeEval: () => void;
|
|
410
428
|
|
|
429
|
+
/**
|
|
430
|
+
* Enable Firestore persistent cache for offline support.
|
|
431
|
+
*/
|
|
432
|
+
enableFirestorePersistentCache: (config?: { ha?: boolean }) => void;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Disable Firestore persistent cache.
|
|
436
|
+
*/
|
|
437
|
+
disableFirestorePersistentCache: (config?: { ha?: boolean }) => void;
|
|
438
|
+
|
|
411
439
|
/**
|
|
412
440
|
* To reset the button toggle map.
|
|
413
441
|
*/
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BaseMetadata } from './base-metadata.data.model';
|
|
2
|
+
import { ActivityChanges } from './activity.data.model';
|
|
3
|
+
import { ResolverConfig, ResolverResponse } from './resolver.data.model';
|
|
4
|
+
export interface PartialActivityRecord {
|
|
5
|
+
id: string;
|
|
6
|
+
metadata?: BaseMetadata;
|
|
7
|
+
changes?: ActivityChanges;
|
|
8
|
+
entityData?: unknown;
|
|
9
|
+
entityTargetData?: unknown;
|
|
10
|
+
displayMessageTemplateData?: Record<string, unknown>;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}
|
|
13
|
+
export interface ActivityAnnotationDataProvider {
|
|
14
|
+
get?: (request: GetActivityResolverRequest) => Promise<ResolverResponse<Record<string, PartialActivityRecord>>>;
|
|
15
|
+
save?: (request: SaveActivityResolverRequest) => Promise<ResolverResponse<undefined>>;
|
|
16
|
+
config?: ResolverConfig;
|
|
17
|
+
}
|
|
18
|
+
export interface GetActivityResolverRequest {
|
|
19
|
+
activityIds?: string[];
|
|
20
|
+
documentIds?: string[];
|
|
21
|
+
organizationId?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface SaveActivityResolverRequest {
|
|
24
|
+
activity: Record<string, PartialActivityRecord>;
|
|
25
|
+
event?: string;
|
|
26
|
+
metadata?: BaseMetadata;
|
|
27
|
+
}
|
|
@@ -23,6 +23,8 @@ export declare const CommentActivityActionTypes: {
|
|
|
23
23
|
readonly APPROVE: "comment_annotation.approve";
|
|
24
24
|
readonly ACCEPT: "comment.accept";
|
|
25
25
|
readonly REJECT: "comment.reject";
|
|
26
|
+
readonly SUGGESTION_ACCEPT: "comment_annotation.suggestion_accept";
|
|
27
|
+
readonly SUGGESTION_REJECT: "comment_annotation.suggestion_reject";
|
|
26
28
|
readonly REACTION_ADD: "comment.reaction_add";
|
|
27
29
|
readonly REACTION_DELETE: "comment.reaction_delete";
|
|
28
30
|
readonly SUBSCRIBE: "comment_annotation.subscribe";
|
|
@@ -115,6 +117,8 @@ export declare class ActivityRecord<TEntity = unknown, TTarget = unknown> {
|
|
|
115
117
|
actionIcon?: string;
|
|
116
118
|
/** If true, this activity cannot be updated or deleted via REST API */
|
|
117
119
|
immutable?: boolean;
|
|
120
|
+
/** If true, this activity was stripped by the activity resolver (for UI loading states) */
|
|
121
|
+
isActivityResolverUsed?: boolean;
|
|
118
122
|
}
|
|
119
123
|
/**
|
|
120
124
|
* Configuration for subscribing to activities.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public configuration surface for AI agent suggestion comment actions.
|
|
3
|
+
*
|
|
4
|
+
* Hosts can override or augment the built-in accept (convert suggestion ->
|
|
5
|
+
* comment) and reject (delete) actions rendered on an agent suggestion card.
|
|
6
|
+
* When no config is provided, the built-in defaults are used (INV-004).
|
|
7
|
+
*
|
|
8
|
+
* Part of the SDK public API (exported via velt-types). Backward-compatible /
|
|
9
|
+
* additive — see specs/agent-suggestion-comment-ui/spec.md `## Outbound contract changes`.
|
|
10
|
+
*/
|
|
11
|
+
import { CommentAnnotation } from './comment-annotation.data.model';
|
|
12
|
+
/**
|
|
13
|
+
* A single host-defined action button on an agent suggestion card.
|
|
14
|
+
*/
|
|
15
|
+
export interface AgentSuggestionAction {
|
|
16
|
+
/** Stable identifier for the action. */
|
|
17
|
+
id: string;
|
|
18
|
+
/** Display label (button text / aria-label). */
|
|
19
|
+
label?: string;
|
|
20
|
+
/** Optional icon identifier or URL. */
|
|
21
|
+
icon?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Invoked when the action button is clicked. Receives the raw
|
|
24
|
+
* CommentAnnotation (review decision 2026-06-03 — accepted public-contract
|
|
25
|
+
* surface). Handler throws are caught by the SDK (EC-006).
|
|
26
|
+
*/
|
|
27
|
+
onClick: (annotation: CommentAnnotation) => void | Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Host configuration for agent suggestion card actions.
|
|
31
|
+
* When `actions` is provided it replaces the default accept/reject pair.
|
|
32
|
+
*/
|
|
33
|
+
export interface AgentSuggestionActionsConfig {
|
|
34
|
+
actions?: AgentSuggestionAction[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Discriminator for the bespoke agent-suggestion overflow-menu rows.
|
|
38
|
+
* Drives the icon, label and click action of the generic menu-item primitive.
|
|
39
|
+
*/
|
|
40
|
+
export type AgentSuggestionMenuItemType = 'copy-link' | 'delete';
|
|
41
|
+
/**
|
|
42
|
+
* Canonical agent-suggestion overflow-menu item types.
|
|
43
|
+
* Avoids repeating the discriminator string literals across primitives.
|
|
44
|
+
*/
|
|
45
|
+
export declare const AGENT_SUGGESTION_MENU_ITEM_TYPE: {
|
|
46
|
+
readonly COPY_LINK: "copy-link";
|
|
47
|
+
readonly DELETE: "delete";
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Translation keys / labels used by the agent-suggestion overflow menu.
|
|
51
|
+
* Centralised so the menu-item, label and trigger primitives stay in sync.
|
|
52
|
+
*/
|
|
53
|
+
export declare const AGENT_SUGGESTION_MENU_LABEL: {
|
|
54
|
+
readonly COPY_LINK: "Copy link";
|
|
55
|
+
readonly LINK_COPIED: "Link copied!";
|
|
56
|
+
readonly DELETE_THREAD: "Delete thread";
|
|
57
|
+
};
|
|
@@ -85,6 +85,16 @@ export interface RejectCommentAnnotationRequest {
|
|
|
85
85
|
annotationId: string;
|
|
86
86
|
options?: RequestOptions;
|
|
87
87
|
}
|
|
88
|
+
export interface AcceptSuggestionRequest {
|
|
89
|
+
annotationId: string;
|
|
90
|
+
options?: RequestOptions;
|
|
91
|
+
}
|
|
92
|
+
export interface RejectSuggestionRequest {
|
|
93
|
+
annotationId: string;
|
|
94
|
+
/** Optional human-readable reason persisted on the suggestion. */
|
|
95
|
+
reason?: string;
|
|
96
|
+
options?: RequestOptions;
|
|
97
|
+
}
|
|
88
98
|
export interface DeleteCommentAnnotationRequest {
|
|
89
99
|
annotationId: string;
|
|
90
100
|
options?: RequestOptions;
|
|
@@ -7,6 +7,7 @@ import { CustomAnnotationDropdownItem } from "./custom-chip-dropdown.data.model"
|
|
|
7
7
|
import { CustomCategory, CustomPriority, CustomStatus } from "./custom-filter.data.model";
|
|
8
8
|
import { Location } from "./location.model";
|
|
9
9
|
import { PageInfo } from "./page-info.model";
|
|
10
|
+
import { SuggestionData } from "./suggestion.data.model";
|
|
10
11
|
import { TargetElement } from "./target-element.data.model";
|
|
11
12
|
import { TargetTextRange } from "./target-text-range.data.model";
|
|
12
13
|
import { User } from "./user.data.model";
|
|
@@ -16,6 +17,34 @@ export interface CommentAnnotationVisibilityConfig {
|
|
|
16
17
|
organizationId?: string;
|
|
17
18
|
userIds?: string[];
|
|
18
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Structured result produced by an AI agent for a comment annotation.
|
|
22
|
+
* Read-only from the SDK's perspective — written upstream by the agent.
|
|
23
|
+
*/
|
|
24
|
+
export interface AgentResult {
|
|
25
|
+
/** Short, bold headline rendered at the top of the agent suggestion card. */
|
|
26
|
+
title?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Identity + output of the AI agent that authored a comment annotation.
|
|
30
|
+
* Present on annotations created by an agent. The agent-suggestion UI renders
|
|
31
|
+
* iff `agent` is present AND `type === 'suggestion'` (and the viewer is admin).
|
|
32
|
+
*
|
|
33
|
+
* `agentFields` mirrors the Firestore query field used by
|
|
34
|
+
* `CommentRequestQuery.agentFields` (see comment-actions.data.model.ts).
|
|
35
|
+
*/
|
|
36
|
+
export interface AgentData {
|
|
37
|
+
/** Canonical display name of the agent (card header). */
|
|
38
|
+
agentName?: string;
|
|
39
|
+
/** Legacy display name of the agent (card header); superseded by `agentName`. */
|
|
40
|
+
name?: string;
|
|
41
|
+
/** Avatar URL for the agent (card header); falls back to a default icon. */
|
|
42
|
+
avatar?: string;
|
|
43
|
+
/** Structured agent output (title, …). */
|
|
44
|
+
result?: AgentResult;
|
|
45
|
+
/** Queryable agent attributes. */
|
|
46
|
+
agentFields?: string[];
|
|
47
|
+
}
|
|
19
48
|
export declare class CommentAnnotation {
|
|
20
49
|
/**
|
|
21
50
|
* Unique identifier for the comment pin annotation.
|
|
@@ -150,6 +179,12 @@ export declare class CommentAnnotation {
|
|
|
150
179
|
location?: Location | null;
|
|
151
180
|
type?: string;
|
|
152
181
|
commentType?: string;
|
|
182
|
+
/**
|
|
183
|
+
* Origin of the annotation. `'agent'` indicates the annotation was authored by
|
|
184
|
+
* an AI agent (drives the blue pin marker, agent identity header and blue text
|
|
185
|
+
* highlight). Absent / any other value indicates a regular user comment.
|
|
186
|
+
*/
|
|
187
|
+
sourceType?: string;
|
|
153
188
|
metadata?: CommentMetadata;
|
|
154
189
|
/**
|
|
155
190
|
* Selected text range of comment annotation
|
|
@@ -161,6 +196,10 @@ export declare class CommentAnnotation {
|
|
|
161
196
|
selectAllContent?: boolean;
|
|
162
197
|
approved?: boolean;
|
|
163
198
|
status: CustomStatus;
|
|
199
|
+
/**
|
|
200
|
+
* User id of the user who updated the status of the comment annotation
|
|
201
|
+
*/
|
|
202
|
+
statusUpdatedByUserId?: string | null;
|
|
164
203
|
/**
|
|
165
204
|
* To maintain index of current annotation in available list of annotations
|
|
166
205
|
* It will start from 1, so no need to add 1 in that.
|
|
@@ -199,6 +238,30 @@ export declare class CommentAnnotation {
|
|
|
199
238
|
viewedByUserIds?: string[];
|
|
200
239
|
viewedBy?: User[];
|
|
201
240
|
unread?: boolean;
|
|
241
|
+
/**
|
|
242
|
+
* SDK-managed suggestion data. Present iff type === 'suggestion'.
|
|
243
|
+
* Customer code must not write to this directly — use the SuggestionElement API.
|
|
244
|
+
*
|
|
245
|
+
* See docs/suggestions-api-contract.md for the full storage model.
|
|
246
|
+
*/
|
|
247
|
+
suggestion?: SuggestionData;
|
|
248
|
+
/**
|
|
249
|
+
* AI agent identity + output. Present on agent-authored annotations.
|
|
250
|
+
* Read-only from the SDK; written upstream by the agent.
|
|
251
|
+
* See specs/agent-suggestion-comment-ui/spec.md (INV-001).
|
|
252
|
+
*/
|
|
253
|
+
agent?: AgentData;
|
|
254
|
+
/**
|
|
255
|
+
* Server-derived set of all user IDs involved in this annotation
|
|
256
|
+
* (subscribed + unsubscribed participants). Written upstream; read-only
|
|
257
|
+
* from the SDK.
|
|
258
|
+
*/
|
|
259
|
+
involvedUserIds?: string[];
|
|
260
|
+
/**
|
|
261
|
+
* Server-derived set of user IDs @mentioned across this annotation's
|
|
262
|
+
* comments. Written upstream; read-only from the SDK.
|
|
263
|
+
*/
|
|
264
|
+
mentionedUserIds?: string[];
|
|
202
265
|
}
|
|
203
266
|
export declare class GhostComment {
|
|
204
267
|
targetElement?: TargetElement | null;
|
|
@@ -67,6 +67,7 @@ export type CommentEventTypesMap = {
|
|
|
67
67
|
[CommentEventTypes.UPDATE_ACCESS]: UpdateAccessEvent;
|
|
68
68
|
[CommentEventTypes.RESOLVE_COMMENT]: ResolveCommentEvent;
|
|
69
69
|
[CommentEventTypes.ADD_COMMENT]: AddCommentEvent;
|
|
70
|
+
[CommentEventTypes.ADD_COMMENT_DRAFT]: AddCommentDraftEvent;
|
|
70
71
|
[CommentEventTypes.UPDATE_COMMENT]: UpdateCommentEvent;
|
|
71
72
|
[CommentEventTypes.DELETE_COMMENT]: DeleteCommentEvent;
|
|
72
73
|
[CommentEventTypes.ADD_ATTACHMENT]: AddAttachmentEvent;
|
|
@@ -92,6 +93,8 @@ export type CommentEventTypesMap = {
|
|
|
92
93
|
[CommentEventTypes.COMMENT_SAVED]: CommentSavedEvent;
|
|
93
94
|
[CommentEventTypes.COMMENT_SAVE_TRIGGERED]: CommentSaveTriggeredEvent;
|
|
94
95
|
[CommentEventTypes.VISIBILITY_OPTION_CLICKED]: VisibilityOptionClickedEvent;
|
|
96
|
+
[CommentEventTypes.SUGGESTION_ACCEPTED]: SuggestionAcceptEvent;
|
|
97
|
+
[CommentEventTypes.SUGGESTION_REJECTED]: SuggestionRejectEvent;
|
|
95
98
|
};
|
|
96
99
|
export interface AddAttachmentEvent {
|
|
97
100
|
annotationId: string;
|
|
@@ -145,6 +148,20 @@ export interface DeleteCommentAnnotationEvent {
|
|
|
145
148
|
commentAnnotation: CommentAnnotation;
|
|
146
149
|
metadata: VeltEventMetadata;
|
|
147
150
|
}
|
|
151
|
+
export interface SuggestionAcceptEvent {
|
|
152
|
+
annotationId: string;
|
|
153
|
+
commentAnnotation: CommentAnnotation;
|
|
154
|
+
metadata: VeltEventMetadata;
|
|
155
|
+
actionUser: User;
|
|
156
|
+
}
|
|
157
|
+
export interface SuggestionRejectEvent {
|
|
158
|
+
annotationId: string;
|
|
159
|
+
commentAnnotation: CommentAnnotation;
|
|
160
|
+
metadata: VeltEventMetadata;
|
|
161
|
+
actionUser: User;
|
|
162
|
+
/** Optional human-readable reason supplied at reject time. */
|
|
163
|
+
rejectReason?: string | null;
|
|
164
|
+
}
|
|
148
165
|
export interface GetCommentAnnotationsResponse {
|
|
149
166
|
data: Record<string, CommentAnnotation[]> | null;
|
|
150
167
|
}
|
|
@@ -181,6 +198,12 @@ export interface AddCommentEvent {
|
|
|
181
198
|
comment: Comment;
|
|
182
199
|
metadata: VeltEventMetadata;
|
|
183
200
|
}
|
|
201
|
+
export interface AddCommentDraftEvent {
|
|
202
|
+
annotationId: string;
|
|
203
|
+
commentAnnotation: CommentAnnotation;
|
|
204
|
+
comment: Comment;
|
|
205
|
+
metadata: VeltEventMetadata;
|
|
206
|
+
}
|
|
184
207
|
export interface CommentSavedEvent {
|
|
185
208
|
annotationId: string;
|
|
186
209
|
commentAnnotation: CommentAnnotation;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CommentAccessMode } from "../../utils/enums";
|
|
1
2
|
import { CommentAnnotation } from "./comment-annotation.data.model";
|
|
2
3
|
import { UnreadCommentsMap } from "./comment-utils.data.model";
|
|
3
4
|
import { CustomFilters } from "./custom-filter.data.model";
|
|
@@ -64,6 +65,7 @@ export declare class CommentSidebarFilters {
|
|
|
64
65
|
priority?: string[];
|
|
65
66
|
status?: string[];
|
|
66
67
|
category?: string[];
|
|
68
|
+
accessModes?: CommentAccessMode[];
|
|
67
69
|
version?: {
|
|
68
70
|
id: string;
|
|
69
71
|
name?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Attachment } from "./attachment.model";
|
|
2
2
|
import { AutocompleteGroupReplaceData, AutocompleteReplaceData, AutocompleteUserContactReplaceData } from "./autocomplete.data.model";
|
|
3
|
+
import type { AgentData } from "./comment-annotation.data.model";
|
|
3
4
|
import { ReactionAnnotation } from "./reaction-annotation.data.model";
|
|
4
5
|
import { RecordedData } from "./recorder.model";
|
|
5
6
|
import { User } from "./user.data.model";
|
|
@@ -88,4 +89,21 @@ export declare class Comment {
|
|
|
88
89
|
*/
|
|
89
90
|
isEdited?: boolean;
|
|
90
91
|
reactionAnnotations?: ReactionAnnotation[];
|
|
92
|
+
/**
|
|
93
|
+
* Origin of this individual comment. `'agent'` indicates the comment was
|
|
94
|
+
* authored by an AI agent (agent replies / multi-agent threads). Stamped
|
|
95
|
+
* server-side; mirrors `CommentAnnotation.sourceType` at the comment level.
|
|
96
|
+
*/
|
|
97
|
+
sourceType?: string;
|
|
98
|
+
/**
|
|
99
|
+
* AI agent identity + output for an agent-authored comment. Present on
|
|
100
|
+
* per-comment agent replies. Read-only from the SDK; written upstream by the
|
|
101
|
+
* agent. Mirrors `CommentAnnotation.agent` at the comment level.
|
|
102
|
+
*/
|
|
103
|
+
agent?: AgentData;
|
|
104
|
+
/**
|
|
105
|
+
* Customer-supplied metadata bag persisted as-is. Only present when a caller
|
|
106
|
+
* provides it; not server-generated.
|
|
107
|
+
*/
|
|
108
|
+
metadata?: any;
|
|
91
109
|
}
|
|
@@ -51,6 +51,7 @@ export declare class Config {
|
|
|
51
51
|
advancedQueriesDisabled?: boolean;
|
|
52
52
|
/**
|
|
53
53
|
* The domain of the API proxy.
|
|
54
|
+
* @deprecated Use `proxyConfig.apiHost` instead.
|
|
54
55
|
*/
|
|
55
56
|
apiProxyDomain?: string;
|
|
56
57
|
/**
|
|
@@ -61,6 +62,26 @@ export declare class Config {
|
|
|
61
62
|
* Default: true
|
|
62
63
|
*/
|
|
63
64
|
globalStyles?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Configuration for routing all traffic through reverse proxies.
|
|
67
|
+
*/
|
|
68
|
+
proxyConfig?: ProxyConfig;
|
|
69
|
+
}
|
|
70
|
+
export interface ProxyConfig {
|
|
71
|
+
/** Custom host for the Velt CDN (e.g., 'cdn-proxy.customer.com') */
|
|
72
|
+
cdnHost?: string;
|
|
73
|
+
/** Custom host for the Velt API (e.g., 'api-proxy.customer.com') */
|
|
74
|
+
apiHost?: string;
|
|
75
|
+
/** Custom host for Firestore (e.g., 'firestore-proxy.customer.com') */
|
|
76
|
+
v2DbHost?: string;
|
|
77
|
+
/** Custom host for Firebase RTDB (e.g., 'rtdb-proxy.customer.com'). Replaces the firebaseio.com domain in all RTDB URLs. */
|
|
78
|
+
v1DbHost?: string;
|
|
79
|
+
/** Custom host for Firebase Storage (e.g., 'storage-proxy.customer.com'). Replaces firebasestorage.googleapis.com. */
|
|
80
|
+
storageHost?: string;
|
|
81
|
+
/** Custom host for Firebase Auth (e.g., 'auth-proxy.customer.com'). Replaces identitytoolkit.googleapis.com and securetoken.googleapis.com. */
|
|
82
|
+
authHost?: string;
|
|
83
|
+
/** Force long-polling for Firestore and RTDB instead of WebSocket. Default: false (WebSocket). */
|
|
84
|
+
forceLongPolling?: boolean;
|
|
64
85
|
}
|
|
65
86
|
export interface ExtendedFirebaseOptions extends FirebaseOptions {
|
|
66
87
|
storeDbId: string;
|
|
@@ -9,6 +9,7 @@ export type CoreEventTypesMap = {
|
|
|
9
9
|
[CoreEventTypes.REACTION_RESOLVER]: ReactionResolverEvent;
|
|
10
10
|
[CoreEventTypes.RECORDER_RESOLVER]: RecorderResolverEvent;
|
|
11
11
|
[CoreEventTypes.NOTIFICATION_RESOLVER]: NotificationResolverEvent;
|
|
12
|
+
[CoreEventTypes.ACTIVITY_RESOLVER]: ActivityResolverEvent;
|
|
12
13
|
[CoreEventTypes.VELT_BUTTON_CLICK]: VeltButtonClickEvent;
|
|
13
14
|
[CoreEventTypes.USER_UPDATE]: UserUpdateEvent;
|
|
14
15
|
[CoreEventTypes.DOCUMENT_INIT]: DocumentInitEvent;
|
|
@@ -198,6 +199,26 @@ export type NotificationResolverEventType = {
|
|
|
198
199
|
NOTIFICATION_DELETE_ERROR: 'notificationDeleteError';
|
|
199
200
|
};
|
|
200
201
|
export type NotificationResolverEvent = BaseResolverEvent<NotificationResolverEventType, NotificationResolverSource, NotificationResolverModuleName>;
|
|
202
|
+
export declare enum ActivityResolverSource {
|
|
203
|
+
RESOLVE_ACTIVITIES = "resolveActivities",
|
|
204
|
+
SAVE_ACTIVITY = "saveActivity",
|
|
205
|
+
FORMAT_RESPONSE = "formatResponse"
|
|
206
|
+
}
|
|
207
|
+
export declare enum ActivityResolverModuleName {
|
|
208
|
+
GET_ACTIVITIES = "getActivities"
|
|
209
|
+
}
|
|
210
|
+
export type ActivityResolverEventType = {
|
|
211
|
+
ACTIVITY_RESOLUTION_REQUEST_FORMED: 'activityResolutionRequestFormed';
|
|
212
|
+
ACTIVITY_RESOLUTION_REQUEST_TRIGGERED: 'activityResolutionRequestTriggered';
|
|
213
|
+
ACTIVITY_RESOLUTION_RESULT: 'activityResolutionResult';
|
|
214
|
+
ACTIVITY_RESOLUTION_ERROR: 'activityResolutionError';
|
|
215
|
+
ACTIVITY_RESOLUTION_RESULT_FROM_CACHE: 'activityResolutionResultFromCache';
|
|
216
|
+
ACTIVITY_SAVE_REQUEST_FORMED: 'activitySaveRequestFormed';
|
|
217
|
+
ACTIVITY_SAVE_REQUEST_TRIGGERED: 'activitySaveRequestTriggered';
|
|
218
|
+
ACTIVITY_SAVE_RESULT: 'activitySaveResult';
|
|
219
|
+
ACTIVITY_SAVE_ERROR: 'activitySaveError';
|
|
220
|
+
};
|
|
221
|
+
export type ActivityResolverEvent = BaseResolverEvent<ActivityResolverEventType, ActivityResolverSource, ActivityResolverModuleName>;
|
|
201
222
|
export type ErrorEvent = {
|
|
202
223
|
event?: string;
|
|
203
224
|
sourceMethod?: string;
|
|
@@ -16,6 +16,8 @@ export interface SetDocumentsRequestOptions {
|
|
|
16
16
|
locationId?: string;
|
|
17
17
|
rootDocumentId?: string;
|
|
18
18
|
context?: SetDocumentsContext;
|
|
19
|
+
debounceTime?: number;
|
|
20
|
+
optimisticPermissions?: boolean;
|
|
19
21
|
}
|
|
20
22
|
export interface UpdateDocumentsRequest<T = unknown> {
|
|
21
23
|
organizationId?: string;
|
|
@@ -257,3 +257,23 @@ export interface NotificationsDocConfig {
|
|
|
257
257
|
export interface GetNotificationsDataQuery {
|
|
258
258
|
type?: 'all' | 'forYou' | 'documents';
|
|
259
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* Configuration for the opt-in cross-organization "For You" notifications feature.
|
|
262
|
+
*
|
|
263
|
+
* When enabled, the SDK merges notifications from other organizations the user
|
|
264
|
+
* belongs to (resolved from the global `userNotificationIndex`) into the existing
|
|
265
|
+
* "For You" feed. All fields are optional; sensible defaults are applied by
|
|
266
|
+
* `NotificationService.setCrossOrganizationConfig`.
|
|
267
|
+
*
|
|
268
|
+
* @see specs/notification-api-scope/spec.md
|
|
269
|
+
*/
|
|
270
|
+
export interface CrossOrganizationConfig {
|
|
271
|
+
/** Whether cross-organization notifications are active. Defaults to `true` on enable. */
|
|
272
|
+
enabled?: boolean;
|
|
273
|
+
/** Allowlist of organization IDs to include. When omitted, all indexed orgs are eligible. */
|
|
274
|
+
organizationIds?: string[];
|
|
275
|
+
/** Organization IDs to exclude. The current organization is always excluded. */
|
|
276
|
+
excludeOrganizationIds?: string[];
|
|
277
|
+
/** Feeds the merge applies to. Only `'forYou'` is supported; `'all'` is ignored with a warning. */
|
|
278
|
+
feeds?: ('forYou' | 'all')[];
|
|
279
|
+
}
|
|
@@ -47,4 +47,13 @@ export declare class PageInfo {
|
|
|
47
47
|
*/
|
|
48
48
|
screenWidth?: number;
|
|
49
49
|
deviceInfo?: IDeviceInfo;
|
|
50
|
+
/**
|
|
51
|
+
* @param applyClientOverride when true (default), merges the CURRENT document's client page
|
|
52
|
+
* info override at construction time — covers the bare `new PageInfo()` sites
|
|
53
|
+
* (cursor / presence / selection). No-op when the client hasn't provided any, so the
|
|
54
|
+
* default empty-page-info behavior is unchanged. `getPageInfo(documentId)` passes
|
|
55
|
+
* `false` so it can apply a specific document's override itself, without the current
|
|
56
|
+
* document's fields leaking onto a different document's page info.
|
|
57
|
+
*/
|
|
58
|
+
constructor(applyClientOverride?: boolean);
|
|
50
59
|
}
|
|
@@ -83,4 +83,9 @@ export declare class PresenceUser {
|
|
|
83
83
|
initial?: string;
|
|
84
84
|
isTabAway?: boolean;
|
|
85
85
|
isUserIdle?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Whether this custom user is local-only (not persisted to DB).
|
|
88
|
+
* Only applicable to users added via addUser API.
|
|
89
|
+
*/
|
|
90
|
+
localOnly?: boolean;
|
|
86
91
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ActivityAnnotationDataProvider } from "./activity-resolver.data.model";
|
|
1
2
|
import { CommentAnnotationDataProvider } from "./comment-resolver.data.model";
|
|
2
3
|
import { AttachmentDataProvider } from "./attachment-resolver.data.model";
|
|
3
4
|
import { NotificationDataProvider } from "./notification-resolver.data.model";
|
|
@@ -12,4 +13,5 @@ export interface VeltDataProvider {
|
|
|
12
13
|
anonymousUser?: AnonymousUserDataProvider;
|
|
13
14
|
recorder?: RecorderAnnotationDataProvider;
|
|
14
15
|
notification?: NotificationDataProvider;
|
|
16
|
+
activity?: ActivityAnnotationDataProvider;
|
|
15
17
|
}
|
|
@@ -54,6 +54,11 @@ export declare class ReactionAnnotation {
|
|
|
54
54
|
iconUrl?: string;
|
|
55
55
|
iconEmoji?: string;
|
|
56
56
|
metadata?: ReactionMetadata;
|
|
57
|
+
/**
|
|
58
|
+
* Server-derived set of all user IDs involved in this reaction annotation.
|
|
59
|
+
* Written upstream; read-only from the SDK.
|
|
60
|
+
*/
|
|
61
|
+
involvedUserIds?: string[];
|
|
57
62
|
}
|
|
58
63
|
export declare class ReactionMetadata extends BaseMetadata {
|
|
59
64
|
[key: string]: any;
|
|
@@ -4,6 +4,8 @@ export interface TranscriptionDoneEvent extends RecorderData {
|
|
|
4
4
|
}
|
|
5
5
|
export interface RecordingDoneEvent extends RecorderData {
|
|
6
6
|
}
|
|
7
|
+
export interface RecordingDoneLocalEvent extends RecorderData {
|
|
8
|
+
}
|
|
7
9
|
export interface RecordingDeleteEvent extends RecorderData {
|
|
8
10
|
}
|
|
9
11
|
export interface RecordingEditDoneEvent extends RecorderData {
|
|
@@ -35,6 +37,7 @@ export interface RecordingSaveInitiatedEvent {
|
|
|
35
37
|
export type RecorderEventTypesMap = {
|
|
36
38
|
[RecorderEventTypes.TRANSCRIPTION_DONE]: TranscriptionDoneEvent;
|
|
37
39
|
[RecorderEventTypes.RECORDING_DONE]: RecordingDoneEvent;
|
|
40
|
+
[RecorderEventTypes.RECORDING_DONE_LOCAL]: RecordingDoneLocalEvent;
|
|
38
41
|
[RecorderEventTypes.RECORDING_EDIT_DONE]: RecordingEditDoneEvent;
|
|
39
42
|
[RecorderEventTypes.DELETE_RECORDING]: RecordingDeleteEvent;
|
|
40
43
|
[RecorderEventTypes.RECORDING_STARTED]: RecordingStartedEvent;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { TargetTextRange } from './target-text-range.data.model';
|
|
2
|
+
import { RewriterEventTypes } from '../../utils/enums';
|
|
3
|
+
export type OpenAiModel = 'gpt-5.4' | 'gpt-5.4-pro' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5' | 'gpt-4.1' | 'gpt-4o' | 'gpt-4o-mini' | 'gpt-4-turbo' | 'o3-pro' | 'o3' | 'o3-mini' | 'o4-mini';
|
|
4
|
+
export type AnthropicModel = 'claude-opus-4-6' | 'claude-sonnet-4-6' | 'claude-haiku-4-5' | 'claude-sonnet-4-5' | 'claude-opus-4-5' | 'claude-opus-4-1' | 'claude-sonnet-4-0' | 'claude-opus-4-0';
|
|
5
|
+
export type GeminiModel = 'gemini-3.1-pro-preview' | 'gemini-3-flash-preview' | 'gemini-3.1-flash-lite-preview' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-2.5-pro';
|
|
6
|
+
export type AiModel = OpenAiModel | AnthropicModel | GeminiModel | (string & NonNullable<unknown>);
|
|
7
|
+
export interface TextSelectedEvent {
|
|
8
|
+
selectionId: string;
|
|
9
|
+
text: string;
|
|
10
|
+
targetTextRange: TargetTextRange;
|
|
11
|
+
}
|
|
12
|
+
export interface RewriterAskAiRequest {
|
|
13
|
+
model: AiModel;
|
|
14
|
+
prompt: string;
|
|
15
|
+
selectedText: string;
|
|
16
|
+
}
|
|
17
|
+
export interface RewriterReplaceTextRequest {
|
|
18
|
+
text: string;
|
|
19
|
+
event: TextSelectedEvent;
|
|
20
|
+
}
|
|
21
|
+
export interface RewriterAddCommentRequest {
|
|
22
|
+
text: string;
|
|
23
|
+
event: TextSelectedEvent;
|
|
24
|
+
}
|
|
25
|
+
export interface RewriterAskAiResponse {
|
|
26
|
+
text: string;
|
|
27
|
+
success: boolean;
|
|
28
|
+
error?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface RewriterReplaceTextResponse {
|
|
31
|
+
success: boolean;
|
|
32
|
+
originalText: string;
|
|
33
|
+
replacedText: string;
|
|
34
|
+
error?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface RewriterAddCommentResponse {
|
|
37
|
+
success: boolean;
|
|
38
|
+
annotationId?: string;
|
|
39
|
+
commentText?: string;
|
|
40
|
+
error?: string;
|
|
41
|
+
}
|
|
42
|
+
export type RewriterEventTypesMap = {
|
|
43
|
+
[RewriterEventTypes.TEXT_SELECTED]: TextSelectedEvent;
|
|
44
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { SuggestionEventTypes } from '../../utils/enums';
|
|
2
|
+
import { ApprovedSuggestion, PendingSuggestion, RejectedSuggestion, StaleSuggestion, TargetEditCommitBuilder, TargetEditDetails } from './suggestion.data.model';
|
|
3
|
+
/**
|
|
4
|
+
* Public payload types for the v1 Suggestions feature. Mirrors the layout of
|
|
5
|
+
* `comment-events.data.model.ts` and `recorder-events.data.model.ts`:
|
|
6
|
+
*
|
|
7
|
+
* - One named interface per event payload.
|
|
8
|
+
* - One `SuggestionEventTypesMap` keyed by `SuggestionEventTypes` enum values.
|
|
9
|
+
*
|
|
10
|
+
* Customers pass an event-name string (or the enum constant — they're
|
|
11
|
+
* equivalent) to `velt.getSuggestionElement().on(...)` and receive an
|
|
12
|
+
* `Observable<SuggestionEventTypesMap[T]>`.
|
|
13
|
+
*
|
|
14
|
+
* No separate `actor`/`user` field on the payloads: the user info is on
|
|
15
|
+
* `suggestion.createdBy` (for created) and `suggestion.resolvedBy` (for
|
|
16
|
+
* approved/rejected/stale). Matches the comment-event shape.
|
|
17
|
+
*/
|
|
18
|
+
export interface SuggestionCreatedEvent {
|
|
19
|
+
suggestion: PendingSuggestion;
|
|
20
|
+
timestamp: number;
|
|
21
|
+
}
|
|
22
|
+
export interface SuggestionApprovedEvent {
|
|
23
|
+
suggestion: ApprovedSuggestion;
|
|
24
|
+
timestamp: number;
|
|
25
|
+
}
|
|
26
|
+
export interface SuggestionRejectedEvent {
|
|
27
|
+
suggestion: RejectedSuggestion;
|
|
28
|
+
timestamp: number;
|
|
29
|
+
}
|
|
30
|
+
export interface SuggestionStaleEvent {
|
|
31
|
+
suggestion: StaleSuggestion;
|
|
32
|
+
timestamp: number;
|
|
33
|
+
}
|
|
34
|
+
export interface TargetEditStartEvent {
|
|
35
|
+
details: TargetEditDetails;
|
|
36
|
+
timestamp: number;
|
|
37
|
+
}
|
|
38
|
+
export interface TargetEditCommitEvent {
|
|
39
|
+
details: TargetEditDetails;
|
|
40
|
+
/**
|
|
41
|
+
* Pre-bound builder. Calling it commits the suggestion using the SDK's
|
|
42
|
+
* default summary/metadata, optionally overridden by `result`. If the
|
|
43
|
+
* customer's `onTargetEditCommit` handler already returned a non-null
|
|
44
|
+
* result for this edit, this builder is a no-op so subscribers can't
|
|
45
|
+
* double-commit.
|
|
46
|
+
*/
|
|
47
|
+
commitSuggestion: TargetEditCommitBuilder;
|
|
48
|
+
timestamp: number;
|
|
49
|
+
}
|
|
50
|
+
export type SuggestionEventTypesMap = {
|
|
51
|
+
[SuggestionEventTypes.SUGGESTION_CREATED]: SuggestionCreatedEvent;
|
|
52
|
+
[SuggestionEventTypes.SUGGESTION_APPROVED]: SuggestionApprovedEvent;
|
|
53
|
+
[SuggestionEventTypes.SUGGESTION_REJECTED]: SuggestionRejectedEvent;
|
|
54
|
+
[SuggestionEventTypes.SUGGESTION_STALE]: SuggestionStaleEvent;
|
|
55
|
+
[SuggestionEventTypes.TARGET_EDIT_START]: TargetEditStartEvent;
|
|
56
|
+
[SuggestionEventTypes.TARGET_EDIT_COMMIT]: TargetEditCommitEvent;
|
|
57
|
+
};
|