Skip to content

🌿 Fern Regeneration -- October 17, 2024 #42

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

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ jobs:
- name: Publish to npm
run: |
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
npm publish --access public
npm publish --access public --tag beta
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@fern-api/sdk",
"version": "0.12.3",
"version": "0.13.0-beta0",
"private": false,
"repository": "https://github.com/fern-api/fern-typescript",
"repository": "https://github.com/fern-api/typescript-sdk",
"license": "MIT",
"main": "./index.js",
"types": "./index.d.ts",
Expand All @@ -19,7 +19,7 @@
"node-fetch": "2.7.0",
"qs": "6.11.2",
"js-base64": "3.7.2",
"@fern-api/template-resolver": "0.7.5"
"@fern-api/template-resolver": "0.8.1"
},
"devDependencies": {
"@types/url-join": "4.0.1",
Expand Down
182 changes: 178 additions & 4 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Get snippet by endpoint method and path
```ts
await fern.snippets.get({
endpoint: {
method: Fern.EndpointMethod.Get,
method: Fern.HttpMethod.Get,
path: "/v1/search",
},
});
Expand Down Expand Up @@ -212,7 +212,7 @@ await fern.templates.register({
},
endpointId: {
path: "string",
method: Fern.EndpointMethod.Put,
method: Fern.HttpMethod.Get,
identifierOverride: "string",
},
snippetTemplate: {
Expand Down Expand Up @@ -352,7 +352,7 @@ await fern.templates.registerBatch({
},
endpointId: {
path: "string",
method: Fern.EndpointMethod.Put,
method: Fern.HttpMethod.Get,
identifierOverride: "string",
},
snippetTemplate: {
Expand Down Expand Up @@ -490,7 +490,7 @@ await fern.templates.get({
},
endpointId: {
path: "string",
method: Fern.EndpointMethod.Put,
method: Fern.HttpMethod.Get,
identifierOverride: "string",
},
});
Expand Down Expand Up @@ -538,3 +538,177 @@ await fern.templates.get({

</dl>
</details>

## Tokens

<details><summary> <code>fern.tokens.<a href="./src/api/resources/tokens/client/Client.ts">generate</a>({ ...params }) -> Fern.GenerateTokenResponse</code> </summary>

<dl>

<dd>

#### 📝 Description

<dl>

<dd>

<dl>

<dd>

Generate a token

</dd>

</dl>

</dd>

</dl>

#### 🔌 Usage

<dl>

<dd>

<dl>

<dd>

```ts
await fern.tokens.generate({
orgId: "string",
scope: "string",
});
```

</dd>

</dl>

</dd>

</dl>

#### ⚙️ Parameters

<dl>

<dd>

<dl>

<dd>

**request: `Fern.GenerateTokenRequest`**

</dd>

</dl>

<dl>

<dd>

**requestOptions: `Tokens.RequestOptions`**

</dd>

</dl>

</dd>

</dl>

</dd>

</dl>
</details>

<details><summary> <code>fern.tokens.<a href="./src/api/resources/tokens/client/Client.ts">revoke</a>({ ...params }) -> void</code> </summary>

<dl>

<dd>

#### 📝 Description

<dl>

<dd>

<dl>

<dd>

Revoke a token

</dd>

</dl>

</dd>

</dl>

#### 🔌 Usage

<dl>

<dd>

<dl>

<dd>

```ts
await fern.tokens.revoke({
orgId: "string",
tokenId: "string",
});
```

</dd>

</dl>

</dd>

</dl>

#### ⚙️ Parameters

<dl>

<dd>

<dl>

<dd>

**request: `Fern.RevokeTokenRequest`**

</dd>

</dl>

<dl>

<dd>

**requestOptions: `Tokens.RequestOptions`**

</dd>

</dl>

</dd>

</dl>

</dd>

</dl>
</details>
8 changes: 8 additions & 0 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import * as environments from "./environments";
import * as core from "./core";
import { Snippets } from "./api/resources/snippets/client/Client";
import { Templates } from "./api/resources/templates/client/Client";
import { Tokens } from "./api/resources/tokens/client/Client";

export declare namespace FernClient {
interface Options {
environment?: core.Supplier<environments.FernEnvironment | string>;
token?: core.Supplier<core.BearerToken | undefined>;
fetcher?: core.FetchFunction;
}

interface RequestOptions {
Expand All @@ -34,4 +36,10 @@ export class FernClient {
public get templates(): Templates {
return (this._templates ??= new Templates(this._options));
}

protected _tokens: Tokens | undefined;

public get tokens(): Tokens {
return (this._tokens ??= new Tokens(this._options));
}
}
1 change: 1 addition & 0 deletions src/api/resources/api/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./resources";
1 change: 1 addition & 0 deletions src/api/resources/api/resources/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * as v1 from "./v1";
1 change: 1 addition & 0 deletions src/api/resources/api/resources/v1/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./resources";
1 change: 1 addition & 0 deletions src/api/resources/api/resources/v1/resources/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * as read from "./read";
1 change: 1 addition & 0 deletions src/api/resources/api/resources/v1/resources/read/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./resources";
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * as type_ from "./type";
export * from "./type/types";
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./types";
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

export interface Base64Type {
default?: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

export interface BigIntegerType {
default?: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

export interface BooleanType {
default?: boolean;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

export interface DateType {
default?: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

export interface DatetimeType {
default?: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

export interface DoubleType {
minimum?: number;
maximum?: number;
default?: number;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

export interface IntegerType {
minimum?: number;
maximum?: number;
default?: number;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as Fern from "../../../../../../../../../index";

export interface ListType {
itemType: Fern.api.v1.read.TypeReference;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as Fern from "../../../../../../../../../index";

export type LiteralType = Fern.api.v1.read.LiteralType.BooleanLiteral | Fern.api.v1.read.LiteralType.StringLiteral;

export declare namespace LiteralType {
interface BooleanLiteral {
type: "booleanLiteral";
value: boolean;
}

interface StringLiteral {
type: "stringLiteral";
value: string;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

export interface LongType {
minimum?: number;
maximum?: number;
default?: number;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as Fern from "../../../../../../../../../index";

export interface MapType {
keyType: Fern.api.v1.read.TypeReference;
valueType: Fern.api.v1.read.TypeReference;
}
Loading
Loading