@fern-api/venus-api-sdk 4.0.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.js +4 -2
  3. package/dist/cjs/api/resources/apiKeys/client/Client.d.ts +2 -2
  4. package/dist/cjs/api/resources/apiKeys/client/Client.js +11 -6
  5. package/dist/cjs/api/resources/auth/client/Client.d.ts +2 -2
  6. package/dist/cjs/api/resources/auth/client/Client.js +7 -4
  7. package/dist/cjs/api/resources/organization/client/Client.js +18 -9
  8. package/dist/cjs/api/resources/registry/client/Client.d.ts +2 -2
  9. package/dist/cjs/api/resources/registry/client/Client.js +7 -4
  10. package/dist/cjs/api/resources/user/client/Client.d.ts +2 -2
  11. package/dist/cjs/api/resources/user/client/Client.js +7 -4
  12. package/dist/cjs/auth/BearerAuthProvider.d.ts +1 -1
  13. package/dist/cjs/version.d.ts +1 -1
  14. package/dist/cjs/version.js +1 -1
  15. package/dist/esm/BaseClient.mjs +2 -2
  16. package/dist/esm/Client.mjs +4 -2
  17. package/dist/esm/api/resources/apiKeys/client/Client.d.mts +2 -2
  18. package/dist/esm/api/resources/apiKeys/client/Client.mjs +12 -7
  19. package/dist/esm/api/resources/auth/client/Client.d.mts +2 -2
  20. package/dist/esm/api/resources/auth/client/Client.mjs +8 -5
  21. package/dist/esm/api/resources/organization/client/Client.mjs +18 -9
  22. package/dist/esm/api/resources/registry/client/Client.d.mts +2 -2
  23. package/dist/esm/api/resources/registry/client/Client.mjs +8 -5
  24. package/dist/esm/api/resources/user/client/Client.d.mts +2 -2
  25. package/dist/esm/api/resources/user/client/Client.mjs +8 -5
  26. package/dist/esm/auth/BearerAuthProvider.d.mts +1 -1
  27. package/dist/esm/version.d.mts +1 -1
  28. package/dist/esm/version.mjs +1 -1
  29. package/package.json +1 -1
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
46
- "X-Fern-SDK-Version": "4.0.0",
47
- "User-Agent": "@fern-api/venus-api-sdk/4.0.0",
46
+ "X-Fern-SDK-Version": "5.0.0",
47
+ "User-Agent": "@fern-api/venus-api-sdk/5.0.0",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -91,7 +91,8 @@ class FernVenusApiClient {
91
91
  __metricsMetricsGet(requestOptions) {
92
92
  return __awaiter(this, void 0, void 0, function* () {
93
93
  var _a, _b, _c, _d, _e, _f, _g, _h;
94
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
94
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
95
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
95
96
  const _response = yield core.fetcher({
96
97
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "metrics"),
97
98
  method: "GET",
@@ -136,7 +137,8 @@ class FernVenusApiClient {
136
137
  __healthHealthGet(requestOptions) {
137
138
  return __awaiter(this, void 0, void 0, function* () {
138
139
  var _a, _b, _c, _d, _e, _f, _g, _h;
139
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
140
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
141
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
140
142
  const _response = yield core.fetcher({
141
143
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "health"),
142
144
  method: "GET",
@@ -1,5 +1,5 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
- import { type NormalizedClientOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as FernVenusApi from "../../../index.js";
5
5
  export declare namespace ApiKeysClient {
@@ -8,7 +8,7 @@ export declare namespace ApiKeysClient {
8
8
  }
9
9
  }
10
10
  export declare class ApiKeysClient {
11
- protected readonly _options: NormalizedClientOptions<ApiKeysClient.Options>;
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<ApiKeysClient.Options>;
12
12
  constructor(options: ApiKeysClient.Options);
13
13
  /**
14
14
  * @param {FernVenusApi.CreateApiKeyRequest} request
@@ -51,7 +51,7 @@ const serializers = __importStar(require("../../../../serialization/index.js"));
51
51
  const FernVenusApi = __importStar(require("../../../index.js"));
52
52
  class ApiKeysClient {
53
53
  constructor(options) {
54
- this._options = (0, BaseClient_js_1.normalizeClientOptions)(options);
54
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
55
55
  }
56
56
  /**
57
57
  * @param {FernVenusApi.CreateApiKeyRequest} request
@@ -68,7 +68,8 @@ class ApiKeysClient {
68
68
  __create(request, requestOptions) {
69
69
  return __awaiter(this, void 0, void 0, function* () {
70
70
  var _a, _b, _c, _d, _e, _f, _g, _h;
71
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
71
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
72
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
72
73
  const _response = yield core.fetcher({
73
74
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "api-keys/create"),
74
75
  method: "POST",
@@ -147,7 +148,8 @@ class ApiKeysClient {
147
148
  __getTokenMetadata(request, requestOptions) {
148
149
  return __awaiter(this, void 0, void 0, function* () {
149
150
  var _a, _b, _c, _d, _e, _f, _g, _h;
150
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
151
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
152
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
151
153
  const _response = yield core.fetcher({
152
154
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "api-keys/metadata"),
153
155
  method: "POST",
@@ -227,7 +229,8 @@ class ApiKeysClient {
227
229
  return __awaiter(this, void 0, void 0, function* () {
228
230
  var _a, _b, _c, _d, _e, _f, _g, _h;
229
231
  const { organizationId } = request;
230
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
232
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
233
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
231
234
  const _response = yield core.fetcher({
232
235
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `api-keys/organization/${core.url.encodePathParam(organizationId)}`),
233
236
  method: "GET",
@@ -301,7 +304,8 @@ class ApiKeysClient {
301
304
  return __awaiter(this, void 0, void 0, function* () {
302
305
  var _a, _b, _c, _d, _e, _f, _g, _h;
303
306
  const { tokenId } = request;
304
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
307
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
308
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
305
309
  const _response = yield core.fetcher({
306
310
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `api-keys/revoke/${core.url.encodePathParam(tokenId)}`),
307
311
  method: "POST",
@@ -368,7 +372,8 @@ class ApiKeysClient {
368
372
  __revokeToken(request, requestOptions) {
369
373
  return __awaiter(this, void 0, void 0, function* () {
370
374
  var _a, _b, _c, _d, _e, _f, _g, _h;
371
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
375
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
376
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
372
377
  const _response = yield core.fetcher({
373
378
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "api-keys/revoke"),
374
379
  method: "POST",
@@ -1,5 +1,5 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
- import { type NormalizedClientOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as FernVenusApi from "../../../index.js";
5
5
  export declare namespace AuthClient {
@@ -8,7 +8,7 @@ export declare namespace AuthClient {
8
8
  }
9
9
  }
10
10
  export declare class AuthClient {
11
- protected readonly _options: NormalizedClientOptions<AuthClient.Options>;
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<AuthClient.Options>;
12
12
  constructor(options: AuthClient.Options);
13
13
  /**
14
14
  * Look up the Fern organization ID for a GitHub owner.
@@ -51,7 +51,7 @@ const serializers = __importStar(require("../../../../serialization/index.js"));
51
51
  const FernVenusApi = __importStar(require("../../../index.js"));
52
52
  class AuthClient {
53
53
  constructor(options) {
54
- this._options = (0, BaseClient_js_1.normalizeClientOptions)(options);
54
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
55
55
  }
56
56
  /**
57
57
  * Look up the Fern organization ID for a GitHub owner.
@@ -73,7 +73,8 @@ class AuthClient {
73
73
  return __awaiter(this, void 0, void 0, function* () {
74
74
  var _a, _b, _c, _d, _e, _f, _g, _h;
75
75
  const { githubOwner } = request;
76
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
76
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
77
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
77
78
  const _response = yield core.fetcher({
78
79
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `auth/github-owner/${core.url.encodePathParam(githubOwner)}/org`),
79
80
  method: "GET",
@@ -152,7 +153,8 @@ class AuthClient {
152
153
  __getAutopilotToken(request, requestOptions) {
153
154
  return __awaiter(this, void 0, void 0, function* () {
154
155
  var _a, _b, _c, _d, _e, _f, _g, _h;
155
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
156
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
157
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
156
158
  const _response = yield core.fetcher({
157
159
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "auth/autopilot-token"),
158
160
  method: "POST",
@@ -235,7 +237,8 @@ class AuthClient {
235
237
  __getJwt(request, requestOptions) {
236
238
  return __awaiter(this, void 0, void 0, function* () {
237
239
  var _a, _b, _c, _d, _e, _f, _g, _h;
238
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
240
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
241
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
239
242
  const _response = yield core.fetcher({
240
243
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "auth/jwt"),
241
244
  method: "POST",
@@ -79,7 +79,8 @@ class OrganizationClient {
79
79
  __create(request, requestOptions) {
80
80
  return __awaiter(this, void 0, void 0, function* () {
81
81
  var _a, _b, _c, _d, _e, _f, _g, _h;
82
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
82
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
83
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
83
84
  const _response = yield core.fetcher({
84
85
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "organizations/create"),
85
86
  method: "POST",
@@ -159,7 +160,8 @@ class OrganizationClient {
159
160
  return __awaiter(this, void 0, void 0, function* () {
160
161
  var _a, _b, _c, _d, _e, _f, _g, _h;
161
162
  const { orgId } = request, _body = __rest(request, ["orgId"]);
162
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
163
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
164
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
163
165
  const _response = yield core.fetcher({
164
166
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `organizations/${core.url.encodePathParam(orgId)}/update`),
165
167
  method: "POST",
@@ -313,7 +315,8 @@ class OrganizationClient {
313
315
  return __awaiter(this, void 0, void 0, function* () {
314
316
  var _a, _b, _c, _d, _e, _f, _g, _h;
315
317
  const { orgId } = request;
316
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
318
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
319
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
317
320
  const _response = yield core.fetcher({
318
321
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `organizations/${core.url.encodePathParam(orgId)}`),
319
322
  method: "DELETE",
@@ -535,7 +538,8 @@ class OrganizationClient {
535
538
  return __awaiter(this, void 0, void 0, function* () {
536
539
  var _a, _b, _c, _d, _e, _f, _g, _h;
537
540
  const { organizationId } = request;
538
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
541
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
542
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
539
543
  const _response = yield core.fetcher({
540
544
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `organizations/belongs-to-organization/${core.url.encodePathParam(organizationId)}`),
541
545
  method: "POST",
@@ -612,7 +616,8 @@ class OrganizationClient {
612
616
  const _queryParams = {
613
617
  shouldIncludeFernUsers,
614
618
  };
615
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
619
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
620
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
616
621
  const _response = yield core.fetcher({
617
622
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "organizations/myself"),
618
623
  method: "POST",
@@ -682,7 +687,8 @@ class OrganizationClient {
682
687
  __getOrgIdsFromToken(requestOptions) {
683
688
  return __awaiter(this, void 0, void 0, function* () {
684
689
  var _a, _b, _c, _d, _e, _f, _g, _h;
685
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
690
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
691
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
686
692
  const _response = yield core.fetcher({
687
693
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "organizations"),
688
694
  method: "POST",
@@ -737,7 +743,8 @@ class OrganizationClient {
737
743
  __addUser(request, requestOptions) {
738
744
  return __awaiter(this, void 0, void 0, function* () {
739
745
  var _a, _b, _c, _d, _e, _f, _g, _h;
740
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
746
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
747
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
741
748
  const _response = yield core.fetcher({
742
749
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "organizations/add-user"),
743
750
  method: "POST",
@@ -811,7 +818,8 @@ class OrganizationClient {
811
818
  __inviteUser(request, requestOptions) {
812
819
  return __awaiter(this, void 0, void 0, function* () {
813
820
  var _a, _b, _c, _d, _e, _f, _g, _h;
814
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
821
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
822
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
815
823
  const _response = yield core.fetcher({
816
824
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "organizations/invite"),
817
825
  method: "POST",
@@ -885,7 +893,8 @@ class OrganizationClient {
885
893
  __removeUser(request, requestOptions) {
886
894
  return __awaiter(this, void 0, void 0, function* () {
887
895
  var _a, _b, _c, _d, _e, _f, _g, _h;
888
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
896
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
897
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
889
898
  const _response = yield core.fetcher({
890
899
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "organizations/user"),
891
900
  method: "DELETE",
@@ -1,5 +1,5 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
- import { type NormalizedClientOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as FernVenusApi from "../../../index.js";
5
5
  export declare namespace RegistryClient {
@@ -8,7 +8,7 @@ export declare namespace RegistryClient {
8
8
  }
9
9
  }
10
10
  export declare class RegistryClient {
11
- protected readonly _options: NormalizedClientOptions<RegistryClient.Options>;
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<RegistryClient.Options>;
12
12
  constructor(options: RegistryClient.Options);
13
13
  /**
14
14
  * @param {FernVenusApi.GenerateRegistryTokensRequest} request
@@ -51,7 +51,7 @@ const serializers = __importStar(require("../../../../serialization/index.js"));
51
51
  const FernVenusApi = __importStar(require("../../../index.js"));
52
52
  class RegistryClient {
53
53
  constructor(options) {
54
- this._options = (0, BaseClient_js_1.normalizeClientOptions)(options);
54
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
55
55
  }
56
56
  /**
57
57
  * @param {FernVenusApi.GenerateRegistryTokensRequest} request
@@ -68,7 +68,8 @@ class RegistryClient {
68
68
  __generateRegistryTokens(request, requestOptions) {
69
69
  return __awaiter(this, void 0, void 0, function* () {
70
70
  var _a, _b, _c, _d, _e, _f, _g, _h;
71
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
71
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
72
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
72
73
  const _response = yield core.fetcher({
73
74
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "registry/generate-tokens"),
74
75
  method: "POST",
@@ -147,7 +148,8 @@ class RegistryClient {
147
148
  __hasRegistryPermission(request, requestOptions) {
148
149
  return __awaiter(this, void 0, void 0, function* () {
149
150
  var _a, _b, _c, _d, _e, _f, _g, _h;
150
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
151
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
152
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
151
153
  const _response = yield core.fetcher({
152
154
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "registry/check-permissions"),
153
155
  method: "POST",
@@ -227,7 +229,8 @@ class RegistryClient {
227
229
  __revokeToken(request, requestOptions) {
228
230
  return __awaiter(this, void 0, void 0, function* () {
229
231
  var _a, _b, _c, _d, _e, _f, _g, _h;
230
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
232
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
233
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
231
234
  const _response = yield core.fetcher({
232
235
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "registry/revoke-token"),
233
236
  method: "POST",
@@ -1,5 +1,5 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
- import { type NormalizedClientOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as FernVenusApi from "../../../index.js";
5
5
  export declare namespace UserClient {
@@ -8,7 +8,7 @@ export declare namespace UserClient {
8
8
  }
9
9
  }
10
10
  export declare class UserClient {
11
- protected readonly _options: NormalizedClientOptions<UserClient.Options>;
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<UserClient.Options>;
12
12
  constructor(options: UserClient.Options);
13
13
  /**
14
14
  * @param {UserClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -51,7 +51,7 @@ const serializers = __importStar(require("../../../../serialization/index.js"));
51
51
  const FernVenusApi = __importStar(require("../../../index.js"));
52
52
  class UserClient {
53
53
  constructor(options) {
54
- this._options = (0, BaseClient_js_1.normalizeClientOptions)(options);
54
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
55
55
  }
56
56
  /**
57
57
  * @param {UserClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -65,7 +65,8 @@ class UserClient {
65
65
  __getMyself(requestOptions) {
66
66
  return __awaiter(this, void 0, void 0, function* () {
67
67
  var _a, _b, _c, _d, _e, _f, _g, _h;
68
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
68
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
69
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
69
70
  const _response = yield core.fetcher({
70
71
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "users"),
71
72
  method: "GET",
@@ -123,7 +124,8 @@ class UserClient {
123
124
  const _queryParams = {
124
125
  pageId,
125
126
  };
126
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
127
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
128
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
127
129
  const _response = yield core.fetcher({
128
130
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "users/organizations"),
129
131
  method: "GET",
@@ -199,7 +201,8 @@ class UserClient {
199
201
  __linkAccounts(request, requestOptions) {
200
202
  return __awaiter(this, void 0, void 0, function* () {
201
203
  var _a, _b, _c, _d, _e, _f, _g, _h;
202
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
204
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
205
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
203
206
  const _response = yield core.fetcher({
204
207
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "users/link-accounts"),
205
208
  method: "POST",
@@ -13,7 +13,7 @@ export declare namespace BearerAuthProvider {
13
13
  const AUTH_CONFIG_ERROR_MESSAGE: string;
14
14
  type Options = AuthOptions;
15
15
  type AuthOptions = {
16
- [TOKEN_PARAM]?: core.Supplier<core.BearerToken>;
16
+ [TOKEN_PARAM]: core.Supplier<core.BearerToken>;
17
17
  };
18
18
  function createInstance(options: Options): core.AuthProvider;
19
19
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.0.0";
1
+ export declare const SDK_VERSION = "5.0.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "4.0.0";
4
+ exports.SDK_VERSION = "5.0.0";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
9
- "X-Fern-SDK-Version": "4.0.0",
10
- "User-Agent": "@fern-api/venus-api-sdk/4.0.0",
9
+ "X-Fern-SDK-Version": "5.0.0",
10
+ "User-Agent": "@fern-api/venus-api-sdk/5.0.0",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -55,7 +55,8 @@ export class FernVenusApiClient {
55
55
  __metricsMetricsGet(requestOptions) {
56
56
  return __awaiter(this, void 0, void 0, function* () {
57
57
  var _a, _b, _c, _d, _e, _f, _g, _h;
58
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
58
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
59
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
59
60
  const _response = yield core.fetcher({
60
61
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "metrics"),
61
62
  method: "GET",
@@ -100,7 +101,8 @@ export class FernVenusApiClient {
100
101
  __healthHealthGet(requestOptions) {
101
102
  return __awaiter(this, void 0, void 0, function* () {
102
103
  var _a, _b, _c, _d, _e, _f, _g, _h;
103
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
104
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
105
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
104
106
  const _response = yield core.fetcher({
105
107
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "health"),
106
108
  method: "GET",
@@ -1,5 +1,5 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
- import { type NormalizedClientOptions } from "../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import * as FernVenusApi from "../../../index.mjs";
5
5
  export declare namespace ApiKeysClient {
@@ -8,7 +8,7 @@ export declare namespace ApiKeysClient {
8
8
  }
9
9
  }
10
10
  export declare class ApiKeysClient {
11
- protected readonly _options: NormalizedClientOptions<ApiKeysClient.Options>;
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<ApiKeysClient.Options>;
12
12
  constructor(options: ApiKeysClient.Options);
13
13
  /**
14
14
  * @param {FernVenusApi.CreateApiKeyRequest} request
@@ -8,14 +8,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- import { normalizeClientOptions } from "../../../../BaseClient.mjs";
11
+ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
12
  import { mergeHeaders } from "../../../../core/headers.mjs";
13
13
  import * as core from "../../../../core/index.mjs";
14
14
  import * as serializers from "../../../../serialization/index.mjs";
15
15
  import * as FernVenusApi from "../../../index.mjs";
16
16
  export class ApiKeysClient {
17
17
  constructor(options) {
18
- this._options = normalizeClientOptions(options);
18
+ this._options = normalizeClientOptionsWithAuth(options);
19
19
  }
20
20
  /**
21
21
  * @param {FernVenusApi.CreateApiKeyRequest} request
@@ -32,7 +32,8 @@ export class ApiKeysClient {
32
32
  __create(request, requestOptions) {
33
33
  return __awaiter(this, void 0, void 0, function* () {
34
34
  var _a, _b, _c, _d, _e, _f, _g, _h;
35
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
35
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
36
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
36
37
  const _response = yield core.fetcher({
37
38
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "api-keys/create"),
38
39
  method: "POST",
@@ -111,7 +112,8 @@ export class ApiKeysClient {
111
112
  __getTokenMetadata(request, requestOptions) {
112
113
  return __awaiter(this, void 0, void 0, function* () {
113
114
  var _a, _b, _c, _d, _e, _f, _g, _h;
114
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
115
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
116
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
115
117
  const _response = yield core.fetcher({
116
118
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "api-keys/metadata"),
117
119
  method: "POST",
@@ -191,7 +193,8 @@ export class ApiKeysClient {
191
193
  return __awaiter(this, void 0, void 0, function* () {
192
194
  var _a, _b, _c, _d, _e, _f, _g, _h;
193
195
  const { organizationId } = request;
194
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
196
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
197
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
195
198
  const _response = yield core.fetcher({
196
199
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `api-keys/organization/${core.url.encodePathParam(organizationId)}`),
197
200
  method: "GET",
@@ -265,7 +268,8 @@ export class ApiKeysClient {
265
268
  return __awaiter(this, void 0, void 0, function* () {
266
269
  var _a, _b, _c, _d, _e, _f, _g, _h;
267
270
  const { tokenId } = request;
268
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
271
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
272
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
269
273
  const _response = yield core.fetcher({
270
274
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `api-keys/revoke/${core.url.encodePathParam(tokenId)}`),
271
275
  method: "POST",
@@ -332,7 +336,8 @@ export class ApiKeysClient {
332
336
  __revokeToken(request, requestOptions) {
333
337
  return __awaiter(this, void 0, void 0, function* () {
334
338
  var _a, _b, _c, _d, _e, _f, _g, _h;
335
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
339
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
340
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
336
341
  const _response = yield core.fetcher({
337
342
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "api-keys/revoke"),
338
343
  method: "POST",
@@ -1,5 +1,5 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
- import { type NormalizedClientOptions } from "../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import * as FernVenusApi from "../../../index.mjs";
5
5
  export declare namespace AuthClient {
@@ -8,7 +8,7 @@ export declare namespace AuthClient {
8
8
  }
9
9
  }
10
10
  export declare class AuthClient {
11
- protected readonly _options: NormalizedClientOptions<AuthClient.Options>;
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<AuthClient.Options>;
12
12
  constructor(options: AuthClient.Options);
13
13
  /**
14
14
  * Look up the Fern organization ID for a GitHub owner.
@@ -8,14 +8,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- import { normalizeClientOptions } from "../../../../BaseClient.mjs";
11
+ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
12
  import { mergeHeaders } from "../../../../core/headers.mjs";
13
13
  import * as core from "../../../../core/index.mjs";
14
14
  import * as serializers from "../../../../serialization/index.mjs";
15
15
  import * as FernVenusApi from "../../../index.mjs";
16
16
  export class AuthClient {
17
17
  constructor(options) {
18
- this._options = normalizeClientOptions(options);
18
+ this._options = normalizeClientOptionsWithAuth(options);
19
19
  }
20
20
  /**
21
21
  * Look up the Fern organization ID for a GitHub owner.
@@ -37,7 +37,8 @@ export class AuthClient {
37
37
  return __awaiter(this, void 0, void 0, function* () {
38
38
  var _a, _b, _c, _d, _e, _f, _g, _h;
39
39
  const { githubOwner } = request;
40
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
40
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
41
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
41
42
  const _response = yield core.fetcher({
42
43
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `auth/github-owner/${core.url.encodePathParam(githubOwner)}/org`),
43
44
  method: "GET",
@@ -116,7 +117,8 @@ export class AuthClient {
116
117
  __getAutopilotToken(request, requestOptions) {
117
118
  return __awaiter(this, void 0, void 0, function* () {
118
119
  var _a, _b, _c, _d, _e, _f, _g, _h;
119
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
120
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
121
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
120
122
  const _response = yield core.fetcher({
121
123
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "auth/autopilot-token"),
122
124
  method: "POST",
@@ -199,7 +201,8 @@ export class AuthClient {
199
201
  __getJwt(request, requestOptions) {
200
202
  return __awaiter(this, void 0, void 0, function* () {
201
203
  var _a, _b, _c, _d, _e, _f, _g, _h;
202
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
204
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
205
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
203
206
  const _response = yield core.fetcher({
204
207
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "auth/jwt"),
205
208
  method: "POST",
@@ -43,7 +43,8 @@ export class OrganizationClient {
43
43
  __create(request, requestOptions) {
44
44
  return __awaiter(this, void 0, void 0, function* () {
45
45
  var _a, _b, _c, _d, _e, _f, _g, _h;
46
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
46
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
47
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
47
48
  const _response = yield core.fetcher({
48
49
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "organizations/create"),
49
50
  method: "POST",
@@ -123,7 +124,8 @@ export class OrganizationClient {
123
124
  return __awaiter(this, void 0, void 0, function* () {
124
125
  var _a, _b, _c, _d, _e, _f, _g, _h;
125
126
  const { orgId } = request, _body = __rest(request, ["orgId"]);
126
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
127
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
128
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
127
129
  const _response = yield core.fetcher({
128
130
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `organizations/${core.url.encodePathParam(orgId)}/update`),
129
131
  method: "POST",
@@ -277,7 +279,8 @@ export class OrganizationClient {
277
279
  return __awaiter(this, void 0, void 0, function* () {
278
280
  var _a, _b, _c, _d, _e, _f, _g, _h;
279
281
  const { orgId } = request;
280
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
282
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
283
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
281
284
  const _response = yield core.fetcher({
282
285
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `organizations/${core.url.encodePathParam(orgId)}`),
283
286
  method: "DELETE",
@@ -499,7 +502,8 @@ export class OrganizationClient {
499
502
  return __awaiter(this, void 0, void 0, function* () {
500
503
  var _a, _b, _c, _d, _e, _f, _g, _h;
501
504
  const { organizationId } = request;
502
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
505
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
506
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
503
507
  const _response = yield core.fetcher({
504
508
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `organizations/belongs-to-organization/${core.url.encodePathParam(organizationId)}`),
505
509
  method: "POST",
@@ -576,7 +580,8 @@ export class OrganizationClient {
576
580
  const _queryParams = {
577
581
  shouldIncludeFernUsers,
578
582
  };
579
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
583
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
584
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
580
585
  const _response = yield core.fetcher({
581
586
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "organizations/myself"),
582
587
  method: "POST",
@@ -646,7 +651,8 @@ export class OrganizationClient {
646
651
  __getOrgIdsFromToken(requestOptions) {
647
652
  return __awaiter(this, void 0, void 0, function* () {
648
653
  var _a, _b, _c, _d, _e, _f, _g, _h;
649
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
654
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
655
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
650
656
  const _response = yield core.fetcher({
651
657
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "organizations"),
652
658
  method: "POST",
@@ -701,7 +707,8 @@ export class OrganizationClient {
701
707
  __addUser(request, requestOptions) {
702
708
  return __awaiter(this, void 0, void 0, function* () {
703
709
  var _a, _b, _c, _d, _e, _f, _g, _h;
704
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
710
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
711
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
705
712
  const _response = yield core.fetcher({
706
713
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "organizations/add-user"),
707
714
  method: "POST",
@@ -775,7 +782,8 @@ export class OrganizationClient {
775
782
  __inviteUser(request, requestOptions) {
776
783
  return __awaiter(this, void 0, void 0, function* () {
777
784
  var _a, _b, _c, _d, _e, _f, _g, _h;
778
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
785
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
786
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
779
787
  const _response = yield core.fetcher({
780
788
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "organizations/invite"),
781
789
  method: "POST",
@@ -849,7 +857,8 @@ export class OrganizationClient {
849
857
  __removeUser(request, requestOptions) {
850
858
  return __awaiter(this, void 0, void 0, function* () {
851
859
  var _a, _b, _c, _d, _e, _f, _g, _h;
852
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
860
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
861
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
853
862
  const _response = yield core.fetcher({
854
863
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "organizations/user"),
855
864
  method: "DELETE",
@@ -1,5 +1,5 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
- import { type NormalizedClientOptions } from "../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import * as FernVenusApi from "../../../index.mjs";
5
5
  export declare namespace RegistryClient {
@@ -8,7 +8,7 @@ export declare namespace RegistryClient {
8
8
  }
9
9
  }
10
10
  export declare class RegistryClient {
11
- protected readonly _options: NormalizedClientOptions<RegistryClient.Options>;
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<RegistryClient.Options>;
12
12
  constructor(options: RegistryClient.Options);
13
13
  /**
14
14
  * @param {FernVenusApi.GenerateRegistryTokensRequest} request
@@ -8,14 +8,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- import { normalizeClientOptions } from "../../../../BaseClient.mjs";
11
+ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
12
  import { mergeHeaders } from "../../../../core/headers.mjs";
13
13
  import * as core from "../../../../core/index.mjs";
14
14
  import * as serializers from "../../../../serialization/index.mjs";
15
15
  import * as FernVenusApi from "../../../index.mjs";
16
16
  export class RegistryClient {
17
17
  constructor(options) {
18
- this._options = normalizeClientOptions(options);
18
+ this._options = normalizeClientOptionsWithAuth(options);
19
19
  }
20
20
  /**
21
21
  * @param {FernVenusApi.GenerateRegistryTokensRequest} request
@@ -32,7 +32,8 @@ export class RegistryClient {
32
32
  __generateRegistryTokens(request, requestOptions) {
33
33
  return __awaiter(this, void 0, void 0, function* () {
34
34
  var _a, _b, _c, _d, _e, _f, _g, _h;
35
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
35
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
36
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
36
37
  const _response = yield core.fetcher({
37
38
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "registry/generate-tokens"),
38
39
  method: "POST",
@@ -111,7 +112,8 @@ export class RegistryClient {
111
112
  __hasRegistryPermission(request, requestOptions) {
112
113
  return __awaiter(this, void 0, void 0, function* () {
113
114
  var _a, _b, _c, _d, _e, _f, _g, _h;
114
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
115
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
116
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
115
117
  const _response = yield core.fetcher({
116
118
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "registry/check-permissions"),
117
119
  method: "POST",
@@ -191,7 +193,8 @@ export class RegistryClient {
191
193
  __revokeToken(request, requestOptions) {
192
194
  return __awaiter(this, void 0, void 0, function* () {
193
195
  var _a, _b, _c, _d, _e, _f, _g, _h;
194
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
196
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
197
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
195
198
  const _response = yield core.fetcher({
196
199
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "registry/revoke-token"),
197
200
  method: "POST",
@@ -1,5 +1,5 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
- import { type NormalizedClientOptions } from "../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import * as FernVenusApi from "../../../index.mjs";
5
5
  export declare namespace UserClient {
@@ -8,7 +8,7 @@ export declare namespace UserClient {
8
8
  }
9
9
  }
10
10
  export declare class UserClient {
11
- protected readonly _options: NormalizedClientOptions<UserClient.Options>;
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<UserClient.Options>;
12
12
  constructor(options: UserClient.Options);
13
13
  /**
14
14
  * @param {UserClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -8,14 +8,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- import { normalizeClientOptions } from "../../../../BaseClient.mjs";
11
+ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
12
  import { mergeHeaders } from "../../../../core/headers.mjs";
13
13
  import * as core from "../../../../core/index.mjs";
14
14
  import * as serializers from "../../../../serialization/index.mjs";
15
15
  import * as FernVenusApi from "../../../index.mjs";
16
16
  export class UserClient {
17
17
  constructor(options) {
18
- this._options = normalizeClientOptions(options);
18
+ this._options = normalizeClientOptionsWithAuth(options);
19
19
  }
20
20
  /**
21
21
  * @param {UserClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -29,7 +29,8 @@ export class UserClient {
29
29
  __getMyself(requestOptions) {
30
30
  return __awaiter(this, void 0, void 0, function* () {
31
31
  var _a, _b, _c, _d, _e, _f, _g, _h;
32
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
32
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
33
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
33
34
  const _response = yield core.fetcher({
34
35
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "users"),
35
36
  method: "GET",
@@ -87,7 +88,8 @@ export class UserClient {
87
88
  const _queryParams = {
88
89
  pageId,
89
90
  };
90
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
91
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
92
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
91
93
  const _response = yield core.fetcher({
92
94
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "users/organizations"),
93
95
  method: "GET",
@@ -163,7 +165,8 @@ export class UserClient {
163
165
  __linkAccounts(request, requestOptions) {
164
166
  return __awaiter(this, void 0, void 0, function* () {
165
167
  var _a, _b, _c, _d, _e, _f, _g, _h;
166
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
168
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
169
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
167
170
  const _response = yield core.fetcher({
168
171
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "users/link-accounts"),
169
172
  method: "POST",
@@ -13,7 +13,7 @@ export declare namespace BearerAuthProvider {
13
13
  const AUTH_CONFIG_ERROR_MESSAGE: string;
14
14
  type Options = AuthOptions;
15
15
  type AuthOptions = {
16
- [TOKEN_PARAM]?: core.Supplier<core.BearerToken>;
16
+ [TOKEN_PARAM]: core.Supplier<core.BearerToken>;
17
17
  };
18
18
  function createInstance(options: Options): core.AuthProvider;
19
19
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.0.0";
1
+ export declare const SDK_VERSION = "5.0.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "4.0.0";
1
+ export const SDK_VERSION = "5.0.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fern-api/venus-api-sdk",
3
- "version": "4.0.0",
3
+ "version": "5.0.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",