utilsep

package
v1.1.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckDuplicateEndpoint

type CheckDuplicateEndpoint struct{}

Checks whether a record number is already in use for the given type (invoice number, sales order number, or customer PO number).

Use this to warn a user before they submit a number that would collide with an existing record. The check is read-only: it reports the state at the moment of the call and does not reserve the number, so a number reported as free can still be taken by the time you create the record.

type CheckDuplicateRequest

type CheckDuplicateRequest struct {
	// The kind of record number to check.
	//
	// - `invoice_number`: checks invoice numbers.
	// - `order_number`: checks sales order numbers.
	// - `customer_po_number`: checks customer PO numbers on sales orders; requires `customer_id`.
	Type string `json:"type" validate:"required"`
	// The record number to check for an existing match.
	//
	// Surrounding whitespace is trimmed before the number is compared against existing records.
	RecordNumber string `json:"record_number" validate:"required"`
	// ID of the customer to scope the check to.
	//
	// Required when `type` is `customer_po_number`; ignored for other types.
	CustomerID field.Optional[string] `json:"customer_id,omitzero"`
}

Request to check for a duplicate record number.

func (*CheckDuplicateRequest) SchemaExample

func (*CheckDuplicateRequest) SchemaExample() any

type EmailRecordEndpoint

type EmailRecordEndpoint struct{}

Emails a record (invoice, sales order, or purchase order) to its configured recipients and marks the record as sent.

Delivery is asynchronous: the endpoint returns `202 Accepted` once the email is queued, so a `202` means the send was accepted, not that it reached the recipients. If the record has no configured recipients the request still succeeds and nothing is sent; in that case a sales order or purchase order is also left unmarked, while an invoice is still marked as sent.

func (*EmailRecordEndpoint) Materialize

type EmailRecordRequest

type EmailRecordRequest struct {
	// ID of the record to email.
	ID string `json:"id" validate:"required"`
	// The type of record to email.
	//
	// - `invoice`: emails the invoice to the contacts on its sales order that are set to receive invoice emails.
	// - `sales_order`: sends an order acknowledgement to the order's acknowledgement recipients.
	// - `purchase_order`: sends the purchase order submission to the order's submission recipients.
	Type constants.EmailRecordType `json:"type" validate:"required"`
}

Request to email a record to its configured recipients.

func (*EmailRecordRequest) SchemaExample

func (*EmailRecordRequest) SchemaExample() any

type RequestDemoEndpoint

type RequestDemoEndpoint struct{}

Submits a demo request from a prospective customer for the OpenMRP team to follow up on.

The request creates no account, user, or other resource, and there is no endpoint to read it back. The response carries a confirmation message suitable for display.

func (*RequestDemoEndpoint) Materialize

type RequestDemoRequest

type RequestDemoRequest struct {
	// Full name of the person requesting the demo.
	Name string `json:"name" validate:"required"`
	// Email address to reach the requester at.
	Email string `json:"email" validate:"required,custom_email"`
	// Name of the company the requester represents.
	Company string `json:"company" validate:"required"`
	// Phone number to reach the requester at.
	PhoneNumber field.Optional[string] `json:"phone_number,omitzero"`
	// Free-form note from the requester about what they would like to see.
	Message field.Optional[string] `json:"message,omitzero"`
}

Request to be contacted for a product demo.

func (*RequestDemoRequest) SchemaExample

func (*RequestDemoRequest) SchemaExample() any

type SubmitFeedbackEndpoint

type SubmitFeedbackEndpoint struct{}

Submits an answer to an in-product feedback prompt for the OpenMRP team to review.

The submission creates no resource and cannot be read back through the API. The response carries a confirmation message suitable for display.

type SubmitFeedbackRequest

type SubmitFeedbackRequest struct {
	// The question the user was prompted with.
	Question string `json:"question" validate:"required"`
	// The user's response to the question.
	Answer string `json:"answer" validate:"required"`
	// URL of the page the user was on when they answered, recorded so the feedback can be read in context.
	PageURL field.Optional[string] `json:"page_url,omitzero"`
}

Request to submit user feedback.

func (*SubmitFeedbackRequest) SchemaExample

func (*SubmitFeedbackRequest) SchemaExample() any

type UtilsSvcConfig

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

Jump to

Keyboard shortcuts

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