File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {
1111} from "../../helpers/errors.ts" ;
1212import { ContractList } from "./ContractDisplay.tsx" ;
1313import type { ActiveContract , Contract } from "./types.ts" ;
14+ import type { ContractState } from "./utils.ts" ;
1415
1516export function registerContracts ( program : Command ) {
1617 program
@@ -67,10 +68,8 @@ async function listContracts(
6768
6869 const api = await apiClient ( ) ;
6970
70- const state = showAll
71- ? "all"
72- : ( stateFilter ?. toLowerCase ( ) as "expired" | "active" | "upcoming" ) ||
73- undefined ;
71+ const state = showAll ? "All" : ( stateFilter as ContractState ) ||
72+ undefined ;
7473
7574 const { data, error, response } = await api . GET ( "/v0/contracts" , {
7675 params : {
Original file line number Diff line number Diff line change @@ -3518,7 +3518,7 @@ export interface operations {
35183518 active_within_interval_start ?: string ;
35193519 active_within_interval_end ?: string ;
35203520 instance_type ?: string ;
3521- state ?: "all " | "active " | "upcoming " | "expired " ;
3521+ state ?: "All " | "Active " | "Upcoming " | "Expired " ;
35223522 } ;
35233523 header ?: {
35243524 /** @description Generate a bearer token with `$ sf tokens create`. */
You can’t perform that action at this time.
0 commit comments