@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.PipelinesActionsApiService = 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
  * PipelinesActionsApiService - Auto-generated
30
31
  */
@@ -43,8 +44,7 @@ class PipelinesActionsApiService extends ApiBaseService_1.ApiBaseService {
43
44
  if (actionPipelineCreate === null || actionPipelineCreate === undefined) {
44
45
  throw new Exceptions_1.ArgumentNullException('actionPipelineCreate', 'addPipelineAction');
45
46
  }
46
- let queryString = '';
47
- const requestUrl = '/pipelines/{pipeline_id}/actions' + (queryString ? `?${queryString}` : '');
47
+ const requestUrl = '/pipelines/{pipeline_id}/actions';
48
48
  const response = yield this.post(requestUrl.replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))), actionPipelineCreate);
49
49
  return new ApiResponse_1.ApiResponse(response);
50
50
  });
@@ -61,14 +61,10 @@ class PipelinesActionsApiService extends ApiBaseService_1.ApiBaseService {
61
61
  if (pipelineId === null || pipelineId === undefined) {
62
62
  throw new Exceptions_1.ArgumentNullException('pipelineId', 'listPipelineActions');
63
63
  }
64
- let queryString = '';
65
- const queryParams = { page: page, per_page: perPage, };
66
- for (const key in queryParams) {
67
- if (queryParams[key] === undefined || queryParams[key] === null) {
68
- continue;
69
- }
70
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
71
- }
64
+ let queryString = (0, utils_1.parseQueryString)({
65
+ 'page': page,
66
+ 'per_page': perPage,
67
+ });
72
68
  const requestUrl = '/pipelines/{pipeline_id}/actions' + (queryString ? `?${queryString}` : '');
73
69
  const response = yield this.get(requestUrl.replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))));
74
70
  return new ApiResponse_1.ApiResponse(response);
@@ -25,6 +25,7 @@ exports.PipelinesApiService = 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
  * PipelinesApiService - Auto-generated
30
31
  */
@@ -47,8 +48,7 @@ class PipelinesApiService extends ApiBaseService_1.ApiBaseService {
47
48
  if (pipelineCreate === null || pipelineCreate === undefined) {
48
49
  throw new Exceptions_1.ArgumentNullException('pipelineCreate', 'addPipeline');
49
50
  }
50
- let queryString = '';
51
- const requestUrl = '/pipelines/{resource_type}/{resource_id}' + (queryString ? `?${queryString}` : '');
51
+ const requestUrl = '/pipelines/{resource_type}/{resource_id}';
52
52
  const response = yield this.post(requestUrl.replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId))).replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))), pipelineCreate);
53
53
  return new ApiResponse_1.ApiResponse(response);
54
54
  });
@@ -63,8 +63,7 @@ class PipelinesApiService extends ApiBaseService_1.ApiBaseService {
63
63
  if (pipelineId === null || pipelineId === undefined) {
64
64
  throw new Exceptions_1.ArgumentNullException('pipelineId', 'deletePipeline');
65
65
  }
66
- let queryString = '';
67
- const requestUrl = '/pipelines/{pipeline_id}' + (queryString ? `?${queryString}` : '');
66
+ const requestUrl = '/pipelines/{pipeline_id}';
68
67
  const response = yield this.delete(requestUrl.replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))));
69
68
  return new ApiResponse_1.ApiResponse(response);
70
69
  });
@@ -79,8 +78,7 @@ class PipelinesApiService extends ApiBaseService_1.ApiBaseService {
79
78
  if (pipelineId === null || pipelineId === undefined) {
80
79
  throw new Exceptions_1.ArgumentNullException('pipelineId', 'getPipeline');
81
80
  }
82
- let queryString = '';
83
- const requestUrl = '/pipelines/{pipeline_id}' + (queryString ? `?${queryString}` : '');
81
+ const requestUrl = '/pipelines/{pipeline_id}';
84
82
  const response = yield this.get(requestUrl.replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))));
85
83
  return new ApiResponse_1.ApiResponse(response);
86
84
  });
