@veltdev/types-dev 4.5.6-beta.2 → 4.5.6-beta.20
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 +4 -1
- package/app/models/data/comment-actions.data.model.d.ts +0 -4
- package/app/models/data/comment-events.data.model.d.ts +0 -5
- package/app/models/data/live-state-data.data.model.d.ts +6 -0
- package/app/models/data/resolver.data.model.d.ts +1 -0
- package/app/models/data/user.data.model.d.ts +22 -0
- package/app/models/element/comment-element.model.d.ts +2 -12
- package/app/models/element/live-state-sync-element.model.d.ts +11 -1
- package/app/utils/enums.d.ts +1 -3
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { Observable } from "rxjs";
|
|
|
3
3
|
import { Config, DisableLogsConfig } from "../models/data/config.data.model";
|
|
4
4
|
import { DocumentUser } from "../models/data/document-user.data.model";
|
|
5
5
|
import { Location } from "../models/data/location.model";
|
|
6
|
-
import { User, UserOptions, VeltAuthProvider } from "../models/data/user.data.model";
|
|
6
|
+
import { User, UserOptions, VeltAuthProvider, VeltPermissionProvider } from "../models/data/user.data.model";
|
|
7
7
|
import { CustomCss } from "../models/data/custom-css.data.model";
|
|
8
8
|
import { AreaElement } from "../models/element/area-element.model";
|
|
9
9
|
import { ArrowElement } from "../models/element/arrow-element.model";
|
|
@@ -100,6 +100,9 @@ export declare class Snippyly {
|
|
|
100
100
|
* To set the data provider.
|
|
101
101
|
*/
|
|
102
102
|
setDataProviders: (dataProvider: VeltDataProvider) => void;
|
|
103
|
+
|
|
104
|
+
setPermissionProvider: (permissionProvider: VeltPermissionProvider) => void;
|
|
105
|
+
|
|
103
106
|
/**
|
|
104
107
|
* To set the encryption provider.
|
|
105
108
|
*/
|
|
@@ -45,10 +45,6 @@ export interface AddCommentAnnotationRequest {
|
|
|
45
45
|
annotation: CommentAnnotation;
|
|
46
46
|
options?: RequestOptions;
|
|
47
47
|
}
|
|
48
|
-
export interface PublishCommentAnnotationRequest {
|
|
49
|
-
annotationId: string;
|
|
50
|
-
options?: RequestOptions;
|
|
51
|
-
}
|
|
52
48
|
export interface ApproveCommentAnnotationRequest {
|
|
53
49
|
annotationId: string;
|
|
54
50
|
options?: RequestOptions;
|
|
@@ -103,11 +103,6 @@ export interface AddCommentAnnotationEvent {
|
|
|
103
103
|
xpath: string;
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
-
export interface PublishCommentAnnotationEvent {
|
|
107
|
-
annotationId: string;
|
|
108
|
-
commentAnnotation: CommentAnnotation;
|
|
109
|
-
metadata: VeltEventMetadata;
|
|
110
|
-
}
|
|
111
106
|
export interface ApproveCommentAnnotationEvent {
|
|
112
107
|
annotationId: string;
|
|
113
108
|
commentAnnotation: CommentAnnotation;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { ResolverResponse } from "./resolver.data.model";
|
|
1
2
|
import { UserContact } from "./user-contact.data.model";
|
|
3
|
+
import { UserPermissionAccessRole } from "./user-resolver.data.model";
|
|
2
4
|
export declare class User {
|
|
3
5
|
/**
|
|
4
6
|
* Unique user identifier that you use to identify your user.
|
|
@@ -109,3 +111,23 @@ export interface VeltAuthProvider {
|
|
|
109
111
|
retryConfig?: AuthRetryConfig;
|
|
110
112
|
generateToken?: () => Promise<string>;
|
|
111
113
|
}
|
|
114
|
+
export interface VeltPermissionProvider {
|
|
115
|
+
onResourceAccessRequired: (requests: Array<PermissionQuery>) => Promise<ResolverResponse<PermissionResult[]>>;
|
|
116
|
+
retryConfig?: AuthRetryConfig;
|
|
117
|
+
forceRefresh?: boolean;
|
|
118
|
+
}
|
|
119
|
+
export interface PermissionQuery {
|
|
120
|
+
userId: string;
|
|
121
|
+
resource: {
|
|
122
|
+
id: string;
|
|
123
|
+
type: 'folder' | 'document' | 'organization';
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
export interface PermissionResult {
|
|
127
|
+
userId: string;
|
|
128
|
+
resourceId: string;
|
|
129
|
+
type: 'folder' | 'document' | 'organization';
|
|
130
|
+
accessRole?: UserPermissionAccessRole;
|
|
131
|
+
expiresAt?: number;
|
|
132
|
+
hasAccess: boolean;
|
|
133
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
3
|
import { CommentAnnotation, CommentOnElementConfig, CommentSelectionChangeData, ManualCommentAnnotationConfig, UpdateContextConfig } from "../data/comment-annotation.data.model";
|
|
4
|
-
import { AcceptCommentAnnotationEvent, AddCommentAnnotationEvent, AddCommentEvent, AddReactionEvent, ApproveCommentAnnotationEvent, CommentAddEventData, CommentEventTypesMap, CommentUpdateEventData, CopyLinkEvent, DeleteAttachmentEvent, DeleteCommentAnnotationEvent, DeleteCommentEvent, DeleteReactionEvent, DeleteRecordingEvent, GetLinkEvent, RejectCommentAnnotationEvent, ToggleReactionEvent, UpdateAccessEvent, UpdateCommentEvent, UpdatePriorityEvent, UpdateStatusEvent, GetCommentAnnotationsResponse, GetCommentAnnotationsCountResponse, FetchCommentAnnotationsResponse
|
|
4
|
+
import { AcceptCommentAnnotationEvent, AddCommentAnnotationEvent, AddCommentEvent, AddReactionEvent, ApproveCommentAnnotationEvent, CommentAddEventData, CommentEventTypesMap, CommentUpdateEventData, CopyLinkEvent, DeleteAttachmentEvent, DeleteCommentAnnotationEvent, DeleteCommentEvent, DeleteReactionEvent, DeleteRecordingEvent, GetLinkEvent, RejectCommentAnnotationEvent, ToggleReactionEvent, UpdateAccessEvent, UpdateCommentEvent, UpdatePriorityEvent, UpdateStatusEvent, GetCommentAnnotationsResponse, GetCommentAnnotationsCountResponse, FetchCommentAnnotationsResponse } from "../data/comment-events.data.model";
|
|
5
5
|
import { CustomCategory, CustomPriority, CustomStatus } from "../data/custom-filter.data.model";
|
|
6
6
|
import { CustomAnnotationDropdownData } from "../data/custom-chip-dropdown.data.model";
|
|
7
7
|
import { AutocompleteData } from "../data/autocomplete.data.model";
|
|
8
8
|
import { CommentSidebarCustomActionEventData, CommentSidebarData, CommentSidebarDataOptions } from "../data/comment-sidebar-config.model";
|
|
9
9
|
export { ReactionMap } from '../data/reaction-annotation.data.model';
|
|
10
|
-
import { AcceptCommentAnnotationRequest, AddAttachmentRequest, AddAttachmentResponse, AddCommentAnnotationRequest, AddCommentRequest, AddReactionRequest, ApproveCommentAnnotationRequest, AssignUserRequest, AssignUserEvent, CopyLinkRequest, DeleteAttachmentRequest, DeleteCommentAnnotationRequest, CommentRequestQuery, CommentRequestQuery, DeleteCommentRequest, DeleteReactionRequest, DeleteRecordingRequest, GetAttachmentRequest, GetCommentRequest, GetLinkRequest, GetRecordingRequest, RejectCommentAnnotationRequest, ResolveCommentAnnotationRequest, SubscribeCommentAnnotationRequest, UnsubscribeCommentAnnotationRequest, ToggleReactionRequest, UpdateAccessRequest, UpdateCommentRequest, UpdatePriorityRequest, UpdateStatusRequest, FetchCommentAnnotationsRequest
|
|
10
|
+
import { AcceptCommentAnnotationRequest, AddAttachmentRequest, AddAttachmentResponse, AddCommentAnnotationRequest, AddCommentRequest, AddReactionRequest, ApproveCommentAnnotationRequest, AssignUserRequest, AssignUserEvent, CopyLinkRequest, DeleteAttachmentRequest, DeleteCommentAnnotationRequest, CommentRequestQuery, CommentRequestQuery, DeleteCommentRequest, DeleteReactionRequest, DeleteRecordingRequest, GetAttachmentRequest, GetCommentRequest, GetLinkRequest, GetRecordingRequest, RejectCommentAnnotationRequest, ResolveCommentAnnotationRequest, SubscribeCommentAnnotationRequest, UnsubscribeCommentAnnotationRequest, ToggleReactionRequest, UpdateAccessRequest, UpdateCommentRequest, UpdatePriorityRequest, UpdateStatusRequest, FetchCommentAnnotationsRequest } from "../data/comment-actions.data.model";
|
|
11
11
|
import { UnreadCommentsCount, TransformContext } from "../data/comment-utils.data.model";
|
|
12
12
|
import { CommentSidebarSystemFiltersOperator, SidebarButtonCountType } from "../../utils/enums";
|
|
13
13
|
import { UploadFileData } from "../data/attachment.model";
|
|
@@ -954,11 +954,6 @@ export declare class CommentElement {
|
|
|
954
954
|
*/
|
|
955
955
|
public addCommentAnnotation: (request: AddCommentAnnotationRequest) => Promise<AddCommentAnnotationEvent | null>;
|
|
956
956
|
|
|
957
|
-
/**
|
|
958
|
-
* To publish comment annotation
|
|
959
|
-
*/
|
|
960
|
-
public publishCommentAnnotation: (request: PublishCommentAnnotationRequest) => Promise<PublishCommentAnnotationEvent | null>;
|
|
961
|
-
|
|
962
957
|
/**
|
|
963
958
|
* To approve comment annotation
|
|
964
959
|
*/
|
|
@@ -2182,11 +2177,6 @@ export declare class CommentElement {
|
|
|
2182
2177
|
*/
|
|
2183
2178
|
private _addCommentAnnotation;
|
|
2184
2179
|
|
|
2185
|
-
/**
|
|
2186
|
-
* To publish comment annotation
|
|
2187
|
-
*/
|
|
2188
|
-
private _publishCommentAnnotation;
|
|
2189
|
-
|
|
2190
2180
|
/**
|
|
2191
2181
|
* To approve comment annotation
|
|
2192
2182
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import { ServerConnectionState } from '../../utils/enums';
|
|
3
|
-
import { EditorAccessTimer, LiveStateDataConfig, LiveStateSingleEditorExternalUserPresence, SetLiveStateDataConfig, SetUserAsEditorResponse, SingleEditorConfig, UserEditorAccess } from '../data/live-state-data.data.model';
|
|
3
|
+
import { EditorAccessTimer, FetchLiveStateDataRequest, LiveStateDataConfig, LiveStateSingleEditorExternalUserPresence, SetLiveStateDataConfig, SetUserAsEditorResponse, SingleEditorConfig, UserEditorAccess } from '../data/live-state-data.data.model';
|
|
4
4
|
import { LiveStateEventTypesMap } from '../data/live-state-events.data.model';
|
|
5
5
|
import { User } from '../data/user.data.model';
|
|
6
6
|
|
|
@@ -20,6 +20,11 @@ export declare class LiveStateSyncElement {
|
|
|
20
20
|
*/
|
|
21
21
|
getLiveStateData$: <T = unknown>(liveStateDataId?: string, liveStateDataConfig?: LiveStateDataConfig) => Observable<T>;
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Fetches live state data.
|
|
25
|
+
*/
|
|
26
|
+
fetchLiveStateData: <T = unknown>(request?: FetchLiveStateDataRequest) => Promise<T>;
|
|
27
|
+
|
|
23
28
|
/**
|
|
24
29
|
* Sets live state data for the provided ID and data.
|
|
25
30
|
*/
|
|
@@ -178,6 +183,11 @@ export declare class LiveStateSyncElement {
|
|
|
178
183
|
*/
|
|
179
184
|
private _getLiveStateData$;
|
|
180
185
|
|
|
186
|
+
/**
|
|
187
|
+
* Private method for fetching live state data.
|
|
188
|
+
*/
|
|
189
|
+
private _fetchLiveStateData;
|
|
190
|
+
|
|
181
191
|
/**
|
|
182
192
|
* Private method for setting live state data.
|
|
183
193
|
*/
|
package/app/utils/enums.d.ts
CHANGED
|
@@ -14,8 +14,7 @@ export declare enum CommentStatus {
|
|
|
14
14
|
REACTION_ADDED = "reactionAdded",
|
|
15
15
|
REACTION_DELETED = "reactionDeleted",
|
|
16
16
|
SUBSCRIBED = "subscribed",
|
|
17
|
-
UNSUBSCRIBED = "unsubscribed"
|
|
18
|
-
PUBLISHED = "published"
|
|
17
|
+
UNSUBSCRIBED = "unsubscribed"
|
|
19
18
|
}
|
|
20
19
|
export declare enum ResolverActions {
|
|
21
20
|
COMMENT_ANNOTATION_ADD = "comment_annotation.add",
|
|
@@ -30,7 +29,6 @@ export declare enum ResolverActions {
|
|
|
30
29
|
}
|
|
31
30
|
export declare const CommentEventTypes: {
|
|
32
31
|
readonly ADD_COMMENT_ANNOTATION: "addCommentAnnotation";
|
|
33
|
-
readonly PUBLISH_COMMENT_ANNOTATION: "publishCommentAnnotation";
|
|
34
32
|
readonly DELETE_COMMENT_ANNOTATION: "deleteCommentAnnotation";
|
|
35
33
|
readonly APPROVE_COMMENT_ANNOTATION: "approveCommentAnnotation";
|
|
36
34
|
readonly ACCEPT_COMMENT_ANNOTATION: "acceptCommentAnnotation";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/types-dev",
|
|
3
|
-
"version": "4.5.6-beta.
|
|
3
|
+
"version": "4.5.6-beta.20",
|
|
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": [
|