Skip to content

Commit 2810a1b

Browse files
committed
chore: definitive test fixtures/tests
1 parent f92c351 commit 2810a1b

7 files changed

Lines changed: 18 additions & 32 deletions

File tree

__tests__/fixtures/openai/methods.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,7 @@ import type {
3434
CreateModerationResponse,
3535
} from './models.js';
3636
import type { Simplify } from 'type-fest';
37-
import type {
38-
RuntimeOptions,
39-
RequestMethod,
40-
RequestMethodCaller,
41-
} from '@block65/rest-client';
37+
import type { RequestMethodCaller } from '@block65/rest-client';
4238

4339
/**
4440
* listEngines

__tests__/fixtures/openai/models.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2023-03-29T03:51:28.816Z
6+
* Generated on 2023-03-29T04:57:23.895Z
77
*
88
*/
99
export type DeleteModelResponse = {
@@ -76,9 +76,9 @@ export type CreateCompletionRequest = {
7676
* @example 1
7777
*/
7878
n?: number | null;
79-
stream?: boolean | null;
79+
stream?: boolean | null | undefined;
8080
logprobs?: number | null;
81-
echo?: boolean | null;
81+
echo?: boolean | null | undefined;
8282
stop?: string | null | undefined | string[] | null | undefined;
8383
presence_penalty?: number | null;
8484
frequency_penalty?: number | null;
@@ -407,7 +407,7 @@ export type CreateSearchRequest = {
407407
* @default 200
408408
*/
409409
max_rerank?: number | null;
410-
return_metadata?: boolean | null;
410+
return_metadata?: boolean | null | undefined;
411411
/**
412412
* A unique identifier representing your end-user, which can help OpenAI to
413413
* monitor and detect abuse. [Learn
@@ -491,8 +491,8 @@ export type CreateAnswerRequest = {
491491
*/
492492
n?: number | null;
493493
logit_bias?: {} | undefined;
494-
return_metadata?: boolean | null;
495-
return_prompt?: boolean | null;
494+
return_metadata?: boolean | null | undefined;
495+
return_prompt?: boolean | null | undefined;
496496
/**
497497
* If an object name is in the list, we provide the full information of the
498498
* object; otherwise, we only provide the object ID. Currently we support
@@ -563,8 +563,8 @@ export type CreateClassificationRequest = {
563563
*/
564564
max_examples?: number | null;
565565
logit_bias?: {} | undefined;
566-
return_prompt?: boolean | null;
567-
return_metadata?: boolean | null;
566+
return_prompt?: boolean | null | undefined;
567+
return_metadata?: boolean | null | undefined;
568568
/**
569569
* If an object name is in the list, we provide the full information of the
570570
* object; otherwise, we only provide the object ID. Currently we support
@@ -655,7 +655,7 @@ export type CreateFineTuneRequest = {
655655
* @default 0.01
656656
*/
657657
prompt_loss_weight?: number | null;
658-
compute_classification_metrics?: boolean | null;
658+
compute_classification_metrics?: boolean | null | undefined;
659659
classification_n_classes?: number | null;
660660
classification_positive_class?: string | null | undefined;
661661
/**
@@ -800,7 +800,7 @@ export type CreateChatCompletionRequest = {
800800
* @example 1
801801
*/
802802
n?: number | null;
803-
stream?: boolean | null;
803+
stream?: boolean | null | undefined;
804804
stop?: string | null | undefined | string[] | null | undefined;
805805
/**
806806
* The maximum number of tokens allowed for the generated answer. By default,

__tests__/fixtures/petstore/methods.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import type { FindPetsCommandQuery, Pet, NewPet } from './models.js';
22
import type { Simplify } from 'type-fest';
3-
import type {
4-
RuntimeOptions,
5-
RequestMethod,
6-
RequestMethodCaller,
7-
} from '@block65/rest-client';
3+
import type { RequestMethodCaller } from '@block65/rest-client';
84

95
/**
106
* Returns all pets from the system that the user has access to

__tests__/fixtures/petstore/models.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,21 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2023-03-29T03:39:45.421Z
6+
* Generated on 2023-03-29T04:57:18.928Z
77
*
88
*/
99
export type NewPet = {
1010
name: string;
1111
tag?: string | undefined;
1212
};
1313
export type Error = {
14-
/** */
1514
code: number;
1615
message: string;
1716
};
1817
export type Pet = NewPet & {
19-
/** */
2018
id: number;
2119
};
2220
export type FindPetsCommandQuery = {
2321
tags: string[];
24-
/** */
2522
limit: `${number}`;
2623
};

__tests__/fixtures/test1/methods.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ import type {
2020
UpdateBillingSubscriptionPromoCodeRequest,
2121
} from './models.js';
2222
import type { Simplify } from 'type-fest';
23-
import type {
24-
RuntimeOptions,
25-
RequestMethod,
26-
RequestMethodCaller,
27-
} from '@block65/rest-client';
23+
import type { RequestMethodCaller } from '@block65/rest-client';
2824

2925
/**
3026
* getOperationCommand

__tests__/fixtures/test1/models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2023-03-29T03:12:51.551Z
6+
* Generated on 2023-03-29T04:57:20.985Z
77
*
88
*/
99
export type Uuid = string;

__tests__/index.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, test } from '@jest/globals';
2-
import { logger } from './logger.js';
32
import { findPetsCommand } from './fixtures/petstore/methods.js';
3+
import { logger } from './logger.js';
44
import { ReferenceServiceClient } from './reference.js';
55

66
export const client = new ReferenceServiceClient({
@@ -15,7 +15,8 @@ describe('Basic', () => {
1515
.send(
1616
findPetsCommand({
1717
query: {
18-
// limit: 10,
18+
limit: '10',
19+
tags: ['tag1', 'tag2'],
1920
},
2021
}),
2122
)

0 commit comments

Comments
 (0)