Skip to content

Commit

Permalink
liblab SDK update for version v1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
doppler-bot committed May 24, 2024
1 parent 485f430 commit 5816f81
Show file tree
Hide file tree
Showing 32 changed files with 688 additions and 632 deletions.
13 changes: 8 additions & 5 deletions .manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"liblabVersion": "1.1.43",
"date": "2024-04-03T23:04:28.847Z",
"liblabVersion": "1.1.48",
"date": "2024-05-24T15:27:45.384Z",
"config": {
"authentication": {
"access": {
Expand All @@ -12,7 +12,7 @@
"inputFileName": "/tmp/resources/spec/open-api-spec.json",
"environmentVariables": [],
"fileOutput": "/tmp",
"tempDir": "/tmp/liblab-codegen-1.1.43-Our4mq",
"tempDir": "/tmp/liblab-codegen-1.1.48-JLyZC0",
"inferServiceNames": true,
"httpLibrary": {
"name": "https",
Expand All @@ -24,7 +24,7 @@
"privateRepo": false,
"githubRef": "",
"sdkName": "DopplerSDK",
"sdkVersion": "1.3.0",
"sdkVersion": "1.3.1",
"retry": {
"enabled": true,
"maxAttempts": 3,
Expand Down Expand Up @@ -63,6 +63,10 @@
"enforceRequestValidation": false,
"denoteCommon": false,
"includeOptionalSnippetParameters": true,
"githubRepoName": "node-sdk",
"publishing": {
"githubOrg": "DopplerHQ"
},
"hooks": {
"enabled": false,
"sourceDir": ""
Expand Down Expand Up @@ -164,7 +168,6 @@
"src/services/configs/models/CloneResponse.ts",
"src/services/configs/models/ConfigsCreateRequest.ts",
"src/services/configs/models/ConfigsCreateResponse.ts",
"src/services/configs/models/ConfigsDeleteRequest.ts",
"src/services/configs/models/ConfigsGetResponse.ts",
"src/services/configs/models/ConfigsListResponse.ts",
"src/services/configs/models/ConfigsUpdateRequest.ts",
Expand Down
436 changes: 210 additions & 226 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
},
"name": "@dopplerhq/node-sdk",
"description": "DopplerSDK",
"version": "1.3.0",
"version": "1.3.1",
"author": "DopplerSDK",
"dependencies": {},
"license": "MIT",
Expand Down
3 changes: 2 additions & 1 deletion src/http/HTTPLibrary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export default class HTTPLibrary implements HTTPClient {
...headers,
...this.getUserAgentHeader(),
'content-type': 'application/json',
'transfer-encoding': 'chunked',
},
JSON.stringify(HTTPLibrary.convertKeysWithMapper(input, this.requestMapper)),
);
Expand Down Expand Up @@ -208,7 +209,7 @@ export default class HTTPLibrary implements HTTPClient {
}

private getUserAgentHeader(): Headers {
const userAgentBase = 'DopplerSDK/1.3.0';
const userAgentBase = 'DopplerSDK/1.3.1';

let userAgent = '';
if (typeof window !== 'undefined') {
Expand Down
1 change: 0 additions & 1 deletion src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export type { ConfigLogsGetResponse } from './services/configLogs/models/ConfigL
export type { ConfigLogsListResponse } from './services/configLogs/models/ConfigLogsListResponse';
export type { ConfigsCreateRequest } from './services/configs/models/ConfigsCreateRequest';
export type { ConfigsCreateResponse } from './services/configs/models/ConfigsCreateResponse';
export type { ConfigsDeleteRequest } from './services/configs/models/ConfigsDeleteRequest';
export type { ConfigsGetResponse } from './services/configs/models/ConfigsGetResponse';
export type { ConfigsListResponse } from './services/configs/models/ConfigsListResponse';
export type { ConfigsUpdateRequest } from './services/configs/models/ConfigsUpdateRequest';
Expand Down
84 changes: 45 additions & 39 deletions src/services/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,10 @@ Delete

**Required Parameters**

| input | object | Request body. |
| Name | Type | Description |
| :------ | :----- | :--------------------------------- |
| project | string | Unique identifier for the project. |
| config | string | Name of the config. |

**Return Type**

Expand All @@ -704,8 +707,7 @@ const DOPPLERSDK_ACCESS_TOKEN = '';
const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN });

(async () => {
const input = { config: 'CONFIG_NAME', project: 'PROJECT_NAME' };
const result = await sdk.configs.delete(input);
const result = await sdk.configs.delete('project', 'config');
console.log(result);
})();

Expand Down Expand Up @@ -1133,26 +1135,30 @@ const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN });
const input = {
change_requests: [
{
name: 'cupidatat consectetur ut non quis',
originalName: 'occaecat in in',
originalValue: 'cillum aute occaecat',
originalVisibility: 'sit minim ad',
shouldConverge: false,
name: 'elit labore',
originalName: 'sed',
originalValue: 'laboris laborum labore dolor in',
originalValueType: { type_: 'yaml' },
originalVisibility: 'anim ex nisi',
shouldConverge: true,
shouldDelete: false,
shouldPromote: false,
value: 'consectetur proident ea',
visibility: 'in labore exercitation',
value: 'et aliquip',
valueType: { type_: 'decimal' },
visibility: 'dolore non',
},
{
name: 'laborum anim sint',
originalName: 'laboris ut',
originalValue: 'in commodo in',
originalVisibility: 'tempor',
shouldConverge: false,
shouldDelete: true,
name: 'et nostrud reprehenderit nulla',
originalName: 'ut esse Duis',
originalValue: 'adipisicing fugiat',
originalValueType: { type_: 'yaml' },
originalVisibility: 'sunt ex officia Duis laborum',
shouldConverge: true,
shouldDelete: false,
shouldPromote: true,
value: 'pariatur adipisicing nulla ea',
visibility: 'dolore in culpa officia',
value: 'cupidatat',
valueType: { type_: 'url' },
visibility: 'adipisicing',
},
],
config: 'CONFIG_NAME',
Expand Down Expand Up @@ -1208,7 +1214,7 @@ const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN });
const result = await sdk.secrets.list('PROJECT_NAME', 'CONFIG_NAME', {
accepts: 'application/json',
includeDynamicSecrets: true,
dynamicSecretsTtlSec: -33704873,
dynamicSecretsTtlSec: 32556172,
secrets: 'secrets',
includeManagedSecrets: true,
});
Expand Down Expand Up @@ -1329,7 +1335,7 @@ const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.secrets.download('project', 'config', {
format: 'json',
nameTransformer: 'camel',
nameTransformer: 'lower-snake',
includeDynamicSecrets: true,
dynamicSecretsTtlSec: 1800,
secrets: 'secrets',
Expand Down Expand Up @@ -1615,7 +1621,7 @@ const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN });
const input = {
access: 'read',
config: 'CONFIG_NAME',
expire_at: '1908-01-12T01:17:11.0Z',
expire_at: '1945-04-10T09:05:58.0Z',
name: 'TOKEN_NAME',
project: 'PROJECT_NAME',
};
Expand Down Expand Up @@ -1766,7 +1772,7 @@ const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN });
config: 'config',
dynamic_secret: 'dynamic_secret',
project: 'project',
ttl_sec: -46828653,
ttl_sec: 43150140,
};
const result = await sdk.dynamicSecrets.issueLease(input);
console.log(result);
Expand Down Expand Up @@ -2130,7 +2136,10 @@ const DOPPLERSDK_ACCESS_TOKEN = '';
const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN });

(async () => {
const input = { name: 'name', permissions: ['sunt', 'deserunt ad Lorem nisi'] };
const input = {
name: 'name',
permissions: ['aliqua ullamco ut consectetur eiusmod', 'voluptate sunt consequat'],
};
const result = await sdk.workplaceRoles.create(input);
console.log(result);
})();
Expand Down Expand Up @@ -2225,7 +2234,10 @@ const DOPPLERSDK_ACCESS_TOKEN = '';
const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN });

(async () => {
const input = { name: 'name', permissions: ['sint consequat', 'dolor aute esse adipisicing'] };
const input = {
name: 'name',
permissions: ['consectetur consequat sint ullamco', 'Excepteur incididunt laborum'],
};
const result = await sdk.workplaceRoles.update(input, 'role');
console.log(result);
})();
Expand Down Expand Up @@ -2353,7 +2365,7 @@ const DOPPLERSDK_ACCESS_TOKEN = '';
const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN });

(async () => {
const input = { name: 'name', permissions: ['cupidatat laborum Ut proident amet', 'anim ut'] };
const input = { name: 'name', permissions: ['incididunt', 'cupidatat veniam laboris'] };
const result = await sdk.projectRoles.update(input, 'role');
console.log(result);
})();
Expand Down Expand Up @@ -2418,10 +2430,7 @@ const DOPPLERSDK_ACCESS_TOKEN = '';
const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN });

(async () => {
const input = {
name: 'name',
permissions: ['Lorem ea quis commodo occaecat', 'qui voluptate et consectetur dolor'],
};
const input = { name: 'name', permissions: ['ut', 'irure'] };
const result = await sdk.projectRoles.create(input);
console.log(result);
})();
Expand Down Expand Up @@ -2511,7 +2520,7 @@ const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN });

(async () => {
const input = {
environments: ['laborum elit enim cillum', 'consequat quis'],
environments: ['exercitation', 'officia occaecat'],
role: 'role',
slug: 'slug',
type_: 'group',
Expand Down Expand Up @@ -2629,11 +2638,8 @@ const DOPPLERSDK_ACCESS_TOKEN = '';
const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN });

(async () => {
const input = {
environments: ['incididunt veniam in dolor', 'qui laborum sint exercitation ut'],
role: 'role',
};
const result = await sdk.projectMembers.update(input, 'invite', 'slug', 'project');
const input = { environments: ['ex culpa in', 'consequat'], role: 'role' };
const result = await sdk.projectMembers.update(input, 'group', 'slug', 'project');
console.log(result);
})();

Expand Down Expand Up @@ -2668,7 +2674,7 @@ const DOPPLERSDK_ACCESS_TOKEN = '';
const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN });

(async () => {
const result = await sdk.projectMembers.delete('service_account', 'slug', 'project');
const result = await sdk.projectMembers.delete('workplace_user', 'slug', 'project');
console.log(result);
})();

Expand Down Expand Up @@ -2775,7 +2781,7 @@ const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN });
name: 'name',
workplace_role: {
identifier: 'identifier',
permissions: ['enim irure reprehenderit', 'eiusmod consequat proident veniam'],
permissions: ['cillum ut in', 'sunt non elit amet'],
},
};
const result = await sdk.serviceAccounts.update(input, 'slug');
Expand Down Expand Up @@ -2846,7 +2852,7 @@ const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN });
name: 'name',
workplace_role: {
identifier: 'identifier',
permissions: ['do consequat', 'eiusmod quis nostrud nisi laborum'],
permissions: ['elit mollit pariatur', 'sit ullamco enim'],
},
};
const result = await sdk.serviceAccounts.create(input);
Expand Down Expand Up @@ -3575,7 +3581,7 @@ const DOPPLERSDK_ACCESS_TOKEN = '';
const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN });

(async () => {
const input = { expires_at: '1940-05-02T11:24:43.0Z', name: 'name' };
const input = { expires_at: '1961-05-16T03:56:22.0Z', name: 'name' };
const result = await sdk.serviceAccountTokens.create(input, 'service_account');
console.log(result);
})();
Expand Down
23 changes: 17 additions & 6 deletions src/services/configs/Configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { ConfigsGetResponse } from './models/ConfigsGetResponse';
import { ConfigsUpdateResponse } from './models/ConfigsUpdateResponse';
import { DeleteResponse } from '../common/DeleteResponse';
import { ConfigsUpdateRequest } from './models/ConfigsUpdateRequest';
import { ConfigsDeleteRequest } from './models/ConfigsDeleteRequest';
import { ConfigsListResponse } from './models/ConfigsListResponse';
import { ConfigsCreateResponse } from './models/ConfigsCreateResponse';
import { ConfigsCreateRequest } from './models/ConfigsCreateRequest';
Expand Down Expand Up @@ -84,17 +83,29 @@ export class ConfigsService extends BaseService {
* @summary Delete
* @description Permanently delete the config.
* @param project Unique identifier for the project.
* @param config Name of the config.
* @returns {Promise<DeleteResponse>} - The promise with the result
*/
async delete(input: ConfigsDeleteRequest): Promise<DeleteResponse> {
const headers: { [key: string]: string } = { 'Content-Type': 'application/json' };
async delete(project: string, config: string): Promise<DeleteResponse> {
if (project === undefined || config === undefined) {
throw new Error(
'The following are required parameters: project,config, cannot be empty or blank',
);
}
const queryParams: string[] = [];
if (project) {
queryParams.push(serializeQuery('form', true, 'project', project));
}
if (config) {
queryParams.push(serializeQuery('form', true, 'config', config));
}
const urlEndpoint = '/v3/configs/config';
const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`);
const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`);
const response: any = await this.httpClient.delete(
finalUrl,
input,
{ project, config },
{
...headers,
...this.getAuthorizationHeader(),
},
true,
Expand Down
1 change: 0 additions & 1 deletion src/services/configs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export type { CloneRequest } from './models/CloneRequest';
export type { CloneResponse } from './models/CloneResponse';
export type { ConfigsCreateRequest } from './models/ConfigsCreateRequest';
export type { ConfigsCreateResponse } from './models/ConfigsCreateResponse';
export type { ConfigsDeleteRequest } from './models/ConfigsDeleteRequest';
export type { ConfigsGetResponse } from './models/ConfigsGetResponse';
export type { ConfigsListResponse } from './models/ConfigsListResponse';
export type { ConfigsUpdateRequest } from './models/ConfigsUpdateRequest';
Expand Down
10 changes: 0 additions & 10 deletions src/services/configs/models/ConfigsDeleteRequest.ts

This file was deleted.

Loading

0 comments on commit 5816f81

Please sign in to comment.