@fern-api/venus-api-sdk 15.0.0 → 15.2.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 (72) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/organization/client/Client.d.ts +38 -1
  3. package/dist/cjs/api/resources/organization/client/Client.js +176 -1
  4. package/dist/cjs/api/resources/organization/client/claimGithub.d.ts +25 -0
  5. package/dist/cjs/api/resources/organization/client/claimGithub.js +66 -0
  6. package/dist/cjs/api/resources/organization/client/index.d.ts +2 -0
  7. package/dist/cjs/api/resources/organization/client/index.js +3 -1
  8. package/dist/cjs/api/resources/organization/client/previewGithubClaim.d.ts +25 -0
  9. package/dist/cjs/api/resources/organization/client/previewGithubClaim.js +66 -0
  10. package/dist/cjs/api/resources/organization/client/requests/ClaimGithubOrganizationRequest.d.ts +11 -0
  11. package/dist/cjs/api/resources/organization/client/requests/ClaimGithubOrganizationRequest.js +3 -0
  12. package/dist/cjs/api/resources/organization/client/requests/GithubClaimPreviewRequest.d.ts +9 -0
  13. package/dist/cjs/api/resources/organization/client/requests/GithubClaimPreviewRequest.js +3 -0
  14. package/dist/cjs/api/resources/organization/client/requests/index.d.ts +2 -0
  15. package/dist/cjs/api/types/GithubClaimPreviewResponse.d.ts +7 -0
  16. package/dist/cjs/api/types/GithubClaimPreviewResponse.js +3 -0
  17. package/dist/cjs/api/types/Publisher.d.ts +4 -3
  18. package/dist/cjs/api/types/PublisherType.d.ts +1 -0
  19. package/dist/cjs/api/types/PublisherType.js +1 -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/ClaimGithubOrganizationRequest.d.ts +10 -0
  23. package/dist/cjs/serialization/resources/organization/client/requests/ClaimGithubOrganizationRequest.js +42 -0
  24. package/dist/cjs/serialization/resources/organization/client/requests/GithubClaimPreviewRequest.d.ts +9 -0
  25. package/dist/cjs/serialization/resources/organization/client/requests/GithubClaimPreviewRequest.js +41 -0
  26. package/dist/cjs/serialization/resources/organization/client/requests/index.d.ts +2 -0
  27. package/dist/cjs/serialization/resources/organization/client/requests/index.js +5 -1
  28. package/dist/cjs/serialization/types/GithubClaimPreviewResponse.d.ts +13 -0
  29. package/dist/cjs/serialization/types/GithubClaimPreviewResponse.js +45 -0
  30. package/dist/cjs/serialization/types/PublisherType.d.ts +1 -1
  31. package/dist/cjs/serialization/types/PublisherType.js +1 -1
  32. package/dist/cjs/serialization/types/index.d.ts +1 -0
  33. package/dist/cjs/serialization/types/index.js +1 -0
  34. package/dist/cjs/version.d.ts +1 -1
  35. package/dist/cjs/version.js +1 -1
  36. package/dist/esm/BaseClient.mjs +2 -2
  37. package/dist/esm/api/resources/organization/client/Client.d.mts +38 -1
  38. package/dist/esm/api/resources/organization/client/Client.mjs +176 -1
  39. package/dist/esm/api/resources/organization/client/claimGithub.d.mts +25 -0
  40. package/dist/esm/api/resources/organization/client/claimGithub.mjs +30 -0
  41. package/dist/esm/api/resources/organization/client/index.d.mts +2 -0
  42. package/dist/esm/api/resources/organization/client/index.mjs +2 -0
  43. package/dist/esm/api/resources/organization/client/previewGithubClaim.d.mts +25 -0
  44. package/dist/esm/api/resources/organization/client/previewGithubClaim.mjs +30 -0
  45. package/dist/esm/api/resources/organization/client/requests/ClaimGithubOrganizationRequest.d.mts +11 -0
  46. package/dist/esm/api/resources/organization/client/requests/ClaimGithubOrganizationRequest.mjs +2 -0
  47. package/dist/esm/api/resources/organization/client/requests/GithubClaimPreviewRequest.d.mts +9 -0
  48. package/dist/esm/api/resources/organization/client/requests/GithubClaimPreviewRequest.mjs +2 -0
  49. package/dist/esm/api/resources/organization/client/requests/index.d.mts +2 -0
  50. package/dist/esm/api/types/GithubClaimPreviewResponse.d.mts +7 -0
  51. package/dist/esm/api/types/GithubClaimPreviewResponse.mjs +2 -0
  52. package/dist/esm/api/types/Publisher.d.mts +4 -3
  53. package/dist/esm/api/types/PublisherType.d.mts +1 -0
  54. package/dist/esm/api/types/PublisherType.mjs +1 -0
  55. package/dist/esm/api/types/index.d.mts +1 -0
  56. package/dist/esm/api/types/index.mjs +1 -0
  57. package/dist/esm/serialization/resources/organization/client/requests/ClaimGithubOrganizationRequest.d.mts +10 -0
  58. package/dist/esm/serialization/resources/organization/client/requests/ClaimGithubOrganizationRequest.mjs +6 -0
  59. package/dist/esm/serialization/resources/organization/client/requests/GithubClaimPreviewRequest.d.mts +9 -0
  60. package/dist/esm/serialization/resources/organization/client/requests/GithubClaimPreviewRequest.mjs +5 -0
  61. package/dist/esm/serialization/resources/organization/client/requests/index.d.mts +2 -0
  62. package/dist/esm/serialization/resources/organization/client/requests/index.mjs +2 -0
  63. package/dist/esm/serialization/types/GithubClaimPreviewResponse.d.mts +13 -0
  64. package/dist/esm/serialization/types/GithubClaimPreviewResponse.mjs +9 -0
  65. package/dist/esm/serialization/types/PublisherType.d.mts +1 -1
  66. package/dist/esm/serialization/types/PublisherType.mjs +1 -1
  67. package/dist/esm/serialization/types/index.d.mts +1 -0
  68. package/dist/esm/serialization/types/index.mjs +1 -0
  69. package/dist/esm/version.d.mts +1 -1
  70. package/dist/esm/version.mjs +1 -1
  71. package/package.json +1 -1
  72. package/reference.md +142 -1
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
46
- "X-Fern-SDK-Version": "15.0.0",
47
- "User-Agent": "@fern-api/venus-api-sdk/15.0.0",
46
+ "X-Fern-SDK-Version": "15.2.0",
47
+ "User-Agent": "@fern-api/venus-api-sdk/15.2.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);
@@ -146,7 +146,10 @@ export declare class OrganizationClient {
146
146
  * user and valid for 15 minutes. Only the provisioner token and Postman's
147
147
  * integration service token can call it. For an organization held for a
148
148
  * Postman user, the caller must name that user as the publisher, or gets
149
- * 403 PublisherMismatchError.
149
+ * 403 PublisherMismatchError. An organization held for a GitHub
150
+ * repository always gets 403 PublisherMismatchError: a link is redeemed
151
+ * with a Postman sign-in, which says nothing about who owns the
152
+ * repository.
150
153
  *
151
154
  * @param {FernVenusApi.CreateClaimTokenRequest} request
152
155
  * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -228,6 +231,40 @@ export declare class OrganizationClient {
228
231
  */
229
232
  claimFromDocsSite(request: FernVenusApi.ClaimOrganizationRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.ClaimOrganizationResponse, FernVenusApi.organization.claimFromDocsSite.Error>>;
230
233
  private __claimFromDocsSite;
234
+ /**
235
+ * Claims an organization held for a GitHub repo. The caller, signed in to
236
+ * Fern, sends a GitHub token of theirs; Venus asks GitHub with it about the
237
+ * repo and claims the organization for the caller only if GitHub says they
238
+ * are an admin of it. They become the organization's admin. The token is
239
+ * used for that one request and never stored. The first claim wins, and a
240
+ * retry by the same user finishes a claim that failed partway.
241
+ *
242
+ * @param {FernVenusApi.ClaimGithubOrganizationRequest} request
243
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
244
+ *
245
+ * @example
246
+ * await client.organization.claimGithub({
247
+ * organizationId: "organizationId",
248
+ * githubToken: "githubToken"
249
+ * })
250
+ */
251
+ claimGithub(request: FernVenusApi.ClaimGithubOrganizationRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.ClaimOrganizationResponse, FernVenusApi.organization.claimGithub.Error>>;
252
+ private __claimGithub;
253
+ /**
254
+ * What an organization held for a GitHub repo is, and whether it has been
255
+ * claimed, so the dashboard can show it before the user signs in. Public:
256
+ * the organization's docs site already names the repo.
257
+ *
258
+ * @param {FernVenusApi.GithubClaimPreviewRequest} request
259
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
260
+ *
261
+ * @example
262
+ * await client.organization.previewGithubClaim({
263
+ * organizationId: "organizationId"
264
+ * })
265
+ */
266
+ previewGithubClaim(request: FernVenusApi.GithubClaimPreviewRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.GithubClaimPreviewResponse, FernVenusApi.organization.previewGithubClaim.Error>>;
267
+ private __previewGithubClaim;
231
268
  /**
232
269
  * @param {FernVenusApi.IsMemberOrganizationsBelongsToOrganizationOrganizationIdPostRequest} request
233
270
  * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -778,7 +778,10 @@ class OrganizationClient {
778
778
  * user and valid for 15 minutes. Only the provisioner token and Postman's
779
779
  * integration service token can call it. For an organization held for a
780
780
  * Postman user, the caller must name that user as the publisher, or gets
781
- * 403 PublisherMismatchError.
781
+ * 403 PublisherMismatchError. An organization held for a GitHub
782
+ * repository always gets 403 PublisherMismatchError: a link is redeemed
783
+ * with a Postman sign-in, which says nothing about who owns the
784
+ * repository.
782
785
  *
783
786
  * @param {FernVenusApi.CreateClaimTokenRequest} request
784
787
  * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -1201,6 +1204,178 @@ class OrganizationClient {
1201
1204
  };
1202
1205
  });
1203
1206
  }
1207
+ /**
1208
+ * Claims an organization held for a GitHub repo. The caller, signed in to
1209
+ * Fern, sends a GitHub token of theirs; Venus asks GitHub with it about the
1210
+ * repo and claims the organization for the caller only if GitHub says they
1211
+ * are an admin of it. They become the organization's admin. The token is
1212
+ * used for that one request and never stored. The first claim wins, and a
1213
+ * retry by the same user finishes a claim that failed partway.
1214
+ *
1215
+ * @param {FernVenusApi.ClaimGithubOrganizationRequest} request
1216
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
1217
+ *
1218
+ * @example
1219
+ * await client.organization.claimGithub({
1220
+ * organizationId: "organizationId",
1221
+ * githubToken: "githubToken"
1222
+ * })
1223
+ */
1224
+ claimGithub(request, requestOptions) {
1225
+ return core.HttpResponsePromise.fromPromise(this.__claimGithub(request, requestOptions));
1226
+ }
1227
+ __claimGithub(request, requestOptions) {
1228
+ return __awaiter(this, void 0, void 0, function* () {
1229
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1230
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1231
+ 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);
1232
+ const _response = yield core.fetcher({
1233
+ 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/github"),
1234
+ method: "POST",
1235
+ headers: _headers,
1236
+ contentType: "application/json",
1237
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1238
+ requestType: "json",
1239
+ body: serializers.ClaimGithubOrganizationRequest.jsonOrThrow(request, {
1240
+ unrecognizedObjectKeys: "strip",
1241
+ omitUndefined: true,
1242
+ }),
1243
+ 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,
1244
+ 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,
1245
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1246
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
1247
+ logging: this._options.logging,
1248
+ });
1249
+ if (_response.ok) {
1250
+ return {
1251
+ data: {
1252
+ ok: true,
1253
+ body: serializers.ClaimOrganizationResponse.parseOrThrow(_response.body, {
1254
+ unrecognizedObjectKeys: "passthrough",
1255
+ allowUnrecognizedUnionMembers: true,
1256
+ allowUnrecognizedEnumValues: true,
1257
+ skipValidation: true,
1258
+ breadcrumbsPrefix: ["response"],
1259
+ }),
1260
+ headers: _response.headers,
1261
+ rawResponse: _response.rawResponse,
1262
+ },
1263
+ rawResponse: _response.rawResponse,
1264
+ };
1265
+ }
1266
+ if (_response.error.reason === "status-code") {
1267
+ switch (_response.error.statusCode) {
1268
+ case 422:
1269
+ return {
1270
+ data: {
1271
+ ok: false,
1272
+ error: FernVenusApi.organization.claimGithub.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1273
+ unrecognizedObjectKeys: "passthrough",
1274
+ allowUnrecognizedUnionMembers: true,
1275
+ allowUnrecognizedEnumValues: true,
1276
+ skipValidation: true,
1277
+ breadcrumbsPrefix: ["response"],
1278
+ })),
1279
+ rawResponse: _response.rawResponse,
1280
+ },
1281
+ rawResponse: _response.rawResponse,
1282
+ };
1283
+ }
1284
+ }
1285
+ return {
1286
+ data: {
1287
+ ok: false,
1288
+ error: FernVenusApi.organization.claimGithub.Error._unknown(_response.error),
1289
+ rawResponse: _response.rawResponse,
1290
+ },
1291
+ rawResponse: _response.rawResponse,
1292
+ };
1293
+ });
1294
+ }
1295
+ /**
1296
+ * What an organization held for a GitHub repo is, and whether it has been
1297
+ * claimed, so the dashboard can show it before the user signs in. Public:
1298
+ * the organization's docs site already names the repo.
1299
+ *
1300
+ * @param {FernVenusApi.GithubClaimPreviewRequest} request
1301
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
1302
+ *
1303
+ * @example
1304
+ * await client.organization.previewGithubClaim({
1305
+ * organizationId: "organizationId"
1306
+ * })
1307
+ */
1308
+ previewGithubClaim(request, requestOptions) {
1309
+ return core.HttpResponsePromise.fromPromise(this.__previewGithubClaim(request, requestOptions));
1310
+ }
1311
+ __previewGithubClaim(request, requestOptions) {
1312
+ return __awaiter(this, void 0, void 0, function* () {
1313
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1314
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
1315
+ 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);
1316
+ const _response = yield core.fetcher({
1317
+ 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/github/preview"),
1318
+ method: "POST",
1319
+ headers: _headers,
1320
+ contentType: "application/json",
1321
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1322
+ requestType: "json",
1323
+ body: serializers.GithubClaimPreviewRequest.jsonOrThrow(request, {
1324
+ unrecognizedObjectKeys: "strip",
1325
+ omitUndefined: true,
1326
+ }),
1327
+ 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,
1328
+ 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,
1329
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1330
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
1331
+ logging: this._options.logging,
1332
+ });
1333
+ if (_response.ok) {
1334
+ return {
1335
+ data: {
1336
+ ok: true,
1337
+ body: serializers.GithubClaimPreviewResponse.parseOrThrow(_response.body, {
1338
+ unrecognizedObjectKeys: "passthrough",
1339
+ allowUnrecognizedUnionMembers: true,
1340
+ allowUnrecognizedEnumValues: true,
1341
+ skipValidation: true,
1342
+ breadcrumbsPrefix: ["response"],
1343
+ }),
1344
+ headers: _response.headers,
1345
+ rawResponse: _response.rawResponse,
1346
+ },
1347
+ rawResponse: _response.rawResponse,
1348
+ };
1349
+ }
1350
+ if (_response.error.reason === "status-code") {
1351
+ switch (_response.error.statusCode) {
1352
+ case 422:
1353
+ return {
1354
+ data: {
1355
+ ok: false,
1356
+ error: FernVenusApi.organization.previewGithubClaim.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
1357
+ unrecognizedObjectKeys: "passthrough",
1358
+ allowUnrecognizedUnionMembers: true,
1359
+ allowUnrecognizedEnumValues: true,
1360
+ skipValidation: true,
1361
+ breadcrumbsPrefix: ["response"],
1362
+ })),
1363
+ rawResponse: _response.rawResponse,
1364
+ },
1365
+ rawResponse: _response.rawResponse,
1366
+ };
1367
+ }
1368
+ }
1369
+ return {
1370
+ data: {
1371
+ ok: false,
1372
+ error: FernVenusApi.organization.previewGithubClaim.Error._unknown(_response.error),
1373
+ rawResponse: _response.rawResponse,
1374
+ },
1375
+ rawResponse: _response.rawResponse,
1376
+ };
1377
+ });
1378
+ }
1204
1379
  /**
1205
1380
  * @param {FernVenusApi.IsMemberOrganizationsBelongsToOrganizationOrganizationIdPostRequest} request
1206
1381
  * @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.claimGithub.Error.UnprocessableEntityError | FernVenusApi.organization.claimGithub.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.claimGithub.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.claimGithub.Error.UnprocessableEntityError;
23
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.organization.claimGithub.Error._Unknown;
24
+ readonly _visit: <_Result>(value: FernVenusApi.organization.claimGithub.Error, visitor: FernVenusApi.organization.claimGithub.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.claimGithub.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.claimGithub.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,6 +1,7 @@
1
1
  export * as addUser from "./addUser.js";
2
2
  export * as claim from "./claim.js";
3
3
  export * as claimFromDocsSite from "./claimFromDocsSite.js";
4
+ export * as claimGithub from "./claimGithub.js";
4
5
  export * as create from "./create.js";
5
6
  export * as createClaimToken from "./createClaimToken.js";
6
7
  export * as delete from "./delete.js";
@@ -15,6 +16,7 @@ export * as getPublisherDocs from "./getPublisherDocs.js";
15
16
  export * as inviteUser from "./inviteUser.js";
16
17
  export * as isMember from "./isMember.js";
17
18
  export * as previewClaim from "./previewClaim.js";
19
+ export * as previewGithubClaim from "./previewGithubClaim.js";
18
20
  export * as removeUser from "./removeUser.js";
19
21
  export * from "./requests/index.js";
20
22
  export * as setDocsUrl from "./setDocsUrl.js";
@@ -36,10 +36,11 @@ 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.getPublisherDocs = 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;
39
+ exports.update = exports.setDocsUrl = exports.removeUser = exports.previewGithubClaim = exports.previewClaim = exports.isMember = exports.inviteUser = exports.getPublisherDocs = exports.getPostmanTeamIdByOrgId = exports.getPostmanTeamDocs = exports.getOrgIdsFromToken = exports.getOrgIdsByPostmanTeamId = exports.getMyOrganizationFromScopedToken = exports.getClaimStatus = exports.get = exports.delete = exports.createClaimToken = exports.create = exports.claimGithub = 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
42
  exports.claimFromDocsSite = __importStar(require("./claimFromDocsSite.js"));
43
+ exports.claimGithub = __importStar(require("./claimGithub.js"));
43
44
  exports.create = __importStar(require("./create.js"));
44
45
  exports.createClaimToken = __importStar(require("./createClaimToken.js"));
45
46
  exports.delete = __importStar(require("./delete.js"));
@@ -54,6 +55,7 @@ exports.getPublisherDocs = __importStar(require("./getPublisherDocs.js"));
54
55
  exports.inviteUser = __importStar(require("./inviteUser.js"));
55
56
  exports.isMember = __importStar(require("./isMember.js"));
56
57
  exports.previewClaim = __importStar(require("./previewClaim.js"));
58
+ exports.previewGithubClaim = __importStar(require("./previewGithubClaim.js"));
57
59
  exports.removeUser = __importStar(require("./removeUser.js"));
58
60
  __exportStar(require("./requests/index.js"), exports);
59
61
  exports.setDocsUrl = __importStar(require("./setDocsUrl.js"));
@@ -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.previewGithubClaim.Error.UnprocessableEntityError | FernVenusApi.organization.previewGithubClaim.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.previewGithubClaim.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.previewGithubClaim.Error.UnprocessableEntityError;
23
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.organization.previewGithubClaim.Error._Unknown;
24
+ readonly _visit: <_Result>(value: FernVenusApi.organization.previewGithubClaim.Error, visitor: FernVenusApi.organization.previewGithubClaim.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.previewGithubClaim.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.previewGithubClaim.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,11 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * organizationId: "organizationId",
5
+ * githubToken: "githubToken"
6
+ * }
7
+ */
8
+ export interface ClaimGithubOrganizationRequest {
9
+ organizationId: string;
10
+ githubToken: string;
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,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * organizationId: "organizationId"
5
+ * }
6
+ */
7
+ export interface GithubClaimPreviewRequest {
8
+ organizationId: string;
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 });
@@ -1,4 +1,5 @@
1
1
  export type { AddUserToOrgRequest } from "./AddUserToOrgRequest.js";
