{"version":3,"file":"remote-feature-flag-controller-types.cjs","sourceRoot":"","sources":["../src/remote-feature-flag-controller-types.ts"],"names":[],"mappings":";;;AAGA,mEAAmE;AACnE,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,qCAAuB,CAAA;IACvB,+BAAiB,CAAA;AACnB,CAAC,EAHW,UAAU,0BAAV,UAAU,QAGrB;AAED,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,iCAAa,CAAA;IACb,mCAAe,CAAA;AACjB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAED,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,0CAAuB,CAAA;IACvB,sCAAmB,CAAA;AACrB,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B","sourcesContent":["import type { ControllerGetStateAction } from '@metamask/base-controller';\nimport type { Json } from '@metamask/utils';\n\n// Define accepted values for client, distribution, and environment\nexport enum ClientType {\n  Extension = 'extension',\n  Mobile = 'mobile',\n}\n\nexport enum DistributionType {\n  Main = 'main',\n  Flask = 'flask',\n}\n\nexport enum EnvironmentType {\n  Production = 'prod',\n  ReleaseCandidate = 'rc',\n  Development = 'dev',\n}\n\n/** Type representing the feature flags collection */\nexport type FeatureFlags = {\n  [key: string]: Json;\n};\n\nexport type ApiDataResponse = FeatureFlags[];\n\nexport type ServiceResponse = {\n  remoteFeatureFlags: FeatureFlags;\n  cacheTimestamp: number | null;\n};\n\n/**\n * Describes the shape of the state object for the {@link RemoteFeatureFlagController}.\n */\nexport type RemoteFeatureFlagControllerState = {\n  /**\n   * The collection of feature flags and their respective values, which can be objects.\n   */\n  remoteFeatureFlags: FeatureFlags;\n  /**\n   * The timestamp of the last successful feature flag cache.\n   */\n  cacheTimestamp: number;\n};\n\n/**\n * The action to retrieve the state of the {@link RemoteFeatureFlagController}.\n */\nexport type RemoteFeatureFlagControllerGetStateAction =\n  ControllerGetStateAction<\n    'RemoteFeatureFlagController',\n    RemoteFeatureFlagControllerState\n  >;\n"]}