@fern-api/venus-api-sdk 12.1.0 → 12.3.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 (32) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/guestSession/client/requests/ClaimGuestSessionRequest.d.ts +1 -0
  3. package/dist/cjs/api/resources/organization/client/Client.d.ts +20 -0
  4. package/dist/cjs/api/resources/organization/client/Client.js +89 -0
  5. package/dist/cjs/api/resources/organization/client/claimFromDocsSite.d.ts +25 -0
  6. package/dist/cjs/api/resources/organization/client/claimFromDocsSite.js +66 -0
  7. package/dist/cjs/api/resources/organization/client/index.d.ts +1 -0
  8. package/dist/cjs/api/resources/organization/client/index.js +2 -1
  9. package/dist/cjs/api/types/ClaimTokenResponse.d.ts +1 -0
  10. package/dist/cjs/serialization/resources/guestSession/client/requests/ClaimGuestSessionRequest.d.ts +1 -0
  11. package/dist/cjs/serialization/resources/guestSession/client/requests/ClaimGuestSessionRequest.js +1 -0
  12. package/dist/cjs/serialization/types/ClaimTokenResponse.d.ts +1 -0
  13. package/dist/cjs/serialization/types/ClaimTokenResponse.js +1 -0
  14. package/dist/cjs/version.d.ts +1 -1
  15. package/dist/cjs/version.js +1 -1
  16. package/dist/esm/BaseClient.mjs +2 -2
  17. package/dist/esm/api/resources/guestSession/client/requests/ClaimGuestSessionRequest.d.mts +1 -0
  18. package/dist/esm/api/resources/organization/client/Client.d.mts +20 -0
  19. package/dist/esm/api/resources/organization/client/Client.mjs +89 -0
  20. package/dist/esm/api/resources/organization/client/claimFromDocsSite.d.mts +25 -0
  21. package/dist/esm/api/resources/organization/client/claimFromDocsSite.mjs +30 -0
  22. package/dist/esm/api/resources/organization/client/index.d.mts +1 -0
  23. package/dist/esm/api/resources/organization/client/index.mjs +1 -0
  24. package/dist/esm/api/types/ClaimTokenResponse.d.mts +1 -0
  25. package/dist/esm/serialization/resources/guestSession/client/requests/ClaimGuestSessionRequest.d.mts +1 -0
  26. package/dist/esm/serialization/resources/guestSession/client/requests/ClaimGuestSessionRequest.mjs +1 -0
  27. package/dist/esm/serialization/types/ClaimTokenResponse.d.mts +1 -0
  28. package/dist/esm/serialization/types/ClaimTokenResponse.mjs +1 -0
  29. package/dist/esm/version.d.mts +1 -1
  30. package/dist/esm/version.mjs +1 -1
  31. package/package.json +1 -1
  32. package/reference.md +72 -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": "12.1.0",
47
- "User-Agent": "@fern-api/venus-api-sdk/12.1.0",
46
+ "X-Fern-SDK-Version": "12.3.0",
47
+ "User-Agent": "@fern-api/venus-api-sdk/12.3.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);
@@ -7,4 +7,5 @@
7
7
  export interface ClaimGuestSessionRequest {
8
8
  sessionId: string;
9
9
  organizationId?: string | null;
10
+ newOrganizationId?: string | null;
10
11
  }
