@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.
- package/api/resources/organization/client/Client.d.ts +2 -2
- package/api/resources/organization/client/Client.js +14 -2
- package/api/resources/organization/client/requests/CreateOrganizationRequest.d.ts +1 -0
- package/api/resources/organization/client/requests/GetMyOrganizationFromScopedToken.d.ts +6 -0
- package/api/resources/organization/client/requests/GetMyOrganizationFromScopedToken.js +5 -0
- package/api/resources/organization/client/requests/GetOrganizationRequest.d.ts +6 -0
- package/api/resources/organization/client/requests/GetOrganizationRequest.js +5 -0
- package/api/resources/organization/client/requests/index.d.ts +2 -0
- package/package.json +1 -1
- package/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.ts +1 -0
- package/serialization/resources/organization/client/requests/CreateOrganizationRequest.js +1 -0
|
@@ -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 {
|
|
@@ -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
|
@@ -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
|
});
|