This repository was archived by the owner on Nov 18, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathSsoApi.js
More file actions
326 lines (289 loc) · 11.6 KB
/
Copy pathSsoApi.js
File metadata and controls
326 lines (289 loc) · 11.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
/**
* BIMData API
* BIMData API is a tool to interact with your models stored on BIMData’s servers. Through the API, you can manage your projects, the clouds, upload your IFC files and manage them through endpoints.
*
* The version of the OpenAPI document: v1 (v1)
* Contact: support@bimdata.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from "../ApiClient";
import CreateUserRequest from '../model/CreateUserRequest';
import Invitation from '../model/Invitation';
import SelectUserRequest from '../model/SelectUserRequest';
import ShortUser from '../model/ShortUser';
/**
* Sso service.
* @module api/SsoApi
* @version 0.0.0
*/
export default class SsoApi {
/**
* Constructs a new SsoApi.
* @alias module:api/SsoApi
* @class
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
* default to {@link module:ApiClient#instance} if unspecified.
*/
constructor(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
}
/**
* Accept an invitation
* If the user already exists, s·he is added to the cloud and projet. If not, we wait their first connection to add them. Required scopes: org:manage
* @param {Number} id A unique integer value identifying this invitation.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
acceptInvitationWithHttpInfo(id) {
let postBody = null;
// verify the required parameter 'id' is set
if (id === undefined || id === null) {
throw new Error("Missing the required parameter 'id' when calling acceptInvitation");
}
let pathParams = {
'id': id
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['ApiKey', 'BIMData_Connect', 'BIMData_Connect', 'Bearer'];
let contentTypes = [];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/identity-provider/invitation/{id}/accept', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Accept an invitation
* If the user already exists, s·he is added to the cloud and projet. If not, we wait their first connection to add them. Required scopes: org:manage
* @param {Number} id A unique integer value identifying this invitation.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
acceptInvitation(id) {
return this.acceptInvitationWithHttpInfo(id)
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Create a user
* Create a user, linked to the provider. This route is only useful when used with `ProjetAccessToken`s. If user already exists, it responds with a 200 instead of a 201
* @param {module:model/CreateUserRequest} createUserRequest
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ShortUser} and HTTP response
*/
createUserWithHttpInfo(createUserRequest) {
let postBody = createUserRequest;
// verify the required parameter 'createUserRequest' is set
if (createUserRequest === undefined || createUserRequest === null) {
throw new Error("Missing the required parameter 'createUserRequest' when calling createUser");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['ApiKey', 'BIMData_Connect', 'BIMData_Connect', 'Bearer'];
let contentTypes = ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'];
let accepts = ['application/json'];
let returnType = ShortUser;
return this.apiClient.callApi(
'/identity-provider/user', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Create a user
* Create a user, linked to the provider. This route is only useful when used with `ProjetAccessToken`s. If user already exists, it responds with a 200 instead of a 201
* @param {module:model/CreateUserRequest} createUserRequest
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ShortUser}
*/
createUser(createUserRequest) {
return this.createUserWithHttpInfo(createUserRequest)
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Delete user from BIMData
* Delete the user and all clouds where the user is alone
* @param {module:model/SelectUserRequest} selectUserRequest
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
deleteUserWithHttpInfo(selectUserRequest) {
let postBody = selectUserRequest;
// verify the required parameter 'selectUserRequest' is set
if (selectUserRequest === undefined || selectUserRequest === null) {
throw new Error("Missing the required parameter 'selectUserRequest' when calling deleteUser");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['ApiKey', 'BIMData_Connect', 'BIMData_Connect', 'Bearer'];
let contentTypes = ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/identity-provider/user', 'DELETE',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Delete user from BIMData
* Delete the user and all clouds where the user is alone
* @param {module:model/SelectUserRequest} selectUserRequest
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
deleteUser(selectUserRequest) {
return this.deleteUserWithHttpInfo(selectUserRequest)
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Deny an invitation
* The invitation status change to DENIED and the user is not added to the cloud. You can accept an invitation previously denied Required scopes: org:manage
* @param {Number} id A unique integer value identifying this invitation.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
denyInvitationWithHttpInfo(id) {
let postBody = null;
// verify the required parameter 'id' is set
if (id === undefined || id === null) {
throw new Error("Missing the required parameter 'id' when calling denyInvitation");
}
let pathParams = {
'id': id
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['ApiKey', 'BIMData_Connect', 'BIMData_Connect', 'Bearer'];
let contentTypes = [];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/identity-provider/invitation/{id}/deny', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Deny an invitation
* The invitation status change to DENIED and the user is not added to the cloud. You can accept an invitation previously denied Required scopes: org:manage
* @param {Number} id A unique integer value identifying this invitation.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
denyInvitation(id) {
return this.denyInvitationWithHttpInfo(id)
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Retrieve an invitation
* Retrieve all invitations of your identity provider Required scopes: org:manage
* @param {Number} id A unique integer value identifying this invitation.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Invitation} and HTTP response
*/
getInvitationWithHttpInfo(id) {
let postBody = null;
// verify the required parameter 'id' is set
if (id === undefined || id === null) {
throw new Error("Missing the required parameter 'id' when calling getInvitation");
}
let pathParams = {
'id': id
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['ApiKey', 'BIMData_Connect', 'BIMData_Connect', 'Bearer'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = Invitation;
return this.apiClient.callApi(
'/identity-provider/invitation/{id}', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Retrieve an invitation
* Retrieve all invitations of your identity provider Required scopes: org:manage
* @param {Number} id A unique integer value identifying this invitation.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Invitation}
*/
getInvitation(id) {
return this.getInvitationWithHttpInfo(id)
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* Retrieve all invitations
* Retrieve all invitations of your identity provider Required scopes: org:manage
* @param {Object} opts Optional parameters
* @param {module:model/String} opts.status A: Accepted D: Denied P: Pending * `A` - accepted * `D` - denied * `P` - pending
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/Invitation>} and HTTP response
*/
getInvitationsWithHttpInfo(opts) {
opts = opts || {};
let postBody = null;
let pathParams = {
};
let queryParams = {
'status': opts['status']
};
let headerParams = {
};
let formParams = {
};
let authNames = ['ApiKey', 'BIMData_Connect', 'BIMData_Connect', 'Bearer'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = [Invitation];
return this.apiClient.callApi(
'/identity-provider/invitation', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Retrieve all invitations
* Retrieve all invitations of your identity provider Required scopes: org:manage
* @param {Object} opts Optional parameters
* @param {module:model/String} opts.status A: Accepted D: Denied P: Pending * `A` - accepted * `D` - denied * `P` - pending
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/Invitation>}
*/
getInvitations(opts) {
return this.getInvitationsWithHttpInfo(opts)
.then(function(response_and_data) {
return response_and_data.data;
});
}
}