@veltdev/sdk 4.5.8-beta.2 → 4.5.8-beta.4
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.
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { DocumentMetadata } from "./document-metadata.model";
|
|
2
|
-
import { Context } from "./user.data.model";
|
|
3
2
|
export interface Document {
|
|
4
3
|
id: string;
|
|
5
4
|
metadata?: DocumentMetadata;
|
|
6
5
|
}
|
|
6
|
+
export interface SetDocumentsContext {
|
|
7
|
+
access: {
|
|
8
|
+
[key: string]: Array<string | number>;
|
|
9
|
+
};
|
|
10
|
+
accessFields?: Array<string>;
|
|
11
|
+
}
|
|
7
12
|
export interface SetDocumentsRequestOptions {
|
|
8
13
|
organizationId?: string;
|
|
9
14
|
folderId?: string;
|
|
10
15
|
allDocuments?: boolean;
|
|
11
16
|
locationId?: string;
|
|
12
17
|
rootDocumentId?: string;
|
|
13
|
-
context?:
|
|
18
|
+
context?: SetDocumentsContext;
|
|
14
19
|
}
|
|
15
20
|
export interface UpdateDocumentsRequest<T = unknown> {
|
|
16
21
|
organizationId?: string;
|
|
@@ -106,14 +106,13 @@ export interface AuthRetryConfig {
|
|
|
106
106
|
}
|
|
107
107
|
export interface Context {
|
|
108
108
|
access: {
|
|
109
|
-
[key: string]:
|
|
109
|
+
[key: string]: string | number;
|
|
110
110
|
};
|
|
111
111
|
accessFields?: Array<string>;
|
|
112
112
|
}
|
|
113
113
|
export interface VeltAuthProvider {
|
|
114
114
|
user: User;
|
|
115
115
|
options?: Options;
|
|
116
|
-
context?: Context;
|
|
117
116
|
retryConfig?: AuthRetryConfig;
|
|
118
117
|
generateToken?: () => Promise<string>;
|
|
119
118
|
}
|
|
@@ -133,24 +132,31 @@ export interface RevokeAccessOn {
|
|
|
133
132
|
}
|
|
134
133
|
export interface VeltPermissionProvider {
|
|
135
134
|
retryConfig?: AuthRetryConfig;
|
|
136
|
-
|
|
135
|
+
isContextEnabled?: boolean;
|
|
137
136
|
revokeAccessOn?: RevokeAccessOn[];
|
|
138
137
|
forceRefresh?: boolean;
|
|
139
138
|
}
|
|
139
|
+
export declare enum PermissionResourceType {
|
|
140
|
+
FOLDER = "folder",
|
|
141
|
+
DOCUMENT = "document",
|
|
142
|
+
ORGANIZATION = "organization",
|
|
143
|
+
CONTEXT = "context"
|
|
144
|
+
}
|
|
140
145
|
export interface PermissionQuery {
|
|
141
146
|
userId: string;
|
|
142
147
|
resource: {
|
|
143
148
|
id: string;
|
|
144
|
-
type:
|
|
149
|
+
type: PermissionResourceType;
|
|
145
150
|
source: PermissionSource;
|
|
146
151
|
organizationId: string;
|
|
152
|
+
context?: Context;
|
|
147
153
|
};
|
|
148
154
|
}
|
|
149
155
|
export interface PermissionResult {
|
|
150
156
|
userId: string;
|
|
151
157
|
resourceId: string;
|
|
152
158
|
organizationId: string;
|
|
153
|
-
type:
|
|
159
|
+
type: PermissionResourceType;
|
|
154
160
|
accessRole?: UserPermissionAccessRole;
|
|
155
161
|
expiresAt?: number;
|
|
156
162
|
hasAccess: boolean;
|
|
@@ -562,7 +562,7 @@ export declare class CommentElement {
|
|
|
562
562
|
* To select comment by annotation id
|
|
563
563
|
* @param annotationId Comment annotation id
|
|
564
564
|
*/
|
|
565
|
-
public selectCommentByAnnotationId: (annotationId
|
|
565
|
+
public selectCommentByAnnotationId: (annotationId?: string) => void;
|
|
566
566
|
|
|
567
567
|
/**
|
|
568
568
|
* To enable showing recording summary in comments
|
package/app/utils/constants.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export declare class Constants {
|
|
|
9
9
|
static NO_ORGANIZATION_ID: string;
|
|
10
10
|
static DEFAULT_QUERY_HASH: string;
|
|
11
11
|
static LISTENER_BATCH_SIZE: number;
|
|
12
|
+
static LISTENER_CONTEXT_BATCH_SIZE: number;
|
|
13
|
+
static DEFAULT_VELT_CONTEXT: string;
|
|
12
14
|
static FIREBASE_PARTIAL_PATH_ORGANIZATIONS: string;
|
|
13
15
|
static FIREBASE_PARTIAL_PATH_FOLDERS: string;
|
|
14
16
|
static FIREBASE_PARTIAL_PATH_DOCS: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/sdk",
|
|
3
|
-
"version": "4.5.8-beta.
|
|
3
|
+
"version": "4.5.8-beta.4",
|
|
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": [
|