@fern-api/venus-api-sdk 11.5.0 → 11.7.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 (64) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/apiKeys/client/Client.d.ts +9 -0
  3. package/dist/cjs/api/resources/apiKeys/client/Client.js +14 -2
  4. package/dist/cjs/api/resources/apiKeys/client/requests/RevokeTokenByIdApiKeysRevokeTokenIdPostRequest.d.ts +1 -0
  5. package/dist/cjs/api/resources/organization/client/Client.d.ts +37 -1
  6. package/dist/cjs/api/resources/organization/client/Client.js +165 -1
  7. package/dist/cjs/api/resources/organization/client/getPostmanTeamDocs.d.ts +25 -0
  8. package/dist/cjs/api/resources/organization/client/getPostmanTeamDocs.js +66 -0
  9. package/dist/cjs/api/resources/organization/client/index.d.ts +2 -0
  10. package/dist/cjs/api/resources/organization/client/index.js +3 -1
  11. package/dist/cjs/api/resources/organization/client/requests/GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest.d.ts +9 -0
  12. package/dist/cjs/api/resources/organization/client/requests/GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest.js +3 -0
  13. package/dist/cjs/api/resources/organization/client/requests/SetDocsUrlRequest.d.ts +11 -0
  14. package/dist/cjs/api/resources/organization/client/requests/SetDocsUrlRequest.js +3 -0
  15. package/dist/cjs/api/resources/organization/client/requests/index.d.ts +2 -0
  16. package/dist/cjs/api/resources/organization/client/setDocsUrl.d.ts +25 -0
  17. package/dist/cjs/api/resources/organization/client/setDocsUrl.js +66 -0
  18. package/dist/cjs/api/types/PostmanTeamDocsResponse.d.ts +6 -0
  19. package/dist/cjs/api/types/PostmanTeamDocsResponse.js +3 -0
  20. package/dist/cjs/api/types/index.d.ts +1 -0
  21. package/dist/cjs/api/types/index.js +1 -0
  22. package/dist/cjs/serialization/resources/organization/client/requests/SetDocsUrlRequest.d.ts +9 -0
  23. package/dist/cjs/serialization/resources/organization/client/requests/SetDocsUrlRequest.js +41 -0
  24. package/dist/cjs/serialization/resources/organization/client/requests/index.d.ts +1 -0
  25. package/dist/cjs/serialization/resources/organization/client/requests/index.js +3 -1
  26. package/dist/cjs/serialization/types/PostmanTeamDocsResponse.d.ts +12 -0
  27. package/dist/cjs/serialization/types/PostmanTeamDocsResponse.js +44 -0
  28. package/dist/cjs/serialization/types/index.d.ts +1 -0
  29. package/dist/cjs/serialization/types/index.js +1 -0
  30. package/dist/cjs/version.d.ts +1 -1
  31. package/dist/cjs/version.js +1 -1
  32. package/dist/esm/BaseClient.mjs +2 -2
  33. package/dist/esm/api/resources/apiKeys/client/Client.d.mts +9 -0
  34. package/dist/esm/api/resources/apiKeys/client/Client.mjs +14 -2
  35. package/dist/esm/api/resources/apiKeys/client/requests/RevokeTokenByIdApiKeysRevokeTokenIdPostRequest.d.mts +1 -0
  36. package/dist/esm/api/resources/organization/client/Client.d.mts +37 -1
  37. package/dist/esm/api/resources/organization/client/Client.mjs +165 -1
  38. package/dist/esm/api/resources/organization/client/getPostmanTeamDocs.d.mts +25 -0
  39. package/dist/esm/api/resources/organization/client/getPostmanTeamDocs.mjs +30 -0
  40. package/dist/esm/api/resources/organization/client/index.d.mts +2 -0
  41. package/dist/esm/api/resources/organization/client/index.mjs +2 -0
  42. package/dist/esm/api/resources/organization/client/requests/GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest.d.mts +9 -0
  43. package/dist/esm/api/resources/organization/client/requests/GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest.mjs +2 -0
  44. package/dist/esm/api/resources/organization/client/requests/SetDocsUrlRequest.d.mts +11 -0
  45. package/dist/esm/api/resources/organization/client/requests/SetDocsUrlRequest.mjs +2 -0
  46. package/dist/esm/api/resources/organization/client/requests/index.d.mts +2 -0
  47. package/dist/esm/api/resources/organization/client/setDocsUrl.d.mts +25 -0
  48. package/dist/esm/api/resources/organization/client/setDocsUrl.mjs +30 -0
  49. package/dist/esm/api/types/PostmanTeamDocsResponse.d.mts +6 -0
  50. package/dist/esm/api/types/PostmanTeamDocsResponse.mjs +2 -0
  51. package/dist/esm/api/types/index.d.mts +1 -0
  52. package/dist/esm/api/types/index.mjs +1 -0
  53. package/dist/esm/serialization/resources/organization/client/requests/SetDocsUrlRequest.d.mts +9 -0
  54. package/dist/esm/serialization/resources/organization/client/requests/SetDocsUrlRequest.mjs +5 -0
  55. package/dist/esm/serialization/resources/organization/client/requests/index.d.mts +1 -0
  56. package/dist/esm/serialization/resources/organization/client/requests/index.mjs +1 -0
  57. package/dist/esm/serialization/types/PostmanTeamDocsResponse.d.mts +12 -0
  58. package/dist/esm/serialization/types/PostmanTeamDocsResponse.mjs +8 -0
  59. package/dist/esm/serialization/types/index.d.mts +1 -0
  60. package/dist/esm/serialization/types/index.mjs +1 -0
  61. package/dist/esm/version.d.mts +1 -1
  62. package/dist/esm/version.mjs +1 -1
  63. package/package.json +1 -1
  64. package/reference.md +174 -1
