@fern-api/venus-api-sdk 15.4.0 → 15.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +11 -6
- package/dist/cjs/api/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/index.js +3 -1
- package/dist/cjs/api/resources/oidc/client/Client.d.ts +62 -0
- package/dist/cjs/api/resources/oidc/client/Client.js +378 -0
- package/dist/cjs/api/resources/oidc/client/exchangeGithubOidcToken.d.ts +25 -0
- package/dist/cjs/api/resources/oidc/client/exchangeGithubOidcToken.js +66 -0
- package/dist/cjs/api/resources/oidc/client/index.d.ts +5 -0
- package/dist/cjs/api/resources/oidc/client/index.js +44 -0
- package/dist/cjs/api/resources/oidc/client/listTrustedRepos.d.ts +25 -0
- package/dist/cjs/api/resources/oidc/client/listTrustedRepos.js +66 -0
- package/dist/cjs/api/resources/oidc/client/requests/GithubOidcExchangeRequest.d.ts +11 -0
- package/dist/cjs/api/resources/oidc/client/requests/GithubOidcExchangeRequest.js +3 -0
- package/dist/cjs/api/resources/oidc/client/requests/ListTrustedReposOrganizationsOrganizationIdOidcGithubTrustedReposGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/oidc/client/requests/ListTrustedReposOrganizationsOrganizationIdOidcGithubTrustedReposGetRequest.js +3 -0
- package/dist/cjs/api/resources/oidc/client/requests/TrustRepoRequest.d.ts +15 -0
- package/dist/cjs/api/resources/oidc/client/requests/TrustRepoRequest.js +3 -0
- package/dist/cjs/api/resources/oidc/client/requests/UntrustRepoOrganizationsOrganizationIdOidcGithubTrustedReposRepositoryIdDeleteRequest.d.ts +11 -0
- package/dist/cjs/api/resources/oidc/client/requests/UntrustRepoOrganizationsOrganizationIdOidcGithubTrustedReposRepositoryIdDeleteRequest.js +3 -0
- package/dist/cjs/api/resources/oidc/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/oidc/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/oidc/client/trustRepo.d.ts +25 -0
- package/dist/cjs/api/resources/oidc/client/trustRepo.js +66 -0
- package/dist/cjs/api/resources/oidc/client/untrustRepo.d.ts +25 -0
- package/dist/cjs/api/resources/oidc/client/untrustRepo.js +66 -0
- package/dist/cjs/api/resources/oidc/index.d.ts +1 -0
- package/dist/cjs/api/resources/oidc/index.js +17 -0
- package/dist/cjs/api/types/TrustedRepo.d.ts +8 -0
- package/dist/cjs/api/types/TrustedRepo.js +3 -0
- package/dist/cjs/api/types/TrustedRepos.d.ts +4 -0
- package/dist/cjs/api/types/TrustedRepos.js +3 -0
- package/dist/cjs/api/types/index.d.ts +2 -0
- package/dist/cjs/api/types/index.js +2 -0
- package/dist/cjs/serialization/resources/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/index.js +3 -1
- package/dist/cjs/serialization/resources/oidc/client/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/oidc/client/index.js +17 -0
- package/dist/cjs/serialization/resources/oidc/client/requests/GithubOidcExchangeRequest.d.ts +10 -0
- package/dist/cjs/serialization/resources/oidc/client/requests/GithubOidcExchangeRequest.js +42 -0
- package/dist/cjs/serialization/resources/oidc/client/requests/TrustRepoRequest.d.ts +10 -0
- package/dist/cjs/serialization/resources/oidc/client/requests/TrustRepoRequest.js +42 -0
- package/dist/cjs/serialization/resources/oidc/client/requests/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/oidc/client/requests/index.js +7 -0
- package/dist/cjs/serialization/resources/oidc/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/oidc/index.js +17 -0
- package/dist/cjs/serialization/types/TrustedRepo.d.ts +14 -0
- package/dist/cjs/serialization/types/TrustedRepo.js +46 -0
- package/dist/cjs/serialization/types/TrustedRepos.d.ts +10 -0
- package/dist/cjs/serialization/types/TrustedRepos.js +42 -0
- package/dist/cjs/serialization/types/index.d.ts +2 -0
- package/dist/cjs/serialization/types/index.js +2 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +5 -0
- package/dist/esm/api/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/index.mjs +2 -0
- package/dist/esm/api/resources/oidc/client/Client.d.mts +62 -0
- package/dist/esm/api/resources/oidc/client/Client.mjs +341 -0
- package/dist/esm/api/resources/oidc/client/exchangeGithubOidcToken.d.mts +25 -0
- package/dist/esm/api/resources/oidc/client/exchangeGithubOidcToken.mjs +30 -0
- package/dist/esm/api/resources/oidc/client/index.d.mts +5 -0
- package/dist/esm/api/resources/oidc/client/index.mjs +5 -0
- package/dist/esm/api/resources/oidc/client/listTrustedRepos.d.mts +25 -0
- package/dist/esm/api/resources/oidc/client/listTrustedRepos.mjs +30 -0
- package/dist/esm/api/resources/oidc/client/requests/GithubOidcExchangeRequest.d.mts +11 -0
- package/dist/esm/api/resources/oidc/client/requests/GithubOidcExchangeRequest.mjs +2 -0
- package/dist/esm/api/resources/oidc/client/requests/ListTrustedReposOrganizationsOrganizationIdOidcGithubTrustedReposGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/oidc/client/requests/ListTrustedReposOrganizationsOrganizationIdOidcGithubTrustedReposGetRequest.mjs +2 -0
- package/dist/esm/api/resources/oidc/client/requests/TrustRepoRequest.d.mts +15 -0
- package/dist/esm/api/resources/oidc/client/requests/TrustRepoRequest.mjs +2 -0
- package/dist/esm/api/resources/oidc/client/requests/UntrustRepoOrganizationsOrganizationIdOidcGithubTrustedReposRepositoryIdDeleteRequest.d.mts +11 -0
- package/dist/esm/api/resources/oidc/client/requests/UntrustRepoOrganizationsOrganizationIdOidcGithubTrustedReposRepositoryIdDeleteRequest.mjs +2 -0
- package/dist/esm/api/resources/oidc/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/oidc/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/oidc/client/trustRepo.d.mts +25 -0
- package/dist/esm/api/resources/oidc/client/trustRepo.mjs +30 -0
- package/dist/esm/api/resources/oidc/client/untrustRepo.d.mts +25 -0
- package/dist/esm/api/resources/oidc/client/untrustRepo.mjs +30 -0
- package/dist/esm/api/resources/oidc/index.d.mts +1 -0
- package/dist/esm/api/resources/oidc/index.mjs +1 -0
- package/dist/esm/api/types/TrustedRepo.d.mts +8 -0
- package/dist/esm/api/types/TrustedRepo.mjs +2 -0
- package/dist/esm/api/types/TrustedRepos.d.mts +4 -0
- package/dist/esm/api/types/TrustedRepos.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +2 -0
- package/dist/esm/api/types/index.mjs +2 -0
- package/dist/esm/serialization/resources/index.d.mts +2 -0
- package/dist/esm/serialization/resources/index.mjs +2 -0
- package/dist/esm/serialization/resources/oidc/client/index.d.mts +1 -0
- package/dist/esm/serialization/resources/oidc/client/index.mjs +1 -0
- package/dist/esm/serialization/resources/oidc/client/requests/GithubOidcExchangeRequest.d.mts +10 -0
- package/dist/esm/serialization/resources/oidc/client/requests/GithubOidcExchangeRequest.mjs +6 -0
- package/dist/esm/serialization/resources/oidc/client/requests/TrustRepoRequest.d.mts +10 -0
- package/dist/esm/serialization/resources/oidc/client/requests/TrustRepoRequest.mjs +6 -0
- package/dist/esm/serialization/resources/oidc/client/requests/index.d.mts +2 -0
- package/dist/esm/serialization/resources/oidc/client/requests/index.mjs +2 -0
- package/dist/esm/serialization/resources/oidc/index.d.mts +1 -0
- package/dist/esm/serialization/resources/oidc/index.mjs +1 -0
- package/dist/esm/serialization/types/TrustedRepo.d.mts +14 -0
- package/dist/esm/serialization/types/TrustedRepo.mjs +10 -0
- package/dist/esm/serialization/types/TrustedRepos.d.mts +10 -0
- package/dist/esm/serialization/types/TrustedRepos.mjs +6 -0
- package/dist/esm/serialization/types/index.d.mts +2 -0
- package/dist/esm/serialization/types/index.mjs +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +210 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "15.
|
|
47
|
-
"User-Agent": "@fern-api/venus-api-sdk/15.
|
|
46
|
+
"X-Fern-SDK-Version": "15.5.0",
|
|
47
|
+
"User-Agent": "@fern-api/venus-api-sdk/15.5.0",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ApiKeysClient } from "./api/resources/apiKeys/client/Client.js";
|
|
|
4
4
|
import { AuthClient } from "./api/resources/auth/client/Client.js";
|
|
5
5
|
import { GuestSessionClient } from "./api/resources/guestSession/client/Client.js";
|
|
6
6
|
import { InternalGuestSessionClient } from "./api/resources/internalGuestSession/client/Client.js";
|
|
7
|
+
import { OidcClient } from "./api/resources/oidc/client/Client.js";
|
|
7
8
|
import { OrganizationClient } from "./api/resources/organization/client/Client.js";
|
|
8
9
|
import { RegistryClient } from "./api/resources/registry/client/Client.js";
|
|
9
10
|
import { UserClient } from "./api/resources/user/client/Client.js";
|
|
@@ -25,6 +26,7 @@ export declare class FernVenusApiClient {
|
|
|
25
26
|
protected _user: UserClient | undefined;
|
|
26
27
|
protected _internalGuestSession: InternalGuestSessionClient | undefined;
|
|
27
28
|
protected _admin: AdminClient | undefined;
|
|
29
|
+
protected _oidc: OidcClient | undefined;
|
|
28
30
|
constructor(options: FernVenusApiClient.Options);
|
|
29
31
|
get apiKeys(): ApiKeysClient;
|
|
30
32
|
get auth(): AuthClient;
|
|
@@ -34,6 +36,7 @@ export declare class FernVenusApiClient {
|
|
|
34
36
|
get user(): UserClient;
|
|
35
37
|
get internalGuestSession(): InternalGuestSessionClient;
|
|
36
38
|
get admin(): AdminClient;
|
|
39
|
+
get oidc(): OidcClient;
|
|
37
40
|
/**
|
|
38
41
|
* @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
42
|
*
|
package/dist/cjs/Client.js
CHANGED
|
@@ -50,9 +50,10 @@ const Client_js_2 = require("./api/resources/apiKeys/client/Client.js");
|
|
|
50
50
|
const Client_js_3 = require("./api/resources/auth/client/Client.js");
|
|
51
51
|
const Client_js_4 = require("./api/resources/guestSession/client/Client.js");
|
|
52
52
|
const Client_js_5 = require("./api/resources/internalGuestSession/client/Client.js");
|
|
53
|
-
const Client_js_6 = require("./api/resources/
|
|
54
|
-
const Client_js_7 = require("./api/resources/
|
|
55
|
-
const Client_js_8 = require("./api/resources/
|
|
53
|
+
const Client_js_6 = require("./api/resources/oidc/client/Client.js");
|
|
54
|
+
const Client_js_7 = require("./api/resources/organization/client/Client.js");
|
|
55
|
+
const Client_js_8 = require("./api/resources/registry/client/Client.js");
|
|
56
|
+
const Client_js_9 = require("./api/resources/user/client/Client.js");
|
|
56
57
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
57
58
|
const headers_js_1 = require("./core/headers.js");
|
|
58
59
|
const core = __importStar(require("./core/index.js"));
|
|
@@ -74,15 +75,15 @@ class FernVenusApiClient {
|
|
|
74
75
|
}
|
|
75
76
|
get organization() {
|
|
76
77
|
var _a;
|
|
77
|
-
return ((_a = this._organization) !== null && _a !== void 0 ? _a : (this._organization = new
|
|
78
|
+
return ((_a = this._organization) !== null && _a !== void 0 ? _a : (this._organization = new Client_js_7.OrganizationClient(this._options)));
|
|
78
79
|
}
|
|
79
80
|
get registry() {
|
|
80
81
|
var _a;
|
|
81
|
-
return ((_a = this._registry) !== null && _a !== void 0 ? _a : (this._registry = new
|
|
82
|
+
return ((_a = this._registry) !== null && _a !== void 0 ? _a : (this._registry = new Client_js_8.RegistryClient(this._options)));
|
|
82
83
|
}
|
|
83
84
|
get user() {
|
|
84
85
|
var _a;
|
|
85
|
-
return ((_a = this._user) !== null && _a !== void 0 ? _a : (this._user = new
|
|
86
|
+
return ((_a = this._user) !== null && _a !== void 0 ? _a : (this._user = new Client_js_9.UserClient(this._options)));
|
|
86
87
|
}
|
|
87
88
|
get internalGuestSession() {
|
|
88
89
|
var _a;
|
|
@@ -92,6 +93,10 @@ class FernVenusApiClient {
|
|
|
92
93
|
var _a;
|
|
93
94
|
return ((_a = this._admin) !== null && _a !== void 0 ? _a : (this._admin = new Client_js_1.AdminClient(this._options)));
|
|
94
95
|
}
|
|
96
|
+
get oidc() {
|
|
97
|
+
var _a;
|
|
98
|
+
return ((_a = this._oidc) !== null && _a !== void 0 ? _a : (this._oidc = new Client_js_6.OidcClient(this._options)));
|
|
99
|
+
}
|
|
95
100
|
/**
|
|
96
101
|
* @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
97
102
|
*
|
|
@@ -9,6 +9,8 @@ export * as guestSession from "./guestSession/index.js";
|
|
|
9
9
|
export * from "./internalGuestSession/client/requests/index.js";
|
|
10
10
|
export * as internalGuestSession from "./internalGuestSession/index.js";
|
|
11
11
|
export * from "./internalGuestSession/types/index.js";
|
|
12
|
+
export * from "./oidc/client/requests/index.js";
|
|
13
|
+
export * as oidc from "./oidc/index.js";
|
|
12
14
|
export * from "./organization/client/requests/index.js";
|
|
13
15
|
export * as organization from "./organization/index.js";
|
|
14
16
|
export * from "./registry/client/requests/index.js";
|
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.user = exports.registry = exports.organization = exports.internalGuestSession = exports.guestSession = exports.auth = exports.apiKeys = exports.admin = void 0;
|
|
39
|
+
exports.user = exports.registry = exports.organization = exports.oidc = exports.internalGuestSession = exports.guestSession = exports.auth = exports.apiKeys = exports.admin = void 0;
|
|
40
40
|
__exportStar(require("./admin/client/requests/index.js"), exports);
|
|
41
41
|
exports.admin = __importStar(require("./admin/index.js"));
|
|
42
42
|
__exportStar(require("./apiKeys/client/requests/index.js"), exports);
|
|
@@ -48,6 +48,8 @@ exports.guestSession = __importStar(require("./guestSession/index.js"));
|
|
|
48
48
|
__exportStar(require("./internalGuestSession/client/requests/index.js"), exports);
|
|
49
49
|
exports.internalGuestSession = __importStar(require("./internalGuestSession/index.js"));
|
|
50
50
|
__exportStar(require("./internalGuestSession/types/index.js"), exports);
|
|
51
|
+
__exportStar(require("./oidc/client/requests/index.js"), exports);
|
|
52
|
+
exports.oidc = __importStar(require("./oidc/index.js"));
|
|
51
53
|
__exportStar(require("./organization/client/requests/index.js"), exports);
|
|
52
54
|
exports.organization = __importStar(require("./organization/index.js"));
|
|
53
55
|
__exportStar(require("./registry/client/requests/index.js"), exports);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../core/index.js";
|
|
4
|
+
import * as FernVenusApi from "../../../index.js";
|
|
5
|
+
export declare namespace OidcClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class OidcClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<OidcClient.Options>;
|
|
12
|
+
constructor(options: OidcClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* @param {FernVenusApi.TrustRepoRequest} request
|
|
15
|
+
* @param {OidcClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* await client.oidc.trustRepo({
|
|
19
|
+
* organizationId: "organization_id",
|
|
20
|
+
* repositoryId: "repository_id",
|
|
21
|
+
* repositoryOwnerId: "repositoryOwnerId",
|
|
22
|
+
* repositoryFullName: "repositoryFullName"
|
|
23
|
+
* })
|
|
24
|
+
*/
|
|
25
|
+
trustRepo(request: FernVenusApi.TrustRepoRequest, requestOptions?: OidcClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.TrustedRepo, FernVenusApi.oidc.trustRepo.Error>>;
|
|
26
|
+
private __trustRepo;
|
|
27
|
+
/**
|
|
28
|
+
* @param {FernVenusApi.UntrustRepoOrganizationsOrganizationIdOidcGithubTrustedReposRepositoryIdDeleteRequest} request
|
|
29
|
+
* @param {OidcClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* await client.oidc.untrustRepo({
|
|
33
|
+
* organizationId: "organization_id",
|
|
34
|
+
* repositoryId: "repository_id"
|
|
35
|
+
* })
|
|
36
|
+
*/
|
|
37
|
+
untrustRepo(request: FernVenusApi.UntrustRepoOrganizationsOrganizationIdOidcGithubTrustedReposRepositoryIdDeleteRequest, requestOptions?: OidcClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<void, FernVenusApi.oidc.untrustRepo.Error>>;
|
|
38
|
+
private __untrustRepo;
|
|
39
|
+
/**
|
|
40
|
+
* @param {FernVenusApi.ListTrustedReposOrganizationsOrganizationIdOidcGithubTrustedReposGetRequest} request
|
|
41
|
+
* @param {OidcClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* await client.oidc.listTrustedRepos({
|
|
45
|
+
* organizationId: "organization_id"
|
|
46
|
+
* })
|
|
47
|
+
*/
|
|
48
|
+
listTrustedRepos(request: FernVenusApi.ListTrustedReposOrganizationsOrganizationIdOidcGithubTrustedReposGetRequest, requestOptions?: OidcClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.TrustedRepos, FernVenusApi.oidc.listTrustedRepos.Error>>;
|
|
49
|
+
private __listTrustedRepos;
|
|
50
|
+
/**
|
|
51
|
+
* @param {FernVenusApi.GithubOidcExchangeRequest} request
|
|
52
|
+
* @param {OidcClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* await client.oidc.exchangeGithubOidcToken({
|
|
56
|
+
* token: "token",
|
|
57
|
+
* organizationId: "organizationId"
|
|
58
|
+
* })
|
|
59
|
+
*/
|
|
60
|
+
exchangeGithubOidcToken(request: FernVenusApi.GithubOidcExchangeRequest, requestOptions?: OidcClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.JwtResponse, FernVenusApi.oidc.exchangeGithubOidcToken.Error>>;
|
|
61
|
+
private __exchangeGithubOidcToken;
|
|
62
|
+
}
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
46
|
+
var t = {};
|
|
47
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
48
|
+
t[p] = s[p];
|
|
49
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
50
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
51
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
52
|
+
t[p[i]] = s[p[i]];
|
|
53
|
+
}
|
|
54
|
+
return t;
|
|
55
|
+
};
|
|
56
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57
|
+
exports.OidcClient = void 0;
|
|
58
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
59
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
60
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
61
|
+
const serializers = __importStar(require("../../../../serialization/index.js"));
|
|
62
|
+
const FernVenusApi = __importStar(require("../../../index.js"));
|
|
63
|
+
class OidcClient {
|
|
64
|
+
constructor(options) {
|
|
65
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @param {FernVenusApi.TrustRepoRequest} request
|
|
69
|
+
* @param {OidcClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* await client.oidc.trustRepo({
|
|
73
|
+
* organizationId: "organization_id",
|
|
74
|
+
* repositoryId: "repository_id",
|
|
75
|
+
* repositoryOwnerId: "repositoryOwnerId",
|
|
76
|
+
* repositoryFullName: "repositoryFullName"
|
|
77
|
+
* })
|
|
78
|
+
*/
|
|
79
|
+
trustRepo(request, requestOptions) {
|
|
80
|
+
return core.HttpResponsePromise.fromPromise(this.__trustRepo(request, requestOptions));
|
|
81
|
+
}
|
|
82
|
+
__trustRepo(request, requestOptions) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
85
|
+
const { organizationId, repositoryId } = request, _body = __rest(request, ["organizationId", "repositoryId"]);
|
|
86
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
87
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
88
|
+
const _response = yield core.fetcher({
|
|
89
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `organizations/${core.url.encodePathParam(organizationId)}/oidc/github/trusted-repos/${core.url.encodePathParam(repositoryId)}`),
|
|
90
|
+
method: "PUT",
|
|
91
|
+
headers: _headers,
|
|
92
|
+
contentType: "application/json",
|
|
93
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
94
|
+
requestType: "json",
|
|
95
|
+
body: serializers.TrustRepoRequest.jsonOrThrow(_body, {
|
|
96
|
+
unrecognizedObjectKeys: "strip",
|
|
97
|
+
omitUndefined: true,
|
|
98
|
+
}),
|
|
99
|
+
timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
|
|
100
|
+
maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
|
|
101
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
102
|
+
fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
|
|
103
|
+
logging: this._options.logging,
|
|
104
|
+
});
|
|
105
|
+
if (_response.ok) {
|
|
106
|
+
return {
|
|
107
|
+
data: {
|
|
108
|
+
ok: true,
|
|
109
|
+
body: serializers.TrustedRepo.parseOrThrow(_response.body, {
|
|
110
|
+
unrecognizedObjectKeys: "passthrough",
|
|
111
|
+
allowUnrecognizedUnionMembers: true,
|
|
112
|
+
allowUnrecognizedEnumValues: true,
|
|
113
|
+
skipValidation: true,
|
|
114
|
+
breadcrumbsPrefix: ["response"],
|
|
115
|
+
}),
|
|
116
|
+
headers: _response.headers,
|
|
117
|
+
rawResponse: _response.rawResponse,
|
|
118
|
+
},
|
|
119
|
+
rawResponse: _response.rawResponse,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
if (_response.error.reason === "status-code") {
|
|
123
|
+
switch (_response.error.statusCode) {
|
|
124
|
+
case 422:
|
|
125
|
+
return {
|
|
126
|
+
data: {
|
|
127
|
+
ok: false,
|
|
128
|
+
error: FernVenusApi.oidc.trustRepo.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
129
|
+
unrecognizedObjectKeys: "passthrough",
|
|
130
|
+
allowUnrecognizedUnionMembers: true,
|
|
131
|
+
allowUnrecognizedEnumValues: true,
|
|
132
|
+
skipValidation: true,
|
|
133
|
+
breadcrumbsPrefix: ["response"],
|
|
134
|
+
})),
|
|
135
|
+
rawResponse: _response.rawResponse,
|
|
136
|
+
},
|
|
137
|
+
rawResponse: _response.rawResponse,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return {
|
|
142
|
+
data: {
|
|
143
|
+
ok: false,
|
|
144
|
+
error: FernVenusApi.oidc.trustRepo.Error._unknown(_response.error),
|
|
145
|
+
rawResponse: _response.rawResponse,
|
|
146
|
+
},
|
|
147
|
+
rawResponse: _response.rawResponse,
|
|
148
|
+
};
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* @param {FernVenusApi.UntrustRepoOrganizationsOrganizationIdOidcGithubTrustedReposRepositoryIdDeleteRequest} request
|
|
153
|
+
* @param {OidcClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* await client.oidc.untrustRepo({
|
|
157
|
+
* organizationId: "organization_id",
|
|
158
|
+
* repositoryId: "repository_id"
|
|
159
|
+
* })
|
|
160
|
+
*/
|
|
161
|
+
untrustRepo(request, requestOptions) {
|
|
162
|
+
return core.HttpResponsePromise.fromPromise(this.__untrustRepo(request, requestOptions));
|
|
163
|
+
}
|
|
164
|
+
__untrustRepo(request, requestOptions) {
|
|
165
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
166
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
167
|
+
const { organizationId, repositoryId } = request;
|
|
168
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
169
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
170
|
+
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/${core.url.encodePathParam(organizationId)}/oidc/github/trusted-repos/${core.url.encodePathParam(repositoryId)}`),
|
|
172
|
+
method: "DELETE",
|
|
173
|
+
headers: _headers,
|
|
174
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
175
|
+
timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
|
|
176
|
+
maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
|
|
177
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
178
|
+
fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
|
|
179
|
+
logging: this._options.logging,
|
|
180
|
+
});
|
|
181
|
+
if (_response.ok) {
|
|
182
|
+
return {
|
|
183
|
+
data: {
|
|
184
|
+
ok: true,
|
|
185
|
+
body: undefined,
|
|
186
|
+
headers: _response.headers,
|
|
187
|
+
rawResponse: _response.rawResponse,
|
|
188
|
+
},
|
|
189
|
+
rawResponse: _response.rawResponse,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
if (_response.error.reason === "status-code") {
|
|
193
|
+
switch (_response.error.statusCode) {
|
|
194
|
+
case 422:
|
|
195
|
+
return {
|
|
196
|
+
data: {
|
|
197
|
+
ok: false,
|
|
198
|
+
error: FernVenusApi.oidc.untrustRepo.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
199
|
+
unrecognizedObjectKeys: "passthrough",
|
|
200
|
+
allowUnrecognizedUnionMembers: true,
|
|
201
|
+
allowUnrecognizedEnumValues: true,
|
|
202
|
+
skipValidation: true,
|
|
203
|
+
breadcrumbsPrefix: ["response"],
|
|
204
|
+
})),
|
|
205
|
+
rawResponse: _response.rawResponse,
|
|
206
|
+
},
|
|
207
|
+
rawResponse: _response.rawResponse,
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return {
|
|
212
|
+
data: {
|
|
213
|
+
ok: false,
|
|
214
|
+
error: FernVenusApi.oidc.untrustRepo.Error._unknown(_response.error),
|
|
215
|
+
rawResponse: _response.rawResponse,
|
|
216
|
+
},
|
|
217
|
+
rawResponse: _response.rawResponse,
|
|
218
|
+
};
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* @param {FernVenusApi.ListTrustedReposOrganizationsOrganizationIdOidcGithubTrustedReposGetRequest} request
|
|
223
|
+
* @param {OidcClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* await client.oidc.listTrustedRepos({
|
|
227
|
+
* organizationId: "organization_id"
|
|
228
|
+
* })
|
|
229
|
+
*/
|
|
230
|
+
listTrustedRepos(request, requestOptions) {
|
|
231
|
+
return core.HttpResponsePromise.fromPromise(this.__listTrustedRepos(request, requestOptions));
|
|
232
|
+
}
|
|
233
|
+
__listTrustedRepos(request, requestOptions) {
|
|
234
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
235
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
236
|
+
const { organizationId } = request;
|
|
237
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
238
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
239
|
+
const _response = yield core.fetcher({
|
|
240
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `organizations/${core.url.encodePathParam(organizationId)}/oidc/github/trusted-repos`),
|
|
241
|
+
method: "GET",
|
|
242
|
+
headers: _headers,
|
|
243
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
244
|
+
timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
|
|
245
|
+
maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
|
|
246
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
247
|
+
fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
|
|
248
|
+
logging: this._options.logging,
|
|
249
|
+
});
|
|
250
|
+
if (_response.ok) {
|
|
251
|
+
return {
|
|
252
|
+
data: {
|
|
253
|
+
ok: true,
|
|
254
|
+
body: serializers.TrustedRepos.parseOrThrow(_response.body, {
|
|
255
|
+
unrecognizedObjectKeys: "passthrough",
|
|
256
|
+
allowUnrecognizedUnionMembers: true,
|
|
257
|
+
allowUnrecognizedEnumValues: true,
|
|
258
|
+
skipValidation: true,
|
|
259
|
+
breadcrumbsPrefix: ["response"],
|
|
260
|
+
}),
|
|
261
|
+
headers: _response.headers,
|
|
262
|
+
rawResponse: _response.rawResponse,
|
|
263
|
+
},
|
|
264
|
+
rawResponse: _response.rawResponse,
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
if (_response.error.reason === "status-code") {
|
|
268
|
+
switch (_response.error.statusCode) {
|
|
269
|
+
case 422:
|
|
270
|
+
return {
|
|
271
|
+
data: {
|
|
272
|
+
ok: false,
|
|
273
|
+
error: FernVenusApi.oidc.listTrustedRepos.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
274
|
+
unrecognizedObjectKeys: "passthrough",
|
|
275
|
+
allowUnrecognizedUnionMembers: true,
|
|
276
|
+
allowUnrecognizedEnumValues: true,
|
|
277
|
+
skipValidation: true,
|
|
278
|
+
breadcrumbsPrefix: ["response"],
|
|
279
|
+
})),
|
|
280
|
+
rawResponse: _response.rawResponse,
|
|
281
|
+
},
|
|
282
|
+
rawResponse: _response.rawResponse,
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
return {
|
|
287
|
+
data: {
|
|
288
|
+
ok: false,
|
|
289
|
+
error: FernVenusApi.oidc.listTrustedRepos.Error._unknown(_response.error),
|
|
290
|
+
rawResponse: _response.rawResponse,
|
|
291
|
+
},
|
|
292
|
+
rawResponse: _response.rawResponse,
|
|
293
|
+
};
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* @param {FernVenusApi.GithubOidcExchangeRequest} request
|
|
298
|
+
* @param {OidcClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
299
|
+
*
|
|
300
|
+
* @example
|
|
301
|
+
* await client.oidc.exchangeGithubOidcToken({
|
|
302
|
+
* token: "token",
|
|
303
|
+
* organizationId: "organizationId"
|
|
304
|
+
* })
|
|
305
|
+
*/
|
|
306
|
+
exchangeGithubOidcToken(request, requestOptions) {
|
|
307
|
+
return core.HttpResponsePromise.fromPromise(this.__exchangeGithubOidcToken(request, requestOptions));
|
|
308
|
+
}
|
|
309
|
+
__exchangeGithubOidcToken(request, requestOptions) {
|
|
310
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
311
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
312
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
313
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
314
|
+
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)), "auth/oidc/github"),
|
|
316
|
+
method: "POST",
|
|
317
|
+
headers: _headers,
|
|
318
|
+
contentType: "application/json",
|
|
319
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
320
|
+
requestType: "json",
|
|
321
|
+
body: serializers.GithubOidcExchangeRequest.jsonOrThrow(request, {
|
|
322
|
+
unrecognizedObjectKeys: "strip",
|
|
323
|
+
omitUndefined: true,
|
|
324
|
+
}),
|
|
325
|
+
timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
|
|
326
|
+
maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
|
|
327
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
328
|
+
fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
|
|
329
|
+
logging: this._options.logging,
|
|
330
|
+
});
|
|
331
|
+
if (_response.ok) {
|
|
332
|
+
return {
|
|
333
|
+
data: {
|
|
334
|
+
ok: true,
|
|
335
|
+
body: serializers.JwtResponse.parseOrThrow(_response.body, {
|
|
336
|
+
unrecognizedObjectKeys: "passthrough",
|
|
337
|
+
allowUnrecognizedUnionMembers: true,
|
|
338
|
+
allowUnrecognizedEnumValues: true,
|
|
339
|
+
skipValidation: true,
|
|
340
|
+
breadcrumbsPrefix: ["response"],
|
|
341
|
+
}),
|
|
342
|
+
headers: _response.headers,
|
|
343
|
+
rawResponse: _response.rawResponse,
|
|
344
|
+
},
|
|
345
|
+
rawResponse: _response.rawResponse,
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
if (_response.error.reason === "status-code") {
|
|
349
|
+
switch (_response.error.statusCode) {
|
|
350
|
+
case 422:
|
|
351
|
+
return {
|
|
352
|
+
data: {
|
|
353
|
+
ok: false,
|
|
354
|
+
error: FernVenusApi.oidc.exchangeGithubOidcToken.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
355
|
+
unrecognizedObjectKeys: "passthrough",
|
|
356
|
+
allowUnrecognizedUnionMembers: true,
|
|
357
|
+
allowUnrecognizedEnumValues: true,
|
|
358
|
+
skipValidation: true,
|
|
359
|
+
breadcrumbsPrefix: ["response"],
|
|
360
|
+
})),
|
|
361
|
+
rawResponse: _response.rawResponse,
|
|
362
|
+
},
|
|
363
|
+
rawResponse: _response.rawResponse,
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
return {
|
|
368
|
+
data: {
|
|
369
|
+
ok: false,
|
|
370
|
+
error: FernVenusApi.oidc.exchangeGithubOidcToken.Error._unknown(_response.error),
|
|
371
|
+
rawResponse: _response.rawResponse,
|
|
372
|
+
},
|
|
373
|
+
rawResponse: _response.rawResponse,
|
|
374
|
+
};
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
exports.OidcClient = OidcClient;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type * as core from "../../../../core/index.js";
|
|
2
|
+
import * as FernVenusApi from "../../../index.js";
|
|
3
|
+
export type Error = FernVenusApi.oidc.exchangeGithubOidcToken.Error.UnprocessableEntityError | FernVenusApi.oidc.exchangeGithubOidcToken.Error._Unknown;
|
|
4
|
+
export declare namespace Error {
|
|
5
|
+
interface UnprocessableEntityError extends _Utils {
|
|
6
|
+
statusCode: 422;
|
|
7
|
+
content: FernVenusApi.HttpValidationError;
|
|
8
|
+
}
|
|
9
|
+
interface _Unknown extends _Utils {
|
|
10
|
+
statusCode: void;
|
|
11
|
+
content: core.Fetcher.Error;
|
|
12
|
+
}
|
|
13
|
+
interface _Utils {
|
|
14
|
+
_visit: <_Result>(visitor: FernVenusApi.oidc.exchangeGithubOidcToken.Error._Visitor<_Result>) => _Result;
|
|
15
|
+
}
|
|
16
|
+
interface _Visitor<_Result> {
|
|
17
|
+
unprocessableEntityError: (value: FernVenusApi.HttpValidationError) => _Result;
|
|
18
|
+
_other: (value: core.Fetcher.Error) => _Result;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export declare const Error: {
|
|
22
|
+
readonly unprocessableEntityError: (value: FernVenusApi.HttpValidationError) => FernVenusApi.oidc.exchangeGithubOidcToken.Error.UnprocessableEntityError;
|
|
23
|
+
readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.oidc.exchangeGithubOidcToken.Error._Unknown;
|
|
24
|
+
readonly _visit: <_Result>(value: FernVenusApi.oidc.exchangeGithubOidcToken.Error, visitor: FernVenusApi.oidc.exchangeGithubOidcToken.Error._Visitor<_Result>) => _Result;
|
|
25
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.Error = void 0;
|
|
38
|
+
const FernVenusApi = __importStar(require("../../../index.js"));
|
|
39
|
+
exports.Error = {
|
|
40
|
+
unprocessableEntityError: (value) => {
|
|
41
|
+
return {
|
|
42
|
+
content: value,
|
|
43
|
+
statusCode: 422,
|
|
44
|
+
_visit: function (visitor) {
|
|
45
|
+
return FernVenusApi.oidc.exchangeGithubOidcToken.Error._visit(this, visitor);
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
_unknown: (fetcherError) => {
|
|
50
|
+
return {
|
|
51
|
+
statusCode: undefined,
|
|
52
|
+
content: fetcherError,
|
|
53
|
+
_visit: function (visitor) {
|
|
54
|
+
return FernVenusApi.oidc.exchangeGithubOidcToken.Error._visit(this, visitor);
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
_visit: (value, visitor) => {
|
|
59
|
+
switch (value.statusCode) {
|
|
60
|
+
case 422:
|
|
61
|
+
return visitor.unprocessableEntityError(value.content);
|
|
62
|
+
default:
|
|
63
|
+
return visitor._other(value.content);
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
};
|