@devopness/sdk-js 3.5.5 → 3.6.0

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.
Files changed (74) hide show
  1. package/dist/api/generated/apis/actions-api.d.ts +3 -1
  2. package/dist/api/generated/apis/actions-api.js +18 -29
  3. package/dist/api/generated/apis/actions-logs-api.js +1 -2
  4. package/dist/api/generated/apis/applications-api.js +11 -20
  5. package/dist/api/generated/apis/applications-hooks-api.js +5 -8
  6. package/dist/api/generated/apis/applications-variables-api.js +6 -10
  7. package/dist/api/generated/apis/credentials-api.js +26 -46
  8. package/dist/api/generated/apis/credentials-repositories-api.js +6 -10
  9. package/dist/api/generated/apis/cron-jobs-api.js +10 -18
  10. package/dist/api/generated/apis/daemons-api.js +14 -26
  11. package/dist/api/generated/apis/environments-actions-api.d.ts +6 -2
  12. package/dist/api/generated/apis/environments-actions-api.js +15 -18
  13. package/dist/api/generated/apis/environments-api.js +5 -10
  14. package/dist/api/generated/apis/hook-requests-api.js +1 -2
  15. package/dist/api/generated/apis/hooks-api.js +4 -8
  16. package/dist/api/generated/apis/hooks-requests-api.js +5 -8
  17. package/dist/api/generated/apis/network-rules-api.js +10 -18
  18. package/dist/api/generated/apis/networks-api.js +13 -18
  19. package/dist/api/generated/apis/networks-subnets-api.js +8 -10
  20. package/dist/api/generated/apis/organizations-api.js +9 -16
  21. package/dist/api/generated/apis/pipelines-actions-api.js +6 -10
  22. package/dist/api/generated/apis/pipelines-api.js +9 -16
  23. package/dist/api/generated/apis/pipelines-hooks-api.js +6 -10
  24. package/dist/api/generated/apis/pipelines-steps-api.js +4 -8
  25. package/dist/api/generated/apis/projects-actions-api.js +5 -8
  26. package/dist/api/generated/apis/projects-api.js +11 -18
  27. package/dist/api/generated/apis/projects-apitokens-api.js +9 -16
  28. package/dist/api/generated/apis/projects-archived-environments-api.js +5 -8
  29. package/dist/api/generated/apis/projects-environments-api.js +6 -10
  30. package/dist/api/generated/apis/resource-events-api.js +6 -10
  31. package/dist/api/generated/apis/resource-links-api.js +12 -20
  32. package/dist/api/generated/apis/roles-api.js +9 -16
  33. package/dist/api/generated/apis/servers-api.js +19 -38
  34. package/dist/api/generated/apis/services-api.js +15 -28
  35. package/dist/api/generated/apis/services-variables-api.js +6 -10
  36. package/dist/api/generated/apis/social-accounts-api.js +9 -16
  37. package/dist/api/generated/apis/sshkeys-api.js +10 -18
  38. package/dist/api/generated/apis/sslcertificates-api.js +9 -16
  39. package/dist/api/generated/apis/static-data-api.js +27 -52
  40. package/dist/api/generated/apis/subnets-api.js +7 -12
  41. package/dist/api/generated/apis/team-invitations-api.js +6 -12
  42. package/dist/api/generated/apis/teams-api.js +32 -60
  43. package/dist/api/generated/apis/teams-invitations-api.js +6 -10
  44. package/dist/api/generated/apis/teams-members-api.js +7 -12
  45. package/dist/api/generated/apis/users-api.js +12 -24
  46. package/dist/api/generated/apis/users-environments-api.js +6 -8
  47. package/dist/api/generated/apis/users-passwords-api.js +2 -4
  48. package/dist/api/generated/apis/users-personal-access-tokens-api.js +9 -16
  49. package/dist/api/generated/apis/users-projects-api.js +6 -8
  50. package/dist/api/generated/apis/users-team-invitations-api.js +5 -8
  51. package/dist/api/generated/apis/variables-api.js +11 -16
  52. package/dist/api/generated/apis/virtual-hosts-api.js +11 -20
  53. package/dist/api/generated/models/application-apply-template-response.d.ts +1 -1
  54. package/dist/api/generated/models/application-environment-apply-template.d.ts +14 -2
  55. package/dist/api/generated/models/application-environment-create.d.ts +1 -1
  56. package/dist/api/generated/models/application-relation.d.ts +1 -1
  57. package/dist/api/generated/models/application-update.d.ts +1 -1
  58. package/dist/api/generated/models/application.d.ts +1 -1
  59. package/dist/api/generated/models/index.d.ts +3 -0
  60. package/dist/api/generated/models/index.js +3 -0
  61. package/dist/api/generated/models/list-actions-filter-parameter.d.ts +60 -0
  62. package/dist/api/generated/models/list-actions-filter-parameter.js +14 -0
  63. package/dist/api/generated/models/list-environment-actions-by-resource-type-filter-parameter.d.ts +36 -0
  64. package/dist/api/generated/models/list-environment-actions-by-resource-type-filter-parameter.js +14 -0
  65. package/dist/api/generated/models/list-environment-actions-filter-parameter.d.ts +42 -0
  66. package/dist/api/generated/models/list-environment-actions-filter-parameter.js +14 -0
  67. package/dist/api/generated/models/virtual-host-environment-create.d.ts +2 -2
  68. package/dist/api/generated/models/virtual-host-relation.d.ts +1 -1
  69. package/dist/api/generated/models/virtual-host-update.d.ts +2 -2
  70. package/dist/api/generated/models/virtual-host.d.ts +1 -1
  71. package/dist/common/utils.d.ts +12 -0
  72. package/dist/common/utils.js +71 -0
  73. package/dist/services/ApiBaseService.d.ts +4 -4
  74. package/package.json +3 -3
@@ -25,6 +25,7 @@ exports.ServersApiService = void 0;
25
25
  const ApiBaseService_1 = require("../../../services/ApiBaseService");
26
26
  const ApiResponse_1 = require("../../../common/ApiResponse");
27
27
  const Exceptions_1 = require("../../../common/Exceptions");
28
+ const utils_1 = require("../../../common/utils");
28
29
  /**
29
30
  * ServersApiService - Auto-generated
30
31
  */
@@ -43,8 +44,7 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
43
44
  if (serverEnvironmentCreate === null || serverEnvironmentCreate === undefined) {
44
45
  throw new Exceptions_1.ArgumentNullException('serverEnvironmentCreate', 'addEnvironmentServer');
45
46
  }
46
- let queryString = '';
47
- const requestUrl = '/environments/{environment_id}/servers' + (queryString ? `?${queryString}` : '');
47
+ const requestUrl = '/environments/{environment_id}/servers';
48
48
  const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), serverEnvironmentCreate);
49
49
  return new ApiResponse_1.ApiResponse(response);
50
50
  });
@@ -63,8 +63,7 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
63
63
  if (serverId === null || serverId === undefined) {
64
64
  throw new Exceptions_1.ArgumentNullException('serverId', 'connectServer');
65
65
  }
66
- let queryString = '';
67
- const requestUrl = '/servers/{server_id}/connect/{activation_token}' + (queryString ? `?${queryString}` : '');
66
+ const requestUrl = '/servers/{server_id}/connect/{activation_token}';
68
67
  const response = yield this.post(requestUrl.replace(`{${"activation_token"}}`, encodeURIComponent(String(activationToken))).replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))));
69
68
  return new ApiResponse_1.ApiResponse(response);
70
69
  });
@@ -80,14 +79,9 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
80
79
  if (serverId === null || serverId === undefined) {
81
80
  throw new Exceptions_1.ArgumentNullException('serverId', 'deleteServer');
82
81
  }
83
- let queryString = '';
84
- const queryParams = { destroy_server_disks: destroyServerDisks, };
85
- for (const key in queryParams) {
86
- if (queryParams[key] === undefined || queryParams[key] === null) {
87
- continue;
88
- }
89
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
90
- }
82
+ let queryString = (0, utils_1.parseQueryString)({
83
+ 'destroy_server_disks': destroyServerDisks,
84
+ });
91
85
  const requestUrl = '/servers/{server_id}' + (queryString ? `?${queryString}` : '');
92
86
  const response = yield this.delete(requestUrl.replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))));
93
87
  return new ApiResponse_1.ApiResponse(response);
@@ -103,8 +97,7 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
103
97
  if (serverId === null || serverId === undefined) {
104
98
  throw new Exceptions_1.ArgumentNullException('serverId', 'deployServer');
105
99
  }
106
- let queryString = '';
107
- const requestUrl = '/servers/{server_id}/deploy' + (queryString ? `?${queryString}` : '');
100
+ const requestUrl = '/servers/{server_id}/deploy';
108
101
  const response = yield this.post(requestUrl.replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))));
109
102
  return new ApiResponse_1.ApiResponse(response);
110
103
  });
@@ -119,8 +112,7 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
119
112
  if (serverId === null || serverId === undefined) {
120
113
  throw new Exceptions_1.ArgumentNullException('serverId', 'getServer');
121
114
  }
122
- let queryString = '';
123
- const requestUrl = '/servers/{server_id}' + (queryString ? `?${queryString}` : '');
115
+ const requestUrl = '/servers/{server_id}';
124
116
  const response = yield this.get(requestUrl.replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))));
125
117
  return new ApiResponse_1.ApiResponse(response);
126
118
  });
