@veltdev/types 5.0.2-beta.9 → 5.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/app/client/snippyly.model.d.ts +29 -1
  2. package/app/models/data/activity-resolver.data.model.d.ts +27 -0
  3. package/app/models/data/activity.data.model.d.ts +4 -0
  4. package/app/models/data/agent-suggestion.data.model.d.ts +57 -0
  5. package/app/models/data/autocomplete.data.model.d.ts +1 -0
  6. package/app/models/data/comment-actions.data.model.d.ts +17 -3
  7. package/app/models/data/comment-annotation.data.model.d.ts +63 -0
  8. package/app/models/data/comment-events.data.model.d.ts +23 -0
  9. package/app/models/data/comment-sidebar-config.model.d.ts +2 -0
  10. package/app/models/data/comment.data.model.d.ts +18 -0
  11. package/app/models/data/config.data.model.d.ts +21 -0
  12. package/app/models/data/core-events.data.model.d.ts +21 -0
  13. package/app/models/data/document-paths.data.model.d.ts +1 -0
  14. package/app/models/data/document.data.model.d.ts +2 -0
  15. package/app/models/data/notification.model.d.ts +20 -0
  16. package/app/models/data/org-contact.data.model.d.ts +25 -0
  17. package/app/models/data/page-info.model.d.ts +9 -0
  18. package/app/models/data/presence-user.data.model.d.ts +5 -0
  19. package/app/models/data/provider.data.model.d.ts +2 -0
  20. package/app/models/data/reaction-annotation.data.model.d.ts +5 -0
  21. package/app/models/data/recorder-events.data.model.d.ts +3 -0
  22. package/app/models/data/rewriter-events.data.model.d.ts +44 -0
  23. package/app/models/data/suggestion-events.data.model.d.ts +57 -0
  24. package/app/models/data/suggestion.data.model.d.ts +267 -0
  25. package/app/models/data/user-resolver.data.model.d.ts +2 -0
  26. package/app/models/data/user.data.model.d.ts +49 -0
  27. package/app/models/element/comment-element.model.d.ts +50 -2
  28. package/app/models/element/contact-element.model.d.ts +12 -0
  29. package/app/models/element/notification-element.model.d.ts +15 -1
  30. package/app/models/element/presence-element.model.d.ts +25 -0
  31. package/app/models/element/rewriter-element.model.d.ts +20 -0
  32. package/app/models/element/suggestion-element.model.d.ts +180 -0
  33. package/app/utils/console.d.ts +25 -0
  34. package/app/utils/constants.d.ts +203 -5
  35. package/app/utils/enums.d.ts +24 -3
  36. package/app/utils/page-info-store.d.ts +29 -0
  37. package/models.d.ts +6 -0
  38. package/package.json +1 -1
  39. package/types.d.ts +2 -0
