@agravity/public 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 (76) hide show
  1. package/README.md +2 -2
  2. package/api/api.ts +65 -43
  3. package/api/publicAssetManagement.pub.agravity.ts +615 -504
  4. package/api/publicAssetOperations.pub.agravity.ts +740 -633
  5. package/api/publicAssetPublishing.pub.agravity.ts +277 -263
  6. package/api/publicAssetVersioning.pub.agravity.ts +613 -552
  7. package/api/publicAuthenticationManagement.pub.agravity.ts +125 -135
  8. package/api/publicCollectionManagement.pub.agravity.ts +680 -562
  9. package/api/publicCollectionSecureUpload.pub.agravity.ts +243 -229
  10. package/api/publicCollectionTypeManagement.pub.agravity.ts +293 -266
  11. package/api/publicConfigurationManagement.pub.agravity.ts +118 -128
  12. package/api/publicDownloadFormatManagement.pub.agravity.ts +125 -135
  13. package/api/publicGeneralManagement.pub.agravity.ts +206 -221
  14. package/api/publicHelperTools.pub.agravity.ts +269 -288
  15. package/api/publicPublishing.pub.agravity.ts +160 -148
  16. package/api/publicSavedSearch.pub.agravity.ts +160 -148
  17. package/api/publicSearchManagement.pub.agravity.ts +237 -197
  18. package/api/publicSharingManagement.pub.agravity.ts +259 -215
  19. package/api/publicSignalRConnectionManagement.pub.agravity.ts +125 -136
  20. package/api/publicStaticDefinedListManagement.pub.agravity.ts +325 -203
  21. package/api/publicTranslationManagement.pub.agravity.ts +322 -267
  22. package/api/publicWebAppData.pub.agravity.ts +179 -193
  23. package/api/publicWorkspaceManagement.pub.agravity.ts +199 -204
  24. package/api.module.ts +49 -51
  25. package/configuration.ts +129 -132
  26. package/encoder.ts +20 -20
  27. package/index.ts +5 -5
  28. package/model/agravityErrorResponse.pub.agravity.ts +17 -19
  29. package/model/agravityVersion.pub.agravity.ts +22 -24
  30. package/model/allWebAppData.pub.agravity.ts +22 -24
  31. package/model/artificialIntelligenceGroup.pub.agravity.ts +18 -20
  32. package/model/asset.pub.agravity.ts +45 -47
  33. package/model/assetAvailability.pub.agravity.ts +17 -19
  34. package/model/assetBlob.pub.agravity.ts +79 -82
  35. package/model/assetIdFormat.pub.agravity.ts +17 -19
  36. package/model/assetPageResult.pub.agravity.ts +21 -23
  37. package/model/azSearchOptions.pub.agravity.ts +23 -25
  38. package/model/badRequestResult.pub.agravity.ts +15 -17
  39. package/model/collTypeItem.pub.agravity.ts +36 -38
  40. package/model/collection.pub.agravity.ts +33 -35
  41. package/model/collectionType.pub.agravity.ts +33 -35
  42. package/model/collectionUDL.pub.agravity.ts +19 -21
  43. package/model/createSftpUserResult.pub.agravity.ts +16 -18
  44. package/model/dataResult.pub.agravity.ts +20 -22
  45. package/model/distZipResponse.pub.agravity.ts +17 -19
  46. package/model/downloadFormat.pub.agravity.ts +32 -34
  47. package/model/dynamicImageOperation.pub.agravity.ts +16 -18
  48. package/model/entityId.pub.agravity.ts +15 -17
  49. package/model/entityIdName.pub.agravity.ts +17 -19
  50. package/model/frontendAppConfig.pub.agravity.ts +19 -21
  51. package/model/groupAllAppData.pub.agravity.ts +24 -26
  52. package/model/metadata.pub.agravity.ts +17 -19
  53. package/model/models.ts +44 -44
  54. package/model/okResult.pub.agravity.ts +15 -17
  55. package/model/publishEntity.pub.agravity.ts +26 -28
  56. package/model/publishedAsset.pub.agravity.ts +23 -25
  57. package/model/quickShareFull.pub.agravity.ts +35 -37
  58. package/model/sasToken.pub.agravity.ts +20 -22
  59. package/model/savedSearch.pub.agravity.ts +29 -31
  60. package/model/searchFacet.pub.agravity.ts +17 -19
  61. package/model/searchFacetEntity.pub.agravity.ts +17 -19
  62. package/model/searchResult.pub.agravity.ts +21 -23
  63. package/model/searchableItem.pub.agravity.ts +24 -26
  64. package/model/secureUploadEntity.pub.agravity.ts +25 -27
  65. package/model/sharedAsset.pub.agravity.ts +23 -25
  66. package/model/sharedCollectionFull.pub.agravity.ts +27 -29
  67. package/model/signalRConnectionInfo.pub.agravity.ts +16 -18
  68. package/model/staticDefinedList.pub.agravity.ts +28 -30
  69. package/model/versionEntity.pub.agravity.ts +26 -28
  70. package/model/versionedAsset.pub.agravity.ts +18 -20
  71. package/model/whereParam.pub.agravity.ts +40 -43
  72. package/model/workspace.pub.agravity.ts +32 -34
  73. package/ng-package.json +6 -6
  74. package/package.json +45 -45
  75. package/tsconfig.json +20 -28
  76. package/variables.ts +9 -9
