@fern-api/venus-api-sdk 11.4.0 → 11.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.
Files changed (84) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +11 -6
  4. package/dist/cjs/api/resources/guestSession/client/Client.d.ts +31 -0
  5. package/dist/cjs/api/resources/guestSession/client/Client.js +144 -0
  6. package/dist/cjs/api/resources/guestSession/client/create.d.ts +25 -0
  7. package/dist/cjs/api/resources/guestSession/client/create.js +66 -0
  8. package/dist/cjs/api/resources/guestSession/client/index.d.ts +2 -0
  9. package/dist/cjs/api/resources/guestSession/client/index.js +41 -0
  10. package/dist/cjs/api/resources/guestSession/client/requests/CreateGuestSessionRequest.d.ts +11 -0
  11. package/dist/cjs/api/resources/guestSession/client/requests/CreateGuestSessionRequest.js +3 -0
  12. package/dist/cjs/api/resources/guestSession/client/requests/index.d.ts +1 -0
  13. package/dist/cjs/api/resources/guestSession/client/requests/index.js +2 -0
  14. package/dist/cjs/api/resources/guestSession/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/guestSession/index.js +17 -0
  16. package/dist/cjs/api/resources/index.d.ts +2 -0
  17. package/dist/cjs/api/resources/index.js +3 -1
  18. package/dist/cjs/api/types/CreateGuestSessionResponse.d.ts +9 -0
  19. package/dist/cjs/api/types/CreateGuestSessionResponse.js +3 -0
  20. package/dist/cjs/api/types/GuestSessionLimits.d.ts +4 -0
  21. package/dist/cjs/api/types/GuestSessionLimits.js +3 -0
  22. package/dist/cjs/api/types/index.d.ts +2 -0
  23. package/dist/cjs/api/types/index.js +2 -0
  24. package/dist/cjs/serialization/resources/guestSession/client/index.d.ts +1 -0
  25. package/dist/cjs/serialization/resources/guestSession/client/index.js +17 -0
  26. package/dist/cjs/serialization/resources/guestSession/client/requests/CreateGuestSessionRequest.d.ts +11 -0
  27. package/dist/cjs/serialization/resources/guestSession/client/requests/CreateGuestSessionRequest.js +43 -0
  28. package/dist/cjs/serialization/resources/guestSession/client/requests/index.d.ts +1 -0
  29. package/dist/cjs/serialization/resources/guestSession/client/requests/index.js +5 -0
  30. package/dist/cjs/serialization/resources/guestSession/index.d.ts +1 -0
  31. package/dist/cjs/serialization/resources/guestSession/index.js +17 -0
  32. package/dist/cjs/serialization/resources/index.d.ts +2 -0
  33. package/dist/cjs/serialization/resources/index.js +3 -1
  34. package/dist/cjs/serialization/types/CreateGuestSessionResponse.d.ts +15 -0
  35. package/dist/cjs/serialization/types/CreateGuestSessionResponse.js +47 -0
  36. package/dist/cjs/serialization/types/GuestSessionLimits.d.ts +10 -0
  37. package/dist/cjs/serialization/types/GuestSessionLimits.js +42 -0
  38. package/dist/cjs/serialization/types/index.d.ts +2 -0
  39. package/dist/cjs/serialization/types/index.js +2 -0
  40. package/dist/cjs/version.d.ts +1 -1
  41. package/dist/cjs/version.js +1 -1
  42. package/dist/esm/BaseClient.mjs +2 -2
  43. package/dist/esm/Client.d.mts +3 -0
  44. package/dist/esm/Client.mjs +5 -0
  45. package/dist/esm/api/resources/guestSession/client/Client.d.mts +31 -0
  46. package/dist/esm/api/resources/guestSession/client/Client.mjs +107 -0
  47. package/dist/esm/api/resources/guestSession/client/create.d.mts +25 -0
  48. package/dist/esm/api/resources/guestSession/client/create.mjs +30 -0
  49. package/dist/esm/api/resources/guestSession/client/index.d.mts +2 -0
  50. package/dist/esm/api/resources/guestSession/client/index.mjs +2 -0
  51. package/dist/esm/api/resources/guestSession/client/requests/CreateGuestSessionRequest.d.mts +11 -0
  52. package/dist/esm/api/resources/guestSession/client/requests/CreateGuestSessionRequest.mjs +2 -0
  53. package/dist/esm/api/resources/guestSession/client/requests/index.d.mts +1 -0
  54. package/dist/esm/api/resources/guestSession/client/requests/index.mjs +1 -0
  55. package/dist/esm/api/resources/guestSession/index.d.mts +1 -0
  56. package/dist/esm/api/resources/guestSession/index.mjs +1 -0
  57. package/dist/esm/api/resources/index.d.mts +2 -0
  58. package/dist/esm/api/resources/index.mjs +2 -0
  59. package/dist/esm/api/types/CreateGuestSessionResponse.d.mts +9 -0
  60. package/dist/esm/api/types/CreateGuestSessionResponse.mjs +2 -0
  61. package/dist/esm/api/types/GuestSessionLimits.d.mts +4 -0
  62. package/dist/esm/api/types/GuestSessionLimits.mjs +2 -0
  63. package/dist/esm/api/types/index.d.mts +2 -0
  64. package/dist/esm/api/types/index.mjs +2 -0
  65. package/dist/esm/serialization/resources/guestSession/client/index.d.mts +1 -0
  66. package/dist/esm/serialization/resources/guestSession/client/index.mjs +1 -0
  67. package/dist/esm/serialization/resources/guestSession/client/requests/CreateGuestSessionRequest.d.mts +11 -0
  68. package/dist/esm/serialization/resources/guestSession/client/requests/CreateGuestSessionRequest.mjs +7 -0
  69. package/dist/esm/serialization/resources/guestSession/client/requests/index.d.mts +1 -0
  70. package/dist/esm/serialization/resources/guestSession/client/requests/index.mjs +1 -0
  71. package/dist/esm/serialization/resources/guestSession/index.d.mts +1 -0
  72. package/dist/esm/serialization/resources/guestSession/index.mjs +1 -0
  73. package/dist/esm/serialization/resources/index.d.mts +2 -0
  74. package/dist/esm/serialization/resources/index.mjs +2 -0
  75. package/dist/esm/serialization/types/CreateGuestSessionResponse.d.mts +15 -0
  76. package/dist/esm/serialization/types/CreateGuestSessionResponse.mjs +11 -0
  77. package/dist/esm/serialization/types/GuestSessionLimits.d.mts +10 -0
  78. package/dist/esm/serialization/types/GuestSessionLimits.mjs +6 -0
  79. package/dist/esm/serialization/types/index.d.mts +2 -0
  80. package/dist/esm/serialization/types/index.mjs +2 -0
  81. package/dist/esm/version.d.mts +1 -1
  82. package/dist/esm/version.mjs +1 -1
  83. package/package.json +1 -1
  84. package/reference.md +71 -0