@@ -0,0 +1,9 @@
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 SetDocsUrlRequest: core.serialization.Schema<serializers.SetDocsUrlRequest.Raw, Omit<FernVenusApi.SetDocsUrlRequest, "orgId">>;
5
+ export declare namespace SetDocsUrlRequest {
6
+ interface Raw {
7
+ docsUrl: string;
8
+ }
9
+ }
@@ -0,0 +1,41 @@
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.SetDocsUrlRequest = void 0;
38
+ const core = __importStar(require("../../../../../core/index.js"));
39
+ exports.SetDocsUrlRequest = core.serialization.object({
40
+ docsUrl: core.serialization.string(),
41
+ });
@@ -3,4 +3,5 @@ export { CreateClaimTokenRequest } from "./CreateClaimTokenRequest.js";
3
3
  export { CreateOrganizationRequest } from "./CreateOrganizationRequest.js";
4
4
  export { InviteUserToOrgRequest } from "./InviteUserToOrgRequest.js";
5
5
  export { RemoveUserFromOrgRequest } from "./RemoveUserFromOrgRequest.js";
6
+ export { SetDocsUrlRequest } from "./SetDocsUrlRequest.js";
6
7
  export { UpdateOrganizationRequest } from "./UpdateOrganizationRequest.js";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateOrganizationRequest = exports.RemoveUserFromOrgRequest = exports.InviteUserToOrgRequest = exports.CreateOrganizationRequest = exports.CreateClaimTokenRequest = exports.AddUserToOrgRequest = void 0;
3
+ exports.UpdateOrganizationRequest = exports.SetDocsUrlRequest = exports.RemoveUserFromOrgRequest = exports.InviteUserToOrgRequest = exports.CreateOrganizationRequest = exports.CreateClaimTokenRequest = exports.AddUserToOrgRequest = void 0;
4
4
  var AddUserToOrgRequest_js_1 = require("./AddUserToOrgRequest.js");
