@fern-api/venus-api-sdk 0.17.4-1-gd95193d → 0.17.4-2-g274600e
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.
- package/dist/cjs/Client.d.ts +3 -2
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/organization/client/Client.d.ts +3 -2
- package/dist/cjs/api/resources/organization/client/Client.js +27 -26
- package/dist/cjs/api/resources/registry/client/Client.d.ts +3 -2
- package/dist/cjs/api/resources/registry/client/Client.js +11 -10
- package/dist/cjs/api/resources/user/client/Client.d.ts +3 -2
- package/dist/cjs/api/resources/user/client/Client.js +6 -5
- package/dist/cjs/environments.d.ts +7 -0
- package/dist/cjs/environments.js +9 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +3 -2
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/organization/client/Client.d.mts +3 -2
- package/dist/esm/api/resources/organization/client/Client.mjs +27 -26
- package/dist/esm/api/resources/registry/client/Client.d.mts +3 -2
- package/dist/esm/api/resources/registry/client/Client.mjs +11 -10
- package/dist/esm/api/resources/user/client/Client.d.mts +3 -2
- package/dist/esm/api/resources/user/client/Client.mjs +6 -5
- package/dist/esm/environments.d.mts +7 -0
- package/dist/esm/environments.mjs +6 -0
- package/dist/esm/index.d.mts +1 -0
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "./environments.js";
|
|
4
5
|
import * as core from "./core/index.js";
|
|
5
6
|
import { Organization } from "./api/resources/organization/client/Client.js";
|
|
6
7
|
import { Registry } from "./api/resources/registry/client/Client.js";
|
|
7
8
|
import { User } from "./api/resources/user/client/Client.js";
|
|
8
9
|
export declare namespace FernVenusApiClient {
|
|
9
10
|
interface Options {
|
|
10
|
-
environment
|
|
11
|
+
environment?: core.Supplier<environments.FernVenusApiEnvironment | string>;
|
|
11
12
|
/** Specify a custom URL to connect the client to. */
|
|
12
13
|
baseUrl?: core.Supplier<string>;
|
|
13
14
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
@@ -32,7 +33,7 @@ export declare class FernVenusApiClient {
|
|
|
32
33
|
protected _organization: Organization | undefined;
|
|
33
34
|
protected _registry: Registry | undefined;
|
|
34
35
|
protected _user: User | undefined;
|
|
35
|
-
constructor(_options
|
|
36
|
+
constructor(_options?: FernVenusApiClient.Options);
|
|
36
37
|
get organization(): Organization;
|
|
37
38
|
get registry(): Registry;
|
|
38
39
|
get user(): User;
|
package/dist/cjs/Client.js
CHANGED
|
@@ -43,11 +43,11 @@ const Client_js_1 = require("./api/resources/organization/client/Client.js");
|
|
|
43
43
|
const Client_js_2 = require("./api/resources/registry/client/Client.js");
|
|
44
44
|
const Client_js_3 = require("./api/resources/user/client/Client.js");
|
|
45
45
|
class FernVenusApiClient {
|
|
46
|
-
constructor(_options) {
|
|
46
|
+
constructor(_options = {}) {
|
|
47
47
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
48
48
|
"X-Fern-Language": "JavaScript",
|
|
49
49
|
"X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
|
|
50
|
-
"X-Fern-SDK-Version": "0.17.4-
|
|
50
|
+
"X-Fern-SDK-Version": "0.17.4-2-g274600e",
|
|
51
51
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
52
52
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
53
53
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "../../../../environments.js";
|
|
4
5
|
import * as core from "../../../../core/index.js";
|
|
5
6
|
import * as FernVenusApi from "../../../index.js";
|
|
6
7
|
export declare namespace Organization {
|
|
7
8
|
interface Options {
|
|
8
|
-
environment
|
|
9
|
+
environment?: core.Supplier<environments.FernVenusApiEnvironment | string>;
|
|
9
10
|
/** Specify a custom URL to connect the client to. */
|
|
10
11
|
baseUrl?: core.Supplier<string>;
|
|
11
12
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
@@ -27,7 +28,7 @@ export declare namespace Organization {
|
|
|
27
28
|
}
|
|
28
29
|
export declare class Organization {
|
|
29
30
|
protected readonly _options: Organization.Options;
|
|
30
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: Organization.Options);
|
|
31
32
|
/**
|
|
32
33
|
* @param {FernVenusApi.CreateOrganizationRequest} request
|
|
33
34
|
* @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -46,12 +46,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
exports.Organization = void 0;
|
|
49
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
49
50
|
const core = __importStar(require("../../../../core/index.js"));
|
|
50
51
|
const FernVenusApi = __importStar(require("../../../index.js"));
|
|
51
52
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
52
53
|
const serializers = __importStar(require("../../../../serialization/index.js"));
|
|
53
54
|
class Organization {
|
|
54
|
-
constructor(_options) {
|
|
55
|
+
constructor(_options = {}) {
|
|
55
56
|
this._options = _options;
|
|
56
57
|
}
|
|
57
58
|
/**
|
|
@@ -72,10 +73,10 @@ class Organization {
|
|
|
72
73
|
}
|
|
73
74
|
__create(request, requestOptions) {
|
|
74
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
var _a, _b, _c;
|
|
76
|
+
var _a, _b, _c, _d;
|
|
76
77
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
77
78
|
const _response = yield core.fetcher({
|
|
78
|
-
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"),
|
|
79
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/organizations/create"),
|
|
79
80
|
method: "POST",
|
|
80
81
|
headers: _headers,
|
|
81
82
|
contentType: "application/json",
|
|
@@ -107,7 +108,7 @@ class Organization {
|
|
|
107
108
|
};
|
|
108
109
|
}
|
|
109
110
|
if (_response.error.reason === "status-code") {
|
|
110
|
-
switch ((
|
|
111
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
111
112
|
case "UnauthorizedError":
|
|
112
113
|
case "OrganizationAlreadyExistsError":
|
|
113
114
|
return {
|
|
@@ -166,10 +167,10 @@ class Organization {
|
|
|
166
167
|
}
|
|
167
168
|
__update(orgId_1) {
|
|
168
169
|
return __awaiter(this, arguments, void 0, function* (orgId, request = {}, requestOptions) {
|
|
169
|
-
var _a, _b, _c;
|
|
170
|
+
var _a, _b, _c, _d;
|
|
170
171
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
171
172
|
const _response = yield core.fetcher({
|
|
172
|
-
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/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(orgId, { omitUndefined: true }))}/update`),
|
|
173
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, `/organizations/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(orgId, { omitUndefined: true }))}/update`),
|
|
173
174
|
method: "POST",
|
|
174
175
|
headers: _headers,
|
|
175
176
|
contentType: "application/json",
|
|
@@ -195,7 +196,7 @@ class Organization {
|
|
|
195
196
|
};
|
|
196
197
|
}
|
|
197
198
|
if (_response.error.reason === "status-code") {
|
|
198
|
-
switch ((
|
|
199
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
199
200
|
case "UnauthorizedError":
|
|
200
201
|
return {
|
|
201
202
|
data: {
|
|
@@ -236,7 +237,7 @@ class Organization {
|
|
|
236
237
|
}
|
|
237
238
|
__get(orgId_1) {
|
|
238
239
|
return __awaiter(this, arguments, void 0, function* (orgId, request = {}, requestOptions) {
|
|
239
|
-
var _a, _b, _c;
|
|
240
|
+
var _a, _b, _c, _d;
|
|
240
241
|
const { shouldIncludeFernUsers } = request;
|
|
241
242
|
const _queryParams = {};
|
|
242
243
|
if (shouldIncludeFernUsers != null) {
|
|
@@ -244,7 +245,7 @@ class Organization {
|
|
|
244
245
|
}
|
|
245
246
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
246
247
|
const _response = yield core.fetcher({
|
|
247
|
-
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/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(orgId, { omitUndefined: true }))}`),
|
|
248
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, `/organizations/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(orgId, { omitUndefined: true }))}`),
|
|
248
249
|
method: "GET",
|
|
249
250
|
headers: _headers,
|
|
250
251
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -270,7 +271,7 @@ class Organization {
|
|
|
270
271
|
};
|
|
271
272
|
}
|
|
272
273
|
if (_response.error.reason === "status-code") {
|
|
273
|
-
switch ((
|
|
274
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
274
275
|
case "UnauthorizedError":
|
|
275
276
|
return {
|
|
276
277
|
data: {
|
|
@@ -310,10 +311,10 @@ class Organization {
|
|
|
310
311
|
}
|
|
311
312
|
__isMember(organizationId, requestOptions) {
|
|
312
313
|
return __awaiter(this, void 0, void 0, function* () {
|
|
313
|
-
var _a, _b;
|
|
314
|
+
var _a, _b, _c;
|
|
314
315
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
315
316
|
const _response = yield core.fetcher({
|
|
316
|
-
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/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(organizationId, { omitUndefined: true }))}`),
|
|
317
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, `/organizations/belongs-to-organization/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(organizationId, { omitUndefined: true }))}`),
|
|
317
318
|
method: "POST",
|
|
318
319
|
headers: _headers,
|
|
319
320
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -362,7 +363,7 @@ class Organization {
|
|
|
362
363
|
}
|
|
363
364
|
__getMyOrganizationFromScopedToken() {
|
|
364
365
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
365
|
-
var _a, _b, _c;
|
|
366
|
+
var _a, _b, _c, _d;
|
|
366
367
|
const { shouldIncludeFernUsers } = request;
|
|
367
368
|
const _queryParams = {};
|
|
368
369
|
if (shouldIncludeFernUsers != null) {
|
|
@@ -370,7 +371,7 @@ class Organization {
|
|
|
370
371
|
}
|
|
371
372
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
372
373
|
const _response = yield core.fetcher({
|
|
373
|
-
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"),
|
|
374
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/organizations/myself"),
|
|
374
375
|
method: "POST",
|
|
375
376
|
headers: _headers,
|
|
376
377
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -396,7 +397,7 @@ class Organization {
|
|
|
396
397
|
};
|
|
397
398
|
}
|
|
398
399
|
if (_response.error.reason === "status-code") {
|
|
399
|
-
switch ((
|
|
400
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
400
401
|
case "UnauthorizedError":
|
|
401
402
|
return {
|
|
402
403
|
data: {
|
|
@@ -436,10 +437,10 @@ class Organization {
|
|
|
436
437
|
}
|
|
437
438
|
__getOrgIdsFromToken(requestOptions) {
|
|
438
439
|
return __awaiter(this, void 0, void 0, function* () {
|
|
439
|
-
var _a, _b;
|
|
440
|
+
var _a, _b, _c;
|
|
440
441
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
441
442
|
const _response = yield core.fetcher({
|
|
442
|
-
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"),
|
|
443
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/organizations"),
|
|
443
444
|
method: "POST",
|
|
444
445
|
headers: _headers,
|
|
445
446
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -489,10 +490,10 @@ class Organization {
|
|
|
489
490
|
}
|
|
490
491
|
__addUser(request, requestOptions) {
|
|
491
492
|
return __awaiter(this, void 0, void 0, function* () {
|
|
492
|
-
var _a, _b, _c;
|
|
493
|
+
var _a, _b, _c, _d;
|
|
493
494
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
494
495
|
const _response = yield core.fetcher({
|
|
495
|
-
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"),
|
|
496
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/organizations/add-user"),
|
|
496
497
|
method: "POST",
|
|
497
498
|
headers: _headers,
|
|
498
499
|
contentType: "application/json",
|
|
@@ -518,7 +519,7 @@ class Organization {
|
|
|
518
519
|
};
|
|
519
520
|
}
|
|
520
521
|
if (_response.error.reason === "status-code") {
|
|
521
|
-
switch ((
|
|
522
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
522
523
|
case "UnauthorizedError":
|
|
523
524
|
case "UserIdDoesNotExistError":
|
|
524
525
|
return {
|
|
@@ -562,10 +563,10 @@ class Organization {
|
|
|
562
563
|
}
|
|
563
564
|
__inviteUser(request, requestOptions) {
|
|
564
565
|
return __awaiter(this, void 0, void 0, function* () {
|
|
565
|
-
var _a, _b, _c;
|
|
566
|
+
var _a, _b, _c, _d;
|
|
566
567
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
567
568
|
const _response = yield core.fetcher({
|
|
568
|
-
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"),
|
|
569
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/organizations/invite"),
|
|
569
570
|
method: "POST",
|
|
570
571
|
headers: _headers,
|
|
571
572
|
contentType: "application/json",
|
|
@@ -591,7 +592,7 @@ class Organization {
|
|
|
591
592
|
};
|
|
592
593
|
}
|
|
593
594
|
if (_response.error.reason === "status-code") {
|
|
594
|
-
switch ((
|
|
595
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
595
596
|
case "UnauthorizedError":
|
|
596
597
|
case "UserIdDoesNotExistError":
|
|
597
598
|
return {
|
|
@@ -635,10 +636,10 @@ class Organization {
|
|
|
635
636
|
}
|
|
636
637
|
__removeUser(request, requestOptions) {
|
|
637
638
|
return __awaiter(this, void 0, void 0, function* () {
|
|
638
|
-
var _a, _b, _c;
|
|
639
|
+
var _a, _b, _c, _d;
|
|
639
640
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
640
641
|
const _response = yield core.fetcher({
|
|
641
|
-
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"),
|
|
642
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/organizations/user"),
|
|
642
643
|
method: "DELETE",
|
|
643
644
|
headers: _headers,
|
|
644
645
|
contentType: "application/json",
|
|
@@ -664,7 +665,7 @@ class Organization {
|
|
|
664
665
|
};
|
|
665
666
|
}
|
|
666
667
|
if (_response.error.reason === "status-code") {
|
|
667
|
-
switch ((
|
|
668
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
668
669
|
case "UnauthorizedError":
|
|
669
670
|
case "UserIdDoesNotExistError":
|
|
670
671
|
return {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "../../../../environments.js";
|
|
4
5
|
import * as core from "../../../../core/index.js";
|
|
5
6
|
import * as FernVenusApi from "../../../index.js";
|
|
6
7
|
export declare namespace Registry {
|
|
7
8
|
interface Options {
|
|
8
|
-
environment
|
|
9
|
+
environment?: core.Supplier<environments.FernVenusApiEnvironment | string>;
|
|
9
10
|
/** Specify a custom URL to connect the client to. */
|
|
10
11
|
baseUrl?: core.Supplier<string>;
|
|
11
12
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
@@ -27,7 +28,7 @@ export declare namespace Registry {
|
|
|
27
28
|
}
|
|
28
29
|
export declare class Registry {
|
|
29
30
|
protected readonly _options: Registry.Options;
|
|
30
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: Registry.Options);
|
|
31
32
|
/**
|
|
32
33
|
* @param {FernVenusApi.GenerateRegistryTokensRequest} request
|
|
33
34
|
* @param {Registry.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -46,12 +46,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
exports.Registry = void 0;
|
|
49
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
49
50
|
const core = __importStar(require("../../../../core/index.js"));
|
|
50
51
|
const FernVenusApi = __importStar(require("../../../index.js"));
|
|
51
52
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
52
53
|
const serializers = __importStar(require("../../../../serialization/index.js"));
|
|
53
54
|
class Registry {
|
|
54
|
-
constructor(_options) {
|
|
55
|
+
constructor(_options = {}) {
|
|
55
56
|
this._options = _options;
|
|
56
57
|
}
|
|
57
58
|
/**
|
|
@@ -68,10 +69,10 @@ class Registry {
|
|
|
68
69
|
}
|
|
69
70
|
__generateRegistryTokens(request, requestOptions) {
|
|
70
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
-
var _a, _b, _c;
|
|
72
|
+
var _a, _b, _c, _d;
|
|
72
73
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
73
74
|
const _response = yield core.fetcher({
|
|
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"),
|
|
75
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/registry/generate-tokens"),
|
|
75
76
|
method: "POST",
|
|
76
77
|
headers: _headers,
|
|
77
78
|
contentType: "application/json",
|
|
@@ -103,7 +104,7 @@ class Registry {
|
|
|
103
104
|
};
|
|
104
105
|
}
|
|
105
106
|
if (_response.error.reason === "status-code") {
|
|
106
|
-
switch ((
|
|
107
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
107
108
|
case "UnauthorizedError":
|
|
108
109
|
case "OrganizationNotFoundError":
|
|
109
110
|
return {
|
|
@@ -147,10 +148,10 @@ class Registry {
|
|
|
147
148
|
}
|
|
148
149
|
__hasRegistryPermission(request, requestOptions) {
|
|
149
150
|
return __awaiter(this, void 0, void 0, function* () {
|
|
150
|
-
var _a, _b, _c;
|
|
151
|
+
var _a, _b, _c, _d;
|
|
151
152
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
152
153
|
const _response = yield core.fetcher({
|
|
153
|
-
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"),
|
|
154
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/registry/check-permissions"),
|
|
154
155
|
method: "POST",
|
|
155
156
|
headers: _headers,
|
|
156
157
|
contentType: "application/json",
|
|
@@ -182,7 +183,7 @@ class Registry {
|
|
|
182
183
|
};
|
|
183
184
|
}
|
|
184
185
|
if (_response.error.reason === "status-code") {
|
|
185
|
-
switch ((
|
|
186
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
186
187
|
case "UnauthorizedError":
|
|
187
188
|
case "OrganizationNotFoundError":
|
|
188
189
|
return {
|
|
@@ -226,10 +227,10 @@ class Registry {
|
|
|
226
227
|
}
|
|
227
228
|
__revokeToken(request, requestOptions) {
|
|
228
229
|
return __awaiter(this, void 0, void 0, function* () {
|
|
229
|
-
var _a, _b, _c;
|
|
230
|
+
var _a, _b, _c, _d;
|
|
230
231
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
231
232
|
const _response = yield core.fetcher({
|
|
232
|
-
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
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/registry/revoke-token"),
|
|
233
234
|
method: "POST",
|
|
234
235
|
headers: _headers,
|
|
235
236
|
contentType: "application/json",
|
|
@@ -255,7 +256,7 @@ class Registry {
|
|
|
255
256
|
};
|
|
256
257
|
}
|
|
257
258
|
if (_response.error.reason === "status-code") {
|
|
258
|
-
switch ((
|
|
259
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
259
260
|
case "UnauthorizedError":
|
|
260
261
|
case "OrganizationNotFoundError":
|
|
261
262
|
return {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "../../../../environments.js";
|
|
4
5
|
import * as core from "../../../../core/index.js";
|
|
5
6
|
import * as FernVenusApi from "../../../index.js";
|
|
6
7
|
export declare namespace User {
|
|
7
8
|
interface Options {
|
|
8
|
-
environment
|
|
9
|
+
environment?: core.Supplier<environments.FernVenusApiEnvironment | string>;
|
|
9
10
|
/** Specify a custom URL to connect the client to. */
|
|
10
11
|
baseUrl?: core.Supplier<string>;
|
|
11
12
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
@@ -27,7 +28,7 @@ export declare namespace User {
|
|
|
27
28
|
}
|
|
28
29
|
export declare class User {
|
|
29
30
|
protected readonly _options: User.Options;
|
|
30
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: User.Options);
|
|
31
32
|
/**
|
|
32
33
|
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
33
34
|
*
|
|
@@ -46,12 +46,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
exports.User = void 0;
|
|
49
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
49
50
|
const core = __importStar(require("../../../../core/index.js"));
|
|
50
51
|
const FernVenusApi = __importStar(require("../../../index.js"));
|
|
51
52
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
52
53
|
const serializers = __importStar(require("../../../../serialization/index.js"));
|
|
53
54
|
class User {
|
|
54
|
-
constructor(_options) {
|
|
55
|
+
constructor(_options = {}) {
|
|
55
56
|
this._options = _options;
|
|
56
57
|
}
|
|
57
58
|
/**
|
|
@@ -65,10 +66,10 @@ class User {
|
|
|
65
66
|
}
|
|
66
67
|
__getMyself(requestOptions) {
|
|
67
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
var _a, _b;
|
|
69
|
+
var _a, _b, _c;
|
|
69
70
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
70
71
|
const _response = yield core.fetcher({
|
|
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"),
|
|
72
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/users"),
|
|
72
73
|
method: "GET",
|
|
73
74
|
headers: _headers,
|
|
74
75
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -117,13 +118,13 @@ class User {
|
|
|
117
118
|
}
|
|
118
119
|
__getMyOrganizations(request, requestOptions) {
|
|
119
120
|
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
-
var _a, _b;
|
|
121
|
+
var _a, _b, _c;
|
|
121
122
|
const { pageId } = request;
|
|
122
123
|
const _queryParams = {};
|
|
123
124
|
_queryParams["pageId"] = pageId.toString();
|
|
124
125
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
125
126
|
const _response = yield core.fetcher({
|
|
126
|
-
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"),
|
|
127
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/users/organizations"),
|
|
127
128
|
method: "GET",
|
|
128
129
|
headers: _headers,
|
|
129
130
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FernVenusApiEnvironment = void 0;
|
|
7
|
+
exports.FernVenusApiEnvironment = {
|
|
8
|
+
Prod: "https://venus.buildwithfern.com",
|
|
9
|
+
};
|
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -33,8 +33,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.FernVenusApiClient = exports.serialization = exports.FernVenusApi = void 0;
|
|
36
|
+
exports.FernVenusApiEnvironment = exports.FernVenusApiClient = exports.serialization = exports.FernVenusApi = void 0;
|
|
37
37
|
exports.FernVenusApi = __importStar(require("./api/index.js"));
|
|
38
38
|
exports.serialization = __importStar(require("./serialization/index.js"));
|
|
39
39
|
var Client_js_1 = require("./Client.js");
|
|
40
40
|
Object.defineProperty(exports, "FernVenusApiClient", { enumerable: true, get: function () { return Client_js_1.FernVenusApiClient; } });
|
|
41
|
+
var environments_js_1 = require("./environments.js");
|
|
42
|
+
Object.defineProperty(exports, "FernVenusApiEnvironment", { enumerable: true, get: function () { return environments_js_1.FernVenusApiEnvironment; } });
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.17.4-
|
|
1
|
+
export declare const SDK_VERSION = "0.17.4-2-g274600e";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.d.mts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "./environments.mjs";
|
|
4
5
|
import * as core from "./core/index.mjs";
|
|
5
6
|
import { Organization } from "./api/resources/organization/client/Client.mjs";
|
|
6
7
|
import { Registry } from "./api/resources/registry/client/Client.mjs";
|
|
7
8
|
import { User } from "./api/resources/user/client/Client.mjs";
|
|
8
9
|
export declare namespace FernVenusApiClient {
|
|
9
10
|
interface Options {
|
|
10
|
-
environment
|
|
11
|
+
environment?: core.Supplier<environments.FernVenusApiEnvironment | string>;
|
|
11
12
|
/** Specify a custom URL to connect the client to. */
|
|
12
13
|
baseUrl?: core.Supplier<string>;
|
|
13
14
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
@@ -32,7 +33,7 @@ export declare class FernVenusApiClient {
|
|
|
32
33
|
protected _organization: Organization | undefined;
|
|
33
34
|
protected _registry: Registry | undefined;
|
|
34
35
|
protected _user: User | undefined;
|
|
35
|
-
constructor(_options
|
|
36
|
+
constructor(_options?: FernVenusApiClient.Options);
|
|
36
37
|
get organization(): Organization;
|
|
37
38
|
get registry(): Registry;
|
|
38
39
|
get user(): User;
|
package/dist/esm/Client.mjs
CHANGED
|
@@ -7,11 +7,11 @@ import { Organization } from "./api/resources/organization/client/Client.mjs";
|
|
|
7
7
|
import { Registry } from "./api/resources/registry/client/Client.mjs";
|
|
8
8
|
import { User } from "./api/resources/user/client/Client.mjs";
|
|
9
9
|
export class FernVenusApiClient {
|
|
10
|
-
constructor(_options) {
|
|
10
|
+
constructor(_options = {}) {
|
|
11
11
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
12
12
|
"X-Fern-Language": "JavaScript",
|
|
13
13
|
"X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
|
|
14
|
-
"X-Fern-SDK-Version": "0.17.4-
|
|
14
|
+
"X-Fern-SDK-Version": "0.17.4-2-g274600e",
|
|
15
15
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
16
16
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
17
17
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "../../../../environments.mjs";
|
|
4
5
|
import * as core from "../../../../core/index.mjs";
|
|
5
6
|
import * as FernVenusApi from "../../../index.mjs";
|
|
6
7
|
export declare namespace Organization {
|
|
7
8
|
interface Options {
|
|
8
|
-
environment
|
|
9
|
+
environment?: core.Supplier<environments.FernVenusApiEnvironment | string>;
|
|
9
10
|
/** Specify a custom URL to connect the client to. */
|
|
10
11
|
baseUrl?: core.Supplier<string>;
|
|
11
12
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
@@ -27,7 +28,7 @@ export declare namespace Organization {
|
|
|
27
28
|
}
|
|
28
29
|
export declare class Organization {
|
|
29
30
|
protected readonly _options: Organization.Options;
|
|
30
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: Organization.Options);
|
|
31
32
|
/**
|
|
32
33
|
* @param {FernVenusApi.CreateOrganizationRequest} request
|
|
33
34
|
* @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -10,12 +10,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
|
+
import * as environments from "../../../../environments.mjs";
|
|
13
14
|
import * as core from "../../../../core/index.mjs";
|
|
14
15
|
import * as FernVenusApi from "../../../index.mjs";
|
|
15
16
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
16
17
|
import * as serializers from "../../../../serialization/index.mjs";
|
|
17
18
|
export class Organization {
|
|
18
|
-
constructor(_options) {
|
|
19
|
+
constructor(_options = {}) {
|
|
19
20
|
this._options = _options;
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
@@ -36,10 +37,10 @@ export class Organization {
|
|
|
36
37
|
}
|
|
37
38
|
__create(request, requestOptions) {
|
|
38
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
var _a, _b, _c;
|
|
40
|
+
var _a, _b, _c, _d;
|
|
40
41
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
41
42
|
const _response = yield core.fetcher({
|
|
42
|
-
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"),
|
|
43
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/organizations/create"),
|
|
43
44
|
method: "POST",
|
|
44
45
|
headers: _headers,
|
|
45
46
|
contentType: "application/json",
|
|
@@ -71,7 +72,7 @@ export class Organization {
|
|
|
71
72
|
};
|
|
72
73
|
}
|
|
73
74
|
if (_response.error.reason === "status-code") {
|
|
74
|
-
switch ((
|
|
75
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
75
76
|
case "UnauthorizedError":
|
|
76
77
|
case "OrganizationAlreadyExistsError":
|
|
77
78
|
return {
|
|
@@ -130,10 +131,10 @@ export class Organization {
|
|
|
130
131
|
}
|
|
131
132
|
__update(orgId_1) {
|
|
132
133
|
return __awaiter(this, arguments, void 0, function* (orgId, request = {}, requestOptions) {
|
|
133
|
-
var _a, _b, _c;
|
|
134
|
+
var _a, _b, _c, _d;
|
|
134
135
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
135
136
|
const _response = yield core.fetcher({
|
|
136
|
-
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/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(orgId, { omitUndefined: true }))}/update`),
|
|
137
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, `/organizations/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(orgId, { omitUndefined: true }))}/update`),
|
|
137
138
|
method: "POST",
|
|
138
139
|
headers: _headers,
|
|
139
140
|
contentType: "application/json",
|
|
@@ -159,7 +160,7 @@ export class Organization {
|
|
|
159
160
|
};
|
|
160
161
|
}
|
|
161
162
|
if (_response.error.reason === "status-code") {
|
|
162
|
-
switch ((
|
|
163
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
163
164
|
case "UnauthorizedError":
|
|
164
165
|
return {
|
|
165
166
|
data: {
|
|
@@ -200,7 +201,7 @@ export class Organization {
|
|
|
200
201
|
}
|
|
201
202
|
__get(orgId_1) {
|
|
202
203
|
return __awaiter(this, arguments, void 0, function* (orgId, request = {}, requestOptions) {
|
|
203
|
-
var _a, _b, _c;
|
|
204
|
+
var _a, _b, _c, _d;
|
|
204
205
|
const { shouldIncludeFernUsers } = request;
|
|
205
206
|
const _queryParams = {};
|
|
206
207
|
if (shouldIncludeFernUsers != null) {
|
|
@@ -208,7 +209,7 @@ export class Organization {
|
|
|
208
209
|
}
|
|
209
210
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
210
211
|
const _response = yield core.fetcher({
|
|
211
|
-
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/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(orgId, { omitUndefined: true }))}`),
|
|
212
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, `/organizations/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(orgId, { omitUndefined: true }))}`),
|
|
212
213
|
method: "GET",
|
|
213
214
|
headers: _headers,
|
|
214
215
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -234,7 +235,7 @@ export class Organization {
|
|
|
234
235
|
};
|
|
235
236
|
}
|
|
236
237
|
if (_response.error.reason === "status-code") {
|
|
237
|
-
switch ((
|
|
238
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
238
239
|
case "UnauthorizedError":
|
|
239
240
|
return {
|
|
240
241
|
data: {
|
|
@@ -274,10 +275,10 @@ export class Organization {
|
|
|
274
275
|
}
|
|
275
276
|
__isMember(organizationId, requestOptions) {
|
|
276
277
|
return __awaiter(this, void 0, void 0, function* () {
|
|
277
|
-
var _a, _b;
|
|
278
|
+
var _a, _b, _c;
|
|
278
279
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
279
280
|
const _response = yield core.fetcher({
|
|
280
|
-
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/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(organizationId, { omitUndefined: true }))}`),
|
|
281
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, `/organizations/belongs-to-organization/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(organizationId, { omitUndefined: true }))}`),
|
|
281
282
|
method: "POST",
|
|
282
283
|
headers: _headers,
|
|
283
284
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -326,7 +327,7 @@ export class Organization {
|
|
|
326
327
|
}
|
|
327
328
|
__getMyOrganizationFromScopedToken() {
|
|
328
329
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
329
|
-
var _a, _b, _c;
|
|
330
|
+
var _a, _b, _c, _d;
|
|
330
331
|
const { shouldIncludeFernUsers } = request;
|
|
331
332
|
const _queryParams = {};
|
|
332
333
|
if (shouldIncludeFernUsers != null) {
|
|
@@ -334,7 +335,7 @@ export class Organization {
|
|
|
334
335
|
}
|
|
335
336
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
336
337
|
const _response = yield core.fetcher({
|
|
337
|
-
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"),
|
|
338
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/organizations/myself"),
|
|
338
339
|
method: "POST",
|
|
339
340
|
headers: _headers,
|
|
340
341
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -360,7 +361,7 @@ export class Organization {
|
|
|
360
361
|
};
|
|
361
362
|
}
|
|
362
363
|
if (_response.error.reason === "status-code") {
|
|
363
|
-
switch ((
|
|
364
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
364
365
|
case "UnauthorizedError":
|
|
365
366
|
return {
|
|
366
367
|
data: {
|
|
@@ -400,10 +401,10 @@ export class Organization {
|
|
|
400
401
|
}
|
|
401
402
|
__getOrgIdsFromToken(requestOptions) {
|
|
402
403
|
return __awaiter(this, void 0, void 0, function* () {
|
|
403
|
-
var _a, _b;
|
|
404
|
+
var _a, _b, _c;
|
|
404
405
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
405
406
|
const _response = yield core.fetcher({
|
|
406
|
-
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"),
|
|
407
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/organizations"),
|
|
407
408
|
method: "POST",
|
|
408
409
|
headers: _headers,
|
|
409
410
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -453,10 +454,10 @@ export class Organization {
|
|
|
453
454
|
}
|
|
454
455
|
__addUser(request, requestOptions) {
|
|
455
456
|
return __awaiter(this, void 0, void 0, function* () {
|
|
456
|
-
var _a, _b, _c;
|
|
457
|
+
var _a, _b, _c, _d;
|
|
457
458
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
458
459
|
const _response = yield core.fetcher({
|
|
459
|
-
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"),
|
|
460
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/organizations/add-user"),
|
|
460
461
|
method: "POST",
|
|
461
462
|
headers: _headers,
|
|
462
463
|
contentType: "application/json",
|
|
@@ -482,7 +483,7 @@ export class Organization {
|
|
|
482
483
|
};
|
|
483
484
|
}
|
|
484
485
|
if (_response.error.reason === "status-code") {
|
|
485
|
-
switch ((
|
|
486
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
486
487
|
case "UnauthorizedError":
|
|
487
488
|
case "UserIdDoesNotExistError":
|
|
488
489
|
return {
|
|
@@ -526,10 +527,10 @@ export class Organization {
|
|
|
526
527
|
}
|
|
527
528
|
__inviteUser(request, requestOptions) {
|
|
528
529
|
return __awaiter(this, void 0, void 0, function* () {
|
|
529
|
-
var _a, _b, _c;
|
|
530
|
+
var _a, _b, _c, _d;
|
|
530
531
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
531
532
|
const _response = yield core.fetcher({
|
|
532
|
-
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"),
|
|
533
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/organizations/invite"),
|
|
533
534
|
method: "POST",
|
|
534
535
|
headers: _headers,
|
|
535
536
|
contentType: "application/json",
|
|
@@ -555,7 +556,7 @@ export class Organization {
|
|
|
555
556
|
};
|
|
556
557
|
}
|
|
557
558
|
if (_response.error.reason === "status-code") {
|
|
558
|
-
switch ((
|
|
559
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
559
560
|
case "UnauthorizedError":
|
|
560
561
|
case "UserIdDoesNotExistError":
|
|
561
562
|
return {
|
|
@@ -599,10 +600,10 @@ export class Organization {
|
|
|
599
600
|
}
|
|
600
601
|
__removeUser(request, requestOptions) {
|
|
601
602
|
return __awaiter(this, void 0, void 0, function* () {
|
|
602
|
-
var _a, _b, _c;
|
|
603
|
+
var _a, _b, _c, _d;
|
|
603
604
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
604
605
|
const _response = yield core.fetcher({
|
|
605
|
-
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"),
|
|
606
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/organizations/user"),
|
|
606
607
|
method: "DELETE",
|
|
607
608
|
headers: _headers,
|
|
608
609
|
contentType: "application/json",
|
|
@@ -628,7 +629,7 @@ export class Organization {
|
|
|
628
629
|
};
|
|
629
630
|
}
|
|
630
631
|
if (_response.error.reason === "status-code") {
|
|
631
|
-
switch ((
|
|
632
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
632
633
|
case "UnauthorizedError":
|
|
633
634
|
case "UserIdDoesNotExistError":
|
|
634
635
|
return {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "../../../../environments.mjs";
|
|
4
5
|
import * as core from "../../../../core/index.mjs";
|
|
5
6
|
import * as FernVenusApi from "../../../index.mjs";
|
|
6
7
|
export declare namespace Registry {
|
|
7
8
|
interface Options {
|
|
8
|
-
environment
|
|
9
|
+
environment?: core.Supplier<environments.FernVenusApiEnvironment | string>;
|
|
9
10
|
/** Specify a custom URL to connect the client to. */
|
|
10
11
|
baseUrl?: core.Supplier<string>;
|
|
11
12
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
@@ -27,7 +28,7 @@ export declare namespace Registry {
|
|
|
27
28
|
}
|
|
28
29
|
export declare class Registry {
|
|
29
30
|
protected readonly _options: Registry.Options;
|
|
30
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: Registry.Options);
|
|
31
32
|
/**
|
|
32
33
|
* @param {FernVenusApi.GenerateRegistryTokensRequest} request
|
|
33
34
|
* @param {Registry.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -10,12 +10,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
|
+
import * as environments from "../../../../environments.mjs";
|
|
13
14
|
import * as core from "../../../../core/index.mjs";
|
|
14
15
|
import * as FernVenusApi from "../../../index.mjs";
|
|
15
16
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
16
17
|
import * as serializers from "../../../../serialization/index.mjs";
|
|
17
18
|
export class Registry {
|
|
18
|
-
constructor(_options) {
|
|
19
|
+
constructor(_options = {}) {
|
|
19
20
|
this._options = _options;
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
@@ -32,10 +33,10 @@ export class Registry {
|
|
|
32
33
|
}
|
|
33
34
|
__generateRegistryTokens(request, requestOptions) {
|
|
34
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
var _a, _b, _c;
|
|
36
|
+
var _a, _b, _c, _d;
|
|
36
37
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
37
38
|
const _response = yield core.fetcher({
|
|
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"),
|
|
39
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/registry/generate-tokens"),
|
|
39
40
|
method: "POST",
|
|
40
41
|
headers: _headers,
|
|
41
42
|
contentType: "application/json",
|
|
@@ -67,7 +68,7 @@ export class Registry {
|
|
|
67
68
|
};
|
|
68
69
|
}
|
|
69
70
|
if (_response.error.reason === "status-code") {
|
|
70
|
-
switch ((
|
|
71
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
71
72
|
case "UnauthorizedError":
|
|
72
73
|
case "OrganizationNotFoundError":
|
|
73
74
|
return {
|
|
@@ -111,10 +112,10 @@ export class Registry {
|
|
|
111
112
|
}
|
|
112
113
|
__hasRegistryPermission(request, requestOptions) {
|
|
113
114
|
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
-
var _a, _b, _c;
|
|
115
|
+
var _a, _b, _c, _d;
|
|
115
116
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
116
117
|
const _response = yield core.fetcher({
|
|
117
|
-
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"),
|
|
118
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/registry/check-permissions"),
|
|
118
119
|
method: "POST",
|
|
119
120
|
headers: _headers,
|
|
120
121
|
contentType: "application/json",
|
|
@@ -146,7 +147,7 @@ export class Registry {
|
|
|
146
147
|
};
|
|
147
148
|
}
|
|
148
149
|
if (_response.error.reason === "status-code") {
|
|
149
|
-
switch ((
|
|
150
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
150
151
|
case "UnauthorizedError":
|
|
151
152
|
case "OrganizationNotFoundError":
|
|
152
153
|
return {
|
|
@@ -190,10 +191,10 @@ export class Registry {
|
|
|
190
191
|
}
|
|
191
192
|
__revokeToken(request, requestOptions) {
|
|
192
193
|
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
-
var _a, _b, _c;
|
|
194
|
+
var _a, _b, _c, _d;
|
|
194
195
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
195
196
|
const _response = yield core.fetcher({
|
|
196
|
-
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
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/registry/revoke-token"),
|
|
197
198
|
method: "POST",
|
|
198
199
|
headers: _headers,
|
|
199
200
|
contentType: "application/json",
|
|
@@ -219,7 +220,7 @@ export class Registry {
|
|
|
219
220
|
};
|
|
220
221
|
}
|
|
221
222
|
if (_response.error.reason === "status-code") {
|
|
222
|
-
switch ((
|
|
223
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
223
224
|
case "UnauthorizedError":
|
|
224
225
|
case "OrganizationNotFoundError":
|
|
225
226
|
return {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "../../../../environments.mjs";
|
|
4
5
|
import * as core from "../../../../core/index.mjs";
|
|
5
6
|
import * as FernVenusApi from "../../../index.mjs";
|
|
6
7
|
export declare namespace User {
|
|
7
8
|
interface Options {
|
|
8
|
-
environment
|
|
9
|
+
environment?: core.Supplier<environments.FernVenusApiEnvironment | string>;
|
|
9
10
|
/** Specify a custom URL to connect the client to. */
|
|
10
11
|
baseUrl?: core.Supplier<string>;
|
|
11
12
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
@@ -27,7 +28,7 @@ export declare namespace User {
|
|
|
27
28
|
}
|
|
28
29
|
export declare class User {
|
|
29
30
|
protected readonly _options: User.Options;
|
|
30
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: User.Options);
|
|
31
32
|
/**
|
|
32
33
|
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
33
34
|
*
|
|
@@ -10,12 +10,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
|
+
import * as environments from "../../../../environments.mjs";
|
|
13
14
|
import * as core from "../../../../core/index.mjs";
|
|
14
15
|
import * as FernVenusApi from "../../../index.mjs";
|
|
15
16
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
16
17
|
import * as serializers from "../../../../serialization/index.mjs";
|
|
17
18
|
export class User {
|
|
18
|
-
constructor(_options) {
|
|
19
|
+
constructor(_options = {}) {
|
|
19
20
|
this._options = _options;
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
@@ -29,10 +30,10 @@ export class User {
|
|
|
29
30
|
}
|
|
30
31
|
__getMyself(requestOptions) {
|
|
31
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
var _a, _b;
|
|
33
|
+
var _a, _b, _c;
|
|
33
34
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
34
35
|
const _response = yield core.fetcher({
|
|
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"),
|
|
36
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/users"),
|
|
36
37
|
method: "GET",
|
|
37
38
|
headers: _headers,
|
|
38
39
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -81,13 +82,13 @@ export class User {
|
|
|
81
82
|
}
|
|
82
83
|
__getMyOrganizations(request, requestOptions) {
|
|
83
84
|
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
-
var _a, _b;
|
|
85
|
+
var _a, _b, _c;
|
|
85
86
|
const { pageId } = request;
|
|
86
87
|
const _queryParams = {};
|
|
87
88
|
_queryParams["pageId"] = pageId.toString();
|
|
88
89
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
89
90
|
const _response = yield core.fetcher({
|
|
90
|
-
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"),
|
|
91
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/users/organizations"),
|
|
91
92
|
method: "GET",
|
|
92
93
|
headers: _headers,
|
|
93
94
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
package/dist/esm/index.d.mts
CHANGED
package/dist/esm/index.mjs
CHANGED
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.17.4-
|
|
1
|
+
export declare const SDK_VERSION = "0.17.4-2-g274600e";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.17.4-
|
|
1
|
+
export const SDK_VERSION = "0.17.4-2-g274600e";
|