@breign/client 1.0.176 → 1.0.178
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/dist/apis/IntegrationsApi.d.ts +174 -0
- package/dist/apis/IntegrationsApi.js +445 -0
- package/dist/apis/McpApi.d.ts +33 -0
- package/dist/apis/McpApi.js +88 -0
- package/dist/apis/ScheduledTasksApi.d.ts +14 -1
- package/dist/apis/ScheduledTasksApi.js +33 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/AgentBuilderMcpConfigurationUio.d.ts +32 -0
- package/dist/models/AgentBuilderMcpConfigurationUio.js +48 -0
- package/dist/models/AgentPatchUio.d.ts +7 -0
- package/dist/models/AgentPatchUio.js +3 -0
- package/dist/models/AgentUio.d.ts +7 -0
- package/dist/models/AgentUio.js +3 -0
- package/dist/models/ExternalEventRoutingUio.d.ts +53 -0
- package/dist/models/ExternalEventRoutingUio.js +67 -0
- package/dist/models/ExternalEventStatusUio.d.ts +33 -0
- package/dist/models/ExternalEventStatusUio.js +59 -0
- package/dist/models/ExternalEventUio.d.ts +135 -0
- package/dist/models/ExternalEventUio.js +123 -0
- package/dist/models/GitlabAccessLevelUio.d.ts +28 -0
- package/dist/models/GitlabAccessLevelUio.js +54 -0
- package/dist/models/GitlabBotAccountCreateUio.d.ts +50 -0
- package/dist/models/GitlabBotAccountCreateUio.js +58 -0
- package/dist/models/GitlabBotAccountSummaryUio.d.ts +77 -0
- package/dist/models/GitlabBotAccountSummaryUio.js +83 -0
- package/dist/models/GitlabBotAccountUio.d.ts +125 -0
- package/dist/models/GitlabBotAccountUio.js +115 -0
- package/dist/models/GitlabBotAccountUpdateUio.d.ts +64 -0
- package/dist/models/GitlabBotAccountUpdateUio.js +64 -0
- package/dist/models/GitlabConnectionTestResultUio.d.ts +50 -0
- package/dist/models/GitlabConnectionTestResultUio.js +62 -0
- package/dist/models/GitlabIntegrationCreateUio.d.ts +45 -0
- package/dist/models/GitlabIntegrationCreateUio.js +57 -0
- package/dist/models/GitlabIntegrationDetailUio.d.ts +120 -0
- package/dist/models/GitlabIntegrationDetailUio.js +112 -0
- package/dist/models/GitlabIntegrationUio.d.ts +107 -0
- package/dist/models/GitlabIntegrationUio.js +103 -0
- package/dist/models/GitlabIntegrationUpdateUio.d.ts +65 -0
- package/dist/models/GitlabIntegrationUpdateUio.js +65 -0
- package/dist/models/GitlabRoutingTestResultAgentUio.d.ts +38 -0
- package/dist/models/GitlabRoutingTestResultAgentUio.js +54 -0
- package/dist/models/GitlabRoutingTestResultAutomationsInnerUio.d.ts +38 -0
- package/dist/models/GitlabRoutingTestResultAutomationsInnerUio.js +54 -0
- package/dist/models/GitlabRoutingTestResultBotAccountUio.d.ts +38 -0
- package/dist/models/GitlabRoutingTestResultBotAccountUio.js +54 -0
- package/dist/models/GitlabRoutingTestResultRunAsUserUio.d.ts +38 -0
- package/dist/models/GitlabRoutingTestResultRunAsUserUio.js +54 -0
- package/dist/models/GitlabRoutingTestResultUio.d.ts +77 -0
- package/dist/models/GitlabRoutingTestResultUio.js +85 -0
- package/dist/models/GitlabRoutingTestUio.d.ts +32 -0
- package/dist/models/GitlabRoutingTestUio.js +50 -0
- package/dist/models/ScheduledTaskCreateUio.d.ts +9 -2
- package/dist/models/ScheduledTaskCreateUio.js +4 -3
- package/dist/models/ScheduledTaskRunTriggerAuthorUio.d.ts +38 -0
- package/dist/models/ScheduledTaskRunTriggerAuthorUio.js +54 -0
- package/dist/models/ScheduledTaskRunTriggerUio.d.ts +142 -0
- package/dist/models/ScheduledTaskRunTriggerUio.js +129 -0
- package/dist/models/ScheduledTaskRunUio.d.ts +20 -0
- package/dist/models/ScheduledTaskRunUio.js +12 -1
- package/dist/models/ScheduledTaskUio.d.ts +9 -2
- package/dist/models/ScheduledTaskUio.js +3 -0
- package/dist/models/TaskTriggerReplyUio.d.ts +38 -0
- package/dist/models/TaskTriggerReplyUio.js +54 -0
- package/dist/models/TaskTriggerUio.d.ts +88 -0
- package/dist/models/TaskTriggerUio.js +84 -0
- package/dist/models/ToolAllowedToolsRequestUio.d.ts +16 -0
- package/dist/models/ToolAllowedToolsRequestUio.js +10 -0
- package/dist/models/ToolAllowedToolsResponseUio.d.ts +16 -0
- package/dist/models/ToolAllowedToolsResponseUio.js +10 -0
- package/dist/models/ToolApprovalUio.d.ts +2 -1
- package/dist/models/ToolApprovalUio.js +2 -1
- package/dist/models/ToolCallResultRequestUio.d.ts +1 -1
- package/dist/models/ToolCallUio.d.ts +1 -1
- package/dist/models/ToolSecureMcpUio.d.ts +16 -0
- package/dist/models/ToolSecureMcpUio.js +10 -0
- package/dist/models/index.d.ts +24 -0
- package/dist/models/index.js +24 -0
- package/dist/openapi.json +1401 -38
- package/package.json +1 -1
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* brain-client
|
|
3
|
+
* Api ands models for brain-app and brain-app
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.0-SNAPSHOT
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import type { ExternalEventUio, GitlabBotAccountCreateUio, GitlabBotAccountSummaryUio, GitlabBotAccountUio, GitlabBotAccountUpdateUio, GitlabConnectionTestResultUio, GitlabIntegrationCreateUio, GitlabIntegrationDetailUio, GitlabIntegrationUio, GitlabIntegrationUpdateUio, GitlabRoutingTestResultUio, GitlabRoutingTestUio } from '../models/index';
|
|
14
|
+
export interface CreateGitlabBotAccountRequest {
|
|
15
|
+
organizationId: string;
|
|
16
|
+
integrationId: string;
|
|
17
|
+
gitlabBotAccountCreateUio: GitlabBotAccountCreateUio;
|
|
18
|
+
}
|
|
19
|
+
export interface CreateGitlabIntegrationRequest {
|
|
20
|
+
organizationId: string;
|
|
21
|
+
gitlabIntegrationCreateUio: GitlabIntegrationCreateUio;
|
|
22
|
+
}
|
|
23
|
+
export interface DeleteGitlabBotAccountRequest {
|
|
24
|
+
organizationId: string;
|
|
25
|
+
integrationId: string;
|
|
26
|
+
accountId: string;
|
|
27
|
+
}
|
|
28
|
+
export interface DeleteGitlabIntegrationRequest {
|
|
29
|
+
organizationId: string;
|
|
30
|
+
integrationId: string;
|
|
31
|
+
}
|
|
32
|
+
export interface GetGitlabIntegrationRequest {
|
|
33
|
+
organizationId: string;
|
|
34
|
+
integrationId: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ListGitlabIntegrationEventsRequest {
|
|
37
|
+
organizationId: string;
|
|
38
|
+
integrationId: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ListGitlabIntegrationsRequest {
|
|
41
|
+
organizationId: string;
|
|
42
|
+
}
|
|
43
|
+
export interface ListOrganizationGitlabBotAccountsRequest {
|
|
44
|
+
organizationId: string;
|
|
45
|
+
}
|
|
46
|
+
export interface TestGitlabConnectionRequest {
|
|
47
|
+
organizationId: string;
|
|
48
|
+
integrationId: string;
|
|
49
|
+
}
|
|
50
|
+
export interface TestGitlabRoutingRequest {
|
|
51
|
+
organizationId: string;
|
|
52
|
+
integrationId: string;
|
|
53
|
+
gitlabRoutingTestUio: GitlabRoutingTestUio;
|
|
54
|
+
}
|
|
55
|
+
export interface UpdateGitlabBotAccountRequest {
|
|
56
|
+
organizationId: string;
|
|
57
|
+
integrationId: string;
|
|
58
|
+
accountId: string;
|
|
59
|
+
gitlabBotAccountUpdateUio: GitlabBotAccountUpdateUio;
|
|
60
|
+
}
|
|
61
|
+
export interface UpdateGitlabIntegrationRequest {
|
|
62
|
+
organizationId: string;
|
|
63
|
+
integrationId: string;
|
|
64
|
+
gitlabIntegrationUpdateUio: GitlabIntegrationUpdateUio;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
*/
|
|
69
|
+
export declare class IntegrationsApi extends runtime.BaseAPI {
|
|
70
|
+
/**
|
|
71
|
+
* The token is checked against GitLab (GET /user). The service user must be a member of the organization, the named agents must belong to it, and no two callable agents may share a name once normalized (409 DUPLICATE_AGENT_NAMES, with the duplicates).
|
|
72
|
+
* Add a bot account to a GitLab integration
|
|
73
|
+
*/
|
|
74
|
+
createGitlabBotAccountRaw(requestParameters: CreateGitlabBotAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GitlabBotAccountUio>>;
|
|
75
|
+
/**
|
|
76
|
+
* The token is checked against GitLab (GET /user). The service user must be a member of the organization, the named agents must belong to it, and no two callable agents may share a name once normalized (409 DUPLICATE_AGENT_NAMES, with the duplicates).
|
|
77
|
+
* Add a bot account to a GitLab integration
|
|
78
|
+
*/
|
|
79
|
+
createGitlabBotAccount(organizationId: string, integrationId: string, gitlabBotAccountCreateUio: GitlabBotAccountCreateUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GitlabBotAccountUio>;
|
|
80
|
+
/**
|
|
81
|
+
* A webhook secret is generated; it is returned with the integration.
|
|
82
|
+
* Link a GitLab instance to the organization
|
|
83
|
+
*/
|
|
84
|
+
createGitlabIntegrationRaw(requestParameters: CreateGitlabIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GitlabIntegrationDetailUio>>;
|
|
85
|
+
/**
|
|
86
|
+
* A webhook secret is generated; it is returned with the integration.
|
|
87
|
+
* Link a GitLab instance to the organization
|
|
88
|
+
*/
|
|
89
|
+
createGitlabIntegration(organizationId: string, gitlabIntegrationCreateUio: GitlabIntegrationCreateUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GitlabIntegrationDetailUio>;
|
|
90
|
+
/**
|
|
91
|
+
* Remove a bot account
|
|
92
|
+
*/
|
|
93
|
+
deleteGitlabBotAccountRaw(requestParameters: DeleteGitlabBotAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
94
|
+
/**
|
|
95
|
+
* Remove a bot account
|
|
96
|
+
*/
|
|
97
|
+
deleteGitlabBotAccount(organizationId: string, integrationId: string, accountId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
98
|
+
/**
|
|
99
|
+
* Delete a GitLab integration, its bot accounts and its events
|
|
100
|
+
*/
|
|
101
|
+
deleteGitlabIntegrationRaw(requestParameters: DeleteGitlabIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
102
|
+
/**
|
|
103
|
+
* Delete a GitLab integration, its bot accounts and its events
|
|
104
|
+
*/
|
|
105
|
+
deleteGitlabIntegration(organizationId: string, integrationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
106
|
+
/**
|
|
107
|
+
* Get a GitLab integration, its webhook secret and its bot accounts
|
|
108
|
+
*/
|
|
109
|
+
getGitlabIntegrationRaw(requestParameters: GetGitlabIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GitlabIntegrationDetailUio>>;
|
|
110
|
+
/**
|
|
111
|
+
* Get a GitLab integration, its webhook secret and its bot accounts
|
|
112
|
+
*/
|
|
113
|
+
getGitlabIntegration(organizationId: string, integrationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GitlabIntegrationDetailUio>;
|
|
114
|
+
/**
|
|
115
|
+
* The latest mentions received by a GitLab integration
|
|
116
|
+
*/
|
|
117
|
+
listGitlabIntegrationEventsRaw(requestParameters: ListGitlabIntegrationEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ExternalEventUio>>>;
|
|
118
|
+
/**
|
|
119
|
+
* The latest mentions received by a GitLab integration
|
|
120
|
+
*/
|
|
121
|
+
listGitlabIntegrationEvents(organizationId: string, integrationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ExternalEventUio>>;
|
|
122
|
+
/**
|
|
123
|
+
* List the GitLab integrations of an organization
|
|
124
|
+
*/
|
|
125
|
+
listGitlabIntegrationsRaw(requestParameters: ListGitlabIntegrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GitlabIntegrationUio>>>;
|
|
126
|
+
/**
|
|
127
|
+
* List the GitLab integrations of an organization
|
|
128
|
+
*/
|
|
129
|
+
listGitlabIntegrations(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GitlabIntegrationUio>>;
|
|
130
|
+
/**
|
|
131
|
+
* The GitLab bot accounts of the organization, to pick one in an automation
|
|
132
|
+
*/
|
|
133
|
+
listOrganizationGitlabBotAccountsRaw(requestParameters: ListOrganizationGitlabBotAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GitlabBotAccountSummaryUio>>>;
|
|
134
|
+
/**
|
|
135
|
+
* The GitLab bot accounts of the organization, to pick one in an automation
|
|
136
|
+
*/
|
|
137
|
+
listOrganizationGitlabBotAccounts(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GitlabBotAccountSummaryUio>>;
|
|
138
|
+
/**
|
|
139
|
+
* An accepted token puts its account back in service; a rejected one marks it token_invalid.
|
|
140
|
+
* Test the connection of every bot account (GET /user with its token)
|
|
141
|
+
*/
|
|
142
|
+
testGitlabConnectionRaw(requestParameters: TestGitlabConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GitlabConnectionTestResultUio>>>;
|
|
143
|
+
/**
|
|
144
|
+
* An accepted token puts its account back in service; a rejected one marks it token_invalid.
|
|
145
|
+
* Test the connection of every bot account (GET /user with its token)
|
|
146
|
+
*/
|
|
147
|
+
testGitlabConnection(organizationId: string, integrationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GitlabConnectionTestResultUio>>;
|
|
148
|
+
/**
|
|
149
|
+
* Preview what a GitLab comment would trigger
|
|
150
|
+
*/
|
|
151
|
+
testGitlabRoutingRaw(requestParameters: TestGitlabRoutingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GitlabRoutingTestResultUio>>;
|
|
152
|
+
/**
|
|
153
|
+
* Preview what a GitLab comment would trigger
|
|
154
|
+
*/
|
|
155
|
+
testGitlabRouting(organizationId: string, integrationId: string, gitlabRoutingTestUio: GitlabRoutingTestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GitlabRoutingTestResultUio>;
|
|
156
|
+
/**
|
|
157
|
+
* Update a bot account (agents, service user, token, status)
|
|
158
|
+
*/
|
|
159
|
+
updateGitlabBotAccountRaw(requestParameters: UpdateGitlabBotAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GitlabBotAccountUio>>;
|
|
160
|
+
/**
|
|
161
|
+
* Update a bot account (agents, service user, token, status)
|
|
162
|
+
*/
|
|
163
|
+
updateGitlabBotAccount(organizationId: string, integrationId: string, accountId: string, gitlabBotAccountUpdateUio: GitlabBotAccountUpdateUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GitlabBotAccountUio>;
|
|
164
|
+
/**
|
|
165
|
+
* Changing `baseUrl` wipes the token of every bot account (status token_invalid, lastError BASE_URL_CHANGED): a token is never sent to another host than the one it was given for.
|
|
166
|
+
* Update a GitLab integration
|
|
167
|
+
*/
|
|
168
|
+
updateGitlabIntegrationRaw(requestParameters: UpdateGitlabIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GitlabIntegrationDetailUio>>;
|
|
169
|
+
/**
|
|
170
|
+
* Changing `baseUrl` wipes the token of every bot account (status token_invalid, lastError BASE_URL_CHANGED): a token is never sent to another host than the one it was given for.
|
|
171
|
+
* Update a GitLab integration
|
|
172
|
+
*/
|
|
173
|
+
updateGitlabIntegration(organizationId: string, integrationId: string, gitlabIntegrationUpdateUio: GitlabIntegrationUpdateUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GitlabIntegrationDetailUio>;
|
|
174
|
+
}
|
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* brain-client
|
|
6
|
+
* Api ands models for brain-app and brain-app
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.0.0-SNAPSHOT
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.IntegrationsApi = void 0;
|
|
50
|
+
const runtime = __importStar(require("../runtime"));
|
|
51
|
+
const index_1 = require("../models/index");
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
class IntegrationsApi extends runtime.BaseAPI {
|
|
56
|
+
/**
|
|
57
|
+
* The token is checked against GitLab (GET /user). The service user must be a member of the organization, the named agents must belong to it, and no two callable agents may share a name once normalized (409 DUPLICATE_AGENT_NAMES, with the duplicates).
|
|
58
|
+
* Add a bot account to a GitLab integration
|
|
59
|
+
*/
|
|
60
|
+
async createGitlabBotAccountRaw(requestParameters, initOverrides) {
|
|
61
|
+
if (requestParameters['organizationId'] == null) {
|
|
62
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling createGitlabBotAccount().');
|
|
63
|
+
}
|
|
64
|
+
if (requestParameters['integrationId'] == null) {
|
|
65
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter "integrationId" was null or undefined when calling createGitlabBotAccount().');
|
|
66
|
+
}
|
|
67
|
+
if (requestParameters['gitlabBotAccountCreateUio'] == null) {
|
|
68
|
+
throw new runtime.RequiredError('gitlabBotAccountCreateUio', 'Required parameter "gitlabBotAccountCreateUio" was null or undefined when calling createGitlabBotAccount().');
|
|
69
|
+
}
|
|
70
|
+
const queryParameters = {};
|
|
71
|
+
const headerParameters = {};
|
|
72
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
73
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
74
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
75
|
+
}
|
|
76
|
+
const response = await this.request({
|
|
77
|
+
path: `/organizations/{organizationId}/integrations/gitlab/{integrationId}/bot-accounts`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters['integrationId']))),
|
|
78
|
+
method: 'POST',
|
|
79
|
+
headers: headerParameters,
|
|
80
|
+
query: queryParameters,
|
|
81
|
+
body: (0, index_1.GitlabBotAccountCreateUioToJSON)(requestParameters['gitlabBotAccountCreateUio']),
|
|
82
|
+
}, initOverrides);
|
|
83
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GitlabBotAccountUioFromJSON)(jsonValue));
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The token is checked against GitLab (GET /user). The service user must be a member of the organization, the named agents must belong to it, and no two callable agents may share a name once normalized (409 DUPLICATE_AGENT_NAMES, with the duplicates).
|
|
87
|
+
* Add a bot account to a GitLab integration
|
|
88
|
+
*/
|
|
89
|
+
async createGitlabBotAccount(organizationId, integrationId, gitlabBotAccountCreateUio, initOverrides) {
|
|
90
|
+
const response = await this.createGitlabBotAccountRaw({ organizationId: organizationId, integrationId: integrationId, gitlabBotAccountCreateUio: gitlabBotAccountCreateUio }, initOverrides);
|
|
91
|
+
return await response.value();
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* A webhook secret is generated; it is returned with the integration.
|
|
95
|
+
* Link a GitLab instance to the organization
|
|
96
|
+
*/
|
|
97
|
+
async createGitlabIntegrationRaw(requestParameters, initOverrides) {
|
|
98
|
+
if (requestParameters['organizationId'] == null) {
|
|
99
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling createGitlabIntegration().');
|
|
100
|
+
}
|
|
101
|
+
if (requestParameters['gitlabIntegrationCreateUio'] == null) {
|
|
102
|
+
throw new runtime.RequiredError('gitlabIntegrationCreateUio', 'Required parameter "gitlabIntegrationCreateUio" was null or undefined when calling createGitlabIntegration().');
|
|
103
|
+
}
|
|
104
|
+
const queryParameters = {};
|
|
105
|
+
const headerParameters = {};
|
|
106
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
107
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
108
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
109
|
+
}
|
|
110
|
+
const response = await this.request({
|
|
111
|
+
path: `/organizations/{organizationId}/integrations/gitlab`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
|
|
112
|
+
method: 'POST',
|
|
113
|
+
headers: headerParameters,
|
|
114
|
+
query: queryParameters,
|
|
115
|
+
body: (0, index_1.GitlabIntegrationCreateUioToJSON)(requestParameters['gitlabIntegrationCreateUio']),
|
|
116
|
+
}, initOverrides);
|
|
117
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GitlabIntegrationDetailUioFromJSON)(jsonValue));
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* A webhook secret is generated; it is returned with the integration.
|
|
121
|
+
* Link a GitLab instance to the organization
|
|
122
|
+
*/
|
|
123
|
+
async createGitlabIntegration(organizationId, gitlabIntegrationCreateUio, initOverrides) {
|
|
124
|
+
const response = await this.createGitlabIntegrationRaw({ organizationId: organizationId, gitlabIntegrationCreateUio: gitlabIntegrationCreateUio }, initOverrides);
|
|
125
|
+
return await response.value();
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Remove a bot account
|
|
129
|
+
*/
|
|
130
|
+
async deleteGitlabBotAccountRaw(requestParameters, initOverrides) {
|
|
131
|
+
if (requestParameters['organizationId'] == null) {
|
|
132
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling deleteGitlabBotAccount().');
|
|
133
|
+
}
|
|
134
|
+
if (requestParameters['integrationId'] == null) {
|
|
135
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter "integrationId" was null or undefined when calling deleteGitlabBotAccount().');
|
|
136
|
+
}
|
|
137
|
+
if (requestParameters['accountId'] == null) {
|
|
138
|
+
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling deleteGitlabBotAccount().');
|
|
139
|
+
}
|
|
140
|
+
const queryParameters = {};
|
|
141
|
+
const headerParameters = {};
|
|
142
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
143
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
144
|
+
}
|
|
145
|
+
const response = await this.request({
|
|
146
|
+
path: `/organizations/{organizationId}/integrations/gitlab/{integrationId}/bot-accounts/{accountId}`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters['integrationId']))).replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
|
|
147
|
+
method: 'DELETE',
|
|
148
|
+
headers: headerParameters,
|
|
149
|
+
query: queryParameters,
|
|
150
|
+
}, initOverrides);
|
|
151
|
+
return new runtime.VoidApiResponse(response);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Remove a bot account
|
|
155
|
+
*/
|
|
156
|
+
async deleteGitlabBotAccount(organizationId, integrationId, accountId, initOverrides) {
|
|
157
|
+
await this.deleteGitlabBotAccountRaw({ organizationId: organizationId, integrationId: integrationId, accountId: accountId }, initOverrides);
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Delete a GitLab integration, its bot accounts and its events
|
|
161
|
+
*/
|
|
162
|
+
async deleteGitlabIntegrationRaw(requestParameters, initOverrides) {
|
|
163
|
+
if (requestParameters['organizationId'] == null) {
|
|
164
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling deleteGitlabIntegration().');
|
|
165
|
+
}
|
|
166
|
+
if (requestParameters['integrationId'] == null) {
|
|
167
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter "integrationId" was null or undefined when calling deleteGitlabIntegration().');
|
|
168
|
+
}
|
|
169
|
+
const queryParameters = {};
|
|
170
|
+
const headerParameters = {};
|
|
171
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
172
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
173
|
+
}
|
|
174
|
+
const response = await this.request({
|
|
175
|
+
path: `/organizations/{organizationId}/integrations/gitlab/{integrationId}`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters['integrationId']))),
|
|
176
|
+
method: 'DELETE',
|
|
177
|
+
headers: headerParameters,
|
|
178
|
+
query: queryParameters,
|
|
179
|
+
}, initOverrides);
|
|
180
|
+
return new runtime.VoidApiResponse(response);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Delete a GitLab integration, its bot accounts and its events
|
|
184
|
+
*/
|
|
185
|
+
async deleteGitlabIntegration(organizationId, integrationId, initOverrides) {
|
|
186
|
+
await this.deleteGitlabIntegrationRaw({ organizationId: organizationId, integrationId: integrationId }, initOverrides);
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Get a GitLab integration, its webhook secret and its bot accounts
|
|
190
|
+
*/
|
|
191
|
+
async getGitlabIntegrationRaw(requestParameters, initOverrides) {
|
|
192
|
+
if (requestParameters['organizationId'] == null) {
|
|
193
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getGitlabIntegration().');
|
|
194
|
+
}
|
|
195
|
+
if (requestParameters['integrationId'] == null) {
|
|
196
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter "integrationId" was null or undefined when calling getGitlabIntegration().');
|
|
197
|
+
}
|
|
198
|
+
const queryParameters = {};
|
|
199
|
+
const headerParameters = {};
|
|
200
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
201
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
202
|
+
}
|
|
203
|
+
const response = await this.request({
|
|
204
|
+
path: `/organizations/{organizationId}/integrations/gitlab/{integrationId}`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters['integrationId']))),
|
|
205
|
+
method: 'GET',
|
|
206
|
+
headers: headerParameters,
|
|
207
|
+
query: queryParameters,
|
|
208
|
+
}, initOverrides);
|
|
209
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GitlabIntegrationDetailUioFromJSON)(jsonValue));
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Get a GitLab integration, its webhook secret and its bot accounts
|
|
213
|
+
*/
|
|
214
|
+
async getGitlabIntegration(organizationId, integrationId, initOverrides) {
|
|
215
|
+
const response = await this.getGitlabIntegrationRaw({ organizationId: organizationId, integrationId: integrationId }, initOverrides);
|
|
216
|
+
return await response.value();
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* The latest mentions received by a GitLab integration
|
|
220
|
+
*/
|
|
221
|
+
async listGitlabIntegrationEventsRaw(requestParameters, initOverrides) {
|
|
222
|
+
if (requestParameters['organizationId'] == null) {
|
|
223
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling listGitlabIntegrationEvents().');
|
|
224
|
+
}
|
|
225
|
+
if (requestParameters['integrationId'] == null) {
|
|
226
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter "integrationId" was null or undefined when calling listGitlabIntegrationEvents().');
|
|
227
|
+
}
|
|
228
|
+
const queryParameters = {};
|
|
229
|
+
const headerParameters = {};
|
|
230
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
231
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
232
|
+
}
|
|
233
|
+
const response = await this.request({
|
|
234
|
+
path: `/organizations/{organizationId}/integrations/gitlab/{integrationId}/events`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters['integrationId']))),
|
|
235
|
+
method: 'GET',
|
|
236
|
+
headers: headerParameters,
|
|
237
|
+
query: queryParameters,
|
|
238
|
+
}, initOverrides);
|
|
239
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.ExternalEventUioFromJSON));
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* The latest mentions received by a GitLab integration
|
|
243
|
+
*/
|
|
244
|
+
async listGitlabIntegrationEvents(organizationId, integrationId, initOverrides) {
|
|
245
|
+
const response = await this.listGitlabIntegrationEventsRaw({ organizationId: organizationId, integrationId: integrationId }, initOverrides);
|
|
246
|
+
return await response.value();
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* List the GitLab integrations of an organization
|
|
250
|
+
*/
|
|
251
|
+
async listGitlabIntegrationsRaw(requestParameters, initOverrides) {
|
|
252
|
+
if (requestParameters['organizationId'] == null) {
|
|
253
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling listGitlabIntegrations().');
|
|
254
|
+
}
|
|
255
|
+
const queryParameters = {};
|
|
256
|
+
const headerParameters = {};
|
|
257
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
258
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
259
|
+
}
|
|
260
|
+
const response = await this.request({
|
|
261
|
+
path: `/organizations/{organizationId}/integrations/gitlab`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
|
|
262
|
+
method: 'GET',
|
|
263
|
+
headers: headerParameters,
|
|
264
|
+
query: queryParameters,
|
|
265
|
+
}, initOverrides);
|
|
266
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.GitlabIntegrationUioFromJSON));
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* List the GitLab integrations of an organization
|
|
270
|
+
*/
|
|
271
|
+
async listGitlabIntegrations(organizationId, initOverrides) {
|
|
272
|
+
const response = await this.listGitlabIntegrationsRaw({ organizationId: organizationId }, initOverrides);
|
|
273
|
+
return await response.value();
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* The GitLab bot accounts of the organization, to pick one in an automation
|
|
277
|
+
*/
|
|
278
|
+
async listOrganizationGitlabBotAccountsRaw(requestParameters, initOverrides) {
|
|
279
|
+
if (requestParameters['organizationId'] == null) {
|
|
280
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling listOrganizationGitlabBotAccounts().');
|
|
281
|
+
}
|
|
282
|
+
const queryParameters = {};
|
|
283
|
+
const headerParameters = {};
|
|
284
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
285
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
286
|
+
}
|
|
287
|
+
const response = await this.request({
|
|
288
|
+
path: `/organizations/{organizationId}/gitlab-bot-accounts`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
|
|
289
|
+
method: 'GET',
|
|
290
|
+
headers: headerParameters,
|
|
291
|
+
query: queryParameters,
|
|
292
|
+
}, initOverrides);
|
|
293
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.GitlabBotAccountSummaryUioFromJSON));
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* The GitLab bot accounts of the organization, to pick one in an automation
|
|
297
|
+
*/
|
|
298
|
+
async listOrganizationGitlabBotAccounts(organizationId, initOverrides) {
|
|
299
|
+
const response = await this.listOrganizationGitlabBotAccountsRaw({ organizationId: organizationId }, initOverrides);
|
|
300
|
+
return await response.value();
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* An accepted token puts its account back in service; a rejected one marks it token_invalid.
|
|
304
|
+
* Test the connection of every bot account (GET /user with its token)
|
|
305
|
+
*/
|
|
306
|
+
async testGitlabConnectionRaw(requestParameters, initOverrides) {
|
|
307
|
+
if (requestParameters['organizationId'] == null) {
|
|
308
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling testGitlabConnection().');
|
|
309
|
+
}
|
|
310
|
+
if (requestParameters['integrationId'] == null) {
|
|
311
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter "integrationId" was null or undefined when calling testGitlabConnection().');
|
|
312
|
+
}
|
|
313
|
+
const queryParameters = {};
|
|
314
|
+
const headerParameters = {};
|
|
315
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
316
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
317
|
+
}
|
|
318
|
+
const response = await this.request({
|
|
319
|
+
path: `/organizations/{organizationId}/integrations/gitlab/{integrationId}/test-connection`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters['integrationId']))),
|
|
320
|
+
method: 'POST',
|
|
321
|
+
headers: headerParameters,
|
|
322
|
+
query: queryParameters,
|
|
323
|
+
}, initOverrides);
|
|
324
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.GitlabConnectionTestResultUioFromJSON));
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* An accepted token puts its account back in service; a rejected one marks it token_invalid.
|
|
328
|
+
* Test the connection of every bot account (GET /user with its token)
|
|
329
|
+
*/
|
|
330
|
+
async testGitlabConnection(organizationId, integrationId, initOverrides) {
|
|
331
|
+
const response = await this.testGitlabConnectionRaw({ organizationId: organizationId, integrationId: integrationId }, initOverrides);
|
|
332
|
+
return await response.value();
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Preview what a GitLab comment would trigger
|
|
336
|
+
*/
|
|
337
|
+
async testGitlabRoutingRaw(requestParameters, initOverrides) {
|
|
338
|
+
if (requestParameters['organizationId'] == null) {
|
|
339
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling testGitlabRouting().');
|
|
340
|
+
}
|
|
341
|
+
if (requestParameters['integrationId'] == null) {
|
|
342
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter "integrationId" was null or undefined when calling testGitlabRouting().');
|
|
343
|
+
}
|
|
344
|
+
if (requestParameters['gitlabRoutingTestUio'] == null) {
|
|
345
|
+
throw new runtime.RequiredError('gitlabRoutingTestUio', 'Required parameter "gitlabRoutingTestUio" was null or undefined when calling testGitlabRouting().');
|
|
346
|
+
}
|
|
347
|
+
const queryParameters = {};
|
|
348
|
+
const headerParameters = {};
|
|
349
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
350
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
351
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
352
|
+
}
|
|
353
|
+
const response = await this.request({
|
|
354
|
+
path: `/organizations/{organizationId}/integrations/gitlab/{integrationId}/test-routing`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters['integrationId']))),
|
|
355
|
+
method: 'POST',
|
|
356
|
+
headers: headerParameters,
|
|
357
|
+
query: queryParameters,
|
|
358
|
+
body: (0, index_1.GitlabRoutingTestUioToJSON)(requestParameters['gitlabRoutingTestUio']),
|
|
359
|
+
}, initOverrides);
|
|
360
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GitlabRoutingTestResultUioFromJSON)(jsonValue));
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Preview what a GitLab comment would trigger
|
|
364
|
+
*/
|
|
365
|
+
async testGitlabRouting(organizationId, integrationId, gitlabRoutingTestUio, initOverrides) {
|
|
366
|
+
const response = await this.testGitlabRoutingRaw({ organizationId: organizationId, integrationId: integrationId, gitlabRoutingTestUio: gitlabRoutingTestUio }, initOverrides);
|
|
367
|
+
return await response.value();
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Update a bot account (agents, service user, token, status)
|
|
371
|
+
*/
|
|
372
|
+
async updateGitlabBotAccountRaw(requestParameters, initOverrides) {
|
|
373
|
+
if (requestParameters['organizationId'] == null) {
|
|
374
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling updateGitlabBotAccount().');
|
|
375
|
+
}
|
|
376
|
+
if (requestParameters['integrationId'] == null) {
|
|
377
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter "integrationId" was null or undefined when calling updateGitlabBotAccount().');
|
|
378
|
+
}
|
|
379
|
+
if (requestParameters['accountId'] == null) {
|
|
380
|
+
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling updateGitlabBotAccount().');
|
|
381
|
+
}
|
|
382
|
+
if (requestParameters['gitlabBotAccountUpdateUio'] == null) {
|
|
383
|
+
throw new runtime.RequiredError('gitlabBotAccountUpdateUio', 'Required parameter "gitlabBotAccountUpdateUio" was null or undefined when calling updateGitlabBotAccount().');
|
|
384
|
+
}
|
|
385
|
+
const queryParameters = {};
|
|
386
|
+
const headerParameters = {};
|
|
387
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
388
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
389
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
390
|
+
}
|
|
391
|
+
const response = await this.request({
|
|
392
|
+
path: `/organizations/{organizationId}/integrations/gitlab/{integrationId}/bot-accounts/{accountId}`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters['integrationId']))).replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
|
|
393
|
+
method: 'PATCH',
|
|
394
|
+
headers: headerParameters,
|
|
395
|
+
query: queryParameters,
|
|
396
|
+
body: (0, index_1.GitlabBotAccountUpdateUioToJSON)(requestParameters['gitlabBotAccountUpdateUio']),
|
|
397
|
+
}, initOverrides);
|
|
398
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GitlabBotAccountUioFromJSON)(jsonValue));
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Update a bot account (agents, service user, token, status)
|
|
402
|
+
*/
|
|
403
|
+
async updateGitlabBotAccount(organizationId, integrationId, accountId, gitlabBotAccountUpdateUio, initOverrides) {
|
|
404
|
+
const response = await this.updateGitlabBotAccountRaw({ organizationId: organizationId, integrationId: integrationId, accountId: accountId, gitlabBotAccountUpdateUio: gitlabBotAccountUpdateUio }, initOverrides);
|
|
405
|
+
return await response.value();
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Changing `baseUrl` wipes the token of every bot account (status token_invalid, lastError BASE_URL_CHANGED): a token is never sent to another host than the one it was given for.
|
|
409
|
+
* Update a GitLab integration
|
|
410
|
+
*/
|
|
411
|
+
async updateGitlabIntegrationRaw(requestParameters, initOverrides) {
|
|
412
|
+
if (requestParameters['organizationId'] == null) {
|
|
413
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling updateGitlabIntegration().');
|
|
414
|
+
}
|
|
415
|
+
if (requestParameters['integrationId'] == null) {
|
|
416
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter "integrationId" was null or undefined when calling updateGitlabIntegration().');
|
|
417
|
+
}
|
|
418
|
+
if (requestParameters['gitlabIntegrationUpdateUio'] == null) {
|
|
419
|
+
throw new runtime.RequiredError('gitlabIntegrationUpdateUio', 'Required parameter "gitlabIntegrationUpdateUio" was null or undefined when calling updateGitlabIntegration().');
|
|
420
|
+
}
|
|
421
|
+
const queryParameters = {};
|
|
422
|
+
const headerParameters = {};
|
|
423
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
424
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
425
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
426
|
+
}
|
|
427
|
+
const response = await this.request({
|
|
428
|
+
path: `/organizations/{organizationId}/integrations/gitlab/{integrationId}`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters['integrationId']))),
|
|
429
|
+
method: 'PATCH',
|
|
430
|
+
headers: headerParameters,
|
|
431
|
+
query: queryParameters,
|
|
432
|
+
body: (0, index_1.GitlabIntegrationUpdateUioToJSON)(requestParameters['gitlabIntegrationUpdateUio']),
|
|
433
|
+
}, initOverrides);
|
|
434
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GitlabIntegrationDetailUioFromJSON)(jsonValue));
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* Changing `baseUrl` wipes the token of every bot account (status token_invalid, lastError BASE_URL_CHANGED): a token is never sent to another host than the one it was given for.
|
|
438
|
+
* Update a GitLab integration
|
|
439
|
+
*/
|
|
440
|
+
async updateGitlabIntegration(organizationId, integrationId, gitlabIntegrationUpdateUio, initOverrides) {
|
|
441
|
+
const response = await this.updateGitlabIntegrationRaw({ organizationId: organizationId, integrationId: integrationId, gitlabIntegrationUpdateUio: gitlabIntegrationUpdateUio }, initOverrides);
|
|
442
|
+
return await response.value();
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
exports.IntegrationsApi = IntegrationsApi;
|