@devopness/sdk-js 2.21.0 → 2.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/README.md +2 -2
  2. package/dist/DevopnessApiClient.d.ts +16 -16
  3. package/dist/DevopnessApiClient.js +16 -16
  4. package/dist/api/generated/apis/applications-sslcertificates-api.d.ts +3 -3
  5. package/dist/api/generated/apis/applications-sslcertificates-api.js +5 -5
  6. package/dist/api/generated/apis/applications-variables-api.d.ts +3 -3
  7. package/dist/api/generated/apis/applications-variables-api.js +5 -5
  8. package/dist/api/generated/apis/environments-applications-api.d.ts +3 -3
  9. package/dist/api/generated/apis/environments-applications-api.js +5 -5
  10. package/dist/api/generated/apis/environments-cron-jobs-api.d.ts +3 -3
  11. package/dist/api/generated/apis/environments-cron-jobs-api.js +5 -5
  12. package/dist/api/generated/apis/environments-daemons-api.d.ts +3 -3
  13. package/dist/api/generated/apis/environments-daemons-api.js +5 -5
  14. package/dist/api/generated/apis/environments-servers-api.d.ts +3 -3
  15. package/dist/api/generated/apis/environments-servers-api.js +5 -5
  16. package/dist/api/generated/apis/environments-sshkeys-api.d.ts +3 -3
  17. package/dist/api/generated/apis/environments-sshkeys-api.js +5 -5
  18. package/dist/api/generated/apis/{environments-teams-api.d.ts → environments-team-memberships-api.d.ts} +6 -6
  19. package/dist/api/generated/apis/{environments-teams-api.js → environments-team-memberships-api.js} +9 -9
  20. package/dist/api/generated/apis/pipelines-api.d.ts +9 -0
  21. package/dist/api/generated/apis/pipelines-api.js +24 -0
  22. package/dist/api/generated/apis/pipelines-resources-api.d.ts +0 -9
  23. package/dist/api/generated/apis/pipelines-resources-api.js +0 -24
  24. package/dist/api/generated/apis/pipelines-steps-api.d.ts +9 -9
  25. package/dist/api/generated/apis/pipelines-steps-api.js +19 -19
  26. package/dist/api/generated/apis/projects-applications-api.d.ts +6 -6
  27. package/dist/api/generated/apis/projects-applications-api.js +9 -9
  28. package/dist/api/generated/apis/projects-cron-jobs-api.d.ts +3 -3
  29. package/dist/api/generated/apis/projects-cron-jobs-api.js +5 -5
  30. package/dist/api/generated/apis/projects-environments-api.d.ts +7 -7
  31. package/dist/api/generated/apis/projects-environments-api.js +10 -10
  32. package/dist/api/generated/apis/projects-network-rules-api.d.ts +3 -3
  33. package/dist/api/generated/apis/projects-network-rules-api.js +5 -5
  34. package/dist/api/generated/apis/projects-roles-api.d.ts +9 -6
  35. package/dist/api/generated/apis/projects-roles-api.js +18 -9
  36. package/dist/api/generated/apis/projects-servers-api.d.ts +3 -3
  37. package/dist/api/generated/apis/projects-servers-api.js +5 -5
  38. package/dist/api/generated/apis/projects-services-api.d.ts +3 -3
  39. package/dist/api/generated/apis/projects-services-api.js +5 -5
  40. package/dist/api/generated/apis/projects-sshkeys-api.d.ts +5 -5
  41. package/dist/api/generated/apis/projects-sshkeys-api.js +8 -8
  42. package/dist/api/generated/apis/projects-teams-api.d.ts +6 -6
  43. package/dist/api/generated/apis/projects-teams-api.js +9 -9
  44. package/dist/api/generated/apis/teams-invitations-api.d.ts +3 -3
  45. package/dist/api/generated/apis/teams-invitations-api.js +5 -5
  46. package/dist/api/generated/apis/users-api.d.ts +24 -44
  47. package/dist/api/generated/apis/users-api.js +37 -81
  48. package/dist/api/generated/apis/users-passwords-api.d.ts +33 -0
  49. package/dist/api/generated/apis/users-passwords-api.js +65 -0
  50. package/dist/api/generated/models/action-retry-response.d.ts +137 -0
  51. package/dist/api/generated/models/{application-create.js → action-retry-response.js} +0 -0
  52. package/dist/api/generated/models/{application-create.d.ts → application-project-create.d.ts} +63 -70
  53. package/dist/api/generated/models/{cron-job-create.js → application-project-create.js} +0 -0
  54. package/dist/api/generated/models/{cron-job-create.d.ts → cron-job-project-create.d.ts} +9 -9
  55. package/dist/api/generated/models/{daemon-create.js → cron-job-project-create.js} +0 -0
  56. package/dist/api/generated/models/{daemon-create.d.ts → daemon-environment-create.d.ts} +8 -8
  57. package/dist/api/generated/models/{environment-create.js → daemon-environment-create.js} +0 -0
  58. package/dist/api/generated/models/{environment-create.d.ts → environment-project-create.d.ts} +9 -9
  59. package/dist/api/generated/models/{invitation-create.js → environment-project-create.js} +0 -0
  60. package/dist/api/generated/models/index.d.ts +32 -22
  61. package/dist/api/generated/models/index.js +32 -22
  62. package/dist/api/generated/models/{invitation-create.d.ts → invitation-team-create.d.ts} +3 -3
  63. package/dist/api/generated/models/{network-rule-create.js → invitation-team-create.js} +0 -0
  64. package/dist/api/generated/models/{network-rule-create.d.ts → network-rule-project-create.d.ts} +10 -10
  65. package/dist/api/generated/models/{pipeline-step-create.js → network-rule-project-create.js} +0 -0
  66. package/dist/api/generated/models/{user-account-resend-verification.d.ts → password-reset-response.d.ts} +5 -5
  67. package/dist/api/generated/models/{pipeline-step-update.js → password-reset-response.js} +0 -0
  68. package/dist/api/generated/models/{user-password-reset.d.ts → password-user-reset.d.ts} +10 -10
  69. package/dist/api/generated/models/{pipeline-step.js → password-user-reset.js} +0 -0
  70. package/dist/api/generated/models/password-user-send-reset-link.d.ts +24 -0
  71. package/dist/api/generated/models/{role-create.js → password-user-send-reset-link.js} +0 -0
  72. package/dist/api/generated/models/pipeline-relation.d.ts +73 -0
  73. package/dist/api/generated/models/{server-create.js → pipeline-relation.js} +0 -0
  74. package/dist/api/generated/models/pipeline.d.ts +3 -3
  75. package/dist/api/generated/models/project-create.d.ts +3 -3
  76. package/dist/api/generated/models/project-relation.d.ts +16 -10
  77. package/dist/api/generated/models/project-update.d.ts +4 -4
  78. package/dist/api/generated/models/project.d.ts +26 -27
  79. package/dist/api/generated/models/{role-create.d.ts → role-project-create.d.ts} +7 -7
  80. package/dist/api/generated/models/{service-create.js → role-project-create.js} +0 -0
  81. package/dist/api/generated/models/role-relation.d.ts +60 -0
  82. package/dist/api/generated/models/{ssh-key-create.js → role-relation.js} +0 -0
  83. package/dist/api/generated/models/role-update.d.ts +2 -8
  84. package/dist/api/generated/models/role.d.ts +9 -9
  85. package/dist/api/generated/models/server-environment-create.d.ts +50 -0
  86. package/dist/api/generated/models/{ssl-certificate-create.js → server-environment-create.js} +0 -0
  87. package/dist/api/generated/models/{server-create.d.ts → server-project-create.d.ts} +10 -17
  88. package/dist/api/generated/models/{team-create.js → server-project-create.js} +0 -0
  89. package/dist/api/generated/models/{service-create.d.ts → service-project-create.d.ts} +7 -7
  90. package/dist/api/generated/models/{user-account-activate.js → service-project-create.js} +0 -0
  91. package/dist/api/generated/models/{ssh-key-create.d.ts → ssh-key-environment-create.d.ts} +5 -5
  92. package/dist/api/generated/models/{user-account-resend-verification.js → ssh-key-environment-create.js} +0 -0
  93. package/dist/api/generated/models/{ssl-certificate-create.d.ts → ssl-certificate-application-create.d.ts} +8 -8
  94. package/dist/api/generated/models/{user-account-verify.js → ssl-certificate-application-create.js} +0 -0
  95. package/dist/api/generated/models/{pipeline-step-create.d.ts → step-pipeline-create.d.ts} +7 -7
  96. package/dist/api/generated/models/{user-password-reset.js → step-pipeline-create.js} +0 -0
  97. package/dist/api/generated/models/{pipeline-step-update.d.ts → step-pipeline-update.d.ts} +9 -9
  98. package/dist/api/generated/models/{user-password-send-reset-link.js → step-pipeline-update.js} +0 -0
  99. package/dist/api/generated/models/{pipeline-step.d.ts → step.d.ts} +15 -15
  100. package/dist/api/generated/models/{user-refresh-token-create.js → step.js} +0 -0
  101. package/dist/api/generated/models/team-environment-create.d.ts +24 -0
  102. package/dist/api/generated/models/{variable-create.js → team-environment-create.js} +0 -0
  103. package/dist/api/generated/models/team-membership-relation.d.ts +55 -0
  104. package/dist/api/generated/models/team-membership-relation.js +14 -0
  105. package/dist/api/generated/models/{team-create.d.ts → team-project-create.d.ts} +6 -6
  106. package/dist/api/generated/models/team-project-create.js +14 -0
  107. package/dist/api/generated/models/team-relation.d.ts +3 -3
  108. package/dist/api/generated/models/team-update.d.ts +2 -8
  109. package/dist/api/generated/models/team.d.ts +3 -3
  110. package/dist/api/generated/models/user-create.d.ts +1 -1
  111. package/dist/api/generated/models/user-current.d.ts +74 -0
  112. package/dist/api/generated/models/user-current.js +14 -0
  113. package/dist/api/generated/models/user-login-response.d.ts +42 -0
  114. package/dist/api/generated/models/user-login-response.js +14 -0
  115. package/dist/api/generated/models/user-login.d.ts +30 -0
  116. package/dist/api/generated/models/user-login.js +14 -0
  117. package/dist/api/generated/models/user-refresh-token-response.d.ts +42 -0
  118. package/dist/api/generated/models/user-refresh-token-response.js +14 -0
  119. package/dist/api/generated/models/{user-refresh-token-create.d.ts → user-refresh-token.d.ts} +4 -4
  120. package/dist/api/generated/models/user-refresh-token.js +14 -0
  121. package/dist/api/generated/models/{user-password-send-reset-link.d.ts → user-resend-verification.d.ts} +4 -4
  122. package/dist/api/generated/models/user-resend-verification.js +14 -0
  123. package/dist/api/generated/models/user-update.d.ts +8 -9
  124. package/dist/api/generated/models/{user-account-activate.d.ts → user-verify.d.ts} +10 -10
  125. package/dist/api/generated/models/user-verify.js +14 -0
  126. package/dist/api/generated/models/user.d.ts +16 -10
  127. package/dist/api/generated/models/{variable-create.d.ts → variable-application-create.d.ts} +10 -10
  128. package/dist/api/generated/models/variable-application-create.js +14 -0
  129. package/dist/services/EnvironmentService.d.ts +2 -4
  130. package/dist/services/EnvironmentService.js +2 -4
  131. package/dist/services/UserService.d.ts +2 -0
  132. package/dist/services/UserService.js +2 -0
  133. package/package.json +1 -1
  134. package/dist/api/generated/apis/environments-members-api.d.ts +0 -37
  135. package/dist/api/generated/apis/environments-members-api.js +0 -87
  136. package/dist/api/generated/models/user-account-verify.d.ts +0 -30
@@ -12,7 +12,7 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { SshKey } from '../../generated/models';
15
- import { SshKeyCreate } from '../../generated/models';
15
+ import { SshKeyProjectCreate } from '../../generated/models';
16
16
  import { SshKeyRelation } from '../../generated/models';
17
17
  /**
18
18
  * ProjectsSSHKeysApiService - Auto-generated
@@ -20,11 +20,11 @@ import { SshKeyRelation } from '../../generated/models';
20
20
  export declare class ProjectsSSHKeysApiService extends ApiBaseService {
21
21
  /**
22
22
  *
23
- * @summary Create a SSH key and link it to the given project
24
- * @param {number} projectId The project numeric Id
25
- * @param {SshKeyCreate} sshKeyCreate A JSON object containing SSH key data
23
+ * @summary Create an SSH key and link it to the given project
24
+ * @param {number} projectId The ID of the project.
25
+ * @param {SshKeyProjectCreate} sshKeyProjectCreate A JSON object containing the resource data
26
26
  */
27
- addSshKeyToProject(projectId: number, sshKeyCreate: SshKeyCreate): Promise<ApiResponse<SshKey>>;
27
+ addProjectSshKey(projectId: number, sshKeyProjectCreate: SshKeyProjectCreate): Promise<ApiResponse<SshKey>>;
28
28
  /**
29
29
  *
30
30
  * @summary Return a list of all SSH keys added to a project
@@ -31,21 +31,21 @@ const Exceptions_1 = require("../../../common/Exceptions");
31
31
  class ProjectsSSHKeysApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
- * @summary Create a SSH key and link it to the given project
35
- * @param {number} projectId The project numeric Id
36
- * @param {SshKeyCreate} sshKeyCreate A JSON object containing SSH key data
34
+ * @summary Create an SSH key and link it to the given project
35
+ * @param {number} projectId The ID of the project.
36
+ * @param {SshKeyProjectCreate} sshKeyProjectCreate A JSON object containing the resource data
37
37
  */
