nb-js-client 0.0.81 → 0.0.82

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.
@@ -15,7 +15,7 @@ export declare class StorageElementApiService {
15
15
  combineInfo({ root, rootId, path, file_version_id, }: StorageRouteData): Promise<StorageElement>;
16
16
  size(data: StorageItemSizeParams): Promise<number>;
17
17
  move(params: StorageElementPasteParams, to: StorageRoot, from: StorageRoot): Promise<void>;
18
- copy(params: StorageElementPasteParams, from: StorageRoot, to: StorageRoot): Promise<void>;
18
+ copy(params: StorageElementPasteParams, from: StorageRoot, to: StorageRoot): Promise<CopyResponse>;
19
19
  pasteFromShared(from_sharing_token: string, paths: StorageElementPaste[], from_sharing_password?: string): Promise<void>;
20
20
  create(data: CreateStorageElementParams): Promise<ResponseItem<StorageElement>>;
21
21
  delete(path: string, divide_id?: number): Promise<void>;
@@ -55,6 +55,10 @@ export interface StorageElementPasteParams {
55
55
  export type CreateStorageElementParams = Pick<StorageElement, 'created_by_extension' | 'divide_id' | 'name' | 'type' | 'path'> & {
56
56
  is_work_dir?: boolean;
57
57
  };
58
+ export interface CopyResponse {
59
+ not_copied?: StorageElement[];
60
+ rows: StorageElement[];
61
+ }
58
62
  export interface StorageItemSizeParams {
59
63
  paths: StorageItemSizePathParams[];
60
64
  is_divided?: boolean;
package/dist/index.d.ts CHANGED
@@ -1120,7 +1120,7 @@ declare class StorageElementApiService {
1120
1120
  combineInfo({ root, rootId, path, file_version_id, }: StorageRouteData): Promise<StorageElement>;
1121
1121
  size(data: StorageItemSizeParams): Promise<number>;
1122
1122
  move(params: StorageElementPasteParams, to: StorageRoot, from: StorageRoot): Promise<void>;
1123
- copy(params: StorageElementPasteParams, from: StorageRoot, to: StorageRoot): Promise<void>;
1123
+ copy(params: StorageElementPasteParams, from: StorageRoot, to: StorageRoot): Promise<CopyResponse>;
1124
1124
  pasteFromShared(from_sharing_token: string, paths: StorageElementPaste[], from_sharing_password?: string): Promise<void>;
1125
1125
  create(data: CreateStorageElementParams): Promise<ResponseItem<StorageElement>>;
1126
1126
  delete(path: string, divide_id?: number): Promise<void>;
@@ -1160,6 +1160,10 @@ interface StorageElementPasteParams {
1160
1160
  type CreateStorageElementParams = Pick<StorageElement, 'created_by_extension' | 'divide_id' | 'name' | 'type' | 'path'> & {
1161
1161
  is_work_dir?: boolean;
1162
1162
  };
1163
+ interface CopyResponse {
1164
+ not_copied?: StorageElement[];
1165
+ rows: StorageElement[];
1166
+ }
1163
1167
  interface StorageItemSizeParams {
1164
1168
  paths: StorageItemSizePathParams[];
1165
1169
  is_divided?: boolean;
@@ -1530,5 +1534,4 @@ declare function normalizeHeaders(headers: Headers | [string, string][] | Record
1530
1534
 
1531
1535
  declare function prepareRequestBody(body: unknown): XMLHttpRequestBodyInit | Document | null;
1532
1536
 
1533
- 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 };
1534
- export type { AccessToken, AuthToken, AuthTokenUpdate, AuthType, ChangeLicenseParams, Comment, CommentParams, Connection, ConnectionCreateParams, CreateCommentParams, CreateLimitationsParams, CreateStorageElementParams, CreateUserGroupParams, CreateUserParams, CreateUserRoleParams, CutLinkRequest, DeleteAllCommentParams, DeleteCommentParams, Discovery, DivideResourceParams, DivideResourceType, DivideResponseList, Extension, ExtensionDefault, ExtensionExternal, ExtensionExternalInList, ExtensionExternalListParams, ExtensionListParams, ExtensionMetaPayload, FileLocking, HistoryListRequestParams, HistoryNote, HistoryRequestParams, HttpEvent, HttpResponse, Lang, License, Limitation, LockScreen, NameExtensionListParams, NbAppState, NbClientParams, NbRequestParams, NotificationActionGroup, NotificationPayload, OnUploadProgress, PayloadFile, Permission, PermissionItem, ProgressEvent, QueryInitResponse, RequestAuthSettingsParams, RequestAuthTfaParams, RequestAuthTokenParams, RequestBaseParams, RequestConfig, RequestConnectionParams, RequestLimitationsListParams, RequestNotificationListParams, RequestStorageListParams, RequestUserDivideParams, RequestUserGroupListParams, RequestUserListParams, RequestUserRoleListParams, RequestUsersLogParams, RequestVersionsSizeParams, ResourceAccess, ResponseItem, ResponseList, ResponseListNotification, Restriction, Setting, SettingField, SettingFieldView, SettingLang, SettingValue, SettingValueField, SettingVariant, SettingViewConnectionChoose, SettingViewSelect, ShareInfo, ShareModel, SizeBySection, StorageElement, StorageElementHistory, StorageElementPaste, StorageElementPasteParams, StorageElementVersion, StorageElementVersionLock, StorageInstance, StorageItemSizeParams, StorageItemSizePathParams, StorageRouteData, StorageTrashElement, StorageTrashItem, UnionRestriction, UpdateCommentParams, UploadNetRequestParams, User, UserAppPasswordInfo, UserAppPasswords, UserDivide, UserGroup, UserInfo, UserLabel, UserNamesExtension, UserNotification, UserParams, UserPhone, UserRole, UserSession, UserToken, UsersLog, VersionLockRequestParams };
1537
+ 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 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, ExtensionFileMode, type ExtensionListParams, type ExtensionMetaPayload, 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 PayloadFile, type Permission, type PermissionItem, PermissionType, type ProgressEvent, type QueryInitResponse, QueryInitViewType, type RequestAuthSettingsParams, type RequestAuthTfaParams, type RequestAuthTokenParams, type RequestBaseParams, type RequestConfig, type RequestConnectionParams, type RequestLimitationsListParams, RequestMethod, type RequestNotificationListParams, RequestObserve, 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 StorageElement, StorageElementApiService, StorageElementCheckStatus, StorageElementContentType, type StorageElementHistory, StorageElementHistoryAction, type StorageElementPaste, type StorageElementPasteParams, StorageElementType, type StorageElementVersion, type StorageElementVersionLock, StorageFilesApiService, type StorageInstance, StorageInstanceApiService, type StorageItemSizeParams, type StorageItemSizePathParams, StorageRoot, type StorageRouteData, StorageShareApiService, StorageTrashApiService, type StorageTrashElement, type StorageTrashItem, Tariff, TokenUpdate, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nb-js-client",
3
- "version": "0.0.81",
3
+ "version": "0.0.82",
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'>;