@univerjs-pro/exchange-client 0.2.6 → 0.2.8

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,6 +1,5 @@
1
1
  import { Disposable, Injector } from '@univerjs/core';
2
2
  import { IUIPartsService } from '@univerjs/ui';
3
-
4
3
  export declare class ExchangeClientController extends Disposable {
5
4
  private readonly _injector;
6
5
  private readonly _uiPartsService;
@@ -5,5 +5,5 @@ export { IUploadProgressService, UploadProgressService } from './services/upload
5
5
  export { UploadNotificationContainer } from './views/UploadNotificationContainer';
6
6
  export { RequestService, IRequestService } from './services/request.service';
7
7
  export { EXCHANGE_UPLOAD_FILE_SERVER_URL_KEY, EXCHANGE_IMPORT_SERVER_URL_KEY, EXCHANGE_EXPORT_SERVER_URL_KEY, EXCHANGE_GET_TASK_SERVER_URL_KEY, EXCHANGE_SIGN_URL_SERVER_URL_KEY } from './services/request.service';
8
- export { IExchangeOperateService } from './services/operate.service';
8
+ export { IExchangeOperateService, ExchangeOperateService } from './services/operate.service';
9
9
  export { UniverExchangeClientPlugin } from './plugin';
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const locale: typeof zhCN;
4
3
  export default locale;
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const locale: typeof zhCN;
4
3
  export default locale;
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const locale: typeof zhCN;
4
3
  export default locale;
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const locale: typeof zhCN;
4
3
  export default locale;
@@ -1,5 +1,4 @@
1
1
  import { Injector, LocaleService, Plugin } from '@univerjs/core';
2
-
3
2
  export declare class UniverExchangeClientPlugin extends Plugin {
4
3
  private readonly _;
5
4
  readonly _injector: Injector;
@@ -2,7 +2,6 @@ import { IDisposable, IDocumentData, IWorkbookData, Disposable } from '@univerjs
2
2
  import { IError, UniverType } from '@univerjs/protocol';
3
3
  import { Observable } from 'rxjs';
4
4
  import { RequestService } from './request.service';
5
-
6
5
  export declare enum RequestState {
7
6
  UPLOAD = 0,
8
7
  IMPORT = 1,
@@ -10,8 +9,7 @@ export declare enum RequestState {
10
9
  GET_TASK = 3,
11
10
  SIGN_URL = 4,
12
11
  GET_JSON = 5,
13
- GET_FILE = 6,
14
- BINDING = 7
12
+ GET_FILE = 6
15
13
  }
16
14
  export interface IRequestState {
17
15
  error: IError | undefined;
@@ -84,5 +82,4 @@ export declare class ExchangeService extends Disposable implements IExchangeServ
84
82
  private _upload;
85
83
  private _import;
86
84
  private _signUrl;
87
- private _binding;
88
85
  }
@@ -3,7 +3,6 @@ import { IProgressService, IMessageService } from '@univerjs/ui';
3
3
  import { UniverType } from '@univerjs/protocol';
4
4
  import { ExchangeService } from './exchange.service';
5
5
  import { UploadNotificationService } from './upload-notification.service';
6
-
7
6
  export interface IExchangeOperateService {
8
7
  interrupt(): void;
9
8
  /**
@@ -40,7 +39,7 @@ export interface IExchangeOperateService {
40
39
  * Export docx file by unitId
41
40
  * @returns
42
41
  */
43
- exportDOCXByUnitId(unitId?: string, unitName?: string, unitType?: UniverInstanceType): Promise<void>;
42
+ exportDOCXByUnitId(unitId?: string, unitName?: string, unitType?: UniverType): Promise<void>;
44
43
  /**
45
44
  * Export docx file by snapshot
46
45
  * @returns
@@ -50,7 +49,10 @@ export interface IExchangeOperateService {
50
49
  * Upload file, supports multiple types
51
50
  * @param file
52
51
  */
53
- uploadFileToUnitId(types: UniverType[]): Promise<string | undefined>;
52
+ uploadFileToUnitId(types: UniverType[]): Promise<{
53
+ unitId: string;
54
+ type: UniverType;
55
+ } | undefined>;
54
56
  /**
55
57
  * Customize the imported Unit URL format according to the needs of your own scene
56
58
  * @param getLink
@@ -69,7 +71,10 @@ export declare class ExchangeOperateService extends Disposable implements IExcha
69
71
  private _interrupted;
70
72
  constructor(_univerInstanceService: IUniverInstanceService, _messageService: IMessageService, _localeService: LocaleService, _exchangeService: ExchangeService, _uploadNotificationService: UploadNotificationService, _uploadProgressService: IProgressService, _logService: ILogService);
71
73
  interrupt(): void;
72
- uploadFileToUnitId(types: UniverType[]): Promise<string | undefined>;
74
+ uploadFileToUnitId(types: UniverType[]): Promise<{
75
+ unitId: string;
76
+ type: UniverType;
77
+ } | undefined>;
73
78
  importDOCXToUnitId(): Promise<string | undefined>;
74
79
  importDOCXToSnapshot(): Promise<void>;
75
80
  exportDOCXByUnitId(unitId?: string, unitName?: string, unitType?: UniverInstanceType): Promise<void>;
@@ -2,13 +2,11 @@ import { IConfigService, IDisposable } from '@univerjs/core';
2
2
  import { HTTPService } from '@univerjs/network';
3
3
  import { IError, UniverType } from '@univerjs/protocol';
4
4
  import { ISheetBlockJson, ISnapshotJson } from './utils/snapshot';
5
-
6
5
  export declare const EXCHANGE_UPLOAD_FILE_SERVER_URL_KEY = "EXCHANGE_UPLOAD_FILE_SERVER_URL_KEY";
7
6
  export declare const EXCHANGE_IMPORT_SERVER_URL_KEY = "EXCHANGE_IMPORT_SERVER_URL_KEY";
8
7
  export declare const EXCHANGE_EXPORT_SERVER_URL_KEY = "EXCHANGE_EXPORT_SERVER_URL_KEY";
9
8
  export declare const EXCHANGE_GET_TASK_SERVER_URL_KEY = "EXCHANGE_GET_TASK_SERVER_URL_KEY";
10
9
  export declare const EXCHANGE_SIGN_URL_SERVER_URL_KEY = "EXCHANGE_SIGN_URL_SERVER_URL_KEY";
11
- export declare const EXCHANGE_BINDING_SERVER_URL_KEY = "EXCHANGE_BINDING_SERVER_URL_KEY";
12
10
  export interface IFileUploadResponse {
13
11
  FileId: string;
14
12
  error: IError;
@@ -95,11 +93,9 @@ export declare class RequestService implements IRequestService, IDisposable {
95
93
  export(exportRequest: IExportRequest): Promise<IExportResponse | undefined>;
96
94
  getTask(taskID: string): Promise<IGetTaskResponse | undefined>;
97
95
  signUrl(fileID: string): Promise<ISignUrlResponse | undefined>;
98
- binding(unitId: string, type: UniverType): Promise<IBindingResponse | undefined>;
99
96
  private _getUploadFileURL;
100
97
  private _getImportURL;
101
98
  private _getExportURL;
102
99
  private _getTaskURL;
103
100
  private _getSignURL;
104
- private _getBindingURL;
105
101
  }
@@ -1,7 +1,6 @@
1
1
  import { Disposable, IDisposable } from '@univerjs/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { UniverType } from '@univerjs/protocol';
4
-
5
4
  export declare enum UploadNotificationState {
6
5
  UPLOADING = 0,
7
6
  SUCCESS = 1,
@@ -1,5 +1,4 @@
1
1
  import { IProgressService, ProgressService } from '@univerjs/ui';
2
-
3
2
  export declare class UploadProgressService extends ProgressService {
4
3
  }
5
4
  export declare const IUploadProgressService: import('@univerjs/core').IdentifierDecorator<IProgressService>;
@@ -1,6 +1,5 @@
1
1
  import { IWorkbookData, Nullable } from '@univerjs/core';
2
2
  import { IDocumentMeta, ISheetBlock, ISnapshot, IWorkbookMeta, IWorksheetMeta } from '@univerjs/protocol';
3
-
4
3
  export interface IWorksheetMetaJson extends Omit<IWorksheetMeta, 'originalMeta'> {
5
4
  originalMeta: string;
6
5
  }
@@ -1,5 +1,4 @@
1
1
  import { UniverType } from '@univerjs/protocol';
2
-
3
2
  export declare function downloadFileByURL(url: string, filename: string, fileExt: string): void;
4
3
  /**
5
4
  * Triggers a download of a given File object.
@@ -1,3 +1,2 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare function UploadNotificationContainer(): React.JSX.Element;
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { ILinkList } from '../../services/upload-notification.service';
3
-
4
3
  export interface ILinkListProps {
5
4
  list: ILinkList[];
6
5
  }
@@ -1,3 +1,2 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare function UploadAgain(): React.JSX.Element;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export interface IUploadButton {
4
3
  children?: React.ReactNode;
5
4
  className?: string;
@@ -1,3 +1,2 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare function UploadError(): React.JSX.Element;
@@ -1,3 +1,2 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare function UploadNotification(): false | React.JSX.Element;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export interface IUploadSuccessProps {
4
3
  count: number;
5
4
  }
@@ -1,3 +1,2 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare function Uploading(): React.JSX.Element;
@@ -1,3 +1,2 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare function UploadCancel(): React.JSX.Element;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export interface IUploadProgressProps {
4
3
  barColor: string;
5
4
  }