client

package
v1.10.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package client is the hand-written wrapper around the generated transport. It owns auth, base URL, and — crucially — error decoding into Problem, which is where the CLI's discoverability value lives. The generated client is treated strictly as a transport layer; wrappers go through Do/DoRaw so the 2xx-check, ProblemDetail decode and `*/*`-quirk are solved in exactly one place.

Index

Constants

This section is empty.

Variables

View Source
var DefaultSleep = time.Sleep

DefaultSleep waits during 429 backoff when Client.Sleep is nil. Tests replace this so command-level suites do not sleep for real.

View Source
var ErrResponseTooLarge = errors.New("response too large")

Functions

func Bootstrap added in v1.6.0

func Bootstrap(ctx context.Context, site, secret, email, password string) (*EnvironmentBootstrapResult, *APIError)

Bootstrap performs the anonymous, one-time POST /environment-seed/bootstrap on site. Deliberately a package-level function, not a *Client method: this endpoint precedes any API key (the target has none yet), so there is no *Client to build — api.NewClientWithResponses always attaches a Bearer request editor, which would be meaningless here. It reuses the same exec/decodeError shape as Client.exec so a rejection (e.g. ENVIRONMENT_BOOTSTRAP_REJECTED, RATE_LIMIT_EXCEEDED) renders through the normal command.RenderError path with its errorCode + hint, identically to every authenticated command.

func BootstrapAvailability added in v1.7.0

func BootstrapAvailability(ctx context.Context, site string) (*EnvironmentBootstrapAvailabilityResult, *APIError)

BootstrapAvailability performs the anonymous, read-only GET /environment-seed/bootstrap-availability on site. Deliberately a package-level function, not a *Client method, for the same reason as Bootstrap itself: this precedes any API key, so there is no *Client to build. Reuses the same exec/decodeError shape so a rejection (e.g. RATE_LIMIT_EXCEEDED) renders through the normal command.RenderError path.

Types

type APIError

type APIError struct {
	Problem   *problem.Problem
	TooLarge  *ResponseTooLargeError
	Status    int
	Body      []byte
	Malformed bool // true when the body was not a recognizable ProblemDetail
	Transport error
}

APIError carries either a decoded Problem or a malformed-response marker.

func APIErrorFromRead

func APIErrorFromRead(err error) *APIError

APIErrorFromRead converts a typed streaming read failure into the same APIError shape used for Content-Length and buffered-response limit failures.

func Do

func Do[T any](c *Client, call LowLevel) (*T, *APIError)

Do is DoRaw + a typed JSON unmarshal into T. An empty 2xx body (e.g. 204 No Content) yields the zero value of T, not an error. A non-empty body that fails to unmarshal is a malformed-response APIError carrying the real status code.

func (*APIError) Error

func (e *APIError) Error() string

func (*APIError) ExitCode

func (e *APIError) ExitCode() int

type AuditFilters

type AuditFilters struct {
	Search, ActionType, Actor, EntityType, From, To string
	EntityID                                        int64
	Include                                         []string
}

AuditFilters holds the audit-search filters; empty fields are omitted.

type Client

type Client struct {

	// Sleep, if non-nil, replaces DefaultSleep during 429 backoff.
	Sleep func(time.Duration)
	// OnRetry, if non-nil, is called before each 429 retry.
	OnRetry RateLimitRetryObserver
	// contains filtered or unexported fields
}

func New

func New(baseURL, apiKey string) (*Client, error)

func (*Client) ActivateGroup

func (c *Client) ActivateGroup(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) AddAccess

func (c *Client) AddAccess(ctx context.Context, pageID int64, f api.PageRestrictionAccessForm) ([]byte, *APIError)

func (*Client) AddGroupAccess

func (c *Client) AddGroupAccess(ctx context.Context, pageID int64, f api.PageRestrictionGroupAccessForm) ([]byte, *APIError)

func (*Client) AddGroupMember

func (c *Client) AddGroupMember(ctx context.Context, id int64, f api.AddMemberForm) ([]byte, *APIError)

func (*Client) AddWorkItemTransition

func (c *Client) AddWorkItemTransition(ctx context.Context, typeSlug string, f api.WorkItemTransitionCreateForm) ([]byte, *APIError)

func (*Client) ArchivePage

func (c *Client) ArchivePage(ctx context.Context, id int64, f api.ArchivePageForm) ([]byte, *APIError)

func (*Client) CascadeArchivePage added in v1.0.0

func (c *Client) CascadeArchivePage(ctx context.Context, id int64, f api.CascadeArchiveForm) ([]byte, *APIError)

func (*Client) CascadePermanentDeleteFromTrash added in v1.0.0

func (c *Client) CascadePermanentDeleteFromTrash(ctx context.Context, pageID int64) ([]byte, *APIError)

func (*Client) CascadeRestoreFromTrash added in v1.0.0

func (c *Client) CascadeRestoreFromTrash(ctx context.Context, pageID int64, f api.CascadeRestoreForm) ([]byte, *APIError)

func (*Client) CascadeTrashPage added in v1.0.0

func (c *Client) CascadeTrashPage(ctx context.Context, id int64, f api.CascadeTrashForm) ([]byte, *APIError)

func (*Client) CascadeUnarchivePage added in v1.0.0

func (c *Client) CascadeUnarchivePage(ctx context.Context, pageID int64, f api.CascadeSubtreeForm) ([]byte, *APIError)

func (*Client) ClearPropertyDescriptorDefault added in v1.6.0

func (c *Client) ClearPropertyDescriptorDefault(ctx context.Context, pageTypeID, descriptorID int64) ([]byte, *APIError)

func (*Client) CommentWorkItem

func (c *Client) CommentWorkItem(ctx context.Context, pageID, workItemID int64, f api.WorkItemCommentForm) ([]byte, *APIError)

func (*Client) CompleteEnvironmentSeed added in v1.6.0

func (c *Client) CompleteEnvironmentSeed(ctx context.Context) ([]byte, *APIError)

func (*Client) CreateDomainEnum

func (c *Client) CreateDomainEnum(ctx context.Context, f api.DomainEnumForm) ([]byte, *APIError)

func (*Client) CreateExternalUser

func (c *Client) CreateExternalUser(ctx context.Context, f api.ExternalUserForm) ([]byte, *APIError)

func (*Client) CreateGroup

func (c *Client) CreateGroup(ctx context.Context, f api.UserGroupForm) ([]byte, *APIError)

func (*Client) CreateInternalUser added in v1.6.0

func (c *Client) CreateInternalUser(ctx context.Context, f api.InternalUserForm) ([]byte, *APIError)

func (*Client) CreatePage

func (c *Client) CreatePage(ctx context.Context, name string, pageTypeID int64, parentID *int64, content *string) ([]byte, *APIError)

CreatePage — POST /public/v1/pages. Minimal flag-driven form (name + pageTypeId, optional parent/content). For the full form incl. propertyValues use the -f form.json route via CreatePageForm.

func (*Client) CreatePageForm

func (c *Client) CreatePageForm(ctx context.Context, form api.PageCreateForm) ([]byte, *APIError)

CreatePageForm — POST /public/v1/pages with a full PageCreateForm (the -f form.json route). propertyValues[] are sent verbatim; the server validates dataType↔value. No client-side semantic validation.

func (*Client) CreatePageType

func (c *Client) CreatePageType(ctx context.Context, f api.PageTypeForm) ([]byte, *APIError)

func (*Client) CreatePropertyDescriptor

func (c *Client) CreatePropertyDescriptor(ctx context.Context, pageTypeID int64, f api.PropertyDescriptorForm) ([]byte, *APIError)

func (*Client) CreateRestriction

func (c *Client) CreateRestriction(ctx context.Context, pageID int64) ([]byte, *APIError)

func (*Client) CreateWorkItem

func (c *Client) CreateWorkItem(ctx context.Context, pageID int64, f api.WorkItemCreateForm) ([]byte, *APIError)

func (*Client) CreateWorkItemType

func (c *Client) CreateWorkItemType(ctx context.Context, f api.WorkItemTypeCreateForm) ([]byte, *APIError)

func (*Client) DeactivateGroup

