models

package
v1.1.59 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: AGPL-3.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 AttemptPaymentActivityInput added in v1.0.49

type AttemptPaymentActivityInput struct {
	InvoiceID      string `json:"invoice_id"`
	SubscriptionID string `json:"subscription_id"`
	TenantID       string `json:"tenant_id"`
	EnvironmentID  string `json:"environment_id"`
}

AttemptPaymentActivityInput represents the input for attempting payment

func (*AttemptPaymentActivityInput) Validate added in v1.0.49

func (i *AttemptPaymentActivityInput) Validate() error

Validate validates the attempt payment activity input

type BillingPeriod added in v1.0.49

type BillingPeriod struct {
	SubscriptionID string          `json:"subscription_id"`
	StartDate      time.Time       `json:"start_date"`
	EndDate        time.Time       `json:"end_date"`
	Amount         decimal.Decimal `json:"amount"`
}

BillingPeriod represents a single billing period

type CalculateBillingPeriodsActivityInput added in v1.0.49

type CalculateBillingPeriodsActivityInput struct {
	SubscriptionID string `json:"subscription_id"`
	TenantID       string `json:"tenant_id"`
	EnvironmentID  string `json:"environment_id"`
}

CalculateBillingPeriodsActivityInput represents the input for calculating billing periods

func (*CalculateBillingPeriodsActivityInput) Validate added in v1.0.49

Validate validates the calculate billing periods activity input

type CalculateBillingPeriodsActivityOutput added in v1.0.49

type CalculateBillingPeriodsActivityOutput struct {
	BillingPeriods []BillingPeriod `json:"billing_periods"`
}

CalculateBillingPeriodsActivityOutput represents the output for calculating billing periods

type CheckPauseActivityInput added in v1.0.49

type CheckPauseActivityInput struct {
	SubscriptionID string `json:"subscription_id"`
	TenantID       string `json:"tenant_id"`
	EnvironmentID  string `json:"environment_id"`
}

CheckPauseActivityInput represents the input for checking if a subscription is paused

func (*CheckPauseActivityInput) Validate added in v1.0.49

func (i *CheckPauseActivityInput) Validate() error

Validate validates the check pause activity input

type CheckPauseActivityOutput added in v1.0.49

type CheckPauseActivityOutput struct {
	IsPaused bool `json:"is_paused"`
}

CheckPauseActivityOutput represents the output for checking if a subscription is paused

type ClientOptions added in v1.0.27

type ClientOptions struct {
	// Address is the host:port of the Temporal server
	Address string
	// Namespace is the Temporal namespace to use
	Namespace string
	// APIKey is the authentication key for Temporal Cloud
	APIKey string
	// TLS enables TLS for the connection
	TLS bool
	// RetryPolicy defines the default retry policy for workflows
	RetryPolicy *common.RetryPolicy
	// DataConverter is an optional data converter for serialization
	DataConverter converter.DataConverter
}

ClientOptions represents configuration options for creating a Temporal client

func DefaultClientOptions added in v1.0.27

func DefaultClientOptions() *ClientOptions

DefaultClientOptions returns the default client options

func (*ClientOptions) ToSDKOptions added in v1.0.27

func (o *ClientOptions) ToSDKOptions() client.Options

ToSDKOptions converts ClientOptions to Temporal SDK client.Options

type CreateCustomerActionConfig added in v1.0.49

type CreateCustomerActionConfig struct {
	Action        WorkflowAction `json:"action"`                    // Type discriminator - automatically set to "create_customer"
	DefaultUserID *string        `json:"default_user_id,omitempty"` // Optional user_id to use for created_by/updated_by (defaults to NULL if not provided)

}

CreateCustomerActionConfig represents configuration for creating a customer action

func (*CreateCustomerActionConfig) GetAction added in v1.0.49

func (*CreateCustomerActionConfig) ToDTO added in v1.0.49

func (c *CreateCustomerActionConfig) ToDTO(params interface{}) (interface{}, error)

ToDTO converts the action config to CreateCustomerRequest DTO

func (*CreateCustomerActionConfig) Validate added in v1.0.49

func (c *CreateCustomerActionConfig) Validate() error

type CreateCustomerActivityInput added in v1.0.49

