@qrvey/assets-sharing 0.3.4-dev.2221 → 0.3.5-1236-beta.1
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/dist/cjs/common/constants.js +3 -14
- package/dist/cjs/common/constants.js.map +1 -1
- package/dist/cjs/common/util.js +5 -0
- package/dist/cjs/common/util.js.map +1 -1
- package/dist/cjs/context.js +2 -0
- package/dist/cjs/context.js.map +1 -1
- package/dist/cjs/index.js +8 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/quser/implementations/group.model.js +3 -0
- package/dist/cjs/quser/implementations/group.model.js.map +1 -1
- package/dist/cjs/quser/implementations/group.repository.js +22 -1
- package/dist/cjs/quser/implementations/group.repository.js.map +1 -1
- package/dist/cjs/quser/implementations/permission.repository.js +27 -0
- package/dist/cjs/quser/implementations/permission.repository.js.map +1 -0
- package/dist/cjs/quser/interfaces/permissionsRepository.interface.js +3 -0
- package/dist/cjs/quser/interfaces/permissionsRepository.interface.js.map +1 -0
- package/dist/cjs/quser/services/fromTokenToUser.js +5 -1
- package/dist/cjs/quser/services/fromTokenToUser.js.map +1 -1
- package/dist/cjs/quser/services/hasAdminRole.js +31 -12
- package/dist/cjs/quser/services/hasAdminRole.js.map +1 -1
- package/dist/cjs/quser/services/hasSharingPermission.js +47 -0
- package/dist/cjs/quser/services/hasSharingPermission.js.map +1 -0
- package/dist/cjs/sharing/entities/details.js +13 -2
- package/dist/cjs/sharing/entities/details.js.map +1 -1
- package/dist/cjs/sharing/entities/sharing.js +0 -12
- package/dist/cjs/sharing/entities/sharing.js.map +1 -1
- package/dist/cjs/sharing/implementations/admin.repository.js +0 -17
- package/dist/cjs/sharing/implementations/admin.repository.js.map +1 -1
- package/dist/cjs/sharing/implementations/details.repository.js +13 -4
- package/dist/cjs/sharing/implementations/details.repository.js.map +1 -1
- package/dist/cjs/sharing/implementations/organization.repository.js.map +1 -1
- package/dist/cjs/sharing/services/checkAppAccess.js +5 -1
- package/dist/cjs/sharing/services/checkAppAccess.js.map +1 -1
- package/dist/cjs/sharing/services/checkOrgPermissions.js +5 -1
- package/dist/cjs/sharing/services/checkOrgPermissions.js.map +1 -1
- package/dist/cjs/sharing/services/checkUserAccessLevel.js +30 -7
- package/dist/cjs/sharing/services/checkUserAccessLevel.js.map +1 -1
- package/dist/cjs/sharing/services/delete.js +5 -1
- package/dist/cjs/sharing/services/delete.js.map +1 -1
- package/dist/cjs/sharing/services/getOrgTree.js +5 -1
- package/dist/cjs/sharing/services/getOrgTree.js.map +1 -1
- package/dist/cjs/sharing/services/list.js +5 -1
- package/dist/cjs/sharing/services/list.js.map +1 -1
- package/dist/cjs/sharing/services/upsert.js +11 -2
- package/dist/cjs/sharing/services/upsert.js.map +1 -1
- package/dist/cjs/sharing/services/upsertDefaultSharing.js +36 -16
- package/dist/cjs/sharing/services/upsertDefaultSharing.js.map +1 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/index.mjs +928 -410
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/index.d.ts +268 -62
- package/package.json +11 -8
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const ORGANIZATION_QRVEY = "org:0";
|
|
2
|
-
declare const
|
|
2
|
+
declare const USER_ANONYMOUS = "anonymous";
|
|
3
3
|
declare enum ASSET_TYPE {
|
|
4
4
|
DX = "DX",// DASHBOARD X (Next Gen)
|
|
5
5
|
DM = "DM"
|
|
@@ -12,7 +12,8 @@ declare enum SHARED_ORIGIN {
|
|
|
12
12
|
declare enum SHARE_TYPE {
|
|
13
13
|
USER = "USER",
|
|
14
14
|
ROLE = "ROLE",
|
|
15
|
-
ORGANIZATION = "ORGANIZATION"
|
|
15
|
+
ORGANIZATION = "ORGANIZATION",
|
|
16
|
+
TENANT = "TENANT"
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
19
|
* Access levels for assets.
|
|
@@ -29,17 +30,6 @@ declare enum ACCESS_LEVEL {
|
|
|
29
30
|
CAN_EDIT = 2,
|
|
30
31
|
ADMIN = 4
|
|
31
32
|
}
|
|
32
|
-
/**
|
|
33
|
-
* Sharing Mode for assets.
|
|
34
|
-
* Those are calculated with Base 2, so:
|
|
35
|
-
* - PRIVATE = 0 (undefined)
|
|
36
|
-
* - SAME_AS_APP = 1 (2^0)
|
|
37
|
-
*/
|
|
38
|
-
declare enum SHARING_MODE {
|
|
39
|
-
PRIVATE = 0,
|
|
40
|
-
SAME_AS_APP = 1,
|
|
41
|
-
SHARED = 2
|
|
42
|
-
}
|
|
43
33
|
declare enum APP_SHARING_STATUS {
|
|
44
34
|
PUBLIC = "public",
|
|
45
35
|
PRIVATE = "private",
|
|
@@ -48,6 +38,11 @@ declare enum APP_SHARING_STATUS {
|
|
|
48
38
|
interface AppAccessResponse {
|
|
49
39
|
hasAccess: boolean;
|
|
50
40
|
}
|
|
41
|
+
interface AppOwner {
|
|
42
|
+
userId: string;
|
|
43
|
+
appId: string;
|
|
44
|
+
userEmail?: string;
|
|
45
|
+
}
|
|
51
46
|
|
|
52
47
|
interface BaseSharing {
|
|
53
48
|
assetId: string;
|
|
@@ -55,16 +50,12 @@ interface BaseSharing {
|
|
|
55
50
|
createdAt: string;
|
|
56
51
|
updatedAt: string;
|
|
57
52
|
deletedAt?: string;
|
|
58
|
-
sharingMode?: SHARING_MODE | null;
|
|
59
|
-
sharingModeStatus?: boolean;
|
|
60
53
|
}
|
|
61
54
|
type CreateSharing = Omit<BaseSharing, 'createdAt' | 'updatedAt' | 'deletedAt'>;
|
|
62
55
|
type ResponseSharing = Omit<BaseSharing, 'deletedAt'>;
|
|
63
56
|
interface SharingTable {
|
|
64
57
|
asset_id: string;
|
|
65
58
|
asset_type: ASSET_TYPE | string;
|
|
66
|
-
sharing_mode: SHARING_MODE | null;
|
|
67
|
-
sharing_mode_status: boolean;
|
|
68
59
|
created_at: string;
|
|
69
60
|
updated_at: string;
|
|
70
61
|
deleted_at?: string;
|
|
@@ -76,8 +67,6 @@ declare class Sharing {
|
|
|
76
67
|
private createdAt;
|
|
77
68
|
private updatedAt;
|
|
78
69
|
private deletedAt?;
|
|
79
|
-
private sharingModeStatus;
|
|
80
|
-
private sharingMode;
|
|
81
70
|
constructor(params: BaseSharing);
|
|
82
71
|
static create(params: CreateSharing): Sharing;
|
|
83
72
|
static parse(params: SharingTable): Sharing;
|
|
@@ -85,8 +74,6 @@ declare class Sharing {
|
|
|
85
74
|
toTable(): SharingTable;
|
|
86
75
|
toPlain(): BaseSharing;
|
|
87
76
|
toJSON(): ResponseSharing;
|
|
88
|
-
set setSharingModeStatus(sharingModeStatus: boolean);
|
|
89
|
-
set setSharingMode(sharingMode: SHARING_MODE | null);
|
|
90
77
|
get getAssetId(): string;
|
|
91
78
|
get getAssetType(): string;
|
|
92
79
|
}
|
|
@@ -120,14 +107,6 @@ interface ListOutput<T> {
|
|
|
120
107
|
pagination: Pagination;
|
|
121
108
|
}
|
|
122
109
|
|
|
123
|
-
interface UserToken {
|
|
124
|
-
userId: string;
|
|
125
|
-
clientId?: string;
|
|
126
|
-
roles?: string[];
|
|
127
|
-
orgId?: string;
|
|
128
|
-
loginType?: string;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
110
|
declare enum HIERARCHY_SCOPE {
|
|
132
111
|
CHILDREN = "children",
|
|
133
112
|
PARENTS = "parents",
|
|
@@ -138,6 +117,34 @@ interface OrgHierarchyResult {
|
|
|
138
117
|
parentIds: string[];
|
|
139
118
|
}
|
|
140
119
|
|
|
120
|
+
interface SharingRepositoryInterface {
|
|
121
|
+
/**
|
|
122
|
+
* Retrieves a sharing record by its asset ID.
|
|
123
|
+
* @param assetId - The ID of the asset to retrieve.
|
|
124
|
+
* @returns A promise that resolves to the sharing record or null if not found.
|
|
125
|
+
*/
|
|
126
|
+
getOne(assetId: string): Promise<SharingTable | null>;
|
|
127
|
+
/**
|
|
128
|
+
* Creates a new sharing record.
|
|
129
|
+
* @param sharing - The sharing record to create.
|
|
130
|
+
* @returns A promise that resolves to the created sharing record.
|
|
131
|
+
*/
|
|
132
|
+
create(sharing: SharingTable): Promise<SharingTable>;
|
|
133
|
+
/**
|
|
134
|
+
* Updates a sharing record by its ID.
|
|
135
|
+
* @param assetId - The ID of the sharing record to update.
|
|
136
|
+
* @param sharing - The updated sharing record.
|
|
137
|
+
* @returns A promise that resolves to a boolean indicating whether the update was successful.
|
|
138
|
+
*/
|
|
139
|
+
patch(assetId: string, sharing: SharingTable): Promise<boolean>;
|
|
140
|
+
/**
|
|
141
|
+
* Deletes a sharing record by its ID.
|
|
142
|
+
* @param assetId - The ID of the sharing record to delete.
|
|
143
|
+
* @returns A promise that resolves to a boolean indicating whether the deletion was successful.
|
|
144
|
+
*/
|
|
145
|
+
delete(assetId: string): Promise<boolean>;
|
|
146
|
+
}
|
|
147
|
+
|
|
141
148
|
interface Delete {
|
|
142
149
|
assetId: string;
|
|
143
150
|
}
|
|
@@ -159,11 +166,104 @@ type ResponseSharingDetails = Omit<BaseSharingDetails, 'sharingDetailsId' | 'del
|
|
|
159
166
|
sharedId: string;
|
|
160
167
|
accessLevelAsText: string;
|
|
161
168
|
};
|
|
169
|
+
interface SharingDetailsTable {
|
|
170
|
+
sharing_details_id: string;
|
|
171
|
+
asset_id: string;
|
|
172
|
+
access_level: number;
|
|
173
|
+
org_id: string;
|
|
174
|
+
shared_with: string;
|
|
175
|
+
shared_type: string;
|
|
176
|
+
shared_email?: string;
|
|
177
|
+
share_origin: string;
|
|
178
|
+
created_at: string;
|
|
179
|
+
updated_at: string;
|
|
180
|
+
deleted_at?: string;
|
|
181
|
+
}
|
|
162
182
|
type GetSharingList = ListInput<{
|
|
163
183
|
assetId: string;
|
|
164
184
|
}>;
|
|
165
185
|
type ListSharingDetails = ListOutput<ResponseSharingDetails>;
|
|
166
186
|
|
|
187
|
+
interface RoleRepositoryInterface {
|
|
188
|
+
getOne(identifier: string): Promise<{
|
|
189
|
+
groupid: string;
|
|
190
|
+
} | null>;
|
|
191
|
+
getByName(name: string): Promise<{
|
|
192
|
+
groupid: string;
|
|
193
|
+
permissions: {
|
|
194
|
+
contentAdministration: boolean;
|
|
195
|
+
assetSharing: boolean;
|
|
196
|
+
};
|
|
197
|
+
} | null>;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
interface BaseUser {
|
|
201
|
+
userid: string;
|
|
202
|
+
email: string;
|
|
203
|
+
groups: string[];
|
|
204
|
+
organization: string;
|
|
205
|
+
}
|
|
206
|
+
interface UserToken {
|
|
207
|
+
userId: string;
|
|
208
|
+
clientId?: string;
|
|
209
|
+
roles?: string[];
|
|
210
|
+
orgId?: string;
|
|
211
|
+
loginType?: string;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
interface UserRepositoryInterface {
|
|
215
|
+
getOne(identifier: string): Promise<BaseUser | null>;
|
|
216
|
+
getList(options: ListInput<{
|
|
217
|
+
identifier: string;
|
|
218
|
+
role?: string;
|
|
219
|
+
}>): Promise<ListOutput<BaseUser>>;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
interface SharingDetailsRepositoryInterface {
|
|
223
|
+
/**
|
|
224
|
+
* Retrieves a single sharing detail by its ID.
|
|
225
|
+
* @param sharingDetailId - The ID of the sharing detail to retrieve.
|
|
226
|
+
* @returns A promise that resolves to the sharing detail or null if not found.
|
|
227
|
+
*/
|
|
228
|
+
getOne(sharingDetailId: string): Promise<SharingDetailsTable | null>;
|
|
229
|
+
/**
|
|
230
|
+
* Retrieves a single sharing detail by its asset ID and the user it is shared with.
|
|
231
|
+
* @param assetId - The ID of the asset.
|
|
232
|
+
* @param sharedWith - The user with whom the asset is shared.
|
|
233
|
+
* @returns A promise that resolves to the sharing detail or null if not found.
|
|
234
|
+
*/
|
|
235
|
+
getBySharedWith(assetId: string, sharedWith: string): Promise<SharingDetailsTable | null>;
|
|
236
|
+
/**
|
|
237
|
+
* Retrieves a list of sharing details based on the provided options.
|
|
238
|
+
* @param options - An object containing the asset ID to filter the sharing details.
|
|
239
|
+
* @returns A promise that resolves to an array of sharing details.
|
|
240
|
+
*/
|
|
241
|
+
getList(options: ListInput<{
|
|
242
|
+
assetId: string;
|
|
243
|
+
user?: ParamsFromTokenToUser;
|
|
244
|
+
parentOrgIds?: string[];
|
|
245
|
+
}>): Promise<ListOutput<SharingDetailsTable>>;
|
|
246
|
+
/**
|
|
247
|
+
* Creates a new sharing detail in the repository.
|
|
248
|
+
* @param details - The sharing detail to create.
|
|
249
|
+
* @returns A promise that resolves to the created sharing detail.
|
|
250
|
+
*/
|
|
251
|
+
create(details: SharingDetailsTable): Promise<SharingDetailsTable>;
|
|
252
|
+
/**
|
|
253
|
+
* Updates an existing sharing detail in the repository.
|
|
254
|
+
* @param sharingDetailId - The ID of the sharing detail to update.
|
|
255
|
+
* @param details - The updated sharing detail.
|
|
256
|
+
* @returns A promise that resolves to a boolean indicating success or failure.
|
|
257
|
+
*/
|
|
258
|
+
patch(sharingDetailId: string, details: SharingDetailsTable): Promise<boolean>;
|
|
259
|
+
/**
|
|
260
|
+
* Deletes a sharing detail from the repository.
|
|
261
|
+
* @param sharingDetailId - The ID of the sharing detail to delete.
|
|
262
|
+
* @returns A promise that resolves to a boolean indicating success or failure.
|
|
263
|
+
*/
|
|
264
|
+
delete(sharingDetailId: string): Promise<boolean>;
|
|
265
|
+
}
|
|
266
|
+
|
|
167
267
|
interface SharingWith {
|
|
168
268
|
sharedId?: string;
|
|
169
269
|
sharedWith: string;
|
|
@@ -182,6 +282,136 @@ interface UpsertInterface {
|
|
|
182
282
|
}>;
|
|
183
283
|
}
|
|
184
284
|
|
|
285
|
+
declare class FromTokenToUser {
|
|
286
|
+
private readonly userRepository;
|
|
287
|
+
constructor(userRepository: UserRepositoryInterface);
|
|
288
|
+
execute({ body, }: {
|
|
289
|
+
body: UserToken;
|
|
290
|
+
}): Promise<ParamsFromTokenToUser>;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
interface PermissionRepositoryInterface {
|
|
294
|
+
getPermission(userIdentifier: string): Promise<{
|
|
295
|
+
contentAdministration: boolean;
|
|
296
|
+
assetSharing: boolean;
|
|
297
|
+
} | null>;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* This methods must be called HasContentAdministrationPermission,
|
|
302
|
+
* but for backward compatibility, we keep the name HasAdminRole
|
|
303
|
+
*/
|
|
304
|
+
declare class HasAdminRole {
|
|
305
|
+
private readonly userRepository;
|
|
306
|
+
private readonly permissionRepository;
|
|
307
|
+
private readonly roleRepository;
|
|
308
|
+
constructor(userRepository: UserRepositoryInterface, permissionRepository: PermissionRepositoryInterface, roleRepository: RoleRepositoryInterface);
|
|
309
|
+
execute({ apiKey, clientId, orgId, userId, loginType, roles, }?: {
|
|
310
|
+
apiKey?: string;
|
|
311
|
+
clientId?: string;
|
|
312
|
+
orgId?: string;
|
|
313
|
+
userId?: string;
|
|
314
|
+
loginType?: string;
|
|
315
|
+
roles?: string[];
|
|
316
|
+
}): Promise<boolean>;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
declare class HasSharingPermission {
|
|
320
|
+
private readonly permissionRepository;
|
|
321
|
+
private readonly roleRepository;
|
|
322
|
+
constructor(permissionRepository: PermissionRepositoryInterface, roleRepository: RoleRepositoryInterface);
|
|
323
|
+
execute({ clientId, userId, roles, }?: {
|
|
324
|
+
apiKey?: string;
|
|
325
|
+
clientId?: string;
|
|
326
|
+
orgId?: string;
|
|
327
|
+
userId?: string;
|
|
328
|
+
loginType?: string;
|
|
329
|
+
roles?: string[];
|
|
330
|
+
}): Promise<boolean>;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
interface AdminRepositoryInterface {
|
|
334
|
+
getApplicationInfo(params: {
|
|
335
|
+
appId: string;
|
|
336
|
+
userId: string;
|
|
337
|
+
}): Promise<{
|
|
338
|
+
status: number;
|
|
339
|
+
data: AppOwner;
|
|
340
|
+
}>;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
declare class CheckAppAccess {
|
|
344
|
+
private readonly adminRepository;
|
|
345
|
+
constructor(adminRepository: AdminRepositoryInterface);
|
|
346
|
+
execute({ appId, userId, }: {
|
|
347
|
+
appId: string;
|
|
348
|
+
userId: string;
|
|
349
|
+
}): Promise<AppAccessResponse>;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
interface OrganizationType {
|
|
353
|
+
orgId: string;
|
|
354
|
+
name: string;
|
|
355
|
+
parent_org_id: string | null;
|
|
356
|
+
org_path: string;
|
|
357
|
+
asset_sharing: boolean;
|
|
358
|
+
effective_asset_sharing: boolean;
|
|
359
|
+
created_at: string;
|
|
360
|
+
updated_at: string;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
interface OrganizationRepositoryInterface {
|
|
364
|
+
getOne(orgId: string): Promise<OrganizationType | null>;
|
|
365
|
+
getOrgTree(orgId: string, scope: HIERARCHY_SCOPE): Promise<OrgHierarchyResult>;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
declare class CheckOrgPermissions {
|
|
369
|
+
private readonly organizationRepository;
|
|
370
|
+
constructor(organizationRepository: OrganizationRepositoryInterface);
|
|
371
|
+
execute({ orgId, }: {
|
|
372
|
+
orgId: string;
|
|
373
|
+
}): Promise<{
|
|
374
|
+
privacy: APP_SHARING_STATUS;
|
|
375
|
+
}>;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
declare class CheckUserAccessLevel {
|
|
379
|
+
private readonly detailsRepository;
|
|
380
|
+
private readonly organizationRepository;
|
|
381
|
+
constructor(detailsRepository: SharingDetailsRepositoryInterface, organizationRepository: OrganizationRepositoryInterface);
|
|
382
|
+
execute({ userId, assetId, assetOrgId, clientId, loginType, roles, orgId, }: {
|
|
383
|
+
assetId: string;
|
|
384
|
+
assetOrgId: string;
|
|
385
|
+
userId: string;
|
|
386
|
+
clientId?: string;
|
|
387
|
+
loginType?: string;
|
|
388
|
+
roles?: string[];
|
|
389
|
+
orgId?: string;
|
|
390
|
+
}): Promise<{
|
|
391
|
+
level: ACCESS_LEVEL;
|
|
392
|
+
levelAsText: string;
|
|
393
|
+
}>;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
declare class GetOrgTree {
|
|
397
|
+
private readonly organizationRepository;
|
|
398
|
+
constructor(organizationRepository: OrganizationRepositoryInterface);
|
|
399
|
+
execute(orgId: string, scope?: HIERARCHY_SCOPE): Promise<OrgHierarchyResult>;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
declare class SetDefaultSharing {
|
|
403
|
+
private readonly sharingRepository;
|
|
404
|
+
private readonly detailsRepository;
|
|
405
|
+
private readonly adminRepository;
|
|
406
|
+
constructor(sharingRepository: SharingRepositoryInterface, detailsRepository: SharingDetailsRepositoryInterface, adminRepository: AdminRepositoryInterface);
|
|
407
|
+
execute({ assetId, assetType, orgId, sharedOrigin, }: {
|
|
408
|
+
assetId: string;
|
|
409
|
+
assetType: ASSET_TYPE;
|
|
410
|
+
orgId: string;
|
|
411
|
+
sharedOrigin: SHARED_ORIGIN;
|
|
412
|
+
}): Promise<Sharing>;
|
|
413
|
+
}
|
|
414
|
+
|
|
185
415
|
declare const api: {
|
|
186
416
|
upsert: (args_0: {
|
|
187
417
|
body: UpsertInterface;
|
|
@@ -193,42 +423,18 @@ declare const api: {
|
|
|
193
423
|
body: Delete;
|
|
194
424
|
}) => Promise<boolean | null>;
|
|
195
425
|
};
|
|
196
|
-
declare const checkUserAccessLevel: (
|
|
197
|
-
assetId: string;
|
|
198
|
-
userId: string;
|
|
199
|
-
clientId?: string;
|
|
200
|
-
loginType?: string;
|
|
201
|
-
roles?: string[];
|
|
202
|
-
orgId?: string;
|
|
203
|
-
}) => Promise<{
|
|
426
|
+
declare const checkUserAccessLevel: (...args: Parameters<CheckUserAccessLevel["execute"]>) => Promise<{
|
|
204
427
|
level: ACCESS_LEVEL;
|
|
205
428
|
levelAsText: string;
|
|
206
429
|
}>;
|
|
207
|
-
declare const checkAppAccess: (
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
declare const
|
|
212
|
-
declare const
|
|
213
|
-
|
|
214
|
-
}) => Promise<ParamsFromTokenToUser>;
|
|
215
|
-
declare const hasAdminRole: (args_0?: {
|
|
216
|
-
apiKey?: string;
|
|
217
|
-
clientId?: string;
|
|
218
|
-
orgId?: string;
|
|
219
|
-
userId?: string;
|
|
220
|
-
loginType?: string;
|
|
221
|
-
} | undefined) => Promise<boolean>;
|
|
222
|
-
declare const upsertDefaultSharing: (args_0: {
|
|
223
|
-
assetId: string;
|
|
224
|
-
assetType: ASSET_TYPE;
|
|
225
|
-
sharingMode?: SHARING_MODE;
|
|
226
|
-
sharingModeStatus?: boolean;
|
|
227
|
-
}) => Promise<Sharing>;
|
|
228
|
-
declare const checkOrgPermissions: (args_0: {
|
|
229
|
-
orgId: string;
|
|
230
|
-
}) => Promise<{
|
|
430
|
+
declare const checkAppAccess: (...args: Parameters<CheckAppAccess["execute"]>) => Promise<AppAccessResponse>;
|
|
431
|
+
declare const getOrgTree: (...args: Parameters<GetOrgTree["execute"]>) => Promise<OrgHierarchyResult>;
|
|
432
|
+
declare const fromTokenToUser: (...args: Parameters<FromTokenToUser["execute"]>) => Promise<ParamsFromTokenToUser>;
|
|
433
|
+
declare const hasAdminRole: (...args: Parameters<HasAdminRole["execute"]>) => Promise<boolean>;
|
|
434
|
+
declare const hasSharingPermission: (...args: Parameters<HasSharingPermission["execute"]>) => Promise<boolean>;
|
|
435
|
+
declare const setDefaultSharing: (...args: Parameters<SetDefaultSharing["execute"]>) => Promise<Sharing>;
|
|
436
|
+
declare const checkOrgPermissions: (...args: Parameters<CheckOrgPermissions["execute"]>) => Promise<{
|
|
231
437
|
privacy: APP_SHARING_STATUS;
|
|
232
438
|
}>;
|
|
233
439
|
|
|
234
|
-
export { ACCESS_LEVEL, APP_SHARING_STATUS, ASSET_TYPE, type GetSharingList, HIERARCHY_SCOPE,
|
|
440
|
+
export { ACCESS_LEVEL, APP_SHARING_STATUS, ASSET_TYPE, type GetSharingList, HIERARCHY_SCOPE, ORGANIZATION_QRVEY, SHARED_ORIGIN, SHARE_TYPE, USER_ANONYMOUS, api, checkAppAccess, checkOrgPermissions, checkUserAccessLevel, fromTokenToUser, getOrgTree, hasAdminRole, hasSharingPermission, setDefaultSharing };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qrvey/assets-sharing",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5-1236-beta.1",
|
|
4
4
|
"types": "dist/types/index.d.ts",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -31,21 +31,24 @@
|
|
|
31
31
|
"publish-package": "yarn prepare-publish && npm publish"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@qrvey/data-persistence": "0.5.
|
|
35
|
-
"@qrvey/id-generator": "
|
|
34
|
+
"@qrvey/data-persistence": "0.5.21-1012",
|
|
35
|
+
"@qrvey/id-generator": "1.0.1",
|
|
36
36
|
"@qrvey/utils": "1.15.0-30",
|
|
37
37
|
"reflect-metadata": "0.2.2",
|
|
38
38
|
"tsyringe": "4.8.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/jest": "29.5.14",
|
|
42
|
-
"eslint": "8.
|
|
43
|
-
"eslint-import-resolver-typescript": "3.8.
|
|
42
|
+
"eslint": "8.57.1",
|
|
43
|
+
"eslint-import-resolver-typescript": "3.8.7",
|
|
44
44
|
"eslint-plugin-import": "2.31.0",
|
|
45
45
|
"jest": "29.7.0",
|
|
46
46
|
"ts-jest": "29.3.4",
|
|
47
|
-
"tsup": "8.
|
|
48
|
-
"typescript": "5.
|
|
47
|
+
"tsup": "8.5.1",
|
|
48
|
+
"typescript": "5.9.3"
|
|
49
|
+
},
|
|
50
|
+
"overrides": {
|
|
51
|
+
"esbuild": "0.28.1"
|
|
49
52
|
},
|
|
50
53
|
"keywords": [
|
|
51
54
|
"sharing",
|
|
@@ -57,4 +60,4 @@
|
|
|
57
60
|
"access": "public",
|
|
58
61
|
"registry": "https://registry.npmjs.org"
|
|
59
62
|
}
|
|
60
|
-
}
|
|
63
|
+
}
|