@@ -135,8 +127,7 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
135
127
  if (serverId === null || serverId === undefined) {
136
128
  throw new Exceptions_1.ArgumentNullException('serverId', 'getServerCommands');
137
129
  }
138
- let queryString = '';
139
- const requestUrl = '/servers/{server_id}/commands' + (queryString ? `?${queryString}` : '');
130
+ const requestUrl = '/servers/{server_id}/commands';
140
131
  const response = yield this.get(requestUrl.replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))));
141
132
  return new ApiResponse_1.ApiResponse(response);
142
133
  });
@@ -151,8 +142,7 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
151
142
  if (serverId === null || serverId === undefined) {
152
143
  throw new Exceptions_1.ArgumentNullException('serverId', 'getStatusServer');
153
144
  }
154
- let queryString = '';
155
- const requestUrl = '/servers/{server_id}/get-status' + (queryString ? `?${queryString}` : '');
145
+ const requestUrl = '/servers/{server_id}/get-status';
156
146
  const response = yield this.post(requestUrl.replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))));
157
147
  return new ApiResponse_1.ApiResponse(response);
158
148
  });
@@ -169,14 +159,10 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
169
159
  if (environmentId === null || environmentId === undefined) {
170
160
  throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentServers');
171
161
  }
172
- let queryString = '';
173
- const queryParams = { page: page, per_page: perPage, };
174
- for (const key in queryParams) {
175
- if (queryParams[key] === undefined || queryParams[key] === null) {
176
- continue;
177
- }
178
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
179
- }
162
+ let queryString = (0, utils_1.parseQueryString)({
163
+ 'page': page,
164
+ 'per_page': perPage,
165
+ });
180
166
  const requestUrl = '/environments/{environment_id}/servers' + (queryString ? `?${queryString}` : '');
181
167
  const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
182
168
  return new ApiResponse_1.ApiResponse(response);
@@ -192,8 +178,7 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
192
178
  if (serverId === null || serverId === undefined) {
193
179
  throw new Exceptions_1.ArgumentNullException('serverId', 'restartServer');
194
180
  }
195
- let queryString = '';
196
- const requestUrl = '/servers/{server_id}/restart' + (queryString ? `?${queryString}` : '');
181
+ const requestUrl = '/servers/{server_id}/restart';
197
182
  const response = yield this.post(requestUrl.replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))));
198
183
  return new ApiResponse_1.ApiResponse(response);
199
184
  });
@@ -208,8 +193,7 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
208
193
  if (serverId === null || serverId === undefined) {
209
194
  throw new Exceptions_1.ArgumentNullException('serverId', 'rotateKeyServer');
210
195
  }
211
- let queryString = '';
212
- const requestUrl = '/servers/{server_id}/rotate-key' + (queryString ? `?${queryString}` : '');
196
+ const requestUrl = '/servers/{server_id}/rotate-key';
213
197
  const response = yield this.post(requestUrl.replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))));
214
198
  return new ApiResponse_1.ApiResponse(response);
215
199
  });
@@ -224,8 +208,7 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
224
208
  if (serverId === null || serverId === undefined) {
225
209
  throw new Exceptions_1.ArgumentNullException('serverId', 'startServer');
226
210
  }
227
- let queryString = '';
228
- const requestUrl = '/servers/{server_id}/start' + (queryString ? `?${queryString}` : '');
211
+ const requestUrl = '/servers/{server_id}/start';
229
212
  const response = yield this.post(requestUrl.replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))));
230
213
  return new ApiResponse_1.ApiResponse(response);
231
214
  });
@@ -240,8 +223,7 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
240
223
  if (serverId === null || serverId === undefined) {
241
224
  throw new Exceptions_1.ArgumentNullException('serverId', 'stopServer');
242
225
  }
243
- let queryString = '';
244
- const requestUrl = '/servers/{server_id}/stop' + (queryString ? `?${queryString}` : '');
226
+ const requestUrl = '/servers/{server_id}/stop';
245
227
  const response = yield this.post(requestUrl.replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))));
246
228
  return new ApiResponse_1.ApiResponse(response);
247
229
  });
@@ -260,8 +242,7 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
260
242
  if (serverUpdate === null || serverUpdate === undefined) {
261
243
  throw new Exceptions_1.ArgumentNullException('serverUpdate', 'updateServer');
262
244
  }
263
- let queryString = '';
264
- const requestUrl = '/servers/{server_id}' + (queryString ? `?${queryString}` : '');
245
+ const requestUrl = '/servers/{server_id}';
265
246
  const response = yield this.put(requestUrl.replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))), serverUpdate);
266
247
  return new ApiResponse_1.ApiResponse(response);
267
248
  });
@@ -25,6 +25,7 @@ exports.ServicesApiService = void 0;
25
25
  const ApiBaseService_1 = require("../../../services/ApiBaseService");
26
26
  const ApiResponse_1 = require("../../../common/ApiResponse");
27
27
  const Exceptions_1 = require("../../../common/Exceptions");
28
+ const utils_1 = require("../../../common/utils");
28
29
  /**
29
30
  * ServicesApiService - Auto-generated
30
31
  */
@@ -43,8 +44,7 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
43
44
  if (serviceEnvironmentCreate === null || serviceEnvironmentCreate === undefined) {
44
45
  throw new Exceptions_1.ArgumentNullException('serviceEnvironmentCreate', 'addEnvironmentService');
45
46
  }
46
- let queryString = '';
47
- const requestUrl = '/environments/{environment_id}/services' + (queryString ? `?${queryString}` : '');
47
+ const requestUrl = '/environments/{environment_id}/services';
48
48
  const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), serviceEnvironmentCreate);
49
49
  return new ApiResponse_1.ApiResponse(response);
50
50
  });
@@ -59,8 +59,7 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
59
59
  if (serviceId === null || serviceId === undefined) {
60
60
  throw new Exceptions_1.ArgumentNullException('serviceId', 'deleteService');
61
61
  }
62
- let queryString = '';
63
- const requestUrl = '/services/{service_id}' + (queryString ? `?${queryString}` : '');
62
+ const requestUrl = '/services/{service_id}';
64
63
  const response = yield this.delete(requestUrl.replace(`{${"service_id"}}`, encodeURIComponent(String(serviceId))));
65
64
  return new ApiResponse_1.ApiResponse(response);
66
65
  });
@@ -79,8 +78,7 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
79
78
  if (serviceDeploy === null || serviceDeploy === undefined) {
80
79
  throw new Exceptions_1.ArgumentNullException('serviceDeploy', 'deployService');
81
80
  }
82
- let queryString = '';
83
- const requestUrl = '/services/{service_id}/deploy' + (queryString ? `?${queryString}` : '');
81
+ const requestUrl = '/services/{service_id}/deploy';
84
82
  const response = yield this.post(requestUrl.replace(`{${"service_id"}}`, encodeURIComponent(String(serviceId))), serviceDeploy);
85
83
  return new ApiResponse_1.ApiResponse(response);
86
84
  });
@@ -95,8 +93,7 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
95
93
  if (serviceId === null || serviceId === undefined) {
96
94
  throw new Exceptions_1.ArgumentNullException('serviceId', 'getService');
97
95
  }
98
- let queryString = '';
99
- const requestUrl = '/services/{service_id}' + (queryString ? `?${queryString}` : '');
96
+ const requestUrl = '/services/{service_id}';
100
97
  const response = yield this.get(requestUrl.replace(`{${"service_id"}}`, encodeURIComponent(String(serviceId))));
101
98
  return new ApiResponse_1.ApiResponse(response);
102
99
  });
@@ -115,8 +112,7 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
115
112
  if (serviceGetStatus === null || serviceGetStatus === undefined) {
116
113
  throw new Exceptions_1.ArgumentNullException('serviceGetStatus', 'getStatusService');
117
114
  }
118
- let queryString = '';
119
- const requestUrl = '/services/{service_id}/get-status' + (queryString ? `?${queryString}` : '');
115
+ const requestUrl = '/services/{service_id}/get-status';
120
116
  const response = yield this.post(requestUrl.replace(`{${"service_id"}}`, encodeURIComponent(String(serviceId))), serviceGetStatus);
121
117
  return new ApiResponse_1.ApiResponse(response);
122
118
  });
@@ -133,14 +129,10 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
133
129
  if (environmentId === null || environmentId === undefined) {
134
130
  throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentServices');
135
131
  }
136
- let queryString = '';
137
- const queryParams = { page: page, per_page: perPage, };
138
- for (const key in queryParams) {
139
- if (queryParams[key] === undefined || queryParams[key] === null) {
140
- continue;
141
- }
142
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
143
- }
132
+ let queryString = (0, utils_1.parseQueryString)({
133
+ 'page': page,
134
+ 'per_page': perPage,
135
+ });
144
136
  const requestUrl = '/environments/{environment_id}/services' + (queryString ? `?${queryString}` : '');
145
137
  const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
146
138
  return new ApiResponse_1.ApiResponse(response);
@@ -160,8 +152,7 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
160
152
  if (serviceReload === null || serviceReload === undefined) {
161
153
  throw new Exceptions_1.ArgumentNullException('serviceReload', 'reloadService');
162
154
  }
163
- let queryString = '';
164
- const requestUrl = '/services/{service_id}/reload' + (queryString ? `?${queryString}` : '');
155
+ const requestUrl = '/services/{service_id}/reload';
165
156
  const response = yield this.post(requestUrl.replace(`{${"service_id"}}`, encodeURIComponent(String(serviceId))), serviceReload);