@@ -101,14 +99,10 @@ class PipelinesApiService extends ApiBaseService_1.ApiBaseService {
101
99
  if (resourceType === null || resourceType === undefined) {
102
100
  throw new Exceptions_1.ArgumentNullException('resourceType', 'listPipelinesByResourceType');
103
101
  }
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
- }
102
+ let queryString = (0, utils_1.parseQueryString)({
103
+ 'page': page,
104
+ 'per_page': perPage,
105
+ });
112
106
  const requestUrl = '/pipelines/{resource_type}/{resource_id}' + (queryString ? `?${queryString}` : '');
113
107
  const response = yield this.get(requestUrl.replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId))).replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))));
114
108
  return new ApiResponse_1.ApiResponse(response);
@@ -128,8 +122,7 @@ class PipelinesApiService extends ApiBaseService_1.ApiBaseService {
128
122
  if (pipelineUpdate === null || pipelineUpdate === undefined) {
129
123
  throw new Exceptions_1.ArgumentNullException('pipelineUpdate', 'updatePipeline');
130
124
  }
131
- let queryString = '';
132
- const requestUrl = '/pipelines/{pipeline_id}' + (queryString ? `?${queryString}` : '');
125
+ const requestUrl = '/pipelines/{pipeline_id}';
133
126
  const response = yield this.put(requestUrl.replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))), pipelineUpdate);
134
127
  return new ApiResponse_1.ApiResponse(response);
135
128
  });
@@ -25,6 +25,7 @@ exports.PipelinesHooksApiService = 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
  * PipelinesHooksApiService - Auto-generated
30
31
  */
@@ -47,8 +48,7 @@ class PipelinesHooksApiService extends ApiBaseService_1.ApiBaseService {
47
48
  if (hookPipelineCreate === null || hookPipelineCreate === undefined) {
48
49
  throw new Exceptions_1.ArgumentNullException('hookPipelineCreate', 'addPipelineHook');
49
50
  }
50
- let queryString = '';
51
- const requestUrl = '/pipelines/{pipeline_id}/hooks/{hook_type}' + (queryString ? `?${queryString}` : '');
51
+ const requestUrl = '/pipelines/{pipeline_id}/hooks/{hook_type}';
52
52
  const response = yield this.post(requestUrl.replace(`{${"hook_type"}}`, encodeURIComponent(String(hookType))).replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))), hookPipelineCreate);
53
53
  return new ApiResponse_1.ApiResponse(response);
54
54
  });
@@ -65,14 +65,10 @@ class PipelinesHooksApiService extends ApiBaseService_1.ApiBaseService {
65
65
  if (pipelineId === null || pipelineId === undefined) {
66
66
  throw new Exceptions_1.ArgumentNullException('pipelineId', 'listPipelineHooks');
67
67
  }
68
- let queryString = '';
69
- const queryParams = { page: page, per_page: perPage, };
70
- for (const key in queryParams) {
71
- if (queryParams[key] === undefined || queryParams[key] === null) {
72
- continue;
73
- }
74
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
75
- }
68
+ let queryString = (0, utils_1.parseQueryString)({
69
+ 'page': page,
70
+ 'per_page': perPage,
71
+ });
76
72
  const requestUrl = '/pipelines/{pipeline_id}/hooks' + (queryString ? `?${queryString}` : '');
77
73
  const response = yield this.get(requestUrl.replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))));
78
74
  return new ApiResponse_1.ApiResponse(response);
@@ -43,8 +43,7 @@ class PipelinesStepsApiService extends ApiBaseService_1.ApiBaseService {
43
43
  if (stepPipelineCreate === null || stepPipelineCreate === undefined) {
44
44
  throw new Exceptions_1.ArgumentNullException('stepPipelineCreate', 'addPipelineStep');
45
45
  }
46
- let queryString = '';
47
- const requestUrl = '/pipelines/{pipeline_id}/steps' + (queryString ? `?${queryString}` : '');
46
+ const requestUrl = '/pipelines/{pipeline_id}/steps';
48
47
  const response = yield this.post(requestUrl.replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))), stepPipelineCreate);
49
48
  return new ApiResponse_1.ApiResponse(response);
50
49
  });
