Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sync/group #6

Merged
merged 10 commits into from
Sep 26, 2023
44 changes: 44 additions & 0 deletions gen/openapi/sync/v1/group.swagger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"swagger": "2.0",
"info": {
"title": "sync/v1/group.proto",
"version": "version not set"
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {},
"definitions": {
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/protobufAny"
}
}
}
}
}
}
189 changes: 188 additions & 1 deletion gen/openapi/sync/v1/sync_service.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,38 @@
]
}
},
"/gapi/sync/v1/sync_group": {
"get": {
"summary": "通过UID获取所有组信息",
"operationId": "SyncService_SyncGroup",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1SyncGroupResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "after",
"in": "query",
"required": false,
"type": "string",
"format": "date-time"
}
],
"tags": [
"SyncService"
]
}
},
"/gapi/sync/v1/update": {
"post": {
"summary": "提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。",
Expand Down Expand Up @@ -337,6 +369,90 @@
"SyncService"
]
}
},
"/gapi/sync/v1/update_group": {
"post": {
"summary": "更新组信息",
"operationId": "SyncService_UpdateGroup",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1UpdateGroupResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "group.id",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "group.name",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "group.description",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "group.avatar",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "group.createdAt",
"in": "query",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "group.updatedAt",
"in": "query",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "group.deletedAt",
"in": "query",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "group.uid",
"description": "创建者",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "group.isPersonal",
"description": "是否是个人组",
"in": "query",
"required": false,
"type": "boolean"
}
],
"tags": [
"SyncService"
]
}
}
},
"definitions": {
Expand Down Expand Up @@ -368,6 +484,50 @@
}
}
},
"v1Group": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"avatar": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"deletedAt": {
"type": "string",
"format": "date-time"
},
"uid": {
"type": "string",
"title": "创建者"
},
"isPersonal": {
"type": "boolean",
"title": "是否是个人组"
},
"members": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Member"
}
}
}
},
"v1Host": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -467,7 +627,7 @@
"title": "密钥ID"
}
},
"title": "Identity(身份) 包含身份验证详细信息,如果某些服务器需要提供同一组凭据,则可以节省配置的时间。\n这些凭据可以快速添加为身份并与主机条目链接。当凭据发生更改时,不必更新每台主机而只需更新身份即可。"
"title": "Identity(身份) 包含身份验证详细信息,如果某些服务器需要提供同一组凭据,则可以节省配置的时间。\r\n这些凭据可以快速添加为身份并与主机条目链接。当凭据发生更改时,不必更新每台主机而只需更新身份即可。"
},
"v1KnownHost": {
"type": "object",
Expand Down Expand Up @@ -501,6 +661,14 @@
}
}
},
"v1Member": {
"type": "object",
"properties": {
"uid": {
"type": "string"
}
}
},
"v1SshKey": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -542,6 +710,22 @@
},
"title": "SSH 密钥"
},
"v1SyncGroupResponse": {
"type": "object",
"properties": {
"serverTime": {
"type": "string",
"format": "date-time"
},
"groups": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Group"
}
}
}
},
"v1SyncResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -580,6 +764,9 @@
}
}
},
"v1UpdateGroupResponse": {
"type": "object"
},
"v1UpdateResponse": {
"type": "object",
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion gen/proto/auth/v1/auth_service.pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
*/

import * as fm from "../../fetch.pb"
import * as fm from "..\..\fetch.pb"
export type RegisterRequest = {
email?: string
verifyCode?: string
Expand Down
Loading