@agravity/public 9.3.0 → 10.0.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 (55) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +97 -142
  4. package/api/api.ts +3 -0
  5. package/api/publicAIOperations.pub.agravity.ts +160 -0
  6. package/api/publicAssetManagement.pub.agravity.ts +67 -236
  7. package/api/publicAssetOperations.pub.agravity.ts +139 -380
  8. package/api/publicAssetPublishing.pub.agravity.ts +37 -132
  9. package/api/publicAssetRelationManagement.pub.agravity.ts +57 -192
  10. package/api/publicAssetVersioning.pub.agravity.ts +82 -249
  11. package/api/publicAuthenticationManagement.pub.agravity.ts +23 -106
  12. package/api/publicCollectionManagement.pub.agravity.ts +116 -321
  13. package/api/publicCollectionSecureUpload.pub.agravity.ts +29 -114
  14. package/api/publicCollectionTypeManagement.pub.agravity.ts +33 -136
  15. package/api/publicConfigurationManagement.pub.agravity.ts +11 -76
  16. package/api/publicDownloadFormatManagement.pub.agravity.ts +22 -101
  17. package/api/publicEndpoints.pub.agravity.ts +18 -89
  18. package/api/publicGeneralManagement.pub.agravity.ts +41 -146
  19. package/api/publicHelperTools.pub.agravity.ts +43 -174
  20. package/api/publicPortalManagement.pub.agravity.ts +74 -227
  21. package/api/publicPublishing.pub.agravity.ts +13 -84
  22. package/api/publicSavedSearch.pub.agravity.ts +13 -84
  23. package/api/publicSearchManagement.pub.agravity.ts +58 -203
  24. package/api/publicSharingManagement.pub.agravity.ts +50 -155
  25. package/api/publicSignalRConnectionManagement.pub.agravity.ts +11 -78
  26. package/api/publicStaticDefinedListManagement.pub.agravity.ts +37 -140
  27. package/api/publicTranslationManagement.pub.agravity.ts +48 -147
  28. package/api/publicWebAppData.pub.agravity.ts +26 -107
  29. package/api/publicWorkspaceManagement.pub.agravity.ts +24 -109
  30. package/api.base.service.ts +78 -0
  31. package/configuration.ts +33 -17
  32. package/index.ts +1 -0
  33. package/model/asset.pub.agravity.ts +6 -6
  34. package/model/assetBlob.pub.agravity.ts +15 -15
  35. package/model/assetIconRule.pub.agravity.ts +1 -1
  36. package/model/collTypeItem.pub.agravity.ts +1 -1
  37. package/model/collection.pub.agravity.ts +6 -6
  38. package/model/collectionType.pub.agravity.ts +6 -6
  39. package/model/collectionUDL.pub.agravity.ts +1 -1
  40. package/model/downloadFormat.pub.agravity.ts +1 -1
  41. package/model/downloadZipRequest.pub.agravity.ts +6 -6
  42. package/model/downloadZipStatus.pub.agravity.ts +6 -6
  43. package/model/entityIdName.pub.agravity.ts +1 -1
  44. package/model/groupAllAppData.pub.agravity.ts +1 -1
  45. package/model/permissionEntity.pub.agravity.ts +5 -5
  46. package/model/portalAuthentication.pub.agravity.ts +7 -7
  47. package/model/portalTheme.pub.agravity.ts +1 -1
  48. package/model/publishedAsset.pub.agravity.ts +1 -1
  49. package/model/savedSearch.pub.agravity.ts +1 -1
  50. package/model/staticDefinedList.pub.agravity.ts +1 -1
  51. package/model/whereParam.pub.agravity.ts +17 -17
  52. package/model/workspace.pub.agravity.ts +1 -1
  53. package/package.json +5 -4
  54. package/provide-api.ts +15 -0
  55. package/tsconfig.json +2 -0
