nookplusapi

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package nookplusapi provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	// AliasUrl Permanent record-key URL. It never changes, and redirects to the
	// canonical URL, so it is the safe form to embed anywhere durable.
	AliasUrl *string `json:"aliasUrl,omitempty"`

	// Cid Content identifier of the record revision. Send it back as a quoted
	// `If-Match` value to make a mutation conditional. Present on
	// responses that read or write a record.
	//
	//
	// Examples: bafyreiexamplecid
	Cid *CID `json:"cid,omitempty"`

	// Publication AT URI of a record (`at://did/collection/rkey`). Permanent record identity.
	//
	// Examples: at://did:plc:aaaabbbbccccddddeeeeffff/app.nooker.publication/3jt5mavarik22
	Publication AtUri     `json:"publication"`
	PublishedAt time.Time `json:"publishedAt"`

	// Slug Lowercase ASCII letters, digits, and hyphens; no leading or trailing hyphen.
	Slug      Slug       `json:"slug"`
	Title     string     `json:"title"`
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`

	// Uri AT URI of a record (`at://did/collection/rkey`). Permanent record identity.
	//
	// Examples: at://did:plc:aaaabbbbccccddddeeeeffff/app.nooker.publication/3jt5mavarik22
	Uri AtUri `json:"uri"`

	// Url Canonical public URL as currently served, built from the slug.
	// Clients display and share this value and must not assemble it
	// themselves; the canonical form can change without the record
	// changing.
	Url *string `json:"url,omitempty"`
}

Article defines model for Article.

type ArticleInput

type ArticleInput struct {
	// Content Markdown (CommonMark + GFM tables and strikethrough).
	Content string `json:"content"`

	// Publication AT URI of a record (`at://did/collection/rkey`). Permanent record identity.
	//
	// Examples: at://did:plc:aaaabbbbccccddddeeeeffff/app.nooker.publication/3jt5mavarik22
	Publication AtUri `json:"publication"`

	// PublishedAt Defaults to the server's current time when omitted.
	PublishedAt *time.Time `json:"publishedAt,omitempty"`

	// Slug Lowercase ASCII letters, digits, and hyphens; no leading or trailing hyphen.
	Slug    Slug    `json:"slug"`
	Summary *string `json:"summary,omitempty"`
	Title   string  `json:"title"`
}

ArticleInput Fields for an `app.nooker.article` record. Constraints follow the Lexicon.

type AtUri

type AtUri = string

AtUri AT URI of a record (`at://did/collection/rkey`). Permanent record identity.

Examples: at://did:plc:aaaabbbbccccddddeeeeffff/app.nooker.publication/3jt5mavarik22

type BlobRef added in v0.3.0

type BlobRef struct {
	// MimeType Must be one of the types the Lexicon accepts for the field.
	//
	// Examples: image/png
	MimeType string `json:"mimeType"`

	// Ref Content identifier of the record revision. Send it back as a quoted
	// `If-Match` value to make a mutation conditional. Present on
	// responses that read or write a record.
	//
	//
	// Examples: bafyreiexamplecid
	Ref CID `json:"ref"`

	// Size Byte length the repository reported for the stored blob.
	Size int64 `json:"size"`
}

BlobRef Reference to a blob already uploaded to the caller's own repository with `com.atproto.repo.uploadBlob`.

The bytes never pass through this API. A client holds a PDS session, so it uploads to its own repository and sends the reference here; routing the image through the service would put user content in a second place for no gain and make the upload depend on the service being reachable.

type CID added in v0.2.0

type CID = string

CID Content identifier of the record revision. Send it back as a quoted `If-Match` value to make a mutation conditional. Present on responses that read or write a record.

Examples: bafyreiexamplecid

type CheckHandleAvailabilityParams

type CheckHandleAvailabilityParams struct {
	// Handle Fully qualified handle to check (for example `alice.handles.example.com`).
	Handle Handle `form:"handle" json:"handle"`
}

CheckHandleAvailabilityParams defines parameters for CheckHandleAvailability.

type CreateArticleJSONRequestBody

type CreateArticleJSONRequestBody = ArticleInput

CreateArticleJSONRequestBody defines body for CreateArticle for application/json ContentType.

type CreateArticleParams