@@ -186,6 +186,26 @@ export declare class OrganizationClient {
186
186
  */
187
187
  previewClaim(request: FernVenusApi.ClaimOrganizationRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.ClaimPreviewResponse, FernVenusApi.organization.previewClaim.Error>>;
188
188
  private __previewClaim;
189
+ /**
190
+ * Redeems a claim link without a Fern sign-in, for the Claim button on
191
+ * the organization's docs site. The organization is claimed for the
192
+ * Postman user the link was issued for, who becomes its admin if they
193
+ * already have a Fern account; otherwise the organization starts with
194
+ * no members, and the dashboard adds the team's Postman users when they
195
+ * sign in with Postman. Public: the link is the secret, and only the
196
+ * provisioner and Postman's integration service can get one. The first
197
+ * claim wins, and a retry finishes a claim that failed partway.
198
+ *
199
+ * @param {FernVenusApi.ClaimOrganizationRequest} request
200
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
201
+ *
202
+ * @example
203
+ * await client.organization.claimFromDocsSite({
204
+ * claimToken: "claimToken"
205
+ * })
206
+ */
207
+ claimFromDocsSite(request: FernVenusApi.ClaimOrganizationRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.ClaimOrganizationResponse, FernVenusApi.organization.claimFromDocsSite.Error>>;
208
+ private __claimFromDocsSite;
189
209
  /**
190
210
  * @param {FernVenusApi.IsMemberOrganizationsBelongsToOrganizationOrganizationIdPostRequest} request
191
211
  * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -1026,6 +1026,95 @@ class OrganizationClient {
1026
1026
  };
1027
1027
  });
1028
1028
  }
1029
+ /**
1030
+ * Redeems a claim link without a Fern sign-in, for the Claim button on
1031
+ * the organization's docs site. The organization is claimed for the
1032
+ * Postman user the link was issued for, who becomes its admin if they
1033
+ * already have a Fern account; otherwise the organization starts with
1034
+ * no members, and the dashboard adds the team's Postman users when they
1035
+ * sign in with Postman. Public: the link is the secret, and only the
1036
+ * provisioner and Postman's integration service can get one. The first
1037
+ * claim wins, and a retry finishes a claim that failed partway.
1038
+ *
1039
+ * @param {FernVenusApi.ClaimOrganizationRequest} request
1040
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
1041
+ *
1042
+ * @example
1043
+ * await client.organization.claimFromDocsSite({
1044
+ * claimToken: "claimToken"
1045
+ * })
1046
+ */
1047
+ claimFromDocsSite(request, requestOptions) {
1048
+ return core.HttpResponsePromise.fromPromise(this.__claimFromDocsSite(request, requestOptions));
1049
+ }
1050
+ __claimFromDocsSite(request, requestOptions) {
1051
+ return __awaiter(this, void 0, void 0, function* () {
1052
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1053
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1054
+ 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);
1055
+ const _response = yield core.fetcher({
1056
+ 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/claim/docs-site"),
1057
+ method: "POST",
1058
+ headers: _headers,
1059
+ contentType: "application/json",
1060
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1061
+ requestType: "json",
1062
+ body: serializers.ClaimOrganizationRequest.jsonOrThrow(request, {
1063
+ unrecognizedObjectKeys: "strip",
1064
+ omitUndefined: true,
1065
+ }),
1066
+ 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,
1067
+ 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,
1068
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1069
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
1070
+ logging: this._options.logging,
1071
+ });
1072
+ if (_response.ok) {
1073
+ return {
1074
+ data: {
1075
+ ok: true,
1076
+ body: serializers.ClaimOrganizationResponse.parseOrThrow(_response.body, {
1077
+ unrecognizedObjectKeys: "passthrough",
1078
+ allowUnrecognizedUnionMembers: true,
1079
+ allowUnrecognizedEnumValues: true,
1080
+ skipValidation: true,
1081
+ breadcrumbsPrefix: ["response"],
1082
+ }),
1083
+ headers: _response.headers,
1084
+ rawResponse: _response.rawResponse,
1085
+ },
1086
+ rawResponse: _response.rawResponse,
1087
+ };
1088
+ }
1089
+ if (_response.error.reason === "status-code") {
1090
+ switch (_response.error.statusCode) {
1091
+ case 422:
1092
+ return {
1093
+ data: {
1094
+ ok: false,
1095
+ error: FernVenusApi.organization.claimFromDocsSite.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1096
+ unrecognizedObjectKeys: "passthrough",
1097
+ allowUnrecognizedUnionMembers: true,
1098
+ allowUnrecognizedEnumValues: true,
1099
+ skipValidation: true,
1100
+ breadcrumbsPrefix: ["response"],
1101
+ })),
1102
+ rawResponse: _response.rawResponse,
1103
+ },
1104
+ rawResponse: _response.rawResponse,
1105
+ };
1106
+ }
1107
+ }
1108
+ return {
1109
+ data: {
1110
+ ok: false,
1111
+ error: FernVenusApi.organization.claimFromDocsSite.Error._unknown(_response.error),
1112
+ rawResponse: _response.rawResponse,
1113
+ },
1114
+ rawResponse: _response.rawResponse,
1115
+ };
1116
+ });
1117
+ }
1029
1118
  /**
1030
1119
  * @param {FernVenusApi.IsMemberOrganizationsBelongsToOrganizationOrganizationIdPostRequest} request
1031
1120
  * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -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.organization.claimFromDocsSite.Error.UnprocessableEntityError | FernVenusApi.organization.claimFromDocsSite.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.organization.claimFromDocsSite.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.organization.claimFromDocsSite.Error.UnprocessableEntityError;
23
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.organization.claimFromDocsSite.Error._Unknown;
24
+ readonly _visit: <_Result>(value: FernVenusApi.organization.claimFromDocsSite.Error, visitor: FernVenusApi.organization.claimFromDocsSite.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.organization.claimFromDocsSite.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.organization.claimFromDocsSite.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
+ };
@@ -1,5 +1,6 @@
1
1
  export * as addUser from "./addUser.js";
2
2
  export * as claim from "./claim.js";
3
+ export * as claimFromDocsSite from "./claimFromDocsSite.js";
3
4
  export * as create from "./create.js";
4
5
  export * as createClaimToken from "./createClaimToken.js";
5
6
  export * as delete from "./delete.js";
@@ -36,9 +36,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.update = exports.setDocsUrl = exports.removeUser = exports.previewClaim = exports.isMember = exports.inviteUser = exports.getPostmanTeamIdByOrgId = exports.getPostmanTeamDocs = exports.getOrgIdsFromToken = exports.getOrgIdsByPostmanTeamId = exports.getMyOrganizationFromScopedToken = exports.getClaimStatus = exports.get = exports.delete = exports.createClaimToken = exports.create = exports.claim = exports.addUser = void 0;
39
+ exports.update = exports.setDocsUrl = exports.removeUser = exports.previewClaim = exports.isMember = exports.inviteUser = exports.getPostmanTeamIdByOrgId = exports.getPostmanTeamDocs = exports.getOrgIdsFromToken = exports.getOrgIdsByPostmanTeamId = exports.getMyOrganizationFromScopedToken = exports.getClaimStatus = exports.get = exports.delete = exports.createClaimToken = exports.create = exports.claimFromDocsSite = exports.claim = exports.addUser = void 0;
40
40
  exports.addUser = __importStar(require("./addUser.js"));
41
41
  exports.claim = __importStar(require("./claim.js"));
42
+ exports.claimFromDocsSite = __importStar(require("./claimFromDocsSite.js"));
42
43
  exports.create = __importStar(require("./create.js"));
43
44
  exports.createClaimToken = __importStar(require("./createClaimToken.js"));
44
45
  exports.delete = __importStar(require("./delete.js"));
@@ -1,4 +1,5 @@
1
1
  export interface ClaimTokenResponse {
2
2
  claimUrl: string;
3
+ docsClaimUrl?: string | null;
3
4
  expiresAt: Date;
4
5
  }
@@ -5,5 +5,6 @@ export declare const ClaimGuestSessionRequest: core.serialization.Schema<seriali
5
5
  export declare namespace ClaimGuestSessionRequest {
6
6
  interface Raw {
7
7
  organizationId?: (string | null | undefined) | null;
8
+ newOrganizationId?: (string | null | undefined) | null;
8
9
  }
9
10
  }
@@ -38,4 +38,5 @@ exports.ClaimGuestSessionRequest = void 0;
38
38
  const core = __importStar(require("../../../../../core/index.js"));
39
39
  exports.ClaimGuestSessionRequest = core.serialization.object({
40
40
  organizationId: core.serialization.string().optionalNullable(),
41
+ newOrganizationId: core.serialization.string().optionalNullable(),
41
42
  });
@@ -5,6 +5,7 @@ export declare const ClaimTokenResponse: core.serialization.ObjectSchema<seriali
5
5
  export declare namespace ClaimTokenResponse {
6
6
  interface Raw {
7
7
  claimUrl: string;
8
+ docsClaimUrl?: (string | null | undefined) | null;
8
9
  expiresAt: string;
9
10
  }
10
11
  }
@@ -38,5 +38,6 @@ exports.ClaimTokenResponse = void 0;
38
38
  const core = __importStar(require("../../core/index.js"));
39
39
  exports.ClaimTokenResponse = core.serialization.object({
40
40
  claimUrl: core.serialization.string(),
41
+ docsClaimUrl: core.serialization.string().optionalNullable(),
41
42
  expiresAt: core.serialization.date(),
42
43
  });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "12.1.0";
1
+ export declare const SDK_VERSION = "12.3.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "12.1.0";
4
+ exports.SDK_VERSION = "12.3.0";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
9
- "X-Fern-SDK-Version": "12.1.0",
10
- "User-Agent": "@fern-api/venus-api-sdk/12.1.0",
9
+ "X-Fern-SDK-Version": "12.3.0",
10
+ "User-Agent": "@fern-api/venus-api-sdk/12.3.0",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -7,4 +7,5 @@
7
7
  export interface ClaimGuestSessionRequest {
8
8
  sessionId: string;
9
9
  organizationId?: string | null;
10
+ newOrganizationId?: string | null;
10
11
  }
@@ -186,6 +186,26 @@ export declare class OrganizationClient {
186
186
  */
