/** * Publish API v2 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: 2.0.0 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Do not edit the class manually. */ import { RequestBuilder } from "./RequestBuilder"; /** * Details of the publication. */ export interface Details { /** * The state of the publication. * * `initialized` - The publication is active and able to receive partitions. The publication can also be submitted while in this state. * If you cancel the publication while it is in this state all uploaded partitions are discarded and a new publication is created. * An initialized publication expires after a period of inactivity. * * `submitted` - The publication is active and is processing the uploaded partitions. When a publication is in this state you cannot * upload more partitions to the publication. * You cannot cancel the publication at this point. It can only succeed, fail, or expire. * * `cancelled` - The publication was cancelled, either by a cancel request from a user or by initializing a new publication * while this one was in the `initialized` state. * * `succeeded` - The publication was successfully processed. * * `failed` - The publication failed due to an error. * The error is provided in the `message` field. * * `expired` - The publication has expired due to inactivity. */ state: string; /** * A message describing the state. */ message: string; /** * The time when the publication started, expressed as the number of milliseconds since the Unix epoch. */ started: number; /** * The time when the publication was last modified, expressed as the number of milliseconds since the Unix epoch. */ modified?: number; /** * The time when the publication expires, expressed as the number of milliseconds since the Unix epoch. */ expires: number; } export interface Publication { /** * The ID of the publication. */ id?: string; details?: Details; layerIds: string[]; /** * The current version of the catalog. If this is the catalog's first publication, the version is `-1`. * After the first publication, the catalog version becomes 0. Each subsequent publication increments the catalog version by 1. */ catalogVersion?: number; /** * The upstream version dependencies for the publication. */ versionDependencies?: VersionDependency[]; } /** * Metadata describing the partition being published. */ export interface PublishPartition { /** * A key that specifies the partition that the content is related to. It is required. * If the layer's partitioning scheme is set to `heretile`, the partition key is the tile key. * The maximum length of the partition key is 500 characters. */ partition: string; /** * The checksum of the content published to Blob API, applicable when the layer storage volume type is `durable` * and therefore the content is constant over time. The algorithm used to calculate the checksum is user specific. * Algorithms that you can use are, for example, MD5 or SHA1. * This is not a secure hash, so you should only use it to detect changes in content. */ checksum?: string; /** * The compressed size in bytes of the content published to Blob API, applicable when the layer storage volume type is `durable` * and therefore the content is constant over time. * Applicable when Content-Encoding is set to gzip when uploading and downloading data in the Blob API. */ compressedDataSize?: number; /** * The nominal size in bytes of the content published to Blob API, * applicable when the layer storage volume type is `durable` and therefore the content is constant over time. * When compression is enabled, this is the size of the uncompressed content. */ dataSize?: number; /** * The content published directly in the metadata and encoded in base64. * The size of the content is limited. Either `data` or `dataHandle` must be present. */ data?: string; /** * The handle created when uploading the content to the Blob API, that is used to retrieve the content at a later stage. * Either `data` or `dataHandle` must be present. */ dataHandle?: string; /** * The timestamp of the content, in milliseconds since the Unix epoch. Mandatory for layers of type `stream`. * The format of the timestamp is user specific. If the content contains multiple elements each having its own timestamp, * we recommend setting the metadata timestamp to the earliest of them. */ timestamp?: number; } export interface PublishPartitions { /** * Array of partitions. */ partitions: PublishPartition[]; } /** * Metadata about any dependencies on other catalogs that the publication may have. */ export interface VersionDependency { /** * Indicates the type of data dependency. If this value is set to false, this dependency is an indirect dependency. * This means that data from this catalog was not directly used by a data processing filter to update the current * version of the catalog. Instead, the data was only used by upstream pipelines to generate the input data for * a data processing pipeline. */ direct: boolean; /** * The HERE Resource Name (HRN) of the catalog that the publication depends on. */ hrn: string; /** * The version of the catalog metadata that the publication depends on. */ version: number; } /** * Cancels a publication if it has not yet been submitted. * Will fail if attempting to cancel a submitted publication. * This allows the specified publication to be abandoned. * See Data API Developer’s Guide in the Documentation section for publication states diagram * and all possible publication states transitions. * * @summary Cancels a publication * @param publicationId The ID of the publication to cancel. * @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 and contain only alphanumeric ASCII characters [A-Za-z0-9]. * Grouping billing records by billing tag will be available in future releases. */ export declare function cancelPublication(builder: RequestBuilder, params: { publicationId: string; billingTag?: string; }): Promise; /** * Returns the details of the specified publication. * * Publication can be in one of these states: * - Initialized, * - Submitted, * - Cancelled, * - Failed, * - Succeeded, * - Expired. * * See Data API Developer’s Guide in the Documentation section for the publication state diagram. * * @summary Gets a publication * @param publicationId The ID of the publication to retrieve. * @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 and contain only alphanumeric ASCII characters [A-Za-z0-9]. * Grouping billing records by billing tag will be available in future releases. */ export declare function getPublication(builder: RequestBuilder, params: { publicationId: string; billingTag?: string; }): Promise; /** * Initializes a new publication for publishing metadata. * Determines the publication type based on the provided layer IDs. * A publication can only consist of layer IDs that have the same layer type. * For example, you can have a publication for multiple layers of type `versioned`, * but you cannot have a single publication that publishes to both `versioned` and `stream` layers. * In addition, you may only have one `versioned` or `volatile` publication in process at a time. * You cannot have multiple active publications to the same catalog for `versioned` and `volatile` layer types. * The body field `versionDependencies` is optional and is used for `versioned` layers to declare version dependencies. * * @summary Initialize a new publication * @param body Fields to initialize a publication. * @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 alpha/numeric ASCII characters [A-Za-z0-9]. * Grouping billing records by billing tag will be available in future releases. */ export declare function initPublication(builder: RequestBuilder, params: { body: Publication; billingTag?: string; }): Promise; /** * Submits the publication and initiates post processing if necessary. * Publication state becomes `Submitted` directly after submission and `Succeeded` after successful processing. * See Data API Developer’s Guide in the Documentation section for complete publication states diagram. * * @summary Submits a publication * @param publicationId ID of publication to submit. * @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 and contain only alphanumeric ASCII characters [A-Za-z0-9]. * Grouping billing records by billing tag will be available in future releases. */ export declare function submitPublication(builder: RequestBuilder, params: { publicationId: string; billingTag?: string; }): Promise; /** * Upload partitions to the given layer. * Dependending on the publication type, post processing may be required before the partitions are published. * For better performance batch your partitions (e.g. 1000 per request), rather than uploading them individually. * * @summary Upload partitions * @param layerId The ID of the layer to publish to. * @param publicationId The ID of publication to publish to. * @param body Publication partitions. Data and DataHandle fields cannot be populated at the same time. * See Partition object for more details on body fields * @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 and contain only alphanumeric ASCII characters [A-Za-z0-9]. * Grouping billing records by billing tag will be available in future releases. */ export declare function uploadPartitions(builder: RequestBuilder, params: { layerId: string; publicationId: string; body: PublishPartitions; billingTag?: string; }): Promise;