@@ -63,8 +62,7 @@ class PipelinesStepsApiService extends ApiBaseService_1.ApiBaseService {
63
62
  if (stepId === null || stepId === undefined) {
64
63
  throw new Exceptions_1.ArgumentNullException('stepId', 'linkStepToPipeline');
65
64
  }
66
- let queryString = '';
67
- const requestUrl = '/pipelines/{pipeline_id}/steps/{step_id}/link' + (queryString ? `?${queryString}` : '');
65
+ const requestUrl = '/pipelines/{pipeline_id}/steps/{step_id}/link';
68
66
  const response = yield this.post(requestUrl.replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))).replace(`{${"step_id"}}`, encodeURIComponent(String(stepId))));
69
67
  return new ApiResponse_1.ApiResponse(response);
70
68
  });
@@ -83,8 +81,7 @@ class PipelinesStepsApiService extends ApiBaseService_1.ApiBaseService {
83
81
  if (stepId === null || stepId === undefined) {
84
82
  throw new Exceptions_1.ArgumentNullException('stepId', 'unlinkStepFromPipeline');
85
83
  }
86
- let queryString = '';
87
- const requestUrl = '/pipelines/{pipeline_id}/steps/{step_id}/unlink' + (queryString ? `?${queryString}` : '');
84
+ const requestUrl = '/pipelines/{pipeline_id}/steps/{step_id}/unlink';
88
85
  const response = yield this.delete(requestUrl.replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))).replace(`{${"step_id"}}`, encodeURIComponent(String(stepId))));
89
86
  return new ApiResponse_1.ApiResponse(response);
90
87
  });
@@ -107,8 +104,7 @@ class PipelinesStepsApiService extends ApiBaseService_1.ApiBaseService {
107
104
  if (stepPipelineUpdate === null || stepPipelineUpdate === undefined) {
108
105
  throw new Exceptions_1.ArgumentNullException('stepPipelineUpdate', 'updatePipelineStep');
109
106
  }
110
- let queryString = '';
111
- const requestUrl = '/pipelines/{pipeline_id}/steps/{step_id}' + (queryString ? `?${queryString}` : '');
107
+ const requestUrl = '/pipelines/{pipeline_id}/steps/{step_id}';
112
108
  const response = yield this.put(requestUrl.replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))).replace(`{${"step_id"}}`, encodeURIComponent(String(stepId))), stepPipelineUpdate);
113
109
  return new ApiResponse_1.ApiResponse(response);
114
110
  });
@@ -25,6 +25,7 @@ exports.ProjectsActionsApiService = 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
  * ProjectsActionsApiService - Auto-generated
30
31
  */
@@ -45,14 +46,10 @@ class ProjectsActionsApiService extends ApiBaseService_1.ApiBaseService {
45
46
  if (resourceType === null || resourceType === undefined) {
46
47
  throw new Exceptions_1.ArgumentNullException('resourceType', 'listProjectActionsByResourceType');
47
48
  }
48
- let queryString = '';
49
- const queryParams = { page: page, per_page: perPage, };
50
- for (const key in queryParams) {
51
- if (queryParams[key] === undefined || queryParams[key] === null) {
52
- continue;
53
- }
54
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
55
- }
49
+ let queryString = (0, utils_1.parseQueryString)({
50
+ 'page': page,
51
+ 'per_page': perPage,
52
+ });
56
53
  const requestUrl = '/projects/{project_id}/actions/{resource_type}' + (queryString ? `?${queryString}` : '');
57
54
  const response = yield this.get(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))).replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))));
58
55
  return new ApiResponse_1.ApiResponse(response);
@@ -25,6 +25,7 @@ exports.ProjectsApiService = 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
  * ProjectsApiService - Auto-generated
30
31
  */
@@ -43,8 +44,7 @@ class ProjectsApiService extends ApiBaseService_1.ApiBaseService {
43
44
  if (projectOrganizationCreate === null || projectOrganizationCreate === undefined) {
44
45
  throw new Exceptions_1.ArgumentNullException('projectOrganizationCreate', 'addOrganizationProject');
45
46
  }
46
- let queryString = '';
47
- const requestUrl = '/organizations/{organization_id}/projects' + (queryString ? `?${queryString}` : '');
47
+ const requestUrl = '/organizations/{organization_id}/projects';
48
48
  const response = yield this.post(requestUrl.replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId))), projectOrganizationCreate);
