Skip to content

Commit ddd1d60

Browse files
chore: sync upstream openapi spec (v0.1.85)
1 parent a1ace87 commit ddd1d60

31 files changed

Lines changed: 2851 additions & 333 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Add `opencode_sdk` to your dependencies in `mix.exs`:
1212
```elixir
1313
def deps do
1414
[
15-
{:opencode_sdk, "~> 0.1.84"}
15+
{:opencode_sdk, "~> 0.1.85"}
1616
]
1717
end
1818
```

lib/opencode/generated/config.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ defmodule OpenCode.Generated.Config do
140140
permission: map | String.t() | nil,
141141
plugin: [String.t() | [any]] | nil,
142142
provider: map | nil,
143+
reference: map | nil,
143144
references: map | nil,
144145
schema: String.t() | nil,
145146
server: OpenCode.Generated.ServerConfig.t() | nil,
@@ -177,6 +178,7 @@ defmodule OpenCode.Generated.Config do
177178
:permission,
178179
:plugin,
179180
:provider,
181+
:reference,
180182
:references,
181183
:schema,
182184
:server,
@@ -223,6 +225,7 @@ defmodule OpenCode.Generated.Config do
223225
permission: {:union, [:map, enum: ["ask", "allow", "deny"]]},
224226
plugin: [union: [:string, [:unknown]]],
225227
provider: :map,
228+
reference: :map,
226229
references: :map,
227230
schema: :string,
228231
server: {OpenCode.Generated.ServerConfig, :t},
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
defmodule OpenCode.Generated.ConnectorAttempt do
2+
@moduledoc """
3+
Provides struct and type for a ConnectorAttempt
4+
"""
5+
6+
@type t :: %__MODULE__{
7+
attempt_id: String.t(),
8+
instructions: String.t(),
9+
mode: String.t(),
10+
time: OpenCode.Generated.ConnectorAttemptTime.t(),
11+
url: String.t()
12+
}
13+
14+
defstruct [:attempt_id, :instructions, :mode, :time, :url]
15+
16+
@doc false
17+
@spec __fields__(atom) :: keyword
18+
def __fields__(type \\ :t)
19+
20+
def __fields__(:t) do
21+
[
22+
attempt_id: :string,
23+
instructions: :string,
24+
mode: {:enum, ["auto", "code"]},
25+
time: {OpenCode.Generated.ConnectorAttemptTime, :t},
26+
url: :string
27+
]
28+
end
29+
end
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
defmodule OpenCode.Generated.ConnectorAttemptTime do
2+
@moduledoc """
3+
Provides struct and type for a ConnectorAttemptTime
4+
"""
5+
6+
@type t :: %__MODULE__{created: number | String.t(), expires: number | String.t()}
7+
8+
defstruct [:created, :expires]
9+
10+
@doc false
11+
@spec __fields__(atom) :: keyword
12+
def __fields__(type \\ :t)
13+
14+
def __fields__(:t) do
15+
[
16+
created:
17+
{:union,
18+
[
19+
:number,
20+
const: "-Infinity",
21+
const: "Infinity",
22+
const: "NaN",
23+
enum: ["Infinity", "-Infinity", "NaN"]
24+
]},
25+
expires:
26+
{:union,
27+
[
28+
:number,
29+
const: "-Infinity",
30+
const: "Infinity",
31+
const: "NaN",
32+
enum: ["Infinity", "-Infinity", "NaN"]
33+
]}
34+
]
35+
end
36+
end
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
defmodule OpenCode.Generated.ConnectorInfo do
2+
@moduledoc """
3+
Provides struct and type for a ConnectorInfo
4+
"""
5+
6+
@type t :: %__MODULE__{
7+
id: String.t(),
8+
methods: [
9+
OpenCode.Generated.ConnectorKeyMethod.t()
10+
| OpenCode.Generated.ConnectorOAuthMethod.t()
11+
],
12+
name: String.t()
13+
}
14+
15+
defstruct [:id, :methods, :name]
16+
17+
@doc false
18+
@spec __fields__(atom) :: keyword
19+
def __fields__(type \\ :t)
20+
21+
def __fields__(:t) do
22+
[
23+
id: :string,
24+
methods: [
25+
union: [
26+
{OpenCode.Generated.ConnectorKeyMethod, :t},
27+
{OpenCode.Generated.ConnectorOAuthMethod, :t}
28+
]
29+
],
30+
name: :string
31+
]
32+
end
33+
end
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
defmodule OpenCode.Generated.ConnectorKeyMethod do
2+
@moduledoc """
3+
Provides struct and type for a ConnectorKeyMethod
4+
"""
5+
6+
@type t :: %__MODULE__{
7+
id: String.t(),
8+
label: String.t(),
9+
prompts:
10+
[
11+
OpenCode.Generated.ConnectorSelectPrompt.t()
12+
| OpenCode.Generated.ConnectorTextPrompt.t()
13+
]
14+
| nil,
15+
type: String.t()
16+
}
17+
18+
defstruct [:id, :label, :prompts, :type]
19+
20+
@doc false
21+
@spec __fields__(atom) :: keyword
22+
def __fields__(type \\ :t)
23+
24+
def __fields__(:t) do
25+
[
26+
id: :string,
27+
label: :string,
28+
prompts: [
29+
union: [
30+
{OpenCode.Generated.ConnectorSelectPrompt, :t},
31+
{OpenCode.Generated.ConnectorTextPrompt, :t}
32+
]
33+
],
34+
type: {:const, "key"}
35+
]
36+
end
37+
end
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
defmodule OpenCode.Generated.ConnectorOAuthMethod do
2+
@moduledoc """
3+
Provides struct and type for a ConnectorOAuthMethod
4+
"""
5+
6+
@type t :: %__MODULE__{
7+
id: String.t(),
8+
label: String.t(),
9+
prompts:
10+
[
11+
OpenCode.Generated.ConnectorSelectPrompt.t()
12+
| OpenCode.Generated.ConnectorTextPrompt.t()
13+
]
14+
| nil,
15+
type: String.t()
16+
}
17+
18+
defstruct [:id, :label, :prompts, :type]
19+
20+
@doc false
21+
@spec __fields__(atom) :: keyword
22+
def __fields__(type \\ :t)
23+
24+
def __fields__(:t) do
25+
[
26+
id: :string,
27+
label: :string,
28+
prompts: [
29+
union: [
30+
{OpenCode.Generated.ConnectorSelectPrompt, :t},
31+
{OpenCode.Generated.ConnectorTextPrompt, :t}
32+
]
33+
],
34+
type: {:const, "oauth"}
35+
]
36+
end
37+
end
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
defmodule OpenCode.Generated.ConnectorSelectPrompt do
2+
@moduledoc """
3+
Provides struct and type for a ConnectorSelectPrompt
4+
"""
5+
6+
@type t :: %__MODULE__{
7+
key: String.t(),
8+
message: String.t(),
9+
options: [OpenCode.Generated.ConnectorSelectPromptOptions.t()],
10+
type: String.t(),
11+
when: OpenCode.Generated.ConnectorWhen.t() | nil
12+
}
13+
14+
defstruct [:key, :message, :options, :type, :when]
15+
16+
@doc false
17+
@spec __fields__(atom) :: keyword
18+
def __fields__(type \\ :t)
19+
20+
def __fields__(:t) do
21+
[
22+
key: :string,
23+
message: :string,
24+
options: [{OpenCode.Generated.ConnectorSelectPromptOptions, :t}],
25+
type: {:const, "select"},
26+
when: {OpenCode.Generated.ConnectorWhen, :t}
27+
]
28+
end
29+
end
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
defmodule OpenCode.Generated.ConnectorSelectPromptOptions do
2+
@moduledoc """
3+
Provides struct and type for a ConnectorSelectPromptOptions
4+
"""
5+
6+
@type t :: %__MODULE__{hint: String.t() | nil, label: String.t(), value: String.t()}
7+
8+
defstruct [:hint, :label, :value]
9+
10+
@doc false
11+
@spec __fields__(atom) :: keyword
12+
def __fields__(type \\ :t)
13+
14+
def __fields__(:t) do
15+
[hint: :string, label: :string, value: :string]
16+
end
17+
end
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
defmodule OpenCode.Generated.ConnectorTextPrompt do
2+
@moduledoc """
3+
Provides struct and type for a ConnectorTextPrompt
4+
"""
5+
6+
@type t :: %__MODULE__{
7+
key: String.t(),
8+
message: String.t(),
9+
placeholder: String.t() | nil,
10+
type: String.t(),
11+
when: OpenCode.Generated.ConnectorWhen.t() | nil
12+
}
13+
14+
defstruct [:key, :message, :placeholder, :type, :when]
15+
16+
@doc false
17+
@spec __fields__(atom) :: keyword
18+
def __fields__(type \\ :t)
19+
20+
def __fields__(:t) do
21+
[
22+
key: :string,
23+
message: :string,
24+
placeholder: :string,
25+
type: {:const, "text"},
26+
when: {OpenCode.Generated.ConnectorWhen, :t}
27+
]
28+
end
29+
end

0 commit comments

Comments
 (0)