diff --git a/api/docs/yorkie/v1/admin.openapi.yaml b/api/docs/yorkie/v1/admin.openapi.yaml index e3672c9f2..536d71435 100644 --- a/api/docs/yorkie/v1/admin.openapi.yaml +++ b/api/docs/yorkie/v1/admin.openapi.yaml @@ -1,532 +1,531 @@ openapi: 3.1.0 info: - description: - Yorkie is an open source document store for building collaborative + description: Yorkie is an open source document store for building collaborative editing applications. title: Yorkie version: v0.5.1 servers: - - description: Production server - url: https://api.yorkie.dev - - description: Local server - url: http://localhost:8080 +- description: Production server + url: https://api.yorkie.dev +- description: Local server + url: http://localhost:8080 paths: /yorkie.v1.AdminService/ChangePassword: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.AdminService.ChangePassword.yorkie.v1.ChangePasswordRequest" + $ref: '#/components/requestBodies/yorkie.v1.AdminService.ChangePassword.yorkie.v1.ChangePasswordRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.AdminService.ChangePassword.yorkie.v1.ChangePasswordResponse" + $ref: '#/components/responses/yorkie.v1.AdminService.ChangePassword.yorkie.v1.ChangePasswordResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.AdminService + - yorkie.v1.AdminService /yorkie.v1.AdminService/CreateProject: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.AdminService.CreateProject.yorkie.v1.CreateProjectRequest" + $ref: '#/components/requestBodies/yorkie.v1.AdminService.CreateProject.yorkie.v1.CreateProjectRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.AdminService.CreateProject.yorkie.v1.CreateProjectResponse" + $ref: '#/components/responses/yorkie.v1.AdminService.CreateProject.yorkie.v1.CreateProjectResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.AdminService + - yorkie.v1.AdminService /yorkie.v1.AdminService/DeleteAccount: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.AdminService.DeleteAccount.yorkie.v1.DeleteAccountRequest" + $ref: '#/components/requestBodies/yorkie.v1.AdminService.DeleteAccount.yorkie.v1.DeleteAccountRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.AdminService.DeleteAccount.yorkie.v1.DeleteAccountResponse" + $ref: '#/components/responses/yorkie.v1.AdminService.DeleteAccount.yorkie.v1.DeleteAccountResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.AdminService + - yorkie.v1.AdminService /yorkie.v1.AdminService/GetDocument: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.AdminService.GetDocument.yorkie.v1.GetDocumentRequest" + $ref: '#/components/requestBodies/yorkie.v1.AdminService.GetDocument.yorkie.v1.GetDocumentRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.AdminService.GetDocument.yorkie.v1.GetDocumentResponse" + $ref: '#/components/responses/yorkie.v1.AdminService.GetDocument.yorkie.v1.GetDocumentResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.AdminService + - yorkie.v1.AdminService /yorkie.v1.AdminService/GetDocuments: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.AdminService.GetDocuments.yorkie.v1.GetDocumentsRequest" + $ref: '#/components/requestBodies/yorkie.v1.AdminService.GetDocuments.yorkie.v1.GetDocumentsRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.AdminService.GetDocuments.yorkie.v1.GetDocumentsResponse" + $ref: '#/components/responses/yorkie.v1.AdminService.GetDocuments.yorkie.v1.GetDocumentsResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.AdminService + - yorkie.v1.AdminService /yorkie.v1.AdminService/GetProject: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.AdminService.GetProject.yorkie.v1.GetProjectRequest" + $ref: '#/components/requestBodies/yorkie.v1.AdminService.GetProject.yorkie.v1.GetProjectRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.AdminService.GetProject.yorkie.v1.GetProjectResponse" + $ref: '#/components/responses/yorkie.v1.AdminService.GetProject.yorkie.v1.GetProjectResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.AdminService + - yorkie.v1.AdminService /yorkie.v1.AdminService/GetServerVersion: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.AdminService.GetServerVersion.yorkie.v1.GetServerVersionRequest" + $ref: '#/components/requestBodies/yorkie.v1.AdminService.GetServerVersion.yorkie.v1.GetServerVersionRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.AdminService.GetServerVersion.yorkie.v1.GetServerVersionResponse" + $ref: '#/components/responses/yorkie.v1.AdminService.GetServerVersion.yorkie.v1.GetServerVersionResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.AdminService + - yorkie.v1.AdminService /yorkie.v1.AdminService/GetSnapshotMeta: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.AdminService.GetSnapshotMeta.yorkie.v1.GetSnapshotMetaRequest" + $ref: '#/components/requestBodies/yorkie.v1.AdminService.GetSnapshotMeta.yorkie.v1.GetSnapshotMetaRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.AdminService.GetSnapshotMeta.yorkie.v1.GetSnapshotMetaResponse" + $ref: '#/components/responses/yorkie.v1.AdminService.GetSnapshotMeta.yorkie.v1.GetSnapshotMetaResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.AdminService + - yorkie.v1.AdminService /yorkie.v1.AdminService/ListChanges: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.AdminService.ListChanges.yorkie.v1.ListChangesRequest" + $ref: '#/components/requestBodies/yorkie.v1.AdminService.ListChanges.yorkie.v1.ListChangesRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.AdminService.ListChanges.yorkie.v1.ListChangesResponse" + $ref: '#/components/responses/yorkie.v1.AdminService.ListChanges.yorkie.v1.ListChangesResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.AdminService + - yorkie.v1.AdminService /yorkie.v1.AdminService/ListDocuments: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.AdminService.ListDocuments.yorkie.v1.ListDocumentsRequest" + $ref: '#/components/requestBodies/yorkie.v1.AdminService.ListDocuments.yorkie.v1.ListDocumentsRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.AdminService.ListDocuments.yorkie.v1.ListDocumentsResponse" + $ref: '#/components/responses/yorkie.v1.AdminService.ListDocuments.yorkie.v1.ListDocumentsResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.AdminService + - yorkie.v1.AdminService /yorkie.v1.AdminService/ListProjects: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.AdminService.ListProjects.yorkie.v1.ListProjectsRequest" + $ref: '#/components/requestBodies/yorkie.v1.AdminService.ListProjects.yorkie.v1.ListProjectsRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.AdminService.ListProjects.yorkie.v1.ListProjectsResponse" + $ref: '#/components/responses/yorkie.v1.AdminService.ListProjects.yorkie.v1.ListProjectsResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.AdminService + - yorkie.v1.AdminService /yorkie.v1.AdminService/LogIn: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.AdminService.LogIn.yorkie.v1.LogInRequest" + $ref: '#/components/requestBodies/yorkie.v1.AdminService.LogIn.yorkie.v1.LogInRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.AdminService.LogIn.yorkie.v1.LogInResponse" + $ref: '#/components/responses/yorkie.v1.AdminService.LogIn.yorkie.v1.LogInResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.AdminService + - yorkie.v1.AdminService /yorkie.v1.AdminService/RemoveDocumentByAdmin: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.AdminService.RemoveDocumentByAdmin.yorkie.v1.RemoveDocumentByAdminRequest" + $ref: '#/components/requestBodies/yorkie.v1.AdminService.RemoveDocumentByAdmin.yorkie.v1.RemoveDocumentByAdminRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.AdminService.RemoveDocumentByAdmin.yorkie.v1.RemoveDocumentByAdminResponse" + $ref: '#/components/responses/yorkie.v1.AdminService.RemoveDocumentByAdmin.yorkie.v1.RemoveDocumentByAdminResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.AdminService + - yorkie.v1.AdminService /yorkie.v1.AdminService/SearchDocuments: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.AdminService.SearchDocuments.yorkie.v1.SearchDocumentsRequest" + $ref: '#/components/requestBodies/yorkie.v1.AdminService.SearchDocuments.yorkie.v1.SearchDocumentsRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.AdminService.SearchDocuments.yorkie.v1.SearchDocumentsResponse" + $ref: '#/components/responses/yorkie.v1.AdminService.SearchDocuments.yorkie.v1.SearchDocumentsResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.AdminService + - yorkie.v1.AdminService /yorkie.v1.AdminService/SignUp: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.AdminService.SignUp.yorkie.v1.SignUpRequest" + $ref: '#/components/requestBodies/yorkie.v1.AdminService.SignUp.yorkie.v1.SignUpRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.AdminService.SignUp.yorkie.v1.SignUpResponse" + $ref: '#/components/responses/yorkie.v1.AdminService.SignUp.yorkie.v1.SignUpResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.AdminService + - yorkie.v1.AdminService /yorkie.v1.AdminService/UpdateProject: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.AdminService.UpdateProject.yorkie.v1.UpdateProjectRequest" + $ref: '#/components/requestBodies/yorkie.v1.AdminService.UpdateProject.yorkie.v1.UpdateProjectRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.AdminService.UpdateProject.yorkie.v1.UpdateProjectResponse" + $ref: '#/components/responses/yorkie.v1.AdminService.UpdateProject.yorkie.v1.UpdateProjectResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.AdminService + - yorkie.v1.AdminService components: requestBodies: yorkie.v1.AdminService.ChangePassword.yorkie.v1.ChangePasswordRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.ChangePasswordRequest" + $ref: '#/components/schemas/yorkie.v1.ChangePasswordRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.ChangePasswordRequest" + $ref: '#/components/schemas/yorkie.v1.ChangePasswordRequest' required: true yorkie.v1.AdminService.CreateProject.yorkie.v1.CreateProjectRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.CreateProjectRequest" + $ref: '#/components/schemas/yorkie.v1.CreateProjectRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.CreateProjectRequest" + $ref: '#/components/schemas/yorkie.v1.CreateProjectRequest' required: true yorkie.v1.AdminService.DeleteAccount.yorkie.v1.DeleteAccountRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.DeleteAccountRequest" + $ref: '#/components/schemas/yorkie.v1.DeleteAccountRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.DeleteAccountRequest" + $ref: '#/components/schemas/yorkie.v1.DeleteAccountRequest' required: true yorkie.v1.AdminService.GetDocument.yorkie.v1.GetDocumentRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.GetDocumentRequest" + $ref: '#/components/schemas/yorkie.v1.GetDocumentRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.GetDocumentRequest" + $ref: '#/components/schemas/yorkie.v1.GetDocumentRequest' required: true yorkie.v1.AdminService.GetDocuments.yorkie.v1.GetDocumentsRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.GetDocumentsRequest" + $ref: '#/components/schemas/yorkie.v1.GetDocumentsRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.GetDocumentsRequest" + $ref: '#/components/schemas/yorkie.v1.GetDocumentsRequest' required: true yorkie.v1.AdminService.GetProject.yorkie.v1.GetProjectRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.GetProjectRequest" + $ref: '#/components/schemas/yorkie.v1.GetProjectRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.GetProjectRequest" + $ref: '#/components/schemas/yorkie.v1.GetProjectRequest' required: true yorkie.v1.AdminService.GetServerVersion.yorkie.v1.GetServerVersionRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.GetServerVersionRequest" + $ref: '#/components/schemas/yorkie.v1.GetServerVersionRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.GetServerVersionRequest" + $ref: '#/components/schemas/yorkie.v1.GetServerVersionRequest' required: true yorkie.v1.AdminService.GetSnapshotMeta.yorkie.v1.GetSnapshotMetaRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.GetSnapshotMetaRequest" + $ref: '#/components/schemas/yorkie.v1.GetSnapshotMetaRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.GetSnapshotMetaRequest" + $ref: '#/components/schemas/yorkie.v1.GetSnapshotMetaRequest' required: true yorkie.v1.AdminService.ListChanges.yorkie.v1.ListChangesRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.ListChangesRequest" + $ref: '#/components/schemas/yorkie.v1.ListChangesRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.ListChangesRequest" + $ref: '#/components/schemas/yorkie.v1.ListChangesRequest' required: true yorkie.v1.AdminService.ListDocuments.yorkie.v1.ListDocumentsRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.ListDocumentsRequest" + $ref: '#/components/schemas/yorkie.v1.ListDocumentsRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.ListDocumentsRequest" + $ref: '#/components/schemas/yorkie.v1.ListDocumentsRequest' required: true yorkie.v1.AdminService.ListProjects.yorkie.v1.ListProjectsRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.ListProjectsRequest" + $ref: '#/components/schemas/yorkie.v1.ListProjectsRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.ListProjectsRequest" + $ref: '#/components/schemas/yorkie.v1.ListProjectsRequest' required: true yorkie.v1.AdminService.LogIn.yorkie.v1.LogInRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.LogInRequest" + $ref: '#/components/schemas/yorkie.v1.LogInRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.LogInRequest" + $ref: '#/components/schemas/yorkie.v1.LogInRequest' required: true yorkie.v1.AdminService.RemoveDocumentByAdmin.yorkie.v1.RemoveDocumentByAdminRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.RemoveDocumentByAdminRequest" + $ref: '#/components/schemas/yorkie.v1.RemoveDocumentByAdminRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.RemoveDocumentByAdminRequest" + $ref: '#/components/schemas/yorkie.v1.RemoveDocumentByAdminRequest' required: true yorkie.v1.AdminService.SearchDocuments.yorkie.v1.SearchDocumentsRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.SearchDocumentsRequest" + $ref: '#/components/schemas/yorkie.v1.SearchDocumentsRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.SearchDocumentsRequest" + $ref: '#/components/schemas/yorkie.v1.SearchDocumentsRequest' required: true yorkie.v1.AdminService.SignUp.yorkie.v1.SignUpRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.SignUpRequest" + $ref: '#/components/schemas/yorkie.v1.SignUpRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.SignUpRequest" + $ref: '#/components/schemas/yorkie.v1.SignUpRequest' required: true yorkie.v1.AdminService.UpdateProject.yorkie.v1.UpdateProjectRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.UpdateProjectRequest" + $ref: '#/components/schemas/yorkie.v1.UpdateProjectRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.UpdateProjectRequest" + $ref: '#/components/schemas/yorkie.v1.UpdateProjectRequest' required: true responses: connect.error: content: application/json: schema: - $ref: "#/components/schemas/connect.error" + $ref: '#/components/schemas/connect.error' application/proto: schema: - $ref: "#/components/schemas/connect.error" + $ref: '#/components/schemas/connect.error' description: "" yorkie.v1.AdminService.ChangePassword.yorkie.v1.ChangePasswordResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.ChangePasswordResponse" + $ref: '#/components/schemas/yorkie.v1.ChangePasswordResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.ChangePasswordResponse" + $ref: '#/components/schemas/yorkie.v1.ChangePasswordResponse' description: "" yorkie.v1.AdminService.CreateProject.yorkie.v1.CreateProjectResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.CreateProjectResponse" + $ref: '#/components/schemas/yorkie.v1.CreateProjectResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.CreateProjectResponse" + $ref: '#/components/schemas/yorkie.v1.CreateProjectResponse' description: "" yorkie.v1.AdminService.DeleteAccount.yorkie.v1.DeleteAccountResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.DeleteAccountResponse" + $ref: '#/components/schemas/yorkie.v1.DeleteAccountResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.DeleteAccountResponse" + $ref: '#/components/schemas/yorkie.v1.DeleteAccountResponse' description: "" yorkie.v1.AdminService.GetDocument.yorkie.v1.GetDocumentResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.GetDocumentResponse" + $ref: '#/components/schemas/yorkie.v1.GetDocumentResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.GetDocumentResponse" + $ref: '#/components/schemas/yorkie.v1.GetDocumentResponse' description: "" yorkie.v1.AdminService.GetDocuments.yorkie.v1.GetDocumentsResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.GetDocumentsResponse" + $ref: '#/components/schemas/yorkie.v1.GetDocumentsResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.GetDocumentsResponse" + $ref: '#/components/schemas/yorkie.v1.GetDocumentsResponse' description: "" yorkie.v1.AdminService.GetProject.yorkie.v1.GetProjectResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.GetProjectResponse" + $ref: '#/components/schemas/yorkie.v1.GetProjectResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.GetProjectResponse" + $ref: '#/components/schemas/yorkie.v1.GetProjectResponse' description: "" yorkie.v1.AdminService.GetServerVersion.yorkie.v1.GetServerVersionResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.GetServerVersionResponse" + $ref: '#/components/schemas/yorkie.v1.GetServerVersionResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.GetServerVersionResponse" + $ref: '#/components/schemas/yorkie.v1.GetServerVersionResponse' description: "" yorkie.v1.AdminService.GetSnapshotMeta.yorkie.v1.GetSnapshotMetaResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.GetSnapshotMetaResponse" + $ref: '#/components/schemas/yorkie.v1.GetSnapshotMetaResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.GetSnapshotMetaResponse" + $ref: '#/components/schemas/yorkie.v1.GetSnapshotMetaResponse' description: "" yorkie.v1.AdminService.ListChanges.yorkie.v1.ListChangesResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.ListChangesResponse" + $ref: '#/components/schemas/yorkie.v1.ListChangesResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.ListChangesResponse" + $ref: '#/components/schemas/yorkie.v1.ListChangesResponse' description: "" yorkie.v1.AdminService.ListDocuments.yorkie.v1.ListDocumentsResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.ListDocumentsResponse" + $ref: '#/components/schemas/yorkie.v1.ListDocumentsResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.ListDocumentsResponse" + $ref: '#/components/schemas/yorkie.v1.ListDocumentsResponse' description: "" yorkie.v1.AdminService.ListProjects.yorkie.v1.ListProjectsResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.ListProjectsResponse" + $ref: '#/components/schemas/yorkie.v1.ListProjectsResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.ListProjectsResponse" + $ref: '#/components/schemas/yorkie.v1.ListProjectsResponse' description: "" yorkie.v1.AdminService.LogIn.yorkie.v1.LogInResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.LogInResponse" + $ref: '#/components/schemas/yorkie.v1.LogInResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.LogInResponse" + $ref: '#/components/schemas/yorkie.v1.LogInResponse' description: "" yorkie.v1.AdminService.RemoveDocumentByAdmin.yorkie.v1.RemoveDocumentByAdminResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.RemoveDocumentByAdminResponse" + $ref: '#/components/schemas/yorkie.v1.RemoveDocumentByAdminResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.RemoveDocumentByAdminResponse" + $ref: '#/components/schemas/yorkie.v1.RemoveDocumentByAdminResponse' description: "" yorkie.v1.AdminService.SearchDocuments.yorkie.v1.SearchDocumentsResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.SearchDocumentsResponse" + $ref: '#/components/schemas/yorkie.v1.SearchDocumentsResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.SearchDocumentsResponse" + $ref: '#/components/schemas/yorkie.v1.SearchDocumentsResponse' description: "" yorkie.v1.AdminService.SignUp.yorkie.v1.SignUpResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.SignUpResponse" + $ref: '#/components/schemas/yorkie.v1.SignUpResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.SignUpResponse" + $ref: '#/components/schemas/yorkie.v1.SignUpResponse' description: "" yorkie.v1.AdminService.UpdateProject.yorkie.v1.UpdateProjectResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.UpdateProjectResponse" + $ref: '#/components/schemas/yorkie.v1.UpdateProjectResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.UpdateProjectResponse" + $ref: '#/components/schemas/yorkie.v1.UpdateProjectResponse' description: "" schemas: connect.error: additionalProperties: false - description: "Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation" + description: 'Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation' properties: code: enum: - - CodeCanceled - - CodeUnknown - - CodeInvalidArgument - - CodeDeadlineExceeded - - CodeNotFound - - CodeAlreadyExists - - CodePermissionDenied - - CodeResourceExhausted - - CodeFailedPrecondition - - CodeAborted - - CodeOutOfRange - - CodeInternal - - CodeUnavailable - - CodeDataLoss - - CodeUnauthenticated + - CodeCanceled + - CodeUnknown + - CodeInvalidArgument + - CodeDeadlineExceeded + - CodeNotFound + - CodeAlreadyExists + - CodePermissionDenied + - CodeResourceExhausted + - CodeFailedPrecondition + - CodeAborted + - CodeOutOfRange + - CodeInternal + - CodeUnavailable + - CodeDataLoss + - CodeUnauthenticated examples: - - CodeNotFound + - CodeNotFound type: string message: type: string @@ -645,7 +644,7 @@ components: description: "" properties: id: - $ref: "#/components/schemas/yorkie.v1.ChangeID" + $ref: '#/components/schemas/yorkie.v1.ChangeID' additionalProperties: false description: "" title: id @@ -659,12 +658,12 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.Operation" + $ref: '#/components/schemas/yorkie.v1.Operation' type: object title: operations type: array presenceChange: - $ref: "#/components/schemas/yorkie.v1.PresenceChange" + $ref: '#/components/schemas/yorkie.v1.PresenceChange' additionalProperties: false description: "" title: presence_change @@ -690,15 +689,15 @@ components: additionalProperties: false description: "" oneOf: - - type: string - - type: number + - type: string + - type: number title: lamport serverSeq: additionalProperties: false description: "" oneOf: - - type: string - - type: number + - type: string + - type: number title: server_seq title: ChangeID type: object @@ -744,7 +743,7 @@ components: description: "" properties: project: - $ref: "#/components/schemas/yorkie.v1.Project" + $ref: '#/components/schemas/yorkie.v1.Project' additionalProperties: false description: "" title: project @@ -777,13 +776,13 @@ components: description: "" properties: accessedAt: - $ref: "#/components/schemas/google.protobuf.Timestamp" + $ref: '#/components/schemas/google.protobuf.Timestamp' additionalProperties: false description: "" title: accessed_at type: object createdAt: - $ref: "#/components/schemas/google.protobuf.Timestamp" + $ref: '#/components/schemas/google.protobuf.Timestamp' additionalProperties: false description: "" title: created_at @@ -804,7 +803,7 @@ components: title: snapshot type: string updatedAt: - $ref: "#/components/schemas/google.protobuf.Timestamp" + $ref: '#/components/schemas/google.protobuf.Timestamp' additionalProperties: false description: "" title: updated_at @@ -832,7 +831,7 @@ components: description: "" properties: document: - $ref: "#/components/schemas/yorkie.v1.DocumentSummary" + $ref: '#/components/schemas/yorkie.v1.DocumentSummary' additionalProperties: false description: "" title: document @@ -870,7 +869,7 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.DocumentSummary" + $ref: '#/components/schemas/yorkie.v1.DocumentSummary' type: object title: documents type: array @@ -892,7 +891,7 @@ components: description: "" properties: project: - $ref: "#/components/schemas/yorkie.v1.Project" + $ref: '#/components/schemas/yorkie.v1.Project' additionalProperties: false description: "" title: project @@ -943,8 +942,8 @@ components: additionalProperties: false description: "" oneOf: - - type: string - - type: number + - type: string + - type: number title: server_seq title: GetSnapshotMetaRequest type: object @@ -956,8 +955,8 @@ components: additionalProperties: false description: "" oneOf: - - type: string - - type: number + - type: string + - type: number title: lamport snapshot: additionalProperties: false @@ -972,25 +971,25 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at type: object movedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: moved_at type: object removedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: removed_at type: object type: - $ref: "#/components/schemas/yorkie.v1.ValueType" + $ref: '#/components/schemas/yorkie.v1.ValueType' additionalProperties: false description: "" title: type @@ -1025,8 +1024,8 @@ components: additionalProperties: false description: "" oneOf: - - type: string - - type: number + - type: string + - type: number title: previous_seq projectName: additionalProperties: false @@ -1043,7 +1042,7 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.Change" + $ref: '#/components/schemas/yorkie.v1.Change' type: object title: changes type: array @@ -1088,7 +1087,7 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.DocumentSummary" + $ref: '#/components/schemas/yorkie.v1.DocumentSummary' type: object title: documents type: array @@ -1107,7 +1106,7 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.Project" + $ref: '#/components/schemas/yorkie.v1.Project' type: object title: projects type: array @@ -1150,7 +1149,7 @@ components: title: is_removed type: boolean updatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: updated_at @@ -1167,67 +1166,67 @@ components: description: "" properties: add: - $ref: "#/components/schemas/yorkie.v1.Operation.Add" + $ref: '#/components/schemas/yorkie.v1.Operation.Add' additionalProperties: false description: "" title: add type: object arraySet: - $ref: "#/components/schemas/yorkie.v1.Operation.ArraySet" + $ref: '#/components/schemas/yorkie.v1.Operation.ArraySet' additionalProperties: false description: "" title: array_set type: object edit: - $ref: "#/components/schemas/yorkie.v1.Operation.Edit" + $ref: '#/components/schemas/yorkie.v1.Operation.Edit' additionalProperties: false description: "" title: edit type: object increase: - $ref: "#/components/schemas/yorkie.v1.Operation.Increase" + $ref: '#/components/schemas/yorkie.v1.Operation.Increase' additionalProperties: false description: "" title: increase type: object move: - $ref: "#/components/schemas/yorkie.v1.Operation.Move" + $ref: '#/components/schemas/yorkie.v1.Operation.Move' additionalProperties: false description: "" title: move type: object remove: - $ref: "#/components/schemas/yorkie.v1.Operation.Remove" + $ref: '#/components/schemas/yorkie.v1.Operation.Remove' additionalProperties: false description: "" title: remove type: object select: - $ref: "#/components/schemas/yorkie.v1.Operation.Select" + $ref: '#/components/schemas/yorkie.v1.Operation.Select' additionalProperties: false description: "" title: select type: object set: - $ref: "#/components/schemas/yorkie.v1.Operation.Set" + $ref: '#/components/schemas/yorkie.v1.Operation.Set' additionalProperties: false description: "" title: set type: object style: - $ref: "#/components/schemas/yorkie.v1.Operation.Style" + $ref: '#/components/schemas/yorkie.v1.Operation.Style' additionalProperties: false description: "" title: style type: object treeEdit: - $ref: "#/components/schemas/yorkie.v1.Operation.TreeEdit" + $ref: '#/components/schemas/yorkie.v1.Operation.TreeEdit' additionalProperties: false description: "" title: tree_edit type: object treeStyle: - $ref: "#/components/schemas/yorkie.v1.Operation.TreeStyle" + $ref: '#/components/schemas/yorkie.v1.Operation.TreeStyle' additionalProperties: false description: "" title: tree_style @@ -1239,25 +1238,25 @@ components: description: "" properties: executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object prevCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: prev_created_at type: object value: - $ref: "#/components/schemas/yorkie.v1.JSONElementSimple" + $ref: '#/components/schemas/yorkie.v1.JSONElementSimple' additionalProperties: false description: "" title: value @@ -1269,25 +1268,25 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object value: - $ref: "#/components/schemas/yorkie.v1.JSONElementSimple" + $ref: '#/components/schemas/yorkie.v1.JSONElementSimple' additionalProperties: false description: "" title: value @@ -1314,25 +1313,25 @@ components: title: created_at_map_by_actor type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object from: - $ref: "#/components/schemas/yorkie.v1.TextNodePos" + $ref: '#/components/schemas/yorkie.v1.TextNodePos' additionalProperties: false description: "" title: from type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object to: - $ref: "#/components/schemas/yorkie.v1.TextNodePos" + $ref: '#/components/schemas/yorkie.v1.TextNodePos' additionalProperties: false description: "" title: to @@ -1365,7 +1364,7 @@ components: title: key type: string value: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: value @@ -1377,19 +1376,19 @@ components: description: "" properties: executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object value: - $ref: "#/components/schemas/yorkie.v1.JSONElementSimple" + $ref: '#/components/schemas/yorkie.v1.JSONElementSimple' additionalProperties: false description: "" title: value @@ -1401,25 +1400,25 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object prevCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: prev_created_at @@ -1431,19 +1430,19 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at @@ -1459,25 +1458,25 @@ components: compatibility purposes. properties: executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object from: - $ref: "#/components/schemas/yorkie.v1.TextNodePos" + $ref: '#/components/schemas/yorkie.v1.TextNodePos' additionalProperties: false description: "" title: from type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object to: - $ref: "#/components/schemas/yorkie.v1.TextNodePos" + $ref: '#/components/schemas/yorkie.v1.TextNodePos' additionalProperties: false description: "" title: to @@ -1489,7 +1488,7 @@ components: description: "" properties: executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at @@ -1500,13 +1499,13 @@ components: title: key type: string parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object value: - $ref: "#/components/schemas/yorkie.v1.JSONElementSimple" + $ref: '#/components/schemas/yorkie.v1.JSONElementSimple' additionalProperties: false description: "" title: value @@ -1528,25 +1527,25 @@ components: title: created_at_map_by_actor type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object from: - $ref: "#/components/schemas/yorkie.v1.TextNodePos" + $ref: '#/components/schemas/yorkie.v1.TextNodePos' additionalProperties: false description: "" title: from type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object to: - $ref: "#/components/schemas/yorkie.v1.TextNodePos" + $ref: '#/components/schemas/yorkie.v1.TextNodePos' additionalProperties: false description: "" title: to @@ -1579,7 +1578,7 @@ components: title: key type: string value: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: value @@ -1594,7 +1593,7 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.TreeNodes" + $ref: '#/components/schemas/yorkie.v1.TreeNodes' type: object title: contents type: array @@ -1604,19 +1603,19 @@ components: title: created_at_map_by_actor type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object from: - $ref: "#/components/schemas/yorkie.v1.TreePos" + $ref: '#/components/schemas/yorkie.v1.TreePos' additionalProperties: false description: "" title: from type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at @@ -1627,7 +1626,7 @@ components: title: split_level type: integer to: - $ref: "#/components/schemas/yorkie.v1.TreePos" + $ref: '#/components/schemas/yorkie.v1.TreePos' additionalProperties: false description: "" title: to @@ -1644,7 +1643,7 @@ components: title: key type: string value: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: value @@ -1673,25 +1672,25 @@ components: title: created_at_map_by_actor type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object from: - $ref: "#/components/schemas/yorkie.v1.TreePos" + $ref: '#/components/schemas/yorkie.v1.TreePos' additionalProperties: false description: "" title: from type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object to: - $ref: "#/components/schemas/yorkie.v1.TreePos" + $ref: '#/components/schemas/yorkie.v1.TreePos' additionalProperties: false description: "" title: to @@ -1724,7 +1723,7 @@ components: title: key type: string value: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: value @@ -1763,13 +1762,13 @@ components: description: "" properties: presence: - $ref: "#/components/schemas/yorkie.v1.Presence" + $ref: '#/components/schemas/yorkie.v1.Presence' additionalProperties: false description: "" title: presence type: object type: - $ref: "#/components/schemas/yorkie.v1.PresenceChange.ChangeType" + $ref: '#/components/schemas/yorkie.v1.PresenceChange.ChangeType' additionalProperties: false description: "" title: type @@ -1778,14 +1777,14 @@ components: yorkie.v1.PresenceChange.ChangeType: description: "" enum: - - - CHANGE_TYPE_UNSPECIFIED - - 0 - - CHANGE_TYPE_PUT - - 1 - - CHANGE_TYPE_DELETE - - 2 - - CHANGE_TYPE_CLEAR - - 3 + - - CHANGE_TYPE_UNSPECIFIED + - 0 + - CHANGE_TYPE_PUT + - 1 + - CHANGE_TYPE_DELETE + - 2 + - CHANGE_TYPE_CLEAR + - 3 title: ChangeType type: string yorkie.v1.Project: @@ -1810,7 +1809,7 @@ components: title: client_deactivate_threshold type: string createdAt: - $ref: "#/components/schemas/google.protobuf.Timestamp" + $ref: '#/components/schemas/google.protobuf.Timestamp' additionalProperties: false description: "" title: created_at @@ -1836,7 +1835,7 @@ components: title: secret_key type: string updatedAt: - $ref: "#/components/schemas/google.protobuf.Timestamp" + $ref: '#/components/schemas/google.protobuf.Timestamp' additionalProperties: false description: "" title: updated_at @@ -1898,7 +1897,7 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.DocumentSummary" + $ref: '#/components/schemas/yorkie.v1.DocumentSummary' type: object title: documents type: array @@ -1930,7 +1929,7 @@ components: description: "" properties: user: - $ref: "#/components/schemas/yorkie.v1.User" + $ref: '#/components/schemas/yorkie.v1.User' additionalProperties: false description: "" title: user @@ -1942,7 +1941,7 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at @@ -1978,8 +1977,8 @@ components: additionalProperties: false description: "" oneOf: - - type: string - - type: number + - type: string + - type: number title: lamport title: TimeTicket type: object @@ -1998,25 +1997,25 @@ components: title: depth type: integer id: - $ref: "#/components/schemas/yorkie.v1.TreeNodeID" + $ref: '#/components/schemas/yorkie.v1.TreeNodeID' additionalProperties: false description: "" title: id type: object insNextId: - $ref: "#/components/schemas/yorkie.v1.TreeNodeID" + $ref: '#/components/schemas/yorkie.v1.TreeNodeID' additionalProperties: false description: "" title: ins_next_id type: object insPrevId: - $ref: "#/components/schemas/yorkie.v1.TreeNodeID" + $ref: '#/components/schemas/yorkie.v1.TreeNodeID' additionalProperties: false description: "" title: ins_prev_id type: object removedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: removed_at @@ -2043,7 +2042,7 @@ components: title: key type: string value: - $ref: "#/components/schemas/yorkie.v1.NodeAttr" + $ref: '#/components/schemas/yorkie.v1.NodeAttr' additionalProperties: false description: "" title: value @@ -2055,7 +2054,7 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at @@ -2075,7 +2074,7 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.TreeNode" + $ref: '#/components/schemas/yorkie.v1.TreeNode' type: object title: content type: array @@ -2086,13 +2085,13 @@ components: description: "" properties: leftSiblingId: - $ref: "#/components/schemas/yorkie.v1.TreeNodeID" + $ref: '#/components/schemas/yorkie.v1.TreeNodeID' additionalProperties: false description: "" title: left_sibling_id type: object parentId: - $ref: "#/components/schemas/yorkie.v1.TreeNodeID" + $ref: '#/components/schemas/yorkie.v1.TreeNodeID' additionalProperties: false description: "" title: parent_id @@ -2104,25 +2103,25 @@ components: description: "" properties: authWebhookMethods: - $ref: "#/components/schemas/yorkie.v1.UpdatableProjectFields.AuthWebhookMethods" + $ref: '#/components/schemas/yorkie.v1.UpdatableProjectFields.AuthWebhookMethods' additionalProperties: false description: "" title: auth_webhook_methods type: object authWebhookUrl: - $ref: "#/components/schemas/google.protobuf.StringValue" + $ref: '#/components/schemas/google.protobuf.StringValue' additionalProperties: false description: "" title: auth_webhook_url type: object clientDeactivateThreshold: - $ref: "#/components/schemas/google.protobuf.StringValue" + $ref: '#/components/schemas/google.protobuf.StringValue' additionalProperties: false description: "" title: client_deactivate_threshold type: object name: - $ref: "#/components/schemas/google.protobuf.StringValue" + $ref: '#/components/schemas/google.protobuf.StringValue' additionalProperties: false description: "" title: name @@ -2147,7 +2146,7 @@ components: description: "" properties: fields: - $ref: "#/components/schemas/yorkie.v1.UpdatableProjectFields" + $ref: '#/components/schemas/yorkie.v1.UpdatableProjectFields' additionalProperties: false description: "" title: fields @@ -2164,7 +2163,7 @@ components: description: "" properties: project: - $ref: "#/components/schemas/yorkie.v1.Project" + $ref: '#/components/schemas/yorkie.v1.Project' additionalProperties: false description: "" title: project @@ -2176,7 +2175,7 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/google.protobuf.Timestamp" + $ref: '#/components/schemas/google.protobuf.Timestamp' additionalProperties: false description: "" title: created_at @@ -2196,34 +2195,34 @@ components: yorkie.v1.ValueType: description: "" enum: - - - VALUE_TYPE_NULL - - 0 - - VALUE_TYPE_BOOLEAN - - 1 - - VALUE_TYPE_INTEGER - - 2 - - VALUE_TYPE_LONG - - 3 - - VALUE_TYPE_DOUBLE - - 4 - - VALUE_TYPE_STRING - - 5 - - VALUE_TYPE_BYTES - - 6 - - VALUE_TYPE_DATE - - 7 - - VALUE_TYPE_JSON_OBJECT - - 8 - - VALUE_TYPE_JSON_ARRAY - - 9 - - VALUE_TYPE_TEXT - - 10 - - VALUE_TYPE_INTEGER_CNT - - 11 - - VALUE_TYPE_LONG_CNT - - 12 - - VALUE_TYPE_TREE - - 13 + - - VALUE_TYPE_NULL + - 0 + - VALUE_TYPE_BOOLEAN + - 1 + - VALUE_TYPE_INTEGER + - 2 + - VALUE_TYPE_LONG + - 3 + - VALUE_TYPE_DOUBLE + - 4 + - VALUE_TYPE_STRING + - 5 + - VALUE_TYPE_BYTES + - 6 + - VALUE_TYPE_DATE + - 7 + - VALUE_TYPE_JSON_OBJECT + - 8 + - VALUE_TYPE_JSON_ARRAY + - 9 + - VALUE_TYPE_TEXT + - 10 + - VALUE_TYPE_INTEGER_CNT + - 11 + - VALUE_TYPE_LONG_CNT + - 12 + - VALUE_TYPE_TREE + - 13 title: ValueType type: string securitySchemes: @@ -2232,7 +2231,7 @@ components: name: Authorization type: apiKey security: - - ApiKeyAuth: [] +- ApiKeyAuth: [] tags: - - description: Admin is a service that provides a API for Admin. - name: yorkie.v1.AdminService +- description: Admin is a service that provides a API for Admin. + name: yorkie.v1.AdminService diff --git a/api/docs/yorkie/v1/resources.openapi.yaml b/api/docs/yorkie/v1/resources.openapi.yaml index 4252c0593..3ffb27254 100644 --- a/api/docs/yorkie/v1/resources.openapi.yaml +++ b/api/docs/yorkie/v1/resources.openapi.yaml @@ -1,15 +1,14 @@ openapi: 3.1.0 info: - description: - Yorkie is an open source document store for building collaborative + description: Yorkie is an open source document store for building collaborative editing applications. title: Yorkie version: v0.5.1 servers: - - description: Production server - url: https://api.yorkie.dev - - description: Local server - url: http://localhost:8080 +- description: Production server + url: https://api.yorkie.dev +- description: Local server + url: http://localhost:8080 paths: {} components: responses: @@ -17,35 +16,35 @@ components: content: application/json: schema: - $ref: "#/components/schemas/connect.error" + $ref: '#/components/schemas/connect.error' application/proto: schema: - $ref: "#/components/schemas/connect.error" + $ref: '#/components/schemas/connect.error' description: "" schemas: connect.error: additionalProperties: false - description: "Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation" + description: 'Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation' properties: code: enum: - - CodeCanceled - - CodeUnknown - - CodeInvalidArgument - - CodeDeadlineExceeded - - CodeNotFound - - CodeAlreadyExists - - CodePermissionDenied - - CodeResourceExhausted - - CodeFailedPrecondition - - CodeAborted - - CodeOutOfRange - - CodeInternal - - CodeUnavailable - - CodeDataLoss - - CodeUnauthenticated + - CodeCanceled + - CodeUnknown + - CodeInvalidArgument + - CodeDeadlineExceeded + - CodeNotFound + - CodeAlreadyExists + - CodePermissionDenied + - CodeResourceExhausted + - CodeFailedPrecondition + - CodeAborted + - CodeOutOfRange + - CodeInternal + - CodeUnavailable + - CodeDataLoss + - CodeUnauthenticated examples: - - CodeNotFound + - CodeNotFound type: string message: type: string @@ -164,7 +163,7 @@ components: description: "" properties: id: - $ref: "#/components/schemas/yorkie.v1.ChangeID" + $ref: '#/components/schemas/yorkie.v1.ChangeID' additionalProperties: false description: "" title: id @@ -178,12 +177,12 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.Operation" + $ref: '#/components/schemas/yorkie.v1.Operation' type: object title: operations type: array presenceChange: - $ref: "#/components/schemas/yorkie.v1.PresenceChange" + $ref: '#/components/schemas/yorkie.v1.PresenceChange' additionalProperties: false description: "" title: presence_change @@ -209,15 +208,15 @@ components: additionalProperties: false description: "" oneOf: - - type: string - - type: number + - type: string + - type: number title: lamport serverSeq: additionalProperties: false description: "" oneOf: - - type: string - - type: number + - type: string + - type: number title: server_seq title: ChangeID type: object @@ -231,12 +230,12 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.Change" + $ref: '#/components/schemas/yorkie.v1.Change' type: object title: changes type: array checkpoint: - $ref: "#/components/schemas/yorkie.v1.Checkpoint" + $ref: '#/components/schemas/yorkie.v1.Checkpoint' additionalProperties: false description: "" title: checkpoint @@ -252,7 +251,7 @@ components: title: is_removed type: boolean minSyncedTicket: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: min_synced_ticket @@ -278,8 +277,8 @@ components: additionalProperties: false description: "" oneOf: - - type: string - - type: number + - type: string + - type: number title: server_seq title: Checkpoint type: object @@ -288,7 +287,7 @@ components: description: "" properties: body: - $ref: "#/components/schemas/yorkie.v1.DocEventBody" + $ref: '#/components/schemas/yorkie.v1.DocEventBody' additionalProperties: false description: "" title: body @@ -299,7 +298,7 @@ components: title: publisher type: string type: - $ref: "#/components/schemas/yorkie.v1.DocEventType" + $ref: '#/components/schemas/yorkie.v1.DocEventType' additionalProperties: false description: "" title: type @@ -325,14 +324,14 @@ components: yorkie.v1.DocEventType: description: "" enum: - - - DOC_EVENT_TYPE_DOCUMENT_CHANGED - - 0 - - DOC_EVENT_TYPE_DOCUMENT_WATCHED - - 1 - - DOC_EVENT_TYPE_DOCUMENT_UNWATCHED - - 2 - - DOC_EVENT_TYPE_DOCUMENT_BROADCAST - - 3 + - - DOC_EVENT_TYPE_DOCUMENT_CHANGED + - 0 + - DOC_EVENT_TYPE_DOCUMENT_WATCHED + - 1 + - DOC_EVENT_TYPE_DOCUMENT_UNWATCHED + - 2 + - DOC_EVENT_TYPE_DOCUMENT_BROADCAST + - 3 title: DocEventType type: string yorkie.v1.DocumentSummary: @@ -340,13 +339,13 @@ components: description: "" properties: accessedAt: - $ref: "#/components/schemas/google.protobuf.Timestamp" + $ref: '#/components/schemas/google.protobuf.Timestamp' additionalProperties: false description: "" title: accessed_at type: object createdAt: - $ref: "#/components/schemas/google.protobuf.Timestamp" + $ref: '#/components/schemas/google.protobuf.Timestamp' additionalProperties: false description: "" title: created_at @@ -367,7 +366,7 @@ components: title: snapshot type: string updatedAt: - $ref: "#/components/schemas/google.protobuf.Timestamp" + $ref: '#/components/schemas/google.protobuf.Timestamp' additionalProperties: false description: "" title: updated_at @@ -379,37 +378,37 @@ components: description: "" properties: counter: - $ref: "#/components/schemas/yorkie.v1.JSONElement.Counter" + $ref: '#/components/schemas/yorkie.v1.JSONElement.Counter' additionalProperties: false description: "" title: counter type: object jsonArray: - $ref: "#/components/schemas/yorkie.v1.JSONElement.JSONArray" + $ref: '#/components/schemas/yorkie.v1.JSONElement.JSONArray' additionalProperties: false description: "" title: json_array type: object jsonObject: - $ref: "#/components/schemas/yorkie.v1.JSONElement.JSONObject" + $ref: '#/components/schemas/yorkie.v1.JSONElement.JSONObject' additionalProperties: false description: "" title: json_object type: object primitive: - $ref: "#/components/schemas/yorkie.v1.JSONElement.Primitive" + $ref: '#/components/schemas/yorkie.v1.JSONElement.Primitive' additionalProperties: false description: "" title: primitive type: object text: - $ref: "#/components/schemas/yorkie.v1.JSONElement.Text" + $ref: '#/components/schemas/yorkie.v1.JSONElement.Text' additionalProperties: false description: "" title: text type: object tree: - $ref: "#/components/schemas/yorkie.v1.JSONElement.Tree" + $ref: '#/components/schemas/yorkie.v1.JSONElement.Tree' additionalProperties: false description: "" title: tree @@ -421,25 +420,25 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at type: object movedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: moved_at type: object removedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: removed_at type: object type: - $ref: "#/components/schemas/yorkie.v1.ValueType" + $ref: '#/components/schemas/yorkie.v1.ValueType' additionalProperties: false description: "" title: type @@ -456,13 +455,13 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at type: object movedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: moved_at @@ -471,12 +470,12 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.RGANode" + $ref: '#/components/schemas/yorkie.v1.RGANode' type: object title: nodes type: array removedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: removed_at @@ -488,13 +487,13 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at type: object movedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: moved_at @@ -503,12 +502,12 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.RHTNode" + $ref: '#/components/schemas/yorkie.v1.RHTNode' type: object title: nodes type: array removedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: removed_at @@ -520,25 +519,25 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at type: object movedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: moved_at type: object removedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: removed_at type: object type: - $ref: "#/components/schemas/yorkie.v1.ValueType" + $ref: '#/components/schemas/yorkie.v1.ValueType' additionalProperties: false description: "" title: type @@ -555,13 +554,13 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at type: object movedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: moved_at @@ -570,12 +569,12 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.TextNode" + $ref: '#/components/schemas/yorkie.v1.TextNode' type: object title: nodes type: array removedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: removed_at @@ -587,13 +586,13 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at type: object movedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: moved_at @@ -602,12 +601,12 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.TreeNode" + $ref: '#/components/schemas/yorkie.v1.TreeNode' type: object title: nodes type: array removedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: removed_at @@ -619,25 +618,25 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at type: object movedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: moved_at type: object removedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: removed_at type: object type: - $ref: "#/components/schemas/yorkie.v1.ValueType" + $ref: '#/components/schemas/yorkie.v1.ValueType' additionalProperties: false description: "" title: type @@ -659,7 +658,7 @@ components: title: is_removed type: boolean updatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: updated_at @@ -676,67 +675,67 @@ components: description: "" properties: add: - $ref: "#/components/schemas/yorkie.v1.Operation.Add" + $ref: '#/components/schemas/yorkie.v1.Operation.Add' additionalProperties: false description: "" title: add type: object arraySet: - $ref: "#/components/schemas/yorkie.v1.Operation.ArraySet" + $ref: '#/components/schemas/yorkie.v1.Operation.ArraySet' additionalProperties: false description: "" title: array_set type: object edit: - $ref: "#/components/schemas/yorkie.v1.Operation.Edit" + $ref: '#/components/schemas/yorkie.v1.Operation.Edit' additionalProperties: false description: "" title: edit type: object increase: - $ref: "#/components/schemas/yorkie.v1.Operation.Increase" + $ref: '#/components/schemas/yorkie.v1.Operation.Increase' additionalProperties: false description: "" title: increase type: object move: - $ref: "#/components/schemas/yorkie.v1.Operation.Move" + $ref: '#/components/schemas/yorkie.v1.Operation.Move' additionalProperties: false description: "" title: move type: object remove: - $ref: "#/components/schemas/yorkie.v1.Operation.Remove" + $ref: '#/components/schemas/yorkie.v1.Operation.Remove' additionalProperties: false description: "" title: remove type: object select: - $ref: "#/components/schemas/yorkie.v1.Operation.Select" + $ref: '#/components/schemas/yorkie.v1.Operation.Select' additionalProperties: false description: "" title: select type: object set: - $ref: "#/components/schemas/yorkie.v1.Operation.Set" + $ref: '#/components/schemas/yorkie.v1.Operation.Set' additionalProperties: false description: "" title: set type: object style: - $ref: "#/components/schemas/yorkie.v1.Operation.Style" + $ref: '#/components/schemas/yorkie.v1.Operation.Style' additionalProperties: false description: "" title: style type: object treeEdit: - $ref: "#/components/schemas/yorkie.v1.Operation.TreeEdit" + $ref: '#/components/schemas/yorkie.v1.Operation.TreeEdit' additionalProperties: false description: "" title: tree_edit type: object treeStyle: - $ref: "#/components/schemas/yorkie.v1.Operation.TreeStyle" + $ref: '#/components/schemas/yorkie.v1.Operation.TreeStyle' additionalProperties: false description: "" title: tree_style @@ -748,25 +747,25 @@ components: description: "" properties: executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object prevCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: prev_created_at type: object value: - $ref: "#/components/schemas/yorkie.v1.JSONElementSimple" + $ref: '#/components/schemas/yorkie.v1.JSONElementSimple' additionalProperties: false description: "" title: value @@ -778,25 +777,25 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object value: - $ref: "#/components/schemas/yorkie.v1.JSONElementSimple" + $ref: '#/components/schemas/yorkie.v1.JSONElementSimple' additionalProperties: false description: "" title: value @@ -823,25 +822,25 @@ components: title: created_at_map_by_actor type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object from: - $ref: "#/components/schemas/yorkie.v1.TextNodePos" + $ref: '#/components/schemas/yorkie.v1.TextNodePos' additionalProperties: false description: "" title: from type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object to: - $ref: "#/components/schemas/yorkie.v1.TextNodePos" + $ref: '#/components/schemas/yorkie.v1.TextNodePos' additionalProperties: false description: "" title: to @@ -874,7 +873,7 @@ components: title: key type: string value: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: value @@ -886,19 +885,19 @@ components: description: "" properties: executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object value: - $ref: "#/components/schemas/yorkie.v1.JSONElementSimple" + $ref: '#/components/schemas/yorkie.v1.JSONElementSimple' additionalProperties: false description: "" title: value @@ -910,25 +909,25 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object prevCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: prev_created_at @@ -940,19 +939,19 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at @@ -968,25 +967,25 @@ components: compatibility purposes. properties: executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object from: - $ref: "#/components/schemas/yorkie.v1.TextNodePos" + $ref: '#/components/schemas/yorkie.v1.TextNodePos' additionalProperties: false description: "" title: from type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object to: - $ref: "#/components/schemas/yorkie.v1.TextNodePos" + $ref: '#/components/schemas/yorkie.v1.TextNodePos' additionalProperties: false description: "" title: to @@ -998,7 +997,7 @@ components: description: "" properties: executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at @@ -1009,13 +1008,13 @@ components: title: key type: string parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object value: - $ref: "#/components/schemas/yorkie.v1.JSONElementSimple" + $ref: '#/components/schemas/yorkie.v1.JSONElementSimple' additionalProperties: false description: "" title: value @@ -1037,25 +1036,25 @@ components: title: created_at_map_by_actor type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object from: - $ref: "#/components/schemas/yorkie.v1.TextNodePos" + $ref: '#/components/schemas/yorkie.v1.TextNodePos' additionalProperties: false description: "" title: from type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object to: - $ref: "#/components/schemas/yorkie.v1.TextNodePos" + $ref: '#/components/schemas/yorkie.v1.TextNodePos' additionalProperties: false description: "" title: to @@ -1088,7 +1087,7 @@ components: title: key type: string value: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: value @@ -1103,7 +1102,7 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.TreeNodes" + $ref: '#/components/schemas/yorkie.v1.TreeNodes' type: object title: contents type: array @@ -1113,19 +1112,19 @@ components: title: created_at_map_by_actor type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object from: - $ref: "#/components/schemas/yorkie.v1.TreePos" + $ref: '#/components/schemas/yorkie.v1.TreePos' additionalProperties: false description: "" title: from type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at @@ -1136,7 +1135,7 @@ components: title: split_level type: integer to: - $ref: "#/components/schemas/yorkie.v1.TreePos" + $ref: '#/components/schemas/yorkie.v1.TreePos' additionalProperties: false description: "" title: to @@ -1153,7 +1152,7 @@ components: title: key type: string value: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: value @@ -1182,25 +1181,25 @@ components: title: created_at_map_by_actor type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object from: - $ref: "#/components/schemas/yorkie.v1.TreePos" + $ref: '#/components/schemas/yorkie.v1.TreePos' additionalProperties: false description: "" title: from type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object to: - $ref: "#/components/schemas/yorkie.v1.TreePos" + $ref: '#/components/schemas/yorkie.v1.TreePos' additionalProperties: false description: "" title: to @@ -1233,7 +1232,7 @@ components: title: key type: string value: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: value @@ -1272,13 +1271,13 @@ components: description: "" properties: presence: - $ref: "#/components/schemas/yorkie.v1.Presence" + $ref: '#/components/schemas/yorkie.v1.Presence' additionalProperties: false description: "" title: presence type: object type: - $ref: "#/components/schemas/yorkie.v1.PresenceChange.ChangeType" + $ref: '#/components/schemas/yorkie.v1.PresenceChange.ChangeType' additionalProperties: false description: "" title: type @@ -1287,14 +1286,14 @@ components: yorkie.v1.PresenceChange.ChangeType: description: "" enum: - - - CHANGE_TYPE_UNSPECIFIED - - 0 - - CHANGE_TYPE_PUT - - 1 - - CHANGE_TYPE_DELETE - - 2 - - CHANGE_TYPE_CLEAR - - 3 + - - CHANGE_TYPE_UNSPECIFIED + - 0 + - CHANGE_TYPE_PUT + - 1 + - CHANGE_TYPE_DELETE + - 2 + - CHANGE_TYPE_CLEAR + - 3 title: ChangeType type: string yorkie.v1.Project: @@ -1319,7 +1318,7 @@ components: title: client_deactivate_threshold type: string createdAt: - $ref: "#/components/schemas/google.protobuf.Timestamp" + $ref: '#/components/schemas/google.protobuf.Timestamp' additionalProperties: false description: "" title: created_at @@ -1345,7 +1344,7 @@ components: title: secret_key type: string updatedAt: - $ref: "#/components/schemas/google.protobuf.Timestamp" + $ref: '#/components/schemas/google.protobuf.Timestamp' additionalProperties: false description: "" title: updated_at @@ -1357,13 +1356,13 @@ components: description: "" properties: element: - $ref: "#/components/schemas/yorkie.v1.JSONElement" + $ref: '#/components/schemas/yorkie.v1.JSONElement' additionalProperties: false description: "" title: element type: object next: - $ref: "#/components/schemas/yorkie.v1.RGANode" + $ref: '#/components/schemas/yorkie.v1.RGANode' additionalProperties: false description: "" title: next @@ -1375,7 +1374,7 @@ components: description: "" properties: element: - $ref: "#/components/schemas/yorkie.v1.JSONElement" + $ref: '#/components/schemas/yorkie.v1.JSONElement' additionalProperties: false description: "" title: element @@ -1400,7 +1399,7 @@ components: title: presences type: object root: - $ref: "#/components/schemas/yorkie.v1.JSONElement" + $ref: '#/components/schemas/yorkie.v1.JSONElement' additionalProperties: false description: "" title: root @@ -1417,7 +1416,7 @@ components: title: key type: string value: - $ref: "#/components/schemas/yorkie.v1.Presence" + $ref: '#/components/schemas/yorkie.v1.Presence' additionalProperties: false description: "" title: value @@ -1434,19 +1433,19 @@ components: title: attributes type: object id: - $ref: "#/components/schemas/yorkie.v1.TextNodeID" + $ref: '#/components/schemas/yorkie.v1.TextNodeID' additionalProperties: false description: "" title: id type: object insPrevId: - $ref: "#/components/schemas/yorkie.v1.TextNodeID" + $ref: '#/components/schemas/yorkie.v1.TextNodeID' additionalProperties: false description: "" title: ins_prev_id type: object removedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: removed_at @@ -1468,7 +1467,7 @@ components: title: key type: string value: - $ref: "#/components/schemas/yorkie.v1.NodeAttr" + $ref: '#/components/schemas/yorkie.v1.NodeAttr' additionalProperties: false description: "" title: value @@ -1480,7 +1479,7 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at @@ -1497,7 +1496,7 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at @@ -1533,8 +1532,8 @@ components: additionalProperties: false description: "" oneOf: - - type: string - - type: number + - type: string + - type: number title: lamport title: TimeTicket type: object @@ -1553,25 +1552,25 @@ components: title: depth type: integer id: - $ref: "#/components/schemas/yorkie.v1.TreeNodeID" + $ref: '#/components/schemas/yorkie.v1.TreeNodeID' additionalProperties: false description: "" title: id type: object insNextId: - $ref: "#/components/schemas/yorkie.v1.TreeNodeID" + $ref: '#/components/schemas/yorkie.v1.TreeNodeID' additionalProperties: false description: "" title: ins_next_id type: object insPrevId: - $ref: "#/components/schemas/yorkie.v1.TreeNodeID" + $ref: '#/components/schemas/yorkie.v1.TreeNodeID' additionalProperties: false description: "" title: ins_prev_id type: object removedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: removed_at @@ -1598,7 +1597,7 @@ components: title: key type: string value: - $ref: "#/components/schemas/yorkie.v1.NodeAttr" + $ref: '#/components/schemas/yorkie.v1.NodeAttr' additionalProperties: false description: "" title: value @@ -1610,7 +1609,7 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at @@ -1630,7 +1629,7 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.TreeNode" + $ref: '#/components/schemas/yorkie.v1.TreeNode' type: object title: content type: array @@ -1641,13 +1640,13 @@ components: description: "" properties: leftSiblingId: - $ref: "#/components/schemas/yorkie.v1.TreeNodeID" + $ref: '#/components/schemas/yorkie.v1.TreeNodeID' additionalProperties: false description: "" title: left_sibling_id type: object parentId: - $ref: "#/components/schemas/yorkie.v1.TreeNodeID" + $ref: '#/components/schemas/yorkie.v1.TreeNodeID' additionalProperties: false description: "" title: parent_id @@ -1659,25 +1658,25 @@ components: description: "" properties: authWebhookMethods: - $ref: "#/components/schemas/yorkie.v1.UpdatableProjectFields.AuthWebhookMethods" + $ref: '#/components/schemas/yorkie.v1.UpdatableProjectFields.AuthWebhookMethods' additionalProperties: false description: "" title: auth_webhook_methods type: object authWebhookUrl: - $ref: "#/components/schemas/google.protobuf.StringValue" + $ref: '#/components/schemas/google.protobuf.StringValue' additionalProperties: false description: "" title: auth_webhook_url type: object clientDeactivateThreshold: - $ref: "#/components/schemas/google.protobuf.StringValue" + $ref: '#/components/schemas/google.protobuf.StringValue' additionalProperties: false description: "" title: client_deactivate_threshold type: object name: - $ref: "#/components/schemas/google.protobuf.StringValue" + $ref: '#/components/schemas/google.protobuf.StringValue' additionalProperties: false description: "" title: name @@ -1702,7 +1701,7 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/google.protobuf.Timestamp" + $ref: '#/components/schemas/google.protobuf.Timestamp' additionalProperties: false description: "" title: created_at @@ -1722,34 +1721,34 @@ components: yorkie.v1.ValueType: description: "" enum: - - - VALUE_TYPE_NULL - - 0 - - VALUE_TYPE_BOOLEAN - - 1 - - VALUE_TYPE_INTEGER - - 2 - - VALUE_TYPE_LONG - - 3 - - VALUE_TYPE_DOUBLE - - 4 - - VALUE_TYPE_STRING - - 5 - - VALUE_TYPE_BYTES - - 6 - - VALUE_TYPE_DATE - - 7 - - VALUE_TYPE_JSON_OBJECT - - 8 - - VALUE_TYPE_JSON_ARRAY - - 9 - - VALUE_TYPE_TEXT - - 10 - - VALUE_TYPE_INTEGER_CNT - - 11 - - VALUE_TYPE_LONG_CNT - - 12 - - VALUE_TYPE_TREE - - 13 + - - VALUE_TYPE_NULL + - 0 + - VALUE_TYPE_BOOLEAN + - 1 + - VALUE_TYPE_INTEGER + - 2 + - VALUE_TYPE_LONG + - 3 + - VALUE_TYPE_DOUBLE + - 4 + - VALUE_TYPE_STRING + - 5 + - VALUE_TYPE_BYTES + - 6 + - VALUE_TYPE_DATE + - 7 + - VALUE_TYPE_JSON_OBJECT + - 8 + - VALUE_TYPE_JSON_ARRAY + - 9 + - VALUE_TYPE_TEXT + - 10 + - VALUE_TYPE_INTEGER_CNT + - 11 + - VALUE_TYPE_LONG_CNT + - 12 + - VALUE_TYPE_TREE + - 13 title: ValueType type: string securitySchemes: @@ -1758,4 +1757,4 @@ components: name: Authorization type: apiKey security: - - ApiKeyAuth: [] +- ApiKeyAuth: [] diff --git a/api/docs/yorkie/v1/system.openapi.yaml b/api/docs/yorkie/v1/system.openapi.yaml new file mode 100644 index 000000000..6f3b92d2f --- /dev/null +++ b/api/docs/yorkie/v1/system.openapi.yaml @@ -0,0 +1,125 @@ +openapi: 3.1.0 +info: + description: Yorkie is an open source document store for building collaborative + editing applications. + title: Yorkie + version: v0.5.1 +servers: +- description: Production server + url: https://api.yorkie.dev +- description: Local server + url: http://localhost:8080 +paths: + /yorkie.v1.SystemService/DetachDocument: + post: + description: "" + requestBody: + $ref: '#/components/requestBodies/yorkie.v1.SystemService.DetachDocument.yorkie.v1.DetachDocumentRequestBySystem' + responses: + "200": + $ref: '#/components/responses/yorkie.v1.SystemService.DetachDocument.yorkie.v1.DetachDocumentResponseBySystem' + default: + $ref: '#/components/responses/connect.error' + tags: + - yorkie.v1.SystemService +components: + requestBodies: + yorkie.v1.SystemService.DetachDocument.yorkie.v1.DetachDocumentRequestBySystem: + content: + application/json: + schema: + $ref: '#/components/schemas/yorkie.v1.DetachDocumentRequestBySystem' + application/proto: + schema: + $ref: '#/components/schemas/yorkie.v1.DetachDocumentRequestBySystem' + required: true + responses: + connect.error: + content: + application/json: + schema: + $ref: '#/components/schemas/connect.error' + application/proto: + schema: + $ref: '#/components/schemas/connect.error' + description: "" + yorkie.v1.SystemService.DetachDocument.yorkie.v1.DetachDocumentResponseBySystem: + content: + application/json: + schema: + $ref: '#/components/schemas/yorkie.v1.DetachDocumentResponseBySystem' + application/proto: + schema: + $ref: '#/components/schemas/yorkie.v1.DetachDocumentResponseBySystem' + description: "" + schemas: + connect.error: + additionalProperties: false + description: 'Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation' + properties: + code: + enum: + - CodeCanceled + - CodeUnknown + - CodeInvalidArgument + - CodeDeadlineExceeded + - CodeNotFound + - CodeAlreadyExists + - CodePermissionDenied + - CodeResourceExhausted + - CodeFailedPrecondition + - CodeAborted + - CodeOutOfRange + - CodeInternal + - CodeUnavailable + - CodeDataLoss + - CodeUnauthenticated + examples: + - CodeNotFound + type: string + message: + type: string + title: Connect Error + type: object + yorkie.v1.DetachDocumentRequestBySystem: + additionalProperties: false + description: "" + properties: + clientId: + additionalProperties: false + description: "" + title: client_id + type: string + documentId: + additionalProperties: false + description: "" + title: document_id + type: string + documentKey: + additionalProperties: false + description: "" + title: document_key + type: string + projectId: + additionalProperties: false + description: 'TODO(hackerwins): Consider to replace this fields with types.Project, + types.Client, types.DocumentSummary' + title: project_id + type: string + title: DetachDocumentRequestBySystem + type: object + yorkie.v1.DetachDocumentResponseBySystem: + additionalProperties: false + description: "" + title: DetachDocumentResponseBySystem + type: object + securitySchemes: + ApiKeyAuth: + in: header + name: Authorization + type: apiKey +security: +- ApiKeyAuth: [] +tags: +- description: System is a service that provides an API for Cluster. + name: yorkie.v1.SystemService diff --git a/api/docs/yorkie/v1/yorkie.openapi.yaml b/api/docs/yorkie/v1/yorkie.openapi.yaml index bdd4bca49..540d0ad16 100644 --- a/api/docs/yorkie/v1/yorkie.openapi.yaml +++ b/api/docs/yorkie/v1/yorkie.openapi.yaml @@ -1,176 +1,175 @@ openapi: 3.1.0 info: - description: - Yorkie is an open source document store for building collaborative + description: Yorkie is an open source document store for building collaborative editing applications. title: Yorkie version: v0.5.1 servers: - - description: Production server - url: https://api.yorkie.dev - - description: Local server - url: http://localhost:8080 +- description: Production server + url: https://api.yorkie.dev +- description: Local server + url: http://localhost:8080 paths: /yorkie.v1.YorkieService/ActivateClient: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.YorkieService.ActivateClient.yorkie.v1.ActivateClientRequest" + $ref: '#/components/requestBodies/yorkie.v1.YorkieService.ActivateClient.yorkie.v1.ActivateClientRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.YorkieService.ActivateClient.yorkie.v1.ActivateClientResponse" + $ref: '#/components/responses/yorkie.v1.YorkieService.ActivateClient.yorkie.v1.ActivateClientResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.YorkieService + - yorkie.v1.YorkieService /yorkie.v1.YorkieService/AttachDocument: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.YorkieService.AttachDocument.yorkie.v1.AttachDocumentRequest" + $ref: '#/components/requestBodies/yorkie.v1.YorkieService.AttachDocument.yorkie.v1.AttachDocumentRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.YorkieService.AttachDocument.yorkie.v1.AttachDocumentResponse" + $ref: '#/components/responses/yorkie.v1.YorkieService.AttachDocument.yorkie.v1.AttachDocumentResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.YorkieService + - yorkie.v1.YorkieService /yorkie.v1.YorkieService/Broadcast: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.YorkieService.Broadcast.yorkie.v1.BroadcastRequest" + $ref: '#/components/requestBodies/yorkie.v1.YorkieService.Broadcast.yorkie.v1.BroadcastRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.YorkieService.Broadcast.yorkie.v1.BroadcastResponse" + $ref: '#/components/responses/yorkie.v1.YorkieService.Broadcast.yorkie.v1.BroadcastResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.YorkieService + - yorkie.v1.YorkieService /yorkie.v1.YorkieService/DeactivateClient: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.YorkieService.DeactivateClient.yorkie.v1.DeactivateClientRequest" + $ref: '#/components/requestBodies/yorkie.v1.YorkieService.DeactivateClient.yorkie.v1.DeactivateClientRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.YorkieService.DeactivateClient.yorkie.v1.DeactivateClientResponse" + $ref: '#/components/responses/yorkie.v1.YorkieService.DeactivateClient.yorkie.v1.DeactivateClientResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.YorkieService + - yorkie.v1.YorkieService /yorkie.v1.YorkieService/DetachDocument: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.YorkieService.DetachDocument.yorkie.v1.DetachDocumentRequest" + $ref: '#/components/requestBodies/yorkie.v1.YorkieService.DetachDocument.yorkie.v1.DetachDocumentRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.YorkieService.DetachDocument.yorkie.v1.DetachDocumentResponse" + $ref: '#/components/responses/yorkie.v1.YorkieService.DetachDocument.yorkie.v1.DetachDocumentResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.YorkieService + - yorkie.v1.YorkieService /yorkie.v1.YorkieService/PushPullChanges: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.YorkieService.PushPullChanges.yorkie.v1.PushPullChangesRequest" + $ref: '#/components/requestBodies/yorkie.v1.YorkieService.PushPullChanges.yorkie.v1.PushPullChangesRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.YorkieService.PushPullChanges.yorkie.v1.PushPullChangesResponse" + $ref: '#/components/responses/yorkie.v1.YorkieService.PushPullChanges.yorkie.v1.PushPullChangesResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.YorkieService + - yorkie.v1.YorkieService /yorkie.v1.YorkieService/RemoveDocument: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.YorkieService.RemoveDocument.yorkie.v1.RemoveDocumentRequest" + $ref: '#/components/requestBodies/yorkie.v1.YorkieService.RemoveDocument.yorkie.v1.RemoveDocumentRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.YorkieService.RemoveDocument.yorkie.v1.RemoveDocumentResponse" + $ref: '#/components/responses/yorkie.v1.YorkieService.RemoveDocument.yorkie.v1.RemoveDocumentResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.YorkieService + - yorkie.v1.YorkieService /yorkie.v1.YorkieService/WatchDocument: post: description: "" requestBody: - $ref: "#/components/requestBodies/yorkie.v1.YorkieService.WatchDocument.yorkie.v1.WatchDocumentRequest" + $ref: '#/components/requestBodies/yorkie.v1.YorkieService.WatchDocument.yorkie.v1.WatchDocumentRequest' responses: "200": - $ref: "#/components/responses/yorkie.v1.YorkieService.WatchDocument.yorkie.v1.WatchDocumentResponse" + $ref: '#/components/responses/yorkie.v1.YorkieService.WatchDocument.yorkie.v1.WatchDocumentResponse' default: - $ref: "#/components/responses/connect.error" + $ref: '#/components/responses/connect.error' tags: - - yorkie.v1.YorkieService + - yorkie.v1.YorkieService components: requestBodies: yorkie.v1.YorkieService.ActivateClient.yorkie.v1.ActivateClientRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.ActivateClientRequest" + $ref: '#/components/schemas/yorkie.v1.ActivateClientRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.ActivateClientRequest" + $ref: '#/components/schemas/yorkie.v1.ActivateClientRequest' required: true yorkie.v1.YorkieService.AttachDocument.yorkie.v1.AttachDocumentRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.AttachDocumentRequest" + $ref: '#/components/schemas/yorkie.v1.AttachDocumentRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.AttachDocumentRequest" + $ref: '#/components/schemas/yorkie.v1.AttachDocumentRequest' required: true yorkie.v1.YorkieService.Broadcast.yorkie.v1.BroadcastRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.BroadcastRequest" + $ref: '#/components/schemas/yorkie.v1.BroadcastRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.BroadcastRequest" + $ref: '#/components/schemas/yorkie.v1.BroadcastRequest' required: true yorkie.v1.YorkieService.DeactivateClient.yorkie.v1.DeactivateClientRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.DeactivateClientRequest" + $ref: '#/components/schemas/yorkie.v1.DeactivateClientRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.DeactivateClientRequest" + $ref: '#/components/schemas/yorkie.v1.DeactivateClientRequest' required: true yorkie.v1.YorkieService.DetachDocument.yorkie.v1.DetachDocumentRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.DetachDocumentRequest" + $ref: '#/components/schemas/yorkie.v1.DetachDocumentRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.DetachDocumentRequest" + $ref: '#/components/schemas/yorkie.v1.DetachDocumentRequest' required: true yorkie.v1.YorkieService.PushPullChanges.yorkie.v1.PushPullChangesRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.PushPullChangesRequest" + $ref: '#/components/schemas/yorkie.v1.PushPullChangesRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.PushPullChangesRequest" + $ref: '#/components/schemas/yorkie.v1.PushPullChangesRequest' required: true yorkie.v1.YorkieService.RemoveDocument.yorkie.v1.RemoveDocumentRequest: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.RemoveDocumentRequest" + $ref: '#/components/schemas/yorkie.v1.RemoveDocumentRequest' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.RemoveDocumentRequest" + $ref: '#/components/schemas/yorkie.v1.RemoveDocumentRequest' required: true yorkie.v1.YorkieService.WatchDocument.yorkie.v1.WatchDocumentRequest: content: {} @@ -180,100 +179,100 @@ components: content: application/json: schema: - $ref: "#/components/schemas/connect.error" + $ref: '#/components/schemas/connect.error' application/proto: schema: - $ref: "#/components/schemas/connect.error" + $ref: '#/components/schemas/connect.error' description: "" yorkie.v1.YorkieService.ActivateClient.yorkie.v1.ActivateClientResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.ActivateClientResponse" + $ref: '#/components/schemas/yorkie.v1.ActivateClientResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.ActivateClientResponse" + $ref: '#/components/schemas/yorkie.v1.ActivateClientResponse' description: "" yorkie.v1.YorkieService.AttachDocument.yorkie.v1.AttachDocumentResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.AttachDocumentResponse" + $ref: '#/components/schemas/yorkie.v1.AttachDocumentResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.AttachDocumentResponse" + $ref: '#/components/schemas/yorkie.v1.AttachDocumentResponse' description: "" yorkie.v1.YorkieService.Broadcast.yorkie.v1.BroadcastResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.BroadcastResponse" + $ref: '#/components/schemas/yorkie.v1.BroadcastResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.BroadcastResponse" + $ref: '#/components/schemas/yorkie.v1.BroadcastResponse' description: "" yorkie.v1.YorkieService.DeactivateClient.yorkie.v1.DeactivateClientResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.DeactivateClientResponse" + $ref: '#/components/schemas/yorkie.v1.DeactivateClientResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.DeactivateClientResponse" + $ref: '#/components/schemas/yorkie.v1.DeactivateClientResponse' description: "" yorkie.v1.YorkieService.DetachDocument.yorkie.v1.DetachDocumentResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.DetachDocumentResponse" + $ref: '#/components/schemas/yorkie.v1.DetachDocumentResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.DetachDocumentResponse" + $ref: '#/components/schemas/yorkie.v1.DetachDocumentResponse' description: "" yorkie.v1.YorkieService.PushPullChanges.yorkie.v1.PushPullChangesResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.PushPullChangesResponse" + $ref: '#/components/schemas/yorkie.v1.PushPullChangesResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.PushPullChangesResponse" + $ref: '#/components/schemas/yorkie.v1.PushPullChangesResponse' description: "" yorkie.v1.YorkieService.RemoveDocument.yorkie.v1.RemoveDocumentResponse: content: application/json: schema: - $ref: "#/components/schemas/yorkie.v1.RemoveDocumentResponse" + $ref: '#/components/schemas/yorkie.v1.RemoveDocumentResponse' application/proto: schema: - $ref: "#/components/schemas/yorkie.v1.RemoveDocumentResponse" + $ref: '#/components/schemas/yorkie.v1.RemoveDocumentResponse' description: "" yorkie.v1.YorkieService.WatchDocument.yorkie.v1.WatchDocumentResponse: description: "" schemas: connect.error: additionalProperties: false - description: "Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation" + description: 'Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation' properties: code: enum: - - CodeCanceled - - CodeUnknown - - CodeInvalidArgument - - CodeDeadlineExceeded - - CodeNotFound - - CodeAlreadyExists - - CodePermissionDenied - - CodeResourceExhausted - - CodeFailedPrecondition - - CodeAborted - - CodeOutOfRange - - CodeInternal - - CodeUnavailable - - CodeDataLoss - - CodeUnauthenticated + - CodeCanceled + - CodeUnknown + - CodeInvalidArgument + - CodeDeadlineExceeded + - CodeNotFound + - CodeAlreadyExists + - CodePermissionDenied + - CodeResourceExhausted + - CodeFailedPrecondition + - CodeAborted + - CodeOutOfRange + - CodeInternal + - CodeUnavailable + - CodeDataLoss + - CodeUnauthenticated examples: - - CodeNotFound + - CodeNotFound type: string message: type: string @@ -306,7 +305,7 @@ components: description: "" properties: changePack: - $ref: "#/components/schemas/yorkie.v1.ChangePack" + $ref: '#/components/schemas/yorkie.v1.ChangePack' additionalProperties: false description: "" title: change_pack @@ -323,7 +322,7 @@ components: description: "" properties: changePack: - $ref: "#/components/schemas/yorkie.v1.ChangePack" + $ref: '#/components/schemas/yorkie.v1.ChangePack' additionalProperties: false description: "" title: change_pack @@ -372,7 +371,7 @@ components: description: "" properties: id: - $ref: "#/components/schemas/yorkie.v1.ChangeID" + $ref: '#/components/schemas/yorkie.v1.ChangeID' additionalProperties: false description: "" title: id @@ -386,12 +385,12 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.Operation" + $ref: '#/components/schemas/yorkie.v1.Operation' type: object title: operations type: array presenceChange: - $ref: "#/components/schemas/yorkie.v1.PresenceChange" + $ref: '#/components/schemas/yorkie.v1.PresenceChange' additionalProperties: false description: "" title: presence_change @@ -417,15 +416,15 @@ components: additionalProperties: false description: "" oneOf: - - type: string - - type: number + - type: string + - type: number title: lamport serverSeq: additionalProperties: false description: "" oneOf: - - type: string - - type: number + - type: string + - type: number title: server_seq title: ChangeID type: object @@ -439,12 +438,12 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.Change" + $ref: '#/components/schemas/yorkie.v1.Change' type: object title: changes type: array checkpoint: - $ref: "#/components/schemas/yorkie.v1.Checkpoint" + $ref: '#/components/schemas/yorkie.v1.Checkpoint' additionalProperties: false description: "" title: checkpoint @@ -460,7 +459,7 @@ components: title: is_removed type: boolean minSyncedTicket: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: min_synced_ticket @@ -486,8 +485,8 @@ components: additionalProperties: false description: "" oneOf: - - type: string - - type: number + - type: string + - type: number title: server_seq title: Checkpoint type: object @@ -512,7 +511,7 @@ components: description: "" properties: changePack: - $ref: "#/components/schemas/yorkie.v1.ChangePack" + $ref: '#/components/schemas/yorkie.v1.ChangePack' additionalProperties: false description: "" title: change_pack @@ -539,7 +538,7 @@ components: description: "" properties: changePack: - $ref: "#/components/schemas/yorkie.v1.ChangePack" + $ref: '#/components/schemas/yorkie.v1.ChangePack' additionalProperties: false description: "" title: change_pack @@ -551,7 +550,7 @@ components: description: "" properties: body: - $ref: "#/components/schemas/yorkie.v1.DocEventBody" + $ref: '#/components/schemas/yorkie.v1.DocEventBody' additionalProperties: false description: "" title: body @@ -562,7 +561,7 @@ components: title: publisher type: string type: - $ref: "#/components/schemas/yorkie.v1.DocEventType" + $ref: '#/components/schemas/yorkie.v1.DocEventType' additionalProperties: false description: "" title: type @@ -588,14 +587,14 @@ components: yorkie.v1.DocEventType: description: "" enum: - - - DOC_EVENT_TYPE_DOCUMENT_CHANGED - - 0 - - DOC_EVENT_TYPE_DOCUMENT_WATCHED - - 1 - - DOC_EVENT_TYPE_DOCUMENT_UNWATCHED - - 2 - - DOC_EVENT_TYPE_DOCUMENT_BROADCAST - - 3 + - - DOC_EVENT_TYPE_DOCUMENT_CHANGED + - 0 + - DOC_EVENT_TYPE_DOCUMENT_WATCHED + - 1 + - DOC_EVENT_TYPE_DOCUMENT_UNWATCHED + - 2 + - DOC_EVENT_TYPE_DOCUMENT_BROADCAST + - 3 title: DocEventType type: string yorkie.v1.JSONElementSimple: @@ -603,25 +602,25 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at type: object movedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: moved_at type: object removedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: removed_at type: object type: - $ref: "#/components/schemas/yorkie.v1.ValueType" + $ref: '#/components/schemas/yorkie.v1.ValueType' additionalProperties: false description: "" title: type @@ -643,7 +642,7 @@ components: title: is_removed type: boolean updatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: updated_at @@ -660,67 +659,67 @@ components: description: "" properties: add: - $ref: "#/components/schemas/yorkie.v1.Operation.Add" + $ref: '#/components/schemas/yorkie.v1.Operation.Add' additionalProperties: false description: "" title: add type: object arraySet: - $ref: "#/components/schemas/yorkie.v1.Operation.ArraySet" + $ref: '#/components/schemas/yorkie.v1.Operation.ArraySet' additionalProperties: false description: "" title: array_set type: object edit: - $ref: "#/components/schemas/yorkie.v1.Operation.Edit" + $ref: '#/components/schemas/yorkie.v1.Operation.Edit' additionalProperties: false description: "" title: edit type: object increase: - $ref: "#/components/schemas/yorkie.v1.Operation.Increase" + $ref: '#/components/schemas/yorkie.v1.Operation.Increase' additionalProperties: false description: "" title: increase type: object move: - $ref: "#/components/schemas/yorkie.v1.Operation.Move" + $ref: '#/components/schemas/yorkie.v1.Operation.Move' additionalProperties: false description: "" title: move type: object remove: - $ref: "#/components/schemas/yorkie.v1.Operation.Remove" + $ref: '#/components/schemas/yorkie.v1.Operation.Remove' additionalProperties: false description: "" title: remove type: object select: - $ref: "#/components/schemas/yorkie.v1.Operation.Select" + $ref: '#/components/schemas/yorkie.v1.Operation.Select' additionalProperties: false description: "" title: select type: object set: - $ref: "#/components/schemas/yorkie.v1.Operation.Set" + $ref: '#/components/schemas/yorkie.v1.Operation.Set' additionalProperties: false description: "" title: set type: object style: - $ref: "#/components/schemas/yorkie.v1.Operation.Style" + $ref: '#/components/schemas/yorkie.v1.Operation.Style' additionalProperties: false description: "" title: style type: object treeEdit: - $ref: "#/components/schemas/yorkie.v1.Operation.TreeEdit" + $ref: '#/components/schemas/yorkie.v1.Operation.TreeEdit' additionalProperties: false description: "" title: tree_edit type: object treeStyle: - $ref: "#/components/schemas/yorkie.v1.Operation.TreeStyle" + $ref: '#/components/schemas/yorkie.v1.Operation.TreeStyle' additionalProperties: false description: "" title: tree_style @@ -732,25 +731,25 @@ components: description: "" properties: executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object prevCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: prev_created_at type: object value: - $ref: "#/components/schemas/yorkie.v1.JSONElementSimple" + $ref: '#/components/schemas/yorkie.v1.JSONElementSimple' additionalProperties: false description: "" title: value @@ -762,25 +761,25 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object value: - $ref: "#/components/schemas/yorkie.v1.JSONElementSimple" + $ref: '#/components/schemas/yorkie.v1.JSONElementSimple' additionalProperties: false description: "" title: value @@ -807,25 +806,25 @@ components: title: created_at_map_by_actor type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object from: - $ref: "#/components/schemas/yorkie.v1.TextNodePos" + $ref: '#/components/schemas/yorkie.v1.TextNodePos' additionalProperties: false description: "" title: from type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object to: - $ref: "#/components/schemas/yorkie.v1.TextNodePos" + $ref: '#/components/schemas/yorkie.v1.TextNodePos' additionalProperties: false description: "" title: to @@ -858,7 +857,7 @@ components: title: key type: string value: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: value @@ -870,19 +869,19 @@ components: description: "" properties: executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object value: - $ref: "#/components/schemas/yorkie.v1.JSONElementSimple" + $ref: '#/components/schemas/yorkie.v1.JSONElementSimple' additionalProperties: false description: "" title: value @@ -894,25 +893,25 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object prevCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: prev_created_at @@ -924,19 +923,19 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at @@ -952,25 +951,25 @@ components: compatibility purposes. properties: executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object from: - $ref: "#/components/schemas/yorkie.v1.TextNodePos" + $ref: '#/components/schemas/yorkie.v1.TextNodePos' additionalProperties: false description: "" title: from type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object to: - $ref: "#/components/schemas/yorkie.v1.TextNodePos" + $ref: '#/components/schemas/yorkie.v1.TextNodePos' additionalProperties: false description: "" title: to @@ -982,7 +981,7 @@ components: description: "" properties: executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at @@ -993,13 +992,13 @@ components: title: key type: string parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object value: - $ref: "#/components/schemas/yorkie.v1.JSONElementSimple" + $ref: '#/components/schemas/yorkie.v1.JSONElementSimple' additionalProperties: false description: "" title: value @@ -1021,25 +1020,25 @@ components: title: created_at_map_by_actor type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object from: - $ref: "#/components/schemas/yorkie.v1.TextNodePos" + $ref: '#/components/schemas/yorkie.v1.TextNodePos' additionalProperties: false description: "" title: from type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object to: - $ref: "#/components/schemas/yorkie.v1.TextNodePos" + $ref: '#/components/schemas/yorkie.v1.TextNodePos' additionalProperties: false description: "" title: to @@ -1072,7 +1071,7 @@ components: title: key type: string value: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: value @@ -1087,7 +1086,7 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.TreeNodes" + $ref: '#/components/schemas/yorkie.v1.TreeNodes' type: object title: contents type: array @@ -1097,19 +1096,19 @@ components: title: created_at_map_by_actor type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object from: - $ref: "#/components/schemas/yorkie.v1.TreePos" + $ref: '#/components/schemas/yorkie.v1.TreePos' additionalProperties: false description: "" title: from type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at @@ -1120,7 +1119,7 @@ components: title: split_level type: integer to: - $ref: "#/components/schemas/yorkie.v1.TreePos" + $ref: '#/components/schemas/yorkie.v1.TreePos' additionalProperties: false description: "" title: to @@ -1137,7 +1136,7 @@ components: title: key type: string value: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: value @@ -1166,25 +1165,25 @@ components: title: created_at_map_by_actor type: object executedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: executed_at type: object from: - $ref: "#/components/schemas/yorkie.v1.TreePos" + $ref: '#/components/schemas/yorkie.v1.TreePos' additionalProperties: false description: "" title: from type: object parentCreatedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: parent_created_at type: object to: - $ref: "#/components/schemas/yorkie.v1.TreePos" + $ref: '#/components/schemas/yorkie.v1.TreePos' additionalProperties: false description: "" title: to @@ -1217,7 +1216,7 @@ components: title: key type: string value: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: value @@ -1256,13 +1255,13 @@ components: description: "" properties: presence: - $ref: "#/components/schemas/yorkie.v1.Presence" + $ref: '#/components/schemas/yorkie.v1.Presence' additionalProperties: false description: "" title: presence type: object type: - $ref: "#/components/schemas/yorkie.v1.PresenceChange.ChangeType" + $ref: '#/components/schemas/yorkie.v1.PresenceChange.ChangeType' additionalProperties: false description: "" title: type @@ -1271,14 +1270,14 @@ components: yorkie.v1.PresenceChange.ChangeType: description: "" enum: - - - CHANGE_TYPE_UNSPECIFIED - - 0 - - CHANGE_TYPE_PUT - - 1 - - CHANGE_TYPE_DELETE - - 2 - - CHANGE_TYPE_CLEAR - - 3 + - - CHANGE_TYPE_UNSPECIFIED + - 0 + - CHANGE_TYPE_PUT + - 1 + - CHANGE_TYPE_DELETE + - 2 + - CHANGE_TYPE_CLEAR + - 3 title: ChangeType type: string yorkie.v1.PushPullChangesRequest: @@ -1286,7 +1285,7 @@ components: description: "" properties: changePack: - $ref: "#/components/schemas/yorkie.v1.ChangePack" + $ref: '#/components/schemas/yorkie.v1.ChangePack' additionalProperties: false description: "" title: change_pack @@ -1313,7 +1312,7 @@ components: description: "" properties: changePack: - $ref: "#/components/schemas/yorkie.v1.ChangePack" + $ref: '#/components/schemas/yorkie.v1.ChangePack' additionalProperties: false description: "" title: change_pack @@ -1325,7 +1324,7 @@ components: description: "" properties: changePack: - $ref: "#/components/schemas/yorkie.v1.ChangePack" + $ref: '#/components/schemas/yorkie.v1.ChangePack' additionalProperties: false description: "" title: change_pack @@ -1347,7 +1346,7 @@ components: description: "" properties: changePack: - $ref: "#/components/schemas/yorkie.v1.ChangePack" + $ref: '#/components/schemas/yorkie.v1.ChangePack' additionalProperties: false description: "" title: change_pack @@ -1359,7 +1358,7 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at @@ -1395,8 +1394,8 @@ components: additionalProperties: false description: "" oneOf: - - type: string - - type: number + - type: string + - type: number title: lamport title: TimeTicket type: object @@ -1415,25 +1414,25 @@ components: title: depth type: integer id: - $ref: "#/components/schemas/yorkie.v1.TreeNodeID" + $ref: '#/components/schemas/yorkie.v1.TreeNodeID' additionalProperties: false description: "" title: id type: object insNextId: - $ref: "#/components/schemas/yorkie.v1.TreeNodeID" + $ref: '#/components/schemas/yorkie.v1.TreeNodeID' additionalProperties: false description: "" title: ins_next_id type: object insPrevId: - $ref: "#/components/schemas/yorkie.v1.TreeNodeID" + $ref: '#/components/schemas/yorkie.v1.TreeNodeID' additionalProperties: false description: "" title: ins_prev_id type: object removedAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: removed_at @@ -1460,7 +1459,7 @@ components: title: key type: string value: - $ref: "#/components/schemas/yorkie.v1.NodeAttr" + $ref: '#/components/schemas/yorkie.v1.NodeAttr' additionalProperties: false description: "" title: value @@ -1472,7 +1471,7 @@ components: description: "" properties: createdAt: - $ref: "#/components/schemas/yorkie.v1.TimeTicket" + $ref: '#/components/schemas/yorkie.v1.TimeTicket' additionalProperties: false description: "" title: created_at @@ -1492,7 +1491,7 @@ components: additionalProperties: false description: "" items: - $ref: "#/components/schemas/yorkie.v1.TreeNode" + $ref: '#/components/schemas/yorkie.v1.TreeNode' type: object title: content type: array @@ -1503,13 +1502,13 @@ components: description: "" properties: leftSiblingId: - $ref: "#/components/schemas/yorkie.v1.TreeNodeID" + $ref: '#/components/schemas/yorkie.v1.TreeNodeID' additionalProperties: false description: "" title: left_sibling_id type: object parentId: - $ref: "#/components/schemas/yorkie.v1.TreeNodeID" + $ref: '#/components/schemas/yorkie.v1.TreeNodeID' additionalProperties: false description: "" title: parent_id @@ -1519,34 +1518,34 @@ components: yorkie.v1.ValueType: description: "" enum: - - - VALUE_TYPE_NULL - - 0 - - VALUE_TYPE_BOOLEAN - - 1 - - VALUE_TYPE_INTEGER - - 2 - - VALUE_TYPE_LONG - - 3 - - VALUE_TYPE_DOUBLE - - 4 - - VALUE_TYPE_STRING - - 5 - - VALUE_TYPE_BYTES - - 6 - - VALUE_TYPE_DATE - - 7 - - VALUE_TYPE_JSON_OBJECT - - 8 - - VALUE_TYPE_JSON_ARRAY - - 9 - - VALUE_TYPE_TEXT - - 10 - - VALUE_TYPE_INTEGER_CNT - - 11 - - VALUE_TYPE_LONG_CNT - - 12 - - VALUE_TYPE_TREE - - 13 + - - VALUE_TYPE_NULL + - 0 + - VALUE_TYPE_BOOLEAN + - 1 + - VALUE_TYPE_INTEGER + - 2 + - VALUE_TYPE_LONG + - 3 + - VALUE_TYPE_DOUBLE + - 4 + - VALUE_TYPE_STRING + - 5 + - VALUE_TYPE_BYTES + - 6 + - VALUE_TYPE_DATE + - 7 + - VALUE_TYPE_JSON_OBJECT + - 8 + - VALUE_TYPE_JSON_ARRAY + - 9 + - VALUE_TYPE_TEXT + - 10 + - VALUE_TYPE_INTEGER_CNT + - 11 + - VALUE_TYPE_LONG_CNT + - 12 + - VALUE_TYPE_TREE + - 13 title: ValueType type: string yorkie.v1.WatchDocumentRequest: @@ -1570,13 +1569,13 @@ components: description: "" properties: event: - $ref: "#/components/schemas/yorkie.v1.DocEvent" + $ref: '#/components/schemas/yorkie.v1.DocEvent' additionalProperties: false description: "" title: event type: object initialization: - $ref: "#/components/schemas/yorkie.v1.WatchDocumentResponse.Initialization" + $ref: '#/components/schemas/yorkie.v1.WatchDocumentResponse.Initialization' additionalProperties: false description: "" title: initialization @@ -1602,7 +1601,7 @@ components: name: Authorization type: apiKey security: - - ApiKeyAuth: [] +- ApiKeyAuth: [] tags: - - description: Yorkie is a service that provides a API for SDKs. - name: yorkie.v1.YorkieService +- description: Yorkie is a service that provides an API for SDKs. + name: yorkie.v1.YorkieService diff --git a/api/yorkie/v1/system.pb.go b/api/yorkie/v1/system.pb.go new file mode 100644 index 000000000..a99485a94 --- /dev/null +++ b/api/yorkie/v1/system.pb.go @@ -0,0 +1,256 @@ +// +// Copyright 2020 The Yorkie Authors. All rights reserved. +// +// 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. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: yorkie/v1/system.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DetachDocumentRequestBySystem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // TODO(hackerwins): Consider to replace this fields with types.Project, types.Client, types.DocumentSummary + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + DocumentId string `protobuf:"bytes,3,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` + DocumentKey string `protobuf:"bytes,4,opt,name=document_key,json=documentKey,proto3" json:"document_key,omitempty"` +} + +func (x *DetachDocumentRequestBySystem) Reset() { + *x = DetachDocumentRequestBySystem{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_system_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DetachDocumentRequestBySystem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DetachDocumentRequestBySystem) ProtoMessage() {} + +func (x *DetachDocumentRequestBySystem) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_system_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DetachDocumentRequestBySystem.ProtoReflect.Descriptor instead. +func (*DetachDocumentRequestBySystem) Descriptor() ([]byte, []int) { + return file_yorkie_v1_system_proto_rawDescGZIP(), []int{0} +} + +func (x *DetachDocumentRequestBySystem) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *DetachDocumentRequestBySystem) GetClientId() string { + if x != nil { + return x.ClientId + } + return "" +} + +func (x *DetachDocumentRequestBySystem) GetDocumentId() string { + if x != nil { + return x.DocumentId + } + return "" +} + +func (x *DetachDocumentRequestBySystem) GetDocumentKey() string { + if x != nil { + return x.DocumentKey + } + return "" +} + +type DetachDocumentResponseBySystem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DetachDocumentResponseBySystem) Reset() { + *x = DetachDocumentResponseBySystem{} + if protoimpl.UnsafeEnabled { + mi := &file_yorkie_v1_system_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DetachDocumentResponseBySystem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DetachDocumentResponseBySystem) ProtoMessage() {} + +func (x *DetachDocumentResponseBySystem) ProtoReflect() protoreflect.Message { + mi := &file_yorkie_v1_system_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DetachDocumentResponseBySystem.ProtoReflect.Descriptor instead. +func (*DetachDocumentResponseBySystem) Descriptor() ([]byte, []int) { + return file_yorkie_v1_system_proto_rawDescGZIP(), []int{1} +} + +var File_yorkie_v1_system_proto protoreflect.FileDescriptor + +var file_yorkie_v1_system_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, + 0x2e, 0x76, 0x31, 0x22, 0x9f, 0x01, 0x0a, 0x1d, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x44, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x79, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, + 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6b, + 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x22, 0x20, 0x0a, 0x1e, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x44, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x32, 0x78, 0x0a, 0x0d, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x0e, 0x44, 0x65, 0x74, 0x61, + 0x63, 0x68, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x79, 0x6f, 0x72, + 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x44, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x79, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x1a, 0x29, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, + 0x00, 0x42, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x76, 0x2e, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2d, 0x74, 0x65, 0x61, 0x6d, + 0x2f, 0x79, 0x6f, 0x72, 0x6b, 0x69, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x79, 0x6f, 0x72, 0x6b, + 0x69, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_yorkie_v1_system_proto_rawDescOnce sync.Once + file_yorkie_v1_system_proto_rawDescData = file_yorkie_v1_system_proto_rawDesc +) + +func file_yorkie_v1_system_proto_rawDescGZIP() []byte { + file_yorkie_v1_system_proto_rawDescOnce.Do(func() { + file_yorkie_v1_system_proto_rawDescData = protoimpl.X.CompressGZIP(file_yorkie_v1_system_proto_rawDescData) + }) + return file_yorkie_v1_system_proto_rawDescData +} + +var file_yorkie_v1_system_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_yorkie_v1_system_proto_goTypes = []interface{}{ + (*DetachDocumentRequestBySystem)(nil), // 0: yorkie.v1.DetachDocumentRequestBySystem + (*DetachDocumentResponseBySystem)(nil), // 1: yorkie.v1.DetachDocumentResponseBySystem +} +var file_yorkie_v1_system_proto_depIdxs = []int32{ + 0, // 0: yorkie.v1.SystemService.DetachDocument:input_type -> yorkie.v1.DetachDocumentRequestBySystem + 1, // 1: yorkie.v1.SystemService.DetachDocument:output_type -> yorkie.v1.DetachDocumentResponseBySystem + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_yorkie_v1_system_proto_init() } +func file_yorkie_v1_system_proto_init() { + if File_yorkie_v1_system_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_yorkie_v1_system_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DetachDocumentRequestBySystem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_yorkie_v1_system_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DetachDocumentResponseBySystem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_yorkie_v1_system_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_yorkie_v1_system_proto_goTypes, + DependencyIndexes: file_yorkie_v1_system_proto_depIdxs, + MessageInfos: file_yorkie_v1_system_proto_msgTypes, + }.Build() + File_yorkie_v1_system_proto = out.File + file_yorkie_v1_system_proto_rawDesc = nil + file_yorkie_v1_system_proto_goTypes = nil + file_yorkie_v1_system_proto_depIdxs = nil +} diff --git a/api/yorkie/v1/system.proto b/api/yorkie/v1/system.proto new file mode 100644 index 000000000..c9cafc0ec --- /dev/null +++ b/api/yorkie/v1/system.proto @@ -0,0 +1,38 @@ +/* + * Copyright 2020 The Yorkie Authors. All rights reserved. + * + * 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. + */ +syntax = "proto3"; + +package yorkie.v1; + +option go_package = "github.com/yorkie-team/yorkie/api/yorkie/v1;v1"; + +option java_multiple_files = true; +option java_package = "dev.yorkie.api.v1"; + +// System is a service that provides an API for Cluster. +service SystemService { + rpc DetachDocument (DetachDocumentRequestBySystem) returns (DetachDocumentResponseBySystem) {} +} + +message DetachDocumentRequestBySystem { + // TODO(hackerwins): Consider to replace this fields with types.Project, types.Client, types.DocumentSummary + string project_id = 1; + string client_id = 2; + string document_id = 3; + string document_key = 4; +} + +message DetachDocumentResponseBySystem {} \ No newline at end of file diff --git a/api/yorkie/v1/v1connect/system.connect.go b/api/yorkie/v1/v1connect/system.connect.go new file mode 100644 index 000000000..d633829f2 --- /dev/null +++ b/api/yorkie/v1/v1connect/system.connect.go @@ -0,0 +1,120 @@ +// +// Copyright 2020 The Yorkie Authors. All rights reserved. +// +// 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. + +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: yorkie/v1/system.proto + +package v1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/yorkie-team/yorkie/api/yorkie/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion0_1_0 + +const ( + // SystemServiceName is the fully-qualified name of the SystemService service. + SystemServiceName = "yorkie.v1.SystemService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // SystemServiceDetachDocumentProcedure is the fully-qualified name of the SystemService's + // DetachDocument RPC. + SystemServiceDetachDocumentProcedure = "/yorkie.v1.SystemService/DetachDocument" +) + +// SystemServiceClient is a client for the yorkie.v1.SystemService service. +type SystemServiceClient interface { + DetachDocument(context.Context, *connect.Request[v1.DetachDocumentRequestBySystem]) (*connect.Response[v1.DetachDocumentResponseBySystem], error) +} + +// NewSystemServiceClient constructs a client for the yorkie.v1.SystemService service. By default, +// it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and +// sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() +// or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewSystemServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SystemServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &systemServiceClient{ + detachDocument: connect.NewClient[v1.DetachDocumentRequestBySystem, v1.DetachDocumentResponseBySystem]( + httpClient, + baseURL+SystemServiceDetachDocumentProcedure, + opts..., + ), + } +} + +// systemServiceClient implements SystemServiceClient. +type systemServiceClient struct { + detachDocument *connect.Client[v1.DetachDocumentRequestBySystem, v1.DetachDocumentResponseBySystem] +} + +// DetachDocument calls yorkie.v1.SystemService.DetachDocument. +func (c *systemServiceClient) DetachDocument(ctx context.Context, req *connect.Request[v1.DetachDocumentRequestBySystem]) (*connect.Response[v1.DetachDocumentResponseBySystem], error) { + return c.detachDocument.CallUnary(ctx, req) +} + +// SystemServiceHandler is an implementation of the yorkie.v1.SystemService service. +type SystemServiceHandler interface { + DetachDocument(context.Context, *connect.Request[v1.DetachDocumentRequestBySystem]) (*connect.Response[v1.DetachDocumentResponseBySystem], error) +} + +// NewSystemServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewSystemServiceHandler(svc SystemServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + systemServiceDetachDocumentHandler := connect.NewUnaryHandler( + SystemServiceDetachDocumentProcedure, + svc.DetachDocument, + opts..., + ) + return "/yorkie.v1.SystemService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case SystemServiceDetachDocumentProcedure: + systemServiceDetachDocumentHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedSystemServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedSystemServiceHandler struct{} + +func (UnimplementedSystemServiceHandler) DetachDocument(context.Context, *connect.Request[v1.DetachDocumentRequestBySystem]) (*connect.Response[v1.DetachDocumentResponseBySystem], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("yorkie.v1.SystemService.DetachDocument is not implemented")) +} diff --git a/api/yorkie/v1/yorkie.proto b/api/yorkie/v1/yorkie.proto index 8ca20e120..876dc066a 100644 --- a/api/yorkie/v1/yorkie.proto +++ b/api/yorkie/v1/yorkie.proto @@ -24,7 +24,7 @@ option go_package = "github.com/yorkie-team/yorkie/api/yorkie/v1;v1"; option java_multiple_files = true; option java_package = "dev.yorkie.api.v1"; -// Yorkie is a service that provides a API for SDKs. +// Yorkie is a service that provides an API for SDKs. service YorkieService { rpc ActivateClient (ActivateClientRequest) returns (ActivateClientResponse) {} rpc DeactivateClient (DeactivateClientRequest) returns (DeactivateClientResponse) {} diff --git a/pkg/document/document.go b/pkg/document/document.go index 00b0e0411..da34d265a 100644 --- a/pkg/document/document.go +++ b/pkg/document/document.go @@ -454,6 +454,10 @@ func (d *Document) BroadcastEventHandlers() map[string]func( return d.broadcastEventHandlers } +func (d *Document) setInternalDoc(internalDoc *InternalDocument) { + d.doc = internalDoc +} + func messageFromMsgAndArgs(msgAndArgs ...interface{}) string { if len(msgAndArgs) == 0 { return "" diff --git a/pkg/document/internal_document.go b/pkg/document/internal_document.go index 40697b809..66f4cdca1 100644 --- a/pkg/document/internal_document.go +++ b/pkg/document/internal_document.go @@ -372,3 +372,10 @@ func (d *InternalDocument) AddOnlineClient(clientID string) { func (d *InternalDocument) RemoveOnlineClient(clientID string) { d.onlineClients.Delete(clientID) } + +// ToDocument converts this document to Document. +func (d *InternalDocument) ToDocument() *Document { + doc := New(d.key) + doc.setInternalDoc(d) + return doc +} diff --git a/server/backend/database/client_info.go b/server/backend/database/client_info.go index f61c81769..5143cb435 100644 --- a/server/backend/database/client_info.go +++ b/server/backend/database/client_info.go @@ -200,6 +200,17 @@ func (i *ClientInfo) UpdateCheckpoint( return nil } +// ServerSeq returns the server sequence of the given document. +func (i *ClientInfo) ServerSeq( + docID types.ID, +) (int64, error) { + if !i.hasDocument(docID) { + return 0, fmt.Errorf("document not found %s: %w", docID, ErrDocumentNotFound) + } + + return i.Documents[docID].ServerSeq, nil +} + // EnsureActivated ensures the client is activated. func (i *ClientInfo) EnsureActivated() error { if i.Status != ClientActivated { diff --git a/server/backend/database/mongo/client.go b/server/backend/database/mongo/client.go index 16ec85b63..fbf6cf527 100644 --- a/server/backend/database/mongo/client.go +++ b/server/backend/database/mongo/client.go @@ -554,34 +554,10 @@ func (c *Client) DeactivateClient(ctx context.Context, refKey types.ClientRefKey res := c.collection(ColClients).FindOneAndUpdate(ctx, bson.M{ "project_id": refKey.ProjectID, "_id": refKey.ClientID, - }, bson.A{ - bson.M{ - "$set": bson.M{ - "status": database.ClientDeactivated, - "updated_at": gotime.Now(), - "documents": bson.M{ - "$arrayToObject": bson.M{ - "$map": bson.M{ - "input": bson.M{"$objectToArray": "$documents"}, - "as": "doc", - "in": bson.M{ - "k": "$$doc.k", - "v": bson.M{ - "$cond": bson.M{ - "if": bson.M{"$eq": bson.A{"$$doc.v.status", database.DocumentAttached}}, - "then": bson.M{ - "client_seq": 0, - "server_seq": 0, - "status": database.DocumentDetached, - }, - "else": "$$doc.v", - }, - }, - }, - }, - }, - }, - }, + }, bson.M{ + "$set": bson.M{ + "status": database.ClientDeactivated, + "updated_at": gotime.Now(), }, }, options.FindOneAndUpdate().SetReturnDocument(options.After)) diff --git a/server/clients/clients.go b/server/clients/clients.go index 83049d54d..0721c4e9c 100644 --- a/server/clients/clients.go +++ b/server/clients/clients.go @@ -23,6 +23,7 @@ import ( "github.com/yorkie-team/yorkie/api/types" "github.com/yorkie-team/yorkie/server/backend/database" + "github.com/yorkie-team/yorkie/system" ) var ( @@ -47,41 +48,50 @@ func Activate( func Deactivate( ctx context.Context, db database.Database, + project *types.Project, refKey types.ClientRefKey, ) (*database.ClientInfo, error) { - // TODO(hackerwins): We need to remove the presence of the client from the document. - // Be careful that housekeeping is executed by the leader. And documents are sharded - // by the servers in the cluster. So, we need to consider the case where the leader is - // not the same as the server that handles the document. - - // TODO(raararaara): When deactivating a client, we need to update three DB properties - // (ClientInfo.Status, ClientInfo.Documents, SyncedSeq) in DB. - // Updating the sub-properties of ClientInfo guarantees atomicity as it involves a single MongoDB document. - // However, SyncedSeqs are stored in separate documents, so we can't ensure atomic updates for both. - // Currently, if SyncedSeqs update fails, it mainly impacts GC efficiency without causing major issues. - // We need to consider implementing a correction logic to remove SyncedSeqs in the future. - clientInfo, err := db.DeactivateClient(ctx, refKey) + info, err := FindActiveClientInfo(ctx, db, refKey) + if err != nil { + return nil, err + } + + // TODO(hackerwins): Inject gatewayAddr + systemClient, err := system.Dial("localhost:8080") if err != nil { return nil, err } - // TODO(raararaara): We're currently updating SyncedSeq one by one. This approach is similar - // to n+1 query problem. We need to investigate if we can optimize this process by using a single query in the future. - for docID, clientDocInfo := range clientInfo.Documents { - if err := db.UpdateSyncedSeq( - ctx, - clientInfo, - types.DocRefKey{ - ProjectID: refKey.ProjectID, - DocID: docID, - }, - clientDocInfo.ServerSeq, - ); err != nil { + for docID, clientDocInfo := range info.Documents { + // TODO(hackerwins): Solve N+1 + if clientDocInfo.Status == database.DocumentDetached { + continue + } + + docInfo, err := db.FindDocInfoByRefKey(ctx, types.DocRefKey{ + ProjectID: project.ID, + DocID: docID, + }) + if err != nil { return nil, err } + + actorID, err := info.ID.ToActorID() + if err != nil { + return nil, err + } + + if err := systemClient.DetachDocument(ctx, project.ID, actorID, docID, project.PublicKey, docInfo.Key); err != nil { + return nil, err + } + } + + info, err = db.DeactivateClient(ctx, refKey) + if err != nil { + return nil, err } - return clientInfo, err + return info, err } // FindActiveClientInfo find the active client info by the given ref key. diff --git a/server/clients/housekeeping.go b/server/clients/housekeeping.go index 76ab28bd8..ed1b00254 100644 --- a/server/clients/housekeeping.go +++ b/server/clients/housekeeping.go @@ -68,8 +68,8 @@ func DeactivateInactives( } deactivatedCount := 0 - for _, clientInfo := range candidates { - if _, err := Deactivate(ctx, be.DB, clientInfo.RefKey()); err != nil { + for _, pair := range candidates { + if _, err := Deactivate(ctx, be.DB, pair.project.ToProject(), pair.client.RefKey()); err != nil { return database.DefaultProjectID, err } @@ -88,6 +88,12 @@ func DeactivateInactives( return lastProjectID, nil } +// CandidatePair represents a pair of project and client. +type CandidatePair struct { + project *database.ProjectInfo + client *database.ClientInfo +} + // FindDeactivateCandidates finds candidates to deactivate from the database. func FindDeactivateCandidates( ctx context.Context, @@ -95,27 +101,32 @@ func FindDeactivateCandidates( candidatesLimitPerProject int, projectFetchSize int, lastProjectID types.ID, -) (types.ID, []*database.ClientInfo, error) { - projects, err := be.DB.FindNextNCyclingProjectInfos(ctx, projectFetchSize, lastProjectID) +) (types.ID, []CandidatePair, error) { + projectInfos, err := be.DB.FindNextNCyclingProjectInfos(ctx, projectFetchSize, lastProjectID) if err != nil { return database.DefaultProjectID, nil, err } - var candidates []*database.ClientInfo - for _, project := range projects { - infos, err := be.DB.FindDeactivateCandidatesPerProject(ctx, project, candidatesLimitPerProject) + var candidates []CandidatePair + for _, projectInfo := range projectInfos { + infos, err := be.DB.FindDeactivateCandidatesPerProject(ctx, projectInfo, candidatesLimitPerProject) if err != nil { return database.DefaultProjectID, nil, err } - candidates = append(candidates, infos...) + for _, info := range infos { + candidates = append(candidates, CandidatePair{ + project: projectInfo, + client: info, + }) + } } var topProjectID types.ID - if len(projects) < projectFetchSize { + if len(projectInfos) < projectFetchSize { topProjectID = database.DefaultProjectID } else { - topProjectID = projects[len(projects)-1].ID + topProjectID = projectInfos[len(projectInfos)-1].ID } return topProjectID, candidates, nil diff --git a/server/rpc/server.go b/server/rpc/server.go index cfd06ad88..b204f4784 100644 --- a/server/rpc/server.go +++ b/server/rpc/server.go @@ -73,6 +73,7 @@ func NewServer(conf *Config, be *backend.Backend) (*Server, error) { mux := http.NewServeMux() mux.Handle(v1connect.NewYorkieServiceHandler(newYorkieServer(yorkieServiceCtx, be), opts...)) mux.Handle(v1connect.NewAdminServiceHandler(newAdminServer(be, tokenManager), opts...)) + mux.Handle(v1connect.NewSystemServiceHandler(newSystemServer(be))) mux.Handle(grpchealth.NewHandler(healthChecker)) mux.Handle(httphealth.NewHandler(healthChecker)) // TODO(hackerwins): We need to provide proper http server configuration. diff --git a/server/rpc/system_server.go b/server/rpc/system_server.go new file mode 100644 index 000000000..e209542b9 --- /dev/null +++ b/server/rpc/system_server.go @@ -0,0 +1,137 @@ +/* + * Copyright 2024 The Yorkie Authors. All rights reserved. + * + * 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. + */ + +package rpc + +import ( + "context" + + "connectrpc.com/connect" + + "github.com/yorkie-team/yorkie/api/converter" + "github.com/yorkie-team/yorkie/api/types" + api "github.com/yorkie-team/yorkie/api/yorkie/v1" + "github.com/yorkie-team/yorkie/pkg/document" + "github.com/yorkie-team/yorkie/pkg/document/json" + "github.com/yorkie-team/yorkie/pkg/document/key" + "github.com/yorkie-team/yorkie/pkg/document/presence" + "github.com/yorkie-team/yorkie/pkg/document/time" + "github.com/yorkie-team/yorkie/server/backend" + "github.com/yorkie-team/yorkie/server/clients" + "github.com/yorkie-team/yorkie/server/documents" + "github.com/yorkie-team/yorkie/server/logging" + "github.com/yorkie-team/yorkie/server/packs" +) + +type systemServer struct { + backend *backend.Backend +} + +// newSystemServer creates a new instance of systemServer. +func newSystemServer(backend *backend.Backend) *systemServer { + return &systemServer{ + backend: backend, + } +} + +// DetachDocument detaches the given document from the given client. +func (s *systemServer) DetachDocument( + ctx context.Context, + req *connect.Request[api.DetachDocumentRequestBySystem], +) (*connect.Response[api.DetachDocumentResponseBySystem], error) { + actorID, err := time.ActorIDFromHex(req.Msg.ClientId) + if err != nil { + return nil, err + } + + docID, err := converter.FromDocumentID(req.Msg.DocumentId) + if err != nil { + return nil, err + } + + info, err := s.backend.DB.FindProjectInfoByID(ctx, types.ID(req.Msg.ProjectId)) + if err != nil { + return nil, err + } + project := info.ToProject() + + locker, err := s.backend.Coordinator.NewLocker(ctx, packs.PushPullKey(project.ID, key.Key(req.Msg.DocumentKey))) + if err != nil { + return nil, err + } + + if err := locker.Lock(ctx); err != nil { + return nil, err + } + defer func() { + if err := locker.Unlock(ctx); err != nil { + logging.DefaultLogger().Error(err) + } + }() + + clientInfo, err := clients.FindActiveClientInfo(ctx, s.backend.DB, types.ClientRefKey{ + ProjectID: project.ID, + ClientID: types.IDFromActorID(actorID), + }) + if err != nil { + return nil, err + } + + docRefKey := types.DocRefKey{ + ProjectID: project.ID, + DocID: docID, + } + + docInfo, err := documents.FindDocInfoByRefKey(ctx, s.backend, docRefKey) + if err != nil { + return nil, err + } + + serverSeq, err := clientInfo.ServerSeq(docID) + if err != nil { + return nil, err + } + + internalDoc, err := packs.BuildDocumentForServerSeq(ctx, s.backend, docInfo, serverSeq) + if err != nil { + return nil, err + } + + doc := internalDoc.ToDocument() + if err := doc.Update(func(root *json.Object, p *presence.Presence) error { + p.Clear() + return nil + }); err != nil { + return nil, err + } + + if _, err := packs.PushPull( + ctx, + s.backend, + project, + clientInfo, + docInfo, + doc.CreateChangePack(), + packs.PushPullOptions{ + Mode: types.SyncModePushPull, + Status: document.StatusDetached, + }, + ); err != nil { + return nil, err + } + + return connect.NewResponse(&api.DetachDocumentResponseBySystem{}), nil +} diff --git a/server/rpc/yorkie_server.go b/server/rpc/yorkie_server.go index 6303e58ea..71eddb794 100644 --- a/server/rpc/yorkie_server.go +++ b/server/rpc/yorkie_server.go @@ -94,7 +94,7 @@ func (s *yorkieServer) DeactivateClient( } project := projects.From(ctx) - _, err = clients.Deactivate(ctx, s.backend.DB, types.ClientRefKey{ + _, err = clients.Deactivate(ctx, s.backend.DB, project, types.ClientRefKey{ ProjectID: project.ID, ClientID: types.IDFromActorID(actorID), }) diff --git a/server/server.go b/server/server.go index 6a777f5d5..5475a26c0 100644 --- a/server/server.go +++ b/server/server.go @@ -150,7 +150,7 @@ func (r *Yorkie) DeactivateClient(ctx context.Context, c1 *client.Client) error return err } - _, err = clients.Deactivate(ctx, r.backend.DB, types.ClientRefKey{ + _, err = clients.Deactivate(ctx, r.backend.DB, project, types.ClientRefKey{ ProjectID: project.ID, ClientID: types.IDFromActorID(c1.ID()), }) diff --git a/system/client.go b/system/client.go new file mode 100644 index 000000000..22e25e82a --- /dev/null +++ b/system/client.go @@ -0,0 +1,161 @@ +/* + * Copyright 2024 The Yorkie Authors. All rights reserved. + * + * 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. + */ + +// Package system is a package for the system service. +package system + +import ( + "context" + "crypto/tls" + "fmt" + "net/http" + "strings" + + "connectrpc.com/connect" + "go.uber.org/zap" + "golang.org/x/net/http2" + + "github.com/yorkie-team/yorkie/api/types" + api "github.com/yorkie-team/yorkie/api/yorkie/v1" + "github.com/yorkie-team/yorkie/api/yorkie/v1/v1connect" + "github.com/yorkie-team/yorkie/pkg/document/key" + "github.com/yorkie-team/yorkie/pkg/document/time" +) + +// Option configures Options. +type Option func(*Options) + +// WithLogger configures the Logger of the client. +func WithLogger(logger *zap.Logger) Option { + return func(o *Options) { o.Logger = logger } +} + +// WithInsecure configures insecure option of the client. +func WithInsecure(isInsecure bool) Option { + return func(o *Options) { o.IsInsecure = isInsecure } +} + +// Options configures how we set up the client. +type Options struct { + // Logger is the Logger of the client. + Logger *zap.Logger + + // IsInsecure is whether to disable the TLS connection of the client. + IsInsecure bool +} + +// Client is a client for admin service. +type Client struct { + conn *http.Client + client v1connect.SystemServiceClient + logger *zap.Logger +} + +// New creates an instance of Client. +func New(opts ...Option) (*Client, error) { + var options Options + for _, opt := range opts { + opt(&options) + } + + conn := &http.Client{} + if !options.IsInsecure { + tlsConfig := &tls.Config{MinVersion: tls.VersionTLS12} + conn.Transport = &http2.Transport{TLSClientConfig: tlsConfig} + } + + logger := options.Logger + if logger == nil { + l, err := zap.NewProduction() + if err != nil { + return nil, fmt.Errorf("create logger: %w", err) + } + logger = l + } + + return &Client{ + conn: conn, + logger: logger, + }, nil +} + +// Dial creates an instance of Client and dials to the admin service. +func Dial(rpcAddr string, opts ...Option) (*Client, error) { + cli, err := New(opts...) + if err != nil { + return nil, err + } + + if err := cli.Dial(rpcAddr); err != nil { + return nil, err + } + + return cli, nil +} + +// Dial dials to the admin service. +func (c *Client) Dial(rpcAddr string) error { + if !strings.Contains(rpcAddr, "://") { + if c.conn.Transport == nil { + rpcAddr = "http://" + rpcAddr + } else { + rpcAddr = "https://" + rpcAddr + } + } + + c.client = v1connect.NewSystemServiceClient(c.conn, rpcAddr) + + return nil +} + +// Close closes the connection to the admin service. +func (c *Client) Close() { + c.conn.CloseIdleConnections() +} + +// DetachDocument detaches the given document from the client. +func (c *Client) DetachDocument( + ctx context.Context, + projectID types.ID, + clientID *time.ActorID, + docID types.ID, + apiKey string, + docKey key.Key, +) error { + _, err := c.client.DetachDocument( + ctx, + withShardKey(connect.NewRequest(&api.DetachDocumentRequestBySystem{ + ProjectId: projectID.String(), + ClientId: clientID.String(), + DocumentId: docID.String(), + DocumentKey: docKey.String(), + }, + ), apiKey, docKey.String())) + if err != nil { + return err + } + + return nil +} + +/** +* withShardKey returns a context with the given shard key in metadata. + */ +func withShardKey[T any](conn *connect.Request[T], keys ...string) *connect.Request[T] { + conn.Header().Add(types.ShardKey, strings.Join(keys, "/")) + + return conn +}