/* tslint:disable */ /* eslint-disable */ /** * Identity Security Cloud API - Segments * Use these APIs to interact with the Identity Security Cloud platform to achieve repeatable, automated processes with greater scalability. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs. * * The version of the OpenAPI document: v1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; import type { RequestArgs } from './base'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; /** * * @export * @interface ErrorMessageDto */ export interface ErrorMessageDto { /** * The locale for the message text, a BCP 47 language tag. * @type {string} * @memberof ErrorMessageDto */ 'locale'?: string | null; /** * * @type {LocaleOrigin} * @memberof ErrorMessageDto */ 'localeOrigin'?: LocaleOrigin | null; /** * Actual text of the error message in the indicated locale. * @type {string} * @memberof ErrorMessageDto */ 'text'?: string; } /** * * @export * @interface ErrorResponseDto */ export interface ErrorResponseDto { /** * Fine-grained error code providing more detail of the error. * @type {string} * @memberof ErrorResponseDto */ 'detailCode'?: string; /** * Unique tracking id for the error. * @type {string} * @memberof ErrorResponseDto */ 'trackingId'?: string; /** * Generic localized reason for error * @type {Array} * @memberof ErrorResponseDto */ 'messages'?: Array; /** * Plain-text descriptive reasons to provide additional detail to the text provided in the messages field * @type {Array} * @memberof ErrorResponseDto */ 'causes'?: Array; } /** * * @export * @interface Expression */ export interface Expression { /** * Operator for the expression * @type {string} * @memberof Expression */ 'operator'?: ExpressionOperatorEnum; /** * Name for the attribute * @type {string} * @memberof Expression */ 'attribute'?: string | null; /** * * @type {Value} * @memberof Expression */ 'value'?: Value | null; /** * List of expressions * @type {Array} * @memberof Expression */ 'children'?: Array | null; } export const ExpressionOperatorEnum = { And: 'AND', Equals: 'EQUALS' } as const; export type ExpressionOperatorEnum = typeof ExpressionOperatorEnum[keyof typeof ExpressionOperatorEnum]; /** * * @export * @interface ExpressionChildrenInner */ export interface ExpressionChildrenInner { /** * Operator for the expression * @type {string} * @memberof ExpressionChildrenInner */ 'operator'?: ExpressionChildrenInnerOperatorEnum; /** * Name for the attribute * @type {string} * @memberof ExpressionChildrenInner */ 'attribute'?: string | null; /** * * @type {Value} * @memberof ExpressionChildrenInner */ 'value'?: Value | null; /** * There cannot be anymore nested children. This will always be null. * @type {string} * @memberof ExpressionChildrenInner */ 'children'?: string | null; } export const ExpressionChildrenInnerOperatorEnum = { And: 'AND', Equals: 'EQUALS' } as const; export type ExpressionChildrenInnerOperatorEnum = typeof ExpressionChildrenInnerOperatorEnum[keyof typeof ExpressionChildrenInnerOperatorEnum]; /** * * @export * @interface ListSegmentsV1401Response */ export interface ListSegmentsV1401Response { /** * A message describing the error * @type {any} * @memberof ListSegmentsV1401Response */ 'error'?: any; } /** * * @export * @interface ListSegmentsV1429Response */ export interface ListSegmentsV1429Response { /** * A message describing the error * @type {any} * @memberof ListSegmentsV1429Response */ 'message'?: any; } /** * An indicator of how the locale was selected. *DEFAULT* means the locale is the system default. *REQUEST* means the locale was selected from the request context (i.e., best match based on the *Accept-Language* header). Additional values may be added in the future without notice. * @export * @enum {string} */ export const LocaleOrigin = { Default: 'DEFAULT', Request: 'REQUEST' } as const; export type LocaleOrigin = typeof LocaleOrigin[keyof typeof LocaleOrigin]; /** * The owner of this object. * @export * @interface OwnerReferenceSegments */ export interface OwnerReferenceSegments { /** * Owner type. This field must be either left null or set to \'IDENTITY\' on input, otherwise a 400 Bad Request error will result. * @type {string} * @memberof OwnerReferenceSegments */ 'type'?: OwnerReferenceSegmentsTypeEnum; /** * Identity id * @type {string} * @memberof OwnerReferenceSegments */ 'id'?: string; /** * Human-readable display name of the owner. It may be left null or omitted in a POST or PATCH. If set, it must match the current value of the owner\'s display name, otherwise a 400 Bad Request error will result. * @type {string} * @memberof OwnerReferenceSegments */ 'name'?: string; } export const OwnerReferenceSegmentsTypeEnum = { Identity: 'IDENTITY' } as const; export type OwnerReferenceSegmentsTypeEnum = typeof OwnerReferenceSegmentsTypeEnum[keyof typeof OwnerReferenceSegmentsTypeEnum]; /** * * @export * @interface Segment */ export interface Segment { /** * The segment\'s ID. * @type {string} * @memberof Segment */ 'id'?: string; /** * The segment\'s business name. * @type {string} * @memberof Segment */ 'name'?: string; /** * The time when the segment is created. * @type {string} * @memberof Segment */ 'created'?: string; /** * The time when the segment is modified. * @type {string} * @memberof Segment */ 'modified'?: string; /** * The segment\'s optional description. * @type {string} * @memberof Segment */ 'description'?: string; /** * * @type {OwnerReferenceSegments} * @memberof Segment */ 'owner'?: OwnerReferenceSegments | null; /** * * @type {SegmentVisibilityCriteria} * @memberof Segment */ 'visibilityCriteria'?: SegmentVisibilityCriteria; /** * This boolean indicates whether the segment is currently active. Inactive segments have no effect. * @type {boolean} * @memberof Segment */ 'active'?: boolean; } /** * * @export * @interface SegmentVisibilityCriteria */ export interface SegmentVisibilityCriteria { /** * * @type {Expression} * @memberof SegmentVisibilityCriteria */ 'expression'?: Expression; } /** * * @export * @interface Value */ export interface Value { /** * The type of attribute value * @type {string} * @memberof Value */ 'type'?: string; /** * The attribute value * @type {string} * @memberof Value */ 'value'?: string; } /** * * @export * @interface VisibilityCriteria */ export interface VisibilityCriteria { /** * * @type {Expression} * @memberof VisibilityCriteria */ 'expression'?: Expression; } /** * SegmentsApi - axios parameter creator * @export */ export const SegmentsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This API creates a segment. >**Note:** Segment definitions may take time to propagate to all identities. * @summary Create segment * @param {Segment} segment * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ createSegmentV1: async (segment: Segment, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'segment' is not null or undefined assertParamExists('createSegmentV1', 'segment', segment) const localVarPath = `/segments/v1`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...axiosOptions}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers}; localVarRequestOptions.data = serializeDataIfNeeded(segment, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, /** * This API deletes the segment specified by the given ID. >**Note:** that segment deletion may take some time to become effective. * @summary Delete segment by id * @param {string} id The segment ID to delete. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ deleteSegmentV1: async (id: string, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('deleteSegmentV1', 'id', id) const localVarPath = `/segments/v1/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...axiosOptions}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers}; return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, /** * This API returns the segment specified by the given ID. * @summary Get segment by id * @param {string} id The segment ID to retrieve. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getSegmentV1: async (id: string, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getSegmentV1', 'id', id) const localVarPath = `/segments/v1/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers}; return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, /** * This API returns a list of all segments. * @summary List segments * @param {number} [limit] Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. * @param {number} [offset] Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. * @param {boolean} [count] If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ listSegmentsV1: async (limit?: number, offset?: number, count?: boolean, axiosOptions: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/segments/v1`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...axiosOptions}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (count !== undefined) { localVarQueryParameter['count'] = count; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers}; return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, /** * Use this API to update segment fields by using the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. >**Note:** Changes to a segment may take some time to propagate to all identities. * @summary Update segment * @param {string} id The segment ID to modify. * @param {Array} requestBody A list of segment update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields are patchable: * name * description * owner * visibilityCriteria * active * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ patchSegmentV1: async (id: string, requestBody: Array, axiosOptions: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('patchSegmentV1', 'id', id) // verify required parameter 'requestBody' is not null or undefined assertParamExists('patchSegmentV1', 'requestBody', requestBody) const localVarPath = `/segments/v1/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...axiosOptions}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...axiosOptions.headers}; localVarRequestOptions.data = serializeDataIfNeeded(requestBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), axiosOptions: localVarRequestOptions, }; }, } }; /** * SegmentsApi - functional programming interface * @export */ export const SegmentsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = SegmentsApiAxiosParamCreator(configuration) return { /** * This API creates a segment. >**Note:** Segment definitions may take time to propagate to all identities. * @summary Create segment * @param {Segment} segment * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async createSegmentV1(segment: Segment, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createSegmentV1(segment, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SegmentsApi.createSegmentV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This API deletes the segment specified by the given ID. >**Note:** that segment deletion may take some time to become effective. * @summary Delete segment by id * @param {string} id The segment ID to delete. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async deleteSegmentV1(id: string, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSegmentV1(id, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SegmentsApi.deleteSegmentV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This API returns the segment specified by the given ID. * @summary Get segment by id * @param {string} id The segment ID to retrieve. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async getSegmentV1(id: string, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSegmentV1(id, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SegmentsApi.getSegmentV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This API returns a list of all segments. * @summary List segments * @param {number} [limit] Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. * @param {number} [offset] Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. * @param {boolean} [count] If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async listSegmentsV1(limit?: number, offset?: number, count?: boolean, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.listSegmentsV1(limit, offset, count, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SegmentsApi.listSegmentsV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Use this API to update segment fields by using the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. >**Note:** Changes to a segment may take some time to propagate to all identities. * @summary Update segment * @param {string} id The segment ID to modify. * @param {Array} requestBody A list of segment update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields are patchable: * name * description * owner * visibilityCriteria * active * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ async patchSegmentV1(id: string, requestBody: Array, axiosOptions?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.patchSegmentV1(id, requestBody, axiosOptions); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SegmentsApi.patchSegmentV1']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * SegmentsApi - factory interface * @export */ export const SegmentsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = SegmentsApiFp(configuration) return { /** * This API creates a segment. >**Note:** Segment definitions may take time to propagate to all identities. * @summary Create segment * @param {SegmentsApiCreateSegmentV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ createSegmentV1(requestParameters: SegmentsApiCreateSegmentV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createSegmentV1(requestParameters.segment, axiosOptions).then((request) => request(axios, basePath)); }, /** * This API deletes the segment specified by the given ID. >**Note:** that segment deletion may take some time to become effective. * @summary Delete segment by id * @param {SegmentsApiDeleteSegmentV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ deleteSegmentV1(requestParameters: SegmentsApiDeleteSegmentV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteSegmentV1(requestParameters.id, axiosOptions).then((request) => request(axios, basePath)); }, /** * This API returns the segment specified by the given ID. * @summary Get segment by id * @param {SegmentsApiGetSegmentV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ getSegmentV1(requestParameters: SegmentsApiGetSegmentV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getSegmentV1(requestParameters.id, axiosOptions).then((request) => request(axios, basePath)); }, /** * This API returns a list of all segments. * @summary List segments * @param {SegmentsApiListSegmentsV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ listSegmentsV1(requestParameters: SegmentsApiListSegmentsV1Request = {}, axiosOptions?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.listSegmentsV1(requestParameters.limit, requestParameters.offset, requestParameters.count, axiosOptions).then((request) => request(axios, basePath)); }, /** * Use this API to update segment fields by using the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. >**Note:** Changes to a segment may take some time to propagate to all identities. * @summary Update segment * @param {SegmentsApiPatchSegmentV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} */ patchSegmentV1(requestParameters: SegmentsApiPatchSegmentV1Request, axiosOptions?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.patchSegmentV1(requestParameters.id, requestParameters.requestBody, axiosOptions).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for createSegmentV1 operation in SegmentsApi. * @export * @interface SegmentsApiCreateSegmentV1Request */ export interface SegmentsApiCreateSegmentV1Request { /** * * @type {Segment} * @memberof SegmentsApiCreateSegmentV1 */ readonly segment: Segment } /** * Request parameters for deleteSegmentV1 operation in SegmentsApi. * @export * @interface SegmentsApiDeleteSegmentV1Request */ export interface SegmentsApiDeleteSegmentV1Request { /** * The segment ID to delete. * @type {string} * @memberof SegmentsApiDeleteSegmentV1 */ readonly id: string } /** * Request parameters for getSegmentV1 operation in SegmentsApi. * @export * @interface SegmentsApiGetSegmentV1Request */ export interface SegmentsApiGetSegmentV1Request { /** * The segment ID to retrieve. * @type {string} * @memberof SegmentsApiGetSegmentV1 */ readonly id: string } /** * Request parameters for listSegmentsV1 operation in SegmentsApi. * @export * @interface SegmentsApiListSegmentsV1Request */ export interface SegmentsApiListSegmentsV1Request { /** * Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. * @type {number} * @memberof SegmentsApiListSegmentsV1 */ readonly limit?: number /** * Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. * @type {number} * @memberof SegmentsApiListSegmentsV1 */ readonly offset?: number /** * If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. * @type {boolean} * @memberof SegmentsApiListSegmentsV1 */ readonly count?: boolean } /** * Request parameters for patchSegmentV1 operation in SegmentsApi. * @export * @interface SegmentsApiPatchSegmentV1Request */ export interface SegmentsApiPatchSegmentV1Request { /** * The segment ID to modify. * @type {string} * @memberof SegmentsApiPatchSegmentV1 */ readonly id: string /** * A list of segment update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields are patchable: * name * description * owner * visibilityCriteria * active * @type {Array} * @memberof SegmentsApiPatchSegmentV1 */ readonly requestBody: Array } /** * SegmentsApi - object-oriented interface * @export * @class SegmentsApi * @extends {BaseAPI} */ export class SegmentsApi extends BaseAPI { /** * This API creates a segment. >**Note:** Segment definitions may take time to propagate to all identities. * @summary Create segment * @param {SegmentsApiCreateSegmentV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof SegmentsApi */ public createSegmentV1(requestParameters: SegmentsApiCreateSegmentV1Request, axiosOptions?: RawAxiosRequestConfig) { return SegmentsApiFp(this.configuration).createSegmentV1(requestParameters.segment, axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * This API deletes the segment specified by the given ID. >**Note:** that segment deletion may take some time to become effective. * @summary Delete segment by id * @param {SegmentsApiDeleteSegmentV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof SegmentsApi */ public deleteSegmentV1(requestParameters: SegmentsApiDeleteSegmentV1Request, axiosOptions?: RawAxiosRequestConfig) { return SegmentsApiFp(this.configuration).deleteSegmentV1(requestParameters.id, axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * This API returns the segment specified by the given ID. * @summary Get segment by id * @param {SegmentsApiGetSegmentV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof SegmentsApi */ public getSegmentV1(requestParameters: SegmentsApiGetSegmentV1Request, axiosOptions?: RawAxiosRequestConfig) { return SegmentsApiFp(this.configuration).getSegmentV1(requestParameters.id, axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * This API returns a list of all segments. * @summary List segments * @param {SegmentsApiListSegmentsV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof SegmentsApi */ public listSegmentsV1(requestParameters: SegmentsApiListSegmentsV1Request = {}, axiosOptions?: RawAxiosRequestConfig) { return SegmentsApiFp(this.configuration).listSegmentsV1(requestParameters.limit, requestParameters.offset, requestParameters.count, axiosOptions).then((request) => request(this.axios, this.basePath)); } /** * Use this API to update segment fields by using the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. >**Note:** Changes to a segment may take some time to propagate to all identities. * @summary Update segment * @param {SegmentsApiPatchSegmentV1Request} requestParameters Request parameters. * @param {*} [axiosOptions] Override http request option. * @throws {RequiredError} * @memberof SegmentsApi */ public patchSegmentV1(requestParameters: SegmentsApiPatchSegmentV1Request, axiosOptions?: RawAxiosRequestConfig) { return SegmentsApiFp(this.configuration).patchSegmentV1(requestParameters.id, requestParameters.requestBody, axiosOptions).then((request) => request(this.axios, this.basePath)); } }