49
49
  return new ApiResponse_1.ApiResponse(response);
50
50
  });
@@ -56,8 +56,7 @@ class ProjectsApiService extends ApiBaseService_1.ApiBaseService {
56
56
  */
57
57
  addProject() {
58
58
  return __awaiter(this, void 0, void 0, function* () {
59
- let queryString = '';
60
- const requestUrl = '/projects' + (queryString ? `?${queryString}` : '');
59
+ const requestUrl = '/projects';
61
60
  const response = yield this.post(requestUrl);
62
61
  return new ApiResponse_1.ApiResponse(response);
63
62
  });
@@ -72,8 +71,7 @@ class ProjectsApiService extends ApiBaseService_1.ApiBaseService {
72
71
  if (projectId === null || projectId === undefined) {
73
72
  throw new Exceptions_1.ArgumentNullException('projectId', 'deleteProject');
74
73
  }
75
- let queryString = '';
76
- const requestUrl = '/projects/{project_id}' + (queryString ? `?${queryString}` : '');
74
+ const requestUrl = '/projects/{project_id}';
77
75
  const response = yield this.delete(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))));
78
76
  return new ApiResponse_1.ApiResponse(response);
79
77
  });
@@ -88,8 +86,7 @@ class ProjectsApiService extends ApiBaseService_1.ApiBaseService {
88
86
  if (projectId === null || projectId === undefined) {
89
87
  throw new Exceptions_1.ArgumentNullException('projectId', 'getProject');
90
88
  }
91
- let queryString = '';
92
- const requestUrl = '/projects/{project_id}' + (queryString ? `?${queryString}` : '');
89
+ const requestUrl = '/projects/{project_id}';
93
90
  const response = yield this.get(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))));
94
91
  return new ApiResponse_1.ApiResponse(response);
95
92
  });
@@ -103,14 +100,11 @@ class ProjectsApiService extends ApiBaseService_1.ApiBaseService {
103
100
  */
104
101
  listProjects(page, perPage, owner) {
105
102
  return __awaiter(this, void 0, void 0, function* () {
106
- let queryString = '';
107
- const queryParams = { page: page, per_page: perPage, owner: owner, };
108
- for (const key in queryParams) {
109
- if (queryParams[key] === undefined || queryParams[key] === null) {
110
- continue;
111
- }
112
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
113
- }
103
+ let queryString = (0, utils_1.parseQueryString)({
104
+ 'page': page,
105
+ 'per_page': perPage,
106
+ 'owner': owner,
107
+ });
114
108
  const requestUrl = '/projects' + (queryString ? `?${queryString}` : '');
115
109
  const response = yield this.get(requestUrl);
116
110
  return new ApiResponse_1.ApiResponse(response);
@@ -130,8 +124,7 @@ class ProjectsApiService extends ApiBaseService_1.ApiBaseService {
130
124
  if (projectUpdate === null || projectUpdate === undefined) {
131
125
  throw new Exceptions_1.ArgumentNullException('projectUpdate', 'updateProject');
132
126
  }
133
- let queryString = '';
134
- const requestUrl = '/projects/{project_id}' + (queryString ? `?${queryString}` : '');
127
+ const requestUrl = '/projects/{project_id}';
135
128
  const response = yield this.put(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))), projectUpdate);
136
129
  return new ApiResponse_1.ApiResponse(response);
137
130
  });
@@ -25,6 +25,7 @@ exports.ProjectsAPITokensApiService = 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
  * ProjectsAPITokensApiService - Auto-generated
30
31
  */
@@ -43,8 +44,7 @@ class ProjectsAPITokensApiService extends ApiBaseService_1.ApiBaseService {
43
44
  if (apiTokenProjectCreate === null || apiTokenProjectCreate === undefined) {
44
45
  throw new Exceptions_1.ArgumentNullException('apiTokenProjectCreate', 'addProjectApiToken');
45
46
  }
46
- let queryString = '';
47
- const requestUrl = '/projects/{project_id}/tokens' + (queryString ? `?${queryString}` : '');
47
+ const requestUrl = '/projects/{project_id}/tokens';
48
48
  const response = yield this.post(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))), apiTokenProjectCreate);