187
187
  previewClaim(request: FernVenusApi.ClaimOrganizationRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.ClaimPreviewResponse, FernVenusApi.organization.previewClaim.Error>>;
188
188
  private __previewClaim;
189
+ /**
190
+ * Redeems a claim link without a Fern sign-in, for the Claim button on
191
+ * the organization's docs site. The organization is claimed for the
192
+ * Postman user the link was issued for, who becomes its admin if they
193
+ * already have a Fern account; otherwise the organization starts with
194
+ * no members, and the dashboard adds the team's Postman users when they
195
+ * sign in with Postman. Public: the link is the secret, and only the
196
+ * provisioner and Postman's integration service can get one. The first
197
+ * claim wins, and a retry finishes a claim that failed partway.
198
+ *
199
+ * @param {FernVenusApi.ClaimOrganizationRequest} request
200
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
201
+ *
202
+ * @example
203
+ * await client.organization.claimFromDocsSite({
204
+ * claimToken: "claimToken"
205
+ * })
206
+ */
207
+ claimFromDocsSite(request: FernVenusApi.ClaimOrganizationRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.ClaimOrganizationResponse, FernVenusApi.organization.claimFromDocsSite.Error>>;
208
+ private __claimFromDocsSite;
189
209
  /**
190
210
  * @param {FernVenusApi.IsMemberOrganizationsBelongsToOrganizationOrganizationIdPostRequest} request
191
211
  * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -990,6 +990,95 @@ export class OrganizationClient {
990
990
  };
991
991
  });
992
992
  }
993
+ /**
994
+ * Redeems a claim link without a Fern sign-in, for the Claim button on
995
+ * the organization's docs site. The organization is claimed for the
996
+ * Postman user the link was issued for, who becomes its admin if they
997
+ * already have a Fern account; otherwise the organization starts with
998
+ * no members, and the dashboard adds the team's Postman users when they
999
+ * sign in with Postman. Public: the link is the secret, and only the
1000
+ * provisioner and Postman's integration service can get one. The first
1001
+ * claim wins, and a retry finishes a claim that failed partway.
1002
+ *
1003
+ * @param {FernVenusApi.ClaimOrganizationRequest} request
1004
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
1005
+ *
1006
+ * @example
1007
+ * await client.organization.claimFromDocsSite({
1008
+ * claimToken: "claimToken"
1009
+ * })
1010
+ */
1011
+ claimFromDocsSite(request, requestOptions) {
1012
+ return core.HttpResponsePromise.fromPromise(this.__claimFromDocsSite(request, requestOptions));
1013
+ }
1014
+ __claimFromDocsSite(request, requestOptions) {
1015
+ return __awaiter(this, void 0, void 0, function* () {
1016
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1017
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1018
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1019
+ const _response = yield core.fetcher({
1020
+ 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/claim/docs-site"),
1021
+ method: "POST",
1022
+ headers: _headers,
1023
+ contentType: "application/json",
1024
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1025
+ requestType: "json",
1026
+ body: serializers.ClaimOrganizationRequest.jsonOrThrow(request, {
1027
+ unrecognizedObjectKeys: "strip",
1028
+ omitUndefined: true,
1029
+ }),
1030
+ 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,
1031
+ 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,
1032
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1033
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
1034
+ logging: this._options.logging,
1035
+ });
1036
+ if (_response.ok) {
1037
+ return {
1038
+ data: {
1039
+ ok: true,
1040
+ body: serializers.ClaimOrganizationResponse.parseOrThrow(_response.body, {
1041
+ unrecognizedObjectKeys: "passthrough",
1042
+ allowUnrecognizedUnionMembers: true,
1043
+ allowUnrecognizedEnumValues: true,
1044
+ skipValidation: true,
1045
+ breadcrumbsPrefix: ["response"],
1046
+ }),
1047
+ headers: _response.headers,
1048
+ rawResponse: _response.rawResponse,
1049
+ },
1050
+ rawResponse: _response.rawResponse,
1051
+ };
1052
+ }
1053
+ if (_response.error.reason === "status-code") {
1054
+ switch (_response.error.statusCode) {
1055
+ case 422:
1056
+ return {
1057
+ data: {
1058
+ ok: false,
1059
+ error: FernVenusApi.organization.claimFromDocsSite.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1060
+ unrecognizedObjectKeys: "passthrough",
1061
+ allowUnrecognizedUnionMembers: true,
1062
+ allowUnrecognizedEnumValues: true,
1063
+ skipValidation: true,
1064
+ breadcrumbsPrefix: ["response"],
1065
+ })),
1066
+ rawResponse: _response.rawResponse,
1067
+ },
1068
+ rawResponse: _response.rawResponse,
1069
+ };
1070
+ }
1071
+ }
1072
+ return {
1073
+ data: {
1074
+ ok: false,
1075
+ error: FernVenusApi.organization.claimFromDocsSite.Error._unknown(_response.error),
1076
+ rawResponse: _response.rawResponse,
1077
+ },
1078
+ rawResponse: _response.rawResponse,
1079
+ };
1080
+ });
1081
+ }
993
1082
  /**
994
1083
  * @param {FernVenusApi.IsMemberOrganizationsBelongsToOrganizationOrganizationIdPostRequest} request
995
1084
  * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -0,0 +1,25 @@
1
+ import type * as core from "../../../../core/index.mjs";
2
+ import * as FernVenusApi from "../../../index.mjs";
3
+ export type Error = FernVenusApi.organization.claimFromDocsSite.Error.UnprocessableEntityError | FernVenusApi.organization.claimFromDocsSite.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.organization.claimFromDocsSite.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.organization.claimFromDocsSite.Error.UnprocessableEntityError;
23
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.organization.claimFromDocsSite.Error._Unknown;
24
+ readonly _visit: <_Result>(value: FernVenusApi.organization.claimFromDocsSite.Error, visitor: FernVenusApi.organization.claimFromDocsSite.Error._Visitor<_Result>) => _Result;
25
+ };
@@ -0,0 +1,30 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as FernVenusApi from "../../../index.mjs";
3
+ export const Error = {
4
+ unprocessableEntityError: (value) => {
5
+ return {
6
+ content: value,
7
+ statusCode: 422,
8
+ _visit: function (visitor) {
9
+ return FernVenusApi.organization.claimFromDocsSite.Error._visit(this, visitor);
10
+ },
11
+ };
12
+ },
13
+ _unknown: (fetcherError) => {
14
+ return {
15
+ statusCode: undefined,
16
+ content: fetcherError,
17
+ _visit: function (visitor) {
18
+ return FernVenusApi.organization.claimFromDocsSite.Error._visit(this, visitor);
19
+ },
20
+ };
21
+ },
22
+ _visit: (value, visitor) => {
23
+ switch (value.statusCode) {
24
+ case 422:
25
+ return visitor.unprocessableEntityError(value.content);
26
+ default:
27
+ return visitor._other(value.content);
28
+ }
29
+ },
30
+ };
@@ -1,5 +1,6 @@
1
1
  export * as addUser from "./addUser.mjs";
2
2
  export * as claim from "./claim.mjs";
3
+ export * as claimFromDocsSite from "./claimFromDocsSite.mjs";
3
4
  export * as create from "./create.mjs";
4
5
  export * as createClaimToken from "./createClaimToken.mjs";
5
6
  export * as delete from "./delete.mjs";
@@ -1,5 +1,6 @@
1
1
  export * as addUser from "./addUser.mjs";
2
2
  export * as claim from "./claim.mjs";
3
+ export * as claimFromDocsSite from "./claimFromDocsSite.mjs";
3
4
  export * as create from "./create.mjs";
4
5
  export * as createClaimToken from "./createClaimToken.mjs";
5
6
  export * as delete from "./delete.mjs";
@@ -1,4 +1,5 @@
1
1
  export interface ClaimTokenResponse {
2
2
  claimUrl: string;
3
+ docsClaimUrl?: string | null;
3
4
  expiresAt: Date;
4
5
  }
@@ -5,5 +5,6 @@ export declare const ClaimGuestSessionRequest: core.serialization.Schema<seriali
5
5
  export declare namespace ClaimGuestSessionRequest {
6
6
  interface Raw {
7
7
  organizationId?: (string | null | undefined) | null;
8
+ newOrganizationId?: (string | null | undefined) | null;
8
9
  }
9
10
  }
@@ -2,4 +2,5 @@
2
2
  import * as core from "../../../../../core/index.mjs";
3
3
  export const ClaimGuestSessionRequest = core.serialization.object({
4
4
  organizationId: core.serialization.string().optionalNullable(),
5
+ newOrganizationId: core.serialization.string().optionalNullable(),
5
6
  });
@@ -5,6 +5,7 @@ export declare const ClaimTokenResponse: core.serialization.ObjectSchema<seriali
5
5
  export declare namespace ClaimTokenResponse {
6
6
  interface Raw {
7
7
  claimUrl: string;
8
+ docsClaimUrl?: (string | null | undefined) | null;
8
9
  expiresAt: string;
9
10
  }
10
11
  }
@@ -2,5 +2,6 @@
2
2
  import * as core from "../../core/index.mjs";
3
3
  export const ClaimTokenResponse = core.serialization.object({
4
4
  claimUrl: core.serialization.string(),
5
+ docsClaimUrl: core.serialization.string().optionalNullable(),
5
6
  expiresAt: core.serialization.date(),
6
7
  });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "12.1.0";
1
+ export declare const SDK_VERSION = "12.3.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "12.1.0";
1
+ export const SDK_VERSION = "12.3.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fern-api/venus-api-sdk",
3
- "version": "12.1.0",
3
+ "version": "12.3.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -1758,6 +1758,78 @@ await client.organization.previewClaim({
1758
1758
  </dl>
1759
1759
 
1760
1760
 
1761
+ </dd>
1762
+ </dl>
1763
+ </details>
1764
+
1765
+ <details><summary><code>client.organization.<a href="/src/api/resources/organization/client/Client.ts">claimFromDocsSite</a>({ ...params }) -> core.APIResponse&lt;FernVenusApi.ClaimOrganizationResponse, FernVenusApi.organization.claimFromDocsSite.Error&gt;</code></summary>
1766
+ <dl>
1767
+ <dd>
1768
+
1769
+ #### 📝 Description
1770
+
1771
+ <dl>
1772
+ <dd>
1773
+
1774
+ <dl>
1775
+ <dd>
1776
+
1777
+ Redeems a claim link without a Fern sign-in, for the Claim button on
1778
+ the organization's docs site. The organization is claimed for the
1779
+ Postman user the link was issued for, who becomes its admin if they
1780
+ already have a Fern account; otherwise the organization starts with
1781
+ no members, and the dashboard adds the team's Postman users when they
1782
+ sign in with Postman. Public: the link is the secret, and only the
1783
+ provisioner and Postman's integration service can get one. The first
1784
+ claim wins, and a retry finishes a claim that failed partway.
1785
+ </dd>
1786
+ </dl>
1787
+ </dd>
1788
+ </dl>
1789
+
1790
+ #### 🔌 Usage
1791
+
1792
+ <dl>
1793
+ <dd>
1794
+
1795
+ <dl>
1796
+ <dd>
1797
+
1798
+ ```typescript
1799
+ await client.organization.claimFromDocsSite({
1800
+ claimToken: "claimToken"
1801
+ });
1802
+
1803
+ ```
1804
+ </dd>
1805
+ </dl>
1806
+ </dd>
1807
+ </dl>
1808
+
1809
+ #### ⚙️ Parameters
1810
+
1811
+ <dl>
1812
+ <dd>
1813
+
1814
+ <dl>
1815
+ <dd>
1816
+
1817
+ **request:** `FernVenusApi.ClaimOrganizationRequest`
1818
+
1819
+ </dd>
1820
+ </dl>
1821
+
1822
+ <dl>
1823
+ <dd>
1824
+
1825
+ **requestOptions:** `OrganizationClient.RequestOptions`
1826
+
1827
+ </dd>
1828
+ </dl>
1829
+ </dd>
1830
+ </dl>
1831
+
1832
+
1761
1833
  </dd>
1762
1834
  </dl>
1763
1835
  </details>