@fern-api/venus-api-sdk 11.6.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.
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
46
- "X-Fern-SDK-Version": "11.6.0",
47
- "User-Agent": "@fern-api/venus-api-sdk/11.6.0",
46
+ "X-Fern-SDK-Version": "11.7.0",
47
+ "User-Agent": "@fern-api/venus-api-sdk/11.7.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);
@@ -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
  *
@@ -229,6 +229,10 @@ class ApiKeysClient {
229
229
  });
230
230
  }
231
231
  /**
232
+ * Lists an organization's API keys. Called with the provisioner token, it
233
+ * only works for an unclaimed organization that was created with that
234
+ * token, and returns 403 for any other.
235
+ *
232
236
  * @param {FernVenusApi.GetTokensForOrganizationApiKeysOrganizationOrganizationIdGetRequest} request
233
237
  * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
234
238
  *
@@ -304,6 +308,11 @@ class ApiKeysClient {
304
308
  });
305
309
  }
306
310
  /**
311
+ * Revokes an API key by its ID. Called with the provisioner token,
312
+ * organizationId is required and must be an unclaimed organization that
313
+ * was created with that token (403 otherwise), and the key must be that
314
+ * organization's (401 otherwise). Other callers don't need organizationId.
315
+ *
307
316
  * @param {FernVenusApi.RevokeTokenByIdApiKeysRevokeTokenIdPostRequest} request
308
317
  * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
309
318
  *
@@ -318,14 +327,17 @@ class ApiKeysClient {
318
327
  __revokeTokenById(request, requestOptions) {
319
328
  return __awaiter(this, void 0, void 0, function* () {
320
329
  var _a, _b, _c, _d, _e, _f, _g, _h;
321
- const { tokenId } = request;
330
+ const { tokenId, organizationId } = request;
331
+ const _queryParams = {
332
+ organizationId,
333
+ };
322
334
  const _authRequest = yield this._options.authProvider.getAuthRequest();
323
335
  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);
324
336
  const _response = yield core.fetcher({
325
337
  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)}`),
326
338
  method: "POST",
327
339
  headers: _headers,
328
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
340
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
329
341
  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,
330
342
  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,
331
343
  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.
@@ -306,6 +306,9 @@ class OrganizationClient {
306
306
  }
307
307
  /**
308
308
  * Deletes an organization. Only users with admin role can delete organizations.
309
+ * Called with the provisioner token, it only works for an unclaimed
310
+ * organization that was created with that token, and returns 403 for any
311
+ * other. It also revokes that organization's API keys.
309
312
  *
310
313
  * @param {FernVenusApi.DeleteOrganizationsOrgIdDeleteRequest} request
311
314
  * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "11.6.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.6.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.6.0",
10
- "User-Agent": "@fern-api/venus-api-sdk/11.6.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.
@@ -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.
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "11.6.0";
1
+ export declare const SDK_VERSION = "11.7.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "11.6.0";
1
+ export const SDK_VERSION = "11.7.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fern-api/venus-api-sdk",
3
- "version": "11.6.0",
3
+ "version": "11.7.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -267,6 +267,22 @@ await client.apiKeys.getTokenMetadata({
267
267
  <dl>
268
268
  <dd>
269
269
 
270
+ #### 📝 Description
271
+
272
+ <dl>
273
+ <dd>
274
+
275
+ <dl>
276
+ <dd>
277
+
278
+ Lists an organization's API keys. Called with the provisioner token, it
279
+ only works for an unclaimed organization that was created with that
280
+ token, and returns 403 for any other.
281
+ </dd>
282
+ </dl>
283
+ </dd>
284
+ </dl>
285
+
270
286
  #### 🔌 Usage
271
287
 
272
288
  <dl>
@@ -318,6 +334,23 @@ await client.apiKeys.getTokensForOrganization({
318
334
  <dl>
319
335
  <dd>
320
336
 
337
+ #### 📝 Description
338
+
339
+ <dl>
340
+ <dd>
341
+
342
+ <dl>
343
+ <dd>
344
+
345
+ Revokes an API key by its ID. Called with the provisioner token,
346
+ organizationId is required and must be an unclaimed organization that
347
+ was created with that token (403 otherwise), and the key must be that
348
+ organization's (401 otherwise). Other callers don't need organizationId.
349
+ </dd>
350
+ </dl>
351
+ </dd>
352
+ </dl>
353
+
321
354
  #### 🔌 Usage
322
355
 
323
356
  <dl>
@@ -929,6 +962,9 @@ await client.organization.get({
929
962
  <dd>
930
963
 
931
964
  Deletes an organization. Only users with admin role can delete organizations.
965
+ Called with the provisioner token, it only works for an unclaimed
966
+ organization that was created with that token, and returns 403 for any
967
+ other. It also revokes that organization's API keys.
932
968
  </dd>
933
969
  </dl>
934
970
  </dd>