Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(entities): remove config.requestHeaders [KM-43] #1302

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ A config card component for CA certificates.
- default: `undefined`
- Base URL for API requests.

- `requestHeaders`:
- type: `RawAxiosRequestHeaders | AxiosHeaders`
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- Additional headers to send with all Axios requests.
- An optional configuration object for the underlying Axios request.

- `workspace`:
- type: `string`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ A form component for CA Certificates.
- default: `undefined`
- Base URL for API requests.

- `requestHeaders`:
- type: `RawAxiosRequestHeaders | AxiosHeaders`
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- Additional headers to send with all Axios requests.
- An optional configuration object for the underlying Axios request.

- `cancelRoute`:
- type: `RouteLocationRaw`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ A table component for ca-certificates.
- default: `undefined`
- Base URL for API requests.

- `requestHeaders`:
- type: `RawAxiosRequestHeaders | AxiosHeaders`
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- Additional headers to send with all Axios requests.
- An optional configuration object for the underlying Axios request.

- `createRoute`:
- type: `RouteLocationRaw`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ A form component for Certificate.
- default: `undefined`
- Base URL for API requests.

- `requestHeaders`:
- type: `RawAxiosRequestHeaders | AxiosHeaders`
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- Additional headers to send with all Axios requests.
- An optional configuration object for the underlying Axios request.

- `workspace`:
- type: `string`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ A form component for Certificates.
- default: `undefined`
- Base URL for API requests.

- `requestHeaders`:
- type: `RawAxiosRequestHeaders | AxiosHeaders`
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- Additional headers to send with all Axios requests.
- An optional configuration object for the underlying Axios request.

- `cancelRoute`:
- type: `RouteLocationRaw`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ A table component for certificates.
- default: `undefined`
- Base URL for API requests.

- `requestHeaders`:
- type: `RawAxiosRequestHeaders | AxiosHeaders`
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- Additional headers to send with all Axios requests.
- An optional configuration object for the underlying Axios request.

- `createRoute`:
- type: `RouteLocationRaw`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ const router = useRouter()
const { i18n: { t } } = composables.useI18n()
const { getMessageFromError } = useErrors()

const { axiosInstance } = useAxios({
headers: props.config?.requestHeaders,
})
const { axiosInstance } = useAxios(props.config?.axiosRequestConfig)