func (c *Client) DeactivateGroup(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) DeleteArchivedPage

func (c *Client) DeleteArchivedPage(ctx context.Context, pageID int64) ([]byte, *APIError)

DeleteArchivedPage — DELETE /public/v1/pages/admin/archive/{pageId}: moves an archived page to trash (admin). CLI command: `archive delete`.

func (*Client) DeleteDomainEnum

func (c *Client) DeleteDomainEnum(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) DeleteFileAttachment

func (c *Client) DeleteFileAttachment(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) DeleteImage

func (c *Client) DeleteImage(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) DeletePage

func (c *Client) DeletePage(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) DeletePageType

func (c *Client) DeletePageType(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) DeletePropertyDescriptor

func (c *Client) DeletePropertyDescriptor(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) DeleteUser

func (c *Client) DeleteUser(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) DeleteWorkItem

func (c *Client) DeleteWorkItem(ctx context.Context, pageID, workItemID int64) ([]byte, *APIError)

func (*Client) DeleteWorkItemType

func (c *Client) DeleteWorkItemType(ctx context.Context, slug string) ([]byte, *APIError)

func (*Client) DisableGoogleLogin added in v1.6.0

func (c *Client) DisableGoogleLogin(ctx context.Context) ([]byte, *APIError)

DisableGoogleLogin turns off the GOOGLE integration toggle; idempotent (calling it again on an already-disabled login is a no-op that still returns 200). There is no matching enable operation on the public API — use the admin UI for that.

func (*Client) DiscardWorkingRevision

func (c *Client) DiscardWorkingRevision(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) DoConditional

func (c *Client) DoConditional(call LowLevel) (body []byte, notModified bool, apiErr *APIError)

DoConditional is for ETag/If-None-Match GETs: a 304 is returned as notModified=true (NOT an error), 2xx as the body, other non-2xx as APIError.

func (*Client) DoDownload

func (c *Client) DoDownload(call LowLevel) (body io.ReadCloser, notModified bool, apiErr *APIError)

DoDownload is the streaming counterpart of DoConditional. On a successful 2xx response the caller owns and must close body. Every other path closes the response body before returning.

func (*Client) DoRaw

func (c *Client) DoRaw(call LowLevel) ([]byte, *APIError)

DoRaw executes a low-level call and returns the raw 2xx body. It centralises the two API-wide invariants: non-2xx → ProblemDetail/APIError via decodeError, and the `*/*` content-type quirk → the body is always read raw here (the generated client gives no typed JSON200 for `*/*`). NOTE: 3xx (incl. 304) is treated as an error; ETag/If-None-Match GETs must use DoConditional.

func (*Client) DownloadAttachment

func (c *Client) DownloadAttachment(ctx context.Context, id int64, ifNoneMatch string) (io.ReadCloser, bool, *APIError)

func (*Client) DownloadImage

func (c *Client) DownloadImage(ctx context.Context, id int64, ifNoneMatch string) (io.ReadCloser, bool, *APIError)

func (*Client) EditWorkItem

func (c *Client) EditWorkItem(ctx context.Context, pageID, workItemID int64, f api.WorkItemEditForm) ([]byte, *APIError)

func (*Client) GetArchivedPage

func (c *Client) GetArchivedPage(ctx context.Context, pageID int64) ([]byte, *APIError)

GetArchivedPage — GET /public/v1/pages/admin/archive/{pageId}: admin read view of a single archived page (ArchivedPageViewResult with nested page detail).

func (*Client) GetAvailablePropertyDescriptors

func (c *Client) GetAvailablePropertyDescriptors(ctx context.Context, pageTypeID int64) ([]byte, *APIError)

func (*Client) GetChainLinkOptions

func (c *Client) GetChainLinkOptions(ctx context.Context, pageTypeID, pageID int64) ([]byte, *APIError)

func (*Client) GetContentMacroDocs

func (c *Client) GetContentMacroDocs(ctx context.Context) ([]byte, *APIError)

GetContentMacroDocs — GET /public/v1/content-macros/docs: the full macro knowledge base (preamble + shared filter syntax + per-macro documentation).

func (*Client) GetContentMacroDocsByName

