@devopness/sdk-js 2.24.0 → 2.25.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.
@@ -13,26 +13,27 @@ import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { SourceProvider } from '../../generated/models';
15
15
  import { SourceProviderCreate } from '../../generated/models';
16
+ import { SourceProviderRelation } from '../../generated/models';
16
17
  /**
17
18
  * SourceProvidersApiService - Auto-generated
18
19
  */
19
20
  export declare class SourceProvidersApiService extends ApiBaseService {
20
21
  /**
21
22
  *
22
- * @summary Create a new source provider linked to the current user\'s profile
23
- * @param {SourceProviderCreate} sourceProviderCreate A JSON object containing source provider callback data
23
+ * @summary Add a new source provider to the current user\'s profile
24
+ * @param {SourceProviderCreate} sourceProviderCreate A JSON object containing the resource data
24
25
  */
25
26
  addSourceProvider(sourceProviderCreate: SourceProviderCreate): Promise<ApiResponse<SourceProvider>>;
26
27
  /**
27
28
  *
28
29
  * @summary Delete a given source provider from current user\'s account
29
- * @param {number} sourceProviderId Unique Id of the source provider to be deleted
30
+ * @param {number} sourceProviderId The ID of the source provider.
30
31
  */
31
32
  deleteSourceProvider(sourceProviderId: number): Promise<ApiResponse<void>>;
32
33
  /**
33
34
  *
34
- * @summary Get details of a single Source Code provider
35
- * @param {number} sourceProviderId Unique ID of the provider to be retrieved
35
+ * @summary Get a source provider by ID
36
+ * @param {number} sourceProviderId The ID of the source provider.
36
37
  */
37
38
  getSourceProvider(sourceProviderId: number): Promise<ApiResponse<SourceProvider>>;
38
39
  /**
@@ -41,5 +42,5 @@ export declare class SourceProvidersApiService extends ApiBaseService {
41
42
  * @param {number} [page] Number of the page to be retrieved
42
43
  * @param {number} [perPage] Number of items returned per page
43
44
  */
44
- listSourceProviders(page?: number, perPage?: number): Promise<ApiResponse<Array<SourceProvider>>>;
45
+ listSourceProviders(page?: number, perPage?: number): Promise<ApiResponse<Array<SourceProviderRelation>>>;
45
46
  }
@@ -31,8 +31,8 @@ const Exceptions_1 = require("../../../common/Exceptions");
31
31
  class SourceProvidersApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
- * @summary Create a new source provider linked to the current user\'s profile
35
- * @param {SourceProviderCreate} sourceProviderCreate A JSON object containing source provider callback data
34
+ * @summary Add a new source provider to the current user\'s profile
35
+ * @param {SourceProviderCreate} sourceProviderCreate A JSON object containing the resource data
36
36
  */
