"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ArcgisHubDownloadFileTooLargeError = exports.ArcgisHubDownloadError = exports.PORTAL_EXPORT_TYPES = void 0;
/**
 * This hash map was defined to support the previous implementation of the export item flow.
 * We are currently working on a new implementation that will replace this hash map, but we
 * need to keep this around for now to support the existing implementation.
 */
exports.PORTAL_EXPORT_TYPES = {
    csv: {
        name: "CSV",
        itemTypes: ["CSV", "CSV Collection"],
        supportsProjection: true,
    },
    kml: {
        name: "KML",
        itemTypes: ["KML", "KML Collection"],
        supportsProjection: false,
    },
    shapefile: {
        name: "Shapefile",
        itemTypes: ["Shapefile"],
        supportsProjection: true,
    },
    fileGeodatabase: {
        name: "File Geodatabase",
        itemTypes: ["File Geodatabase"],
        supportsProjection: true,
    },
    geojson: {
        name: "GeoJson",
        itemTypes: ["GeoJson"],
        supportsProjection: false,
    },
    excel: {
        name: "Excel",
        itemTypes: ["Microsoft Excel"],
        supportsProjection: true,
    },
    featureCollection: {
        name: "Feature Collection",
        itemTypes: ["Feature Collection"],
        supportsProjection: true,
    },
    // Do we want to support Scene Packages?
    // scenePackage: {
    //   name: "Scene Package",
    //   itemTypes: ["Scene Package"],
    //   supportsProjection: ???,
    // },
};
/**
 * Error class for reporting well-known download errors that occur during the download process.
 */
class ArcgisHubDownloadError extends Error {
    constructor(options) {
        super(options.rawMessage);
        this.name = "ArcgisHubDownloadError";
        this.message = options.rawMessage;
        this.messageId = options.messageId;
        this.operation = options.operation;
    }
}
exports.ArcgisHubDownloadError = ArcgisHubDownloadError;
/**
 * Error class specifically for when download files exceed size limits.
 */
class ArcgisHubDownloadFileTooLargeError extends ArcgisHubDownloadError {
    constructor(options) {
        super(options);
        this.name = "ArcgisHubDownloadFileTooLargeError";
    }
}
exports.ArcgisHubDownloadFileTooLargeError = ArcgisHubDownloadFileTooLargeError;
//# sourceMappingURL=types.js.map