5
5
  Object.defineProperty(exports, "AddUserToOrgRequest", { enumerable: true, get: function () { return AddUserToOrgRequest_js_1.AddUserToOrgRequest; } });
6
6
  var CreateClaimTokenRequest_js_1 = require("./CreateClaimTokenRequest.js");
@@ -11,5 +11,7 @@ var InviteUserToOrgRequest_js_1 = require("./InviteUserToOrgRequest.js");
11
11
  Object.defineProperty(exports, "InviteUserToOrgRequest", { enumerable: true, get: function () { return InviteUserToOrgRequest_js_1.InviteUserToOrgRequest; } });
12
12
  var RemoveUserFromOrgRequest_js_1 = require("./RemoveUserFromOrgRequest.js");
13
13
  Object.defineProperty(exports, "RemoveUserFromOrgRequest", { enumerable: true, get: function () { return RemoveUserFromOrgRequest_js_1.RemoveUserFromOrgRequest; } });
14
+ var SetDocsUrlRequest_js_1 = require("./SetDocsUrlRequest.js");
15
+ Object.defineProperty(exports, "SetDocsUrlRequest", { enumerable: true, get: function () { return SetDocsUrlRequest_js_1.SetDocsUrlRequest; } });
14
16
  var UpdateOrganizationRequest_js_1 = require("./UpdateOrganizationRequest.js");
15
17
  Object.defineProperty(exports, "UpdateOrganizationRequest", { enumerable: true, get: function () { return UpdateOrganizationRequest_js_1.UpdateOrganizationRequest; } });
@@ -0,0 +1,12 @@
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
+ import { ClaimStatus } from "./ClaimStatus.js";
5
+ export declare const PostmanTeamDocsResponse: core.serialization.ObjectSchema<serializers.PostmanTeamDocsResponse.Raw, FernVenusApi.PostmanTeamDocsResponse>;
6
+ export declare namespace PostmanTeamDocsResponse {
7
+ interface Raw {
8
+ organizationId: string;
9
+ claimStatus: ClaimStatus.Raw;
10
+ docsUrl: string;
11
+ }
12
+ }
@@ -0,0 +1,44 @@
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.PostmanTeamDocsResponse = void 0;
38
+ const core = __importStar(require("../../core/index.js"));
39
+ const ClaimStatus_js_1 = require("./ClaimStatus.js");
40
+ exports.PostmanTeamDocsResponse = core.serialization.object({
41
+ organizationId: core.serialization.string(),
42
+ claimStatus: ClaimStatus_js_1.ClaimStatus,
43
+ docsUrl: core.serialization.string(),
44
+ });
@@ -20,6 +20,7 @@ export * from "./Npm.js";
20
20
  export * from "./NpmRegistryToken.js";
21
21
  export * from "./Organization.js";
22
22
  export * from "./OrganizationsPage.js";
23
+ export * from "./PostmanTeamDocsResponse.js";
23
24
  export * from "./Pypi.js";
24
25
  export * from "./PypiRegistryToken.js";
25
26
  export * from "./RegistryToken.js";
@@ -36,6 +36,7 @@ __exportStar(require("./Npm.js"), exports);
36
36
  __exportStar(require("./NpmRegistryToken.js"), exports);
37
37
  __exportStar(require("./Organization.js"), exports);
38
38
  __exportStar(require("./OrganizationsPage.js"), exports);
39
+ __exportStar(require("./PostmanTeamDocsResponse.js"), exports);
39
40
  __exportStar(require("./Pypi.js"), exports);
40
41
  __exportStar(require("./PypiRegistryToken.js"), exports);
