import { createRequire as _createRequire } from 'node:module';
const require = _createRequire(import.meta.url);
import {
  resolveUrl,
  serializer,
  toURLSearchParams
} from "./chunk-HWT3LUJJ.js";
import {
  init_esm_shims
} from "./chunk-EXLZF52D.js";

// ../../node_modules/@wix/ambassador-velo-npm-v1-npm-package-info/build/es/http.impl.js
init_esm_shims();
var _getResolveNpmDependenciesResultRequest = {};
var _getResolveNpmDependenciesResultResponse = {};
var _resolveNpmDependenciesRequest = {};
var _resolveNpmDependenciesResponse = {};
function resolveWixVeloNpmV1UserCodeNpmPackagesUrl(opts) {
  var domainToMappings = {
    "api._api_base_domain_": [
      {
        srcPath: "/wix-code-user-code-dependencies",
        destPath: ""
      }
    ],
    "editor._base_domain_": [
      {
        srcPath: "/wix-code-user-code-dependencies",
        destPath: ""
      }
    ],
    "blocks._base_domain_": [
      {
        srcPath: "/wix-code-user-code-dependencies",
        destPath: ""
      }
    ],
    "create.editorx": [
      {
        srcPath: "/wix-code-user-code-dependencies",
        destPath: ""
      }
    ],
    "code._base_domain_": [
      {
        srcPath: "/wix-code-user-code-dependencies",
        destPath: ""
      }
    ]
  };
  return resolveUrl(Object.assign(opts, { domainToMappings }));
}
function resolveNpmDependencies(payload) {
  var _a = serializer(_resolveNpmDependenciesRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
  var fromRes = serializer(_resolveNpmDependenciesResponse, {}).fromJSON;
  function __resolveNpmDependencies(_a2) {
    var host = _a2.host;
    var serializedData = toReq(payload);
    var metadata = {
      entityFqdn: "wix.velo.npm.v1.npm_package_info",
      method: "POST",
      methodFqn: "wix.velo.npm.v1.UserCodeNpmPackages.ResolveNpmDependencies",
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixVeloNpmV1UserCodeNpmPackagesUrl({
        protoPath: "/v1/npm/resolve-dependencies",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: fromRes
    };
    return metadata;
  }
  __resolveNpmDependencies.fromReq = fromReq;
  __resolveNpmDependencies.__isAmbassador = true;
  return __resolveNpmDependencies;
}
function getResolveNpmDependenciesResult(payload) {
  var _a = serializer(_getResolveNpmDependenciesResultRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
  var fromRes = serializer(_getResolveNpmDependenciesResultResponse, {}).fromJSON;
  function __getResolveNpmDependenciesResult(_a2) {
    var host = _a2.host;
    var serializedData = toReq(payload);
    var metadata = {
      entityFqdn: "wix.velo.npm.v1.npm_package_info",
      method: "GET",
      methodFqn: "wix.velo.npm.v1.UserCodeNpmPackages.GetResolveNpmDependenciesResult",
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixVeloNpmV1UserCodeNpmPackagesUrl({
        protoPath: "/v1/npm/resolve-dependencies/{jobId}",
        data: serializedData,
        host
      }),
      params: toURLSearchParams(serializedData),
      transformResponse: fromRes
    };
    return metadata;
  }
  __getResolveNpmDependenciesResult.fromReq = fromReq;
  __getResolveNpmDependenciesResult.__isAmbassador = true;
  return __getResolveNpmDependenciesResult;
}

export {
  resolveNpmDependencies,
  getResolveNpmDependenciesResult
};
//# sourceMappingURL=chunk-O6HC4AYN.js.map