@devopness/sdk-js 2.141.0 → 2.142.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 (84) hide show
  1. package/dist/DevopnessApiClient.d.ts +0 -4
  2. package/dist/DevopnessApiClient.js +0 -4
  3. package/dist/api/generated/apis/credentials-api.d.ts +11 -5
  4. package/dist/api/generated/apis/credentials-api.js +27 -12
  5. package/dist/api/generated/apis/{source-providers-repositories-api.d.ts → credentials-repositories-api.d.ts} +7 -7
  6. package/dist/api/generated/apis/{source-providers-repositories-api.js → credentials-repositories-api.js} +20 -20
  7. package/dist/api/generated/apis/environments-credentials-api.d.ts +46 -0
  8. package/dist/api/generated/apis/environments-credentials-api.js +100 -0
  9. package/dist/api/generated/apis/networks-api.d.ts +8 -0
  10. package/dist/api/generated/apis/networks-api.js +20 -0
  11. package/dist/api/generated/apis/static-data-credential-options-api.d.ts +24 -0
  12. package/dist/api/generated/apis/{static-data-cloud-provider-options-api.js → static-data-credential-options-api.js} +7 -16
  13. package/dist/api/generated/models/application-environment-create.d.ts +3 -3
  14. package/dist/api/generated/models/application-relation.d.ts +4 -4
  15. package/dist/api/generated/models/application-update.d.ts +3 -3
  16. package/dist/api/generated/models/application.d.ts +4 -4
  17. package/dist/api/generated/models/cloud-provider-service.d.ts +3 -3
  18. package/dist/api/generated/models/credential-environment-create.d.ts +49 -0
  19. package/dist/api/generated/models/credential-input-settings-validation.d.ts +48 -0
  20. package/dist/api/generated/models/credential-input-settings.d.ts +49 -0
  21. package/dist/api/generated/models/credential-options.d.ts +31 -0
  22. package/dist/api/generated/models/credential-provider-type.d.ts +56 -0
  23. package/dist/api/generated/models/credential-provider-type.js +24 -0
  24. package/dist/api/generated/models/credential-relation.d.ts +20 -13
  25. package/dist/api/generated/models/credential-setting.d.ts +17 -6
  26. package/dist/api/generated/models/{source-provider-create.d.ts → credential-source-provider.d.ts} +4 -11
  27. package/dist/api/generated/models/credential-update.d.ts +37 -0
  28. package/dist/api/generated/models/credential.d.ts +20 -14
  29. package/dist/api/generated/models/environment.d.ts +7 -0
  30. package/dist/api/generated/models/index.d.ts +12 -6
  31. package/dist/api/generated/models/index.js +12 -6
  32. package/dist/api/generated/models/network-environment-create.d.ts +6 -0
  33. package/dist/api/generated/models/network-provision-input.d.ts +0 -6
  34. package/dist/api/generated/models/network-update.d.ts +30 -0
  35. package/dist/api/generated/models/network-update.js +14 -0
  36. package/dist/api/generated/models/network.d.ts +7 -0
  37. package/dist/api/generated/models/provider-code.d.ts +24 -0
  38. package/dist/api/generated/models/provider-code.js +29 -0
  39. package/dist/api/generated/models/provider-relation.d.ts +57 -0
  40. package/dist/api/generated/models/provider-relation.js +24 -0
  41. package/dist/api/generated/models/provider-settings.d.ts +38 -0
  42. package/dist/api/generated/models/provider-settings.js +14 -0
  43. package/dist/api/generated/models/provider-type.d.ts +20 -0
  44. package/dist/api/generated/models/provider-type.js +25 -0
  45. package/dist/api/generated/models/resource-type.d.ts +1 -0
  46. package/dist/api/generated/models/resource-type.js +1 -0
  47. package/dist/api/generated/models/server-environment-create.d.ts +6 -0
  48. package/dist/api/generated/models/server-provision-input.d.ts +0 -6
  49. package/dist/api/generated/models/server-update.d.ts +7 -1
  50. package/dist/api/generated/models/server.d.ts +7 -0
  51. package/dist/api/generated/models/subnet-network-create.d.ts +6 -0
  52. package/dist/api/generated/models/subnet-provision-input.d.ts +0 -6
  53. package/dist/api/generated/models/subnet.d.ts +7 -0
  54. package/dist/services/CredentialService.d.ts +2 -0
  55. package/dist/services/CredentialService.js +5 -0
  56. package/dist/services/EnvironmentService.d.ts +4 -2
  57. package/dist/services/EnvironmentService.js +4 -2
  58. package/dist/services/StaticService.d.ts +2 -4
  59. package/dist/services/StaticService.js +2 -4
  60. package/dist/services/index.d.ts +1 -3
  61. package/dist/services/index.js +1 -3
  62. package/package.json +1 -1
  63. package/dist/api/generated/apis/cloud-providers-credentials-api.d.ts +0 -36
  64. package/dist/api/generated/apis/cloud-providers-credentials-api.js +0 -78
  65. package/dist/api/generated/apis/source-providers-api.d.ts +0 -46
  66. package/dist/api/generated/apis/source-providers-api.js +0 -102
  67. package/dist/api/generated/apis/static-data-cloud-provider-options-api.d.ts +0 -26
  68. package/dist/api/generated/apis/static-data-source-provider-options-api.d.ts +0 -26
  69. package/dist/api/generated/apis/static-data-source-provider-options-api.js +0 -53
  70. package/dist/api/generated/models/cloud-provider-options-relation.d.ts +0 -64
  71. package/dist/api/generated/models/credential-cloud-provider-create.d.ts +0 -31
  72. package/dist/api/generated/models/source-provider-options-relation.d.ts +0 -38
  73. package/dist/api/generated/models/source-provider-relation.d.ts +0 -68
  74. package/dist/api/generated/models/source-provider.d.ts +0 -68
  75. package/dist/services/CloudProviderCredentialService.d.ts +0 -3
  76. package/dist/services/CloudProviderCredentialService.js +0 -7
  77. package/dist/services/SourceProviderService.d.ts +0 -5
  78. package/dist/services/SourceProviderService.js +0 -12
  79. /package/dist/api/generated/models/{cloud-provider-options-relation.js → credential-environment-create.js} +0 -0
  80. /package/dist/api/generated/models/{credential-cloud-provider-create.js → credential-input-settings-validation.js} +0 -0
  81. /package/dist/api/generated/models/{source-provider-create.js → credential-input-settings.js} +0 -0
  82. /package/dist/api/generated/models/{source-provider-options-relation.js → credential-options.js} +0 -0
  83. /package/dist/api/generated/models/{source-provider-relation.js → credential-source-provider.js} +0 -0
  84. /package/dist/api/generated/models/{source-provider.js → credential-update.js} +0 -0
