nb-js-client 1.0.23 → 1.0.24

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/index.d.ts CHANGED
@@ -101,6 +101,7 @@ interface StorageElementPaste {
101
101
  from_path: string;
102
102
  to_path: string;
103
103
  zip_entry_path?: string;
104
+ from_file_version_id?: string;
104
105
  }
105
106
  interface StorageElementHistory {
106
107
  user_id: number;
@@ -1675,5 +1676,4 @@ declare function normalizeHeaders(headers: Headers | [string, string][] | Record
1675
1676
 
1676
1677
  declare function prepareRequestBody(body: unknown): XMLHttpRequestBodyInit | Document | null;
1677
1678
 
1678
- export { AccessRights, AuthApiService, BASE_URL_V1, BASE_URL_V2, CONNECTIONS_PERMISSION, Client, ConnectionGroup, ConnectionType, ConnectionsApiService, DiscoveryApiService, DivideApiService, DivideMode, DivideScope, EngineType, ExtensionFileMode, ExtensionType, ExtensionsApiService, ExtensionsExternalApiService, FcaApiService, GatewayApiService, GroupApiService, LicenseApiService, LicenseError, LimitationSubType, LimitationType, LimitationsApiService, LinksApiService, LogstashApiService, NEED_TOKEN_UPDATE_ERROR, NotificationAction, NotificationApiService, NotificationEntityType, NotificationRowAction, NotificationStyle, OrderDirection, PermissionType, QueryInitViewType, RequestMethod, RequestObserve, ResponseType, Rest, RestrictionBooleanStatus, RestrictionModeKey, RestrictionSharing, RestrictionStatus, RoleApiService, SettingControlType, ShareApiService, StorageCommentApiService, StorageElementApiService, StorageElementCheckStatus, StorageElementContentType, StorageElementHistoryAction, StorageElementType, StorageFilesApiService, StorageInstanceApiService, StorageRoot, StorageShareApiService, StorageTrashApiService, Tariff, TokenUpdate, UserApiService, UserAppType, UserAuthType, UserParamsLabel, UserStatus, UserType, VersionApiService, applyInterceptors, getCookieValue, makeUrlParams, normalizeHeaders, prepareRequestBody };
1679
- export type { AccessToken, AuthToken, AuthTokenUpdate, AuthType, ChangeLicenseParams, Comment, CommentParams, Connection, ConnectionCreateParams, CopyResponse, CreateCommentParams, CreateLimitationsParams, CreateStorageElementParams, CreateUserGroupParams, CreateUserParams, CreateUserRoleParams, CreateZipRequestParams, CutLinkRequest, DeleteAllCommentParams, DeleteCommentParams, Discovery, DivideResourceParams, DivideResourceType, DivideResponseList, Extension, ExtensionDefault, ExtensionExternal, ExtensionExternalInList, ExtensionExternalListParams, ExtensionExternalReadmeParams, ExtensionListParams, ExtensionMetaPayload, ExtensionTag, ExtensionTagListParams, FileLocking, HistoryListRequestParams, HistoryNote, HistoryRequestParams, HttpEvent, HttpResponse, Lang, License, Limitation, LockScreen, NameExtensionListParams, NbAppState, NbClientParams, NbRequestParams, NotificationActionGroup, NotificationPayload, OnUploadProgress, PayloadArchive, PayloadFile, Permission, PermissionItem, ProgressEvent, QueryInitResponse, Quota, RequestAuthSettingsParams, RequestAuthTfaParams, RequestAuthTokenParams, RequestBaseParams, RequestConfig, RequestConnectionParams, RequestLimitationsListParams, RequestNotificationListParams, RequestShareLoginParams, RequestStorageListParams, RequestUserDivideParams, RequestUserGroupListParams, RequestUserListParams, RequestUserRoleListParams, RequestUsersLogParams, RequestVersionsSizeParams, ResourceAccess, ResponseItem, ResponseList, ResponseListNotification, Restriction, Setting, SettingField, SettingFieldView, SettingLang, SettingValue, SettingValueField, SettingVariant, SettingViewConnectionChoose, SettingViewSelect, ShareInfo, ShareModel, SizeBySection, StorageDivideElement, StorageElement, StorageElementFileInfo, StorageElementHistory, StorageElementPaste, StorageElementPasteParams, StorageElementVersion, StorageElementVersionLock, StorageInstance, StorageItemSizeParams, StorageItemSizePathParams, StorageRouteData, StorageSharingElement, StorageTrashElement, StorageTrashItem, TagIconExtension, UnZipRequestParams, UnionRestriction, UpdateCommentParams, UploadNetRequestParams, User, UserAppPasswordInfo, UserAppPasswords, UserDivide, UserGroup, UserInfo, UserLabel, UserNamesExtension, UserNotification, UserParams, UserPhone, UserRole, UserSession, UserToken, UsersLog, VersionLockRequestParams };
1679
+ export { AccessRights, type AccessToken, AuthApiService, type AuthToken, type AuthTokenUpdate, type AuthType, BASE_URL_V1, BASE_URL_V2, CONNECTIONS_PERMISSION, type ChangeLicenseParams, Client, type Comment, type CommentParams, type Connection, type ConnectionCreateParams, ConnectionGroup, ConnectionType, ConnectionsApiService, type CopyResponse, type CreateCommentParams, type CreateLimitationsParams, type CreateStorageElementParams, type CreateUserGroupParams, type CreateUserParams, type CreateUserRoleParams, type CreateZipRequestParams, type CutLinkRequest, type DeleteAllCommentParams, type DeleteCommentParams, type Discovery, DiscoveryApiService, DivideApiService, DivideMode, type DivideResourceParams, type DivideResourceType, type DivideResponseList, DivideScope, EngineType, type Extension, type ExtensionDefault, type ExtensionExternal, type ExtensionExternalInList, type ExtensionExternalListParams, type ExtensionExternalReadmeParams, ExtensionFileMode, type ExtensionListParams, type ExtensionMetaPayload, type ExtensionTag, type ExtensionTagListParams, ExtensionType, ExtensionsApiService, ExtensionsExternalApiService, FcaApiService, type FileLocking, GatewayApiService, GroupApiService, type HistoryListRequestParams, type HistoryNote, type HistoryRequestParams, type HttpEvent, type HttpResponse, type Lang, type License, LicenseApiService, LicenseError, type Limitation, LimitationSubType, LimitationType, LimitationsApiService, LinksApiService, type LockScreen, LogstashApiService, NEED_TOKEN_UPDATE_ERROR, type NameExtensionListParams, type NbAppState, type NbClientParams, type NbRequestParams, NotificationAction, type NotificationActionGroup, NotificationApiService, NotificationEntityType, type NotificationPayload, NotificationRowAction, NotificationStyle, type OnUploadProgress, OrderDirection, type PayloadArchive, type PayloadFile, type Permission, type PermissionItem, PermissionType, type ProgressEvent, type QueryInitResponse, QueryInitViewType, type Quota, type RequestAuthSettingsParams, type RequestAuthTfaParams, type RequestAuthTokenParams, type RequestBaseParams, type RequestConfig, type RequestConnectionParams, type RequestLimitationsListParams, RequestMethod, type RequestNotificationListParams, RequestObserve, type RequestShareLoginParams, type RequestStorageListParams, type RequestUserDivideParams, type RequestUserGroupListParams, type RequestUserListParams, type RequestUserRoleListParams, type RequestUsersLogParams, type RequestVersionsSizeParams, type ResourceAccess, type ResponseItem, type ResponseList, type ResponseListNotification, ResponseType, Rest, type Restriction, RestrictionBooleanStatus, RestrictionModeKey, RestrictionSharing, RestrictionStatus, RoleApiService, type Setting, SettingControlType, type SettingField, type SettingFieldView, type SettingLang, type SettingValue, type SettingValueField, type SettingVariant, type SettingViewConnectionChoose, type SettingViewSelect, ShareApiService, type ShareInfo, type ShareModel, type SizeBySection, StorageCommentApiService, type StorageDivideElement, type StorageElement, StorageElementApiService, StorageElementCheckStatus, StorageElementContentType, type StorageElementFileInfo, type StorageElementHistory, StorageElementHistoryAction, type StorageElementPaste, type StorageElementPasteParams, StorageElementType, type StorageElementVersion, type StorageElementVersionLock, StorageFilesApiService, type StorageInstance, StorageInstanceApiService, type StorageItemSizeParams, type StorageItemSizePathParams, StorageRoot, type StorageRouteData, StorageShareApiService, type StorageSharingElement, StorageTrashApiService, type StorageTrashElement, type StorageTrashItem, type TagIconExtension, Tariff, TokenUpdate, type UnZipRequestParams, type UnionRestriction, type UpdateCommentParams, type UploadNetRequestParams, type User, UserApiService, type UserAppPasswordInfo, type UserAppPasswords, UserAppType, UserAuthType, type UserDivide, type UserGroup, type UserInfo, type UserLabel, type UserNamesExtension, type UserNotification, type UserParams, UserParamsLabel, type UserPhone, type UserRole, type UserSession, UserStatus, type UserToken, UserType, type UsersLog, VersionApiService, type VersionLockRequestParams, applyInterceptors, getCookieValue, makeUrlParams, normalizeHeaders, prepareRequestBody };
@@ -1,4 +1,4 @@
1
- import { NotificationAction } from './notification';
1
+ import { NotificationAction } from "./notification";
2
2
  export interface ArchiveProcess<T extends ArchivePayload | ArchiveEndPayload> {
3
3
  create_date: string;
4
4
  entity_type: string;
@@ -16,7 +16,7 @@ export interface ArchiveProcess<T extends ArchivePayload | ArchiveEndPayload> {
16
16
  }
17
17
  export interface ArchivePayload {
18
18
  process_id: string;
19
- src_path: string[];
19
+ src_path: string;
20
20
  zip_name: string;
21
21
  current_file: string;
22
22
  sum_size: number;
@@ -25,8 +25,6 @@ export interface ArchivePayload {
25
25
  speed: number;
26
26
  seconds_left: number;
27
27
  dst_path?: string;
28
- divide_id?: number;
29
- dst_divide_id?: number;
30
28
  }
31
29
  export interface ArchiveEndPayload {
32
30
  process_id: string;
@@ -102,6 +102,7 @@ export interface StorageElementPaste {
102
102
  from_path: string;
103
103
  to_path: string;
104
104
  zip_entry_path?: string;
105
+ from_file_version_id?: string;
105
106
  }
106
107
  export interface StorageElementHistory {
107
108
  user_id: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nb-js-client",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "main": "dist/bundle.cjs.js",
5
5
  "module": "dist/bundle.esm.js",
6
6
  "files": [
@@ -1,17 +0,0 @@
1
- import { Client } from '../classes';
2
- import { NotificationActionGroup, NotificationRowAction, RequestNotificationListParams, ResponseListNotification } from '../types';
3
- export declare class NotificationsApiService {
4
- private client;
5
- constructor(client: Client);
6
- list(params?: RequestNotificationListParams): Promise<ResponseListNotification>;
7
- toggleStatus(ids: number[], to_status: NotificationRowAction): Promise<void>;
8
- toggleAllStatus(to_status: NotificationRowAction): Promise<void>;
9
- delete(id: number[]): Promise<void>;
10
- deleteAll(): Promise<void>;
11
- getPermission(): Promise<{
12
- enabled: boolean;
13
- }>;
14
- setPermission(permission: boolean): Promise<void>;
15
- getSubscription(): Promise<NotificationActionGroup>;
16
- setSubscription(data: NotificationActionGroup): Promise<void>;
17
- }
@@ -1,17 +0,0 @@
1
- export declare class HttpErrorResponse implements Error {
2
- readonly name: string;
3
- readonly message: string;
4
- readonly error: any | null;
5
- readonly status: number;
6
- readonly statusText: string;
7
- readonly headers: Headers | undefined;
8
- readonly url: string | undefined;
9
- readonly ok: boolean;
10
- constructor(init: {
11
- error?: any;
12
- status?: number;
13
- statusText?: string;
14
- headers?: Headers;
15
- url?: string;
16
- });
17
- }
@@ -1,24 +0,0 @@
1
- export declare enum HttpEventType {
2
- Sent = 0,
3
- UploadProgress = 1,
4
- ResponseHeader = 2,
5
- DownloadProgress = 3,
6
- Response = 4,
7
- User = 5
8
- }
9
- export declare type HttpEvent<T> = HttpResponse<T> | HttpProgressEvent;
10
- export declare class HttpResponse<T> {
11
- body: T | null;
12
- status: number;
13
- statusText: string;
14
- headers: Headers;
15
- url?: string | undefined;
16
- readonly type: HttpEventType;
17
- constructor(body: T | null, status: number, statusText: string, headers: Headers, url?: string | undefined);
18
- }
19
- export declare class HttpProgressEvent {
20
- progress: number;
21
- headers: Headers;
22
- readonly type: HttpEventType;
23
- constructor(progress: number, headers: Headers, isUpload?: boolean);
24
- }
@@ -1,14 +0,0 @@
1
- export declare class HttpResponse<T> {
2
- body: T | null;
3
- status: number;
4
- statusText: string;
5
- headers: Headers;
6
- url: string;
7
- constructor(init: {
8
- body?: T | null;
9
- status: number;
10
- statusText: string;
11
- headers: Headers;
12
- url: string;
13
- });
14
- }
@@ -1,12 +0,0 @@
1
- import { AuthApiService } from '../api';
2
- import { AuthToken } from '../types';
3
- export declare class TokenUpdate {
4
- private authApiService;
5
- private isUpdating;
6
- private tokenUpdatePromise;
7
- private tokenUpdateResolve;
8
- constructor(authApiService: AuthApiService);
9
- isTokenExpire(timestamp: number): boolean;
10
- refreshToken(authToken: AuthToken): Promise<AuthToken | null>;
11
- private waitForTokenUpdate;
12
- }
@@ -1 +0,0 @@
1
- export * from './send-request';
@@ -1,10 +0,0 @@
1
- import { NbAppState } from '../types/base';
2
- import { Interceptor } from '../types/interceptor';
3
- export declare function sendRequest(method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', path: string, options: {
4
- query?: Record<string, any>;
5
- body?: BodyInit | null;
6
- cache?: RequestCache;
7
- }, state: NbAppState, interceptors: {
8
- request: Interceptor<RequestInit>[];
9
- response: Interceptor<Response>[];
10
- }): Promise<Response>;
@@ -1,23 +0,0 @@
1
- import { RequestBaseParams } from './base';
2
- import { UserLabel } from './user';
3
- export interface Group {
4
- id: number;
5
- name: string;
6
- description: string;
7
- amount_users: number;
8
- create_date: string;
9
- owner_id: number;
10
- owner: UserLabel;
11
- update_date: string;
12
- icon: string;
13
- icon_color: string;
14
- }
15
- export interface RequestGroupListParams extends RequestBaseParams {
16
- id?: number[];
17
- name?: string;
18
- description?: string;
19
- search_field?: string;
20
- }
21
- export type CreateGroupParams = Pick<Group, 'name' | 'description'> & {
22
- users?: number[];
23
- };
@@ -1,23 +0,0 @@
1
- import { ResponseList } from './base';
2
- import { Extension, ExtensionDefault } from './extension';
3
- import { License } from './license';
4
- import { LockScreen } from './lock-screen';
5
- import { UserNotification } from './notification';
6
- import { Restriction } from './restriction';
7
- import { User } from './user';
8
- export interface QueryInit {
9
- license?: License;
10
- unread_notifications?: ResponseList<UserNotification> & {
11
- total_all: number;
12
- };
13
- extensions_apps?: ResponseList<Extension>;
14
- extensions_defaults: ResponseList<ExtensionDefault>;
15
- me?: User;
16
- cache_users: User[];
17
- lock_screen: LockScreen;
18
- restrictions?: Restriction;
19
- open_in_desktop_settings: {
20
- open_in_desktop_enabled: boolean;
21
- };
22
- inject_scripts?: string[];
23
- }
@@ -1,17 +0,0 @@
1
- import { RequestBaseParams } from './base';
2
- export interface Role {
3
- id: number;
4
- name: string;
5
- description: string;
6
- create_date: string;
7
- update_date: string;
8
- is_default: boolean;
9
- owner_id: number;
10
- grant_access_all: boolean;
11
- permissions_id?: number[];
12
- }
13
- export interface RequestRoleListParams extends RequestBaseParams {
14
- id?: number[];
15
- search_field?: string;
16
- }
17
- export type CreateRoleParams = Pick<Role, 'name' | 'description' | 'grant_access_all' | 'is_default'>;