func (c *Client) GetContentMacroDocsByName(ctx context.Context, name string) ([]byte, *APIError)

GetContentMacroDocsByName — GET /public/v1/content-macros/{name}/docs: one macro's documentation (directiveName as key; 404 CONTENT_MACRO_NOT_FOUND).

func (*Client) GetDomainEnum

func (c *Client) GetDomainEnum(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) GetDomainEnumUsages

func (c *Client) GetDomainEnumUsages(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) GetEnvironmentSeedReadiness added in v1.6.0

func (c *Client) GetEnvironmentSeedReadiness(ctx context.Context) ([]byte, *APIError)

GetEnvironmentSeedReadiness reads the environment-seed transfer state (bootstrap-account-only; see writes.go for the mutating register/revoke/complete calls in the same lifecycle). Never mutates anything and never exposes which user, or any password state, is behind hasEligibleReplacementAdmin.

func (*Client) GetEnvironmentSettings added in v1.6.0

func (c *Client) GetEnvironmentSettings(ctx context.Context) ([]byte, *APIError)

func (*Client) GetGoogleLoginStatus added in v1.6.0

func (c *Client) GetGoogleLoginStatus(ctx context.Context) ([]byte, *APIError)

GetGoogleLoginStatus never surfaces clientId/clientSecret — only the enabled toggle and a credentialsConfigured boolean (PublicGoogleLoginController).

func (*Client) GetGroup

func (c *Client) GetGroup(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) GetLandingSettings

func (c *Client) GetLandingSettings(ctx context.Context) ([]byte, *APIError)

func (*Client) GetPage

func (c *Client) GetPage(ctx context.Context, id int64, expand []string, resolveMacros bool) ([]byte, *APIError)

GetPage — GET /public/v1/pages/{id} (?expand=, ?resolveMacros=). Raw composite body. resolveMacros=false sends resolveMacros=false (WRITE_ACK). resolveMacros=true omits the parameter so the server default (FULL) stays in effect; the query never contains resolveMacros=true.

func (*Client) GetPageType

func (c *Client) GetPageType(ctx context.Context, id int64, expand []string) ([]byte, *APIError)

func (*Client) GetPagesTree

func (c *Client) GetPagesTree(ctx context.Context, ifNoneMatch string) (body []byte, notModified bool, err *APIError)

func (*Client) GetPreparationReadiness added in v1.6.0

func (c *Client) GetPreparationReadiness(ctx context.Context) ([]byte, *APIError)

func (*Client) GetPropertyDescriptor

func (c *Client) GetPropertyDescriptor(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) GetPropertyDescriptorDefault added in v1.6.0

func (c *Client) GetPropertyDescriptorDefault(ctx context.Context, pageTypeID, descriptorID int64) ([]byte, *APIError)

func (*Client) GetPropertyDescriptorVisibilityOverride added in v1.6.0

func (c *Client) GetPropertyDescriptorVisibilityOverride(ctx context.Context, pageTypeID, descriptorID int64) ([]byte, *APIError)

func (*Client) GetPublicApiSpec added in v1.0.0

func (c *Client) GetPublicApiSpec(ctx context.Context) ([]byte, *APIError)

GetPublicApiSpec — GET /api/v3/api-docs/public-api. This is a SpringDoc document, not a /public/v1 resource, so it is not on the generated client.

func (*Client) GetReleaseNoteByVersion

func (c *Client) GetReleaseNoteByVersion(ctx context.Context, version string) ([]byte, *APIError)

GetReleaseNoteByVersion — GET /public/v1/release-notes/{version}: one release note's detail (version + date + markdown body; 404 RELEASE_NOTE_NOT_FOUND).

func (*Client) GetRevisionSnapshot

func (c *Client) GetRevisionSnapshot(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) GetTrashedPage added in v1.0.0

func (c *Client) GetTrashedPage(ctx context.Context, pageID int64) ([]byte, *APIError)

GetTrashedPage — GET /public/v1/pages/admin/trash/{pageId}: admin read view of a single trashed page (TrashedPageViewResult with nested page detail).

func (*Client) GetUser

