Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@types/fs-extra": "^11.0.4",
"@univerjs/icons": "^1.1.1",
"@univerjs/icons-svg": "^1.1.1",
"@univerjs/protocol": "0.1.49",
"@univerjs/protocol": "workspace:*",
"typescript": "^6.0.2",
"vue-tsc": "^3.2.6"
}
Expand Down
2 changes: 1 addition & 1 deletion common/shared/tsdown/configs/umd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function resolveUmdGlobal(source: string) {
}

if (source.startsWith('@univerjs')) {
if (source === '@univerjs/protocol' || source === '@univerjs/icons') {
if (source === '@univerjs/icons') {
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion common/shared/tsdown/utils/cleanup-pkg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ interface IDerivedDependencyGroups {

const SOURCE_EXTS = new Set(['.ts', '.tsx']);
const TEST_FILE_RE = /\.(spec|test)\.[cm]?tsx?$/;
const IMMUTABLE_MANAGED_DEPENDENCIES = new Set(['@univerjs/icons', '@univerjs/icons-svg', '@univerjs/protocol']);
const IMMUTABLE_MANAGED_DEPENDENCIES = new Set(['@univerjs/icons', '@univerjs/icons-svg']);

function filterPackageName(packageName: string): string {
if (packageName.startsWith('@univerjs/')) {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/protocol": "0.1.49",
"@univerjs/protocol": "workspace:*",
"@univerjs/themes": "workspace:*",
"@wendellhu/redi": "1.1.1",
"async-lock": "^1.4.1",
Expand Down
18 changes: 16 additions & 2 deletions packages/core/src/services/authz-io/authz-io-local.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,21 @@
* limitations under the License.
*/

import type { IActionInfo, IAllowedRequest, IBatchAllowedResponse, ICollaborator, ICreateRequest, ICreateRequest_SelectRangeObject, IListPermPointRequest, IPermissionPoint, IPutCollaboratorsRequest, IUnitRoleKV, IUpdatePermPointRequest, UnitAction, UnitObject } from '@univerjs/protocol';
import type {
IActionInfo,
IAllowedRequest,
IBatchAllowedResponse,
ICollaborator,
ICreateRequest,
ICreateRequestSelectRangeObject,
IListPermPointRequest,
IPermissionPoint,
IPutCollaboratorsRequest,
IUnitRoleKV,
IUpdatePermPointRequest,
UnitAction,
UnitObject,
} from '@univerjs/protocol';
import type { IAuthzIoService } from './type';
import { ObjectScope, UnitRole } from '@univerjs/protocol';
import { Inject } from '../../common/di';
Expand All @@ -33,7 +47,7 @@ interface IPermissionData {
name: string;
unitID: string;
strategies: Array<{ action: UnitAction; role: UnitRole }>;
selectRangeObject?: ICreateRequest_SelectRangeObject;
selectRangeObject?: ICreateRequestSelectRangeObject;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/data-validation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/protocol": "0.1.49",
"@univerjs/protocol": "workspace:*",
"@univerjs/sheets": "workspace:*",
"rxjs": "^7.8.2",
"typescript": "^6.0.2",
Expand Down
1 change: 1 addition & 0 deletions packages/protocol/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# @univerjs/protocl
70 changes: 70 additions & 0 deletions packages/protocol/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"name": "@univerjs/protocol",
"version": "0.20.1",
"private": false,
"author": "DreamNum <developer@univer.ai>",
"license": "Apache-2.0",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/univer"
},
"homepage": "https://univer.ai",
"repository": {
"type": "git",
"url": "https://github.com/dream-num/univer"
},
"bugs": {
"url": "https://github.com/dream-num/univer/issues"
},
"keywords": [
"univer"
],
"exports": {
".": "./src/index.ts",
"./*": "./src/*"
},
"main": "./src/index.ts",
"types": "./lib/types/index.d.ts",
"publishConfig": {
"access": "public",
"main": "./lib/es/index.js",
"module": "./lib/es/index.js",
"exports": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./*": {
"import": "./lib/es/*",
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
"./lib/*": "./lib/*"
}
},
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"typecheck": "tsc --noEmit",
"build:bundle": "univer-cli build",
"build:types": "tsc -p tsconfig.node.json",
"build": "pnpm run build:bundle && pnpm run build:types"
},
"dependencies": {
"@grpc/grpc-js": "^1.14.3"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"rxjs": "^7.8.2",
"typescript": "^6.0.2",
"vitest": "^4.1.4"
}
}
242 changes: 242 additions & 0 deletions packages/protocol/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
/**
* Copyright 2023-present DreamNum Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

export type {
IDeserializedSheetBlock,
IGetDeserializedSheetBlockResponse,
} from './other/sheet-block';

export type {
IChangeset,
ICommand,
IMutation,
} from './ts/univer/changeset';
export {
CommentSolvedStatus,
CommentUpdateEventType,
type ICollaMsg,
type ICollaMsgErrorEvent,
type ICollaMsgJoin,
type ICollaMsgLeave,
type ICommentUpdate,
type ILiveShareNewHost,
type ILiveShareOperation,
type ILiveShareOperationOperation,
type ILiveShareRequestHost,
type ILiveShareTerminate,
type IShouldCloseConn,
type IUniscriptRun,
type IUpdateCursor,
type IUpdatePermissionObj,
} from './ts/univer/colla-msg';
export {
ErrorCode,
type IError,
} from './ts/univer/constants/errors';
export { UniverType } from './ts/univer/constants/univer';

export type { IDocumentMeta } from './ts/univer/doc';
export {
CellType,
type IInitialSheet,
type IRow,
type IRowCell,
} from './ts/univer/initial-sheet';
export type {
IUnitRoleKV,
} from './ts/univer/permission';
export {
ObjectScope,
UnitAction,
UnitObject,
UnitRole,
} from './ts/univer/permission';
export type { IRange } from './ts/univer/range';

export type {
ISnapshot,
ITableInfo,
} from './ts/univer/snapshot';

export {
CellValueType,
type ICellData,
type ISheetBlock,
type ISheetBlockMeta,
type IWorkbookMeta,
type IWorksheetMeta,
} from './ts/univer/workbook';

export type {
IRecord,
} from './ts/univercloud/stats/v1/stats';

export {
IRecordType,
} from './ts/univercloud/stats/v1/stats';

export {
type IApplyRequest,
type IApplyResponse,
type ICreateUnitRequest,
type ICreateUnitResponse,
type IDirectWriteRequest,
type IDirectWriteResponse,
type IDisposeRequest,
type IDisposeResponse,
type IEnsureSnapshotRequest,
type IEnsureSnapshotResponse,
type IForkUnitRequest,
type IForkUnitResponse,
type IGetUnitRawContentRequest,
type IGetUnitRawContentResponse,
type IPreloadUnitRequest,
type IPreloadUnitResponse,
type IWorkbookCreateMeta,
} from './ts/univerpro/v1/apply';

export {
type ICollaborationHelperService,
type ICreateLatestSnapshotInBackgroundRequest,
type ICreateLatestSnapshotInBackgroundResponse,
} from './ts/univerpro/v1/helper';

export type {
IComputeRequest,
IComputeResponse,
IGetPreprocessRangesRequest,
IGetPreprocessRangesResponse,
IGetValuesRequest,
IGetValuesResponse,
ITableInfoList,
} from './ts/univerpro/v1/ssc';

export type {
IGetSSRRequest,
IGetSSRResponse,
} from './ts/univerpro/v1/ssr';

export type {
IAccessKeyService,
} from './ts/universer/v1/access-key';

export type {
IActionInfo,
IAllowedRequest,
IAllowedResponse,
IAuthzService,
IBatchAllowedResponse,
ICollaborator,
ICreateCollaboratorRequest,
ICreateRequest,
ICreateRequestSelectRangeObject,
ICreateResponse,
IDeleteCollaboratorRequest,
IDeleteCollaboratorResponse,
IListCollaboratorRequest,
IListCollaboratorResponse,
IListPermPointRequest,
IListPermPointResponse,
IListRolesRequest,
IListRolesResponse,
IPermissionPoint,
IPutCollaboratorsRequest,
IPutCollaboratorsResponse,
IUpdateCollaboratorRequest,
IUpdateCollaboratorResponse,
IUpdatePermPointRequest,
} from './ts/universer/v1/authz';

export {
CmdRspCode,
CombCmd,
type ICombJoinRequest,
type ICombJoinResponse,
type ICombLeaveRequest,
type ICombService,
type IMember,
type INewChangesRequest,
type INewChangesResponse,
} from './ts/universer/v1/comb';

export type {
IAddCommentRequest,
IAddCommentResponse,
IDeleteCommentRequest,
IDeleteCommentResponse,
IEditCommentRequest,
IEditCommentResponse,
IListCommentsRequest,
IListCommentsResponse,
IReply,
IReplyCommentRequest,
IReplyCommentResponse,
ISolvedCommentRequest,
ISolvedCommentResponse,
IThread,
} from './ts/universer/v1/comment';

export {
FileSource,
type IFileService,
type IFileUploadRequest,
} from './ts/universer/v1/file';

export type {
ICreateHistoryRequest,
ICreateHistoryResponse,
IGetHistoryCsRequest,
IGetHistoryCsResponse,
IHistoryService,
} from './ts/universer/v1/history';

export type {
IGetUserLicenseResponse,
ILicenseService,
} from './ts/universer/v1/license';

export {
type ICopyFileMetaRequest,
type ICopyFileMetaResponse,
type IFetchMissingChangesetsRequest,
type IFetchMissingChangesetsResponse,
type IGetLatestCsReqIdBySidRequest,
type IGetLatestCsReqIdBySidResponse,
type IGetResourcesRequest,
type IGetResourcesResponse,
type IGetSheetBlockRequest,
type IGetSheetBlockResponse,
type IGetUnitOnRevRequest,
type IGetUnitOnRevResponse,
type IReportUnitRoutingStatsRequest,
type IReportUnitRoutingStatsResponse,
type ISaveChangesetRequest,
type ISaveChangesetResponse,
type ISaveSheetBlockRequest,
type ISaveSheetBlockResponse,
type ISaveSnapshotRequest,
type ISaveSnapshotResponse,
type ISnapshotService,
} from './ts/universer/v1/snapshot';

export type {
IGetSessionTicketResponse,
IGetUserResponse,
IListUsersResponse,
IUser,
} from './ts/universer/v1/user';

export { isError } from './utils';
Loading
Loading