@@ -20,6 +20,7 @@ import { SasToken } from '../model/sasToken.pub.agravity';
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 HttpAuthGetContainerWriteSasTokenRequestParams {
25
26
  /** The name of the blob container */
@@ -31,67 +32,13 @@ export interface HttpAuthGetContainerWriteSasTokenRequestParams {
31
32
  @Injectable({
32
33
  providedIn: 'root'
33
34
  })
34
- export class PublicAuthenticationManagementService {
35
- protected basePath = 'http://localhost:7072/api';
36
- public defaultHeaders = new HttpHeaders();
37
- public configuration = new AgravityPublicConfiguration();
38
- public encoder: HttpParameterCodec;
39
-
35
+ export class PublicAuthenticationManagementService extends BaseService {
40
36
  constructor(
41
37
  protected httpClient: HttpClient,
42
38
  @Optional() @Inject(BASE_PATH) basePath: string | string[],
43
- @Optional() configuration: AgravityPublicConfiguration
39
+ @Optional() configuration?: AgravityPublicConfiguration
44
40
  ) {
45
- if (configuration) {
46
- this.configuration = configuration;
47
- }
48
- if (typeof this.configuration.basePath !== 'string') {
49
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
50
- if (firstBasePath != undefined) {
51
- basePath = firstBasePath;
52
- }
53
-
54
- if (typeof basePath !== 'string') {
55
- basePath = this.basePath;
56
- }
57
- this.configuration.basePath = basePath;
58
- }
59
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
60
- }
61
-
62
- // @ts-ignore
63
- private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
64
- if (typeof value === 'object' && value instanceof Date === false) {
65
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
66
- } else {
67
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
68
- }
69
- return httpParams;
70
- }
71
-
72
- private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
73
- if (value == null) {
74
- return httpParams;
75
- }
76
-
77
- if (typeof value === 'object') {
78
- if (Array.isArray(value)) {
79
- (value as any[]).forEach((elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)));
80
- } else if (value instanceof Date) {
81
- if (key != null) {
82
- httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
83
- } else {
84
- throw Error('key may not be null if value is Date');
85
- }
86
- } else {
87
- Object.keys(value).forEach((k) => (httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)));
88
- }
89
- } else if (key != null) {
90
- httpParams = httpParams.append(key, value);
91
- } else {
92
- throw Error('key may not be null if value is not object or array');
93
- }
94
- return httpParams;
41
+ super(basePath, configuration);
95
42
  }
96
43
 
97
44
  /**
@@ -101,25 +48,25 @@ export class PublicAuthenticationManagementService {
101
48
  * @param reportProgress flag to report request and response progress.
102
49
  */
103
50
  public httpAuthGetContainerWriteSasToken(
104
- requestParameters?: HttpAuthGetContainerWriteSasTokenRequestParams,
51
+ requestParameters: HttpAuthGetContainerWriteSasTokenRequestParams,
105
52
  observe?: 'body',
106
53
  reportProgress?: boolean,
107
54
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
108
55
  ): Observable<SasToken>;
109
56
  public httpAuthGetContainerWriteSasToken(
110
- requestParameters?: HttpAuthGetContainerWriteSasTokenRequestParams,
57
+ requestParameters: HttpAuthGetContainerWriteSasTokenRequestParams,
111
58
  observe?: 'response',
112
59
  reportProgress?: boolean,
113
60
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
114
61
  ): Observable<HttpResponse<SasToken>>;
115
62
  public httpAuthGetContainerWriteSasToken(
116
- requestParameters?: HttpAuthGetContainerWriteSasTokenRequestParams,
63
+ requestParameters: HttpAuthGetContainerWriteSasTokenRequestParams,
117
64
  observe?: 'events',
118
65
  reportProgress?: boolean,
119
66
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
120
67
  ): Observable<HttpEvent<SasToken>>;
121
68
  public httpAuthGetContainerWriteSasToken(
122
- requestParameters?: HttpAuthGetContainerWriteSasTokenRequestParams,
69
+ requestParameters: HttpAuthGetContainerWriteSasTokenRequestParams,
123
70
  observe: any = 'body',
124
71
  reportProgress: boolean = false,
125
72
  options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
@@ -134,38 +81,21 @@ export class PublicAuthenticationManagementService {
134
81
  }
135
82
 
136
83
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
137
- if (code !== undefined && code !== null) {
138
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>code, 'code');
139
- }
84
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, <any>code, 'code');
140
85
 
141
86
  let localVarHeaders = this.defaultHeaders;
142
87
 
