@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.
- package/lib/cjs/index.js +2 -2
- package/lib/es/index.js +2 -2
- package/lib/types/controllers/exchange.controller.d.ts +0 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/locale/en-US.d.ts +0 -1
- package/lib/types/locale/ru-RU.d.ts +0 -1
- package/lib/types/locale/vi-VN.d.ts +0 -1
- package/lib/types/locale/zh-TW.d.ts +0 -1
- package/lib/types/plugin.d.ts +0 -1
- package/lib/types/services/exchange.service.d.ts +1 -4
- package/lib/types/services/operate.service.d.ts +9 -4
- package/lib/types/services/request.service.d.ts +0 -4
- package/lib/types/services/upload-notification.service.d.ts +0 -1
- package/lib/types/services/upload-progress.service.d.ts +0 -1
- package/lib/types/services/utils/snapshot.d.ts +0 -1
- package/lib/types/services/utils/tool.d.ts +0 -1
- package/lib/types/views/UploadNotificationContainer.d.ts +0 -1
- package/lib/types/views/link-list/LinkList.d.ts +0 -1
- package/lib/types/views/upload-again/UploadAgain.d.ts +0 -1
- package/lib/types/views/upload-button/UploadButton.d.ts +0 -1
- package/lib/types/views/upload-error/UploadError.d.ts +0 -1
- package/lib/types/views/upload-notification/UploadNotification.d.ts +0 -1
- package/lib/types/views/upload-success/UploadSuccess.d.ts +0 -1
- package/lib/types/views/uploading/Uploading.d.ts +0 -1
- package/lib/types/views/uploading/upload-cancel/UploadCancel.d.ts +0 -1
- package/lib/types/views/uploading/upload-progress/UploadProgress.d.ts +0 -1
- package/lib/umd/index.js +2 -2
- package/package.json +12 -12
package/lib/types/index.d.ts
CHANGED
@@ -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';
|
package/lib/types/plugin.d.ts
CHANGED
@@ -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?:
|
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<
|
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<
|
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,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
|
}
|