diff --git a/@here/olp-sdk-dataservice-api/api-generator/README.md b/@here/olp-sdk-dataservice-api/api-generator/README.md index b71822f6..e82ac394 100644 --- a/@here/olp-sdk-dataservice-api/api-generator/README.md +++ b/@here/olp-sdk-dataservice-api/api-generator/README.md @@ -13,3 +13,5 @@ java \ -l typescript-fetch \ -o out ``` + +Use `--template-engine mustache` for V3 (https://github.com/swagger-api/swagger-codegen/issues/7330#issuecomment-450925645) diff --git a/@here/olp-sdk-dataservice-api/api-generator/templates/TypeScript-Fetch/licenseInfo.mustache b/@here/olp-sdk-dataservice-api/api-generator/templates/TypeScript-Fetch/licenseInfo.mustache index ab5bf648..bac5947e 100644 --- a/@here/olp-sdk-dataservice-api/api-generator/templates/TypeScript-Fetch/licenseInfo.mustache +++ b/@here/olp-sdk-dataservice-api/api-generator/templates/TypeScript-Fetch/licenseInfo.mustache @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 HERE Europe B.V. and its affiliate(s). + * Copyright (C) 2020-2021 HERE Europe B.V. and its affiliate(s). * All rights reserved. * * This software and other materials contain proprietary information diff --git a/@here/olp-sdk-dataservice-api/lib/config-api.ts b/@here/olp-sdk-dataservice-api/lib/config-api.ts index 07bca1a1..d15ab49d 100644 --- a/@here/olp-sdk-dataservice-api/lib/config-api.ts +++ b/@here/olp-sdk-dataservice-api/lib/config-api.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 HERE Europe B.V. + * Copyright (C) 2019-2021 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ * The `config` service provides basic catalog management operations. * It manages all platform resources needed for different kinds of catalogs and operations on them. * - * OpenAPI spec version: 1.1.2 + * OpenAPI spec version: 1.1.7 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -35,12 +35,28 @@ import { RequestBuilder, RequestOptions, UrlBuilder } from "./RequestBuilder"; // tslint:disable: array-type +export interface AutomaticVersionDeletion { + /** + * Specifies how many versions to keep. To optimise storage costs, you can specify how many latest versions to keep. + * The minimum number of versions to keep is 1. The maximum number of versions to keep is 1,000. + */ + numberOfVersionsToKeep: number; +} + /** - * List of billing tags a free-form tag which is used for grouping billing records together. If supplied, - * it must be between 4 - 16 characters, contain only alphanumeric ASCII characters [A-Za-z0-9]. + * List of billing tags a free-form tag which is used for grouping billing records together. + * If supplied, it must be between 4 - 16 characters, contain only alphanumeric ASCII characters [A-Za-z0-9]. */ export type BillingTags = string[]; +/** + * The CRC algorithm used to calculate the checksum for the partitions in this layers + */ +export type CRC = "CRC-32C"; + +/** + * @deprecated `ParentQuad` will be removed by 03.2022. + */ export interface ParentQuad { /** * Optional value for the additional metadata specified by the publisher @@ -91,6 +107,9 @@ export interface ParentQuad { version: number; } +/** + * @deprecated `SubQuad` will be removed by 03.2022. + */ export interface SubQuad { /** * Optional value for the additional meta-data specified by the publisher. @@ -145,6 +164,9 @@ export interface SubQuad { version: number; } +/** + * @deprecated `Index` will be removed by 03.2022. + */ export interface Index { /** * Result of the index resource call. For each parent tile, one element with the respective @@ -159,6 +181,9 @@ export interface Index { } /** + * + * @deprecated `Layer` will be removed by 03.2022. + * * Describes the catalog layer properties. */ export interface Layer { @@ -244,58 +269,74 @@ export interface Layer { */ export interface Catalog { /** - * Aggregated list of all layers` billing tags. - * Please note that this element is read only and does not exist in CreateCatalog. - * If posted during catalog creation the value will be ignored. + * The ID to use when referring to this catalog programmatically. + * Catalog IDs must be unique across all catalogs in the Open Location Platform. + * Do not put private information in the catalog ID. + * The catalog ID forms a portion of the catalog's HERE Resource Name (HRN), + * and HRNs are visible to other users. */ - billingTags?: BillingTags; - coverage?: Coverage; + id: string; /** - * The creation date and time. + * The HERE Resource Name (HRN) of the catalog */ - created: string; + hrn: string; /** - * A detailed description of the catalog and what it contains. - * This information appears on the 'Overview' tab when you open a catalog in the platform portal. + * The short name for the catalog */ - description: string; + name: string; /** - * The HERE Resource Name (HRN) of the catalog. + * A one-sentence summary of the catalog. You can see this summary when you browse a list of catalogs on the + * platform portal. */ - hrn: string; + summary: string; /** - * The ID to use when referring to this catalog programmatically. - * Catalog IDs must be unique across all catalogs in the HERE platform. - * Do not put private information in the catalog ID. The catalog ID forms a portion of the catalog's HERE Resource Name (HRN), - * and HRNs are visible to other users. + * A detailed description of the catalog and what it contains. This information appears on the 'Overview' + * tab when you open a catalog in the platform portal. */ - id: string; + description: string; + coverage?: Coverage; + owner?: Owner; /** - * The layers in the catalog. + * Some keywords that help to find the catalog when searching in the platform portal */ - layers: Layer[]; + tags: string[]; /** - * The short name for the catalog. + * Aggregated list of all layers` billing tags. Note that this element is read-only and does not exist in + * `CreateCatalog`. If posted during catalog creation, the value will be ignored. */ - name: string; - notifications?: Notifications; - owner?: Owner; - replication: Replication; + billingTags?: BillingTags; /** - * A one-sentence summary of the catalog. You can see this summary when you browse a list of catalogs on the platform portal. + * The creation date and time. */ - summary: string; + created: string; + replication: Replication; + automaticVersionDeletion?: AutomaticVersionDeletion; /** - * Some keywords that help to find the catalog when searching in the platform portal. + * The layers in the catalog. */ - tags: Tags; - /** - * The version of the catalog configuration. Every change in this number indicates change in catalog configuration. - * It is incremented every time you e.g. change catalog parameters, add layers etc. - * Please note this is not metadata/data version as configuration and metadata versions - * are independent of each other and indicate different kind of changes. + layers: + | Layer[] + | Array< + | VersionedLayer + | VolatileLayer + | StreamLayer + | IndexLayer + | InteractiveMapsLayer + | ObjectstoreLayer + >; + /** + * The version of the catalog configuration. Every change in this number indicates a change in the catalog + * configuration. It is incremented every time you make changes, such as change catalog parameters or add layers. + * Note that this is not a metadata/data version as configuration and metadata versions are independent + * of each other and indicate different kind of changes. */ version: number; + notifications?: Notifications; + /** + * Indicates whether the catalog is ready to be listed in the Marketplace. If the value is `true`, + * the catalog is ready to be listed in the Marketplace. + */ + marketplaceReady?: boolean; } /** @@ -309,6 +350,39 @@ export interface CatalogFailureStatus { status?: string; } +/** + * Describes the status and href of the create/update/delete resource such as a catalog. + */ +export interface CatalogLink { + /** + * href of the catalog + */ + href?: string; + /** + * The HERE Resource Name (HRN) of the catalog + */ + hrn?: string; + /** + * Title of the action + */ + title?: string; + /** + * Type of the href + */ + type?: string; +} + +/** + * Describes the status of the successful catalog creation operation including its href. + */ +export interface CatalogOperationSuccessStatus { + item?: CatalogLink; + /** + * Status of the operation + */ + status: string; +} + /** * Describes the status of the catalog modification action. */ @@ -352,6 +426,13 @@ export interface CatalogSummary { type?: string; } +/** + * Describes base class. + */ +export interface CatalogsResultBase { + verbose?: boolean; +} + /** * List of the catalog summaries. */ @@ -362,10 +443,24 @@ export interface CatalogsList { /** * Contains a list of catalogs the user has access to. */ -export interface CatalogsListResult { +export interface CatalogsListResult extends CatalogsResultBase { results?: CatalogsList; } +/** + * List of the catalog summaries + */ +export interface CatalogsSummaryList { + items?: Array; +} + +/** + * Contains a list of catalog summaries the user has access to. + */ +export interface CatalogsSummaryListResult extends CatalogsResultBase { + results?: CatalogsSummaryList; +} + /** * Identifies whether the data is compressed. */ @@ -387,6 +482,13 @@ export interface Coverage { adminAreas?: string[]; } +/** + * Describes the base class. + */ +export interface CreateBaseLayer { + layerType: string; +} + /** * Describes the configuration of the catalog including its layer definitions. */ @@ -399,15 +501,23 @@ export interface CreateCatalog { /** * The ID to use when referring to this catalog programmatically. * Catalog IDs must be unique across all catalogs in the HERE platform. - * Do not put private information in the catalog ID. The catalog ID forms a portion of the catalog's HERE Resource Name (HRN), + * Do not put private information in the catalog ID. The catalog ID forms a portion of the catalog's + * HERE Resource Name (HRN), * and HRNs are visible to other users. * Only lowercase alphanumeric characters (a-z), digits (0-9) and dash (-) are allowed in a catalog ID. */ id: string; /** - * The layers in the catalog. + * The layers in the catalog */ - layers?: any[]; + layers?: Array< + | CreateVersionedLayer + | CreateVolatileLayer + | CreateStreamLayer + | CreateIndexLayer + | CreateObjectstoreLayer + | CreateInteractiveMapsLayer + >; /** * The short name for the catalog. */ @@ -415,7 +525,8 @@ export interface CreateCatalog { notifications?: Notifications; replication?: Replication; /** - * A one-sentence summary of the catalog. You can see this summary when you browse a list of catalogs on the platform portal. + * A one-sentence summary of the catalog. You can see this summary when you browse a list of catalogs on the + * platform portal. */ summary: string; /** @@ -430,91 +541,123 @@ export interface CreateCatalog { * Configuration and metadata versions are independent of each other and indicate different kinds of changes. */ version?: number; + automaticVersionDeletion?: AutomaticVersionDeletion; } /** * Describes properties of a catalog index layer. */ -export interface CreateIndexLayer { - billingTags: BillingTags; - contentEncoding?: ContentEncoding; - contentType: ContentType; - coverage?: Coverage; - description: LayerDescription; - digest?: Digest; +export interface CreateIndexLayer extends CreateBaseLayer { id: LayerId; + name: LayerName; + summary: LayerSummary; + description: LayerDescription; + coverage?: Coverage; + schema?: Schema; + contentType: ContentType; + contentEncoding?: ContentEncoding; + tags: Tags; + billingTags: BillingTags; indexProperties?: IndexProperties; + digest?: Digest; + crc?: CRC; layerType: IndexLayerType; +} + +/** + * Describes properties of a catalog interactive maps layer. + */ +export interface CreateInteractiveMapsLayer extends CreateBaseLayer { + id: LayerId; name: LayerName; - schema?: Schema; summary: LayerSummary; + description: LayerDescription; tags: Tags; + billingTags: BillingTags; + interactiveMapsProperties?: InteractiveMapsProperties; + layerType: InteractiveMapsLayerType; } /** - * Describes properties of a catalog stream layer. + * Describes properties of a catalog object store layer. */ -export interface CreateStreamLayer { - billingTags: BillingTags; - contentEncoding?: ContentEncoding; - contentType: ContentType; - coverage?: Coverage; +export interface CreateObjectstoreLayer extends CreateBaseLayer { + id: LayerId; + name: LayerName; + summary: LayerSummary; description: LayerDescription; + tags?: Tags; + billingTags: BillingTags; + layerType: ObjectstoreLayerType; +} + +/** + * Describes properties of a catalog stream layer. + */ +export interface CreateStreamLayer extends CreateBaseLayer { id: LayerId; - layerType: StreamLayerType; name: LayerName; - partitioning?: Partitioning; - partitioningScheme?: DeprecatedPartitioningScheme; - schema?: Schema; - streamProperties?: StreamProperties; summary: LayerSummary; + description: LayerDescription; + coverage?: Coverage; + schema?: Schema; + partitioningScheme?: DeprecatedPartitioningScheme; + partitioning?: Partitioning; + contentType: ContentType; + contentEncoding?: ContentEncoding; tags: Tags; - ttl?: Ttl; + billingTags: BillingTags; ttlHours?: TtlHours; + ttl?: Ttl; volume?: DurableVolume; + streamProperties?: StreamProperties; + layerType: StreamLayerType; } /** * Describes properties of a catalog versioned layer. */ -export interface CreateVersionedLayer { - billingTags: BillingTags; - contentEncoding?: ContentEncoding; - contentType: ContentType; - coverage?: Coverage; - description: LayerDescription; - digest?: Digest; +export interface CreateVersionedLayer extends CreateBaseLayer { id: LayerId; - layerType: VersionedLayerType; name: LayerName; - partitioning?: Partitioning; - partitioningScheme?: DeprecatedPartitioningScheme; - schema?: Schema; summary: LayerSummary; + description: LayerDescription; + coverage?: Coverage; + schema?: Schema; + partitioningScheme?: DeprecatedPartitioningScheme; + partitioning?: Partitioning; + contentType: ContentType; + contentEncoding?: ContentEncoding; tags: Tags; + billingTags: BillingTags; + digest?: Digest; + crc?: CRC; + layerType: VersionedLayerType; } /** * Describes properties of a catalog volatile layer. */ -export interface CreateVolatileLayer { - billingTags: BillingTags; - contentEncoding?: ContentEncoding; - contentType: ContentType; - coverage?: Coverage; - description: LayerDescription; - digest?: Digest; +export interface CreateVolatileLayer extends CreateBaseLayer { id: LayerId; - layerType: VolatileLayerType; name: LayerName; - partitioning?: Partitioning; - partitioningScheme?: DeprecatedPartitioningScheme; - schema?: Schema; summary: LayerSummary; + description: LayerDescription; + coverage?: Coverage; + schema?: Schema; + partitioningScheme?: DeprecatedPartitioningScheme; + partitioning?: Partitioning; + contentType: ContentType; + contentEncoding?: ContentEncoding; tags: Tags; - ttl?: Ttl; + billingTags: BillingTags; ttlHours?: TtlHours; + ttl?: Ttl; + digest?: Digest; + crc?: CRC; volume?: VolatileVolume; + volatileProperties?: VolatileProperties; + layerType: VolatileLayerType; } export interface Creator { @@ -545,6 +688,14 @@ export interface DurableVolume { } /** + * Describes the base class. + */ +export interface GetBaseLayer { + layerType: string; +} + +/** + * @deprecated `ErrorMessage` will be removed by 03.2022. * An HTTP Error message that the service provides when there is a problem with request. */ export interface ErrorMessage { @@ -584,26 +735,44 @@ export interface IndexDefinition { } export type TypeEnum = "bool" | "int" | "string" | "heretile" | "timewindow"; +export type ZoomLevelEnum = + | "0" + | "1" + | "2" + | "3" + | "4" + | "5" + | "6" + | "7" + | "8" + | "9" + | "10" + | "11" + | "12" + | "13" + | "14"; + /** * Describes the catalog index layer properties. */ -export interface IndexLayer { - billingTags: BillingTags; - contentEncoding?: ContentEncoding; - contentType: ContentType; - coverage?: Coverage; - created: LayerCreated; - description: LayerDescription; - digest?: Digest; - hrn: LayerHrn; +export interface IndexLayer extends GetBaseLayer { id: LayerId; - indexProperties: IndexProperties; - layerType: IndexLayerType; + hrn: LayerHrn; name: LayerName; - schema?: Schema; summary: LayerSummary; + description: LayerDescription; + coverage?: Coverage; + schema?: Schema; + contentType: ContentType; + contentEncoding?: ContentEncoding; tags: Tags; + billingTags: BillingTags; volume: DurableVolume; + indexProperties: IndexProperties; + created: LayerCreated; + digest?: Digest; + crc?: CRC; + layerType: IndexLayerType; } /** @@ -619,18 +788,34 @@ export interface IndexProperties { ttl?: TtlEnum; } -export type TtlEnum = - | "7.days" - | "15.days" - | "1.month" - | "2.months" - | "3.months" - | "4.months" - | "6.months" - | "1.year" - | "1.5.years" - | "2.year" - | "unlimited"; +/** + * Describes the catalog interactive maps layer properties. + */ +export interface InteractiveMapsLayer extends GetBaseLayer { + id: LayerId; + hrn: LayerHrn; + name: LayerName; + summary: LayerSummary; + description: LayerDescription; + tags: Tags; + billingTags: BillingTags; + interactiveMapsProperties?: InteractiveMapsProperties; + created: LayerCreated; + layerType: InteractiveMapsLayerType; +} + +export interface InteractiveMapsProperties { + /** + * A list properties that must be indexed for faster queries. + */ + searchableProperties?: Array; +} + +/** + * The type of data availability that this layer provides + */ +export type InteractiveMapsLayerType = "interactivemap"; + /** * The layer creation timestamp. */ @@ -669,6 +854,27 @@ export interface Notifications { enabled?: boolean; } +/** + * Describes the catalog objectstore layer properties. + */ +export interface ObjectstoreLayer extends GetBaseLayer { + id: LayerId; + hrn: LayerHrn; + name: LayerName; + summary: LayerSummary; + description: LayerDescription; + tags: Tags; + billingTags: BillingTags; + volume: DurableVolume; + created: LayerCreated; + layerType: ObjectstoreLayerType; +} + +/** + * The type of data availability that this layer provides + */ +export type ObjectstoreLayerType = "objectstore"; + export interface Organisation { /** * The ID of the customer organisation relating to this catalog @@ -733,52 +939,97 @@ export interface PatchCatalog { tags?: Tags; } +export interface PatchIndexProperties { + /** + * Amount of time data will remain in index layer. If not specified, it defaults to 7 days. Can be updated only if not set already. + */ + ttl?: TtlEnum; +} + +export type TtlEnum = + | "7.days" + | "15.days" + | "1.month" + | "2.months" + | "3.months" + | "4.months" + | "6.months" + | "1.year" + | "1.5.years" + | "2.year" + | "unlimited"; + +export interface PatchInteractiveMapsProperties { + /** + * A list properties that must be indexed for faster queries. You can only add new fields to the array. + * To clear the array, set it to null. + */ + searchableProperties?: Array; +} + /** * Describes the modification of the layer configuration. */ export interface PatchLayer { /** - * List of billing tags a free-form tag which is used for grouping billing records together. - * If supplied, it must be between 4 - 16 characters, contain only alphanumeric ASCII characters [A-Za-z0-9]. - * Field is optional, specify value to replace all list of billing tags. This field is not removable, null value is not allowed. + * The short name for the layer. Field is optional, Specify a value to modify layer name. + * This field is not removable, null value is not allowed. */ - billingTags?: BillingTags; + name?: string; /** - * The geographic areas that this layer covers, grouped by administrative divisions. Field is optional, - * specify value to modify layer coverage. This field is not removable, null value is not allowed + * A one-sentence summary of the layer. You can see this summary when you browse a list of layers on + * the platform portal. Field is optional, Specify a value to modify layer summary. + * This field is not removable, null value is not allowed. */ - coverage?: Coverage; + summary?: string; /** - * A detailed description of the layer and what it contains. This information appears on the - * 'Overview' tab when you open a layer in the platform portal. Field is optional, specify value to modify layer description. - * This field is not removable, null value is not allowed + * A detailed description of the layer and what it contains. This information appears on the 'Overview' + * tab when you open a layer in the platform portal. Field is optional, Specify a value to modify layer description. + * This field is not removable, null value is not allowed. */ description?: string; + coverage?: Coverage; + schema?: Schema; + partitioning?: Partitioning; + indexProperties?: PatchIndexProperties; + streamProperties?: PatchStreamProperties; + interactiveMapsProperties?: PatchInteractiveMapsProperties; /** - * The short name for the layer. Field is optional, specify value to modify layer name. - * This field is not removable, null value is not allowed - */ - name?: string; - /** - * Defines how data is partitioned within the layer. Field is optional, specify value to modify layer partitioning. - * This field is not removable, null value is not allowed + * Some keywords that help to find the layer when searching in the platform portal. Field is optional, + * Specify a value to replace all list of tags. This field is not removable, null value is not allowed. */ - partitioning?: Partitioning; + tags?: Array; /** - * The HRN of the data schema for this layer. Field is optional, specify value to modify layer schema. - * This field is not removable, null value is not allowed + * List of billing tags a free-form tag which is used for grouping billing records together. If supplied, + * it must be between 4 - 16 characters, contain only alphanumeric ASCII characters [A-Za-z0-9]. + * Field is optional, Specify a value to replace all list of billing tags. + * This field is not removable, null value is not allowed. */ - schema?: Schema; + billingTags?: Array; + crc?: CRC; + digest?: Digest; + ttl?: Ttl; + contentType?: ContentType; + contentEncoding?: ContentEncoding; +} + +/** + * Properties that define the scale of the required streaming layer. `dataInThroughputKbps` and `dataOutThroughputKbps` + * can only be values multiple of 100. For instance, the value 33200 is valid while 32250 is not. + */ +export interface PatchStreamProperties { /** - * A one-sentence summary of the layer. You can see this summary when you browse a list of layers on the platform portal. - * Field is optional, specify value to modify layer summary. This field is not removable, null value is not allowed + * Maximum throughput for incoming data expressed in kilobytes per second. Throttling occurs when the inbound + * rate exceeds the maximum inbound throughput. The default is 1000 KBps. The minimum is 100 KBps, the maximum is + * 32800 KBps. Can only be multiple of 100 KBps. */ - summary?: string; + dataInThroughputKbps?: number; /** - * Some keywords that help to find the layer when searching in the platform portal. Field is optional, - * specify value to replace all list of tags. This field is not removable, null value is not allowed + * Maximum throughput for outgoing data expressed in kilobytes per second. Throttling occurs when the total + * outbound rate to all consumers exceeds the maximum outbound throughput. The default is 4000 KBps. + * The minimum is 100 KBps, the maximum is 65500 KBps. Can only be multiple of 100 KBps. */ - tags?: Tags; + dataOutThroughputKbps?: number; } export interface Replication { @@ -836,26 +1087,26 @@ export interface StatusLink { /** * Describes the catalog stream layer properties. */ -export interface StreamLayer { - billingTags: BillingTags; - contentEncoding?: ContentEncoding; - contentType: ContentType; - coverage?: Coverage; - created: LayerCreated; - description: LayerDescription; - hrn: LayerHrn; +export interface StreamLayer extends GetBaseLayer { id: LayerId; - layerType: StreamLayerType; + hrn: LayerHrn; name: LayerName; - partitioning: Partitioning; - partitioningScheme: DeprecatedPartitioningScheme; - schema?: Schema; - streamProperties: StreamProperties; summary: LayerSummary; + description: LayerDescription; + coverage?: Coverage; + schema?: Schema; + partitioningScheme: DeprecatedPartitioningScheme; + partitioning: Partitioning; + contentType: ContentType; + contentEncoding?: ContentEncoding; tags: Tags; - ttl: Ttl; + billingTags: BillingTags; ttlHours: TtlHours; + ttl: Ttl; volume: DurableVolume; + streamProperties: StreamProperties; + created: LayerCreated; + layerType: StreamLayerType; } /** @@ -864,20 +1115,45 @@ export interface StreamLayer { export type StreamLayerType = "stream"; /** - * Properties that define the scale of the required streaming service. + * Properties that define the scale of the required streaming layer. + * It is recommended to provide all 3 properties when creating a streaming layer. + * Either combination of `dataInThroughputKbps` and `dataOutThroughputKbps` or `parallelization` is required. + * `dataInThroughputKbps` and `dataOutThroughputKbps` can only be values multiple of 100. For instance, the value + * 33200 is valid while 32250 is not. Default values for missing field(s) will be calculated according to the + * following formulas: `1 parallelization = 1000 dataInThroughputKbps`, `1 parallelization = 2000 dataOutThroughputKbps`. */ export interface StreamProperties { /** + * @deprecated `dataInThroughputMbps` will be removed by 03.2022. * Maximum throughput for incoming data expressed in megabytes per second. * Throttling occurs when the inbound rate exceeds the maximum inbound throughput. The default is 4 MBps. The maximum is 32 MBps. */ dataInThroughputMbps?: number; /** + * @deprecated `dataOutThroughputMbps` will be removed by 03.2022. * Maximum throughput for outgoing data expressed in megabytes per second. * Throttling occurs when the total outbound rate to all consumers exceeds the maximum outbound throughput. * The default is 8 MBps. The maximum is 64 MBps. */ dataOutThroughputMbps?: number; + /** + * Maximum throughput for incoming data expressed in kilobytes per second. Throttling occurs when the inbound rate + * exceeds the maximum inbound throughput. The default is 1000 KBps. The minimum is 100 KBps, the maximum is 32800 KBps. + * Can only be multiple of 100 KBps. Can be updated by the user. + */ + dataInThroughputKbps?: number; + /** + * Maximum throughput for outgoing data expressed in kilobytes per second. Throttling occurs when the total outbound + * rate to all consumers exceeds the maximum outbound throughput. The default is 4000 KBps. The minimum is 100 KBps, + * the maximum is 65500 KBps. Can only be multiple of 100 KBps. Can be updated by the user. + */ + dataOutThroughputKbps?: number; + /** + * Number of stream partitions that maps to a Kafka topic partition. The maximum parallelism at which your application + * may run is determined by the maximum number of stream partitions of the input stream layer the application is reading + * from in its processing topology. The default is 4. The maximum is 32. + */ + parallelization?: number; } /** @@ -899,6 +1175,7 @@ export type Ttl = number; export type TtlHours = number; /** + * @deprecated `ValidationErrorMessage` will be removed by 03.2022. * HTTP Error message thrown by the service. */ export interface ValidationErrorMessage { @@ -927,24 +1204,25 @@ export interface ValidationErrorMessage { /** * Describes the catalog versioned layer properties. */ -export interface VersionedLayer { - billingTags: BillingTags; - contentEncoding?: ContentEncoding; - contentType: ContentType; - coverage?: Coverage; - created: LayerCreated; - description: LayerDescription; - digest?: Digest; - hrn: LayerHrn; +export interface VersionedLayer extends GetBaseLayer { id: LayerId; - layerType: VersionedLayerType; + hrn: LayerHrn; name: LayerName; - partitioning: Partitioning; - partitioningScheme: DeprecatedPartitioningScheme; - schema?: Schema; summary: LayerSummary; + description: LayerDescription; + coverage?: Coverage; + schema?: Schema; + partitioningScheme: DeprecatedPartitioningScheme; + partitioning: Partitioning; + contentType: ContentType; + contentEncoding?: ContentEncoding; tags: Tags; + billingTags: BillingTags; + digest?: Digest; + crc?: CRC; volume: DurableVolume; + created: LayerCreated; + layerType: VersionedLayerType; } /** @@ -955,26 +1233,28 @@ export type VersionedLayerType = "versioned"; /** * Describes the catalog volatile layer properties. */ -export interface VolatileLayer { - billingTags: BillingTags; - contentEncoding?: ContentEncoding; - contentType: ContentType; - coverage?: Coverage; - created: LayerCreated; - description: LayerDescription; - digest?: Digest; - hrn: LayerHrn; +export interface VolatileLayer extends GetBaseLayer { id: LayerId; - layerType: VolatileLayerType; + hrn: LayerHrn; name: LayerName; - partitioning: Partitioning; - partitioningScheme: DeprecatedPartitioningScheme; - schema?: Schema; summary: LayerSummary; + description: LayerDescription; + coverage?: Coverage; + schema?: Schema; + partitioningScheme: DeprecatedPartitioningScheme; + partitioning: Partitioning; + contentType: ContentType; + contentEncoding?: ContentEncoding; tags: Tags; - ttl: Ttl; + billingTags: BillingTags; ttlHours: TtlHours; + ttl: Ttl; + digest?: Digest; + crc?: CRC; volume: VolatileVolume; + volatileProperties?: VolatileProperties; + created: LayerCreated; + layerType: VolatileLayerType; } /** @@ -982,6 +1262,22 @@ export interface VolatileLayer { */ export type VolatileLayerType = "volatile"; +/** + * Properties that define the scale of the volatile layer. + */ +export interface VolatileProperties { + /** + * Volatile storage provision mode. + */ + dataRedundancy?: DataRedundancyEnum; + /** + * Capacity of volatile storage in MB. Value should be divisible by 100. The minimum is 100, the maximum is 21000 MB. + */ + storageCapacityMb: number; +} + +export type DataRedundancyEnum = "single-instance" | "multi-instance"; + /** * Describes a catalog volatile volume to be used for storing the layer's data content. */ @@ -991,6 +1287,7 @@ export interface VolatileVolume { */ maxMemoryPolicy?: MaxMemoryPolicyEnum; /** + * @deprecated `packageType` will be removed by 03.2022. * Define initial package type (capacity) of the volatile layer */ packageType?: PackageTypeEnum; @@ -998,10 +1295,16 @@ export interface VolatileVolume { } export type MaxMemoryPolicyEnum = "failOnWrite" | "replaceLessRecentlyUsedKey"; + +/** + * @deprecated `PackageTypeEnum` will be removed by 03.2022. + */ export type PackageTypeEnum = "experimental" | "small" | "medium" | "large"; -/* =================================================================== +/* + * =================================================================== * ConfigApi + * =================================================================== */ /** @@ -1009,8 +1312,9 @@ export type PackageTypeEnum = "experimental" | "small" | "medium" | "large"; * * @summary Checks the existence of a catalog * @param catalogHrn The HERE Resource Name (HRN) of the catalog. - * @param billingTag Billing Tag is an optional free-form tag which is used for grouping - * billing records together. If supplied, it must be between 4 - 16 characters, contain only alphanumeric ASCII characters [A-Za-z0-9]. + * @param billingTag The `billingTag` parameter is an optional free-form tag that you can use to group billing + * records together. If supplied, it must be between 4 - 16 characters, contain only alpha/numeric ASCII characters [A-Za-z0-9]. + * Grouping billing records by billing tag will be available in future releases. */ export async function catalogExists( builder: RequestBuilder, @@ -1035,14 +1339,14 @@ export async function catalogExists( /** * Creates a new catalog with the specified layers. The create catalog operation runs asynchronously. - * Once you've submitted the catalog for creation, you'll receive a randomly - * generated token that you can use to monitor the status of the operation. + * Once you've submitted the catalog for creation, you'll receive a randomly generated token that you can use to monitor + * the status of the operation. * * @summary Creates a catalog * @param body A catalog object that contains metadata and layer definitions. - * @param billingTag Billing Tag is an optional free-form tag which is used for - * grouping billing records together. If supplied, it must be between 4 - 16 characters, - * contain only alphanumeric ASCII characters [A-Za-z0-9]. + * @param billingTag The `billingTag` parameter is an optional free-form tag that you can use to group billing + * records together. If supplied, it must be between 4 - 16 characters, contain only alpha/numeric ASCII characters [A-Za-z0-9]. + * Grouping billing records by billing tag will be available in future releases. */ export async function createCatalog( builder: RequestBuilder, @@ -1070,9 +1374,10 @@ export async function createCatalog( * Deletes a catalog and any layers within that catalog. * * @summary Deletes a catalog - * @param catalogHrn The HERE Resource Name (HRN) of the catalog. - * @param billingTag Billing Tag is an optional free-form tag which is used for grouping billing records together. - * If supplied, it must be between 4 - 16 characters, contain only alphanumeric ASCII characters [A-Za-z0-9]. + * @param catalogHrn The HERE Resource Name (HRN) of the catalog + * @param billingTag The `billingTag` parameter is an optional free-form tag that you can use to group billing records together. + * If supplied, it must be between 4 - 16 characters, contain only alpha/numeric ASCII characters [A-Za-z0-9]. + * Grouping billing records by billing tag will be available in future releases. */ export async function deleteCatalog( builder: RequestBuilder, @@ -1096,11 +1401,11 @@ export async function deleteCatalog( } /** - * Delete a layer of the catalog, if it's of layerType 'index', 'volatile' or 'stream'. Other layerTypes are currently not supported. + * Deletes a layer of the catalog if it's of layerType 'index', 'volatile', or 'stream'. Other `layerTypes` are currently not supported. * * @summary Delete a layer - * @param catalogHrn The HERE Resource Name (HRN) of the catalog. - * @param layerId The layer ID. + * @param catalogHrn The HERE Resource Name (HRN) of the catalog + * @param layerId The layer ID */ export async function deleteLayer( builder: RequestBuilder, @@ -1122,13 +1427,40 @@ export async function deleteLayer( } /** - * Gets the full catalog configuration for the requested catalog. The catalog configuration contains descriptive and structural - * information such as layer definitions and layer types. + * Disable automatic retired versions cleanup. * - * @summary Gets the details of a catalog + * @summary Disable automatic version deletion * @param catalogHrn The HERE Resource Name (HRN) of the catalog. - * @param billingTag Billing Tag is an optional free-form tag which is used for grouping billing records together. If supplied, - * it must be between 4 - 16 characters, contain only alphanumeric ASCII characters [A-Za-z0-9]. + */ +export async function disableAutomaticVersionDeletion( + builder: RequestBuilder, + params: { catalogHrn: string } +): Promise { + const baseUrl = "/catalogs/{catalogHrn}/automaticVersionDeletion".replace( + "{catalogHrn}", + UrlBuilder.toString(params["catalogHrn"]) + ); + + const urlBuilder = new UrlBuilder(builder.baseUrl + baseUrl); + + const headers: { [header: string]: string } = {}; + const options: RequestOptions = { + method: "DELETE", + headers + }; + + return builder.request(urlBuilder, options); +} + +/** + * Gets the full catalog configuration for the requested catalog. The catalog configuration contains descriptive and + * structural information such as layer definitions and layer types. + * + * @summary Gets the details of a catalog + * @param catalogHrn The HERE Resource Name (HRN) of the catalog + * @param billingTag The `billingTag` parameter is an optional free-form tag that you can use to group billing + * records together. If supplied, it must be between 4 - 16 characters, contain only alpha/numeric ASCII characters [A-Za-z0-9]. + * Grouping billing records by billing tag will be available in future releases. */ export async function getCatalog( builder: RequestBuilder, @@ -1152,18 +1484,19 @@ export async function getCatalog( } /** - * Takes the randomly generated token that you receive when you submit a catalog for creation. - * You can use it to monitor the status of your request. + * Takes the randomly generated token that you receive when you submit a catalog for creation. You can use it to monitor the status + * of your request. * - * @summary Gets the status of a create, update or delete catalog request - * @param token The token of catalog creation, modification or deletion task. - * @param billingTag Billing Tag is an optional free-form tag which is used for grouping billing - * records together. If supplied, it must be between 4 - 16 characters, contain only alphanumeric ASCII characters [A-Za-z0-9]. + * @summary Gets the status of a create, update or delete catalog request. + * @param token The token of catalog creation, modification or deletion task + * @param billingTag The `billingTag` parameter is an optional free-form tag that you can use to group billing records + * together. If supplied, it must be between 4 - 16 characters, contain only alpha/numeric ASCII characters [A-Za-z0-9]. + * Grouping billing records by billing tag will be available in future releases. */ export async function getCatalogStatus( builder: RequestBuilder, params: { token: string; billingTag?: string } -): Promise { +): Promise { const baseUrl = "/status/{token}".replace( "{token}", UrlBuilder.toString(params["token"]) @@ -1178,78 +1511,84 @@ export async function getCatalogStatus( headers }; - return builder.request(urlBuilder, options); + return builder.request(urlBuilder, options); } /** - * Lists all catalogs that your account has access to. To get access to a catalog, - * your administrator must associate it in your HERE platform account. - * By default, the list provides summary data for each catalog such as the title, configuration URL and resource type. + * Lists all catalogs that your account has access to. To get access to a catalog, your administrator must associate this catalog + * in your HERE platform account. By default, the list provides summary data for each catalog such as the title, the configuration + * URL, and the resource type. * * @summary Gets a list of all catalogs - * @param billingTag Billing Tag is an optional free-form tag which is used for - * grouping billing records together. If supplied, it must be between 4 - 16 characters, - * contain only alphanumeric ASCII characters [A-Za-z0-9]. - * @param verbose Indicates if the response should contain fully expanded catalog configurations - * @param q Works only when the verbose flag is set to true. The result contains only those - * items which have the given string as a part of the value of one or more searchable fields - * (substring compare). It'll search following catalog details fields: id, name, summary, - * description, tags and layer details: id, name, summary, description, tags, schema-hrn - * @param organisation Works only when the verbose flag is set to true. Filters only catalogs - * (layers) belonging to specified organisation. Filtering is done only on catalog (layer) owner - * organisation id. No organisation means to search for all - * @param organisationType Works only when the verbose flag is set to true. Filters only catalogs - * belonging to organisation. If 'myOrganisation', searches catalogs (layers) with the same - * owner organisation id like requester. If 'here', searches catalogs (layers) with owner - * organisation id is equal to Here organisation. If 'other', searches catalogs (layers) with - * owner organisation id is not equal to requester organisation and not equal to Here organisation. - * No organisationType means to search for all. - * @param layerType Works only when the verbose flag is set to true. Comma separated list of layer - * types (with OR semantic) to look for in the layer type. Filters only catalogs that contain layer - * with layer type presented in given list. No layerType means to search for all. - * @param region Works only when the verbose flag is set to true. Comma separated list of regions - * (with OR semantic) to look for in the catalog replication configuration. Filters only catalogs - * that contain region presented in given list. No region means search for all. - * @param schemaHrn Works only when the verbose flag is set to true. Filters only catalogs - * (layers) by the specified layer schema HRN. Filtering is done only on layer schema. - * No schema means to search for all. - * @param resourceType Works only when the verbose flag is set to true. Specifies other filters behavior. - * If 'catalog', applies other filters to search catalogs (and layers inside). If 'layer', - * applies other filters to search layers. Return json structure is the same for both cases - * (list of catalogs with list of layers inside each catalog). - * @param coverage Works only when the verbose flag is set to true. Comma separated list of countries - * (with OR semantic) to look for in the catalog (layer) coverage. Only catalogs (layers) - * covering specified countries will be returned. Field is treated case insensitive. No coverage means to include all countries. - * @param access Works only when the verbose flag is set to true. Comma separated list of access - * types (with OR semantic) to filter result. If 'default', returns catalogs user have read - * or manage access to. If 'create', returns catalogs user have created and match owner.creator - * field, If 'manage', returns catalogs user have have manage access to. If 'orgAdmin', - * returns catalogs OrgAdmin user have access to. - * @param limit Works only when the verbose flag is set to true. When provided result element count will - * be limited to this value. Minimum: 1 - * @param sortBy Works only when the verbose flag is set to true. Specifies sort field. - * If 'name', sorts catalogs by catalog name. If 'created', sorts catalogs - * by catalog create time. Layers inside catalog are always sorted by layer name. No sortBy means sort by 'name' - * @param sortOrder Works only when the verbose flag is set to true. Specifies sort order. - * If 'asc', sorts ascending. If 'desc', sorts descending. No sortOrder means sort order 'asc' + * @param billingTag The `billingTag` parameter is an optional free-form tag that you can use to group billing records + * together. If supplied, it must be between 4 - 16 characters, contain only alpha/numeric ASCII characters [A-Za-z0-9]. + * Grouping billing records by billing tag will be available in future releases. + * @param verbose Indicates if the response should contain fully expanded catalog configurations. "true" | "false". + * @param q Works only when the verbose flag is set to true. The result contains only those items which have the given string + * as a part of the value of one or more searchable fields (substring compare). It will search the following catalog details + * fields: id, name, summary, description, tags and layer details: id, name, summary, description, tags, schema-hrn + * @param organisation Works only when the verbose flag is set to true. Filters only catalogs (layers) that belong to a specified + * organisation. You can filter only by catalog (layer) owner organisation ID. If you do not specify an organisation, the search + * is unfiltered. + * @param organisationType Works only when the verbose flag is set to true. Filters only catalogs that belong to an organisation. + * If set to ``myOrganisation``, the search is for catalogs (layers) with the same owner organisation ID like the + * requester``s. If set to ``here``, the search is for catalogs (layers) with the same owner organisation ID + * is equal to the Here organisation. If set to ``other``, the search is for catalogs (layers) with an owner organisation + * ID not equal to the requester organisation and not equal to HERE organisation. If you do not specify an organisation, + * the search is unfiltered. + * @param layerType Works only when the verbose flag is set to true. Comma-separated list of layer types (with OR semantic) to look for + * in the layer type. Filters only catalogs that contain layers with layer type presented in a given list. If you do not specify a layer + * type, the search is unfiltered. + * @param region Works only when the verbose flag is set to true. Comma-separated list of regions (with OR semantic) to look for + * in the catalog replication configuration. Filters only catalogs that contain region presented in given list. + * If you do not specify a region, the search is unfiltered. + * @param schemaHrn Works only when the verbose flag is set to true. Filters only catalogs (layers) by the specified layer schema HRN. + * You can only filter by layer schema. If you do not specify a schema, the search is unfiltered. + * @param resourceType Works only when the verbose flag is set to true. Specifies other filters behavior. If set to `catalog`, + * this applies other filters to search catalogs (and layers inside). If set to `layer`, this applies other filters to search layers. + * The returned json structure is the same for both cases (list of catalogs with list of layers inside each catalog). + * @param coverage Works only when the verbose flag is set to true. Comma-separated list of countries (with OR semantic) to look for + * in the catalog (layer) coverage. Only catalogs (layers) covering specified countries will be returned. This filed is case-insensitive. + * If you do not specify coverage, the search includes all countries. + * @param access Works only when the verbose flag is set to true. Comma-separated list of access types (with OR semantic) + * to filter result. If set to `default`, the response includes catalogs the user has read or manage access to. If set to `create`, + * the response includes catalogs the user has created and which match the `owner.creator` field, if set to `manage`, + * the response includes catalogs the user has manage access to. If set to `orgAdmin`, the response includes catalogs the `OrgAdmin` + * user have access to. + * @param marketplaceReady Indicates if the response should contain only Marketplace-ready catalogs. If this flag is set to true, + * the service will return only catalogs with the `marketplaceReady` element set to true. + * @param limit Works only when the verbose flag is set to true. When specified, result element count will be limited to this value. + * Minimum: 1. + * @param sortBy Works only when the verbose flag is set to true. Specifies sort field. If set to `name`, the response contains catalogs + * sorted by catalog name. If set to `created`, the the response contains catalogs sortedby catalog create time. Layers inside a catalog + * are always sorted by layer name. If you do not specify a `sortBy`, the response contains catalogs sorted by `name`. + * @param sortOrder Works only when the verbose flag is set to true. Specifies the sort order. If set to `asc`, + * the sort order is ascending. If set to `desc`, the sort order is descending. If you do not specify `sortOrder`, + * the sort order is ascending. + * @param linkable Indicates if the response should only return the list of linkable catalogs. Note: - If set to + * `true` and the access token has a project scope, then the response will include the catalogs + * that are available to the caller to link to the project in the token`s project scope and HERE public catalogs. + * - If set to `true` and the access token has no scope, then the response will include all HERE public catalogs only. */ export async function getCatalogs( builder: RequestBuilder, params: { billingTag?: string; - verbose?: any; + verbose?: string; q?: string; organisation?: string; - organisationType?: Array<"myOrganisation" | "here" | "other">; - layerType?: Array<"versioned" | "stream" | "volatile">; - region?: Array<"eu-ireland" | "us-oregon" | "cn-ningxia">; + organisationType?: Array; + layerType?: Array; + region?: Array; schemaHrn?: string; - resourceType?: "catalog" | "layer"; - coverage?: string[]; - access?: Array<"default" | "create" | "manage" | "orgAdmin">; + resourceType?: string; + coverage?: Array; + access?: Array; + marketplaceReady?: boolean; limit?: number; - sortBy?: "name" | "created"; - sortOrder?: "asc" | "desc"; + sortBy?: string; + sortOrder?: string; + linkable?: boolean; } ): Promise { const baseUrl = "/catalogs"; @@ -1266,9 +1605,11 @@ export async function getCatalogs( urlBuilder.appendQuery("resourceType", params["resourceType"]); urlBuilder.appendQuery("coverage", params["coverage"]); urlBuilder.appendQuery("access", params["access"]); + urlBuilder.appendQuery("marketplaceReady", params["marketplaceReady"]); urlBuilder.appendQuery("limit", params["limit"]); urlBuilder.appendQuery("sortBy", params["sortBy"]); urlBuilder.appendQuery("sortOrder", params["sortOrder"]); + urlBuilder.appendQuery("linkable", params["linkable"]); const headers: { [header: string]: string } = {}; const options: RequestOptions = { @@ -1280,19 +1621,18 @@ export async function getCatalogs( } /** - * Modify some fields of the catalog. - * The existing HTTP PUT method only allows a complete replacement of a catalog configuration, - * HTTP PATCH method is used to modify some fields of existing catalog configuration. - * All fields are optional. Specify field value to modify it, not specified fields are ignored. - * To remove field value use null value (for more information see RFC 7396 - JSON Merge Patch). + * Modify some fields of the catalog. The existing HTTP PUT method only allows a complete replacement of a catalog configuration, + * HTTP PATCH method is used to modify some fields of existing catalog configuration. All fields are optional. + * Specify field value to modify it, not specified fields are ignored. To remove the field value use the null value. + * For more information, see RFC 7396 - JSON Merge Patch. * * @summary Modify a catalog - * @param catalogHrn The HERE Resource Name (HRN) of the catalog. - * @param body A catalog object that contains modification of catalog configuration. + * @param body A catalog object that contains modification of catalog configuration + * @param catalogHrn The HERE Resource Name (HRN) of the catalog */ export async function patchCatalog( builder: RequestBuilder, - params: { catalogHrn: string; body: PatchCatalog } + params: { body: PatchCatalog; catalogHrn: string } ): Promise { const baseUrl = "/catalogs/{catalogHrn}".replace( "{catalogHrn}", @@ -1315,19 +1655,18 @@ export async function patchCatalog( } /** - * Modify some fields of the catalog layer. HTTP PATCH method is used to modify - * some fields of existing layer configuration. All fields are optional. - * Specify field value to modify it, not specified fields are ignored. - * To remove field value use null value (for more information see RFC 7396 - JSON Merge Patch). + * Modify some fields of the catalog layer. HTTP PATCH method is used to modify some fields of existing layer configuration. + * All fields are optional. Specify field value to modify it, not specified fields are ignored. To remove the field value use the null + * value. For more information see RFC 7396 - JSON Merge Patch. * * @summary Modify a catalog layer - * @param catalogHrn The HERE Resource Name (HRN) of the catalog. - * @param layerId The layer ID. - * @param body A layer object that contains modification of layer configuration. + * @param body A layer object that contains modification of layer configuration + * @param catalogHrn The HERE Resource Name (HRN) of the catalog + * @param layerId The layer ID */ export async function patchLayer( builder: RequestBuilder, - params: { catalogHrn: string; layerId: string; body: PatchLayer } + params: { body: PatchLayer; catalogHrn: string; layerId: string } ): Promise { const baseUrl = "/catalogs/{catalogHrn}/layers/{layerId}" .replace("{catalogHrn}", UrlBuilder.toString(params["catalogHrn"])) @@ -1349,19 +1688,19 @@ export async function patchLayer( } /** - * Updates any descriptive and structural information in the catalog. - * To update a catalog, send a new version of your catalog configuration with the updated data and any required fields. + * Updates any descriptive and structural information in the catalog. To update a catalog, send a new version of your catalog + * configuration with the updated data and any required fields. * * @summary Updates a catalog - * @param catalogHrn The HERE Resource Name (HRN) of the catalog. * @param body A catalog object that contains metadata and layer definitions. - * @param billingTag Billing Tag is an optional free-form tag which is used for - * grouping billing records together. If supplied, it must be between 4 - 16 characters, - * contain only alphanumeric ASCII characters [A-Za-z0-9]. + * @param catalogHrn The HERE Resource Name (HRN) of the catalog + * @param billingTag The `billingTag` parameter is an optional free-form tag that you can use to group billing records together. + * If supplied, it must be between 4 - 16 characters, contain only alpha/numeric ASCII characters [A-Za-z0-9]. + * Grouping billing records by billing tag will be available in future releases. */ export async function updateCatalog( builder: RequestBuilder, - params: { catalogHrn: string; body: CreateCatalog; billingTag?: string } + params: { body: CreateCatalog; catalogHrn: string; billingTag?: string } ): Promise { const baseUrl = "/catalogs/{catalogHrn}".replace( "{catalogHrn}", diff --git a/@here/olp-sdk-dataservice-api/test/ConfigApi.test.ts b/@here/olp-sdk-dataservice-api/test/ConfigApi.test.ts index fc1fae3a..fb57aa45 100644 --- a/@here/olp-sdk-dataservice-api/test/ConfigApi.test.ts +++ b/@here/olp-sdk-dataservice-api/test/ConfigApi.test.ts @@ -121,6 +121,28 @@ describe("ConfigApi", function() { expect(result).to.be.equal("success"); }); + it("disableAutomaticVersionDeletion", async function() { + const params = { + catalogHrn: "mocked-catalogHrn" + }; + const builder = { + baseUrl: "http://mocked.url", + request: async (urlBuilder: UrlBuilder, options: any) => { + expect(urlBuilder.url).to.be.equal( + "http://mocked.url/catalogs/mocked-catalogHrn/automaticVersionDeletion" + ); + expect(options.method).to.be.equal("DELETE"); + return Promise.resolve("success"); + } + }; + const result = await ConfigApi.disableAutomaticVersionDeletion( + (builder as unknown) as RequestBuilder, + params + ); + + expect(result).to.be.equal("success"); + }); + it("getCatalog", async function() { const params = { catalogHrn: "mocked-catalogHrn",