49
49
  return new ApiResponse_1.ApiResponse(response);
50
50
  });
@@ -63,8 +63,7 @@ class ProjectsAPITokensApiService extends ApiBaseService_1.ApiBaseService {
63
63
  if (tokenId === null || tokenId === undefined) {
64
64
  throw new Exceptions_1.ArgumentNullException('tokenId', 'getProjectApiToken');
65
65
  }
66
- let queryString = '';
67
- const requestUrl = '/projects/{project_id}/tokens/{token_id}' + (queryString ? `?${queryString}` : '');
66
+ const requestUrl = '/projects/{project_id}/tokens/{token_id}';
68
67
  const response = yield this.get(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))).replace(`{${"token_id"}}`, encodeURIComponent(String(tokenId))));
69
68
  return new ApiResponse_1.ApiResponse(response);
70
69
  });
@@ -81,14 +80,10 @@ class ProjectsAPITokensApiService extends ApiBaseService_1.ApiBaseService {
81
80
  if (projectId === null || projectId === undefined) {
82
81
  throw new Exceptions_1.ArgumentNullException('projectId', 'listProjectApiTokens');
83
82
  }
84
- let queryString = '';
85
- const queryParams = { page: page, per_page: perPage, };
86
- for (const key in queryParams) {
87
- if (queryParams[key] === undefined || queryParams[key] === null) {
88
- continue;
89
- }
90
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
91
- }
83
+ let queryString = (0, utils_1.parseQueryString)({
84
+ 'page': page,
85
+ 'per_page': perPage,
86
+ });
92
87
  const requestUrl = '/projects/{project_id}/tokens' + (queryString ? `?${queryString}` : '');
93
88
  const response = yield this.get(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))));
94
89
  return new ApiResponse_1.ApiResponse(response);
@@ -108,8 +103,7 @@ class ProjectsAPITokensApiService extends ApiBaseService_1.ApiBaseService {
108
103
  if (tokenId === null || tokenId === undefined) {
109
104
  throw new Exceptions_1.ArgumentNullException('tokenId', 'revokeProjectApiToken');
110
105
  }
111
- let queryString = '';
112
- const requestUrl = '/projects/{project_id}/tokens/{token_id}/revoke' + (queryString ? `?${queryString}` : '');
106
+ const requestUrl = '/projects/{project_id}/tokens/{token_id}/revoke';
113
107
  const response = yield this.delete(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))).replace(`{${"token_id"}}`, encodeURIComponent(String(tokenId))));
114
108
  return new ApiResponse_1.ApiResponse(response);
115
109
  });
@@ -132,8 +126,7 @@ class ProjectsAPITokensApiService extends ApiBaseService_1.ApiBaseService {
132
126
  if (apiTokenProjectRotate === null || apiTokenProjectRotate === undefined) {
133
127
  throw new Exceptions_1.ArgumentNullException('apiTokenProjectRotate', 'rotateProjectApiToken');
134
128
  }
135
- let queryString = '';
136
- const requestUrl = '/projects/{project_id}/tokens/{token_id}/rotate' + (queryString ? `?${queryString}` : '');
129
+ const requestUrl = '/projects/{project_id}/tokens/{token_id}/rotate';
137
130
  const response = yield this.post(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))).replace(`{${"token_id"}}`, encodeURIComponent(String(tokenId))), apiTokenProjectRotate);
138
131
  return new ApiResponse_1.ApiResponse(response);
139
132
  });
@@ -25,6 +25,7 @@ exports.ProjectsArchivedEnvironmentsApiService = 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
  * ProjectsArchivedEnvironmentsApiService - Auto-generated
30
31
  */
@@ -41,14 +42,10 @@ class ProjectsArchivedEnvironmentsApiService extends ApiBaseService_1.ApiBaseSer
41
42
  if (projectId === null || projectId === undefined) {
42
43
  throw new Exceptions_1.ArgumentNullException('projectId', 'listProjectArchivedEnvironments');
43
44
  }