@@ -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
+ };
@@ -0,0 +1,267 @@
1
+ /**
2
+ * Suggestions feature — public type surface for v1.
3
+ *
4
+ * Source contract: docs/suggestions-api-contract.md
5
+ * Source flows: docs/suggestions-implementation-flows.md
6
+ *
7
+ * Types are exported from the SDK's public barrel. Customer code interacts
8
+ * with these via Snippyly.getSuggestionElement(); the SDK constructs all
9
+ * Suggestion objects internally and customers do not build them directly.
10
+ */
11
+ import { User } from './user.data.model';
12
+ /**
13
+ * Lifecycle state machine for a Suggestion.
14
+ *
15
+ * - pending: Just created, awaiting owner action.
16
+ * - approved: Owner clicked Approve. Customer apply handler ran successfully.
17
+ * - rejected: Owner clicked Reject (with optional reason).
18
+ * - stale: Target was unresolvable at approve time. Owner can dismiss.
19
+ * - apply_failed: Customer apply handler threw during a suggestionApproved event.
20
+ * Status set by the SDK after the throw was caught.
21
+ */
22
+ export type SuggestionStatus = 'pending' | 'accepted' | 'rejected' | 'stale' | 'apply_failed';
23
+ /**
24
+ * Global per-user-per-session suggestion mode. Not persisted; reload returns to 'editing'.
25
+ */
26
+ export type SuggestionMode = 'editing' | 'suggesting';
27
+ /**
28
+ * Discriminator for the substrate that produced a suggestion. v1: always 'custom'.
29
+ * Wrapper libraries (e.g. tiptap-velt-comments) widen this union when they integrate.
30
+ *
31
+ * Customers should treat unknown values as opaque; the field exists so customer code
32
+ * can differentiate substrate when domain-specific rendering matters.
33
+ */
34
+ export type SuggestionTargetType = 'custom';
35
+ /**
36
+ * Single-arg config passed to `SuggestionElement.registerTarget(config)`.
37
+ * Carrying both `targetId` and `getter` in one object so the API can grow
38
+ * (e.g., metadata, target-specific options) without breaking customers.
39
+ */
40
+ export interface RegisterTargetConfig<T = unknown> {
41
+ targetId: string;
42
+ getter: TargetGetter<T>;
43
+ }
44
+ /**
45
+ * Function the customer registers via SuggestionElement.registerTarget(config).
46
+ * Required for any non-primitive (wrapper) target.
47
+ *
48
+ * The SDK calls this getter twice in a typical edit cycle:
49
+ * 1. On focus of the tagged element — to snapshot the pre-edit value.
50
+ * 2. On commit (focusout / change) — to read the current value for the diff.
51
+ *
52
+ * IMPORTANT — edit-time state, not persisted state: the getter must reflect
53
+ * what the user is currently editing, not what's persisted in the customer's
54
+ * app store. If the customer's state is only updated on commit/approve (as
55
+ * is typical when suggesting mode is on), reading from that state would
56
+ * return the snapshot value at commit time, the diff check would short-
57
+ * circuit, and no suggestion would ever fire.
58
+ *
59
+ * Recommended: read from the DOM (controlled or uncontrolled inputs) so the
60
+ * getter always returns what's visible to the user.
61
+ *
62
+ * el.registerTarget('row.123', () => ({
63
+ * qty: parseInt(qtyInput.value, 10),
64
+ * price: parseInt(priceInput.value, 10),
65
+ * }));
66
+ *
67
+ * For controlled inputs (state updates on every keystroke), reading from
68
+ * the customer state is fine: `() => myState.row123`. The contract is
69
+ * "edit-time state" — whichever source of truth has it.
70
+ */
71
+ export type TargetGetter<T = unknown> = () => T;
72
+ /**
73
+ * Returned from SuggestionElement.on(...). Calling it removes the handler.
74
+ */
75
+ export type Unsubscribe = () => void;
76
+ /**
77
+ * Details about a target edit, passed to the customer's resolver handler and
78
+ * to subscribers of `targetEditStart` / `targetEditCommit` events.
79
+ *
80
+ * `element` is the DOM element that produced the edit. It's the tagged
81
+ * descendant — or, for wrappers that nest interactive controls inside a
82
+ * tagged container, the inner element that actually fired the event. In
83
+ * either case the SDK walks up to the nearest ancestor carrying
84
+ * `data-velt-suggestion-target` to resolve `targetId`.
85
+ *
86
+ * `element` is provided for read access only — customers should not retain
87
+ * the reference past the synchronous handler call.
88
+ */
89
+ export interface TargetEditDetails<T = unknown> {
90
+ targetId: string;
91
+ oldValue: T;
92
+ newValue: T;
93
+ element: Element | null;
94
+ }
95
+ /**
96
+ * Return type of `onTargetEditCommit`. Returning a value auto-commits the
97
+ * suggestion using the (optional) overrides; returning null skips the
98
+ * auto-commit so a subscriber to `targetEditCommit` can drive it explicitly.
99
+ */
100
+ export interface TargetEditCommitResult {
101
+ /** Override the SDK's default `${targetId}: ${old} → ${new}` summary. */
102
+ summary?: string;
103
+ /** Customer metadata persisted on the resulting Suggestion. */
104
+ metadata?: Record<string, unknown>;
105
+ }
106
+ /**
107
+ * Return type of `onTargetEditStart`. Reserved for future fields; v1 has
108
+ * no behavior-bearing return values, so customers may omit a return.
109
+ *
110
+ * Roadmap: future versions may accept `{ oldValue }` here so customers can
111
+ * override the SDK's auto-snapshot with a domain-canonical value.
112
+ */
113
+ export interface TargetEditStartResult {
114
+ }
115
+ export type TargetEditStartHandler<T = unknown> = (details: TargetEditDetails<T>) => TargetEditStartResult | void | null;
116
+ export type TargetEditCommitHandler<T = unknown> = (details: TargetEditDetails<T>) => TargetEditCommitResult | null;
117
+ /**
118
+ * Config passed to `SuggestionElement.enableSuggestionMode(config?)`.
119
+ * Both callbacks are optional. If `onTargetEditCommit` is omitted, customers
120
+ * can still drive auto-commit by subscribing to the `targetEditCommit` event
121
+ * and calling the pre-bound `commitSuggestion` builder on the payload.
122
+ */
123
+ export interface EnableSuggestionModeConfig {
124
+ /**
125
+ * Invoked on focus of a tagged element, after the SDK captures the
126
+ * snapshot. v1: informational — return value is reserved for future
127
+ * use (e.g. `{ oldValue }` to override the SDK's auto-snapshot).
128
+ */
129
+ onTargetEditStart?: TargetEditStartHandler;
130
+ /**
131
+ * Invoked once per detected commit (on `change` for atomic inputs, on
132
+ * `focusout` for text-like inputs). Returning a `TargetEditCommitResult`
133
+ * auto-commits with the supplied summary/metadata; returning null defers
134
+ * to event subscribers.
135
+ */
136
+ onTargetEditCommit?: TargetEditCommitHandler;
137
+ }
138
+ /**
139
+ * SDK-managed suggestion data persisted on a CommentAnnotation.
140
+ * Present iff annotation.type === 'suggestion'.
141
+ *
142
+ * Customer code must not write to this directly — use the SuggestionElement API.
143
+ */
144
+ export interface SuggestionData {
145
+ /** Lifecycle state machine. */
146
+ status: SuggestionStatus;
147
+ /** Stable, customer-owned target identifier. */
148
+ targetId: string;
149
+ /** v1: always 'custom'. Wrappers widen later. */
150
+ targetType: SuggestionTargetType;
151
+ /** Snapshot taken at startSuggestion / focus time. Frozen via structuredClone. */
152
+ oldValue: any;
153
+ /** Value submitted via commitSuggestion. */
154
+ newValue: any;
155
+ /** Optional human-readable description for logs / notifications. */
156
+ summary: string | null;
157
+ /**
158
+ * True if the live value at approve time differed from oldValue.
159
+ * v1 records flag only; v1.1 will surface a confirmation prompt.
160
+ */
161
+ driftDetected: boolean;
162
+ /** Populated only when status === 'rejected'. */
163
+ rejectReason: string | null;
164
+ /**
165
+ * Full User snapshot of the resolver, populated when status moves to
166
+ * approved | rejected | stale | apply_failed. Snapshot rather than userId
167
+ * so customer code can render name/email/photoUrl without an extra lookup,
168
+ * and so historical suggestions retain their resolver record even if the
169
+ * user later updates their profile.
170
+ */
171
+ resolvedBy: User | null;
172
+ resolvedAt: number | null;
173
+ }
174
+ /**
175
+ * Fields shared across every Suggestion regardless of status.
176
+ * Internal — used to build the per-status discriminated types below.
177
+ */
178
+ interface SuggestionBase<T = unknown> {
179
+ /** Annotation document id (same as the underlying CommentAnnotation.annotationId). */
180
+ annotationId: string;
181
+ /** Stable, customer-owned target identifier. */
182
+ targetId: string;
183
+ /** v1: always 'custom'. */
184
+ targetType: SuggestionTargetType;
185
+ /** Snapshot taken at startSuggestion / focus time. */
186
+ oldValue: T;
187
+ /** Value submitted via commitSuggestion. */
188
+ newValue: T;
189
+ /** Optional human-readable description. */
190
+ summary: string | null;
191
+ /** Customer-defined metadata supplied via CommitSuggestionConfig.metadata. */
192
+ metadata: Record<string, any>;
193
+ /** True iff the live value at approve time differed from oldValue. */
194
+ driftDetected: boolean;
195
+ /**
196
+ * User of the suggestion's creator (sourced from annotation.from).
197
+ */
198
+ createdBy?: User;
199
+ createdAt: number;
200
+ }
201
+ /** A suggestion in the 'pending' state — newly created, no owner action yet. */
202
+ export interface PendingSuggestion<T = unknown> extends SuggestionBase<T> {
203
+ status: 'pending';
204
+ rejectReason: null;
205
+ resolvedBy: null;
206
+ resolvedAt: null;
207
+ }
208
+ /** A suggestion that has been approved (apply handler success or pending invocation). */
209
+ export interface ApprovedSuggestion<T = unknown> extends SuggestionBase<T> {
210
+ status: 'accepted' | 'apply_failed';
211
+ rejectReason: null;
212
+ resolvedBy: User;
213
+ resolvedAt: number;
214
+ }
215
+ /**
216
+ * A suggestion that has been rejected. `rejectReason` may be null when the
217
+ * rejecter dismissed without supplying a reason — matches the persisted
218
+ * `SuggestionData.rejectReason: string | null` shape.
219
+ */
220
+ export interface RejectedSuggestion<T = unknown> extends SuggestionBase<T> {
221
+ status: 'rejected';
222
+ rejectReason: string | null;
223
+ resolvedBy: User;
224
+ resolvedAt: number;
225
+ }
226
+ /** A suggestion whose target was unresolvable at approve time. */
227
+ export interface StaleSuggestion<T = unknown> extends SuggestionBase<T> {
228
+ status: 'stale';
229
+ rejectReason: null;
230
+ resolvedBy: User | null;
231
+ resolvedAt: number | null;
232
+ }
233
+ /**
234
+ * Public Suggestion — discriminated union keyed by `status`. TypeScript narrows
235
+ * field types per status (e.g. `resolvedBy: User` is non-null on approved/rejected,
236
+ * `rejectReason: string | null` on rejected since one-click reject without a reason
237
+ * is supported).
238
+ */
239
+ export type Suggestion<T = unknown> = PendingSuggestion<T> | ApprovedSuggestion<T> | RejectedSuggestion<T> | StaleSuggestion<T>;
240
+ export interface CommitSuggestionConfig<T = unknown> {
241
+ /**
242
+ * Must be registered (via data-velt-target attribute or registerTarget call)
243
+ * before commit, otherwise the suggestion is rejected with a dev-mode warning.
244
+ */
245
+ targetId: string;
246
+ /** Any JSON-serializable value. Customer's apply handler interprets it. */
247
+ newValue: T;
248
+ /** Optional human-readable string for logs and notifications. */
249
+ summary?: string;
250
+ /** Optional customer-defined metadata. Stored on Suggestion.metadata. */
251
+ metadata?: Record<string, unknown>;
252
+ }
253
+ /**
254
+ * Pre-bound builder attached to `targetEditCommit` payloads. Calling it
255
+ * commits the suggestion with the SDK's default summary/metadata, optionally
256
+ * overridden by `result`. If the customer's `onTargetEditCommit` handler
257
+ * already returned a non-null result for this edit, this builder is a no-op
258
+ * (resolves immediately) so subscribers can't double-commit.
259
+ */
260
+ export type TargetEditCommitBuilder = (result?: TargetEditCommitResult) => Promise<{
261
+ id: string;
262
+ } | null>;
263
+ export interface SuggestionGetSuggestionsFilter {
264
+ targetId?: string;
265
+ status?: SuggestionStatus | SuggestionStatus[];
266
+ }
267
+ export {};
@@ -33,6 +33,7 @@ export interface GetUserPermissionsResponse {
33
33
  folders?: {
34
34
  [folderId: string]: {
35
35
  accessRole?: UserPermissionAccessRole;
36
+ accessType?: string;
36
37
  expiresAt?: number;
37
38
  error?: string;
38
39
  errorCode?: UserPermissionAccessRoleResult;
@@ -49,6 +50,7 @@ export interface GetUserPermissionsResponse {
49
50
  documents?: {
50
51
  [documentId: string]: {
51
52
  accessRole?: UserPermissionAccessRole;
53
+ accessType?: string;
52
54
  expiresAt?: number;
53
55
  error?: string;
54
56
  errorCode?: UserPermissionAccessRoleResult;
@@ -1,4 +1,5 @@
1
1
  import { SetDocumentsContext } from "./document.data.model";
2
+ import { ResolverEndpointConfig, ResolverResponse } from "./resolver.data.model";
2
3
  import { UserContact } from "./user-contact.data.model";
3
4
  import { UserPermissionAccessRole } from "./user-resolver.data.model";
4
5
  export declare class User {
@@ -12,6 +13,8 @@ export declare class User {
12
13
  * Default: Random avatar name.
13
14
  */
14
15
  name?: string;
16
+ email_lowercase?: string;
17
+ name_lowercase?: string;
15
18
  clientUserName?: string;
16
19
  /**
17
20
  * Your user's display picture URL.
@@ -143,6 +146,51 @@ export interface VeltPermissionProvider {
143
146
  isContextEnabled?: boolean;
144
147
  revokeAccessOn?: RevokeAccessOn[];
145
148
  forceRefresh?: boolean;
149
+ /**
150
+ * LOCAL-DEV ONLY. When `true`, the SDK resolves permissions in the browser
151
+ * (via {@link endpointConfig} or {@link resolvePermissions}) and relays the
152
+ * results to the backend, instead of relying on the server-to-server
153
+ * Real-Time Permission Provider. This lets a `localhost` permission endpoint
154
+ * be reached without an ngrok/Cloudflare tunnel during development.
155
+ *
156
+ * This flag is an ergonomic switch only — it is NOT a security boundary.
157
+ * The backend independently gates browser-resolved results to dev/test API
158
+ * keys; production keys always ignore them and fall back to the server-side
159
+ * provider. MUST NOT be relied on in production.
160
+ */
161
+ dev?: boolean;
162
+ /**
163
+ * URL-based client-side resolver. When set (and {@link dev} is `true`), the
164
+ * browser POSTs `{ data: { requests } }` to `url` — byte-for-byte identical
165
+ * to what the server-side permission provider sends — and expects the same
166
+ * `{ data: PermissionResult[], success, statusCode }` response. Takes
167
+ * precedence over {@link resolvePermissions} when both are provided.
168
+ */
169
+ endpointConfig?: ResolverEndpointConfig;
170
+ /**
171
+ * Callback-based client-side resolver. When set (and {@link dev} is `true`,
172
+ * and no {@link endpointConfig} URL is provided), it is invoked with the
173
+ * same `{ data: { requests } }` envelope and may return either a bare
174
+ * `PermissionResult[]` or a `ResolverResponse<PermissionResult[]>`.
175
+ */
176
+ resolvePermissions?: (request: PermissionResolverRequest) => Promise<PermissionResult[] | ResolverResponse<PermissionResult[]>>;
177
+ /**
178
+ * Optional per-call timeout (ms) for the client-side resolver. When the
179
+ * resolver does not settle within this window the check fails closed (deny).
180
+ */
181
+ resolveTimeout?: number;
182
+ }
183
+ /**
184
+ * The request envelope handed to a client-side permission resolver
185
+ * ({@link VeltPermissionProvider.endpointConfig} URL body or
186
+ * {@link VeltPermissionProvider.resolvePermissions} callback argument). The
187
+ * shape mirrors the server-side permission provider request byte-for-byte so a
188
+ * customer's existing handler works unchanged.
189
+ */
190
+ export interface PermissionResolverRequest {
191
+ data: {
192
+ requests: PermissionQuery[];
193
+ };
146
194
  }
147
195
  export declare enum PermissionResourceType {
148
196
  FOLDER = "folder",
@@ -158,6 +206,7 @@ export interface PermissionQuery {
158
206
  source: PermissionSource;
159
207
  organizationId: string;
160
208
  context?: Context | SetDocumentsContext;
209
+ parentFolderId?: string;
161
210
  };
162
211
  }
163
212
  export interface PermissionResult {
@@ -503,6 +503,16 @@ export declare class CommentElement {
503
503
  */
504
504
  public disableReactions: () => void;
505
505
 
506
+ /**
507
+ * To enable anonymous email mentions in comments
508
+ */
509
+ public enableAnonymousEmail: () => void;
510
+
511
+ /**
512
+ * To disable anonymous email mentions in comments
513
+ */
514
+ public disableAnonymousEmail: () => void;
515
+
506
516
  /**
507
517
  * To set allowed recordings in comments
508
518
  * @param allowedRecordings "all", "none" or "audio", "video", "screen"
@@ -531,7 +541,9 @@ export declare class CommentElement {
531
541
  /**
532
542
  * To enable private mode with visibility configuration.
533
543
  * All new comments will be created with the specified visibility.
534
- * @param config PrivateModeConfig with type and optional userIds
544
+ * @param config PrivateModeConfig with type, optional userIds (restricted), and
545
+ * optional organizationId/organizationIds (organizationPrivate; merged + de-duplicated,
546
+ * defaults to the current user's organization when neither is provided)
535
547
  */
536
548
  public enablePrivateMode: (config: PrivateModeConfig) => void;
537
549
 
@@ -936,6 +948,8 @@ export declare class CommentElement {
936
948
  * To disable collapsed comment
937
949
  */
938
950
  public disableCollapsedComments: () => void;
951
+ public enableCollapsedRepliesPreview: () => void;
952
+ public disableCollapsedRepliesPreview: () => void;
939
953
 
940
954
  /**
941
955
  * To enable query params comments
@@ -1385,6 +1399,16 @@ export declare class CommentElement {
1385
1399
  */
1386
1400
  public getComposerData: (request: GetComposerDataRequest) => ComposerTextChangeEvent | null;
1387
1401
 
1402
+ /**
1403
+ * To enable pin drag
1404
+ */
1405
+ public enablePinDrag: () => void;
1406
+
1407
+ /**
1408
+ * To disable pin drag
1409
+ */
1410
+ public disablePinDrag: () => void;
1411
+
1388
1412
  constructor();
1389
1413
  /**
1390
1414
  * Subscribe to comments on the current document.
@@ -1834,6 +1858,16 @@ export declare class CommentElement {
1834
1858
  */
1835
1859
  private _disableReactions;
1836
1860
 
1861
+ /**
1862
+ * To enable anonymous email mentions in comments
1863
+ */
1864
+ private _enableAnonymousEmail;
1865
+
1866
+ /**
1867
+ * To disable anonymous email mentions in comments
1868
+ */
1869
+ private _disableAnonymousEmail;
1870
+
1837
1871
  /**
1838
1872
  * To set allowed recordings in comments
1839
1873
  * @param allowedRecordings "all", "none" or "audio", "video", "screen"
@@ -1860,7 +1894,9 @@ export declare class CommentElement {
1860
1894
  /**
1861
1895
  * To enable private mode with visibility configuration.
1862
1896
  * All new comments will be created with the specified visibility.
1863
- * @param config PrivateModeConfig with type and optional userIds
1897
+ * @param config PrivateModeConfig with type, optional userIds (restricted), and
1898
+ * optional organizationId/organizationIds (organizationPrivate; merged + de-duplicated,
1899
+ * defaults to the current user's organization when neither is provided)
1864
1900
  */
1865
1901
  private _enablePrivateMode;
1866
1902
 
@@ -2264,6 +2300,8 @@ export declare class CommentElement {
2264
2300
  * To disable collapsed comment
2265
2301
  */
2266
2302
  private _disableCollapsedComments;
2303
+ private _enableCollapsedRepliesPreview;
2304
+ private _disableCollapsedRepliesPreview;
2267
2305
 
2268
2306
  /**
2269
2307
  * To enable query params comments
@@ -2741,4 +2779,14 @@ export declare class CommentElement {
2741
2779
  * @param type 'dropdown' | 'checkbox'
2742
2780
  */
2743
2781
  private _setAssignToType;
2782
+
2783
+ /**
2784
+ * To enable pin drag
2785
+ */
2786
+ private _enablePinDrag;
2787
+
2788
+ /**
2789
+ * To disable pin drag
2790
+ */
2791
+ private _disablePinDrag;
2744
2792
  }
@@ -48,6 +48,12 @@ export declare class ContactElement {
48
48
  */
49
49
  public updateContactList: (userContacts: UserContact[], config?: { merge: boolean }) => void;
50
50
 
51
+ /**
52
+ * Update the list of organizations / teams offered by the "Selected Teams" visibility picker.
53
+ * @param config { orgList: { id: string, name?: string }[] }
54
+ */
55
+ public updateOrgList: (config: { orgList: { id: string; name?: string }[] }) => void;
56
+
51
57
  /**
52
58
  * Get contact list.
53
59
  */
@@ -96,6 +102,12 @@ export declare class ContactElement {
96
102
  */
97
103
  private _updateContactList;
98
104
 
105
+ /**
106
+ * Update the list of organizations / teams offered by the "Selected Teams" visibility picker.
107
+ * @param config { orgList: { id: string, name?: string }[] }
108
+ */
109
+ private _updateOrgList;
110
+
99
111
  /**
100
112
  * Get contact list.
101
113
  */
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
2
 
3
- import { GetNotificationsDataQuery, Notification, NotificationInitialSettingsConfig, NotificationSettingsConfig, NotificationTabConfig } from "../data/notification.model";
3
+ import { CrossOrganizationConfig, GetNotificationsDataQuery, Notification, NotificationInitialSettingsConfig, NotificationSettingsConfig, NotificationTabConfig } from "../data/notification.model";
4
4
 
5
5
  export declare class NotificationElement {
6
6
  /**
@@ -128,6 +128,16 @@ export declare class NotificationElement {
128
128
  */
129
129
  disableCurrentDocumentOnly: () => void;
130
130
 
131
+ /**
132
+ * Opt in to cross-organization "For You" notifications.
133
+ */
134
+ enableCrossOrganization: (config?: CrossOrganizationConfig | null) => void;
135
+
136
+ /**
137
+ * Opt out of cross-organization "For You" notifications.
138
+ */
139
+ disableCrossOrganization: () => void;
140
+
131
141
  constructor();
132
142
 
133
143
  /**
@@ -254,4 +264,8 @@ export declare class NotificationElement {
254
264
  * To disable current document only
255
265
  */
256
266
  private _disableCurrentDocumentOnly;
267
+
268
+ private _enableCrossOrganization;
269
+
270
+ private _disableCrossOrganization;
257
271
  }
@@ -50,6 +50,21 @@ export declare class PresenceElement {
50
50
  * Subscribe to presence events
51
51
  */
52
52
  on: <T extends keyof PresenceEventTypesMap>(action: T) => Observable<PresenceEventTypesMap[T]>;
53
+
54
+ /**
55
+ * Add a custom user to the presence list (e.g., an AI agent).
56
+ * The user will appear in presence alongside real users.
57
+ * @param request Object containing user data with at least userId required.
58
+ */
59
+ addUser: (request: { user: Partial<PresenceUser>, localOnly?: boolean }) => void;
60
+
61
+ /**
62
+ * Remove a previously added custom user from the presence list.
63
+ * @param request Object containing user data with at least userId required, and optional localOnly flag.
64
+ * @param request.localOnly If true, user is only removed locally (not removed from DB). Default: false.
65
+ */
66
+ removeUser: (request: { user: Partial<PresenceUser>, localOnly?: boolean }) => void;
67
+
53
68
  constructor();
54
69
  /**
55
70
  * Subscribe to a list of all online users who are either active or inactive on the current document.
@@ -95,4 +110,14 @@ export declare class PresenceElement {
95
110
  * Subscribe to presence events
96
111
  */
97
112
  private _on;
113
+
114
+ /**
115
+ * Add a custom user to the presence list
116
+ */
117
+ private _addUser;
118
+
119
+ /**
120
+ * Remove a custom user from the presence list
121
+ */
122
+ private _removeUser;
98
123
  }
@@ -9,6 +9,16 @@ export declare class RewriterElement {
9
9
  * To disable rewriter feature
10
10
  */
11
11
  disableRewriter: () => void;
12
+
13
+ /**
14
+ * To enable the default rewriter UI on text selection
15
+ */
16
+ enableDefaultUI: () => void;
17
+
18
+ /**
19
+ * To disable the default rewriter UI on text selection
20
+ */
21
+ disableDefaultUI: () => void;
12
22
  constructor();
13
23
 
14
24
  /**
@@ -20,4 +30,14 @@ export declare class RewriterElement {
20
30
  * To disable rewriter feature
21
31
  */
22
32
  private _disableRewriter;
33
+
34
+ /**
35
+ * To enable the default rewriter UI on text selection
36
+ */
37
+ private _enableDefaultUI;
38
+
39
+ /**
40
+ * To disable the default rewriter UI on text selection
41
+ */
42
+ private _disableDefaultUI;
23
43
  }