nb-js-client 1.0.58 → 1.0.59

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.
@@ -12,6 +12,8 @@ export declare class GatewayApiService {
12
12
  export interface QueryInitResponse {
13
13
  license?: License;
14
14
  unread_notifications?: ResponseList<UserNotification> & {
15
+ total_read: number;
16
+ total_unread: number;
15
17
  total_all: number;
16
18
  };
17
19
  extensions_apps?: ResponseList<Extension>;
@@ -0,0 +1,80 @@
1
+ import { Client } from '../classes';
2
+ import { HttpEvent, OnUploadProgress, ResponseList, SpaceElement, StorageElementContentType, StorageElementType } from '../types';
3
+ import { RequestStorageListParams } from './storage-element-api.service';
4
+ export declare class SpaceFilesApiService {
5
+ private client;
6
+ constructor(client: Client);
7
+ list(id: number, params: RequestSpaceElementListParams): Promise<ResponseList<SpaceElement>>;
8
+ get(id: number, params: {
9
+ file_id: string;
10
+ }): Promise<SpaceElement>;
11
+ create(id: number, params: RequestSpaceCreateElementParams): Promise<SpaceElement>;
12
+ replace(id: number, params: {
13
+ file_id: string;
14
+ }, data: any): Promise<SpaceElement>;
15
+ delete(id: number, params: RequestSpaceDeleteFilesParams): Promise<void>;
16
+ copy(id: number, params: RequestSpaceCopyFileParams): Promise<SpaceElement>;
17
+ download(id: number, params: RequestSpaceDownloadFileParams): Promise<Blob>;
18
+ move(id: number, params: RequestSpaceMoveFilesParams): Promise<void>;
19
+ rename(id: number, params: RequestSpaceRenameFileParams): Promise<SpaceElement>;
20
+ upload(onProgress: OnUploadProgress, id: number, file: File, params: RequestSpaceUploadParams): {
21
+ promise: Promise<HttpEvent<SpaceElement>>;
22
+ abort: () => void;
23
+ };
24
+ uploadNet(id: number, params: RequestSpaceUploadFromUrlParams): Promise<SpaceElement>;
25
+ }
26
+ export type RequestSpaceElementListParams = Pick<RequestStorageListParams, 'is_search_dir' | 'limit' | 'max_size' | 'min_size' | 'offset' | 'order_by' | 'order_direction' | 'search' | 'type'> & {
27
+ content_types?: StorageElementContentType[];
28
+ parent_id?: string;
29
+ };
30
+ export interface RequestSpaceGetFileParams {
31
+ file_id: string;
32
+ }
33
+ export interface RequestSpaceReplaceFileParams {
34
+ file_id: string;
35
+ }
36
+ export interface RequestSpaceCreateElementParams {
37
+ name: string;
38
+ type: StorageElementType;
39
+ parent_id?: string;
40
+ overwrite?: boolean;
41
+ created_by_extension?: string;
42
+ }
43
+ export interface RequestSpaceDeleteFilesParams {
44
+ file_ids: string[];
45
+ hard?: boolean;
46
+ }
47
+ export interface RequestSpaceCopyFileParams {
48
+ file_id: string;
49
+ to_parent_id?: string | null;
50
+ to_space_id?: number | null;
51
+ overwrite?: boolean;
52
+ resolve_conflict_duplicate?: boolean;
53
+ }
54
+ export interface RequestSpaceDownloadFileParams {
55
+ file_id: string;
56
+ download?: boolean;
57
+ last_used_extension?: string;
58
+ with_preview?: boolean;
59
+ }
60
+ export interface RequestSpaceMoveItem {
61
+ file_id: string;
62
+ to_parent_id?: string;
63
+ }
64
+ export interface RequestSpaceMoveFilesParams {
65
+ move_items: RequestSpaceMoveItem[];
66
+ }
67
+ export interface RequestSpaceRenameFileParams {
68
+ file_id: string;
69
+ name: string;
70
+ }
71
+ export interface RequestSpaceUploadParams {
72
+ parent_id?: string;
73
+ overwrite: boolean;
74
+ }
75
+ export interface RequestSpaceUploadFromUrlParams {
76
+ name: string;
77
+ url: string;
78
+ parent_id?: string;
79
+ overwrite?: boolean;
80
+ }
package/dist/index.d.ts CHANGED
@@ -1517,6 +1517,8 @@ declare class GatewayApiService {
1517
1517
  interface QueryInitResponse {
1518
1518
  license?: License;
1519
1519
  unread_notifications?: ResponseList<UserNotification> & {
1520
+ total_read: number;
1521
+ total_unread: number;
1520
1522
  total_all: number;
1521
1523
  };
1522
1524
  extensions_apps?: ResponseList<Extension>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nb-js-client",
3
- "version": "1.0.58",
3
+ "version": "1.0.59",
4
4
  "main": "dist/bundle.cjs.js",
5
5
  "module": "dist/bundle.esm.js",
6
6
  "files": [