Skip to content

Commit

Permalink
feat: Remove deprecation (MAPCO-4117) (#90)
Browse files Browse the repository at this point in the history
* chore: remove create api

* chore: remove deprications

* chore: remove deprication

* chore: remove deprecated createMetadata

* chore: remove sendCallbacks

* fix: getInProgressJobs was using only get map jobs + removed deprications

* chore: remove ICallbackTarget

* chore: remove interface deprications

* chore: remove all deprecations for interfaces

* fix: lower coverage a tiny bit

* fix: fix lint

* fix: fix lint

* fix: fix lint

* fix: fix pr

* fix: fir pr comments

* chore: fix lint

* fix: fix pr

* fix: pr comment

* chore: upgrade telemetry pakcage
  • Loading branch information
razbroc authored May 23, 2024
1 parent a8eda0a commit 38f92ef
Show file tree
Hide file tree
Showing 20 changed files with 126 additions and 2,255 deletions.
95 changes: 0 additions & 95 deletions openapi3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,50 +26,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/internalError'
/create:
post:
tags:
- createGpkg
summary: Trigger export geopackage process
operationId: exportTilesToGpkg
deprecated: true
requestBody:
$ref: '#/components/requestBodies/ExportGetmapBody'
responses:
'200':
description: OK
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/createGpkgJobResponse'
- $ref: '#/components/schemas/naiveCacheJobResponse'
discriminator:
propertyName: response
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: Could not find layer with matched dbId
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/internalError'
'507':
description: Insufficient Storage on disk for exporting
content:
application/json:
schema:
$ref: '#/components/schemas/error'
/create/roi:
post:
tags:
Expand Down Expand Up @@ -155,13 +111,6 @@ paths:
$ref: '#/components/schemas/internalError'
components:
requestBodies:
ExportGetmapBody:
description: Export to gpkg via GetMap
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/exportGetMap'
ExportByRoiBody:
description: Export to gpkg via FeatureCollection
required: true
Expand Down Expand Up @@ -193,50 +142,6 @@ components:
- Completed
discriminator:
propertyName: response
exportGetMap:
type: object
properties:
dbId:
type: string
format: uuid
description: ID as the primary key from the Raster Catalog
bbox:
oneOf:
- $ref: '#/components/schemas/BBox'
- $ref: '#/components/schemas/Geometry'
targetResolution:
type: number
description: >-
The target resolution in which the tiles will be created - DEGREE to
PIXEL. If empty - original layer's resolution is taken.
callbackURLs:
type: array
items:
type: string
description: The callback URL to notify the process if finished
crs:
$ref: '#/components/schemas/CRS'
priority:
type: number
description: The priority of the record. Maximum priority = most urgent.
minimum: 0
maximum: 999999999
required:
- dbId
- callbackURLs
example:
dbId: ef03ca54-c68e-4ca8-8432-50ae5ad7a7f8
bbox:
- 34.811938017107494
- 31.95475033759175
- 34.82237261707599
- 31.96426962177354
targetResolution: 0.0000429153442382812
callbackURLs:
- http://example.getmap.com/callback
- http://example.getmap.com/callback2
crs: EPSG:4326
priority: 0
exportFromFeatures:
type: object
properties:
Expand Down
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/clients/callbackClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { inject, singleton } from 'tsyringe';
import { HttpClient, IHttpRetryConfig } from '@map-colonies/mc-utils';
import { Logger } from '@map-colonies/js-logger';
import { SERVICES } from '../common/constants';
import { ICallbackData, ICallbackExportData, IConfig } from '../common/interfaces';
import { ICallbackExportData, IConfig } from '../common/interfaces';

@singleton()
export class CallbackClient extends HttpClient {
Expand All @@ -16,7 +16,7 @@ export class CallbackClient extends HttpClient {
);
}

public async send(callbackUrl: string, data: ICallbackData | ICallbackExportData): Promise<void> {
public async send(callbackUrl: string, data: ICallbackExportData): Promise<void> {
this.logger.info({ data, msg: `Sending callback request to URL: "${callbackUrl}"` });
await this.post(callbackUrl, data);
}
Expand Down
Loading

0 comments on commit 38f92ef

Please sign in to comment.