44
- let queryString = '';
45
- const queryParams = { page: page, per_page: perPage, };
46
- for (const key in queryParams) {
47
- if (queryParams[key] === undefined || queryParams[key] === null) {
48
- continue;
49
- }
50
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
51
- }
45
+ let queryString = (0, utils_1.parseQueryString)({
46
+ 'page': page,
47
+ 'per_page': perPage,
48
+ });
52
49
  const requestUrl = '/projects/{project_id}/environments/archived' + (queryString ? `?${queryString}` : '');
53
50
  const response = yield this.get(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))));
54
51
  return new ApiResponse_1.ApiResponse(response);
@@ -25,6 +25,7 @@ exports.ProjectsEnvironmentsApiService = 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
  * ProjectsEnvironmentsApiService - Auto-generated
30
31
  */
@@ -43,8 +44,7 @@ class ProjectsEnvironmentsApiService extends ApiBaseService_1.ApiBaseService {
43
44
  if (environmentProjectCreate === null || environmentProjectCreate === undefined) {
44
45
  throw new Exceptions_1.ArgumentNullException('environmentProjectCreate', 'addProjectEnvironment');
45
46
  }
46
- let queryString = '';
47
- const requestUrl = '/projects/{project_id}/environments' + (queryString ? `?${queryString}` : '');
47
+ const requestUrl = '/projects/{project_id}/environments';
48
48
  const response = yield this.post(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))), environmentProjectCreate);
49
49
  return new ApiResponse_1.ApiResponse(response);
50
50
  });
@@ -61,14 +61,10 @@ class ProjectsEnvironmentsApiService extends ApiBaseService_1.ApiBaseService {
61
61
  if (projectId === null || projectId === undefined) {
62
62
  throw new Exceptions_1.ArgumentNullException('projectId', 'listProjectEnvironments');
63
63
  }
64
- let queryString = '';
65
- const queryParams = { page: page, per_page: perPage, };
66
- for (const key in queryParams) {
67
- if (queryParams[key] === undefined || queryParams[key] === null) {
68
- continue;
69
- }
70
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
71
- }
64
+ let queryString = (0, utils_1.parseQueryString)({
65
+ 'page': page,
66
+ 'per_page': perPage,
67
+ });
72
68
  const requestUrl = '/projects/{project_id}/environments' + (queryString ? `?${queryString}` : '');
73
69
  const response = yield this.get(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))));
74
70
  return new ApiResponse_1.ApiResponse(response);
@@ -25,6 +25,7 @@ exports.ResourceEventsApiService = 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
  * ResourceEventsApiService - Auto-generated
30
31
  */
@@ -43,8 +44,7 @@ class ResourceEventsApiService extends ApiBaseService_1.ApiBaseService {
43
44
  if (resourceType === null || resourceType === undefined) {
44
45
  throw new Exceptions_1.ArgumentNullException('resourceType', 'addResourceEvent');
45
46
  }
46
- let queryString = '';
47
- const requestUrl = '/events/{resource_type}/{resource_id}' + (queryString ? `?${queryString}` : '');
47
+ const requestUrl = '/events/{resource_type}/{resource_id}';
48
48
  const response = yield this.post(requestUrl.replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId))).replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))));
49
49
  return new ApiResponse_1.ApiResponse(response);
50
50
  });
@@ -65,14 +65,10 @@ class ResourceEventsApiService extends ApiBaseService_1.ApiBaseService {
65
65
  if (resourceType === null || resourceType === undefined) {
66
66
  throw new Exceptions_1.ArgumentNullException('resourceType', 'listResourceEventsByResourceType');
67
67
  }
68
- let queryString = '';
69
- const queryParams = { page: page, per_page: perPage, };
70
- for (const key in queryParams) {
71
- if (queryParams[key] === undefined || queryParams[key] === null) {
72
- continue;
73
- }
74
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
75
- }
68
+ let queryString = (0, utils_1.parseQueryString)({
69
+ 'page': page,
70
+ 'per_page': perPage,
71
+ });
76
72
  const requestUrl = '/events/{resource_type}/{resource_id}' + (queryString ? `?${queryString}` : '');
77
73
  const response = yield this.get(requestUrl.replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId))).replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))));
