@fern-api/venus-api-sdk 15.1.0 → 15.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.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/internalGuestSession/client/requests/SettleRequest.d.ts +1 -0
- package/dist/cjs/api/resources/organization/client/Client.d.ts +34 -0
- package/dist/cjs/api/resources/organization/client/Client.js +172 -0
- package/dist/cjs/api/resources/organization/client/claimGithub.d.ts +25 -0
- package/dist/cjs/api/resources/organization/client/claimGithub.js +66 -0
- package/dist/cjs/api/resources/organization/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/organization/client/index.js +3 -1
- package/dist/cjs/api/resources/organization/client/previewGithubClaim.d.ts +25 -0
- package/dist/cjs/api/resources/organization/client/previewGithubClaim.js +66 -0
- package/dist/cjs/api/resources/organization/client/requests/ClaimGithubOrganizationRequest.d.ts +11 -0
- package/dist/cjs/api/resources/organization/client/requests/ClaimGithubOrganizationRequest.js +3 -0
- package/dist/cjs/api/resources/organization/client/requests/GithubClaimPreviewRequest.d.ts +9 -0
- package/dist/cjs/api/resources/organization/client/requests/GithubClaimPreviewRequest.js +3 -0
- package/dist/cjs/api/resources/organization/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/types/GithubClaimPreviewResponse.d.ts +7 -0
- package/dist/cjs/api/types/GithubClaimPreviewResponse.js +3 -0
- package/dist/cjs/api/types/SettleArtifact.d.ts +12 -0
- package/dist/cjs/api/types/SettleArtifact.js +3 -0
- package/dist/cjs/api/types/index.d.ts +2 -0
- package/dist/cjs/api/types/index.js +2 -0
- package/dist/cjs/serialization/resources/internalGuestSession/client/requests/SettleRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/internalGuestSession/client/requests/SettleRequest.js +2 -0
- package/dist/cjs/serialization/resources/organization/client/requests/ClaimGithubOrganizationRequest.d.ts +10 -0
- package/dist/cjs/serialization/resources/organization/client/requests/ClaimGithubOrganizationRequest.js +42 -0
- package/dist/cjs/serialization/resources/organization/client/requests/GithubClaimPreviewRequest.d.ts +9 -0
- package/dist/cjs/serialization/resources/organization/client/requests/GithubClaimPreviewRequest.js +41 -0
- package/dist/cjs/serialization/resources/organization/client/requests/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/organization/client/requests/index.js +5 -1
- package/dist/cjs/serialization/types/GithubClaimPreviewResponse.d.ts +13 -0
- package/dist/cjs/serialization/types/GithubClaimPreviewResponse.js +45 -0
- package/dist/cjs/serialization/types/SettleArtifact.d.ts +12 -0
- package/dist/cjs/serialization/types/SettleArtifact.js +44 -0
- package/dist/cjs/serialization/types/index.d.ts +2 -0
- package/dist/cjs/serialization/types/index.js +2 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/internalGuestSession/client/requests/SettleRequest.d.mts +1 -0
- package/dist/esm/api/resources/organization/client/Client.d.mts +34 -0
- package/dist/esm/api/resources/organization/client/Client.mjs +172 -0
- package/dist/esm/api/resources/organization/client/claimGithub.d.mts +25 -0
- package/dist/esm/api/resources/organization/client/claimGithub.mjs +30 -0
- package/dist/esm/api/resources/organization/client/index.d.mts +2 -0
- package/dist/esm/api/resources/organization/client/index.mjs +2 -0
- package/dist/esm/api/resources/organization/client/previewGithubClaim.d.mts +25 -0
- package/dist/esm/api/resources/organization/client/previewGithubClaim.mjs +30 -0
- package/dist/esm/api/resources/organization/client/requests/ClaimGithubOrganizationRequest.d.mts +11 -0
- package/dist/esm/api/resources/organization/client/requests/ClaimGithubOrganizationRequest.mjs +2 -0
- package/dist/esm/api/resources/organization/client/requests/GithubClaimPreviewRequest.d.mts +9 -0
- package/dist/esm/api/resources/organization/client/requests/GithubClaimPreviewRequest.mjs +2 -0
- package/dist/esm/api/resources/organization/client/requests/index.d.mts +2 -0
- package/dist/esm/api/types/GithubClaimPreviewResponse.d.mts +7 -0
- package/dist/esm/api/types/GithubClaimPreviewResponse.mjs +2 -0
- package/dist/esm/api/types/SettleArtifact.d.mts +12 -0
- package/dist/esm/api/types/SettleArtifact.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +2 -0
- package/dist/esm/api/types/index.mjs +2 -0
- package/dist/esm/serialization/resources/internalGuestSession/client/requests/SettleRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/internalGuestSession/client/requests/SettleRequest.mjs +2 -0
- package/dist/esm/serialization/resources/organization/client/requests/ClaimGithubOrganizationRequest.d.mts +10 -0
- package/dist/esm/serialization/resources/organization/client/requests/ClaimGithubOrganizationRequest.mjs +6 -0
- package/dist/esm/serialization/resources/organization/client/requests/GithubClaimPreviewRequest.d.mts +9 -0
- package/dist/esm/serialization/resources/organization/client/requests/GithubClaimPreviewRequest.mjs +5 -0
- package/dist/esm/serialization/resources/organization/client/requests/index.d.mts +2 -0
- package/dist/esm/serialization/resources/organization/client/requests/index.mjs +2 -0
- package/dist/esm/serialization/types/GithubClaimPreviewResponse.d.mts +13 -0
- package/dist/esm/serialization/types/GithubClaimPreviewResponse.mjs +9 -0
- package/dist/esm/serialization/types/SettleArtifact.d.mts +12 -0
- package/dist/esm/serialization/types/SettleArtifact.mjs +8 -0
- package/dist/esm/serialization/types/index.d.mts +2 -0
- package/dist/esm/serialization/types/index.mjs +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +138 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "15.
|
|
47
|
-
"User-Agent": "@fern-api/venus-api-sdk/15.
|
|
46
|
+
"X-Fern-SDK-Version": "15.3.0",
|
|
47
|
+
"User-Agent": "@fern-api/venus-api-sdk/15.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);
|
|
@@ -231,6 +231,40 @@ export declare class OrganizationClient {
|
|
|
231
231
|
*/
|
|
232
232
|
claimFromDocsSite(request: FernVenusApi.ClaimOrganizationRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.ClaimOrganizationResponse, FernVenusApi.organization.claimFromDocsSite.Error>>;
|
|
233
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;
|
|
234
268
|
/**
|
|
235
269
|
* @param {FernVenusApi.IsMemberOrganizationsBelongsToOrganizationOrganizationIdPostRequest} request
|
|
236
270
|
* @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1204,6 +1204,178 @@ class OrganizationClient {
|
|
|
1204
1204
|
};
|
|
1205
1205
|
});
|
|
1206
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
|
+
}
|
|
1207
1379
|
/**
|
|
1208
1380
|
* @param {FernVenusApi.IsMemberOrganizationsBelongsToOrganizationOrganizationIdPostRequest} request
|
|
1209
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
|
+
};
|
|
@@ -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,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the settling service built, echoed on the ``guest.*`` event so
|
|
3
|
+
* usage pages can list the docs site or SDK and not just the session.
|
|
4
|
+
* Nothing here is secret: the docs URL is public and the SDK name is the
|
|
5
|
+
* one the guest typed.
|
|
6
|
+
*/
|
|
7
|
+
export interface SettleArtifact {
|
|
8
|
+
docsUrl?: string | null;
|
|
9
|
+
sdkName?: string | null;
|
|
10
|
+
language?: string | null;
|
|
11
|
+
buildId?: string | null;
|
|
12
|
+
}
|
|
@@ -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";
|
|
@@ -51,6 +52,7 @@ export * from "./Revoked.js";
|
|
|
51
52
|
export * from "./ServiceUnavailableErrorBody.js";
|
|
52
53
|
export * from "./ServiceUnavailableErrorBodyContent.js";
|
|
53
54
|
export * from "./ServiceUnavailableErrorBodyContentCode.js";
|
|
55
|
+
export * from "./SettleArtifact.js";
|
|
54
56
|
export * from "./SettleResponse.js";
|
|
55
57
|
export * from "./SettleResponseReason.js";
|
|
56
58
|
export * from "./TokenMetadata.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);
|
|
@@ -67,6 +68,7 @@ __exportStar(require("./Revoked.js"), exports);
|
|
|
67
68
|
__exportStar(require("./ServiceUnavailableErrorBody.js"), exports);
|
|
68
69
|
__exportStar(require("./ServiceUnavailableErrorBodyContent.js"), exports);
|
|
69
70
|
__exportStar(require("./ServiceUnavailableErrorBodyContentCode.js"), exports);
|
|
71
|
+
__exportStar(require("./SettleArtifact.js"), exports);
|
|
70
72
|
__exportStar(require("./SettleResponse.js"), exports);
|
|
71
73
|
__exportStar(require("./SettleResponseReason.js"), exports);
|
|
72
74
|
__exportStar(require("./TokenMetadata.js"), exports);
|
package/dist/cjs/serialization/resources/internalGuestSession/client/requests/SettleRequest.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type * as FernVenusApi from "../../../../../api/index.js";
|
|
2
2
|
import * as core from "../../../../../core/index.js";
|
|
3
3
|
import type * as serializers from "../../../../index.js";
|
|
4
|
+
import { SettleArtifact } from "../../../../types/SettleArtifact.js";
|
|
4
5
|
import { SettleRequestOutcome } from "../../types/SettleRequestOutcome.js";
|
|
5
6
|
export declare const SettleRequest: core.serialization.Schema<serializers.SettleRequest.Raw, Omit<FernVenusApi.SettleRequest, "sessionId">>;
|
|
6
7
|
export declare namespace SettleRequest {
|
|
7
8
|
interface Raw {
|
|
8
9
|
reservationId: string;
|
|
9
10
|
outcome: SettleRequestOutcome.Raw;
|
|
11
|
+
artifact?: (SettleArtifact.Raw | null | undefined) | null;
|
|
10
12
|
}
|
|
11
13
|
}
|
package/dist/cjs/serialization/resources/internalGuestSession/client/requests/SettleRequest.js
CHANGED
|
@@ -36,8 +36,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.SettleRequest = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../../core/index.js"));
|
|
39
|
+
const SettleArtifact_js_1 = require("../../../../types/SettleArtifact.js");
|
|
39
40
|
const SettleRequestOutcome_js_1 = require("../../types/SettleRequestOutcome.js");
|
|
40
41
|
exports.SettleRequest = core.serialization.object({
|
|
41
42
|
reservationId: core.serialization.string(),
|
|
42
43
|
outcome: SettleRequestOutcome_js_1.SettleRequestOutcome,
|
|
44
|
+
artifact: SettleArtifact_js_1.SettleArtifact.optionalNullable(),
|
|
43
45
|
});
|
|
@@ -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
|
+
}
|