@@ -1,7 +1,6 @@
1
1
  import { ActionService } from './services/ActionService';
2
2
  import { ConfigurationOptions } from './services/ApiBaseService';
3
3
  import { ApplicationService } from './services/ApplicationService';
4
- import { CloudProviderCredentialService } from './services/CloudProviderCredentialService';
5
4
  import { CredentialService } from './services/CredentialService';
6
5
  import { CronJobService } from './services/CronJobService';
7
6
  import { DaemonService } from './services/DaemonService';
@@ -19,7 +18,6 @@ import { RoleService } from './services/RoleService';
19
18
  import { ServerService } from './services/ServerService';
20
19
  import { ServiceService } from './services/ServiceService';
21
20
  import { SocialAccountService } from './services/SocialAccountService';
22
- import { SourceProviderService } from './services/SourceProviderService';
23
21
  import { SshKeyService } from './services/SshKeyService';
24
22
  import { SslCertificateService } from './services/SslCertificateService';
25
23
  import { StaticService } from './services/StaticService';
@@ -32,7 +30,6 @@ import { VirtualHostService } from './services/VirtualHostService';
32
30
  export declare class DevopnessApiClient {
33
31
  actions: ActionService;
34
32
  applications: ApplicationService;
35
- cloudProviderCredentials: CloudProviderCredentialService;
36
33
  credentials: CredentialService;
37
34
  cronjobs: CronJobService;
38
35
  daemons: DaemonService;
@@ -50,7 +47,6 @@ export declare class DevopnessApiClient {
50
47
  servers: ServerService;
51
48
  services: ServiceService;
52
49
  socialAccounts: SocialAccountService;
53
- sourceProviders: SourceProviderService;
54
50
  sshKeys: SshKeyService;
55
51
  sslCertificates: SslCertificateService;
56
52
  static: StaticService;
@@ -4,7 +4,6 @@ exports.DevopnessApiClient = void 0;
4
4
  const ActionService_1 = require("./services/ActionService");
5
5
  const ApiBaseService_1 = require("./services/ApiBaseService");
6
6
  const ApplicationService_1 = require("./services/ApplicationService");
7
- const CloudProviderCredentialService_1 = require("./services/CloudProviderCredentialService");
8
7
  const CredentialService_1 = require("./services/CredentialService");
9
8
  const CronJobService_1 = require("./services/CronJobService");
10
9
  const DaemonService_1 = require("./services/DaemonService");
@@ -22,7 +21,6 @@ const RoleService_1 = require("./services/RoleService");
22
21
  const ServerService_1 = require("./services/ServerService");
23
22
  const ServiceService_1 = require("./services/ServiceService");
24
23
  const SocialAccountService_1 = require("./services/SocialAccountService");
25
- const SourceProviderService_1 = require("./services/SourceProviderService");
26
24
  const SshKeyService_1 = require("./services/SshKeyService");
27
25
  const SslCertificateService_1 = require("./services/SslCertificateService");
28
26
  const StaticService_1 = require("./services/StaticService");
@@ -40,7 +38,6 @@ class DevopnessApiClient {
40
38
  // for non provided required parameters are quickly returned to the end user before spending time loading extra resources
41
39
  this.actions = new ActionService_1.ActionService();
42
40
  this.applications = new ApplicationService_1.ApplicationService();
43
- this.cloudProviderCredentials = new CloudProviderCredentialService_1.CloudProviderCredentialService();
44
41
  this.credentials = new CredentialService_1.CredentialService();
45
42
  this.cronjobs = new CronJobService_1.CronJobService();
46
43
  this.daemons = new DaemonService_1.DaemonService();
@@ -58,7 +55,6 @@ class DevopnessApiClient {
58
55
  this.servers = new ServerService_1.ServerService();
59
56
  this.services = new ServiceService_1.ServiceService();
60
57
  this.socialAccounts = new SocialAccountService_1.SocialAccountService();
61
- this.sourceProviders = new SourceProviderService_1.SourceProviderService();
62
58
  this.sshKeys = new SshKeyService_1.SshKeyService();
63
59
  this.sslCertificates = new SslCertificateService_1.SslCertificateService();
64
60
  this.static = new StaticService_1.StaticService();
@@ -12,7 +12,7 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Credential } from '../../generated/models';
15
- import { CredentialRelation } from '../../generated/models';
15
+ import { CredentialUpdate } from '../../generated/models';
16
16
  /**
17
17
  * CredentialsApiService - Auto-generated
18
18
  */
@@ -31,9 +31,15 @@ export declare class CredentialsApiService extends ApiBaseService {
31
31
  getCredential(credentialId: number): Promise<ApiResponse<Credential>>;
32
32
  /**
33
33
  *
34
- * @summary List credentials
35
- * @param {number} [page] Number of the page to be retrieved
36
- * @param {number} [perPage] Number of items returned per page
34
+ * @summary Get current status of a credential on its provider
35
+ * @param {number} credentialId The ID of the credential.
36
+ */
37
+ getStatusCredential(credentialId: number): Promise<ApiResponse<void>>;
38
+ /**
39
+ *
40
+ * @summary Update an existing Credential
41
+ * @param {number} credentialId The ID of the credential.
42
+ * @param {CredentialUpdate} credentialUpdate A JSON object containing the resource data
37
43
  */
38
- listCredentials(page?: number, perPage?: number): Promise<ApiResponse<Array<CredentialRelation>>>;
44
+ updateCredential(credentialId: number, credentialUpdate: CredentialUpdate): Promise<ApiResponse<void>>;
39
45
  }
@@ -63,22 +63,37 @@ class CredentialsApiService extends ApiBaseService_1.ApiBaseService {
63
63
  }
64
64
  /**
65
65
  *
66
- * @summary List credentials
67
- * @param {number} [page] Number of the page to be retrieved
68
- * @param {number} [perPage] Number of items returned per page
66
+ * @summary Get current status of a credential on its provider
67
+ * @param {number} credentialId The ID of the credential.
69
68
  */
70
- listCredentials(page, perPage) {
69
+ getStatusCredential(credentialId) {
71
70
  return __awaiter(this, void 0, void 0, function* () {
71
+ if (credentialId === null || credentialId === undefined) {
72
+ throw new Exceptions_1.ArgumentNullException('credentialId', 'getStatusCredential');
73
+ }
72
74
  let queryString = '';
73
- const queryParams = { page: page, per_page: perPage, };
74
- for (const key in queryParams) {
75
- if (queryParams[key] === undefined || queryParams[key] === null) {
76
- continue;
77
- }
78
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
75
+ const requestUrl = '/credentials/{credential_id}/get-status' + (queryString ? `?${queryString}` : '');
76
+ const response = yield this.post(requestUrl.replace(`{${"credential_id"}}`, encodeURIComponent(String(credentialId))));
77
+ return new ApiResponse_1.ApiResponse(response);
78
+ });
79
+ }
80
+ /**
81
+ *
82
+ * @summary Update an existing Credential
83
+ * @param {number} credentialId The ID of the credential.
84
+ * @param {CredentialUpdate} credentialUpdate A JSON object containing the resource data
85
+ */
86
+ updateCredential(credentialId, credentialUpdate) {
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ if (credentialId === null || credentialId === undefined) {
89
+ throw new Exceptions_1.ArgumentNullException('credentialId', 'updateCredential');
79
90
  }
80
- const requestUrl = '/credentials' + (queryString ? `?${queryString}` : '');
81
- const response = yield this.get(requestUrl);
91
+ if (credentialUpdate === null || credentialUpdate === undefined) {
92
+ throw new Exceptions_1.ArgumentNullException('credentialUpdate', 'updateCredential');
93
+ }
94
+ let queryString = '';
95
+ const requestUrl = '/credentials/{credential_id}' + (queryString ? `?${queryString}` : '');
96
+ const response = yield this.put(requestUrl.replace(`{${"credential_id"}}`, encodeURIComponent(String(credentialId))), credentialUpdate);
82
97
  return new ApiResponse_1.ApiResponse(response);
83
98
  });
84
99
  }
@@ -14,23 +14,23 @@ import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Repository } from '../../generated/models';
15
15
  import { RepositoryRelation } from '../../generated/models';
16
16
  /**
17
- * SourceProvidersRepositoriesApiService - Auto-generated
17
+ * CredentialsRepositoriesApiService - Auto-generated
18
18
  */
19
- export declare class SourceProvidersRepositoriesApiService extends ApiBaseService {
19
+ export declare class CredentialsRepositoriesApiService extends ApiBaseService {
20
20
  /**
21
21
  *
22
22
  * @summary Get details of a repository by its name
23
+ * @param {number} credentialId The ID of the credential.
23
24
  * @param {string} repositoryName The repository name
24
25
  * @param {string} repositoryOwner The owner of the repository
25
- * @param {number} sourceProviderId The ID of the source provider.
26
26
  */
27
- getSourceProviderRepository(repositoryName: string, repositoryOwner: string, sourceProviderId: number): Promise<ApiResponse<Repository>>;
27
+ getCredentialRepository(credentialId: number, repositoryName: string, repositoryOwner: string): Promise<ApiResponse<Repository>>;
28
28
  /**
29
29
  *
30
- * @summary Return a list of all repositories belonging to the current user social provider account
31
- * @param {number} sourceProviderId The ID of the source provider.
30
+ * @summary Return a list of all repositories belonging to the source provider linked to the credential
31
+ * @param {number} credentialId The ID of the credential.
32
32
  * @param {number} [page] Number of the page to be retrieved
33
33
  * @param {number} [perPage] Number of items returned per page
34
34
  */
35
- listSourceProviderRepositories(sourceProviderId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<RepositoryRelation>>>;
35
+ listCredentialRepositories(credentialId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<RepositoryRelation>>>;
36
36
  }
@@ -21,49 +21,49 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.SourceProvidersRepositoriesApiService = void 0;
24
+ exports.CredentialsRepositoriesApiService = 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
28
  /**
29
- * SourceProvidersRepositoriesApiService - Auto-generated
29
+ * CredentialsRepositoriesApiService - Auto-generated
30
30
  */
31
- class SourceProvidersRepositoriesApiService extends ApiBaseService_1.ApiBaseService {
31
+ class CredentialsRepositoriesApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
34
  * @summary Get details of a repository by its name
35
+ * @param {number} credentialId The ID of the credential.
35
36
  * @param {string} repositoryName The repository name
36
37
  * @param {string} repositoryOwner The owner of the repository
37
- * @param {number} sourceProviderId The ID of the source provider.
38
38
  */
39
- getSourceProviderRepository(repositoryName, repositoryOwner, sourceProviderId) {
39
+ getCredentialRepository(credentialId, repositoryName, repositoryOwner) {
40
40
  return __awaiter(this, void 0, void 0, function* () {
41
+ if (credentialId === null || credentialId === undefined) {
42
+ throw new Exceptions_1.ArgumentNullException('credentialId', 'getCredentialRepository');
43
+ }
41
44
  if (repositoryName === null || repositoryName === undefined) {
42
- throw new Exceptions_1.ArgumentNullException('repositoryName', 'getSourceProviderRepository');
45
+ throw new Exceptions_1.ArgumentNullException('repositoryName', 'getCredentialRepository');
43
46
  }
44
47
  if (repositoryOwner === null || repositoryOwner === undefined) {
45
- throw new Exceptions_1.ArgumentNullException('repositoryOwner', 'getSourceProviderRepository');
46
- }
47
- if (sourceProviderId === null || sourceProviderId === undefined) {
48
- throw new Exceptions_1.ArgumentNullException('sourceProviderId', 'getSourceProviderRepository');
48
+ throw new Exceptions_1.ArgumentNullException('repositoryOwner', 'getCredentialRepository');
49
49
  }
50
50
  let queryString = '';
51
- const requestUrl = '/source-providers/{source_provider_id}/repositories/{repository_owner}/{repository_name}' + (queryString ? `?${queryString}` : '');
52
- const response = yield this.get(requestUrl.replace(`{${"repository_name"}}`, encodeURIComponent(String(repositoryName))).replace(`{${"repository_owner"}}`, encodeURIComponent(String(repositoryOwner))).replace(`{${"source_provider_id"}}`, encodeURIComponent(String(sourceProviderId))));
51
+ const requestUrl = '/credentials/{credential_id}/repositories/{repository_owner}/{repository_name}' + (queryString ? `?${queryString}` : '');
52
+ const response = yield this.get(requestUrl.replace(`{${"credential_id"}}`, encodeURIComponent(String(credentialId))).replace(`{${"repository_name"}}`, encodeURIComponent(String(repositoryName))).replace(`{${"repository_owner"}}`, encodeURIComponent(String(repositoryOwner))));
53
53
  return new ApiResponse_1.ApiResponse(response);
54
54
  });
55
55
  }
56
56
  /**
57
57
  *
58
- * @summary Return a list of all repositories belonging to the current user social provider account
59
- * @param {number} sourceProviderId The ID of the source provider.
58
+ * @summary Return a list of all repositories belonging to the source provider linked to the credential
59
+ * @param {number} credentialId The ID of the credential.
60
60
  * @param {number} [page] Number of the page to be retrieved
61
61
  * @param {number} [perPage] Number of items returned per page
62
62
  */
63
- listSourceProviderRepositories(sourceProviderId, page, perPage) {
63
+ listCredentialRepositories(credentialId, page, perPage) {
64
64
  return __awaiter(this, void 0, void 0, function* () {
65
- if (sourceProviderId === null || sourceProviderId === undefined) {
66
- throw new Exceptions_1.ArgumentNullException('sourceProviderId', 'listSourceProviderRepositories');
65
+ if (credentialId === null || credentialId === undefined) {
66
+ throw new Exceptions_1.ArgumentNullException('credentialId', 'listCredentialRepositories');
67
67
  }
68
68
  let queryString = '';
69
69
  const queryParams = { page: page, per_page: perPage, };
@@ -73,10 +73,10 @@ class SourceProvidersRepositoriesApiService extends ApiBaseService_1.ApiBaseServ
73
73
  }
74
74
  queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
75
75
  }
76
- const requestUrl = '/source-providers/{source_provider_id}/repositories' + (queryString ? `?${queryString}` : '');
77
- const response = yield this.get(requestUrl.replace(`{${"source_provider_id"}}`, encodeURIComponent(String(sourceProviderId))));
76
+ const requestUrl = '/credentials/{credential_id}/repositories' + (queryString ? `?${queryString}` : '');
77
+ const response = yield this.get(requestUrl.replace(`{${"credential_id"}}`, encodeURIComponent(String(credentialId))));
78
78
  return new ApiResponse_1.ApiResponse(response);
79
79
  });
80
80
  }
81
81
  }
82
- exports.SourceProvidersRepositoriesApiService = SourceProvidersRepositoriesApiService;
82
+ exports.CredentialsRepositoriesApiService = CredentialsRepositoriesApiService;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * devopness API
3
+ * Devopness API - Painless essential DevOps to everyone
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { ApiBaseService } from "../../../services/ApiBaseService";
13
+ import { ApiResponse } from "../../../common/ApiResponse";
14
+ import { Credential } from '../../generated/models';
15
+ import { CredentialEnvironmentCreate } from '../../generated/models';
16
+ import { CredentialRelation } from '../../generated/models';
17
+ import { CredentialSetting } from '../../generated/models';
18
+ /**
19
+ * EnvironmentsCredentialsApiService - Auto-generated
20
+ */
21
+ export declare class EnvironmentsCredentialsApiService extends ApiBaseService {
22
+ /**
23
+ *
24
+ * @summary Add a Credential to the given environment
25
+ * @param {number} environmentId The ID of the environment.
26
+ * @param {CredentialEnvironmentCreate} credentialEnvironmentCreate A JSON object containing the resource data
27
+ */
28
+ addEnvironmentCredential(environmentId: number, credentialEnvironmentCreate: CredentialEnvironmentCreate): Promise<ApiResponse<Credential>>;
29
+ /**
30
+ *
31
+ * @summary Return provider settings
32
+ * @param {number} environmentId The ID of the environment.
33
+ * @param {string} providerCode The code of the provider.
34
+ */
35
+ getEnvironmentCredentialSettings(environmentId: number, providerCode: string): Promise<ApiResponse<CredentialSetting>>;
36
+ /**
37
+ *
38
+ * @summary Return a list of all Credentials belonging to an environment
39
+ * @param {number} environmentId The ID of the environment.
40
+ * @param {number} [page] Number of the page to be retrieved
41
+ * @param {number} [perPage] Number of items returned per page
42
+ * @param {string} [provider] Filter by credential provider.
43
+ * @param {string} [type] Filter by credential type.
44
+ */
45
+ listEnvironmentCredentials(environmentId: number, page?: number, perPage?: number, provider?: string, type?: string): Promise<ApiResponse<Array<CredentialRelation>>>;
46
+ }
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /**
4
+ * devopness API
5
+ * Devopness API - Painless essential DevOps to everyone
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.EnvironmentsCredentialsApiService = void 0;
25
+ const ApiBaseService_1 = require("../../../services/ApiBaseService");
26
+ const ApiResponse_1 = require("../../../common/ApiResponse");
27
+ const Exceptions_1 = require("../../../common/Exceptions");
28
+ /**
29
+ * EnvironmentsCredentialsApiService - Auto-generated
30
+ */
31
+ class EnvironmentsCredentialsApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Add a Credential to the given environment
35
+ * @param {number} environmentId The ID of the environment.
36
+ * @param {CredentialEnvironmentCreate} credentialEnvironmentCreate A JSON object containing the resource data
37
+ */
38
+ addEnvironmentCredential(environmentId, credentialEnvironmentCreate) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (environmentId === null || environmentId === undefined) {
41
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentCredential');
42
+ }
43
+ if (credentialEnvironmentCreate === null || credentialEnvironmentCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('credentialEnvironmentCreate', 'addEnvironmentCredential');
45
+ }
46
+ let queryString = '';
47
+ const requestUrl = '/environments/{environment_id}/credentials' + (queryString ? `?${queryString}` : '');
48
+ const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), credentialEnvironmentCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
52
+ /**
53
+ *
54
+ * @summary Return provider settings
55
+ * @param {number} environmentId The ID of the environment.
56
+ * @param {string} providerCode The code of the provider.
57
+ */
58
+ getEnvironmentCredentialSettings(environmentId, providerCode) {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ if (environmentId === null || environmentId === undefined) {
61
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'getEnvironmentCredentialSettings');
62
+ }
63
+ if (providerCode === null || providerCode === undefined) {
64
+ throw new Exceptions_1.ArgumentNullException('providerCode', 'getEnvironmentCredentialSettings');
65
+ }
66
+ let queryString = '';
67
+ const requestUrl = '/environments/{environment_id}/credentials/{provider_code}/settings' + (queryString ? `?${queryString}` : '');
68
+ const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))).replace(`{${"provider_code"}}`, encodeURIComponent(String(providerCode))));
69
+ return new ApiResponse_1.ApiResponse(response);
70
+ });
71
+ }
72
+ /**
73
+ *
74
+ * @summary Return a list of all Credentials belonging to an environment
75
+ * @param {number} environmentId The ID of the environment.
76
+ * @param {number} [page] Number of the page to be retrieved
77
+ * @param {number} [perPage] Number of items returned per page
78
+ * @param {string} [provider] Filter by credential provider.
79
+ * @param {string} [type] Filter by credential type.
80
+ */
81
+ listEnvironmentCredentials(environmentId, page, perPage, provider, type) {
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ if (environmentId === null || environmentId === undefined) {
84
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentCredentials');
85
+ }
86
+ let queryString = '';
87
+ const queryParams = { page: page, per_page: perPage, provider: provider, type: type, };
88
+ for (const key in queryParams) {
89
+ if (queryParams[key] === undefined || queryParams[key] === null) {
90
+ continue;
91
+ }
92
+ queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
93
+ }
94
+ const requestUrl = '/environments/{environment_id}/credentials' + (queryString ? `?${queryString}` : '');
95
+ const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
96
+ return new ApiResponse_1.ApiResponse(response);
97
+ });
98
+ }
99
+ }
100
+ exports.EnvironmentsCredentialsApiService = EnvironmentsCredentialsApiService;
@@ -12,6 +12,7 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Network } from '../../generated/models';
15
+ import { NetworkUpdate } from '../../generated/models';
15
16
  /**
16
17
  * NetworksApiService - Auto-generated
17
18
  */
