@veltdev/sdk-dev 5.0.2-beta.36 → 5.0.2-beta.38

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.
@@ -408,6 +408,16 @@ export declare class Snippyly {
408
408
  */
409
409
  disableSafeEval: () => void;
410
410
 
411
+ /**
412
+ * Enable Firestore persistent cache for offline support.
413
+ */
414
+ enableFirestorePersistentCache: (config?: { ha?: boolean }) => void;
415
+
416
+ /**
417
+ * Disable Firestore persistent cache.
418
+ */
419
+ disableFirestorePersistentCache: (config?: { ha?: boolean }) => void;
420
+
411
421
  /**
412
422
  * To reset the button toggle map.
413
423
  */
@@ -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
+ }
@@ -115,6 +115,8 @@ export declare class ActivityRecord<TEntity = unknown, TTarget = unknown> {
115
115
  actionIcon?: string;
116
116
  /** If true, this activity cannot be updated or deleted via REST API */
117
117
  immutable?: boolean;
118
+ /** If true, this activity was stripped by the activity resolver (for UI loading states) */
119
+ isActivityResolverUsed?: boolean;
118
120
  }
119
121
  /**
120
122
  * Configuration for subscribing to activities.
@@ -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;
@@ -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
  }
@@ -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;
@@ -12,6 +12,8 @@ export declare class User {
12
12
  * Default: Random avatar name.
13
13
  */
14
14
  name?: string;
15
+ email_lowercase?: string;
16
+ name_lowercase?: string;
15
17
  clientUserName?: string;
16
18
  /**
17
19
  * Your user's display picture URL.
@@ -29,7 +29,8 @@ export declare enum ResolverActions {
29
29
  ATTACHMENT_DELETE = "attachment.delete",
30
30
  RECORDER_ANNOTATION_ADD = "recorder_annotation.add",
31
31
  RECORDER_ANNOTATION_UPDATE = "recorder_annotation.update",
32
- RECORDER_ANNOTATION_DELETE = "recorder_annotation.delete"
32
+ RECORDER_ANNOTATION_DELETE = "recorder_annotation.delete",
33
+ ACTIVITY_SAVE = "activity.save"
33
34
  }
34
35
  export declare const CommentEventTypes: {
35
36
  readonly ADD_COMMENT_ANNOTATION: "addCommentAnnotation";
@@ -94,6 +95,7 @@ export declare const CoreEventTypes: {
94
95
  readonly REACTION_RESOLVER: "reactionResolver";
95
96
  readonly RECORDER_RESOLVER: "recorderResolver";
96
97
  readonly NOTIFICATION_RESOLVER: "notificationResolver";
98
+ readonly ACTIVITY_RESOLVER: "activityResolver";
97
99
  readonly VELT_BUTTON_CLICK: "veltButtonClick";
98
100
  readonly USER_UPDATE: "userUpdate";
99
101
  readonly INIT_UPDATE: "initUpdate";
package/models.d.ts CHANGED
@@ -75,6 +75,7 @@ export * from './app/models/data/reaction-annotation.data.model';
75
75
  export * from './app/models/data/reaction-resolver.data.model';
76
76
  export * from './app/models/data/recorder-resolver.data.model';
77
77
  export * from './app/models/data/attachment-resolver.data.model';
78
+ export * from './app/models/data/activity-resolver.data.model';
78
79
  export * from './app/models/data/reaction.data.model';
79
80
  export * from './app/models/data/organization-groups.data.model';
80
81
  export * from './app/models/data/organization-metadata.model';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk-dev",
3
- "version": "5.0.2-beta.36",
3
+ "version": "5.0.2-beta.38",
4
4
  "description": "Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google docs or sheets, Recording like Loom, Huddles like Slack and much more.",
5
5
  "homepage": "https://velt.dev",
6
6
  "keywords": [