type CreateCustomerActivityInput struct {
	ExternalID    string `json:"external_id" validate:"required"`
	Name          string `json:"name" validate:"required"`
	Email         string `json:"email,omitempty"`
	TenantID      string `json:"tenant_id" validate:"required"`
	EnvironmentID string `json:"environment_id" validate:"required"`
	UserID        string `json:"user_id,omitempty"`
}

CreateCustomerActivityInput represents the input for the create customer activity

func (*CreateCustomerActivityInput) Validate added in v1.0.49

func (c *CreateCustomerActivityInput) Validate() error

Validate validates the create customer activity input

type CreateCustomerActivityResult added in v1.0.49

type CreateCustomerActivityResult struct {
	CustomerID string `json:"customer_id"`
	ExternalID string `json:"external_id"`
	Name       string `json:"name"`
	Email      string `json:"email,omitempty"`
}

CreateCustomerActivityResult represents the result of the create customer activity

type CreateInvoiceActivityInput added in v1.0.49

type CreateInvoiceActivityInput struct {
	SubscriptionID string        `json:"subscription_id"`
	TenantID       string        `json:"tenant_id"`
	EnvironmentID  string        `json:"environment_id"`
	Period         BillingPeriod `json:"period"`
}

CreateInvoiceActivityInput represents the input for creating an invoice

func (*CreateInvoiceActivityInput) Validate added in v1.0.49

func (i *CreateInvoiceActivityInput) Validate() error

Validate validates the create invoice activity input

type CreateInvoiceActivityOutput added in v1.0.49

type CreateInvoiceActivityOutput struct {
	InvoiceID string `json:"invoice_id"`
}

CreateInvoiceActivityOutput represents the output for creating an invoice

type CreateScheduleOptions added in v1.0.32

type CreateScheduleOptions struct {
	ID     string
	Spec   client.ScheduleSpec
	Action *client.ScheduleWorkflowAction
	Paused bool
}

CreateScheduleOptions represents options for creating a schedule

func (*CreateScheduleOptions) ToSDKOptions added in v1.0.32

func (o *CreateScheduleOptions) ToSDKOptions() client.ScheduleOptions

ToSDKOptions converts CreateScheduleOptions to Temporal SDK client.ScheduleOptions

type CreateSubscriptionActionConfig added in v1.0.47

type CreateSubscriptionActionConfig struct {
	Action       WorkflowAction `json:"action"`
	PlanID       string         `json:"plan_id,omitempty"`
	BillingCycle string         `json:"billing_cycle,omitempty"`
	StartDate    *time.Time     `json:"start_date,omitempty"` // Optional start_date, if provided takes highest priority
}

CreateSubscriptionActionConfig represents configuration for creating a subscription action

func (*CreateSubscriptionActionConfig) GetAction added in v1.0.47

func (*CreateSubscriptionActionConfig) ToDTO added in v1.0.47

func (c *CreateSubscriptionActionConfig) ToDTO(params interface{}) (interface{}, error)

ToDTO converts the action config directly to CreateSubscriptionRequest DTO

func (*CreateSubscriptionActionConfig) Validate added in v1.0.47

func (c *CreateSubscriptionActionConfig) Validate() error

type CreateSubscriptionActivityInput added in v1.0.47

type CreateSubscriptionActivityInput struct {
	CustomerID         string                          `json:"customer_id" validate:"required"`
	EventTimestamp     *time.Time                      `json:"event_timestamp,omitempty"` // Optional - timestamp of the triggering event
	TenantID           string                          `json:"tenant_id" validate:"required"`
	EnvironmentID      string                          `json:"environment_id" validate:"required"`
	UserID             string                          `json:"user_id,omitempty"`
	SubscriptionConfig *CreateSubscriptionActionConfig `json:"subscription_config" validate:"required"`
}

CreateSubscriptionActivityInput represents the input for the create subscription activity

func (*CreateSubscriptionActivityInput) Validate added in v1.0.47

func (c *CreateSubscriptionActivityInput) Validate() error

Validate validates the create subscription activity input

type CreateSubscriptionActivityResult added in v1.0.47

type CreateSubscriptionActivityResult struct {
	SubscriptionID string                   `json:"subscription_id"`
	CustomerID     string                   `json:"customer_id"`
	PlanID         string                   `json:"plan_id"`
	Currency       string                   `json:"currency"`
	Status         types.SubscriptionStatus `json:"status"`
	BillingCycle   types.BillingCycle       `json:"billing_cycle"`
	StartDate      *time.Time               `json:"start_date"`
}

