@fern-api/venus-api-sdk 0.6.5-2-g78b22ef → 0.6.5-4-gdc534cf

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.
@@ -14,12 +14,12 @@ export declare class Organization {
14
14
  constructor(options: Organization.Options);
15
15
  create(request: FernVenusApi.CreateOrganizationRequest): Promise<core.APIResponse<void, FernVenusApi.organization.create.Error>>;
16
16
  update(orgId: FernVenusApi.OrganizationId, request?: FernVenusApi.UpdateOrganizationRequest): Promise<core.APIResponse<void, FernVenusApi.organization.update.Error>>;
17
- get(orgId: FernVenusApi.OrganizationId): Promise<core.APIResponse<FernVenusApi.Organization, FernVenusApi.organization.get.Error>>;
17
+ get(orgId: FernVenusApi.OrganizationId, request?: FernVenusApi.GetOrganizationRequest): Promise<core.APIResponse<FernVenusApi.Organization, FernVenusApi.organization.get.Error>>;
18
18
  isMember(organizationId: FernVenusApi.OrganizationId): Promise<core.APIResponse<boolean, FernVenusApi.organization.isMember.Error>>;
19
19
  /**
20
20
  * Returns the org for a scoped token. The token is limited to one organization.
21
21
  */
22
- getMyOrganizationFromScopedToken(): Promise<core.APIResponse<FernVenusApi.Organization, FernVenusApi.organization.getMyOrganizationFromScopedToken.Error>>;
22
+ getMyOrganizationFromScopedToken(request?: FernVenusApi.GetMyOrganizationFromScopedToken): Promise<core.APIResponse<FernVenusApi.Organization, FernVenusApi.organization.getMyOrganizationFromScopedToken.Error>>;
23
23
  getOrgIdsFromToken(): Promise<core.APIResponse<FernVenusApi.OrganizationId[], FernVenusApi.organization.getOrgIdsFromToken.Error>>;
24
24
  addUser(request: FernVenusApi.AddUserToOrgRequest): Promise<core.APIResponse<void, FernVenusApi.organization.addUser.Error>>;
25
25
  inviteUser(request: FernVenusApi.InviteUserToOrgRequest): Promise<core.APIResponse<void, FernVenusApi.organization.inviteUser.Error>>;
@@ -98,13 +98,19 @@ class Organization {
98
98
  error: venus_api_sdk_1.FernVenusApi.organization.update.Error._unknown(_response.error),
99
99
  };
100
100
  }
101
- async get(orgId) {
101
+ async get(orgId, request = {}) {
102
+ const { shouldIncludeFernUsers } = request;
103
+ const _queryParams = new URLSearchParams();
104
+ if (shouldIncludeFernUsers != null) {
105
+ _queryParams.append("shouldIncludeFernUsers", shouldIncludeFernUsers.toString());
106
+ }
102
107
  const _response = await core.fetcher({
103
108
  url: (0, url_join_1.default)(this.options.environment, `/organizations/${await serializers.OrganizationId.jsonOrThrow(orgId)}`),
104
109
  method: "GET",
105
110
  headers: {
106
111
  Authorization: core.BearerToken.toAuthorizationHeader(await core.Supplier.get(this.options.token)),
107
112
  },
113
+ queryParameters: _queryParams,
108
114
  });
109
115
  if (_response.ok) {
110
116
  return {
@@ -150,13 +156,19 @@ class Organization {
150
156
  /**
151
157
  * Returns the org for a scoped token. The token is limited to one organization.
152
158
  */
153
- async getMyOrganizationFromScopedToken() {
159
+ async getMyOrganizationFromScopedToken(request = {}) {
160
+ const { shouldIncludeFernUsers } = request;
161
+ const _queryParams = new URLSearchParams();
162
+ if (shouldIncludeFernUsers != null) {
163
+ _queryParams.append("shouldIncludeFernUsers", shouldIncludeFernUsers.toString());
164
+ }
154
165
  const _response = await core.fetcher({
155
166
  url: (0, url_join_1.default)(this.options.environment, "/organizations/myself"),
156
167
  method: "POST",
157
168
  headers: {
158
169
  Authorization: core.BearerToken.toAuthorizationHeader(await core.Supplier.get(this.options.token)),
159
170
  },
171
+ queryParameters: _queryParams,
160
172
  });
161
173
  if (_response.ok) {
162
174
  return {
@@ -5,4 +5,5 @@ import { FernVenusApi } from "../../../../..";
5
5
  export interface CreateOrganizationRequest {
6
6
  organizationId: FernVenusApi.OrganizationId;
7
7
  artifactReadRequiresToken?: boolean;
8
+ enableGithubConnection?: boolean;
8
9
  }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface GetMyOrganizationFromScopedToken {
5
+ shouldIncludeFernUsers?: boolean;
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface GetOrganizationRequest {
5
+ shouldIncludeFernUsers?: boolean;
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,7 @@
1
1
  export { CreateOrganizationRequest } from "./CreateOrganizationRequest";
2
2
  export { UpdateOrganizationRequest } from "./UpdateOrganizationRequest";
3
+ export { GetOrganizationRequest } from "./GetOrganizationRequest";
4
+ export { GetMyOrganizationFromScopedToken } from "./GetMyOrganizationFromScopedToken";
3
5
  export { AddUserToOrgRequest } from "./AddUserToOrgRequest";
4
6
  export { InviteUserToOrgRequest } from "./InviteUserToOrgRequest";
5
7
  export { RemoveUserFromOrgRequest } from "./RemoveUserFromOrgRequest";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fern-api/venus-api-sdk",
3
- "version": "0.6.5-2-g78b22ef",
3
+ "version": "0.6.5-4-gdc534cf",
4
4
  "private": false,
5
5
  "files": [
6
6
  "Client.d.ts",
@@ -9,5 +9,6 @@ export declare namespace CreateOrganizationRequest {
9
9
  interface Raw {
10
10
  organizationId: serializers.OrganizationId.Raw;
11
11
  artifactReadRequiresToken?: boolean | null;
12
+ enableGithubConnection?: boolean | null;
12
13
  }
13
14
  }
@@ -31,4 +31,5 @@ const core = __importStar(require("../../../../../core"));
31
31
  exports.CreateOrganizationRequest = core.serialization.object({
32
32
  organizationId: core.serialization.lazy(async () => (await Promise.resolve().then(() => __importStar(require("../../../..")))).OrganizationId),
33
33
  artifactReadRequiresToken: core.serialization.boolean().optional(),
34
+ enableGithubConnection: core.serialization.boolean().optional(),
34
35
  });