Skip to content

Commit

Permalink
SDK update generated by liblab
Browse files Browse the repository at this point in the history
  • Loading branch information
doppler-bot committed Jul 31, 2023
1 parent 63ae708 commit ba82f50
Show file tree
Hide file tree
Showing 14 changed files with 190 additions and 180 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
node-version: '16'
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.0.0",
"version": "1.0.1",
"author": "DopplerSDK",
"dependencies": {},
"type": "module"
Expand Down
89 changes: 45 additions & 44 deletions src/services/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);
const result = await sdk.secrets.list('PROJECT_NAME', 'CONFIG_NAME', {
accepts: 'application/json',
includeDynamicSecrets: true,
dynamicSecretsTtlSec: 58532169,
secrets: 'dolore exercitation nostrud',
dynamicSecretsTtlSec: -23862531,
secrets: 'quis consectetur sunt mollit ullamco',
includeManagedSecrets: true,
});
console.log(result);
Expand Down Expand Up @@ -481,12 +481,16 @@ const DOPPLERSDK_BEARER_TOKEN = '';
const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);

(async () => {
const result = await sdk.secrets.download('eiusmod', 'reprehenderit', {
format: 'json',
nameTransformer: 'dotnet-env',
includeDynamicSecrets: true,
dynamicSecretsTtlSec: 1800,
});
const result = await sdk.secrets.download(
'laboris minim sint fugiat pariatur',
'irure veniam sunt',
{
format: 'json',
nameTransformer: 'camel',
includeDynamicSecrets: true,
dynamicSecretsTtlSec: 1800,
},
);
console.log(result);
})();

Expand Down Expand Up @@ -562,9 +566,9 @@ const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);
(async () => {
const input = {
config: 'CONFIG_NAME',
note: 'amet enim',
note: 'ut occaecat sit proident',
project: 'PROJECT_NAME',
secret: 'proident',
secret: 'sed dolore dolor officia',
};
const result = await sdk.secrets.updateNote(input);
console.log(result);
Expand Down Expand Up @@ -728,7 +732,7 @@ const DOPPLERSDK_BEARER_TOKEN = '';
const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);

(async () => {
const result = await sdk.environments.get('dolor', 'do deserunt quis Lorem');
const result = await sdk.environments.get('proident eu laboris', 'irure');
console.log(result);
})();

Expand Down Expand Up @@ -767,7 +771,7 @@ const DOPPLERSDK_BEARER_TOKEN = '';
const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);

(async () => {
const result = await sdk.environments.delete('tempor dolor aliquip in', 'eiusmod ut');
const result = await sdk.environments.delete('est', 'dolore laboris elit');
console.log(result);
})();

Expand Down Expand Up @@ -807,8 +811,8 @@ const DOPPLERSDK_BEARER_TOKEN = '';
const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);

(async () => {
const input = { name: 'nulla minim', slug: 'consectetur sed in' };
const result = await sdk.environments.rename(input, 'occaecat', 'culpa fugiat nisi');
const input = { name: 'dolore sit dolore nostrud ex', slug: 'deserunt non ipsum' };
const result = await sdk.environments.rename(input, 'officia', 'enim consequat');
console.log(result);
})();

Expand Down Expand Up @@ -847,8 +851,8 @@ const DOPPLERSDK_BEARER_TOKEN = '';
const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);

(async () => {
const input = { name: 'in consequat in', slug: 'commodo est elit laboris aliqua' };
const result = await sdk.environments.create(input, 'aute dolore eu');
const input = { name: 'sint et consectetur', slug: 'fugiat pariatur ipsum incididunt in' };
const result = await sdk.environments.create(input, 'culpa sint sit');
console.log(result);
})();

Expand Down Expand Up @@ -886,7 +890,7 @@ const DOPPLERSDK_BEARER_TOKEN = '';
const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);

(async () => {
const result = await sdk.environments.list('sint');
const result = await sdk.environments.list('officia');
console.log(result);
})();

Expand Down Expand Up @@ -959,7 +963,7 @@ const DOPPLERSDK_BEARER_TOKEN = '';
const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);