CreateSubscriptionActivityResult represents the result of the create subscription activity

type CreateWalletActionConfig added in v1.0.47

type CreateWalletActionConfig struct {
	Action         WorkflowAction  `json:"action"` // Type discriminator - automatically set to "create_wallet"
	Currency       string          `json:"currency" binding:"required"`
	ConversionRate decimal.Decimal `json:"conversion_rate" default:"1"`
}

CreateWalletActionConfig represents configuration for creating a wallet action

func (*CreateWalletActionConfig) GetAction added in v1.0.47

func (*CreateWalletActionConfig) ToDTO added in v1.0.47

func (c *CreateWalletActionConfig) ToDTO(params interface{}) (interface{}, error)

ToDTO converts the action config directly to CreateWalletRequest DTO

func (*CreateWalletActionConfig) Validate added in v1.0.47

func (c *CreateWalletActionConfig) Validate() error

type CreateWalletActivityInput added in v1.0.47

type CreateWalletActivityInput struct {
	CustomerID    string                    `json:"customer_id" validate:"required"`
	TenantID      string                    `json:"tenant_id" validate:"required"`
	EnvironmentID string                    `json:"environment_id" validate:"required"`
	UserID        string                    `json:"user_id,omitempty"`
	WalletConfig  *CreateWalletActionConfig `json:"wallet_config" validate:"required"`
}

CreateWalletActivityInput represents the input for the create wallet activity

func (*CreateWalletActivityInput) Validate added in v1.0.47

func (c *CreateWalletActivityInput) Validate() error

Validate validates the create wallet activity input

type CreateWalletActivityResult added in v1.0.47

type CreateWalletActivityResult struct {
	WalletID       string             `json:"wallet_id"`
	CustomerID     string             `json:"customer_id"`
	Currency       string             `json:"currency"`
	ConversionRate string             `json:"conversion_rate"`
	WalletType     types.WalletType   `json:"wallet_type"`
	Status         types.WalletStatus `json:"status"`
}

CreateWalletActivityResult represents the result of the create wallet activity

type CustomerOnboardingActionResult added in v1.0.47

type CustomerOnboardingActionResult struct {
	ActionType   WorkflowAction       `json:"action_type"`
	ActionIndex  int                  `json:"action_index"`
	Status       WorkflowStatus       `json:"status"`
	ResourceID   string               `json:"resource_id,omitempty"`
	ResourceType WorkflowResourceType `json:"resource_type,omitempty"`
	Error        *string              `json:"error,omitempty"`
}

CustomerOnboardingActionResult represents the result of a single action in the workflow

type CustomerOnboardingWorkflowInput added in v1.0.47

type CustomerOnboardingWorkflowInput struct {
	CustomerID         string         `json:"customer_id,omitempty"`          // Optional - provided when customer exists
	ExternalCustomerID string         `json:"external_customer_id,omitempty"` // Optional - used for auto-creation
	EventTimestamp     *time.Time     `json:"event_timestamp,omitempty"`      // Optional - timestamp of the triggering event
	TenantID           string         `json:"tenant_id" validate:"required"`
	EnvironmentID      string         `json:"environment_id" validate:"required"`
	UserID             string         `json:"user_id,omitempty"`
	WorkflowConfig     WorkflowConfig `json:"workflow_config" validate:"required"`
}

CustomerOnboardingWorkflowInput represents the input for the customer onboarding workflow

func (*CustomerOnboardingWorkflowInput) Validate added in v1.0.47

func (c *CustomerOnboardingWorkflowInput) Validate() error

Validate validates the customer onboarding workflow input

type CustomerOnboardingWorkflowResult added in v1.0.47

type CustomerOnboardingWorkflowResult struct {
	CustomerID      string                           `json:"customer_id"`
	Status          WorkflowStatus                   `json:"status"`
	CompletedAt     time.Time                        `json:"completed_at"`
	ActionsExecuted int                              `json:"actions_executed"`
	Results         []CustomerOnboardingActionResult `json:"results"`
	ErrorSummary    *string                          `json:"error_summary,omitempty"`
}

CustomerOnboardingWorkflowResult represents the result of the customer onboarding workflow

type EnqueueSubscriptionWorkflowsInput added in v1.0.49

type EnqueueSubscriptionWorkflowsInput struct {
	SubscriptionIDs []string `json:"subscription_ids"`
	TenantID        string   `json:"tenant_id"`
	EnvironmentID   string   `json:"environment_id"`
}

