@agravity/public 9.4.0 → 10.0.1
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.
- package/.openapi-generator/FILES +4 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +97 -142
- package/api/api.ts +3 -0
- package/api/publicAIOperations.pub.agravity.ts +160 -0
- package/api/publicAssetManagement.pub.agravity.ts +67 -236
- package/api/publicAssetOperations.pub.agravity.ts +139 -380
- package/api/publicAssetPublishing.pub.agravity.ts +37 -132
- package/api/publicAssetRelationManagement.pub.agravity.ts +57 -192
- package/api/publicAssetVersioning.pub.agravity.ts +82 -249
- package/api/publicAuthenticationManagement.pub.agravity.ts +23 -106
- package/api/publicCollectionManagement.pub.agravity.ts +116 -321
- package/api/publicCollectionSecureUpload.pub.agravity.ts +29 -114
- package/api/publicCollectionTypeManagement.pub.agravity.ts +33 -136
- package/api/publicConfigurationManagement.pub.agravity.ts +11 -76
- package/api/publicDownloadFormatManagement.pub.agravity.ts +22 -101
- package/api/publicEndpoints.pub.agravity.ts +18 -89
- package/api/publicGeneralManagement.pub.agravity.ts +41 -146
- package/api/publicHelperTools.pub.agravity.ts +43 -174
- package/api/publicPortalManagement.pub.agravity.ts +74 -227
- package/api/publicPublishing.pub.agravity.ts +13 -84
- package/api/publicSavedSearch.pub.agravity.ts +13 -84
- package/api/publicSearchManagement.pub.agravity.ts +58 -203
- package/api/publicSharingManagement.pub.agravity.ts +50 -155
- package/api/publicSignalRConnectionManagement.pub.agravity.ts +11 -78
- package/api/publicStaticDefinedListManagement.pub.agravity.ts +37 -140
- package/api/publicTranslationManagement.pub.agravity.ts +48 -147
- package/api/publicWebAppData.pub.agravity.ts +26 -107
- package/api/publicWorkspaceManagement.pub.agravity.ts +24 -109
- package/api.base.service.ts +78 -0
- package/configuration.ts +33 -17
- package/index.ts +1 -0
- package/model/asset.pub.agravity.ts +6 -6
- package/model/assetBlob.pub.agravity.ts +15 -15
- package/model/assetIconRule.pub.agravity.ts +1 -1
- package/model/collTypeItem.pub.agravity.ts +1 -1
- package/model/collection.pub.agravity.ts +6 -6
- package/model/collectionType.pub.agravity.ts +6 -6
- package/model/collectionUDL.pub.agravity.ts +1 -1
- package/model/downloadFormat.pub.agravity.ts +1 -1
- package/model/downloadZipRequest.pub.agravity.ts +6 -6
- package/model/downloadZipStatus.pub.agravity.ts +6 -6
- package/model/entityIdName.pub.agravity.ts +1 -1
- package/model/groupAllAppData.pub.agravity.ts +1 -1
- package/model/permissionEntity.pub.agravity.ts +5 -5
- package/model/portalAuthentication.pub.agravity.ts +7 -7
- package/model/portalTheme.pub.agravity.ts +1 -1
- package/model/publishedAsset.pub.agravity.ts +1 -1
- package/model/savedSearch.pub.agravity.ts +1 -1
- package/model/staticDefinedList.pub.agravity.ts +1 -1
- package/model/whereParam.pub.agravity.ts +17 -17
- package/model/workspace.pub.agravity.ts +1 -1
- package/package.json +5 -4
- package/provide-api.ts +15 -0
- package/tsconfig.json +2 -0
|
@@ -20,6 +20,7 @@ import { AgravityErrorResponse } from '../model/agravityErrorResponse.pub.agravi
|
|
|
20
20
|
// @ts-ignore
|
|
21
21
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
|
22
22
|
import { AgravityPublicConfiguration } from '../configuration';
|
|
23
|
+
import { BaseService } from '../api.base.service';
|
|
23
24
|
|
|
24
25
|
export interface HttpTranslationsByIdRequestParams {
|
|
25
26
|
/** The ID of any translateable entity (Asset, Collection, Collection Type, Download Format). */
|
|
@@ -47,67 +48,13 @@ export interface HttpTranslationsByIdFilterByPropertyRequestParams {
|
|
|
47
48
|
@Injectable({
|
|
48
49
|
providedIn: 'root'
|
|
49
50
|
})
|
|
50
|
-
export class PublicTranslationManagementService {
|
|
51
|
-
protected basePath = 'http://localhost:7072/api';
|
|
52
|
-
public defaultHeaders = new HttpHeaders();
|
|
53
|
-
public configuration = new AgravityPublicConfiguration();
|
|
54
|
-
public encoder: HttpParameterCodec;
|
|
55
|
-
|
|
51
|
+
export class PublicTranslationManagementService extends BaseService {
|
|
56
52
|
constructor(
|
|
57
53
|
protected httpClient: HttpClient,
|
|
58
54
|
@Optional() @Inject(BASE_PATH) basePath: string | string[],
|
|
59
|
-
@Optional() configuration
|
|
55
|
+
@Optional() configuration?: AgravityPublicConfiguration
|
|
60
56
|
) {
|
|
61
|
-
|
|
62
|
-
this.configuration = configuration;
|
|
63
|
-
}
|
|
64
|
-
if (typeof this.configuration.basePath !== 'string') {
|
|
65
|
-
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
|
|
66
|
-
if (firstBasePath != undefined) {
|
|
67
|
-
basePath = firstBasePath;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (typeof basePath !== 'string') {
|
|
71
|
-
basePath = this.basePath;
|
|
72
|
-
}
|
|
73
|
-
this.configuration.basePath = basePath;
|
|
74
|
-
}
|
|
75
|
-
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// @ts-ignore
|
|
79
|
-
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
|
|
80
|
-
if (typeof value === 'object' && value instanceof Date === false) {
|
|
81
|
-
httpParams = this.addToHttpParamsRecursive(httpParams, value);
|
|
82
|
-
} else {
|
|
83
|
-
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
|
|
84
|
-
}
|
|
85
|
-
return httpParams;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
|
|
89
|
-
if (value == null) {
|
|
90
|
-
return httpParams;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
if (typeof value === 'object') {
|
|
94
|
-
if (Array.isArray(value)) {
|
|
95
|
-
(value as any[]).forEach((elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)));
|
|
96
|
-
} else if (value instanceof Date) {
|
|
97
|
-
if (key != null) {
|
|
98
|
-
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
|
99
|
-
} else {
|
|
100
|
-
throw Error('key may not be null if value is Date');
|
|
101
|
-
}
|
|
102
|
-
} else {
|
|
103
|
-
Object.keys(value).forEach((k) => (httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)));
|
|
104
|
-
}
|
|
105
|
-
} else if (key != null) {
|
|
106
|
-
httpParams = httpParams.append(key, value);
|
|
107
|
-
} else {
|
|
108
|
-
throw Error('key may not be null if value is not object or array');
|
|
109
|
-
}
|
|
110
|
-
return httpParams;
|
|
57
|
+
super(basePath, configuration);
|
|
111
58
|
}
|
|
112
59
|
|
|
113
60
|
/**
|
|
@@ -117,25 +64,25 @@ export class PublicTranslationManagementService {
|
|
|
117
64
|
* @param reportProgress flag to report request and response progress.
|
|
118
65
|
*/
|
|
119
66
|
public httpTranslationsById(
|
|
120
|
-
requestParameters
|
|
67
|
+
requestParameters: HttpTranslationsByIdRequestParams,
|
|
121
68
|
observe?: 'body',
|
|
122
69
|
reportProgress?: boolean,
|
|
123
70
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
124
|
-
): Observable<{ [key: string]: { [key: string]:
|
|
71
|
+
): Observable<{ [key: string]: { [key: string]: any } }>;
|
|
125
72
|
public httpTranslationsById(
|
|
126
|
-
requestParameters
|
|
73
|
+
requestParameters: HttpTranslationsByIdRequestParams,
|
|
127
74
|
observe?: 'response',
|
|
128
75
|
reportProgress?: boolean,
|
|
129
76
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
130
|
-
): Observable<HttpResponse<{ [key: string]: { [key: string]:
|
|
77
|
+
): Observable<HttpResponse<{ [key: string]: { [key: string]: any } }>>;
|
|
131
78
|
public httpTranslationsById(
|
|
132
|
-
requestParameters
|
|
79
|
+
requestParameters: HttpTranslationsByIdRequestParams,
|
|
133
80
|
observe?: 'events',
|
|
134
81
|
reportProgress?: boolean,
|
|
135
82
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
136
|
-
): Observable<HttpEvent<{ [key: string]: { [key: string]:
|
|
83
|
+
): Observable<HttpEvent<{ [key: string]: { [key: string]: any } }>>;
|
|
137
84
|
public httpTranslationsById(
|
|
138
|
-
requestParameters
|
|
85
|
+
requestParameters: HttpTranslationsByIdRequestParams,
|
|
139
86
|
observe: any = 'body',
|
|
140
87
|
reportProgress: boolean = false,
|
|
141
88
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
@@ -147,38 +94,21 @@ export class PublicTranslationManagementService {
|
|
|
147
94
|
const items = requestParameters?.items;
|
|
148
95
|
|
|
149
96
|
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
|
|
150
|
-
|
|
151
|
-
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>items, 'items');
|
|
152
|
-
}
|
|
97
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>items, 'items');
|
|
153
98
|
|
|
154
99
|
let localVarHeaders = this.defaultHeaders;
|
|
155
100
|
|
|
156
|
-
let localVarCredential: string | undefined;
|
|
157
101
|
// authentication (function_key) required
|
|
158
|
-
|
|
159
|
-
if (localVarCredential) {
|
|
160
|
-
localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
|
|
161
|
-
}
|
|
102
|
+
localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);
|
|
162
103
|
|
|
163
|
-
|
|
164
|
-
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
165
|
-
// to determine the Accept header
|
|
166
|
-
const httpHeaderAccepts: string[] = ['application/json'];
|
|
167
|
-
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
168
|
-
}
|
|
104
|
+
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
|
|
169
105
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
170
106
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
171
107
|
}
|
|
172
108
|
|
|
173
|
-
|
|
174
|
-
if (localVarHttpContext === undefined) {
|
|
175
|
-
localVarHttpContext = new HttpContext();
|
|
176
|
-
}
|
|
109
|
+
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
|
177
110
|
|
|
178
|
-
|
|
179
|
-
if (localVarTransferCache === undefined) {
|
|
180
|
-
localVarTransferCache = true;
|
|
181
|
-
}
|
|
111
|
+
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
182
112
|
|
|
183
113
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
184
114
|
if (localVarHttpHeaderAcceptSelected) {
|
|
@@ -192,11 +122,12 @@ export class PublicTranslationManagementService {
|
|
|
192
122
|
}
|
|
193
123
|
|
|
194
124
|
let localVarPath = `/translations/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
|
|
195
|
-
|
|
125
|
+
const { basePath, withCredentials } = this.configuration;
|
|
126
|
+
return this.httpClient.request<{ [key: string]: { [key: string]: any } }>('get', `${basePath}${localVarPath}`, {
|
|
196
127
|
context: localVarHttpContext,
|
|
197
128
|
params: localVarQueryParameters,
|
|
198
129
|
responseType: <any>responseType_,
|
|
199
|
-
withCredentials:
|
|
130
|
+
...(withCredentials ? { withCredentials } : {}),
|
|
200
131
|
headers: localVarHeaders,
|
|
201
132
|
observe: observe,
|
|
202
133
|
transferCache: localVarTransferCache,
|
|
@@ -211,25 +142,25 @@ export class PublicTranslationManagementService {
|
|
|
211
142
|
* @param reportProgress flag to report request and response progress.
|
|
212
143
|
*/
|
|
213
144
|
public httpTranslationsByIdFilterByCustomField(
|
|
214
|
-
requestParameters
|
|
145
|
+
requestParameters: HttpTranslationsByIdFilterByCustomFieldRequestParams,
|
|
215
146
|
observe?: 'body',
|
|
216
147
|
reportProgress?: boolean,
|
|
217
148
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
218
|
-
): Observable<{ [key: string]: { [key: string]:
|
|
149
|
+
): Observable<{ [key: string]: { [key: string]: any } }>;
|
|
219
150
|
public httpTranslationsByIdFilterByCustomField(
|
|
220
|
-
requestParameters
|
|
151
|
+
requestParameters: HttpTranslationsByIdFilterByCustomFieldRequestParams,
|
|
221
152
|
observe?: 'response',
|
|
222
153
|
reportProgress?: boolean,
|
|
223
154
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
224
|
-
): Observable<HttpResponse<{ [key: string]: { [key: string]:
|
|
155
|
+
): Observable<HttpResponse<{ [key: string]: { [key: string]: any } }>>;
|
|
225
156
|
public httpTranslationsByIdFilterByCustomField(
|
|
226
|
-
requestParameters
|
|
157
|
+
requestParameters: HttpTranslationsByIdFilterByCustomFieldRequestParams,
|
|
227
158
|
observe?: 'events',
|
|
228
159
|
reportProgress?: boolean,
|
|
229
160
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
230
|
-
): Observable<HttpEvent<{ [key: string]: { [key: string]:
|
|
161
|
+
): Observable<HttpEvent<{ [key: string]: { [key: string]: any } }>>;
|
|
231
162
|
public httpTranslationsByIdFilterByCustomField(
|
|
232
|
-
requestParameters
|
|
163
|
+
requestParameters: HttpTranslationsByIdFilterByCustomFieldRequestParams,
|
|
233
164
|
observe: any = 'body',
|
|
234
165
|
reportProgress: boolean = false,
|
|
235
166
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
@@ -245,32 +176,17 @@ export class PublicTranslationManagementService {
|
|
|
245
176
|
|
|
246
177
|
let localVarHeaders = this.defaultHeaders;
|
|
247
178
|
|
|
248
|
-
let localVarCredential: string | undefined;
|
|
249
179
|
// authentication (function_key) required
|
|
250
|
-
|
|
251
|
-
if (localVarCredential) {
|
|
252
|
-
localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
|
|
253
|
-
}
|
|
180
|
+
localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);
|
|
254
181
|
|
|
255
|
-
|
|
256
|
-
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
257
|
-
// to determine the Accept header
|
|
258
|
-
const httpHeaderAccepts: string[] = ['application/json'];
|
|
259
|
-
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
260
|
-
}
|
|
182
|
+
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
|
|
261
183
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
262
184
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
263
185
|
}
|
|
264
186
|
|
|
265
|
-
|
|
266
|
-
if (localVarHttpContext === undefined) {
|
|
267
|
-
localVarHttpContext = new HttpContext();
|
|
268
|
-
}
|
|
187
|
+
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
|
269
188
|
|
|
270
|
-
|
|
271
|
-
if (localVarTransferCache === undefined) {
|
|
272
|
-
localVarTransferCache = true;
|
|
273
|
-
}
|
|
189
|
+
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
274
190
|
|
|
275
191
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
276
192
|
if (localVarHttpHeaderAcceptSelected) {
|
|
@@ -284,10 +200,11 @@ export class PublicTranslationManagementService {
|
|
|
284
200
|
}
|
|
285
201
|
|
|
286
202
|
let localVarPath = `/translations/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/custom/${this.configuration.encodeParam({ name: 'customField', value: customField, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
|
|
287
|
-
|
|
203
|
+
const { basePath, withCredentials } = this.configuration;
|
|
204
|
+
return this.httpClient.request<{ [key: string]: { [key: string]: any } }>('get', `${basePath}${localVarPath}`, {
|
|
288
205
|
context: localVarHttpContext,
|
|
289
206
|
responseType: <any>responseType_,
|
|
290
|
-
withCredentials:
|
|
207
|
+
...(withCredentials ? { withCredentials } : {}),
|
|
291
208
|
headers: localVarHeaders,
|
|
292
209
|
observe: observe,
|
|
293
210
|
transferCache: localVarTransferCache,
|
|
@@ -302,25 +219,25 @@ export class PublicTranslationManagementService {
|
|
|
302
219
|
* @param reportProgress flag to report request and response progress.
|
|
303
220
|
*/
|
|
304
221
|
public httpTranslationsByIdFilterByProperty(
|
|
305
|
-
requestParameters
|
|
222
|
+
requestParameters: HttpTranslationsByIdFilterByPropertyRequestParams,
|
|
306
223
|
observe?: 'body',
|
|
307
224
|
reportProgress?: boolean,
|
|
308
225
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
309
|
-
): Observable<{ [key: string]: { [key: string]:
|
|
226
|
+
): Observable<{ [key: string]: { [key: string]: any } }>;
|
|
310
227
|
public httpTranslationsByIdFilterByProperty(
|
|
311
|
-
requestParameters
|
|
228
|
+
requestParameters: HttpTranslationsByIdFilterByPropertyRequestParams,
|
|
312
229
|
observe?: 'response',
|
|
313
230
|
reportProgress?: boolean,
|
|
314
231
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
315
|
-
): Observable<HttpResponse<{ [key: string]: { [key: string]:
|
|
232
|
+
): Observable<HttpResponse<{ [key: string]: { [key: string]: any } }>>;
|
|
316
233
|
public httpTranslationsByIdFilterByProperty(
|
|
317
|
-
requestParameters
|
|
234
|
+
requestParameters: HttpTranslationsByIdFilterByPropertyRequestParams,
|
|
318
235
|
observe?: 'events',
|
|
319
236
|
reportProgress?: boolean,
|
|
320
237
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
321
|
-
): Observable<HttpEvent<{ [key: string]: { [key: string]:
|
|
238
|
+
): Observable<HttpEvent<{ [key: string]: { [key: string]: any } }>>;
|
|
322
239
|
public httpTranslationsByIdFilterByProperty(
|
|
323
|
-
requestParameters
|
|
240
|
+
requestParameters: HttpTranslationsByIdFilterByPropertyRequestParams,
|
|
324
241
|
observe: any = 'body',
|
|
325
242
|
reportProgress: boolean = false,
|
|
326
243
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
@@ -336,38 +253,21 @@ export class PublicTranslationManagementService {
|
|
|
336
253
|
const items = requestParameters?.items;
|
|
337
254
|
|
|
338
255
|
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
|
|
339
|
-
|
|
340
|
-
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>items, 'items');
|
|
341
|
-
}
|
|
256
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>items, 'items');
|
|
342
257
|
|
|
343
258
|
let localVarHeaders = this.defaultHeaders;
|
|
344
259
|
|
|
345
|
-
let localVarCredential: string | undefined;
|
|
346
260
|
// authentication (function_key) required
|
|
347
|
-
|
|
348
|
-
if (localVarCredential) {
|
|
349
|
-
localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
|
|
350
|
-
}
|
|
261
|
+
localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);
|
|
351
262
|
|
|
352
|
-
|
|
353
|
-
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
354
|
-
// to determine the Accept header
|
|
355
|
-
const httpHeaderAccepts: string[] = ['application/json'];
|
|
356
|
-
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
357
|
-
}
|
|
263
|
+
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
|
|
358
264
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
359
265
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
360
266
|
}
|
|
361
267
|
|
|
362
|
-
|
|
363
|
-
if (localVarHttpContext === undefined) {
|
|
364
|
-
localVarHttpContext = new HttpContext();
|
|
365
|
-
}
|
|
268
|
+
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
|
366
269
|
|
|
367
|
-
|
|
368
|
-
if (localVarTransferCache === undefined) {
|
|
369
|
-
localVarTransferCache = true;
|
|
370
|
-
}
|
|
270
|
+
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
371
271
|
|
|
372
272
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
373
273
|
if (localVarHttpHeaderAcceptSelected) {
|
|
@@ -381,11 +281,12 @@ export class PublicTranslationManagementService {
|
|
|
381
281
|
}
|
|
382
282
|
|
|
383
283
|
let localVarPath = `/translations/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/${this.configuration.encodeParam({ name: 'property', value: property, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
|
|
384
|
-
|
|
284
|
+
const { basePath, withCredentials } = this.configuration;
|
|
285
|
+
return this.httpClient.request<{ [key: string]: { [key: string]: any } }>('get', `${basePath}${localVarPath}`, {
|
|
385
286
|
context: localVarHttpContext,
|
|
386
287
|
params: localVarQueryParameters,
|
|
387
288
|
responseType: <any>responseType_,
|
|
388
|
-
withCredentials:
|
|
289
|
+
...(withCredentials ? { withCredentials } : {}),
|
|
389
290
|
headers: localVarHeaders,
|
|
390
291
|
observe: observe,
|
|
391
292
|
transferCache: localVarTransferCache,
|
|
@@ -24,6 +24,7 @@ import { GroupAllAppData } from '../model/groupAllAppData.pub.agravity';
|
|
|
24
24
|
// @ts-ignore
|
|
25
25
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
|
26
26
|
import { AgravityPublicConfiguration } from '../configuration';
|
|
27
|
+
import { BaseService } from '../api.base.service';
|
|
27
28
|
|
|
28
29
|
export interface HttpGetDataCollectionTypeRequestParams {
|
|
29
30
|
/** The ID of the collection type for which this web data should be prepared. */
|
|
@@ -38,67 +39,13 @@ export interface HttpGetWebAppDataRequestParams {
|
|
|
38
39
|
@Injectable({
|
|
39
40
|
providedIn: 'root'
|
|
40
41
|
})
|
|
41
|
-
export class PublicWebAppDataService {
|
|
42
|
-
protected basePath = 'http://localhost:7072/api';
|
|
43
|
-
public defaultHeaders = new HttpHeaders();
|
|
44
|
-
public configuration = new AgravityPublicConfiguration();
|
|
45
|
-
public encoder: HttpParameterCodec;
|
|
46
|
-
|
|
42
|
+
export class PublicWebAppDataService extends BaseService {
|
|
47
43
|
constructor(
|
|
48
44
|
protected httpClient: HttpClient,
|
|
49
45
|
@Optional() @Inject(BASE_PATH) basePath: string | string[],
|
|
50
|
-
@Optional() configuration
|
|
46
|
+
@Optional() configuration?: AgravityPublicConfiguration
|
|
51
47
|
) {
|
|
52
|
-
|
|
53
|
-
this.configuration = configuration;
|
|
54
|
-
}
|
|
55
|
-
if (typeof this.configuration.basePath !== 'string') {
|
|
56
|
-
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
|
|
57
|
-
if (firstBasePath != undefined) {
|
|
58
|
-
basePath = firstBasePath;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (typeof basePath !== 'string') {
|
|
62
|
-
basePath = this.basePath;
|
|
63
|
-
}
|
|
64
|
-
this.configuration.basePath = basePath;
|
|
65
|
-
}
|
|
66
|
-
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// @ts-ignore
|
|
70
|
-
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
|
|
71
|
-
if (typeof value === 'object' && value instanceof Date === false) {
|
|
72
|
-
httpParams = this.addToHttpParamsRecursive(httpParams, value);
|
|
73
|
-
} else {
|
|
74
|
-
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
|
|
75
|
-
}
|
|
76
|
-
return httpParams;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
|
|
80
|
-
if (value == null) {
|
|
81
|
-
return httpParams;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
if (typeof value === 'object') {
|
|
85
|
-
if (Array.isArray(value)) {
|
|
86
|
-
(value as any[]).forEach((elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)));
|
|
87
|
-
} else if (value instanceof Date) {
|
|
88
|
-
if (key != null) {
|
|
89
|
-
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
|
|
90
|
-
} else {
|
|
91
|
-
throw Error('key may not be null if value is Date');
|
|
92
|
-
}
|
|
93
|
-
} else {
|
|
94
|
-
Object.keys(value).forEach((k) => (httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)));
|
|
95
|
-
}
|
|
96
|
-
} else if (key != null) {
|
|
97
|
-
httpParams = httpParams.append(key, value);
|
|
98
|
-
} else {
|
|
99
|
-
throw Error('key may not be null if value is not object or array');
|
|
100
|
-
}
|
|
101
|
-
return httpParams;
|
|
48
|
+
super(basePath, configuration);
|
|
102
49
|
}
|
|
103
50
|
|
|
104
51
|
/**
|
|
@@ -108,25 +55,25 @@ export class PublicWebAppDataService {
|
|
|
108
55
|
* @param reportProgress flag to report request and response progress.
|
|
109
56
|
*/
|
|
110
57
|
public httpGetDataCollectionType(
|
|
111
|
-
requestParameters
|
|
58
|
+
requestParameters: HttpGetDataCollectionTypeRequestParams,
|
|
112
59
|
observe?: 'body',
|
|
113
60
|
reportProgress?: boolean,
|
|
114
61
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
115
62
|
): Observable<GroupAllAppData>;
|
|
116
63
|
public httpGetDataCollectionType(
|
|
117
|
-
requestParameters
|
|
64
|
+
requestParameters: HttpGetDataCollectionTypeRequestParams,
|
|
118
65
|
observe?: 'response',
|
|
119
66
|
reportProgress?: boolean,
|
|
120
67
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
121
68
|
): Observable<HttpResponse<GroupAllAppData>>;
|
|
122
69
|
public httpGetDataCollectionType(
|
|
123
|
-
requestParameters
|
|
70
|
+
requestParameters: HttpGetDataCollectionTypeRequestParams,
|
|
124
71
|
observe?: 'events',
|
|
125
72
|
reportProgress?: boolean,
|
|
126
73
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
127
74
|
): Observable<HttpEvent<GroupAllAppData>>;
|
|
128
75
|
public httpGetDataCollectionType(
|
|
129
|
-
requestParameters
|
|
76
|
+
requestParameters: HttpGetDataCollectionTypeRequestParams,
|
|
130
77
|
observe: any = 'body',
|
|
131
78
|
reportProgress: boolean = false,
|
|
132
79
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
@@ -138,32 +85,17 @@ export class PublicWebAppDataService {
|
|
|
138
85
|
|
|
139
86
|
let localVarHeaders = this.defaultHeaders;
|
|
140
87
|
|
|
141
|
-
let localVarCredential: string | undefined;
|
|
142
88
|
// authentication (function_key) required
|
|
143
|
-
|
|
144
|
-
if (localVarCredential) {
|
|
145
|
-
localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
|
|
146
|
-
}
|
|
89
|
+
localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);
|
|
147
90
|
|
|
148
|
-
|
|
149
|
-
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
150
|
-
// to determine the Accept header
|
|
151
|
-
const httpHeaderAccepts: string[] = ['application/json'];
|
|
152
|
-
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
153
|
-
}
|
|
91
|
+
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
|
|
154
92
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
155
93
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
156
94
|
}
|
|
157
95
|
|
|
158
|
-
|
|
159
|
-
if (localVarHttpContext === undefined) {
|
|
160
|
-
localVarHttpContext = new HttpContext();
|
|
161
|
-
}
|
|
96
|
+
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
|
162
97
|
|
|
163
|
-
|
|
164
|
-
if (localVarTransferCache === undefined) {
|
|
165
|
-
localVarTransferCache = true;
|
|
166
|
-
}
|
|
98
|
+
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
167
99
|
|
|
168
100
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
169
101
|
if (localVarHttpHeaderAcceptSelected) {
|
|
@@ -177,10 +109,11 @@ export class PublicWebAppDataService {
|
|
|
177
109
|
}
|
|
178
110
|
|
|
179
111
|
let localVarPath = `/data/collectiontype/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
|
|
180
|
-
|
|
112
|
+
const { basePath, withCredentials } = this.configuration;
|
|
113
|
+
return this.httpClient.request<GroupAllAppData>('get', `${basePath}${localVarPath}`, {
|
|
181
114
|
context: localVarHttpContext,
|
|
182
115
|
responseType: <any>responseType_,
|
|
183
|
-
withCredentials:
|
|
116
|
+
...(withCredentials ? { withCredentials } : {}),
|
|
184
117
|
headers: localVarHeaders,
|
|
185
118
|
observe: observe,
|
|
186
119
|
transferCache: localVarTransferCache,
|
|
@@ -195,25 +128,25 @@ export class PublicWebAppDataService {
|
|
|
195
128
|
* @param reportProgress flag to report request and response progress.
|
|
196
129
|
*/
|
|
197
130
|
public httpGetWebAppData(
|
|
198
|
-
requestParameters
|
|
131
|
+
requestParameters: HttpGetWebAppDataRequestParams,
|
|
199
132
|
observe?: 'body',
|
|
200
133
|
reportProgress?: boolean,
|
|
201
134
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
202
135
|
): Observable<AllWebAppData>;
|
|
203
136
|
public httpGetWebAppData(
|
|
204
|
-
requestParameters
|
|
137
|
+
requestParameters: HttpGetWebAppDataRequestParams,
|
|
205
138
|
observe?: 'response',
|
|
206
139
|
reportProgress?: boolean,
|
|
207
140
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
208
141
|
): Observable<HttpResponse<AllWebAppData>>;
|
|
209
142
|
public httpGetWebAppData(
|
|
210
|
-
requestParameters
|
|
143
|
+
requestParameters: HttpGetWebAppDataRequestParams,
|
|
211
144
|
observe?: 'events',
|
|
212
145
|
reportProgress?: boolean,
|
|
213
146
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
214
147
|
): Observable<HttpEvent<AllWebAppData>>;
|
|
215
148
|
public httpGetWebAppData(
|
|
216
|
-
requestParameters
|
|
149
|
+
requestParameters: HttpGetWebAppDataRequestParams,
|
|
217
150
|
observe: any = 'body',
|
|
218
151
|
reportProgress: boolean = false,
|
|
219
152
|
options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
|
|
@@ -225,32 +158,17 @@ export class PublicWebAppDataService {
|
|
|
225
158
|
|
|
226
159
|
let localVarHeaders = this.defaultHeaders;
|
|
227
160
|
|
|
228
|
-
let localVarCredential: string | undefined;
|
|
229
161
|
// authentication (function_key) required
|
|
230
|
-
|
|
231
|
-
if (localVarCredential) {
|
|
232
|
-
localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
|
|
233
|
-
}
|
|
162
|
+
localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);
|
|
234
163
|
|
|
235
|
-
|
|
236
|
-
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
237
|
-
// to determine the Accept header
|
|
238
|
-
const httpHeaderAccepts: string[] = ['application/json'];
|
|
239
|
-
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
240
|
-
}
|
|
164
|
+
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
|
|
241
165
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
242
166
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
243
167
|
}
|
|
244
168
|
|
|
245
|
-
|
|
246
|
-
if (localVarHttpContext === undefined) {
|
|
247
|
-
localVarHttpContext = new HttpContext();
|
|
248
|
-
}
|
|
169
|
+
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
|
249
170
|
|
|
250
|
-
|
|
251
|
-
if (localVarTransferCache === undefined) {
|
|
252
|
-
localVarTransferCache = true;
|
|
253
|
-
}
|
|
171
|
+
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
254
172
|
|
|
255
173
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
256
174
|
if (localVarHttpHeaderAcceptSelected) {
|
|
@@ -264,10 +182,11 @@ export class PublicWebAppDataService {
|
|
|
264
182
|
}
|
|
265
183
|
|
|
266
184
|
let localVarPath = `/webappdata/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
|
|
267
|
-
|
|
185
|
+
const { basePath, withCredentials } = this.configuration;
|
|
186
|
+
return this.httpClient.request<AllWebAppData>('get', `${basePath}${localVarPath}`, {
|
|
268
187
|
context: localVarHttpContext,
|
|
269
188
|
responseType: <any>responseType_,
|
|
270
|
-
withCredentials:
|
|
189
|
+
...(withCredentials ? { withCredentials } : {}),
|
|
271
190
|
headers: localVarHeaders,
|
|
272
191
|
observe: observe,
|
|
273
192
|
transferCache: localVarTransferCache,
|