Skip to content

release: 1.19.0 #295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b109397
feat(api): OpenAPI spec update via Stainless API (#296)
stainless-app[bot] Aug 27, 2024
2b8b0d7
chore(ci): check for build errors (#297)
stainless-app[bot] Aug 27, 2024
22df253
feat(api): OpenAPI spec update via Stainless API (#298)
stainless-app[bot] Aug 27, 2024
aeb5bd3
feat(api): OpenAPI spec update via Stainless API (#299)
stainless-app[bot] Aug 28, 2024
ab92cbf
feat(api): OpenAPI spec update via Stainless API (#300)
stainless-app[bot] Aug 28, 2024
0cd49b4
feat(api): OpenAPI spec update via Stainless API (#301)
stainless-app[bot] Aug 28, 2024
c78917f
feat(api): OpenAPI spec update via Stainless API (#302)
stainless-app[bot] Aug 28, 2024
dd0b8fb
feat(api): OpenAPI spec update via Stainless API (#303)
stainless-app[bot] Aug 28, 2024
cdd4c5f
feat(api): OpenAPI spec update via Stainless API (#304)
stainless-app[bot] Aug 28, 2024
9d85271
feat(api): OpenAPI spec update via Stainless API (#305)
stainless-app[bot] Aug 30, 2024
e19c47f
chore: run tsc as part of lint script (#306)
stainless-app[bot] Aug 30, 2024
8b757ee
chore(ci): install deps via ./script/bootstrap (#307)
stainless-app[bot] Aug 30, 2024
1c39d23
feat(api): OpenAPI spec update via Stainless API (#308)
stainless-app[bot] Aug 30, 2024
719efef
codegen metadata
stainless-bot Aug 30, 2024
e4cdb05
codegen metadata
stainless-bot Aug 30, 2024
0e176b1
codegen metadata
stainless-bot Sep 4, 2024
30fb68e
fix(client): correct File construction from node-fetch Responses (#309)
stainless-app[bot] Sep 4, 2024
7cf7730
codegen metadata
stainless-bot Sep 4, 2024
b352320
codegen metadata
stainless-bot Sep 4, 2024
ca50717
codegen metadata
stainless-bot Sep 4, 2024
fb61fb7
codegen metadata
stainless-bot Sep 5, 2024
1f4716c
codegen metadata
stainless-bot Sep 5, 2024
2f958c9
codegen metadata
stainless-bot Sep 5, 2024
472f6ac
codegen metadata
stainless-bot Sep 5, 2024
bf9ac81
fix file permissions
Sep 6, 2024
80d0a53
feat(api): OpenAPI spec update via Stainless API (#311)
stainless-app[bot] Sep 14, 2024
14613c4
chore(internal): codegen related update (#312)
stainless-app[bot] Sep 14, 2024
694c64f
fix(errors): pass message through to APIConnectionError (#313)
stainless-app[bot] Sep 14, 2024
2aa9f07
chore: better object fallback behaviour for casting errors (#314)
stainless-app[bot] Sep 14, 2024
d24e88f
docs: update CONTRIBUTING.md (#315)
stainless-app[bot] Sep 14, 2024
13a8ec8
release: 1.19.0
stainless-app[bot] Sep 14, 2024
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
Empty file modified .devcontainer/Dockerfile
100755 → 100644
Empty file.
Empty file modified .devcontainer/devcontainer.json
100755 → 100644
Empty file.
Empty file modified .eslintrc.js
100755 → 100644
Empty file.
23 changes: 21 additions & 2 deletions .github/workflows/ci.yml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,30 @@ jobs:
with:
node-version: '18'

- name: Install dependencies
run: yarn install
- name: Bootstrap
run: ./scripts/bootstrap

- name: Check types
run: ./scripts/lint

build:
name: build
runs-on: ubuntu-latest


steps:
- uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Bootstrap
run: ./scripts/bootstrap

- name: Check build
run: ./scripts/build
test:
name: test
runs-on: ubuntu-latest
Expand Down
Empty file modified .github/workflows/publish-npm.yml
100755 → 100644
Empty file.
Empty file modified .github/workflows/release-doctor.yml
100755 → 100644
Empty file.
Empty file modified .gitignore
100755 → 100644
Empty file.
Empty file modified .prettierignore
100755 → 100644
Empty file.
Empty file modified .prettierrc.json
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.18.0"
".": "1.19.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prompt-foundry%2Fprompt-foundry-sdk-84eb1e848fd165a965df78740df71651a8b413f023e5fdb6eb1acb9cce08e006.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prompt-foundry%2Fprompt-foundry-sdk-d232bc0a3409f271bb778f567e5caeb18bea44e721c3d82a78f475f9ca3faa2b.yml
Empty file modified Brewfile
100755 → 100644
Empty file.
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# Changelog

## 1.19.0 (2024-09-14)

Full Changelog: [v1.18.0...v1.19.0](https://github.com/prompt-foundry/typescript-sdk/compare/v1.18.0...v1.19.0)

### Features

* **api:** OpenAPI spec update via Stainless API ([#296](https://github.com/prompt-foundry/typescript-sdk/issues/296)) ([b109397](https://github.com/prompt-foundry/typescript-sdk/commit/b1093976c3be6e8389d65d127ebe856d2a34ff9b))
* **api:** OpenAPI spec update via Stainless API ([#298](https://github.com/prompt-foundry/typescript-sdk/issues/298)) ([22df253](https://github.com/prompt-foundry/typescript-sdk/commit/22df253af20a541055c4343da65e7ef0774980b0))
* **api:** OpenAPI spec update via Stainless API ([#299](https://github.com/prompt-foundry/typescript-sdk/issues/299)) ([aeb5bd3](https://github.com/prompt-foundry/typescript-sdk/commit/aeb5bd3613548139d4fbf332a2f48ef110ac87b1))
* **api:** OpenAPI spec update via Stainless API ([#300](https://github.com/prompt-foundry/typescript-sdk/issues/300)) ([ab92cbf](https://github.com/prompt-foundry/typescript-sdk/commit/ab92cbf32a5e3373825d653b8b19ecdbd93c6fe7))
* **api:** OpenAPI spec update via Stainless API ([#301](https://github.com/prompt-foundry/typescript-sdk/issues/301)) ([0cd49b4](https://github.com/prompt-foundry/typescript-sdk/commit/0cd49b4545499086879da70f5f620e90b189a6e6))
* **api:** OpenAPI spec update via Stainless API ([#302](https://github.com/prompt-foundry/typescript-sdk/issues/302)) ([c78917f](https://github.com/prompt-foundry/typescript-sdk/commit/c78917fe2d358ba099969afb3a7982614c693c75))
* **api:** OpenAPI spec update via Stainless API ([#303](https://github.com/prompt-foundry/typescript-sdk/issues/303)) ([dd0b8fb](https://github.com/prompt-foundry/typescript-sdk/commit/dd0b8fb614803dd001962871ad6964c0c48b8751))
* **api:** OpenAPI spec update via Stainless API ([#304](https://github.com/prompt-foundry/typescript-sdk/issues/304)) ([cdd4c5f](https://github.com/prompt-foundry/typescript-sdk/commit/cdd4c5fa4a07b7e7e84e424bd6c56e92f0c16559))
* **api:** OpenAPI spec update via Stainless API ([#305](https://github.com/prompt-foundry/typescript-sdk/issues/305)) ([9d85271](https://github.com/prompt-foundry/typescript-sdk/commit/9d85271e34f76fbf1dcb2b9f37e05d88f10bdb2e))
* **api:** OpenAPI spec update via Stainless API ([#308](https://github.com/prompt-foundry/typescript-sdk/issues/308)) ([1c39d23](https://github.com/prompt-foundry/typescript-sdk/commit/1c39d23aaf9c86dd2eebd094ca2f768bd4ea2291))
* **api:** OpenAPI spec update via Stainless API ([#311](https://github.com/prompt-foundry/typescript-sdk/issues/311)) ([80d0a53](https://github.com/prompt-foundry/typescript-sdk/commit/80d0a53aefee1441308ae23ef509a3672692a5c7))


### Bug Fixes

* **client:** correct File construction from node-fetch Responses ([#309](https://github.com/prompt-foundry/typescript-sdk/issues/309)) ([30fb68e](https://github.com/prompt-foundry/typescript-sdk/commit/30fb68e1fa8fcbecc0372d6357d7258fa04655b8))
* **errors:** pass message through to APIConnectionError ([#313](https://github.com/prompt-foundry/typescript-sdk/issues/313)) ([694c64f](https://github.com/prompt-foundry/typescript-sdk/commit/694c64f2fa194e9bc5497facd1671efd7b300f5e))


### Chores

* better object fallback behaviour for casting errors ([#314](https://github.com/prompt-foundry/typescript-sdk/issues/314)) ([2aa9f07](https://github.com/prompt-foundry/typescript-sdk/commit/2aa9f07f487316818567b6963dce705d48d8233e))
* **ci:** check for build errors ([#297](https://github.com/prompt-foundry/typescript-sdk/issues/297)) ([2b8b0d7](https://github.com/prompt-foundry/typescript-sdk/commit/2b8b0d7841454afe4a164217a1cccd7e3d58e2a5))
* **ci:** install deps via ./script/bootstrap ([#307](https://github.com/prompt-foundry/typescript-sdk/issues/307)) ([8b757ee](https://github.com/prompt-foundry/typescript-sdk/commit/8b757ee63f894eb9498d575f2155732703d10995))
* **internal:** codegen related update ([#312](https://github.com/prompt-foundry/typescript-sdk/issues/312)) ([14613c4](https://github.com/prompt-foundry/typescript-sdk/commit/14613c4fc73afd6fadaae1fb9e1de40af7edc889))
* run tsc as part of lint script ([#306](https://github.com/prompt-foundry/typescript-sdk/issues/306)) ([e19c47f](https://github.com/prompt-foundry/typescript-sdk/commit/e19c47f427c47c2a645f03e1b1e2934acd5bc27e))


### Documentation

* update CONTRIBUTING.md ([#315](https://github.com/prompt-foundry/typescript-sdk/issues/315)) ([d24e88f](https://github.com/prompt-foundry/typescript-sdk/commit/d24e88f6ed1cfc692972c6200d89e6b2d5f2cc07))

## 1.18.0 (2024-08-26)

Full Changelog: [v1.17.0...v1.18.0](https://github.com/prompt-foundry/typescript-sdk/compare/v1.17.0...v1.18.0)
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ This will install all the required dependencies and build output files to `dist/

## Modifying/Adding code

Most of the SDK is generated code, and any modified code will be overridden on the next generation. The
`src/lib/` and `examples/` directories are exceptions and will never be overridden.
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may
result in merge conflicts between manual patches and changes from the generator. The generator will never
modify the contents of the `src/lib/` and `examples/` directories.

## Adding and running examples

All files in the `examples/` directory are not modified by the Stainless generator and can be freely edited or
added to.
All files in the `examples/` directory are not modified by the generator and can be freely edited or added to.

```bash
// add an example to examples/<your-example>.ts
Expand Down
Empty file modified LICENSE
100755 → 100644
Empty file.
Empty file modified README.md
100755 → 100644
Empty file.
Empty file modified SECURITY.md
100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions api.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Methods:

Types:

- <code><a href="./src/resources/prompts.ts">Parameters</a></code>
- <code><a href="./src/resources/prompts.ts">PromptConfiguration</a></code>
- <code><a href="./src/resources/prompts.ts">PromptListResponse</a></code>
- <code><a href="./src/resources/prompts.ts">PromptDeleteResponse</a></code>
- <code><a href="./src/resources/prompts.ts">PromptGetParametersResponse</a></code>

Methods:

Expand All @@ -24,7 +24,7 @@ Methods:
- <code title="get /sdk/v1/prompts">client.prompts.<a href="./src/resources/prompts.ts">list</a>() -> PromptListResponse</code>
- <code title="delete /sdk/v1/prompts/{id}">client.prompts.<a href="./src/resources/prompts.ts">delete</a>(id) -> PromptDeleteResponse</code>
- <code title="get /sdk/v1/prompts/{id}">client.prompts.<a href="./src/resources/prompts.ts">get</a>(id) -> PromptConfiguration</code>
- <code title="post /sdk/v1/prompts/{id}">client.prompts.<a href="./src/resources/prompts.ts">getParameters</a>(id, { ...params }) -> Parameters</code>
- <code title="post /sdk/v1/prompts/{id}">client.prompts.<a href="./src/resources/prompts.ts">getParameters</a>(id, { ...params }) -> PromptGetParametersResponse</code>

# Tools

Expand Down
Empty file modified bin/check-release-environment
100755 → 100644
Empty file.
Empty file modified bin/publish-npm
100755 → 100644
Empty file.
Empty file modified examples/.keep
100755 → 100644
Empty file.
Empty file modified jest.config.ts
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion package.json
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prompt-foundry/typescript-sdk",
"version": "1.18.0",
"version": "1.19.0",
"description": "The official TypeScript library for the Prompt Foundry API",
"author": "Prompt Foundry <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
Empty file modified release-please-config.json
100755 → 100644
Empty file.
3 changes: 3 additions & 0 deletions scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ cd "$(dirname "$0")/.."

echo "==> Running eslint"
ESLINT_USE_FLAT_CONFIG="false" ./node_modules/.bin/eslint --ext ts,js .

echo "==> Running tsc"
./node_modules/.bin/tsc --noEmit
Empty file modified scripts/utils/check-version.cjs
100755 → 100644
Empty file.
Empty file modified scripts/utils/fix-index-exports.cjs
100755 → 100644
Empty file.
Empty file modified scripts/utils/make-dist-package-json.cjs
100755 → 100644
Empty file.
Empty file modified scripts/utils/postprocess-files.cjs
100755 → 100644
Empty file.
Empty file modified src/_shims/MultipartBody.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/README.md
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/runtime-bun.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/runtime-deno.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/runtime-node.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/runtime.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/types-deno.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/types-node.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/types.d.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/types.js
100755 → 100644
Empty file.
Empty file modified src/_shims/auto/types.mjs
100755 → 100644
Empty file.
Empty file modified src/_shims/bun-runtime.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/index-deno.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/index.d.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/index.js
100755 → 100644
Empty file.
Empty file modified src/_shims/index.mjs
100755 → 100644
Empty file.
Empty file modified src/_shims/manual-types.d.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/manual-types.js
100755 → 100644
Empty file.
Empty file modified src/_shims/manual-types.mjs
100755 → 100644
Empty file.
Empty file modified src/_shims/node-runtime.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/node-types.d.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/node-types.js
100755 → 100644
Empty file.
Empty file modified src/_shims/node-types.mjs
100755 → 100644
Empty file.
Empty file modified src/_shims/registry.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/web-runtime.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/web-types.d.ts
100755 → 100644
Empty file.
Empty file modified src/_shims/web-types.js
100755 → 100644
Empty file.
Empty file modified src/_shims/web-types.mjs
100755 → 100644
Empty file.
5 changes: 5 additions & 0 deletions src/core.ts
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,11 @@ const validatePositiveInteger = (name: string, n: unknown): number => {

export const castToError = (err: any): Error => {
if (err instanceof Error) return err;
if (typeof err === 'object' && err !== null) {
try {
return new Error(JSON.stringify(err));
} catch {}
}
return new Error(err);
};

Expand Down
4 changes: 2 additions & 2 deletions src/error.ts
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class APIError extends PromptFoundryError {
headers: Headers | undefined,
) {
if (!status) {
return new APIConnectionError({ cause: castToError(errorResponse) });
return new APIConnectionError({ message, cause: castToError(errorResponse) });
}

const error = errorResponse as Record<string, any>;
Expand Down Expand Up @@ -101,7 +101,7 @@ export class APIUserAbortError extends APIError {
export class APIConnectionError extends APIError {
override readonly status: undefined = undefined;

constructor({ message, cause }: { message?: string; cause?: Error | undefined }) {
constructor({ message, cause }: { message?: string | undefined; cause?: Error | undefined }) {
super(undefined, undefined, message || 'Connection error.', undefined);
// in some environments the 'cause' property is already declared
// @ts-ignore
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ export namespace PromptFoundry {
export import CompletionCreateParams = API.CompletionCreateParams;

export import Prompts = API.Prompts;
export import Parameters = API.Parameters;
export import PromptConfiguration = API.PromptConfiguration;
export import PromptListResponse = API.PromptListResponse;
export import PromptDeleteResponse = API.PromptDeleteResponse;
export import PromptGetParametersResponse = API.PromptGetParametersResponse;
export import PromptCreateParams = API.PromptCreateParams;
export import PromptUpdateParams = API.PromptUpdateParams;
export import PromptGetParametersParams = API.PromptGetParametersParams;
Expand Down
Empty file modified src/lib/.keep
100755 → 100644
Empty file.
Empty file modified src/resource.ts
100755 → 100644
Empty file.
Empty file modified src/resources/completion.ts
100755 → 100644
Empty file.
Empty file modified src/resources/evaluation-assertions.ts
100755 → 100644
Empty file.
Empty file modified src/resources/evaluations.ts
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion src/resources/index.ts
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ export {
EvaluationAssertions,
} from './evaluation-assertions';
export {
Parameters,
PromptConfiguration,
PromptListResponse,
PromptDeleteResponse,
PromptGetParametersResponse,
PromptCreateParams,
PromptUpdateParams,
PromptGetParametersParams,
Expand Down
Loading