Files
explore/lib/api/services/tac-operation-lifecycle.ts
zeekay da79f9e711 feat: rename @blockscout to @luxfi, monochrome theme, horizontal blocks
- Rename all @blockscout/* npm packages to @luxfi/* aliases (150+ files)
- Override blue accent colors to gray for monochrome theme
- Fix dropdown/menu/popover fonts to use Geist Sans
- Change Latest Blocks to horizontal scrolling layout
- Show dashes instead of zeros for validator stats on error
- Fix GHA deploy step to use correct deployment name
2026-03-02 12:28:15 -08:00

39 lines
1.3 KiB
TypeScript

import type { ApiResource } from '../types';
import type * as tac from '@luxfi/tac-operation-lifecycle-types';
export const TAC_OPERATION_LIFECYCLE_API_RESOURCES = {
operations: {
path: '/v1/tac/operations',
paginated: true,
filterFields: [ 'q' ],
},
operation: {
path: '/v1/tac/operations/:id',
pathParams: [ 'id' ],
},
operation_by_tx_hash: {
path: '/v1/tac/operations\\:byTx/:tx_hash',
pathParams: [ 'tx_hash' ],
},
stat_operations: {
path: '/v1/stat/operations',
},
} satisfies Record<string, ApiResource>;
export type TacOperationLifecycleApiResourceName = `tac:${ keyof typeof TAC_OPERATION_LIFECYCLE_API_RESOURCES }`;
/* eslint-disable @stylistic/indent */
export type TacOperationLifecycleApiResourcePayload<R extends TacOperationLifecycleApiResourceName> =
R extends 'tac:operations' ? tac.OperationsResponse :
R extends 'tac:operation' ? tac.OperationDetails :
R extends 'tac:operation_by_tx_hash' ? tac.OperationsFullResponse :
R extends 'tac:stat_operations' ? tac.GetOperationStatisticsResponse :
never;
/* eslint-enable @stylistic/indent */
/* eslint-disable @stylistic/indent */
export type TacOperationLifecycleApiPaginationFilters<R extends TacOperationLifecycleApiResourceName> =
R extends 'tac:operations' ? { q: string } :
never;
/* eslint-enable @stylistic/indent */