const fetchUrl = computed<string>(() => endpoints.form[props.config.app].edit)
const formType = computed((): EntityBaseFormType => props.certificateId ? EntityBaseFormType.Edit : EntityBaseFormType.Create)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,7 @@ const props = defineProps({
const { i18n: { t, formatUnixTimeStamp }, i18nT } = composables.useI18n()
const router = useRouter()

const { axiosInstance } = useAxios({
headers: props.config?.requestHeaders,
})
const { axiosInstance } = useAxios(props.config?.axiosRequestConfig)
const fetcherCacheKey = ref<number>(1)

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,7 @@ const router = useRouter()
const { i18nT, i18n: { t } } = composables.useI18n()
const { getMessageFromError } = useErrors()

const { axiosInstance } = useAxios({
headers: props.config?.requestHeaders,
})
const { axiosInstance } = useAxios(props.config?.axiosRequestConfig)

const fetchUrl = computed<string>(() => endpoints.form[props.config.app].edit)
const formType = computed((): EntityBaseFormType => props.certificateId ? EntityBaseFormType.Edit : EntityBaseFormType.Create)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,7 @@ const props = defineProps({
const { i18n: { t, formatUnixTimeStamp }, i18nT } = composables.useI18n()
const router = useRouter()

const { axiosInstance } = useAxios({
headers: props.config?.requestHeaders,
})
const { axiosInstance } = useAxios(props.config?.axiosRequestConfig)
const fetcherCacheKey = ref<number>(1)

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ A table component for consumer credentials.
- default: `undefined`
- Base URL for API requests.

- `requestHeaders`:
- type: `RawAxiosRequestHeaders | AxiosHeaders`
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- Additional headers to send with all Axios requests.
- An optional configuration object for the underlying Axios request.

- `createRoute`:
- type: `RouteLocationRaw`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,7 @@ const props = defineProps({

const { i18n: { t, formatUnixTimeStamp } } = composables.useI18n()

const { axiosInstance } = useAxios({
headers: props.config.requestHeaders,
})
const { axiosInstance } = useAxios(props.config?.axiosRequestConfig)
const fetcherCacheKey = ref<number>(1)

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ A config card component for consumer groups.
- default: `undefined`
- Base URL for API requests.

- `requestHeaders`:
- type: `RawAxiosRequestHeaders | AxiosHeaders`
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- Additional headers to send with all Axios requests.
- An optional configuration object for the underlying Axios request.

- `workspace`:
- type: `string`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ A form component to create/edit Consumer Group.
- required: `true`
- default: `undefined`
- Base URL for API requests.
- `requestHeaders`:
- type: `RawAxiosRequestHeaders | AxiosHeaders`
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- Additional headers to send with all Axios requests.
- An optional configuration object for the underlying Axios request.
- `cancelRoute`:
- type: `RouteLocationRaw`
- required: `true`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ A table component for consumer groups.
- default: `undefined`
- Base URL for API requests.

- `requestHeaders`:
- type: `RawAxiosRequestHeaders | AxiosHeaders`
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- Additional headers to send with all Axios requests.
- An optional configuration object for the underlying Axios request.

- `createRoute`:
- type: `RouteLocationRaw`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ const emit = defineEmits<{
(e: 'error', msg: string): void
}>()
const { axiosInstance } = useAxios({
headers: props.config?.requestHeaders,
})
const { axiosInstance } = useAxios(props.config?.axiosRequestConfig)
/**
* ------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,7 @@ const {
searchKeys: ['username', 'custom_id', 'id'],
})

const { axiosInstance } = useAxios({
headers: props.config?.requestHeaders,
})
const { axiosInstance } = useAxios(props.config?.axiosRequestConfig)
const { getMessageFromError } = useErrors()
const validators = useValidators()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,7 @@ const props = defineProps({
const { i18nT, i18n: { t } } = composables.useI18n()
const router = useRouter()

const { axiosInstance } = useAxios({
headers: props.config?.requestHeaders,
})
const { axiosInstance } = useAxios(props.config?.axiosRequestConfig)
const fetcherCacheKey = ref<number>(1)
const isConsumerPage = computed<boolean>(() => !!props.config.consumerId)
const preferencesStorageKey = computed<string>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ A form component for consumer.
- default: `undefined`
- Base URL for API requests.

- `requestHeaders`:
- type: `RawAxiosRequestHeaders | AxiosHeaders`
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- Additional headers to send with all Axios requests.
- An optional configuration object for the underlying Axios request.

- `workspace`:
- type: `string`
Expand Down
6 changes: 3 additions & 3 deletions packages/entities/entities-consumers/docs/consumer-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ A form component to create/edit Consumer.
- required: `true`
- default: `undefined`
- Base URL for API requests.
- `requestHeaders`:
- type: `RawAxiosRequestHeaders | AxiosHeaders`
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- Additional headers to send with all Axios requests.
- An optional configuration object for the underlying Axios request.
- `cancelRoute`:
- type: `RouteLocationRaw`
- required: `true`
Expand Down
6 changes: 3 additions & 3 deletions packages/entities/entities-consumers/docs/consumer-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ A table component for consumers.
- default: `undefined`
- Base URL for API requests.

- `requestHeaders`:
- type: `RawAxiosRequestHeaders | AxiosHeaders`
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- Additional headers to send with all Axios requests.
- An optional configuration object for the underlying Axios request.

- `createRoute`:
- type: `RouteLocationRaw`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ const emit = defineEmits<{
(e: 'error', msg: string): void
}>()
const { axiosInstance } = useAxios({
headers: props.config?.requestHeaders,
})
const { axiosInstance } = useAxios(props.config?.axiosRequestConfig)
/**
* ------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,7 @@ const emit = defineEmits<{
const { i18nT, i18n: { t } } = composables.useI18n()
const router = useRouter()
const { axiosInstance } = useAxios({
headers: props.config?.requestHeaders,
})
const { axiosInstance } = useAxios(props.config?.axiosRequestConfig)
const { getMessageFromError } = useErrors()
const uuid = uuidv4()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,7 @@ const props = defineProps({
const { i18nT, i18n: { t } } = composables.useI18n()
const router = useRouter()

const { axiosInstance } = useAxios({
headers: props.config?.requestHeaders,
})
const { axiosInstance } = useAxios(props.config?.axiosRequestConfig)
const fetcherCacheKey = ref<number>(1)
const isConsumerGroupPage = computed<boolean>(() => !!props.config.consumerGroupId)
const preferencesStorageKey = computed<string>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ A config card component for gateway services.
- default: `undefined`
- Base URL for API requests.

- `requestHeaders`:
- type: `RawAxiosRequestHeaders | AxiosHeaders`
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- Additional headers to send with all Axios requests.
- An optional configuration object for the underlying Axios request.

- `workspace`:
- type: `string`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ A form component for gateway services.
- default: `undefined`
- Base URL for API requests.

- `requestHeaders`:
- type: `RawAxiosRequestHeaders | AxiosHeaders`
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- Additional headers to send with all Axios requests.
- An optional configuration object for the underlying Axios request.

- `cancelRoute`:
- type: `RouteLocationRaw`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ A table component for gateway services.
- default: `undefined`
- Base URL for API requests.

- `requestHeaders`:
- type: `RawAxiosRequestHeaders | AxiosHeaders`
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- Additional headers to send with all Axios requests.
- An optional configuration object for the underlying Axios request.

- `createRoute`:
- type: `RouteLocationRaw`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,7 @@ const isCollapsed = ref(true)
const router = useRouter()
const { i18nT, i18n: { t } } = composables.useI18n()
const { getMessageFromError } = useErrors()
const { axiosInstance } = useAxios({
headers: props.config?.requestHeaders,
})
const { axiosInstance } = useAxios(props.config?.axiosRequestConfig)
const validators = useValidators()

const fetchUrl = computed<string>(() => endpoints.form[props.config.app].edit)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,7 @@ const props = defineProps({
const { i18n: { t } } = composables.useI18n()
const router = useRouter()

const { axiosInstance } = useAxios({
headers: props.config?.requestHeaders,
})
const { axiosInstance } = useAxios(props.config?.axiosRequestConfig)
const fetchCacheKey = ref<number>(1)

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ A config card component for Key Sets.
- default: `undefined`
- Base URL for API requests.

- `requestHeaders`:
- type: `RawAxiosRequestHeaders | AxiosHeaders`
- `axiosRequestConfig`:
- type: `AxiosRequestConfig`
- required: `false`
- default: `undefined`
- Additional headers to send with all Axios requests.
- An optional configuration object for the underlying Axios request.

- `workspace`:
- type: `string`
Expand Down
Loading
Loading