func (c *Client) GetUser(ctx context.Context, id int64, expand []string) ([]byte, *APIError)

func (*Client) GetUserByEmail added in v1.6.0

func (c *Client) GetUserByEmail(ctx context.Context, email string) ([]byte, *APIError)

GetUserByEmail is an exact, admin-only lookup on the normalized email address (NORM-znuqrgfu) — unlike SearchUsers it finds users of any status, including PENDING, so `users send-activation-email` can resolve an email to an id.

func (*Client) GetWorkItem

func (c *Client) GetWorkItem(ctx context.Context, pageID, workItemID int64) ([]byte, *APIError)

func (*Client) GetWorkItemTransitions

func (c *Client) GetWorkItemTransitions(ctx context.Context, pageID, workItemID int64) ([]byte, *APIError)

func (*Client) GetWorkItemType

func (c *Client) GetWorkItemType(ctx context.Context, slug string) ([]byte, *APIError)

func (*Client) GetWorkflowRoles

func (c *Client) GetWorkflowRoles(ctx context.Context, include string) ([]byte, *APIError)

func (*Client) ListArchive

func (c *Client) ListArchive(ctx context.Context, page, size int, sort []string) ([]byte, *APIError)

ListArchive — GET /public/v1/admin/archive: the archived-pages overview (admin). Paged exactly like ListTrash; every row carries the archive reason.

func (*Client) ListContentMacros

func (c *Client) ListContentMacros(ctx context.Context, context string) ([]byte, *APIError)

func (*Client) ListDomainEnums

func (c *Client) ListDomainEnums(ctx context.Context, expand []string) ([]byte, *APIError)

func (*Client) ListDraftsQueue

func (c *Client) ListDraftsQueue(ctx context.Context, page, size int, sort []string) ([]byte, *APIError)

func (*Client) ListGroups

func (c *Client) ListGroups(ctx context.Context, status string, page, size int, sort []string) ([]byte, *APIError)

func (*Client) ListPageFileAttachments added in v1.6.0

func (c *Client) ListPageFileAttachments(ctx context.Context, pageID int64, page, size int, sort []string) ([]byte, *APIError)

func (*Client) ListPageImages

func (c *Client) ListPageImages(ctx context.Context, pageID int64) ([]byte, *APIError)

func (*Client) ListPagePropertyValues added in v1.0.0

func (c *Client) ListPagePropertyValues(ctx context.Context, ids []int64) ([]byte, *APIError)

ListPagePropertyValues — GET /public/v1/pages/property-values?pageIds=. Raw body (verbatim JSON array). pageIds is sent as one comma-separated value.

func (*Client) ListPageTypes

func (c *Client) ListPageTypes(ctx context.Context) ([]byte, *APIError)

func (*Client) ListPages

func (c *Client) ListPages(ctx context.Context, page, size int, sort []string, pageTypeID *int64) (*api.PagePageListResult, *APIError)