78
74
  return new ApiResponse_1.ApiResponse(response);
@@ -25,6 +25,7 @@ exports.ResourceLinksApiService = 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
  * ResourceLinksApiService - Auto-generated
30
31
  */
@@ -51,8 +52,7 @@ class ResourceLinksApiService extends ApiBaseService_1.ApiBaseService {
51
52
  if (resourceType === null || resourceType === undefined) {
52
53
  throw new Exceptions_1.ArgumentNullException('resourceType', 'linkResourceLinkToResourceLink');
53
54
  }
54
- let queryString = '';
55
- const requestUrl = '/resource-links/{resource_type}/{resource_id}/{child_type}/{child_id}/link' + (queryString ? `?${queryString}` : '');
55
+ const requestUrl = '/resource-links/{resource_type}/{resource_id}/{child_type}/{child_id}/link';
56
56
  const response = yield this.post(requestUrl.replace(`{${"child_id"}}`, encodeURIComponent(String(childId))).replace(`{${"child_type"}}`, encodeURIComponent(String(childType))).replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId))).replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))));
57
57
  return new ApiResponse_1.ApiResponse(response);
58
58
  });
@@ -73,14 +73,10 @@ class ResourceLinksApiService extends ApiBaseService_1.ApiBaseService {
73
73
  if (resourceType === null || resourceType === undefined) {
74
74
  throw new Exceptions_1.ArgumentNullException('resourceType', 'listResourceLinksByResourceType');
75
75
  }
76
- let queryString = '';
77
- const queryParams = { page: page, per_page: perPage, };
78
- for (const key in queryParams) {
79
- if (queryParams[key] === undefined || queryParams[key] === null) {
80
- continue;
81
- }
82
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
83
- }
76
+ let queryString = (0, utils_1.parseQueryString)({
77
+ 'page': page,
78
+ 'per_page': perPage,
79
+ });
84
80
  const requestUrl = '/resource-links/{resource_type}/{resource_id}' + (queryString ? `?${queryString}` : '');
85
81
  const response = yield this.get(requestUrl.replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId))).replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))));
86
82
  return new ApiResponse_1.ApiResponse(response);
@@ -107,14 +103,11 @@ class ResourceLinksApiService extends ApiBaseService_1.ApiBaseService {
107
103
  if (resourceType === null || resourceType === undefined) {
108
104
  throw new Exceptions_1.ArgumentNullException('resourceType', 'listResourceLinksByResourceTypeAndLinkType');
109
105
  }
110
- let queryString = '';
111
- const queryParams = { page: page, per_page: perPage, linked_resource_type: linkedResourceType, };
112
- for (const key in queryParams) {
113
- if (queryParams[key] === undefined || queryParams[key] === null) {
114
- continue;
115
- }
116
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
117
- }
106
+ let queryString = (0, utils_1.parseQueryString)({
107
+ 'page': page,
108
+ 'per_page': perPage,
109
+ 'linked_resource_type': linkedResourceType,
110
+ });
118
111
  const requestUrl = '/resource-links/{resource_type}/{resource_id}/{link_type}' + (queryString ? `?${queryString}` : '');
119
112
  const response = yield this.get(requestUrl.replace(`{${"link_type"}}`, encodeURIComponent(String(linkType))).replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId))).replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))));
120
113
  return new ApiResponse_1.ApiResponse(response);
@@ -142,8 +135,7 @@ class ResourceLinksApiService extends ApiBaseService_1.ApiBaseService {
142
135
  if (resourceType === null || resourceType === undefined) {
143
136
  throw new Exceptions_1.ArgumentNullException('resourceType', 'unlinkResourceLinkFromResourceLink');
144
137
  }
145
- let queryString = '';
146
- const requestUrl = '/resource-links/{resource_type}/{resource_id}/{child_type}/{child_id}/unlink' + (queryString ? `?${queryString}` : '');
138
+ const requestUrl = '/resource-links/{resource_type}/{resource_id}/{child_type}/{child_id}/unlink';
147
139
  const response = yield this.delete(requestUrl.replace(`{${"child_id"}}`, encodeURIComponent(String(childId))).replace(`{${"child_type"}}`, encodeURIComponent(String(childType))).replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId))).replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))));