@@ -28,4 +29,11 @@ export declare class NetworksApiService extends ApiBaseService {
28
29
  * @param {number} networkId The ID of the network.
29
30
  */
30
31
  getNetwork(networkId: number): Promise<ApiResponse<Network>>;
32
+ /**
33
+ *
34
+ * @summary Update an existing Network
35
+ * @param {number} networkId The ID of the network.
36
+ * @param {NetworkUpdate} networkUpdate A JSON object containing the resource data
37
+ */
38
+ updateNetwork(networkId: number, networkUpdate: NetworkUpdate): Promise<ApiResponse<void>>;
31
39
  }
@@ -61,5 +61,25 @@ class NetworksApiService extends ApiBaseService_1.ApiBaseService {
61
61
  return new ApiResponse_1.ApiResponse(response);
62
62
  });
63
63
  }
64
+ /**
65
+ *
66
+ * @summary Update an existing Network
67
+ * @param {number} networkId The ID of the network.
68
+ * @param {NetworkUpdate} networkUpdate A JSON object containing the resource data
69
+ */
70
+ updateNetwork(networkId, networkUpdate) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ if (networkId === null || networkId === undefined) {
73
+ throw new Exceptions_1.ArgumentNullException('networkId', 'updateNetwork');
74
+ }
75
+ if (networkUpdate === null || networkUpdate === undefined) {
76
+ throw new Exceptions_1.ArgumentNullException('networkUpdate', 'updateNetwork');
77
+ }
78
+ let queryString = '';
79
+ const requestUrl = '/networks/{network_id}' + (queryString ? `?${queryString}` : '');
80
+ const response = yield this.put(requestUrl.replace(`{${"network_id"}}`, encodeURIComponent(String(networkId))), networkUpdate);
81
+ return new ApiResponse_1.ApiResponse(response);
82
+ });
83
+ }
64
84
  }
