Skip to content

Commit 4a2d4c7

Browse files
SDK regeneration
1 parent 4d3b5cb commit 4a2d4c7

File tree

17 files changed

+191
-180
lines changed

17 files changed

+191
-180
lines changed

.fern/metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"cliVersion": "1.1.0",
2+
"cliVersion": "1.9.1",
33
"generatorName": "fernapi/fern-typescript-node-sdk",
4-
"generatorVersion": "3.29.2",
4+
"generatorVersion": "3.31.1",
55
"generatorConfig": {
66
"namespaceExport": "Credal",
77
"includeApiReference": true,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@credal/sdk",
3-
"version": "0.1.11",
3+
"version": "0.1.12",
44
"private": false,
55
"repository": "github:credal-ai/credal-typescript-sdk",
66
"type": "commonjs",

pnpm-lock.yaml

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

reference.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ await client.copilots.createCopilot({
5858
<dl>
5959
<dd>
6060

61-
**requestOptions:** `Copilots.RequestOptions`
61+
**requestOptions:** `CopilotsClient.RequestOptions`
6262

6363
</dd>
6464
</dl>
@@ -124,7 +124,7 @@ await client.copilots.createConversation({
124124
<dl>
125125
<dd>
126126

127-
**requestOptions:** `Copilots.RequestOptions`
127+
**requestOptions:** `CopilotsClient.RequestOptions`
128128

129129
</dd>
130130
</dl>
@@ -182,7 +182,7 @@ await client.copilots.provideMessageFeedback({
182182
<dl>
183183
<dd>
184184

185-
**requestOptions:** `Copilots.RequestOptions`
185+
**requestOptions:** `CopilotsClient.RequestOptions`
186186

187187
</dd>
188188
</dl>
@@ -242,7 +242,7 @@ await client.copilots.sendMessage({
242242
<dl>
243243
<dd>
244244

245-
**requestOptions:** `Copilots.RequestOptions`
245+
**requestOptions:** `CopilotsClient.RequestOptions`
246246

247247
</dd>
248248
</dl>
@@ -319,7 +319,7 @@ for await (const item of response) {
319319
<dl>
320320
<dd>
321321

322-
**requestOptions:** `Copilots.RequestOptions`
322+
**requestOptions:** `CopilotsClient.RequestOptions`
323323

324324
</dd>
325325
</dl>
@@ -385,7 +385,7 @@ await client.copilots.addCollectionToCopilot({
385385
<dl>
386386
<dd>
387387

388-
**requestOptions:** `Copilots.RequestOptions`
388+
**requestOptions:** `CopilotsClient.RequestOptions`
389389

390390
</dd>
391391
</dl>
@@ -451,7 +451,7 @@ await client.copilots.removeCollectionFromCopilot({
451451
<dl>
452452
<dd>
453453

454-
**requestOptions:** `Copilots.RequestOptions`
454+
**requestOptions:** `CopilotsClient.RequestOptions`
455455

456456
</dd>
457457
</dl>
@@ -525,7 +525,7 @@ await client.copilots.updateConfiguration({
525525
<dl>
526526
<dd>
527527

528-
**requestOptions:** `Copilots.RequestOptions`
528+
**requestOptions:** `CopilotsClient.RequestOptions`
529529

530530
</dd>
531531
</dl>
@@ -576,7 +576,7 @@ await client.copilots.deleteCopilot({
576576
<dl>
577577
<dd>
578578

579-
**requestOptions:** `Copilots.RequestOptions`
579+
**requestOptions:** `CopilotsClient.RequestOptions`
580580

581581
</dd>
582582
</dl>
@@ -632,7 +632,7 @@ await client.documentCatalog.uploadDocumentContents({
632632
<dl>
633633
<dd>
634634

635-
**requestOptions:** `DocumentCatalog.RequestOptions`
635+
**requestOptions:** `DocumentCatalogClient.RequestOptions`
636636

637637
</dd>
638638
</dl>
@@ -698,7 +698,7 @@ await client.documentCatalog.syncSourceByUrl({
698698
<dl>
699699
<dd>
700700

701-
**requestOptions:** `DocumentCatalog.RequestOptions`
701+
**requestOptions:** `DocumentCatalogClient.RequestOptions`
702702

703703
</dd>
704704
</dl>
@@ -784,7 +784,7 @@ await client.documentCatalog.metadata({
784784
<dl>
785785
<dd>
786786

787-
**requestOptions:** `DocumentCatalog.RequestOptions`
787+
**requestOptions:** `DocumentCatalogClient.RequestOptions`
788788

789789
</dd>
790790
</dl>
@@ -859,7 +859,7 @@ await client.documentCollections.addDocumentsToCollection({
859859
<dl>
860860
<dd>
861861

862-
**requestOptions:** `DocumentCollections.RequestOptions`
862+
**requestOptions:** `DocumentCollectionsClient.RequestOptions`
863863

864864
</dd>
865865
</dl>
@@ -933,7 +933,7 @@ await client.documentCollections.removeDocumentsFromCollection({
933933
<dl>
934934
<dd>
935935

936-
**requestOptions:** `DocumentCollections.RequestOptions`
936+
**requestOptions:** `DocumentCollectionsClient.RequestOptions`
937937

938938
</dd>
939939
</dl>
@@ -998,7 +998,7 @@ await client.documentCollections.listDocumentsInCollection({
998998
<dl>
999999
<dd>
10001000

1001-
**requestOptions:** `DocumentCollections.RequestOptions`
1001+
**requestOptions:** `DocumentCollectionsClient.RequestOptions`
10021002

10031003
</dd>
10041004
</dl>
@@ -1068,7 +1068,7 @@ await client.documentCollections.createCollection({
10681068
<dl>
10691069
<dd>
10701070

1071-
**requestOptions:** `DocumentCollections.RequestOptions`
1071+
**requestOptions:** `DocumentCollectionsClient.RequestOptions`
10721072

10731073
</dd>
10741074
</dl>
@@ -1133,7 +1133,7 @@ await client.documentCollections.deleteCollection({
11331133
<dl>
11341134
<dd>
11351135

1136-
**requestOptions:** `DocumentCollections.RequestOptions`
1136+
**requestOptions:** `DocumentCollectionsClient.RequestOptions`
11371137

11381138
</dd>
11391139
</dl>
@@ -1214,7 +1214,7 @@ await client.documentCollections.createMongoCollectionSync({
12141214
<dl>
12151215
<dd>
12161216

1217-
**requestOptions:** `DocumentCollections.RequestOptions`
1217+
**requestOptions:** `DocumentCollectionsClient.RequestOptions`
12181218

12191219
</dd>
12201220
</dl>
@@ -1295,7 +1295,7 @@ await client.documentCollections.updateMongoCollectionSync({
12951295
<dl>
12961296
<dd>
12971297

1298-
**requestOptions:** `DocumentCollections.RequestOptions`
1298+
**requestOptions:** `DocumentCollectionsClient.RequestOptions`
12991299

13001300
</dd>
13011301
</dl>
@@ -1376,7 +1376,7 @@ await client.search.searchDocumentCollection({
13761376
<dl>
13771377
<dd>
13781378

1379-
**requestOptions:** `Search.RequestOptions`
1379+
**requestOptions:** `SearchClient.RequestOptions`
13801380

13811381
</dd>
13821382
</dl>
@@ -1452,7 +1452,7 @@ await client.users.metadata([{
14521452
<dl>
14531453
<dd>
14541454

1455-
**requestOptions:** `Users.RequestOptions`
1455+
**requestOptions:** `UsersClient.RequestOptions`
14561456

14571457
</dd>
14581458
</dl>

src/BaseClient.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// This file was auto-generated by Fern from our API Definition.
22

3-
import type * as core from "./core/index.js";
3+
import { mergeHeaders } from "./core/headers.js";
4+
import * as core from "./core/index.js";
45
import type * as environments from "./environments.js";
56

67
export interface BaseClientOptions {
@@ -33,3 +34,23 @@ export interface BaseRequestOptions {
3334
/** Additional headers to include in the request. */
3435
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
3536
}
37+
38+
export function normalizeClientOptions<T extends BaseClientOptions>(options: T): T {
39+
const headers = mergeHeaders(
40+
{
41+
"X-Fern-Language": "JavaScript",
42+
"X-Fern-SDK-Name": "@credal/sdk",
43+
"X-Fern-SDK-Version": "0.1.12",
44+
"User-Agent": "@credal/sdk/0.1.12",
45+
"X-Fern-Runtime": core.RUNTIME.type,
46+
"X-Fern-Runtime-Version": core.RUNTIME.version,
47+
},
48+
options?.headers,
49+
);
50+
51+
return {
52+
...options,
53+
logging: core.logging.createLogger(options?.logging),
54+
headers,
55+
} as T;
56+
}

0 commit comments

Comments
 (0)