166
157
  return new ApiResponse_1.ApiResponse(response);
167
158
  });
@@ -180,8 +171,7 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
180
171
  if (serviceRestart === null || serviceRestart === undefined) {
181
172
  throw new Exceptions_1.ArgumentNullException('serviceRestart', 'restartService');
182
173
  }
183
- let queryString = '';
184
- const requestUrl = '/services/{service_id}/restart' + (queryString ? `?${queryString}` : '');
174
+ const requestUrl = '/services/{service_id}/restart';
185
175
  const response = yield this.post(requestUrl.replace(`{${"service_id"}}`, encodeURIComponent(String(serviceId))), serviceRestart);
186
176
  return new ApiResponse_1.ApiResponse(response);
187
177
  });
@@ -200,8 +190,7 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
200
190
  if (serviceStart === null || serviceStart === undefined) {
201
191
  throw new Exceptions_1.ArgumentNullException('serviceStart', 'startService');
202
192
  }
203
- let queryString = '';
204
- const requestUrl = '/services/{service_id}/start' + (queryString ? `?${queryString}` : '');
193
+ const requestUrl = '/services/{service_id}/start';
205
194
  const response = yield this.post(requestUrl.replace(`{${"service_id"}}`, encodeURIComponent(String(serviceId))), serviceStart);
206
195
  return new ApiResponse_1.ApiResponse(response);
207
196
  });
@@ -220,8 +209,7 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
220
209
  if (serviceStop === null || serviceStop === undefined) {
221
210
  throw new Exceptions_1.ArgumentNullException('serviceStop', 'stopService');
222
211
  }
223
- let queryString = '';
224
- const requestUrl = '/services/{service_id}/stop' + (queryString ? `?${queryString}` : '');
212
+ const requestUrl = '/services/{service_id}/stop';
225
213
  const response = yield this.post(requestUrl.replace(`{${"service_id"}}`, encodeURIComponent(String(serviceId))), serviceStop);
226
214
  return new ApiResponse_1.ApiResponse(response);
227
215
  });
@@ -240,8 +228,7 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
240
228
  if (serviceUpdate === null || serviceUpdate === undefined) {
241
229
  throw new Exceptions_1.ArgumentNullException('serviceUpdate', 'updateService');
242
230
  }
243
- let queryString = '';
244
- const requestUrl = '/services/{service_id}' + (queryString ? `?${queryString}` : '');
231
+ const requestUrl = '/services/{service_id}';
245
232
  const response = yield this.put(requestUrl.replace(`{${"service_id"}}`, encodeURIComponent(String(serviceId))), serviceUpdate);
246
233
  return new ApiResponse_1.ApiResponse(response);
247
234
  });
@@ -25,6 +25,7 @@ exports.ServicesVariablesApiService = void 0;
25
25
  const ApiBaseService_1 = require("../../../services/ApiBaseService");
26
26
  const ApiResponse_1 = require("../../../common/ApiResponse");
27
27
  const Exceptions_1 = require("../../../common/Exceptions");
28
+ const utils_1 = require("../../../common/utils");
28
29
  /**
29
30
  * ServicesVariablesApiService - Auto-generated
30
31
  */
@@ -44,8 +45,7 @@ class ServicesVariablesApiService extends ApiBaseService_1.ApiBaseService {
44
45
  if (variableServiceCreate === null || variableServiceCreate === undefined) {
45
46
  throw new Exceptions_1.ArgumentNullException('variableServiceCreate', 'addServiceVariable');
46
47
  }
47
- let queryString = '';
48
- const requestUrl = '/services/{service_id}/variables' + (queryString ? `?${queryString}` : '');
48
+ const requestUrl = '/services/{service_id}/variables';
49
49
  const response = yield this.post(requestUrl.replace(`{${"service_id"}}`, encodeURIComponent(String(serviceId))), variableServiceCreate);
50
50
  return new ApiResponse_1.ApiResponse(response);
51
51
  });
