@fern-api/venus-api-sdk 0.17.3 → 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 +5 -3
- package/dist/cjs/api/resources/organization/client/Client.js +29 -27
- package/dist/cjs/api/resources/organization/client/requests/CreateOrganizationRequest.d.ts +9 -1
- 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/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.ts +1 -0
- package/dist/cjs/serialization/resources/organization/client/requests/CreateOrganizationRequest.js +1 -0
- 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 +5 -3
- package/dist/esm/api/resources/organization/client/Client.mjs +29 -27
- package/dist/esm/api/resources/organization/client/requests/CreateOrganizationRequest.d.mts +9 -1
- 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/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.mts +1 -0
- package/dist/esm/serialization/resources/organization/client/requests/CreateOrganizationRequest.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.
|
|
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.
|
|
@@ -37,7 +38,8 @@ export declare class Organization {
|
|
|
37
38
|
* organizationId: FernVenusApi.OrganizationId("organizationId"),
|
|
38
39
|
* displayName: undefined,
|
|
39
40
|
* artifactReadRequiresToken: undefined,
|
|
40
|
-
* enableGithubConnection: undefined
|
|
41
|
+
* enableGithubConnection: undefined,
|
|
42
|
+
* enableGoogleConnection: undefined
|
|
41
43
|
* })
|
|
42
44
|
*/
|
|
43
45
|
create(request: FernVenusApi.CreateOrganizationRequest, requestOptions?: Organization.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.CreateOrganizationResponse, FernVenusApi.organization.create.Error>>;
|
|
@@ -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
|
/**
|
|
@@ -63,7 +64,8 @@ class Organization {
|
|
|
63
64
|
* organizationId: FernVenusApi.OrganizationId("organizationId"),
|
|
64
65
|
* displayName: undefined,
|
|
65
66
|
* artifactReadRequiresToken: undefined,
|
|
66
|
-
* enableGithubConnection: undefined
|
|
67
|
+
* enableGithubConnection: undefined,
|
|
68
|
+
* enableGoogleConnection: undefined
|
|
67
69
|
* })
|
|
68
70
|
*/
|
|
69
71
|
create(request, requestOptions) {
|
|
@@ -71,10 +73,10 @@ class Organization {
|
|
|
71
73
|
}
|
|
72
74
|
__create(request, requestOptions) {
|
|
73
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
-
var _a, _b, _c;
|
|
76
|
+
var _a, _b, _c, _d;
|
|
75
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);
|
|
76
78
|
const _response = yield core.fetcher({
|
|
77
|
-
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"),
|
|
78
80
|
method: "POST",
|
|
79
81
|
headers: _headers,
|
|
80
82
|
contentType: "application/json",
|
|
@@ -106,7 +108,7 @@ class Organization {
|
|
|
106
108
|
};
|
|
107
109
|
}
|
|
108
110
|
if (_response.error.reason === "status-code") {
|
|
109
|
-
switch ((
|
|
111
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
110
112
|
case "UnauthorizedError":
|
|
111
113
|
case "OrganizationAlreadyExistsError":
|
|
112
114
|
return {
|
|
@@ -165,10 +167,10 @@ class Organization {
|
|
|
165
167
|
}
|
|
166
168
|
__update(orgId_1) {
|
|
167
169
|
return __awaiter(this, arguments, void 0, function* (orgId, request = {}, requestOptions) {
|
|
168
|
-
var _a, _b, _c;
|
|
170
|
+
var _a, _b, _c, _d;
|
|
169
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);
|
|
170
172
|
const _response = yield core.fetcher({
|
|
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)), `/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`),
|
|
172
174
|
method: "POST",
|
|
173
175
|
headers: _headers,
|
|
174
176
|
contentType: "application/json",
|
|
@@ -194,7 +196,7 @@ class Organization {
|
|
|
194
196
|
};
|
|
195
197
|
}
|
|
196
198
|
if (_response.error.reason === "status-code") {
|
|
197
|
-
switch ((
|
|
199
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
198
200
|
case "UnauthorizedError":
|
|
199
201
|
return {
|
|
200
202
|
data: {
|
|
@@ -235,7 +237,7 @@ class Organization {
|
|
|
235
237
|
}
|
|
236
238
|
__get(orgId_1) {
|
|
237
239
|
return __awaiter(this, arguments, void 0, function* (orgId, request = {}, requestOptions) {
|
|
238
|
-
var _a, _b, _c;
|
|
240
|
+
var _a, _b, _c, _d;
|
|
239
241
|
const { shouldIncludeFernUsers } = request;
|
|
240
242
|
const _queryParams = {};
|
|
241
243
|
if (shouldIncludeFernUsers != null) {
|
|
@@ -243,7 +245,7 @@ class Organization {
|
|
|
243
245
|
}
|
|
244
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);
|
|
245
247
|
const _response = yield core.fetcher({
|
|
246
|
-
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 }))}`),
|
|
247
249
|
method: "GET",
|
|
248
250
|
headers: _headers,
|
|
249
251
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -269,7 +271,7 @@ class Organization {
|
|
|
269
271
|
};
|
|
270
272
|
}
|
|
271
273
|
if (_response.error.reason === "status-code") {
|
|
272
|
-
switch ((
|
|
274
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
273
275
|
case "UnauthorizedError":
|
|
274
276
|
return {
|
|
275
277
|
data: {
|
|
@@ -309,10 +311,10 @@ class Organization {
|
|
|
309
311
|
}
|
|
310
312
|
__isMember(organizationId, requestOptions) {
|
|
311
313
|
return __awaiter(this, void 0, void 0, function* () {
|
|
312
|
-
var _a, _b;
|
|
314
|
+
var _a, _b, _c;
|
|
313
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);
|
|
314
316
|
const _response = yield core.fetcher({
|
|
315
|
-
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 }))}`),
|
|
316
318
|
method: "POST",
|
|
317
319
|
headers: _headers,
|
|
318
320
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -361,7 +363,7 @@ class Organization {
|
|
|
361
363
|
}
|
|
362
364
|
__getMyOrganizationFromScopedToken() {
|
|
363
365
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
364
|
-
var _a, _b, _c;
|
|
366
|
+
var _a, _b, _c, _d;
|
|
365
367
|
const { shouldIncludeFernUsers } = request;
|
|
366
368
|
const _queryParams = {};
|
|
367
369
|
if (shouldIncludeFernUsers != null) {
|
|
@@ -369,7 +371,7 @@ class Organization {
|
|
|
369
371
|
}
|
|
370
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);
|
|
371
373
|
const _response = yield core.fetcher({
|
|
372
|
-
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"),
|
|
373
375
|
method: "POST",
|
|
374
376
|
headers: _headers,
|
|
375
377
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -395,7 +397,7 @@ class Organization {
|
|
|
395
397
|
};
|
|
396
398
|
}
|
|
397
399
|
if (_response.error.reason === "status-code") {
|
|
398
|
-
switch ((
|
|
400
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
399
401
|
case "UnauthorizedError":
|
|
400
402
|
return {
|
|
401
403
|
data: {
|
|
@@ -435,10 +437,10 @@ class Organization {
|
|
|
435
437
|
}
|
|
436
438
|
__getOrgIdsFromToken(requestOptions) {
|
|
437
439
|
return __awaiter(this, void 0, void 0, function* () {
|
|
438
|
-
var _a, _b;
|
|
440
|
+
var _a, _b, _c;
|
|
439
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);
|
|
440
442
|
const _response = yield core.fetcher({
|
|
441
|
-
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"),
|
|
442
444
|
method: "POST",
|
|
443
445
|
headers: _headers,
|
|
444
446
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -488,10 +490,10 @@ class Organization {
|
|
|
488
490
|
}
|
|
489
491
|
__addUser(request, requestOptions) {
|
|
490
492
|
return __awaiter(this, void 0, void 0, function* () {
|
|
491
|
-
var _a, _b, _c;
|
|
493
|
+
var _a, _b, _c, _d;
|
|
492
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);
|
|
493
495
|
const _response = yield core.fetcher({
|
|
494
|
-
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"),
|
|
495
497
|
method: "POST",
|
|
496
498
|
headers: _headers,
|
|
497
499
|
contentType: "application/json",
|
|
@@ -517,7 +519,7 @@ class Organization {
|
|
|
517
519
|
};
|
|
518
520
|
}
|
|
519
521
|
if (_response.error.reason === "status-code") {
|
|
520
|
-
switch ((
|
|
522
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
521
523
|
case "UnauthorizedError":
|
|
522
524
|
case "UserIdDoesNotExistError":
|
|
523
525
|
return {
|
|
@@ -561,10 +563,10 @@ class Organization {
|
|
|
561
563
|
}
|
|
562
564
|
__inviteUser(request, requestOptions) {
|
|
563
565
|
return __awaiter(this, void 0, void 0, function* () {
|
|
564
|
-
var _a, _b, _c;
|
|
566
|
+
var _a, _b, _c, _d;
|
|
565
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);
|
|
566
568
|
const _response = yield core.fetcher({
|
|
567
|
-
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"),
|
|
568
570
|
method: "POST",
|
|
569
571
|
headers: _headers,
|
|
570
572
|
contentType: "application/json",
|
|
@@ -590,7 +592,7 @@ class Organization {
|
|
|
590
592
|
};
|
|
591
593
|
}
|
|
592
594
|
if (_response.error.reason === "status-code") {
|
|
593
|
-
switch ((
|
|
595
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
594
596
|
case "UnauthorizedError":
|
|
595
597
|
case "UserIdDoesNotExistError":
|
|
596
598
|
return {
|
|
@@ -634,10 +636,10 @@ class Organization {
|
|
|
634
636
|
}
|
|
635
637
|
__removeUser(request, requestOptions) {
|
|
636
638
|
return __awaiter(this, void 0, void 0, function* () {
|
|
637
|
-
var _a, _b, _c;
|
|
639
|
+
var _a, _b, _c, _d;
|
|
638
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);
|
|
639
641
|
const _response = yield core.fetcher({
|
|
640
|
-
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"),
|
|
641
643
|
method: "DELETE",
|
|
642
644
|
headers: _headers,
|
|
643
645
|
contentType: "application/json",
|
|
@@ -663,7 +665,7 @@ class Organization {
|
|
|
663
665
|
};
|
|
664
666
|
}
|
|
665
667
|
if (_response.error.reason === "status-code") {
|
|
666
|
-
switch ((
|
|
668
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
667
669
|
case "UnauthorizedError":
|
|
668
670
|
case "UserIdDoesNotExistError":
|
|
669
671
|
return {
|
|
@@ -8,7 +8,8 @@ import * as FernVenusApi from "../../../../index.js";
|
|
|
8
8
|
* organizationId: FernVenusApi.OrganizationId("organizationId"),
|
|
9
9
|
* displayName: undefined,
|
|
10
10
|
* artifactReadRequiresToken: undefined,
|
|
11
|
-
* enableGithubConnection: undefined
|
|
11
|
+
* enableGithubConnection: undefined,
|
|
12
|
+
* enableGoogleConnection: undefined
|
|
12
13
|
* }
|
|
13
14
|
*/
|
|
14
15
|
export interface CreateOrganizationRequest {
|
|
@@ -18,7 +19,14 @@ export interface CreateOrganizationRequest {
|
|
|
18
19
|
artifactReadRequiresToken?: boolean;
|
|
19
20
|
/**
|
|
20
21
|
* Allow users to log into the organization with their GitHub account, necessary for accepting organizations today.
|
|
22
|
+
* True by default.
|
|
21
23
|
* This is a field to allow for us to create organizations without this in the future if necessary.
|
|
22
24
|
*/
|
|
23
25
|
enableGithubConnection?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Allow users to log into the organization with their Google account.
|
|
28
|
+
* True by default.
|
|
29
|
+
* This is a field to allow for us to create organizations without this in the future if necessary.
|
|
30
|
+
*/
|
|
31
|
+
enableGoogleConnection?: boolean;
|
|
24
32
|
}
|
|
@@ -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/serialization/resources/organization/client/requests/CreateOrganizationRequest.js
CHANGED
|
@@ -44,4 +44,5 @@ exports.CreateOrganizationRequest = core.serialization.object({
|
|
|
44
44
|
displayName: core.serialization.string().optional(),
|
|
45
45
|
artifactReadRequiresToken: core.serialization.boolean().optional(),
|
|
46
46
|
enableGithubConnection: core.serialization.boolean().optional(),
|
|
47
|
+
enableGoogleConnection: core.serialization.boolean().optional(),
|
|
47
48
|
});
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.17.
|
|
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.
|
|
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.
|
|
@@ -37,7 +38,8 @@ export declare class Organization {
|
|
|
37
38
|
* organizationId: FernVenusApi.OrganizationId("organizationId"),
|
|
38
39
|
* displayName: undefined,
|
|
39
40
|
* artifactReadRequiresToken: undefined,
|
|
40
|
-
* enableGithubConnection: undefined
|
|
41
|
+
* enableGithubConnection: undefined,
|
|
42
|
+
* enableGoogleConnection: undefined
|
|
41
43
|
* })
|
|
42
44
|
*/
|
|
43
45
|
create(request: FernVenusApi.CreateOrganizationRequest, requestOptions?: Organization.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.CreateOrganizationResponse, FernVenusApi.organization.create.Error>>;
|
|
@@ -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
|
/**
|
|
@@ -27,7 +28,8 @@ export class Organization {
|
|
|
27
28
|
* organizationId: FernVenusApi.OrganizationId("organizationId"),
|
|
28
29
|
* displayName: undefined,
|
|
29
30
|
* artifactReadRequiresToken: undefined,
|
|
30
|
-
* enableGithubConnection: undefined
|
|
31
|
+
* enableGithubConnection: undefined,
|
|
32
|
+
* enableGoogleConnection: undefined
|
|
31
33
|
* })
|
|
32
34
|
*/
|
|
33
35
|
create(request, requestOptions) {
|
|
@@ -35,10 +37,10 @@ export class Organization {
|
|
|
35
37
|
}
|
|
36
38
|
__create(request, requestOptions) {
|
|
37
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
var _a, _b, _c;
|
|
40
|
+
var _a, _b, _c, _d;
|
|
39
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);
|
|
40
42
|
const _response = yield core.fetcher({
|
|
41
|
-
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"),
|
|
42
44
|
method: "POST",
|
|
43
45
|
headers: _headers,
|
|
44
46
|
contentType: "application/json",
|
|
@@ -70,7 +72,7 @@ export class Organization {
|
|
|
70
72
|
};
|
|
71
73
|
}
|
|
72
74
|
if (_response.error.reason === "status-code") {
|
|
73
|
-
switch ((
|
|
75
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
74
76
|
case "UnauthorizedError":
|
|
75
77
|
case "OrganizationAlreadyExistsError":
|
|
76
78
|
return {
|
|
@@ -129,10 +131,10 @@ export class Organization {
|
|
|
129
131
|
}
|
|
130
132
|
__update(orgId_1) {
|
|
131
133
|
return __awaiter(this, arguments, void 0, function* (orgId, request = {}, requestOptions) {
|
|
132
|
-
var _a, _b, _c;
|
|
134
|
+
var _a, _b, _c, _d;
|
|
133
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);
|
|
134
136
|
const _response = yield core.fetcher({
|
|
135
|
-
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`),
|
|
136
138
|
method: "POST",
|
|
137
139
|
headers: _headers,
|
|
138
140
|
contentType: "application/json",
|
|
@@ -158,7 +160,7 @@ export class Organization {
|
|
|
158
160
|
};
|
|
159
161
|
}
|
|
160
162
|
if (_response.error.reason === "status-code") {
|
|
161
|
-
switch ((
|
|
163
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
162
164
|
case "UnauthorizedError":
|
|
163
165
|
return {
|
|
164
166
|
data: {
|
|
@@ -199,7 +201,7 @@ export class Organization {
|
|
|
199
201
|
}
|
|
200
202
|
__get(orgId_1) {
|
|
201
203
|
return __awaiter(this, arguments, void 0, function* (orgId, request = {}, requestOptions) {
|
|
202
|
-
var _a, _b, _c;
|
|
204
|
+
var _a, _b, _c, _d;
|
|
203
205
|
const { shouldIncludeFernUsers } = request;
|
|
204
206
|
const _queryParams = {};
|
|
205
207
|
if (shouldIncludeFernUsers != null) {
|
|
@@ -207,7 +209,7 @@ export class Organization {
|
|
|
207
209
|
}
|
|
208
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);
|
|
209
211
|
const _response = yield core.fetcher({
|
|
210
|
-
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 }))}`),
|
|
211
213
|
method: "GET",
|
|
212
214
|
headers: _headers,
|
|
213
215
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -233,7 +235,7 @@ export class Organization {
|
|
|
233
235
|
};
|
|
234
236
|
}
|
|
235
237
|
if (_response.error.reason === "status-code") {
|
|
236
|
-
switch ((
|
|
238
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
237
239
|
case "UnauthorizedError":
|
|
238
240
|
return {
|
|
239
241
|
data: {
|
|
@@ -273,10 +275,10 @@ export class Organization {
|
|
|
273
275
|
}
|
|
274
276
|
__isMember(organizationId, requestOptions) {
|
|
275
277
|
return __awaiter(this, void 0, void 0, function* () {
|
|
276
|
-
var _a, _b;
|
|
278
|
+
var _a, _b, _c;
|
|
277
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);
|
|
278
280
|
const _response = yield core.fetcher({
|
|
279
|
-
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 }))}`),
|
|
280
282
|
method: "POST",
|
|
281
283
|
headers: _headers,
|
|
282
284
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -325,7 +327,7 @@ export class Organization {
|
|
|
325
327
|
}
|
|
326
328
|
__getMyOrganizationFromScopedToken() {
|
|
327
329
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
328
|
-
var _a, _b, _c;
|
|
330
|
+
var _a, _b, _c, _d;
|
|
329
331
|
const { shouldIncludeFernUsers } = request;
|
|
330
332
|
const _queryParams = {};
|
|
331
333
|
if (shouldIncludeFernUsers != null) {
|
|
@@ -333,7 +335,7 @@ export class Organization {
|
|
|
333
335
|
}
|
|
334
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);
|
|
335
337
|
const _response = yield core.fetcher({
|
|
336
|
-
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"),
|
|
337
339
|
method: "POST",
|
|
338
340
|
headers: _headers,
|
|
339
341
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -359,7 +361,7 @@ export class Organization {
|
|
|
359
361
|
};
|
|
360
362
|
}
|
|
361
363
|
if (_response.error.reason === "status-code") {
|
|
362
|
-
switch ((
|
|
364
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
363
365
|
case "UnauthorizedError":
|
|
364
366
|
return {
|
|
365
367
|
data: {
|
|
@@ -399,10 +401,10 @@ export class Organization {
|
|
|
399
401
|
}
|
|
400
402
|
__getOrgIdsFromToken(requestOptions) {
|
|
401
403
|
return __awaiter(this, void 0, void 0, function* () {
|
|
402
|
-
var _a, _b;
|
|
404
|
+
var _a, _b, _c;
|
|
403
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);
|
|
404
406
|
const _response = yield core.fetcher({
|
|
405
|
-
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"),
|
|
406
408
|
method: "POST",
|
|
407
409
|
headers: _headers,
|
|
408
410
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -452,10 +454,10 @@ export class Organization {
|
|
|
452
454
|
}
|
|
453
455
|
__addUser(request, requestOptions) {
|
|
454
456
|
return __awaiter(this, void 0, void 0, function* () {
|
|
455
|
-
var _a, _b, _c;
|
|
457
|
+
var _a, _b, _c, _d;
|
|
456
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);
|
|
457
459
|
const _response = yield core.fetcher({
|
|
458
|
-
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"),
|
|
459
461
|
method: "POST",
|
|
460
462
|
headers: _headers,
|
|
461
463
|
contentType: "application/json",
|
|
@@ -481,7 +483,7 @@ export class Organization {
|
|
|
481
483
|
};
|
|
482
484
|
}
|
|
483
485
|
if (_response.error.reason === "status-code") {
|
|
484
|
-
switch ((
|
|
486
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
485
487
|
case "UnauthorizedError":
|
|
486
488
|
case "UserIdDoesNotExistError":
|
|
487
489
|
return {
|
|
@@ -525,10 +527,10 @@ export class Organization {
|
|
|
525
527
|
}
|
|
526
528
|
__inviteUser(request, requestOptions) {
|
|
527
529
|
return __awaiter(this, void 0, void 0, function* () {
|
|
528
|
-
var _a, _b, _c;
|
|
530
|
+
var _a, _b, _c, _d;
|
|
529
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);
|
|
530
532
|
const _response = yield core.fetcher({
|
|
531
|
-
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"),
|
|
532
534
|
method: "POST",
|
|
533
535
|
headers: _headers,
|
|
534
536
|
contentType: "application/json",
|
|
@@ -554,7 +556,7 @@ export class Organization {
|
|
|
554
556
|
};
|
|
555
557
|
}
|
|
556
558
|
if (_response.error.reason === "status-code") {
|
|
557
|
-
switch ((
|
|
559
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
558
560
|
case "UnauthorizedError":
|
|
559
561
|
case "UserIdDoesNotExistError":
|
|
560
562
|
return {
|
|
@@ -598,10 +600,10 @@ export class Organization {
|
|
|
598
600
|
}
|
|
599
601
|
__removeUser(request, requestOptions) {
|
|
600
602
|
return __awaiter(this, void 0, void 0, function* () {
|
|
601
|
-
var _a, _b, _c;
|
|
603
|
+
var _a, _b, _c, _d;
|
|
602
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);
|
|
603
605
|
const _response = yield core.fetcher({
|
|
604
|
-
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"),
|
|
605
607
|
method: "DELETE",
|
|
606
608
|
headers: _headers,
|
|
607
609
|
contentType: "application/json",
|
|
@@ -627,7 +629,7 @@ export class Organization {
|
|
|
627
629
|
};
|
|
628
630
|
}
|
|
629
631
|
if (_response.error.reason === "status-code") {
|
|
630
|
-
switch ((
|
|
632
|
+
switch ((_d = _response.error.body) === null || _d === void 0 ? void 0 : _d.error) {
|
|
631
633
|
case "UnauthorizedError":
|
|
632
634
|
case "UserIdDoesNotExistError":
|
|
633
635
|
return {
|
|
@@ -8,7 +8,8 @@ import * as FernVenusApi from "../../../../index.mjs";
|
|
|
8
8
|
* organizationId: FernVenusApi.OrganizationId("organizationId"),
|
|
9
9
|
* displayName: undefined,
|
|
10
10
|
* artifactReadRequiresToken: undefined,
|
|
11
|
-
* enableGithubConnection: undefined
|
|
11
|
+
* enableGithubConnection: undefined,
|
|
12
|
+
* enableGoogleConnection: undefined
|
|
12
13
|
* }
|
|
13
14
|
*/
|
|
14
15
|
export interface CreateOrganizationRequest {
|
|
@@ -18,7 +19,14 @@ export interface CreateOrganizationRequest {
|
|
|
18
19
|
artifactReadRequiresToken?: boolean;
|
|
19
20
|
/**
|
|
20
21
|
* Allow users to log into the organization with their GitHub account, necessary for accepting organizations today.
|
|
22
|
+
* True by default.
|
|
21
23
|
* This is a field to allow for us to create organizations without this in the future if necessary.
|
|
22
24
|
*/
|
|
23
25
|
enableGithubConnection?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Allow users to log into the organization with their Google account.
|
|
28
|
+
* True by default.
|
|
29
|
+
* This is a field to allow for us to create organizations without this in the future if necessary.
|
|
30
|
+
*/
|
|
31
|
+
enableGoogleConnection?: boolean;
|
|
24
32
|
}
|
|
@@ -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/serialization/resources/organization/client/requests/CreateOrganizationRequest.mjs
CHANGED
|
@@ -8,4 +8,5 @@ export const CreateOrganizationRequest = core.serialization.object({
|
|
|
8
8
|
displayName: core.serialization.string().optional(),
|
|
9
9
|
artifactReadRequiresToken: core.serialization.boolean().optional(),
|
|
10
10
|
enableGithubConnection: core.serialization.boolean().optional(),
|
|
11
|
+
enableGoogleConnection: core.serialization.boolean().optional(),
|
|
11
12
|
});
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.17.
|
|
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.
|
|
1
|
+
export const SDK_VERSION = "0.17.4-2-g274600e";
|