chore(client): regenerate VCS API
This commit is contained in:
parent
305466e5ef
commit
a6761d4fe0
5 changed files with 61 additions and 19 deletions
|
|
@ -1027,21 +1027,27 @@ export interface ProjectCopyApi<E = never> {
|
||||||
readonly refresh: ProjectCopyRefreshOperation<E>
|
readonly refresh: ProjectCopyRefreshOperation<E>
|
||||||
}
|
}
|
||||||
|
|
||||||
type Endpoint25_0Request = Parameters<RawClient["server.vcs"]["vcs.status"]>[0]
|
type Endpoint25_0Request = Parameters<RawClient["server.vcs"]["vcs.get"]>[0]
|
||||||
export type Endpoint25_0Input = { readonly location?: Endpoint25_0Request["query"]["location"] }
|
export type Endpoint25_0Input = { readonly location?: Endpoint25_0Request["query"]["location"] }
|
||||||
export type Endpoint25_0Output = EffectValue<ReturnType<RawClient["server.vcs"]["vcs.status"]>>
|
export type Endpoint25_0Output = EffectValue<ReturnType<RawClient["server.vcs"]["vcs.get"]>>
|
||||||
export type VcsStatusOperation<E = never> = (input?: Endpoint25_0Input) => Effect.Effect<Endpoint25_0Output, E>
|
export type VcsGetOperation<E = never> = (input?: Endpoint25_0Input) => Effect.Effect<Endpoint25_0Output, E>
|
||||||
|
|
||||||
type Endpoint25_1Request = Parameters<RawClient["server.vcs"]["vcs.diff"]>[0]
|
type Endpoint25_1Request = Parameters<RawClient["server.vcs"]["vcs.status"]>[0]
|
||||||
export type Endpoint25_1Input = {
|
export type Endpoint25_1Input = { readonly location?: Endpoint25_1Request["query"]["location"] }
|
||||||
readonly location?: Endpoint25_1Request["query"]["location"]
|
export type Endpoint25_1Output = EffectValue<ReturnType<RawClient["server.vcs"]["vcs.status"]>>
|
||||||
readonly mode: Endpoint25_1Request["query"]["mode"]
|
export type VcsStatusOperation<E = never> = (input?: Endpoint25_1Input) => Effect.Effect<Endpoint25_1Output, E>
|
||||||
readonly context?: Endpoint25_1Request["query"]["context"]
|
|
||||||
|
type Endpoint25_2Request = Parameters<RawClient["server.vcs"]["vcs.diff"]>[0]
|
||||||
|
export type Endpoint25_2Input = {
|
||||||
|
readonly location?: Endpoint25_2Request["query"]["location"]
|
||||||
|
readonly mode: Endpoint25_2Request["query"]["mode"]
|
||||||
|
readonly context?: Endpoint25_2Request["query"]["context"]
|
||||||
}
|
}
|
||||||
export type Endpoint25_1Output = EffectValue<ReturnType<RawClient["server.vcs"]["vcs.diff"]>>
|
export type Endpoint25_2Output = EffectValue<ReturnType<RawClient["server.vcs"]["vcs.diff"]>>
|
||||||
export type VcsDiffOperation<E = never> = (input: Endpoint25_1Input) => Effect.Effect<Endpoint25_1Output, E>
|
export type VcsDiffOperation<E = never> = (input: Endpoint25_2Input) => Effect.Effect<Endpoint25_2Output, E>
|
||||||
|
|
||||||
export interface VcsApi<E = never> {
|
export interface VcsApi<E = never> {
|
||||||
|
readonly get: VcsGetOperation<E>
|
||||||
readonly status: VcsStatusOperation<E>
|
readonly status: VcsStatusOperation<E>
|
||||||
readonly diff: VcsDiffOperation<E>
|
readonly diff: VcsDiffOperation<E>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1234,23 +1234,32 @@ const adaptGroup24 = (raw: RawClient["server.projectCopy"]) => ({
|
||||||
refresh: Endpoint24_2(raw),
|
refresh: Endpoint24_2(raw),
|
||||||
})
|
})
|
||||||
|
|
||||||
type Endpoint25_0Request = Parameters<RawClient["server.vcs"]["vcs.status"]>[0]
|
type Endpoint25_0Request = Parameters<RawClient["server.vcs"]["vcs.get"]>[0]
|
||||||
type Endpoint25_0Input = { readonly location?: Endpoint25_0Request["query"]["location"] }
|
type Endpoint25_0Input = { readonly location?: Endpoint25_0Request["query"]["location"] }
|
||||||
const Endpoint25_0 = (raw: RawClient["server.vcs"]) => (input?: Endpoint25_0Input) =>
|
const Endpoint25_0 = (raw: RawClient["server.vcs"]) => (input?: Endpoint25_0Input) =>
|
||||||
|
raw["vcs.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))
|
||||||
|
|
||||||
|
type Endpoint25_1Request = Parameters<RawClient["server.vcs"]["vcs.status"]>[0]
|
||||||
|
type Endpoint25_1Input = { readonly location?: Endpoint25_1Request["query"]["location"] }
|
||||||
|
const Endpoint25_1 = (raw: RawClient["server.vcs"]) => (input?: Endpoint25_1Input) =>
|
||||||
raw["vcs.status"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))
|
raw["vcs.status"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))
|
||||||
|
|
||||||
type Endpoint25_1Request = Parameters<RawClient["server.vcs"]["vcs.diff"]>[0]
|
type Endpoint25_2Request = Parameters<RawClient["server.vcs"]["vcs.diff"]>[0]
|
||||||
type Endpoint25_1Input = {
|
type Endpoint25_2Input = {
|
||||||
readonly location?: Endpoint25_1Request["query"]["location"]
|
readonly location?: Endpoint25_2Request["query"]["location"]
|
||||||
readonly mode: Endpoint25_1Request["query"]["mode"]
|
readonly mode: Endpoint25_2Request["query"]["mode"]
|
||||||
readonly context?: Endpoint25_1Request["query"]["context"]
|
readonly context?: Endpoint25_2Request["query"]["context"]
|
||||||
}
|
}
|
||||||
const Endpoint25_1 = (raw: RawClient["server.vcs"]) => (input: Endpoint25_1Input) =>
|
const Endpoint25_2 = (raw: RawClient["server.vcs"]) => (input: Endpoint25_2Input) =>
|
||||||
raw["vcs.diff"]({ query: { location: input["location"], mode: input["mode"], context: input["context"] } }).pipe(
|
raw["vcs.diff"]({ query: { location: input["location"], mode: input["mode"], context: input["context"] } }).pipe(
|
||||||
Effect.mapError(mapClientError),
|
Effect.mapError(mapClientError),
|
||||||
)
|
)
|
||||||
|
|
||||||
const adaptGroup25 = (raw: RawClient["server.vcs"]) => ({ status: Endpoint25_0(raw), diff: Endpoint25_1(raw) })
|
const adaptGroup25 = (raw: RawClient["server.vcs"]) => ({
|
||||||
|
get: Endpoint25_0(raw),
|
||||||
|
status: Endpoint25_1(raw),
|
||||||
|
diff: Endpoint25_2(raw),
|
||||||
|
})
|
||||||
|
|
||||||
type Endpoint26_0Request = Parameters<RawClient["server.path"]["path.get"]>[0]
|
type Endpoint26_0Request = Parameters<RawClient["server.path"]["path.get"]>[0]
|
||||||
type Endpoint26_0Input = { readonly location?: Endpoint26_0Request["query"]["location"] }
|
type Endpoint26_0Input = { readonly location?: Endpoint26_0Request["query"]["location"] }
|
||||||
|
|
|
||||||
|
|
@ -204,6 +204,8 @@ import type {
|
||||||
ProjectCopyRemoveOutput,
|
ProjectCopyRemoveOutput,
|
||||||
ProjectCopyRefreshInput,
|
ProjectCopyRefreshInput,
|
||||||
ProjectCopyRefreshOutput,
|
ProjectCopyRefreshOutput,
|
||||||
|
VcsGetInput,
|
||||||
|
VcsGetOutput,
|
||||||
VcsStatusInput,
|
VcsStatusInput,
|
||||||
VcsStatusOutput,
|
VcsStatusOutput,
|
||||||
VcsDiffInput,
|
VcsDiffInput,
|
||||||
|
|
@ -1714,6 +1716,18 @@ export function make(options: ClientOptions) {
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
vcs: {
|
vcs: {
|
||||||
|
get: (input?: VcsGetInput, requestOptions?: RequestOptions) =>
|
||||||
|
request<VcsGetOutput>(
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
path: `/api/vcs`,
|
||||||
|
query: { location: input?.["location"] },
|
||||||
|
successStatus: 200,
|
||||||
|
declaredStatuses: [401, 400],
|
||||||
|
empty: false,
|
||||||
|
},
|
||||||
|
requestOptions,
|
||||||
|
),
|
||||||
status: (input?: VcsStatusInput, requestOptions?: RequestOptions) =>
|
status: (input?: VcsStatusInput, requestOptions?: RequestOptions) =>
|
||||||
request<VcsStatusOutput>(
|
request<VcsStatusOutput>(
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -530,6 +530,8 @@ export type ReferenceGitSource = {
|
||||||
|
|
||||||
export type ProjectCopyCopy = { directory: string }
|
export type ProjectCopyCopy = { directory: string }
|
||||||
|
|
||||||
|
export type VcsInfo = { branch?: string; defaultBranch?: string }
|
||||||
|
|
||||||
export type VcsFileStatus = {
|
export type VcsFileStatus = {
|
||||||
file: string
|
file: string
|
||||||
additions: number
|
additions: number
|
||||||
|
|
@ -4953,6 +4955,17 @@ export type ProjectCopyRefreshInput = {
|
||||||
|
|
||||||
export type ProjectCopyRefreshOutput = void
|
export type ProjectCopyRefreshOutput = void
|
||||||
|
|
||||||
|
export type VcsGetInput = {
|
||||||
|
readonly location?: {
|
||||||
|
readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
|
||||||
|
}["location"]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type VcsGetOutput = {
|
||||||
|
location: { directory: string; workspaceID?: string; project: { id: string; directory: string } }
|
||||||
|
data: VcsInfo
|
||||||
|
}
|
||||||
|
|
||||||
export type VcsStatusInput = {
|
export type VcsStatusInput = {
|
||||||
readonly location?: {
|
readonly location?: {
|
||||||
readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
|
readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ test("exposes every standard HTTP API group", () => {
|
||||||
expect(Object.keys(client.integration.oauth)).toEqual(["connect", "status", "complete", "cancel"])
|
expect(Object.keys(client.integration.oauth)).toEqual(["connect", "status", "complete", "cancel"])
|
||||||
expect(Object.keys(client.integration.command)).toEqual(["connect", "status", "cancel"])
|
expect(Object.keys(client.integration.command)).toEqual(["connect", "status", "cancel"])
|
||||||
expect(Object.keys(client.file)).toEqual(["read", "list", "find"])
|
expect(Object.keys(client.file)).toEqual(["read", "list", "find"])
|
||||||
expect(Object.keys(client.vcs)).toEqual(["status", "diff"])
|
expect(Object.keys(client.vcs)).toEqual(["get", "status", "diff"])
|
||||||
expect(Object.keys(client.pty)).toEqual(["shells", "list", "create", "get", "update", "remove", "connectToken"])
|
expect(Object.keys(client.pty)).toEqual(["shells", "list", "create", "get", "update", "remove", "connectToken"])
|
||||||
expect(Object.keys(client.shell)).toEqual(["list", "create", "get", "timeout", "output", "remove"])
|
expect(Object.keys(client.shell)).toEqual(["list", "create", "get", "timeout", "output", "remove"])
|
||||||
expect(Object.keys(client.project)).toEqual(["list", "current", "directories"])
|
expect(Object.keys(client.project)).toEqual(["list", "current", "directories"])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue