@devopness/sdk-js 1.104.0 → 1.105.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.
package/README.md CHANGED
@@ -20,7 +20,7 @@ yarn add @devopness/sdk-js
20
20
 
21
21
  ### Initializing
22
22
 
23
- To initialize the usage of Devopness SDK just import it and create a new instance of `DevopnessApiClient` class.
23
+ To initialize the usage of Devopness SDK, just import it and create a new instance of `DevopnessApiClient` class.
24
24
 
25
25
  Here is a generic simple example that can be used from `Node.js`, `TypeScript` or `Javascript` applications:
26
26
 
@@ -30,8 +30,8 @@ const devopnessApi = new DevopnessApiClient();
30
30
  ```
31
31
 
32
32
  The instance of `DevopnessApiClient` has properties to all services provided by the API.
33
- The name of the methods at services is the same as operation name in the documentation of the
34
- Devopness API. You can consult the URL of a endpoint to see the operation name. For instance
33
+ The name of the methods at services is the same as the operation name in the documentation of the
34
+ Devopness API. You can consult the URL of an endpoint to see the operation name. For instance,
35
35
  the URL to endpoint `POST /users/login` in the documentation is: `/#operation/login`
36
36
 
37
37
  ### Authenticating
@@ -49,7 +49,7 @@ async function authenticate(email, pass) {
49
49
  authenticate('user@email.com', 'secret-password');
50
50
  ```
51
51
 
52
- In the example above, `userTokens` is a instance of `ApiResponse` and the `data` property has the data requested from the API. See [ApiResponse.ts](https://github.com/devopness/devopness/blob/master/src/common/ApiResponse.ts) for reference.
52
+ In the example above, `userTokens` is an instance of `ApiResponse` and the `data` property has the data requested from the API. See [ApiResponse.ts](https://github.com/devopness/devopness/blob/master/src/common/ApiResponse.ts) for reference.
53
53
 
54
54
  ### Invoking authentication protected endpoints
55
55
  Once an authentication token is set, any protected endpoint can be invoked.
@@ -74,7 +74,7 @@ getUserProfile();
74
74
  This package includes TypeScript declarations for every method.
75
75
  TypeScript versions `>= 3.8` are supported.
76
76
 
77
- Some methods in `Devopness SDK JavaScript` accept and return objects from the Devopness API. The type declarations for these objects will always track the latest version of the API. Therefore, if you'e using the latest version of this package you can rely on the Devopness API documentation for checking the input and return types of each API endpoint.
77
+ Some methods in `Devopness SDK JavaScript` accept and return objects from the Devopness API. The type declarations for these objects will always track the latest version of the API. Therefore, if you'e using the latest version of this package, you can rely on the Devopness API documentation for checking the input and return types of each API endpoint.
78
78
 
79
79
  ## Building and testing
80
80
  To build and test the SDK locally, follow these steps:
@@ -18,7 +18,7 @@ import { HookRelation } from '../../generated/models';
18
18
  export declare class ApplicationsHooksApiService extends ApiBaseService {
19
19
  /**
20
20
  *
21
- * @summary Returns a list of all incoming hooks belonging to an application
21
+ * @summary Returns a list of all hooks belonging to an application
22
22
  * @param {number} applicationId Unique id of the application
23
23
  */
24
24
  listApplicationHooks(applicationId: number): Promise<ApiResponse<Array<HookRelation>>>;
@@ -31,7 +31,7 @@ const Exceptions_1 = require("../../../common/Exceptions");
31
31
  class ApplicationsHooksApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
- * @summary Returns a list of all incoming hooks belonging to an application
34
+ * @summary Returns a list of all hooks belonging to an application
35
35
  * @param {number} applicationId Unique id of the application
36
36
  */
37
37
  listApplicationHooks(applicationId) {
@@ -12,6 +12,7 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { ApplicationOptions } from '../../generated/models';
15
+ import { CloudProvider } from '../../generated/models';
15
16
  import { CronJobOptions } from '../../generated/models';
16
17
  import { EnvironmentOptions } from '../../generated/models';
17
18
  import { ServerOptions } from '../../generated/models';
@@ -25,6 +26,11 @@ export declare class StaticDataApiService extends ApiBaseService {
25
26
  * @summary Lists options of the applications
26
27
  */
27
28
  listApplicationOptions(): Promise<ApiResponse<ApplicationOptions>>;
29
+ /**
30
+ *
31
+ * @summary Lists cloud providers
32
+ */
33
+ listCloudProviders(): Promise<ApiResponse<Array<CloudProvider>>>;
28
34
  /**
29
35
  *
30
36
  * @summary Lists options of the cronjobs
@@ -40,6 +40,18 @@ class StaticDataApiService extends ApiBaseService_1.ApiBaseService {
40
40
  return new ApiResponse_1.ApiResponse(response);
41
41
  });
42
42
  }
43
+ /**
44
+ *
45
+ * @summary Lists cloud providers
46
+ */
47
+ listCloudProviders() {
48
+ return __awaiter(this, void 0, void 0, function* () {
49
+ let queryString = '';
50
+ const requestUrl = '/static/cloud-providers' + (queryString ? `?${queryString}` : '');
51
+ const response = yield this.get(requestUrl);
52
+ return new ApiResponse_1.ApiResponse(response);
53
+ });
54
+ }
43
55
  /**
44
56
  *
45
57
  * @summary Lists options of the cronjobs
@@ -9,6 +9,8 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { CloudProviderSettings } from './cloud-provider-settings';
13
+ import { CloudService } from './cloud-service';
12
14
  /**
13
15
  *
14
16
  * @export
@@ -16,21 +18,39 @@
16
18
  */
17
19
  export interface CloudProvider {
18
20
  /**
19
- * The code that uniquely identify a cloud provider
21
+ * Cloud provider code
20
22
  * @type {string}
21
23
  * @memberof CloudProvider
22
24
  */
23
25
  code: string;
24
26
  /**
25
- * A URL path to the provider\'s logo image
27
+ * Cloud provider name
26
28
  * @type {string}
27
29
  * @memberof CloudProvider
28
30
  */
29
- logo_url: string;
31
+ name: string;
30
32
  /**
31
- * The name of the cloud provider
33
+ * Text describing what is the provider
32
34
  * @type {string}
33
35
  * @memberof CloudProvider
34
36
  */
35
- name: string;
37
+ hint?: string;
38
+ /**
39
+ * The provider\'s logo URL.
40
+ * @type {string}
41
+ * @memberof CloudProvider
42
+ */
43
+ logo_url: string;
44
+ /**
45
+ *
46
+ * @type {Array<CloudService>}
47
+ * @memberof CloudProvider
48
+ */
49
+ cloud_services?: Array<CloudService>;
50
+ /**
51
+ *
52
+ * @type {CloudProviderSettings}
53
+ * @memberof CloudProvider
54
+ */
55
+ settings?: CloudProviderSettings;
36
56
  }
@@ -34,13 +34,13 @@ export interface CloudService {
34
34
  * @type {Array<ProviderRegion>}
35
35
  * @memberof CloudService
36
36
  */
37
- regions: Array<ProviderRegion>;
37
+ regions?: Array<ProviderRegion>;
38
38
  /**
39
39
  *
40
40
  * @type {Array<OperatingSystem>}
41
41
  * @memberof CloudService
42
42
  */
43
- os: Array<OperatingSystem>;
43
+ os?: Array<OperatingSystem>;
44
44
  }
45
45
  /**
46
46
  * @export
@@ -9,7 +9,6 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { ActionListItem } from './action-list-item';
13
12
  import { ActionRelation } from './action-relation';
14
13
  import { ActionStatus } from './action-status';
15
14
  import { EnvironmentRelation } from './environment-relation';
@@ -76,12 +75,6 @@ export interface Server {
76
75
  * @memberof Server
77
76
  */
78
77
  status?: ActionStatus;
79
- /**
80
- * The list of related actions
81
- * @type {Array<ActionListItem>}
82
- * @memberof Server
83
- */
84
- actions: Array<ActionListItem>;
85
78
  /**
86
79
  * The list of environments to which the server is linked to
87
80
  * @type {Array<EnvironmentRelation>}
@@ -1,4 +1,5 @@
1
1
  import { EnvironmentsApiService } from '../api/generated/apis/environments-api';
2
+ import { EnvironmentsActionsApiService } from '../api/generated/apis/environments-actions-api';
2
3
  import { EnvironmentsApplicationsApiService } from '../api/generated/apis/environments-applications-api';
3
4
  import { EnvironmentsCronJobsApiService } from '../api/generated/apis/environments-cron-jobs-api';
4
5
  import { EnvironmentsDaemonsApiService } from '../api/generated/apis/environments-daemons-api';
@@ -9,6 +10,7 @@ import { EnvironmentsServicesApiService } from '../api/generated/apis/environmen
9
10
  import { EnvironmentsSSHKeysApiService } from '../api/generated/apis/environments-sshkeys-api';
10
11
  import { EnvironmentsTeamsApiService } from '../api/generated/apis/environments-teams-api';
11
12
  export declare class EnvironmentService extends EnvironmentsApiService {
13
+ actions: EnvironmentsActionsApiService;
12
14
  applications: EnvironmentsApplicationsApiService;
13
15
  cronjobs: EnvironmentsCronJobsApiService;
14
16
  daemons: EnvironmentsDaemonsApiService;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EnvironmentService = void 0;
4
4
  const environments_api_1 = require("../api/generated/apis/environments-api");
5
+ const environments_actions_api_1 = require("../api/generated/apis/environments-actions-api");
5
6
  const environments_applications_api_1 = require("../api/generated/apis/environments-applications-api");
6
7
  const environments_cron_jobs_api_1 = require("../api/generated/apis/environments-cron-jobs-api");
7
8
  const environments_daemons_api_1 = require("../api/generated/apis/environments-daemons-api");
@@ -14,6 +15,7 @@ const environments_teams_api_1 = require("../api/generated/apis/environments-tea
14
15
  class EnvironmentService extends environments_api_1.EnvironmentsApiService {
15
16
  constructor() {
16
17
  super(...arguments);
18
+ this.actions = new environments_actions_api_1.EnvironmentsActionsApiService();
17
19
  this.applications = new environments_applications_api_1.EnvironmentsApplicationsApiService();
18
20
  this.cronjobs = new environments_cron_jobs_api_1.EnvironmentsCronJobsApiService();
19
21
  this.daemons = new environments_daemons_api_1.EnvironmentsDaemonsApiService();
@@ -1,4 +1,5 @@
1
1
  import { ProjectsApiService } from '../api/generated/apis/projects-api';
2
+ import { ProjectsActionsApiService } from '../api/generated/apis/projects-actions-api';
2
3
  import { ProjectsApplicationsApiService } from '../api/generated/apis/projects-applications-api';
3
4
  import { ProjectsCronJobsApiService } from '../api/generated/apis/projects-cron-jobs-api';
4
5
  import { ProjectsEnvironmentsApiService } from '../api/generated/apis/projects-environments-api';
@@ -8,6 +9,7 @@ import { ProjectsServicesApiService } from '../api/generated/apis/projects-servi
8
9
  import { ProjectsSSHKeysApiService } from '../api/generated/apis/projects-sshkeys-api';
9
10
  import { ProjectsDaemonsApiService } from '../api/generated/apis/projects-daemons-api';
10
11
  export declare class ProjectService extends ProjectsApiService {
12
+ actions: ProjectsActionsApiService;
11
13
  applications: ProjectsApplicationsApiService;
12
14
  cronjobs: ProjectsCronJobsApiService;
13
15
  daemons: ProjectsDaemonsApiService;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProjectService = void 0;
4
4
  const projects_api_1 = require("../api/generated/apis/projects-api");
5
+ const projects_actions_api_1 = require("../api/generated/apis/projects-actions-api");
5
6
  const projects_applications_api_1 = require("../api/generated/apis/projects-applications-api");
6
7
  const projects_cron_jobs_api_1 = require("../api/generated/apis/projects-cron-jobs-api");
7
8
  const projects_environments_api_1 = require("../api/generated/apis/projects-environments-api");
@@ -13,6 +14,7 @@ const projects_daemons_api_1 = require("../api/generated/apis/projects-daemons-a
13
14
  class ProjectService extends projects_api_1.ProjectsApiService {
14
15
  constructor() {
15
16
  super(...arguments);
17
+ this.actions = new projects_actions_api_1.ProjectsActionsApiService();
16
18
  this.applications = new projects_applications_api_1.ProjectsApplicationsApiService();
17
19
  this.cronjobs = new projects_cron_jobs_api_1.ProjectsCronJobsApiService();
18
20
  this.daemons = new projects_daemons_api_1.ProjectsDaemonsApiService();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devopness/sdk-js",
3
- "version": "1.104.0",
3
+ "version": "1.105.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },