@fern-api/venus-api-sdk 11.4.0 → 11.6.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/guestSession/client/Client.d.ts +31 -0
- package/dist/cjs/api/resources/guestSession/client/Client.js +144 -0
- package/dist/cjs/api/resources/guestSession/client/create.d.ts +25 -0
- package/dist/cjs/api/resources/guestSession/client/create.js +66 -0
- package/dist/cjs/api/resources/guestSession/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/guestSession/client/index.js +41 -0
- package/dist/cjs/api/resources/guestSession/client/requests/CreateGuestSessionRequest.d.ts +11 -0
- package/dist/cjs/api/resources/guestSession/client/requests/CreateGuestSessionRequest.js +3 -0
- package/dist/cjs/api/resources/guestSession/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/guestSession/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/guestSession/index.d.ts +1 -0
- package/dist/cjs/api/resources/guestSession/index.js +17 -0
- package/dist/cjs/api/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/index.js +3 -1
- package/dist/cjs/api/resources/organization/client/Client.d.ts +34 -1
- package/dist/cjs/api/resources/organization/client/Client.js +162 -1
- package/dist/cjs/api/resources/organization/client/getPostmanTeamDocs.d.ts +25 -0
- package/dist/cjs/api/resources/organization/client/getPostmanTeamDocs.js +66 -0
- package/dist/cjs/api/resources/organization/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/organization/client/index.js +3 -1
- package/dist/cjs/api/resources/organization/client/requests/GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/organization/client/requests/GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest.js +3 -0
- package/dist/cjs/api/resources/organization/client/requests/SetDocsUrlRequest.d.ts +11 -0
- package/dist/cjs/api/resources/organization/client/requests/SetDocsUrlRequest.js +3 -0
- package/dist/cjs/api/resources/organization/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/organization/client/setDocsUrl.d.ts +25 -0
- package/dist/cjs/api/resources/organization/client/setDocsUrl.js +66 -0
- package/dist/cjs/api/types/CreateGuestSessionResponse.d.ts +9 -0
- package/dist/cjs/api/types/CreateGuestSessionResponse.js +3 -0
- package/dist/cjs/api/types/GuestSessionLimits.d.ts +4 -0
- package/dist/cjs/api/types/GuestSessionLimits.js +3 -0
- package/dist/cjs/api/types/PostmanTeamDocsResponse.d.ts +6 -0
- package/dist/cjs/api/types/PostmanTeamDocsResponse.js +3 -0
- package/dist/cjs/api/types/index.d.ts +3 -0
- package/dist/cjs/api/types/index.js +3 -0
- package/dist/cjs/serialization/resources/guestSession/client/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/guestSession/client/index.js +17 -0
- package/dist/cjs/serialization/resources/guestSession/client/requests/CreateGuestSessionRequest.d.ts +11 -0
- package/dist/cjs/serialization/resources/guestSession/client/requests/CreateGuestSessionRequest.js +43 -0
- package/dist/cjs/serialization/resources/guestSession/client/requests/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/guestSession/client/requests/index.js +5 -0
- package/dist/cjs/serialization/resources/guestSession/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/guestSession/index.js +17 -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/organization/client/requests/SetDocsUrlRequest.d.ts +9 -0
- package/dist/cjs/serialization/resources/organization/client/requests/SetDocsUrlRequest.js +41 -0
- package/dist/cjs/serialization/resources/organization/client/requests/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/organization/client/requests/index.js +3 -1
- package/dist/cjs/serialization/types/CreateGuestSessionResponse.d.ts +15 -0
- package/dist/cjs/serialization/types/CreateGuestSessionResponse.js +47 -0
- package/dist/cjs/serialization/types/GuestSessionLimits.d.ts +10 -0
- package/dist/cjs/serialization/types/GuestSessionLimits.js +42 -0
- package/dist/cjs/serialization/types/PostmanTeamDocsResponse.d.ts +12 -0
- package/dist/cjs/serialization/types/PostmanTeamDocsResponse.js +44 -0
- package/dist/cjs/serialization/types/index.d.ts +3 -0
- package/dist/cjs/serialization/types/index.js +3 -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/guestSession/client/Client.d.mts +31 -0
- package/dist/esm/api/resources/guestSession/client/Client.mjs +107 -0
- package/dist/esm/api/resources/guestSession/client/create.d.mts +25 -0
- package/dist/esm/api/resources/guestSession/client/create.mjs +30 -0
- package/dist/esm/api/resources/guestSession/client/index.d.mts +2 -0
- package/dist/esm/api/resources/guestSession/client/index.mjs +2 -0
- package/dist/esm/api/resources/guestSession/client/requests/CreateGuestSessionRequest.d.mts +11 -0
- package/dist/esm/api/resources/guestSession/client/requests/CreateGuestSessionRequest.mjs +2 -0
- package/dist/esm/api/resources/guestSession/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/guestSession/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/guestSession/index.d.mts +1 -0
- package/dist/esm/api/resources/guestSession/index.mjs +1 -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/organization/client/Client.d.mts +34 -1
- package/dist/esm/api/resources/organization/client/Client.mjs +162 -1
- package/dist/esm/api/resources/organization/client/getPostmanTeamDocs.d.mts +25 -0
- package/dist/esm/api/resources/organization/client/getPostmanTeamDocs.mjs +30 -0
- package/dist/esm/api/resources/organization/client/index.d.mts +2 -0
- package/dist/esm/api/resources/organization/client/index.mjs +2 -0
- package/dist/esm/api/resources/organization/client/requests/GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/organization/client/requests/GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest.mjs +2 -0
- package/dist/esm/api/resources/organization/client/requests/SetDocsUrlRequest.d.mts +11 -0
- package/dist/esm/api/resources/organization/client/requests/SetDocsUrlRequest.mjs +2 -0
- package/dist/esm/api/resources/organization/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/organization/client/setDocsUrl.d.mts +25 -0
- package/dist/esm/api/resources/organization/client/setDocsUrl.mjs +30 -0
- package/dist/esm/api/types/CreateGuestSessionResponse.d.mts +9 -0
- package/dist/esm/api/types/CreateGuestSessionResponse.mjs +2 -0
- package/dist/esm/api/types/GuestSessionLimits.d.mts +4 -0
- package/dist/esm/api/types/GuestSessionLimits.mjs +2 -0
- package/dist/esm/api/types/PostmanTeamDocsResponse.d.mts +6 -0
- package/dist/esm/api/types/PostmanTeamDocsResponse.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +3 -0
- package/dist/esm/api/types/index.mjs +3 -0
- package/dist/esm/serialization/resources/guestSession/client/index.d.mts +1 -0
- package/dist/esm/serialization/resources/guestSession/client/index.mjs +1 -0
- package/dist/esm/serialization/resources/guestSession/client/requests/CreateGuestSessionRequest.d.mts +11 -0
- package/dist/esm/serialization/resources/guestSession/client/requests/CreateGuestSessionRequest.mjs +7 -0
- package/dist/esm/serialization/resources/guestSession/client/requests/index.d.mts +1 -0
- package/dist/esm/serialization/resources/guestSession/client/requests/index.mjs +1 -0
- package/dist/esm/serialization/resources/guestSession/index.d.mts +1 -0
- package/dist/esm/serialization/resources/guestSession/index.mjs +1 -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/organization/client/requests/SetDocsUrlRequest.d.mts +9 -0
- package/dist/esm/serialization/resources/organization/client/requests/SetDocsUrlRequest.mjs +5 -0
- package/dist/esm/serialization/resources/organization/client/requests/index.d.mts +1 -0
- package/dist/esm/serialization/resources/organization/client/requests/index.mjs +1 -0
- package/dist/esm/serialization/types/CreateGuestSessionResponse.d.mts +15 -0
- package/dist/esm/serialization/types/CreateGuestSessionResponse.mjs +11 -0
- package/dist/esm/serialization/types/GuestSessionLimits.d.mts +10 -0
- package/dist/esm/serialization/types/GuestSessionLimits.mjs +6 -0
- package/dist/esm/serialization/types/PostmanTeamDocsResponse.d.mts +12 -0
- package/dist/esm/serialization/types/PostmanTeamDocsResponse.mjs +8 -0
- package/dist/esm/serialization/types/index.d.mts +3 -0
- package/dist/esm/serialization/types/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +209 -1
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": "11.
|
|
47
|
-
"User-Agent": "@fern-api/venus-api-sdk/11.
|
|
46
|
+
"X-Fern-SDK-Version": "11.6.0",
|
|
47
|
+
"User-Agent": "@fern-api/venus-api-sdk/11.6.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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as FernVenusApi from "./api/index.js";
|
|
2
2
|
import { ApiKeysClient } from "./api/resources/apiKeys/client/Client.js";
|
|
3
3
|
import { AuthClient } from "./api/resources/auth/client/Client.js";
|
|
4
|
+
import { GuestSessionClient } from "./api/resources/guestSession/client/Client.js";
|
|
4
5
|
import { OrganizationClient } from "./api/resources/organization/client/Client.js";
|
|
5
6
|
import { RegistryClient } from "./api/resources/registry/client/Client.js";
|
|
6
7
|
import { UserClient } from "./api/resources/user/client/Client.js";
|
|
@@ -16,12 +17,14 @@ export declare class FernVenusApiClient {
|
|
|
16
17
|
protected readonly _options: NormalizedClientOptionsWithAuth<FernVenusApiClient.Options>;
|
|
17
18
|
protected _apiKeys: ApiKeysClient | undefined;
|
|
18
19
|
protected _auth: AuthClient | undefined;
|
|
20
|
+
protected _guestSession: GuestSessionClient | undefined;
|
|
19
21
|
protected _organization: OrganizationClient | undefined;
|
|
20
22
|
protected _registry: RegistryClient | undefined;
|
|
21
23
|
protected _user: UserClient | undefined;
|
|
22
24
|
constructor(options: FernVenusApiClient.Options);
|
|
23
25
|
get apiKeys(): ApiKeysClient;
|
|
24
26
|
get auth(): AuthClient;
|
|
27
|
+
get guestSession(): GuestSessionClient;
|
|
25
28
|
get organization(): OrganizationClient;
|
|
26
29
|
get registry(): RegistryClient;
|
|
27
30
|
get user(): UserClient;
|
package/dist/cjs/Client.js
CHANGED
|
@@ -47,9 +47,10 @@ exports.FernVenusApiClient = void 0;
|
|
|
47
47
|
const FernVenusApi = __importStar(require("./api/index.js"));
|
|
48
48
|
const Client_js_1 = require("./api/resources/apiKeys/client/Client.js");
|
|
49
49
|
const Client_js_2 = require("./api/resources/auth/client/Client.js");
|
|
50
|
-
const Client_js_3 = require("./api/resources/
|
|
51
|
-
const Client_js_4 = require("./api/resources/
|
|
52
|
-
const Client_js_5 = require("./api/resources/
|
|
50
|
+
const Client_js_3 = require("./api/resources/guestSession/client/Client.js");
|
|
51
|
+
const Client_js_4 = require("./api/resources/organization/client/Client.js");
|
|
52
|
+
const Client_js_5 = require("./api/resources/registry/client/Client.js");
|
|
53
|
+
const Client_js_6 = require("./api/resources/user/client/Client.js");
|
|
53
54
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
54
55
|
const headers_js_1 = require("./core/headers.js");
|
|
55
56
|
const core = __importStar(require("./core/index.js"));
|
|
@@ -65,17 +66,21 @@ class FernVenusApiClient {
|
|
|
65
66
|
var _a;
|
|
66
67
|
return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new Client_js_2.AuthClient(this._options)));
|
|
67
68
|
}
|
|
69
|
+
get guestSession() {
|
|
70
|
+
var _a;
|
|
71
|
+
return ((_a = this._guestSession) !== null && _a !== void 0 ? _a : (this._guestSession = new Client_js_3.GuestSessionClient(this._options)));
|
|
72
|
+
}
|
|
68
73
|
get organization() {
|
|
69
74
|
var _a;
|
|
70
|
-
return ((_a = this._organization) !== null && _a !== void 0 ? _a : (this._organization = new
|
|
75
|
+
return ((_a = this._organization) !== null && _a !== void 0 ? _a : (this._organization = new Client_js_4.OrganizationClient(this._options)));
|
|
71
76
|
}
|
|
72
77
|
get registry() {
|
|
73
78
|
var _a;
|
|
74
|
-
return ((_a = this._registry) !== null && _a !== void 0 ? _a : (this._registry = new
|
|
79
|
+
return ((_a = this._registry) !== null && _a !== void 0 ? _a : (this._registry = new Client_js_5.RegistryClient(this._options)));
|
|
75
80
|
}
|
|
76
81
|
get user() {
|
|
77
82
|
var _a;
|
|
78
|
-
return ((_a = this._user) !== null && _a !== void 0 ? _a : (this._user = new
|
|
83
|
+
return ((_a = this._user) !== null && _a !== void 0 ? _a : (this._user = new Client_js_6.UserClient(this._options)));
|
|
79
84
|
}
|
|
80
85
|
/**
|
|
81
86
|
* @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -0,0 +1,31 @@
|
|
|
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 GuestSessionClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class GuestSessionClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<GuestSessionClient.Options>;
|
|
12
|
+
constructor(options: GuestSessionClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Issue a guest session: a throwaway organization, a short-lived token bound to it, and
|
|
15
|
+
* the secret needed to claim it later.
|
|
16
|
+
* This endpoint is unauthenticated on purpose. It is the one way into Fern without a
|
|
17
|
+
* login, so every decision about what the session may do, how long it lasts and how many
|
|
18
|
+
* a caller may open is made here, on the server.
|
|
19
|
+
* The token and the claim secret are returned once and stored only as hashes.
|
|
20
|
+
*
|
|
21
|
+
* @param {FernVenusApi.CreateGuestSessionRequest} request
|
|
22
|
+
* @param {GuestSessionClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* await client.guestSession.create({
|
|
26
|
+
* fingerprint: "fingerprint"
|
|
27
|
+
* })
|
|
28
|
+
*/
|
|
29
|
+
create(request: FernVenusApi.CreateGuestSessionRequest, requestOptions?: GuestSessionClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.CreateGuestSessionResponse, FernVenusApi.guestSession.create.Error>>;
|
|
30
|
+
private __create;
|
|
31
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.GuestSessionClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
48
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
49
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
50
|
+
const serializers = __importStar(require("../../../../serialization/index.js"));
|
|
51
|
+
const FernVenusApi = __importStar(require("../../../index.js"));
|
|
52
|
+
class GuestSessionClient {
|
|
53
|
+
constructor(options) {
|
|
54
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Issue a guest session: a throwaway organization, a short-lived token bound to it, and
|
|
58
|
+
* the secret needed to claim it later.
|
|
59
|
+
* This endpoint is unauthenticated on purpose. It is the one way into Fern without a
|
|
60
|
+
* login, so every decision about what the session may do, how long it lasts and how many
|
|
61
|
+
* a caller may open is made here, on the server.
|
|
62
|
+
* The token and the claim secret are returned once and stored only as hashes.
|
|
63
|
+
*
|
|
64
|
+
* @param {FernVenusApi.CreateGuestSessionRequest} request
|
|
65
|
+
* @param {GuestSessionClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* await client.guestSession.create({
|
|
69
|
+
* fingerprint: "fingerprint"
|
|
70
|
+
* })
|
|
71
|
+
*/
|
|
72
|
+
create(request, requestOptions) {
|
|
73
|
+
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
74
|
+
}
|
|
75
|
+
__create(request, requestOptions) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
78
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
79
|
+
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);
|
|
80
|
+
const _response = yield core.fetcher({
|
|
81
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "guest-sessions"),
|
|
82
|
+
method: "POST",
|
|
83
|
+
headers: _headers,
|
|
84
|
+
contentType: "application/json",
|
|
85
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
86
|
+
requestType: "json",
|
|
87
|
+
body: serializers.CreateGuestSessionRequest.jsonOrThrow(request, {
|
|
88
|
+
unrecognizedObjectKeys: "strip",
|
|
89
|
+
omitUndefined: true,
|
|
90
|
+
}),
|
|
91
|
+
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,
|
|
92
|
+
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,
|
|
93
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
94
|
+
fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
|
|
95
|
+
logging: this._options.logging,
|
|
96
|
+
});
|
|
97
|
+
if (_response.ok) {
|
|
98
|
+
return {
|
|
99
|
+
data: {
|
|
100
|
+
ok: true,
|
|
101
|
+
body: serializers.CreateGuestSessionResponse.parseOrThrow(_response.body, {
|
|
102
|
+
unrecognizedObjectKeys: "passthrough",
|
|
103
|
+
allowUnrecognizedUnionMembers: true,
|
|
104
|
+
allowUnrecognizedEnumValues: true,
|
|
105
|
+
skipValidation: true,
|
|
106
|
+
breadcrumbsPrefix: ["response"],
|
|
107
|
+
}),
|
|
108
|
+
headers: _response.headers,
|
|
109
|
+
rawResponse: _response.rawResponse,
|
|
110
|
+
},
|
|
111
|
+
rawResponse: _response.rawResponse,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
if (_response.error.reason === "status-code") {
|
|
115
|
+
switch (_response.error.statusCode) {
|
|
116
|
+
case 422:
|
|
117
|
+
return {
|
|
118
|
+
data: {
|
|
119
|
+
ok: false,
|
|
120
|
+
error: FernVenusApi.guestSession.create.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
121
|
+
unrecognizedObjectKeys: "passthrough",
|
|
122
|
+
allowUnrecognizedUnionMembers: true,
|
|
123
|
+
allowUnrecognizedEnumValues: true,
|
|
124
|
+
skipValidation: true,
|
|
125
|
+
breadcrumbsPrefix: ["response"],
|
|
126
|
+
})),
|
|
127
|
+
rawResponse: _response.rawResponse,
|
|
128
|
+
},
|
|
129
|
+
rawResponse: _response.rawResponse,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return {
|
|
134
|
+
data: {
|
|
135
|
+
ok: false,
|
|
136
|
+
error: FernVenusApi.guestSession.create.Error._unknown(_response.error),
|
|
137
|
+
rawResponse: _response.rawResponse,
|
|
138
|
+
},
|
|
139
|
+
rawResponse: _response.rawResponse,
|
|
140
|
+
};
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
exports.GuestSessionClient = GuestSessionClient;
|
|
@@ -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.guestSession.create.Error.UnprocessableEntityError | FernVenusApi.guestSession.create.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.guestSession.create.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.guestSession.create.Error.UnprocessableEntityError;
|
|
23
|
+
readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.guestSession.create.Error._Unknown;
|
|
24
|
+
readonly _visit: <_Result>(value: FernVenusApi.guestSession.create.Error, visitor: FernVenusApi.guestSession.create.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.guestSession.create.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.guestSession.create.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
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.create = void 0;
|
|
40
|
+
exports.create = __importStar(require("./create.js"));
|
|
41
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { CreateGuestSessionRequest } from "./CreateGuestSessionRequest.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -2,6 +2,8 @@ export * from "./apiKeys/client/requests/index.js";
|
|
|
2
2
|
export * as apiKeys from "./apiKeys/index.js";
|
|
3
3
|
export * from "./auth/client/requests/index.js";
|
|
4
4
|
export * as auth from "./auth/index.js";
|
|
5
|
+
export * from "./guestSession/client/requests/index.js";
|
|
6
|
+
export * as guestSession from "./guestSession/index.js";
|
|
5
7
|
export * from "./organization/client/requests/index.js";
|
|
6
8
|
export * as organization from "./organization/index.js";
|
|
7
9
|
export * from "./registry/client/requests/index.js";
|
|
@@ -36,11 +36,13 @@ 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.auth = exports.apiKeys = void 0;
|
|
39
|
+
exports.user = exports.registry = exports.organization = exports.guestSession = exports.auth = exports.apiKeys = void 0;
|
|
40
40
|
__exportStar(require("./apiKeys/client/requests/index.js"), exports);
|
|
41
41
|
exports.apiKeys = __importStar(require("./apiKeys/index.js"));
|
|
42
42
|
__exportStar(require("./auth/client/requests/index.js"), exports);
|
|
43
43
|
exports.auth = __importStar(require("./auth/index.js"));
|
|
44
|
+
__exportStar(require("./guestSession/client/requests/index.js"), exports);
|
|
45
|
+
exports.guestSession = __importStar(require("./guestSession/index.js"));
|
|
44
46
|
__exportStar(require("./organization/client/requests/index.js"), exports);
|
|
45
47
|
exports.organization = __importStar(require("./organization/index.js"));
|
|
46
48
|
__exportStar(require("./registry/client/requests/index.js"), exports);
|
|
@@ -76,6 +76,22 @@ export declare class OrganizationClient {
|
|
|
76
76
|
*/
|
|
77
77
|
getOrgIdsByPostmanTeamId(request: FernVenusApi.GetOrgIdsByPostmanTeamIdOrganizationsPostmanTeamPostmanTeamIdGetRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.Organization, FernVenusApi.organization.getOrgIdsByPostmanTeamId.Error>>;
|
|
78
78
|
private __getOrgIdsByPostmanTeamId;
|
|
79
|
+
/**
|
|
80
|
+
* The claimable organization linked to a Postman team, with its claim
|
|
81
|
+
* status and the address of its docs site. Only Postman's integration
|
|
82
|
+
* service token can call it. 404 when the team has no claimable
|
|
83
|
+
* organization, or its docs address isn't set.
|
|
84
|
+
*
|
|
85
|
+
* @param {FernVenusApi.GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest} request
|
|
86
|
+
* @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* await client.organization.getPostmanTeamDocs({
|
|
90
|
+
* postmanTeamId: "postman_team_id"
|
|
91
|
+
* })
|
|
92
|
+
*/
|
|
93
|
+
getPostmanTeamDocs(request: FernVenusApi.GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.PostmanTeamDocsResponse, FernVenusApi.organization.getPostmanTeamDocs.Error>>;
|
|
94
|
+
private __getPostmanTeamDocs;
|
|
79
95
|
/**
|
|
80
96
|
* Get the Postman team ID associated with an organization ID.
|
|
81
97
|
*
|
|
@@ -106,7 +122,8 @@ export declare class OrganizationClient {
|
|
|
106
122
|
private __getClaimStatus;
|
|
107
123
|
/**
|
|
108
124
|
* Issues a claim link for an unclaimed organization, bound to one Postman
|
|
109
|
-
* user and valid for 15 minutes. Only the provisioner token
|
|
125
|
+
* user and valid for 15 minutes. Only the provisioner token and Postman's
|
|
126
|
+
* integration service token can call it.
|
|
110
127
|
*
|
|
111
128
|
* @param {FernVenusApi.CreateClaimTokenRequest} request
|
|
112
129
|
* @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -119,6 +136,22 @@ export declare class OrganizationClient {
|
|
|
119
136
|
*/
|
|
120
137
|
createClaimToken(request: FernVenusApi.CreateClaimTokenRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.ClaimTokenResponse, FernVenusApi.organization.createClaimToken.Error>>;
|
|
121
138
|
private __createClaimToken;
|
|
139
|
+
/**
|
|
140
|
+
* Sets the address of an unclaimed organization's docs site, which the
|
|
141
|
+
* team docs lookup returns. Only the provisioner token can call it, and
|
|
142
|
+
* only until the organization is claimed.
|
|
143
|
+
*
|
|
144
|
+
* @param {FernVenusApi.SetDocsUrlRequest} request
|
|
145
|
+
* @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* await client.organization.setDocsUrl({
|
|
149
|
+
* orgId: "org_id",
|
|
150
|
+
* docsUrl: "docsUrl"
|
|
151
|
+
* })
|
|
152
|
+
*/
|
|
153
|
+
setDocsUrl(request: FernVenusApi.SetDocsUrlRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<void, FernVenusApi.organization.setDocsUrl.Error>>;
|
|
154
|
+
private __setDocsUrl;
|
|
122
155
|
/**
|
|
123
156
|
* Redeems a claim link. The caller, signed in as the Postman user the link
|
|
124
157
|
* is for, becomes the admin of the organization. The first claim wins, and
|