EnqueueSubscriptionWorkflowsInput represents the input for enqueueing subscription workflows

func (*EnqueueSubscriptionWorkflowsInput) Validate added in v1.0.49

Validate validates the enqueue subscription workflows input

type FetchSubscriptionBatchInput added in v1.0.49

type FetchSubscriptionBatchInput struct {
	TenantID      string `json:"tenant_id"`
	EnvironmentID string `json:"environment_id"`
	BatchSize     int    `json:"batch_size"`
	Offset        int    `json:"offset"`
}

FetchSubscriptionBatchInput represents the input for fetching subscription batch

func (*FetchSubscriptionBatchInput) Validate added in v1.0.49

func (i *FetchSubscriptionBatchInput) Validate() error

Validate validates the fetch subscription batch input

type FetchSubscriptionBatchOutput added in v1.0.49

type FetchSubscriptionBatchOutput struct {
	SubscriptionIDs []string `json:"subscription_ids"`
}

FetchSubscriptionBatchOutput represents the output for fetching subscription batch

type HubSpotDealSyncWorkflowInput added in v1.0.34

type HubSpotDealSyncWorkflowInput struct {
	SubscriptionID string `json:"subscription_id"`
	CustomerID     string `json:"customer_id"`
	DealID         string `json:"deal_id"`
	TenantID       string `json:"tenant_id"`
	EnvironmentID  string `json:"environment_id"`
}

HubSpotDealSyncWorkflowInput contains the input for the HubSpot deal sync workflow

func (*HubSpotDealSyncWorkflowInput) Validate added in v1.0.34

func (input *HubSpotDealSyncWorkflowInput) Validate() error

Validate validates the workflow input

type HubSpotInvoiceSyncWorkflowInput added in v1.0.35

type HubSpotInvoiceSyncWorkflowInput struct {
	InvoiceID     string `json:"invoice_id"`
	CustomerID    string `json:"customer_id"`
	TenantID      string `json:"tenant_id"`
	EnvironmentID string `json:"environment_id"`
}

HubSpotInvoiceSyncWorkflowInput contains the input for the HubSpot invoice sync workflow

func (*HubSpotInvoiceSyncWorkflowInput) Validate added in v1.0.35

func (input *HubSpotInvoiceSyncWorkflowInput) Validate() error

Validate validates the workflow input

type HubSpotQuoteSyncWorkflowInput added in v1.0.42

type HubSpotQuoteSyncWorkflowInput struct {
	SubscriptionID string `json:"subscription_id"`
	CustomerID     string `json:"customer_id"`
	DealID         string `json:"deal_id"`
	TenantID       string `json:"tenant_id"`
	EnvironmentID  string `json:"environment_id"`
}

HubSpotQuoteSyncWorkflowInput contains the input for the HubSpot quote sync workflow

func (*HubSpotQuoteSyncWorkflowInput) Validate added in v1.0.42

func (input *HubSpotQuoteSyncWorkflowInput) Validate() error

Validate validates the workflow input

type NomodInvoiceSyncWorkflowInput added in v1.0.47

type NomodInvoiceSyncWorkflowInput struct {
	InvoiceID     string `json:"invoice_id"`
	CustomerID    string `json:"customer_id"`
	TenantID      string `json:"tenant_id"`
	EnvironmentID string `json:"environment_id"`
}

NomodInvoiceSyncWorkflowInput contains the input for the Nomod invoice sync workflow

func (*NomodInvoiceSyncWorkflowInput) Validate added in v1.0.47

func (input *NomodInvoiceSyncWorkflowInput) Validate() error

Validate validates the workflow input

type PriceSyncWorkflowInput added in v1.0.23

type PriceSyncWorkflowInput struct {
	PlanID        string `json:"plan_id"`
	TenantID      string `json:"tenant_id"`
	EnvironmentID string `json:"environment_id"`
	UserID        string `json:"user_id"`
}

PriceSyncWorkflowInput represents input for the price sync workflow

func (*PriceSyncWorkflowInput) Validate added in v1.0.25

func (p *PriceSyncWorkflowInput) Validate() error

type ProcessFileChunkActivityInput added in v1.0.27