type CreateArticleParams struct {
	// IdempotencyKey Client-generated opaque key (for example a UUID). Retrying a request
	// with the same key MUST NOT repeat its side effects; the server
	// replays the original outcome.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

CreateArticleParams defines parameters for CreateArticle.

type CreatePublicationJSONRequestBody

type CreatePublicationJSONRequestBody = PublicationInput

CreatePublicationJSONRequestBody defines body for CreatePublication for application/json ContentType.

type CreatePublicationParams

type CreatePublicationParams struct {
	// IdempotencyKey Client-generated opaque key (for example a UUID). Retrying a request
	// with the same key MUST NOT repeat its side effects; the server
	// replays the original outcome.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

CreatePublicationParams defines parameters for CreatePublication.

type DeleteArticleParams added in v0.2.0

type DeleteArticleParams struct {
	// IfMatch The record CID last read by the client. The server forwards it to the
	// PDS as a compare-and-swap, so a record that changed in the meantime is
	// rejected with `record-conflict` (412) and left untouched.
	//
	// A quoted strong entity tag (`"bafyrei…"`) is the preferred form and
	// matches what `ETag` returns. Two further forms are accepted, because a
	// client cannot always produce the first one:
	//
	// - the bare CID: `bafyrei…`
	// - the quoted form with its quotes percent-encoded: `%22bafyrei…%22`
	//
	// The third exists because generated clients commonly serialize a header
	// value as a URI component, which percent-encodes `"`. Such a client
	// feeding an `ETag` straight back sends `%22…%22` and has no way not to.
	// A server MUST accept all three and treat them as the same CID.
	//
	// Omitting the header makes the mutation unconditional. An empty entity
	// tag (`""`) is NOT equivalent to omitting it: it names no CID to compare
	// against, and is rejected with `invalid-request` (400) rather than
	// silently discarding the guarantee this header exists to provide. Any
	// other value is rejected the same way.
	IfMatch *IfMatch `json:"If-Match,omitempty"`
}

DeleteArticleParams defines parameters for DeleteArticle.

type DeleteHostedAccountJSONRequestBody deprecated added in v0.4.0

type DeleteHostedAccountJSONRequestBody = HostedAccountDeletionInput

DeleteHostedAccountJSONRequestBody defines body for DeleteHostedAccount for application/json ContentType.

Deprecated: Temporary. Exists only while the host cannot email unverified addresses; clients return to com.atproto.server.requestAccountDelete and com.atproto.server.deleteAccount when it can.

type DeleteHostedAccountParams added in v0.4.0

type DeleteHostedAccountParams struct {
	// IdempotencyKey Client-generated opaque key (for example a UUID). Retrying a request
	// with the same key MUST NOT repeat its side effects; the server
	// replays the original outcome.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

DeleteHostedAccountParams defines parameters for DeleteHostedAccount.

type DeletePublicationParams added in v0.2.0

type DeletePublicationParams struct {
	// IfMatch The record CID last read by the client. The server forwards it to the
	// PDS as a compare-and-swap, so a record that changed in the meantime is
	// rejected with `record-conflict` (412) and left untouched.
	//
	// A quoted strong entity tag (`"bafyrei…"`) is the preferred form and
	// matches what `ETag` returns. Two further forms are accepted, because a
	// client cannot always produce the first one:
	//
	// - the bare CID: `bafyrei…`
	// - the quoted form with its quotes percent-encoded: `%22bafyrei…%22`
	//
	// The third exists because generated clients commonly serialize a header
	// value as a URI component, which percent-encodes `"`. Such a client
	// feeding an `ETag` straight back sends `%22…%22` and has no way not to.
	// A server MUST accept all three and treat them as the same CID.
	//
	// Omitting the header makes the mutation unconditional. An empty entity
	// tag (`""`) is NOT equivalent to omitting it: it names no CID to compare
	// against, and is rejected with `invalid-request` (400) rather than
	// silently discarding the guarantee this header exists to provide. Any
	// other value is rejected the same way.
	IfMatch *IfMatch `json:"If-Match,omitempty"`
}

DeletePublicationParams defines parameters for DeletePublication.

type Did

type Did = string

Did Decentralized identifier of the member. The stable identifier for all member-scoped data.

Examples: did:plc:aaaabbbbccccddddeeeeffff

type DisconnectionReceipt added in v0.2.0

type DisconnectionReceipt struct {
	CompletedAt *time.Time `json:"completedAt,omitempty"`
	CreatedAt   time.Time  `json:"createdAt"`

	// FailureCode Normalised, non-sensitive reason. Present only when failed.
	FailureCode *string `json:"failureCode,omitempty"`
	Id          string  `json:"id"`

	// OwnerDid Decentralized identifier of the member. The stable identifier for all member-scoped data.
	//
	// Examples: did:plc:aaaabbbbccccddddeeeeffff
	OwnerDid Did                        `json:"ownerDid"`
	Status   DisconnectionReceiptStatus `json:"status"`
}

DisconnectionReceipt Status of a service-disconnection request. Retained for 24 hours after completion or failure, then hard-deleted. Fields are limited to this set on purpose: the point of disconnection is removing service-held data, so the receipt must not reintroduce a handle, an email address, or any content.

type DisconnectionReceiptStatus added in v0.2.0

type DisconnectionReceiptStatus string

DisconnectionReceiptStatus defines model for DisconnectionReceipt.Status.

const (
	DisconnectionReceiptStatusCompleted  DisconnectionReceiptStatus = "completed"
	DisconnectionReceiptStatusFailed     DisconnectionReceiptStatus = "failed"
	DisconnectionReceiptStatusPending    DisconnectionReceiptStatus = "pending"
	DisconnectionReceiptStatusProcessing DisconnectionReceiptStatus = "processing"
)

Defines values for DisconnectionReceiptStatus.

func (DisconnectionReceiptStatus) Valid added in v0.2.0

func (e DisconnectionReceiptStatus) Valid() bool

Valid indicates whether the value is a known member of the DisconnectionReceiptStatus enum.

type ExportJob

type ExportJob struct {
	// DownloadUrl Present when completed. Time-limited URL for the export archive.
	DownloadUrl *string         `json:"downloadUrl,omitempty"`
	Id          string          `json:"id"`
	Status      ExportJobStatus `json:"status"`
}

ExportJob defines model for ExportJob.

type ExportJobStatus

type ExportJobStatus string

ExportJobStatus defines model for ExportJob.Status.

const (
	ExportJobStatusCompleted  ExportJobStatus = "completed"
	ExportJobStatusFailed     ExportJobStatus = "failed"
	ExportJobStatusPending    ExportJobStatus = "pending"
	ExportJobStatusProcessing ExportJobStatus = "processing"
)

Defines values for ExportJobStatus.

func (ExportJobStatus) Valid

func (e ExportJobStatus) Valid() bool

Valid indicates whether the value is a known member of the ExportJobStatus enum.

type Handle

type Handle = string

Handle AT Protocol handle. Mutable presentation attribute.

Examples: alice.handles.example.com

type HostedAccountDeletionInput added in v0.4.0

type HostedAccountDeletionInput struct {
	Password string `json:"password"`
}

HostedAccountDeletionInput The account password, proving the caller may destroy the account and not merely act as it. Verified against the PDS; never stored, never logged, and never echoed in a problem document.

Belongs only to the temporary `POST /v1/account/deletion` and leaves with it.

type IdempotencyKey

type IdempotencyKey = string

IdempotencyKey defines model for IdempotencyKey.

type IfMatch added in v0.2.0

type IfMatch = string

IfMatch defines model for IfMatch.

type Member

type Member struct {
	// Did Decentralized identifier of the member. The stable identifier for all member-scoped data.
	//
	// Examples: did:plc:aaaabbbbccccddddeeeeffff
	Did Did `json:"did"`

	// Handle AT Protocol handle. Mutable presentation attribute.
	//
	// Examples: alice.handles.example.com
	Handle Handle `json:"handle"`

	// Status Suspended or revoked members retain access to export and deletion.
	Status MemberStatus `json:"status"`
}

Member defines model for Member.

type MemberStatus

type MemberStatus string

MemberStatus Suspended or revoked members retain access to export and deletion.

const (
	Active    MemberStatus = "active"
	Revoked   MemberStatus = "revoked"
	Suspended MemberStatus = "suspended"
)

Defines values for MemberStatus.

func (MemberStatus) Valid

func (e MemberStatus) Valid() bool

Valid indicates whether the value is a known member of the MemberStatus enum.

type Problem

type Problem struct {
	Detail   *string `json:"detail,omitempty"`
	Instance *string `json:"instance,omitempty"`

	// Reason Machine-readable cause, more specific than `type`. Present only when the cause is one a client should phrase in its own words: `detail` is English prose written for a developer reading a log, so a client that shows it to a user shows untranslated text. Clients MUST treat an unrecognised value as absent and fall back to `type`. Values are added additively and never repurposed.
	//
	//
	// Examples: email-already-used
	Reason *ProblemReason `json:"reason,omitempty"`
	Status int            `json:"status"`
	Title  string         `json:"title"`

	// Type URI identifying the error type. Defaults to `about:blank`.
	Type *string `json:"type,omitempty"`
}

Problem RFC 7807 problem document. Never contains tokens, passwords, invitation codes, emails, or article content.

type ProblemReason added in v0.2.2

type ProblemReason string

ProblemReason Machine-readable cause, more specific than `type`. Present only when the cause is one a client should phrase in its own words: `detail` is English prose written for a developer reading a log, so a client that shows it to a user shows untranslated text. Clients MUST treat an unrecognised value as absent and fall back to `type`. Values are added additively and never repurposed.

Examples: email-already-used

const (
	AccountPasswordMismatch ProblemReason = "account-password-mismatch"
	EmailAlreadyUsed        ProblemReason = "email-already-used"
	EmailInvalid            ProblemReason = "email-invalid"
	HandleInvalid           ProblemReason = "handle-invalid"
	HandleTaken             ProblemReason = "handle-taken"
	InvitationExhausted     ProblemReason = "invitation-exhausted"
	InvitationExpired       ProblemReason = "invitation-expired"
	InvitationNotFound      ProblemReason = "invitation-not-found"
	PasswordTooWeak         ProblemReason = "password-too-weak"
	RepositoryHostRejected  ProblemReason = "repository-host-rejected"
)

Defines values for ProblemReason.

func (ProblemReason) Valid added in v0.2.2

func (e ProblemReason) Valid() bool

Valid indicates whether the value is a known member of the ProblemReason enum.

type Publication

type Publication struct {
	// Cid Content identifier of the record revision. Send it back as a quoted
	// `If-Match` value to make a mutation conditional. Present on
	// responses that read or write a record.
	//
	//
	// Examples: bafyreiexamplecid
	Cid         *CID    `json:"cid,omitempty"`
	Description *string `json:"description,omitempty"`

	// Icon Present when the publication carries its own icon.
	Icon *BlobRef `json:"icon,omitempty"`

	// IconUrl Where the icon is served from, once the service has derived its
	// delivery form. Absent until the first render after an upload, and
	// absent entirely for a publication using the service's own mark.
	IconUrl  *string `json:"iconUrl,omitempty"`
	Language string  `json:"language"`
	Name     string  `json:"name"`

	// Slug Lowercase ASCII letters, digits, and hyphens; no leading or trailing hyphen.
	Slug Slug `json:"slug"`

	// Uri AT URI of a record (`at://did/collection/rkey`). Permanent record identity.
	//
	// Examples: at://did:plc:aaaabbbbccccddddeeeeffff/app.nooker.publication/3jt5mavarik22
	Uri  AtUri            `json:"uri"`
	Urls *PublicationUrls `json:"urls,omitempty"`
}

Publication defines model for Publication.

type PublicationInput

type PublicationInput struct {
	Description *string `json:"description,omitempty"`

	// Icon Icon for the publication. This request replaces the record, so an
	// omitted icon is removed — the same rule `description` already follows.
	// A client editing anything else must send the icon it wants kept.
	Icon *BlobRef `json:"icon,omitempty"`

	// Language BCP-47 language tag.
	Language string `json:"language"`
	Name     string `json:"name"`

	// Slug Lowercase ASCII letters, digits, and hyphens; no leading or trailing hyphen.
	Slug Slug `json:"slug"`
}

PublicationInput Fields for an `app.nooker.publication` record. Constraints follow the Lexicon.

type PublicationUrls

type PublicationUrls struct {
	Atom string `json:"atom"`
	Page string `json:"page"`
	Rss  string `json:"rss"`
}

PublicationUrls defines model for PublicationUrls.

type RecordKey

type RecordKey = string

RecordKey defines model for RecordKey.

type RequestAccountDeletionParams

type RequestAccountDeletionParams struct {
	// IdempotencyKey Client-generated opaque key (for example a UUID). Retrying a request
	// with the same key MUST NOT repeat its side effects; the server
	// replays the original outcome.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

RequestAccountDeletionParams defines parameters for RequestAccountDeletion.

type RequestExportParams

type RequestExportParams struct {
	// IdempotencyKey Client-generated opaque key (for example a UUID). Retrying a request
	// with the same key MUST NOT repeat its side effects; the server
	// replays the original outcome.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

RequestExportParams defines parameters for RequestExport.

type RequestID added in v0.2.0

type RequestID = string

RequestID defines model for RequestID.

type RequestServiceDisconnectionParams added in v0.2.0

type RequestServiceDisconnectionParams struct {
	// IdempotencyKey Client-generated opaque key (for example a UUID). Retrying a request
	// with the same key MUST NOT repeat its side effects; the server
	// replays the original outcome.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

RequestServiceDisconnectionParams defines parameters for RequestServiceDisconnection.

type Session

type Session struct {
	AccessJwt  string `json:"accessJwt"`
	RefreshJwt string `json:"refreshJwt"`
}

Session PDS session material for the client. Never logged or stored server-side.

type SignupJSONBody

type SignupJSONBody struct {
	DisplayName *string `json:"displayName,omitempty"`

	// Email Recovery email. Forwarded to the PDS.
	Email openapi_types.Email `json:"email"`

	// Handle AT Protocol handle. Mutable presentation attribute.
	//
	// Examples: alice.handles.example.com
	Handle         Handle `json:"handle"`
	InvitationCode string `json:"invitationCode"`

	// Password Forwarded only to the PDS account boundary; never stored or logged by the service.
	Password string `json:"password"`
}

SignupJSONBody defines parameters for Signup.

type SignupJSONRequestBody

type SignupJSONRequestBody SignupJSONBody

SignupJSONRequestBody defines body for Signup for application/json ContentType.

type SignupParams

type SignupParams struct {
	// IdempotencyKey Client-generated opaque key (for example a UUID). Retrying a request
	// with the same key MUST NOT repeat its side effects; the server
	// replays the original outcome.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

SignupParams defines parameters for Signup.

type Slug

type Slug = string

Slug Lowercase ASCII letters, digits, and hyphens; no leading or trailing hyphen.

type UpdateArticleJSONRequestBody

type UpdateArticleJSONRequestBody = ArticleInput

UpdateArticleJSONRequestBody defines body for UpdateArticle for application/json ContentType.

type UpdateArticleParams added in v0.2.0

type UpdateArticleParams struct {
	// IfMatch The record CID last read by the client. The server forwards it to the
	// PDS as a compare-and-swap, so a record that changed in the meantime is
	// rejected with `record-conflict` (412) and left untouched.
	//
	// A quoted strong entity tag (`"bafyrei…"`) is the preferred form and
	// matches what `ETag` returns. Two further forms are accepted, because a
	// client cannot always produce the first one:
	//
	// - the bare CID: `bafyrei…`
	// - the quoted form with its quotes percent-encoded: `%22bafyrei…%22`
	//
	// The third exists because generated clients commonly serialize a header
	// value as a URI component, which percent-encodes `"`. Such a client
	// feeding an `ETag` straight back sends `%22…%22` and has no way not to.
	// A server MUST accept all three and treat them as the same CID.
	//
	// Omitting the header makes the mutation unconditional. An empty entity
	// tag (`""`) is NOT equivalent to omitting it: it names no CID to compare
	// against, and is rejected with `invalid-request` (400) rather than
	// silently discarding the guarantee this header exists to provide. Any
	// other value is rejected the same way.
	IfMatch *IfMatch `json:"If-Match,omitempty"`
}

UpdateArticleParams defines parameters for UpdateArticle.

type UpdatePublicationJSONRequestBody added in v0.2.0

type UpdatePublicationJSONRequestBody = PublicationInput

UpdatePublicationJSONRequestBody defines body for UpdatePublication for application/json ContentType.

type UpdatePublicationParams added in v0.2.0

type UpdatePublicationParams struct {
	// IfMatch The record CID last read by the client. The server forwards it to the
	// PDS as a compare-and-swap, so a record that changed in the meantime is
	// rejected with `record-conflict` (412) and left untouched.
	//
	// A quoted strong entity tag (`"bafyrei…"`) is the preferred form and
	// matches what `ETag` returns. Two further forms are accepted, because a
	// client cannot always produce the first one:
	//
	// - the bare CID: `bafyrei…`
	// - the quoted form with its quotes percent-encoded: `%22bafyrei…%22`
	//
	// The third exists because generated clients commonly serialize a header
	// value as a URI component, which percent-encodes `"`. Such a client
	// feeding an `ETag` straight back sends `%22…%22` and has no way not to.
	// A server MUST accept all three and treat them as the same CID.
	//
	// Omitting the header makes the mutation unconditional. An empty entity
	// tag (`""`) is NOT equivalent to omitting it: it names no CID to compare
	// against, and is rejected with `invalid-request` (400) rather than
	// silently discarding the guarantee this header exists to provide. Any
	// other value is rejected the same way.
	IfMatch *IfMatch `json:"If-Match,omitempty"`
}

UpdatePublicationParams defines parameters for UpdatePublication.

type VerifyInvitationJSONBody

type VerifyInvitationJSONBody struct {
	Code string `json:"code"`
}

VerifyInvitationJSONBody defines parameters for VerifyInvitation.

type VerifyInvitationJSONRequestBody

type VerifyInvitationJSONRequestBody VerifyInvitationJSONBody

VerifyInvitationJSONRequestBody defines body for VerifyInvitation for application/json ContentType.

Jump to

Keyboard shortcuts

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