2
+ export type { ClaimGithubOrganizationRequest } from "./ClaimGithubOrganizationRequest.js";
2
3
  export type { CreateClaimTokenRequest } from "./CreateClaimTokenRequest.js";
3
4
  export type { CreateOrganizationRequest } from "./CreateOrganizationRequest.js";
4
5
  export type { DeleteOrganizationsOrgIdDeleteRequest } from "./DeleteOrganizationsOrgIdDeleteRequest.js";
@@ -9,6 +10,7 @@ export type { GetOrgIdsByPostmanTeamIdOrganizationsPostmanTeamPostmanTeamIdGetRe
9
10
  export type { GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest } from "./GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest.js";
10
11
  export type { GetPostmanTeamIdByOrgIdOrganizationsOrgIdPostmanTeamIdGetRequest } from "./GetPostmanTeamIdByOrgIdOrganizationsOrgIdPostmanTeamIdGetRequest.js";
11
12
  export type { GetPublisherDocsOrganizationsPublishersPublisherTypePublisherIdDocsGetRequest } from "./GetPublisherDocsOrganizationsPublishersPublisherTypePublisherIdDocsGetRequest.js";
13
+ export type { GithubClaimPreviewRequest } from "./GithubClaimPreviewRequest.js";
12
14
  export type { InviteUserToOrgRequest } from "./InviteUserToOrgRequest.js";
13
15
  export type { IsMemberOrganizationsBelongsToOrganizationOrganizationIdPostRequest } from "./IsMemberOrganizationsBelongsToOrganizationOrganizationIdPostRequest.js";
14
16
  export type { RemoveUserFromOrgRequest } from "./RemoveUserFromOrgRequest.js";
@@ -0,0 +1,7 @@
1
+ import type * as FernVenusApi from "../index.js";
2
+ export interface GithubClaimPreviewResponse {
3
+ organizationId: string;
4
+ displayName: string;
5
+ claimStatus: FernVenusApi.ClaimStatus;
6
+ repositoryId: string;
7
+ }
@@ -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 });
@@ -1,8 +1,9 @@
1
1
  import type * as FernVenusApi from "../index.js";