65
85
  exports.NetworksApiService = NetworksApiService;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * devopness API
3
+ * Devopness API - Painless essential DevOps to everyone
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { ApiBaseService } from "../../../services/ApiBaseService";
13
+ import { ApiResponse } from "../../../common/ApiResponse";
14
+ import { CredentialOptions } from '../../generated/models';
15
+ /**
16
+ * StaticDataCredentialOptionsApiService - Auto-generated
17
+ */
18
+ export declare class StaticDataCredentialOptionsApiService extends ApiBaseService {
19
+ /**
20
+ *
21
+ * @summary List `Credential` resource options
22
+ */
23
+ getStaticCredentialOptions(): Promise<ApiResponse<CredentialOptions>>;
24
+ }
@@ -21,33 +21,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.StaticDataCloudProviderOptionsApiService = void 0;
24
+ exports.StaticDataCredentialOptionsApiService = void 0;
25
25
  const ApiBaseService_1 = require("../../../services/ApiBaseService");
26
26
  const ApiResponse_1 = require("../../../common/ApiResponse");
27
27
  /**
28
- * StaticDataCloudProviderOptionsApiService - Auto-generated
28
+ * StaticDataCredentialOptionsApiService - Auto-generated
29
29
  */
30
- class StaticDataCloudProviderOptionsApiService extends ApiBaseService_1.ApiBaseService {
30
+ class StaticDataCredentialOptionsApiService extends ApiBaseService_1.ApiBaseService {
31
31
  /**
32
32
  *
33
- * @summary List `Cloud Provider` service options
34
- * @param {number} [page] Number of the page to be retrieved
35
- * @param {number} [perPage] Number of items returned per page
33
+ * @summary List `Credential` resource options
36
34
  */
37
- listStaticCloudProviderOptions(page, perPage) {
35
+ getStaticCredentialOptions() {
38
36
  return __awaiter(this, void 0, void 0, function* () {
39
37
  let queryString = '';
40
- const queryParams = { page: page, per_page: perPage, };
41
- for (const key in queryParams) {
42
- if (queryParams[key] === undefined || queryParams[key] === null) {
43
- continue;
44
- }
45
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
46
- }
47
- const requestUrl = '/static/cloud-provider-options' + (queryString ? `?${queryString}` : '');
38
+ const requestUrl = '/static/credential-options' + (queryString ? `?${queryString}` : '');
48
39
  const response = yield this.get(requestUrl);
49
40
  return new ApiResponse_1.ApiResponse(response);
50
41
  });
51
42
  }
52
43
  }
53
- exports.StaticDataCloudProviderOptionsApiService = StaticDataCloudProviderOptionsApiService;
44
+ exports.StaticDataCredentialOptionsApiService = StaticDataCredentialOptionsApiService;
@@ -46,17 +46,17 @@ export interface ApplicationEnvironmentCreate {
46
46
  */
47
47
  programming_language: string;
48
48
  /**
49
- * The full name of a repository (`repository_owner/repository_name`) containing the application source code. Required when the `source_provider_id` field is informed. Must not be greater than 100 characters.
49
+ * The full name of a repository (`repository_owner/repository_name`) containing the application source code. Must not be greater than 100 characters.
50
50
  * @type {string}
51
51
  * @memberof ApplicationEnvironmentCreate
52
52
  */
53
53
  repository: string;
54
54
  /**
55
- * Numeric ID of the source provider account where the repository is hosted. Required when the `repository` field is informed.
55
+ * Numeric ID of the credential to source provider where the repository is hosted.
56
56
  * @type {number}
57
57
  * @memberof ApplicationEnvironmentCreate
58
58
  */
59
- source_provider_id: number;
59
+ credential_id: number;
60
60
  /**
61
61
  * The relative directory where package manager\'s manifest files (`package.json`, `composer.json`, `yarn.lock`, etc) are located. It needs to be set for applications where the actual source code is not located in the top level directory of the repository. Must start with one of <code>/</code>.
62
62
  * @type {string}
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { ApplicationLastDeployments } from './application-last-deployments';
13
- import { SourceProvider } from './source-provider';
13
+ import { Credential } from './credential';
14
14
  /**
15
15
  *
16
16
  * @export
@@ -48,7 +48,7 @@ export interface ApplicationRelation {
48
48
  */
49
49
  name: string;
50
50
  /**
51
- * The full name of a repository (`repository_owner/repository_name`) containing the application source code. Required when the `source_provider_id` field is informed.
51
+ * The full name of a repository (`repository_owner/repository_name`) containing the application source code.
52
52
  * @type {string}
53
53
  * @memberof ApplicationRelation
54
54
  */
@@ -121,10 +121,10 @@ export interface ApplicationRelation {
121
121
  last_deployments?: ApplicationLastDeployments;
122
122
  /**
123
123
  *
124
- * @type {SourceProvider}
124
+ * @type {Credential}
125
125
  * @memberof ApplicationRelation
126
126
  */
127
- source_provider?: SourceProvider;
127
+ credential?: Credential;
128
128
  /**
129
129
  * The date and time when the record was created
130
130
  * @type {string}
@@ -52,17 +52,17 @@ export interface ApplicationUpdate {
52
52
  */
53
53
  programming_language: string;
54
54
  /**
55
- * The full name of a repository (`repository_owner/repository_name`) containing the application source code. Required when the `source_provider_id` field is informed. Must not be greater than 100 characters.
55
+ * The full name of a repository (`repository_owner/repository_name`) containing the application source code. Must not be greater than 100 characters.
56
56
  * @type {string}
57
57
  * @memberof ApplicationUpdate
58
58
  */
59
59
  repository?: string;
60
60
  /**
61
- * Numeric ID of the source provider account where the repository is hosted. This field is required when <code>repository</code> is present.
61
+ * Numeric ID of the credential to source provider where the repository is hosted. This field is required when <code>repository</code> is present.
62
62
  * @type {number}
63
63
  * @memberof ApplicationUpdate
64
64
  */
65
- source_provider_id?: number;
65
+ credential_id?: number;
66
66
  /**
67
67
  * The relative directory where package manager\'s manifest files (`package.json`, `composer.json`, `yarn.lock`, etc) are located. It needs to be set for applications where the actual source code is not located in the top level directory of the repository. Must start with one of <code>/</code>.
68
68
  * @type {string}
@@ -10,10 +10,10 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { ApplicationLastDeployments } from './application-last-deployments';
13
+ import { CredentialRelation } from './credential-relation';
13
14
  import { DaemonRelation } from './daemon-relation';
14
15
  import { EnvironmentRelation } from './environment-relation';
15
16
  import { ServerRelation } from './server-relation';
16
- import { SourceProvider } from './source-provider';
17
17
  import { UserRelation } from './user-relation';
18
18
  import { VirtualHostRelation } from './virtual-host-relation';
19
19
  /**
@@ -53,7 +53,7 @@ export interface Application {
53
53
  */
54
54
  name: string;
55
55
  /**
56
- * The full name of a repository (`repository_owner/repository_name`) containing the application source code. Required when the `source_provider_id` field is informed.
56
+ * The full name of a repository (`repository_owner/repository_name`) containing the application source code.
57
57
  * @type {string}
58
58
  * @memberof Application
59
59
  */
@@ -144,10 +144,10 @@ export interface Application {
144
144
  servers: Array<ServerRelation>;
145
145
  /**
146
146
  *
147
- * @type {SourceProvider}
147
+ * @type {CredentialRelation}
148
148
  * @memberof Application
149
149
  */
150
- source_provider: SourceProvider;
150
+ credential: CredentialRelation | null;
151
151
  /**
152
152
  *
153
153
  * @type {Array<VirtualHostRelation>}