type ProcessFileChunkActivityInput struct {
	TaskID        string     `json:"task_id"`
	ChunkData     [][]string `json:"chunk_data"`
	ChunkIndex    int        `json:"chunk_index"`
	TotalChunks   int        `json:"total_chunks"`
	Headers       []string   `json:"headers"`
	EntityType    string     `json:"entity_type"`
	TenantID      string     `json:"tenant_id"`
	EnvironmentID string     `json:"environment_id"`
}

ProcessFileChunkActivityInput represents the input for processing a file chunk

func (*ProcessFileChunkActivityInput) Validate added in v1.0.27

func (i *ProcessFileChunkActivityInput) Validate() error

Validate validates the process file chunk activity input

type ProcessFileChunkActivityResult added in v1.0.27

type ProcessFileChunkActivityResult struct {
	ChunkIndex        int     `json:"chunk_index"`
	ProcessedRecords  int     `json:"processed_records"`
	SuccessfulRecords int     `json:"successful_records"`
	FailedRecords     int     `json:"failed_records"`
	ErrorSummary      *string `json:"error_summary,omitempty"`
}

ProcessFileChunkActivityResult represents the result of processing a file chunk

type ProcessSingleSubscriptionWorkflowInput added in v1.0.49

type ProcessSingleSubscriptionWorkflowInput struct {
	SubscriptionID string `json:"subscription_id"`
	TenantID       string `json:"tenant_id"`
	EnvironmentID  string `json:"environment_id"`
}

ProcessSingleSubscriptionWorkflowInput represents the input for processing a single subscription

func (*ProcessSingleSubscriptionWorkflowInput) Validate added in v1.0.49

Validate validates the process single subscription workflow input

type ProcessSingleSubscriptionWorkflowResult added in v1.0.49

type ProcessSingleSubscriptionWorkflowResult struct {
	SubscriptionID          string    `json:"subscription_id"`
	Status                  string    `json:"status"`
	BillingPeriodsProcessed int       `json:"billing_periods_processed"`
	InvoicesCreated         []string  `json:"invoices_created"`
	ErrorSummary            *string   `json:"error_summary,omitempty"`
	CompletedAt             time.Time `json:"completed_at"`
}

ProcessSingleSubscriptionWorkflowResult represents the result of processing a single subscription

type ProcessTaskActivityInput added in v1.0.27

type ProcessTaskActivityInput struct {
	TaskID        string `json:"task_id"`
	TenantID      string `json:"tenant_id"`
	EnvironmentID string `json:"environment_id"`
}

ProcessTaskActivityInput represents the input for process task activity

func (*ProcessTaskActivityInput) Validate added in v1.0.27

func (i *ProcessTaskActivityInput) Validate() error

Validate validates the process task activity input

type ProcessTaskActivityResult added in v1.0.27

type ProcessTaskActivityResult struct {
	TaskID            string                 `json:"task_id"`
	ProcessedRecords  int                    `json:"processed_records"`
	SuccessfulRecords int                    `json:"successful_records"`
	FailedRecords     int                    `json:"failed_records"`
	ErrorSummary      *string                `json:"error_summary,omitempty"`
	Metadata          map[string]interface{} `json:"metadata,omitempty"`
}

ProcessTaskActivityResult represents the result of process task activity

type QuickBooksPriceSyncWorkflowInput added in v1.0.47

type QuickBooksPriceSyncWorkflowInput struct {
	PriceID       string `json:"price_id"`
	PlanID        string `json:"plan_id"`
	TenantID      string `json:"tenant_id"`
	EnvironmentID string `json:"environment_id"`
	UserID        string `json:"user_id"`
}

QuickBooksPriceSyncWorkflowInput represents input for the QuickBooks price sync workflow

func (*QuickBooksPriceSyncWorkflowInput) Validate added in v1.0.47

type ScheduleHandle added in v1.0.32

type ScheduleHandle interface {
	// Pause pauses the schedule
	Pause(ctx context.Context, options client.SchedulePauseOptions) error
	// Unpause unpauses the schedule
	Unpause(ctx context.Context, options client.ScheduleUnpauseOptions) error
	// Delete deletes the schedule
	Delete(ctx context.Context) error
	// Describe gets schedule information
	Describe(ctx context.Context) (*client.ScheduleDescription, error)
	// Update updates the schedule
	Update(ctx context.Context, options client.ScheduleUpdateOptions) error
}

ScheduleHandle represents a handle to a Temporal schedule

func NewScheduleHandle added in v1.0.32

func NewScheduleHandle(handle client.ScheduleHandle) ScheduleHandle

