@quantcdn/quant-client 2.0.13 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -72
- package/dist/api/apis.d.ts +32 -0
- package/dist/api/apis.js +50 -0
- package/dist/api/applicationsApi.d.ts +104 -0
- package/dist/api/applicationsApi.js +431 -0
- package/dist/api/backupManagementApi.d.ts +106 -0
- package/dist/api/backupManagementApi.js +440 -0
- package/dist/api/commandsApi.d.ts +80 -0
- package/dist/api/commandsApi.js +316 -0
- package/dist/api/composeApi.d.ts +66 -0
- package/dist/api/composeApi.js +236 -0
- package/dist/api/containersApi.d.ts +67 -0
- package/dist/api/containersApi.js +236 -0
- package/dist/api/cronApi.d.ts +151 -0
- package/dist/api/cronApi.js +681 -0
- package/dist/api/environmentsApi.d.ts +194 -0
- package/dist/api/environmentsApi.js +861 -0
- package/dist/api/sSHAccessApi.d.ts +50 -0
- package/dist/api/sSHAccessApi.js +162 -0
- package/dist/api/scalingPolicyApi.d.ts +82 -0
- package/dist/api/scalingPolicyApi.js +307 -0
- package/dist/api/variablesApi.d.ts +83 -0
- package/dist/api/variablesApi.js +313 -0
- package/dist/api/volumesApi.d.ts +97 -0
- package/dist/api/volumesApi.js +405 -0
- package/dist/api.d.ts +2 -0
- package/dist/api.js +19 -0
- package/dist/model/application.d.ts +38 -0
- package/dist/model/application.js +93 -0
- package/dist/model/command.d.ts +34 -0
- package/dist/model/command.js +73 -0
- package/dist/model/compose.d.ts +32 -0
- package/dist/model/compose.js +58 -0
- package/dist/model/configuration.d.ts +26 -0
- package/dist/model/configuration.js +30 -0
- package/dist/model/container.d.ts +38 -0
- package/dist/model/container.js +78 -0
- package/dist/model/containerEnvironmentInner.d.ts +26 -0
- package/dist/model/containerEnvironmentInner.js +33 -0
- package/dist/model/containerImageReference.d.ts +28 -0
- package/dist/model/containerImageReference.js +43 -0
- package/dist/model/containerMountPointsInner.d.ts +27 -0
- package/dist/model/containerMountPointsInner.js +38 -0
- package/dist/model/createApplicationRequest.d.ts +28 -0
- package/dist/model/createApplicationRequest.js +43 -0
- package/dist/model/createBackup202Response.d.ts +27 -0
- package/dist/model/createBackup202Response.js +38 -0
- package/dist/model/createBackupRequest.d.ts +32 -0
- package/dist/model/createBackupRequest.js +33 -0
- package/dist/model/createCommandRequest.d.ts +25 -0
- package/dist/model/createCommandRequest.js +28 -0
- package/dist/model/createCronJob422Response.d.ts +26 -0
- package/dist/model/createCronJob422Response.js +33 -0
- package/dist/model/createCronJobRequest.d.ts +30 -0
- package/dist/model/createCronJobRequest.js +56 -0
- package/dist/model/createEnvironmentRequest.d.ts +34 -0
- package/dist/model/createEnvironmentRequest.js +53 -0
- package/dist/model/cron.d.ts +27 -0
- package/dist/model/cron.js +38 -0
- package/dist/model/cronRun.d.ts +48 -0
- package/dist/model/cronRun.js +89 -0
- package/dist/model/deleteBackup200Response.d.ts +26 -0
- package/dist/model/deleteBackup200Response.js +33 -0
- package/dist/model/downloadBackup200Response.d.ts +36 -0
- package/dist/model/downloadBackup200Response.js +38 -0
- package/dist/model/environment.d.ts +45 -0
- package/dist/model/environment.js +103 -0
- package/dist/model/getEcrLoginCredentials200Response.d.ts +28 -0
- package/dist/model/getEcrLoginCredentials200Response.js +43 -0
- package/dist/model/getScalingPolicies200Response.d.ts +26 -0
- package/dist/model/getScalingPolicies200Response.js +28 -0
- package/dist/model/getSshAccessCredentials200Response.d.ts +34 -0
- package/dist/model/getSshAccessCredentials200Response.js +68 -0
- package/dist/model/getSshAccessCredentials200ResponseCredentials.d.ts +28 -0
- package/dist/model/getSshAccessCredentials200ResponseCredentials.js +43 -0
- package/dist/model/listBackups200Response.d.ts +26 -0
- package/dist/model/listBackups200Response.js +28 -0
- package/dist/model/listBackups200ResponseBackupsInner.d.ts +29 -0
- package/dist/model/listBackups200ResponseBackupsInner.js +48 -0
- package/dist/model/models.d.ts +84 -0
- package/dist/model/models.js +370 -0
- package/dist/model/scalingPolicy.d.ts +35 -0
- package/dist/model/scalingPolicy.js +51 -0
- package/dist/model/syncOperation.d.ts +31 -0
- package/dist/model/syncOperation.js +58 -0
- package/dist/model/syncToEnvironmentRequest.d.ts +25 -0
- package/dist/model/syncToEnvironmentRequest.js +28 -0
- package/dist/model/updateComposeRequest.d.ts +26 -0
- package/dist/model/updateComposeRequest.js +28 -0
- package/dist/model/updateCronJobRequest.d.ts +29 -0
- package/dist/model/updateCronJobRequest.js +48 -0
- package/dist/model/updateEnvironmentComposeRequest.d.ts +26 -0
- package/dist/model/updateEnvironmentComposeRequest.js +28 -0
- package/dist/model/updateEnvironmentRequest.d.ts +26 -0
- package/dist/model/updateEnvironmentRequest.js +28 -0
- package/dist/model/updateEnvironmentStateRequest.d.ts +26 -0
- package/dist/model/updateEnvironmentStateRequest.js +33 -0
- package/dist/model/updateEnvironmentVariableRequest.d.ts +25 -0
- package/dist/model/updateEnvironmentVariableRequest.js +28 -0
- package/dist/model/validateCompose200Response.d.ts +27 -0
- package/dist/model/validateCompose200Response.js +38 -0
- package/dist/model/validateComposeRequest.d.ts +25 -0
- package/dist/model/validateComposeRequest.js +28 -0
- package/dist/model/variable.d.ts +26 -0
- package/dist/model/variable.js +33 -0
- package/dist/model/volume.d.ts +32 -0
- package/dist/model/volume.js +63 -0
- package/package.json +21 -40
- package/dist/src/client.d.ts +0 -15
- package/dist/src/client.js +0 -380
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.js +0 -42
- package/dist/src/interfaces.d.ts +0 -34
- package/dist/src/interfaces.js +0 -2
- package/dist/src/response.d.ts +0 -15
- package/dist/src/response.js +0 -103
- package/dist/src/types.d.ts +0 -68
- package/dist/src/types.js +0 -8
- package/dist/tests/client.test.d.ts +0 -1
- package/dist/tests/client.test.js +0 -191
- package/dist/tests/response.test.d.ts +0 -1
- package/dist/tests/response.test.js +0 -133
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const src_1 = require("../src");
|
|
13
|
-
const buffer_1 = require("buffer");
|
|
14
|
-
const chai_1 = require("chai");
|
|
15
|
-
class TestClient {
|
|
16
|
-
constructor(baseUrl, headers) {
|
|
17
|
-
this.reject = false;
|
|
18
|
-
this.baseUrl = baseUrl;
|
|
19
|
-
this.headers = headers;
|
|
20
|
-
this.reject = false;
|
|
21
|
-
}
|
|
22
|
-
do(options) {
|
|
23
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
return yield Promise.resolve('okay!');
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
get(path, qs, headers) {
|
|
28
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
return yield Promise.resolve({});
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
post(path, body, headers, formData, qs) {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
return yield Promise.resolve({});
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
delete(path, body, headers) {
|
|
38
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
return yield Promise.resolve({});
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
patch(path, body, headers) {
|
|
43
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
-
return yield Promise.resolve({});
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
// Create a singleton mock client that all tests will use
|
|
49
|
-
const mockClient = new TestClient('https://api.quantcdn.io/v1', {});
|
|
50
|
-
// Create a constructor function that returns our singleton
|
|
51
|
-
function MockClientConstructor(baseUrl, headers) {
|
|
52
|
-
return mockClient;
|
|
53
|
-
}
|
|
54
|
-
describe('file()', () => {
|
|
55
|
-
beforeEach(() => {
|
|
56
|
-
// Reset the mock client's post method before each test
|
|
57
|
-
mockClient.post = () => __awaiter(void 0, void 0, void 0, function* () { return ({}); });
|
|
58
|
-
});
|
|
59
|
-
it('should successfully upload a file', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
60
|
-
const testData = buffer_1.Buffer.from('test file content');
|
|
61
|
-
const payload = {
|
|
62
|
-
data: testData,
|
|
63
|
-
url: '/test/file.txt'
|
|
64
|
-
};
|
|
65
|
-
mockClient.post = () => __awaiter(void 0, void 0, void 0, function* () { return ({ status: 'success' }); });
|
|
66
|
-
const client = new src_1.QuantClient({
|
|
67
|
-
organization: 'test-org',
|
|
68
|
-
project: 'test-project',
|
|
69
|
-
token: 'test-token'
|
|
70
|
-
}, MockClientConstructor);
|
|
71
|
-
const response = yield client.project.file(payload);
|
|
72
|
-
(0, chai_1.expect)(response.status).to.equal('success');
|
|
73
|
-
}));
|
|
74
|
-
it('should handle file upload with skipPurge option', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
75
|
-
const testData = buffer_1.Buffer.from('test file content');
|
|
76
|
-
const payload = {
|
|
77
|
-
data: testData,
|
|
78
|
-
url: '/test/file.txt',
|
|
79
|
-
skipPurge: true
|
|
80
|
-
};
|
|
81
|
-
mockClient.post = (path_1, body_1, ...args_1) => __awaiter(void 0, [path_1, body_1, ...args_1], void 0, function* (path, body, headers = {}) {
|
|
82
|
-
(0, chai_1.expect)(headers['Quant-Skip-Purge']).to.equal('true');
|
|
83
|
-
return { status: 'success' };
|
|
84
|
-
});
|
|
85
|
-
const client = new src_1.QuantClient({
|
|
86
|
-
organization: 'test-org',
|
|
87
|
-
project: 'test-project',
|
|
88
|
-
token: 'test-token'
|
|
89
|
-
}, MockClientConstructor);
|
|
90
|
-
const response = yield client.project.file(payload);
|
|
91
|
-
(0, chai_1.expect)(response.status).to.equal('success');
|
|
92
|
-
}));
|
|
93
|
-
it('should handle API errors appropriately', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
94
|
-
const testData = buffer_1.Buffer.from('test file content');
|
|
95
|
-
const payload = {
|
|
96
|
-
data: testData,
|
|
97
|
-
url: '/test/file.txt'
|
|
98
|
-
};
|
|
99
|
-
mockClient.post = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
100
|
-
throw new Error('Invalid file format');
|
|
101
|
-
});
|
|
102
|
-
const client = new src_1.QuantClient({
|
|
103
|
-
organization: 'test-org',
|
|
104
|
-
project: 'test-project',
|
|
105
|
-
token: 'test-token'
|
|
106
|
-
}, MockClientConstructor);
|
|
107
|
-
try {
|
|
108
|
-
yield client.project.file(payload);
|
|
109
|
-
chai_1.expect.fail('Should have thrown an error');
|
|
110
|
-
}
|
|
111
|
-
catch (error) {
|
|
112
|
-
(0, chai_1.expect)(error.message).to.equal('Invalid file format');
|
|
113
|
-
}
|
|
114
|
-
}));
|
|
115
|
-
it('should handle large files correctly', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
116
|
-
const testData = buffer_1.Buffer.alloc(1024 * 1024, 'x');
|
|
117
|
-
const payload = {
|
|
118
|
-
data: testData,
|
|
119
|
-
url: '/test/large-file.txt'
|
|
120
|
-
};
|
|
121
|
-
mockClient.post = () => __awaiter(void 0, void 0, void 0, function* () { return ({ status: 'success' }); });
|
|
122
|
-
const client = new src_1.QuantClient({
|
|
123
|
-
organization: 'test-org',
|
|
124
|
-
project: 'test-project',
|
|
125
|
-
token: 'test-token'
|
|
126
|
-
}, MockClientConstructor);
|
|
127
|
-
const response = yield client.project.file(payload);
|
|
128
|
-
(0, chai_1.expect)(response.status).to.equal('success');
|
|
129
|
-
}));
|
|
130
|
-
});
|
|
131
|
-
describe('markup', () => {
|
|
132
|
-
beforeEach(() => {
|
|
133
|
-
mockClient.post = () => __awaiter(void 0, void 0, void 0, function* () { return ({}); });
|
|
134
|
-
});
|
|
135
|
-
it('should respect findAttachments when false', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
136
|
-
const testData = buffer_1.Buffer.from('test content');
|
|
137
|
-
const payload = {
|
|
138
|
-
data: testData,
|
|
139
|
-
url: '/test/markup',
|
|
140
|
-
published: true,
|
|
141
|
-
findAttachments: false
|
|
142
|
-
};
|
|
143
|
-
mockClient.post = (path, body) => __awaiter(void 0, void 0, void 0, function* () {
|
|
144
|
-
(0, chai_1.expect)(body.find_attachments).to.equal(false);
|
|
145
|
-
return { status: 'success' };
|
|
146
|
-
});
|
|
147
|
-
const client = new src_1.QuantClient({
|
|
148
|
-
organization: 'test-org',
|
|
149
|
-
project: 'test-project',
|
|
150
|
-
token: 'test-token'
|
|
151
|
-
}, MockClientConstructor);
|
|
152
|
-
yield client.project.markup(payload);
|
|
153
|
-
}));
|
|
154
|
-
it('should respect findAttachments when true', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
155
|
-
const testData = buffer_1.Buffer.from('test content');
|
|
156
|
-
const payload = {
|
|
157
|
-
data: testData,
|
|
158
|
-
url: '/test/markup',
|
|
159
|
-
published: true,
|
|
160
|
-
findAttachments: true
|
|
161
|
-
};
|
|
162
|
-
mockClient.post = (path, body) => __awaiter(void 0, void 0, void 0, function* () {
|
|
163
|
-
(0, chai_1.expect)(body.find_attachments).to.equal(true);
|
|
164
|
-
return { status: 'success' };
|
|
165
|
-
});
|
|
166
|
-
const client = new src_1.QuantClient({
|
|
167
|
-
organization: 'test-org',
|
|
168
|
-
project: 'test-project',
|
|
169
|
-
token: 'test-token'
|
|
170
|
-
}, MockClientConstructor);
|
|
171
|
-
yield client.project.markup(payload);
|
|
172
|
-
}));
|
|
173
|
-
it('should default findAttachments to false when not specified', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
174
|
-
const testData = buffer_1.Buffer.from('test content');
|
|
175
|
-
const payload = {
|
|
176
|
-
data: testData,
|
|
177
|
-
url: '/test/markup',
|
|
178
|
-
published: true
|
|
179
|
-
};
|
|
180
|
-
mockClient.post = (path, body) => __awaiter(void 0, void 0, void 0, function* () {
|
|
181
|
-
(0, chai_1.expect)(body.find_attachments).to.equal(false);
|
|
182
|
-
return { status: 'success' };
|
|
183
|
-
});
|
|
184
|
-
const client = new src_1.QuantClient({
|
|
185
|
-
organization: 'test-org',
|
|
186
|
-
project: 'test-project',
|
|
187
|
-
token: 'test-token'
|
|
188
|
-
}, MockClientConstructor);
|
|
189
|
-
yield client.project.markup(payload);
|
|
190
|
-
}));
|
|
191
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
12
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
13
|
-
var m = o[Symbol.asyncIterator], i;
|
|
14
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
15
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
16
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
17
|
-
};
|
|
18
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
const response_1 = require("../src/response");
|
|
20
|
-
const chai_1 = require("chai");
|
|
21
|
-
class TestClient {
|
|
22
|
-
constructor(baseUrl, headers, testData) {
|
|
23
|
-
this.baseUrl = baseUrl;
|
|
24
|
-
this.headers = headers;
|
|
25
|
-
this.testData = testData || {
|
|
26
|
-
data: [1, 2, 3],
|
|
27
|
-
pagination: {
|
|
28
|
-
current_page: 1,
|
|
29
|
-
from: 1,
|
|
30
|
-
total_pages: 1,
|
|
31
|
-
per_page: 3,
|
|
32
|
-
to: 3,
|
|
33
|
-
total: 3
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
do(options) {
|
|
38
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
return yield Promise.resolve(this.testData);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
get(path, qs, headers) {
|
|
43
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
-
return yield Promise.resolve({});
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
post(path, body, headers, formData, qs) {
|
|
48
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
return yield Promise.resolve({});
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
delete(path, body, headers) {
|
|
53
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
return yield Promise.resolve({});
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
patch(path, body, headers) {
|
|
58
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
-
return yield Promise.resolve({});
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
describe('PaginatedResponse', () => {
|
|
64
|
-
const client = new TestClient('https://api.quantcdn.io/v1', {});
|
|
65
|
-
const options = {
|
|
66
|
-
url: 'https://api.quantcdn.io/v1/test',
|
|
67
|
-
method: 'GET'
|
|
68
|
-
};
|
|
69
|
-
it('should paginate through results', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
70
|
-
var _a, e_1, _b, _c;
|
|
71
|
-
const response = new response_1.PaginatedResponse(client, options);
|
|
72
|
-
let results = [];
|
|
73
|
-
try {
|
|
74
|
-
for (var _d = true, response_2 = __asyncValues(response), response_2_1; response_2_1 = yield response_2.next(), _a = response_2_1.done, !_a; _d = true) {
|
|
75
|
-
_c = response_2_1.value;
|
|
76
|
-
_d = false;
|
|
77
|
-
const items = _c;
|
|
78
|
-
if (Array.isArray(items)) {
|
|
79
|
-
results = results.concat(items);
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
results.push(items);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
87
|
-
finally {
|
|
88
|
-
try {
|
|
89
|
-
if (!_d && !_a && (_b = response_2.return)) yield _b.call(response_2);
|
|
90
|
-
}
|
|
91
|
-
finally { if (e_1) throw e_1.error; }
|
|
92
|
-
}
|
|
93
|
-
(0, chai_1.expect)(results).to.deep.equal([1, 2, 3]);
|
|
94
|
-
}));
|
|
95
|
-
it('should handle empty responses', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
96
|
-
var _a, e_2, _b, _c;
|
|
97
|
-
const emptyData = {
|
|
98
|
-
data: [],
|
|
99
|
-
pagination: {
|
|
100
|
-
current_page: 1,
|
|
101
|
-
from: null,
|
|
102
|
-
total_pages: 1,
|
|
103
|
-
per_page: 10,
|
|
104
|
-
to: null,
|
|
105
|
-
total: 0
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
const emptyClient = new TestClient('https://api.quantcdn.io/v1', {}, emptyData);
|
|
109
|
-
const response = new response_1.PaginatedResponse(emptyClient, options);
|
|
110
|
-
let results = [];
|
|
111
|
-
try {
|
|
112
|
-
for (var _d = true, response_3 = __asyncValues(response), response_3_1; response_3_1 = yield response_3.next(), _a = response_3_1.done, !_a; _d = true) {
|
|
113
|
-
_c = response_3_1.value;
|
|
114
|
-
_d = false;
|
|
115
|
-
const items = _c;
|
|
116
|
-
if (Array.isArray(items)) {
|
|
117
|
-
results = results.concat(items);
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
results.push(items);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
125
|
-
finally {
|
|
126
|
-
try {
|
|
127
|
-
if (!_d && !_a && (_b = response_3.return)) yield _b.call(response_3);
|
|
128
|
-
}
|
|
129
|
-
finally { if (e_2) throw e_2.error; }
|
|
130
|
-
}
|
|
131
|
-
(0, chai_1.expect)(results).to.deep.equal([]);
|
|
132
|
-
}));
|
|
133
|
-
});
|