Skip to main content
Represents a feature in the Stigg system. Features are the building blocks of entitlements and define capabilities that can be granted to customers through plans and addons.

Type Definition

type Feature {
  id: UUID!
  refId: String!
  displayName: String!
  description: String
  featureType: FeatureType!
  featureStatus: FeatureStatus!

  # Units (for numeric features)
  featureUnits: String
  featureUnitsPlural: String

  # Metering
  hasMeter: Boolean
  meter: Meter
  meterType: MeterType

  # Enum configuration
  enumConfiguration: [EnumConfigurationEntity!]
  usedEnumValues: [String!]

  # Unit transformation
  unitTransformation: UnitTransformation

  # Usage
  hasEntitlements: Boolean

  # Metadata
  additionalMetaData: JSON

  # Timestamps
  createdAt: DateTime
  updatedAt: DateTime!
  environmentId: UUID!
  environment: Environment
  account: Account
}

Fields

Core Fields

FieldTypeDescription
idUUID!Unique identifier for the feature
refIdString!Your application’s unique identifier for this feature
displayNameString!Display name shown in UI
descriptionStringFeature description
featureTypeFeatureType!Type of feature (BOOLEAN, NUMBER, ENUM)
featureStatusFeatureStatus!Status of the feature

Units (Numeric Features)

FieldTypeDescription
featureUnitsStringSingular unit name (e.g., “seat”, “API call”)
featureUnitsPluralStringPlural unit name (e.g., “seats”, “API calls”)

Metering

FieldTypeDescription
hasMeterBooleanWhether this feature has a meter for usage tracking
meterMeterThe meter configuration
meterTypeMeterTypeType of metering

Enum Configuration

FieldTypeDescription
enumConfiguration[EnumConfigurationEntity!]Configuration for enum-type features
usedEnumValues[String!]Enum values currently used by plans or addons

Unit Transformation

FieldTypeDescription
unitTransformationUnitTransformationTransformation to apply to reported usage

FeatureType Enum

ValueDescription
BOOLEANFeature is either enabled or disabled
NUMBERFeature has a numeric limit or quantity
ENUMFeature has a set of possible values

FeatureStatus Enum

ValueDescription
ACTIVEFeature is active and can be used
INACTIVEFeature is not active

MeterType Enum

ValueDescription
FLUCTUATINGValue can go up and down
INCREMENTALValue only increases
NONENo metering

Example Response

Boolean Feature

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "refId": "feature-sso",
  "displayName": "Single Sign-On",
  "description": "Enable SSO authentication",
  "featureType": "BOOLEAN",
  "featureStatus": "ACTIVE",
  "hasMeter": false,
  "hasEntitlements": true,
  "createdAt": "2024-01-10T10:00:00Z",
  "updatedAt": "2024-01-15T15:30:00Z"
}

Numeric Feature (Metered)

{
  "id": "550e8400-e29b-41d4-a716-446655440001",
  "refId": "feature-api-calls",
  "displayName": "API Calls",
  "description": "Number of API calls per month",
  "featureType": "NUMBER",
  "featureStatus": "ACTIVE",
  "featureUnits": "call",
  "featureUnitsPlural": "calls",
  "hasMeter": true,
  "meterType": "INCREMENTAL",
  "meter": {
    "id": "meter-123",
    "aggregation": "SUM"
  },
  "hasEntitlements": true,
  "createdAt": "2024-01-10T10:00:00Z",
  "updatedAt": "2024-01-15T15:30:00Z"
}

Enum Feature

{
  "id": "550e8400-e29b-41d4-a716-446655440002",
  "refId": "feature-support-level",
  "displayName": "Support Level",
  "description": "Level of customer support",
  "featureType": "ENUM",
  "featureStatus": "ACTIVE",
  "enumConfiguration": [
    { "value": "basic", "displayName": "Basic Support" },
    { "value": "priority", "displayName": "Priority Support" },
    { "value": "dedicated", "displayName": "Dedicated Support" }
  ],
  "usedEnumValues": ["basic", "priority"],
  "hasEntitlements": true,
  "createdAt": "2024-01-10T10:00:00Z",
  "updatedAt": "2024-01-15T15:30:00Z"
}