// Package api provides primitives to interact with the openapi HTTP API. // // Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.1 DO NOT EDIT. package api import ( openapi_types "github.com/oapi-codegen/runtime/types" ) // Defines values for InviteStatus. const ( Added InviteStatus = "added" Expired InviteStatus = "expired" Pending InviteStatus = "pending" ) // Valid indicates whether the value is a known member of the InviteStatus enum. func (e InviteStatus) Valid() bool { switch e { case Added: return true case Expired: return true case Pending: return true default: return false } } // Defines values for Role. const ( RoleAdmin Role = "admin" RoleSuperadmin Role = "superadmin" RoleUser Role = "user" ) // Valid indicates whether the value is a known member of the Role enum. func (e Role) Valid() bool { switch e { case RoleAdmin: return true case RoleSuperadmin: return true case RoleUser: return true default: return false } } // Defines values for SpaceDefaultRole. const ( SpaceDefaultRoleCommenter SpaceDefaultRole = "commenter" SpaceDefaultRoleEditor SpaceDefaultRole = "editor" SpaceDefaultRoleViewer SpaceDefaultRole = "viewer" ) // Valid indicates whether the value is a known member of the SpaceDefaultRole enum. func (e SpaceDefaultRole) Valid() bool { switch e { case SpaceDefaultRoleCommenter: return true case SpaceDefaultRoleEditor: return true case SpaceDefaultRoleViewer: return true default: return false } } // Defines values for SpaceRole. const ( SpaceRoleAdmin SpaceRole = "admin" SpaceRoleCommenter SpaceRole = "commenter" SpaceRoleEditor SpaceRole = "editor" SpaceRoleViewer SpaceRole = "viewer" ) // Valid indicates whether the value is a known member of the SpaceRole enum. func (e SpaceRole) Valid() bool { switch e { case SpaceRoleAdmin: return true case SpaceRoleCommenter: return true case SpaceRoleEditor: return true case SpaceRoleViewer: return true default: return false } } // Defines values for SpaceVisibility. const ( Open SpaceVisibility = "open" Private SpaceVisibility = "private" ) // Valid indicates whether the value is a known member of the SpaceVisibility enum. func (e SpaceVisibility) Valid() bool { switch e { case Open: return true case Private: return true default: return false } } // Defines values for StatusStatus. const ( Ok StatusStatus = "ok" Unavailable StatusStatus = "unavailable" ) // Valid indicates whether the value is a known member of the StatusStatus enum. func (e StatusStatus) Valid() bool { switch e { case Ok: return true case Unavailable: return true default: return false } } // Defines values for UpdateUserRequestStatus. const ( UpdateUserRequestStatusActive UpdateUserRequestStatus = "active" UpdateUserRequestStatusDisabled UpdateUserRequestStatus = "disabled" UpdateUserRequestStatusInvited UpdateUserRequestStatus = "invited" ) // Valid indicates whether the value is a known member of the UpdateUserRequestStatus enum. func (e UpdateUserRequestStatus) Valid() bool { switch e { case UpdateUserRequestStatusActive: return true case UpdateUserRequestStatusDisabled: return true case UpdateUserRequestStatusInvited: return true default: return false } } // Defines values for UserStatus. const ( UserStatusActive UserStatus = "active" UserStatusDisabled UserStatus = "disabled" UserStatusInvited UserStatus = "invited" ) // Valid indicates whether the value is a known member of the UserStatus enum. func (e UserStatus) Valid() bool { switch e { case UserStatusActive: return true case UserStatusDisabled: return true case UserStatusInvited: return true default: return false } } // Defines values for WorkspaceRole. const ( WorkspaceRoleAdmin WorkspaceRole = "admin" WorkspaceRoleGuest WorkspaceRole = "guest" WorkspaceRoleMember WorkspaceRole = "member" WorkspaceRoleOwner WorkspaceRole = "owner" ) // Valid indicates whether the value is a known member of the WorkspaceRole enum. func (e WorkspaceRole) Valid() bool { switch e { case WorkspaceRoleAdmin: return true case WorkspaceRoleGuest: return true case WorkspaceRoleMember: return true case WorkspaceRoleOwner: return true default: return false } } // AuthMethods defines model for AuthMethods. type AuthMethods struct { Mfa bool `json:"mfa"` Oauth2 []string `json:"oauth2"` Otp bool `json:"otp"` Password bool `json:"password"` Signup bool `json:"signup"` } // AuthSettings defines model for AuthSettings. type AuthSettings struct { // MagicLink Email a one-time sign-in link and code MagicLink bool `json:"magicLink"` } // BrandingSettings defines model for BrandingSettings. type BrandingSettings struct { AccentColor string `json:"accentColor"` AppName string `json:"appName"` // Logo data:image/(png|jpeg|webp|svg+xml);base64,..., at most 256 KB Logo string `json:"logo"` } // CreateInviteRequest defines model for CreateInviteRequest. type CreateInviteRequest struct { Email openapi_types.Email `json:"email"` // Organization Superadmins only; admins always invite into their own Organization *string `json:"organization,omitempty"` // Role Instance role. admin manages their own organization; superadmin manages everything. Role *Role `json:"role,omitempty"` // Workspace Makes this a workspace invite Workspace *string `json:"workspace,omitempty"` WorkspaceRole *WorkspaceRole `json:"workspaceRole,omitempty"` } // CreateUserRequest defines model for CreateUserRequest. type CreateUserRequest struct { Email openapi_types.Email `json:"email"` Name string `json:"name"` // Organization Superadmins only; admins always create in their own Organization *string `json:"organization,omitempty"` Password string `json:"password"` // Role Instance role. admin manages their own organization; superadmin manages everything. Role *Role `json:"role,omitempty"` } // EmailRequest defines model for EmailRequest. type EmailRequest struct { Email openapi_types.Email `json:"email"` } // Error defines model for Error. type Error struct { // Error invalid_json, validation, invalid_credentials, mfa_required, unauthorized, forbidden, account_disabled, signup_disabled, domain_not_allowed, invalid_token, invalid, not_found, conflict, internal Error string `json:"error"` Fields *map[string]string `json:"fields,omitempty"` // Message Human-readable explanation Message *string `json:"message,omitempty"` MfaId *string `json:"mfaId,omitempty"` } // Group defines model for Group. type Group struct { Created string `json:"created"` Description string `json:"description"` Id string `json:"id"` Members int `json:"members"` Name string `json:"name"` Workspace string `json:"workspace"` } // GroupRequest defines model for GroupRequest. type GroupRequest struct { Description *string `json:"description,omitempty"` Name *string `json:"name,omitempty"` } // InstanceSettings defines model for InstanceSettings. type InstanceSettings struct { Auth AuthSettings `json:"auth"` Branding BrandingSettings `json:"branding"` Signup SignupSettings `json:"signup"` Smtp SmtpSettings `json:"smtp"` Storage StorageSettings `json:"storage"` } // InstanceSettingsUpdate defines model for InstanceSettingsUpdate. type InstanceSettingsUpdate struct { Auth *AuthSettings `json:"auth,omitempty"` Branding *BrandingSettings `json:"branding,omitempty"` Signup *SignupSettings `json:"signup,omitempty"` Smtp *SmtpSettings `json:"smtp,omitempty"` Storage *StorageSettings `json:"storage,omitempty"` } // Invite defines model for Invite. type Invite struct { Created string `json:"created"` Email string `json:"email"` Expires string `json:"expires"` // Id Empty when status is added Id string `json:"id"` // InvitedBy Inviter's name InvitedBy string `json:"invitedBy"` // Link Only when just created or resent Link *string `json:"link,omitempty"` // Mailed The email was handed to the mail server Mailed bool `json:"mailed"` Organization string `json:"organization"` OrganizationName string `json:"organizationName"` // Role Instance role. admin manages their own organization; superadmin manages everything. Role Role `json:"role"` Status InviteStatus `json:"status"` Workspace string `json:"workspace"` WorkspaceName string `json:"workspaceName"` // WorkspaceRole A workspace role WorkspaceRole string `json:"workspaceRole"` } // InviteStatus defines model for Invite.Status. type InviteStatus string // InviteInfo defines model for InviteInfo. type InviteInfo struct { Email string `json:"email"` Expires string `json:"expires"` // HasAccount Sign in to accept instead of signing up HasAccount bool `json:"hasAccount"` InvitedBy string `json:"invitedBy"` OrganizationName string `json:"organizationName"` WorkspaceName string `json:"workspaceName"` } // LoginRequest defines model for LoginRequest. type LoginRequest struct { Email openapi_types.Email `json:"email"` MfaId *string `json:"mfaId,omitempty"` Password string `json:"password"` } // MemberUser defines model for MemberUser. type MemberUser struct { Email string `json:"email"` Id string `json:"id"` Name string `json:"name"` } // NameRequest defines model for NameRequest. type NameRequest struct { Name string `json:"name"` } // Organization defines model for Organization. type Organization struct { Created string `json:"created"` Id string `json:"id"` Members int `json:"members"` Name string `json:"name"` Workspaces int `json:"workspaces"` } // Page defines model for Page. type Page struct { // Ancestors Root first Ancestors []PageRef `json:"ancestors"` Created string `json:"created"` // DeletedAt When the page itself was trashed; empty otherwise DeletedAt string `json:"deletedAt"` Icon string `json:"icon"` Id string `json:"id"` // InTrash The page or one of its ancestors is in the trash InTrash bool `json:"inTrash"` Parent string `json:"parent"` Role SpaceRole `json:"role"` Space string `json:"space"` Title string `json:"title"` Updated string `json:"updated"` Workspace string `json:"workspace"` } // PageContent defines model for PageContent. type PageContent struct { // Content Tiptap JSON with type "doc"; null for a page that was never edited Content *map[string]interface{} `json:"content"` Updated string `json:"updated"` } // PageNode defines model for PageNode. type PageNode struct { Icon string `json:"icon"` Id string `json:"id"` // Parent Parent page id; empty at the top level Parent string `json:"parent"` // Position Fractional sort key among siblings Position string `json:"position"` Title string `json:"title"` Updated string `json:"updated"` } // PageRef defines model for PageRef. type PageRef struct { Icon string `json:"icon"` Id string `json:"id"` Title string `json:"title"` } // PageVersion defines model for PageVersion. type PageVersion struct { // Author Name (or email) of the last person who edited before it was taken Author string `json:"author"` Created string `json:"created"` Id string `json:"id"` Label string `json:"label"` } // PublicSettings defines model for PublicSettings. type PublicSettings struct { // AccentColor #rrggbb, or empty for the default AccentColor string `json:"accentColor"` AppName string `json:"appName"` // Logo A data URL Logo string `json:"logo"` // MagicLink Sign-in links by email are enabled MagicLink bool `json:"magicLink"` // Signup Self-service signup is open Signup bool `json:"signup"` } // Role Instance role. admin manages their own organization; superadmin manages everything. type Role string // Session defines model for Session. type Session struct { Token string `json:"token"` User User `json:"user"` } // SignupRequest defines model for SignupRequest. type SignupRequest struct { Email openapi_types.Email `json:"email"` Name string `json:"name"` Password string `json:"password"` } // SignupSettings defines model for SignupSettings. type SignupSettings struct { // Domains Allowed email domains; empty allows all Domains []string `json:"domains"` Enabled bool `json:"enabled"` } // SmtpSettings defines model for SmtpSettings. type SmtpSettings struct { Enabled bool `json:"enabled"` Host string `json:"host"` // Password Leave out to keep the stored password Password *string `json:"password,omitempty"` PasswordSet *bool `json:"passwordSet,omitempty"` Port int `json:"port"` SenderAddress string `json:"senderAddress"` SenderName string `json:"senderName"` Tls bool `json:"tls"` Username string `json:"username"` } // Space defines model for Space. type Space struct { Created string `json:"created"` // DefaultRole Role that workspace members (not guests) get in an open space without an explicit role. DefaultRole SpaceDefaultRole `json:"defaultRole"` Description string `json:"description"` Icon string `json:"icon"` Id string `json:"id"` Name string `json:"name"` Role SpaceRole `json:"role"` Slug string `json:"slug"` // Visibility open - every workspace member gets the default role; private - explicit members only. Visibility SpaceVisibility `json:"visibility"` Workspace string `json:"workspace"` } // SpaceDefaultRole Role that workspace members (not guests) get in an open space without an explicit role. type SpaceDefaultRole string // SpaceGroup defines model for SpaceGroup. type SpaceGroup struct { Group struct { Id string `json:"id"` Name string `json:"name"` } `json:"group"` Role SpaceRole `json:"role"` } // SpaceMember defines model for SpaceMember. type SpaceMember struct { Role SpaceRole `json:"role"` User struct { Email string `json:"email"` Id string `json:"id"` Name string `json:"name"` } `json:"user"` } // SpaceRole defines model for SpaceRole. type SpaceRole string // SpaceVisibility open - every workspace member gets the default role; private - explicit members only. type SpaceVisibility string // Status defines model for Status. type Status struct { Db *string `json:"db,omitempty"` Status StatusStatus `json:"status"` } // StatusStatus defines model for Status.Status. type StatusStatus string // StorageSettings defines model for StorageSettings. type StorageSettings struct { AccessKey string `json:"accessKey"` Bucket string `json:"bucket"` Endpoint string `json:"endpoint"` ForcePathStyle bool `json:"forcePathStyle"` Region string `json:"region"` // S3 false stores files on docwell-db's disk S3 bool `json:"s3"` // Secret Leave out to keep the stored secret Secret *string `json:"secret,omitempty"` SecretSet *bool `json:"secretSet,omitempty"` } // TrashedPage defines model for TrashedPage. type TrashedPage struct { DeletedAt string `json:"deletedAt"` Icon string `json:"icon"` Id string `json:"id"` Title string `json:"title"` } // UpdateUserRequest defines model for UpdateUserRequest. type UpdateUserRequest struct { Email *openapi_types.Email `json:"email,omitempty"` Name *string `json:"name,omitempty"` // Organization Superadmins only; empty string detaches Organization *string `json:"organization,omitempty"` Password *string `json:"password,omitempty"` // Role Instance role. admin manages their own organization; superadmin manages everything. Role *Role `json:"role,omitempty"` Status *UpdateUserRequestStatus `json:"status,omitempty"` Verified *bool `json:"verified,omitempty"` } // UpdateUserRequestStatus defines model for UpdateUserRequest.Status. type UpdateUserRequestStatus string // User defines model for User. type User struct { Avatar string `json:"avatar"` Created string `json:"created"` Email openapi_types.Email `json:"email"` Id string `json:"id"` Locale string `json:"locale"` Name string `json:"name"` // Organization Organization id Organization string `json:"organization"` OrganizationName string `json:"organizationName"` // Role Instance role. admin manages their own organization; superadmin manages everything. Role Role `json:"role"` Status UserStatus `json:"status"` Theme string `json:"theme"` Verified bool `json:"verified"` } // UserStatus defines model for User.Status. type UserStatus string // UserList defines model for UserList. type UserList struct { Items []User `json:"items"` Page int `json:"page"` PerPage int `json:"perPage"` TotalItems int `json:"totalItems"` } // Version defines model for Version. type Version struct { Name string `json:"name"` Version string `json:"version"` } // Workspace defines model for Workspace. type Workspace struct { Created string `json:"created"` Id string `json:"id"` Name string `json:"name"` Organization string `json:"organization"` OrganizationName string `json:"organizationName"` Role WorkspaceRole `json:"role"` Slug string `json:"slug"` } // WorkspaceMember defines model for WorkspaceMember. type WorkspaceMember struct { Role WorkspaceRole `json:"role"` User struct { Email string `json:"email"` Id string `json:"id"` Name string `json:"name"` } `json:"user"` } // WorkspaceRole defines model for WorkspaceRole. type WorkspaceRole string // SendTestEmailJSONBody defines parameters for SendTestEmail. type SendTestEmailJSONBody struct { To openapi_types.Email `json:"to"` } // AcceptInviteJSONBody defines parameters for AcceptInvite. type AcceptInviteJSONBody struct { Name *string `json:"name,omitempty"` Password *string `json:"password,omitempty"` Token string `json:"token"` } // LoginWithOtpJSONBody defines parameters for LoginWithOtp. type LoginWithOtpJSONBody struct { Code string `json:"code"` MfaId *string `json:"mfaId,omitempty"` OtpId string `json:"otpId"` } // ConfirmPasswordResetJSONBody defines parameters for ConfirmPasswordReset. type ConfirmPasswordResetJSONBody struct { Password string `json:"password"` Token string `json:"token"` } // ConfirmVerificationJSONBody defines parameters for ConfirmVerification. type ConfirmVerificationJSONBody struct { Token string `json:"token"` } // ListInvitesParams defines parameters for ListInvites. type ListInvitesParams struct { Workspace *string `form:"workspace,omitempty" json:"workspace,omitempty"` // Organization Superadmins only Organization *string `form:"organization,omitempty" json:"organization,omitempty"` } // DeletePageParams defines parameters for DeletePage. type DeletePageParams struct { Permanent *bool `form:"permanent,omitempty" json:"permanent,omitempty"` } // UpdatePageJSONBody defines parameters for UpdatePage. type UpdatePageJSONBody struct { Icon *string `json:"icon,omitempty"` Title *string `json:"title,omitempty"` } // SavePageContentJSONBody defines parameters for SavePageContent. type SavePageContentJSONBody struct { // Content Tiptap JSON with type "doc" Content map[string]interface{} `json:"content"` } // MovePageJSONBody defines parameters for MovePage. type MovePageJSONBody struct { // Index Position among the new parent's other children Index int `json:"index"` // Parent New parent page id; empty for the top level Parent *string `json:"parent,omitempty"` } // UpdateSpaceJSONBody defines parameters for UpdateSpace. type UpdateSpaceJSONBody struct { // DefaultRole Role that workspace members (not guests) get in an open space without an explicit role. DefaultRole *SpaceDefaultRole `json:"defaultRole,omitempty"` Description *string `json:"description,omitempty"` Icon *string `json:"icon,omitempty"` Name *string `json:"name,omitempty"` // Visibility open - every workspace member gets the default role; private - explicit members only. Visibility *SpaceVisibility `json:"visibility,omitempty"` } // SetSpaceGroupJSONBody defines parameters for SetSpaceGroup. type SetSpaceGroupJSONBody struct { Group string `json:"group"` Role SpaceRole `json:"role"` } // SetSpaceMemberJSONBody defines parameters for SetSpaceMember. type SetSpaceMemberJSONBody struct { Email openapi_types.Email `json:"email"` Role SpaceRole `json:"role"` } // CreatePageJSONBody defines parameters for CreatePage. type CreatePageJSONBody struct { // Index Position among the parent's children; missing appends Index *int `json:"index,omitempty"` // Parent Parent page id; empty or missing for the top level Parent *string `json:"parent,omitempty"` Title *string `json:"title,omitempty"` } // ListUsersParams defines parameters for ListUsers. type ListUsersParams struct { Page *int `form:"page,omitempty" json:"page,omitempty"` PerPage *int `form:"perPage,omitempty" json:"perPage,omitempty"` // Q Search in email and name Q *string `form:"q,omitempty" json:"q,omitempty"` // Organization Superadmin only: an organization id, or 'none' Organization *string `form:"organization,omitempty" json:"organization,omitempty"` } // CreateWorkspaceJSONBody defines parameters for CreateWorkspace. type CreateWorkspaceJSONBody struct { Name string `json:"name"` Organization *string `json:"organization,omitempty"` } // SetWorkspaceMemberJSONBody defines parameters for SetWorkspaceMember. type SetWorkspaceMemberJSONBody struct { Email openapi_types.Email `json:"email"` Role WorkspaceRole `json:"role"` } // CreateSpaceJSONBody defines parameters for CreateSpace. type CreateSpaceJSONBody struct { Description *string `json:"description,omitempty"` Icon *string `json:"icon,omitempty"` Name string `json:"name"` // Visibility open - every workspace member gets the default role; private - explicit members only. Visibility *SpaceVisibility `json:"visibility,omitempty"` } // UpdateInstanceSettingsJSONRequestBody defines body for UpdateInstanceSettings for application/json ContentType. type UpdateInstanceSettingsJSONRequestBody = InstanceSettingsUpdate // SendTestEmailJSONRequestBody defines body for SendTestEmail for application/json ContentType. type SendTestEmailJSONRequestBody SendTestEmailJSONBody // AcceptInviteJSONRequestBody defines body for AcceptInvite for application/json ContentType. type AcceptInviteJSONRequestBody AcceptInviteJSONBody // LoginJSONRequestBody defines body for Login for application/json ContentType. type LoginJSONRequestBody = LoginRequest // LoginWithOtpJSONRequestBody defines body for LoginWithOtp for application/json ContentType. type LoginWithOtpJSONRequestBody LoginWithOtpJSONBody // RequestOtpJSONRequestBody defines body for RequestOtp for application/json ContentType. type RequestOtpJSONRequestBody = EmailRequest // ConfirmPasswordResetJSONRequestBody defines body for ConfirmPasswordReset for application/json ContentType. type ConfirmPasswordResetJSONRequestBody ConfirmPasswordResetJSONBody // RequestPasswordResetJSONRequestBody defines body for RequestPasswordReset for application/json ContentType. type RequestPasswordResetJSONRequestBody = EmailRequest // SignupJSONRequestBody defines body for Signup for application/json ContentType. type SignupJSONRequestBody = SignupRequest // ConfirmVerificationJSONRequestBody defines body for ConfirmVerification for application/json ContentType. type ConfirmVerificationJSONRequestBody ConfirmVerificationJSONBody // RequestVerificationJSONRequestBody defines body for RequestVerification for application/json ContentType. type RequestVerificationJSONRequestBody = EmailRequest // UpdateGroupJSONRequestBody defines body for UpdateGroup for application/json ContentType. type UpdateGroupJSONRequestBody = GroupRequest // AddGroupMemberJSONRequestBody defines body for AddGroupMember for application/json ContentType. type AddGroupMemberJSONRequestBody = EmailRequest // CreateInviteJSONRequestBody defines body for CreateInvite for application/json ContentType. type CreateInviteJSONRequestBody = CreateInviteRequest // CreateOrgJSONRequestBody defines body for CreateOrg for application/json ContentType. type CreateOrgJSONRequestBody = NameRequest // RenameOrgJSONRequestBody defines body for RenameOrg for application/json ContentType. type RenameOrgJSONRequestBody = NameRequest // UpdatePageJSONRequestBody defines body for UpdatePage for application/json ContentType. type UpdatePageJSONRequestBody UpdatePageJSONBody // SavePageContentJSONRequestBody defines body for SavePageContent for application/json ContentType. type SavePageContentJSONRequestBody SavePageContentJSONBody // MovePageJSONRequestBody defines body for MovePage for application/json ContentType. type MovePageJSONRequestBody MovePageJSONBody // UpdateSpaceJSONRequestBody defines body for UpdateSpace for application/json ContentType. type UpdateSpaceJSONRequestBody UpdateSpaceJSONBody // SetSpaceGroupJSONRequestBody defines body for SetSpaceGroup for application/json ContentType. type SetSpaceGroupJSONRequestBody SetSpaceGroupJSONBody // SetSpaceMemberJSONRequestBody defines body for SetSpaceMember for application/json ContentType. type SetSpaceMemberJSONRequestBody SetSpaceMemberJSONBody // CreatePageJSONRequestBody defines body for CreatePage for application/json ContentType. type CreatePageJSONRequestBody CreatePageJSONBody // CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType. type CreateUserJSONRequestBody = CreateUserRequest // UpdateUserJSONRequestBody defines body for UpdateUser for application/json ContentType. type UpdateUserJSONRequestBody = UpdateUserRequest // CreateWorkspaceJSONRequestBody defines body for CreateWorkspace for application/json ContentType. type CreateWorkspaceJSONRequestBody CreateWorkspaceJSONBody // RenameWorkspaceJSONRequestBody defines body for RenameWorkspace for application/json ContentType. type RenameWorkspaceJSONRequestBody = NameRequest // CreateGroupJSONRequestBody defines body for CreateGroup for application/json ContentType. type CreateGroupJSONRequestBody = GroupRequest // SetWorkspaceMemberJSONRequestBody defines body for SetWorkspaceMember for application/json ContentType. type SetWorkspaceMemberJSONRequestBody SetWorkspaceMemberJSONBody // CreateSpaceJSONRequestBody defines body for CreateSpace for application/json ContentType. type CreateSpaceJSONRequestBody CreateSpaceJSONBody