@@ -63,14 +63,10 @@ class ServicesVariablesApiService extends ApiBaseService_1.ApiBaseService {
63
63
  if (serviceId === null || serviceId === undefined) {
64
64
  throw new Exceptions_1.ArgumentNullException('serviceId', 'listServiceVariables');
65
65
  }
66
- let queryString = '';
67
- const queryParams = { page: page, per_page: perPage, };
68
- for (const key in queryParams) {
69
- if (queryParams[key] === undefined || queryParams[key] === null) {
70
- continue;
71
- }
72
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
73
- }
66
+ let queryString = (0, utils_1.parseQueryString)({
67
+ 'page': page,
68
+ 'per_page': perPage,
69
+ });
74
70
  const requestUrl = '/services/{service_id}/variables' + (queryString ? `?${queryString}` : '');
75
71
  const response = yield this.get(requestUrl.replace(`{${"service_id"}}`, encodeURIComponent(String(serviceId))));
76
72
  return new ApiResponse_1.ApiResponse(response);
@@ -25,6 +25,7 @@ exports.SocialAccountsApiService = void 0;
25
25
  const ApiBaseService_1 = require("../../../services/ApiBaseService");
26
26
  const ApiResponse_1 = require("../../../common/ApiResponse");
27
27
  const Exceptions_1 = require("../../../common/Exceptions");
28
+ const utils_1 = require("../../../common/utils");
28
29
  /**
29
30
  * SocialAccountsApiService - Auto-generated
30
31
  */
@@ -39,8 +40,7 @@ class SocialAccountsApiService extends ApiBaseService_1.ApiBaseService {
39
40
  if (socialAccountCreate === null || socialAccountCreate === undefined) {
40
41
  throw new Exceptions_1.ArgumentNullException('socialAccountCreate', 'addSocialAccount');
41
42
  }
42
- let queryString = '';
43
- const requestUrl = '/social-accounts' + (queryString ? `?${queryString}` : '');
43
+ const requestUrl = '/social-accounts';
44
44
  const response = yield this.post(requestUrl, socialAccountCreate);
45
45
  return new ApiResponse_1.ApiResponse(response);
46
46
  });
@@ -55,8 +55,7 @@ class SocialAccountsApiService extends ApiBaseService_1.ApiBaseService {
55
55
  if (socialAccountId === null || socialAccountId === undefined) {
56
56
  throw new Exceptions_1.ArgumentNullException('socialAccountId', 'deleteSocialAccount');
57
57
  }
58
- let queryString = '';
59
- const requestUrl = '/social-accounts/{social_account_id}' + (queryString ? `?${queryString}` : '');
58
+ const requestUrl = '/social-accounts/{social_account_id}';
60
59
  const response = yield this.delete(requestUrl.replace(`{${"social_account_id"}}`, encodeURIComponent(String(socialAccountId))));
61
60
  return new ApiResponse_1.ApiResponse(response);
62
61
  });
@@ -71,8 +70,7 @@ class SocialAccountsApiService extends ApiBaseService_1.ApiBaseService {
71
70
  if (socialAccountProvider === null || socialAccountProvider === undefined) {
72
71
  throw new Exceptions_1.ArgumentNullException('socialAccountProvider', 'getSocialAccount');
73
72
  }
74
- let queryString = '';
75
- const requestUrl = '/social-accounts/{social_account_provider}' + (queryString ? `?${queryString}` : '');
73
+ const requestUrl = '/social-accounts/{social_account_provider}';
76
74
  const response = yield this.get(requestUrl.replace(`{${"social_account_provider"}}`, encodeURIComponent(String(socialAccountProvider))));
77
75
  return new ApiResponse_1.ApiResponse(response);
78
76
  });
@@ -87,8 +85,7 @@ class SocialAccountsApiService extends ApiBaseService_1.ApiBaseService {
87
85
  if (socialAccountProvider === null || socialAccountProvider === undefined) {
88
86
  throw new Exceptions_1.ArgumentNullException('socialAccountProvider', 'getSocialAccountStatus');
89
87
  }
90
- let queryString = '';
91
- const requestUrl = '/social-accounts/{social_account_provider}/status' + (queryString ? `?${queryString}` : '');
88
+ const requestUrl = '/social-accounts/{social_account_provider}/status';
92
89
  const response = yield this.get(requestUrl.replace(`{${"social_account_provider"}}`, encodeURIComponent(String(socialAccountProvider))));
93
90
  return new ApiResponse_1.ApiResponse(response);
94
91
  });
