@univerjs/protocol 0.1.49 → 0.21.0
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/README.md +1 -3
- package/lib/cjs/index.js +463 -1
- package/lib/es/index.js +446 -36
- package/lib/index.js +447 -0
- package/lib/types/index.d.ts +41 -38
- package/lib/types/other/sheet-block.d.ts +27 -0
- package/lib/types/ts/univer/changeset.d.ts +20 -6
- package/lib/types/ts/univer/colla-msg.d.ts +176 -0
- package/lib/types/ts/univer/constants/errors.d.ts +33 -19
- package/lib/types/ts/univer/constants/univer.d.ts +15 -1
- package/lib/types/ts/univer/doc.d.ts +18 -4
- package/lib/types/ts/univer/drawing.d.ts +16 -2
- package/lib/types/ts/univer/initial-sheet.d.ts +46 -0
- package/lib/types/ts/univer/permission.d.ts +19 -5
- package/lib/types/ts/univer/range.d.ts +16 -2
- package/lib/types/ts/univer/resource.d.ts +16 -2
- package/lib/types/ts/univer/snapshot.d.ts +23 -9
- package/lib/types/ts/univer/unit-template.d.ts +23 -0
- package/lib/types/ts/univer/univer-file.d.ts +27 -0
- package/lib/types/ts/univer/workbook.d.ts +30 -53
- package/lib/types/ts/univercloud/stats/v1/stats.d.ts +34 -0
- package/lib/types/ts/univerpro/v1/apply.d.ts +129 -0
- package/lib/types/ts/univerpro/v1/helper.d.ts +36 -0
- package/lib/types/ts/univerpro/v1/ssc.d.ts +72 -0
- package/lib/types/ts/univerpro/v1/ssr.d.ts +28 -0
- package/lib/types/ts/universer/v1/access-key.d.ts +51 -0
- package/lib/types/ts/universer/v1/authz.d.ts +102 -87
- package/lib/types/ts/universer/v1/comb.d.ts +40 -61
- package/lib/types/ts/universer/v1/comment.d.ts +45 -49
- package/lib/types/ts/universer/v1/file.d.ts +57 -42
- package/lib/types/ts/universer/v1/history.d.ts +52 -49
- package/lib/types/ts/universer/v1/license.d.ts +54 -39
- package/lib/types/ts/universer/v1/snapshot.d.ts +146 -143
- package/lib/types/ts/universer/v1/user.d.ts +28 -275
- package/lib/types/utils.d.ts +17 -2
- package/lib/umd/index.js +1 -1
- package/package.json +33 -11
- package/lib/types/ts/univer/colla_msg.d.ts +0 -178
- package/lib/types/ts/univer/constants/biz.d.ts +0 -17
- package/lib/types/ts/univer/event_sync.d.ts +0 -10
- package/lib/types/ts/univer/initial_sheet.d.ts +0 -31
- package/lib/types/ts/univer/unit_template.d.ts +0 -9
- package/lib/types/ts/univer/univer_file.d.ts +0 -33
- package/lib/types/ts/universer/v1/access_key.d.ts +0 -36
- package/lib/types/ts/universer/v1/access_key_logs.d.ts +0 -43
- package/lib/types/ts/universer/v1/activity.d.ts +0 -22
- package/lib/types/ts/universer/v1/analyse_cmn.d.ts +0 -27
- package/lib/types/ts/universer/v1/analyse_data_source.d.ts +0 -86
- package/lib/types/ts/universer/v1/analyse_task.d.ts +0 -232
- package/lib/types/ts/universer/v1/clipsheet_task.d.ts +0 -72
- package/lib/types/ts/universer/v1/conf.d.ts +0 -570
- package/lib/types/ts/universer/v1/connector.d.ts +0 -74
- package/lib/types/ts/universer/v1/conversation.d.ts +0 -578
- package/lib/types/ts/universer/v1/email.d.ts +0 -28
- package/lib/types/ts/universer/v1/entitlement.d.ts +0 -663
- package/lib/types/ts/universer/v1/exchange.d.ts +0 -101
- package/lib/types/ts/universer/v1/feedback.d.ts +0 -71
- package/lib/types/ts/universer/v1/frontend_logs.d.ts +0 -36
- package/lib/types/ts/universer/v1/go_config_center.d.ts +0 -91
- package/lib/types/ts/universer/v1/inbox.d.ts +0 -59
- package/lib/types/ts/universer/v1/invite_code.d.ts +0 -47
- package/lib/types/ts/universer/v1/license_manage.d.ts +0 -157
- package/lib/types/ts/universer/v1/oauth2.d.ts +0 -24
- package/lib/types/ts/universer/v1/oidc.d.ts +0 -167
- package/lib/types/ts/universer/v1/redemption_code.d.ts +0 -32
- package/lib/types/ts/universer/v1/referral.d.ts +0 -55
- package/lib/types/ts/universer/v1/scraper.d.ts +0 -144
- package/lib/types/ts/universer/v1/source_connector/api.d.ts +0 -110
- package/lib/types/ts/universer/v1/source_connector/conf.d.ts +0 -29
- package/lib/types/ts/universer/v1/source_connector/displayer.d.ts +0 -16
- package/lib/types/ts/universer/v1/source_connector/source.d.ts +0 -46
- package/lib/types/ts/universer/v1/source_connector/stream_view.d.ts +0 -31
- package/lib/types/ts/universer/v1/survey.d.ts +0 -25
- package/lib/types/ts/universer/v1/template.d.ts +0 -48
- package/lib/types/ts/universer/v1/toolkit.d.ts +0 -23
- package/lib/types/ts/universer/v1/trigger.d.ts +0 -102
- package/lib/types/ts/universer/v1/uniscript.d.ts +0 -104
- package/lib/types/ts/universer/v1/uniscript_logs.d.ts +0 -157
- package/lib/types/ts/universer/v1/univer_go_template.d.ts +0 -65
- package/lib/types/ts/universer/v1/user_event.d.ts +0 -23
- package/lib/types/ts/universer/v1/user_settings.d.ts +0 -22
- package/lib/types/ts/universer/v1/usip.d.ts +0 -62
- package/lib/types/ts/universer/v1/video_task.d.ts +0 -196
- package/lib/types/ts/universer/v1/workspace.d.ts +0 -273
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IChangeset } from './changeset';
|
|
17
|
+
import type { IUnitPermissionStrategy, IUser, ObjectScope, UnitRole, UnitShareScope } from './permission';
|
|
18
|
+
export interface ICollaMsg {
|
|
19
|
+
eventID: string;
|
|
20
|
+
joinEvent?: ICollaMsgJoin | undefined;
|
|
21
|
+
leaveEvent?: ICollaMsgLeave | undefined;
|
|
22
|
+
newCsEvent?: INewChangesets | undefined;
|
|
23
|
+
csAckEvent?: IChangesetAck | undefined;
|
|
24
|
+
csRejEvent?: IChangesetRej | undefined;
|
|
25
|
+
updateCursorEvent?: IUpdateCursor | undefined;
|
|
26
|
+
liveShareRequestHost?: ILiveShareRequestHost | undefined;
|
|
27
|
+
liveShareNewHost?: ILiveShareNewHost | undefined;
|
|
28
|
+
liveShareOperation?: ILiveShareOperation | undefined;
|
|
29
|
+
liveShareTerminate?: ILiveShareTerminate | undefined;
|
|
30
|
+
errorEvent?: ICollaMsgErrorEvent | undefined;
|
|
31
|
+
permissionRejEvent?: IPermissionRej | undefined;
|
|
32
|
+
/** eventID: "should_close_conn" */
|
|
33
|
+
shouldCloseConn?: IShouldCloseConn | undefined;
|
|
34
|
+
commentUpdateEvent?: ICommentUpdate | undefined;
|
|
35
|
+
/** envntID: "update_collaborator" */
|
|
36
|
+
updateCollaboratorEvent?: IUpdateCollaborator | undefined;
|
|
37
|
+
/** eventID: "update_permission_obj" */
|
|
38
|
+
updatePermissionObjEvent?: IUpdatePermissionObj | undefined;
|
|
39
|
+
/** eventID: "changeset_should_retry" */
|
|
40
|
+
csShouldRetryEvent?: IChangesetShouldRetry | undefined;
|
|
41
|
+
/** eventID: "uniscript.run" */
|
|
42
|
+
uniscriptRunEvent?: IUniscriptRun | undefined;
|
|
43
|
+
}
|
|
44
|
+
export interface ICollaMsgJoin {
|
|
45
|
+
memberID: string;
|
|
46
|
+
name: string;
|
|
47
|
+
avatar: string;
|
|
48
|
+
}
|
|
49
|
+
export interface ICollaMsgLeave {
|
|
50
|
+
memberID: string;
|
|
51
|
+
name: string;
|
|
52
|
+
}
|
|
53
|
+
interface INewChangesets {
|
|
54
|
+
cs: IChangeset | undefined;
|
|
55
|
+
}
|
|
56
|
+
interface IChangesetAck {
|
|
57
|
+
cs: IChangeset | undefined;
|
|
58
|
+
}
|
|
59
|
+
interface IChangesetRej {
|
|
60
|
+
cs: IChangeset | undefined;
|
|
61
|
+
}
|
|
62
|
+
interface IChangesetShouldRetry {
|
|
63
|
+
cs: IChangeset | undefined;
|
|
64
|
+
}
|
|
65
|
+
export interface IUpdateCursor {
|
|
66
|
+
unitID: string;
|
|
67
|
+
/**
|
|
68
|
+
* IMember ID of the user in the collaboration session.
|
|
69
|
+
* If a user open a document multi times, there will be different memberIDs.
|
|
70
|
+
*/
|
|
71
|
+
memberID: string;
|
|
72
|
+
selection: string;
|
|
73
|
+
}
|
|
74
|
+
export interface ILiveShareRequestHost {
|
|
75
|
+
unitID: string;
|
|
76
|
+
userID: string;
|
|
77
|
+
}
|
|
78
|
+
export interface ILiveShareNewHost {
|
|
79
|
+
presenter: string;
|
|
80
|
+
unitID: string;
|
|
81
|
+
userID: string;
|
|
82
|
+
}
|
|
83
|
+
export interface ILiveShareOperation {
|
|
84
|
+
unitID: string;
|
|
85
|
+
presenter: string;
|
|
86
|
+
/** key is Operation.id */
|
|
87
|
+
operations: {
|
|
88
|
+
[key: string]: ILiveShareOperationOperation;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
export interface ILiveShareOperationOperation {
|
|
92
|
+
id: string;
|
|
93
|
+
params?: string | undefined;
|
|
94
|
+
}
|
|
95
|
+
export interface ILiveShareTerminate {
|
|
96
|
+
unitID: string;
|
|
97
|
+
}
|
|
98
|
+
/** define msg for errors */
|
|
99
|
+
export interface ICollaMsgErrorEvent {
|
|
100
|
+
code: number;
|
|
101
|
+
reason: string;
|
|
102
|
+
}
|
|
103
|
+
interface IPermissionRej {
|
|
104
|
+
cs: IChangeset | undefined;
|
|
105
|
+
}
|
|
106
|
+
export interface ICommentUpdate {
|
|
107
|
+
memberId: string;
|
|
108
|
+
userId: string;
|
|
109
|
+
unitId: string;
|
|
110
|
+
threadId: string;
|
|
111
|
+
type: CommentUpdateEventType;
|
|
112
|
+
replyId?: string | undefined;
|
|
113
|
+
/** Set when solve or reopen Otherwise, it will be null */
|
|
114
|
+
solved?: CommentSolvedStatus | undefined;
|
|
115
|
+
/** Set when edit or new comment reply. Otherwise, it will be null */
|
|
116
|
+
content?: string | undefined;
|
|
117
|
+
/** Set true when Create or Edit comment. Otherwise, it will be null */
|
|
118
|
+
createTimestamp?: string | undefined;
|
|
119
|
+
user?: IUser | undefined;
|
|
120
|
+
}
|
|
121
|
+
export declare enum CommentSolvedStatus {
|
|
122
|
+
OpenOrReOpen = 0,
|
|
123
|
+
Solved = 1,
|
|
124
|
+
UNRECOGNIZED = -1
|
|
125
|
+
}
|
|
126
|
+
export declare enum CommentUpdateEventType {
|
|
127
|
+
Unknown = 0,
|
|
128
|
+
Add = 1,
|
|
129
|
+
Reply = 2,
|
|
130
|
+
Edit = 3,
|
|
131
|
+
Delete = 4,
|
|
132
|
+
Solve = 5,
|
|
133
|
+
UNRECOGNIZED = -1
|
|
134
|
+
}
|
|
135
|
+
export interface IShouldCloseConn {
|
|
136
|
+
/** enum, ["logout", "roleChange"] */
|
|
137
|
+
reason: string;
|
|
138
|
+
}
|
|
139
|
+
interface IUpdateCollaborator {
|
|
140
|
+
role: UnitRole;
|
|
141
|
+
/** enum, ["update", "delete"] */
|
|
142
|
+
operation: string;
|
|
143
|
+
userId: string;
|
|
144
|
+
}
|
|
145
|
+
export interface IUpdatePermissionObj {
|
|
146
|
+
objectId: string;
|
|
147
|
+
strategies: IUnitPermissionStrategy[];
|
|
148
|
+
share: IUpdatePermissionObjShare | undefined;
|
|
149
|
+
scope: IUpdatePermissionObjScope | undefined;
|
|
150
|
+
}
|
|
151
|
+
interface IUpdatePermissionObjShare {
|
|
152
|
+
scope: UnitShareScope;
|
|
153
|
+
role: UnitRole;
|
|
154
|
+
}
|
|
155
|
+
interface IUpdatePermissionObjScope {
|
|
156
|
+
edit: ObjectScope;
|
|
157
|
+
read: ObjectScope;
|
|
158
|
+
}
|
|
159
|
+
export interface IUniscriptRun {
|
|
160
|
+
/** name of uniscript */
|
|
161
|
+
name: string;
|
|
162
|
+
/** content of uniscirpt */
|
|
163
|
+
script: string;
|
|
164
|
+
/** id of uniscript */
|
|
165
|
+
scriptId: string;
|
|
166
|
+
function: string;
|
|
167
|
+
/**
|
|
168
|
+
* argsOfFunction is a json string, it should be a list of arguments
|
|
169
|
+
* e.g. '[123, "hello", true, {"a": 1, "b": 2}]'
|
|
170
|
+
*/
|
|
171
|
+
argsOfFunction?: string | undefined;
|
|
172
|
+
/** executionId for script logs record. */
|
|
173
|
+
executionId: string;
|
|
174
|
+
compiledScript: string;
|
|
175
|
+
}
|
|
176
|
+
export {};
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
2
16
|
export declare enum ErrorCode {
|
|
3
17
|
/** UNDEFINED - general codes */
|
|
4
18
|
UNDEFINED = 0,
|
|
@@ -77,47 +91,47 @@ export declare enum ErrorCode {
|
|
|
77
91
|
EMAIL_HAS_BEEN_BOUND = 13003,
|
|
78
92
|
/** ENTITLE_CAN_NOT_BUY_LOWER_OTP - entitlement domain errors */
|
|
79
93
|
ENTITLE_CAN_NOT_BUY_LOWER_OTP = 14001,
|
|
80
|
-
/** ENTITLE_UPDOWN_GRADE_NOT_SUPPORT -
|
|
94
|
+
/** ENTITLE_UPDOWN_GRADE_NOT_SUPPORT - subscription upgrade/downgrade is not supported */
|
|
81
95
|
ENTITLE_UPDOWN_GRADE_NOT_SUPPORT = 14002,
|
|
82
|
-
/** ENTITLE_DUP_SUBSCRIPTION -
|
|
96
|
+
/** ENTITLE_DUP_SUBSCRIPTION - duplicate subscription */
|
|
83
97
|
ENTITLE_DUP_SUBSCRIPTION = 14003,
|
|
84
|
-
/** PAYMENT_CHANNEL_NOT_SUPPORT -
|
|
98
|
+
/** PAYMENT_CHANNEL_NOT_SUPPORT - payment channel is not supported */
|
|
85
99
|
PAYMENT_CHANNEL_NOT_SUPPORT = 14004,
|
|
86
|
-
/** ENTITLE_INVALID_COUPON_CODE -
|
|
100
|
+
/** ENTITLE_INVALID_COUPON_CODE - invalid coupon code */
|
|
87
101
|
ENTITLE_INVALID_COUPON_CODE = 14005,
|
|
88
|
-
/** ENTITLE_COUPON_EXPIRED - coupon
|
|
102
|
+
/** ENTITLE_COUPON_EXPIRED - coupon expired */
|
|
89
103
|
ENTITLE_COUPON_EXPIRED = 14006,
|
|
90
|
-
/** ENTITLE_COUPON_USED_UP - coupon
|
|
104
|
+
/** ENTITLE_COUPON_USED_UP - coupon used up */
|
|
91
105
|
ENTITLE_COUPON_USED_UP = 14007,
|
|
92
|
-
/** ENTITLE_USE_COUPON_NOT_1ST_TRADE -
|
|
106
|
+
/** ENTITLE_USE_COUPON_NOT_1ST_TRADE - not the first purchase, cannot use coupon */
|
|
93
107
|
ENTITLE_USE_COUPON_NOT_1ST_TRADE = 14008,
|
|
94
|
-
/** ENTITLE_CHAT_LIMIT_EXCEED -
|
|
108
|
+
/** ENTITLE_CHAT_LIMIT_EXCEED - chat rate limit exceeded */
|
|
95
109
|
ENTITLE_CHAT_LIMIT_EXCEED = 14101,
|
|
96
|
-
/** ENTITLE_REPORT_LIMIT_EXCEED -
|
|
110
|
+
/** ENTITLE_REPORT_LIMIT_EXCEED - report rate limit exceeded */
|
|
97
111
|
ENTITLE_REPORT_LIMIT_EXCEED = 14102,
|
|
98
|
-
/** ENTITLE_INSUFFICIENT_QUOTA -
|
|
112
|
+
/** ENTITLE_INSUFFICIENT_QUOTA - insufficient quota */
|
|
99
113
|
ENTITLE_INSUFFICIENT_QUOTA = 14103,
|
|
100
|
-
/** ENTITLE_NEED_BILLING_ADDRESS -
|
|
114
|
+
/** ENTITLE_NEED_BILLING_ADDRESS - billing address required */
|
|
101
115
|
ENTITLE_NEED_BILLING_ADDRESS = 14301,
|
|
102
116
|
/** REDEMPTION_INVALID_CODE - redemption code domain errors */
|
|
103
117
|
REDEMPTION_INVALID_CODE = 15001,
|
|
104
|
-
/** REDEMPTION_CODE_INACTIVE - code
|
|
118
|
+
/** REDEMPTION_CODE_INACTIVE - code inactive */
|
|
105
119
|
REDEMPTION_CODE_INACTIVE = 15002,
|
|
106
|
-
/** REDEMPTION_CODE_FULLY_REDEEMED -
|
|
120
|
+
/** REDEMPTION_CODE_FULLY_REDEEMED - fully redeemed */
|
|
107
121
|
REDEMPTION_CODE_FULLY_REDEEMED = 15003,
|
|
108
|
-
/** REDEMPTION_CODE_NOT_STARTED -
|
|
122
|
+
/** REDEMPTION_CODE_NOT_STARTED - not started yet */
|
|
109
123
|
REDEMPTION_CODE_NOT_STARTED = 15004,
|
|
110
|
-
/** REDEMPTION_USER_NOT_ELIGIBLE -
|
|
124
|
+
/** REDEMPTION_USER_NOT_ELIGIBLE - user not eligible */
|
|
111
125
|
REDEMPTION_USER_NOT_ELIGIBLE = 15005,
|
|
112
|
-
/** REDEMPTION_USER_REDEEM_TIMES_EXCEED -
|
|
126
|
+
/** REDEMPTION_USER_REDEEM_TIMES_EXCEED - user redemption limit exceeded */
|
|
113
127
|
REDEMPTION_USER_REDEEM_TIMES_EXCEED = 15006,
|
|
114
|
-
/** REDEMPTION_CODE_HAS_BEEN_CREATED -
|
|
128
|
+
/** REDEMPTION_CODE_HAS_BEEN_CREATED - redemption code already exists */
|
|
115
129
|
REDEMPTION_CODE_HAS_BEEN_CREATED = 15007,
|
|
116
130
|
/** DATA_SOURCE_TOO_LARGE - data source errors */
|
|
117
131
|
DATA_SOURCE_TOO_LARGE = 16001,
|
|
118
132
|
UNRECOGNIZED = -1
|
|
119
133
|
}
|
|
120
|
-
export interface
|
|
134
|
+
export interface IError {
|
|
121
135
|
code: ErrorCode;
|
|
122
136
|
message: string;
|
|
123
137
|
}
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
2
16
|
export declare enum UniverType {
|
|
3
17
|
UNIVER_UNKNOWN = 0,
|
|
4
18
|
UNIVER_DOC = 1,
|
|
@@ -1,12 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IResource } from './resource';
|
|
17
|
+
export interface IDocumentMeta {
|
|
4
18
|
unitID: string;
|
|
5
19
|
rev: number;
|
|
6
20
|
creator: string;
|
|
7
21
|
name: string;
|
|
8
22
|
/** The key is sheet id */
|
|
9
|
-
resources:
|
|
23
|
+
resources: IResource[];
|
|
10
24
|
/** The original meta data in JSON format. */
|
|
11
25
|
originalMeta: Uint8Array;
|
|
12
26
|
}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export interface IDrawingMeta {
|
|
3
17
|
unitID: string;
|
|
4
18
|
name: string;
|
|
5
19
|
/** The original meta data in JSON format. */
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare enum CellType {
|
|
17
|
+
UNDEFINED = 0,
|
|
18
|
+
TEXT = 1,
|
|
19
|
+
URL = 2,
|
|
20
|
+
IMAGE = 3,
|
|
21
|
+
UNRECOGNIZED = -1
|
|
22
|
+
}
|
|
23
|
+
export interface IInitialSheet {
|
|
24
|
+
sheetName: string;
|
|
25
|
+
columnName: string[];
|
|
26
|
+
rows: IRow[];
|
|
27
|
+
/** If true, do not apply filter plugin */
|
|
28
|
+
disableFilter?: boolean | undefined;
|
|
29
|
+
}
|
|
30
|
+
export interface IRowCell {
|
|
31
|
+
type: CellType;
|
|
32
|
+
text: string;
|
|
33
|
+
url: string;
|
|
34
|
+
/** Optional style information */
|
|
35
|
+
style?: IStyle | undefined;
|
|
36
|
+
}
|
|
37
|
+
interface IStyle {
|
|
38
|
+
/** Background color */
|
|
39
|
+
bg: string;
|
|
40
|
+
/** Text color */
|
|
41
|
+
cl: string;
|
|
42
|
+
}
|
|
43
|
+
export interface IRow {
|
|
44
|
+
cells: IRowCell[];
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
2
16
|
export declare enum UnitAction {
|
|
3
17
|
View = 0,
|
|
4
18
|
Edit = 1,
|
|
@@ -31,7 +45,7 @@ export declare enum UnitAction {
|
|
|
31
45
|
/** @deprecated */
|
|
32
46
|
FloatImg = 20,
|
|
33
47
|
/** @deprecated */
|
|
34
|
-
|
|
48
|
+
IHistory = 21,
|
|
35
49
|
/**
|
|
36
50
|
* RwHgtClWdt - row height, column width
|
|
37
51
|
*
|
|
@@ -102,15 +116,15 @@ export declare enum ObjectScope {
|
|
|
102
116
|
OneSelf = 2,
|
|
103
117
|
UNRECOGNIZED = -1
|
|
104
118
|
}
|
|
105
|
-
export interface
|
|
119
|
+
export interface IUnitRoleKV {
|
|
106
120
|
role: UnitRole;
|
|
107
121
|
name: string;
|
|
108
122
|
}
|
|
109
|
-
export interface
|
|
123
|
+
export interface IUnitPermissionStrategy {
|
|
110
124
|
role: UnitRole;
|
|
111
125
|
action: UnitAction;
|
|
112
126
|
}
|
|
113
|
-
export interface
|
|
127
|
+
export interface IUser {
|
|
114
128
|
userID: string;
|
|
115
129
|
name: string;
|
|
116
130
|
avatar: string;
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export interface IRange {
|
|
3
17
|
startRow: number;
|
|
4
18
|
endRow: number;
|
|
5
19
|
startColumn: number;
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export interface IResource {
|
|
3
17
|
id?: string | undefined;
|
|
4
18
|
name: string;
|
|
5
19
|
data: string;
|
|
@@ -1,19 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { UniverType } from './constants/univer';
|
|
17
|
+
import type { IDocumentMeta } from './doc';
|
|
18
|
+
import type { IWorkbookMeta } from './workbook';
|
|
19
|
+
export interface ISnapshot {
|
|
6
20
|
/** unitID of the Univer document */
|
|
7
21
|
unitID: string;
|
|
8
22
|
type: UniverType;
|
|
9
23
|
rev: number;
|
|
10
|
-
workbook:
|
|
11
|
-
doc:
|
|
24
|
+
workbook: IWorkbookMeta | undefined;
|
|
25
|
+
doc: IDocumentMeta | undefined;
|
|
12
26
|
}
|
|
13
|
-
export interface
|
|
27
|
+
export interface ITableInfo {
|
|
14
28
|
/** json:ITableInfo */
|
|
15
29
|
meta: Uint8Array;
|
|
16
30
|
dataPath: string;
|
|
17
|
-
/** A matrix of values in JSON format. use in
|
|
31
|
+
/** A matrix of values in JSON format. use in IGetPreprocessRangesResponse */
|
|
18
32
|
data?: string | undefined;
|
|
19
33
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
/** ICustomCellTemplate is the template used for make some drawing on sheet, like draw a cute mario XD. */
|
|
17
|
+
export interface ICustomCellTemplate {
|
|
18
|
+
rowCount: number;
|
|
19
|
+
colCount: number;
|
|
20
|
+
rowHeight: number;
|
|
21
|
+
colWidth: number;
|
|
22
|
+
showGridlines: number;
|
|
23
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { UniverType } from './constants/univer';
|
|
17
|
+
import type { IDocumentMeta } from './doc';
|
|
18
|
+
import type { IDrawingMeta } from './drawing';
|
|
19
|
+
import type { IWorkbookMeta } from './workbook';
|
|
20
|
+
export interface IUnit {
|
|
21
|
+
unitID: string;
|
|
22
|
+
name: string;
|
|
23
|
+
type: UniverType;
|
|
24
|
+
workbook?: IWorkbookMeta | undefined;
|
|
25
|
+
document?: IDocumentMeta | undefined;
|
|
26
|
+
drawing?: IDrawingMeta | undefined;
|
|
27
|
+
}
|