From 99164debe012a86ac1bd00051cf1b08c7aa4b305 Mon Sep 17 00:00:00 2001 From: Amadeo Pellicce Date: Sat, 19 Oct 2024 03:23:53 +0200 Subject: [PATCH] feat(greenhouse): Greenhouse improvements (#30) * improving readme * adding job openings to greenhouse * bump patch * improve README * new package version --- README.md | 11 ++++++---- sdks/sdk-greenhouse/greenhouse.oas.json | 21 +++++++++++++++++++ sdks/sdk-greenhouse/greenhouse.oas.types.d.ts | 4 ++++ sdks/sdk-greenhouse/package.json | 2 +- sdks/sdk-greenhouse/src/greenhouse.oas.ts | 15 +++++++++++++ 5 files changed, 48 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5414cf4..3105dc4 100644 --- a/README.md +++ b/README.md @@ -455,10 +455,13 @@ On the other hand OpenSDKs is most valuable when you are working with multiple 3 0. Ensure you have built the CLI by running `cd packages/cli && pnpm install && pnpm run build` 1. Make any changes to the `src` folder of the package, usually in the `src/{name}.oas.ts` file -2. Run `turbo run generate --filter {package-name i.e. sdk-qbo}` to build the package -3. Ensure that your changes made it to the auto generated files in the package top level folder (i.e. `{name}.oas.types.d.ts` & `{name}.oas.json`) -4. Make sure you have bumped the version in `package.json` of the package you are releasing -5. Run `pnpm run release` to release the package from the directory of the package +2. Run `turbo run download --filter {package-name i.e. sdk-qbo}` to download the package +3. Run `turbo run generate --filter {package-name i.e. sdk-qbo}` to generate the package +4. Run `turbo run build --filter {package-name i.e. sdk-qbo}` to build the package +5. Ensure that your changes made it to the auto generated files in the package top level folder (i.e. `{name}.oas.types.d.ts` & `{name}.oas.json`) +6. Make sure you have bumped the version in `package.json` of the package you are releasing +7. Run `pnpm -r publish --no-git-checks` to release the package from the directory of the package +8. Push your changes to the repository ## Community diff --git a/sdks/sdk-greenhouse/greenhouse.oas.json b/sdks/sdk-greenhouse/greenhouse.oas.json index f639393..3decbd9 100644 --- a/sdks/sdk-greenhouse/greenhouse.oas.json +++ b/sdks/sdk-greenhouse/greenhouse.oas.json @@ -233,6 +233,27 @@ "description": "Filter openings by status. Can be \"open\", \"closed\", or \"all\". Defaults to \"open\".", "default": "open" } + }, + { + "in": "query", + "name": "per_page", + "description": "Return up to this number of objects per response. Must be an integer between 1 and 50. Defaults to 50.", + "schema": { + "type": "number", + "minimum": 1, + "maximum": 50, + "description": "Return up to this number of objects per response. Must be an integer between 1 and 50. Defaults to 50.", + "default": 50 + } + }, + { + "in": "query", + "name": "page", + "description": "A cursor for use in pagination. Returns the n-th chunk of per_page objects.", + "schema": { + "type": "number", + "description": "A cursor for use in pagination. Returns the n-th chunk of per_page objects." + } } ], "requestBody": { diff --git a/sdks/sdk-greenhouse/greenhouse.oas.types.d.ts b/sdks/sdk-greenhouse/greenhouse.oas.types.d.ts index 3260132..f138e40 100644 --- a/sdks/sdk-greenhouse/greenhouse.oas.types.d.ts +++ b/sdks/sdk-greenhouse/greenhouse.oas.types.d.ts @@ -397,6 +397,10 @@ export interface operations { query?: { /** @description Filter openings by status. Can be "open", "closed", or "all". Defaults to "open". */ status?: string + /** @description Return up to this number of objects per response. Must be an integer between 1 and 50. Defaults to 50. */ + per_page?: number + /** @description A cursor for use in pagination. Returns the n-th chunk of per_page objects. */ + page?: number } path: { /** @description The ID of the job to retrieve openings for */ diff --git a/sdks/sdk-greenhouse/package.json b/sdks/sdk-greenhouse/package.json index f0b2149..2d71d19 100644 --- a/sdks/sdk-greenhouse/package.json +++ b/sdks/sdk-greenhouse/package.json @@ -1,6 +1,6 @@ { "name": "@opensdks/sdk-greenhouse", - "version": "0.0.7", + "version": "0.0.8", "type": "module", "exports": { ".": { diff --git a/sdks/sdk-greenhouse/src/greenhouse.oas.ts b/sdks/sdk-greenhouse/src/greenhouse.oas.ts index 9bd986e..ca9c433 100644 --- a/sdks/sdk-greenhouse/src/greenhouse.oas.ts +++ b/sdks/sdk-greenhouse/src/greenhouse.oas.ts @@ -372,6 +372,21 @@ export const oas: OpenAPISpec = createDocument({ 'Filter openings by status. Can be "open", "closed", or "all". Defaults to "open".', ) .default('open'), + per_page: z + .number() + .min(1) + .max(50) + .optional() + .describe( + 'Return up to this number of objects per response. Must be an integer between 1 and 50. Defaults to 50.', + ) + .default(50), + page: z + .number() + .optional() + .describe( + 'A cursor for use in pagination. Returns the n-th chunk of per_page objects.', + ), }), response: z.array(greenhouseOpening), }),