@@ -101,14 +98,10 @@ class SocialAccountsApiService extends ApiBaseService_1.ApiBaseService {
101
98
  */
102
99
  listSocialAccounts(page, perPage) {
103
100
  return __awaiter(this, void 0, void 0, function* () {
104
- let queryString = '';
105
- const queryParams = { page: page, per_page: perPage, };
106
- for (const key in queryParams) {
107
- if (queryParams[key] === undefined || queryParams[key] === null) {
108
- continue;
109
- }
110
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
111
- }
101
+ let queryString = (0, utils_1.parseQueryString)({
102
+ 'page': page,
103
+ 'per_page': perPage,
104
+ });
112
105
  const requestUrl = '/social-accounts' + (queryString ? `?${queryString}` : '');
113
106
  const response = yield this.get(requestUrl);
114
107
  return new ApiResponse_1.ApiResponse(response);
@@ -25,6 +25,7 @@ exports.SSHKeysApiService = void 0;
25
25
  const ApiBaseService_1 = require("../../../services/ApiBaseService");
26
26
  const ApiResponse_1 = require("../../../common/ApiResponse");
27
27
  const Exceptions_1 = require("../../../common/Exceptions");
28
+ const utils_1 = require("../../../common/utils");
28
29
  /**
29
30
  * SSHKeysApiService - Auto-generated
30
31
  */
@@ -43,8 +44,7 @@ class SSHKeysApiService extends ApiBaseService_1.ApiBaseService {
43
44
  if (sshKeyEnvironmentCreate === null || sshKeyEnvironmentCreate === undefined) {
44
45
  throw new Exceptions_1.ArgumentNullException('sshKeyEnvironmentCreate', 'addEnvironmentSshKey');
45
46
  }
46
- let queryString = '';
47
- const requestUrl = '/environments/{environment_id}/ssh-keys' + (queryString ? `?${queryString}` : '');
47
+ const requestUrl = '/environments/{environment_id}/ssh-keys';
48
48
  const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), sshKeyEnvironmentCreate);
49
49
  return new ApiResponse_1.ApiResponse(response);
50
50
  });
@@ -59,8 +59,7 @@ class SSHKeysApiService extends ApiBaseService_1.ApiBaseService {
59
59
  if (sshKeyId === null || sshKeyId === undefined) {
60
60
  throw new Exceptions_1.ArgumentNullException('sshKeyId', 'deleteSshKey');
61
61
  }
62
- let queryString = '';
63
- const requestUrl = '/ssh-keys/{ssh_key_id}' + (queryString ? `?${queryString}` : '');
62
+ const requestUrl = '/ssh-keys/{ssh_key_id}';
64
63
  const response = yield this.delete(requestUrl.replace(`{${"ssh_key_id"}}`, encodeURIComponent(String(sshKeyId))));
65
64
  return new ApiResponse_1.ApiResponse(response);
66
65
  });
@@ -79,8 +78,7 @@ class SSHKeysApiService extends ApiBaseService_1.ApiBaseService {
79
78
  if (sshKeyDeploy === null || sshKeyDeploy === undefined) {
80
79
  throw new Exceptions_1.ArgumentNullException('sshKeyDeploy', 'deploySshKey');
81
80
  }
82
- let queryString = '';
83
- const requestUrl = '/ssh-keys/{ssh_key_id}/deploy' + (queryString ? `?${queryString}` : '');
81
+ const requestUrl = '/ssh-keys/{ssh_key_id}/deploy';
84
82
  const response = yield this.post(requestUrl.replace(`{${"ssh_key_id"}}`, encodeURIComponent(String(sshKeyId))), sshKeyDeploy);
85
83
  return new ApiResponse_1.ApiResponse(response);
86
84
  });
@@ -95,8 +93,7 @@ class SSHKeysApiService extends ApiBaseService_1.ApiBaseService {
95
93
  if (sshKeyId === null || sshKeyId === undefined) {
96
94
  throw new Exceptions_1.ArgumentNullException('sshKeyId', 'getSshKey');
97
95
  }
98
- let queryString = '';
99
- const requestUrl = '/ssh-keys/{ssh_key_id}' + (queryString ? `?${queryString}` : '');
96
+ const requestUrl = '/ssh-keys/{ssh_key_id}';
100
97
  const response = yield this.get(requestUrl.replace(`{${"ssh_key_id"}}`, encodeURIComponent(String(sshKeyId))));
101
98
  return new ApiResponse_1.ApiResponse(response);
102
99
  });
@@ -113,14 +110,10 @@ class SSHKeysApiService extends ApiBaseService_1.ApiBaseService {
113
110
  if (environmentId === null || environmentId === undefined) {
114
111
  throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentSshKeys');
115
112
  }
116
- let queryString = '';
117
- const queryParams = { page: page, per_page: perPage, };
118
- for (const key in queryParams) {
119
- if (queryParams[key] === undefined || queryParams[key] === null) {
120
- continue;
121
- }
122
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
123
- }
113
+ let queryString = (0, utils_1.parseQueryString)({
114
+ 'page': page,
115
+ 'per_page': perPage,
116
+ });
124
117
  const requestUrl = '/environments/{environment_id}/ssh-keys' + (queryString ? `?${queryString}` : '');
125
118
  const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
126
119
  return new ApiResponse_1.ApiResponse(response);
@@ -140,8 +133,7 @@ class SSHKeysApiService extends ApiBaseService_1.ApiBaseService {
140
133
  if (sshKeyUpdate === null || sshKeyUpdate === undefined) {
141
134
  throw new Exceptions_1.ArgumentNullException('sshKeyUpdate', 'updateSshKey');
142
135
  }
143
- let queryString = '';
144
- const requestUrl = '/ssh-keys/{ssh_key_id}' + (queryString ? `?${queryString}` : '');
136
+ const requestUrl = '/ssh-keys/{ssh_key_id}';
145
137
  const response = yield this.put(requestUrl.replace(`{${"ssh_key_id"}}`, encodeURIComponent(String(sshKeyId))), sshKeyUpdate);
146
138
  return new ApiResponse_1.ApiResponse(response);
147
139
  });
