Fix renamings
This commit is contained in:
parent
8c27325727
commit
ca6290ecdd
|
@ -1,16 +1,16 @@
|
||||||
import {
|
import {
|
||||||
FetchOAuth2ConfigsResponse,
|
FetchOAuth2ConfigsResponse,
|
||||||
CreateOAuth2ConfigResponse,
|
|
||||||
OAuth2ConfigResponse,
|
OAuth2ConfigResponse,
|
||||||
CreateOAuth2ConfigRequest,
|
UpsertOAuth2ConfigRequest,
|
||||||
|
UpsertOAuth2ConfigResponse,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
import { BaseAPIClient } from "./types"
|
import { BaseAPIClient } from "./types"
|
||||||
|
|
||||||
export interface OAuth2Endpoints {
|
export interface OAuth2Endpoints {
|
||||||
fetch: () => Promise<OAuth2ConfigResponse[]>
|
fetch: () => Promise<OAuth2ConfigResponse[]>
|
||||||
create: (
|
create: (
|
||||||
config: CreateOAuth2ConfigRequest
|
config: UpsertOAuth2ConfigRequest
|
||||||
) => Promise<CreateOAuth2ConfigResponse>
|
) => Promise<UpsertOAuth2ConfigResponse>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const buildOAuth2Endpoints = (API: BaseAPIClient): OAuth2Endpoints => ({
|
export const buildOAuth2Endpoints = (API: BaseAPIClient): OAuth2Endpoints => ({
|
||||||
|
@ -33,8 +33,8 @@ export const buildOAuth2Endpoints = (API: BaseAPIClient): OAuth2Endpoints => ({
|
||||||
*/
|
*/
|
||||||
create: async config => {
|
create: async config => {
|
||||||
return await API.post<
|
return await API.post<
|
||||||
CreateOAuth2ConfigRequest,
|
UpsertOAuth2ConfigRequest,
|
||||||
CreateOAuth2ConfigResponse
|
UpsertOAuth2ConfigResponse
|
||||||
>({
|
>({
|
||||||
url: `/api/oauth2`,
|
url: `/api/oauth2`,
|
||||||
body: {
|
body: {
|
||||||
|
|
Loading…
Reference in New Issue