Skip to content

Commit 11368f2

Browse files
Merge pull request #253 from mistralai/speakeasy-sdk-regen-1783702259
chore: 🐝 Update SDK - Generate MISTRALAI-SDK 2.5.0
2 parents 47d69a6 + 19da0ce commit 11368f2

99 files changed

Lines changed: 4269 additions & 477 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.speakeasy/gen.lock

Lines changed: 372 additions & 109 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ generation:
3434
generateNewTests: false
3535
skipResponseBodyAssertions: false
3636
typescript:
37-
version: 2.4.1
37+
version: 2.5.0
3838
acceptHeaderEnum: true
3939
additionalDependencies:
4040
dependencies:

.speakeasy/workflow.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ sources:
1616
- speakeasy-mistralai-gcp-sdk-regen-republish
1717
mistral-openapi:
1818
sourceNamespace: mistral-openapi
19-
sourceRevisionDigest: sha256:b590d544f976dba688dfda05229cee0be00c376a9c3c209d527c1508ff0cb9da
20-
sourceBlobDigest: sha256:293e895fc5dae852d73e3893db3843828c80fb136f03ce835d2c4cff122902ba
19+
sourceRevisionDigest: sha256:45f48569f77b2594726990a398bbfc067534087872b4b354909874aea2947eec
20+
sourceBlobDigest: sha256:79a21b93193e5d5b63b79a79c55aed6778c98b6dfebc96066c5db2fd9580476b
2121
tags:
2222
- latest
2323
targets:
@@ -38,10 +38,10 @@ targets:
3838
mistralai-sdk:
3939
source: mistral-openapi
4040
sourceNamespace: mistral-openapi
41-
sourceRevisionDigest: sha256:b590d544f976dba688dfda05229cee0be00c376a9c3c209d527c1508ff0cb9da
42-
sourceBlobDigest: sha256:293e895fc5dae852d73e3893db3843828c80fb136f03ce835d2c4cff122902ba
41+
sourceRevisionDigest: sha256:45f48569f77b2594726990a398bbfc067534087872b4b354909874aea2947eec
42+
sourceBlobDigest: sha256:79a21b93193e5d5b63b79a79c55aed6778c98b6dfebc96066c5db2fd9580476b
4343
codeSamplesNamespace: mistral-openapi-code-samples
44-
codeSamplesRevisionDigest: sha256:f38d321f7f94732f6bf12e6ca13244d71297dc50f7c23e66d290e71b182d3ed3
44+
codeSamplesRevisionDigest: sha256:1db92658ef55c4088017cf799bcfecde4831748bc04c14efd693a4e88656548e
4545
workflow:
4646
workflowVersion: 1.0.0
4747
speakeasyVersion: 1.763.6

README.md

Lines changed: 80 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Mistral AI API: Our Chat Completion and Embeddings APIs specification. Create yo
2424
* [Providers' SDKs](#providers-sdks)
2525
* [Available Resources and Operations](#available-resources-and-operations)
2626
* [Server-sent event streaming](#server-sent-event-streaming)
27+
* [Json Streaming](#json-streaming)
2728
* [Pagination](#pagination)
2829
* [File uploads](#file-uploads)
2930
* [Retries](#retries)
@@ -261,7 +262,8 @@ We have dedicated SDKs for the following providers:
261262
### [Beta.Agents](docs/sdks/betaagents/README.md)
262263

263264
* [create](docs/sdks/betaagents/README.md#create) - Create a agent that can be used within a conversation.
264-
* [list](docs/sdks/betaagents/README.md#list) - List agent entities.
265+
* [~~list~~](docs/sdks/betaagents/README.md#list) - List agent entities. :warning: **Deprecated** Use [listPages](docs/sdks/betaagents/README.md#listpages) instead.
266+
* [listPages](docs/sdks/betaagents/README.md#listpages) - List agent entities, cursor-paginated.
265267
* [get](docs/sdks/betaagents/README.md#get) - Retrieve an agent entity.
266268
* [update](docs/sdks/betaagents/README.md#update) - Update an agent entity.
267269
* [delete](docs/sdks/betaagents/README.md#delete) - Delete an agent entity.
@@ -293,6 +295,7 @@ We have dedicated SDKs for the following providers:
293295
* [createOrUpdateWorkspaceCredentials](docs/sdks/connectors/README.md#createorupdateworkspacecredentials) - Create or update workspace credentials for a connector.
294296
* [listUserCredentials](docs/sdks/connectors/README.md#listusercredentials) - List user credentials for a connector.
295297
* [createOrUpdateUserCredentials](docs/sdks/connectors/README.md#createorupdateusercredentials) - Create or update user credentials for a connector.
298+
* [deleteAllUserCredentials](docs/sdks/connectors/README.md#deleteallusercredentials) - Delete all user credentials for a connector.
296299
* [deleteOrganizationCredentials](docs/sdks/connectors/README.md#deleteorganizationcredentials) - Delete organization credentials for a connector.
297300
* [deleteWorkspaceCredentials](docs/sdks/connectors/README.md#deleteworkspacecredentials) - Delete workspace credentials for a connector.
298301
* [deleteUserCredentials](docs/sdks/connectors/README.md#deleteusercredentials) - Delete user credentials for a connector.
@@ -452,9 +455,13 @@ We have dedicated SDKs for the following providers:
452455
* [unregister](docs/sdks/searchindexes/README.md#unregister) - Unregister Search Index
453456
* [updateIndexMetrics](docs/sdks/searchindexes/README.md#updateindexmetrics) - Update Index Metrics
454457
* [getIndexDetail](docs/sdks/searchindexes/README.md#getindexdetail) - Get Index Details
458+
* [getIndexSummary](docs/sdks/searchindexes/README.md#getindexsummary) - Get Index Summary
459+
* [generateIndexSummary](docs/sdks/searchindexes/README.md#generateindexsummary) - Generate a summary field for an index
455460
* [setIndexSummary](docs/sdks/searchindexes/README.md#setindexsummary) - Set Index Summary
456-
* [getIndexSchemaDetail](docs/sdks/searchindexes/README.md#getindexschemadetail) - Get Index Schema Detail
461+
* [getSchemaSummary](docs/sdks/searchindexes/README.md#getschemasummary) - Get Schema Summary
462+
* [generateSchemaSummary](docs/sdks/searchindexes/README.md#generateschemasummary) - Generate a summary field for a schema
457463
* [setSchemaSummary](docs/sdks/searchindexes/README.md#setschemasummary) - Set Schema Summary
464+
* [getIndexSchemaDetail](docs/sdks/searchindexes/README.md#getindexschemadetail) - Get Index Schema Detail
458465
* [getIndexSchemaFile](docs/sdks/searchindexes/README.md#getindexschemafile) - Get Index Schema File
459466
* [documentLookup](docs/sdks/searchindexes/README.md#documentlookup) - Document Lookup
460467
* [documentsFetch](docs/sdks/searchindexes/README.md#documentsfetch) - Document Fetch
@@ -641,6 +648,41 @@ run();
641648
[mdn-for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
642649
<!-- End Server-sent event streaming [eventstream] -->
643650

651+
<!-- Start Json Streaming [jsonl] -->
652+
## Json Streaming
653+
654+
Json Streaming ([jsonl][jsonl-format] / [x-ndjson][x-ndjson]) content type can be used to stream content from certain operations. These operations expose the stream as an [AsyncGenerator][async-generator] that can be consumed using a `for await...of` loop in TypeScript/JavaScript. The loop will terminate when the server no longer has any events to send and closes the underlying connection.
655+
656+
Here's an example of consuming a JSONL stream:
657+
658+
```typescript
659+
import { Mistral } from "@mistralai/mistralai";
660+
661+
const mistral = new Mistral({
662+
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
663+
});
664+
665+
async function run() {
666+
const result = await mistral.beta.rag.searchIndexes.generateIndexSummary({
667+
indexId: "b0cfd77c-9cc3-46b6-ad70-1024386259b9",
668+
language: "pl",
669+
});
670+
671+
for await (const event of result) {
672+
// Handle the event
673+
console.log(event);
674+
}
675+
}
676+
677+
run();
678+
679+
```
680+
681+
[jsonl-format]: https://jsonlines.org/
682+
[x-ndjson]: https://github.com/ndjson/ndjson-spec
683+
[async-generator]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AsyncGenerator
684+
<!-- End Json Streaming [jsonl] -->
685+
644686
<!-- Start Pagination [pagination] -->
645687
## Pagination
646688

@@ -850,8 +892,8 @@ run();
850892

851893

852894
**Inherit from [`MistralError`](./src/models/errors/mistralerror.ts)**:
853-
* [`HTTPValidationError`](./src/models/errors/httpvalidationerror.ts): Validation Error. Status code `422`. Applicable to 146 of 243 methods.*
854-
* [`ObservabilityError`](./src/models/errors/observabilityerror.ts): Bad Request - Invalid request parameters or data. Applicable to 57 of 243 methods.*
895+
* [`HTTPValidationError`](./src/models/errors/httpvalidationerror.ts): Validation Error. Status code `422`. Applicable to 152 of 249 methods.*
896+
* [`ObservabilityError`](./src/models/errors/observabilityerror.ts): Bad Request - Invalid request parameters or data. Applicable to 57 of 249 methods.*
855897
* [`ResponseValidationError`](./src/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.
856898

857899
</details>
@@ -866,17 +908,19 @@ run();
866908

867909
You can override the default server globally by passing a server name to the `server: keyof typeof ServerList` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers:
868910

869-
| Name | Server | Description |
870-
| ---- | ------------------------ | -------------------- |
871-
| `eu` | `https://api.mistral.ai` | EU Production server |
911+
| Name | Server | Description |
912+
| -------- | --------------------------- | ------------------------ |
913+
| `global` | `https://api.mistral.ai` | Global Production server |
914+
| `eu` | `https://api.eu.mistral.ai` | EU Production server |
915+
| `us` | `https://api.us.mistral.ai` | US Production server |
872916

873917
#### Example
874918

875919
```typescript
876920
import { Mistral } from "@mistralai/mistralai";
877921

878922
const mistral = new Mistral({
879-
server: "eu",
923+
server: "global",
880924
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
881925
});
882926

@@ -998,6 +1042,27 @@ async function run() {
9981042

9991043
run();
10001044

1045+
```
1046+
1047+
### Per-Operation Security Schemes
1048+
1049+
Some operations in this SDK require the security scheme to be specified at the request level. For example:
1050+
```typescript
1051+
import { Mistral } from "@mistralai/mistralai";
1052+
1053+
const mistral = new Mistral();
1054+
1055+
async function run() {
1056+
const result = await mistral.beta.users.getIdentity({
1057+
dashboardUserContextAuth: process.env["MISTRAL_DASHBOARD_USER_CONTEXT_AUTH"]
1058+
?? "",
1059+
});
1060+
1061+
console.log(result);
1062+
}
1063+
1064+
run();
1065+
10011066
```
10021067
<!-- End Authentication [security] -->
10031068

@@ -1039,7 +1104,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
10391104
- [`betaAgentsDeleteVersionAlias`](docs/sdks/betaagents/README.md#deleteversionalias) - Delete an agent version alias.
10401105
- [`betaAgentsGet`](docs/sdks/betaagents/README.md#get) - Retrieve an agent entity.
10411106
- [`betaAgentsGetVersion`](docs/sdks/betaagents/README.md#getversion) - Retrieve a specific version of an agent.
1042-
- [`betaAgentsList`](docs/sdks/betaagents/README.md#list) - List agent entities.
1107+
- [`betaAgentsListPages`](docs/sdks/betaagents/README.md#listpages) - List agent entities, cursor-paginated.
10431108
- [`betaAgentsListVersionAliases`](docs/sdks/betaagents/README.md#listversionaliases) - List all aliases for an agent.
10441109
- [`betaAgentsListVersions`](docs/sdks/betaagents/README.md#listversions) - List all versions of an agent.
10451110
- [`betaAgentsUpdate`](docs/sdks/betaagents/README.md#update) - Update an agent entity.
@@ -1056,6 +1121,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
10561121
- [`betaConnectorsDeactivateForUser`](docs/sdks/connectors/README.md#deactivateforuser) - Deactivate a connector for the current user.
10571122
- [`betaConnectorsDeactivateForWorkspace`](docs/sdks/connectors/README.md#deactivateforworkspace) - Deactivate a connector for a workspace.
10581123
- [`betaConnectorsDelete`](docs/sdks/connectors/README.md#delete) - Delete a connector.
1124+
- [`betaConnectorsDeleteAllUserCredentials`](docs/sdks/connectors/README.md#deleteallusercredentials) - Delete all user credentials for a connector.
10591125
- [`betaConnectorsDeleteOrganizationCredentials`](docs/sdks/connectors/README.md#deleteorganizationcredentials) - Delete organization credentials for a connector.
10601126
- [`betaConnectorsDeleteUserCredentials`](docs/sdks/connectors/README.md#deleteusercredentials) - Delete user credentials for a connector.
10611127
- [`betaConnectorsDeleteWorkspaceCredentials`](docs/sdks/connectors/README.md#deleteworkspacecredentials) - Delete workspace credentials for a connector.
@@ -1169,10 +1235,14 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
11691235
- [`betaRagIngestionPipelineConfigurationsUpdateRunInfo`](docs/sdks/ingestionpipelineconfigurations/README.md#updateruninfo) - Update Run Info
11701236
- [`betaRagSearchIndexesDocumentLookup`](docs/sdks/searchindexes/README.md#documentlookup) - Document Lookup
11711237
- [`betaRagSearchIndexesDocumentsFetch`](docs/sdks/searchindexes/README.md#documentsfetch) - Document Fetch
1238+
- [`betaRagSearchIndexesGenerateIndexSummary`](docs/sdks/searchindexes/README.md#generateindexsummary) - Generate a summary field for an index
1239+
- [`betaRagSearchIndexesGenerateSchemaSummary`](docs/sdks/searchindexes/README.md#generateschemasummary) - Generate a summary field for a schema
11721240
- [`betaRagSearchIndexesGetIndexDetail`](docs/sdks/searchindexes/README.md#getindexdetail) - Get Index Details
11731241
- [`betaRagSearchIndexesGetIndexSchemaDetail`](docs/sdks/searchindexes/README.md#getindexschemadetail) - Get Index Schema Detail
11741242
- [`betaRagSearchIndexesGetIndexSchemaFile`](docs/sdks/searchindexes/README.md#getindexschemafile) - Get Index Schema File
11751243
- [`betaRagSearchIndexesGetIndexSummaries`](docs/sdks/searchindexes/README.md#getindexsummaries) - Get Index Summaries
1244+
- [`betaRagSearchIndexesGetIndexSummary`](docs/sdks/searchindexes/README.md#getindexsummary) - Get Index Summary
1245+
- [`betaRagSearchIndexesGetSchemaSummary`](docs/sdks/searchindexes/README.md#getschemasummary) - Get Schema Summary
11761246
- [`betaRagSearchIndexesRegister`](docs/sdks/searchindexes/README.md#register) - Register (or re-register) a search index
11771247
- [`betaRagSearchIndexesSetIndexSummary`](docs/sdks/searchindexes/README.md#setindexsummary) - Set Index Summary
11781248
- [`betaRagSearchIndexesSetSchemaSummary`](docs/sdks/searchindexes/README.md#setschemasummary) - Set Schema Summary
@@ -1257,6 +1327,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
12571327
- [`workflowsSchedulesUpdateSchedule`](docs/sdks/schedules/README.md#updateschedule) - Update Schedule
12581328
- [`workflowsUnarchiveWorkflow`](docs/sdks/workflows/README.md#unarchiveworkflow) - Unarchive Workflow
12591329
- [`workflowsUpdateWorkflow`](docs/sdks/workflows/README.md#updateworkflow) - Update Workflow
1330+
- ~~[`betaAgentsList`](docs/sdks/betaagents/README.md#list)~~ - List agent entities. :warning: **Deprecated** Use [`betaAgentsListPages`](docs/sdks/betaagents/README.md#listpages) instead.
12601331
- ~~[`betaLibrariesDocumentsLibrariesDocumentsUpdateV1`](docs/sdks/documents/README.md#librariesdocumentsupdatev1)~~ - Update the metadata of a specific document. :warning: **Deprecated**
12611332
- ~~[`betaLibrariesLibrariesUpdateV1`](docs/sdks/libraries/README.md#librariesupdatev1)~~ - Update a library. :warning: **Deprecated**
12621333
- ~~[`workflowsExecuteWorkflowRegistration`](docs/sdks/workflows/README.md#executeworkflowregistration)~~ - Execute Workflow Registration :warning: **Deprecated**

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,4 +448,14 @@ Based on:
448448
### Generated
449449
- [typescript v2.4.1] .
450450
### Releases
451-
- [NPM v2.4.1] https://www.npmjs.com/package/@mistralai/mistralai/v/2.4.1 - .
451+
- [NPM v2.4.1] https://www.npmjs.com/package/@mistralai/mistralai/v/2.4.1 - .
452+
453+
## 2026-07-10 16:50:58
454+
### Changes
455+
Based on:
456+
- OpenAPI Doc
457+
- Speakeasy CLI 1.763.6 (2.884.13) https://github.com/speakeasy-api/speakeasy
458+
### Generated
459+
- [typescript v2.5.0] .
460+
### Releases
461+
- [NPM v2.5.0] https://www.npmjs.com/package/@mistralai/mistralai/v/2.5.0 - .
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# AgentListPage
2+
3+
## Example Usage
4+
5+
```typescript
6+
import { AgentListPage } from "@mistralai/mistralai/models/components";
7+
8+
let value: AgentListPage = {
9+
data: [
10+
{
11+
completionArgs: {
12+
responseFormat: {
13+
type: "text",
14+
},
15+
},
16+
model: "Grand Caravan",
17+
name: "<value>",
18+
id: "<id>",
19+
version: 18912,
20+
versions: [
21+
514031,
22+
225694,
23+
],
24+
createdAt: new Date("2024-06-26T21:04:00.097Z"),
25+
updatedAt: new Date("2026-03-25T22:28:44.753Z"),
26+
deploymentChat: true,
27+
source: "<value>",
28+
},
29+
],
30+
};
31+
```
32+
33+
## Fields
34+
35+
| Field | Type | Required | Description |
36+
| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
37+
| `object` | *"list"* | :heavy_minus_sign: | N/A |
38+
| `data` | [components.Agent](../../models/components/agent.md)[] | :heavy_check_mark: | N/A |
39+
| `nextPageToken` | *string* | :heavy_minus_sign: | N/A |

docs/models/components/authenticationconfiguration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ let value: AuthenticationConfiguration = {
1717
| Field | Type | Required | Description |
1818
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
1919
| `name` | *string* | :heavy_check_mark: | N/A |
20+
| `title` | *string* | :heavy_minus_sign: | N/A |
2021
| `authenticationType` | [components.OutboundAuthenticationType](../../models/components/outboundauthenticationtype.md) | :heavy_check_mark: | N/A |
2122
| `scope` | [components.ConsumerType](../../models/components/consumertype.md) | :heavy_check_mark: | N/A |
2223
| `status` | [components.CredentialsStatus](../../models/components/credentialsstatus.md) | :heavy_minus_sign: | N/A |

0 commit comments

Comments
 (0)