// src/forms-v4-submission-submissions.public.ts
import { renameKeysFromRESTResponseToSDKResponse as renameKeysFromRESTResponseToSDKResponse2 } from "@wix/sdk-runtime/rename-all-nested-keys";
import { transformRESTTimestampToSDKTimestamp as transformRESTTimestampToSDKTimestamp2 } from "@wix/sdk-runtime/transformations/timestamp";
import { transformPaths as transformPaths3 } from "@wix/sdk-runtime/transformations/transform-paths";
import { EventDefinition } from "@wix/sdk-types";

// src/forms-v4-submission-submissions.universal.ts
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
import { queryBuilder } from "@wix/sdk-runtime/query-builder";
import {
  renameKeysFromSDKRequestToRESTRequest,
  renameKeysFromRESTResponseToSDKResponse
} from "@wix/sdk-runtime/rename-all-nested-keys";

// src/forms-v4-submission-submissions.http.ts
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
import { transformRESTBytesToSDKBytes } from "@wix/sdk-runtime/transformations/bytes";
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
function resolveWixFormsV4FormSubmissionServiceUrl(opts) {
  const domainToMappings = {
    "api._api_base_domain_": [
      {
        srcPath: "/form-submission-service",
        destPath: ""
      }
    ],
    _: [
      {
        srcPath: "/_api/form-submission-service",
        destPath: ""
      }
    ],
    "manage._base_domain_": [
      {
        srcPath: "/_api/form-submission-service",
        destPath: ""
      },
      {
        srcPath: "/form-submission-service",
        destPath: ""
      }
    ],
    "www._base_domain_": [
      {
        srcPath: "/_api/form-submission-service",
        destPath: ""
      }
    ],
    "bo._base_domain_": [
      {
        srcPath: "/form-submission-service",
        destPath: ""
      }
    ],
    "wixbo.ai": [
      {
        srcPath: "/form-submission-service",
        destPath: ""
      }
    ],
    "wix-bo.com": [
      {
        srcPath: "/form-submission-service",
        destPath: ""
      }
    ],
    "www.wixapis.com": [
      {
        srcPath: "/form-submission-service",
        destPath: ""
      },
      {
        srcPath: "/_api/form-submission-service",
        destPath: ""
      }
    ],
    "apps._base_domain_": [
      {
        srcPath: "/form-submission-service",
        destPath: ""
      }
    ],
    "editor._base_domain_": [
      {
        srcPath: "/_api/form-submission-service",
        destPath: ""
      }
    ],
    "blocks._base_domain_": [
      {
        srcPath: "/_api/form-submission-service",
        destPath: ""
      }
    ],
    "create.editorx": [
      {
        srcPath: "/_api/form-submission-service",
        destPath: ""
      }
    ],
    "*.dev.wix-code.com": [
      {
        srcPath: "/_api/form-submission-service",
        destPath: ""
      }
    ],
    "*.wixforms.com": [
      {
        srcPath: "/_api/form-submission-service",
        destPath: ""
      }
    ]
  };
  return resolveUrl(Object.assign(opts, { domainToMappings }));
}
function resolveWixFormsV4FormSubmissionContactUpsertServiceUrl(opts) {
  const domainToMappings = {
    "bo._base_domain_": [
      {
        srcPath: "/form-submission-contact-mapping-service",
        destPath: ""
      }
    ],
    "wixbo.ai": [
      {
        srcPath: "/form-submission-contact-mapping-service",
        destPath: ""
      }
    ],
    "wix-bo.com": [
      {
        srcPath: "/form-submission-contact-mapping-service",
        destPath: ""
      }
    ],
    "www.wixapis.com": [
      {
        srcPath: "/form-submission-contact-mapping-service",
        destPath: ""
      },
      {
        srcPath: "/_api/form-submission-contact-mapping-service",
        destPath: ""
      }
    ]
  };
  return resolveUrl(Object.assign(opts, { domainToMappings }));
}
var PACKAGE_NAME = "@wix/auto_sdk_forms_submissions";
function upsertContactFromSubmission(payload) {
  function __upsertContactFromSubmission({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "POST",
      methodFqn: "wix.forms.v4.FormSubmissionContactUpsertService.UpsertContactFromSubmission",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionContactUpsertServiceUrl({
        protoPath: "/v4/submissions-contacts",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __upsertContactFromSubmission;
}
function createSubmission(payload) {
  function __createSubmission({ host }) {
    const serializedData = transformPaths(payload, [
      {
        transformFn: transformSDKTimestampToRESTTimestamp,
        paths: [
          { path: "submission.createdDate" },
          { path: "submission.updatedDate" }
        ]
      }
    ]);
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "POST",
      methodFqn: "wix.forms.v4.FormSubmissionService.CreateSubmission",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "submission.createdDate" },
            { path: "submission.updatedDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __createSubmission;
}
function getSubmission(payload) {
  function __getSubmission({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "GET",
      methodFqn: "wix.forms.v4.FormSubmissionService.GetSubmission",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/{submissionId}",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload),
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "submission.createdDate" },
            { path: "submission.updatedDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __getSubmission;
}
function updateSubmission(payload) {
  function __updateSubmission({ host }) {
    const serializedData = transformPaths(payload, [
      {
        transformFn: transformSDKFieldMaskToRESTFieldMask,
        paths: [{ path: "mask" }]
      },
      {
        transformFn: transformSDKTimestampToRESTTimestamp,
        paths: [
          { path: "submission.createdDate" },
          { path: "submission.updatedDate" }
        ]
      }
    ]);
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "PATCH",
      methodFqn: "wix.forms.v4.FormSubmissionService.UpdateSubmission",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/{submission.id}",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "submission.createdDate" },
            { path: "submission.updatedDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __updateSubmission;
}
function confirmSubmission(payload) {
  function __confirmSubmission({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "POST",
      methodFqn: "wix.forms.v4.FormSubmissionService.ConfirmSubmission",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/{submissionId}/confirm",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "submission.createdDate" },
            { path: "submission.updatedDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __confirmSubmission;
}
function deleteSubmission(payload) {
  function __deleteSubmission({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "DELETE",
      methodFqn: "wix.forms.v4.FormSubmissionService.DeleteSubmission",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/{submissionId}",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload)
    };
    return metadata;
  }
  return __deleteSubmission;
}
function bulkDeleteSubmission(payload) {
  function __bulkDeleteSubmission({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "POST",
      methodFqn: "wix.forms.v4.FormSubmissionService.BulkDeleteSubmission",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/bulk/submissions/delete",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __bulkDeleteSubmission;
}
function restoreSubmissionFromTrashBin(payload) {
  function __restoreSubmissionFromTrashBin({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "POST",
      methodFqn: "wix.forms.v4.FormSubmissionService.RestoreSubmissionFromTrashBin",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/trash-bin/{submissionId}/restore",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "submission.createdDate" },
            { path: "submission.updatedDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __restoreSubmissionFromTrashBin;
}
function removeSubmissionFromTrashBin(payload) {
  function __removeSubmissionFromTrashBin({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "DELETE",
      methodFqn: "wix.forms.v4.FormSubmissionService.RemoveSubmissionFromTrashBin",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/trash-bin/{submissionId}",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload)
    };
    return metadata;
  }
  return __removeSubmissionFromTrashBin;
}
function bulkRemoveSubmissionFromTrashBin(payload) {
  function __bulkRemoveSubmissionFromTrashBin({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "POST",
      methodFqn: "wix.forms.v4.FormSubmissionService.BulkRemoveSubmissionFromTrashBin",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/trash-bin/delete",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __bulkRemoveSubmissionFromTrashBin;
}
function listDeletedSubmissions(payload) {
  function __listDeletedSubmissions({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "GET",
      methodFqn: "wix.forms.v4.FormSubmissionService.ListDeletedSubmissions",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/trash-bin",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload),
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "submissions.createdDate" },
            { path: "submissions.updatedDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __listDeletedSubmissions;
}
function getDeletedSubmission(payload) {
  function __getDeletedSubmission({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "GET",
      methodFqn: "wix.forms.v4.FormSubmissionService.GetDeletedSubmission",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/trash-bin/{submissionId}",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload),
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "submission.createdDate" },
            { path: "submission.updatedDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __getDeletedSubmission;
}
function querySubmission(payload) {
  function __querySubmission({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "POST",
      methodFqn: "wix.forms.v4.FormSubmissionService.QuerySubmission",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/query",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "submissions.createdDate" },
            { path: "submissions.updatedDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __querySubmission;
}
function searchSubmissionsByNamespace(payload) {
  function __searchSubmissionsByNamespace({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "POST",
      methodFqn: "wix.forms.v4.FormSubmissionService.SearchSubmissionsByNamespace",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/namespace/search",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "submissions.createdDate" },
            { path: "submissions.updatedDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __searchSubmissionsByNamespace;
}
function querySubmissionsByNamespace(payload) {
  function __querySubmissionsByNamespace({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "POST",
      methodFqn: "wix.forms.v4.FormSubmissionService.QuerySubmissionsByNamespace",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/namespace/query",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "submissions.createdDate" },
            { path: "submissions.updatedDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __querySubmissionsByNamespace;
}
function countSubmissionsByFilter(payload) {
  function __countSubmissionsByFilter({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "POST",
      methodFqn: "wix.forms.v4.FormSubmissionService.CountSubmissionsByFilter",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/count-by-filter",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __countSubmissionsByFilter;
}
function countSubmissions(payload) {
  function __countSubmissions({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "POST",
      methodFqn: "wix.forms.v4.FormSubmissionService.CountSubmissions",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/count",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __countSubmissions;
}
function countDeletedSubmissions(payload) {
  function __countDeletedSubmissions({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "POST",
      methodFqn: "wix.forms.v4.FormSubmissionService.CountDeletedSubmissions",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/trash-bin/count",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __countDeletedSubmissions;
}
function getMediaUploadUrl(payload) {
  function __getMediaUploadUrl({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "POST",
      methodFqn: "wix.forms.v4.FormSubmissionService.GetMediaUploadURL",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/media-upload-url",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __getMediaUploadUrl;
}
function bulkMarkSubmissionsAsSeen(payload) {
  function __bulkMarkSubmissionsAsSeen({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "POST",
      methodFqn: "wix.forms.v4.FormSubmissionService.BulkMarkSubmissionsAsSeen",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/bulk/submissions/mark-as-seen",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __bulkMarkSubmissionsAsSeen;
}
function getSubmissionDownloadUrl(payload) {
  function __getSubmissionDownloadUrl({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "GET",
      methodFqn: "wix.forms.v4.FormSubmissionService.GetSubmissionDownloadUrl",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/{submissionId}/document",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload)
    };
    return metadata;
  }
  return __getSubmissionDownloadUrl;
}
function downloadSubmission(payload) {
  function __downloadSubmission({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "GET",
      methodFqn: "wix.forms.v4.FormSubmissionService.DownloadSubmission",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/{submissionId}/download",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload),
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTBytesToSDKBytes,
          paths: [{ path: "body" }]
        }
      ])
    };
    return metadata;
  }
  return __downloadSubmission;
}
function getFormattedSubmission(payload) {
  function __getFormattedSubmission({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "GET",
      methodFqn: "wix.forms.v4.FormSubmissionService.GetFormattedSubmission",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/{submissionId}/formatted",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload)
    };
    return metadata;
  }
  return __getFormattedSubmission;
}
function updateExtendedFields(payload) {
  function __updateExtendedFields({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "POST",
      methodFqn: "wix.forms.v4.FormSubmissionService.UpdateExtendedFields",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/{id}/extended-fields",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __updateExtendedFields;
}
function bulkUpdateFormSubmissionTags(payload) {
  function __bulkUpdateFormSubmissionTags({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "POST",
      methodFqn: "wix.forms.v4.FormSubmissionService.BulkUpdateFormSubmissionTags",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/bulk/submissions/update-tags",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __bulkUpdateFormSubmissionTags;
}
function bulkUpdateFormSubmissionTagsByFilter(payload) {
  function __bulkUpdateFormSubmissionTagsByFilter({ host }) {
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "POST",
      methodFqn: "wix.forms.v4.FormSubmissionService.BulkUpdateFormSubmissionTagsByFilter",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/bulk/submissions/update-tags-by-filter",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __bulkUpdateFormSubmissionTagsByFilter;
}
function validateFormSubmission(payload) {
  function __validateFormSubmission({ host }) {
    const serializedData = transformPaths(payload, [
      {
        transformFn: transformSDKTimestampToRESTTimestamp,
        paths: [
          { path: "submission.createdDate" },
          { path: "submission.updatedDate" }
        ]
      }
    ]);
    const metadata = {
      entityFqdn: "wix.forms.v4.submission",
      method: "POST",
      methodFqn: "wix.forms.v4.FormSubmissionService.ValidateFormSubmission",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixFormsV4FormSubmissionServiceUrl({
        protoPath: "/v4/submissions/validate",
        data: serializedData,
        host
      }),
      data: serializedData
    };
    return metadata;
  }
  return __validateFormSubmission;
}

// src/forms-v4-submission-submissions.universal.ts
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
var SubmissionStatus = /* @__PURE__ */ ((SubmissionStatus2) => {
  SubmissionStatus2["UNKNOWN_SUBMISSION_STATUS"] = "UNKNOWN_SUBMISSION_STATUS";
  SubmissionStatus2["PENDING"] = "PENDING";
  SubmissionStatus2["CONFIRMED"] = "CONFIRMED";
  SubmissionStatus2["PAYMENT_WAITING"] = "PAYMENT_WAITING";
  SubmissionStatus2["PAYMENT_CANCELED"] = "PAYMENT_CANCELED";
  return SubmissionStatus2;
})(SubmissionStatus || {});
var OptInLevel = /* @__PURE__ */ ((OptInLevel2) => {
  OptInLevel2["SINGLE_CONFIRMATION"] = "SINGLE_CONFIRMATION";
  OptInLevel2["DOUBLE_CONFIRMATION"] = "DOUBLE_CONFIRMATION";
  return OptInLevel2;
})(OptInLevel || {});
var StringTypeFormatEnumFormat = /* @__PURE__ */ ((StringTypeFormatEnumFormat2) => {
  StringTypeFormatEnumFormat2["UNDEFINED"] = "UNDEFINED";
  StringTypeFormatEnumFormat2["DATE"] = "DATE";
  StringTypeFormatEnumFormat2["TIME"] = "TIME";
  StringTypeFormatEnumFormat2["DATE_TIME"] = "DATE_TIME";
  StringTypeFormatEnumFormat2["EMAIL"] = "EMAIL";
  StringTypeFormatEnumFormat2["URL"] = "URL";
  StringTypeFormatEnumFormat2["UUID"] = "UUID";
  StringTypeFormatEnumFormat2["PHONE"] = "PHONE";
  StringTypeFormatEnumFormat2["URI"] = "URI";
  StringTypeFormatEnumFormat2["HOSTNAME"] = "HOSTNAME";
  StringTypeFormatEnumFormat2["COLOR_HEX"] = "COLOR_HEX";
  StringTypeFormatEnumFormat2["CURRENCY"] = "CURRENCY";
  StringTypeFormatEnumFormat2["LANGUAGE"] = "LANGUAGE";
  StringTypeFormatEnumFormat2["DATE_OPTIONAL_TIME"] = "DATE_OPTIONAL_TIME";
  return StringTypeFormatEnumFormat2;
})(StringTypeFormatEnumFormat || {});
var ValidationFormat = /* @__PURE__ */ ((ValidationFormat2) => {
  ValidationFormat2["UNDEFINED"] = "UNDEFINED";
  ValidationFormat2["WIX_FILE"] = "WIX_FILE";
  ValidationFormat2["PAYMENT"] = "PAYMENT";
  ValidationFormat2["MULTILINE_ADDRESS"] = "MULTILINE_ADDRESS";
  ValidationFormat2["SCHEDULING"] = "SCHEDULING";
  ValidationFormat2["OBJECT_ARRAY"] = "OBJECT_ARRAY";
  return ValidationFormat2;
})(ValidationFormat || {});
var ProductType = /* @__PURE__ */ ((ProductType2) => {
  ProductType2["UNKNOWN_PRODUCT_TYPE"] = "UNKNOWN_PRODUCT_TYPE";
  ProductType2["SHIPPABLE"] = "SHIPPABLE";
  ProductType2["DIGITAL"] = "DIGITAL";
  return ProductType2;
})(ProductType || {});
var PriceType = /* @__PURE__ */ ((PriceType2) => {
  PriceType2["UNKNOWN_PRICE_TYPE"] = "UNKNOWN_PRICE_TYPE";
  PriceType2["FIXED_PRICE"] = "FIXED_PRICE";
  PriceType2["DYNAMIC_PRICE"] = "DYNAMIC_PRICE";
  return PriceType2;
})(PriceType || {});
var FieldType = /* @__PURE__ */ ((FieldType2) => {
  FieldType2["UNKNOWN_FIELD_TYPE"] = "UNKNOWN_FIELD_TYPE";
  FieldType2["INPUT"] = "INPUT";
  FieldType2["DISPLAY"] = "DISPLAY";
  return FieldType2;
})(FieldType || {});
var FormatEnumFormat = /* @__PURE__ */ ((FormatEnumFormat2) => {
  FormatEnumFormat2["UNKNOWN_FORMAT"] = "UNKNOWN_FORMAT";
  FormatEnumFormat2["DATE"] = "DATE";
  FormatEnumFormat2["TIME"] = "TIME";
  FormatEnumFormat2["DATE_TIME"] = "DATE_TIME";
  FormatEnumFormat2["EMAIL"] = "EMAIL";
  FormatEnumFormat2["URL"] = "URL";
  FormatEnumFormat2["UUID"] = "UUID";
  FormatEnumFormat2["PHONE"] = "PHONE";
  FormatEnumFormat2["URI"] = "URI";
  FormatEnumFormat2["HOSTNAME"] = "HOSTNAME";
  FormatEnumFormat2["COLOR_HEX"] = "COLOR_HEX";
  FormatEnumFormat2["CURRENCY"] = "CURRENCY";
  FormatEnumFormat2["LANGUAGE"] = "LANGUAGE";
  FormatEnumFormat2["DATE_OPTIONAL_TIME"] = "DATE_OPTIONAL_TIME";
  return FormatEnumFormat2;
})(FormatEnumFormat || {});
var StringComponentType = /* @__PURE__ */ ((StringComponentType2) => {
  StringComponentType2["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
  StringComponentType2["TEXT_INPUT"] = "TEXT_INPUT";
  StringComponentType2["RADIO_GROUP"] = "RADIO_GROUP";
  StringComponentType2["DROPDOWN"] = "DROPDOWN";
  StringComponentType2["DATE_TIME"] = "DATE_TIME";
  StringComponentType2["PHONE_INPUT"] = "PHONE_INPUT";
  StringComponentType2["DATE_INPUT"] = "DATE_INPUT";
  StringComponentType2["TIME_INPUT"] = "TIME_INPUT";
  StringComponentType2["DATE_PICKER"] = "DATE_PICKER";
  StringComponentType2["SERVICES_DROPDOWN"] = "SERVICES_DROPDOWN";
  StringComponentType2["PASSWORD"] = "PASSWORD";
  return StringComponentType2;
})(StringComponentType || {});
var NodeType = /* @__PURE__ */ ((NodeType2) => {
  NodeType2["PARAGRAPH"] = "PARAGRAPH";
  NodeType2["TEXT"] = "TEXT";
  NodeType2["HEADING"] = "HEADING";
  NodeType2["BULLETED_LIST"] = "BULLETED_LIST";
  NodeType2["ORDERED_LIST"] = "ORDERED_LIST";
  NodeType2["LIST_ITEM"] = "LIST_ITEM";
  NodeType2["BLOCKQUOTE"] = "BLOCKQUOTE";
  NodeType2["CODE_BLOCK"] = "CODE_BLOCK";
  NodeType2["VIDEO"] = "VIDEO";
  NodeType2["DIVIDER"] = "DIVIDER";
  NodeType2["FILE"] = "FILE";
  NodeType2["GALLERY"] = "GALLERY";
  NodeType2["GIF"] = "GIF";
  NodeType2["HTML"] = "HTML";
  NodeType2["IMAGE"] = "IMAGE";
  NodeType2["LINK_PREVIEW"] = "LINK_PREVIEW";
  NodeType2["MAP"] = "MAP";
  NodeType2["POLL"] = "POLL";
  NodeType2["APP_EMBED"] = "APP_EMBED";
  NodeType2["BUTTON"] = "BUTTON";
  NodeType2["COLLAPSIBLE_LIST"] = "COLLAPSIBLE_LIST";
  NodeType2["TABLE"] = "TABLE";
  NodeType2["EMBED"] = "EMBED";
  NodeType2["COLLAPSIBLE_ITEM"] = "COLLAPSIBLE_ITEM";
  NodeType2["COLLAPSIBLE_ITEM_TITLE"] = "COLLAPSIBLE_ITEM_TITLE";
  NodeType2["COLLAPSIBLE_ITEM_BODY"] = "COLLAPSIBLE_ITEM_BODY";
  NodeType2["TABLE_CELL"] = "TABLE_CELL";
  NodeType2["TABLE_ROW"] = "TABLE_ROW";
  NodeType2["EXTERNAL"] = "EXTERNAL";
  NodeType2["AUDIO"] = "AUDIO";
  NodeType2["CAPTION"] = "CAPTION";
  NodeType2["LAYOUT"] = "LAYOUT";
  NodeType2["LAYOUT_CELL"] = "LAYOUT_CELL";
  return NodeType2;
})(NodeType || {});
var WidthType = /* @__PURE__ */ ((WidthType2) => {
  WidthType2["CONTENT"] = "CONTENT";
  WidthType2["SMALL"] = "SMALL";
  WidthType2["ORIGINAL"] = "ORIGINAL";
  WidthType2["FULL_WIDTH"] = "FULL_WIDTH";
  return WidthType2;
})(WidthType || {});
var PluginContainerDataAlignment = /* @__PURE__ */ ((PluginContainerDataAlignment2) => {
  PluginContainerDataAlignment2["CENTER"] = "CENTER";
  PluginContainerDataAlignment2["LEFT"] = "LEFT";
  PluginContainerDataAlignment2["RIGHT"] = "RIGHT";
  return PluginContainerDataAlignment2;
})(PluginContainerDataAlignment || {});
var ButtonDataType = /* @__PURE__ */ ((ButtonDataType2) => {
  ButtonDataType2["LINK"] = "LINK";
  ButtonDataType2["ACTION"] = "ACTION";
  return ButtonDataType2;
})(ButtonDataType || {});
var LinkTarget = /* @__PURE__ */ ((LinkTarget2) => {
  LinkTarget2["SELF"] = "SELF";
  LinkTarget2["BLANK"] = "BLANK";
  LinkTarget2["PARENT"] = "PARENT";
  LinkTarget2["TOP"] = "TOP";
  return LinkTarget2;
})(LinkTarget || {});
var TextAlignment = /* @__PURE__ */ ((TextAlignment2) => {
  TextAlignment2["AUTO"] = "AUTO";
  TextAlignment2["LEFT"] = "LEFT";
  TextAlignment2["RIGHT"] = "RIGHT";
  TextAlignment2["CENTER"] = "CENTER";
  TextAlignment2["JUSTIFY"] = "JUSTIFY";
  return TextAlignment2;
})(TextAlignment || {});
var LineStyle = /* @__PURE__ */ ((LineStyle2) => {
  LineStyle2["SINGLE"] = "SINGLE";
  LineStyle2["DOUBLE"] = "DOUBLE";
  LineStyle2["DASHED"] = "DASHED";
  LineStyle2["DOTTED"] = "DOTTED";
  return LineStyle2;
})(LineStyle || {});
var Width = /* @__PURE__ */ ((Width2) => {
  Width2["LARGE"] = "LARGE";
  Width2["MEDIUM"] = "MEDIUM";
  Width2["SMALL"] = "SMALL";
  return Width2;
})(Width || {});
var DividerDataAlignment = /* @__PURE__ */ ((DividerDataAlignment2) => {
  DividerDataAlignment2["CENTER"] = "CENTER";
  DividerDataAlignment2["LEFT"] = "LEFT";
  DividerDataAlignment2["RIGHT"] = "RIGHT";
  return DividerDataAlignment2;
})(DividerDataAlignment || {});
var ViewMode = /* @__PURE__ */ ((ViewMode2) => {
  ViewMode2["NONE"] = "NONE";
  ViewMode2["FULL"] = "FULL";
  ViewMode2["MINI"] = "MINI";
  return ViewMode2;
})(ViewMode || {});
var LayoutType = /* @__PURE__ */ ((LayoutType2) => {
  LayoutType2["COLLAGE"] = "COLLAGE";
  LayoutType2["MASONRY"] = "MASONRY";
  LayoutType2["GRID"] = "GRID";
  LayoutType2["THUMBNAIL"] = "THUMBNAIL";
  LayoutType2["SLIDER"] = "SLIDER";
  LayoutType2["SLIDESHOW"] = "SLIDESHOW";
  LayoutType2["PANORAMA"] = "PANORAMA";
  LayoutType2["COLUMN"] = "COLUMN";
  LayoutType2["MAGIC"] = "MAGIC";
  LayoutType2["FULLSIZE"] = "FULLSIZE";
  return LayoutType2;
})(LayoutType || {});
var Orientation = /* @__PURE__ */ ((Orientation2) => {
  Orientation2["ROWS"] = "ROWS";
  Orientation2["COLUMNS"] = "COLUMNS";
  return Orientation2;
})(Orientation || {});
var Crop = /* @__PURE__ */ ((Crop2) => {
  Crop2["FILL"] = "FILL";
  Crop2["FIT"] = "FIT";
  return Crop2;
})(Crop || {});
var ThumbnailsAlignment = /* @__PURE__ */ ((ThumbnailsAlignment2) => {
  ThumbnailsAlignment2["TOP"] = "TOP";
  ThumbnailsAlignment2["RIGHT"] = "RIGHT";
  ThumbnailsAlignment2["BOTTOM"] = "BOTTOM";
  ThumbnailsAlignment2["LEFT"] = "LEFT";
  ThumbnailsAlignment2["NONE"] = "NONE";
  return ThumbnailsAlignment2;
})(ThumbnailsAlignment || {});
var GIFType = /* @__PURE__ */ ((GIFType2) => {
  GIFType2["NORMAL"] = "NORMAL";
  GIFType2["STICKER"] = "STICKER";
  return GIFType2;
})(GIFType || {});
var Source = /* @__PURE__ */ ((Source2) => {
  Source2["HTML"] = "HTML";
  Source2["ADSENSE"] = "ADSENSE";
  Source2["AI"] = "AI";
  return Source2;
})(Source || {});
var StylesPosition = /* @__PURE__ */ ((StylesPosition2) => {
  StylesPosition2["START"] = "START";
  StylesPosition2["END"] = "END";
  StylesPosition2["TOP"] = "TOP";
  StylesPosition2["HIDDEN"] = "HIDDEN";
  return StylesPosition2;
})(StylesPosition || {});
var MapType = /* @__PURE__ */ ((MapType2) => {
  MapType2["ROADMAP"] = "ROADMAP";
  MapType2["SATELITE"] = "SATELITE";
  MapType2["HYBRID"] = "HYBRID";
  MapType2["TERRAIN"] = "TERRAIN";
  return MapType2;
})(MapType || {});
var ViewRole = /* @__PURE__ */ ((ViewRole2) => {
  ViewRole2["CREATOR"] = "CREATOR";
  ViewRole2["VOTERS"] = "VOTERS";
  ViewRole2["EVERYONE"] = "EVERYONE";
  return ViewRole2;
})(ViewRole || {});
var VoteRole = /* @__PURE__ */ ((VoteRole2) => {
  VoteRole2["SITE_MEMBERS"] = "SITE_MEMBERS";
  VoteRole2["ALL"] = "ALL";
  return VoteRole2;
})(VoteRole || {});
var PollLayoutType = /* @__PURE__ */ ((PollLayoutType2) => {
  PollLayoutType2["LIST"] = "LIST";
  PollLayoutType2["GRID"] = "GRID";
  return PollLayoutType2;
})(PollLayoutType || {});
var PollLayoutDirection = /* @__PURE__ */ ((PollLayoutDirection2) => {
  PollLayoutDirection2["LTR"] = "LTR";
  PollLayoutDirection2["RTL"] = "RTL";
  return PollLayoutDirection2;
})(PollLayoutDirection || {});
var BackgroundType = /* @__PURE__ */ ((BackgroundType2) => {
  BackgroundType2["COLOR"] = "COLOR";
  BackgroundType2["IMAGE"] = "IMAGE";
  BackgroundType2["GRADIENT"] = "GRADIENT";
  return BackgroundType2;
})(BackgroundType || {});
var DecorationType = /* @__PURE__ */ ((DecorationType2) => {
  DecorationType2["BOLD"] = "BOLD";
  DecorationType2["ITALIC"] = "ITALIC";
  DecorationType2["UNDERLINE"] = "UNDERLINE";
  DecorationType2["SPOILER"] = "SPOILER";
  DecorationType2["ANCHOR"] = "ANCHOR";
  DecorationType2["MENTION"] = "MENTION";
  DecorationType2["LINK"] = "LINK";
  DecorationType2["COLOR"] = "COLOR";
  DecorationType2["FONT_SIZE"] = "FONT_SIZE";
  DecorationType2["EXTERNAL"] = "EXTERNAL";
  DecorationType2["STRIKETHROUGH"] = "STRIKETHROUGH";
  DecorationType2["SUPERSCRIPT"] = "SUPERSCRIPT";
  DecorationType2["SUBSCRIPT"] = "SUBSCRIPT";
  DecorationType2["FONT_FAMILY"] = "FONT_FAMILY";
  return DecorationType2;
})(DecorationType || {});
var FontType = /* @__PURE__ */ ((FontType2) => {
  FontType2["PX"] = "PX";
  FontType2["EM"] = "EM";
  return FontType2;
})(FontType || {});
var Position = /* @__PURE__ */ ((Position2) => {
  Position2["START"] = "START";
  Position2["END"] = "END";
  Position2["TOP"] = "TOP";
  return Position2;
})(Position || {});
var AspectRatio = /* @__PURE__ */ ((AspectRatio2) => {
  AspectRatio2["SQUARE"] = "SQUARE";
  AspectRatio2["RECTANGLE"] = "RECTANGLE";
  return AspectRatio2;
})(AspectRatio || {});
var Resizing = /* @__PURE__ */ ((Resizing2) => {
  Resizing2["FILL"] = "FILL";
  Resizing2["FIT"] = "FIT";
  return Resizing2;
})(Resizing || {});
var Placement = /* @__PURE__ */ ((Placement2) => {
  Placement2["IMAGE"] = "IMAGE";
  Placement2["PRODUCT_INFO"] = "PRODUCT_INFO";
  return Placement2;
})(Placement || {});
var CardStylesType = /* @__PURE__ */ ((CardStylesType2) => {
  CardStylesType2["CONTAINED"] = "CONTAINED";
  CardStylesType2["FRAMELESS"] = "FRAMELESS";
  return CardStylesType2;
})(CardStylesType || {});
var CardStylesAlignment = /* @__PURE__ */ ((CardStylesAlignment2) => {
  CardStylesAlignment2["START"] = "START";
  CardStylesAlignment2["CENTER"] = "CENTER";
  CardStylesAlignment2["END"] = "END";
  return CardStylesAlignment2;
})(CardStylesAlignment || {});
var Layout = /* @__PURE__ */ ((Layout2) => {
  Layout2["STACKED"] = "STACKED";
  Layout2["SIDE_BY_SIDE"] = "SIDE_BY_SIDE";
  return Layout2;
})(Layout || {});
var AppType = /* @__PURE__ */ ((AppType2) => {
  AppType2["PRODUCT"] = "PRODUCT";
  AppType2["EVENT"] = "EVENT";
  AppType2["BOOKING"] = "BOOKING";
  return AppType2;
})(AppType || {});
var InitialExpandedItems = /* @__PURE__ */ ((InitialExpandedItems2) => {
  InitialExpandedItems2["FIRST"] = "FIRST";
  InitialExpandedItems2["ALL"] = "ALL";
  InitialExpandedItems2["NONE"] = "NONE";
  return InitialExpandedItems2;
})(InitialExpandedItems || {});
var Direction = /* @__PURE__ */ ((Direction2) => {
  Direction2["LTR"] = "LTR";
  Direction2["RTL"] = "RTL";
  return Direction2;
})(Direction || {});
var VerticalAlignment = /* @__PURE__ */ ((VerticalAlignment2) => {
  VerticalAlignment2["TOP"] = "TOP";
  VerticalAlignment2["MIDDLE"] = "MIDDLE";
  VerticalAlignment2["BOTTOM"] = "BOTTOM";
  return VerticalAlignment2;
})(VerticalAlignment || {});
var NullValue = /* @__PURE__ */ ((NullValue2) => {
  NullValue2["NULL_VALUE"] = "NULL_VALUE";
  return NullValue2;
})(NullValue || {});
var Scaling = /* @__PURE__ */ ((Scaling2) => {
  Scaling2["AUTO"] = "AUTO";
  Scaling2["CONTAIN"] = "CONTAIN";
  Scaling2["COVER"] = "COVER";
  return Scaling2;
})(Scaling || {});
var LayoutDataImagePosition = /* @__PURE__ */ ((LayoutDataImagePosition2) => {
  LayoutDataImagePosition2["CENTER"] = "CENTER";
  LayoutDataImagePosition2["CENTER_LEFT"] = "CENTER_LEFT";
  LayoutDataImagePosition2["CENTER_RIGHT"] = "CENTER_RIGHT";
  LayoutDataImagePosition2["TOP"] = "TOP";
  LayoutDataImagePosition2["TOP_LEFT"] = "TOP_LEFT";
  LayoutDataImagePosition2["TOP_RIGHT"] = "TOP_RIGHT";
  LayoutDataImagePosition2["BOTTOM"] = "BOTTOM";
  LayoutDataImagePosition2["BOTTOM_LEFT"] = "BOTTOM_LEFT";
  LayoutDataImagePosition2["BOTTOM_RIGHT"] = "BOTTOM_RIGHT";
  return LayoutDataImagePosition2;
})(LayoutDataImagePosition || {});
var VerticalAlignmentAlignment = /* @__PURE__ */ ((VerticalAlignmentAlignment2) => {
  VerticalAlignmentAlignment2["TOP"] = "TOP";
  VerticalAlignmentAlignment2["MIDDLE"] = "MIDDLE";
  VerticalAlignmentAlignment2["BOTTOM"] = "BOTTOM";
  return VerticalAlignmentAlignment2;
})(VerticalAlignmentAlignment || {});
var ResponsivenessBehaviour = /* @__PURE__ */ ((ResponsivenessBehaviour2) => {
  ResponsivenessBehaviour2["STACK"] = "STACK";
  ResponsivenessBehaviour2["WRAP"] = "WRAP";
  return ResponsivenessBehaviour2;
})(ResponsivenessBehaviour || {});
var DesignTarget = /* @__PURE__ */ ((DesignTarget2) => {
  DesignTarget2["LAYOUT"] = "LAYOUT";
  DesignTarget2["CELL"] = "CELL";
  return DesignTarget2;
})(DesignTarget || {});
var ImagePosition = /* @__PURE__ */ ((ImagePosition2) => {
  ImagePosition2["UNKNOWN_IMAGE_POSITION"] = "UNKNOWN_IMAGE_POSITION";
  ImagePosition2["ABOVE"] = "ABOVE";
  ImagePosition2["BELOW"] = "BELOW";
  return ImagePosition2;
})(ImagePosition || {});
var Alignment = /* @__PURE__ */ ((Alignment2) => {
  Alignment2["UNKNOWN_ALIGNMENT"] = "UNKNOWN_ALIGNMENT";
  Alignment2["LEFT"] = "LEFT";
  Alignment2["CENTER"] = "CENTER";
  Alignment2["RIGHT"] = "RIGHT";
  return Alignment2;
})(Alignment || {});
var ImageFit = /* @__PURE__ */ ((ImageFit2) => {
  ImageFit2["UNKNOWN_IMAGE_FIT"] = "UNKNOWN_IMAGE_FIT";
  ImageFit2["COVER"] = "COVER";
  ImageFit2["CONTAIN"] = "CONTAIN";
  return ImageFit2;
})(ImageFit || {});
var NumberOfColumns = /* @__PURE__ */ ((NumberOfColumns2) => {
  NumberOfColumns2["UNKNOWN_NUMBER_OF_COLUMNS"] = "UNKNOWN_NUMBER_OF_COLUMNS";
  NumberOfColumns2["ZERO"] = "ZERO";
  NumberOfColumns2["ONE"] = "ONE";
  NumberOfColumns2["TWO"] = "TWO";
  NumberOfColumns2["THREE"] = "THREE";
  return NumberOfColumns2;
})(NumberOfColumns || {});
var FirstDayOfWeek = /* @__PURE__ */ ((FirstDayOfWeek2) => {
  FirstDayOfWeek2["MONDAY"] = "MONDAY";
  FirstDayOfWeek2["SUNDAY"] = "SUNDAY";
  return FirstDayOfWeek2;
})(FirstDayOfWeek || {});
var NumberComponentType = /* @__PURE__ */ ((NumberComponentType2) => {
  NumberComponentType2["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
  NumberComponentType2["NUMBER_INPUT"] = "NUMBER_INPUT";
  NumberComponentType2["RATING_INPUT"] = "RATING_INPUT";
  return NumberComponentType2;
})(NumberComponentType || {});
var BooleanComponentType = /* @__PURE__ */ ((BooleanComponentType2) => {
  BooleanComponentType2["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
  BooleanComponentType2["CHECKBOX"] = "CHECKBOX";
  return BooleanComponentType2;
})(BooleanComponentType || {});
var ItemType = /* @__PURE__ */ ((ItemType2) => {
  ItemType2["UNKNOWN_ITEM_TYPE"] = "UNKNOWN_ITEM_TYPE";
  ItemType2["STRING"] = "STRING";
  ItemType2["NUMBER"] = "NUMBER";
  ItemType2["BOOLEAN"] = "BOOLEAN";
  return ItemType2;
})(ItemType || {});
var PropertiesTypeEnum = /* @__PURE__ */ ((PropertiesTypeEnum2) => {
  PropertiesTypeEnum2["UNKNOWN_PROPERTY_TYPE"] = "UNKNOWN_PROPERTY_TYPE";
  PropertiesTypeEnum2["STRING"] = "STRING";
  PropertiesTypeEnum2["NUMBER"] = "NUMBER";
  PropertiesTypeEnum2["BOOLEAN"] = "BOOLEAN";
  PropertiesTypeEnum2["ARRAY"] = "ARRAY";
  return PropertiesTypeEnum2;
})(PropertiesTypeEnum || {});
var ArrayComponentType = /* @__PURE__ */ ((ArrayComponentType2) => {
  ArrayComponentType2["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
  ArrayComponentType2["CHECKBOX_GROUP"] = "CHECKBOX_GROUP";
  ArrayComponentType2["TAGS"] = "TAGS";
  ArrayComponentType2["SERVICES_CHECKBOX_GROUP"] = "SERVICES_CHECKBOX_GROUP";
  return ArrayComponentType2;
})(ArrayComponentType || {});
var WixFileComponentType = /* @__PURE__ */ ((WixFileComponentType2) => {
  WixFileComponentType2["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
  WixFileComponentType2["FILE_UPLOAD"] = "FILE_UPLOAD";
  WixFileComponentType2["SIGNATURE"] = "SIGNATURE";
  return WixFileComponentType2;
})(WixFileComponentType || {});
var UploadFileFormat = /* @__PURE__ */ ((UploadFileFormat2) => {
  UploadFileFormat2["UNKNOWN_UPLOAD_FILE_FORMAT"] = "UNKNOWN_UPLOAD_FILE_FORMAT";
  UploadFileFormat2["VIDEO"] = "VIDEO";
  UploadFileFormat2["IMAGE"] = "IMAGE";
  UploadFileFormat2["AUDIO"] = "AUDIO";
  UploadFileFormat2["DOCUMENT"] = "DOCUMENT";
  UploadFileFormat2["ARCHIVE"] = "ARCHIVE";
  return UploadFileFormat2;
})(UploadFileFormat || {});
var PaymentComponentType = /* @__PURE__ */ ((PaymentComponentType2) => {
  PaymentComponentType2["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
  PaymentComponentType2["CHECKBOX_GROUP"] = "CHECKBOX_GROUP";
  PaymentComponentType2["DONATION_INPUT"] = "DONATION_INPUT";
  PaymentComponentType2["PAYMENT_INPUT"] = "PAYMENT_INPUT";
  PaymentComponentType2["FIXED_PAYMENT"] = "FIXED_PAYMENT";
  return PaymentComponentType2;
})(PaymentComponentType || {});
var ComponentType = /* @__PURE__ */ ((ComponentType2) => {
  ComponentType2["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
  ComponentType2["MULTILINE_ADDRESS"] = "MULTILINE_ADDRESS";
  return ComponentType2;
})(ComponentType || {});
var Type = /* @__PURE__ */ ((Type2) => {
  Type2["UNKNOWN_DEFAULT_COUNTRY"] = "UNKNOWN_DEFAULT_COUNTRY";
  Type2["BY_IP"] = "BY_IP";
  Type2["COUNTRY"] = "COUNTRY";
  return Type2;
})(Type || {});
var ObjectArrayComponentType = /* @__PURE__ */ ((ObjectArrayComponentType2) => {
  ObjectArrayComponentType2["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
  ObjectArrayComponentType2["REPEATER"] = "REPEATER";
  return ObjectArrayComponentType2;
})(ObjectArrayComponentType || {});
var SchedulingComponentType = /* @__PURE__ */ ((SchedulingComponentType2) => {
  SchedulingComponentType2["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
  SchedulingComponentType2["APPOINTMENT"] = "APPOINTMENT";
  return SchedulingComponentType2;
})(SchedulingComponentType || {});
var Format = /* @__PURE__ */ ((Format2) => {
  Format2["UNKNOWN_FORMAT_TYPE"] = "UNKNOWN_FORMAT_TYPE";
  Format2["IN_PERSON"] = "IN_PERSON";
  Format2["VIDEO_CONFERENCE"] = "VIDEO_CONFERENCE";
  Format2["PHONE"] = "PHONE";
  return Format2;
})(Format || {});
var InputType = /* @__PURE__ */ ((InputType2) => {
  InputType2["UNKNOWN_INPUT_TYPE"] = "UNKNOWN_INPUT_TYPE";
  InputType2["STRING"] = "STRING";
  InputType2["NUMBER"] = "NUMBER";
  InputType2["BOOLEAN"] = "BOOLEAN";
  InputType2["ARRAY"] = "ARRAY";
  InputType2["OBJECT"] = "OBJECT";
  InputType2["WIX_FILE"] = "WIX_FILE";
  InputType2["PAYMENT"] = "PAYMENT";
  InputType2["SCHEDULING"] = "SCHEDULING";
  InputType2["ADDRESS"] = "ADDRESS";
  return InputType2;
})(InputType || {});
var EmailInfoTag = /* @__PURE__ */ ((EmailInfoTag2) => {
  EmailInfoTag2["UNTAGGED"] = "UNTAGGED";
  EmailInfoTag2["MAIN"] = "MAIN";
  return EmailInfoTag2;
})(EmailInfoTag || {});
var PhoneInfoTag = /* @__PURE__ */ ((PhoneInfoTag2) => {
  PhoneInfoTag2["UNTAGGED"] = "UNTAGGED";
  PhoneInfoTag2["MAIN"] = "MAIN";
  return PhoneInfoTag2;
})(PhoneInfoTag || {});
var Tag = /* @__PURE__ */ ((Tag2) => {
  Tag2["UNTAGGED"] = "UNTAGGED";
  Tag2["HOME"] = "HOME";
  return Tag2;
})(Tag || {});
var ConfirmationLevel = /* @__PURE__ */ ((ConfirmationLevel2) => {
  ConfirmationLevel2["UNKNOWN_CONFIRMATION_LEVEL"] = "UNKNOWN_CONFIRMATION_LEVEL";
  ConfirmationLevel2["SINGLE_CONFIRMATION"] = "SINGLE_CONFIRMATION";
  ConfirmationLevel2["DOUBLE_CONFIRMATION"] = "DOUBLE_CONFIRMATION";
  return ConfirmationLevel2;
})(ConfirmationLevel || {});
var ContactField = /* @__PURE__ */ ((ContactField2) => {
  ContactField2["UNKNOWN_CONTACT_FIELD"] = "UNKNOWN_CONTACT_FIELD";
  ContactField2["FIRST_NAME"] = "FIRST_NAME";
  ContactField2["LAST_NAME"] = "LAST_NAME";
  ContactField2["COMPANY"] = "COMPANY";
  ContactField2["POSITION"] = "POSITION";
  ContactField2["EMAIL"] = "EMAIL";
  ContactField2["PHONE"] = "PHONE";
  ContactField2["ADDRESS"] = "ADDRESS";
  ContactField2["BIRTHDATE"] = "BIRTHDATE";
  ContactField2["CUSTOM_FIELD"] = "CUSTOM_FIELD";
  ContactField2["SUBSCRIPTION"] = "SUBSCRIPTION";
  ContactField2["VAT_ID"] = "VAT_ID";
  return ContactField2;
})(ContactField || {});
var DisplayFieldType = /* @__PURE__ */ ((DisplayFieldType2) => {
  DisplayFieldType2["UNKNOWN_FIELD_TYPE"] = "UNKNOWN_FIELD_TYPE";
  DisplayFieldType2["RICH_CONTENT"] = "RICH_CONTENT";
  DisplayFieldType2["PAGE_NAVIGATION"] = "PAGE_NAVIGATION";
  DisplayFieldType2["LOGIN_BAR"] = "LOGIN_BAR";
  return DisplayFieldType2;
})(DisplayFieldType || {});
var OverrideEntityType = /* @__PURE__ */ ((OverrideEntityType2) => {
  OverrideEntityType2["UNKNOWN"] = "UNKNOWN";
  OverrideEntityType2["FIELD"] = "FIELD";
  return OverrideEntityType2;
})(OverrideEntityType || {});
var Kind = /* @__PURE__ */ ((Kind2) => {
  Kind2["REGULAR"] = "REGULAR";
  Kind2["EXTENSION"] = "EXTENSION";
  return Kind2;
})(Kind || {});
var FormFieldContactInfoEmailInfoTag = /* @__PURE__ */ ((FormFieldContactInfoEmailInfoTag2) => {
  FormFieldContactInfoEmailInfoTag2["UNTAGGED"] = "UNTAGGED";
  FormFieldContactInfoEmailInfoTag2["MAIN"] = "MAIN";
  return FormFieldContactInfoEmailInfoTag2;
})(FormFieldContactInfoEmailInfoTag || {});
var FormFieldContactInfoPhoneInfoTag = /* @__PURE__ */ ((FormFieldContactInfoPhoneInfoTag2) => {
  FormFieldContactInfoPhoneInfoTag2["UNTAGGED"] = "UNTAGGED";
  FormFieldContactInfoPhoneInfoTag2["MAIN"] = "MAIN";
  return FormFieldContactInfoPhoneInfoTag2;
})(FormFieldContactInfoPhoneInfoTag || {});
var AddressInfoTag = /* @__PURE__ */ ((AddressInfoTag2) => {
  AddressInfoTag2["UNTAGGED"] = "UNTAGGED";
  AddressInfoTag2["HOME"] = "HOME";
  return AddressInfoTag2;
})(AddressInfoTag || {});
var SubscriptionInfoOptInLevel = /* @__PURE__ */ ((SubscriptionInfoOptInLevel2) => {
  SubscriptionInfoOptInLevel2["UNKNOWN"] = "UNKNOWN";
  SubscriptionInfoOptInLevel2["SINGLE_CONFIRMATION"] = "SINGLE_CONFIRMATION";
  SubscriptionInfoOptInLevel2["DOUBLE_CONFIRMATION"] = "DOUBLE_CONFIRMATION";
  return SubscriptionInfoOptInLevel2;
})(SubscriptionInfoOptInLevel || {});
var FormFieldContactInfoContactField = /* @__PURE__ */ ((FormFieldContactInfoContactField2) => {
  FormFieldContactInfoContactField2["UNDEFINED"] = "UNDEFINED";
  FormFieldContactInfoContactField2["FIRST_NAME"] = "FIRST_NAME";
  FormFieldContactInfoContactField2["LAST_NAME"] = "LAST_NAME";
  FormFieldContactInfoContactField2["COMPANY"] = "COMPANY";
  FormFieldContactInfoContactField2["POSITION"] = "POSITION";
  FormFieldContactInfoContactField2["EMAIL"] = "EMAIL";
  FormFieldContactInfoContactField2["PHONE"] = "PHONE";
  FormFieldContactInfoContactField2["ADDRESS"] = "ADDRESS";
  FormFieldContactInfoContactField2["BIRTHDATE"] = "BIRTHDATE";
  FormFieldContactInfoContactField2["CUSTOM_FIELD"] = "CUSTOM_FIELD";
  FormFieldContactInfoContactField2["SUBSCRIPTION"] = "SUBSCRIPTION";
  FormFieldContactInfoContactField2["VAT_ID"] = "VAT_ID";
  return FormFieldContactInfoContactField2;
})(FormFieldContactInfoContactField || {});
var SpamFilterProtectionLevel = /* @__PURE__ */ ((SpamFilterProtectionLevel2) => {
  SpamFilterProtectionLevel2["UNKNOWN"] = "UNKNOWN";
  SpamFilterProtectionLevel2["NONE"] = "NONE";
  SpamFilterProtectionLevel2["BASIC"] = "BASIC";
  SpamFilterProtectionLevel2["ADVANCED"] = "ADVANCED";
  return SpamFilterProtectionLevel2;
})(SpamFilterProtectionLevel || {});
var RequiredIndicator = /* @__PURE__ */ ((RequiredIndicator2) => {
  RequiredIndicator2["UNKNOWN_INDICATOR"] = "UNKNOWN_INDICATOR";
  RequiredIndicator2["ASTERISK"] = "ASTERISK";
  RequiredIndicator2["TEXT"] = "TEXT";
  RequiredIndicator2["NONE"] = "NONE";
  return RequiredIndicator2;
})(RequiredIndicator || {});
var RequiredIndicatorPlacement = /* @__PURE__ */ ((RequiredIndicatorPlacement2) => {
  RequiredIndicatorPlacement2["UNKNOWN_PLACEMENT"] = "UNKNOWN_PLACEMENT";
  RequiredIndicatorPlacement2["AFTER_FIELD_TITLE"] = "AFTER_FIELD_TITLE";
  RequiredIndicatorPlacement2["BEFORE_FIELD_TITLE"] = "BEFORE_FIELD_TITLE";
  return RequiredIndicatorPlacement2;
})(RequiredIndicatorPlacement || {});
var Target = /* @__PURE__ */ ((Target2) => {
  Target2["UNKNOWN_TARGET"] = "UNKNOWN_TARGET";
  Target2["SELF"] = "SELF";
  Target2["BLANK"] = "BLANK";
  return Target2;
})(Target || {});
var SubmitSuccessAction = /* @__PURE__ */ ((SubmitSuccessAction2) => {
  SubmitSuccessAction2["UNKNOWN_SUBMIT_SUCCESS_ACTION"] = "UNKNOWN_SUBMIT_SUCCESS_ACTION";
  SubmitSuccessAction2["NO_ACTION"] = "NO_ACTION";
  SubmitSuccessAction2["THANK_YOU_MESSAGE"] = "THANK_YOU_MESSAGE";
  SubmitSuccessAction2["REDIRECT"] = "REDIRECT";
  return SubmitSuccessAction2;
})(SubmitSuccessAction || {});
var ChangeableProperty = /* @__PURE__ */ ((ChangeableProperty2) => {
  ChangeableProperty2["UNKNOWN_CHANGEABLE_PROPERTY"] = "UNKNOWN_CHANGEABLE_PROPERTY";
  ChangeableProperty2["REQUIRED"] = "REQUIRED";
  ChangeableProperty2["HIDDEN"] = "HIDDEN";
  ChangeableProperty2["ALLOWED_VALUES"] = "ALLOWED_VALUES";
  return ChangeableProperty2;
})(ChangeableProperty || {});
var OverrideEntityTypeEnumOverrideEntityType = /* @__PURE__ */ ((OverrideEntityTypeEnumOverrideEntityType2) => {
  OverrideEntityTypeEnumOverrideEntityType2["UNKNOWN_OVERRIDE_ENTITY_TYPE"] = "UNKNOWN_OVERRIDE_ENTITY_TYPE";
  OverrideEntityTypeEnumOverrideEntityType2["FIELD"] = "FIELD";
  return OverrideEntityTypeEnumOverrideEntityType2;
})(OverrideEntityTypeEnumOverrideEntityType || {});
var Operator = /* @__PURE__ */ ((Operator2) => {
  Operator2["UNKNOWN_OPERATOR"] = "UNKNOWN_OPERATOR";
  Operator2["EQUAL"] = "EQUAL";
  Operator2["NOT_EQUAL"] = "NOT_EQUAL";
  Operator2["EMPTY"] = "EMPTY";
  Operator2["NOT_EMPTY"] = "NOT_EMPTY";
  Operator2["CONTAINS"] = "CONTAINS";
  Operator2["NOT_CONTAINS"] = "NOT_CONTAINS";
  Operator2["LESS_THAN"] = "LESS_THAN";
  Operator2["LESS_THAN_OR_EQUALS"] = "LESS_THAN_OR_EQUALS";
  Operator2["GREATER_THAN"] = "GREATER_THAN";
  Operator2["GREATER_THAN_OR_EQUALS"] = "GREATER_THAN_OR_EQUALS";
  Operator2["BEFORE"] = "BEFORE";
  Operator2["BEFORE_OR_EQUAL"] = "BEFORE_OR_EQUAL";
  Operator2["AFTER"] = "AFTER";
  Operator2["AFTER_OR_EQUAL"] = "AFTER_OR_EQUAL";
  Operator2["BETWEEN"] = "BETWEEN";
  Operator2["ANY"] = "ANY";
  Operator2["ARRAY_EQUAL"] = "ARRAY_EQUAL";
  Operator2["ARRAY_NOT_EQUAL"] = "ARRAY_NOT_EQUAL";
  Operator2["CHECKED"] = "CHECKED";
  Operator2["NOT_CHECKED"] = "NOT_CHECKED";
  Operator2["IN"] = "IN";
  Operator2["NOT_IN"] = "NOT_IN";
  Operator2["IS_DATE_OLDER_THAN"] = "IS_DATE_OLDER_THAN";
  Operator2["IS_DATE_OLDER_THAN_OR_EQUAL"] = "IS_DATE_OLDER_THAN_OR_EQUAL";
  Operator2["IS_DATE_NEWER_THAN"] = "IS_DATE_NEWER_THAN";
  Operator2["IS_DATE_NEWER_THAN_OR_EQUAL"] = "IS_DATE_NEWER_THAN_OR_EQUAL";
  return Operator2;
})(Operator || {});
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
  WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
  WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
  WebhookIdentityType2["MEMBER"] = "MEMBER";
  WebhookIdentityType2["WIX_USER"] = "WIX_USER";
  WebhookIdentityType2["APP"] = "APP";
  return WebhookIdentityType2;
})(WebhookIdentityType || {});
var IdentityType = /* @__PURE__ */ ((IdentityType2) => {
  IdentityType2["UNKNOWN"] = "UNKNOWN";
  IdentityType2["CONTACT"] = "CONTACT";
  IdentityType2["MEMBER"] = "MEMBER";
  IdentityType2["NOT_AUTHENTICATED_MEMBER"] = "NOT_AUTHENTICATED_MEMBER";
  return IdentityType2;
})(IdentityType || {});
var ErrorType = /* @__PURE__ */ ((ErrorType2) => {
  ErrorType2["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
  ErrorType2["TYPE_ERROR"] = "TYPE_ERROR";
  ErrorType2["REQUIRED_VALUE_ERROR"] = "REQUIRED_VALUE_ERROR";
  ErrorType2["UNKNOWN_VALUE_ERROR"] = "UNKNOWN_VALUE_ERROR";
  ErrorType2["MAX_LENGTH_ERROR"] = "MAX_LENGTH_ERROR";
  ErrorType2["MIN_LENGTH_ERROR"] = "MIN_LENGTH_ERROR";
  ErrorType2["PATTERN_ERROR"] = "PATTERN_ERROR";
  ErrorType2["FORMAT_ERROR"] = "FORMAT_ERROR";
  ErrorType2["MAX_VALUE_ERROR"] = "MAX_VALUE_ERROR";
  ErrorType2["MIN_VALUE_ERROR"] = "MIN_VALUE_ERROR";
  ErrorType2["MULTIPLE_OF_VALUE_ERROR"] = "MULTIPLE_OF_VALUE_ERROR";
  ErrorType2["MIN_ITEMS_ERROR"] = "MIN_ITEMS_ERROR";
  ErrorType2["MAX_ITEMS_ERROR"] = "MAX_ITEMS_ERROR";
  ErrorType2["NOT_ALLOWED_VALUE_ERROR"] = "NOT_ALLOWED_VALUE_ERROR";
  ErrorType2["FIELDS_COMPATIBILITY_ERROR"] = "FIELDS_COMPATIBILITY_ERROR";
  ErrorType2["DISABLED_FORM_ERROR"] = "DISABLED_FORM_ERROR";
  ErrorType2["FORMS_COUNT_RESTRICTIONS_ERROR"] = "FORMS_COUNT_RESTRICTIONS_ERROR";
  ErrorType2["FIELDS_COUNT_RESTRICTIONS_ERROR"] = "FIELDS_COUNT_RESTRICTIONS_ERROR";
  ErrorType2["STEPS_COUNT_RESTRICTIONS_ERROR"] = "STEPS_COUNT_RESTRICTIONS_ERROR";
  ErrorType2["RULES_COUNT_RESTRICTIONS_ERROR"] = "RULES_COUNT_RESTRICTIONS_ERROR";
  ErrorType2["FILE_UPLOAD_RESTRICTIONS_ERROR"] = "FILE_UPLOAD_RESTRICTIONS_ERROR";
  ErrorType2["INVALID_PHONE_COUNTRY_CODE_ERROR"] = "INVALID_PHONE_COUNTRY_CODE_ERROR";
  ErrorType2["INVALID_STAFF_ID_ERROR"] = "INVALID_STAFF_ID_ERROR";
  ErrorType2["INVALID_LOCATION_ID_ERROR"] = "INVALID_LOCATION_ID_ERROR";
  ErrorType2["MISSING_SERVICE_OPTION_ERROR"] = "MISSING_SERVICE_OPTION_ERROR";
  ErrorType2["INVALID_SERVICE_OPTIONS_ERROR"] = "INVALID_SERVICE_OPTIONS_ERROR";
  ErrorType2["NO_AVAILABLE_SERVICE_OPTIONS_ERROR"] = "NO_AVAILABLE_SERVICE_OPTIONS_ERROR";
  ErrorType2["EXACT_CHARACTER_LENGTH_ERROR"] = "EXACT_CHARACTER_LENGTH_ERROR";
  ErrorType2["CHARACTER_LENGTH_RANGE_ERROR"] = "CHARACTER_LENGTH_RANGE_ERROR";
  ErrorType2["VALUE_RANGE_ERROR"] = "VALUE_RANGE_ERROR";
  ErrorType2["EXACT_ITEMS_NUMBER_ERROR"] = "EXACT_ITEMS_NUMBER_ERROR";
  ErrorType2["DECIMAL_POINT_ERROR"] = "DECIMAL_POINT_ERROR";
  ErrorType2["INCOMPLETE_DATE_ERROR"] = "INCOMPLETE_DATE_ERROR";
  ErrorType2["INVALID_VALUE_FOR_PATTERN_ERROR"] = "INVALID_VALUE_FOR_PATTERN_ERROR";
  return ErrorType2;
})(ErrorType || {});
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
  SortOrder2["ASC"] = "ASC";
  SortOrder2["DESC"] = "DESC";
  return SortOrder2;
})(SortOrder || {});
var Mode = /* @__PURE__ */ ((Mode2) => {
  Mode2["OR"] = "OR";
  Mode2["AND"] = "AND";
  return Mode2;
})(Mode || {});
var Status = /* @__PURE__ */ ((Status2) => {
  Status2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
  Status2["READY"] = "READY";
  Status2["PENDING"] = "PENDING";
  Status2["FAILED"] = "FAILED";
  return Status2;
})(Status || {});
var SubmissionErrorType = /* @__PURE__ */ ((SubmissionErrorType2) => {
  SubmissionErrorType2["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
  SubmissionErrorType2["TYPE_ERROR"] = "TYPE_ERROR";
  SubmissionErrorType2["REQUIRED_VALUE_ERROR"] = "REQUIRED_VALUE_ERROR";
  SubmissionErrorType2["UNKNOWN_VALUE_ERROR"] = "UNKNOWN_VALUE_ERROR";
  SubmissionErrorType2["MAX_LENGTH_ERROR"] = "MAX_LENGTH_ERROR";
  SubmissionErrorType2["MIN_LENGTH_ERROR"] = "MIN_LENGTH_ERROR";
  SubmissionErrorType2["PATTERN_ERROR"] = "PATTERN_ERROR";
  SubmissionErrorType2["FORMAT_ERROR"] = "FORMAT_ERROR";
  SubmissionErrorType2["MAX_VALUE_ERROR"] = "MAX_VALUE_ERROR";
  SubmissionErrorType2["MIN_VALUE_ERROR"] = "MIN_VALUE_ERROR";
  SubmissionErrorType2["MULTIPLE_OF_VALUE_ERROR"] = "MULTIPLE_OF_VALUE_ERROR";
  SubmissionErrorType2["MIN_ITEMS_ERROR"] = "MIN_ITEMS_ERROR";
  SubmissionErrorType2["MAX_ITEMS_ERROR"] = "MAX_ITEMS_ERROR";
  SubmissionErrorType2["NOT_ALLOWED_VALUE_ERROR"] = "NOT_ALLOWED_VALUE_ERROR";
  SubmissionErrorType2["DISABLED_FORM_ERROR"] = "DISABLED_FORM_ERROR";
  return SubmissionErrorType2;
})(SubmissionErrorType || {});
async function upsertContactFromSubmission2(submissionId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    submissionId,
    contactId: options?.contactId,
    emailVerified: options?.emailVerified
  });
  const reqOpts = upsertContactFromSubmission(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          submissionId: "$[0]",
          contactId: "$[1].contactId",
          emailVerified: "$[1].emailVerified"
        },
        singleArgumentUnchanged: false
      },
      ["submissionId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function createSubmission2(submission, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    submission,
    captchaToken: options?.captchaToken,
    additionalMetadata: options?.additionalMetadata
  });
  const reqOpts = createSubmission(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data)?.submission;
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          submission: "$[0]",
          captchaToken: "$[1].captchaToken",
          additionalMetadata: "$[1].additionalMetadata"
        },
        singleArgumentUnchanged: false
      },
      ["submission", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function getSubmission2(submissionId) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    submissionId
  });
  const reqOpts = getSubmission(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data)?.submission;
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { submissionId: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["submissionId"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function updateSubmission2(_id, submission) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    submission: { ...submission, id: _id }
  });
  const reqOpts = updateSubmission(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data)?.submission;
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: { submission: "$[1]" },
        explicitPathsToArguments: { "submission.id": "$[0]" },
        singleArgumentUnchanged: false
      },
      ["_id", "submission"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function confirmSubmission2(submissionId) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    submissionId
  });
  const reqOpts = confirmSubmission(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { submissionId: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["submissionId"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function deleteSubmission2(submissionId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    submissionId,
    permanent: options?.permanent,
    preserveFiles: options?.preserveFiles
  });
  const reqOpts = deleteSubmission(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          submissionId: "$[0]",
          permanent: "$[1].permanent",
          preserveFiles: "$[1].preserveFiles"
        },
        singleArgumentUnchanged: false
      },
      ["submissionId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function bulkDeleteSubmission2(formId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    formId,
    submissionIds: options?.submissionIds,
    permanent: options?.permanent,
    preserveFiles: options?.preserveFiles
  });
  const reqOpts = bulkDeleteSubmission(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          formId: "$[0]",
          submissionIds: "$[1].submissionIds",
          permanent: "$[1].permanent",
          preserveFiles: "$[1].preserveFiles"
        },
        singleArgumentUnchanged: false
      },
      ["formId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function restoreSubmissionFromTrashBin2(submissionId) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    submissionId
  });
  const reqOpts = restoreSubmissionFromTrashBin(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { submissionId: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["submissionId"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function removeSubmissionFromTrashBin2(submissionId) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    submissionId
  });
  const reqOpts = removeSubmissionFromTrashBin(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { submissionId: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["submissionId"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function bulkRemoveSubmissionFromTrashBin2(formId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    formId,
    submissionIds: options?.submissionIds
  });
  const reqOpts = bulkRemoveSubmissionFromTrashBin(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          formId: "$[0]",
          submissionIds: "$[1].submissionIds"
        },
        singleArgumentUnchanged: false
      },
      ["formId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function listDeletedSubmissions2(formId, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    formId,
    submissionIds: options?.submissionIds,
    paging: options?.paging,
    statuses: options?.statuses
  });
  const reqOpts = listDeletedSubmissions(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          formId: "$[0]",
          submissionIds: "$[1].submissionIds",
          paging: "$[1].paging",
          statuses: "$[1].statuses"
        },
        singleArgumentUnchanged: false
      },
      ["formId", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function getDeletedSubmission2(submissionId) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    submissionId
  });
  const reqOpts = getDeletedSubmission(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { submissionId: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["submissionId"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function querySubmission2(query, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    query,
    onlyYourOwn: options?.onlyYourOwn
  });
  const reqOpts = querySubmission(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          query: "$[0]",
          onlyYourOwn: "$[1].onlyYourOwn"
        },
        singleArgumentUnchanged: false
      },
      ["query", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function searchSubmissionsByNamespace2(search) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = renameKeysFromSDKRequestToRESTRequest({ search });
  const reqOpts = searchSubmissionsByNamespace(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { search: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["search"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
function querySubmissionsByNamespace2(options) {
  const { httpClient, sideEffects } = arguments[1];
  return queryBuilder({
    func: async (payload) => {
      const reqOpts = querySubmissionsByNamespace({
        ...payload,
        ...options ?? {}
      });
      sideEffects?.onSiteCall?.();
      try {
        const result = await httpClient.request(reqOpts);
        sideEffects?.onSuccess?.(result);
        return result;
      } catch (err) {
        sideEffects?.onError?.(err);
        throw err;
      }
    },
    requestTransformer: (query) => {
      const args = [query, options];
      return renameKeysFromSDKRequestToRESTRequest({
        ...args?.[1],
        query: args?.[0]
      });
    },
    responseTransformer: ({
      data
    }) => {
      const transformedData = renameKeysFromRESTResponseToSDKResponse(
        transformPaths2(data, [])
      );
      return {
        items: transformedData?.submissions,
        pagingMetadata: transformedData?.metadata
      };
    },
    errorTransformer: (err) => {
      const transformedError = sdkTransformError(err, {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { query: "$[0]" },
        singleArgumentUnchanged: false
      });
      throw transformedError;
    },
    pagingMethod: "CURSOR",
    transformationPaths: {}
  });
}
async function typedQuerySubmissionsByNamespace(query, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    query,
    ...options
  });
  const reqOpts = querySubmissionsByNamespace(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { query: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["query", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function countSubmissionsByFilter2(filter, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    filter,
    search: options?.search
  });
  const reqOpts = countSubmissionsByFilter(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { filter: "$[0]", search: "$[1].search" },
        singleArgumentUnchanged: false
      },
      ["filter", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function countSubmissions2(formIds, namespace, options) {
  const { httpClient, sideEffects } = arguments[3];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    formIds,
    namespace,
    statuses: options?.statuses
  });
  const reqOpts = countSubmissions(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          formIds: "$[0]",
          namespace: "$[1]",
          statuses: "$[2].statuses"
        },
        singleArgumentUnchanged: false
      },
      ["formIds", "namespace", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function countDeletedSubmissions2(formIds, namespace, options) {
  const { httpClient, sideEffects } = arguments[3];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    formIds,
    namespace,
    statuses: options?.statuses
  });
  const reqOpts = countDeletedSubmissions(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          formIds: "$[0]",
          namespace: "$[1]",
          statuses: "$[2].statuses"
        },
        singleArgumentUnchanged: false
      },
      ["formIds", "namespace", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function getMediaUploadUrl2(formId, filename, mimeType) {
  const { httpClient, sideEffects } = arguments[3];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    formId,
    filename,
    mimeType
  });
  const reqOpts = getMediaUploadUrl(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          formId: "$[0]",
          filename: "$[1]",
          mimeType: "$[2]"
        },
        singleArgumentUnchanged: false
      },
      ["formId", "filename", "mimeType"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function bulkMarkSubmissionsAsSeen2(ids, formId) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    ids,
    formId
  });
  const reqOpts = bulkMarkSubmissionsAsSeen(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { ids: "$[0]", formId: "$[1]" },
        singleArgumentUnchanged: false
      },
      ["ids", "formId"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function getSubmissionDownloadUrl2(submissionId) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    submissionId
  });
  const reqOpts = getSubmissionDownloadUrl(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { submissionId: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["submissionId"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function downloadSubmission2(submissionId, accessToken) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    submissionId,
    accessToken
  });
  const reqOpts = downloadSubmission(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { submissionId: "$[0]", accessToken: "$[1]" },
        singleArgumentUnchanged: false
      },
      ["submissionId", "accessToken"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function getFormattedSubmission2(submissionId) {
  const { httpClient, sideEffects } = arguments[1];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    submissionId
  });
  const reqOpts = getFormattedSubmission(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: { submissionId: "$[0]" },
        singleArgumentUnchanged: false
      },
      ["submissionId"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function updateExtendedFields2(_id, namespace, options) {
  const { httpClient, sideEffects } = arguments[3];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    id: _id,
    namespace,
    namespaceData: options?.namespaceData
  });
  const reqOpts = updateExtendedFields(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          id: "$[0]",
          namespace: "$[1]",
          namespaceData: "$[2].namespaceData"
        },
        singleArgumentUnchanged: false
      },
      ["_id", "namespace", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function bulkUpdateFormSubmissionTags2(submissionIds, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    submissionIds,
    assignTags: options?.assignTags,
    unassignTags: options?.unassignTags
  });
  const reqOpts = bulkUpdateFormSubmissionTags(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          submissionIds: "$[0]",
          assignTags: "$[1].assignTags",
          unassignTags: "$[1].unassignTags"
        },
        singleArgumentUnchanged: false
      },
      ["submissionIds", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function bulkUpdateFormSubmissionTagsByFilter2(filter, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    filter,
    assignTags: options?.assignTags,
    unassignTags: options?.unassignTags
  });
  const reqOpts = bulkUpdateFormSubmissionTagsByFilter(
    payload
  );
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          filter: "$[0]",
          assignTags: "$[1].assignTags",
          unassignTags: "$[1].unassignTags"
        },
        singleArgumentUnchanged: false
      },
      ["filter", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}
async function validateFormSubmission2(submission, options) {
  const { httpClient, sideEffects } = arguments[2];
  const payload = renameKeysFromSDKRequestToRESTRequest({
    submission,
    fieldsToValidate: options?.fieldsToValidate
  });
  const reqOpts = validateFormSubmission(payload);
  sideEffects?.onSiteCall?.();
  try {
    const result = await httpClient.request(reqOpts);
    sideEffects?.onSuccess?.(result);
    return renameKeysFromRESTResponseToSDKResponse(result.data);
  } catch (err) {
    const transformedError = sdkTransformError(
      err,
      {
        spreadPathsToArguments: {},
        explicitPathsToArguments: {
          submission: "$[0]",
          fieldsToValidate: "$[1].fieldsToValidate"
        },
        singleArgumentUnchanged: false
      },
      ["submission", "options"]
    );
    sideEffects?.onError?.(err);
    throw transformedError;
  }
}

// src/forms-v4-submission-submissions.public.ts
function upsertContactFromSubmission3(httpClient) {
  return (submissionId, options) => upsertContactFromSubmission2(
    submissionId,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function createSubmission3(httpClient) {
  return (submission, options) => createSubmission2(
    submission,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function getSubmission3(httpClient) {
  return (submissionId) => getSubmission2(
    submissionId,
    // @ts-ignore
    { httpClient }
  );
}
function updateSubmission3(httpClient) {
  return (_id, submission) => updateSubmission2(
    _id,
    submission,
    // @ts-ignore
    { httpClient }
  );
}
function confirmSubmission3(httpClient) {
  return (submissionId) => confirmSubmission2(
    submissionId,
    // @ts-ignore
    { httpClient }
  );
}
function deleteSubmission3(httpClient) {
  return (submissionId, options) => deleteSubmission2(
    submissionId,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function bulkDeleteSubmission3(httpClient) {
  return (formId, options) => bulkDeleteSubmission2(
    formId,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function restoreSubmissionFromTrashBin3(httpClient) {
  return (submissionId) => restoreSubmissionFromTrashBin2(
    submissionId,
    // @ts-ignore
    { httpClient }
  );
}
function removeSubmissionFromTrashBin3(httpClient) {
  return (submissionId) => removeSubmissionFromTrashBin2(
    submissionId,
    // @ts-ignore
    { httpClient }
  );
}
function bulkRemoveSubmissionFromTrashBin3(httpClient) {
  return (formId, options) => bulkRemoveSubmissionFromTrashBin2(
    formId,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function listDeletedSubmissions3(httpClient) {
  return (formId, options) => listDeletedSubmissions2(
    formId,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function getDeletedSubmission3(httpClient) {
  return (submissionId) => getDeletedSubmission2(
    submissionId,
    // @ts-ignore
    { httpClient }
  );
}
function querySubmission3(httpClient) {
  return (query, options) => querySubmission2(
    query,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function searchSubmissionsByNamespace3(httpClient) {
  return (search) => searchSubmissionsByNamespace2(
    search,
    // @ts-ignore
    { httpClient }
  );
}
function querySubmissionsByNamespace3(httpClient) {
  return (options) => querySubmissionsByNamespace2(
    options,
    // @ts-ignore
    { httpClient }
  );
}
function typedQuerySubmissionsByNamespace2(httpClient) {
  return (query, options) => typedQuerySubmissionsByNamespace(
    query,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function countSubmissionsByFilter3(httpClient) {
  return (filter, options) => countSubmissionsByFilter2(
    filter,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function countSubmissions3(httpClient) {
  return (formIds, namespace, options) => countSubmissions2(
    formIds,
    namespace,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function countDeletedSubmissions3(httpClient) {
  return (formIds, namespace, options) => countDeletedSubmissions2(
    formIds,
    namespace,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function getMediaUploadUrl3(httpClient) {
  return (formId, filename, mimeType) => getMediaUploadUrl2(
    formId,
    filename,
    mimeType,
    // @ts-ignore
    { httpClient }
  );
}
function bulkMarkSubmissionsAsSeen3(httpClient) {
  return (ids, formId) => bulkMarkSubmissionsAsSeen2(
    ids,
    formId,
    // @ts-ignore
    { httpClient }
  );
}
function getSubmissionDownloadUrl3(httpClient) {
  return (submissionId) => getSubmissionDownloadUrl2(
    submissionId,
    // @ts-ignore
    { httpClient }
  );
}
function downloadSubmission3(httpClient) {
  return (submissionId, accessToken) => downloadSubmission2(
    submissionId,
    accessToken,
    // @ts-ignore
    { httpClient }
  );
}
function getFormattedSubmission3(httpClient) {
  return (submissionId) => getFormattedSubmission2(
    submissionId,
    // @ts-ignore
    { httpClient }
  );
}
function updateExtendedFields3(httpClient) {
  return (_id, namespace, options) => updateExtendedFields2(
    _id,
    namespace,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function bulkUpdateFormSubmissionTags3(httpClient) {
  return (submissionIds, options) => bulkUpdateFormSubmissionTags2(
    submissionIds,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function bulkUpdateFormSubmissionTagsByFilter3(httpClient) {
  return (filter, options) => bulkUpdateFormSubmissionTagsByFilter2(
    filter,
    options,
    // @ts-ignore
    { httpClient }
  );
}
function validateFormSubmission3(httpClient) {
  return (submission, options) => validateFormSubmission2(
    submission,
    options,
    // @ts-ignore
    { httpClient }
  );
}
var onSubmissionCreated = EventDefinition(
  "wix.forms.v4.submission_created",
  true,
  (event) => renameKeysFromRESTResponseToSDKResponse2(
    transformPaths3(event, [
      {
        transformFn: transformRESTTimestampToSDKTimestamp2,
        paths: [
          { path: "entity.createdDate" },
          { path: "entity.updatedDate" },
          { path: "metadata.eventTime" }
        ]
      }
    ])
  )
)();
var onSubmissionDeleted = EventDefinition(
  "wix.forms.v4.submission_deleted",
  true,
  (event) => renameKeysFromRESTResponseToSDKResponse2(
    transformPaths3(event, [
      {
        transformFn: transformRESTTimestampToSDKTimestamp2,
        paths: [
          { path: "entity.createdDate" },
          { path: "entity.updatedDate" },
          { path: "metadata.eventTime" }
        ]
      }
    ])
  )
)();
var onSubmissionRemovedSubmissionFromTrash = EventDefinition(
  "wix.forms.v4.submission_removed_submission_from_trash",
  true,
  (event) => renameKeysFromRESTResponseToSDKResponse2(
    transformPaths3(event, [
      {
        transformFn: transformRESTTimestampToSDKTimestamp2,
        paths: [
          { path: "data.submission.createdDate" },
          { path: "data.submission.updatedDate" },
          { path: "metadata.eventTime" }
        ]
      }
    ])
  )
)();
var onSubmissionStatusUpdated = EventDefinition(
  "wix.forms.v4.submission_status_updated",
  true,
  (event) => renameKeysFromRESTResponseToSDKResponse2(
    transformPaths3(event, [
      {
        transformFn: transformRESTTimestampToSDKTimestamp2,
        paths: [
          { path: "data.submission.createdDate" },
          { path: "data.submission.updatedDate" },
          { path: "metadata.eventTime" }
        ]
      }
    ])
  )
)();
var onSubmissionContactMapped = EventDefinition(
  "wix.forms.v4.submission_submission_contact_mapped",
  true,
  (event) => renameKeysFromRESTResponseToSDKResponse2(
    transformPaths3(event, [
      {
        transformFn: transformRESTTimestampToSDKTimestamp2,
        paths: [
          { path: "data.marketingSubscriptionDetails.submittedDate" },
          { path: "metadata.eventTime" }
        ]
      }
    ])
  )
)();
var onSubmissionContactMappingSkipped = EventDefinition(
  "wix.forms.v4.submission_submission_contact_mapping_skipped",
  true,
  (event) => renameKeysFromRESTResponseToSDKResponse2(
    transformPaths3(event, [
      {
        transformFn: transformRESTTimestampToSDKTimestamp2,
        paths: [{ path: "metadata.eventTime" }]
      }
    ])
  )
)();
var onSubmissionUpdated = EventDefinition(
  "wix.forms.v4.submission_updated",
  true,
  (event) => renameKeysFromRESTResponseToSDKResponse2(
    transformPaths3(event, [
      {
        transformFn: transformRESTTimestampToSDKTimestamp2,
        paths: [
          { path: "entity.createdDate" },
          { path: "entity.updatedDate" },
          { path: "metadata.eventTime" },
          { path: "modifiedFields.createdDate" },
          { path: "modifiedFields.updatedDate" }
        ]
      }
    ])
  )
)();

// src/forms-v4-submission-submissions.context.ts
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
function customQuerySubmissionsByNamespace(httpClient) {
  const router = createQueryOverloadRouter({
    builderQueryFunction: (options) => querySubmissionsByNamespace3(httpClient)(options),
    typedQueryFunction: (query, options) => typedQuerySubmissionsByNamespace2(httpClient)(query, options),
    hasOptionsParameter: true
  });
  function overloadedQuery(queryOrOptions, options) {
    return router(...arguments);
  }
  return overloadedQuery;
}
var upsertContactFromSubmission4 = /* @__PURE__ */ createRESTModule(upsertContactFromSubmission3);
var createSubmission4 = /* @__PURE__ */ createRESTModule(createSubmission3);
var getSubmission4 = /* @__PURE__ */ createRESTModule(getSubmission3);
var updateSubmission4 = /* @__PURE__ */ createRESTModule(updateSubmission3);
var confirmSubmission4 = /* @__PURE__ */ createRESTModule(confirmSubmission3);
var deleteSubmission4 = /* @__PURE__ */ createRESTModule(deleteSubmission3);
var bulkDeleteSubmission4 = /* @__PURE__ */ createRESTModule(bulkDeleteSubmission3);
var restoreSubmissionFromTrashBin4 = /* @__PURE__ */ createRESTModule(restoreSubmissionFromTrashBin3);
var removeSubmissionFromTrashBin4 = /* @__PURE__ */ createRESTModule(removeSubmissionFromTrashBin3);
var bulkRemoveSubmissionFromTrashBin4 = /* @__PURE__ */ createRESTModule(bulkRemoveSubmissionFromTrashBin3);
var listDeletedSubmissions4 = /* @__PURE__ */ createRESTModule(listDeletedSubmissions3);
var getDeletedSubmission4 = /* @__PURE__ */ createRESTModule(getDeletedSubmission3);
var querySubmission4 = /* @__PURE__ */ createRESTModule(querySubmission3);
var searchSubmissionsByNamespace4 = /* @__PURE__ */ createRESTModule(searchSubmissionsByNamespace3);
var countSubmissionsByFilter4 = /* @__PURE__ */ createRESTModule(countSubmissionsByFilter3);
var countSubmissions4 = /* @__PURE__ */ createRESTModule(countSubmissions3);
var countDeletedSubmissions4 = /* @__PURE__ */ createRESTModule(countDeletedSubmissions3);
var getMediaUploadUrl4 = /* @__PURE__ */ createRESTModule(getMediaUploadUrl3);
var bulkMarkSubmissionsAsSeen4 = /* @__PURE__ */ createRESTModule(bulkMarkSubmissionsAsSeen3);
var getSubmissionDownloadUrl4 = /* @__PURE__ */ createRESTModule(getSubmissionDownloadUrl3);
var downloadSubmission4 = /* @__PURE__ */ createRESTModule(downloadSubmission3);
var getFormattedSubmission4 = /* @__PURE__ */ createRESTModule(getFormattedSubmission3);
var updateExtendedFields4 = /* @__PURE__ */ createRESTModule(updateExtendedFields3);
var bulkUpdateFormSubmissionTags4 = /* @__PURE__ */ createRESTModule(bulkUpdateFormSubmissionTags3);
var bulkUpdateFormSubmissionTagsByFilter4 = /* @__PURE__ */ createRESTModule(bulkUpdateFormSubmissionTagsByFilter3);
var validateFormSubmission4 = /* @__PURE__ */ createRESTModule(validateFormSubmission3);
var querySubmissionsByNamespace4 = /* @__PURE__ */ createRESTModule(customQuerySubmissionsByNamespace);
var onSubmissionCreated2 = createEventModule(
  onSubmissionCreated
);
var onSubmissionDeleted2 = createEventModule(
  onSubmissionDeleted
);
var onSubmissionRemovedSubmissionFromTrash2 = createEventModule(
  onSubmissionRemovedSubmissionFromTrash
);
var onSubmissionStatusUpdated2 = createEventModule(
  onSubmissionStatusUpdated
);
var onSubmissionContactMapped2 = createEventModule(
  onSubmissionContactMapped
);
var onSubmissionContactMappingSkipped2 = createEventModule(
  onSubmissionContactMappingSkipped
);
var onSubmissionUpdated2 = createEventModule(
  onSubmissionUpdated
);
export {
  AddressInfoTag,
  Alignment,
  AppType,
  ArrayComponentType,
  AspectRatio,
  BackgroundType,
  BooleanComponentType,
  ButtonDataType,
  CardStylesAlignment,
  CardStylesType,
  ChangeableProperty,
  ComponentType,
  ConfirmationLevel,
  ContactField,
  Crop,
  DecorationType,
  DesignTarget,
  Direction,
  DisplayFieldType,
  DividerDataAlignment,
  EmailInfoTag,
  ErrorType,
  FieldType,
  FirstDayOfWeek,
  FontType,
  FormFieldContactInfoContactField,
  FormFieldContactInfoEmailInfoTag,
  FormFieldContactInfoPhoneInfoTag,
  Format,
  FormatEnumFormat,
  GIFType,
  IdentityType,
  ImageFit,
  ImagePosition,
  InitialExpandedItems,
  InputType,
  ItemType,
  Kind,
  Layout,
  LayoutDataImagePosition,
  LayoutType,
  LineStyle,
  LinkTarget,
  MapType,
  Mode,
  NodeType,
  NullValue,
  NumberComponentType,
  NumberOfColumns,
  ObjectArrayComponentType,
  Operator,
  OptInLevel,
  Orientation,
  OverrideEntityType,
  OverrideEntityTypeEnumOverrideEntityType,
  PaymentComponentType,
  PhoneInfoTag,
  Placement,
  PluginContainerDataAlignment,
  PollLayoutDirection,
  PollLayoutType,
  Position,
  PriceType,
  ProductType,
  PropertiesTypeEnum,
  RequiredIndicator,
  RequiredIndicatorPlacement,
  Resizing,
  ResponsivenessBehaviour,
  Scaling,
  SchedulingComponentType,
  SortOrder,
  Source,
  SpamFilterProtectionLevel,
  Status,
  StringComponentType,
  StringTypeFormatEnumFormat,
  StylesPosition,
  SubmissionErrorType,
  SubmissionStatus,
  SubmitSuccessAction,
  SubscriptionInfoOptInLevel,
  Tag,
  Target,
  TextAlignment,
  ThumbnailsAlignment,
  Type,
  UploadFileFormat,
  ValidationFormat,
  VerticalAlignment,
  VerticalAlignmentAlignment,
  ViewMode,
  ViewRole,
  VoteRole,
  WebhookIdentityType,
  Width,
  WidthType,
  WixFileComponentType,
  bulkDeleteSubmission4 as bulkDeleteSubmission,
  bulkMarkSubmissionsAsSeen4 as bulkMarkSubmissionsAsSeen,
  bulkRemoveSubmissionFromTrashBin4 as bulkRemoveSubmissionFromTrashBin,
  bulkUpdateFormSubmissionTags4 as bulkUpdateFormSubmissionTags,
  bulkUpdateFormSubmissionTagsByFilter4 as bulkUpdateFormSubmissionTagsByFilter,
  confirmSubmission4 as confirmSubmission,
  countDeletedSubmissions4 as countDeletedSubmissions,
  countSubmissions4 as countSubmissions,
  countSubmissionsByFilter4 as countSubmissionsByFilter,
  createSubmission4 as createSubmission,
  deleteSubmission4 as deleteSubmission,
  downloadSubmission4 as downloadSubmission,
  getDeletedSubmission4 as getDeletedSubmission,
  getFormattedSubmission4 as getFormattedSubmission,
  getMediaUploadUrl4 as getMediaUploadUrl,
  getSubmission4 as getSubmission,
  getSubmissionDownloadUrl4 as getSubmissionDownloadUrl,
  listDeletedSubmissions4 as listDeletedSubmissions,
  onSubmissionContactMapped2 as onSubmissionContactMapped,
  onSubmissionContactMappingSkipped2 as onSubmissionContactMappingSkipped,
  onSubmissionCreated2 as onSubmissionCreated,
  onSubmissionDeleted2 as onSubmissionDeleted,
  onSubmissionRemovedSubmissionFromTrash2 as onSubmissionRemovedSubmissionFromTrash,
  onSubmissionStatusUpdated2 as onSubmissionStatusUpdated,
  onSubmissionUpdated2 as onSubmissionUpdated,
  querySubmission4 as querySubmission,
  querySubmissionsByNamespace4 as querySubmissionsByNamespace,
  removeSubmissionFromTrashBin4 as removeSubmissionFromTrashBin,
  restoreSubmissionFromTrashBin4 as restoreSubmissionFromTrashBin,
  searchSubmissionsByNamespace4 as searchSubmissionsByNamespace,
  updateExtendedFields4 as updateExtendedFields,
  updateSubmission4 as updateSubmission,
  upsertContactFromSubmission4 as upsertContactFromSubmission,
  validateFormSubmission4 as validateFormSubmission
};
//# sourceMappingURL=index.mjs.map