@agravity/private 5.3.0 → 5.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +2 -2
  2. package/api/api.ts +101 -67
  3. package/api/assetIconRuleManagement.agravity.ts +434 -400
  4. package/api/assetManagement.agravity.ts +856 -737
  5. package/api/assetOperations.agravity.ts +1415 -1309
  6. package/api/assetPublishing.agravity.ts +549 -511
  7. package/api/assetVersioning.agravity.ts +707 -657
  8. package/api/authenticationManagement.agravity.ts +473 -502
  9. package/api/collectionManagement.agravity.ts +731 -618
  10. package/api/collectionSharing.agravity.ts +359 -329
  11. package/api/collectionTypeItemBlueprintManagement.agravity.ts +373 -340
  12. package/api/collectionTypeManagement.agravity.ts +609 -533
  13. package/api/configurationManagement.agravity.ts +316 -311
  14. package/api/downloadFormatManagement.agravity.ts +440 -400
  15. package/api/downloadZip.agravity.ts +149 -151
  16. package/api/generalManagement.agravity.ts +328 -348
  17. package/api/helperTools.agravity.ts +619 -682
  18. package/api/historyEntryManagement.agravity.ts +149 -139
  19. package/api/iccProfileManagement.agravity.ts +123 -134
  20. package/api/listBlobs.agravity.ts +168 -185
  21. package/api/listQueues.agravity.ts +123 -134
  22. package/api/permissionsManagement.agravity.ts +276 -262
  23. package/api/publishing.agravity.ts +160 -148
  24. package/api/quickshareManagement.agravity.ts +378 -385
  25. package/api/savedSearchManagement.agravity.ts +293 -271
  26. package/api/searchManagement.agravity.ts +365 -345
  27. package/api/secureUpload.agravity.ts +375 -371
  28. package/api/signalRConnectionManagement.agravity.ts +200 -218
  29. package/api/staticDefinedListManagement.agravity.ts +457 -408
  30. package/api/stockImport.agravity.ts +242 -221
  31. package/api/structureImport.agravity.ts +126 -137
  32. package/api/translationManagement.agravity.ts +490 -404
  33. package/api/webAppData.agravity.ts +274 -300
  34. package/api/wordpressManagement.agravity.ts +326 -282
  35. package/api/workspaceManagement.agravity.ts +543 -513
  36. package/api.module.ts +61 -63
  37. package/configuration.ts +125 -130
  38. package/encoder.ts +20 -20
  39. package/index.ts +5 -5
  40. package/model/agravityErrorResponse.agravity.ts +17 -19
  41. package/model/agravityInfoResponse.agravity.ts +17 -19
  42. package/model/agravityUser.agravity.ts +35 -37
  43. package/model/agravityVersion.agravity.ts +22 -24
  44. package/model/allWebAppData.agravity.ts +22 -24
  45. package/model/apiKeyResponse.agravity.ts +16 -18
  46. package/model/appConfigTableEntity.agravity.ts +23 -25
  47. package/model/artificialIntelligenceGroup.agravity.ts +18 -20
  48. package/model/asset.agravity.ts +45 -47
  49. package/model/assetAvailability.agravity.ts +17 -19
  50. package/model/assetBlob.agravity.ts +79 -82
  51. package/model/assetBulkUpdate.agravity.ts +18 -20
  52. package/model/assetCollectionLink.agravity.ts +16 -18
  53. package/model/assetIconRule.agravity.ts +33 -35
  54. package/model/assetIdFormat.agravity.ts +17 -19
  55. package/model/assetPageResult.agravity.ts +21 -23
  56. package/model/assetsOperationBody.agravity.ts +18 -20
  57. package/model/azSearchOptions.agravity.ts +23 -25
  58. package/model/azureIdentity.agravity.ts +27 -30
  59. package/model/blobInfoObj.agravity.ts +21 -23
  60. package/model/collTypeItem.agravity.ts +36 -38
  61. package/model/collTypeItemBlueprint.agravity.ts +29 -31
  62. package/model/collection.agravity.ts +33 -35
  63. package/model/collectionType.agravity.ts +33 -35
  64. package/model/collectionUDL.agravity.ts +19 -21
  65. package/model/createSftpUserResult.agravity.ts +16 -18
  66. package/model/dataResult.agravity.ts +20 -22
  67. package/model/distZipResponse.agravity.ts +17 -19
  68. package/model/downloadFormat.agravity.ts +32 -34
  69. package/model/downloadObject.agravity.ts +30 -32
  70. package/model/downloadZipRequest.agravity.ts +23 -25
  71. package/model/dynamicImageOperation.agravity.ts +16 -18
  72. package/model/emailAddress.agravity.ts +16 -18
  73. package/model/entityId.agravity.ts +15 -17
  74. package/model/entityIdName.agravity.ts +17 -19
  75. package/model/entityTranslations.agravity.ts +16 -18
  76. package/model/frontendAppConfig.agravity.ts +19 -21
  77. package/model/groupAllAppData.agravity.ts +24 -26
  78. package/model/historyEntry.agravity.ts +40 -43
  79. package/model/infoEntitySkillEnhanced.agravity.ts +23 -25
  80. package/model/metadata.agravity.ts +17 -19
  81. package/model/models.ts +73 -73
  82. package/model/moveCollectionBody.agravity.ts +17 -19
  83. package/model/permissionChange.agravity.ts +26 -29
  84. package/model/permissionSetting.agravity.ts +25 -27
  85. package/model/publishEntity.agravity.ts +26 -28
  86. package/model/publishedAsset.agravity.ts +23 -25
  87. package/model/quickShare.agravity.ts +30 -32
  88. package/model/quickShareFull.agravity.ts +35 -37
  89. package/model/sasToken.agravity.ts +20 -22
  90. package/model/savedSearch.agravity.ts +29 -31
  91. package/model/searchAdminDataSourceStatus.agravity.ts +16 -18
  92. package/model/searchAdminIndexStatus.agravity.ts +18 -20
  93. package/model/searchAdminIndexerLastRun.agravity.ts +19 -21
  94. package/model/searchAdminIndexerStatus.agravity.ts +18 -20
  95. package/model/searchAdminSkillStatus.agravity.ts +16 -18
  96. package/model/searchAdminStatistics.agravity.ts +16 -18
  97. package/model/searchAdminStatus.agravity.ts +22 -24
  98. package/model/searchFacet.agravity.ts +17 -19
  99. package/model/searchFacetEntity.agravity.ts +17 -19
  100. package/model/searchResult.agravity.ts +21 -23
  101. package/model/searchableItem.agravity.ts +24 -26
  102. package/model/secureUploadEntity.agravity.ts +25 -27
  103. package/model/sharedAsset.agravity.ts +23 -25
  104. package/model/sharedCollection.agravity.ts +22 -24
  105. package/model/sharedCollectionFull.agravity.ts +27 -29
  106. package/model/signalRConnectionInfo.agravity.ts +16 -18
  107. package/model/simpleAsset.agravity.ts +24 -26
  108. package/model/staticDefinedList.agravity.ts +28 -30
  109. package/model/uiTutorials.agravity.ts +23 -26
  110. package/model/versionEntity.agravity.ts +26 -28
  111. package/model/versionedAsset.agravity.ts +18 -20
  112. package/model/whereParam.agravity.ts +40 -43
  113. package/model/workspace.agravity.ts +32 -34
  114. package/ng-package.json +6 -6
  115. package/package.json +45 -45
  116. package/tsconfig.json +20 -28
  117. package/variables.ts +9 -9
@@ -1,502 +1,473 @@
1
- /**
2
- * Agravity OpenAPI Documentation - Private Functions
3
- * <h1>Agravity API Reference</h1>This is the full API description of Agravity GmbH.<br/><h2>Resources</h2><ul> <li>Collection type management</li> <li>Collections management</li> <li>Assets management</li> <li>Assets operations</li> <li>Assets publishing</li> <li>Assets versioning</li> <li>Sharing collection</li> <li>Secure upload to collection</li> <li>Download ZIP</li> <li>Search</li> <li>General management</li> <li>Authentication management</li> <li>Blob management</li> <li>Queue management</li> <li>Structure management</li> <li>Bulk get all data from collection / collection type</li></ul><h2> Operations</h2>Agravity API performs the following operations:<ul> <li>Create / update / list / delete collection types</li> <li>Create / update / list / delete collections</li> <li>Create / update / list / delete assets</li> <li>Operations on assets like: move to collection, renew asset(through queue pipe), rotate, resize, etc.</li> <li>Publish / de-publish an asset or specific variants of an asset</li> <li>Create / delete version of asset</li> <li>Bulk download of Assets</li> <li>Search for assets or collections</li> <li>Authenticated access like e.g. getting access to blobs directly (for upload on folder or generate SAS token)</li> <li>List / delete blobs</li> <li>Create structures based on blob storage input</li></ul><br/>Copyright © Agravity GmbH 2023. All Rights Reserved
4
- *
5
- * The version of the OpenAPI document: 5.3.0
6
- * Contact: office@agravity.io
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
- /* tslint:disable:no-unused-variable member-ordering */
13
-
14
- import { Inject, Injectable, Optional } from '@angular/core';
15
- import { HttpClient, HttpHeaders, HttpParams,
16
- HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http';
17
- import { CustomHttpParameterCodec } from '../encoder';
18
- import { Observable } from 'rxjs';
19
-
20
- import { AgravityErrorResponse } from '../model/models';
21
- import { AgravityInfoResponse } from '../model/models';
22
- import { AgravityUser } from '../model/models';
23
- import { SasToken } from '../model/models';
24
-
25
- import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
26
- import { AgravityConfiguration } from '../configuration';
27
-
28
-
29
-
30
- @Injectable({
31
- providedIn: 'root'
32
- })
33
- export class AuthenticationManagementService {
34
-
35
- protected basePath = 'http://localhost:7071/api';
36
- public defaultHeaders = new HttpHeaders();
37
- public configuration = new AgravityConfiguration();
38
- public encoder: HttpParameterCodec;
39
-
40
- constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: AgravityConfiguration) {
41
- if (configuration) {
42
- this.configuration = configuration;
43
- }
44
- if (typeof this.configuration.basePath !== 'string') {
45
- if (typeof basePath !== 'string') {
46
- basePath = this.basePath;
47
- }
48
- this.configuration.basePath = basePath;
49
- }
50
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
51
- }
52
-
53
-
54
- private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
55
- if (typeof value === "object" && value instanceof Date === false) {
56
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
57
- } else {
58
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
59
- }
60
- return httpParams;
61
- }
62
-
63
- private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
64
- if (value == null) {
65
- return httpParams;
66
- }
67
-
68
- if (typeof value === "object") {
69
- if (Array.isArray(value)) {
70
- (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
71
- } else if (value instanceof Date) {
72
- if (key != null) {
73
- httpParams = httpParams.append(key,
74
- (value as Date).toISOString().substr(0, 10));
75
- } else {
76
- throw Error("key may not be null if value is Date");
77
- }
78
- } else {
79
- Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
80
- httpParams, value[k], key != null ? `${key}.${k}` : k));
81
- }
82
- } else if (key != null) {
83
- httpParams = httpParams.append(key, value);
84
- } else {
85
- throw Error("key may not be null if value is not object or array");
86
- }
87
- return httpParams;
88
- }
89
-
90
- /**
91
- * This endpoint returns the user from database of the HTTP request.
92
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
93
- * @param reportProgress flag to report request and response progress.
94
- */
95
- public httpAuthGetAgravityUser(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<AgravityUser>;
96
- public httpAuthGetAgravityUser(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<AgravityUser>>;
97
- public httpAuthGetAgravityUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<AgravityUser>>;
98
- public httpAuthGetAgravityUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
99
-
100
- let headers = this.defaultHeaders;
101
-
102
- let credential: string | undefined;
103
- // authentication (msal_auth) required
104
- credential = this.configuration.lookupCredential('msal_auth');
105
- if (credential) {
106
- headers = headers.set('Authorization', 'Bearer ' + credential);
107
- }
108
-
109
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
110
- if (httpHeaderAcceptSelected === undefined) {
111
- // to determine the Accept header
112
- const httpHeaderAccepts: string[] = [
113
- 'application/json'
114
- ];
115
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
116
- }
117
- if (httpHeaderAcceptSelected !== undefined) {
118
- headers = headers.set('Accept', httpHeaderAcceptSelected);
119
- }
120
-
121
-
122
- let responseType_: 'text' | 'json' = 'json';
123
- if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
124
- responseType_ = 'text';
125
- }
126
-
127
- return this.httpClient.get<AgravityUser>(`${this.configuration.basePath}/auth/user`,
128
- {
129
- responseType: <any>responseType_,
130
- withCredentials: this.configuration.withCredentials,
131
- headers: headers,
132
- observe: observe,
133
- reportProgress: reportProgress
134
- }
135
- );
136
- }
137
-
138
- /**
139
- * This endpoint returns the Agravity user from database.
140
- * @param id The ID of the requested Agravity user.
141
- * @param limit (Optional): If the reponse should be limited to name and email.
142
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
143
- * @param reportProgress flag to report request and response progress.
144
- */
145
- public httpAuthGetAgravityUserById(id: string, limit?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<AgravityUser>;
146
- public httpAuthGetAgravityUserById(id: string, limit?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<AgravityUser>>;
147
- public httpAuthGetAgravityUserById(id: string, limit?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<AgravityUser>>;
148
- public httpAuthGetAgravityUserById(id: string, limit?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
149
- if (id === null || id === undefined) {
150
- throw new Error('Required parameter id was null or undefined when calling httpAuthGetAgravityUserById.');
151
- }
152
-
153
- let queryParameters = new HttpParams({encoder: this.encoder});
154
- if (limit !== undefined && limit !== null) {
155
- queryParameters = this.addToHttpParams(queryParameters,
156
- <any>limit, 'limit');
157
- }
158
-
159
- let headers = this.defaultHeaders;
160
-
161
- let credential: string | undefined;
162
- // authentication (msal_auth) required
163
- credential = this.configuration.lookupCredential('msal_auth');
164
- if (credential) {
165
- headers = headers.set('Authorization', 'Bearer ' + credential);
166
- }
167
-
168
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
169
- if (httpHeaderAcceptSelected === undefined) {
170
- // to determine the Accept header
171
- const httpHeaderAccepts: string[] = [
172
- 'application/json'
173
- ];
174
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
175
- }
176
- if (httpHeaderAcceptSelected !== undefined) {
177
- headers = headers.set('Accept', httpHeaderAcceptSelected);
178
- }
179
-
180
-
181
- let responseType_: 'text' | 'json' = 'json';
182
- if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
183
- responseType_ = 'text';
184
- }
185
-
186
- return this.httpClient.get<AgravityUser>(`${this.configuration.basePath}/auth/users/${encodeURIComponent(String(id))}`,
187
- {
188
- params: queryParameters,
189
- responseType: <any>responseType_,
190
- withCredentials: this.configuration.withCredentials,
191
- headers: headers,
192
- observe: observe,
193
- reportProgress: reportProgress
194
- }
195
- );
196
- }
197
-
198
- /**
199
- * This endpoint returns all the Agravity users from database.
200
- * @param limit (Optional): If the reponse should be limited to name and email.
201
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
202
- * @param reportProgress flag to report request and response progress.
203
- */
204
- public httpAuthGetAgravityUsers(limit?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Array<AgravityUser>>;
205
- public httpAuthGetAgravityUsers(limit?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Array<AgravityUser>>>;
206
- public httpAuthGetAgravityUsers(limit?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Array<AgravityUser>>>;
207
- public httpAuthGetAgravityUsers(limit?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
208
-
209
- let queryParameters = new HttpParams({encoder: this.encoder});
210
- if (limit !== undefined && limit !== null) {
211
- queryParameters = this.addToHttpParams(queryParameters,
212
- <any>limit, 'limit');
213
- }
214
-
215
- let headers = this.defaultHeaders;
216
-
217
- let credential: string | undefined;
218
- // authentication (msal_auth) required
219
- credential = this.configuration.lookupCredential('msal_auth');
220
- if (credential) {
221
- headers = headers.set('Authorization', 'Bearer ' + credential);
222
- }
223
-
224
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
225
- if (httpHeaderAcceptSelected === undefined) {
226
- // to determine the Accept header
227
- const httpHeaderAccepts: string[] = [
228
- 'application/json'
229
- ];
230
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
231
- }
232
- if (httpHeaderAcceptSelected !== undefined) {
233
- headers = headers.set('Accept', httpHeaderAcceptSelected);
234
- }
235
-
236
-
237
- let responseType_: 'text' | 'json' = 'json';
238
- if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
239
- responseType_ = 'text';
240
- }
241
-
242
- return this.httpClient.get<Array<AgravityUser>>(`${this.configuration.basePath}/auth/users`,
243
- {
244
- params: queryParameters,
245
- responseType: <any>responseType_,
246
- withCredentials: this.configuration.withCredentials,
247
- headers: headers,
248
- observe: observe,
249
- reportProgress: reportProgress
250
- }
251
- );
252
- }
253
-
254
- /**
255
- * This endpoint gets the ID of the application client.
256
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
257
- * @param reportProgress flag to report request and response progress.
258
- */
259
- public httpAuthGetAppClientId(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<AgravityInfoResponse>;
260
- public httpAuthGetAppClientId(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<AgravityInfoResponse>>;
261
- public httpAuthGetAppClientId(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<AgravityInfoResponse>>;
262
- public httpAuthGetAppClientId(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
263
-
264
- let headers = this.defaultHeaders;
265
-
266
- let credential: string | undefined;
267
- // authentication (msal_auth) required
268
- credential = this.configuration.lookupCredential('msal_auth');
269
- if (credential) {
270
- headers = headers.set('Authorization', 'Bearer ' + credential);
271
- }
272
-
273
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
274
- if (httpHeaderAcceptSelected === undefined) {
275
- // to determine the Accept header
276
- const httpHeaderAccepts: string[] = [
277
- 'application/json'
278
- ];
279
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
280
- }
281
- if (httpHeaderAcceptSelected !== undefined) {
282
- headers = headers.set('Accept', httpHeaderAcceptSelected);
283
- }
284
-
285
-
286
- let responseType_: 'text' | 'json' = 'json';
287
- if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
288
- responseType_ = 'text';
289
- }
290
-
291
- return this.httpClient.get<AgravityInfoResponse>(`${this.configuration.basePath}/auth/clientid`,
292
- {
293
- responseType: <any>responseType_,
294
- withCredentials: this.configuration.withCredentials,
295
- headers: headers,
296
- observe: observe,
297
- reportProgress: reportProgress
298
- }
299
- );
300
- }
301
-
302
- /**
303
- * This endpoint creates and returns a SAS token for a single blob inside the optimized OR thumbnails container.
304
- * @param blobName The name of the blob (aka the ID of the asset)
305
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
306
- * @param reportProgress flag to report request and response progress.
307
- */
308
- public httpAuthGetBlobReadSasToken(blobName: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<SasToken>;
309
- public httpAuthGetBlobReadSasToken(blobName: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<SasToken>>;
310
- public httpAuthGetBlobReadSasToken(blobName: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<SasToken>>;
311
- public httpAuthGetBlobReadSasToken(blobName: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
312
- if (blobName === null || blobName === undefined) {
313
- throw new Error('Required parameter blobName was null or undefined when calling httpAuthGetBlobReadSasToken.');
314
- }
315
-
316
- let headers = this.defaultHeaders;
317
-
318
- let credential: string | undefined;
319
- // authentication (msal_auth) required
320
- credential = this.configuration.lookupCredential('msal_auth');
321
- if (credential) {
322
- headers = headers.set('Authorization', 'Bearer ' + credential);
323
- }
324
-
325
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
326
- if (httpHeaderAcceptSelected === undefined) {
327
- // to determine the Accept header
328
- const httpHeaderAccepts: string[] = [
329
- 'application/json'
330
- ];
331
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
332
- }
333
- if (httpHeaderAcceptSelected !== undefined) {
334
- headers = headers.set('Accept', httpHeaderAcceptSelected);
335
- }
336
-
337
-
338
- let responseType_: 'text' | 'json' = 'json';
339
- if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
340
- responseType_ = 'text';
341
- }
342
-
343
- return this.httpClient.get<SasToken>(`${this.configuration.basePath}/auth/blob/${encodeURIComponent(String(blobName))}`,
344
- {
345
- responseType: <any>responseType_,
346
- withCredentials: this.configuration.withCredentials,
347
- headers: headers,
348
- observe: observe,
349
- reportProgress: reportProgress
350
- }
351
- );
352
- }
353
-
354
- /**
355
- * This endpoint creates and returns a SAS token for a single container with read only access
356
- * @param containerName The name of the requested storage container.
357
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
358
- * @param reportProgress flag to report request and response progress.
359
- */
360
- public httpAuthGetContainerReadSasToken(containerName: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<SasToken>;
361
- public httpAuthGetContainerReadSasToken(containerName: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<SasToken>>;
362
- public httpAuthGetContainerReadSasToken(containerName: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<SasToken>>;
363
- public httpAuthGetContainerReadSasToken(containerName: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
364
- if (containerName === null || containerName === undefined) {
365
- throw new Error('Required parameter containerName was null or undefined when calling httpAuthGetContainerReadSasToken.');
366
- }
367
-
368
- let headers = this.defaultHeaders;
369
-
370
- let credential: string | undefined;
371
- // authentication (msal_auth) required
372
- credential = this.configuration.lookupCredential('msal_auth');
373
- if (credential) {
374
- headers = headers.set('Authorization', 'Bearer ' + credential);
375
- }
376
-
377
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
378
- if (httpHeaderAcceptSelected === undefined) {
379
- // to determine the Accept header
380
- const httpHeaderAccepts: string[] = [
381
- 'application/json'
382
- ];
383
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
384
- }
385
- if (httpHeaderAcceptSelected !== undefined) {
386
- headers = headers.set('Accept', httpHeaderAcceptSelected);
387
- }
388
-
389
-
390
- let responseType_: 'text' | 'json' = 'json';
391
- if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
392
- responseType_ = 'text';
393
- }
394
-
395
- return this.httpClient.get<SasToken>(`${this.configuration.basePath}/auth/container/${encodeURIComponent(String(containerName))}`,
396
- {
397
- responseType: <any>responseType_,
398
- withCredentials: this.configuration.withCredentials,
399
- headers: headers,
400
- observe: observe,
401
- reportProgress: reportProgress
402
- }
403
- );
404
- }
405
-
406
- /**
407
- * This endpoint creates and returns a SAS-Token with write access for the inbox container
408
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
409
- * @param reportProgress flag to report request and response progress.
410
- */
411
- public httpAuthGetInboxContainerWriteSasToken(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<SasToken>;
412
- public httpAuthGetInboxContainerWriteSasToken(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<SasToken>>;
413
- public httpAuthGetInboxContainerWriteSasToken(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<SasToken>>;
414
- public httpAuthGetInboxContainerWriteSasToken(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
415
-
416
- let headers = this.defaultHeaders;
417
-
418
- let credential: string | undefined;
419
- // authentication (msal_auth) required
420
- credential = this.configuration.lookupCredential('msal_auth');
421
- if (credential) {
422
- headers = headers.set('Authorization', 'Bearer ' + credential);
423
- }
424
-
425
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
426
- if (httpHeaderAcceptSelected === undefined) {
427
- // to determine the Accept header
428
- const httpHeaderAccepts: string[] = [
429
- 'application/json'
430
- ];
431
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
432
- }
433
- if (httpHeaderAcceptSelected !== undefined) {
434
- headers = headers.set('Accept', httpHeaderAcceptSelected);
435
- }
436
-
437
-
438
- let responseType_: 'text' | 'json' = 'json';
439
- if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
440
- responseType_ = 'text';
441
- }
442
-
443
- return this.httpClient.get<SasToken>(`${this.configuration.basePath}/auth/inbox`,
444
- {
445
- responseType: <any>responseType_,
446
- withCredentials: this.configuration.withCredentials,
447
- headers: headers,
448
- observe: observe,
449
- reportProgress: reportProgress
450
- }
451
- );
452
- }
453
-
454
- /**
455
- * This endpoint gets the ID of the user.
456
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
457
- * @param reportProgress flag to report request and response progress.
458
- */
459
- public httpAuthGetUserId(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<AgravityInfoResponse>;
460
- public httpAuthGetUserId(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<AgravityInfoResponse>>;
461
- public httpAuthGetUserId(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<AgravityInfoResponse>>;
462
- public httpAuthGetUserId(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
463
-
464
- let headers = this.defaultHeaders;
465
-
466
- let credential: string | undefined;
467
- // authentication (msal_auth) required
468
- credential = this.configuration.lookupCredential('msal_auth');
469
- if (credential) {
470
- headers = headers.set('Authorization', 'Bearer ' + credential);
471
- }
472
-
473
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
474
- if (httpHeaderAcceptSelected === undefined) {
475
- // to determine the Accept header
476
- const httpHeaderAccepts: string[] = [
477
- 'application/json'
478
- ];
479
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
480
- }
481
- if (httpHeaderAcceptSelected !== undefined) {
482
- headers = headers.set('Accept', httpHeaderAcceptSelected);
483
- }
484
-
485
-
486
- let responseType_: 'text' | 'json' = 'json';
487
- if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
488
- responseType_ = 'text';
489
- }
490
-
491
- return this.httpClient.get<AgravityInfoResponse>(`${this.configuration.basePath}/auth/userid`,
492
- {
493
- responseType: <any>responseType_,
494
- withCredentials: this.configuration.withCredentials,
495
- headers: headers,
496
- observe: observe,
497
- reportProgress: reportProgress
498
- }
499
- );
500
- }
501
-
502
- }
1
+ /**
2
+ * Agravity OpenAPI Documentation - Private Functions
3
+ * <h1>Agravity API Reference</h1>This is the full API description of Agravity GmbH.<br/><h2>Resources</h2><ul> <li>Collection type management</li> <li>Collections management</li> <li>Assets management</li> <li>Assets operations</li> <li>Assets publishing</li> <li>Assets versioning</li> <li>Sharing collection</li> <li>Secure upload to collection</li> <li>Download ZIP</li> <li>Search</li> <li>General management</li> <li>Authentication management</li> <li>Blob management</li> <li>Queue management</li> <li>Structure management</li> <li>Bulk get all data from collection / collection type</li></ul><h2> Operations</h2>Agravity API performs the following operations:<ul> <li>Create / update / list / delete collection types</li> <li>Create / update / list / delete collections</li> <li>Create / update / list / delete assets</li> <li>Operations on assets like: move to collection, renew asset(through queue pipe), rotate, resize, etc.</li> <li>Publish / de-publish an asset or specific variants of an asset</li> <li>Create / delete version of asset</li> <li>Bulk download of Assets</li> <li>Search for assets or collections</li> <li>Authenticated access like e.g. getting access to blobs directly (for upload on folder or generate SAS token)</li> <li>List / delete blobs</li> <li>Create structures based on blob storage input</li></ul><br/>Copyright © Agravity GmbH 2023. All Rights Reserved
4
+ *
5
+ * The version of the OpenAPI document: 5.3.2
6
+ * Contact: office@agravity.io
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
+ /* tslint:disable:no-unused-variable member-ordering */
13
+
14
+ import { Inject, Injectable, Optional } from '@angular/core';
15
+ import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http';
16
+ import { CustomHttpParameterCodec } from '../encoder';
17
+ import { Observable } from 'rxjs';
18
+
19
+ import { AgravityErrorResponse } from '../model/models';
20
+ import { AgravityInfoResponse } from '../model/models';
21
+ import { AgravityUser } from '../model/models';
22
+ import { SasToken } from '../model/models';
23
+
24
+ import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
25
+ import { AgravityConfiguration } from '../configuration';
26
+
27
+ @Injectable({
28
+ providedIn: 'root'
29
+ })
30
+ export class AuthenticationManagementService {
31
+ protected basePath = 'http://localhost:7071/api';
32
+ public defaultHeaders = new HttpHeaders();
33
+ public configuration = new AgravityConfiguration();
34
+ public encoder: HttpParameterCodec;
35
+
36
+ constructor(
37
+ protected httpClient: HttpClient,
38
+ @Optional() @Inject(BASE_PATH) basePath: string,
39
+ @Optional() configuration: AgravityConfiguration
40
+ ) {
41
+ if (configuration) {
42
+ this.configuration = configuration;
43
+ }
44
+ if (typeof this.configuration.basePath !== 'string') {
45
+ if (typeof basePath !== 'string') {
46
+ basePath = this.basePath;
47
+ }
48
+ this.configuration.basePath = basePath;
49
+ }
50
+ this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
51
+ }
52
+
53
+ private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
54
+ if (typeof value === 'object' && value instanceof Date === false) {
55
+ httpParams = this.addToHttpParamsRecursive(httpParams, value);
56
+ } else {
57
+ httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
58
+ }
59
+ return httpParams;
60
+ }
61
+
62
+ private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
63
+ if (value == null) {
64
+ return httpParams;
65
+ }
66
+
67
+ if (typeof value === 'object') {
68
+ if (Array.isArray(value)) {
69
+ (value as any[]).forEach((elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)));
70
+ } else if (value instanceof Date) {
71
+ if (key != null) {
72
+ httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));
73
+ } else {
74
+ throw Error('key may not be null if value is Date');
75
+ }
76
+ } else {
77
+ Object.keys(value).forEach((k) => (httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)));
78
+ }
79
+ } else if (key != null) {
80
+ httpParams = httpParams.append(key, value);
81
+ } else {
82
+ throw Error('key may not be null if value is not object or array');
83
+ }
84
+ return httpParams;
85
+ }
86
+
87
+ /**
88
+ * This endpoint returns the user from database of the HTTP request.
89
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
90
+ * @param reportProgress flag to report request and response progress.
91
+ */
92
+ public httpAuthGetAgravityUser(observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<AgravityUser>;
93
+ public httpAuthGetAgravityUser(observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpResponse<AgravityUser>>;
94
+ public httpAuthGetAgravityUser(observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpEvent<AgravityUser>>;
95
+ public httpAuthGetAgravityUser(observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json' }): Observable<any> {
96
+ let headers = this.defaultHeaders;
97
+
98
+ let credential: string | undefined;
99
+ // authentication (msal_auth) required
100
+ credential = this.configuration.lookupCredential('msal_auth');
101
+ if (credential) {
102
+ headers = headers.set('Authorization', 'Bearer ' + credential);
103
+ }
104
+
105
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
106
+ if (httpHeaderAcceptSelected === undefined) {
107
+ // to determine the Accept header
108
+ const httpHeaderAccepts: string[] = ['application/json'];
109
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
110
+ }
111
+ if (httpHeaderAcceptSelected !== undefined) {
112
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
113
+ }
114
+
115
+ let responseType_: 'text' | 'json' = 'json';
116
+ if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
117
+ responseType_ = 'text';
118
+ }
119
+
120
+ return this.httpClient.get<AgravityUser>(`${this.configuration.basePath}/auth/user`, {
121
+ responseType: <any>responseType_,
122
+ withCredentials: this.configuration.withCredentials,
123
+ headers: headers,
124
+ observe: observe,
125
+ reportProgress: reportProgress
126
+ });
127
+ }
128
+
129
+ /**
130
+ * This endpoint returns the Agravity user from database.
131
+ * @param id The ID of the requested Agravity user.
132
+ * @param limit (Optional): If the reponse should be limited to name and email.
133
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
134
+ * @param reportProgress flag to report request and response progress.
135
+ */
136
+ public httpAuthGetAgravityUserById(id: string, limit?: boolean, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<AgravityUser>;
137
+ public httpAuthGetAgravityUserById(
138
+ id: string,
139
+ limit?: boolean,
140
+ observe?: 'response',
141
+ reportProgress?: boolean,
142
+ options?: { httpHeaderAccept?: 'application/json' }
143
+ ): Observable<HttpResponse<AgravityUser>>;
144
+ public httpAuthGetAgravityUserById(
145
+ id: string,
146
+ limit?: boolean,
147
+ observe?: 'events',
148
+ reportProgress?: boolean,
149
+ options?: { httpHeaderAccept?: 'application/json' }
150
+ ): Observable<HttpEvent<AgravityUser>>;
151
+ public httpAuthGetAgravityUserById(id: string, limit?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json' }): Observable<any> {
152
+ if (id === null || id === undefined) {
153
+ throw new Error('Required parameter id was null or undefined when calling httpAuthGetAgravityUserById.');
154
+ }
155
+
156
+ let queryParameters = new HttpParams({ encoder: this.encoder });
157
+ if (limit !== undefined && limit !== null) {
158
+ queryParameters = this.addToHttpParams(queryParameters, <any>limit, 'limit');
159
+ }
160
+
161
+ let headers = this.defaultHeaders;
162
+
163
+ let credential: string | undefined;
164
+ // authentication (msal_auth) required
165
+ credential = this.configuration.lookupCredential('msal_auth');
166
+ if (credential) {
167
+ headers = headers.set('Authorization', 'Bearer ' + credential);
168
+ }
169
+
170
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
171
+ if (httpHeaderAcceptSelected === undefined) {
172
+ // to determine the Accept header
173
+ const httpHeaderAccepts: string[] = ['application/json'];
174
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
175
+ }
176
+ if (httpHeaderAcceptSelected !== undefined) {
177
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
178
+ }
179
+
180
+ let responseType_: 'text' | 'json' = 'json';
181
+ if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
182
+ responseType_ = 'text';
183
+ }
184
+
185
+ return this.httpClient.get<AgravityUser>(`${this.configuration.basePath}/auth/users/${encodeURIComponent(String(id))}`, {
186
+ params: queryParameters,
187
+ responseType: <any>responseType_,
188
+ withCredentials: this.configuration.withCredentials,
189
+ headers: headers,
190
+ observe: observe,
191
+ reportProgress: reportProgress
192
+ });
193
+ }
194
+
195
+ /**
196
+ * This endpoint returns all the Agravity users from database.
197
+ * @param limit (Optional): If the reponse should be limited to name and email.
198
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
199
+ * @param reportProgress flag to report request and response progress.
200
+ */
201
+ public httpAuthGetAgravityUsers(limit?: boolean, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<Array<AgravityUser>>;
202
+ public httpAuthGetAgravityUsers(
203
+ limit?: boolean,
204
+ observe?: 'response',
205
+ reportProgress?: boolean,
206
+ options?: { httpHeaderAccept?: 'application/json' }
207
+ ): Observable<HttpResponse<Array<AgravityUser>>>;
208
+ public httpAuthGetAgravityUsers(limit?: boolean, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpEvent<Array<AgravityUser>>>;
209
+ public httpAuthGetAgravityUsers(limit?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json' }): Observable<any> {
210
+ let queryParameters = new HttpParams({ encoder: this.encoder });
211
+ if (limit !== undefined && limit !== null) {
212
+ queryParameters = this.addToHttpParams(queryParameters, <any>limit, 'limit');
213
+ }
214
+
215
+ let headers = this.defaultHeaders;
216
+
217
+ let credential: string | undefined;
218
+ // authentication (msal_auth) required
219
+ credential = this.configuration.lookupCredential('msal_auth');
220
+ if (credential) {
221
+ headers = headers.set('Authorization', 'Bearer ' + credential);
222
+ }
223
+
224
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
225
+ if (httpHeaderAcceptSelected === undefined) {
226
+ // to determine the Accept header
227
+ const httpHeaderAccepts: string[] = ['application/json'];
228
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
229
+ }
230
+ if (httpHeaderAcceptSelected !== undefined) {
231
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
232
+ }
233
+
234
+ let responseType_: 'text' | 'json' = 'json';
235
+ if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
236
+ responseType_ = 'text';
237
+ }
238
+
239
+ return this.httpClient.get<Array<AgravityUser>>(`${this.configuration.basePath}/auth/users`, {
240
+ params: queryParameters,
241
+ responseType: <any>responseType_,
242
+ withCredentials: this.configuration.withCredentials,
243
+ headers: headers,
244
+ observe: observe,
245
+ reportProgress: reportProgress
246
+ });
247
+ }
248
+
249
+ /**
250
+ * This endpoint gets the ID of the application client.
251
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
252
+ * @param reportProgress flag to report request and response progress.
253
+ */
254
+ public httpAuthGetAppClientId(observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<AgravityInfoResponse>;
255
+ public httpAuthGetAppClientId(observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpResponse<AgravityInfoResponse>>;
256
+ public httpAuthGetAppClientId(observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpEvent<AgravityInfoResponse>>;
257
+ public httpAuthGetAppClientId(observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json' }): Observable<any> {
258
+ let headers = this.defaultHeaders;
259
+
260
+ let credential: string | undefined;
261
+ // authentication (msal_auth) required
262
+ credential = this.configuration.lookupCredential('msal_auth');
263
+ if (credential) {
264
+ headers = headers.set('Authorization', 'Bearer ' + credential);
265
+ }
266
+
267
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
268
+ if (httpHeaderAcceptSelected === undefined) {
269
+ // to determine the Accept header
270
+ const httpHeaderAccepts: string[] = ['application/json'];
271
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
272
+ }
273
+ if (httpHeaderAcceptSelected !== undefined) {
274
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
275
+ }
276
+
277
+ let responseType_: 'text' | 'json' = 'json';
278
+ if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
279
+ responseType_ = 'text';
280
+ }
281
+
282
+ return this.httpClient.get<AgravityInfoResponse>(`${this.configuration.basePath}/auth/clientid`, {
283
+ responseType: <any>responseType_,
284
+ withCredentials: this.configuration.withCredentials,
285
+ headers: headers,
286
+ observe: observe,
287
+ reportProgress: reportProgress
288
+ });
289
+ }
290
+
291
+ /**
292
+ * This endpoint creates and returns a SAS token for a single blob inside the optimized OR thumbnails container.
293
+ * @param blobName The name of the blob (aka the ID of the asset)
294
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
295
+ * @param reportProgress flag to report request and response progress.
296
+ */
297
+ public httpAuthGetBlobReadSasToken(blobName: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<SasToken>;
298
+ public httpAuthGetBlobReadSasToken(blobName: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpResponse<SasToken>>;
299
+ public httpAuthGetBlobReadSasToken(blobName: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpEvent<SasToken>>;
300
+ public httpAuthGetBlobReadSasToken(blobName: string, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json' }): Observable<any> {
301
+ if (blobName === null || blobName === undefined) {
302
+ throw new Error('Required parameter blobName was null or undefined when calling httpAuthGetBlobReadSasToken.');
303
+ }
304
+
305
+ let headers = this.defaultHeaders;
306
+
307
+ let credential: string | undefined;
308
+ // authentication (msal_auth) required
309
+ credential = this.configuration.lookupCredential('msal_auth');
310
+ if (credential) {
311
+ headers = headers.set('Authorization', 'Bearer ' + credential);
312
+ }
313
+
314
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
315
+ if (httpHeaderAcceptSelected === undefined) {
316
+ // to determine the Accept header
317
+ const httpHeaderAccepts: string[] = ['application/json'];
318
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
319
+ }
320
+ if (httpHeaderAcceptSelected !== undefined) {
321
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
322
+ }
323
+
324
+ let responseType_: 'text' | 'json' = 'json';
325
+ if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
326
+ responseType_ = 'text';
327
+ }
328
+
329
+ return this.httpClient.get<SasToken>(`${this.configuration.basePath}/auth/blob/${encodeURIComponent(String(blobName))}`, {
330
+ responseType: <any>responseType_,
331
+ withCredentials: this.configuration.withCredentials,
332
+ headers: headers,
333
+ observe: observe,
334
+ reportProgress: reportProgress
335
+ });
336
+ }
337
+
338
+ /**
339
+ * This endpoint creates and returns a SAS token for a single container with read only access
340
+ * @param containerName The name of the requested storage container.
341
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
342
+ * @param reportProgress flag to report request and response progress.
343
+ */
344
+ public httpAuthGetContainerReadSasToken(containerName: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<SasToken>;
345
+ public httpAuthGetContainerReadSasToken(
346
+ containerName: string,
347
+ observe?: 'response',
348
+ reportProgress?: boolean,
349
+ options?: { httpHeaderAccept?: 'application/json' }
350
+ ): Observable<HttpResponse<SasToken>>;
351
+ public httpAuthGetContainerReadSasToken(containerName: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpEvent<SasToken>>;
352
+ public httpAuthGetContainerReadSasToken(containerName: string, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json' }): Observable<any> {
353
+ if (containerName === null || containerName === undefined) {
354
+ throw new Error('Required parameter containerName was null or undefined when calling httpAuthGetContainerReadSasToken.');
355
+ }
356
+
357
+ let headers = this.defaultHeaders;
358
+
359
+ let credential: string | undefined;
360
+ // authentication (msal_auth) required
361
+ credential = this.configuration.lookupCredential('msal_auth');
362
+ if (credential) {
363
+ headers = headers.set('Authorization', 'Bearer ' + credential);
364
+ }
365
+
366
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
367
+ if (httpHeaderAcceptSelected === undefined) {
368
+ // to determine the Accept header
369
+ const httpHeaderAccepts: string[] = ['application/json'];
370
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
371
+ }
372
+ if (httpHeaderAcceptSelected !== undefined) {
373
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
374
+ }
375
+
376
+ let responseType_: 'text' | 'json' = 'json';
377
+ if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
378
+ responseType_ = 'text';
379
+ }
380
+
381
+ return this.httpClient.get<SasToken>(`${this.configuration.basePath}/auth/container/${encodeURIComponent(String(containerName))}`, {
382
+ responseType: <any>responseType_,
383
+ withCredentials: this.configuration.withCredentials,
384
+ headers: headers,
385
+ observe: observe,
386
+ reportProgress: reportProgress
387
+ });
388
+ }
389
+
390
+ /**
391
+ * This endpoint creates and returns a SAS-Token with write access for the inbox container
392
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
393
+ * @param reportProgress flag to report request and response progress.
394
+ */
395
+ public httpAuthGetInboxContainerWriteSasToken(observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<SasToken>;
396
+ public httpAuthGetInboxContainerWriteSasToken(observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpResponse<SasToken>>;
397
+ public httpAuthGetInboxContainerWriteSasToken(observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpEvent<SasToken>>;
398
+ public httpAuthGetInboxContainerWriteSasToken(observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json' }): Observable<any> {
399
+ let headers = this.defaultHeaders;
400
+
401
+ let credential: string | undefined;
402
+ // authentication (msal_auth) required
403
+ credential = this.configuration.lookupCredential('msal_auth');
404
+ if (credential) {
405
+ headers = headers.set('Authorization', 'Bearer ' + credential);
406
+ }
407
+
408
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
409
+ if (httpHeaderAcceptSelected === undefined) {
410
+ // to determine the Accept header
411
+ const httpHeaderAccepts: string[] = ['application/json'];
412
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
413
+ }
414
+ if (httpHeaderAcceptSelected !== undefined) {
415
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
416
+ }
417
+
418
+ let responseType_: 'text' | 'json' = 'json';
419
+ if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
420
+ responseType_ = 'text';
421
+ }
422
+
423
+ return this.httpClient.get<SasToken>(`${this.configuration.basePath}/auth/inbox`, {
424
+ responseType: <any>responseType_,
425
+ withCredentials: this.configuration.withCredentials,
426
+ headers: headers,
427
+ observe: observe,
428
+ reportProgress: reportProgress
429
+ });
430
+ }
431
+
432
+ /**
433
+ * This endpoint gets the ID of the user.
434
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
435
+ * @param reportProgress flag to report request and response progress.
436
+ */
437
+ public httpAuthGetUserId(observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<AgravityInfoResponse>;
438
+ public httpAuthGetUserId(observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpResponse<AgravityInfoResponse>>;
439
+ public httpAuthGetUserId(observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpEvent<AgravityInfoResponse>>;
440
+ public httpAuthGetUserId(observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json' }): Observable<any> {
441
+ let headers = this.defaultHeaders;
442
+
443
+ let credential: string | undefined;
444
+ // authentication (msal_auth) required
445
+ credential = this.configuration.lookupCredential('msal_auth');
446
+ if (credential) {
447
+ headers = headers.set('Authorization', 'Bearer ' + credential);
448
+ }
449
+
450
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
451
+ if (httpHeaderAcceptSelected === undefined) {
452
+ // to determine the Accept header
453
+ const httpHeaderAccepts: string[] = ['application/json'];
454
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
455
+ }
456
+ if (httpHeaderAcceptSelected !== undefined) {
457
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
458
+ }
459
+
460
+ let responseType_: 'text' | 'json' = 'json';
461
+ if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
462
+ responseType_ = 'text';
463
+ }
464
+
465
+ return this.httpClient.get<AgravityInfoResponse>(`${this.configuration.basePath}/auth/userid`, {
466
+ responseType: <any>responseType_,
467
+ withCredentials: this.configuration.withCredentials,
468
+ headers: headers,
469
+ observe: observe,
470
+ reportProgress: reportProgress
471
+ });
472
+ }
473
+ }