Skip to content

Commit

Permalink
Merge pull request #9 from speakeasy-sdks/speakeasy-sdk-regen-1717424377
Browse files Browse the repository at this point in the history
chore: 🐝 Update SDK - Generate
  • Loading branch information
ndimares authored Jun 3, 2024
2 parents 21dcd88 + 8b0eda6 commit 7cce432
Show file tree
Hide file tree
Showing 14 changed files with 85 additions and 24 deletions.
7 changes: 4 additions & 3 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 906577a1-c369-4ae0-9074-3e1b5123889d
management:
docChecksum: db1d0533eff822b87c5a83e84c107a1c
docChecksum: a0a1ee6e84a6bb71d9ae081a1e5e75af
docVersion: 1.0.0
speakeasyVersion: 1.299.5
generationVersion: 2.338.10
releaseVersion: 0.12.0
configChecksum: 4afcbc7695790cabde6b8e9ac4d552ce
releaseVersion: 0.12.1
configChecksum: 9350c0cbb2a92107e7da292cb2917ec6
repoURL: https://github.com/speakeasy-sdks/bar-typescript.git
repoSubDirectory: .
installationURL: https://github.com/speakeasy-sdks/bar-typescript
Expand Down Expand Up @@ -95,6 +95,7 @@ generatedFiles:
- docs/sdk/models/operations/listdrinksrequest.md
- docs/sdk/models/operations/listdrinksresponse.md
- docs/sdk/models/operations/listingredientsrequest.md
- docs/sdk/models/operations/data.md
- docs/sdk/models/operations/listingredientsresponsebody.md
- docs/sdk/models/operations/listingredientsresponse.md
- docs/sdk/models/operations/createorderrequest.md
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
typescript:
version: 0.12.0
version: 0.12.1
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand Down
8 changes: 4 additions & 4 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ speakeasyVersion: 1.299.5
sources:
bar-api:
sourceNamespace: bar-api
sourceRevisionDigest: sha256:74fec11ec3f5cba8f957506a63e0f753552434790282428f3a1e9aecae01288e
sourceBlobDigest: sha256:82a26183c39951e69bded5362879f4b8cd61142c01594aaef0992a77572799b5
sourceRevisionDigest: sha256:661b257fc392df52cf71d534396e1853e4fe4a225edc8038c4a5096b4cb1bedf
sourceBlobDigest: sha256:6ca8e48ede74e10b1ee6062a7a316b1ed07ff54d8cd293dff10d70df694c4351
tags:
- latest
- main
targets:
bar-typescript:
source: bar-api
sourceNamespace: bar-api
sourceRevisionDigest: sha256:74fec11ec3f5cba8f957506a63e0f753552434790282428f3a1e9aecae01288e
sourceBlobDigest: sha256:82a26183c39951e69bded5362879f4b8cd61142c01594aaef0992a77572799b5
sourceRevisionDigest: sha256:661b257fc392df52cf71d534396e1853e4fe4a225edc8038c4a5096b4cb1bedf
sourceBlobDigest: sha256:6ca8e48ede74e10b1ee6062a7a316b1ed07ff54d8cd293dff10d70df694c4351
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,14 @@ Based on:
### Generated
- [typescript v0.12.0] .
### Releases
- [NPM v0.12.0] https://www.npmjs.com/package/@speakeasy-sdks/speakeasy-bar/v/0.12.0 - .
- [NPM v0.12.0] https://www.npmjs.com/package/@speakeasy-sdks/speakeasy-bar/v/0.12.0 - .

## 2024-06-03 14:19:35
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.299.5 (2.338.10) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.12.1] .
### Releases
- [NPM v0.12.1] https://www.npmjs.com/package/@speakeasy-sdks/speakeasy-bar/v/0.12.1 - .
8 changes: 8 additions & 0 deletions docs/sdk/models/operations/data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Data


## Fields

| Field | Type | Required | Description |
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
| `resultArray` | [shared.Ingredient](../../../sdk/models/shared/ingredient.md)[] | :heavy_minus_sign: | N/A |
3 changes: 2 additions & 1 deletion docs/sdk/models/operations/listingredientsrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@

| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `ingredients` | *string*[] | :heavy_minus_sign: | A list of ingredients to filter by. If not provided all ingredients will be returned. |
| `ingredients` | *string*[] | :heavy_minus_sign: | A list of ingredients to filter by. If not provided all ingredients will be returned. |
| `page` | *number* | :heavy_check_mark: | N/A |
6 changes: 3 additions & 3 deletions docs/sdk/models/operations/listingredientsresponsebody.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ A list of ingredients.

## Fields

| Field | Type | Required | Description |
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
| `resultArray` | [shared.Ingredient](../../../sdk/models/shared/ingredient.md)[] | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description |
| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- |
| `data` | [operations.Data](../../../sdk/models/operations/data.md) | :heavy_minus_sign: | N/A |
3 changes: 2 additions & 1 deletion docs/sdks/ingredients/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const barSDK = new BarSDK({
});

