All files / proxy/utils/customer-variables types.ts

100% Statements 7/7
100% Branches 2/2
100% Functions 1/1
100% Lines 7/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2312x 12x 12x 12x 12x 12x     12x                            
export enum CustomerVariableType {
  GetResultPath = 'fpjs_get_result_path',
  PreSharedSecret = 'fpjs_pre_shared_secret',
  AgentDownloadPath = 'fpjs_agent_download_path',
  FpCdnUrl = 'fpjs_cdn_url',
  FpIngressBaseHost = 'fpjs_ingress_base_host',
}
 
export const internalVariables: Set<CustomerVariableType> = new Set<CustomerVariableType>([
  CustomerVariableType.FpCdnUrl,
  CustomerVariableType.FpIngressBaseHost,
])
 
export type CustomerVariableValue = string | null | undefined
 
export type CustomerVariablesRecord = Record<CustomerVariableType, CustomerVariableValue>
 
export interface CustomerVariableProvider {
  readonly name: string
 
  getVariable: (variable: CustomerVariableType) => Promise<CustomerVariableValue>
}