cockpitApi: add worker config types
Create a few types to help stick to conventions and tidy up the code.
This commit is contained in:
parent
87647f8854
commit
d7945a458a
2 changed files with 16 additions and 8 deletions
|
|
@ -1,15 +1,10 @@
|
|||
import { PayloadAction, createSlice } from '@reduxjs/toolkit';
|
||||
|
||||
import type { CloudProviderConfigState } from './cockpit/types';
|
||||
|
||||
import type { RootState } from '.';
|
||||
|
||||
export type cloudProviderConfigState = {
|
||||
aws: {
|
||||
bucket?: string;
|
||||
credentials?: string;
|
||||
};
|
||||
};
|
||||
|
||||
export const initialState: cloudProviderConfigState = {
|
||||
export const initialState: CloudProviderConfigState = {
|
||||
aws: {},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -18,3 +18,16 @@ export type Package = {
|
|||
version: string;
|
||||
release: string;
|
||||
};
|
||||
|
||||
export type AWSWorkerConfig = {
|
||||
bucket?: string | undefined;
|
||||
credentials?: string | undefined;
|
||||
};
|
||||
|
||||
export type WorkerConfigResponse = {
|
||||
aws?: AWSWorkerConfig;
|
||||
};
|
||||
|
||||
export type CloudProviderConfigState = {
|
||||
aws: AWSWorkerConfig;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue