Skip to content

Commit 3527621

Browse files
stainless-app[bot]meorphis
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#92)
1 parent 2b08413 commit 3527621

File tree

7 files changed

+17
-11
lines changed

7 files changed

+17
-11
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 21
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prompt-foundry%2Fprompt-foundry-sdk-972b22a25d0d8bc0d4434735eb429ca11023968e7f14a1a39d48a1949386aa3b.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prompt-foundry%2Fprompt-foundry-sdk-4137caec48206e984cbf62aabf1bd1f76c525ac66c0ad16760e49564095b2877.yml

src/index.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
import * as Core from './core';
43
import * as Errors from './error';
5-
import { type Agent } from './_shims/index';
64
import * as Uploads from './uploads';
5+
import { type Agent } from './_shims/index';
6+
import * as Core from '@prompt-foundry/typescript-sdk/core';
77
import * as API from '@prompt-foundry/typescript-sdk/resources/index';
88

99
export interface ClientOptions {
@@ -69,7 +69,9 @@ export interface ClientOptions {
6969
defaultQuery?: Core.DefaultQuery;
7070
}
7171

72-
/** API Client for interfacing with the Prompt Foundry API. */
72+
/**
73+
* API Client for interfacing with the Prompt Foundry API.
74+
*/
7375
export class PromptFoundry extends Core.APIClient {
7476
apiKey: string;
7577

@@ -117,6 +119,7 @@ export class PromptFoundry extends Core.APIClient {
117119
maxRetries: options.maxRetries,
118120
fetch: options.fetch,
119121
});
122+
120123
this._options = options;
121124

122125
this.apiKey = apiKey;

src/resources/evaluation-assertions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
import * as Core from '@prompt-foundry/typescript-sdk/core';
43
import { APIResource } from '@prompt-foundry/typescript-sdk/resource';
54
import { isRequestOptions } from '@prompt-foundry/typescript-sdk/core';
5+
import * as Core from '@prompt-foundry/typescript-sdk/core';
66
import * as EvaluationAssertionsAPI from '@prompt-foundry/typescript-sdk/resources/evaluation-assertions';
77

88
export class EvaluationAssertions extends APIResource {

src/resources/evaluations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
import * as Core from '@prompt-foundry/typescript-sdk/core';
43
import { APIResource } from '@prompt-foundry/typescript-sdk/resource';
4+
import * as Core from '@prompt-foundry/typescript-sdk/core';
55
import * as EvaluationsAPI from '@prompt-foundry/typescript-sdk/resources/evaluations';
66

77
export class Evaluations extends APIResource {

src/resources/prompts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
import * as Core from '@prompt-foundry/typescript-sdk/core';
43
import { APIResource } from '@prompt-foundry/typescript-sdk/resource';
54
import { isRequestOptions } from '@prompt-foundry/typescript-sdk/core';
5+
import * as Core from '@prompt-foundry/typescript-sdk/core';
66
import * as PromptsAPI from '@prompt-foundry/typescript-sdk/resources/prompts';
77

88
export class Prompts extends APIResource {

src/resources/tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
import * as Core from '@prompt-foundry/typescript-sdk/core';
43
import { APIResource } from '@prompt-foundry/typescript-sdk/resource';
4+
import * as Core from '@prompt-foundry/typescript-sdk/core';
55
import * as ToolsAPI from '@prompt-foundry/typescript-sdk/resources/tools';
66

77
export class Tools extends APIResource {

tests/stringifyQuery.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import { APIClient } from '@prompt-foundry/typescript-sdk/core';
1+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
const { stringifyQuery } = APIClient.prototype as any;
3+
import { PromptFoundry } from '@prompt-foundry/typescript-sdk';
44

5-
describe('APIClient.stringifyQuery', () => {
5+
const { stringifyQuery } = PromptFoundry.prototype as any;
6+
7+
describe(stringifyQuery, () => {
68
for (const [input, expected] of [
79
[{ a: '1', b: 2, c: true }, 'a=1&b=2&c=true'],
810
[{ a: null, b: false, c: undefined }, 'a=&b=false'],
@@ -18,6 +20,7 @@ describe('APIClient.stringifyQuery', () => {
1820
expect(stringifyQuery(input)).toEqual(expected);
1921
});
2022
}
23+
2124
for (const value of [[], {}, new Date()]) {
2225
it(`${JSON.stringify(value)} -> <error>`, () => {
2326
expect(() => stringifyQuery({ value })).toThrow(`Cannot stringify type ${typeof value}`);

0 commit comments

Comments
 (0)