diff --git a/Makefile b/Makefile index 5b37345..2b1d749 100644 --- a/Makefile +++ b/Makefile @@ -36,4 +36,4 @@ help: ## Display help .PHONY: generate-core-code generate-core-code: - go run xata/internal/core_code_gen.go + go run xata/internal/core_code_gen.go -scope=core diff --git a/xata/internal/core_code_gen.go b/xata/internal/core_code_gen.go index f4a7a10..8dd78ab 100644 --- a/xata/internal/core_code_gen.go +++ b/xata/internal/core_code_gen.go @@ -1,8 +1,9 @@ package main import ( + "encoding/json" + "flag" "fmt" - "gopkg.in/yaml.v3" "io" "log" "os" @@ -12,110 +13,105 @@ import ( // OpenAPI struct for parsing the OpenAPI YAML file type OpenAPI struct { - OpenAPI string `yaml:"openapi"` - Info map[string]any `yaml:"info"` - Servers []map[string]any `yaml:"servers"` - Paths map[string]any `yaml:"paths"` - Components map[string]any `yaml:"components"` - Tags []map[string]any `yaml:"tags"` - XTagGroups []map[string]any `yaml:"x-tagGroups"` + OpenAPI string `yaml:"openapi" json:"openapi"` + Info map[string]any `yaml:"info" json:"info"` + Servers []map[string]any `yaml:"servers" json:"servers"` + Paths map[string]any `yaml:"paths" json:"paths"` + Components map[string]any `yaml:"components" json:"components"` + Tags []map[string]any `yaml:"tags" json:"tags"` + XTagGroups []map[string]any `yaml:"x-tagGroups" json:"x-tagGroups"` } -func main() { - var err error - //files, err := os.ReadDir(".") - //if err != nil { - // log.Fatal(err) - //} - // - //for _, file := range files { - // fmt.Println(file.Name(), file.Type(), file.IsDir()) - //} - // - //// backup - //err = os.Rename("xata/internal/fern-core", "xata/internal/fern-core-old") - //if err != nil { - // log.Fatal(err) - //} - // - wd, err := os.Getwd() - if err != nil { - log.Fatal(err) - } - fmt.Println(wd) - - err = os.Mkdir("xata/internal/fern-core-auto", 0755) - if err != nil { - log.Fatal(err) - } - - err = os.Chdir("xata/internal/fern-core-auto") - if err != nil { - log.Fatal(err) - } - - wd, err = os.Getwd() - if err != nil { - log.Fatal(err) - } - fmt.Println(wd) - - //initFernCmdName := "fern" - //initFernCmdArgs := []string{"init", "--openapi", "https://xata.io/api/openapi\\?scope\\=core"} - // - //initFernCmd := exec.Command(initFernCmdName, initFernCmdArgs...) - // - //output, err := initFernCmd.CombinedOutput() - //if err != nil { - // log.Fatal(err) - //} - - output, err := executeOSCmd("fern init --openapi https://xata.io/api/openapi\\?scope\\=core") - if err != nil { - log.Fatalf("not able to fern init: %v", err) - } - - fmt.Println(output) - - err = os.Chdir(wd) - wd, err = os.Getwd() - if err != nil { - log.Fatal(err) - } - - fmt.Println(wd) - - err = copyFile("xata/internal/code-gen-utils/core-generators.yml", "xata/internal/fern-core-auto/fern/api/generators.yml") - if err != nil { - log.Fatal(err) - } - - // fern generate --log-level debug --local - err = os.Chdir("xata/internal/fern-core-auto") - if err != nil { - log.Fatal(err) - } - - wd, err = os.Getwd() - if err != nil { - log.Fatal(err) - } - - fmt.Println(wd) - - err = updateCoreAPISpecs() - if err != nil { - log.Fatal(err) - } +const ( + newCorePath = "xata/internal/fern-core-new" + originalCorePath = "xata/internal/fern-core" + scopeCore = "core" + scopeWorkspace = "workspace" + fernInitCoreCmd = "fern init --openapi ../../../internal/docs/core-openapi.json" + coreGeneratorsYaml = "xata/internal/code-gen-utils/core-generators.yml" + fernGenerateCmd = "fern generate --log-level debug --local" +) - output, err = executeOSCmd("fern generate --log-level debug --local") - if err != nil { - log.Fatalf("unable to generate code: %v", err) +func main() { + scope := flag.String("scope", "", "scope is one of: core or workspace") + flag.Parse() + + switch *scope { + case scopeCore: + rootWD, err := os.Getwd() + if err != nil { + log.Fatalf("unable to get root wd: %v", err) + } + + log.Println("creating new core api folder") + err = os.Mkdir(newCorePath, 0755) + if err != nil { + log.Fatalf("unable to create %v: %v", newCorePath, err) + } + + err = os.Chdir(newCorePath) + if err != nil { + log.Fatalf("unable to change dir to %v: %v", newCorePath, err) + } + + newCoreWD, err := os.Getwd() + if err != nil { + log.Fatalf("unable to get %v wd: %v", newCoreWD, err) + } + + log.Println("initializing fern") + output, err := executeOSCmd(fernInitCoreCmd) + if err != nil { + log.Fatalf("unable to fern init: %v", err) + } + + log.Println(output) + + err = os.Chdir(rootWD) + if err != nil { + log.Fatalf("unable to change dir to root wd: %v", err) + } + + log.Println("updating the generators file") + err = copyFile(coreGeneratorsYaml, newCorePath+"/fern/api/generators.yml") + if err != nil { + log.Fatal(err) + } + + err = os.Chdir(newCoreWD) + if err != nil { + log.Fatalf("unable to change dir to %v: %v", newCorePath, err) + } + + log.Println("generating code") + output, err = executeOSCmd(fernGenerateCmd) + if err != nil { + log.Fatalf("unable to generate code: %v", err) + } + + log.Println(output) + + err = os.Chdir(rootWD) + if err != nil { + log.Fatalf("unable to get root wd: %v", err) + } + + err = os.RemoveAll(originalCorePath) + if err != nil { + log.Fatalf("unable to remove the original folder: %v", err) + } + + err = os.Rename(newCorePath, originalCorePath) + if err != nil { + log.Fatalf("unable to rename the new folder as the original folder") + } + + log.Println("success") + case scopeWorkspace: + log.Fatal("not implemented") + default: + log.Fatal("unknown scope: ", *scope) } - - fmt.Println(output) - - fmt.Println("hola") } func executeOSCmd(cmd string) (string, error) { @@ -154,7 +150,7 @@ func copyFile(srcPath, destPath string) error { func updateCoreAPISpecs() error { // Read the OpenAPI YAML file - inputFile := "xata/internal/fern-core-auto/fern/api/openapi/openapi.yml" + inputFile := "xata/internal/fern-core-auto/fern/api/openapi/core-openapi.yml" openAPIData, err := os.ReadFile(inputFile) if err != nil { fmt.Println("Error reading OpenAPI file:", err) @@ -163,7 +159,12 @@ func updateCoreAPISpecs() error { // Unmarshal the OpenAPI data into a struct var openAPI OpenAPI - if err := yaml.Unmarshal(openAPIData, &openAPI); err != nil { + //if err := yaml.Unmarshal(openAPIData, &openAPI); err != nil { + // fmt.Println("Error unmarshaling OpenAPI data:", err) + // return err + //} + + if err := json.Unmarshal(openAPIData, &openAPI); err != nil { fmt.Println("Error unmarshaling OpenAPI data:", err) return err } @@ -174,14 +175,20 @@ func updateCoreAPISpecs() error { delete(openAPI.Paths, "/db/{db_branch_name}/migrations/plan") // Marshal the updated OpenAPI struct back to YAML - updatedOpenAPIData, err := yaml.Marshal(&openAPI) + //updatedOpenAPIData, err := yaml.Marshal(&openAPI) + //if err != nil { + // fmt.Println("Error marshaling updated OpenAPI data:", err) + // return err + //} + + updatedOpenAPIData, err := json.Marshal(&openAPI) if err != nil { fmt.Println("Error marshaling updated OpenAPI data:", err) return err } // Save the updated OpenAPI data to a new file - outputFile := "xata/internal/fern-core-auto/fern/api/openapi/openapi.yml" + outputFile := "xata/internal/fern-core-auto/fern/api/openapi/core-openapi.yml" err = os.WriteFile(outputFile, updatedOpenAPIData, 0644) if err != nil { fmt.Println("Error saving updated OpenAPI file:", err) diff --git a/xata/internal/fern-core/fern/api/openapi/core-openapi.json b/xata/internal/fern-core/fern/api/openapi/core-openapi.json new file mode 100644 index 0000000..3920b70 --- /dev/null +++ b/xata/internal/fern-core/fern/api/openapi/core-openapi.json @@ -0,0 +1 @@ +{"openapi":"3.0.0","info":{"title":"xata-auth","description":"Xata.io Auth API","version":"1.0","license":{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0.html"},"contact":{"name":"support@xata.io"}},"servers":[{"url":"/","description":""}],"paths":{"/user":{"summary":"User info","description":"This endpoint allows retrieving or updating a given user by their user ID.","get":{"operationId":"getUser","summary":"Get user details","description":"Return details of the user making the request","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithID"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Users"]},"put":{"operationId":"updateUser","summary":"Update user info","description":"Update user info","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithID"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Users"]},"delete":{"operationId":"deleteUser","summary":"Delete user","description":"Delete the user making the request","responses":{"204":{"description":"No Content"},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Users"]}},"/user/keys":{"summary":"User API Keys","description":"This endpoint allows interacting with the API keys for a given user.","get":{"operationId":"getUserAPIKeys","summary":"Get the list of user API keys","description":"Retrieve a list of existing user API keys","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"createdAt":{"$ref":"#/components/schemas/DateTime"}},"required":["name","createdAt"]}}},"required":["keys"]}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Authentication"]}},"/user/keys/{key_name}":{"summary":"Single User API Key","description":"This endpoint allows operations on a single API key for a given user.","parameters":[{"$ref":"#/components/parameters/APIKeyNameParam"}],"post":{"operationId":"createUserAPIKey","summary":"Create and return new API key","description":"Create and return new API key","responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"key":{"type":"string"},"createdAt":{"$ref":"#/components/schemas/DateTime"}},"required":["name","key","createdAt"]}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Authentication"]},"delete":{"operationId":"deleteUserAPIKey","summary":"Delete an existing API key","description":"Delete an existing API key","responses":{"204":{"description":"No Content"},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Authentication"]}},"/user/oauth/clients":{"summary":"User OAuth Clients","description":"this endpoint allows listing the clients the current user has authorized","get":{"operationId":"getUserOAuthClients","summary":"Get the list of user OAuth Clients","description":"Retrieve the list of OAuth Clients that a user has authorized","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"clients":{"type":"array","items":{"$ref":"#/components/schemas/OAuthClientPublicDetails"}}}}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["OAuth"]}},"/user/oauth/clients/{client_id}":{"parameters":[{"$ref":"#/components/parameters/OAuthClientIDParam"}],"delete":{"operationId":"deleteUserOAuthClient","summary":"Delete the oauth client for the user","description":"Delete the oauth client for the user and revoke all access","responses":{"204":{"description":"No Content"},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["OAuth"]}},"/user/oauth/tokens":{"summary":"User OAuth Access Tokens","description":"this endpoint allows listing the valid access tokens on the current user's account","get":{"operationId":"getUserOAuthAccessTokens","summary":"Get the list of user OAuth Access Tokens","description":"Retrieve the list of valid OAuth Access Tokens on the current user's account","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"accessTokens":{"type":"array","items":{"$ref":"#/components/schemas/OAuthAccessToken"}}},"required":["accessTokens"]}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["OAuth"]}},"/user/oauth/tokens/{token}":{"parameters":[{"$ref":"#/components/parameters/OAuthAccessTokenParam"}],"delete":{"operationId":"deleteOAuthAccessToken","summary":"delete an access token for a third party app","description":"Expires the access token for a third party app","responses":{"204":{"description":"No Content"},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"409":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["OAuth"]},"patch":{"operationId":"updateOAuthAccessToken","summary":"updates an access token for a third party app","description":"Updates partially the access token for a third party app","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expires":{"description":"expiration time of the token as a unix timestamp","type":"integer"}},"required":["expires"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAccessToken"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"409":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["OAuth"]}},"/workspaces":{"summary":"Workspaces","description":"This endpoint enables interacting with specific workspaces within Xata. For more information about workspaces, see the [docs](/concepts/workspaces).","get":{"operationId":"getWorkspacesList","summary":"Get list of workspaces","description":"Retrieve the list of workspaces the user belongs to","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/WorkspaceID"},"name":{"type":"string"},"slug":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"}},"required":["name","role","slug","id"]}}},"required":["workspaces"]}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Workspaces"]},"post":{"operationId":"createWorkspace","summary":"Create a new workspace","description":"Creates a new workspace with the user requesting it as its single owner.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMeta"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Workspaces"]}},"/workspaces/{workspace_id}":{"summary":"Workspace by ID","description":"This endpoint contains operations for a specific workspace, referenced by ID.","parameters":[{"$ref":"#/components/parameters/WorkspaceIDParam"}],"get":{"operationId":"getWorkspace","summary":"Get an existing workspace","description":"Retrieve workspace info from a workspace ID","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"403":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Workspaces"]},"put":{"operationId":"updateWorkspace","summary":"Update an existing workspace","description":"Update workspace info","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMeta"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"403":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Workspaces"]},"delete":{"operationId":"deleteWorkspace","summary":"Delete an existing workspace","description":"Delete the workspace with the provided ID","responses":{"204":{"description":"No Content"},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"403":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Workspaces"]}},"/workspaces/{workspace_id}/members":{"summary":"Workspace Members","description":"This endpoint allows operations concerning the members of a given workspace.","parameters":[{"$ref":"#/components/parameters/WorkspaceIDParam"}],"get":{"operationId":"getWorkspaceMembersList","summary":"Get the list members of a workspace","description":"Retrieve the list of members of the given workspace","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMembers"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"403":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Workspaces"]}},"/workspaces/{workspace_id}/members/{user_id}":{"summary":"Specific Workspace Member","description":"This endpoint enables operations on a specific member of a workspace, referenced by their user ID.","parameters":[{"$ref":"#/components/parameters/WorkspaceIDParam"},{"$ref":"#/components/parameters/UserIDParam"}],"put":{"operationId":"updateWorkspaceMemberRole","summary":"Update workspace member role","description":"Update a workspace member role. Workspaces must always have at least one owner, so this operation will fail if trying to remove owner role from the last owner in the workspace.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/Role"}},"required":["role"]}}}},"responses":{"204":{"description":"No Content"},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"403":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Workspaces"]},"delete":{"operationId":"removeWorkspaceMember","summary":"Remove a member from the workspace","description":"Remove the member from the workspace","responses":{"204":{"description":"No Content"},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"403":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Workspaces"]}},"/workspaces/{workspace_id}/invites":{"summary":"Workspace Invites","description":"This endpoint enables working with invites for a given workspace.","parameters":[{"$ref":"#/components/parameters/WorkspaceIDParam"}],"post":{"operationId":"inviteWorkspaceMember","summary":"Invite a user to join the workspace","description":"Invite some user to join the workspace with the given role","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"role":{"$ref":"#/components/schemas/Role"}},"required":["email","role"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceInvite"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"403":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"409":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Invites"]}},"/workspaces/{workspace_id}/invites/{invite_id}":{"summary":"A specific invite within a given workspace","description":"This endpoint enables working with a given invite.","parameters":[{"$ref":"#/components/parameters/WorkspaceIDParam"},{"$ref":"#/components/parameters/InviteIDParam"}],"patch":{"operationId":"updateWorkspaceMemberInvite","summary":"Updates an existing invite","description":"This operation provides a way to update an existing invite. Updates are performed in-place; they do not change the invite link, the expiry time, nor do they re-notify the recipient of the invite.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/Role"}},"required":["role"]}}}},"responses":{"200":{"description":"Updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceInvite"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"403":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"422":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Invites"]},"delete":{"operationId":"cancelWorkspaceMemberInvite","summary":"Deletes an invite","description":"This operation provides a way to cancel invites by deleting them. Already accepted invites cannot be deleted.","responses":{"204":{"description":"No Content"},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"403":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Invites"]}},"/workspaces/{workspace_id}/invites/{invite_key}/accept":{"summary":"Accept an Invite","description":"This [RPC](https://en.wikipedia.org/wiki/Remote_procedure_call)-style endpoint accepts a given invite to join a workspace.","parameters":[{"$ref":"#/components/parameters/WorkspaceIDParam"},{"$ref":"#/components/parameters/InviteKeyParam"}],"post":{"operationId":"acceptWorkspaceMemberInvite","summary":"Accept the invitation to join a workspace","description":"Accept the invitation to join a workspace. If the operation succeeds the user will be a member of the workspace\n","responses":{"204":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"403":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Invites"]}},"/workspaces/{workspace_id}/invites/{invite_id}/resend":{"summary":"Resend Invite notification","description":"Resend the notification for a previously generated Invite.","parameters":[{"$ref":"#/components/parameters/WorkspaceIDParam"},{"$ref":"#/components/parameters/InviteIDParam"}],"post":{"operationId":"resendWorkspaceMemberInvite","summary":"Resend Invite notification","description":"This operation provides a way to resend an Invite notification. Invite notifications can only be sent for Invites not yet accepted.","responses":{"204":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"403":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"tags":["Invites"]}},"/workspaces/{workspace_id}/dbs":{"summary":"Databases","description":"This path contains operations that can be performed on databases within Xata.","parameters":[{"$ref":"#/components/parameters/WorkspaceIDParam"}],"get":{"operationId":"getDatabaseList","summary":"List databases","description":"List all databases available in your Workspace.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDatabasesResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"5XX":{"description":"Unexpected Error"}},"security":[{"bearerAuth":[]}],"tags":["Databases"]}},"/workspaces/{workspace_id}/dbs/{db_name}":{"summary":"Single Database","description":"Given a parameter `db_name`, this path allows interacting with a specific database on Xata. Below are a number of operations that can be performed on a given database.","parameters":[{"$ref":"#/components/parameters/WorkspaceIDParam"},{"$ref":"#/components/parameters/DBNameParam"}],"put":{"operationId":"createDatabase","summary":"Create Database","description":"Create Database with identifier name","requestBody":{"description":"","content":{"application/json":{"schema":{"description":"","type":"object","properties":{"branchName":{"type":"string","minLength":1},"region":{"type":"string","minLength":1},"ui":{"type":"object","properties":{"color":{"type":"string"}}},"metadata":{"$ref":"#/components/schemas/BranchMetadata"}},"example":{"branchName":"main","region":"us-east-1","metadata":{"repository":"github.com/my/repository","branch":"github repository","stage":"testing","labels":["development"]}},"required":["region"]}}}},"responses":{"201":{"description":"Created","headers":{"Location":{"schema":{"type":"string","format":"uri"}}},"content":{"application/json":{"schema":{"description":"","type":"object","properties":{"databaseName":{"type":"string","minLength":1},"branchName":{"type":"string"},"status":{"$ref":"#/components/schemas/MigrationStatus"}},"example":{"databaseName":"New Database","status":"completed"},"required":["databaseName","status"]}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"422":{"$ref":"#/components/responses/SimpleError"},"423":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"security":[{"bearerAuth":[]}],"tags":["Databases"]},"delete":{"operationId":"deleteDatabase","summary":"Delete Database","description":"Delete a database and all of its branches and tables permanently.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/MigrationStatus"}},"required":["status"]}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"security":[{"bearerAuth":[]}],"tags":["Databases"]},"get":{"operationId":"getDatabaseMetadata","summary":"Get Database metadata","description":"Retrieve metadata of the given database","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseMetadata"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"security":[{"bearerAuth":[]}],"tags":["Databases"]},"patch":{"operationId":"updateDatabaseMetadata","summary":"Update Database metadata","description":"Update the color of the selected database","requestBody":{"description":"","content":{"application/json":{"schema":{"description":"","type":"object","properties":{"ui":{"type":"object","properties":{"color":{"type":"string","minLength":1}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseMetadata"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"404":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"security":[{"bearerAuth":[]}],"tags":["Databases"]}},"/workspaces/{workspace_id}/dbs/{db_name}/rename":{"summary":"Rename database","description":"Given a parameter `db_name`, this path allows you to rename your Xata database. When you rename a database all URLs accessing the database have to be updated.","parameters":[{"$ref":"#/components/parameters/WorkspaceIDParam"},{"$ref":"#/components/parameters/DBNameParam"}],"post":{"operationId":"renameDatabase","summary":"Rename Database","description":"Change the name of an existing database","requestBody":{"description":"","content":{"application/json":{"schema":{"description":"","type":"object","properties":{"newName":{"type":"string","minLength":1}},"required":["newName"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseMetadata"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"422":{"$ref":"#/components/responses/SimpleError"},"423":{"$ref":"#/components/responses/SimpleError"},"5XX":{"description":"Unexpected Error"}},"security":[{"bearerAuth":[]}],"tags":["Databases"]}},"/workspaces/{workspace_id}/regions":{"summary":"Available regions","description":"This path allows to access the list of available database regions","parameters":[{"$ref":"#/components/parameters/WorkspaceIDParam"}],"get":{"operationId":"listRegions","summary":"List available regions","description":"List regions available to create a database on","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRegionsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/AuthError"},"5XX":{"description":"Unexpected Error"}},"security":[{"bearerAuth":[]}],"tags":["Databases"]}}},"components":{"parameters":{"APIKeyNameParam":{"name":"key_name","in":"path","required":true,"schema":{"$ref":"#/components/schemas/APIKeyName"},"description":"API Key name"},"DBNameParam":{"name":"db_name","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DBName"},"description":"The Database Name"},"InviteIDParam":{"name":"invite_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/InviteID"},"description":"Invite identifier"},"InviteKeyParam":{"name":"invite_key","in":"path","required":true,"schema":{"$ref":"#/components/schemas/InviteKey"},"description":"Invite Key (secret) for the invited user"},"OAuthAccessTokenParam":{"name":"token","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AccessToken"}},"OAuthClientIDParam":{"name":"client_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/OAuthClientID"}},"UserIDParam":{"name":"user_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/UserID"},"description":"UserID"},"WorkspaceIDParam":{"name":"workspace_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/WorkspaceID"},"description":"Workspace ID"}},"schemas":{"APIKeyName":{"type":"string","pattern":"[a-zA-Z0-9_\\-~]*","title":"APIKeyName"},"AccessToken":{"type":"string","title":"AccessToken"},"AuthorizationCodeRequest":{"type":"object","properties":{"state":{"type":"string"},"redirectUri":{"type":"string"},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/OAuthScope"}},"clientId":{"type":"string"},"responseType":{"$ref":"#/components/schemas/OAuthResponseType"}},"required":["clientId","responseType"]},"AuthorizationCodeResponse":{"type":"object","properties":{"state":{"type":"string"},"redirectUri":{"type":"string"},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/OAuthScope"}},"clientId":{"type":"string"},"expires":{"type":"string","format":"date-time","readOnly":true},"code":{"type":"string","readOnly":true}}},"BranchMetadata":{"description":"","type":"object","properties":{"repository":{"type":"string","minLength":1},"branch":{"$ref":"#/components/schemas/BranchName"},"stage":{"type":"string","minLength":1},"labels":{"type":"array","items":{"type":"string"}}},"example":{"repository":"github.com/my/repository","branch":"feature-login","stage":"testing","labels":["epic-100"]}},"BranchName":{"type":"string","maxLength":255,"minLength":1,"pattern":"[a-zA-Z0-9_\\-~]+","title":"BranchName"},"DBName":{"type":"string","maxLength":255,"minLength":1,"pattern":"[a-zA-Z0-9_\\-~]+","title":"DBName"},"DatabaseGithubSettings":{"description":"Github repository settings for this database (optional)","type":"object","properties":{"owner":{"description":"Repository owner (user or organization)","type":"string"},"repo":{"description":"Repository name","type":"string"}},"additionalProperties":false,"required":["owner","repo"]},"DatabaseMetadata":{"description":"Metadata of databases","type":"object","properties":{"name":{"description":"The machine-readable name of a database","type":"string"},"region":{"description":"Region where this database is hosted","type":"string"},"createdAt":{"description":"The time this database was created","$ref":"#/components/schemas/DateTime"},"ui":{"description":"Metadata about the database for display in Xata user interfaces","type":"object","properties":{"color":{"description":"The user-selected color for this database across interfaces","type":"string"}}}},"additionalProperties":false,"required":["name","createdAt","region"]},"DateTime":{"type":"string","format":"date-time","title":"DateTime"},"InviteID":{"type":"string","pattern":"[a-zA-Z0-9]+","title":"InviteID"},"InviteKey":{"type":"string","pattern":"^ik_[a-zA-Z0-9]+","title":"InviteKey"},"ListDatabasesResponse":{"type":"object","properties":{"databases":{"description":"A list of databases in a Xata workspace","type":"array","items":{"$ref":"#/components/schemas/DatabaseMetadata"}}},"required":["databases"]},"ListRegionsResponse":{"type":"object","properties":{"regions":{"description":"A list of regions where databases can be created","type":"array","items":{"$ref":"#/components/schemas/Region"}}},"required":["regions"]},"MigrationStatus":{"type":"string","enum":["completed","pending","failed"]},"OAuthAccessToken":{"type":"object","properties":{"token":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"clientId":{"type":"string"}},"required":["token","scopes","createdAt","updatedAt","expiresAt","clientId"]},"OAuthClientID":{"type":"string"},"OAuthClientPublicDetails":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"clientId":{"type":"string"}},"required":["clientId"]},"OAuthResponseType":{"type":"string","enum":["code"]},"OAuthScope":{"type":"string","enum":["admin:all"]},"Region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"Role":{"type":"string","enum":["owner","maintainer"]},"User":{"type":"object","properties":{"email":{"type":"string","format":"email"},"fullname":{"type":"string"},"image":{"type":"string"}},"required":["fullname","email","image"]},"UserID":{"type":"string","pattern":"[a-zA-Z0-9_-~:]+","title":"UserID"},"UserWithID":{"allOf":[{"$ref":"#/components/schemas/User"},{"type":"object","properties":{"id":{"$ref":"#/components/schemas/UserID"}},"required":["id"]}]},"Workspace":{"allOf":[{"$ref":"#/components/schemas/WorkspaceMeta"},{"type":"object","properties":{"id":{"$ref":"#/components/schemas/WorkspaceID"},"memberCount":{"type":"integer"},"plan":{"type":"string","enum":["free","pro"]}},"required":["id","memberCount","plan"]}]},"WorkspaceID":{"type":"string","pattern":"^([a-zA-Z0-9][a-zA-Z0-9_\\-~]+-)?[a-zA-Z0-9]{6}","title":"WorkspaceID"},"WorkspaceInvite":{"type":"object","properties":{"inviteId":{"$ref":"#/components/schemas/InviteID"},"email":{"type":"string","format":"email"},"expires":{"type":"string","format":"date-time"},"role":{"$ref":"#/components/schemas/Role"}},"required":["inviteId","email","expires","role"]},"WorkspaceMember":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UserID"},"fullname":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"$ref":"#/components/schemas/Role"}},"required":["userId","email","fullname","role"]},"WorkspaceMembers":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceMember"}},"invites":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceInvite"}}},"required":["members","invites"]},"WorkspaceMeta":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"}},"required":["name"]}},"responses":{"AuthError":{"description":"Authentication Error","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"example":{"message":"invalid API key"},"required":["message"]}}}},"BadRequestError":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["message"]}}}},"SimpleError":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["message"]}}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"Workspaces","description":"Workspaces management","x-displayName":"Workspaces"},{"name":"Users","description":"Users management","x-displayName":"Users"},{"name":"Invites","description":"Manage user invites.","x-displayName":"Invites"},{"name":"Authentication","description":"Authentication and API Key management.","x-displayName":"Authentication"},{"name":"OAuth","x-displayName":"OAuth"},{"name":"auth_other","x-displayName":"other"},{"name":"Databases","description":"Workspace databases management.","x-displayName":"Databases"},{"name":"xbcontrol_other","x-displayName":"other"}],"x-tagGroups":[{"name":"auth","tags":["Workspaces","Users","Invites","Authentication","OAuth","auth_other"],"description":"Xata.io Auth API"},{"name":"xbcontrol","tags":["Databases","xbcontrol_other"],"description":"Xata.io Xatabases API"}]} \ No newline at end of file diff --git a/xata/internal/fern-core/fern/api/openapi/openapi.yml b/xata/internal/fern-core/fern/api/openapi/openapi.yml deleted file mode 100644 index ae2a486..0000000 --- a/xata/internal/fern-core/fern/api/openapi/openapi.yml +++ /dev/null @@ -1,1460 +0,0 @@ -openapi: 3.0.0 -info: - title: xata-auth - description: Xata.io Auth API - version: '1.0' - license: - name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - contact: - name: support@xata.io -servers: - - url: / - description: '' -paths: - /user: - summary: User info - description: This endpoint allows retrieving or updating a given user by their user ID. - get: - operationId: getUser - summary: Get user details - description: Return details of the user making the request - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/UserWithID' - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Users - put: - operationId: updateUser - summary: Update user info - description: Update user info - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/UserWithID' - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Users - delete: - operationId: deleteUser - summary: Delete user - description: Delete the user making the request - responses: - '204': - description: No Content - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Users - /user/keys: - summary: User API Keys - description: This endpoint allows interacting with the API keys for a given user. - get: - operationId: getUserAPIKeys - summary: Get the list of user API keys - description: Retrieve a list of existing user API keys - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - keys: - type: array - items: - type: object - properties: - name: - type: string - createdAt: - $ref: '#/components/schemas/DateTime' - required: - - name - - createdAt - required: - - keys - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Authentication - /user/keys/{key_name}: - summary: Single User API Key - description: This endpoint allows operations on a single API key for a given user. - parameters: - - $ref: '#/components/parameters/APIKeyNameParam' - post: - operationId: createUserAPIKey - summary: Create and return new API key - description: Create and return new API key - responses: - '201': - description: OK - content: - application/json: - schema: - type: object - properties: - name: - type: string - key: - type: string - createdAt: - $ref: '#/components/schemas/DateTime' - required: - - name - - key - - createdAt - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Authentication - delete: - operationId: deleteUserAPIKey - summary: Delete an existing API key - description: Delete an existing API key - responses: - '204': - description: No Content - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Authentication - /user/oauth/clients: - summary: User OAuth Clients - description: this endpoint allows listing the clients the current user has authorized - get: - operationId: getUserOAuthClients - summary: Get the list of user OAuth Clients - description: Retrieve the list of OAuth Clients that a user has authorized - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - clients: - type: array - items: - $ref: '#/components/schemas/OAuthClientPublicDetails' - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - OAuth - /user/oauth/clients/{client_id}: - parameters: - - $ref: '#/components/parameters/OAuthClientIDParam' - delete: - operationId: deleteUserOAuthClient - summary: Delete the oauth client for the user - description: Delete the oauth client for the user and revoke all access - responses: - '204': - description: No Content - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - OAuth - /user/oauth/tokens: - summary: User OAuth Access Tokens - description: >- - this endpoint allows listing the valid access tokens on the current user's - account - get: - operationId: getUserOAuthAccessTokens - summary: Get the list of user OAuth Access Tokens - description: >- - Retrieve the list of valid OAuth Access Tokens on the current user's - account - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - accessTokens: - type: array - items: - $ref: '#/components/schemas/OAuthAccessToken' - required: - - accessTokens - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - OAuth - /user/oauth/tokens/{token}: - parameters: - - $ref: '#/components/parameters/OAuthAccessTokenParam' - delete: - operationId: deleteOAuthAccessToken - summary: delete an access token for a third party app - description: Expires the access token for a third party app - responses: - '204': - description: No Content - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - '409': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - OAuth - patch: - operationId: updateOAuthAccessToken - summary: updates an access token for a third party app - description: Updates partially the access token for a third party app - requestBody: - content: - application/json: - schema: - type: object - properties: - expires: - description: expiration time of the token as a unix timestamp - type: integer - required: - - expires - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/OAuthAccessToken' - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - '409': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - OAuth - /workspaces: - summary: Workspaces - description: >- - This endpoint enables interacting with specific workspaces within Xata. - For more information about workspaces, see the - [docs](/concepts/workspaces). - get: - operationId: getWorkspacesList - summary: Get list of workspaces - description: Retrieve the list of workspaces the user belongs to - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - workspaces: - type: array - items: - type: object - properties: - id: - $ref: '#/components/schemas/WorkspaceID' - name: - type: string - slug: - type: string - role: - $ref: '#/components/schemas/Role' - required: - - name - - role - - slug - - id - required: - - workspaces - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Workspaces - post: - operationId: createWorkspace - summary: Create a new workspace - description: Creates a new workspace with the user requesting it as its single owner. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WorkspaceMeta' - responses: - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/Workspace' - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Workspaces - /workspaces/{workspace_id}: - summary: Workspace by ID - description: >- - This endpoint contains operations for a specific workspace, referenced by - ID. - parameters: - - $ref: '#/components/parameters/WorkspaceIDParam' - get: - operationId: getWorkspace - summary: Get an existing workspace - description: Retrieve workspace info from a workspace ID - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Workspace' - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '403': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Workspaces - put: - operationId: updateWorkspace - summary: Update an existing workspace - description: Update workspace info - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WorkspaceMeta' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Workspace' - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '403': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Workspaces - delete: - operationId: deleteWorkspace - summary: Delete an existing workspace - description: Delete the workspace with the provided ID - responses: - '204': - description: No Content - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '403': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Workspaces - /workspaces/{workspace_id}/members: - summary: Workspace Members - description: >- - This endpoint allows operations concerning the members of a given - workspace. - parameters: - - $ref: '#/components/parameters/WorkspaceIDParam' - get: - operationId: getWorkspaceMembersList - summary: Get the list members of a workspace - description: Retrieve the list of members of the given workspace - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/WorkspaceMembers' - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '403': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Workspaces - /workspaces/{workspace_id}/members/{user_id}: - summary: Specific Workspace Member - description: >- - This endpoint enables operations on a specific member of a workspace, - referenced by their user ID. - parameters: - - $ref: '#/components/parameters/WorkspaceIDParam' - - $ref: '#/components/parameters/UserIDParam' - put: - operationId: updateWorkspaceMemberRole - summary: Update workspace member role - description: > - Update a workspace member role. Workspaces must always have at least one - owner, so this operation will fail if trying to remove owner role from - the last owner in the workspace. - requestBody: - content: - application/json: - schema: - type: object - properties: - role: - $ref: '#/components/schemas/Role' - required: - - role - responses: - '204': - description: No Content - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '403': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Workspaces - delete: - operationId: removeWorkspaceMember - summary: Remove a member from the workspace - description: Remove the member from the workspace - responses: - '204': - description: No Content - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '403': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Workspaces - /workspaces/{workspace_id}/invites: - summary: Workspace Invites - description: This endpoint enables working with invites for a given workspace. - parameters: - - $ref: '#/components/parameters/WorkspaceIDParam' - post: - operationId: inviteWorkspaceMember - summary: Invite a user to join the workspace - description: Invite some user to join the workspace with the given role - requestBody: - content: - application/json: - schema: - type: object - properties: - email: - type: string - format: email - role: - $ref: '#/components/schemas/Role' - required: - - email - - role - responses: - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/WorkspaceInvite' - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '403': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - '409': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Invites - /workspaces/{workspace_id}/invites/{invite_id}: - summary: A specific invite within a given workspace - description: This endpoint enables working with a given invite. - parameters: - - $ref: '#/components/parameters/WorkspaceIDParam' - - $ref: '#/components/parameters/InviteIDParam' - patch: - operationId: updateWorkspaceMemberInvite - summary: Updates an existing invite - description: > - This operation provides a way to update an existing invite. Updates are - performed in-place; they do not change the invite link, the expiry time, - nor do they re-notify the recipient of the invite. - requestBody: - content: - application/json: - schema: - type: object - properties: - role: - $ref: '#/components/schemas/Role' - required: - - role - responses: - '200': - description: Updated successfully. - content: - application/json: - schema: - $ref: '#/components/schemas/WorkspaceInvite' - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '403': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - '422': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Invites - delete: - operationId: cancelWorkspaceMemberInvite - summary: Deletes an invite - description: >- - This operation provides a way to cancel invites by deleting them. - Already accepted invites cannot be deleted. - responses: - '204': - description: No Content - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '403': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Invites - /workspaces/{workspace_id}/invites/{invite_key}/accept: - summary: Accept an Invite - description: >- - This [RPC](https://en.wikipedia.org/wiki/Remote_procedure_call)-style - endpoint accepts a given invite to join a workspace. - parameters: - - $ref: '#/components/parameters/WorkspaceIDParam' - - $ref: '#/components/parameters/InviteKeyParam' - post: - operationId: acceptWorkspaceMemberInvite - summary: Accept the invitation to join a workspace - description: > - Accept the invitation to join a workspace. If the operation succeeds the - user will be a member of the workspace - responses: - '204': - description: OK - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '403': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Invites - /workspaces/{workspace_id}/invites/{invite_id}/resend: - summary: Resend Invite notification - description: Resend the notification for a previously generated Invite. - parameters: - - $ref: '#/components/parameters/WorkspaceIDParam' - - $ref: '#/components/parameters/InviteIDParam' - post: - operationId: resendWorkspaceMemberInvite - summary: Resend Invite notification - description: >- - This operation provides a way to resend an Invite notification. Invite - notifications can only be sent for Invites not yet accepted. - responses: - '204': - description: OK - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '403': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - tags: - - Invites - /workspaces/{workspace_id}/dbs: - summary: Databases - description: >- - This path contains operations that can be performed on databases within - Xata. - parameters: - - $ref: '#/components/parameters/WorkspaceIDParam' - get: - operationId: getDatabaseList - summary: List databases - description: List all databases available in your Workspace. - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ListDatabasesResponse' - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - 5XX: - description: Unexpected Error - security: - - bearerAuth: [] - tags: - - Databases - /workspaces/{workspace_id}/dbs/{db_name}: - summary: Single Database - description: >- - Given a parameter `db_name`, this path allows interacting with a specific - database on Xata. Below are a number of operations that can be performed - on a given database. - parameters: - - $ref: '#/components/parameters/WorkspaceIDParam' - - $ref: '#/components/parameters/DBNameParam' - put: - operationId: createDatabase - summary: Create Database - description: Create Database with identifier name - requestBody: - description: '' - content: - application/json: - schema: - description: '' - type: object - properties: - branchName: - type: string - minLength: 1 - region: - type: string - minLength: 1 - ui: - type: object - properties: - color: - type: string - metadata: - $ref: '#/components/schemas/BranchMetadata' - example: - branchName: main - region: us-east-1 - metadata: - repository: github.com/my/repository - branch: github repository - stage: testing - labels: - - development - required: - - region - responses: - '201': - description: Created - headers: - Location: - schema: - type: string - format: uri - content: - application/json: - schema: - description: '' - type: object - properties: - databaseName: - type: string - minLength: 1 - branchName: - type: string - status: - $ref: '#/components/schemas/MigrationStatus' - example: - databaseName: New Database - status: completed - required: - - databaseName - - status - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '422': - $ref: '#/components/responses/SimpleError' - '423': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - security: - - bearerAuth: [] - tags: - - Databases - delete: - operationId: deleteDatabase - summary: Delete Database - description: Delete a database and all of its branches and tables permanently. - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - status: - $ref: '#/components/schemas/MigrationStatus' - required: - - status - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - security: - - bearerAuth: [] - tags: - - Databases - get: - operationId: getDatabaseMetadata - summary: Get Database metadata - description: Retrieve metadata of the given database - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseMetadata' - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - security: - - bearerAuth: [] - tags: - - Databases - patch: - operationId: updateDatabaseMetadata - summary: Update Database metadata - description: Update the color of the selected database - requestBody: - description: '' - content: - application/json: - schema: - description: '' - type: object - properties: - ui: - type: object - properties: - color: - type: string - minLength: 1 - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseMetadata' - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '404': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - security: - - bearerAuth: [] - tags: - - Databases - /workspaces/{workspace_id}/dbs/{db_name}/rename: - summary: Rename database - description: >- - Given a parameter `db_name`, this path allows you to rename your Xata - database. When you rename a database all URLs accessing the database have - to be updated. - parameters: - - $ref: '#/components/parameters/WorkspaceIDParam' - - $ref: '#/components/parameters/DBNameParam' - post: - operationId: renameDatabase - summary: Rename Database - description: Change the name of an existing database - requestBody: - description: '' - content: - application/json: - schema: - description: '' - type: object - properties: - newName: - type: string - minLength: 1 - required: - - newName - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseMetadata' - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - '422': - $ref: '#/components/responses/SimpleError' - '423': - $ref: '#/components/responses/SimpleError' - 5XX: - description: Unexpected Error - security: - - bearerAuth: [] - tags: - - Databases - /workspaces/{workspace_id}/regions: - summary: Available regions - description: This path allows to access the list of available database regions - parameters: - - $ref: '#/components/parameters/WorkspaceIDParam' - get: - operationId: listRegions - summary: List available regions - description: List regions available to create a database on - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ListRegionsResponse' - '400': - $ref: '#/components/responses/BadRequestError' - '401': - $ref: '#/components/responses/AuthError' - 5XX: - description: Unexpected Error - security: - - bearerAuth: [] - tags: - - Databases -components: - parameters: - APIKeyNameParam: - name: key_name - in: path - required: true - schema: - $ref: '#/components/schemas/APIKeyName' - description: API Key name - DBNameParam: - name: db_name - in: path - required: true - schema: - $ref: '#/components/schemas/DBName' - description: The Database Name - InviteIDParam: - name: invite_id - in: path - required: true - schema: - $ref: '#/components/schemas/InviteID' - description: Invite identifier - InviteKeyParam: - name: invite_key - in: path - required: true - schema: - $ref: '#/components/schemas/InviteKey' - description: Invite Key (secret) for the invited user - OAuthAccessTokenParam: - name: token - in: path - required: true - schema: - $ref: '#/components/schemas/AccessToken' - OAuthClientIDParam: - name: client_id - in: path - required: true - schema: - $ref: '#/components/schemas/OAuthClientID' - UserIDParam: - name: user_id - in: path - required: true - schema: - $ref: '#/components/schemas/UserID' - description: UserID - WorkspaceIDParam: - name: workspace_id - in: path - required: true - schema: - $ref: '#/components/schemas/WorkspaceID' - description: Workspace ID - schemas: - APIKeyName: - type: string - pattern: '[a-zA-Z0-9_\-~]*' - title: APIKeyName - AccessToken: - type: string - title: AccessToken - AuthorizationCodeRequest: - type: object - properties: - state: - type: string - redirectUri: - type: string - scopes: - type: array - items: - $ref: '#/components/schemas/OAuthScope' - clientId: - type: string - responseType: - $ref: '#/components/schemas/OAuthResponseType' - required: - - clientId - - responseType - AuthorizationCodeResponse: - type: object - properties: - state: - type: string - redirectUri: - type: string - scopes: - type: array - items: - $ref: '#/components/schemas/OAuthScope' - clientId: - type: string - expires: - type: string - format: date-time - readOnly: true - code: - type: string - readOnly: true - BranchMetadata: - description: '' - type: object - properties: - repository: - type: string - minLength: 1 - branch: - $ref: '#/components/schemas/BranchName' - stage: - type: string - minLength: 1 - labels: - type: array - items: - type: string - example: - repository: github.com/my/repository - branch: feature-login - stage: testing - labels: - - epic-100 - BranchName: - type: string - maxLength: 255 - minLength: 1 - pattern: '[a-zA-Z0-9_\-~]+' - title: BranchName - DBName: - type: string - maxLength: 255 - minLength: 1 - pattern: '[a-zA-Z0-9_\-~]+' - title: DBName - DatabaseGithubSettings: - description: Github repository settings for this database (optional) - type: object - properties: - owner: - description: Repository owner (user or organization) - type: string - repo: - description: Repository name - type: string - additionalProperties: false - required: - - owner - - repo - DatabaseMetadata: - description: Metadata of databases - type: object - properties: - name: - description: The machine-readable name of a database - type: string - region: - description: Region where this database is hosted - type: string - createdAt: - description: The time this database was created - $ref: '#/components/schemas/DateTime' - ui: - description: Metadata about the database for display in Xata user interfaces - type: object - properties: - color: - description: The user-selected color for this database across interfaces - type: string - additionalProperties: false - required: - - name - - createdAt - - region - DateTime: - type: string - format: date-time - title: DateTime - InviteID: - type: string - pattern: '[a-zA-Z0-9]+' - title: InviteID - InviteKey: - type: string - pattern: ^ik_[a-zA-Z0-9]+ - title: InviteKey - ListDatabasesResponse: - type: object - properties: - databases: - description: A list of databases in a Xata workspace - type: array - items: - $ref: '#/components/schemas/DatabaseMetadata' - required: - - databases - ListRegionsResponse: - type: object - properties: - regions: - description: A list of regions where databases can be created - type: array - items: - $ref: '#/components/schemas/Region' - required: - - regions - MigrationStatus: - type: string - enum: - - completed - - pending - - failed - OAuthAccessToken: - type: object - properties: - token: - type: string - scopes: - type: array - items: - type: string - createdAt: - type: string - format: date-time - updatedAt: - type: string - format: date-time - expiresAt: - type: string - format: date-time - clientId: - type: string - required: - - token - - scopes - - createdAt - - updatedAt - - expiresAt - - clientId - OAuthClientID: - type: string - OAuthClientPublicDetails: - type: object - properties: - name: - type: string - description: - type: string - icon: - type: string - clientId: - type: string - required: - - clientId - OAuthResponseType: - type: string - enum: - - code - OAuthScope: - type: string - enum: - - admin:all - Region: - type: object - properties: - id: - type: string - name: - type: string - required: - - id - - name - Role: - type: string - enum: - - owner - - maintainer - User: - type: object - properties: - email: - type: string - format: email - fullname: - type: string - image: - type: string - required: - - fullname - - email - - image - UserID: - type: string - pattern: '[a-zA-Z0-9_-~:]+' - title: UserID - UserWithID: - allOf: - - $ref: '#/components/schemas/User' - - type: object - properties: - id: - $ref: '#/components/schemas/UserID' - required: - - id - Workspace: - allOf: - - $ref: '#/components/schemas/WorkspaceMeta' - - type: object - properties: - id: - $ref: '#/components/schemas/WorkspaceID' - memberCount: - type: integer - plan: - type: string - enum: - - free - - pro - required: - - id - - memberCount - - plan - WorkspaceID: - type: string - pattern: ^([a-zA-Z0-9][a-zA-Z0-9_\-~]+-)?[a-zA-Z0-9]{6} - title: WorkspaceID - WorkspaceInvite: - type: object - properties: - inviteId: - $ref: '#/components/schemas/InviteID' - email: - type: string - format: email - expires: - type: string - format: date-time - role: - $ref: '#/components/schemas/Role' - required: - - inviteId - - email - - expires - - role - WorkspaceMember: - type: object - properties: - userId: - $ref: '#/components/schemas/UserID' - fullname: - type: string - email: - type: string - format: email - role: - $ref: '#/components/schemas/Role' - required: - - userId - - email - - fullname - - role - WorkspaceMembers: - type: object - properties: - members: - type: array - items: - $ref: '#/components/schemas/WorkspaceMember' - invites: - type: array - items: - $ref: '#/components/schemas/WorkspaceInvite' - required: - - members - - invites - WorkspaceMeta: - type: object - properties: - name: - type: string - slug: - type: string - required: - - name - responses: - AuthError: - description: Authentication Error - content: - application/json: - schema: - type: object - properties: - id: - type: string - message: - type: string - example: - message: invalid API key - required: - - message - BadRequestError: - description: Bad Request - content: - application/json: - schema: - type: object - properties: - id: - type: string - message: - type: string - required: - - message - SimpleError: - description: Example response - content: - application/json: - schema: - type: object - properties: - id: - type: string - message: - type: string - required: - - message - securitySchemes: - bearerAuth: - type: http - scheme: bearer -tags: - - name: Workspaces - description: Workspaces management - x-displayName: Workspaces - - name: Users - description: Users management - x-displayName: Users - - name: Invites - description: Manage user invites. - x-displayName: Invites - - name: Authentication - description: Authentication and API Key management. - x-displayName: Authentication - - name: OAuth - x-displayName: OAuth - - name: auth_other - x-displayName: other - - name: Databases - description: Workspace databases management. - x-displayName: Databases - - name: xbcontrol_other - x-displayName: other -x-tagGroups: - - name: auth - tags: - - Workspaces - - Users - - Invites - - Authentication - - OAuth - - auth_other - description: Xata.io Auth API - - name: xbcontrol - tags: - - Databases - - xbcontrol_other - description: Xata.io Xatabases API diff --git a/xata/internal/fern-core/generated/go/access_token.go b/xata/internal/fern-core/generated/go/access_token.go index 5c99ff7..37b3622 100644 --- a/xata/internal/fern-core/generated/go/access_token.go +++ b/xata/internal/fern-core/generated/go/access_token.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/api_key_name.go b/xata/internal/fern-core/generated/go/api_key_name.go index 6075b56..07850d3 100644 --- a/xata/internal/fern-core/generated/go/api_key_name.go +++ b/xata/internal/fern-core/generated/go/api_key_name.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/authentication_client.go b/xata/internal/fern-core/generated/go/authentication_client.go index dc61439..3a0ae27 100644 --- a/xata/internal/fern-core/generated/go/authentication_client.go +++ b/xata/internal/fern-core/generated/go/authentication_client.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api @@ -10,10 +8,9 @@ import ( json "encoding/json" errors "errors" fmt "fmt" + core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" io "io" http "net/http" - - core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" ) type AuthenticationClient interface { diff --git a/xata/internal/fern-core/generated/go/authorization_code_request.go b/xata/internal/fern-core/generated/go/authorization_code_request.go index a3b9651..8369df6 100644 --- a/xata/internal/fern-core/generated/go/authorization_code_request.go +++ b/xata/internal/fern-core/generated/go/authorization_code_request.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/authorization_code_response.go b/xata/internal/fern-core/generated/go/authorization_code_response.go index d8b4895..20323b9 100644 --- a/xata/internal/fern-core/generated/go/authorization_code_response.go +++ b/xata/internal/fern-core/generated/go/authorization_code_response.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/bad_request_error.go b/xata/internal/fern-core/generated/go/bad_request_error.go index 53ddf7f..7b8ed67 100644 --- a/xata/internal/fern-core/generated/go/bad_request_error.go +++ b/xata/internal/fern-core/generated/go/bad_request_error.go @@ -1,12 +1,9 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api import ( json "encoding/json" - core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" ) diff --git a/xata/internal/fern-core/generated/go/branch_metadata.go b/xata/internal/fern-core/generated/go/branch_metadata.go index b999612..d6d4242 100644 --- a/xata/internal/fern-core/generated/go/branch_metadata.go +++ b/xata/internal/fern-core/generated/go/branch_metadata.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/branch_name.go b/xata/internal/fern-core/generated/go/branch_name.go index 16f4574..5866fb7 100644 --- a/xata/internal/fern-core/generated/go/branch_name.go +++ b/xata/internal/fern-core/generated/go/branch_name.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/client.go b/xata/internal/fern-core/generated/go/client.go index 3dea334..f2d16fe 100644 --- a/xata/internal/fern-core/generated/go/client.go +++ b/xata/internal/fern-core/generated/go/client.go @@ -1,13 +1,10 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api import ( - http "net/http" - core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" + http "net/http" ) type Client interface { diff --git a/xata/internal/fern-core/generated/go/client_options.go b/xata/internal/fern-core/generated/go/client_options.go index 020eb0a..8398099 100644 --- a/xata/internal/fern-core/generated/go/client_options.go +++ b/xata/internal/fern-core/generated/go/client_options.go @@ -1,13 +1,10 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api import ( - http "net/http" - core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" + http "net/http" ) // ClientWithBaseURL sets the client's base URL, overriding the diff --git a/xata/internal/fern-core/generated/go/conflict_error.go b/xata/internal/fern-core/generated/go/conflict_error.go index 2114ce4..2b2539d 100644 --- a/xata/internal/fern-core/generated/go/conflict_error.go +++ b/xata/internal/fern-core/generated/go/conflict_error.go @@ -1,12 +1,9 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api import ( json "encoding/json" - core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" ) diff --git a/xata/internal/fern-core/generated/go/core/client_option.go b/xata/internal/fern-core/generated/go/core/client_option.go index 87e6b85..485cf93 100644 --- a/xata/internal/fern-core/generated/go/core/client_option.go +++ b/xata/internal/fern-core/generated/go/core/client_option.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package core diff --git a/xata/internal/fern-core/generated/go/core/core.go b/xata/internal/fern-core/generated/go/core/core.go index 76679c8..6f7e370 100644 --- a/xata/internal/fern-core/generated/go/core/core.go +++ b/xata/internal/fern-core/generated/go/core/core.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - package core import ( diff --git a/xata/internal/fern-core/generated/go/create_database_request.go b/xata/internal/fern-core/generated/go/create_database_request.go index 46c9c8e..eafebb3 100644 --- a/xata/internal/fern-core/generated/go/create_database_request.go +++ b/xata/internal/fern-core/generated/go/create_database_request.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/create_database_request_ui.go b/xata/internal/fern-core/generated/go/create_database_request_ui.go index efbab34..876fb94 100644 --- a/xata/internal/fern-core/generated/go/create_database_request_ui.go +++ b/xata/internal/fern-core/generated/go/create_database_request_ui.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/create_database_response.go b/xata/internal/fern-core/generated/go/create_database_response.go index 631b7b4..747a20a 100644 --- a/xata/internal/fern-core/generated/go/create_database_response.go +++ b/xata/internal/fern-core/generated/go/create_database_response.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/create_user_api_key_response.go b/xata/internal/fern-core/generated/go/create_user_api_key_response.go index 55ad7aa..43e6848 100644 --- a/xata/internal/fern-core/generated/go/create_user_api_key_response.go +++ b/xata/internal/fern-core/generated/go/create_user_api_key_response.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/database_github_settings.go b/xata/internal/fern-core/generated/go/database_github_settings.go index edccc83..58d18cf 100644 --- a/xata/internal/fern-core/generated/go/database_github_settings.go +++ b/xata/internal/fern-core/generated/go/database_github_settings.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/database_metadata.go b/xata/internal/fern-core/generated/go/database_metadata.go index 33a5ba9..a818d27 100644 --- a/xata/internal/fern-core/generated/go/database_metadata.go +++ b/xata/internal/fern-core/generated/go/database_metadata.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/database_metadata_ui.go b/xata/internal/fern-core/generated/go/database_metadata_ui.go index bdbed0d..4bc7855 100644 --- a/xata/internal/fern-core/generated/go/database_metadata_ui.go +++ b/xata/internal/fern-core/generated/go/database_metadata_ui.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/databases_client.go b/xata/internal/fern-core/generated/go/databases_client.go index 8f3ff96..36894e8 100644 --- a/xata/internal/fern-core/generated/go/databases_client.go +++ b/xata/internal/fern-core/generated/go/databases_client.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api @@ -10,10 +8,9 @@ import ( json "encoding/json" errors "errors" fmt "fmt" + core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" io "io" http "net/http" - - core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" ) type DatabasesClient interface { diff --git a/xata/internal/fern-core/generated/go/date_time.go b/xata/internal/fern-core/generated/go/date_time.go index 180ae90..c0d5a95 100644 --- a/xata/internal/fern-core/generated/go/date_time.go +++ b/xata/internal/fern-core/generated/go/date_time.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/db_name.go b/xata/internal/fern-core/generated/go/db_name.go index 0ba11f3..031867d 100644 --- a/xata/internal/fern-core/generated/go/db_name.go +++ b/xata/internal/fern-core/generated/go/db_name.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/delete_database_response.go b/xata/internal/fern-core/generated/go/delete_database_response.go index d52ad60..215da21 100644 --- a/xata/internal/fern-core/generated/go/delete_database_response.go +++ b/xata/internal/fern-core/generated/go/delete_database_response.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/doc.go b/xata/internal/fern-core/generated/go/doc.go index 6bcf96a..14b5cea 100644 --- a/xata/internal/fern-core/generated/go/doc.go +++ b/xata/internal/fern-core/generated/go/doc.go @@ -1,6 +1,4 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. -// Workspace databases management. +// Authentication and API Key management. package api diff --git a/xata/internal/fern-core/generated/go/environments.go b/xata/internal/fern-core/generated/go/environments.go index 902bb97..133438d 100644 --- a/xata/internal/fern-core/generated/go/environments.go +++ b/xata/internal/fern-core/generated/go/environments.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/forbidden_error.go b/xata/internal/fern-core/generated/go/forbidden_error.go index 32885d5..5a6064f 100644 --- a/xata/internal/fern-core/generated/go/forbidden_error.go +++ b/xata/internal/fern-core/generated/go/forbidden_error.go @@ -1,12 +1,9 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api import ( json "encoding/json" - core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" ) diff --git a/xata/internal/fern-core/generated/go/get_user_api_keys_response.go b/xata/internal/fern-core/generated/go/get_user_api_keys_response.go index 0e5a0e4..9937c09 100644 --- a/xata/internal/fern-core/generated/go/get_user_api_keys_response.go +++ b/xata/internal/fern-core/generated/go/get_user_api_keys_response.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/get_user_api_keys_response_keys_item.go b/xata/internal/fern-core/generated/go/get_user_api_keys_response_keys_item.go index 3a2e042..91d4971 100644 --- a/xata/internal/fern-core/generated/go/get_user_api_keys_response_keys_item.go +++ b/xata/internal/fern-core/generated/go/get_user_api_keys_response_keys_item.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/get_user_o_auth_access_tokens_response.go b/xata/internal/fern-core/generated/go/get_user_o_auth_access_tokens_response.go index c0aee51..de7c736 100644 --- a/xata/internal/fern-core/generated/go/get_user_o_auth_access_tokens_response.go +++ b/xata/internal/fern-core/generated/go/get_user_o_auth_access_tokens_response.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/get_user_o_auth_clients_response.go b/xata/internal/fern-core/generated/go/get_user_o_auth_clients_response.go index 6d0fe6c..1a31b30 100644 --- a/xata/internal/fern-core/generated/go/get_user_o_auth_clients_response.go +++ b/xata/internal/fern-core/generated/go/get_user_o_auth_clients_response.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/get_workspaces_list_response.go b/xata/internal/fern-core/generated/go/get_workspaces_list_response.go index efd1b9d..a632f98 100644 --- a/xata/internal/fern-core/generated/go/get_workspaces_list_response.go +++ b/xata/internal/fern-core/generated/go/get_workspaces_list_response.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/get_workspaces_list_response_workspaces_item.go b/xata/internal/fern-core/generated/go/get_workspaces_list_response_workspaces_item.go index 3d78f7c..bea9229 100644 --- a/xata/internal/fern-core/generated/go/get_workspaces_list_response_workspaces_item.go +++ b/xata/internal/fern-core/generated/go/get_workspaces_list_response_workspaces_item.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/invite_id.go b/xata/internal/fern-core/generated/go/invite_id.go index 071462d..b858123 100644 --- a/xata/internal/fern-core/generated/go/invite_id.go +++ b/xata/internal/fern-core/generated/go/invite_id.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/invite_key.go b/xata/internal/fern-core/generated/go/invite_key.go index 592da60..baf3a52 100644 --- a/xata/internal/fern-core/generated/go/invite_key.go +++ b/xata/internal/fern-core/generated/go/invite_key.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/invite_workspace_member_request.go b/xata/internal/fern-core/generated/go/invite_workspace_member_request.go index f7f6d22..dacafbb 100644 --- a/xata/internal/fern-core/generated/go/invite_workspace_member_request.go +++ b/xata/internal/fern-core/generated/go/invite_workspace_member_request.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/invites_client.go b/xata/internal/fern-core/generated/go/invites_client.go index 09418d1..b8aa897 100644 --- a/xata/internal/fern-core/generated/go/invites_client.go +++ b/xata/internal/fern-core/generated/go/invites_client.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api @@ -10,10 +8,9 @@ import ( json "encoding/json" errors "errors" fmt "fmt" + core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" io "io" http "net/http" - - core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" ) type InvitesClient interface { diff --git a/xata/internal/fern-core/generated/go/list_databases_response.go b/xata/internal/fern-core/generated/go/list_databases_response.go index dcea539..63f4341 100644 --- a/xata/internal/fern-core/generated/go/list_databases_response.go +++ b/xata/internal/fern-core/generated/go/list_databases_response.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/list_regions_response.go b/xata/internal/fern-core/generated/go/list_regions_response.go index 37797de..3fc7275 100644 --- a/xata/internal/fern-core/generated/go/list_regions_response.go +++ b/xata/internal/fern-core/generated/go/list_regions_response.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/migration_status.go b/xata/internal/fern-core/generated/go/migration_status.go index f1d3d7c..4f0ef17 100644 --- a/xata/internal/fern-core/generated/go/migration_status.go +++ b/xata/internal/fern-core/generated/go/migration_status.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/not_found_error.go b/xata/internal/fern-core/generated/go/not_found_error.go index aff9b8a..b8cee7a 100644 --- a/xata/internal/fern-core/generated/go/not_found_error.go +++ b/xata/internal/fern-core/generated/go/not_found_error.go @@ -1,12 +1,9 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api import ( json "encoding/json" - core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" ) diff --git a/xata/internal/fern-core/generated/go/o_auth_access_token.go b/xata/internal/fern-core/generated/go/o_auth_access_token.go index a6b520a..8c5e008 100644 --- a/xata/internal/fern-core/generated/go/o_auth_access_token.go +++ b/xata/internal/fern-core/generated/go/o_auth_access_token.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/o_auth_client.go b/xata/internal/fern-core/generated/go/o_auth_client.go index f712919..dabd0ea 100644 --- a/xata/internal/fern-core/generated/go/o_auth_client.go +++ b/xata/internal/fern-core/generated/go/o_auth_client.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api @@ -10,10 +8,9 @@ import ( json "encoding/json" errors "errors" fmt "fmt" + core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" io "io" http "net/http" - - core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" ) type OAuthClient interface { diff --git a/xata/internal/fern-core/generated/go/o_auth_client_id.go b/xata/internal/fern-core/generated/go/o_auth_client_id.go index 65bf707..f99e5f8 100644 --- a/xata/internal/fern-core/generated/go/o_auth_client_id.go +++ b/xata/internal/fern-core/generated/go/o_auth_client_id.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/o_auth_client_public_details.go b/xata/internal/fern-core/generated/go/o_auth_client_public_details.go index 11da440..be15ff0 100644 --- a/xata/internal/fern-core/generated/go/o_auth_client_public_details.go +++ b/xata/internal/fern-core/generated/go/o_auth_client_public_details.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/o_auth_response_type.go b/xata/internal/fern-core/generated/go/o_auth_response_type.go index e71fb10..087104a 100644 --- a/xata/internal/fern-core/generated/go/o_auth_response_type.go +++ b/xata/internal/fern-core/generated/go/o_auth_response_type.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/o_auth_scope.go b/xata/internal/fern-core/generated/go/o_auth_scope.go index 5fa2594..4ae1cf9 100644 --- a/xata/internal/fern-core/generated/go/o_auth_scope.go +++ b/xata/internal/fern-core/generated/go/o_auth_scope.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/pointer.go b/xata/internal/fern-core/generated/go/pointer.go index 1646ee9..82fb917 100644 --- a/xata/internal/fern-core/generated/go/pointer.go +++ b/xata/internal/fern-core/generated/go/pointer.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - package api import "time" diff --git a/xata/internal/fern-core/generated/go/region.go b/xata/internal/fern-core/generated/go/region.go index 5b5dbb3..f51d224 100644 --- a/xata/internal/fern-core/generated/go/region.go +++ b/xata/internal/fern-core/generated/go/region.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/rename_database_request.go b/xata/internal/fern-core/generated/go/rename_database_request.go index c07aff1..00219ea 100644 --- a/xata/internal/fern-core/generated/go/rename_database_request.go +++ b/xata/internal/fern-core/generated/go/rename_database_request.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/role.go b/xata/internal/fern-core/generated/go/role.go index ce2d51f..2c565e2 100644 --- a/xata/internal/fern-core/generated/go/role.go +++ b/xata/internal/fern-core/generated/go/role.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/unauthorized_error.go b/xata/internal/fern-core/generated/go/unauthorized_error.go index 428203b..2cb7dae 100644 --- a/xata/internal/fern-core/generated/go/unauthorized_error.go +++ b/xata/internal/fern-core/generated/go/unauthorized_error.go @@ -1,12 +1,9 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api import ( json "encoding/json" - core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" ) diff --git a/xata/internal/fern-core/generated/go/unprocessable_entity_error.go b/xata/internal/fern-core/generated/go/unprocessable_entity_error.go index a2e2b58..021363a 100644 --- a/xata/internal/fern-core/generated/go/unprocessable_entity_error.go +++ b/xata/internal/fern-core/generated/go/unprocessable_entity_error.go @@ -1,12 +1,9 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api import ( json "encoding/json" - core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" ) diff --git a/xata/internal/fern-core/generated/go/update_database_metadata_request.go b/xata/internal/fern-core/generated/go/update_database_metadata_request.go index 4a7d7e2..a9bc7ca 100644 --- a/xata/internal/fern-core/generated/go/update_database_metadata_request.go +++ b/xata/internal/fern-core/generated/go/update_database_metadata_request.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/update_database_metadata_request_ui.go b/xata/internal/fern-core/generated/go/update_database_metadata_request_ui.go index 5bf7e9e..6d76527 100644 --- a/xata/internal/fern-core/generated/go/update_database_metadata_request_ui.go +++ b/xata/internal/fern-core/generated/go/update_database_metadata_request_ui.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/update_o_auth_access_token_request.go b/xata/internal/fern-core/generated/go/update_o_auth_access_token_request.go index ce8d83f..b043ccc 100644 --- a/xata/internal/fern-core/generated/go/update_o_auth_access_token_request.go +++ b/xata/internal/fern-core/generated/go/update_o_auth_access_token_request.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/update_workspace_member_invite_request.go b/xata/internal/fern-core/generated/go/update_workspace_member_invite_request.go index affe03b..3bf02c0 100644 --- a/xata/internal/fern-core/generated/go/update_workspace_member_invite_request.go +++ b/xata/internal/fern-core/generated/go/update_workspace_member_invite_request.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/update_workspace_member_role_request.go b/xata/internal/fern-core/generated/go/update_workspace_member_role_request.go index 763de73..8644063 100644 --- a/xata/internal/fern-core/generated/go/update_workspace_member_role_request.go +++ b/xata/internal/fern-core/generated/go/update_workspace_member_role_request.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/user.go b/xata/internal/fern-core/generated/go/user.go index 8572067..0045701 100644 --- a/xata/internal/fern-core/generated/go/user.go +++ b/xata/internal/fern-core/generated/go/user.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/user_id.go b/xata/internal/fern-core/generated/go/user_id.go index f93fca8..3abfafe 100644 --- a/xata/internal/fern-core/generated/go/user_id.go +++ b/xata/internal/fern-core/generated/go/user_id.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/user_with_id.go b/xata/internal/fern-core/generated/go/user_with_id.go index 1d9dc06..080dcd5 100644 --- a/xata/internal/fern-core/generated/go/user_with_id.go +++ b/xata/internal/fern-core/generated/go/user_with_id.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/users_client.go b/xata/internal/fern-core/generated/go/users_client.go index 73a7123..d1e8827 100644 --- a/xata/internal/fern-core/generated/go/users_client.go +++ b/xata/internal/fern-core/generated/go/users_client.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api @@ -9,10 +7,9 @@ import ( context "context" json "encoding/json" errors "errors" + core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" io "io" http "net/http" - - core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" ) type UsersClient interface { diff --git a/xata/internal/fern-core/generated/go/workspace.go b/xata/internal/fern-core/generated/go/workspace.go index ee883c7..30557d3 100644 --- a/xata/internal/fern-core/generated/go/workspace.go +++ b/xata/internal/fern-core/generated/go/workspace.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/workspace_id.go b/xata/internal/fern-core/generated/go/workspace_id.go index f8f9156..21bd9d7 100644 --- a/xata/internal/fern-core/generated/go/workspace_id.go +++ b/xata/internal/fern-core/generated/go/workspace_id.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/workspace_invite.go b/xata/internal/fern-core/generated/go/workspace_invite.go index 0fe927d..b1acb81 100644 --- a/xata/internal/fern-core/generated/go/workspace_invite.go +++ b/xata/internal/fern-core/generated/go/workspace_invite.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/workspace_member.go b/xata/internal/fern-core/generated/go/workspace_member.go index 41f8efc..2405e70 100644 --- a/xata/internal/fern-core/generated/go/workspace_member.go +++ b/xata/internal/fern-core/generated/go/workspace_member.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/workspace_members.go b/xata/internal/fern-core/generated/go/workspace_members.go index 4e29f99..db6e6cf 100644 --- a/xata/internal/fern-core/generated/go/workspace_members.go +++ b/xata/internal/fern-core/generated/go/workspace_members.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/workspace_meta.go b/xata/internal/fern-core/generated/go/workspace_meta.go index 5dca6ba..2c62e23 100644 --- a/xata/internal/fern-core/generated/go/workspace_meta.go +++ b/xata/internal/fern-core/generated/go/workspace_meta.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/workspace_plan.go b/xata/internal/fern-core/generated/go/workspace_plan.go index cb30705..be64e3a 100644 --- a/xata/internal/fern-core/generated/go/workspace_plan.go +++ b/xata/internal/fern-core/generated/go/workspace_plan.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api diff --git a/xata/internal/fern-core/generated/go/workspaces_client.go b/xata/internal/fern-core/generated/go/workspaces_client.go index 86d41d2..5152c77 100644 --- a/xata/internal/fern-core/generated/go/workspaces_client.go +++ b/xata/internal/fern-core/generated/go/workspaces_client.go @@ -1,5 +1,3 @@ -// SPDX-License-Identifier: Apache-2.0 - // This file was auto-generated by Fern from our API Definition. package api @@ -10,10 +8,9 @@ import ( json "encoding/json" errors "errors" fmt "fmt" + core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" io "io" http "net/http" - - core "github.com/xataio/xata-go/xata/internal/fern-core/generated/go/core" ) type WorkspacesClient interface {