2
2
  /**
3
- * Who an unclaimed organization is held for: a Postman team, or a single
4
- * Postman user. Whoever the calling service verifies as the publisher can
5
- * get a claim link for it.
3
+ * Who an unclaimed organization is held for: a Postman team, a single
4
+ * Postman user, or a GitHub repository. Whoever the calling service verifies
5
+ * as a Postman publisher can get a claim link for it. A GitHub repository's
6
+ * organization can't be claimed yet.
6
7
  */
7
8
  export interface Publisher {
8
9
  type: FernVenusApi.PublisherType;
@@ -1,5 +1,6 @@
1
1
  export declare const PublisherType: {
2
2
  readonly PostmanTeam: "postman_team";
3
3
  readonly PostmanUser: "postman_user";
4
+ readonly GithubRepo: "github_repo";
4
5
  };
5
6
  export type PublisherType = (typeof PublisherType)[keyof typeof PublisherType];
@@ -5,4 +5,5 @@ exports.PublisherType = void 0;
5
5
  exports.PublisherType = {
6
6
  PostmanTeam: "postman_team",
7
7
  PostmanUser: "postman_user",
8
+ GithubRepo: "github_repo",
8
9
  };
@@ -15,6 +15,7 @@ export * from "./DeleteGuestSessionResponseStatus.js";
15
15
  export * from "./Expired.js";
16
16
  export * from "./GetGuestSessionResponse.js";
17
17
  export * from "./GetGuestSessionResponseStatus.js";
18
+ export * from "./GithubClaimPreviewResponse.js";
18
19
  export * from "./GoneErrorBody.js";
19
20
  export * from "./GoneErrorBodyContent.js";
20
21
  export * from "./GoneErrorBodyContentCode.js";
@@ -31,6 +31,7 @@ __exportStar(require("./DeleteGuestSessionResponseStatus.js"), exports);
31
31
  __exportStar(require("./Expired.js"), exports);
32
32
  __exportStar(require("./GetGuestSessionResponse.js"), exports);
33
33
  __exportStar(require("./GetGuestSessionResponseStatus.js"), exports);
34
+ __exportStar(require("./GithubClaimPreviewResponse.js"), exports);
34
35
  __exportStar(require("./GoneErrorBody.js"), exports);
35
36
  __exportStar(require("./GoneErrorBodyContent.js"), exports);
36
37
  __exportStar(require("./GoneErrorBodyContentCode.js"), exports);
@@ -0,0 +1,10 @@
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 ClaimGithubOrganizationRequest: core.serialization.Schema<serializers.ClaimGithubOrganizationRequest.Raw, FernVenusApi.ClaimGithubOrganizationRequest>;
5
+ export declare namespace ClaimGithubOrganizationRequest {
6
+ interface Raw {
7
+ organizationId: string;
8
+ githubToken: string;
9
+ }
10
+ }
@@ -0,0 +1,42 @@
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.ClaimGithubOrganizationRequest = void 0;
38
+ const core = __importStar(require("../../../../../core/index.js"));
39
+ exports.ClaimGithubOrganizationRequest = core.serialization.object({
40
+ organizationId: core.serialization.string(),
41
+ githubToken: core.serialization.string(),
42
+ });