Fix basket import date display update; Bump openapi-ts

This commit is contained in:
phil 2024-05-15 15:31:43 +02:00
parent aa955a1b3b
commit 0156869212
9 changed files with 1078 additions and 662 deletions

16
package-lock.json generated
View file

@ -38,7 +38,7 @@
"@angular/cli": "^17.3.5",
"@angular/compiler-cli": "^17.3.5",
"@angular/language-service": "^17.3.5",
"@hey-api/openapi-ts": "^0.40.1",
"@hey-api/openapi-ts": "^0.45",
"@types/geojson": "^7946.0.14",
"@types/jasmine": "~5.1.4",
"@types/jasminewd2": "^2.0.13",
@ -735,9 +735,9 @@
}
},
"node_modules/@apidevtools/json-schema-ref-parser": {
"version": "11.5.4",
"resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.5.4.tgz",
"integrity": "sha512-o2fsypTGU0WxRxbax8zQoHiIB4dyrkwYfcm8TxZ+bx9pCzcWZbQtiMqpgBvWA/nJ2TrGjK5adCLfTH8wUeU/Wg==",
"version": "11.6.1",
"resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.6.1.tgz",
"integrity": "sha512-DxjgKBCoyReu4p5HMvpmgSOfRhhBcuf5V5soDDRgOTZMwsA4KSFzol1abFZgiCTE11L2kKGca5Md9GwDdXVBwQ==",
"dev": true,
"dependencies": {
"@jsdevtools/ono": "^7.1.3",
@ -2912,12 +2912,12 @@
}
},
"node_modules/@hey-api/openapi-ts": {
"version": "0.40.1",
"resolved": "https://registry.npmjs.org/@hey-api/openapi-ts/-/openapi-ts-0.40.1.tgz",
"integrity": "sha512-pEH5rrmZbbkU7SeNXo6EZLSXA+eb5m7uUpqIksX7NIxbVmzSeRpU3FH6kyF9dG1eM4bUzPpCOQyc3zhgkmTKDw==",
"version": "0.45.0",
"resolved": "https://registry.npmjs.org/@hey-api/openapi-ts/-/openapi-ts-0.45.0.tgz",
"integrity": "sha512-EAQhIrVhh2DqvcKo74rUgR7P+Wnd3U5XUvTT5PN8c9kHxOqXrQeGN+daqNLX2BruZBFzDVOs7AfIh8aL0ccbAw==",
"dev": true,
"dependencies": {
"@apidevtools/json-schema-ref-parser": "11.5.4",
"@apidevtools/json-schema-ref-parser": "11.6.1",
"c12": "1.10.0",
"camelcase": "8.0.0",
"commander": "12.0.0",

View file

@ -57,7 +57,7 @@
"@angular/cli": "^17.3.5",
"@angular/compiler-cli": "^17.3.5",
"@angular/language-service": "^17.3.5",
"@hey-api/openapi-ts": "^0.40.1",
"@hey-api/openapi-ts": "^0.45",
"@types/geojson": "^7946.0.14",
"@types/jasmine": "~5.1.4",
"@types/jasminewd2": "^2.0.13",

View file

@ -85,7 +85,7 @@ export class AdminBasketComponent implements OnInit {
dryRun: dryRun
}).subscribe({
next: resp => {
this.basket.files.find(row => row.id == item.id).time = new Date(resp.time)
this.basket.files.find(row => row.id == item.id).time = new Date(resp.time).toString()
this.snackBar.openFromComponent(HtmlSnackbarComponent, {
data: resp,
//duration: 3000

View file

@ -1,4 +1,5 @@
import type { HttpResponse } from '@angular/common/http';import type { ApiRequestOptions } from './ApiRequestOptions';
import type { HttpResponse } from '@angular/common/http';
import type { ApiRequestOptions } from './ApiRequestOptions';
type Headers = Record<string, string>;
type Middleware<T> = (value: T) => T | Promise<T>;
@ -14,10 +15,7 @@ export class Interceptors<T> {
eject(fn: Middleware<T>) {
const index = this._fns.indexOf(fn);
if (index !== -1) {
this._fns = [
...this._fns.slice(0, index),
...this._fns.slice(index + 1),
];
this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)];
}
}
@ -36,7 +34,9 @@ export type OpenAPIConfig = {
USERNAME?: string | Resolver<string> | undefined;
VERSION: string;
WITH_CREDENTIALS: boolean;
interceptors: {response: Interceptors<HttpResponse<any>>;};
interceptors: {
response: Interceptors<HttpResponse<any>>;
};
};
export const OpenAPI: OpenAPIConfig = {
@ -49,6 +49,7 @@ export const OpenAPI: OpenAPIConfig = {
USERNAME: undefined,
VERSION: '0.1.dev85+g41e92fa.d20240509',
WITH_CREDENTIALS: false,
interceptors: {response: new Interceptors(),
interceptors: {
response: new Interceptors(),
},
};

View file

@ -46,7 +46,9 @@ export const getQueryString = (params: Record<string, unknown>): string => {
return;
}
if (Array.isArray(value)) {
if (value instanceof Date) {
append(key, value.toISOString());
} else if (Array.isArray(value)) {
value.forEach(v => encodePair(key, v));
} else if (typeof value === 'object') {
Object.entries(value).forEach(([k, v]) => encodePair(`${key}[${k}]`, v));

View file

@ -1,5 +1,4 @@
// This file is auto-generated by @hey-api/openapi-ts
export { ApiError } from './core/ApiError';
export { OpenAPI, type OpenAPIConfig } from './core/OpenAPI';
export * from './schemas.gen';

View file

@ -1,6 +1,5 @@
// This file is auto-generated by @hey-api/openapi-ts
export const $Action = {
properties: {
name: {
@ -1705,6 +1704,9 @@ export const $MaplibreStyle = {
items: {},
type: 'array'
},
{
type: 'boolean'
},
{
type: 'number'
},
@ -1713,9 +1715,6 @@ export const $MaplibreStyle = {
},
{
type: 'string'
},
{
type: 'boolean'
}
]
},
@ -1739,6 +1738,9 @@ export const $MaplibreStyle = {
items: {},
type: 'array'
},
{
type: 'boolean'
},
{
type: 'number'
},
@ -1747,9 +1749,6 @@ export const $MaplibreStyle = {
},
{
type: 'string'
},
{
type: 'boolean'
}
]
},

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,5 @@
// This file is auto-generated by @hey-api/openapi-ts
export type Action = {
name: string;
roles: Array<(string)>;
@ -151,19 +150,19 @@ export type CategoryRead = {
[key: string]: unknown;
} | null;
/**
* ISO compliant layer name (see ISO 13567)
* :return: str
*/
* ISO compliant layer name (see ISO 13567)
* :return: str
*/
readonly layer_name: string;
/**
* Table name
* :return:
*/
* Table name
* :return:
*/
readonly table_name: string;
/**
* Table name
* :return:
*/
* Table name
* :return:
*/
readonly raw_survey_table_name: string;
readonly mapbox_type: string;
};
@ -328,12 +327,12 @@ export type MaplibreStyle = {
paint?: {
[key: string]: ({
[key: string]: unknown;
} | Array<unknown> | number | string | boolean);
} | Array<unknown> | boolean | number | string);
} | null;
layout?: {
[key: string]: ({
[key: string]: unknown;
} | Array<unknown> | number | string | boolean);
} | Array<unknown> | boolean | number | string);
} | null;
attribution?: string | null;
};
@ -562,14 +561,191 @@ export type ValidationError = {
type: string;
};
export type BootstrapApiBootstrapGetResponse = BootstrapData;
export type LoginForAccessTokenApiTokenPostData = {
formData: Body_login_for_access_token_api_token_post;
};
export type LoginForAccessTokenApiTokenPostResponse = Token;
export type LogoutApiLogoutGetResponse = unknown;
export type GetUsersApiUsersGetResponse = Array<UserRead>;
export type GetRolesApiRolesGetResponse = Array<RoleRead>;
export type GetAclsApiAclsGetResponse = Array<UserRoleLink>;
export type GetCategoriesApiCategoriesGetResponse = Array<CategoryRead>;
export type GetCategoriesPapiCategoriesPandasGetResponse = Array<CategoryRead>;
export type ListDataProvidersApiDataProvidersGetResponse = Array<DataProvider>;
export type GetModelListApiDataProviderStoreGetData = {
store: string;
};
export type GetModelListApiDataProviderStoreGetResponse = Array<MeasuresItem>;
export type GetModelValuesApiStoreNameValuesValueGetData = {
resample?: string | null;
storeName: string;
value: string;
where: string;
};
export type GetModelValuesApiStoreNameValuesValueGetResponse = unknown;
export type GetStoresApiStoresGetResponse = Array<Store>;
export type GetProjectsApiProjectsGetResponse = Array<Project>;
export type GetSurveyMetaApiSurveyMetaGetResponse = SurveyMeta;
export type GetFeatureInfoApiFeatureInfoStoreIdGetData = {
id: string;
store: string;
};
export type GetFeatureInfoApiFeatureInfoStoreIdGetResponse = FeatureInfo | null;
export type GetModelInfoApiModelInfoStoreGetData = {
store: string;
};
export type GetModelInfoApiModelInfoStoreGetResponse = ModelInfo;
export type GetPlotParamsApiPlotParamsStoreGetData = {
id: string;
store: string;
value: string;
};
export type GetPlotParamsApiPlotParamsStoreGetResponse = PlotParams;
export type GetActionsApiActionsGetResponse = Array<ActionsStore>;
export type ExecuteTagActionApiExecTagActionsPostData = {
requestBody: Body_execute_tag_action_api_execTagActions_post;
};
export type ExecuteTagActionApiExecTagActionsPostResponse = ActionsResults;
export type GetGeojsonApiGjStoreNameGetData = {
ifNoneMatch?: string | null;
preserveTopology?: boolean | null;
simplify?: number | null;
storeName: unknown;
};
export type GetGeojsonApiGjStoreNameGetResponse = unknown;
export type GetBasketsApiAdminBasketGetResponse = Array<BasketNameOnly>;
export type GetBasketApiAdminBasketNameGetData = {
name: string;
};
export type GetBasketApiAdminBasketNameGetResponse = AdminBasket;
export type UploadBasketFileApiAdminBasketUploadNamePostData = {
autoImport?: boolean;
equipmentId?: number | null;
formData: Body_upload_basket_file_api_admin_basket_upload__name__post;
name: string;
projectId?: number | null;
surveyorId?: number | null;
};
export type UploadBasketFileApiAdminBasketUploadNamePostResponse = BasketImportResult;
export type DownloadBasketFileApiAdminBasketDownloadNameFileIdFileNameGetData = {
fileId: number;
fileName: string;
name: string;
};
export type DownloadBasketFileApiAdminBasketDownloadNameFileIdFileNameGetResponse = unknown;
export type ImportBasketFileApiAdminBasketImportBasketFileIdGetData = {
basket: string;
dryRun?: boolean;
fileId: number;
};
export type ImportBasketFileApiAdminBasketImportBasketFileIdGetResponse = BasketImportResult;
export type DeleteBasketFileApiAdminBasketDeleteBasketFileIdGetData = {
basket: string;
fileId: number;
};
export type DeleteBasketFileApiAdminBasketDeleteBasketFileIdGetResponse = unknown;
export type GetGroupsApiDashboardGroupsGetResponse = Array<DashboardGroup>;
export type GetHomeApiDashboardHomeGetResponse = DashboardHome;
export type GetDashboardPageApiDashboardPageGroupNameGetData = {
group: string;
name: string;
};
export type GetDashboardPageApiDashboardPageGroupNameGetResponse = Dashboard;
export type GetInitDataApiMapInitDataGetResponse = MapInitData;
export type GetBaseStyleApiMapBaseStyleNameGetData = {
name: string;
};
export type GetBaseStyleApiMapBaseStyleNameGetResponse = BaseStyle;
export type GetLayerStyleApiMapLayerStyleStoreGetData = {
store: string;
};
export type GetLayerStyleApiMapLayerStyleStoreGetResponse = MaplibreStyle | null;
export type DownloadCsvApiDownloadCsvStoreModelIdValueResampleGetData = {
modelId: number;
resample: string;
store: string;
value: string;
};
export type DownloadCsvApiDownloadCsvStoreModelIdValueResampleGetResponse = unknown;
export type DownloadGeodataApiDownloadGeodataStoresGetData = {
format?: string;
reproject?: boolean;
stores: string;
};
export type DownloadGeodataApiDownloadGeodataStoresGetResponse = unknown;
export type ExecuteActionApiDownloadPluginNameStoreIdGetData = {
id: number;
name: string;
store: string;
};
export type ExecuteActionApiDownloadPluginNameStoreIdGetResponse = unknown;
export type $OpenApiTs = {
'/api/bootstrap': {
get: {
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: BootstrapData;
/**
* Not found
*/
404: unknown;
};
};
};
@ -580,9 +756,17 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: Token;
/**
* Not found
*/
404: unknown;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
@ -590,9 +774,13 @@ export type $OpenApiTs = {
get: {
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: unknown;
/**
* Not found
*/
404: unknown;
};
};
};
@ -600,9 +788,13 @@ export type $OpenApiTs = {
get: {
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: Array<UserRead>;
/**
* Not found
*/
404: unknown;
};
};
};
@ -610,9 +802,13 @@ export type $OpenApiTs = {
get: {
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: Array<RoleRead>;
/**
* Not found
*/
404: unknown;
};
};
};
@ -620,9 +816,13 @@ export type $OpenApiTs = {
get: {
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: Array<UserRoleLink>;
/**
* Not found
*/
404: unknown;
};
};
};
@ -630,9 +830,13 @@ export type $OpenApiTs = {
get: {
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: Array<CategoryRead>;
/**
* Not found
*/
404: unknown;
};
};
};
@ -640,9 +844,13 @@ export type $OpenApiTs = {
get: {
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: Array<CategoryRead>;
/**
* Not found
*/
404: unknown;
};
};
};
@ -650,9 +858,13 @@ export type $OpenApiTs = {
get: {
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: Array<DataProvider>;
/**
* Not found
*/
404: unknown;
};
};
};
@ -663,9 +875,17 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: Array<MeasuresItem>;
/**
* Not found
*/
404: unknown;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
@ -679,9 +899,17 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: unknown;
/**
* Not found
*/
404: unknown;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
@ -689,9 +917,13 @@ export type $OpenApiTs = {
get: {
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: Array<Store>;
/**
* Not found
*/
404: unknown;
};
};
};
@ -699,9 +931,13 @@ export type $OpenApiTs = {
get: {
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: Array<Project>;
/**
* Not found
*/
404: unknown;
};
};
};
@ -709,9 +945,13 @@ export type $OpenApiTs = {
get: {
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: SurveyMeta;
/**
* Not found
*/
404: unknown;
};
};
};
@ -723,9 +963,17 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: FeatureInfo | null;
/**
* Not found
*/
404: unknown;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
@ -736,9 +984,17 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: ModelInfo;
/**
* Not found
*/
404: unknown;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
@ -751,9 +1007,17 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: PlotParams;
/**
* Not found
*/
404: unknown;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
@ -761,9 +1025,13 @@ export type $OpenApiTs = {
get: {
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: Array<ActionsStore>;
/**
* Not found
*/
404: unknown;
};
};
};
@ -774,9 +1042,17 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: ActionsResults;
/**
* Not found
*/
404: unknown;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
@ -790,9 +1066,17 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: unknown;
/**
* Not found
*/
404: unknown;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
@ -800,9 +1084,13 @@ export type $OpenApiTs = {
get: {
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: Array<BasketNameOnly>;
/**
* Not found
*/
404: unknown;
};
};
};
@ -813,9 +1101,17 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: AdminBasket;
/**
* Not found
*/
404: unknown;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
@ -831,9 +1127,17 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: BasketImportResult;
/**
* Not found
*/
404: unknown;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
@ -846,9 +1150,17 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: unknown;
/**
* Not found
*/
404: unknown;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
@ -861,9 +1173,17 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: BasketImportResult;
/**
* Not found
*/
404: unknown;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
@ -875,9 +1195,17 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: unknown;
/**
* Not found
*/
404: unknown;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
@ -885,9 +1213,13 @@ export type $OpenApiTs = {
get: {
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: Array<DashboardGroup>;
/**
* Not found
*/
404: unknown;
};
};
};
@ -895,9 +1227,13 @@ export type $OpenApiTs = {
get: {
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: DashboardHome;
/**
* Not found
*/
404: unknown;
};
};
};
@ -909,9 +1245,17 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: Dashboard;
/**
* Not found
*/
404: unknown;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
@ -919,8 +1263,8 @@ export type $OpenApiTs = {
get: {
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: MapInitData;
};
};
@ -932,9 +1276,13 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: BaseStyle;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
@ -945,9 +1293,13 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: MaplibreStyle | null;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
@ -961,9 +1313,17 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: unknown;
/**
* Not found
*/
404: unknown;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
@ -976,9 +1336,17 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: unknown;
/**
* Not found
*/
404: unknown;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
@ -991,9 +1359,17 @@ export type $OpenApiTs = {
};
res: {
/**
* Successful Response
*/
* Successful Response
*/
200: unknown;
/**
* Not found
*/
404: unknown;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};