Skip to content

Commit

Permalink
fix client
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi committed Dec 3, 2024
1 parent 1342ec0 commit 08720dc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 364 deletions.
16 changes: 0 additions & 16 deletions src/wrapper/CollectionsClient.ts

This file was deleted.

339 changes: 0 additions & 339 deletions src/wrapper/ItemsClient.ts

This file was deleted.

13 changes: 4 additions & 9 deletions src/wrapper/WebflowClient.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
import qs from "qs";
import { WebflowClient as FernClient } from "../Client";
import { OauthScope } from "../api/types";
import { OauthScope } from "../api/types/OAuthScope";
import * as core from "../core";
import * as errors from "../errors";
import { Client as Collections } from "./CollectionsClient";

export class WebflowClient extends FernClient {
constructor(protected readonly _options: FernClient.Options) {
super(_options);
}

protected _collections: Collections | undefined;

public get collections(): Collections {
return (this._collections ??= new Collections(this._options));
}

/**
* @param clientId The OAuth client ID
* @param state The state
Expand Down Expand Up @@ -107,7 +100,9 @@ export class WebflowClient extends FernClient {
body: response.error.rawBody,
});
case "timeout":
throw new errors.WebflowTimeoutError();
throw new errors.WebflowTimeoutError(
"Timeout exceeded when calling POST /oauth/token"
);
case "unknown":
throw new errors.WebflowError({
message: response.error.errorMessage,
Expand Down

0 comments on commit 08720dc

Please sign in to comment.