@@ -25,6 +25,7 @@ exports.SSLCertificatesApiService = void 0;
25
25
  const ApiBaseService_1 = require("../../../services/ApiBaseService");
26
26
  const ApiResponse_1 = require("../../../common/ApiResponse");
27
27
  const Exceptions_1 = require("../../../common/Exceptions");
28
+ const utils_1 = require("../../../common/utils");
28
29
  /**
29
30
  * SSLCertificatesApiService - Auto-generated
30
31
  */
@@ -43,8 +44,7 @@ class SSLCertificatesApiService extends ApiBaseService_1.ApiBaseService {
43
44
  if (sslCertificateEnvironmentCreate === null || sslCertificateEnvironmentCreate === undefined) {
44
45
  throw new Exceptions_1.ArgumentNullException('sslCertificateEnvironmentCreate', 'addEnvironmentSslCertificate');
45
46
  }
46
- let queryString = '';
47
- const requestUrl = '/environments/{environment_id}/ssl-certificates' + (queryString ? `?${queryString}` : '');
47
+ const requestUrl = '/environments/{environment_id}/ssl-certificates';
48
48
  const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), sslCertificateEnvironmentCreate);
49
49
  return new ApiResponse_1.ApiResponse(response);
50
50
  });
@@ -59,8 +59,7 @@ class SSLCertificatesApiService extends ApiBaseService_1.ApiBaseService {
59
59
  if (sslCertificateId === null || sslCertificateId === undefined) {
60
60
  throw new Exceptions_1.ArgumentNullException('sslCertificateId', 'deleteSslCertificate');
61
61
  }
62
- let queryString = '';
63
- const requestUrl = '/ssl-certificates/{ssl_certificate_id}' + (queryString ? `?${queryString}` : '');
62
+ const requestUrl = '/ssl-certificates/{ssl_certificate_id}';
64
63
  const response = yield this.delete(requestUrl.replace(`{${"ssl_certificate_id"}}`, encodeURIComponent(String(sslCertificateId))));
65
64
  return new ApiResponse_1.ApiResponse(response);
66
65
  });
@@ -79,8 +78,7 @@ class SSLCertificatesApiService extends ApiBaseService_1.ApiBaseService {
79
78
  if (sslCertificateDeploy === null || sslCertificateDeploy === undefined) {
80
79
  throw new Exceptions_1.ArgumentNullException('sslCertificateDeploy', 'deploySslCertificate');
81
80
  }
82
- let queryString = '';
83
- const requestUrl = '/ssl-certificates/{ssl_certificate_id}/deploy' + (queryString ? `?${queryString}` : '');
81
+ const requestUrl = '/ssl-certificates/{ssl_certificate_id}/deploy';
84
82
  const response = yield this.post(requestUrl.replace(`{${"ssl_certificate_id"}}`, encodeURIComponent(String(sslCertificateId))), sslCertificateDeploy);
85
83
  return new ApiResponse_1.ApiResponse(response);
86
84
  });
@@ -95,8 +93,7 @@ class SSLCertificatesApiService extends ApiBaseService_1.ApiBaseService {
95
93
  if (sslCertificateId === null || sslCertificateId === undefined) {
96
94
  throw new Exceptions_1.ArgumentNullException('sslCertificateId', 'getSslCertificate');
97
95
  }
98
- let queryString = '';
99
- const requestUrl = '/ssl-certificates/{ssl_certificate_id}' + (queryString ? `?${queryString}` : '');
96
+ const requestUrl = '/ssl-certificates/{ssl_certificate_id}';
100
97
  const response = yield this.get(requestUrl.replace(`{${"ssl_certificate_id"}}`, encodeURIComponent(String(sslCertificateId))));
101
98
  return new ApiResponse_1.ApiResponse(response);
102
99
  });
@@ -113,14 +110,10 @@ class SSLCertificatesApiService extends ApiBaseService_1.ApiBaseService {
113
110
  if (environmentId === null || environmentId === undefined) {
114
111
  throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentSslCertificates');
115
112
  }
116
- let queryString = '';
117
- const queryParams = { page: page, per_page: perPage, };
118
- for (const key in queryParams) {
119
- if (queryParams[key] === undefined || queryParams[key] === null) {
120
- continue;
121
- }
122
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
123
- }
113
+ let queryString = (0, utils_1.parseQueryString)({
114
+ 'page': page,
115
+ 'per_page': perPage,
116
+ });
124
117
  const requestUrl = '/environments/{environment_id}/ssl-certificates' + (queryString ? `?${queryString}` : '');
125
118
  const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
126
119
  return new ApiResponse_1.ApiResponse(response);