@agravity/private 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/.openapi-generator/FILES +117 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +203 -0
  5. package/api/api.ts +67 -0
  6. package/api/assetIconRuleManagement.agravity.ts +400 -0
  7. package/api/assetManagement.agravity.ts +737 -0
  8. package/api/assetOperations.agravity.ts +1309 -0
  9. package/api/assetPublishing.agravity.ts +511 -0
  10. package/api/assetVersioning.agravity.ts +657 -0
  11. package/api/authenticationManagement.agravity.ts +502 -0
  12. package/api/collectionManagement.agravity.ts +618 -0
  13. package/api/collectionSharing.agravity.ts +329 -0
  14. package/api/collectionTypeItemBlueprintManagement.agravity.ts +340 -0
  15. package/api/collectionTypeManagement.agravity.ts +533 -0
  16. package/api/configurationManagement.agravity.ts +311 -0
  17. package/api/downloadFormatManagement.agravity.ts +400 -0
  18. package/api/downloadZip.agravity.ts +151 -0
  19. package/api/generalManagement.agravity.ts +348 -0
  20. package/api/helperTools.agravity.ts +640 -0
  21. package/api/iccProfileManagement.agravity.ts +134 -0
  22. package/api/listBlobs.agravity.ts +185 -0
  23. package/api/listQueues.agravity.ts +134 -0
  24. package/api/permissionsManagement.agravity.ts +262 -0
  25. package/api/publishing.agravity.ts +148 -0
  26. package/api/quickshareManagement.agravity.ts +385 -0
  27. package/api/savedSearchManagement.agravity.ts +271 -0
  28. package/api/searchManagement.agravity.ts +345 -0
  29. package/api/secureUpload.agravity.ts +371 -0
  30. package/api/signalRConnectionManagement.agravity.ts +218 -0
  31. package/api/staticDefinedListManagement.agravity.ts +408 -0
  32. package/api/stockImport.agravity.ts +221 -0
  33. package/api/structureImport.agravity.ts +137 -0
  34. package/api/translationManagement.agravity.ts +404 -0
  35. package/api/upgradeManagement.agravity.ts +333 -0
  36. package/api/webAppData.agravity.ts +300 -0
  37. package/api/wordpressManagement.agravity.ts +282 -0
  38. package/api/workspaceManagement.agravity.ts +513 -0
  39. package/api.module.ts +63 -0
  40. package/configuration.ts +130 -0
  41. package/encoder.ts +20 -0
  42. package/git_push.sh +58 -0
  43. package/index.ts +5 -0
  44. package/model/agravityErrorResponse.agravity.ts +19 -0
  45. package/model/agravityInfoResponse.agravity.ts +19 -0
  46. package/model/agravityUser.agravity.ts +37 -0
  47. package/model/agravityVersion.agravity.ts +24 -0
  48. package/model/allWebAppData.agravity.ts +24 -0
  49. package/model/apiKeyResponse.agravity.ts +18 -0
  50. package/model/appConfigTableEntity.agravity.ts +25 -0
  51. package/model/artificialIntelligenceGroup.agravity.ts +20 -0
  52. package/model/asset.agravity.ts +47 -0
  53. package/model/assetAvailability.agravity.ts +19 -0
  54. package/model/assetBlob.agravity.ts +82 -0
  55. package/model/assetBulkUpdate.agravity.ts +20 -0
  56. package/model/assetCollectionLink.agravity.ts +18 -0
  57. package/model/assetIconRule.agravity.ts +35 -0
  58. package/model/assetIdContainer.agravity.ts +18 -0
  59. package/model/assetPageResult.agravity.ts +23 -0
  60. package/model/assetsOperationBody.agravity.ts +20 -0
  61. package/model/azSearchOptions.agravity.ts +25 -0
  62. package/model/azureIdentity.agravity.ts +30 -0
  63. package/model/blobInfoObj.agravity.ts +23 -0
  64. package/model/collTypeItem.agravity.ts +38 -0
  65. package/model/collTypeItemBlueprint.agravity.ts +31 -0
  66. package/model/collection.agravity.ts +35 -0
  67. package/model/collectionType.agravity.ts +35 -0
  68. package/model/collectionUDL.agravity.ts +21 -0
  69. package/model/createSftpUserResult.agravity.ts +18 -0
  70. package/model/dataResult.agravity.ts +22 -0
  71. package/model/distZipResponse.agravity.ts +19 -0
  72. package/model/downloadFormat.agravity.ts +34 -0
  73. package/model/downloadObject.agravity.ts +32 -0
  74. package/model/downloadZipRequest.agravity.ts +25 -0
  75. package/model/dynamicImageOperation.agravity.ts +18 -0
  76. package/model/emailAddress.agravity.ts +18 -0
  77. package/model/entityId.agravity.ts +17 -0
  78. package/model/entityIdName.agravity.ts +19 -0
  79. package/model/entityTranslations.agravity.ts +18 -0
  80. package/model/frontendAppConfig.agravity.ts +21 -0
  81. package/model/groupAllAppData.agravity.ts +26 -0
  82. package/model/infoEntitySkillEnhanced.agravity.ts +25 -0
  83. package/model/metadata.agravity.ts +19 -0
  84. package/model/models.ts +73 -0
  85. package/model/moveCollectionBody.agravity.ts +19 -0
  86. package/model/permissionChange.agravity.ts +29 -0
  87. package/model/permissionSetting.agravity.ts +27 -0
  88. package/model/publishEntity.agravity.ts +28 -0
  89. package/model/publishedAsset.agravity.ts +25 -0
  90. package/model/quickShare.agravity.ts +31 -0
  91. package/model/quickShareFull.agravity.ts +36 -0
  92. package/model/sasToken.agravity.ts +22 -0
  93. package/model/savedSearch.agravity.ts +31 -0
  94. package/model/searchAdminDataSourceStatus.agravity.ts +18 -0
  95. package/model/searchAdminIndexStatus.agravity.ts +20 -0
  96. package/model/searchAdminIndexerLastRun.agravity.ts +21 -0
  97. package/model/searchAdminIndexerStatus.agravity.ts +20 -0
  98. package/model/searchAdminSkillStatus.agravity.ts +18 -0
  99. package/model/searchAdminStatistics.agravity.ts +18 -0
  100. package/model/searchAdminStatus.agravity.ts +24 -0
  101. package/model/searchFacet.agravity.ts +19 -0
  102. package/model/searchFacetEntity.agravity.ts +19 -0
  103. package/model/searchResult.agravity.ts +23 -0
  104. package/model/searchableItem.agravity.ts +26 -0
  105. package/model/secureUploadEntity.agravity.ts +27 -0
  106. package/model/sharedAsset.agravity.ts +25 -0
  107. package/model/sharedCollection.agravity.ts +24 -0
  108. package/model/sharedCollectionFull.agravity.ts +29 -0
  109. package/model/signalRConnectionInfo.agravity.ts +18 -0
  110. package/model/simpleAsset.agravity.ts +26 -0
  111. package/model/staticDefinedList.agravity.ts +30 -0
  112. package/model/uiTutorials.agravity.ts +26 -0
  113. package/model/upgradeV2V3CollectionCustomItemTableEntity.agravity.ts +21 -0
  114. package/model/versionEntity.agravity.ts +28 -0
  115. package/model/versionedAsset.agravity.ts +20 -0
  116. package/model/whereParam.agravity.ts +43 -0
  117. package/model/workspace.agravity.ts +34 -0
  118. package/package.json +28 -0
  119. package/variables.ts +9 -0
@@ -0,0 +1,262 @@
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.2.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 { AzureIdentity } from '../model/models';
23
+ import { PermissionSetting } 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 PermissionsManagementService {
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 creates one permission setting entry in the database.
92
+ * @param azureIdentity This endpoint takes the AzureIdentity and saves it to the allowed permissions in the cosmos db.
93
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
94
+ * @param reportProgress flag to report request and response progress.
95
+ */
96
+ public httpPermissionSettingsAddIdentities(azureIdentity: Array<AzureIdentity>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<AgravityInfoResponse>;
97
+ public httpPermissionSettingsAddIdentities(azureIdentity: Array<AzureIdentity>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<AgravityInfoResponse>>;
98
+ public httpPermissionSettingsAddIdentities(azureIdentity: Array<AzureIdentity>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<AgravityInfoResponse>>;
99
+ public httpPermissionSettingsAddIdentities(azureIdentity: Array<AzureIdentity>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
100
+ if (azureIdentity === null || azureIdentity === undefined) {
101
+ throw new Error('Required parameter azureIdentity was null or undefined when calling httpPermissionSettingsAddIdentities.');
102
+ }
103
+
104
+ let headers = this.defaultHeaders;
105
+
106
+ let credential: string | undefined;
107
+ // authentication (msal_auth) required
108
+ credential = this.configuration.lookupCredential('msal_auth');
109
+ if (credential) {
110
+ headers = headers.set('Authorization', 'Bearer ' + credential);
111
+ }
112
+
113
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
114
+ if (httpHeaderAcceptSelected === undefined) {
115
+ // to determine the Accept header
116
+ const httpHeaderAccepts: string[] = [
117
+ 'application/json'
118
+ ];
119
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
120
+ }
121
+ if (httpHeaderAcceptSelected !== undefined) {
122
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
123
+ }
124
+
125
+
126
+ // to determine the Content-Type header
127
+ const consumes: string[] = [
128
+ 'application/json'
129
+ ];
130
+ const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
131
+ if (httpContentTypeSelected !== undefined) {
132
+ headers = headers.set('Content-Type', httpContentTypeSelected);
133
+ }
134
+
135
+ let responseType_: 'text' | 'json' = 'json';
136
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
137
+ responseType_ = 'text';
138
+ }
139
+
140
+ return this.httpClient.post<AgravityInfoResponse>(`${this.configuration.basePath}/permissions/settings/identities`,
141
+ azureIdentity,
142
+ {
143
+ responseType: <any>responseType_,
144
+ withCredentials: this.configuration.withCredentials,
145
+ headers: headers,
146
+ observe: observe,
147
+ reportProgress: reportProgress
148
+ }
149
+ );
150
+ }
151
+
152
+ /**
153
+ * This endpoint lists all permission settings in database.
154
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
155
+ * @param reportProgress flag to report request and response progress.
156
+ */
157
+ public httpPermissionSettingsGet(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<PermissionSetting>;
158
+ public httpPermissionSettingsGet(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<PermissionSetting>>;
159
+ public httpPermissionSettingsGet(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<PermissionSetting>>;
160
+ public httpPermissionSettingsGet(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
161
+
162
+ let headers = this.defaultHeaders;
163
+
164
+ let credential: string | undefined;
165
+ // authentication (msal_auth) required
166
+ credential = this.configuration.lookupCredential('msal_auth');
167
+ if (credential) {
168
+ headers = headers.set('Authorization', 'Bearer ' + credential);
169
+ }
170
+
171
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
172
+ if (httpHeaderAcceptSelected === undefined) {
173
+ // to determine the Accept header
174
+ const httpHeaderAccepts: string[] = [
175
+ 'application/json'
176
+ ];
177
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
178
+ }
179
+ if (httpHeaderAcceptSelected !== undefined) {
180
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
181
+ }
182
+
183
+
184
+ let responseType_: 'text' | 'json' = 'json';
185
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
186
+ responseType_ = 'text';
187
+ }
188
+
189
+ return this.httpClient.get<PermissionSetting>(`${this.configuration.basePath}/permissions/settings`,
190
+ {
191
+ responseType: <any>responseType_,
192
+ withCredentials: this.configuration.withCredentials,
193
+ headers: headers,
194
+ observe: observe,
195
+ reportProgress: reportProgress
196
+ }
197
+ );
198
+ }
199
+
200
+ /**
201
+ * This endpoint creates one permission setting entry in the database.
202
+ * @param permissionSetting This endpoint overwrites the permission setting ID and adds the information to the database.
203
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
204
+ * @param reportProgress flag to report request and response progress.
205
+ */
206
+ public httpPermissionSettingsPut(permissionSetting: PermissionSetting, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<PermissionSetting>;
207
+ public httpPermissionSettingsPut(permissionSetting: PermissionSetting, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<PermissionSetting>>;
208
+ public httpPermissionSettingsPut(permissionSetting: PermissionSetting, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<PermissionSetting>>;
209
+ public httpPermissionSettingsPut(permissionSetting: PermissionSetting, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
210
+ if (permissionSetting === null || permissionSetting === undefined) {
211
+ throw new Error('Required parameter permissionSetting was null or undefined when calling httpPermissionSettingsPut.');
212
+ }
213
+
214
+ let headers = this.defaultHeaders;
215
+
216
+ let credential: string | undefined;
217
+ // authentication (msal_auth) required
218
+ credential = this.configuration.lookupCredential('msal_auth');
219
+ if (credential) {
220
+ headers = headers.set('Authorization', 'Bearer ' + credential);
221
+ }
222
+
223
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
224
+ if (httpHeaderAcceptSelected === undefined) {
225
+ // to determine the Accept header
226
+ const httpHeaderAccepts: string[] = [
227
+ 'application/json'
228
+ ];
229
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
230
+ }
231
+ if (httpHeaderAcceptSelected !== undefined) {
232
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
233
+ }
234
+
235
+
236
+ // to determine the Content-Type header
237
+ const consumes: string[] = [
238
+ 'application/json'
239
+ ];
240
+ const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
241
+ if (httpContentTypeSelected !== undefined) {
242
+ headers = headers.set('Content-Type', httpContentTypeSelected);
243
+ }
244
+
245
+ let responseType_: 'text' | 'json' = 'json';
246
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
247
+ responseType_ = 'text';
248
+ }
249
+
250
+ return this.httpClient.put<PermissionSetting>(`${this.configuration.basePath}/permissions/settings`,
251
+ permissionSetting,
252
+ {
253
+ responseType: <any>responseType_,
254
+ withCredentials: this.configuration.withCredentials,
255
+ headers: headers,
256
+ observe: observe,
257
+ reportProgress: reportProgress
258
+ }
259
+ );
260
+ }
261
+
262
+ }
@@ -0,0 +1,148 @@
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.2.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 { PublishEntity } from '../model/models';
21
+
22
+ import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
23
+ import { AgravityConfiguration } from '../configuration';
24
+
25
+
26
+
27
+ @Injectable({
28
+ providedIn: 'root'
29
+ })
30
+ export class PublishingService {
31
+
32
+ protected basePath = 'http://localhost:7071/api';
33
+ public defaultHeaders = new HttpHeaders();
34
+ public configuration = new AgravityConfiguration();
35
+ public encoder: HttpParameterCodec;
36
+
37
+ constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: AgravityConfiguration) {
38
+ if (configuration) {
39
+ this.configuration = configuration;
40
+ }
41
+ if (typeof this.configuration.basePath !== 'string') {
42
+ if (typeof basePath !== 'string') {
43
+ basePath = this.basePath;
44
+ }
45
+ this.configuration.basePath = basePath;
46
+ }
47
+ this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
48
+ }
49
+
50
+
51
+ private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
52
+ if (typeof value === "object" && value instanceof Date === false) {
53
+ httpParams = this.addToHttpParamsRecursive(httpParams, value);
54
+ } else {
55
+ httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
56
+ }
57
+ return httpParams;
58
+ }
59
+
60
+ private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
61
+ if (value == null) {
62
+ return httpParams;
63
+ }
64
+
65
+ if (typeof value === "object") {
66
+ if (Array.isArray(value)) {
67
+ (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
68
+ } else if (value instanceof Date) {
69
+ if (key != null) {
70
+ httpParams = httpParams.append(key,
71
+ (value as Date).toISOString().substr(0, 10));
72
+ } else {
73
+ throw Error("key may not be null if value is Date");
74
+ }
75
+ } else {
76
+ Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
77
+ 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 lists all the published assets which are stored in the database
89
+ * @param cid Filter response for collection
90
+ * @param incldescendants Include collections further down in hierarchy
91
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
92
+ * @param reportProgress flag to report request and response progress.
93
+ */
94
+ public httpPublishedAssetsGetAll(cid?: string, incldescendants?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<PublishEntity>;
95
+ public httpPublishedAssetsGetAll(cid?: string, incldescendants?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<PublishEntity>>;
96
+ public httpPublishedAssetsGetAll(cid?: string, incldescendants?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<PublishEntity>>;
97
+ public httpPublishedAssetsGetAll(cid?: string, incldescendants?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
98
+
99
+ let queryParameters = new HttpParams({encoder: this.encoder});
100
+ if (cid !== undefined && cid !== null) {
101
+ queryParameters = this.addToHttpParams(queryParameters,
102
+ <any>cid, 'cid');
103
+ }
104
+ if (incldescendants !== undefined && incldescendants !== null) {
105
+ queryParameters = this.addToHttpParams(queryParameters,
106
+ <any>incldescendants, 'incldescendants');
107
+ }
108
+
109
+ let headers = this.defaultHeaders;
110
+
111
+ let credential: string | undefined;
112
+ // authentication (msal_auth) required
113
+ credential = this.configuration.lookupCredential('msal_auth');
114
+ if (credential) {
115
+ headers = headers.set('Authorization', 'Bearer ' + credential);
116
+ }
117
+
118
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
119
+ if (httpHeaderAcceptSelected === undefined) {
120
+ // to determine the Accept header
121
+ const httpHeaderAccepts: string[] = [
122
+ 'application/json'
123
+ ];
124
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
125
+ }
126
+ if (httpHeaderAcceptSelected !== undefined) {
127
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
128
+ }
129
+
130
+
131
+ let responseType_: 'text' | 'json' = 'json';
132
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
133
+ responseType_ = 'text';
134
+ }
135
+
136
+ return this.httpClient.get<PublishEntity>(`${this.configuration.basePath}/publish`,
137
+ {
138
+ params: queryParameters,
139
+ responseType: <any>responseType_,
140
+ withCredentials: this.configuration.withCredentials,
141
+ headers: headers,
142
+ observe: observe,
143
+ reportProgress: reportProgress
144
+ }
145
+ );
146
+ }
147
+
148
+ }