(async () => {
const result = await sdk.configs.list('commodo sunt esse quis', {
const result = await sdk.configs.list('in incididunt', {
environment: 'Environment slug',
page: 1,
perPage: 20,
Expand Down Expand Up @@ -1295,7 +1299,7 @@ const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);
const input = {
access: 'read',
config: 'CONFIG_NAME',
expire_at: '1919-10-16T02:51:47.0Z',
expire_at: '1969-09-18T10:53:17.0Z',
name: 'TOKEN_NAME',
project: 'PROJECT_NAME',
};
Expand Down Expand Up @@ -1406,10 +1410,10 @@ const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);

(async () => {
const input = {
config: 'aliqua ut',
dynamic_secret: 'velit in',
project: 'amet enim sint sunt fugiat',
ttl_sec: 61886594,
config: 'laborum',
dynamic_secret: 'laboris proident magna velit cupidatat',
project: 'culpa',
ttl_sec: -23344411,
};
const result = await sdk.dynamicSecrets.issueLease(input);
console.log(result);
Expand Down Expand Up @@ -1442,10 +1446,10 @@ const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);

(async () => {
const input = {
config: 'nostrud minim ad sint nulla',
dynamic_secret: 'aliquip',
project: 'sint veniam',
slug: 'Ut minim sit',
config: 'elit cupidatat velit reprehenderit',
dynamic_secret: 'proident',
project: 'adipisicing et incididunt sed',
slug: 'et',
};
const result = await sdk.dynamicSecrets.revokeLease(input);
console.log(result);
Expand Down Expand Up @@ -1478,7 +1482,7 @@ const DOPPLERSDK_BEARER_TOKEN = '';
const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);

(async () => {
const input = { data: {}, name: 'enim', type_: 'in in' };
const input = { data: {}, name: 'amet anim ipsum', type_: 'laborum velit dolor' };
const result = await sdk.integrations.create(input);
console.log(result);
})();
Expand Down Expand Up @@ -1542,7 +1546,7 @@ const DOPPLERSDK_BEARER_TOKEN = '';
const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);

(async () => {
const result = await sdk.integrations.get('eu commodo sint est consequat');
const result = await sdk.integrations.get('sint adipisicing sunt Excepteur');
console.log(result);
})();

Expand Down Expand Up @@ -1580,7 +1584,7 @@ const DOPPLERSDK_BEARER_TOKEN = '';
const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);

(async () => {
const result = await sdk.integrations.delete('occaecat exercitation ad minim');
const result = await sdk.integrations.delete('non commodo laboris pariatur');
console.log(result);
})();

Expand Down Expand Up @@ -1619,8 +1623,8 @@ const DOPPLERSDK_BEARER_TOKEN = '';
const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);

(async () => {
const input = { data: 'est Duis cupidatat occaecat labore', name: 'fugiat ex Ut' };
const result = await sdk.integrations.update(input, 'consectetur culpa');
const input = { data: 'laboris ullamco', name: 'enim proident ut' };
const result = await sdk.integrations.update(input, 'non proident do');
console.log(result);
})();

Expand Down Expand Up @@ -1661,12 +1665,8 @@ const DOPPLERSDK_BEARER_TOKEN = '';
const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);

(async () => {
const input = { data: {}, import_option: 'none', integration: 'in dolore' };
const result = await sdk.syncs.create(
input,
'esse Ut Duis aliquip commodo',
'ex Duis est reprehenderit dolore',
);
const input = { data: {}, import_option: 'none', integration: 'in eiusmod ullamco dolor dolor' };
const result = await sdk.syncs.create(input, 'dolor cupidatat dolor eiusmod enim', 'sint');
console.log(result);
})();

Expand Down Expand Up @@ -1706,11 +1706,7 @@ const DOPPLERSDK_BEARER_TOKEN = '';
const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);

(async () => {
const result = await sdk.syncs.get(
'adipisicing laboris est exercitation',
'pariatur cupidatat laboris',
'cillum mollit veniam cupidatat aute',
);
const result = await sdk.syncs.get('ad dolor', 'qui laboris sed velit', 'est sit id');
console.log(result);
})();

Expand Down Expand Up @@ -1751,7 +1747,12 @@ const DOPPLERSDK_BEARER_TOKEN = '';
const sdk = new DopplerSDK(DOPPLERSDK_BEARER_TOKEN);

(async () => {
const result = await sdk.syncs.delete('ad', 'ex ea', 'ea ut amet', true);
const result = await sdk.syncs.delete(
'nisi dolor',
'sunt quis in',
'Duis dolor ipsum non nostrud',
true,
);
console.log(result);
})();

Expand Down
2 changes: 1 addition & 1 deletion src/services/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Environment } from '../http/Environment';
import HTTPLibrary from '../http/HTTPLibrary';

export default class BaseService {
private userAgent: string = 'liblab/0.1.11 DopplerSDK/1.0.0 typescript/5.1.6';
private userAgent: string = 'liblab/0.1.11 DopplerSDK/1.0.1 typescript/5.1.6';

public baseUrl: string = Environment.DEFAULT;

Expand Down
14 changes: 7 additions & 7 deletions test/services/ActivityLogs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,33 @@ describe('test ActivityLogsService', () => {
describe('test retrieve', () => {
test('test api call', () => {
const scope = nock('https://api.doppler.com')
.get('/v3/logs/log?log=ea')
.get('/v3/logs/log?log=saepe')
.reply(200, { data: {} });
return sdk.activityLogs.retrieve('ea').then((r: any) => expect(r.data).toEqual({}));
return sdk.activityLogs.retrieve('saepe').then((r: any) => expect(r.data).toEqual({}));
});

test('test will throw error if required fields missing', () => {
const scope = nock('https://api.doppler.com')
.get('/v3/logs/log?log=minima')
.get('/v3/logs/log?log=quo')
.reply(200, { data: {} });
return expect(async () => await sdk.activityLogs.retrieve()).rejects.toThrow();
});

test('test will throw error on a non-200 response', () => {
const scope = nock('https://api.doppler.com')
.get('/v3/logs/log?log=quae')
.get('/v3/logs/log?log=ullam')
.reply(404, { data: {} });
return expect(async () => await sdk.activityLogs.retrieve('quae')).rejects.toThrow();
return expect(async () => await sdk.activityLogs.retrieve('ullam')).rejects.toThrow();
});
});

describe('test list', () => {
test('test api call', () => {
const scope = nock('https://api.doppler.com')
.get('/v3/logs?page=illum&per_page=5')
.get('/v3/logs?page=numquam&per_page=8')
.reply(200, { data: {} });
return sdk.activityLogs
.list({ page: 'illum', perPage: 5 })
.list({ page: 'numquam', perPage: 8 })
.then((r: any) => expect(r.data).toEqual({}));
});
});
Expand Down
Loading

0 comments on commit ba82f50

Please sign in to comment.