Skip to content
Open
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
138 changes: 69 additions & 69 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ generation:
requestResponseComponentNamesFeb2024: true
securityFeb2025: true
sharedErrorComponentsApr2025: true
sharedNestedComponentsJan2026: false
auth:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: true
Expand All @@ -30,7 +31,7 @@ generation:
generateNewTests: false
skipResponseBodyAssertions: false
typescript:
version: 3.4.1
version: 3.4.2
acceptHeaderEnum: true
additionalDependencies:
dependencies: {}
Expand All @@ -53,6 +54,7 @@ typescript:
enumFormat: union
envVarPrefix: OPPER
exportZodModelNamespace: false
flatAdditionalProperties: false
flattenGlobalSecurity: true
flatteningOrder: parameters-first
formStringArrayEncodeMode: encoded-string
Expand All @@ -79,6 +81,7 @@ typescript:
outputModelSuffix: output
packageName: opperai
preApplyUnionDiscriminators: true
preserveModelFieldNames: false
responseFormat: flat
sseFlatResponse: false
templateVersion: v2
Expand Down
12 changes: 6 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
speakeasyVersion: 1.680.11
speakeasyVersion: 1.697.5
sources:
FastAPI:
sourceNamespace: fast-api
sourceRevisionDigest: sha256:68b0cbe004a918df9af2bdb9f14fb8603d166eee2514fe752773b87a0b06a602
sourceBlobDigest: sha256:9a8a62a66b7d61f0a406be7b4c63c1b2d555b9ce44d9e3f998d10c31df1d5009
sourceRevisionDigest: sha256:cb6fa3655089c62f4710392601a2e49c0b674e1e51a04a41f06cae165667f1e5
sourceBlobDigest: sha256:ca51b6dbcfb34da1b9e1c62dc1bb74a1c1e3e12b0fc6e44793750ede85628249
tags:
- latest
- main
Expand All @@ -12,10 +12,10 @@ targets:
opper:
source: FastAPI
sourceNamespace: fast-api
sourceRevisionDigest: sha256:68b0cbe004a918df9af2bdb9f14fb8603d166eee2514fe752773b87a0b06a602
sourceBlobDigest: sha256:9a8a62a66b7d61f0a406be7b4c63c1b2d555b9ce44d9e3f998d10c31df1d5009
sourceRevisionDigest: sha256:cb6fa3655089c62f4710392601a2e49c0b674e1e51a04a41f06cae165667f1e5
sourceBlobDigest: sha256:ca51b6dbcfb34da1b9e1c62dc1bb74a1c1e3e12b0fc6e44793750ede85628249
codeSamplesNamespace: fast-api-typescript-code-samples
codeSamplesRevisionDigest: sha256:5c5b7fb4892a2ddb5a8cf1e04b161f2742e976efee6a8b613f3d666aa8474a96
codeSamplesRevisionDigest: sha256:b2c86da7d09061f8c244d6ba6a337d4abbef18299b2007fd46ca6a29da7275f9
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# AppApiPublicV2FunctionCallCallFunctionRequest
# CallFunctionRequest

## Example Usage

```typescript
import { AppApiPublicV2FunctionCallCallFunctionRequest } from "opperai/models";
import { CallFunctionRequest } from "opperai/models";

let value: AppApiPublicV2FunctionCallCallFunctionRequest = {
let value: CallFunctionRequest = {
name: "add_numbers",
instructions: "Calculate the sum of two numbers",
inputSchema: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# AppApiPublicV2FunctionsCallFunctionResponse
# CallFunctionResponse

## Example Usage

```typescript
import { AppApiPublicV2FunctionsCallFunctionResponse } from "opperai/models";
import { CallFunctionResponse } from "opperai/models";

