Skip to content

Commit b0e4b48

Browse files
author
LaunchDarklyCI
committed
Version 3.7.0 automatically generated from ld-openapi@efa472a.
1 parent 6cbc5a3 commit b0e4b48

File tree

2 files changed

+188
-2
lines changed

2 files changed

+188
-2
lines changed

api.ts

Lines changed: 139 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* LaunchDarkly REST API
33
* Build custom integrations with the LaunchDarkly REST API
44
*
5-
* OpenAPI spec version: 3.6.0
5+
* OpenAPI spec version: 3.7.0
66
* Contact: support@launchdarkly.com
77
*
88
* NOTE: This class is auto generated by the swagger code generator program.
@@ -6611,6 +6611,144 @@ export class EnvironmentsApi {
66116611

66126612
this.authentications.default.applyToRequest(localVarRequestOptions);
66136613

6614+
if (Object.keys(localVarFormParams).length) {
6615+
if (localVarUseFormData) {
6616+
(<any>localVarRequestOptions).formData = localVarFormParams;
6617+
} else {
6618+
localVarRequestOptions.form = localVarFormParams;
6619+
}
6620+
}
6621+
return new Promise<{ response: http.ClientResponse; body: Environment; }>((resolve, reject) => {
6622+
localVarRequest(localVarRequestOptions, (error, response, body) => {
6623+
if (error) {
6624+
reject(error);
6625+
} else {
6626+
body = ObjectSerializer.deserialize(body, "Environment");
6627+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
6628+
resolve({ response: response, body: body });
6629+
} else {
6630+
reject({ response: response, body: body });
6631+
}
6632+
}
6633+
});
6634+
});
6635+
}
6636+
/**
6637+
*
6638+
* @summary Reset an environment's mobile key with an optional expiry time for the old key.
6639+
* @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
6640+
* @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
6641+
* @param expiry An expiration time for the old environment SDK or mobile key, expressed as a Unix epoch time in milliseconds. By default, the key will expire immediately
6642+
* @param {*} [options] Override http request options.
6643+
*/
6644+
public resetEnvironmentMobileKey (projectKey: string, environmentKey: string, expiry?: number, options: any = {}) : Promise<{ response: http.ClientResponse; body: Environment; }> {
6645+
const localVarPath = this.basePath + '/projects/{projectKey}/environments/{environmentKey}/mobileKey'
6646+
.replace('{' + 'projectKey' + '}', encodeURIComponent(String(projectKey)))
6647+
.replace('{' + 'environmentKey' + '}', encodeURIComponent(String(environmentKey)));
6648+
let localVarQueryParameters: any = {};
6649+
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
6650+
let localVarFormParams: any = {};
6651+
6652+
// verify required parameter 'projectKey' is not null or undefined
6653+
if (projectKey === null || projectKey === undefined) {
6654+
throw new Error('Required parameter projectKey was null or undefined when calling resetEnvironmentMobileKey.');
6655+
}
6656+
6657+
// verify required parameter 'environmentKey' is not null or undefined
6658+
if (environmentKey === null || environmentKey === undefined) {
6659+
throw new Error('Required parameter environmentKey was null or undefined when calling resetEnvironmentMobileKey.');
6660+
}
6661+
6662+
if (expiry !== undefined) {
6663+
localVarQueryParameters['expiry'] = ObjectSerializer.serialize(expiry, "number");
6664+
}
6665+
6666+
(<any>Object).assign(localVarHeaderParams, options.headers);
6667+
6668+
let localVarUseFormData = false;
6669+
6670+
let localVarRequestOptions: localVarRequest.Options = {
6671+
method: 'POST',
6672+
qs: localVarQueryParameters,
6673+
headers: localVarHeaderParams,
6674+
uri: localVarPath,
6675+
useQuerystring: this._useQuerystring,
6676+
json: true,
6677+
};
6678+
6679+
this.authentications.Token.applyToRequest(localVarRequestOptions);
6680+
6681+
this.authentications.default.applyToRequest(localVarRequestOptions);
6682+
6683+
if (Object.keys(localVarFormParams).length) {
6684+
if (localVarUseFormData) {
6685+
(<any>localVarRequestOptions).formData = localVarFormParams;
6686+
} else {
6687+
localVarRequestOptions.form = localVarFormParams;
6688+
}
6689+
}
6690+
return new Promise<{ response: http.ClientResponse; body: Environment; }>((resolve, reject) => {
6691+
localVarRequest(localVarRequestOptions, (error, response, body) => {
6692+
if (error) {
6693+
reject(error);
6694+
} else {
6695+
body = ObjectSerializer.deserialize(body, "Environment");
6696+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
6697+
resolve({ response: response, body: body });
6698+
} else {
6699+
reject({ response: response, body: body });
6700+
}
6701+
}
6702+
});
6703+
});
6704+
}
6705+
/**
6706+
*
6707+
* @summary Reset an environment's SDK key with an optional expiry time for the old key.
6708+
* @param projectKey The project key, used to tie the flags together under one project so they can be managed together.
6709+
* @param environmentKey The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
6710+
* @param expiry An expiration time for the old environment SDK or mobile key, expressed as a Unix epoch time in milliseconds. By default, the key will expire immediately
6711+
* @param {*} [options] Override http request options.
6712+
*/
6713+
public resetEnvironmentSDKKey (projectKey: string, environmentKey: string, expiry?: number, options: any = {}) : Promise<{ response: http.ClientResponse; body: Environment; }> {
6714+
const localVarPath = this.basePath + '/projects/{projectKey}/environments/{environmentKey}/apiKey'
6715+
.replace('{' + 'projectKey' + '}', encodeURIComponent(String(projectKey)))
6716+
.replace('{' + 'environmentKey' + '}', encodeURIComponent(String(environmentKey)));
6717+
let localVarQueryParameters: any = {};
6718+
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
6719+
let localVarFormParams: any = {};
6720+
6721+
// verify required parameter 'projectKey' is not null or undefined
6722+
if (projectKey === null || projectKey === undefined) {
6723+
throw new Error('Required parameter projectKey was null or undefined when calling resetEnvironmentSDKKey.');
6724+
}
6725+
6726+
// verify required parameter 'environmentKey' is not null or undefined
6727+
if (environmentKey === null || environmentKey === undefined) {
6728+
throw new Error('Required parameter environmentKey was null or undefined when calling resetEnvironmentSDKKey.');
6729+
}
6730+
6731+
if (expiry !== undefined) {
6732+
localVarQueryParameters['expiry'] = ObjectSerializer.serialize(expiry, "number");
6733+
}
6734+
6735+
(<any>Object).assign(localVarHeaderParams, options.headers);
6736+
6737+
let localVarUseFormData = false;
6738+
6739+
let localVarRequestOptions: localVarRequest.Options = {
6740+
method: 'POST',
6741+
qs: localVarQueryParameters,
6742+
headers: localVarHeaderParams,
6743+
uri: localVarPath,
6744+
useQuerystring: this._useQuerystring,
6745+
json: true,
6746+
};
6747+
6748+
this.authentications.Token.applyToRequest(localVarRequestOptions);
6749+
6750+
this.authentications.default.applyToRequest(localVarRequestOptions);
6751+
66146752
if (Object.keys(localVarFormParams).length) {
66156753
if (localVarUseFormData) {
66166754
(<any>localVarRequestOptions).formData = localVarFormParams;

openapi.yml

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ info:
1010
license:
1111
name: Apache 2.0
1212
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
13-
version: 3.6.0
13+
version: 3.7.0
1414
host: app.launchdarkly.com
1515
basePath: /api/v2
1616
schemes:
@@ -179,6 +179,44 @@ paths:
179179
$ref: '#/responses/Standard404'
180180
tags:
181181
- Environments
182+
'/projects/{projectKey}/environments/{environmentKey}/apiKey':
183+
post:
184+
summary: >-
185+
Reset an environment's SDK key with an optional expiry time for the old
186+
key.
187+
operationId: resetEnvironmentSDKKey
188+
parameters:
189+
- $ref: '#/parameters/ProjectKey'
190+
- $ref: '#/parameters/EnvironmentKey'
191+
- $ref: '#/parameters/EnvironmentKeyExpiry'
192+
responses:
193+
'200':
194+
$ref: '#/responses/Environment2xx'
195+
'404':
196+
$ref: '#/responses/Standard404'
197+
'409':
198+
$ref: '#/responses/Standard409'
199+
tags:
200+
- Environments
201+
'/projects/{projectKey}/environments/{environmentKey}/mobileKey':
202+
post:
203+
summary: >-
204+
Reset an environment's mobile key with an optional expiry time for the
205+
old key.
206+
operationId: resetEnvironmentMobileKey
207+
parameters:
208+
- $ref: '#/parameters/ProjectKey'
209+
- $ref: '#/parameters/EnvironmentKey'
210+
- $ref: '#/parameters/EnvironmentKeyExpiry'
211+
responses:
212+
'200':
213+
$ref: '#/responses/Environment2xx'
214+
'404':
215+
$ref: '#/responses/Standard404'
216+
'409':
217+
$ref: '#/responses/Standard409'
218+
tags:
219+
- Environments
182220
'/flags/{projectKey}':
183221
get:
184222
summary: Get a list of all features in the given project.
@@ -3473,6 +3511,16 @@ parameters:
34733511
items:
34743512
type: string
34753513
collectionFormat: multi
3514+
EnvironmentKeyExpiry:
3515+
name: expiry
3516+
in: query
3517+
required: false
3518+
type: integer
3519+
format: int64
3520+
description: >-
3521+
An expiration time for the old environment SDK or mobile key, expressed as
3522+
a Unix epoch time in milliseconds. By default, the key will expire
3523+
immediately
34763524
SummaryQuery:
34773525
name: summary
34783526
in: query

0 commit comments

Comments
 (0)