41
42
  __exportStar(require("./RegistryToken.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "11.5.0";
1
+ export declare const SDK_VERSION = "11.7.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 = "11.5.0";
4
+ exports.SDK_VERSION = "11.7.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": "11.5.0",
10
- "User-Agent": "@fern-api/venus-api-sdk/11.5.0",
9
+ "X-Fern-SDK-Version": "11.7.0",
10
+ "User-Agent": "@fern-api/venus-api-sdk/11.7.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);
@@ -37,6 +37,10 @@ export declare class ApiKeysClient {
37
37
  getTokenMetadata(request: FernVenusApi.GetTokenMetadataRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.TokenMetadata, FernVenusApi.apiKeys.getTokenMetadata.Error>>;
38
38
  private __getTokenMetadata;
39
39
  /**
40
+ * Lists an organization's API keys. Called with the provisioner token, it
41
+ * only works for an unclaimed organization that was created with that
42
+ * token, and returns 403 for any other.
43
+ *
40
44
  * @param {FernVenusApi.GetTokensForOrganizationApiKeysOrganizationOrganizationIdGetRequest} request
41
45
  * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
42
46
  *
@@ -48,6 +52,11 @@ export declare class ApiKeysClient {
48
52
  getTokensForOrganization(request: FernVenusApi.GetTokensForOrganizationApiKeysOrganizationOrganizationIdGetRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.TokenMetadata[], FernVenusApi.apiKeys.getTokensForOrganization.Error>>;
49
53
  private __getTokensForOrganization;
50
54
  /**
55
+ * Revokes an API key by its ID. Called with the provisioner token,
56
+ * organizationId is required and must be an unclaimed organization that
57
+ * was created with that token (403 otherwise), and the key must be that
58
+ * organization's (401 otherwise). Other callers don't need organizationId.
59
+ *
51
60
  * @param {FernVenusApi.RevokeTokenByIdApiKeysRevokeTokenIdPostRequest} request
52
61
  * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
53
62
  *
@@ -193,6 +193,10 @@ export class ApiKeysClient {
193
193
  });
194
194
  }
195
195
  /**
196
+ * Lists an organization's API keys. Called with the provisioner token, it
197
+ * only works for an unclaimed organization that was created with that
198
+ * token, and returns 403 for any other.
199
+ *
196
200
  * @param {FernVenusApi.GetTokensForOrganizationApiKeysOrganizationOrganizationIdGetRequest} request
197
201
  * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
198
202
  *
@@ -268,6 +272,11 @@ export class ApiKeysClient {
268
272
  });
269
273
  }
270
274
  /**
275
+ * Revokes an API key by its ID. Called with the provisioner token,
276
+ * organizationId is required and must be an unclaimed organization that
277
+ * was created with that token (403 otherwise), and the key must be that
278
+ * organization's (401 otherwise). Other callers don't need organizationId.
279
+ *
271
280
  * @param {FernVenusApi.RevokeTokenByIdApiKeysRevokeTokenIdPostRequest} request
272
281
  * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
273
282
  *
@@ -282,14 +291,17 @@ export class ApiKeysClient {
282
291
  __revokeTokenById(request, requestOptions) {
283
292
  return __awaiter(this, void 0, void 0, function* () {
284
293
  var _a, _b, _c, _d, _e, _f, _g, _h;
285
- const { tokenId } = request;
294
+ const { tokenId, organizationId } = request;
295
+ const _queryParams = {
296
+ organizationId,
297
+ };
286
298
  const _authRequest = yield this._options.authProvider.getAuthRequest();
287
299
  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);
288
300
  const _response = yield core.fetcher({
289
301
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `api-keys/revoke/${core.url.encodePathParam(tokenId)}`),
290
302
  method: "POST",
291
303
  headers: _headers,
292
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
304
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
293
305
  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,
294
306
  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,
295
307
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -6,4 +6,5 @@
6
6
  */
7
7
  export interface RevokeTokenByIdApiKeysRevokeTokenIdPostRequest {
8
8
  tokenId: string;
9
+ organizationId?: string | null;
9
10
  }
@@ -52,6 +52,9 @@ export declare class OrganizationClient {
52
52
  private __get;
53
53
  /**
54
54
  * Deletes an organization. Only users with admin role can delete organizations.
55
+ * Called with the provisioner token, it only works for an unclaimed
56
+ * organization that was created with that token, and returns 403 for any
57
+ * other. It also revokes that organization's API keys.
55
58
  *
56
59
  * @param {FernVenusApi.DeleteOrganizationsOrgIdDeleteRequest} request
57
60
  * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -76,6 +79,22 @@ export declare class OrganizationClient {
76
79
  */
77
80
  getOrgIdsByPostmanTeamId(request: FernVenusApi.GetOrgIdsByPostmanTeamIdOrganizationsPostmanTeamPostmanTeamIdGetRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.Organization, FernVenusApi.organization.getOrgIdsByPostmanTeamId.Error>>;
78
81
  private __getOrgIdsByPostmanTeamId;
82
+ /**
83
+ * The claimable organization linked to a Postman team, with its claim
84
+ * status and the address of its docs site. Only Postman's integration
85
+ * service token can call it. 404 when the team has no claimable
86
+ * organization, or its docs address isn't set.
87
+ *
88
+ * @param {FernVenusApi.GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest} request
89
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
90
+ *
91
+ * @example
92
+ * await client.organization.getPostmanTeamDocs({
93
+ * postmanTeamId: "postman_team_id"
94
+ * })
95
+ */
96
+ getPostmanTeamDocs(request: FernVenusApi.GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.PostmanTeamDocsResponse, FernVenusApi.organization.getPostmanTeamDocs.Error>>;
97
+ private __getPostmanTeamDocs;
79
98
  /**
80
99
  * Get the Postman team ID associated with an organization ID.
81
100
  *
@@ -106,7 +125,8 @@ export declare class OrganizationClient {
106
125
  private __getClaimStatus;
107
126
  /**
108
127
  * Issues a claim link for an unclaimed organization, bound to one Postman
109
- * user and valid for 15 minutes. Only the provisioner token can call it.
128
+ * user and valid for 15 minutes. Only the provisioner token and Postman's
129
+ * integration service token can call it.
110
130
  *
111
131
  * @param {FernVenusApi.CreateClaimTokenRequest} request
112
132
  * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -119,6 +139,22 @@ export declare class OrganizationClient {
119
139
  */
120
140
  createClaimToken(request: FernVenusApi.CreateClaimTokenRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.ClaimTokenResponse, FernVenusApi.organization.createClaimToken.Error>>;
121
141
  private __createClaimToken;
142
+ /**
143
+ * Sets the address of an unclaimed organization's docs site, which the
144
+ * team docs lookup returns. Only the provisioner token can call it, and
145
+ * only until the organization is claimed.
146
+ *
147
+ * @param {FernVenusApi.SetDocsUrlRequest} request
148
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
149
+ *
150
+ * @example
151
+ * await client.organization.setDocsUrl({
152
+ * orgId: "org_id",
153
+ * docsUrl: "docsUrl"
154
+ * })
155
+ */
156
+ setDocsUrl(request: FernVenusApi.SetDocsUrlRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<void, FernVenusApi.organization.setDocsUrl.Error>>;
157
+ private __setDocsUrl;
122
158
  /**
123
159
  * Redeems a claim link. The caller, signed in as the Postman user the link
124
160
  * is for, becomes the admin of the organization. The first claim wins, and
@@ -270,6 +270,9 @@ export class OrganizationClient {
270
270
  }
271
271
  /**
272
272
  * Deletes an organization. Only users with admin role can delete organizations.
273
+ * Called with the provisioner token, it only works for an unclaimed
274
+ * organization that was created with that token, and returns 403 for any
275
+ * other. It also revokes that organization's API keys.
273
276
  *
274
277
  * @param {FernVenusApi.DeleteOrganizationsOrgIdDeleteRequest} request
275
278
  * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -416,6 +419,86 @@ export class OrganizationClient {
416
419
  };
417
420
  });
418
421
  }
422
+ /**
423
+ * The claimable organization linked to a Postman team, with its claim
424
+ * status and the address of its docs site. Only Postman's integration
425
+ * service token can call it. 404 when the team has no claimable
426
+ * organization, or its docs address isn't set.
427
+ *
428
+ * @param {FernVenusApi.GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest} request
429
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
430
+ *
431
+ * @example
432
+ * await client.organization.getPostmanTeamDocs({
433
+ * postmanTeamId: "postman_team_id"
434
+ * })
435
+ */
436
+ getPostmanTeamDocs(request, requestOptions) {
437
+ return core.HttpResponsePromise.fromPromise(this.__getPostmanTeamDocs(request, requestOptions));
438
+ }
439
+ __getPostmanTeamDocs(request, requestOptions) {
440
+ return __awaiter(this, void 0, void 0, function* () {
441
+ var _a, _b, _c, _d, _e, _f, _g, _h;
442
+ const { postmanTeamId } = request;
443
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
444
+ 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);
445
+ const _response = yield core.fetcher({
446
+ 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/postman-team/${core.url.encodePathParam(postmanTeamId)}/docs`),
447
+ method: "GET",
448
+ headers: _headers,
449
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
450
+ 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,
451
+ 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,
452
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
453
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
454
+ logging: this._options.logging,
455
+ });
456
+ if (_response.ok) {
457
+ return {
458
+ data: {
459
+ ok: true,
460
+ body: serializers.PostmanTeamDocsResponse.parseOrThrow(_response.body, {
461
+ unrecognizedObjectKeys: "passthrough",
462
+ allowUnrecognizedUnionMembers: true,
463
+ allowUnrecognizedEnumValues: true,
464
+ skipValidation: true,
465
+ breadcrumbsPrefix: ["response"],
466
+ }),
467
+ headers: _response.headers,
468
+ rawResponse: _response.rawResponse,
469
+ },
470
+ rawResponse: _response.rawResponse,
471
+ };
472
+ }
473
+ if (_response.error.reason === "status-code") {
474
+ switch (_response.error.statusCode) {
475
+ case 422:
476
+ return {
477
+ data: {
478
+ ok: false,
479
+ error: FernVenusApi.organization.getPostmanTeamDocs.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
480
+ unrecognizedObjectKeys: "passthrough",
481
+ allowUnrecognizedUnionMembers: true,
482
+ allowUnrecognizedEnumValues: true,
483
+ skipValidation: true,
484
+ breadcrumbsPrefix: ["response"],
485
+ })),
486
+ rawResponse: _response.rawResponse,
487
+ },
488
+ rawResponse: _response.rawResponse,
489
+ };
490
+ }
491
+ }
492
+ return {
493
+ data: {
494
+ ok: false,
495
+ error: FernVenusApi.organization.getPostmanTeamDocs.Error._unknown(_response.error),
496
+ rawResponse: _response.rawResponse,
497
+ },
498
+ rawResponse: _response.rawResponse,
499
+ };
500
+ });
501
+ }
419
502
  /**
420
503
  * Get the Postman team ID associated with an organization ID.
421
504
  *
@@ -574,7 +657,8 @@ export class OrganizationClient {
574
657
  }
575
658
  /**
576
659
  * Issues a claim link for an unclaimed organization, bound to one Postman
577
- * user and valid for 15 minutes. Only the provisioner token can call it.
660
+ * user and valid for 15 minutes. Only the provisioner token and Postman's
661
+ * integration service token can call it.
578
662
  *
579
663
  * @param {FernVenusApi.CreateClaimTokenRequest} request
580
664
  * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -657,6 +741,86 @@ export class OrganizationClient {
657
741
  };
658
742
  });
659
743
  }
744
+ /**
745
+ * Sets the address of an unclaimed organization's docs site, which the
746
+ * team docs lookup returns. Only the provisioner token can call it, and
747
+ * only until the organization is claimed.
748
+ *
749
+ * @param {FernVenusApi.SetDocsUrlRequest} request
750
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
751
+ *
752
+ * @example
753
+ * await client.organization.setDocsUrl({
754
+ * orgId: "org_id",
755
+ * docsUrl: "docsUrl"
756
+ * })
757
+ */
758
+ setDocsUrl(request, requestOptions) {
759
+ return core.HttpResponsePromise.fromPromise(this.__setDocsUrl(request, requestOptions));
760
+ }
761
+ __setDocsUrl(request, requestOptions) {
762
+ return __awaiter(this, void 0, void 0, function* () {
763
+ var _a, _b, _c, _d, _e, _f, _g, _h;
764
+ const { orgId } = request, _body = __rest(request, ["orgId"]);
765
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
766
+ 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);
767
+ const _response = yield core.fetcher({
768
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `organizations/${core.url.encodePathParam(orgId)}/docs-url`),
769
+ method: "POST",
770
+ headers: _headers,
771
+ contentType: "application/json",
772
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
773
+ requestType: "json",
774
+ body: serializers.SetDocsUrlRequest.jsonOrThrow(_body, {
775
+ unrecognizedObjectKeys: "strip",
776
+ omitUndefined: true,
777
+ }),
778
+ 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,
779
+ 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,
780
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
781
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
782
+ logging: this._options.logging,
783
+ });
784
+ if (_response.ok) {
785
+ return {
786
+ data: {
787
+ ok: true,
788
+ body: undefined,
789
+ headers: _response.headers,
790
+ rawResponse: _response.rawResponse,
791
+ },
792
+ rawResponse: _response.rawResponse,
793
+ };
794
+ }
795
+ if (_response.error.reason === "status-code") {
796
+ switch (_response.error.statusCode) {
797
+ case 422:
798
+ return {
799
+ data: {
800
+ ok: false,
801
+ error: FernVenusApi.organization.setDocsUrl.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
802
+ unrecognizedObjectKeys: "passthrough",
803
+ allowUnrecognizedUnionMembers: true,
804
+ allowUnrecognizedEnumValues: true,
805
+ skipValidation: true,
806
+ breadcrumbsPrefix: ["response"],
807
+ })),
808
+ rawResponse: _response.rawResponse,
809
+ },
810
+ rawResponse: _response.rawResponse,
811
+ };
812
+ }
813
+ }
814
+ return {
815
+ data: {
816
+ ok: false,
817
+ error: FernVenusApi.organization.setDocsUrl.Error._unknown(_response.error),
818
+ rawResponse: _response.rawResponse,
819
+ },
820
+ rawResponse: _response.rawResponse,
821
+ };
822
+ });
823
+ }
660
824
  /**
661
825
  * Redeems a claim link. The caller, signed in as the Postman user the link
662
826
  * is for, becomes the admin of the organization. The first claim wins, and
@@ -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.getPostmanTeamDocs.Error.UnprocessableEntityError | FernVenusApi.organization.getPostmanTeamDocs.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.getPostmanTeamDocs.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.getPostmanTeamDocs.Error.UnprocessableEntityError;
23
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.organization.getPostmanTeamDocs.Error._Unknown;
24
+ readonly _visit: <_Result>(value: FernVenusApi.organization.getPostmanTeamDocs.Error, visitor: FernVenusApi.organization.getPostmanTeamDocs.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.getPostmanTeamDocs.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.getPostmanTeamDocs.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
+ };
@@ -8,10 +8,12 @@ export * as getClaimStatus from "./getClaimStatus.mjs";
8
8
  export * as getMyOrganizationFromScopedToken from "./getMyOrganizationFromScopedToken.mjs";
9
9
  export * as getOrgIdsByPostmanTeamId from "./getOrgIdsByPostmanTeamId.mjs";
10
10
  export * as getOrgIdsFromToken from "./getOrgIdsFromToken.mjs";
11
+ export * as getPostmanTeamDocs from "./getPostmanTeamDocs.mjs";
11
12
  export * as getPostmanTeamIdByOrgId from "./getPostmanTeamIdByOrgId.mjs";
12
13
  export * as inviteUser from "./inviteUser.mjs";
13
14
  export * as isMember from "./isMember.mjs";
14
15
  export * as previewClaim from "./previewClaim.mjs";
15
16
  export * as removeUser from "./removeUser.mjs";
16
17
  export * from "./requests/index.mjs";
18
+ export * as setDocsUrl from "./setDocsUrl.mjs";
17
19
  export * as update from "./update.mjs";
@@ -8,10 +8,12 @@ export * as getClaimStatus from "./getClaimStatus.mjs";
8
8
  export * as getMyOrganizationFromScopedToken from "./getMyOrganizationFromScopedToken.mjs";
9
9
  export * as getOrgIdsByPostmanTeamId from "./getOrgIdsByPostmanTeamId.mjs";
10
10
  export * as getOrgIdsFromToken from "./getOrgIdsFromToken.mjs";
11
+ export * as getPostmanTeamDocs from "./getPostmanTeamDocs.mjs";
11
12
  export * as getPostmanTeamIdByOrgId from "./getPostmanTeamIdByOrgId.mjs";
12
13
  export * as inviteUser from "./inviteUser.mjs";
13
14
  export * as isMember from "./isMember.mjs";
14
15
  export * as previewClaim from "./previewClaim.mjs";
15
16
  export * as removeUser from "./removeUser.mjs";
16
17
  export * from "./requests/index.mjs";
18
+ export * as setDocsUrl from "./setDocsUrl.mjs";
17
19
  export * as update from "./update.mjs";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * postmanTeamId: "postman_team_id"
5
+ * }
6
+ */
7
+ export interface GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest {
8
+ postmanTeamId: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * orgId: "org_id",
5
+ * docsUrl: "docsUrl"
6
+ * }
7
+ */
8
+ export interface SetDocsUrlRequest {
9
+ orgId: string;
10
+ docsUrl: string;
11
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -6,8 +6,10 @@ export type { GetClaimStatusOrganizationsOrgIdClaimStatusGetRequest } from "./Ge
6
6
  export type { GetMyOrganizationFromScopedTokenOrganizationsMyselfPostRequest } from "./GetMyOrganizationFromScopedTokenOrganizationsMyselfPostRequest.mjs";
7
7
  export type { GetOrganizationsOrgIdGetRequest } from "./GetOrganizationsOrgIdGetRequest.mjs";
8
8
  export type { GetOrgIdsByPostmanTeamIdOrganizationsPostmanTeamPostmanTeamIdGetRequest } from "./GetOrgIdsByPostmanTeamIdOrganizationsPostmanTeamPostmanTeamIdGetRequest.mjs";
9
+ export type { GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest } from "./GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest.mjs";
9
10
  export type { GetPostmanTeamIdByOrgIdOrganizationsOrgIdPostmanTeamIdGetRequest } from "./GetPostmanTeamIdByOrgIdOrganizationsOrgIdPostmanTeamIdGetRequest.mjs";
10
11
  export type { InviteUserToOrgRequest } from "./InviteUserToOrgRequest.mjs";
11
12
  export type { IsMemberOrganizationsBelongsToOrganizationOrganizationIdPostRequest } from "./IsMemberOrganizationsBelongsToOrganizationOrganizationIdPostRequest.mjs";
12
13
  export type { RemoveUserFromOrgRequest } from "./RemoveUserFromOrgRequest.mjs";
14
+ export type { SetDocsUrlRequest } from "./SetDocsUrlRequest.mjs";
13
15
  export type { UpdateOrganizationRequest } from "./UpdateOrganizationRequest.mjs";