Skip to content

Commit a6d3dab

Browse files
Predefined variations (#13)
* regenerate * 3.1.0
1 parent 0419ea4 commit a6d3dab

24 files changed

Lines changed: 590 additions & 27 deletions

.openapi-generator/FILES

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ model/create-environment-model.ts
4848
model/create-integration-model.ts
4949
model/create-or-update-environment-access-model.ts
5050
model/create-permission-group-request.ts
51+
model/create-predefined-variation-model.ts
52+
model/create-predefined-variation-value-model.ts
5153
model/create-product-request.ts
5254
model/create-segment-model.ts
5355
model/create-setting-initial-values.ts
@@ -88,6 +90,8 @@ model/organization-permission-model.ts
8890
model/organization-product-model.ts
8991
model/percentage-option-model.ts
9092
model/permission-group-model.ts
93+
model/predefined-variation-model.ts
94+
model/predefined-variation-value-model.ts
9195
model/preferences-model.ts
9296
model/prerequisite-comparator.ts
9397
model/prerequisite-flag-condition-model.ts
@@ -107,6 +111,7 @@ model/segment-condition-model.ts
107111
model/segment-list-model.ts
108112
model/segment-model.ts
109113
model/setting-data-model.ts
114+
model/setting-data-v2-model.ts
110115
model/setting-formula-model.ts
111116
model/setting-model.ts
112117
model/setting-tag-model.ts
@@ -134,6 +139,9 @@ model/update-evaluation-formulas-model.ts
134139
model/update-member-permissions-request.ts
135140
model/update-percentage-option-model.ts
136141
model/update-permission-group-request.ts
142+
model/update-predefined-variation-model.ts
143+
model/update-predefined-variation-value-model.ts
144+
model/update-predefined-variations-request.ts
137145
model/update-preferences-request.ts
138146
model/update-prerequisite-flag-condition-model.ts
139147
model/update-product-request.ts

api/feature-flags-settings-api.ts

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ import { JsonPatchOperation } from '../model';
2929
import { ReplaceSettingModel } from '../model';
3030
// @ts-ignore
3131
import { SettingModel } from '../model';
32+
// @ts-ignore
33+
import { UpdatePredefinedVariationsRequest } from '../model';
3234
/**
3335
* FeatureFlagsSettingsApi - axios parameter creator
3436
* @export
@@ -237,6 +239,50 @@ export const FeatureFlagsSettingsApiAxiosParamCreator = function (configuration?
237239
options: localVarRequestOptions,
238240
};
239241
},
242+
/**
243+
* This endpoint updates the predefined variations for a Feature Flag or Setting identified by the `settingId` parameter. **Important:** You can only update a predefined variation\'s value if it is not used anywhere in your feature flags. **Beta feature:** The feature is currently in closed beta state and cannot be used.
244+
* @summary Update predefined variations (Beta)
245+
* @param {number} settingId The identifier of the Setting.
246+
* @param {UpdatePredefinedVariationsRequest} updatePredefinedVariationsRequest
247+
* @param {*} [options] Override http request option.
248+
* @throws {RequiredError}
249+
*/
250+
updatePredefinedVariations: async (settingId: number, updatePredefinedVariationsRequest: UpdatePredefinedVariationsRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
251+
// verify required parameter 'settingId' is not null or undefined
252+
assertParamExists('updatePredefinedVariations', 'settingId', settingId)
253+
// verify required parameter 'updatePredefinedVariationsRequest' is not null or undefined
254+
assertParamExists('updatePredefinedVariations', 'updatePredefinedVariationsRequest', updatePredefinedVariationsRequest)
255+
const localVarPath = `/v1/settings/{settingId}/predefined-variations`
256+
.replace(`{${"settingId"}}`, encodeURIComponent(String(settingId)));
257+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
258+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
259+
let baseOptions;
260+
if (configuration) {
261+
baseOptions = configuration.baseOptions;
262+
}
263+
264+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
265+
const localVarHeaderParameter = {} as any;
266+
const localVarQueryParameter = {} as any;
267+
268+
// authentication Basic required
269+
// http basic authentication required
270+
setBasicAuthToObject(localVarRequestOptions, configuration)
271+
272+
273+
274+
localVarHeaderParameter['Content-Type'] = 'application/json';
275+
276+
setSearchParams(localVarUrlObj, localVarQueryParameter);
277+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
278+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
279+
localVarRequestOptions.data = serializeDataIfNeeded(updatePredefinedVariationsRequest, localVarRequestOptions, configuration)
280+
281+
return {
282+
url: toPathString(localVarUrlObj),
283+
options: localVarRequestOptions,
284+
};
285+
},
240286
/**
241287
* This endpoint updates the metadata of a Feature Flag or Setting with a collection of [JSON Patch](https://jsonpatch.com) operations in a specified Config. Only the `name`, `hint` and `tags` attributes are modifiable by this endpoint. The `tags` attribute is a simple collection of the [tag IDs](#operation/get-tags) attached to the given setting. The advantage of using JSON Patch is that you can describe individual update operations on a resource without touching attributes that you don\'t want to change. For example: We have the following resource. ```json { \"settingId\": 5345, \"key\": \"myGrandFeature\", \"name\": \"Tihs is a naem with soem typos.\", \"hint\": \"This flag controls my grandioso feature.\", \"settingType\": \"boolean\", \"tags\": [ { \"tagId\": 0, \"name\": \"sample tag\", \"color\": \"whale\" } ] } ``` If we send an update request body as below (it changes the `name` and adds the already existing tag with the id `2`): ```json [ { \"op\": \"replace\", \"path\": \"/name\", \"value\": \"This is the name without typos.\" }, { \"op\": \"add\", \"path\": \"/tags/-\", \"value\": 2 } ] ``` Only the `name` and `tags` are updated and all the other attributes remain unchanged. So we get a response like this: ```json { \"settingId\": 5345, \"key\": \"myGrandFeature\", \"name\": \"This is the name without typos.\", \"hint\": \"This flag controls my grandioso feature.\", \"settingType\": \"boolean\", \"tags\": [ { \"tagId\": 0, \"name\": \"sample tag\", \"color\": \"whale\" }, { \"tagId\": 2, \"name\": \"another tag\", \"color\": \"koala\" } ] } ```
242288
* @summary Update Flag
@@ -358,6 +404,20 @@ export const FeatureFlagsSettingsApiFp = function(configuration?: Configuration)
358404
const localVarOperationServerBasePath = operationServerMap['FeatureFlagsSettingsApi.replaceSetting']?.[localVarOperationServerIndex]?.url;
359405
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
360406
},
407+
/**
408+
* This endpoint updates the predefined variations for a Feature Flag or Setting identified by the `settingId` parameter. **Important:** You can only update a predefined variation\'s value if it is not used anywhere in your feature flags. **Beta feature:** The feature is currently in closed beta state and cannot be used.
409+
* @summary Update predefined variations (Beta)
410+
* @param {number} settingId The identifier of the Setting.
411+
* @param {UpdatePredefinedVariationsRequest} updatePredefinedVariationsRequest
412+
* @param {*} [options] Override http request option.
413+
* @throws {RequiredError}
414+
*/
415+
async updatePredefinedVariations(settingId: number, updatePredefinedVariationsRequest: UpdatePredefinedVariationsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SettingModel>> {
416+
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePredefinedVariations(settingId, updatePredefinedVariationsRequest, options);
417+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
418+
const localVarOperationServerBasePath = operationServerMap['FeatureFlagsSettingsApi.updatePredefinedVariations']?.[localVarOperationServerIndex]?.url;
419+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
420+
},
361421
/**
362422
* This endpoint updates the metadata of a Feature Flag or Setting with a collection of [JSON Patch](https://jsonpatch.com) operations in a specified Config. Only the `name`, `hint` and `tags` attributes are modifiable by this endpoint. The `tags` attribute is a simple collection of the [tag IDs](#operation/get-tags) attached to the given setting. The advantage of using JSON Patch is that you can describe individual update operations on a resource without touching attributes that you don\'t want to change. For example: We have the following resource. ```json { \"settingId\": 5345, \"key\": \"myGrandFeature\", \"name\": \"Tihs is a naem with soem typos.\", \"hint\": \"This flag controls my grandioso feature.\", \"settingType\": \"boolean\", \"tags\": [ { \"tagId\": 0, \"name\": \"sample tag\", \"color\": \"whale\" } ] } ``` If we send an update request body as below (it changes the `name` and adds the already existing tag with the id `2`): ```json [ { \"op\": \"replace\", \"path\": \"/name\", \"value\": \"This is the name without typos.\" }, { \"op\": \"add\", \"path\": \"/tags/-\", \"value\": 2 } ] ``` Only the `name` and `tags` are updated and all the other attributes remain unchanged. So we get a response like this: ```json { \"settingId\": 5345, \"key\": \"myGrandFeature\", \"name\": \"This is the name without typos.\", \"hint\": \"This flag controls my grandioso feature.\", \"settingType\": \"boolean\", \"tags\": [ { \"tagId\": 0, \"name\": \"sample tag\", \"color\": \"whale\" }, { \"tagId\": 2, \"name\": \"another tag\", \"color\": \"koala\" } ] } ```
363423
* @summary Update Flag
@@ -434,6 +494,17 @@ export const FeatureFlagsSettingsApiFactory = function (configuration?: Configur
434494
replaceSetting(settingId: number, replaceSettingModel: ReplaceSettingModel, options?: any): AxiosPromise<SettingModel> {
435495
return localVarFp.replaceSetting(settingId, replaceSettingModel, options).then((request) => request(axios, basePath));
436496
},
497+
/**
498+
* This endpoint updates the predefined variations for a Feature Flag or Setting identified by the `settingId` parameter. **Important:** You can only update a predefined variation\'s value if it is not used anywhere in your feature flags. **Beta feature:** The feature is currently in closed beta state and cannot be used.
499+
* @summary Update predefined variations (Beta)
500+
* @param {number} settingId The identifier of the Setting.
501+
* @param {UpdatePredefinedVariationsRequest} updatePredefinedVariationsRequest
502+
* @param {*} [options] Override http request option.
503+
* @throws {RequiredError}
504+
*/
505+
updatePredefinedVariations(settingId: number, updatePredefinedVariationsRequest: UpdatePredefinedVariationsRequest, options?: any): AxiosPromise<SettingModel> {
506+
return localVarFp.updatePredefinedVariations(settingId, updatePredefinedVariationsRequest, options).then((request) => request(axios, basePath));
507+
},
437508
/**
438509
* This endpoint updates the metadata of a Feature Flag or Setting with a collection of [JSON Patch](https://jsonpatch.com) operations in a specified Config. Only the `name`, `hint` and `tags` attributes are modifiable by this endpoint. The `tags` attribute is a simple collection of the [tag IDs](#operation/get-tags) attached to the given setting. The advantage of using JSON Patch is that you can describe individual update operations on a resource without touching attributes that you don\'t want to change. For example: We have the following resource. ```json { \"settingId\": 5345, \"key\": \"myGrandFeature\", \"name\": \"Tihs is a naem with soem typos.\", \"hint\": \"This flag controls my grandioso feature.\", \"settingType\": \"boolean\", \"tags\": [ { \"tagId\": 0, \"name\": \"sample tag\", \"color\": \"whale\" } ] } ``` If we send an update request body as below (it changes the `name` and adds the already existing tag with the id `2`): ```json [ { \"op\": \"replace\", \"path\": \"/name\", \"value\": \"This is the name without typos.\" }, { \"op\": \"add\", \"path\": \"/tags/-\", \"value\": 2 } ] ``` Only the `name` and `tags` are updated and all the other attributes remain unchanged. So we get a response like this: ```json { \"settingId\": 5345, \"key\": \"myGrandFeature\", \"name\": \"This is the name without typos.\", \"hint\": \"This flag controls my grandioso feature.\", \"settingType\": \"boolean\", \"tags\": [ { \"tagId\": 0, \"name\": \"sample tag\", \"color\": \"whale\" }, { \"tagId\": 2, \"name\": \"another tag\", \"color\": \"koala\" } ] } ```
439510
* @summary Update Flag
@@ -517,6 +588,19 @@ export class FeatureFlagsSettingsApi extends BaseAPI {
517588
return FeatureFlagsSettingsApiFp(this.configuration).replaceSetting(settingId, replaceSettingModel, options).then((request) => request(this.axios, this.basePath));
518589
}
519590

591+
/**
592+
* This endpoint updates the predefined variations for a Feature Flag or Setting identified by the `settingId` parameter. **Important:** You can only update a predefined variation\'s value if it is not used anywhere in your feature flags. **Beta feature:** The feature is currently in closed beta state and cannot be used.
593+
* @summary Update predefined variations (Beta)
594+
* @param {number} settingId The identifier of the Setting.
595+
* @param {UpdatePredefinedVariationsRequest} updatePredefinedVariationsRequest
596+
* @param {*} [options] Override http request option.
597+
* @throws {RequiredError}
598+
* @memberof FeatureFlagsSettingsApi
599+
*/
600+
public updatePredefinedVariations(settingId: number, updatePredefinedVariationsRequest: UpdatePredefinedVariationsRequest, options?: RawAxiosRequestConfig) {
601+
return FeatureFlagsSettingsApiFp(this.configuration).updatePredefinedVariations(settingId, updatePredefinedVariationsRequest, options).then((request) => request(this.axios, this.basePath));
602+
}
603+
520604
/**
521605
* This endpoint updates the metadata of a Feature Flag or Setting with a collection of [JSON Patch](https://jsonpatch.com) operations in a specified Config. Only the `name`, `hint` and `tags` attributes are modifiable by this endpoint. The `tags` attribute is a simple collection of the [tag IDs](#operation/get-tags) attached to the given setting. The advantage of using JSON Patch is that you can describe individual update operations on a resource without touching attributes that you don\'t want to change. For example: We have the following resource. ```json { \"settingId\": 5345, \"key\": \"myGrandFeature\", \"name\": \"Tihs is a naem with soem typos.\", \"hint\": \"This flag controls my grandioso feature.\", \"settingType\": \"boolean\", \"tags\": [ { \"tagId\": 0, \"name\": \"sample tag\", \"color\": \"whale\" } ] } ``` If we send an update request body as below (it changes the `name` and adds the already existing tag with the id `2`): ```json [ { \"op\": \"replace\", \"path\": \"/name\", \"value\": \"This is the name without typos.\" }, { \"op\": \"add\", \"path\": \"/tags/-\", \"value\": 2 } ] ``` Only the `name` and `tags` are updated and all the other attributes remain unchanged. So we get a response like this: ```json { \"settingId\": 5345, \"key\": \"myGrandFeature\", \"name\": \"This is the name without typos.\", \"hint\": \"This flag controls my grandioso feature.\", \"settingType\": \"boolean\", \"tags\": [ { \"tagId\": 0, \"name\": \"sample tag\", \"color\": \"whale\" }, { \"tagId\": 2, \"name\": \"another tag\", \"color\": \"koala\" } ] } ```
522606
* @summary Update Flag

model/audit-log-type.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ export const AuditLogType = {
4747
SettingChanged: 'settingChanged',
4848
SettingDeleted: 'settingDeleted',
4949
SettingsReordered: 'settingsReordered',
50+
PredefinedVariationsChanged: 'predefinedVariationsChanged',
51+
SettingConvertedToPredefinedVariations: 'settingConvertedToPredefinedVariations',
52+
SettingConvertedToCustomValues: 'settingConvertedToCustomValues',
5053
SettingValueChanged: 'settingValueChanged',
5154
WebHookCreated: 'webHookCreated',
5255
WebHookChanged: 'webHookChanged',
@@ -112,7 +115,15 @@ export const AuditLogType = {
112115
AwsDisconnected: 'awsDisconnected',
113116
UserEnabled: 'userEnabled',
114117
SyncUserDeleted: 'syncUserDeleted',
115-
SyncGroupDeleted: 'syncGroupDeleted'
118+
SyncGroupDeleted: 'syncGroupDeleted',
119+
ProxyConfigurationCreated: 'proxyConfigurationCreated',
120+
ProxyConfigurationChanged: 'proxyConfigurationChanged',
121+
ProxyConfigurationDeleted: 'proxyConfigurationDeleted',
122+
ProxyConfigurationSecretRegenerated: 'proxyConfigurationSecretRegenerated',
123+
ProxyNotificationSettingsUpdated: 'proxyNotificationSettingsUpdated',
124+
ProxyNotificationSettingsDeleted: 'proxyNotificationSettingsDeleted',
125+
ProxyNotificationSigningKeyAdded: 'proxyNotificationSigningKeyAdded',
126+
ProxyNotificationSigningKeyDeleted: 'proxyNotificationSigningKeyDeleted'
116127
} as const;
117128

118129
export type AuditLogType = typeof AuditLogType[keyof typeof AuditLogType];

model/comparison-value-list-model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ export interface ComparisonValueListModel {
3131
* @type {string}
3232
* @memberof ComparisonValueListModel
3333
*/
34-
'hint'?: string | null;
34+
'hint': string | null;
3535
}
3636

model/comparison-value-model.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ export interface ComparisonValueModel {
2828
* @type {string}
2929
* @memberof ComparisonValueModel
3030
*/
31-
'stringValue'?: string | null;
31+
'stringValue': string | null;
3232
/**
3333
* The number representation of the comparison value.
3434
* @type {number}
3535
* @memberof ComparisonValueModel
3636
*/
37-
'doubleValue'?: number | null;
37+
'doubleValue': number | null;
3838
/**
3939
* The list representation of the comparison value.
4040
* @type {Array<ComparisonValueListModel>}
4141
* @memberof ComparisonValueModel
4242
*/
43-
'listValue'?: Array<ComparisonValueListModel> | null;
43+
'listValue': Array<ComparisonValueListModel> | null;
4444
}
4545

model/config-setting-formula-model.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import { IntegrationLinkModel } from './integration-link-model';
1919
// May contain unused imports in some cases
2020
// @ts-ignore
21-
import { SettingDataModel } from './setting-data-model';
21+
import { SettingDataV2Model } from './setting-data-v2-model';
2222
// May contain unused imports in some cases
2323
// @ts-ignore
2424
import { SettingTagModel } from './setting-tag-model';
@@ -55,10 +55,10 @@ export interface ConfigSettingFormulaModel {
5555
'targetingRules': Array<TargetingRuleModel>;
5656
/**
5757
*
58-
* @type {SettingDataModel}
58+
* @type {SettingDataV2Model}
5959
* @memberof ConfigSettingFormulaModel
6060
*/
61-
'setting': SettingDataModel;
61+
'setting': SettingDataV2Model;
6262
/**
6363
* The last updated date and time when the Feature Flag or Setting.
6464
* @type {string}

0 commit comments

Comments
 (0)