@@ -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.4.0",
47
- "User-Agent": "@fern-api/venus-api-sdk/11.4.0",
46
+ "X-Fern-SDK-Version": "11.5.0",
47
+ "User-Agent": "@fern-api/venus-api-sdk/11.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);
@@ -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;
@@ -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/organization/client/Client.js");
51
- const Client_js_4 = require("./api/resources/registry/client/Client.js");
52
- const Client_js_5 = require("./api/resources/user/client/Client.js");
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 Client_js_3.OrganizationClient(this._options)));
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 Client_js_4.RegistryClient(this._options)));
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 Client_js_5.UserClient(this._options)));
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,2 @@
1
+ export * as create from "./create.js";
2
+ export * from "./requests/index.js";
@@ -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,11 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * fingerprint: "fingerprint"
5
+ * }
6
+ */
7
+ export interface CreateGuestSessionRequest {
8
+ fingerprint: string;
9
+ clientVersion?: string | null;
10
+ requestedOrgName?: string | null;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type { CreateGuestSessionRequest } from "./CreateGuestSessionRequest.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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);
@@ -0,0 +1,9 @@
1
+ import type * as FernVenusApi from "../index.js";
2
+ export interface CreateGuestSessionResponse {
3
+ sessionId: string;
4
+ organizationId: string;
5
+ token: string;
6
+ claimSecret: string;
7
+ expiresAt: Date;
8
+ limits: FernVenusApi.GuestSessionLimits;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface GuestSessionLimits {
2
+ sdkBuilds: number;
3
+ docsPublishes: number;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,9 +5,11 @@ export * from "./ClaimPreviewResponse.js";
5
5
  export * from "./ClaimStatus.js";
6
6
  export * from "./ClaimStatusResponse.js";
7
7
  export * from "./ClaimTokenResponse.js";
8
+ export * from "./CreateGuestSessionResponse.js";
8
9
  export * from "./CreateOrganizationResponse.js";
9
10
  export * from "./CreateTokenResponse.js";
10
11
  export * from "./Expired.js";
12
+ export * from "./GuestSessionLimits.js";
11
13
  export * from "./HttpValidationError.js";
12
14
  export * from "./JwtResponse.js";
13
15
  export * from "./LightweightUser.js";
@@ -21,9 +21,11 @@ __exportStar(require("./ClaimPreviewResponse.js"), exports);
21
21
  __exportStar(require("./ClaimStatus.js"), exports);
22
22
  __exportStar(require("./ClaimStatusResponse.js"), exports);
23
23
  __exportStar(require("./ClaimTokenResponse.js"), exports);
24
+ __exportStar(require("./CreateGuestSessionResponse.js"), exports);
24
25
  __exportStar(require("./CreateOrganizationResponse.js"), exports);
25
26
  __exportStar(require("./CreateTokenResponse.js"), exports);
26
27
  __exportStar(require("./Expired.js"), exports);
28
+ __exportStar(require("./GuestSessionLimits.js"), exports);
27
29
  __exportStar(require("./HttpValidationError.js"), exports);
28
30
  __exportStar(require("./JwtResponse.js"), exports);
29
31
  __exportStar(require("./LightweightUser.js"), exports);
@@ -0,0 +1 @@
1
+ export * from "./requests/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("./requests/index.js"), exports);
@@ -0,0 +1,11 @@
1
+ import type * as FernVenusApi from "../../../../../api/index.js";
2
+ import * as core from "../../../../../core/index.js";
3
+ import type * as serializers from "../../../../index.js";
4
+ export declare const CreateGuestSessionRequest: core.serialization.Schema<serializers.CreateGuestSessionRequest.Raw, FernVenusApi.CreateGuestSessionRequest>;
5
+ export declare namespace CreateGuestSessionRequest {
6
+ interface Raw {
7
+ fingerprint: string;
8
+ clientVersion?: (string | null | undefined) | null;
9
+ requestedOrgName?: (string | null | undefined) | null;
10
+ }
11
+ }
@@ -0,0 +1,43 @@
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.CreateGuestSessionRequest = void 0;
38
+ const core = __importStar(require("../../../../../core/index.js"));
39
+ exports.CreateGuestSessionRequest = core.serialization.object({
40
+ fingerprint: core.serialization.string(),
41
+ clientVersion: core.serialization.string().optionalNullable(),
42
+ requestedOrgName: core.serialization.string().optionalNullable(),
43
+ });
@@ -0,0 +1 @@
1
+ export { CreateGuestSessionRequest } from "./CreateGuestSessionRequest.js";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateGuestSessionRequest = void 0;
4
+ var CreateGuestSessionRequest_js_1 = require("./CreateGuestSessionRequest.js");
5
+ Object.defineProperty(exports, "CreateGuestSessionRequest", { enumerable: true, get: function () { return CreateGuestSessionRequest_js_1.CreateGuestSessionRequest; } });
@@ -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";