Skip to content

Commit 3712322

Browse files
fix: make oauth config optional in oauth api class
bump version to 0.1.3
1 parent e8a7efb commit 3712322

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## @makeplane/plane-node-sdk@0.1.2
1+
## @makeplane/plane-node-sdk@0.1.3
22

33
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
44

@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
3636
_published:_
3737

3838
```
39-
npm install @makeplane/[email protected].2 --save
39+
npm install @makeplane/[email protected].3 --save
4040
```
4141

4242
_unPublished (not recommended):_

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@makeplane/plane-node-sdk",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "Node SDK for Plane",
55
"author": "Plane <[email protected]>",
66
"repository": {

src/oauth/api.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,19 @@ export class OAuthApi extends runtime.BaseAPI {
1212

1313
constructor(
1414
configuration: runtime.Configuration,
15-
oauthConfig: {
15+
oauthConfig?: {
1616
clientId: string;
1717
clientSecret: string;
1818
redirectUri: string;
1919
}
2020
) {
2121
super(configuration);
22-
this.clientId = oauthConfig.clientId;
23-
this.clientSecret = oauthConfig.clientSecret;
24-
this.redirectUri = oauthConfig.redirectUri;
25-
this.baseUrl = configuration.basePath || "https://api.plane.so";
22+
if (oauthConfig) {
23+
this.clientId = oauthConfig.clientId;
24+
this.clientSecret = oauthConfig.clientSecret;
25+
this.redirectUri = oauthConfig.redirectUri;
26+
this.baseUrl = configuration.basePath || "https://api.plane.so";
27+
}
2628
}
2729

2830
/**

0 commit comments

Comments
 (0)