37
37
  addSourceProvider(sourceProviderCreate) {
38
38
  return __awaiter(this, void 0, void 0, function* () {
@@ -48,7 +48,7 @@ class SourceProvidersApiService extends ApiBaseService_1.ApiBaseService {
48
48
  /**
49
49
  *
50
50
  * @summary Delete a given source provider from current user\'s account
51
- * @param {number} sourceProviderId Unique Id of the source provider to be deleted
51
+ * @param {number} sourceProviderId The ID of the source provider.
52
52
  */
53
53
  deleteSourceProvider(sourceProviderId) {
54
54
  return __awaiter(this, void 0, void 0, function* () {
@@ -63,8 +63,8 @@ class SourceProvidersApiService extends ApiBaseService_1.ApiBaseService {
63
63
  }
64
64
  /**
65
65
  *
66
- * @summary Get details of a single Source Code provider
67
- * @param {number} sourceProviderId Unique ID of the provider to be retrieved
66
+ * @summary Get a source provider by ID
67
+ * @param {number} sourceProviderId The ID of the source provider.
68
68
  */
69
69
  getSourceProvider(sourceProviderId) {
70
70
  return __awaiter(this, void 0, void 0, function* () {
@@ -12,24 +12,25 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Repository } from '../../generated/models';
15
+ import { RepositoryRelation } from '../../generated/models';
15
16
  /**
16
17
  * SourceProvidersRepositoriesApiService - Auto-generated
17
18
  */
18
19
  export declare class SourceProvidersRepositoriesApiService extends ApiBaseService {
19
20
  /**
20
21
  *
21
- * @summary Get details of a repository, by its name
22
- * @param {number} sourceProviderId Unique ID of the provider where the repository is hosted
23
- * @param {string} repositoryOwner Nickname/user id of the owner of the repository
24
- * @param {string} repositoryName The name of the repository to be retrieved
22
+ * @summary Get details of a repository by its name
23
+ * @param {string} repositoryName The repository name
24
+ * @param {string} repositoryOwner The owner of the repository
25
+ * @param {number} sourceProviderId The ID of the source provider.
25
26
  */
26
- getRepository(sourceProviderId: number, repositoryOwner: string, repositoryName: string): Promise<ApiResponse<Repository>>;
27
+ getSourceProviderRepository(repositoryName: string, repositoryOwner: string, sourceProviderId: number): Promise<ApiResponse<Repository>>;
27
28
  /**
28
29
  *
29
- * @summary Return a list of all repositories belonging to a current user social provider account
30
- * @param {number} sourceProviderId Unique ID of the provider where the repository is hosted
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.
31
32
  * @param {number} [page] Number of the page to be retrieved
32
33
  * @param {number} [perPage] Number of items returned per page
33
34
  */
34
- listRepositories(sourceProviderId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<Repository>>>;
35
+ listSourceProviderRepositories(sourceProviderId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<RepositoryRelation>>>;
35
36
  }
@@ -31,39 +31,39 @@ const Exceptions_1 = require("../../../common/Exceptions");
31
31
  class SourceProvidersRepositoriesApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
- * @summary Get details of a repository, by its name
35
- * @param {number} sourceProviderId Unique ID of the provider where the repository is hosted
36
- * @param {string} repositoryOwner Nickname/user id of the owner of the repository
37
- * @param {string} repositoryName The name of the repository to be retrieved
34
+ * @summary Get details of a repository by its name
35
+ * @param {string} repositoryName The repository name
36
+ * @param {string} repositoryOwner The owner of the repository
37
+ * @param {number} sourceProviderId The ID of the source provider.
38
38
  */
39
- getRepository(sourceProviderId, repositoryOwner, repositoryName) {
39
+ getSourceProviderRepository(repositoryName, repositoryOwner, sourceProviderId) {
40
40
  return __awaiter(this, void 0, void 0, function* () {
41
- if (sourceProviderId === null || sourceProviderId === undefined) {
42
- throw new Exceptions_1.ArgumentNullException('sourceProviderId', 'getRepository');
41
+ if (repositoryName === null || repositoryName === undefined) {
42
+ throw new Exceptions_1.ArgumentNullException('repositoryName', 'getSourceProviderRepository');
43
43
  }
44
44
  if (repositoryOwner === null || repositoryOwner === undefined) {
45
- throw new Exceptions_1.ArgumentNullException('repositoryOwner', 'getRepository');
45
+ throw new Exceptions_1.ArgumentNullException('repositoryOwner', 'getSourceProviderRepository');
46
46
  }
47
- if (repositoryName === null || repositoryName === undefined) {
48
- throw new Exceptions_1.ArgumentNullException('repositoryName', 'getRepository');
47
+ if (sourceProviderId === null || sourceProviderId === undefined) {
48
+ throw new Exceptions_1.ArgumentNullException('sourceProviderId', 'getSourceProviderRepository');
49
49
  }
50
50
  let queryString = '';
51
51
  const requestUrl = '/source-providers/{source_provider_id}/repositories/{repository_owner}/{repository_name}' + (queryString ? `?${queryString}` : '');
52
- const response = yield this.get(requestUrl.replace(`{${"source_provider_id"}}`, encodeURIComponent(String(sourceProviderId))).replace(`{${"repository_owner"}}`, encodeURIComponent(String(repositoryOwner))).replace(`{${"repository_name"}}`, encodeURIComponent(String(repositoryName))));
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))));
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 a current user social provider account
59
- * @param {number} sourceProviderId Unique ID of the provider where the repository is hosted
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.
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
- listRepositories(sourceProviderId, page, perPage) {
63
+ listSourceProviderRepositories(sourceProviderId, page, perPage) {
64
64
  return __awaiter(this, void 0, void 0, function* () {
65
65
  if (sourceProviderId === null || sourceProviderId === undefined) {
66
- throw new Exceptions_1.ArgumentNullException('sourceProviderId', 'listRepositories');
66
+ throw new Exceptions_1.ArgumentNullException('sourceProviderId', 'listSourceProviderRepositories');
67
67
  }
68
68
  let queryString = '';
69
69
  const queryParams = { page: page, per_page: perPage, };
@@ -202,7 +202,7 @@ export interface Application {
202
202
  * @type {SourceProvider}
203
203
  * @memberof Application
204
204
  */
205
- source_provider: SourceProvider | null;
205
+ source_provider: SourceProvider;
206
206
  /**
207
207
  *
208
208
  * @type {Array<SslCertificateRelation>}
@@ -21,53 +21,47 @@ export interface Commit {
21
21
  * @type {string}
22
22
  * @memberof Commit
23
23
  */
24
- hash?: string;
24
+ hash: string;
25
25
  /**
26
26
  * The commit\'s comment message
27
27
  * @type {string}
28
28
  * @memberof Commit
29
29
  */
30
- message?: string;
30
+ message: string;
31
31
  /**
32
32
  * The date and time when the commit has been submitted
33
33
  * @type {string}
34
34
  * @memberof Commit
35
35
  */
36
- committed_at?: string;
36
+ committed_at: string;
37
37
  /**
38
38
  *
39
39
  * @type {SourceProviderName}
40
40
  * @memberof Commit
41
41
  */
42
- provider?: SourceProviderName;
42
+ provider: SourceProviderName;
43
43
  /**
44
44
  * The full name of the repository (`owner/repository`) to which the commit belongs to
45
45
  * @type {string}
46
46
  * @memberof Commit
47
47
  */
48
- repository?: string;
49
- /**
50
- * The name of the branch of which the commit was the head at the time of its retrieval
51
- * @type {string}
52
- * @memberof Commit
53
- */
54
- branch?: string;
48
+ repository: string;
55
49
  /**
56
50
  * The direct URL for accessing commit details on the provider\'s web application
57
51
  * @type {string}
58
52
  * @memberof Commit
59
53
  */
60
- url?: string;
54
+ url: string;
61
55
  /**
62
56
  * The e-mail of the commit\'s author
63
57
  * @type {string}
64
58
  * @memberof Commit
65
59
  */
66
- author_email?: string;
60
+ author_email: string;
67
61
  /**
68
62
  * The name of the commit\'s author
69
63
  * @type {string}
70
64
  * @memberof Commit
71
65
  */
72
- author_name?: string;
66
+ author_name: string;
73
67
  }
@@ -133,6 +133,7 @@ export * from './project-relation';
133
133
  export * from './project-update';
134
134
  export * from './repository';
135
135
  export * from './repository-branch';
136
+ export * from './repository-relation';
136
137
  export * from './request-relation';
137
138
  export * from './resource';
138
139
  export * from './resource-event';
@@ -181,6 +182,7 @@ export * from './source-provider';
181
182
  export * from './source-provider-create';
182
183
  export * from './source-provider-displayable-name';
183
184
  export * from './source-provider-name';
185
+ export * from './source-provider-relation';
184
186
  export * from './ssh-key';
185
187
  export * from './ssh-key-environment-create';
186
188
  export * from './ssh-key-project-create';
@@ -149,6 +149,7 @@ __exportStar(require("./project-relation"), exports);
149
149
  __exportStar(require("./project-update"), exports);
150
150
  __exportStar(require("./repository"), exports);
151
151
  __exportStar(require("./repository-branch"), exports);
152
+ __exportStar(require("./repository-relation"), exports);
152
153
  __exportStar(require("./request-relation"), exports);
153
154
  __exportStar(require("./resource"), exports);
154
155
  __exportStar(require("./resource-event"), exports);
@@ -197,6 +198,7 @@ __exportStar(require("./source-provider"), exports);
197
198
  __exportStar(require("./source-provider-create"), exports);
198
199
  __exportStar(require("./source-provider-displayable-name"), exports);
199
200
  __exportStar(require("./source-provider-name"), exports);
201
+ __exportStar(require("./source-provider-relation"), exports);
200
202
  __exportStar(require("./ssh-key"), exports);
201
203
  __exportStar(require("./ssh-key-environment-create"), exports);
202
204
  __exportStar(require("./ssh-key-project-create"), exports);
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import { Commit } from './commit';
13
13
  /**
14
- *
14
+ * A repository branch
15
15
  * @export
16
16
  * @interface RepositoryBranch
17
17
  */
@@ -21,17 +21,17 @@ export interface RepositoryBranch {
21
21
  * @type {string}
22
22
  * @memberof RepositoryBranch
23
23
  */
24
- name?: string;
24
+ name: string;
25
25
  /**
26
26
  * The full name of the repository (`owner/repository`)
27
27
  * @type {string}
28
28
  * @memberof RepositoryBranch
29
29
  */
30
- repo_full_name?: string;
30
+ repo_full_name: string;
31
31
  /**
32
32
  *
33
33
  * @type {Commit}
34
34
  * @memberof RepositoryBranch
35
35
  */
36
- commit?: Commit;
36
+ commit: Commit;
37
37
  }
@@ -0,0 +1,42 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface RepositoryRelation
16
+ */
17
+ export interface RepositoryRelation {
18
+ /**
19
+ * The name of the repository
20
+ * @type {string}
21
+ * @memberof RepositoryRelation
22
+ */
23
+ name: string;
24
+ /**
25
+ * The name of the user/account on the Version Control System
26
+ * @type {string}
27
+ * @memberof RepositoryRelation
28
+ */
29
+ user_name: string;
30
+ /**
31
+ * The fully qualified repository name. Usually composed of user_name/name
32
+ * @type {string}
33
+ * @memberof RepositoryRelation
34
+ */
35
+ full_name: string;
36
+ /**
37
+ * The URL for viewing repository details on the provider\'s web application
38
+ * @type {string}
39
+ * @memberof RepositoryRelation
40
+ */
41
+ html_url: string;
42
+ }
@@ -0,0 +1,14 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -21,29 +21,29 @@ export interface Repository {
21
21
  * @type {string}
22
22
  * @memberof Repository
23
23
  */
24
- name?: string;
24
+ name: string;
25
25
  /**
26
26
  * The name of the user/account on the Version Control System
27
27
  * @type {string}
28
28
  * @memberof Repository
29
29
  */
30
- user_name?: string;
30
+ user_name: string;
31
31
  /**
32
32
  * The fully qualified repository name. Usually composed of user_name/name
33
33
  * @type {string}
34
34
  * @memberof Repository
35
35
  */
36
- full_name?: string;
36
+ full_name: string;
37
37
  /**
38
38
  * The URL for viewing repository details on the provider\'s web application
39
39
  * @type {string}
40
40
  * @memberof Repository
41
41
  */
42
- html_url?: string;
42
+ html_url: string;
43
43
  /**
44
- *
44
+ * List of repository branches
45
45
  * @type {Array<RepositoryBranch>}
46
46
  * @memberof Repository
47
47
  */
48
- branches?: Array<RepositoryBranch>;
48
+ branches: Array<RepositoryBranch>;
49
49
  }
@@ -23,7 +23,7 @@ export interface SourceProviderCreate {
23
23
  */
24
24
  provider: SourceProviderName;
25
25
  /**
26
- * The temporary code forwarded by the OAuth provider as a parameter to our callback URL
26
+ * The temporary code forwarded by the OAuth provider as a parameter to our callback URL. Must be at least 8 characters.
27
27
  * @type {string}
28
28
  * @memberof SourceProviderCreate
29
29
  */
@@ -0,0 +1,68 @@
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 { SourceProviderDisplayableName } from './source-provider-displayable-name';
13
+ import { SourceProviderName } from './source-provider-name';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface SourceProviderRelation
18
+ */
19
+ export interface SourceProviderRelation {
20
+ /**
21
+ * The ID of the given source provider
22
+ * @type {number}
23
+ * @memberof SourceProviderRelation
24
+ */
25
+ id: number;
26
+ /**
27
+ * The current user\'s ID
28
+ * @type {number}
29
+ * @memberof SourceProviderRelation
30
+ */
31
+ user_id: number;
32
+ /**
33
+ *
34
+ * @type {SourceProviderName}
35
+ * @memberof SourceProviderRelation
36
+ */
37
+ provider: SourceProviderName;
38
+ /**
39
+ *
40
+ * @type {SourceProviderDisplayableName}
41
+ * @memberof SourceProviderRelation
42
+ */
43
+ provider_human_readable: SourceProviderDisplayableName;
44
+ /**
45
+ * The nickname of the user on the Source Authentication provider
46
+ * @type {string}
47
+ * @memberof SourceProviderRelation
48
+ */
49
+ provider_user_nickname: string;
50
+ /**
51
+ * The date and time indicating when the authentication token will expire at
52
+ * @type {string}
53
+ * @memberof SourceProviderRelation
54
+ */
55
+ token_expires_at: string | null;
56
+ /**
57
+ * The date and time when the record was created
58
+ * @type {string}
59
+ * @memberof SourceProviderRelation
60
+ */
61
+ created_at: string;
62
+ /**
63
+ * The date and time when the record was last updated
64
+ * @type {string}
65
+ * @memberof SourceProviderRelation
66
+ */
67
+ updated_at: string;
68
+ }
@@ -0,0 +1,14 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -18,11 +18,17 @@ import { SourceProviderName } from './source-provider-name';
18
18
  */
19
19
  export interface SourceProvider {
20
20
  /**
21
- * The unique id of the given record
21
+ * The unique ID of the given source provider
22
22
  * @type {number}
23
23
  * @memberof SourceProvider
24
24
  */
25
25
  id: number;
26
+ /**
27
+ * The current user\'s ID
28
+ * @type {number}
29
+ * @memberof SourceProvider
30
+ */
31
+ user_id: number;
26
32
  /**
27
33
  *
28
34
  * @type {SourceProviderName}
@@ -34,7 +40,7 @@ export interface SourceProvider {
34
40
  * @type {SourceProviderDisplayableName}
35
41
  * @memberof SourceProvider
36
42
  */
37
- provider_human_readable?: SourceProviderDisplayableName;
43
+ provider_human_readable: SourceProviderDisplayableName;
38
44
  /**
39
45
  * The nickname of the user on the Source Authentication provider
40
46
  * @type {string}
@@ -42,21 +48,21 @@ export interface SourceProvider {
42
48
  */
43
49
  provider_user_nickname: string;
44
50
  /**
45
- * The current user\'s id
46
- * @type {number}
51
+ * The date and time indicating when the authentication token will expire at
52
+ * @type {string}
47
53
  * @memberof SourceProvider
48
54
  */
49
- user_id?: number;
55
+ token_expires_at: string | null;
50
56
  /**
51
57
  * The date and time when the record was created
52
58
  * @type {string}
53
59
  * @memberof SourceProvider
54
60
  */
55
- created_at?: string;
61
+ created_at: string;
56
62
  /**
57
63
  * The date and time when the record was last updated
58
64
  * @type {string}
59
65
  * @memberof SourceProvider
60
66
  */
61
- updated_at?: string;
67
+ updated_at: string;
62
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devopness/sdk-js",
3
- "version": "2.24.0",
3
+ "version": "2.25.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },