Skip to content

Commit 76694d1

Browse files
author
Marek Sierociński
committed
withCredentials support
1 parent bc68ec1 commit 76694d1

11 files changed

+51
-10
lines changed

dist/ApiConfig.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ interface ApiConfig {
55
v2?: boolean;
66
apiKey?: string;
77
auth?: AxiosBasicCredentials;
8+
withCredentials?: boolean;
89
}
910
export default ApiConfig;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import APIResource from './APIResource';
2+
declare class APIAdminResourceAccount extends APIResource {
3+
constructor(parent: object);
4+
}
5+
export default APIAdminResourceAccount;

dist/bitbar-cloud-api-client.js

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

dist/bitbar-cloud-api-client.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bitbar-cloud-api-client.min.js

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

dist/bitbar-cloud-api-client.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bitbar/cloud-api-client",
3-
"version": "0.24.0",
3+
"version": "0.24.1",
44
"description": "Bitbar Cloud API Client for JavaScript",
55
"main": "dist/bitbar-cloud-api-client.min.js",
66
"types": "dist/index.d.ts",
@@ -42,7 +42,7 @@
4242
"@typescript-eslint/eslint-plugin": "^2.34.0",
4343
"@typescript-eslint/parser": "^2.34.0",
4444
"chai": "^4.1.2",
45-
"core-js": "^3.8.0",
45+
"core-js": "^3.6.5",
4646
"eslint": "^6.8.0",
4747
"mocha": "^7.2.0",
4848
"rollup": "^1.32.1",

src/API.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ class API {
8383
};
8484
}
8585

86+
// With credentials
87+
this.axiosConfig.withCredentials = config.withCredentials == null ? false : config.withCredentials;
88+
8689
// Create axios instance
8790
this.axios = axios.create(this.axiosConfig);
8891
}

src/ApiConfig.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ interface ApiConfig {
2929
*
3030
*/
3131
auth?: AxiosBasicCredentials;
32+
33+
34+
/**
35+
* With credentials?
36+
*
37+
*/
38+
withCredentials?: boolean;
3239
}
3340

3441
export default ApiConfig;

0 commit comments

Comments
 (0)