Skip to content

Commit 8bd03f2

Browse files
🌿 Fern Regeneration -- October 17, 2024 (#42)
1 parent 552f3d0 commit 8bd03f2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1339
-316
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ jobs:
5050
- name: Publish to npm
5151
run: |
5252
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
53-
npm publish --access public
53+
npm publish --access public --tag beta
5454
env:
5555
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "@fern-api/sdk",
3-
"version": "0.12.3",
3+
"version": "0.13.0-beta0",
44
"private": false,
5-
"repository": "https://github.com/fern-api/fern-typescript",
5+
"repository": "https://github.com/fern-api/typescript-sdk",
66
"license": "MIT",
77
"main": "./index.js",
88
"types": "./index.d.ts",
@@ -19,7 +19,7 @@
1919
"node-fetch": "2.7.0",
2020
"qs": "6.11.2",
2121
"js-base64": "3.7.2",
22-
"@fern-api/template-resolver": "0.7.5"
22+
"@fern-api/template-resolver": "0.8.1"
2323
},
2424
"devDependencies": {
2525
"@types/url-join": "4.0.1",

reference.md

+178-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Get snippet by endpoint method and path
3939
```ts
4040
await fern.snippets.get({
4141
endpoint: {
42-
method: Fern.EndpointMethod.Get,
42+
method: Fern.HttpMethod.Get,
4343
path: "/v1/search",
4444
},
4545
});
@@ -212,7 +212,7 @@ await fern.templates.register({
212212
},
213213
endpointId: {
214214
path: "string",
215-
method: Fern.EndpointMethod.Put,
215+
method: Fern.HttpMethod.Get,
216216
identifierOverride: "string",
217217
},
218218
snippetTemplate: {
@@ -352,7 +352,7 @@ await fern.templates.registerBatch({
352352
},
353353
endpointId: {
354354
path: "string",
355-
method: Fern.EndpointMethod.Put,
355+
method: Fern.HttpMethod.Get,
356356
identifierOverride: "string",
357357
},
358358
snippetTemplate: {
@@ -490,7 +490,7 @@ await fern.templates.get({
490490
},
491491
endpointId: {
492492
path: "string",
493-
method: Fern.EndpointMethod.Put,
493+
method: Fern.HttpMethod.Get,
494494
identifierOverride: "string",
495495
},
496496
});
@@ -538,3 +538,177 @@ await fern.templates.get({
538538

539539
</dl>
540540
</details>
541+
542+
## Tokens
543+
544+
<details><summary> <code>fern.tokens.<a href="./src/api/resources/tokens/client/Client.ts">generate</a>({ ...params }) -> Fern.GenerateTokenResponse</code> </summary>
545+
546+
<dl>
547+
548+
<dd>
549+
550+
#### 📝 Description
551+
552+
<dl>
553+
554+
<dd>
555+
556+
<dl>
557+
558+
<dd>
559+
560+
Generate a token
561+
562+
</dd>
563+
564+
</dl>
565+
566+
</dd>
567+
568+
</dl>
569+
570+
#### 🔌 Usage
571+
572+
<dl>
573+
574+
<dd>
575+
576+
<dl>
577+
578+
<dd>
579+
580+
```ts
581+
await fern.tokens.generate({
582+
orgId: "string",
583+
scope: "string",
584+
});
585+
```
586+
587+
</dd>
588+
589+
</dl>
590+
591+
</dd>
592+
593+
</dl>
594+
595+
#### ⚙️ Parameters
596+
597+
<dl>
598+
599+
<dd>
600+
601+
<dl>
602+
603+
<dd>
604+
605+
**request: `Fern.GenerateTokenRequest`**
606+
607+
</dd>
608+
609+
</dl>
610+
611+
<dl>
612+
613+
<dd>
614+
615+
**requestOptions: `Tokens.RequestOptions`**
616+
617+
</dd>
618+
619+
</dl>
620+
621+
</dd>
622+
623+
</dl>
624+
625+
</dd>
626+
627+
</dl>
628+
</details>
629+
630+
<details><summary> <code>fern.tokens.<a href="./src/api/resources/tokens/client/Client.ts">revoke</a>({ ...params }) -> void</code> </summary>
631+
632+
<dl>
633+
634+
<dd>
635+
636+
#### 📝 Description
637+
638+
<dl>
639+
640+
<dd>
641+
642+
<dl>
643+
644+
<dd>
645+
646+
Revoke a token
647+
648+
</dd>
649+
650+
</dl>
651+
652+
</dd>
653+
654+
</dl>
655+
656+
#### 🔌 Usage
657+
658+
<dl>
659+
660+
<dd>
661+
662+
<dl>
663+
664+
<dd>
665+
666+
```ts
667+
await fern.tokens.revoke({
668+
orgId: "string",
669+
tokenId: "string",
670+
});
671+
```
672+
673+
</dd>
674+
675+
</dl>
676+
677+
</dd>
678+
679+
</dl>
680+
681+
#### ⚙️ Parameters
682+
683+
<dl>
684+
685+
<dd>
686+
687+
<dl>
688+
689+
<dd>
690+
691+
**request: `Fern.RevokeTokenRequest`**
692+
693+
</dd>
694+
695+
</dl>
696+
697+
<dl>
698+
699+
<dd>
700+
701+
**requestOptions: `Tokens.RequestOptions`**
702+
703+
</dd>
704+
705+
</dl>
706+
707+
</dd>
708+
709+
</dl>
710+
711+
</dd>
712+
713+
</dl>
714+
</details>

src/Client.ts

+8
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ import * as environments from "./environments";
66
import * as core from "./core";
77
import { Snippets } from "./api/resources/snippets/client/Client";
88
import { Templates } from "./api/resources/templates/client/Client";
9+
import { Tokens } from "./api/resources/tokens/client/Client";
910

1011
export declare namespace FernClient {
1112
interface Options {
1213
environment?: core.Supplier<environments.FernEnvironment | string>;
1314
token?: core.Supplier<core.BearerToken | undefined>;
15+
fetcher?: core.FetchFunction;
1416
}
1517

1618
interface RequestOptions {
@@ -34,4 +36,10 @@ export class FernClient {
3436
public get templates(): Templates {
3537
return (this._templates ??= new Templates(this._options));
3638
}
39+
40+
protected _tokens: Tokens | undefined;
41+
42+
public get tokens(): Tokens {
43+
return (this._tokens ??= new Tokens(this._options));
44+
}
3745
}

src/api/resources/api/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./resources";
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * as v1 from "./v1";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./resources";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * as read from "./read";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./resources";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * as type_ from "./type";
2+
export * from "./type/types";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./types";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
export interface Base64Type {
6+
default?: string;
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
export interface BigIntegerType {
6+
default?: string;
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
export interface BooleanType {
6+
default?: boolean;
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
export interface DateType {
6+
default?: string;
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
export interface DatetimeType {
6+
default?: string;
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
export interface DoubleType {
6+
minimum?: number;
7+
maximum?: number;
8+
default?: number;
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
export interface IntegerType {
6+
minimum?: number;
7+
maximum?: number;
8+
default?: number;
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
import * as Fern from "../../../../../../../../../index";
6+
7+
export interface ListType {
8+
itemType: Fern.api.v1.read.TypeReference;
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
import * as Fern from "../../../../../../../../../index";
6+
7+
export type LiteralType = Fern.api.v1.read.LiteralType.BooleanLiteral | Fern.api.v1.read.LiteralType.StringLiteral;
8+
9+
export declare namespace LiteralType {
10+
interface BooleanLiteral {
11+
type: "booleanLiteral";
12+
value: boolean;
13+
}
14+
15+
interface StringLiteral {
16+
type: "stringLiteral";
17+
value: string;
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
export interface LongType {
6+
minimum?: number;
7+
maximum?: number;
8+
default?: number;
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
import * as Fern from "../../../../../../../../../index";
6+
7+
export interface MapType {
8+
keyType: Fern.api.v1.read.TypeReference;
9+
valueType: Fern.api.v1.read.TypeReference;
10+
}

0 commit comments

Comments
 (0)