38
- addSshKeyToProject(projectId, sshKeyCreate) {
38
+ addProjectSshKey(projectId, sshKeyProjectCreate) {
39
39
  return __awaiter(this, void 0, void 0, function* () {
40
40
  if (projectId === null || projectId === undefined) {
41
- throw new Exceptions_1.ArgumentNullException('projectId', 'addSshKeyToProject');
41
+ throw new Exceptions_1.ArgumentNullException('projectId', 'addProjectSshKey');
42
42
  }
43
- if (sshKeyCreate === null || sshKeyCreate === undefined) {
44
- throw new Exceptions_1.ArgumentNullException('sshKeyCreate', 'addSshKeyToProject');
43
+ if (sshKeyProjectCreate === null || sshKeyProjectCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('sshKeyProjectCreate', 'addProjectSshKey');
45
45
  }
46
46
  let queryString = '';
47
47
  const requestUrl = '/projects/{project_id}/ssh-keys' + (queryString ? `?${queryString}` : '');
48
- const response = yield this.post(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))), sshKeyCreate);
48
+ const response = yield this.post(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))), sshKeyProjectCreate);
49
49
  return new ApiResponse_1.ApiResponse(response);
50
50
  });
51
51
  }
@@ -12,7 +12,7 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Team } from '../../generated/models';
15
- import { TeamCreate } from '../../generated/models';
15
+ import { TeamProjectCreate } from '../../generated/models';
16
16
  import { TeamRelation } from '../../generated/models';