NewScheduleHandle creates a new schedule handle wrapper

type StartWorkflowOptions added in v1.0.27

type StartWorkflowOptions struct {
	// ID is the workflow ID
	ID string
	// TaskQueue is the task queue name
	TaskQueue string
	// WorkflowExecutionTimeout is the timeout for the entire workflow execution
	WorkflowExecutionTimeout time.Duration
	// WorkflowRunTimeout is the timeout for a single workflow run
	WorkflowRunTimeout time.Duration
	// WorkflowTaskTimeout is the timeout for workflow task processing
	WorkflowTaskTimeout time.Duration
}

StartWorkflowOptions represents options for starting a workflow

func (*StartWorkflowOptions) ToSDKOptions added in v1.0.27

ToSDKOptions converts StartWorkflowOptions to Temporal SDK client.StartWorkflowOptions

type SubscriptionSchedulerWorkflowInput added in v1.0.49

type SubscriptionSchedulerWorkflowInput struct {
	BatchSize int `json:"batch_size"`
}

SubscriptionSchedulerWorkflowInput represents the input for the subscription scheduler workflow

func (*SubscriptionSchedulerWorkflowInput) Validate added in v1.0.49

Validate validates the subscription scheduler workflow input

type SyncToExternalVendorActivityInput added in v1.0.49

type SyncToExternalVendorActivityInput struct {
	InvoiceID      string `json:"invoice_id"`
	SubscriptionID string `json:"subscription_id"`
	TenantID       string `json:"tenant_id"`
	EnvironmentID  string `json:"environment_id"`
}

SyncToExternalVendorActivityInput represents the input for syncing invoice to external vendors

func (*SyncToExternalVendorActivityInput) Validate added in v1.0.49

Validate validates the sync to external vendor activity input

type TaskProcessingWorkflowInput added in v1.0.27

type TaskProcessingWorkflowInput struct {
	TaskID        string `json:"task_id"`
	TenantID      string `json:"tenant_id"`
	EnvironmentID string `json:"environment_id"`
	UserID        string `json:"user_id"`
}

TaskProcessingWorkflowInput represents the input for task processing workflow

func (*TaskProcessingWorkflowInput) Validate added in v1.0.27

func (i *TaskProcessingWorkflowInput) Validate() error

Validate validates the task processing workflow input

type TaskProcessingWorkflowResult added in v1.0.27

type TaskProcessingWorkflowResult struct {
	TaskID            string                 `json:"task_id"`
	Status            string                 `json:"status"`
	ProcessedRecords  int                    `json:"processed_records"`
	SuccessfulRecords int                    `json:"successful_records"`
	FailedRecords     int                    `json:"failed_records"`
	ErrorSummary      *string                `json:"error_summary,omitempty"`
	CompletedAt       time.Time              `json:"completed_at"`
	Metadata          map[string]interface{} `json:"metadata,omitempty"`
}

TaskProcessingWorkflowResult represents the result of task processing workflow

type TemporalWorkflowResult added in v1.0.25

type TemporalWorkflowResult struct {
	Message    string `json:"message"`
	WorkflowID string `json:"workflow_id"`
	RunID      string `json:"run_id"`
}

TemporalWorkflowResult represents the result of starting a Temporal workflow

type UpdateSubscriptionPeriodActivityInput added in v1.0.49

type UpdateSubscriptionPeriodActivityInput struct {
	SubscriptionID string `json:"subscription_id"`
	TenantID       string `json:"tenant_id"`
	EnvironmentID  string `json:"environment_id"`
}

UpdateSubscriptionPeriodActivityInput represents the input for updating subscription period

func (*UpdateSubscriptionPeriodActivityInput) Validate added in v1.0.49

Validate validates the update subscription period activity input

type UpdateTaskProgressActivityInput added in v1.0.27

type UpdateTaskProgressActivityInput struct {
	TaskID            string  `json:"task_id"`
	ProcessedRecords  int     `json:"processed_records"`
	SuccessfulRecords int     `json:"successful_records"`
	FailedRecords     int     `json:"failed_records"`
	ErrorSummary      *string `json:"error_summary,omitempty"`
}

UpdateTaskProgressActivityInput represents the input for update task progress activity

func (*UpdateTaskProgressActivityInput) Validate added in v1.0.27

func (i *UpdateTaskProgressActivityInput) Validate() error

Validate validates the update task progress activity input