@@ -1,204 +1,199 @@
1
- /**
2
- * Agravity OpenAPI Documentation - Public Functions
3
- * <h1>Agravity API Reference</h1>This is the public 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>Collection Sharing (consume share)</li> <li>Secure Upload (validate + upload file)</li> <li>Download ZIP</li> <li>Search</li> <li>General management</li></ul><h2> Operations</h2>Agravity API performs the following operations:<ul> <li>List / get single collection types</li> <li>List / get single collections</li> <li>List / get single assets</li> <li>Operations on assets like: blobs, rotate, resize, similar, collections, customfields, download</li> <li>List / get single published asset</li> <li>Search for assets or collections</li> <li>Get version of deployment</li></ul><br/><b>API key is needed to access these endpoints.</b><br/><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 { Workspace } from '../model/models';
22
-
23
- import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
24
- import { AgravityPublicConfiguration } from '../configuration';
25
-
26
-
27
-
28
- @Injectable({
29
- providedIn: 'root'
30
- })
31
- export class PublicWorkspaceManagementService {
32
-
33
- protected basePath = 'http://localhost:7072/api';
34
- public defaultHeaders = new HttpHeaders();
35
- public configuration = new AgravityPublicConfiguration();
36
- public encoder: HttpParameterCodec;
37
-
38
- constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: AgravityPublicConfiguration) {
39
- if (configuration) {
40
- this.configuration = configuration;
41
- }
42
- if (typeof this.configuration.basePath !== 'string') {
43
- if (typeof basePath !== 'string') {
44
- basePath = this.basePath;
45
- }
46
- this.configuration.basePath = basePath;
47
- }
48
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
49
- }
50
-
51
-
52
- private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
53
- if (typeof value === "object" && value instanceof Date === false) {
54
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
55
- } else {
56
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
57
- }
58
- return httpParams;
59
- }
60
-
61
- private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
62
- if (value == null) {
63
- return httpParams;
64
- }
65
-
66
- if (typeof value === "object") {
67
- if (Array.isArray(value)) {
68
- (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
69
- } else if (value instanceof Date) {
70
- if (key != null) {
71
- httpParams = httpParams.append(key,
72
- (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(
78
- httpParams, value[k], key != null ? `${key}.${k}` : k));
79
- }
80
- } else if (key != null) {
81
- httpParams = httpParams.append(key, value);
82
- } else {
83
- throw Error("key may not be null if value is not object or array");
84
- }
85
- return httpParams;
86
- }
87
-
88
- /**
89
- * This lists all available workspaces which are stored in the database and not deleted (status \&quot;A\&quot;).
90
- * @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header)
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 httpWorkspacesGet(translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Array<Workspace>>;
95
- public httpWorkspacesGet(translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Array<Workspace>>>;
96
- public httpWorkspacesGet(translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Array<Workspace>>>;
97
- public httpWorkspacesGet(translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
98
-
99
- let queryParameters = new HttpParams({encoder: this.encoder});
100
- if (translations !== undefined && translations !== null) {
101
- queryParameters = this.addToHttpParams(queryParameters,
102
- <any>translations, 'translations');
103
- }
104
-
105
- let headers = this.defaultHeaders;
106
-
107
- let credential: string | undefined;
108
- // authentication (function_key) required
109
- credential = this.configuration.lookupCredential('function_key');
110
- if (credential) {
111
- headers = headers.set('x-functions-key', credential);
112
- }
113
-
114
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
115
- if (httpHeaderAcceptSelected === undefined) {
116
- // to determine the Accept header
117
- const httpHeaderAccepts: string[] = [
118
- 'application/json'
119
- ];
120
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
121
- }
122
- if (httpHeaderAcceptSelected !== undefined) {
123
- headers = headers.set('Accept', httpHeaderAcceptSelected);
124
- }
125
-
126
-
127
- let responseType_: 'text' | 'json' = 'json';
128
- if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
129
- responseType_ = 'text';
130
- }
131
-
132
- return this.httpClient.get<Array<Workspace>>(`${this.configuration.basePath}/workspaces`,
133
- {
134
- params: queryParameters,
135
- responseType: <any>responseType_,
136
- withCredentials: this.configuration.withCredentials,
137
- headers: headers,
138
- observe: observe,
139
- reportProgress: reportProgress
140
- }
141
- );
142
- }
143
-
144
- /**
145
- * Returns one single workspace (from ID).
146
- * @param id The ID of the workspace.
147
- * @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header)
148
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
149
- * @param reportProgress flag to report request and response progress.
150
- */
151
- public httpWorkspacesGetById(id: string, translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Workspace>;
152
- public httpWorkspacesGetById(id: string, translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<Workspace>>;
153
- public httpWorkspacesGetById(id: string, translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<Workspace>>;
154
- public httpWorkspacesGetById(id: string, translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
155
- if (id === null || id === undefined) {
156
- throw new Error('Required parameter id was null or undefined when calling httpWorkspacesGetById.');
157
- }
158
-
159
- let queryParameters = new HttpParams({encoder: this.encoder});
160
- if (translations !== undefined && translations !== null) {
161
- queryParameters = this.addToHttpParams(queryParameters,
162
- <any>translations, 'translations');
163
- }
164
-
165
- let headers = this.defaultHeaders;
166
-
167
- let credential: string | undefined;
168
- // authentication (function_key) required
169
- credential = this.configuration.lookupCredential('function_key');
170
- if (credential) {
171
- headers = headers.set('x-functions-key', credential);
172
- }
173
-
174
- let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
175
- if (httpHeaderAcceptSelected === undefined) {
176
- // to determine the Accept header
177
- const httpHeaderAccepts: string[] = [
178
- 'application/json'
179
- ];
180
- httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
181
- }
182
- if (httpHeaderAcceptSelected !== undefined) {
183
- headers = headers.set('Accept', httpHeaderAcceptSelected);
184
- }
185
-
186
-
187
- let responseType_: 'text' | 'json' = 'json';
188
- if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
189
- responseType_ = 'text';
190
- }
191
-
192
- return this.httpClient.get<Workspace>(`${this.configuration.basePath}/workspaces/${encodeURIComponent(String(id))}`,
193
- {
194
- params: queryParameters,
195
- responseType: <any>responseType_,
196
- withCredentials: this.configuration.withCredentials,
197
- headers: headers,
198
- observe: observe,
199
- reportProgress: reportProgress
200
- }
201
- );
202
- }
203
-
204
- }
1
+ /**
2
+ * Agravity OpenAPI Documentation - Public Functions
3
+ * <h1>Agravity API Reference</h1>This is the public 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>Collection Sharing (consume share)</li> <li>Secure Upload (validate + upload file)</li> <li>Download ZIP</li> <li>Search</li> <li>General management</li></ul><h2> Operations</h2>Agravity API performs the following operations:<ul> <li>List / get single collection types</li> <li>List / get single collections</li> <li>List / get single assets</li> <li>Operations on assets like: blobs, rotate, resize, similar, collections, customfields, download</li> <li>List / get single published asset</li> <li>Search for assets or collections</li> <li>Get version of deployment</li></ul><br/><b>API key is needed to access these endpoints.</b><br/><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 { Workspace } from '../model/models';
21
+
22
+ import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
23
+ import { AgravityPublicConfiguration } from '../configuration';
24
+
25
+ @Injectable({
26
+ providedIn: 'root'
27
+ })
28
+ export class PublicWorkspaceManagementService {
29
+ protected basePath = 'http://localhost:7072/api';
30
+ public defaultHeaders = new HttpHeaders();
31
+ public configuration = new AgravityPublicConfiguration();
32
+ public encoder: HttpParameterCodec;
33
+
34
+ constructor(
35
+ protected httpClient: HttpClient,
36
+ @Optional() @Inject(BASE_PATH) basePath: string,
37
+ @Optional() configuration: AgravityPublicConfiguration
38
+ ) {
39
+ if (configuration) {
40
+ this.configuration = configuration;
41
+ }
42
+ if (typeof this.configuration.basePath !== 'string') {
43
+ if (typeof basePath !== 'string') {
44
+ basePath = this.basePath;
45
+ }
46
+ this.configuration.basePath = basePath;
47
+ }
48
+ this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
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, (value as Date).toISOString().substr(0, 10));
71
+ } else {
72
+ throw Error('key may not be null if value is Date');
73
+ }
74
+ } else {
75
+ Object.keys(value).forEach((k) => (httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)));
76
+ }
77
+ } else if (key != null) {
78
+ httpParams = httpParams.append(key, value);
79
+ } else {
80
+ throw Error('key may not be null if value is not object or array');
81
+ }
82
+ return httpParams;
83
+ }
84
+
85
+ /**
86
+ * This lists all available workspaces which are stored in the database and not deleted (status \&quot;A\&quot;).
87
+ * @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header)
88
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
89
+ * @param reportProgress flag to report request and response progress.
90
+ */
91
+ public httpWorkspacesGet(translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<Array<Workspace>>;
92
+ public httpWorkspacesGet(translations?: boolean, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpResponse<Array<Workspace>>>;
93
+ public httpWorkspacesGet(translations?: boolean, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<HttpEvent<Array<Workspace>>>;
94
+ public httpWorkspacesGet(translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json' }): Observable<any> {
95
+ let queryParameters = new HttpParams({ encoder: this.encoder });
96
+ if (translations !== undefined && translations !== null) {
97
+ queryParameters = this.addToHttpParams(queryParameters, <any>translations, 'translations');
98
+ }
99
+
100
+ let headers = this.defaultHeaders;
101
+
102
+ let credential: string | undefined;
103
+ // authentication (function_key) required
104
+ credential = this.configuration.lookupCredential('function_key');
105
+ if (credential) {
106
+ headers = headers.set('x-functions-key', 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[] = ['application/json'];
113
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
114
+ }
115
+ if (httpHeaderAcceptSelected !== undefined) {
116
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
117
+ }
118
+
119
+ let responseType_: 'text' | 'json' = 'json';
120
+ if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
121
+ responseType_ = 'text';
122
+ }
123
+
124
+ return this.httpClient.get<Array<Workspace>>(`${this.configuration.basePath}/workspaces`, {
125
+ params: queryParameters,
126
+ responseType: <any>responseType_,
127
+ withCredentials: this.configuration.withCredentials,
128
+ headers: headers,
129
+ observe: observe,
130
+ reportProgress: reportProgress
131
+ });
132
+ }
133
+
134
+ /**
135
+ * Returns one single workspace (from ID).
136
+ * @param id The ID of the workspace.
137
+ * @param translations When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header)
138
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
139
+ * @param reportProgress flag to report request and response progress.
140
+ */
141
+ public httpWorkspacesGetById(id: string, translations?: boolean, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' }): Observable<Workspace>;
142
+ public httpWorkspacesGetById(
143
+ id: string,
144
+ translations?: boolean,
145
+ observe?: 'response',
146
+ reportProgress?: boolean,
147
+ options?: { httpHeaderAccept?: 'application/json' }
148
+ ): Observable<HttpResponse<Workspace>>;
149
+ public httpWorkspacesGetById(
150
+ id: string,
151
+ translations?: boolean,
152
+ observe?: 'events',
153
+ reportProgress?: boolean,
154
+ options?: { httpHeaderAccept?: 'application/json' }
155
+ ): Observable<HttpEvent<Workspace>>;
156
+ public httpWorkspacesGetById(id: string, translations?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: { httpHeaderAccept?: 'application/json' }): Observable<any> {
157
+ if (id === null || id === undefined) {
158
+ throw new Error('Required parameter id was null or undefined when calling httpWorkspacesGetById.');
159
+ }
160
+
161
+ let queryParameters = new HttpParams({ encoder: this.encoder });
162
+ if (translations !== undefined && translations !== null) {
163
+ queryParameters = this.addToHttpParams(queryParameters, <any>translations, 'translations');
164
+ }
165
+
166
+ let headers = this.defaultHeaders;
167
+
168
+ let credential: string | undefined;
169
+ // authentication (function_key) required
170
+ credential = this.configuration.lookupCredential('function_key');
171
+ if (credential) {
172
+ headers = headers.set('x-functions-key', credential);
173
+ }
174
+
175
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
176
+ if (httpHeaderAcceptSelected === undefined) {
177
+ // to determine the Accept header
178
+ const httpHeaderAccepts: string[] = ['application/json'];
179
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
180
+ }
181
+ if (httpHeaderAcceptSelected !== undefined) {
182
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
183
+ }
184
+
185
+ let responseType_: 'text' | 'json' = 'json';
186
+ if (httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
187
+ responseType_ = 'text';
188
+ }
189
+
190
+ return this.httpClient.get<Workspace>(`${this.configuration.basePath}/workspaces/${encodeURIComponent(String(id))}`, {
191
+ params: queryParameters,
192
+ responseType: <any>responseType_,
193
+ withCredentials: this.configuration.withCredentials,
194
+ headers: headers,
195
+ observe: observe,
196
+ reportProgress: reportProgress
197
+ });
198
+ }
199
+ }
package/api.module.ts CHANGED
@@ -1,51 +1,49 @@
1
- import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core';
2
- import { AgravityPublicConfiguration } from './configuration';
3
- import { HttpClient } from '@angular/common/http';
4
-
5
- import { PublicAssetManagementService } from './api/publicAssetManagement.pub.agravity';
6
- import { PublicAssetOperationsService } from './api/publicAssetOperations.pub.agravity';
7
- import { PublicAssetPublishingService } from './api/publicAssetPublishing.pub.agravity';
8
- import { PublicAssetVersioningService } from './api/publicAssetVersioning.pub.agravity';
9
- import { PublicAuthenticationManagementService } from './api/publicAuthenticationManagement.pub.agravity';
10
- import { PublicCollectionManagementService } from './api/publicCollectionManagement.pub.agravity';
11
- import { PublicCollectionSecureUploadService } from './api/publicCollectionSecureUpload.pub.agravity';
12
- import { PublicCollectionTypeManagementService } from './api/publicCollectionTypeManagement.pub.agravity';
13
- import { PublicConfigurationManagementService } from './api/publicConfigurationManagement.pub.agravity';
14
- import { PublicDownloadFormatManagementService } from './api/publicDownloadFormatManagement.pub.agravity';
15
- import { PublicGeneralManagementService } from './api/publicGeneralManagement.pub.agravity';
16
- import { PublicHelperToolsService } from './api/publicHelperTools.pub.agravity';
17
- import { PublicPublishingService } from './api/publicPublishing.pub.agravity';
18
- import { PublicSavedSearchService } from './api/publicSavedSearch.pub.agravity';
19
- import { PublicSearchManagementService } from './api/publicSearchManagement.pub.agravity';
20
- import { PublicSharingManagementService } from './api/publicSharingManagement.pub.agravity';
21
- import { PublicSignalRConnectionManagementService } from './api/publicSignalRConnectionManagement.pub.agravity';
22
- import { PublicStaticDefinedListManagementService } from './api/publicStaticDefinedListManagement.pub.agravity';
23
- import { PublicTranslationManagementService } from './api/publicTranslationManagement.pub.agravity';
24
- import { PublicWebAppDataService } from './api/publicWebAppData.pub.agravity';
25
- import { PublicWorkspaceManagementService } from './api/publicWorkspaceManagement.pub.agravity';
26
-
27
- @NgModule({
28
- imports: [],
29
- declarations: [],
30
- exports: [],
31
- providers: []
32
- })
33
- export class AgravityPublicApiModule {
34
- public static forRoot(configurationFactory: () => AgravityPublicConfiguration): ModuleWithProviders<AgravityPublicApiModule> {
35
- return {
36
- ngModule: AgravityPublicApiModule,
37
- providers: [ { provide: AgravityPublicConfiguration, useFactory: configurationFactory } ]
38
- };
39
- }
40
-
41
- constructor( @Optional() @SkipSelf() parentModule: AgravityPublicApiModule,
42
- @Optional() http: HttpClient) {
43
- if (parentModule) {
44
- throw new Error('AgravityPublicApiModule is already loaded. Import in your base AppModule only.');
45
- }
46
- if (!http) {
47
- throw new Error('You need to import the HttpClientModule in your AppModule! \n' +
48
- 'See also https://github.com/angular/angular/issues/20575');
49
- }
50
- }
51
- }
1
+ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core';
2
+ import { AgravityPublicConfiguration } from './configuration';
3
+ import { HttpClient } from '@angular/common/http';
4
+
5
+ import { PublicAssetManagementService } from './api/publicAssetManagement.pub.agravity';
6
+ import { PublicAssetOperationsService } from './api/publicAssetOperations.pub.agravity';
7
+ import { PublicAssetPublishingService } from './api/publicAssetPublishing.pub.agravity';
8
+ import { PublicAssetVersioningService } from './api/publicAssetVersioning.pub.agravity';
9
+ import { PublicAuthenticationManagementService } from './api/publicAuthenticationManagement.pub.agravity';
10
+ import { PublicCollectionManagementService } from './api/publicCollectionManagement.pub.agravity';
11
+ import { PublicCollectionSecureUploadService } from './api/publicCollectionSecureUpload.pub.agravity';
12
+ import { PublicCollectionTypeManagementService } from './api/publicCollectionTypeManagement.pub.agravity';
13
+ import { PublicConfigurationManagementService } from './api/publicConfigurationManagement.pub.agravity';
14
+ import { PublicDownloadFormatManagementService } from './api/publicDownloadFormatManagement.pub.agravity';
15
+ import { PublicGeneralManagementService } from './api/publicGeneralManagement.pub.agravity';
16
+ import { PublicHelperToolsService } from './api/publicHelperTools.pub.agravity';
17
+ import { PublicPublishingService } from './api/publicPublishing.pub.agravity';
18
+ import { PublicSavedSearchService } from './api/publicSavedSearch.pub.agravity';
19
+ import { PublicSearchManagementService } from './api/publicSearchManagement.pub.agravity';
20
+ import { PublicSharingManagementService } from './api/publicSharingManagement.pub.agravity';
21
+ import { PublicSignalRConnectionManagementService } from './api/publicSignalRConnectionManagement.pub.agravity';
22
+ import { PublicStaticDefinedListManagementService } from './api/publicStaticDefinedListManagement.pub.agravity';
23
+ import { PublicTranslationManagementService } from './api/publicTranslationManagement.pub.agravity';
24
+ import { PublicWebAppDataService } from './api/publicWebAppData.pub.agravity';
25
+ import { PublicWorkspaceManagementService } from './api/publicWorkspaceManagement.pub.agravity';
26
+
27
+ @NgModule({
28
+ imports: [],
29
+ declarations: [],
30
+ exports: [],
31
+ providers: []
32
+ })
33
+ export class AgravityPublicApiModule {
34
+ public static forRoot(configurationFactory: () => AgravityPublicConfiguration): ModuleWithProviders<AgravityPublicApiModule> {
35
+ return {
36
+ ngModule: AgravityPublicApiModule,
37
+ providers: [{ provide: AgravityPublicConfiguration, useFactory: configurationFactory }]
38
+ };
39
+ }
40
+
41
+ constructor(@Optional() @SkipSelf() parentModule: AgravityPublicApiModule, @Optional() http: HttpClient) {
42
+ if (parentModule) {
43
+ throw new Error('AgravityPublicApiModule is already loaded. Import in your base AppModule only.');
44
+ }
45
+ if (!http) {
46
+ throw new Error('You need to import the HttpClientModule in your AppModule! \n' + 'See also https://github.com/angular/angular/issues/20575');
47
+ }
48
+ }
49
+ }