Skip to content

Commit

Permalink
feat: update version
Browse files Browse the repository at this point in the history
  • Loading branch information
limes-cloud committed Jun 11, 2024
1 parent 2c62338 commit ce7d9d9
Show file tree
Hide file tree
Showing 45 changed files with 3,851 additions and 834 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ bin/
.vscode/
.idea/
*.swp
web_ts/
autocode/
4 changes: 2 additions & 2 deletions api/resource/directory/resource_directory.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ message ListDirectoryReply {
}

message CreateDirectoryRequest {
uint32 parentId = 1[(validate.rules).uint32 = {gt: 0}];
uint32 parentId = 1[(validate.rules).uint32 = {gte: 0}];
string name = 2[(validate.rules).string = {min_len: 1}];
string accept = 3[(validate.rules).string = {min_len: 1}];
uint32 maxSize = 4[(validate.rules).uint32 = {gte: 1}];
Expand All @@ -57,7 +57,7 @@ message CreateDirectoryReply {

message UpdateDirectoryRequest {
uint32 id = 1[(validate.rules).uint32 = {gt: 0}];
uint32 parentId = 2[(validate.rules).uint32 = {gt: 0}];
uint32 parentId = 2[(validate.rules).uint32 = {gte: 0}];
string name = 3[(validate.rules).string = {min_len: 1}];
string accept = 4[(validate.rules).string = {min_len: 1}];
uint32 maxSize = 5[(validate.rules).uint32 = {gte: 1}];
Expand Down
4 changes: 2 additions & 2 deletions api/resource/directory/v1/resource_directory.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions api/resource/directory/v1/resource_directory.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

204 changes: 3 additions & 201 deletions api/resource/export/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,206 +3,8 @@

openapi: 3.0.3
info:
title: Export API
title: ""
version: 0.0.1
paths:
/resource/api/v1/export:
post:
tags:
- Export
description: CreateExport 创建导出信息
operationId: Export_CreateExport
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateExportRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CreateExportReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
delete:
tags:
- Export
description: DeleteExport 删除导出信息
operationId: Export_DeleteExport
parameters:
- name: ids
in: query
schema:
type: array
items:
type: integer
format: uint32
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteExportReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/resource/api/v1/exports:
get:
tags:
- Export
description: ListExport 获取导出信息列表
operationId: Export_ListExport
parameters:
- name: page
in: query
schema:
type: integer
format: uint32
- name: pageSize
in: query
schema:
type: integer
format: uint32
- name: order
in: query
schema:
type: string
- name: orderBy
in: query
schema:
type: string
- name: userId
in: query
schema:
type: integer
format: uint32
- name: departmentId
in: query
schema:
type: integer
format: uint32
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListExportReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
paths: {}
components:
schemas:
CreateExportReply:
type: object
properties:
id:
type: integer
format: uint32
CreateExportRequest:
type: object
properties:
userId:
type: integer
format: uint32
departmentId:
type: integer
format: uint32
scene:
type: string
name:
type: string
reason:
type: string
DeleteExportReply:
type: object
properties:
total:
type: integer
format: uint32
GoogleProtobufAny:
type: object
properties:
'@type':
type: string
description: The type of the serialized message.
additionalProperties: true
description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
ListExportReply:
type: object
properties:
total:
type: integer
format: uint32
list:
type: array
items:
$ref: '#/components/schemas/ListExportReply_Export'
ListExportReply_Export:
type: object
properties:
id:
type: integer
format: uint32
userId:
type: integer
format: uint32
departmentId:
type: integer
format: uint32
scene:
type: string
name:
type: string
size:
type: integer
format: uint32
sha:
type: string
src:
type: string
status:
type: string
reason:
type: string
expiredAt:
type: integer
format: uint32
createdAt:
type: integer
format: uint32
updatedAt:
type: integer
format: uint32
Status:
type: object
properties:
code:
type: integer
description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
format: int32
message:
type: string
description: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
details:
type: array
items:
$ref: '#/components/schemas/GoogleProtobufAny'
description: A list of messages that carry the error details. There is a common set of message types for APIs to use.
description: 'The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).'
tags:
- name: Export
schemas: {}
60 changes: 54 additions & 6 deletions api/resource/export/resource_export.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,36 @@ option java_outer_classname = "ExportV1";

import "validate/validate.proto";

message GetExportRequest {
optional uint32 id = 1[(validate.rules).uint32 = {gt: 0}];
optional string sha = 2;
}

message GetExportReply {
uint32 id = 1;
uint32 userId = 2;
uint32 departmentId = 3;
string scene = 4;
string name = 5;
uint32 size = 6;
optional string sha = 7;
optional string src = 8;
string status = 9;
optional string reason = 10;
uint32 expiredAt = 11;
uint32 createdAt = 12;
uint32 updatedAt = 13;
string url = 14;
}

message ListExportRequest {
uint32 page = 1[(validate.rules).uint32 = {gt: 0}];
uint32 pageSize = 2[(validate.rules).uint32 = {gt: 0,lte:50}];
optional string order = 3[(validate.rules).string = {in: ["asc","desc"]}];
optional string orderBy = 4[(validate.rules).string = {in: ["id","created_at","updated_at"]}];
optional uint32 userId = 5;
optional uint32 departmentId = 6;
bool all = 5;
repeated uint32 userIds = 6;
repeated uint32 departmentIds = 7;
}

message ListExportReply {
Expand All @@ -33,21 +56,46 @@ message ListExportReply {
uint32 expiredAt = 11;
uint32 createdAt = 12;
uint32 updatedAt = 13;
string url = 14;
}

uint32 total = 1;
repeated Export list = 2;
}

message CreateExportRequest {

message ExportExcelRequest{
message Col{
string type = 1[(validate.rules).string = {min_len:1}];
string value = 2;
}
message Row{
repeated Col cols = 1;
}
uint32 userId = 1[(validate.rules).uint32 = {gt: 0}];
uint32 departmentId = 2[(validate.rules).uint32 = {gt: 0}];
string scene = 3[(validate.rules).string = {min_len: 1}];
string name = 4[(validate.rules).string = {min_len: 1}];
optional string reason = 5;
string name = 4[(validate.rules).string = {min_len:1}];
repeated Row rows = 5[(validate.rules).repeated = {min_items:1}];
}

message CreateExportReply {
message ExportExcelReply{
uint32 id = 1;
}

message ExportFileRequest{
message ExportFile{
string value = 1;
string rename = 2;
}
uint32 userId = 1[(validate.rules).uint32 = {gt: 0}];
uint32 departmentId = 2[(validate.rules).uint32 = {gt: 0}];
string scene = 3[(validate.rules).string = {min_len: 1}];
string name = 4[(validate.rules).string = {min_len:1}];
repeated ExportFile files = 5;
repeated uint32 ids = 6;
}
message ExportFileReply{
uint32 id = 1;
}

Expand Down
Loading

0 comments on commit ce7d9d9

Please sign in to comment.