# Global

##

### Members

#### (constant) AZURE_PRICING

Description:
  - Azure pricing table (loaded from JSON)
Source:
  - cost-calculator.js, line 139
Deprecated:
  - Use loadAzurePricing() for custom pricing paths

Azure pricing table (loaded from JSON)

### Methods

#### addAgent(featureName, agentId) → {boolean}

Description:
  - Add agent to feature
Source:
  - state-manager.js, line 262

##### Parameters:

Name | Type | Description
--- | --- | ---
`featureName` | string | Feature name
`agentId` | string | Agent ID

##### Returns:

True if added, false if already exists

Type
  boolean

#### addCheckpoint(featureName, note) → {Object}

Description:
  - Add checkpoint to feature
Source:
  - state-manager.js, line 237

##### Parameters:

Name | Type | Description
--- | --- | ---
`featureName` | string | Feature name
`note` | string | Checkpoint note

##### Returns:

Checkpoint object

Type
  Object

#### calculateBicepCost(bicepFiles, options) → {Object}

Description:
  - Calculate costs from Bicep file(s) - Main entry point
Source:
  - cost-calculator.js, line 410

##### Parameters:

Name | Type | Description
--- | --- | ---
`bicepFiles` | string | Array | Bicep file path(s) or glob pattern(s)
`options` | Object | Options ###### Properties
Name | Type | Description
--- | --- | ---
`configPath` | string | Optional custom config path

##### Returns:

Complete cost calculation result

Type
  Object

#### calculateResourceCost(resource) → {Object}

Description:
  - Calculate cost of a single resource
Source:
  - cost-calculator.js, line 311

##### Parameters:

Name | Type | Description
--- | --- | ---
`resource` | Object | Resource object with type, sku, minReplicas

##### Returns:

Cost result with cost, warning, estimated, details

Type
  Object

#### calculateTotalCosts(resources, costConfig) → {Object}

Description:
  - Calculate total costs of all resources
Source:
  - cost-calculator.js, line 358

##### Parameters:

Name | Type | Description
--- | --- | ---
`resources` | Array | Array of resource objects
`costConfig` | Object | Cost configuration

##### Returns:

Cost calculation result

Type
  Object

#### ensureFeature(featureName) → {Object}

Description:
  - Create or get feature with default structure
Source:
  - state-manager.js, line 132

##### Parameters:

Name | Type | Description
--- | --- | ---
`featureName` | string | Feature name

##### Returns:

Feature object

Type
  Object

#### generateCSS(colors, typography, spacing) → {string}

Description:
  - Generate CSS variables file
Source:
  - design-system-generator.js, line 136

##### Parameters:

Name | Type | Description
--- | --- | ---
`colors` | Object | Colors object
`typography` | Object | Typography object
`spacing` | Object | Spacing object

##### Returns:

CSS content

Type
  string

#### generateDesignSystem(designSystemPath, options) → {Object}

Description:
  - Generate all design system files
Source:
  - design-system-generator.js, line 271

##### Parameters:

Name | Type | Description
--- | --- | ---
`designSystemPath` | string | Path to ui-design-system.md
`options` | Object | Generation options ###### Properties
Name | Type | Description
--- | --- | ---
`mode` | string | Generation mode: 'fluent', 'mud', or 'both'
`namespace` | string | C# namespace

##### Returns:

Generated files content

Type
  Object

#### generateFluentTheme(colors, typography, namespace) → {string}