143
- let localVarCredential: string | undefined;
144
88
  // authentication (function_key) required
145
- localVarCredential = this.configuration.lookupCredential('function_key');
146
- if (localVarCredential) {
147
- localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
148
- }
89
+ localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);
149
90
 
150
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
151
- if (localVarHttpHeaderAcceptSelected === undefined) {
152
- // to determine the Accept header
153
- const httpHeaderAccepts: string[] = ['application/json'];
154
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
155
- }
91
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
156
92
  if (localVarHttpHeaderAcceptSelected !== undefined) {
157
93
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
158
94
  }
159
95
 
160
- let localVarHttpContext: HttpContext | undefined = options && options.context;
161
- if (localVarHttpContext === undefined) {
162
- localVarHttpContext = new HttpContext();
163
- }
96
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
164
97
 
165
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
166
- if (localVarTransferCache === undefined) {
167
- localVarTransferCache = true;
168
- }
98
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
169
99
 
170
100
  let responseType_: 'text' | 'json' | 'blob' = 'json';
171
101
  if (localVarHttpHeaderAcceptSelected) {
@@ -179,11 +109,12 @@ export class PublicAuthenticationManagementService {
179
109
  }
180
110
 
181
111
  let localVarPath = `/auth/containerwrite/${this.configuration.encodeParam({ name: 'containerName', value: containerName, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
182
- return this.httpClient.request<SasToken>('get', `${this.configuration.basePath}${localVarPath}`, {
112
+ const { basePath, withCredentials } = this.configuration;
113
+ return this.httpClient.request<SasToken>('get', `${basePath}${localVarPath}`, {
183
114
  context: localVarHttpContext,
184
115
  params: localVarQueryParameters,
185
116
  responseType: <any>responseType_,
186
- withCredentials: this.configuration.withCredentials,
117
+ ...(withCredentials ? { withCredentials } : {}),
187
118
  headers: localVarHeaders,
188
119
  observe: observe,
189
120
  transferCache: localVarTransferCache,
@@ -219,32 +150,17 @@ export class PublicAuthenticationManagementService {
219
150
  ): Observable<any> {
220
151
  let localVarHeaders = this.defaultHeaders;
221
152
 
222
- let localVarCredential: string | undefined;
223
153
  // authentication (function_key) required
224
- localVarCredential = this.configuration.lookupCredential('function_key');
225
- if (localVarCredential) {
226
- localVarHeaders = localVarHeaders.set('x-functions-key', localVarCredential);
227
- }
154
+ localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);
228
155
 
229
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
230
- if (localVarHttpHeaderAcceptSelected === undefined) {
231
- // to determine the Accept header
232
- const httpHeaderAccepts: string[] = ['application/json'];
233
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
234
- }
156
+ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
235
157
  if (localVarHttpHeaderAcceptSelected !== undefined) {
236
158
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
237
159
  }
238
160
 
239
- let localVarHttpContext: HttpContext | undefined = options && options.context;
240
- if (localVarHttpContext === undefined) {
241
- localVarHttpContext = new HttpContext();
242
- }
161
+ const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
243
162
 
244
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
245
- if (localVarTransferCache === undefined) {
246
- localVarTransferCache = true;
247
- }
163
+ const localVarTransferCache: boolean = options?.transferCache ?? true;
248
164
 
249
165
  let responseType_: 'text' | 'json' | 'blob' = 'json';
250
166
  if (localVarHttpHeaderAcceptSelected) {
@@ -258,10 +174,11 @@ export class PublicAuthenticationManagementService {
258
174
  }
259
175
 
260
176
  let localVarPath = `/auth/inbox`;
261
- return this.httpClient.request<SasToken>('get', `${this.configuration.basePath}${localVarPath}`, {
177
+ const { basePath, withCredentials } = this.configuration;
178
+ return this.httpClient.request<SasToken>('get', `${basePath}${localVarPath}`, {
262
179
  context: localVarHttpContext,
263
180
  responseType: <any>responseType_,
264
- withCredentials: this.configuration.withCredentials,
181
+ ...(withCredentials ? { withCredentials } : {}),
265
182
  headers: localVarHeaders,
266
183
  observe: observe,
267
184
  transferCache: localVarTransferCache,