@breign/client 1.0.183 → 1.0.185
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/OauthProviderApi.d.ts +155 -0
- package/dist/apis/OauthProviderApi.js +388 -0
- package/dist/apis/TicketsApi.d.ts +16 -1
- package/dist/apis/TicketsApi.js +37 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/InboxItemKindUio.d.ts +2 -1
- package/dist/models/InboxItemKindUio.js +2 -1
- package/dist/models/OAuthAuthorizationConsentRequestUio.d.ts +44 -0
- package/dist/models/OAuthAuthorizationConsentRequestUio.js +56 -0
- package/dist/models/OAuthAuthorizationRedirectUio.d.ts +32 -0
- package/dist/models/OAuthAuthorizationRedirectUio.js +50 -0
- package/dist/models/OAuthAuthorizationResumeClientUio.d.ts +50 -0
- package/dist/models/OAuthAuthorizationResumeClientUio.js +62 -0
- package/dist/models/OAuthAuthorizationResumeOrganizationUio.d.ts +38 -0
- package/dist/models/OAuthAuthorizationResumeOrganizationUio.js +54 -0
- package/dist/models/OAuthAuthorizationResumeRequestUio.d.ts +32 -0
- package/dist/models/OAuthAuthorizationResumeRequestUio.js +50 -0
- package/dist/models/OAuthAuthorizationResumeUio.d.ts +72 -0
- package/dist/models/OAuthAuthorizationResumeUio.js +70 -0
- package/dist/models/OAuthClientCreateUio.d.ts +77 -0
- package/dist/models/OAuthClientCreateUio.js +75 -0
- package/dist/models/OAuthClientTypeUio.d.ts +25 -0
- package/dist/models/OAuthClientTypeUio.js +51 -0
- package/dist/models/OAuthClientUio.d.ts +95 -0
- package/dist/models/OAuthClientUio.js +95 -0
- package/dist/models/OAuthClientUpdateUio.d.ts +62 -0
- package/dist/models/OAuthClientUpdateUio.js +58 -0
- package/dist/models/OAuthClientWithSecretUio.d.ts +101 -0
- package/dist/models/OAuthClientWithSecretUio.js +99 -0
- package/dist/models/OAuthConsentUio.d.ts +68 -0
- package/dist/models/OAuthConsentUio.js +74 -0
- package/dist/models/OAuthProviderInfoUio.d.ts +44 -0
- package/dist/models/OAuthProviderInfoUio.js +58 -0
- package/dist/models/TicketApprovalDecisionUio.d.ts +26 -0
- package/dist/models/TicketApprovalDecisionUio.js +52 -0
- package/dist/models/TicketApprovalRequestUio.d.ts +39 -0
- package/dist/models/TicketApprovalRequestUio.js +53 -0
- package/dist/models/TicketEventKindUio.d.ts +2 -1
- package/dist/models/TicketEventKindUio.js +2 -1
- package/dist/models/TicketEventUio.d.ts +1 -1
- package/dist/models/index.d.ts +15 -0
- package/dist/models/index.js +15 -0
- package/dist/openapi.json +835 -5
- package/package.json +1 -1
|
@@ -0,0 +1,155 @@
|
|
|
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 { OAuthAuthorizationConsentRequestUio, OAuthAuthorizationRedirectUio, OAuthAuthorizationResumeRequestUio, OAuthAuthorizationResumeUio, OAuthClientCreateUio, OAuthClientUio, OAuthClientUpdateUio, OAuthClientWithSecretUio, OAuthConsentUio, OAuthProviderInfoUio } from '../models/index';
|
|
14
|
+
export interface ConsentOAuthAuthorizationRequest {
|
|
15
|
+
oAuthAuthorizationConsentRequestUio: OAuthAuthorizationConsentRequestUio;
|
|
16
|
+
}
|
|
17
|
+
export interface CreateOrganizationOAuthClientRequest {
|
|
18
|
+
organizationId: string;
|
|
19
|
+
oAuthClientCreateUio: OAuthClientCreateUio;
|
|
20
|
+
}
|
|
21
|
+
export interface DeleteOrganizationOAuthClientRequest {
|
|
22
|
+
organizationId: string;
|
|
23
|
+
clientId: string;
|
|
24
|
+
}
|
|
25
|
+
export interface GetOrganizationOAuthClientRequest {
|
|
26
|
+
organizationId: string;
|
|
27
|
+
clientId: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ListOrganizationOAuthClientsRequest {
|
|
30
|
+
organizationId: string;
|
|
31
|
+
}
|
|
32
|
+
export interface ResumeOAuthAuthorizationRequest {
|
|
33
|
+
oAuthAuthorizationResumeRequestUio: OAuthAuthorizationResumeRequestUio;
|
|
34
|
+
}
|
|
35
|
+
export interface RevokeMyOAuthConsentRequest {
|
|
36
|
+
clientId: string;
|
|
37
|
+
}
|
|
38
|
+
export interface RotateOrganizationOAuthClientSecretRequest {
|
|
39
|
+
organizationId: string;
|
|
40
|
+
clientId: string;
|
|
41
|
+
}
|
|
42
|
+
export interface UpdateOrganizationOAuthClientRequest {
|
|
43
|
+
organizationId: string;
|
|
44
|
+
clientId: string;
|
|
45
|
+
oAuthClientUpdateUio: OAuthClientUpdateUio;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
export declare class OauthProviderApi extends runtime.BaseAPI {
|
|
51
|
+
/**
|
|
52
|
+
* Appelée par breign-app quand l\'utilisateur accepte ou refuse. Un refus est accepté même d\'un non-membre, pour renvoyer l\'application avec `access_denied`.
|
|
53
|
+
* Answer the consent screen of an OAuth authorization
|
|
54
|
+
*/
|
|
55
|
+
consentOAuthAuthorizationRaw(requestParameters: ConsentOAuthAuthorizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OAuthAuthorizationRedirectUio>>;
|
|
56
|
+
/**
|
|
57
|
+
* Appelée par breign-app quand l\'utilisateur accepte ou refuse. Un refus est accepté même d\'un non-membre, pour renvoyer l\'application avec `access_denied`.
|
|
58
|
+
* Answer the consent screen of an OAuth authorization
|
|
59
|
+
*/
|
|
60
|
+
consentOAuthAuthorization(oAuthAuthorizationConsentRequestUio: OAuthAuthorizationConsentRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OAuthAuthorizationRedirectUio>;
|
|
61
|
+
/**
|
|
62
|
+
* Réservé aux admins de l\'organisation et aux superadmins. Le secret d\'un client confidentiel n\'est renvoyé qu\'ici et à sa rotation.
|
|
63
|
+
* Create an OAuth client for an organization
|
|
64
|
+
*/
|
|
65
|
+
createOrganizationOAuthClientRaw(requestParameters: CreateOrganizationOAuthClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OAuthClientWithSecretUio>>;
|
|
66
|
+
/**
|
|
67
|
+
* Réservé aux admins de l\'organisation et aux superadmins. Le secret d\'un client confidentiel n\'est renvoyé qu\'ici et à sa rotation.
|
|
68
|
+
* Create an OAuth client for an organization
|
|
69
|
+
*/
|
|
70
|
+
createOrganizationOAuthClient(organizationId: string, oAuthClientCreateUio: OAuthClientCreateUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OAuthClientWithSecretUio>;
|
|
71
|
+
/**
|
|
72
|
+
* Ses jetons et les consentements donnés sont supprimés avec lui.
|
|
73
|
+
* Delete an OAuth client of an organization
|
|
74
|
+
*/
|
|
75
|
+
deleteOrganizationOAuthClientRaw(requestParameters: DeleteOrganizationOAuthClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
76
|
+
/**
|
|
77
|
+
* Ses jetons et les consentements donnés sont supprimés avec lui.
|
|
78
|
+
* Delete an OAuth client of an organization
|
|
79
|
+
*/
|
|
80
|
+
deleteOrganizationOAuthClient(organizationId: string, clientId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Issuer, ressource à passer en `resource` et document de découverte. Répond 404 quand le fournisseur OAuth est désactivé : breign-app s\'en sert pour afficher ou non ses écrans.
|
|
83
|
+
* Describe the OAuth provider of the platform
|
|
84
|
+
*/
|
|
85
|
+
getOAuthProviderRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OAuthProviderInfoUio>>;
|
|
86
|
+
/**
|
|
87
|
+
* Issuer, ressource à passer en `resource` et document de découverte. Répond 404 quand le fournisseur OAuth est désactivé : breign-app s\'en sert pour afficher ou non ses écrans.
|
|
88
|
+
* Describe the OAuth provider of the platform
|
|
89
|
+
*/
|
|
90
|
+
getOAuthProvider(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OAuthProviderInfoUio>;
|
|
91
|
+
/**
|
|
92
|
+
* Get an OAuth client of an organization
|
|
93
|
+
*/
|
|
94
|
+
getOrganizationOAuthClientRaw(requestParameters: GetOrganizationOAuthClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OAuthClientUio>>;
|
|
95
|
+
/**
|
|
96
|
+
* Get an OAuth client of an organization
|
|
97
|
+
*/
|
|
98
|
+
getOrganizationOAuthClient(organizationId: string, clientId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OAuthClientUio>;
|
|
99
|
+
/**
|
|
100
|
+
* List the applications the current user authorized
|
|
101
|
+
*/
|
|
102
|
+
listMyOAuthConsentsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OAuthConsentUio>>>;
|
|
103
|
+
/**
|
|
104
|
+
* List the applications the current user authorized
|
|
105
|
+
*/
|
|
106
|
+
listMyOAuthConsents(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OAuthConsentUio>>;
|
|
107
|
+
/**
|
|
108
|
+
* Réservé aux admins de l\'organisation et aux superadmins.
|
|
109
|
+
* List the OAuth clients of an organization
|
|
110
|
+
*/
|
|
111
|
+
listOrganizationOAuthClientsRaw(requestParameters: ListOrganizationOAuthClientsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OAuthClientUio>>>;
|
|
112
|
+
/**
|
|
113
|
+
* Réservé aux admins de l\'organisation et aux superadmins.
|
|
114
|
+
* List the OAuth clients of an organization
|
|
115
|
+
*/
|
|
116
|
+
listOrganizationOAuthClients(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OAuthClientUio>>;
|
|
117
|
+
/**
|
|
118
|
+
* Appelée par la page `/oauth/authorize` de breign-app au nom de l\'utilisateur connecté (clé plateforme + `x-user-id`). L\'utilisateur doit être membre de l\'organisation du client.
|
|
119
|
+
* Resume an OAuth authorization request on behalf of the connected user
|
|
120
|
+
*/
|
|
121
|
+
resumeOAuthAuthorizationRaw(requestParameters: ResumeOAuthAuthorizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OAuthAuthorizationResumeUio>>;
|
|
122
|
+
/**
|
|
123
|
+
* Appelée par la page `/oauth/authorize` de breign-app au nom de l\'utilisateur connecté (clé plateforme + `x-user-id`). L\'utilisateur doit être membre de l\'organisation du client.
|
|
124
|
+
* Resume an OAuth authorization request on behalf of the connected user
|
|
125
|
+
*/
|
|
126
|
+
resumeOAuthAuthorization(oAuthAuthorizationResumeRequestUio: OAuthAuthorizationResumeRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OAuthAuthorizationResumeUio>;
|
|
127
|
+
/**
|
|
128
|
+
* Supprime le consentement et révoque les jetons de l\'application pour l\'utilisateur.
|
|
129
|
+
* Revoke an application the current user authorized
|
|
130
|
+
*/
|
|
131
|
+
revokeMyOAuthConsentRaw(requestParameters: RevokeMyOAuthConsentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
132
|
+
/**
|
|
133
|
+
* Supprime le consentement et révoque les jetons de l\'application pour l\'utilisateur.
|
|
134
|
+
* Revoke an application the current user authorized
|
|
135
|
+
*/
|
|
136
|
+
revokeMyOAuthConsent(clientId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
137
|
+
/**
|
|
138
|
+
* L\'ancien secret cesse de fonctionner ; le nouveau n\'est affiché qu\'ici.
|
|
139
|
+
* Rotate the secret of a confidential OAuth client
|
|
140
|
+
*/
|
|
141
|
+
rotateOrganizationOAuthClientSecretRaw(requestParameters: RotateOrganizationOAuthClientSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OAuthClientWithSecretUio>>;
|
|
142
|
+
/**
|
|
143
|
+
* L\'ancien secret cesse de fonctionner ; le nouveau n\'est affiché qu\'ici.
|
|
144
|
+
* Rotate the secret of a confidential OAuth client
|
|
145
|
+
*/
|
|
146
|
+
rotateOrganizationOAuthClientSecret(organizationId: string, clientId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OAuthClientWithSecretUio>;
|
|
147
|
+
/**
|
|
148
|
+
* Update an OAuth client of an organization
|
|
149
|
+
*/
|
|
150
|
+
updateOrganizationOAuthClientRaw(requestParameters: UpdateOrganizationOAuthClientRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OAuthClientUio>>;
|
|
151
|
+
/**
|
|
152
|
+
* Update an OAuth client of an organization
|
|
153
|
+
*/
|
|
154
|
+
updateOrganizationOAuthClient(organizationId: string, clientId: string, oAuthClientUpdateUio: OAuthClientUpdateUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OAuthClientUio>;
|
|
155
|
+
}
|
|
@@ -0,0 +1,388 @@
|
|
|
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.OauthProviderApi = void 0;
|
|
50
|
+
const runtime = __importStar(require("../runtime"));
|
|
51
|
+
const index_1 = require("../models/index");
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
class OauthProviderApi extends runtime.BaseAPI {
|
|
56
|
+
/**
|
|
57
|
+
* Appelée par breign-app quand l\'utilisateur accepte ou refuse. Un refus est accepté même d\'un non-membre, pour renvoyer l\'application avec `access_denied`.
|
|
58
|
+
* Answer the consent screen of an OAuth authorization
|
|
59
|
+
*/
|
|
60
|
+
async consentOAuthAuthorizationRaw(requestParameters, initOverrides) {
|
|
61
|
+
if (requestParameters['oAuthAuthorizationConsentRequestUio'] == null) {
|
|
62
|
+
throw new runtime.RequiredError('oAuthAuthorizationConsentRequestUio', 'Required parameter "oAuthAuthorizationConsentRequestUio" was null or undefined when calling consentOAuthAuthorization().');
|
|
63
|
+
}
|
|
64
|
+
const queryParameters = {};
|
|
65
|
+
const headerParameters = {};
|
|
66
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
67
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
68
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
69
|
+
}
|
|
70
|
+
const response = await this.request({
|
|
71
|
+
path: `/oauth/authorizations/consent`,
|
|
72
|
+
method: 'POST',
|
|
73
|
+
headers: headerParameters,
|
|
74
|
+
query: queryParameters,
|
|
75
|
+
body: (0, index_1.OAuthAuthorizationConsentRequestUioToJSON)(requestParameters['oAuthAuthorizationConsentRequestUio']),
|
|
76
|
+
}, initOverrides);
|
|
77
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OAuthAuthorizationRedirectUioFromJSON)(jsonValue));
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Appelée par breign-app quand l\'utilisateur accepte ou refuse. Un refus est accepté même d\'un non-membre, pour renvoyer l\'application avec `access_denied`.
|
|
81
|
+
* Answer the consent screen of an OAuth authorization
|
|
82
|
+
*/
|
|
83
|
+
async consentOAuthAuthorization(oAuthAuthorizationConsentRequestUio, initOverrides) {
|
|
84
|
+
const response = await this.consentOAuthAuthorizationRaw({ oAuthAuthorizationConsentRequestUio: oAuthAuthorizationConsentRequestUio }, initOverrides);
|
|
85
|
+
return await response.value();
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Réservé aux admins de l\'organisation et aux superadmins. Le secret d\'un client confidentiel n\'est renvoyé qu\'ici et à sa rotation.
|
|
89
|
+
* Create an OAuth client for an organization
|
|
90
|
+
*/
|
|
91
|
+
async createOrganizationOAuthClientRaw(requestParameters, initOverrides) {
|
|
92
|
+
if (requestParameters['organizationId'] == null) {
|
|
93
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling createOrganizationOAuthClient().');
|
|
94
|
+
}
|
|
95
|
+
if (requestParameters['oAuthClientCreateUio'] == null) {
|
|
96
|
+
throw new runtime.RequiredError('oAuthClientCreateUio', 'Required parameter "oAuthClientCreateUio" was null or undefined when calling createOrganizationOAuthClient().');
|
|
97
|
+
}
|
|
98
|
+
const queryParameters = {};
|
|
99
|
+
const headerParameters = {};
|
|
100
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
101
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
102
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
103
|
+
}
|
|
104
|
+
const response = await this.request({
|
|
105
|
+
path: `/organizations/{organizationId}/oauth-clients`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
|
|
106
|
+
method: 'POST',
|
|
107
|
+
headers: headerParameters,
|
|
108
|
+
query: queryParameters,
|
|
109
|
+
body: (0, index_1.OAuthClientCreateUioToJSON)(requestParameters['oAuthClientCreateUio']),
|
|
110
|
+
}, initOverrides);
|
|
111
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OAuthClientWithSecretUioFromJSON)(jsonValue));
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Réservé aux admins de l\'organisation et aux superadmins. Le secret d\'un client confidentiel n\'est renvoyé qu\'ici et à sa rotation.
|
|
115
|
+
* Create an OAuth client for an organization
|
|
116
|
+
*/
|
|
117
|
+
async createOrganizationOAuthClient(organizationId, oAuthClientCreateUio, initOverrides) {
|
|
118
|
+
const response = await this.createOrganizationOAuthClientRaw({ organizationId: organizationId, oAuthClientCreateUio: oAuthClientCreateUio }, initOverrides);
|
|
119
|
+
return await response.value();
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Ses jetons et les consentements donnés sont supprimés avec lui.
|
|
123
|
+
* Delete an OAuth client of an organization
|
|
124
|
+
*/
|
|
125
|
+
async deleteOrganizationOAuthClientRaw(requestParameters, initOverrides) {
|
|
126
|
+
if (requestParameters['organizationId'] == null) {
|
|
127
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling deleteOrganizationOAuthClient().');
|
|
128
|
+
}
|
|
129
|
+
if (requestParameters['clientId'] == null) {
|
|
130
|
+
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling deleteOrganizationOAuthClient().');
|
|
131
|
+
}
|
|
132
|
+
const queryParameters = {};
|
|
133
|
+
const headerParameters = {};
|
|
134
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
135
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
136
|
+
}
|
|
137
|
+
const response = await this.request({
|
|
138
|
+
path: `/organizations/{organizationId}/oauth-clients/{clientId}`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters['clientId']))),
|
|
139
|
+
method: 'DELETE',
|
|
140
|
+
headers: headerParameters,
|
|
141
|
+
query: queryParameters,
|
|
142
|
+
}, initOverrides);
|
|
143
|
+
return new runtime.VoidApiResponse(response);
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Ses jetons et les consentements donnés sont supprimés avec lui.
|
|
147
|
+
* Delete an OAuth client of an organization
|
|
148
|
+
*/
|
|
149
|
+
async deleteOrganizationOAuthClient(organizationId, clientId, initOverrides) {
|
|
150
|
+
await this.deleteOrganizationOAuthClientRaw({ organizationId: organizationId, clientId: clientId }, initOverrides);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Issuer, ressource à passer en `resource` et document de découverte. Répond 404 quand le fournisseur OAuth est désactivé : breign-app s\'en sert pour afficher ou non ses écrans.
|
|
154
|
+
* Describe the OAuth provider of the platform
|
|
155
|
+
*/
|
|
156
|
+
async getOAuthProviderRaw(initOverrides) {
|
|
157
|
+
const queryParameters = {};
|
|
158
|
+
const headerParameters = {};
|
|
159
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
160
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
161
|
+
}
|
|
162
|
+
const response = await this.request({
|
|
163
|
+
path: `/oauth/provider`,
|
|
164
|
+
method: 'GET',
|
|
165
|
+
headers: headerParameters,
|
|
166
|
+
query: queryParameters,
|
|
167
|
+
}, initOverrides);
|
|
168
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OAuthProviderInfoUioFromJSON)(jsonValue));
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Issuer, ressource à passer en `resource` et document de découverte. Répond 404 quand le fournisseur OAuth est désactivé : breign-app s\'en sert pour afficher ou non ses écrans.
|
|
172
|
+
* Describe the OAuth provider of the platform
|
|
173
|
+
*/
|
|
174
|
+
async getOAuthProvider(initOverrides) {
|
|
175
|
+
const response = await this.getOAuthProviderRaw(initOverrides);
|
|
176
|
+
return await response.value();
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Get an OAuth client of an organization
|
|
180
|
+
*/
|
|
181
|
+
async getOrganizationOAuthClientRaw(requestParameters, initOverrides) {
|
|
182
|
+
if (requestParameters['organizationId'] == null) {
|
|
183
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getOrganizationOAuthClient().');
|
|
184
|
+
}
|
|
185
|
+
if (requestParameters['clientId'] == null) {
|
|
186
|
+
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling getOrganizationOAuthClient().');
|
|
187
|
+
}
|
|
188
|
+
const queryParameters = {};
|
|
189
|
+
const headerParameters = {};
|
|
190
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
191
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
192
|
+
}
|
|
193
|
+
const response = await this.request({
|
|
194
|
+
path: `/organizations/{organizationId}/oauth-clients/{clientId}`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters['clientId']))),
|
|
195
|
+
method: 'GET',
|
|
196
|
+
headers: headerParameters,
|
|
197
|
+
query: queryParameters,
|
|
198
|
+
}, initOverrides);
|
|
199
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OAuthClientUioFromJSON)(jsonValue));
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Get an OAuth client of an organization
|
|
203
|
+
*/
|
|
204
|
+
async getOrganizationOAuthClient(organizationId, clientId, initOverrides) {
|
|
205
|
+
const response = await this.getOrganizationOAuthClientRaw({ organizationId: organizationId, clientId: clientId }, initOverrides);
|
|
206
|
+
return await response.value();
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* List the applications the current user authorized
|
|
210
|
+
*/
|
|
211
|
+
async listMyOAuthConsentsRaw(initOverrides) {
|
|
212
|
+
const queryParameters = {};
|
|
213
|
+
const headerParameters = {};
|
|
214
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
215
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
216
|
+
}
|
|
217
|
+
const response = await this.request({
|
|
218
|
+
path: `/me/oauth-consents`,
|
|
219
|
+
method: 'GET',
|
|
220
|
+
headers: headerParameters,
|
|
221
|
+
query: queryParameters,
|
|
222
|
+
}, initOverrides);
|
|
223
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.OAuthConsentUioFromJSON));
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* List the applications the current user authorized
|
|
227
|
+
*/
|
|
228
|
+
async listMyOAuthConsents(initOverrides) {
|
|
229
|
+
const response = await this.listMyOAuthConsentsRaw(initOverrides);
|
|
230
|
+
return await response.value();
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Réservé aux admins de l\'organisation et aux superadmins.
|
|
234
|
+
* List the OAuth clients of an organization
|
|
235
|
+
*/
|
|
236
|
+
async listOrganizationOAuthClientsRaw(requestParameters, initOverrides) {
|
|
237
|
+
if (requestParameters['organizationId'] == null) {
|
|
238
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling listOrganizationOAuthClients().');
|
|
239
|
+
}
|
|
240
|
+
const queryParameters = {};
|
|
241
|
+
const headerParameters = {};
|
|
242
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
243
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
244
|
+
}
|
|
245
|
+
const response = await this.request({
|
|
246
|
+
path: `/organizations/{organizationId}/oauth-clients`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
|
|
247
|
+
method: 'GET',
|
|
248
|
+
headers: headerParameters,
|
|
249
|
+
query: queryParameters,
|
|
250
|
+
}, initOverrides);
|
|
251
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.OAuthClientUioFromJSON));
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Réservé aux admins de l\'organisation et aux superadmins.
|
|
255
|
+
* List the OAuth clients of an organization
|
|
256
|
+
*/
|
|
257
|
+
async listOrganizationOAuthClients(organizationId, initOverrides) {
|
|
258
|
+
const response = await this.listOrganizationOAuthClientsRaw({ organizationId: organizationId }, initOverrides);
|
|
259
|
+
return await response.value();
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Appelée par la page `/oauth/authorize` de breign-app au nom de l\'utilisateur connecté (clé plateforme + `x-user-id`). L\'utilisateur doit être membre de l\'organisation du client.
|
|
263
|
+
* Resume an OAuth authorization request on behalf of the connected user
|
|
264
|
+
*/
|
|
265
|
+
async resumeOAuthAuthorizationRaw(requestParameters, initOverrides) {
|
|
266
|
+
if (requestParameters['oAuthAuthorizationResumeRequestUio'] == null) {
|
|
267
|
+
throw new runtime.RequiredError('oAuthAuthorizationResumeRequestUio', 'Required parameter "oAuthAuthorizationResumeRequestUio" was null or undefined when calling resumeOAuthAuthorization().');
|
|
268
|
+
}
|
|
269
|
+
const queryParameters = {};
|
|
270
|
+
const headerParameters = {};
|
|
271
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
272
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
273
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
274
|
+
}
|
|
275
|
+
const response = await this.request({
|
|
276
|
+
path: `/oauth/authorizations/resume`,
|
|
277
|
+
method: 'POST',
|
|
278
|
+
headers: headerParameters,
|
|
279
|
+
query: queryParameters,
|
|
280
|
+
body: (0, index_1.OAuthAuthorizationResumeRequestUioToJSON)(requestParameters['oAuthAuthorizationResumeRequestUio']),
|
|
281
|
+
}, initOverrides);
|
|
282
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OAuthAuthorizationResumeUioFromJSON)(jsonValue));
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Appelée par la page `/oauth/authorize` de breign-app au nom de l\'utilisateur connecté (clé plateforme + `x-user-id`). L\'utilisateur doit être membre de l\'organisation du client.
|
|
286
|
+
* Resume an OAuth authorization request on behalf of the connected user
|
|
287
|
+
*/
|
|
288
|
+
async resumeOAuthAuthorization(oAuthAuthorizationResumeRequestUio, initOverrides) {
|
|
289
|
+
const response = await this.resumeOAuthAuthorizationRaw({ oAuthAuthorizationResumeRequestUio: oAuthAuthorizationResumeRequestUio }, initOverrides);
|
|
290
|
+
return await response.value();
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Supprime le consentement et révoque les jetons de l\'application pour l\'utilisateur.
|
|
294
|
+
* Revoke an application the current user authorized
|
|
295
|
+
*/
|
|
296
|
+
async revokeMyOAuthConsentRaw(requestParameters, initOverrides) {
|
|
297
|
+
if (requestParameters['clientId'] == null) {
|
|
298
|
+
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling revokeMyOAuthConsent().');
|
|
299
|
+
}
|
|
300
|
+
const queryParameters = {};
|
|
301
|
+
const headerParameters = {};
|
|
302
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
303
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
304
|
+
}
|
|
305
|
+
const response = await this.request({
|
|
306
|
+
path: `/me/oauth-consents/{clientId}`.replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters['clientId']))),
|
|
307
|
+
method: 'DELETE',
|
|
308
|
+
headers: headerParameters,
|
|
309
|
+
query: queryParameters,
|
|
310
|
+
}, initOverrides);
|
|
311
|
+
return new runtime.VoidApiResponse(response);
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Supprime le consentement et révoque les jetons de l\'application pour l\'utilisateur.
|
|
315
|
+
* Revoke an application the current user authorized
|
|
316
|
+
*/
|
|
317
|
+
async revokeMyOAuthConsent(clientId, initOverrides) {
|
|
318
|
+
await this.revokeMyOAuthConsentRaw({ clientId: clientId }, initOverrides);
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* L\'ancien secret cesse de fonctionner ; le nouveau n\'est affiché qu\'ici.
|
|
322
|
+
* Rotate the secret of a confidential OAuth client
|
|
323
|
+
*/
|
|
324
|
+
async rotateOrganizationOAuthClientSecretRaw(requestParameters, initOverrides) {
|
|
325
|
+
if (requestParameters['organizationId'] == null) {
|
|
326
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling rotateOrganizationOAuthClientSecret().');
|
|
327
|
+
}
|
|
328
|
+
if (requestParameters['clientId'] == null) {
|
|
329
|
+
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling rotateOrganizationOAuthClientSecret().');
|
|
330
|
+
}
|
|
331
|
+
const queryParameters = {};
|
|
332
|
+
const headerParameters = {};
|
|
333
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
334
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
335
|
+
}
|
|
336
|
+
const response = await this.request({
|
|
337
|
+
path: `/organizations/{organizationId}/oauth-clients/{clientId}/rotate-secret`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters['clientId']))),
|
|
338
|
+
method: 'POST',
|
|
339
|
+
headers: headerParameters,
|
|
340
|
+
query: queryParameters,
|
|
341
|
+
}, initOverrides);
|
|
342
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OAuthClientWithSecretUioFromJSON)(jsonValue));
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* L\'ancien secret cesse de fonctionner ; le nouveau n\'est affiché qu\'ici.
|
|
346
|
+
* Rotate the secret of a confidential OAuth client
|
|
347
|
+
*/
|
|
348
|
+
async rotateOrganizationOAuthClientSecret(organizationId, clientId, initOverrides) {
|
|
349
|
+
const response = await this.rotateOrganizationOAuthClientSecretRaw({ organizationId: organizationId, clientId: clientId }, initOverrides);
|
|
350
|
+
return await response.value();
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Update an OAuth client of an organization
|
|
354
|
+
*/
|
|
355
|
+
async updateOrganizationOAuthClientRaw(requestParameters, initOverrides) {
|
|
356
|
+
if (requestParameters['organizationId'] == null) {
|
|
357
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling updateOrganizationOAuthClient().');
|
|
358
|
+
}
|
|
359
|
+
if (requestParameters['clientId'] == null) {
|
|
360
|
+
throw new runtime.RequiredError('clientId', 'Required parameter "clientId" was null or undefined when calling updateOrganizationOAuthClient().');
|
|
361
|
+
}
|
|
362
|
+
if (requestParameters['oAuthClientUpdateUio'] == null) {
|
|
363
|
+
throw new runtime.RequiredError('oAuthClientUpdateUio', 'Required parameter "oAuthClientUpdateUio" was null or undefined when calling updateOrganizationOAuthClient().');
|
|
364
|
+
}
|
|
365
|
+
const queryParameters = {};
|
|
366
|
+
const headerParameters = {};
|
|
367
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
368
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
369
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
370
|
+
}
|
|
371
|
+
const response = await this.request({
|
|
372
|
+
path: `/organizations/{organizationId}/oauth-clients/{clientId}`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"clientId"}}`, encodeURIComponent(String(requestParameters['clientId']))),
|
|
373
|
+
method: 'PATCH',
|
|
374
|
+
headers: headerParameters,
|
|
375
|
+
query: queryParameters,
|
|
376
|
+
body: (0, index_1.OAuthClientUpdateUioToJSON)(requestParameters['oAuthClientUpdateUio']),
|
|
377
|
+
}, initOverrides);
|
|
378
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OAuthClientUioFromJSON)(jsonValue));
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Update an OAuth client of an organization
|
|
382
|
+
*/
|
|
383
|
+
async updateOrganizationOAuthClient(organizationId, clientId, oAuthClientUpdateUio, initOverrides) {
|
|
384
|
+
const response = await this.updateOrganizationOAuthClientRaw({ organizationId: organizationId, clientId: clientId, oAuthClientUpdateUio: oAuthClientUpdateUio }, initOverrides);
|
|
385
|
+
return await response.value();
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
exports.OauthProviderApi = OauthProviderApi;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AcceptTicketProposalRequestUio, ConversationTicketProposalUio, CreateTicketArtifactRequestUio, CreateTicketArtifactResponseUio, CreateTicketEventRequestUio, CreateTicketRequestUio, MemberTypeUio, SaveTicketArtifactVersionRequestUio, SetTicketAssigneesRequestUio, TicketAgentExecutionUio, TicketArtifactDownloadUrlUio, TicketArtifactUio, TicketBoardUio, TicketEventUio, TicketReviewRequestUio, TicketStatusUio, TicketUio, TicketUsageUio, UpdateTicketRequestUio } from '../models/index';
|
|
13
|
+
import type { AcceptTicketProposalRequestUio, ConversationTicketProposalUio, CreateTicketArtifactRequestUio, CreateTicketArtifactResponseUio, CreateTicketEventRequestUio, CreateTicketRequestUio, MemberTypeUio, SaveTicketArtifactVersionRequestUio, SetTicketAssigneesRequestUio, TicketAgentExecutionUio, TicketApprovalRequestUio, TicketArtifactDownloadUrlUio, TicketArtifactUio, TicketBoardUio, TicketEventUio, TicketReviewRequestUio, TicketStatusUio, TicketUio, TicketUsageUio, UpdateTicketRequestUio } from '../models/index';
|
|
14
14
|
export interface AcceptTicketProposalRequest {
|
|
15
15
|
proposalId: string;
|
|
16
16
|
acceptTicketProposalRequestUio: AcceptTicketProposalRequestUio;
|
|
@@ -30,6 +30,11 @@ export interface CreateTicketCommentRequest {
|
|
|
30
30
|
ticketId: string;
|
|
31
31
|
createTicketEventRequestUio: CreateTicketEventRequestUio;
|
|
32
32
|
}
|
|
33
|
+
export interface DecideTicketApprovalRequest {
|
|
34
|
+
ticketId: string;
|
|
35
|
+
eventId: string;
|
|
36
|
+
ticketApprovalRequestUio: TicketApprovalRequestUio;
|
|
37
|
+
}
|
|
33
38
|
export interface DeleteTicketArtifactRequest {
|
|
34
39
|
ticketId: string;
|
|
35
40
|
artifactId: string;
|
|
@@ -161,6 +166,16 @@ export declare class TicketsApi extends runtime.BaseAPI {
|
|
|
161
166
|
* Comment on a ticket
|
|
162
167
|
*/
|
|
163
168
|
createTicketComment(ticketId: string, createTicketEventRequestUio: CreateTicketEventRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TicketEventUio>;
|
|
169
|
+
/**
|
|
170
|
+
* Réponse de l\'humain visé (ou d\'un responsable du projet) à une demande d\'approbation d\'un agent. Le statut du ticket ne change pas ; l\'agent est réveillé avec la réponse.
|
|
171
|
+
* Answer an agent\'s approval request
|
|
172
|
+
*/
|
|
173
|
+
decideTicketApprovalRaw(requestParameters: DecideTicketApprovalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TicketUio>>;
|
|
174
|
+
/**
|
|
175
|
+
* Réponse de l\'humain visé (ou d\'un responsable du projet) à une demande d\'approbation d\'un agent. Le statut du ticket ne change pas ; l\'agent est réveillé avec la réponse.
|
|
176
|
+
* Answer an agent\'s approval request
|
|
177
|
+
*/
|
|
178
|
+
decideTicketApproval(ticketId: string, eventId: string, ticketApprovalRequestUio: TicketApprovalRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TicketUio>;
|
|
164
179
|
/**
|
|
165
180
|
* Retire l\'artefact et supprime le fichier téléversé.
|
|
166
181
|
* Remove an artifact from a ticket
|
package/dist/apis/TicketsApi.js
CHANGED
|
@@ -218,6 +218,43 @@ class TicketsApi extends runtime.BaseAPI {
|
|
|
218
218
|
const response = await this.createTicketCommentRaw({ ticketId: ticketId, createTicketEventRequestUio: createTicketEventRequestUio }, initOverrides);
|
|
219
219
|
return await response.value();
|
|
220
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* Réponse de l\'humain visé (ou d\'un responsable du projet) à une demande d\'approbation d\'un agent. Le statut du ticket ne change pas ; l\'agent est réveillé avec la réponse.
|
|
223
|
+
* Answer an agent\'s approval request
|
|
224
|
+
*/
|
|
225
|
+
async decideTicketApprovalRaw(requestParameters, initOverrides) {
|
|
226
|
+
if (requestParameters['ticketId'] == null) {
|
|
227
|
+
throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling decideTicketApproval().');
|
|
228
|
+
}
|
|
229
|
+
if (requestParameters['eventId'] == null) {
|
|
230
|
+
throw new runtime.RequiredError('eventId', 'Required parameter "eventId" was null or undefined when calling decideTicketApproval().');
|
|
231
|
+
}
|
|
232
|
+
if (requestParameters['ticketApprovalRequestUio'] == null) {
|
|
233
|
+
throw new runtime.RequiredError('ticketApprovalRequestUio', 'Required parameter "ticketApprovalRequestUio" was null or undefined when calling decideTicketApproval().');
|
|
234
|
+
}
|
|
235
|
+
const queryParameters = {};
|
|
236
|
+
const headerParameters = {};
|
|
237
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
238
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
239
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
240
|
+
}
|
|
241
|
+
const response = await this.request({
|
|
242
|
+
path: `/tickets/{ticketId}/approvals/{eventId}`.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId']))).replace(`{${"eventId"}}`, encodeURIComponent(String(requestParameters['eventId']))),
|
|
243
|
+
method: 'POST',
|
|
244
|
+
headers: headerParameters,
|
|
245
|
+
query: queryParameters,
|
|
246
|
+
body: (0, index_1.TicketApprovalRequestUioToJSON)(requestParameters['ticketApprovalRequestUio']),
|
|
247
|
+
}, initOverrides);
|
|
248
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TicketUioFromJSON)(jsonValue));
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Réponse de l\'humain visé (ou d\'un responsable du projet) à une demande d\'approbation d\'un agent. Le statut du ticket ne change pas ; l\'agent est réveillé avec la réponse.
|
|
252
|
+
* Answer an agent\'s approval request
|
|
253
|
+
*/
|
|
254
|
+
async decideTicketApproval(ticketId, eventId, ticketApprovalRequestUio, initOverrides) {
|
|
255
|
+
const response = await this.decideTicketApprovalRaw({ ticketId: ticketId, eventId: eventId, ticketApprovalRequestUio: ticketApprovalRequestUio }, initOverrides);
|
|
256
|
+
return await response.value();
|
|
257
|
+
}
|
|
221
258
|
/**
|
|
222
259
|
* Retire l\'artefact et supprime le fichier téléversé.
|
|
223
260
|
* Remove an artifact from a ticket
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './LibraryAgentsApi';
|
|
|
21
21
|
export * from './ManifestsApi';
|
|
22
22
|
export * from './McpApi';
|
|
23
23
|
export * from './MetricsApi';
|
|
24
|
+
export * from './OauthProviderApi';
|
|
24
25
|
export * from './OrganizationsApi';
|
|
25
26
|
export * from './ProjectsApi';
|
|
26
27
|
export * from './PromptsApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -39,6 +39,7 @@ __exportStar(require("./LibraryAgentsApi"), exports);
|
|
|
39
39
|
__exportStar(require("./ManifestsApi"), exports);
|
|
40
40
|
__exportStar(require("./McpApi"), exports);
|
|
41
41
|
__exportStar(require("./MetricsApi"), exports);
|
|
42
|
+
__exportStar(require("./OauthProviderApi"), exports);
|
|
42
43
|
__exportStar(require("./OrganizationsApi"), exports);
|
|
43
44
|
__exportStar(require("./ProjectsApi"), exports);
|
|
44
45
|
__exportStar(require("./PromptsApi"), exports);
|