accountep

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountSvcConfig

type AccountSvcConfig struct {
	// CoreClient (required) is the core-service gRPC client.
	CoreClient pb.CoreServiceClient
}

type GetAccountFaviconURLEndpoint

type GetAccountFaviconURLEndpoint struct{}

Returns a presigned download URL for the account's customer-portal favicon.

The URL expires one hour after it is generated, so fetch the favicon promptly rather than caching it. The response carries no URL when the account has never uploaded a favicon or the stored image is no longer available.

type GetAccountFaviconURLRequest

type GetAccountFaviconURLRequest struct {
	// ID of the account whose favicon is being fetched.
	AccountID string `path:"id" validate:"required"`
}

Request to get a presigned favicon URL.

type GetAccountLogoURLEndpoint

type GetAccountLogoURLEndpoint struct{}

Returns a presigned download URL for the account's logo.

The URL expires one hour after it is generated, so fetch the logo promptly rather than caching it. The response carries no URL when the account has never uploaded a logo or the stored image is no longer available.

type GetAccountLogoURLRequest

type GetAccountLogoURLRequest struct {
	// ID of the account whose logo is being fetched.
	AccountID string `path:"id" validate:"required"`
}

Request to get a presigned logo URL.

type RetrieveAccountBySlugEndpoint

type RetrieveAccountBySlugEndpoint struct{}

Returns a minimal public profile for the account that owns the given portal slug.

This endpoint does not require authentication; it is intended for customer portal branding lookups. The logo and favicon are returned as download URLs that stay valid for one hour.

type RetrieveAccountBySlugRequest

type RetrieveAccountBySlugRequest struct {
	// Portal slug of the account to look up.
	Slug string `path:"slug" validate:"required"`
}

Request to look up an account by portal slug.

type RetrieveAccountEndpoint

type RetrieveAccountEndpoint struct{}

Returns an account by ID.

You can only retrieve the account you are acting in; requesting any other account is rejected.

func (*RetrieveAccountEndpoint) Materialize

type RetrieveAccountRequest

type RetrieveAccountRequest struct {
	// ID of the account to retrieve.
	AccountID string `path:"id" validate:"required"`
}

Request to retrieve an account by ID.

type RetrievePortalProfileEndpoint

type RetrievePortalProfileEndpoint struct{}

Returns the seller portal profile for the given slug: the seller's identity and its public letterhead address.

Unlike the public branding lookup, this endpoint requires an authenticated caller. It is used by the logged-in customer portal (e.g. order documents) where the seller's letterhead address is shown.

type RetrievePortalProfileRequest

type RetrievePortalProfileRequest struct {
	// Portal slug of the seller whose profile is being retrieved.
	Slug string `path:"slug" validate:"required"`
}

Request to retrieve a seller's portal profile by slug.

type UpdateAccountEndpoint

type UpdateAccountEndpoint struct{}

Partially updates an account's name, branding, and portal settings.

Only the fields provided in the request are changed. You can only update the account you are acting in. The logo and favicon are not set here; upload them through their own endpoints.

func (*UpdateAccountEndpoint) Materialize

type UpdateAccountRequest

type UpdateAccountRequest struct {
	// ID of the account to update.
	AccountID string `path:"id" validate:"required"`
	// The account's display name.
	Name field.Optional[string] `json:"name,omitzero" validate:"omitempty,max=255"`
	// The email address customers are directed to for support.
	SupportEmail field.Optional[string] `json:"support_email,omitzero" validate:"omitempty,custom_email,max=255"`
	// The account's public contact phone number.
	PhoneNumber field.Optional[string] `json:"phone_number,omitzero" validate:"omitempty,max=255"`
	// URL slug for the account's customer portal.
	//
	// The slug is unique across all accounts; updating to one that is already taken returns a conflict error. Changing it changes the portal address customers use, so existing portal links stop resolving.
	Slug field.Optional[string] `json:"slug,omitzero" validate:"omitempty,min=3,max=255"`
	// The account's public website.
	WebsiteURL field.Optional[string] `json:"website_url,omitzero" validate:"omitempty,url,max=2083"`
	// Facebook handle.
	FacebookHandle field.Optional[string] `json:"facebook_handle,omitzero" validate:"omitempty,max=255"`
	// Instagram handle.
	InstagramHandle field.Optional[string] `json:"instagram_handle,omitzero" validate:"omitempty,max=255"`
	// LinkedIn handle.
	LinkedInHandle field.Optional[string] `json:"linkedin_handle,omitzero" validate:"omitempty,max=255"`
	// Twitter handle.
	TwitterHandle field.Optional[string] `json:"twitter_handle,omitzero" validate:"omitempty,max=255"`
}

Request to partially update an account.

func (*UpdateAccountRequest) SchemaExample

func (*UpdateAccountRequest) SchemaExample() any

type UploadAccountFaviconEndpoint

type UploadAccountFaviconEndpoint struct{}

Uploads a customer-portal favicon.

Send the image as the raw request body, not as multipart form data. Use a small square PNG (e.g. 32x32 or 64x64) for the best result in browser tabs. The uploaded image replaces any existing favicon and is shown on the account's customer portal. You can only upload a favicon for the account you are acting in.

type UploadAccountFaviconRequest

type UploadAccountFaviconRequest struct {
	// ID of the account the favicon belongs to.
	AccountID string `path:"id" validate:"required"`
	// Raw image bytes.
	RawBody []byte `rawbody:"true"`
	// Content type of the image (e.g., image/png).
	//
	// The image is stored as `image/png` if this header is omitted, so set it to match the actual format you upload.
	ContentType string `header:"Content-Type"`
}

Request to upload a customer-portal favicon.

type UploadAccountPhotoEndpoint

type UploadAccountPhotoEndpoint struct{}

Uploads an account logo.

Send the image as the raw request body, not as multipart form data. The uploaded image replaces any existing logo and can be retrieved via the Get Account Logo URL endpoint. You can only upload a logo for the account you are acting in.

type UploadAccountPhotoRequest

type UploadAccountPhotoRequest struct {
	// ID of the account the logo belongs to.
	AccountID string `path:"id" validate:"required"`
	// Raw image bytes.
	RawBody []byte `rawbody:"true"`
	// Content type of the image (e.g., image/png).
	//
	// The image is stored as `image/png` if this header is omitted, so set it to match the actual format you upload.
	ContentType string `header:"Content-Type"`
}

Request to upload an account logo.

Jump to

Keyboard shortcuts

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