Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.462.2 (#67)
Browse files Browse the repository at this point in the history
Co-authored-by: speakeasybot <[email protected]>
  • Loading branch information
github-actions[bot] and speakeasybot authored Jan 6, 2025
1 parent e8aaabd commit df7960f
Show file tree
Hide file tree
Showing 20 changed files with 118 additions and 100 deletions.
12 changes: 6 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ speakeasyVersion: 1.462.2
sources:
mistral-azure-source:
sourceNamespace: mistral-azure-source
sourceRevisionDigest: sha256:9c35eed0174f2d8165807bcd7c8e7b7111fa97c059a77ae7eeaa352ca7e83b4d
sourceBlobDigest: sha256:07283bfde08363f9f69b133888b482472c4bf12d2e5b59cb33c8993c517278e3
sourceRevisionDigest: sha256:ff181b1e0e3894a4925f7ae87415323058538a13bae9d9d508a8fe3b6ec0e333
sourceBlobDigest: sha256:a2b4fd69298ebb9adb0d3c8dfb452db52defac512a7532203eebffb6a252df76
tags:
- latest
- speakeasy-sdk-regen-1733304480
- speakeasy-sdk-regen-1736159136
mistral-google-cloud-source:
sourceNamespace: mistral-google-cloud-source
sourceRevisionDigest: sha256:36c7de11e35023dc8fa5f3c0fb0e486d2a102275a2df808c08cfe9d43089be04
Expand All @@ -25,10 +25,10 @@ targets:
mistralai-azure-sdk:
source: mistral-azure-source
sourceNamespace: mistral-azure-source
sourceRevisionDigest: sha256:9c35eed0174f2d8165807bcd7c8e7b7111fa97c059a77ae7eeaa352ca7e83b4d
sourceBlobDigest: sha256:07283bfde08363f9f69b133888b482472c4bf12d2e5b59cb33c8993c517278e3
sourceRevisionDigest: sha256:ff181b1e0e3894a4925f7ae87415323058538a13bae9d9d508a8fe3b6ec0e333
sourceBlobDigest: sha256:a2b4fd69298ebb9adb0d3c8dfb452db52defac512a7532203eebffb6a252df76
codeSamplesNamespace: mistral-openapi-azure-code-samples
codeSamplesRevisionDigest: sha256:1918c360fdb31c721fbc4e47a1b54530ba8deb526e638c9e61f039027343696f
codeSamplesRevisionDigest: sha256:902b01df2818b55417d86da5fba172ba7270df700ecd23525c7652976a2e8d37
mistralai-gcp-sdk:
source: mistral-google-cloud-source
sourceNamespace: mistral-google-cloud-source
Expand Down
2 changes: 2 additions & 0 deletions packages/mistralai-azure/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/react-query
/.speakeasy/reports
/__tests__
/core.*
/funcs
Expand Down
3 changes: 3 additions & 0 deletions packages/mistralai-azure/.npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
**/*
!/FUNCTIONS.md
!/RUNTIMES.md
!/REACT_QUERY.md
!/**/*.ts
!/**/*.js
!/**/*.map
Expand Down
20 changes: 12 additions & 8 deletions packages/mistralai-azure/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 01e8a40b-3df3-4d9a-9501-2eb9e0d26c05
management:
docChecksum: 26271aa279a7a7182f7af19df8b67038
docChecksum: 4da7c33f650ddf206c58fa6c941d347f
docVersion: 0.0.2
speakeasyVersion: 1.451.1
generationVersion: 2.470.1
releaseVersion: 1.3.5
configChecksum: e32b498a394ce6079f7bced9cced33b5
speakeasyVersion: 1.462.2
generationVersion: 2.486.1
releaseVersion: 1.3.6
configChecksum: 1a7604afb27737dc44b544827a58e635
repoURL: https://github.com/mistralai/client-ts.git
repoSubDirectory: packages/mistralai-azure
installationURL: https://gitpkg.now.sh/mistralai/client-ts/packages/mistralai-azure
Expand All @@ -15,12 +15,12 @@ features:
typescript:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.11
core: 3.18.8
core: 3.18.12
defaultEnabledRetries: 0.1.0
enumUnions: 0.1.0
envVarSecurityUsage: 0.1.2
examples: 2.81.4
globalSecurity: 2.82.11
globalSecurity: 2.82.12
globalSecurityCallbacks: 0.1.0
globalSecurityFlattening: 0.1.0
globalServerURLs: 2.82.4
Expand Down Expand Up @@ -167,12 +167,16 @@ examples:
speakeasy-default-stream-chat:
requestBody:
application/json: {"model": "azureai", "messages": [{"content": "Who is the best French painter? Answer in one short sentence.", "role": "user"}]}
responses:
"422":
application/json: {}
chat_completion_v1_chat_completions_post:
speakeasy-default-chat-completion-v1-chat-completions-post:
requestBody:
application/json: {"model": "azureai", "messages": [{"content": "Who is the best French painter? Answer in one short sentence.", "role": "user"}]}
responses:
"200":
application/json: {"id": "cmpl-e5cc70bb28c444948073e77776eb30ef", "object": "chat.completion", "model": "mistral-small-latest", "usage": {"prompt_tokens": 16, "completion_tokens": 34, "total_tokens": 50}, "created": 1702256327, "choices": [{"index": 0, "finish_reason": "stop"}, {"index": 0, "finish_reason": "stop"}, {"index": 0, "finish_reason": "stop"}]}
"422": {}
"422":
application/json: {}
generatedTests: {}
2 changes: 1 addition & 1 deletion packages/mistralai-azure/.speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
typescript:
version: 1.3.5
version: 1.3.6
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand Down
12 changes: 11 additions & 1 deletion packages/mistralai-azure/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,14 @@ Based on:
### Generated
- [typescript v1.3.5] packages/mistralai-azure
### Releases
- [NPM v1.3.5] https://www.npmjs.com/package/@mistralai/mistralai-azure/v/1.3.5 - packages/mistralai-azure
- [NPM v1.3.5] https://www.npmjs.com/package/@mistralai/mistralai-azure/v/1.3.5 - packages/mistralai-azure

## 2025-01-06 10:25:32
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.462.2 (2.486.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v1.3.6] packages/mistralai-azure
### Releases
- [NPM v1.3.6] https://www.npmjs.com/package/@mistralai/mistralai-azure/v/1.3.6 - packages/mistralai-azure
28 changes: 27 additions & 1 deletion packages/mistralai-azure/RUNTIMES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Supported JavaScript runtimes

This SDK is intended to be used in JavaScript runtimes that support the following features:
This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features:

* [Web Fetch API][web-fetch]
* [Web Streams API][web-streams] and in particular `ReadableStream`
Expand All @@ -20,3 +20,29 @@ Runtime environments that are explicitly supported are:
- Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming])

[deno-file-streaming]: https://github.com/denoland/deno/issues/11018

## Recommended TypeScript compiler options

The following `tsconfig.json` options are recommended for projects using this
SDK in order to get static type support for features like async iterables,
streams and `fetch`-related APIs ([`for await...of`][for-await-of],
[`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and
so on):

[for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
[abort-signal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
[request]: https://developer.mozilla.org/en-US/docs/Web/API/Request
[response]: https://developer.mozilla.org/en-US/docs/Web/API/Response

```jsonc
{
"compilerOptions": {
"target": "es2020", // or higher
"lib": ["es2020", "dom", "dom.iterable"],
}
}
```

While `target` can be set to older ECMAScript versions, it may result in extra,
unnecessary compatibility code being generated if you are not targeting old
runtimes.
2 changes: 1 addition & 1 deletion packages/mistralai-azure/jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
"name": "@mistralai/mistralai-azure",
"version": "1.3.5",
"version": "1.3.6",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
Expand Down
63 changes: 2 additions & 61 deletions packages/mistralai-azure/package-lock.json

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

4 changes: 1 addition & 3 deletions packages/mistralai-azure/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mistralai/mistralai-azure",
"version": "1.3.5",
"version": "1.3.6",
"author": "Speakeasy",
"main": "./index.js",
"sideEffects": false,
Expand All @@ -15,8 +15,6 @@
"prepublishOnly": "npm run build"
},
"peerDependencies": {
"react": "^18 || ^19",
"react-dom": "^18 || ^19",
"zod": ">= 3"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/mistralai-azure/src/funcs/chatComplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export async function chatComplete(
const requestRes = client._createRequest(context, {
security: requestSecurity,
method: "POST",
baseURL: options?.serverURL,
path: path,
headers: headers,
body: body,
Expand Down
1 change: 1 addition & 0 deletions packages/mistralai-azure/src/funcs/chatStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export async function chatStream(
const requestRes = client._createRequest(context, {
security: requestSecurity,
method: "POST",
baseURL: options?.serverURL,
path: path,
headers: headers,
body: body,
Expand Down
20 changes: 20 additions & 0 deletions packages/mistralai-azure/src/hooks/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
BeforeCreateRequestHook,
BeforeRequestContext,
BeforeRequestHook,
Hook,
Hooks,
SDKInitHook,
SDKInitOptions,
Expand All @@ -27,6 +28,25 @@ export class SDKHooks implements Hooks {
afterErrorHooks: AfterErrorHook[] = [];

constructor() {
const presetHooks: Array<Hook> = [];

for (const hook of presetHooks) {
if ("sdkInit" in hook) {
this.registerSDKInitHook(hook);
}
if ("beforeCreateRequest" in hook) {
this.registerBeforeCreateRequestHook(hook);
}
if ("beforeRequest" in hook) {
this.registerBeforeRequestHook(hook);
}
if ("afterSuccess" in hook) {
this.registerAfterSuccessHook(hook);
}
if ("afterError" in hook) {
this.registerAfterErrorHook(hook);
}
}
initHooks(this);
}

Expand Down
7 changes: 7 additions & 0 deletions packages/mistralai-azure/src/hooks/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,10 @@ export interface Hooks {
/** Registers a hook to be used by the SDK for the after error event. */
registerAfterErrorHook(hook: AfterErrorHook): void;
}

export type Hook =
| SDKInitHook
| BeforeCreateRequestHook
| BeforeRequestHook
| AfterSuccessHook
| AfterErrorHook;
6 changes: 3 additions & 3 deletions packages/mistralai-azure/src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "0.0.2",
sdkVersion: "1.3.5",
genVersion: "2.470.1",
sdkVersion: "1.3.6",
genVersion: "2.486.1",
userAgent:
"speakeasy-sdk/typescript 1.3.5 2.470.1 0.0.2 @mistralai/mistralai-azure",
"speakeasy-sdk/typescript 1.3.6 2.486.1 0.0.2 @mistralai/mistralai-azure",
} as const;
7 changes: 6 additions & 1 deletion packages/mistralai-azure/src/lib/sdks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ export type RequestOptions = {
* Specifies the status codes which should be retried using the given retry policy.
*/
retryCodes?: string[];
/**
* Overrides the base server URL that will be used by an operation.
*/
serverURL?: string | URL;
/**
* Sets various request options on the `fetch` call made by an SDK method.
*
Expand All @@ -53,7 +57,7 @@ export type RequestOptions = {
type RequestConfig = {
method: string;
path: string;
baseURL?: string | URL;
baseURL?: string | URL | undefined;
query?: string;
body?: RequestInit["body"];
headers?: HeadersInit;
Expand Down Expand Up @@ -123,6 +127,7 @@ export class ClientSDK {
const inputURL = new URL(path, reqURL);

if (path) {
reqURL.pathname += reqURL.pathname.endsWith("/") ? "" : "/";
reqURL.pathname += inputURL.pathname.replace(/^\/+/, "");
}

Expand Down
Loading

0 comments on commit df7960f

Please sign in to comment.