17
17
  /**
18
18
  * ProjectsTeamsApiService - Auto-generated
@@ -21,14 +21,14 @@ export declare class ProjectsTeamsApiService extends ApiBaseService {
21
21
  /**
22
22
  *
23
23
  * @summary Create a team to the given project
24
- * @param {number} projectId The numeric project ID
25
- * @param {TeamCreate} teamCreate A JSON object containing team data
24
+ * @param {number} projectId The ID of the project.
25
+ * @param {TeamProjectCreate} teamProjectCreate A JSON object containing the resource data
26
26
  */
27
- addTeam(projectId: number, teamCreate: TeamCreate): Promise<ApiResponse<Team>>;
27
+ addProjectTeam(projectId: number, teamProjectCreate: TeamProjectCreate): Promise<ApiResponse<Team>>;
28
28
  /**
29
29
  *
30
- * @summary Returns a list of all teams belonging to a project
31
- * @param {number} projectId Numeric ID of the project to get teams from
30
+ * @summary Return a list of all teams belonging to a project
31
+ * @param {number} projectId The ID of the project.
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
  */
@@ -32,27 +32,27 @@ class ProjectsTeamsApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
34
  * @summary Create a team to the given project
35
- * @param {number} projectId The numeric project ID
36
- * @param {TeamCreate} teamCreate A JSON object containing team data
35
+ * @param {number} projectId The ID of the project.
36
+ * @param {TeamProjectCreate} teamProjectCreate A JSON object containing the resource data
37
37
  */
38
- addTeam(projectId, teamCreate) {
38
+ addProjectTeam(projectId, teamProjectCreate) {
39
39
  return __awaiter(this, void 0, void 0, function* () {
40
40
  if (projectId === null || projectId === undefined) {
41
- throw new Exceptions_1.ArgumentNullException('projectId', 'addTeam');
41
+ throw new Exceptions_1.ArgumentNullException('projectId', 'addProjectTeam');
42
42
  }
43
- if (teamCreate === null || teamCreate === undefined) {
44
- throw new Exceptions_1.ArgumentNullException('teamCreate', 'addTeam');
43
+ if (teamProjectCreate === null || teamProjectCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('teamProjectCreate', 'addProjectTeam');
45
45
  }
46
46
  let queryString = '';
47
47
  const requestUrl = '/projects/{project_id}/teams' + (queryString ? `?${queryString}` : '');
48
- const response = yield this.post(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))), teamCreate);
48
+ const response = yield this.post(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))), teamProjectCreate);
49
49
  return new ApiResponse_1.ApiResponse(response);
50
50
  });
51
51
  }
52
52
  /**
53
53
  *
54
- * @summary Returns a list of all teams belonging to a project
55
- * @param {number} projectId Numeric ID of the project to get teams from
54
+ * @summary Return a list of all teams belonging to a project
55
+ * @param {number} projectId The ID of the project.
56
56
  * @param {number} [page] Number of the page to be retrieved
57
57
  * @param {number} [perPage] Number of items returned per page
58
58
  */
@@ -12,8 +12,8 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Invitation } from '../../generated/models';
15
- import { InvitationCreate } from '../../generated/models';
16
15
  import { InvitationRelation } from '../../generated/models';
16
+ import { InvitationTeamCreate } from '../../generated/models';
17
17
  /**
18
18
  * TeamsInvitationsApiService - Auto-generated
19
19
  */
@@ -22,9 +22,9 @@ export declare class TeamsInvitationsApiService extends ApiBaseService {
22
22
  *
23
23
  * @summary Send invitation to user email to participate to a team
24
24
  * @param {number} teamId The ID of the team.
25
- * @param {InvitationCreate} invitationCreate A JSON object containing the resource data
25
+ * @param {InvitationTeamCreate} invitationTeamCreate A JSON object containing the resource data
26
26
  */
27
- addTeamInvitation(teamId: number, invitationCreate: InvitationCreate): Promise<ApiResponse<Invitation>>;
27
+ addTeamInvitation(teamId: number, invitationTeamCreate: InvitationTeamCreate): Promise<ApiResponse<Invitation>>;
28
28
  /**
29
29
  *
30
30
  * @summary Return a list of pending invitations belonging to a team
@@ -33,19 +33,19 @@ class TeamsInvitationsApiService extends ApiBaseService_1.ApiBaseService {
33
33
  *
34
34
  * @summary Send invitation to user email to participate to a team
35
35
  * @param {number} teamId The ID of the team.
36
- * @param {InvitationCreate} invitationCreate A JSON object containing the resource data
36
+ * @param {InvitationTeamCreate} invitationTeamCreate A JSON object containing the resource data
37
37
  */
38
- addTeamInvitation(teamId, invitationCreate) {
38
+ addTeamInvitation(teamId, invitationTeamCreate) {
39
39
  return __awaiter(this, void 0, void 0, function* () {
40
40
  if (teamId === null || teamId === undefined) {
41
41
  throw new Exceptions_1.ArgumentNullException('teamId', 'addTeamInvitation');
42
42
  }
43
- if (invitationCreate === null || invitationCreate === undefined) {
44
- throw new Exceptions_1.ArgumentNullException('invitationCreate', 'addTeamInvitation');
43
+ if (invitationTeamCreate === null || invitationTeamCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('invitationTeamCreate', 'addTeamInvitation');
45
45
  }
46
46
  let queryString = '';
47
47
  const requestUrl = '/teams/{team_id}/invitations' + (queryString ? `?${queryString}` : '');
48
- const response = yield this.post(requestUrl.replace(`{${"team_id"}}`, encodeURIComponent(String(teamId))), invitationCreate);
48
+ const response = yield this.post(requestUrl.replace(`{${"team_id"}}`, encodeURIComponent(String(teamId))), invitationTeamCreate);
49
49
  return new ApiResponse_1.ApiResponse(response);
50
50
  });
51
51
  }
@@ -11,51 +11,42 @@
11
11
  */
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
- import { AcceptedResponseMessage } from '../../generated/models';
15
- import { LoginCredentials } from '../../generated/models';
16
14
  import { User } from '../../generated/models';
17
- import { UserAccountActivate } from '../../generated/models';
18
- import { UserAccountResendVerification } from '../../generated/models';
19
- import { UserAccountVerify } from '../../generated/models';
20
15
  import { UserCreate } from '../../generated/models';
21
- import { UserPasswordReset } from '../../generated/models';
22
- import { UserPasswordSendResetLink } from '../../generated/models';
23
- import { UserRefreshTokenCreate } from '../../generated/models';
24
- import { UserTokens } from '../../generated/models';
16
+ import { UserLogin } from '../../generated/models';
17
+ import { UserLoginResponse } from '../../generated/models';
18
+ import { UserRefreshToken } from '../../generated/models';
19
+ import { UserRefreshTokenResponse } from '../../generated/models';
20
+ import { UserResendVerification } from '../../generated/models';
25
21
  import { UserUpdate } from '../../generated/models';
22
+ import { UserVerify } from '../../generated/models';
26
23
  /**
27
24
  * UsersApiService - Auto-generated
28
25
  */
29
26
  export declare class UsersApiService extends ApiBaseService {
30
27
  /**
31
28
  *
32
- * @summary Activate the user account
33
- * @param {UserAccountActivate} userAccountActivate A JSON object containing user account data
29
+ * @summary Sign up/register a new user
30
+ * @param {UserCreate} userCreate A JSON object containing the resource data
34
31
  */
35
- activateUser(userAccountActivate: UserAccountActivate): Promise<ApiResponse<void>>;
32
+ addUser(userCreate: UserCreate): Promise<ApiResponse<void>>;
36
33
  /**
37
34
  *
38
- * @summary Sign up/register a new user
39
- * @param {UserCreate} userCreate A JSON object containing user essential data
35
+ * @summary Get a user by ID
36
+ * @param {number} userId The ID of the user.
40
37
  */
41
- addUser(userCreate: UserCreate): Promise<ApiResponse<AcceptedResponseMessage>>;
38
+ getUser(userId: number): Promise<ApiResponse<User>>;
42
39
  /**
43
40
  *
44
41
  * @summary Get details of the current user
45
42
  */
46
- getCurrentUser(): Promise<ApiResponse<User>>;
47
- /**
48
- *
49
- * @summary Get a user by ID
50
- * @param {number} userId Numeric ID of the user to be retrieved
51
- */
52
- getUser(userId: number): Promise<ApiResponse<User>>;
43
+ getUserCurrent(): Promise<ApiResponse<User>>;
53
44
  /**
54
45
  *
55
46
  * @summary Login/create a new token for the given credentials
56
- * @param {LoginCredentials} loginCredentials A JSON object containing user credentials
47
+ * @param {UserLogin} userLogin A JSON object containing the resource data
57
48
  */
58
- login(loginCredentials: LoginCredentials): Promise<ApiResponse<UserTokens>>;
49
+ loginUser(userLogin: UserLogin): Promise<ApiResponse<UserLoginResponse>>;
59
50
  /**
60
51
  *
61
52
  * @summary Logout/revoke an existing token
@@ -64,37 +55,26 @@ export declare class UsersApiService extends ApiBaseService {
64
55
  /**
65
56
  *
66
57
  * @summary Refresh an existing user access token
67
- * @param {UserRefreshTokenCreate} userRefreshTokenCreate A JSON object containing user essential data
58
+ * @param {UserRefreshToken} userRefreshToken A JSON object containing the resource data
68
59
  */
69
- refreshToken(userRefreshTokenCreate: UserRefreshTokenCreate): Promise<ApiResponse<UserTokens>>;
60
+ refreshTokenUser(userRefreshToken: UserRefreshToken): Promise<ApiResponse<UserRefreshTokenResponse>>;
70
61
  /**
71
62
  *
72
63
  * @summary Resend the verification email
73
- * @param {UserAccountResendVerification} userAccountResendVerification A JSON object containing the email to resend the verification link
74
- */
75
- resendUserVerification(userAccountResendVerification: UserAccountResendVerification): Promise<ApiResponse<void>>;
76
- /**
77
- *
78
- * @summary Reset the user password
79
- * @param {UserPasswordReset} userPasswordReset A JSON containing the new password of the user
64
+ * @param {UserResendVerification} userResendVerification A JSON object containing the resource data
80
65
  */
81
- resetUserPassword(userPasswordReset: UserPasswordReset): Promise<ApiResponse<object>>;
82
- /**
83
- *
84
- * @summary Send the password reset link to user\'s email
85
- * @param {UserPasswordSendResetLink} userPasswordSendResetLink A JSON containing the user email
86
- */
87
- sendUserPasswordResetLink(userPasswordSendResetLink: UserPasswordSendResetLink): Promise<ApiResponse<object>>;
66
+ resendVerificationUser(userResendVerification: UserResendVerification): Promise<ApiResponse<void>>;
88
67
  /**
89
68
  *
90
69
  * @summary Update an existing user
91
- * @param {number} userId Numeric ID of the user
92
- * @param {UserUpdate} userUpdate A JSON containing user data
70
+ * @param {number} userId The ID of the user.
71
+ * @param {UserUpdate} userUpdate A JSON object containing the resource data
93
72
  */
94
73
  updateUser(userId: number, userUpdate: UserUpdate): Promise<ApiResponse<void>>;
95
74
  /**
96
75
  *
97
- * @summary Get the information about the activation status of the current user
76
+ * @summary Activate the user account
77
+ * @param {UserVerify} userVerify A JSON object containing the resource data
98
78
  */
99
- verifyUser(): Promise<ApiResponse<UserAccountVerify>>;
79
+ verifyUser(userVerify: UserVerify): Promise<ApiResponse<void>>;
100
80
  }
@@ -29,26 +29,10 @@ const Exceptions_1 = require("../../../common/Exceptions");
29
29
  * UsersApiService - Auto-generated
30
30
  */
31
31
  class UsersApiService extends ApiBaseService_1.ApiBaseService {
32
- /**
33
- *
34
- * @summary Activate the user account
35
- * @param {UserAccountActivate} userAccountActivate A JSON object containing user account data
36
- */
37
- activateUser(userAccountActivate) {
38
- return __awaiter(this, void 0, void 0, function* () {
39
- if (userAccountActivate === null || userAccountActivate === undefined) {
40
- throw new Exceptions_1.ArgumentNullException('userAccountActivate', 'activateUser');
41
- }
42
- let queryString = '';
43
- const requestUrl = '/users/account/verify' + (queryString ? `?${queryString}` : '');
44
- const response = yield this.post(requestUrl, userAccountActivate);
45
- return new ApiResponse_1.ApiResponse(response);
46
- });
47
- }
48
32
  /**
49
33
  *
50
34
  * @summary Sign up/register a new user
51
- * @param {UserCreate} userCreate A JSON object containing user essential data
35
+ * @param {UserCreate} userCreate A JSON object containing the resource data
52
36
  */
53
37
  addUser(userCreate) {
54
38
  return __awaiter(this, void 0, void 0, function* () {
@@ -63,45 +47,45 @@ class UsersApiService extends ApiBaseService_1.ApiBaseService {
63
47
  }
64
48
  /**
65
49
  *
66
- * @summary Get details of the current user
50
+ * @summary Get a user by ID
51
+ * @param {number} userId The ID of the user.
67
52
  */
68
- getCurrentUser() {
53
+ getUser(userId) {
69
54
  return __awaiter(this, void 0, void 0, function* () {
55
+ if (userId === null || userId === undefined) {
56
+ throw new Exceptions_1.ArgumentNullException('userId', 'getUser');
57
+ }
70
58
  let queryString = '';
71
- const requestUrl = '/users/me' + (queryString ? `?${queryString}` : '');
72
- const response = yield this.get(requestUrl);
59
+ const requestUrl = '/users/{user_id}' + (queryString ? `?${queryString}` : '');
60
+ const response = yield this.get(requestUrl.replace(`{${"user_id"}}`, encodeURIComponent(String(userId))));
73
61
  return new ApiResponse_1.ApiResponse(response);
74
62
  });
75
63
  }
76
64
  /**
77
65
  *
78
- * @summary Get a user by ID
79
- * @param {number} userId Numeric ID of the user to be retrieved
66
+ * @summary Get details of the current user
80
67
  */
81
- getUser(userId) {
68
+ getUserCurrent() {
82
69
  return __awaiter(this, void 0, void 0, function* () {
83
- if (userId === null || userId === undefined) {
84
- throw new Exceptions_1.ArgumentNullException('userId', 'getUser');
85
- }
86
70
  let queryString = '';
87
- const requestUrl = '/users/{user_id}' + (queryString ? `?${queryString}` : '');
88
- const response = yield this.get(requestUrl.replace(`{${"user_id"}}`, encodeURIComponent(String(userId))));
71
+ const requestUrl = '/users/current' + (queryString ? `?${queryString}` : '');
72
+ const response = yield this.get(requestUrl);
89
73
  return new ApiResponse_1.ApiResponse(response);
90
74
  });
91
75
  }
92
76
  /**
93
77
  *
94
78
  * @summary Login/create a new token for the given credentials
95
- * @param {LoginCredentials} loginCredentials A JSON object containing user credentials
79
+ * @param {UserLogin} userLogin A JSON object containing the resource data
96
80
  */
97
- login(loginCredentials) {
81
+ loginUser(userLogin) {
98
82
  return __awaiter(this, void 0, void 0, function* () {
99
- if (loginCredentials === null || loginCredentials === undefined) {
100
- throw new Exceptions_1.ArgumentNullException('loginCredentials', 'login');
83
+ if (userLogin === null || userLogin === undefined) {
84
+ throw new Exceptions_1.ArgumentNullException('userLogin', 'loginUser');
101
85
  }
102
86
  let queryString = '';
103
87
  const requestUrl = '/users/login' + (queryString ? `?${queryString}` : '');
104
- const response = yield this.post(requestUrl, loginCredentials);
88
+ const response = yield this.post(requestUrl, userLogin);
105
89
  return new ApiResponse_1.ApiResponse(response);
106
90
  });
107
91
  }
@@ -120,72 +104,40 @@ class UsersApiService extends ApiBaseService_1.ApiBaseService {
120
104
  /**
121
105
  *
122
106
  * @summary Refresh an existing user access token
123
- * @param {UserRefreshTokenCreate} userRefreshTokenCreate A JSON object containing user essential data
107
+ * @param {UserRefreshToken} userRefreshToken A JSON object containing the resource data
124
108
  */
125
- refreshToken(userRefreshTokenCreate) {
109
+ refreshTokenUser(userRefreshToken) {
126
110
  return __awaiter(this, void 0, void 0, function* () {
127
- if (userRefreshTokenCreate === null || userRefreshTokenCreate === undefined) {
128
- throw new Exceptions_1.ArgumentNullException('userRefreshTokenCreate', 'refreshToken');
111
+ if (userRefreshToken === null || userRefreshToken === undefined) {
112
+ throw new Exceptions_1.ArgumentNullException('userRefreshToken', 'refreshTokenUser');
129
113
  }
130
114
  let queryString = '';
131
115
  const requestUrl = '/users/refresh-token' + (queryString ? `?${queryString}` : '');
132
- const response = yield this.post(requestUrl, userRefreshTokenCreate);
116
+ const response = yield this.post(requestUrl, userRefreshToken);
133
117
  return new ApiResponse_1.ApiResponse(response);
134
118
  });
135
119
  }
136
120
  /**
137
121
  *
138
122
  * @summary Resend the verification email
139
- * @param {UserAccountResendVerification} userAccountResendVerification A JSON object containing the email to resend the verification link
123
+ * @param {UserResendVerification} userResendVerification A JSON object containing the resource data
140
124
  */
141
- resendUserVerification(userAccountResendVerification) {
125
+ resendVerificationUser(userResendVerification) {
142
126
  return __awaiter(this, void 0, void 0, function* () {
143
- if (userAccountResendVerification === null || userAccountResendVerification === undefined) {
144
- throw new Exceptions_1.ArgumentNullException('userAccountResendVerification', 'resendUserVerification');
127
+ if (userResendVerification === null || userResendVerification === undefined) {
128
+ throw new Exceptions_1.ArgumentNullException('userResendVerification', 'resendVerificationUser');
145
129
  }
146
130
  let queryString = '';
147
131
  const requestUrl = '/users/account/resend-verification' + (queryString ? `?${queryString}` : '');
148
- const response = yield this.post(requestUrl, userAccountResendVerification);
149
- return new ApiResponse_1.ApiResponse(response);
150
- });
151
- }
152
- /**
153
- *
154
- * @summary Reset the user password
155
- * @param {UserPasswordReset} userPasswordReset A JSON containing the new password of the user
156
- */
157
- resetUserPassword(userPasswordReset) {
158
- return __awaiter(this, void 0, void 0, function* () {
159
- if (userPasswordReset === null || userPasswordReset === undefined) {
160
- throw new Exceptions_1.ArgumentNullException('userPasswordReset', 'resetUserPassword');
161
- }
162
- let queryString = '';
163
- const requestUrl = '/users/password/reset' + (queryString ? `?${queryString}` : '');
164
- const response = yield this.post(requestUrl, userPasswordReset);
165
- return new ApiResponse_1.ApiResponse(response);
166
- });
167
- }
168
- /**
169
- *
170
- * @summary Send the password reset link to user\'s email
171
- * @param {UserPasswordSendResetLink} userPasswordSendResetLink A JSON containing the user email
172
- */
173
- sendUserPasswordResetLink(userPasswordSendResetLink) {
174
- return __awaiter(this, void 0, void 0, function* () {
175
- if (userPasswordSendResetLink === null || userPasswordSendResetLink === undefined) {
176
- throw new Exceptions_1.ArgumentNullException('userPasswordSendResetLink', 'sendUserPasswordResetLink');
177
- }
178
- let queryString = '';
179
- const requestUrl = '/users/password/send-reset-link' + (queryString ? `?${queryString}` : '');
180
- const response = yield this.post(requestUrl, userPasswordSendResetLink);
132
+ const response = yield this.post(requestUrl, userResendVerification);
181
133
  return new ApiResponse_1.ApiResponse(response);
182
134
  });
183
135
  }
184
136
  /**
185
137
  *
186
138
  * @summary Update an existing user
187
- * @param {number} userId Numeric ID of the user
188
- * @param {UserUpdate} userUpdate A JSON containing user data
139
+ * @param {number} userId The ID of the user.
140
+ * @param {UserUpdate} userUpdate A JSON object containing the resource data
189
141
  */
190
142
  updateUser(userId, userUpdate) {
191
143
  return __awaiter(this, void 0, void 0, function* () {
@@ -203,13 +155,17 @@ class UsersApiService extends ApiBaseService_1.ApiBaseService {
203
155
  }
204
156
  /**
205
157
  *
206
- * @summary Get the information about the activation status of the current user
158
+ * @summary Activate the user account
159
+ * @param {UserVerify} userVerify A JSON object containing the resource data
207
160
  */
208
- verifyUser() {
161
+ verifyUser(userVerify) {
209
162
  return __awaiter(this, void 0, void 0, function* () {
163
+ if (userVerify === null || userVerify === undefined) {
164
+ throw new Exceptions_1.ArgumentNullException('userVerify', 'verifyUser');
165
+ }
210
166
  let queryString = '';
211
167
  const requestUrl = '/users/account/verify' + (queryString ? `?${queryString}` : '');
212
- const response = yield this.get(requestUrl);
168
+ const response = yield this.post(requestUrl, userVerify);
213
169
  return new ApiResponse_1.ApiResponse(response);
214
170
  });
215
171
  }
@@ -0,0 +1,33 @@
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 { PasswordResetResponse } from '../../generated/models';
15
+ import { PasswordUserReset } from '../../generated/models';
16
+ import { PasswordUserSendResetLink } from '../../generated/models';
17
+ /**
18
+ * UsersPasswordsApiService - Auto-generated
19
+ */
20
+ export declare class UsersPasswordsApiService extends ApiBaseService {
21
+ /**
22
+ *
23
+ * @summary Reset the user password
24
+ * @param {PasswordUserReset} passwordUserReset A JSON object containing the resource data
25
+ */
26
+ resetUserPassword(passwordUserReset: PasswordUserReset): Promise<ApiResponse<PasswordResetResponse>>;
27
+ /**
28
+ *
29
+ * @summary Send the password reset link to user\'s email
30
+ * @param {PasswordUserSendResetLink} passwordUserSendResetLink A JSON object containing the resource data
31
+ */
32
+ sendResetLinkUserPassword(passwordUserSendResetLink: PasswordUserSendResetLink): Promise<ApiResponse<void>>;
33
+ }
@@ -0,0 +1,65 @@
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.UsersPasswordsApiService = 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
+ * UsersPasswordsApiService - Auto-generated
30
+ */
31
+ class UsersPasswordsApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Reset the user password
35
+ * @param {PasswordUserReset} passwordUserReset A JSON object containing the resource data
36
+ */
37
+ resetUserPassword(passwordUserReset) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ if (passwordUserReset === null || passwordUserReset === undefined) {
40
+ throw new Exceptions_1.ArgumentNullException('passwordUserReset', 'resetUserPassword');
41
+ }
42
+ let queryString = '';
43
+ const requestUrl = '/users/password/reset' + (queryString ? `?${queryString}` : '');
44
+ const response = yield this.post(requestUrl, passwordUserReset);
45
+ return new ApiResponse_1.ApiResponse(response);
46
+ });
47
+ }
48
+ /**
49
+ *
50
+ * @summary Send the password reset link to user\'s email
51
+ * @param {PasswordUserSendResetLink} passwordUserSendResetLink A JSON object containing the resource data
52
+ */
53
+ sendResetLinkUserPassword(passwordUserSendResetLink) {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ if (passwordUserSendResetLink === null || passwordUserSendResetLink === undefined) {
56
+ throw new Exceptions_1.ArgumentNullException('passwordUserSendResetLink', 'sendResetLinkUserPassword');
57
+ }
58
+ let queryString = '';
59
+ const requestUrl = '/users/password/send-reset-link' + (queryString ? `?${queryString}` : '');
60
+ const response = yield this.post(requestUrl, passwordUserSendResetLink);
61
+ return new ApiResponse_1.ApiResponse(response);
62
+ });
63
+ }
64
+ }
65
+ exports.UsersPasswordsApiService = UsersPasswordsApiService;