let value: AppApiPublicV2FunctionsCallFunctionResponse = {
spanId: "a81c6454-5ac4-4060-a3f1-5a2d8f1af4cc",
let value: CallFunctionResponse = {
spanId: "e9cdfdda-24c9-49c9-b80b-1a2728c3f909",
message: "The sum of 1 and 3 is 4",
jsonPayload: {
"sum": 4,
Expand Down
1 change: 1 addition & 0 deletions docs/models/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const value: string = "Hello, world!";
```typescript
const value: string[] = [
"Hello, world!",
"Hello, world!",
];
```

6 changes: 3 additions & 3 deletions docs/models/jsonpayload.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ const value: { [k: string]: any } = {

```typescript
const value: any[] = [
{
"sum": 4,
},
"<value 1>",
"<value 2>",
"<value 3>",
];
```

Expand Down
4 changes: 2 additions & 2 deletions docs/models/operations/delta.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ const value: string = "Hello";
### `number`

```typescript
const value: number = NaN;
const value: number = 42;
```

### `number`

```typescript
const value: number = NaN;
const value: number = 42;
```

### `boolean`
Expand Down
4 changes: 2 additions & 2 deletions docs/models/operations/updatespanspansspanidpatchrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ let value: UpdateSpanSpansSpanIdPatchRequest = {
spanId: "c4686ca8-5f9f-483e-8cc2-e12731bcf9e5",
updateSpanRequest: {
name: "my span",
startTime: new Date("2026-01-02T11:36:47.278310Z"),
startTime: new Date("2026-01-26T08:06:02.750273Z"),
type: "email_tool",
endTime: new Date("2026-01-02T11:36:47.278372Z"),
endTime: new Date("2026-01-26T08:06:02.750336Z"),
input: "Hello, world!",
output: "Hello, world!",
error: "Exception: This is an error message",
Expand Down
8 changes: 4 additions & 4 deletions docs/models/updatespanrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { UpdateSpanRequest } from "opperai/models";

let value: UpdateSpanRequest = {
name: "my span",
startTime: new Date("2026-01-02T11:36:47.278310Z"),
startTime: new Date("2026-01-26T08:06:02.750273Z"),
type: "email_tool",
endTime: new Date("2026-01-02T11:36:47.278372Z"),
endTime: new Date("2026-01-26T08:06:02.750336Z"),
input: "Hello, world!",
output: "Hello, world!",
error: "Exception: This is an error message",
Expand All @@ -25,9 +25,9 @@ let value: UpdateSpanRequest = {
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `name` | *string* | :heavy_minus_sign: | The name of the span, something descriptive about the span that will be used to identify it when querying | my span |
| `startTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The start time of the span in UTC | 2026-01-02T11:36:47.278310Z |
| `startTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The start time of the span in UTC | 2026-01-26T08:06:02.750273Z |
| `type` | *string* | :heavy_minus_sign: | The type of the span | email_tool |
| `endTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The end time of the span in UTC | 2026-01-02T11:36:47.278372Z |
| `endTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The end time of the span in UTC | 2026-01-26T08:06:02.750336Z |
| `input` | *string* | :heavy_minus_sign: | The input of the span | Hello, world! |
| `output` | *string* | :heavy_minus_sign: | The output of the span | Hello, world! |
| `error` | *string* | :heavy_minus_sign: | In case of an error, the error message | Exception: This is an error message |
Expand Down
8 changes: 3 additions & 5 deletions docs/models/value2.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,18 @@ const value: string = "product";
### `number`

```typescript
const value: number = NaN;
const value: number = 128403;
```

### `number`

```typescript
const value: number = NaN;
const value: number = 1284.03;
```

### `models.Value1[]`

```typescript
const value: models.Value1[] = [
"product",
];
const value: models.Value1[] = [];
```

4 changes: 2 additions & 2 deletions examples/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
"name": "opperai",
"version": "3.4.1",
"version": "3.4.2",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
Expand Down
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opperai",
"version": "3.4.1",
"version": "3.4.2",
"author": "Speakeasy",
"repository": {
"type": "git",
Expand Down Expand Up @@ -47,7 +47,7 @@
"typescript-eslint": "^8.26.0"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.24.0",
"@modelcontextprotocol/sdk": "^1.25.2",
"zod": "^3.25.0 || ^4.0.0"
},
"exports": {
Expand Down
9 changes: 3 additions & 6 deletions src/funcs/call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { Result } from "../types/fp.js";
*/
export function call(
client: OpperCore,
request: models.AppApiPublicV2FunctionCallCallFunctionRequest,
request: models.CallFunctionRequest,
options?: RequestOptions,
): APIPromise<
Result<
Expand Down Expand Up @@ -62,7 +62,7 @@ export function call(

async function $do(
client: OpperCore,
request: models.AppApiPublicV2FunctionCallCallFunctionRequest,
request: models.CallFunctionRequest,
options?: RequestOptions,
): Promise<
[
Expand All @@ -86,10 +86,7 @@ async function $do(
> {
const parsed = safeParse(
request,
(value) =>
models.AppApiPublicV2FunctionCallCallFunctionRequest$outboundSchema.parse(
value,
),
(value) => models.CallFunctionRequest$outboundSchema.parse(value),
"Input validation failed",
);
if (!parsed.ok) {
Expand Down
11 changes: 4 additions & 7 deletions src/funcs/functionsCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function functionsCall(
options?: RequestOptions,
): APIPromise<
Result<
models.AppApiPublicV2FunctionsCallFunctionResponse,
models.CallFunctionResponse,
| errors.BadRequestError
| errors.UnauthorizedError
| errors.NotFoundError
Expand Down Expand Up @@ -72,7 +72,7 @@ async function $do(
): Promise<
[
Result<
models.AppApiPublicV2FunctionsCallFunctionResponse,
models.CallFunctionResponse,
| errors.BadRequestError
| errors.UnauthorizedError
| errors.NotFoundError
Expand Down Expand Up @@ -176,7 +176,7 @@ async function $do(
};

const [result] = await M.match<
models.AppApiPublicV2FunctionsCallFunctionResponse,
models.CallFunctionResponse,
| errors.BadRequestError
| errors.UnauthorizedError
| errors.NotFoundError
Expand All @@ -190,10 +190,7 @@ async function $do(
| UnexpectedClientError
| SDKValidationError
>(
M.json(
200,
models.AppApiPublicV2FunctionsCallFunctionResponse$inboundSchema,
),
M.json(200, models.CallFunctionResponse$inboundSchema),
M.jsonErr(400, errors.BadRequestError$inboundSchema),
M.jsonErr(401, errors.UnauthorizedError$inboundSchema),
M.jsonErr(404, errors.NotFoundError$inboundSchema),
Expand Down
11 changes: 4 additions & 7 deletions src/funcs/functionsCallRevision.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function functionsCallRevision(
options?: RequestOptions,
): APIPromise<
Result<
models.AppApiPublicV2FunctionsCallFunctionResponse,
models.CallFunctionResponse,
| errors.BadRequestError
| errors.UnauthorizedError
| errors.NotFoundError
Expand Down Expand Up @@ -75,7 +75,7 @@ async function $do(
): Promise<
[
Result<
models.AppApiPublicV2FunctionsCallFunctionResponse,
models.CallFunctionResponse,
| errors.BadRequestError
| errors.UnauthorizedError
| errors.NotFoundError
Expand Down Expand Up @@ -190,7 +190,7 @@ async function $do(
};

const [result] = await M.match<
models.AppApiPublicV2FunctionsCallFunctionResponse,
models.CallFunctionResponse,
| errors.BadRequestError
| errors.UnauthorizedError
| errors.NotFoundError
Expand All @@ -204,10 +204,7 @@ async function $do(
| UnexpectedClientError
| SDKValidationError
>(
M.json(
200,
models.AppApiPublicV2FunctionsCallFunctionResponse$inboundSchema,
),
M.json(200, models.CallFunctionResponse$inboundSchema),
M.jsonErr(400, errors.BadRequestError$inboundSchema),
M.jsonErr(401, errors.UnauthorizedError$inboundSchema),
M.jsonErr(404, errors.NotFoundError$inboundSchema),
Expand Down
Loading