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

// ../../node_modules/@wix/ambassador-velo-apps-v1-app/build/es/types.impl.js
init_esm_shims();
var AppType;
(function(AppType2) {
  AppType2["VELO"] = "VELO";
  AppType2["VELO_ISOLATED"] = "VELO_ISOLATED";
})(AppType || (AppType = {}));
var GridAppLayout;
(function(GridAppLayout2) {
  GridAppLayout2["UNKNOWN_GRID_APP_LAYOUT"] = "UNKNOWN_GRID_APP_LAYOUT";
  GridAppLayout2["ONLINE"] = "ONLINE";
  GridAppLayout2["GITHUB"] = "GITHUB";
  GridAppLayout2["GITHUB_BLOCKS"] = "GITHUB_BLOCKS";
  GridAppLayout2["WIX_IDE"] = "WIX_IDE";
})(GridAppLayout || (GridAppLayout = {}));
var DeploymentOperation;
(function(DeploymentOperation2) {
  DeploymentOperation2["UNKNOWN"] = "UNKNOWN";
  DeploymentOperation2["GA"] = "GA";
  DeploymentOperation2["RC"] = "RC";
})(DeploymentOperation || (DeploymentOperation = {}));
var RcLabel;
(function(RcLabel2) {
  RcLabel2["UNKNOWN"] = "UNKNOWN";
  RcLabel2["WIX_CLI"] = "WIX_CLI";
})(RcLabel || (RcLabel = {}));
var WebhookIdentityType;
(function(WebhookIdentityType2) {
  WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
  WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
  WebhookIdentityType2["MEMBER"] = "MEMBER";
  WebhookIdentityType2["WIX_USER"] = "WIX_USER";
  WebhookIdentityType2["APP"] = "APP";
})(WebhookIdentityType || (WebhookIdentityType = {}));

// ../../node_modules/@wix/ambassador-velo-apps-v1-app/build/es/http.impl.js
init_esm_shims();
var _createAppRequest = {};
var _createAppResponse = {};
var _deployAppRequest = {};
var _deployAppResponse = {};
var _pagesDiffRequest = {};
var _pagesDiffResponse = {};
function resolveWixVeloAppsV1LifecycleServiceUrl(opts) {
  var domainToMappings = {
    "code._base_domain_": [
      {
        srcPath: "/_api/wix-code-lifecycle-service",
        destPath: ""
      }
    ],
    "editor._base_domain_": [
      {
        srcPath: "/_api/wix-code-lifecycle-service",
        destPath: ""
      }
    ],
    "blocks._base_domain_": [
      {
        srcPath: "/_api/wix-code-lifecycle-service",
        destPath: ""
      }
    ],
    "create.editorx": [
      {
        srcPath: "/_api/wix-code-lifecycle-service",
        destPath: ""
      }
    ],
    "manage._base_domain_": [
      {
        srcPath: "/_api/wix-code-lifecycle-service",
        destPath: ""
      }
    ]
  };
  return resolveUrl(Object.assign(opts, { domainToMappings }));
}
function pagesDiff(payload) {
  var _a = serializer(_pagesDiffRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
  var fromRes = serializer(_pagesDiffResponse, {}).fromJSON;
  function __pagesDiff(_a2) {
    var host = _a2.host;
    var serializedData = toReq(payload);
    var metadata = {
      entityFqdn: "wix.velo.apps.v1.app",
      method: "POST",
      methodFqn: "wix.velo.apps.v1.LifecycleService.PagesDiff",
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixVeloAppsV1LifecycleServiceUrl({
        protoPath: "/v1/pages-diff",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: fromRes
    };
    return metadata;
  }
  __pagesDiff.fromReq = fromReq;
  __pagesDiff.__isAmbassador = true;
  return __pagesDiff;
}
function createApp(payload) {
  var _a = serializer(_createAppRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
  var fromRes = serializer(_createAppResponse, {}).fromJSON;
  function __createApp(_a2) {
    var host = _a2.host;
    var serializedData = toReq(payload);
    var metadata = {
      entityFqdn: "wix.velo.apps.v1.app",
      method: "POST",
      methodFqn: "wix.velo.apps.v1.LifecycleService.CreateApp",
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixVeloAppsV1LifecycleServiceUrl({
        protoPath: "/v1/apps",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: fromRes
    };
    return metadata;
  }
  __createApp.fromReq = fromReq;
  __createApp.__isAmbassador = true;
  return __createApp;
}
function deployApp(payload) {
  var _a = serializer(_deployAppRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
  var fromRes = serializer(_deployAppResponse, {}).fromJSON;
  function __deployApp(_a2) {
    var host = _a2.host;
    var serializedData = toReq(payload);
    var metadata = {
      entityFqdn: "wix.velo.apps.v1.app",
      method: "POST",
      methodFqn: "wix.velo.apps.v1.LifecycleService.DeployApp",
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixVeloAppsV1LifecycleServiceUrl({
        protoPath: "/v1/apps/deploy",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: fromRes
    };
    return metadata;
  }
  __deployApp.fromReq = fromReq;
  __deployApp.__isAmbassador = true;
  return __deployApp;
}

export {
  AppType,
  GridAppLayout,
  DeploymentOperation,
  RcLabel,
  pagesDiff,
  createApp,
  deployApp
};
//# sourceMappingURL=chunk-C7TVBDR6.js.map