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F,CAMA,SAAS,SAAS,GAEd,OADa,IAAI,WAAW,GACd,gBAClB,CAOA,SAAS,YAAY,EAAO,GACX,IAAI,WAAW,GACrB,YAAY,EACvB,CAOA,SAAS,iBAAiB,EAAO,GAChB,IAAI,WAAW,GACrB,iBAAiB,EAC5B,CAOA,SAAS,WAAW,EAAM,GACtB,OAAO,WAAW,WAAW,EAAM,EACvC,CAMA,SAAS,eAAe,GACpB,OAAO,WAAW,eAAe,EACrC,CAMA,eAAe,gBAAgB,GAE3B,OADa,IAAI,WAAW,GACd,iBAClB,CAMA,eAAe,mBAAmB,GAE9B,OADa,IAAI,WAAW,GACd,oBAClB,CAMA,eAAe,OAAO,GAElB,OADa,IAAI,WAAW,EAAO,EAAM,SAAW,CAAC,GACvC,QAClB,CAUA,SAAS,eAAe,EAAO,EAAS,EAAmB,EAAa,GAEpE,IAAI,EAAS,IAAI,WAAW,EAAO,EAAS,eAAe,IADhC,GAE3B,OAAI,EAAO,UACA,EAAO,eAAe,EAAmB,EAAa,GAE1D,EAAG,IAAI,UAAU,SAAS,QAAQ,IAAI,EAAQ,0BAA2B,wBACpF,CACA,QAAQ,QAAU,CACd,gBACA,oBACA,sCACA,kBACA,wBACA,kCACA,sBACA,8BACA,gCACA,sCACA,cACA,8BACA","file":"/npm/openapi-to-postmanv2@6.3.0/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.48.0.\n * Original file: /npm/openapi-to-postmanv2@6.3.0/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SchemaPack = void 0;\nexports.convert = convert;\nexports.convertV2 = convertV2;\nexports.convertV2WithTypes = convertV2WithTypes;\nexports.validate = validate;\nexports.getMetaData = getMetaData;\nexports.mergeAndValidate = mergeAndValidate;\nexports.getOptions = getOptions;\nexports.getSyncOptions = getSyncOptions;\nexports.detectRootFiles = detectRootFiles;\nexports.detectRelatedFiles = detectRelatedFiles;\nexports.bundle = bundle;\nexports.syncCollection = syncCollection;\nconst lodash_1 = __importDefault(require(\"lodash\"));\nconst { MODULE_VERSION } = require('../lib/schemapack.js');\nconst SchemaPack = require('../lib/schemapack.js').SchemaPack;\nexports.SchemaPack = SchemaPack;\nconst UserError = require('../lib/common/UserError');\nconst DEFAULT_INVALID_ERROR = 'Provided definition is invalid';\n/**\n * Converts an OpenAPI specification to a Postman Collection (v1 API)\n * @param {SpecificationInput} input - The OpenAPI specification input\n * @param {Options} options - Conversion options\n * @param {Callback} cb - Callback function with conversion result\n * @returns {void}\n */\nfunction convert(input, options, cb) {\n    var schema = new SchemaPack(input, options);\n    if (schema.validated) {\n        return schema.convert(cb);\n    }\n    return cb(new UserError(lodash_1.default.get(schema, 'validationResult.reason', DEFAULT_INVALID_ERROR)));\n}\n/**\n * Converts an OpenAPI specification to a Postman Collection (v2 API)\n * @param {SpecificationInput} input - The OpenAPI specification input\n * @param {Options} options - Conversion options\n * @param {Callback} cb - Callback function with conversion result\n * @returns {void}\n */\nfunction convertV2(input, options, cb) {\n    var schema = new SchemaPack(input, options, MODULE_VERSION.V2);\n    if (schema.validated) {\n        return schema.convertV2(cb);\n    }\n    return cb(new UserError(lodash_1.default.get(schema, 'validationResult.reason', DEFAULT_INVALID_ERROR)));\n}\n/**\n * Converts an OpenAPI specification to a Postman Collection (v2 API) with type fetching enabled\n * @param {SpecificationInput} input - The OpenAPI specification input\n * @param {Options} options - Conversion options\n * @param {Callback} cb - Callback function with conversion result\n * @returns {void}\n */\nfunction convertV2WithTypes(input, options, cb) {\n    const enableTypeFetching = true;\n    var schema = new SchemaPack(input, options, MODULE_VERSION.V2, enableTypeFetching);\n    if (schema.validated) {\n        return schema.convertV2(cb);\n    }\n    return cb(new UserError(lodash_1.default.get(schema, 'validationResult.reason', DEFAULT_INVALID_ERROR)));\n}\n/**\n * Validates an OpenAPI specification\n * @param {SpecificationInput} input - The OpenAPI specification input\n * @returns {ValidationResult} Validation result\n */\nfunction validate(input) {\n    var schema = new SchemaPack(input);\n    return schema.validationResult;\n}\n/**\n * Retrieves metadata from an OpenAPI specification\n * @param {SpecificationInput} input - The OpenAPI specification input\n * @param {Callback} cb - Callback function with metadata result\n * @returns {void}\n */\nfunction getMetaData(input, cb) {\n    var schema = new SchemaPack(input);\n    schema.getMetaData(cb);\n}\n/**\n * Merges and validates an OpenAPI specification\n * @param {SpecificationInput} input - The OpenAPI specification input\n * @param {Callback} cb - Callback function with merge and validation result\n * @returns {void}\n */\nfunction mergeAndValidate(input, cb) {\n    var schema = new SchemaPack(input);\n    schema.mergeAndValidate(cb);\n}\n/**\n * Gets conversion options\n * @param {string} mode - Mode for options ('document' or 'use')\n * @param {OptionsCriteria} criteria - Criteria for filtering options\n * @returns {OptionDefinition[] | OptionsRecord} Option definitions or option values\n */\nfunction getOptions(mode, criteria) {\n    return SchemaPack.getOptions(mode, criteria);\n}\n/**\n * Gets sync options\n * @param {string} mode - Mode for options ('document' or 'use')\n * @returns {OptionDefinition[] | OptionsRecord} Option definitions or option values\n */\nfunction getSyncOptions(mode) {\n    return SchemaPack.getSyncOptions(mode);\n}\n/**\n * Detects root files in a multi-file OpenAPI specification\n * @param {SpecificationInput} input - The OpenAPI specification input\n * @returns {Promise<FilesResult>} Promise with detection result\n */\nasync function detectRootFiles(input) {\n    var schema = new SchemaPack(input);\n    return schema.detectRootFiles();\n}\n/**\n * Detects related files in a multi-file OpenAPI specification\n * @param {SpecificationInput} input - The OpenAPI specification input\n * @returns {Promise<FilesResult>} Promise with detection result\n */\nasync function detectRelatedFiles(input) {\n    var schema = new SchemaPack(input);\n    return schema.detectRelatedFiles();\n}\n/**\n * Bundles a multi-file OpenAPI specification into a single file\n * @param {SpecificationInput} input - The OpenAPI specification input with optional bundling options\n * @returns {Promise<BundleResult>} Promise with bundled specification\n */\nasync function bundle(input) {\n    var schema = new SchemaPack(input, input.options ?? {});\n    return schema.bundle();\n}\n/**\n * Syncs a Postman Collection with changes from an OpenAPI specification\n * @param {SpecificationInput} input - The OpenAPI specification input\n * @param {Options} options - Conversion options\n * @param {object} currentCollection - The current Postman Collection to sync\n * @param {SyncOptions | null} syncOptions - Sync options\n * @param {Callback} cb - Callback function with sync result\n * @returns {void}\n */\nfunction syncCollection(input, options, currentCollection, syncOptions, cb) {\n    const enableTypeFetching = true;\n    var schema = new SchemaPack(input, options, MODULE_VERSION.V2, enableTypeFetching);\n    if (schema.validated) {\n        return schema.syncCollection(currentCollection, syncOptions, cb);\n    }\n    return cb(new UserError(lodash_1.default.get(schema, 'validationResult.reason', DEFAULT_INVALID_ERROR)));\n}\nexports.default = {\n    convert,\n    convertV2,\n    convertV2WithTypes,\n    validate,\n    getMetaData,\n    mergeAndValidate,\n    getOptions,\n    getSyncOptions,\n    detectRootFiles,\n    detectRelatedFiles,\n    bundle,\n    syncCollection,\n    SchemaPack\n};\n"]}