type WorkerOptions added in v1.0.27

type WorkerOptions struct {
	// TaskQueue is the name of the task queue to listen on
	TaskQueue string
	// MaxConcurrentActivityExecutionSize is the maximum number of activities that can be executed concurrently
	MaxConcurrentActivityExecutionSize int
	// MaxConcurrentWorkflowTaskExecutionSize is the maximum number of workflow tasks that can be executed concurrently
	MaxConcurrentWorkflowTaskExecutionSize int
	// WorkerStopTimeout is the time to wait for worker to stop gracefully
	WorkerStopTimeout time.Duration
	// EnableLoggingInReplay enables logging in replay mode
	EnableLoggingInReplay bool
	// Interceptors is a list of interceptors to apply to the worker
	Interceptors []interceptor.WorkerInterceptor
}

WorkerOptions represents configuration options for creating a Temporal worker

func DefaultWorkerOptions added in v1.0.27

func DefaultWorkerOptions() *WorkerOptions

DefaultWorkerOptions returns the default worker options

func (*WorkerOptions) ToSDKOptions added in v1.0.27

func (o *WorkerOptions) ToSDKOptions() worker.Options

ToSDKOptions converts WorkerOptions to Temporal SDK worker.Options

type WorkflowAction added in v1.0.47

type WorkflowAction string
const (
	WorkflowActionCreateCustomer     WorkflowAction = "create_customer"
	WorkflowActionCreateSubscription WorkflowAction = "create_subscription"
	WorkflowActionCreateWallet       WorkflowAction = "create_wallet"
)

type WorkflowActionConfig added in v1.0.47

type WorkflowActionConfig interface {
	Validate() error
	GetAction() WorkflowAction
	// Convert to DTO using flexible parameters - implementations can type assert what they need
	ToDTO(params interface{}) (interface{}, error)
}

WorkflowActionConfig is an interface for workflow action configurations

type WorkflowActionParams added in v1.0.47

type WorkflowActionParams struct {
	CustomerID     string
	Currency       string
	EventTimestamp *time.Time // Optional - timestamp of the triggering event for subscription start date
	DefaultUserID  *string    // Optional - user_id from config for created_by/updated_by fields

}

WorkflowActionParams contains common parameters that actions might need

type WorkflowConfig added in v1.0.47

type WorkflowConfig struct {
	WorkflowType WorkflowType           `json:"workflow_type" binding:"required"`
	Actions      []WorkflowActionConfig `json:"actions" binding:"required"`
}

WorkflowConfig represents a workflow configuration

func (*WorkflowConfig) MarshalJSON added in v1.0.47

func (c *WorkflowConfig) MarshalJSON() ([]byte, error)

MarshalJSON implements custom JSON marshaling to include action type discriminator

func (*WorkflowConfig) UnmarshalJSON added in v1.0.47

func (c *WorkflowConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON implements custom JSON unmarshaling to handle interface types

func (WorkflowConfig) Validate added in v1.0.47

func (c WorkflowConfig) Validate() error

type WorkflowResourceType added in v1.0.49

type WorkflowResourceType string

WorkflowResourceType represents the type of resource created by a workflow action

const (
	WorkflowResourceTypeCustomer     WorkflowResourceType = "customer"
	WorkflowResourceTypeWallet       WorkflowResourceType = "wallet"
	WorkflowResourceTypeSubscription WorkflowResourceType = "subscription"
)

type WorkflowRun added in v1.0.27

type WorkflowRun interface {
	// GetID returns the workflow ID
	GetID() string
	// GetRunID returns the workflow run ID
	GetRunID() string
	// Get blocks until the workflow completes and returns the result
	Get(ctx context.Context, valuePtr interface{}) error
}

WorkflowRun represents a running workflow

func NewWorkflowRun added in v1.0.27

func NewWorkflowRun(run client.WorkflowRun) WorkflowRun

NewWorkflowRun creates a new workflow run wrapper

type WorkflowStatus added in v1.0.49

type WorkflowStatus string

WorkflowStatus represents the status of a workflow execution

const (
	WorkflowStatusCompleted WorkflowStatus = "completed"
	WorkflowStatusFailed    WorkflowStatus = "failed"
)

type WorkflowType added in v1.0.47

type WorkflowType string

Workflow types and actions - domain models

const (
	WorkflowTypeCustomerOnboarding WorkflowType = "customer_onboarding"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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