ListPages — GET /public/v1/pages (paginated). Empty Pageable + pageableEditor avoids the broken object-styling; the */* body is read raw by Do.

func (*Client) ListPublishQueue

func (c *Client) ListPublishQueue(ctx context.Context, page, size int, sort []string) ([]byte, *APIError)

func (*Client) ListReleaseNotes

func (c *Client) ListReleaseNotes(ctx context.Context, page, size int) ([]byte, *APIError)

ListReleaseNotes — GET /public/v1/release-notes: paged release-note summaries (version + date). The server enforces a fixed semver-desc order and rejects a sort param (400 INVALID_SORT), so this exposes only page/size — never sort.

func (*Client) ListReviewQueue

func (c *Client) ListReviewQueue(ctx context.Context, page, size int, sort []string) ([]byte, *APIError)

func (*Client) ListRevisions

func (c *Client) ListRevisions(ctx context.Context, id int64, compare string) ([]byte, *APIError)

func (*Client) ListTrash

func (c *Client) ListTrash(ctx context.Context, page, size int, sort []string) ([]byte, *APIError)

func (*Client) ListUsers

func (c *Client) ListUsers(ctx context.Context, status string, page, size int, sort []string) ([]byte, *APIError)

func (*Client) ListWorkItemTypes

func (c *Client) ListWorkItemTypes(ctx context.Context, page, size int, sort []string) ([]byte, *APIError)

func (*Client) ListWorkItems

func (c *Client) ListWorkItems(ctx context.Context, pageID int64, typ string) ([]byte, *APIError)

func (*Client) Me

func (c *Client) Me(ctx context.Context) ([]byte, *APIError)

Me — GET /public/v1/users/me (self-discovery of the API-key owner).

func (*Client) MigratePublish added in v1.6.0

func (c *Client) MigratePublish(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) MigrateSortChildren added in v1.7.0

func (c *Client) MigrateSortChildren(ctx context.Context, parentID int64, childIDs []int64) ([]byte, *APIError)

func (*Client) MigrateSortRootPages added in v1.7.0

func (c *Client) MigrateSortRootPages(ctx context.Context, pageIDs []int64) ([]byte, *APIError)

func (*Client) MovePage

func (c *Client) MovePage(ctx context.Context, id int64, f api.PageMoveForm) ([]byte, *APIError)

func (*Client) MovePageType

func (c *Client) MovePageType(ctx context.Context, id int64, f api.PageTypeMoveForm) ([]byte, *APIError)

func (*Client) PatchPage

func (c *Client) PatchPage(ctx context.Context, id int64, f api.PagePatchForm) ([]byte, *APIError)

func (*Client) PerformTransition

func (c *Client) PerformTransition(ctx context.Context, id int64, f api.TransitionForm) ([]byte, *APIError)

func (*Client) PermanentDeleteUser

func (c *Client) PermanentDeleteUser(ctx context.Context, id int64, f api.PermanentDeleteForm) ([]byte, *APIError)

func (*Client) PreviewAdminArchiveCascadeImpact added in v1.0.0

func (c *Client) PreviewAdminArchiveCascadeImpact(ctx context.Context, pageID int64, operation string, includeSubtree *bool) ([]byte, *APIError)

func (*Client) PreviewAdminTrashCascadeImpact added in v1.0.0

func (c *Client) PreviewAdminTrashCascadeImpact(ctx context.Context, pageID int64, operation string, includeSubtree *bool) ([]byte, *APIError)

func (*Client) PreviewMovePageType added in v1.0.0

func (c *Client) PreviewMovePageType(ctx context.Context, id int64, f api.PageTypeMovePreviewRequest) ([]byte, *APIError)

func (*Client) PreviewPageCascadeImpact added in v1.0.0

func (c *Client) PreviewPageCascadeImpact(ctx context.Context, id int64, operation string) ([]byte, *APIError)

func (*Client) PurgeFromTrash

func (c *Client) PurgeFromTrash(ctx context.Context, pageID int64) ([]byte, *APIError)

func (*Client) ReactivateUser

func (c *Client) ReactivateUser(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) RegisterEnvironmentSeedTransferVerification added in v1.6.0

func (c *Client) RegisterEnvironmentSeedTransferVerification(ctx context.Context, f api.TransferVerificationForm) ([]byte, *APIError)

func (*Client) RemoveAccess

func (c *Client) RemoveAccess(ctx context.Context, pageID, accessID int64) ([]byte, *APIError)

func (*Client) RemoveGroupAccess

func (c *Client) RemoveGroupAccess(ctx context.Context, pageID, accessID int64) ([]byte, *APIError)

func (*Client) RemoveGroupMember

func (c *Client) RemoveGroupMember(ctx context.Context, id, userID int64) ([]byte, *APIError)

func (*Client) RemoveRestriction

func (c *Client) RemoveRestriction(ctx context.Context, pageID int64) ([]byte, *APIError)

func (*Client) RemoveWorkItemTransition

func (c *Client) RemoveWorkItemTransition(ctx context.Context, typeSlug string, transitionID int64) ([]byte, *APIError)

func (*Client) RestoreFromTrash

func (c *Client) RestoreFromTrash(ctx context.Context, pageID int64, reason string) ([]byte, *APIError)

func (*Client) RestoreVersion

func (c *Client) RestoreVersion(ctx context.Context, id int64, revisionNumber int32) ([]byte, *APIError)

func (*Client) RevokeEnvironmentSeedTransferVerification added in v1.6.0

func (c *Client) RevokeEnvironmentSeedTransferVerification(ctx context.Context) ([]byte, *APIError)

func (*Client) ScanMacroUsage

func (c *Client) ScanMacroUsage(ctx context.Context, macroName string) ([]byte, *APIError)

ScanMacroUsage — GET /public/v1/content-macros/{macroName}/scan: pages that use a macro (access-aware; requires an admin API key). Returns a MacroScanResult.

func (*Client) SearchAuditLog

func (c *Client) SearchAuditLog(ctx context.Context, f AuditFilters, page, size int, sort []string) ([]byte, *APIError)

func (*Client) SearchGroups

func (c *Client) SearchGroups(ctx context.Context, query string, page, size int, sort []string) ([]byte, *APIError)

func (*Client) SearchPages

func (c *Client) SearchPages(ctx context.Context, query string, page, size int, allowedPageTypeID *int64) ([]byte, *APIError)

SearchPages — GET /public/v1/pages/search?query=. Raw body. allowedPageTypeID, when non-nil, scopes the candidates to a page type (used by --property PAGE_OUTGOING name resolution).

func (*Client) SearchUsers

func (c *Client) SearchUsers(ctx context.Context, query string, page, size int, sort []string) ([]byte, *APIError)

func (*Client) SendUserActivationEmail added in v1.6.0

func (c *Client) SendUserActivationEmail(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) SetGroupWorkflowRole

func (c *Client) SetGroupWorkflowRole(ctx context.Context, groupID int64, f api.WorkflowRoleForm) ([]byte, *APIError)

func (*Client) SetPropertyDescriptorDefault added in v1.6.0

func (c *Client) SetPropertyDescriptorDefault(ctx context.Context, pageTypeID, descriptorID int64, f api.DefaultValueSetForm) ([]byte, *APIError)

func (*Client) SetPropertyDescriptorVisibilityOverride added in v1.6.0

func (c *Client) SetPropertyDescriptorVisibilityOverride(ctx context.Context, pageTypeID, descriptorID int64, f api.PropertyDescriptorVisibilityForm) ([]byte, *APIError)

func (*Client) SetUserWorkflowRole

func (c *Client) SetUserWorkflowRole(ctx context.Context, userID int64, f api.WorkflowRoleForm) ([]byte, *APIError)

func (*Client) SortChildren

func (c *Client) SortChildren(ctx context.Context, parentID int64, childIDs []int64) ([]byte, *APIError)

func (*Client) SortDisplayColumns

func (c *Client) SortDisplayColumns(ctx context.Context, descriptorID int64, ids []int64) ([]byte, *APIError)

func (*Client) SortPropertyDescriptors

func (c *Client) SortPropertyDescriptors(ctx context.Context, pageTypeID int64, ids []int64) ([]byte, *APIError)

func (*Client) StartRevision

func (c *Client) StartRevision(ctx context.Context, id int64) ([]byte, *APIError)

func (*Client) SwapPropertyDescriptors

func (c *Client) SwapPropertyDescriptors(ctx context.Context, fromID, toID int64) ([]byte, *APIError)

func (*Client) TransitionWorkItem

func (c *Client) TransitionWorkItem(ctx context.Context, pageID, workItemID int64, f api.WorkItemTransitionForm) ([]byte, *APIError)

func (*Client) UnarchivePage

func (c *Client) UnarchivePage(ctx context.Context, pageID int64) ([]byte, *APIError)

UnarchivePage — POST /public/v1/pages/admin/archive/{pageId}/unarchive: the server-side name of what the CLI exposes as `archive restore`.

func (*Client) UpdateAccess

func (c *Client) UpdateAccess(ctx context.Context, pageID, accessID int64, f api.PageRestrictionAccessForm) ([]byte, *APIError)

func (*Client) UpdateDomainEnum

func (c *Client) UpdateDomainEnum(ctx context.Context, id int64, f api.DomainEnumForm) ([]byte, *APIError)

func (*Client) UpdateEnvironmentSettings added in v1.6.0

func (c *Client) UpdateEnvironmentSettings(ctx context.Context, f api.EnvironmentSettingsForm) ([]byte, *APIError)

func (*Client) UpdateGroup

func (c *Client) UpdateGroup(ctx context.Context, id int64, f api.UserGroupForm) ([]byte, *APIError)

func (*Client) UpdateGroupAccess

func (c *Client) UpdateGroupAccess(ctx context.Context, pageID, accessID int64, f api.PageRestrictionGroupAccessForm) ([]byte, *APIError)

func (*Client) UpdateLandingSettings

func (c *Client) UpdateLandingSettings(ctx context.Context, f api.LandingSettingsForm) ([]byte, *APIError)

func (*Client) UpdatePage

func (c *Client) UpdatePage(ctx context.Context, id int64, f api.PageEditForm) ([]byte, *APIError)

func (*Client) UpdatePageType

func (c *Client) UpdatePageType(ctx context.Context, id int64, f api.PageTypeForm) ([]byte, *APIError)

func (*Client) UpdatePropertyDescriptor

func (c *Client) UpdatePropertyDescriptor(ctx context.Context, id int64, f api.PropertyDescriptorForm) ([]byte, *APIError)

func (*Client) UpdateUser

func (c *Client) UpdateUser(ctx context.Context, id int64, f api.UserForm) ([]byte, *APIError)

func (*Client) UpdateWorkItemTransition

func (c *Client) UpdateWorkItemTransition(ctx context.Context, typeSlug string, transitionID int64, f api.WorkItemTransitionUpdateForm) ([]byte, *APIError)

func (*Client) UpdateWorkItemType

func (c *Client) UpdateWorkItemType(ctx context.Context, slug string, f api.WorkItemTypeUpdateForm) ([]byte, *APIError)

func (*Client) UploadAttachment

func (c *Client) UploadAttachment(ctx context.Context, pageID int64, filePath string) ([]byte, *APIError)

UploadAttachment uploads a file as a page attachment (multipart/form-data, part name "file") — POST /public/v1/pages/{pageId}/file-attachments.

func (*Client) UploadPageImage

func (c *Client) UploadPageImage(ctx context.Context, pageID int64, filePath string) ([]byte, *APIError)

UploadPageImage uploads a file as a page image — POST /public/v1/pages/{pageId}/images.

func (*Client) ValidateContent

func (c *Client) ValidateContent(ctx context.Context, f api.PublicContentValidationForm) ([]byte, *APIError)

type EnvironmentBootstrapAvailabilityResult added in v1.7.0

type EnvironmentBootstrapAvailabilityResult struct {
	Available bool `json:"available"`
}

EnvironmentBootstrapAvailabilityResult mirrors the backend's minimal, read-only answer to GET /environment-seed/bootstrap-availability: whether a POST to /environment-seed/bootstrap would currently succeed, aside from the secret, rate limit and password strength.

type EnvironmentBootstrapResult added in v1.6.0

type EnvironmentBootstrapResult struct {
	UserID *int64  `json:"userId,omitempty"`
	Email  *string `json:"email,omitempty"`
}

EnvironmentBootstrapResult mirrors the backend's minimal, secret-free response to POST /environment-seed/bootstrap: it never echoes the secret or the temporary password back to the caller.

type LowLevel

type LowLevel func() (*http.Response, error)

LowLevel is a thunk that performs exactly one generated low-level oapi call. The wrapper method closes over ctx, path params, body and request-editors, so Do/DoRaw stay completely generic and never see resource-specific shapes.

type RateLimitRetryObserver added in v1.3.0

type RateLimitRetryObserver func(wait time.Duration, attempt int)

RateLimitRetryObserver is notified before each HTTP 429 retry. attempt is 1..3. A nil observer (clients created outside command.Build) stays silent.

type ResponseTooLargeError

type ResponseTooLargeError struct {
	Status int
	Limit  int64
}

func (*ResponseTooLargeError) Error

func (e *ResponseTooLargeError) Error() string

func (*ResponseTooLargeError) Unwrap

func (e *ResponseTooLargeError) Unwrap() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL