@agravity/public 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 (78) hide show
  1. package/.openapi-generator/FILES +76 -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 +43 -0
  6. package/api/publicAssetManagement.pub.agravity.ts +504 -0
  7. package/api/publicAssetOperations.pub.agravity.ts +633 -0
  8. package/api/publicAssetPublishing.pub.agravity.ts +263 -0
  9. package/api/publicAssetVersioning.pub.agravity.ts +552 -0
  10. package/api/publicAuthenticationManagement.pub.agravity.ts +135 -0
  11. package/api/publicCollectionManagement.pub.agravity.ts +562 -0
  12. package/api/publicCollectionSecureUpload.pub.agravity.ts +229 -0
  13. package/api/publicCollectionTypeManagement.pub.agravity.ts +266 -0
  14. package/api/publicConfigurationManagement.pub.agravity.ts +128 -0
  15. package/api/publicDownloadFormatManagement.pub.agravity.ts +135 -0
  16. package/api/publicGeneralManagement.pub.agravity.ts +221 -0
  17. package/api/publicHelperTools.pub.agravity.ts +288 -0
  18. package/api/publicPublishing.pub.agravity.ts +148 -0
  19. package/api/publicSavedSearch.pub.agravity.ts +148 -0
  20. package/api/publicSearchManagement.pub.agravity.ts +197 -0
  21. package/api/publicSharingManagement.pub.agravity.ts +215 -0
  22. package/api/publicSignalRConnectionManagement.pub.agravity.ts +136 -0
  23. package/api/publicStaticDefinedListManagement.pub.agravity.ts +203 -0
  24. package/api/publicTranslationManagement.pub.agravity.ts +267 -0
  25. package/api/publicWebAppData.pub.agravity.ts +193 -0
  26. package/api/publicWorkspaceManagement.pub.agravity.ts +204 -0
  27. package/api.module.ts +51 -0
  28. package/configuration.ts +132 -0
  29. package/encoder.ts +20 -0
  30. package/git_push.sh +58 -0
  31. package/index.ts +5 -0
  32. package/model/agravityErrorResponse.pub.agravity.ts +19 -0
  33. package/model/agravityVersion.pub.agravity.ts +24 -0
  34. package/model/allWebAppData.pub.agravity.ts +24 -0
  35. package/model/artificialIntelligenceGroup.pub.agravity.ts +20 -0
  36. package/model/asset.pub.agravity.ts +47 -0
  37. package/model/assetAvailability.pub.agravity.ts +19 -0
  38. package/model/assetBlob.pub.agravity.ts +82 -0
  39. package/model/assetIdContainer.pub.agravity.ts +18 -0
  40. package/model/assetPageResult.pub.agravity.ts +23 -0
  41. package/model/azSearchOptions.pub.agravity.ts +25 -0
  42. package/model/badRequestResult.pub.agravity.ts +17 -0
  43. package/model/collTypeItem.pub.agravity.ts +38 -0
  44. package/model/collection.pub.agravity.ts +35 -0
  45. package/model/collectionType.pub.agravity.ts +35 -0
  46. package/model/collectionUDL.pub.agravity.ts +21 -0
  47. package/model/createSftpUserResult.pub.agravity.ts +18 -0
  48. package/model/dataResult.pub.agravity.ts +22 -0
  49. package/model/distZipResponse.pub.agravity.ts +19 -0
  50. package/model/downloadFormat.pub.agravity.ts +34 -0
  51. package/model/dynamicImageOperation.pub.agravity.ts +18 -0
  52. package/model/entityId.pub.agravity.ts +17 -0
  53. package/model/entityIdName.pub.agravity.ts +19 -0
  54. package/model/frontendAppConfig.pub.agravity.ts +21 -0
  55. package/model/groupAllAppData.pub.agravity.ts +26 -0
  56. package/model/metadata.pub.agravity.ts +19 -0
  57. package/model/models.ts +44 -0
  58. package/model/okResult.pub.agravity.ts +17 -0
  59. package/model/publishEntity.pub.agravity.ts +28 -0
  60. package/model/publishedAsset.pub.agravity.ts +25 -0
  61. package/model/quickShareFull.pub.agravity.ts +36 -0
  62. package/model/sasToken.pub.agravity.ts +22 -0
  63. package/model/savedSearch.pub.agravity.ts +31 -0
  64. package/model/searchFacet.pub.agravity.ts +19 -0
  65. package/model/searchFacetEntity.pub.agravity.ts +19 -0
  66. package/model/searchResult.pub.agravity.ts +23 -0
  67. package/model/searchableItem.pub.agravity.ts +26 -0
  68. package/model/secureUploadEntity.pub.agravity.ts +27 -0
  69. package/model/sharedAsset.pub.agravity.ts +25 -0
  70. package/model/sharedCollectionFull.pub.agravity.ts +29 -0
  71. package/model/signalRConnectionInfo.pub.agravity.ts +18 -0
  72. package/model/staticDefinedList.pub.agravity.ts +30 -0
  73. package/model/versionEntity.pub.agravity.ts +28 -0
  74. package/model/versionedAsset.pub.agravity.ts +20 -0
  75. package/model/whereParam.pub.agravity.ts +43 -0
  76. package/model/workspace.pub.agravity.ts +34 -0
  77. package/package.json +28 -0
  78. package/variables.ts +9 -0