async function run() {
const result = await barSDK.ingredients.listIngredients([
const result = await barSDK.ingredients.listIngredients(347327, [
"<value>",
]);

Expand All @@ -40,6 +40,7 @@ run();

| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `page` | *number* | :heavy_check_mark: | N/A |
| `ingredients` | *string*[] | :heavy_minus_sign: | A list of ingredients to filter by. If not provided all ingredients will be returned. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
Expand Down
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": "@speakeasy-sdks/speakeasy-bar",
"version": "0.12.0",
"version": "0.12.1",
"exports": {
".": "./src/index.ts",
"./sdk/models/errors": "./src/sdk/models/errors/index.ts",
Expand Down
4 changes: 2 additions & 2 deletions 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 package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@speakeasy-sdks/speakeasy-bar",
"version": "0.12.0",
"version": "0.12.1",
"author": "speakeasy-bar-test",
"main": "./index.js",
"sideEffects": false,
Expand Down
4 changes: 2 additions & 2 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.0.0",
sdkVersion: "0.12.0",
sdkVersion: "0.12.1",
genVersion: "2.338.10",
userAgent: "speakeasy-sdk/typescript 0.12.0 2.338.10 1.0.0 @speakeasy-sdks/speakeasy-bar",
userAgent: "speakeasy-sdk/typescript 0.12.1 2.338.10 1.0.0 @speakeasy-sdks/speakeasy-bar",
} as const;
3 changes: 3 additions & 0 deletions src/sdk/ingredients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ export class Ingredients extends ClientSDK {
* Get a list of ingredients, if authenticated this will include stock levels and product codes otherwise it will only include public information.
*/
async listIngredients(
page: number,
ingredients?: Array<string> | undefined,
options?: RequestOptions & { retries?: retries$.RetryConfig }
): Promise<operations.ListIngredientsResponse> {
const input$: operations.ListIngredientsRequest = {
ingredients: ingredients,
page: page,
};
const headers$ = new Headers();
headers$.set("user-agent", SDK_METADATA.userAgent);
Expand All @@ -70,6 +72,7 @@ export class Ingredients extends ClientSDK {
explode: false,
charEncoding: "percent",
}),
enc$.encodeForm("page", payload$.page, { explode: true, charEncoding: "percent" }),
]
.filter(Boolean)
.join("&");
Expand Down
45 changes: 41 additions & 4 deletions src/sdk/models/operations/listingredients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ export type ListIngredientsRequest = {
* A list of ingredients to filter by. If not provided all ingredients will be returned.
*/
ingredients?: Array<string> | undefined;
page: number;
};

export type Data = {
resultArray?: Array<shared.Ingredient> | undefined;
};

/**
* A list of ingredients.
*/
export type ListIngredientsResponseBody = {
resultArray?: Array<shared.Ingredient> | undefined;
data?: Data | undefined;
};

export type ListIngredientsResponse = {
Expand Down Expand Up @@ -47,31 +52,36 @@ export namespace ListIngredientsRequest$ {
export const inboundSchema: z.ZodType<ListIngredientsRequest, z.ZodTypeDef, unknown> = z
.object({
ingredients: z.array(z.string()).optional(),
page: z.number().int(),
})
.transform((v) => {
return {
...(v.ingredients === undefined ? null : { ingredients: v.ingredients }),
page: v.page,
};
});

export type Outbound = {
ingredients?: Array<string> | undefined;
page: number;
};

export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ListIngredientsRequest> = z
.object({
ingredients: z.array(z.string()).optional(),
page: z.number().int(),
})
.transform((v) => {
return {
...(v.ingredients === undefined ? null : { ingredients: v.ingredients }),
page: v.page,
};
});
}

/** @internal */
export namespace ListIngredientsResponseBody$ {
export const inboundSchema: z.ZodType<ListIngredientsResponseBody, z.ZodTypeDef, unknown> = z
export namespace Data$ {
export const inboundSchema: z.ZodType<Data, z.ZodTypeDef, unknown> = z
.object({
resultArray: z.array(shared.Ingredient$.inboundSchema).optional(),
})
Expand All @@ -85,7 +95,7 @@ export namespace ListIngredientsResponseBody$ {
resultArray?: Array<shared.Ingredient$.Outbound> | undefined;
};

export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ListIngredientsResponseBody> = z
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Data> = z
.object({
resultArray: z.array(shared.Ingredient$.outboundSchema).optional(),
})
Expand All @@ -96,6 +106,33 @@ export namespace ListIngredientsResponseBody$ {
});
}

/** @internal */
export namespace ListIngredientsResponseBody$ {
export const inboundSchema: z.ZodType<ListIngredientsResponseBody, z.ZodTypeDef, unknown> = z
.object({
data: z.lazy(() => Data$.inboundSchema).optional(),
})
.transform((v) => {
return {
...(v.data === undefined ? null : { data: v.data }),
};
});

export type Outbound = {
data?: Data$.Outbound | undefined;
};

export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ListIngredientsResponseBody> = z
.object({
data: z.lazy(() => Data$.outboundSchema).optional(),
})
.transform((v) => {
return {
...(v.data === undefined ? null : { data: v.data }),
};
});
}

/** @internal */
export namespace ListIngredientsResponse$ {
export const inboundSchema: z.ZodType<ListIngredientsResponse, z.ZodTypeDef, unknown> = z
Expand Down

0 comments on commit 7cce432

Please sign in to comment.