Description:
  - Generate Fluent UI theme (C#)
Source:
  - design-system-generator.js, line 209

##### Parameters:

Name | Type | Description
--- | --- | ---
`colors` | Object | Colors object
`typography` | Object | Typography object
`namespace` | string | C# namespace (default: YourProject.Themes)

##### Returns:

C# code

Type
  string

#### generateMudTheme(colors, typography, namespace) → {string}

Description:
  - Generate MudBlazor theme (C#)
Source:
  - design-system-generator.js, line 237

##### Parameters:

Name | Type | Description
--- | --- | ---
`colors` | Object | Colors object
`typography` | Object | Typography object
`namespace` | string | C# namespace (default: YourProject.Themes)

##### Returns:

C# code

Type
  string

#### getFeature(featureName) → {Object|null}

Description:
  - Get feature from state
Source:
  - state-manager.js, line 122

##### Parameters:

Name | Type | Description
--- | --- | ---
`featureName` | string | Feature name

##### Returns:

Feature object or null

Type
  Object | null

#### getStatePath()

Description:
  - Get the state file path (looks in current working directory)
Source:
  - state-manager.js, line 20

#### getSummary() → {Object}

Description:
  - Get project summary
Source:
  - state-manager.js, line 332

##### Returns:

Summary with metadata

Type
  Object

#### initState(options) → {Object}

Description:
  - Initialize new state file
Source:
  - state-manager.js, line 84

##### Parameters:

Name | Type | Description
--- | --- | ---
`options` | Object | Options ###### Properties
Name | Type | Description
--- | --- | ---
`force` | boolean | Overwrite existing file
`projectName` | string | Project name
`projectType` | string | Project type (e.g., 'blazor-server')

##### Returns:

Initial state

Type
  Object

#### listFeatures() → {Array}

Description:
  - List all features
Source:
  - state-manager.js, line 323

##### Returns:

Array of [featureName, featureObject] tuples

Type
  Array

#### loadAzurePricing(pricingPath) → {Object}

Description:
  - Load Azure pricing from JSON file
Source:
  - cost-calculator.js, line 25

##### Parameters:

Name | Type | Description
--- | --- | ---
`pricingPath` | string | Optional custom pricing file path

##### Returns:

Pricing table

Type
  Object

#### loadCostConfig(configPath) → {Object}

Description:
  - Load cost configuration from config.json
Source:
  - cost-calculator.js, line 160

##### Parameters:

Name | Type | Description
--- | --- | ---
`configPath` | string | Optional custom config path

##### Returns:

Cost configuration

Type
  Object

#### loadState(throwOnError) → {Object|null}

Description:
  - Load state from disk
Source:
  - state-manager.js, line 36

##### Parameters:

Name | Type | Description
--- | --- | ---
`throwOnError` | boolean | If false, returns null instead of throwing

##### Returns:

State object or null

Type
  Object | null

#### markOutput(featureName, outputType)

Description:
  - Mark output as created
Source:
  - state-manager.js, line 305

##### Parameters:

Name | Type | Description
--- | --- | ---
`featureName` | string | Feature name
`outputType` | string | Output type (proposal, spec, contracts, etc.)

#### parseBicepFile(filePath) → {Array}

Description:
  - Parse Bicep file and extract resources with SKUs
Source:
  - cost-calculator.js, line 212

##### Parameters:

Name | Type | Description
--- | --- | ---
`filePath` | string | Path to Bicep file

##### Returns:

Array of resource objects

Type
  Array

#### parseBicepFiles(patterns) → {Array}

Description:
  - Parse multiple Bicep files (supports glob patterns)
Source:
  - cost-calculator.js, line 278

##### Parameters:

Name | Type | Description
--- | --- | ---
`patterns` | string | Array | File path(s) or glob pattern(s)

##### Returns:

Array of all resources

Type
  Array

#### parseColors(markdown) → {Object}

Description:
  - Parse colors from markdown
Source:
  - design-system-generator.js, line 23

##### Parameters:

Name | Type | Description
--- | --- | ---
`markdown` | string | Markdown content

##### Returns:

Colors object with primary, secondary, neutral, semantic

Type
  Object

#### parseDesignSystem(markdownPath) → {Object}

Description:
  - Parse all design system properties from markdown
Source:
  - design-system-generator.js, line 111

##### Parameters:

Name | Type | Description
--- | --- | ---
`markdownPath` | string | Path to ui-design-system.md file

##### Returns:

Parsed design system with colors, typography, spacing

Type
  Object

#### parseSpacing(markdown) → {Object}

Description:
  - Parse spacing from markdown
Source:
  - design-system-generator.js, line 89

##### Parameters:

Name | Type | Description
--- | --- | ---
`markdown` | string | Markdown content

##### Returns:

Spacing object with spacing values

Type
  Object

#### parseTypography(markdown) → {Object}

Description:
  - Parse typography from markdown
Source:
  - design-system-generator.js, line 57

##### Parameters:

Name | Type | Description
--- | --- | ---
`markdown` | string | Markdown content

##### Returns:

Typography object with fontFamily, fontSize, fontWeight, lineHeight

Type
  Object

#### removeAgent(featureName, agentId) → {boolean}

Description:
  - Remove agent from feature
Source:
  - state-manager.js, line 282

##### Parameters:

Name | Type | Description
--- | --- | ---
`featureName` | string | Feature name
`agentId` | string | Agent ID

##### Returns:

True if removed, false if not found

Type
  boolean

#### saveState(state)

Description:
  - Save state to disk
Source:
  - state-manager.js, line 61

##### Parameters:

Name | Type | Description
--- | --- | ---
`state` | Object | State object to save

#### stateExists()

Description:
  - Check if state file exists
Source:
  - state-manager.js, line 27

#### updateFeature(featureName, key, value)

Description:
  - Update feature property (supports nested keys like "tasks.completed")
Source:
  - state-manager.js, line 182

##### Parameters:

Name | Type | Description
--- | --- | ---
`featureName` | string | Feature name
`key` | string | Property key (supports dot notation)
`value` | any | Value to set

#### updateFeatureMultiple(featureName, updates)

Description:
  - Update multiple feature properties at once
Source:
  - state-manager.js, line 208

##### Parameters:

Name | Type | Description
--- | --- | ---
`featureName` | string | Feature name
`updates` | Object | Object with key-value pairs to update