@@ -0,0 +1,263 @@
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.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 { PublishEntity } from '../model/models';
22
+ import { PublishedAsset } from '../model/models';
23
+
24
+ import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
25
+ import { AgravityPublicConfiguration } from '../configuration';
26
+
27
+
28
+
29
+ @Injectable({
30
+ providedIn: 'root'
31
+ })
32
+ export class PublicAssetPublishingService {
33
+
34
+ protected basePath = 'http://localhost:7072/api';
35
+ public defaultHeaders = new HttpHeaders();
36
+ public configuration = new AgravityPublicConfiguration();
37
+ public encoder: HttpParameterCodec;
38
+
39
+ constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: AgravityPublicConfiguration) {
40
+ if (configuration) {
41
+ this.configuration = configuration;
42
+ }
43
+ if (typeof this.configuration.basePath !== 'string') {
44
+ if (typeof basePath !== 'string') {
45
+ basePath = this.basePath;
46
+ }
47
+ this.configuration.basePath = basePath;
48
+ }
49
+ this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
50
+ }
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,
73
+ (value as Date).toISOString().substr(0, 10));
74
+ } else {
75
+ throw Error("key may not be null if value is Date");
76
+ }
77
+ } else {
78
+ Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
79
+ httpParams, value[k], key != null ? `${key}.${k}` : k));
80
+ }
81
+ } else if (key != null) {
82
+ httpParams = httpParams.append(key, value);
83
+ } else {
84
+ throw Error("key may not be null if value is not object or array");
85
+ }
86
+ return httpParams;
87
+ }
88
+
89
+ /**
90
+ * This endpoint creates an additional published asset
91
+ * @param id The ID of the asset.
92
+ * @param publishedAsset This creates / adds an unique published asset ID and adds the information to the asset (in 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 httpPublishedAssetsCreate(id: string, publishedAsset: PublishedAsset, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<PublishedAsset>;
97
+ public httpPublishedAssetsCreate(id: string, publishedAsset: PublishedAsset, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<PublishedAsset>>;
98
+ public httpPublishedAssetsCreate(id: string, publishedAsset: PublishedAsset, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<PublishedAsset>>;
99
+ public httpPublishedAssetsCreate(id: string, publishedAsset: PublishedAsset, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
100
+ if (id === null || id === undefined) {
101
+ throw new Error('Required parameter id was null or undefined when calling httpPublishedAssetsCreate.');
102
+ }
103
+ if (publishedAsset === null || publishedAsset === undefined) {
104
+ throw new Error('Required parameter publishedAsset was null or undefined when calling httpPublishedAssetsCreate.');
105
+ }
106
+
107
+ let headers = this.defaultHeaders;
108
+
109
+ let credential: string | undefined;
110
+ // authentication (function_key) required
111
+ credential = this.configuration.lookupCredential('function_key');
112
+ if (credential) {
113
+ headers = headers.set('x-functions-key', credential);
114
+ }
115
+
116
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
117
+ if (httpHeaderAcceptSelected === undefined) {
118
+ // to determine the Accept header
119
+ const httpHeaderAccepts: string[] = [
120
+ 'application/json'
121
+ ];
122
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
123
+ }
124
+ if (httpHeaderAcceptSelected !== undefined) {
125
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
126
+ }
127
+
128
+
129
+ // to determine the Content-Type header
130
+ const consumes: string[] = [
131
+ 'application/json'
132
+ ];
133
+ const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
134
+ if (httpContentTypeSelected !== undefined) {
135
+ headers = headers.set('Content-Type', httpContentTypeSelected);
136
+ }
137
+
138
+ let responseType_: 'text' | 'json' = 'json';
139
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
140
+ responseType_ = 'text';
141
+ }
142
+
143
+ return this.httpClient.post<PublishedAsset>(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/publish`,
144
+ publishedAsset,
145
+ {
146
+ responseType: <any>responseType_,
147
+ withCredentials: this.configuration.withCredentials,
148
+ headers: headers,
149
+ observe: observe,
150
+ reportProgress: reportProgress
151
+ }
152
+ );
153
+ }
154
+
155
+ /**
156
+ * This endpoint lists all the published assets which are stored in the database if asset is still valid.
157
+ * @param id The ID of the asset.
158
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
159
+ * @param reportProgress flag to report request and response progress.
160
+ */
161
+ public httpPublishedAssetsGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<PublishEntity>;
162
+ public httpPublishedAssetsGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<PublishEntity>>;
163
+ public httpPublishedAssetsGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<PublishEntity>>;
164
+ public httpPublishedAssetsGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
165
+ if (id === null || id === undefined) {
166
+ throw new Error('Required parameter id was null or undefined when calling httpPublishedAssetsGet.');
167
+ }
168
+
169
+ let headers = this.defaultHeaders;
170
+
171
+ let credential: string | undefined;
172
+ // authentication (function_key) required
173
+ credential = this.configuration.lookupCredential('function_key');
174
+ if (credential) {
175
+ headers = headers.set('x-functions-key', credential);
176
+ }
177
+
178
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
179
+ if (httpHeaderAcceptSelected === undefined) {
180
+ // to determine the Accept header
181
+ const httpHeaderAccepts: string[] = [
182
+ 'application/json'
183
+ ];
184
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
185
+ }
186
+ if (httpHeaderAcceptSelected !== undefined) {
187
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
188
+ }
189
+
190
+
191
+ let responseType_: 'text' | 'json' = 'json';
192
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
193
+ responseType_ = 'text';
194
+ }
195
+
196
+ return this.httpClient.get<PublishEntity>(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/publish`,
197
+ {
198
+ responseType: <any>responseType_,
199
+ withCredentials: this.configuration.withCredentials,
200
+ headers: headers,
201
+ observe: observe,
202
+ reportProgress: reportProgress
203
+ }
204
+ );
205
+ }
206
+
207
+ /**
208
+ * This endpoint returns one single published asset (from ID). Not checked if assetId is not deleted!
209
+ * @param id The ID of the asset.
210
+ * @param pid The published asset ID.
211
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
212
+ * @param reportProgress flag to report request and response progress.
213
+ */
214
+ public httpPublishedAssetsGetById(id: string, pid: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<PublishedAsset>;
215
+ public httpPublishedAssetsGetById(id: string, pid: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<PublishedAsset>>;
216
+ public httpPublishedAssetsGetById(id: string, pid: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<PublishedAsset>>;
217
+ public httpPublishedAssetsGetById(id: string, pid: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> {
218
+ if (id === null || id === undefined) {
219
+ throw new Error('Required parameter id was null or undefined when calling httpPublishedAssetsGetById.');
220
+ }
221
+ if (pid === null || pid === undefined) {
222
+ throw new Error('Required parameter pid was null or undefined when calling httpPublishedAssetsGetById.');
223
+ }
224
+
225
+ let headers = this.defaultHeaders;
226
+
227
+ let credential: string | undefined;
228
+ // authentication (function_key) required
229
+ credential = this.configuration.lookupCredential('function_key');
230
+ if (credential) {
231
+ headers = headers.set('x-functions-key', credential);
232
+ }
233
+
234
+ let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
235
+ if (httpHeaderAcceptSelected === undefined) {
236
+ // to determine the Accept header
237
+ const httpHeaderAccepts: string[] = [
238
+ 'application/json'
239
+ ];
240
+ httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
241
+ }
242
+ if (httpHeaderAcceptSelected !== undefined) {
243
+ headers = headers.set('Accept', httpHeaderAcceptSelected);
244
+ }
245
+
246
+
247
+ let responseType_: 'text' | 'json' = 'json';
248
+ if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) {
249
+ responseType_ = 'text';
250
+ }
251
+
252
+ return this.httpClient.get<PublishedAsset>(`${this.configuration.basePath}/assets/${encodeURIComponent(String(id))}/publish/${encodeURIComponent(String(pid))}`,
253
+ {
254
+ responseType: <any>responseType_,
255
+ withCredentials: this.configuration.withCredentials,
256
+ headers: headers,
257
+ observe: observe,
258
+ reportProgress: reportProgress
259
+ }
260
+ );
261
+ }
262
+
263
+ }