148
140
  return new ApiResponse_1.ApiResponse(response);
149
141
  });
@@ -25,6 +25,7 @@ exports.RolesApiService = 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
  * RolesApiService - Auto-generated
30
31
  */
@@ -43,8 +44,7 @@ class RolesApiService extends ApiBaseService_1.ApiBaseService {
43
44
  if (roleOrganizationCreate === null || roleOrganizationCreate === undefined) {
44
45
  throw new Exceptions_1.ArgumentNullException('roleOrganizationCreate', 'addOrganizationRole');
45
46
  }
46
- let queryString = '';
47
- const requestUrl = '/organizations/{organization_id}/roles' + (queryString ? `?${queryString}` : '');
47
+ const requestUrl = '/organizations/{organization_id}/roles';
48
48
  const response = yield this.post(requestUrl.replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId))), roleOrganizationCreate);
49
49
  return new ApiResponse_1.ApiResponse(response);
50
50
  });
@@ -59,8 +59,7 @@ class RolesApiService extends ApiBaseService_1.ApiBaseService {
59
59
  if (roleId === null || roleId === undefined) {
60
60
  throw new Exceptions_1.ArgumentNullException('roleId', 'deleteRole');
61
61
  }
62
- let queryString = '';
63
- const requestUrl = '/roles/{role_id}' + (queryString ? `?${queryString}` : '');
62
+ const requestUrl = '/roles/{role_id}';
64
63
  const response = yield this.delete(requestUrl.replace(`{${"role_id"}}`, encodeURIComponent(String(roleId))));
65
64
  return new ApiResponse_1.ApiResponse(response);
66
65
  });
@@ -75,8 +74,7 @@ class RolesApiService extends ApiBaseService_1.ApiBaseService {
75
74
  if (roleId === null || roleId === undefined) {
76
75
  throw new Exceptions_1.ArgumentNullException('roleId', 'getRole');
77
76
  }
78
- let queryString = '';
79
- const requestUrl = '/roles/{role_id}' + (queryString ? `?${queryString}` : '');
77
+ const requestUrl = '/roles/{role_id}';
80
78
  const response = yield this.get(requestUrl.replace(`{${"role_id"}}`, encodeURIComponent(String(roleId))));
81
79
  return new ApiResponse_1.ApiResponse(response);
82
80
  });
@@ -93,14 +91,10 @@ class RolesApiService extends ApiBaseService_1.ApiBaseService {
93
91
  if (organizationId === null || organizationId === undefined) {
94
92
  throw new Exceptions_1.ArgumentNullException('organizationId', 'listOrganizationRoles');
95
93
  }
96
- let queryString = '';
97
- const queryParams = { page: page, per_page: perPage, };
98
- for (const key in queryParams) {
99
- if (queryParams[key] === undefined || queryParams[key] === null) {
100
- continue;
101
- }
102
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
103
- }
94
+ let queryString = (0, utils_1.parseQueryString)({
95
+ 'page': page,
96
+ 'per_page': perPage,
97
+ });
104
98
  const requestUrl = '/organizations/{organization_id}/roles' + (queryString ? `?${queryString}` : '');
105
99
  const response = yield this.get(requestUrl.replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId))));
106
100
  return new ApiResponse_1.ApiResponse(response);
@@ -120,8 +114,7 @@ class RolesApiService extends ApiBaseService_1.ApiBaseService {
120
114
  if (roleUpdate === null || roleUpdate === undefined) {
121
115
  throw new Exceptions_1.ArgumentNullException('roleUpdate', 'updateRole');
122
116
  }
123
- let queryString = '';
124
- const requestUrl = '/roles/{role_id}' + (queryString ? `?${queryString}` : '');
117
+ const requestUrl = '/roles/{role_id}';
125
118
  const response = yield this.put(requestUrl.replace(`{${"role_id"}}`, encodeURIComponent(String(roleId))), roleUpdate);
126
119
  return new ApiResponse_1.ApiResponse(response);
127
120
  });