expensify

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 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 expensify provides validated, typed resource operations for New Expensify.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(noun, verb string, values map[string]string) error

Validate checks all user input without accessing the network. Both live and dry-run commands use this path, so invalid writes cannot appear executable.

Types

type Expense

type Expense struct {
	ID           string `json:"id"`
	ReportID     string `json:"report_id,omitempty"`
	Amount       int64  `json:"amount"`
	Currency     string `json:"currency"`
	Merchant     string `json:"merchant"`
	Date         string `json:"date"`
	Comment      string `json:"comment,omitempty"`
	Category     string `json:"category,omitempty"`
	Tag          string `json:"tag,omitempty"`
	Billable     bool   `json:"billable"`
	Reimbursable bool   `json:"reimbursable"`
	Receipt      any    `json:"receipt,omitempty"`
}

type Flag

type Flag struct {
	Name, Usage, Default string
	Required, Bool       bool
}

type Mutation

type Mutation struct {
	ID     string `json:"id"`
	Action string `json:"action"`
}

type NamedItem

type NamedItem struct {
	Name    string `json:"name"`
	Enabled bool   `json:"enabled"`
	Group   string `json:"group,omitempty"`
}

type Page

type Page[T any] struct {
	Items   []T  `json:"items"`
	Offset  int  `json:"offset"`
	Limit   int  `json:"limit"`
	HasMore bool `json:"has_more"`
}

type Report

type Report struct {
	ID             string `json:"id"`
	Name           string `json:"name"`
	PolicyID       string `json:"policy_id,omitempty"`
	Type           string `json:"type,omitempty"`
	Total          int64  `json:"total"`
	Currency       string `json:"currency,omitempty"`
	State          string `json:"state,omitempty"`
	Status         string `json:"status,omitempty"`
	OwnerAccountID string `json:"owner_account_id,omitempty"`
	ManagerID      string `json:"manager_id,omitempty"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(client *api.Client) *Service

func (*Service) Execute

func (s *Service) Execute(ctx context.Context, noun, verb string, values map[string]string) (any, error)

type Spec

type Spec struct {
	Name, Summary, Example string
	Flags                  []Flag
	Mutates, Confirm       bool
}

func Specs

func Specs() []Spec

type Workspace

type Workspace struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Type     string `json:"type,omitempty"`
	Currency string `json:"currency,omitempty"`
	Role     string `json:"role,omitempty"`
	Owner    string `json:"owner,omitempty"`
}

Jump to

Keyboard shortcuts

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