Skip to content

Commit

Permalink
Merge pull request #147 from isimluk/swagger-update
Browse files Browse the repository at this point in the history
Re-generate the codebase using the latest swagger
  • Loading branch information
isimluk authored Dec 5, 2022
2 parents 52c0042 + c5615b6 commit 64a9f4c
Show file tree
Hide file tree
Showing 7 changed files with 452 additions and 1 deletion.
74 changes: 74 additions & 0 deletions src/apis/InstallationTokensSettingsApi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/* tslint:disable */
/* eslint-disable */
/**
* CrowdStrike API Specification
* Use this API specification as a reference for the API endpoints you can use to interact with your Falcon environment. These endpoints support authentication via OAuth2 and interact with detections and network containment. For detailed usage guides and more information about API endpoints that don\'t yet support OAuth2, see our [documentation inside the Falcon console](https://falcon.crowdstrike.com/support/documentation). To use the APIs described below, combine the base URL with the path shown for each API endpoint. For commercial cloud customers, your base URL is `https://api.crowdstrike.com`. Each API endpoint requires authorization via an OAuth2 token. Your first API request should retrieve an OAuth2 token using the `oauth2/token` endpoint, such as `https://api.crowdstrike.com/oauth2/token`. For subsequent requests, include the OAuth2 token in an HTTP authorization header. Tokens expire after 30 minutes, after which you should make a new token request to continue making API requests.
*
* The version of the OpenAPI document: rolling
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import * as runtime from "../runtime";
import type { ApiCustomerSettingsPatchRequestV1, MsaQueryResponse, MsaReplyMetaOnly } from "../models";
import {
ApiCustomerSettingsPatchRequestV1FromJSON,
ApiCustomerSettingsPatchRequestV1ToJSON,
MsaQueryResponseFromJSON,
MsaQueryResponseToJSON,
MsaReplyMetaOnlyFromJSON,
MsaReplyMetaOnlyToJSON,
} from "../models";

export interface CustomerSettingsUpdateRequest {
body: ApiCustomerSettingsPatchRequestV1;
}

/**
*
*/
export class InstallationTokensSettingsApi extends runtime.BaseAPI {
/**
* Update installation token settings.
*/
async customerSettingsUpdateRaw(requestParameters: CustomerSettingsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MsaQueryResponse>> {
if (requestParameters.body === null || requestParameters.body === undefined) {
throw new runtime.RequiredError("body", "Required parameter requestParameters.body was null or undefined when calling customerSettingsUpdate.");
}

const queryParameters: any = {};

const headerParameters: runtime.HTTPHeaders = {};

headerParameters["Content-Type"] = "application/json";

if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["installation-tokens-settings:write"]);
}

const response = await this.request(
{
path: `/installation-tokens/entities/customer-settings/v1`,
method: "PATCH",
headers: headerParameters,
query: queryParameters,
body: ApiCustomerSettingsPatchRequestV1ToJSON(requestParameters.body),
},
initOverrides
);

return new runtime.JSONApiResponse(response, (jsonValue) => MsaQueryResponseFromJSON(jsonValue));
}

/**
* Update installation token settings.
*/
async customerSettingsUpdate(body: ApiCustomerSettingsPatchRequestV1, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MsaQueryResponse> {
const response = await this.customerSettingsUpdateRaw({ body: body }, initOverrides);
return await response.value();
}
}
241 changes: 241 additions & 0 deletions src/apis/MsspApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import type {
MsaErrorsOnly,
MsaQueryResponse,
MsaReplyMetaOnly,
MsaspecIdsRequest,
MsaspecResponseFields,
} from "../models";
import {
DomainCIDGroupMembersRequestV1FromJSON,
Expand Down Expand Up @@ -61,6 +63,10 @@ import {
MsaQueryResponseToJSON,
MsaReplyMetaOnlyFromJSON,
MsaReplyMetaOnlyToJSON,
MsaspecIdsRequestFromJSON,
MsaspecIdsRequestToJSON,
MsaspecResponseFieldsFromJSON,
MsaspecResponseFieldsToJSON,
} from "../models";

export interface AddCIDGroupMembersRequest {
Expand Down Expand Up @@ -107,14 +113,26 @@ export interface GetCIDGroupByIdRequest {
cidGroupIds: Array<string>;
}

export interface GetCIDGroupByIdV2Request {
ids: Array<string>;
}

export interface GetCIDGroupMembersByRequest {
cidGroupIds: Array<string>;
}

export interface GetCIDGroupMembersByV2Request {
ids: Array<string>;
}

export interface GetChildrenRequest {
ids: Array<string>;
}

export interface GetChildrenV2Request {
body: MsaspecIdsRequest;
}

export interface GetRolesByIDRequest {
ids: Array<string>;
}
Expand All @@ -123,10 +141,18 @@ export interface GetUserGroupMembersByIDRequest {
userGroupIds: Array<string>;
}

export interface GetUserGroupMembersByIDV2Request {
ids: Array<string>;
}

export interface GetUserGroupsByIDRequest {
userGroupIds: Array<string>;
}

export interface GetUserGroupsByIDV2Request {
ids: Array<string>;
}

export interface QueryCIDGroupMembersRequest {
cid: string;
sort?: QueryCIDGroupMembersSortEnum;
Expand Down Expand Up @@ -648,6 +674,48 @@ export class MsspApi extends runtime.BaseAPI {
return await response.value();
}

/**
* Get CID Groups by ID. Identical to \'/entities/cid-groups/v1\' but accepts uniform \'ids\' parameter instead of \'cid_group_ids\'.
*/
async getCIDGroupByIdV2Raw(requestParameters: GetCIDGroupByIdV2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DomainCIDGroupsResponseV1>> {
if (requestParameters.ids === null || requestParameters.ids === undefined) {
throw new runtime.RequiredError("ids", "Required parameter requestParameters.ids was null or undefined when calling getCIDGroupByIdV2.");
}

const queryParameters: any = {};

if (requestParameters.ids) {
queryParameters["ids"] = requestParameters.ids;
}

const headerParameters: runtime.HTTPHeaders = {};

if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["mssp:read"]);
}

const response = await this.request(
{
path: `/mssp/entities/cid-groups/v2`,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides
);

return new runtime.JSONApiResponse(response, (jsonValue) => DomainCIDGroupsResponseV1FromJSON(jsonValue));
}

/**
* Get CID Groups by ID. Identical to \'/entities/cid-groups/v1\' but accepts uniform \'ids\' parameter instead of \'cid_group_ids\'.
*/
async getCIDGroupByIdV2(ids: Array<string>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DomainCIDGroupsResponseV1> {
const response = await this.getCIDGroupByIdV2Raw({ ids: ids }, initOverrides);
return await response.value();
}

/**
* Get CID group members by CID group ID.
*/
Expand Down Expand Up @@ -693,6 +761,51 @@ export class MsspApi extends runtime.BaseAPI {
return await response.value();
}

/**
* Get CID group members by CID Group ID. Identical to \'/entities/cid-group-members/v1\' but accepts uniform \'ids\' parameter instead of \'cid_group_ids\'.
*/
async getCIDGroupMembersByV2Raw(
requestParameters: GetCIDGroupMembersByV2Request,
initOverrides?: RequestInit | runtime.InitOverrideFunction
): Promise<runtime.ApiResponse<DomainCIDGroupMembersResponseV1>> {
if (requestParameters.ids === null || requestParameters.ids === undefined) {
throw new runtime.RequiredError("ids", "Required parameter requestParameters.ids was null or undefined when calling getCIDGroupMembersByV2.");
}

const queryParameters: any = {};

if (requestParameters.ids) {
queryParameters["ids"] = requestParameters.ids;
}

const headerParameters: runtime.HTTPHeaders = {};

if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["mssp:read"]);
}

const response = await this.request(
{
path: `/mssp/entities/cid-group-members/v2`,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides
);

return new runtime.JSONApiResponse(response, (jsonValue) => DomainCIDGroupMembersResponseV1FromJSON(jsonValue));
}

/**
* Get CID group members by CID Group ID. Identical to \'/entities/cid-group-members/v1\' but accepts uniform \'ids\' parameter instead of \'cid_group_ids\'.
*/
async getCIDGroupMembersByV2(ids: Array<string>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DomainCIDGroupMembersResponseV1> {
const response = await this.getCIDGroupMembersByV2Raw({ ids: ids }, initOverrides);
return await response.value();
}

/**
* Get link to child customer by child CID(s)
*/
Expand Down Expand Up @@ -735,6 +848,47 @@ export class MsspApi extends runtime.BaseAPI {
return await response.value();
}

/**
* Get link to child customer by child CID(s)
*/
async getChildrenV2Raw(requestParameters: GetChildrenV2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DomainChildrenResponseV1>> {
if (requestParameters.body === null || requestParameters.body === undefined) {
throw new runtime.RequiredError("body", "Required parameter requestParameters.body was null or undefined when calling getChildrenV2.");
}

const queryParameters: any = {};

const headerParameters: runtime.HTTPHeaders = {};

headerParameters["Content-Type"] = "application/json";

if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["mssp:write"]);
}

const response = await this.request(
{
path: `/mssp/entities/children/GET/v2`,
method: "POST",
headers: headerParameters,
query: queryParameters,
body: MsaspecIdsRequestToJSON(requestParameters.body),
},
initOverrides
);

return new runtime.JSONApiResponse(response, (jsonValue) => DomainChildrenResponseV1FromJSON(jsonValue));
}

/**
* Get link to child customer by child CID(s)
*/
async getChildrenV2(body: MsaspecIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DomainChildrenResponseV1> {
const response = await this.getChildrenV2Raw({ body: body }, initOverrides);
return await response.value();
}

/**
* Get MSSP Role assignment(s). MSSP Role assignment is of the format :.
*/
Expand Down Expand Up @@ -822,6 +976,51 @@ export class MsspApi extends runtime.BaseAPI {
return await response.value();
}

/**
* Get user group members by user group ID. Identical to \'/entities/user-group-members/v1\' but accepts uniform \'ids\' parameter instead of \'user_group_ids\'.
*/
async getUserGroupMembersByIDV2Raw(
requestParameters: GetUserGroupMembersByIDV2Request,
initOverrides?: RequestInit | runtime.InitOverrideFunction
): Promise<runtime.ApiResponse<DomainUserGroupMembersResponseV1>> {
if (requestParameters.ids === null || requestParameters.ids === undefined) {
throw new runtime.RequiredError("ids", "Required parameter requestParameters.ids was null or undefined when calling getUserGroupMembersByIDV2.");
}

const queryParameters: any = {};

if (requestParameters.ids) {
queryParameters["ids"] = requestParameters.ids;
}

const headerParameters: runtime.HTTPHeaders = {};

if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["mssp:read"]);
}

const response = await this.request(
{
path: `/mssp/entities/user-group-members/v2`,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides
);

return new runtime.JSONApiResponse(response, (jsonValue) => DomainUserGroupMembersResponseV1FromJSON(jsonValue));
}

/**
* Get user group members by user group ID. Identical to \'/entities/user-group-members/v1\' but accepts uniform \'ids\' parameter instead of \'user_group_ids\'.
*/
async getUserGroupMembersByIDV2(ids: Array<string>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DomainUserGroupMembersResponseV1> {
const response = await this.getUserGroupMembersByIDV2Raw({ ids: ids }, initOverrides);
return await response.value();
}

/**
* Get user groups by ID.
*/
Expand Down Expand Up @@ -864,6 +1063,48 @@ export class MsspApi extends runtime.BaseAPI {
return await response.value();
}

/**
* Get user groups by ID. Identical to \'/entities/user-groups/v1\' but accepts uniform \'ids\' parameter instead of \'user_group_ids\'.
*/
async getUserGroupsByIDV2Raw(requestParameters: GetUserGroupsByIDV2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DomainUserGroupsResponseV1>> {
if (requestParameters.ids === null || requestParameters.ids === undefined) {
throw new runtime.RequiredError("ids", "Required parameter requestParameters.ids was null or undefined when calling getUserGroupsByIDV2.");
}

const queryParameters: any = {};

if (requestParameters.ids) {
queryParameters["ids"] = requestParameters.ids;
}

const headerParameters: runtime.HTTPHeaders = {};

if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2", ["mssp:read"]);
}

const response = await this.request(
{
path: `/mssp/entities/user-groups/v2`,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides
);

return new runtime.JSONApiResponse(response, (jsonValue) => DomainUserGroupsResponseV1FromJSON(jsonValue));
}

/**
* Get user groups by ID. Identical to \'/entities/user-groups/v1\' but accepts uniform \'ids\' parameter instead of \'user_group_ids\'.
*/
async getUserGroupsByIDV2(ids: Array<string>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DomainUserGroupsResponseV1> {
const response = await this.getUserGroupsByIDV2Raw({ ids: ids }, initOverrides);
return await response.value();
}

/**
* Query a CID groups members by associated CID.
*/
Expand Down
1 change: 1 addition & 0 deletions src/apis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export * from "./HostsApi";
export * from "./IdentityProtectionApi";
export * from "./IncidentsApi";
export * from "./InstallationTokensApi";
export * from "./InstallationTokensSettingsApi";
export * from "./IntelApi";
export * from "./IoaExclusionsApi";
export * from "./IocApi";
Expand Down
Loading

0 comments on commit 64a9f4c

Please sign in to comment.