// src/automations-v2-automation-automations-v-2.http.ts
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
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 resolveWixAutomationsV2AutomationsServiceUrl(opts) {
  const domainToMappings = {
    "manage._base_domain_": [
      {
        srcPath: "/automations-service",
        destPath: ""
      },
      {
        srcPath: "/_api/automations-service",
        destPath: "/api"
      }
    ],
    "platform.rise.ai": [
      {
        srcPath: "/v2/automations",
        destPath: ""
      }
    ],
    "www.wixapis.com": [
      {
        srcPath: "/automations-service",
        destPath: ""
      }
    ],
    "*.dev.wix-code.com": [
      {
        srcPath: "/automations-service",
        destPath: ""
      }
    ],
    _: [
      {
        srcPath: "/automations-service",
        destPath: ""
      }
    ],
    "payments.base44.com": [
      {
        srcPath: "/_api/automations-service",
        destPath: "/api"
      },
      {
        srcPath: "/automations-service",
        destPath: ""
      }
    ]
  };
  return resolveUrl(Object.assign(opts, { domainToMappings }));
}
function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
  const domainToMappings = {
    "manage._base_domain_": [
      {
        srcPath: "/automations-service",
        destPath: ""
      },
      {
        srcPath: "/_api/automations-service",
        destPath: "/api"
      }
    ],
    "platform.rise.ai": [
      {
        srcPath: "/v2/automations",
        destPath: ""
      }
    ],
    "www.wixapis.com": [
      {
        srcPath: "/automations-service",
        destPath: ""
      }
    ],
    "*.dev.wix-code.com": [
      {
        srcPath: "/automations-service",
        destPath: ""
      }
    ],
    _: [
      {
        srcPath: "/automations-service",
        destPath: ""
      }
    ],
    "payments.base44.com": [
      {
        srcPath: "/_api/automations-service",
        destPath: "/api"
      },
      {
        srcPath: "/automations-service",
        destPath: ""
      }
    ]
  };
  return resolveUrl(Object.assign(opts, { domainToMappings }));
}
var PACKAGE_NAME = "@wix/auto_sdk_automations_automations-v-2";
function getAutomationRevision(payload) {
  function __getAutomationRevision({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "GET",
      methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
        protoPath: "/v1/automation-revisions/{automationId}",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload),
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "automation.createdDate" },
            { path: "automation.updatedDate" },
            { path: "automation.draftUpdatedDate" },
            { path: "automation.autoArchivePolicy.archiveDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __getAutomationRevision;
}
function createAutomation(payload) {
  function __createAutomation({ host }) {
    const serializedData = transformPaths(payload, [
      {
        transformFn: transformSDKTimestampToRESTTimestamp,
        paths: [
          { path: "automation.createdDate" },
          { path: "automation.updatedDate" },
          { path: "automation.draftUpdatedDate" },
          { path: "automation.autoArchivePolicy.archiveDate" }
        ]
      }
    ]);
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "POST",
      methodFqn: "wix.automations.v2.AutomationsService.CreateAutomation",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "automation.createdDate" },
            { path: "automation.updatedDate" },
            { path: "automation.draftUpdatedDate" },
            { path: "automation.autoArchivePolicy.archiveDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __createAutomation;
}
function createAutomationFromTemplateId(payload) {
  function __createAutomationFromTemplateId({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "POST",
      methodFqn: "wix.automations.v2.AutomationsService.CreateAutomationFromTemplateId",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/from-template/{automationTemplateId}",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "automation.createdDate" },
            { path: "automation.updatedDate" },
            { path: "automation.draftUpdatedDate" },
            { path: "automation.autoArchivePolicy.archiveDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __createAutomationFromTemplateId;
}
function getAutomation(payload) {
  function __getAutomation({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "GET",
      methodFqn: "wix.automations.v2.AutomationsService.GetAutomation",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/{automationId}",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload),
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "automation.createdDate" },
            { path: "automation.updatedDate" },
            { path: "automation.draftUpdatedDate" },
            { path: "automation.autoArchivePolicy.archiveDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __getAutomation;
}
function updateAutomation(payload) {
  function __updateAutomation({ host }) {
    const serializedData = transformPaths(payload, [
      {
        transformFn: transformSDKFieldMaskToRESTFieldMask,
        paths: [{ path: "fieldMask" }]
      },
      {
        transformFn: transformSDKTimestampToRESTTimestamp,
        paths: [
          { path: "automation.createdDate" },
          { path: "automation.updatedDate" },
          { path: "automation.draftUpdatedDate" },
          { path: "automation.autoArchivePolicy.archiveDate" }
        ]
      }
    ]);
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "PATCH",
      methodFqn: "wix.automations.v2.AutomationsService.UpdateAutomation",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/{automation.id}",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "automation.createdDate" },
            { path: "automation.updatedDate" },
            { path: "automation.draftUpdatedDate" },
            { path: "automation.autoArchivePolicy.archiveDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __updateAutomation;
}
function deleteAutomation(payload) {
  function __deleteAutomation({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "DELETE",
      methodFqn: "wix.automations.v2.AutomationsService.DeleteAutomation",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/{automationId}",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload)
    };
    return metadata;
  }
  return __deleteAutomation;
}
function bulkDeleteAutomations(payload) {
  function __bulkDeleteAutomations({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "POST",
      methodFqn: "wix.automations.v2.AutomationsService.BulkDeleteAutomations",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/bulk/automations/delete",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __bulkDeleteAutomations;
}
function createPreinstalledAutomation(payload) {
  function __createPreinstalledAutomation({ host }) {
    const serializedData = transformPaths(payload, [
      {
        transformFn: transformSDKTimestampToRESTTimestamp,
        paths: [
          { path: "automation.createdDate" },
          { path: "automation.updatedDate" },
          { path: "automation.draftUpdatedDate" },
          { path: "automation.autoArchivePolicy.archiveDate" }
        ]
      }
    ]);
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "POST",
      methodFqn: "wix.automations.v2.AutomationsService.CreatePreinstalledAutomation",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/preinstalled-automation",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "automation.createdDate" },
            { path: "automation.updatedDate" },
            { path: "automation.draftUpdatedDate" },
            { path: "automation.autoArchivePolicy.archiveDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __createPreinstalledAutomation;
}
function updatePreinstalledAutomation(payload) {
  function __updatePreinstalledAutomation({ host }) {
    const serializedData = transformPaths(payload, [
      {
        transformFn: transformSDKTimestampToRESTTimestamp,
        paths: [
          { path: "automation.createdDate" },
          { path: "automation.updatedDate" },
          { path: "automation.draftUpdatedDate" },
          { path: "automation.autoArchivePolicy.archiveDate" }
        ]
      }
    ]);
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "PATCH",
      methodFqn: "wix.automations.v2.AutomationsService.UpdatePreinstalledAutomation",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/preinstalled-automation",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "automation.createdDate" },
            { path: "automation.updatedDate" },
            { path: "automation.draftUpdatedDate" },
            { path: "automation.autoArchivePolicy.archiveDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __updatePreinstalledAutomation;
}
function deletePreinstalledAutomation(payload) {
  function __deletePreinstalledAutomation({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "DELETE",
      methodFqn: "wix.automations.v2.AutomationsService.DeletePreinstalledAutomation",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/preinstalled-automation/{componentId}",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload)
    };
    return metadata;
  }
  return __deletePreinstalledAutomation;
}
function generatePreinstalledAutomation(payload) {
  function __generatePreinstalledAutomation({ host }) {
    const serializedData = transformPaths(payload, [
      {
        transformFn: transformSDKTimestampToRESTTimestamp,
        paths: [
          { path: "automation.createdDate" },
          { path: "automation.updatedDate" },
          { path: "automation.draftUpdatedDate" },
          { path: "automation.autoArchivePolicy.archiveDate" }
        ]
      }
    ]);
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "POST",
      methodFqn: "wix.automations.v2.AutomationsService.GeneratePreinstalledAutomation",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/preinstalled-automation/generate",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "automation.createdDate" },
            { path: "automation.updatedDate" },
            { path: "automation.draftUpdatedDate" },
            { path: "automation.autoArchivePolicy.archiveDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __generatePreinstalledAutomation;
}
function queryPreinstalledAutomationsForApp(payload) {
  function __queryPreinstalledAutomationsForApp({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "POST",
      methodFqn: "wix.automations.v2.AutomationsService.QueryPreinstalledAutomationsForApp",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/preinstalled-automations/query",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "automations.createdDate" },
            { path: "automations.updatedDate" },
            { path: "automations.draftUpdatedDate" },
            { path: "automations.autoArchivePolicy.archiveDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __queryPreinstalledAutomationsForApp;
}
function queryPreinstalledAutomations(payload) {
  function __queryPreinstalledAutomations({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "POST",
      methodFqn: "wix.automations.v2.AutomationsService.QueryPreinstalledAutomations",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/preinstalled-automations/global/query",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "automations.createdDate" },
            { path: "automations.updatedDate" },
            { path: "automations.draftUpdatedDate" },
            { path: "automations.autoArchivePolicy.archiveDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __queryPreinstalledAutomations;
}
function queryAutomations(payload) {
  function __queryAutomations({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "POST",
      methodFqn: "wix.automations.v2.AutomationsService.QueryAutomations",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/query",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "automations.createdDate" },
            { path: "automations.updatedDate" },
            { path: "automations.draftUpdatedDate" },
            { path: "automations.autoArchivePolicy.archiveDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __queryAutomations;
}
function getAggregatedUsageInfo(payload) {
  function __getAggregatedUsageInfo({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "GET",
      methodFqn: "wix.automations.v2.AutomationsService.GetAggregatedUsageInfo",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/usage",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload, true)
    };
    return metadata;
  }
  return __getAggregatedUsageInfo;
}
function copyAutomation(payload) {
  function __copyAutomation({ host }) {
    const serializedData = transformPaths(payload, [
      {
        transformFn: transformSDKTimestampToRESTTimestamp,
        paths: [
          { path: "automation.createdDate" },
          { path: "automation.updatedDate" },
          { path: "automation.draftUpdatedDate" },
          { path: "automation.autoArchivePolicy.archiveDate" }
        ]
      }
    ]);
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "POST",
      methodFqn: "wix.automations.v2.AutomationsService.CopyAutomation",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/{automationId}/copy",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "automation.createdDate" },
            { path: "automation.updatedDate" },
            { path: "automation.draftUpdatedDate" },
            { path: "automation.autoArchivePolicy.archiveDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __copyAutomation;
}
function createDraftAutomation(payload) {
  function __createDraftAutomation({ host }) {
    const serializedData = transformPaths(payload, [
      {
        transformFn: transformSDKTimestampToRESTTimestamp,
        paths: [
          { path: "automation.createdDate" },
          { path: "automation.updatedDate" },
          { path: "automation.draftUpdatedDate" },
          { path: "automation.autoArchivePolicy.archiveDate" }
        ]
      }
    ]);
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "POST",
      methodFqn: "wix.automations.v2.AutomationsService.CreateDraftAutomation",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/drafts",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "automation.createdDate" },
            { path: "automation.updatedDate" },
            { path: "automation.draftUpdatedDate" },
            { path: "automation.autoArchivePolicy.archiveDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __createDraftAutomation;
}
function createDraftAutomationFromTemplateId(payload) {
  function __createDraftAutomationFromTemplateId({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "POST",
      methodFqn: "wix.automations.v2.AutomationsService.CreateDraftAutomationFromTemplateId",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/drafts/from-template/{automationTemplateId}",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "automation.createdDate" },
            { path: "automation.updatedDate" },
            { path: "automation.draftUpdatedDate" },
            { path: "automation.autoArchivePolicy.archiveDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __createDraftAutomationFromTemplateId;
}
function getOrCreateDraftAutomation(payload) {
  function __getOrCreateDraftAutomation({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "POST",
      methodFqn: "wix.automations.v2.AutomationsService.GetOrCreateDraftAutomation",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/drafts/get-or-create/original-automation-id/{originalAutomationId}",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "automation.createdDate" },
            { path: "automation.updatedDate" },
            { path: "automation.draftUpdatedDate" },
            { path: "automation.autoArchivePolicy.archiveDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __getOrCreateDraftAutomation;
}
function updateDraftAutomation(payload) {
  function __updateDraftAutomation({ host }) {
    const serializedData = transformPaths(payload, [
      {
        transformFn: transformSDKFieldMaskToRESTFieldMask,
        paths: [{ path: "fieldMask" }]
      },
      {
        transformFn: transformSDKTimestampToRESTTimestamp,
        paths: [
          { path: "automation.createdDate" },
          { path: "automation.updatedDate" },
          { path: "automation.draftUpdatedDate" },
          { path: "automation.autoArchivePolicy.archiveDate" }
        ]
      }
    ]);
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "PATCH",
      methodFqn: "wix.automations.v2.AutomationsService.UpdateDraftAutomation",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/drafts/{automation.id}",
        data: serializedData,
        host
      }),
      data: serializedData,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "automation.createdDate" },
            { path: "automation.updatedDate" },
            { path: "automation.draftUpdatedDate" },
            { path: "automation.autoArchivePolicy.archiveDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __updateDraftAutomation;
}
function queryAutomationsWithDrafts(payload) {
  function __queryAutomationsWithDrafts({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "POST",
      methodFqn: "wix.automations.v2.AutomationsService.QueryAutomationsWithDrafts",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/query-with-drafts",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "automations.createdDate" },
            { path: "automations.updatedDate" },
            { path: "automations.draftUpdatedDate" },
            { path: "automations.autoArchivePolicy.archiveDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __queryAutomationsWithDrafts;
}
function bulkCountAutomationsWithDrafts(payload) {
  function __bulkCountAutomationsWithDrafts({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "POST",
      methodFqn: "wix.automations.v2.AutomationsService.BulkCountAutomationsWithDrafts",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/bulk-count-with-drafts",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __bulkCountAutomationsWithDrafts;
}
function deleteDraftAutomation(payload) {
  function __deleteDraftAutomation({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "DELETE",
      methodFqn: "wix.automations.v2.AutomationsService.DeleteDraftAutomation",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/drafts/{automationId}",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload)
    };
    return metadata;
  }
  return __deleteDraftAutomation;
}
function publishDraftAutomation(payload) {
  function __publishDraftAutomation({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "POST",
      methodFqn: "wix.automations.v2.AutomationsService.PublishDraftAutomation",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/drafts/{automationId}/publish",
        data: payload,
        host
      }),
      data: payload,
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            { path: "automation.createdDate" },
            { path: "automation.updatedDate" },
            { path: "automation.draftUpdatedDate" },
            { path: "automation.autoArchivePolicy.archiveDate" }
          ]
        }
      ])
    };
    return metadata;
  }
  return __publishDraftAutomation;
}
function validateAutomation(payload) {
  function __validateAutomation({ host }) {
    const serializedData = transformPaths(payload, [
      {
        transformFn: transformSDKTimestampToRESTTimestamp,
        paths: [
          { path: "automation.createdDate" },
          { path: "automation.updatedDate" },
          { path: "automation.draftUpdatedDate" },
          { path: "automation.autoArchivePolicy.archiveDate" }
        ]
      }
    ]);
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "POST",
      methodFqn: "wix.automations.v2.AutomationsService.ValidateAutomation",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/validate",
        data: serializedData,
        host
      }),
      data: serializedData
    };
    return metadata;
  }
  return __validateAutomation;
}
function validateAutomationById(payload) {
  function __validateAutomationById({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "POST",
      methodFqn: "wix.automations.v2.AutomationsService.ValidateAutomationById",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/{automationId}/validate",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __validateAutomationById;
}
function getActionsQuotaInfo(payload) {
  function __getActionsQuotaInfo({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "GET",
      methodFqn: "wix.automations.v2.AutomationsService.GetActionsQuotaInfo",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/actions/quota",
        data: payload,
        host
      }),
      params: toURLSearchParams(payload),
      transformResponse: (payload2) => transformPaths(payload2, [
        {
          transformFn: transformRESTTimestampToSDKTimestamp,
          paths: [
            {
              path: "actionProviderQuotaInfo.actionQuotaInfo.quotaInfo.quotas.renewalDate"
            }
          ]
        }
      ])
    };
    return metadata;
  }
  return __getActionsQuotaInfo;
}
function generateActionInputMappingFromTemplate(payload) {
  function __generateActionInputMappingFromTemplate({ host }) {
    const metadata = {
      entityFqdn: "wix.automations.v2.automation",
      method: "POST",
      methodFqn: "wix.automations.v2.AutomationsService.GenerateActionInputMappingFromTemplate",
      packageName: PACKAGE_NAME,
      migrationOptions: {
        optInTransformResponse: true
      },
      url: resolveWixAutomationsV2AutomationsServiceUrl({
        protoPath: "/v2/automations/actions/generate-action-input-mapping-from-template",
        data: payload,
        host
      }),
      data: payload
    };
    return metadata;
  }
  return __generateActionInputMappingFromTemplate;
}

// src/automations-v2-automation-automations-v-2.types.ts
var Domain = /* @__PURE__ */ ((Domain2) => {
  Domain2["USER"] = "USER";
  Domain2["WIX"] = "WIX";
  Domain2["WIX_ACCOUNT"] = "WIX_ACCOUNT";
  return Domain2;
})(Domain || {});
var TimeUnit = /* @__PURE__ */ ((TimeUnit2) => {
  TimeUnit2["MINUTES"] = "MINUTES";
  TimeUnit2["HOURS"] = "HOURS";
  TimeUnit2["DAYS"] = "DAYS";
  TimeUnit2["WEEKS"] = "WEEKS";
  TimeUnit2["MONTHS"] = "MONTHS";
  return TimeUnit2;
})(TimeUnit || {});
var Operator = /* @__PURE__ */ ((Operator2) => {
  Operator2["OR"] = "OR";
  Operator2["AND"] = "AND";
  return Operator2;
})(Operator || {});
var Language = /* @__PURE__ */ ((Language2) => {
  Language2["JAVASCRIPT"] = "JAVASCRIPT";
  return Language2;
})(Language || {});
var Type = /* @__PURE__ */ ((Type2) => {
  Type2["APP_DEFINED"] = "APP_DEFINED";
  Type2["CONDITION"] = "CONDITION";
  Type2["CODE_CONDITION"] = "CODE_CONDITION";
  Type2["DELAY"] = "DELAY";
  Type2["RATE_LIMIT"] = "RATE_LIMIT";
  return Type2;
})(Type || {});
var Status = /* @__PURE__ */ ((Status2) => {
  Status2["ACTIVE"] = "ACTIVE";
  Status2["INACTIVE"] = "INACTIVE";
  return Status2;
})(Status || {});
var Origin = /* @__PURE__ */ ((Origin2) => {
  Origin2["USER"] = "USER";
  Origin2["APPLICATION"] = "APPLICATION";
  Origin2["PREINSTALLED"] = "PREINSTALLED";
  return Origin2;
})(Origin || {});
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 RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
  RequestedFields2["OVERRIDE_SCHEMA"] = "OVERRIDE_SCHEMA";
  return RequestedFields2;
})(RequestedFields || {});
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
  SortOrder2["ASC"] = "ASC";
  SortOrder2["DESC"] = "DESC";
  return SortOrder2;
})(SortOrder || {});
var State = /* @__PURE__ */ ((State2) => {
  State2["UNKNOWN"] = "UNKNOWN";
  State2["ENABLED"] = "ENABLED";
  State2["DISABLED"] = "DISABLED";
  State2["PENDING"] = "PENDING";
  State2["DEMO"] = "DEMO";
  return State2;
})(State || {});
var SiteCreatedContext = /* @__PURE__ */ ((SiteCreatedContext2) => {
  SiteCreatedContext2["OTHER"] = "OTHER";
  SiteCreatedContext2["FROM_TEMPLATE"] = "FROM_TEMPLATE";
  SiteCreatedContext2["DUPLICATE_BY_SITE_TRANSFER"] = "DUPLICATE_BY_SITE_TRANSFER";
  SiteCreatedContext2["DUPLICATE"] = "DUPLICATE";
  SiteCreatedContext2["OLD_SITE_TRANSFER"] = "OLD_SITE_TRANSFER";
  SiteCreatedContext2["FLASH"] = "FLASH";
  return SiteCreatedContext2;
})(SiteCreatedContext || {});
var Namespace = /* @__PURE__ */ ((Namespace2) => {
  Namespace2["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
  Namespace2["WIX"] = "WIX";
  Namespace2["SHOUT_OUT"] = "SHOUT_OUT";
  Namespace2["ALBUMS"] = "ALBUMS";
  Namespace2["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
  Namespace2["HOTELS"] = "HOTELS";
  Namespace2["CLUBS"] = "CLUBS";
  Namespace2["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
  Namespace2["DEV_SITE"] = "DEV_SITE";
  Namespace2["LOGOS"] = "LOGOS";
  Namespace2["VIDEO_MAKER"] = "VIDEO_MAKER";
  Namespace2["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
  Namespace2["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
  Namespace2["HTML_DRAFT"] = "HTML_DRAFT";
  Namespace2["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
  Namespace2["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
  Namespace2["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
  Namespace2["ANYWHERE"] = "ANYWHERE";
  Namespace2["HEADLESS"] = "HEADLESS";
  Namespace2["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
  Namespace2["RISE"] = "RISE";
  Namespace2["BRANDED_FIRST"] = "BRANDED_FIRST";
  Namespace2["NOWNIA"] = "NOWNIA";
  Namespace2["UGC_TEMPLATE"] = "UGC_TEMPLATE";
  Namespace2["CODUX"] = "CODUX";
  Namespace2["MEDIA_DESIGN_CREATOR"] = "MEDIA_DESIGN_CREATOR";
  Namespace2["SHARED_BLOG_ENTERPRISE"] = "SHARED_BLOG_ENTERPRISE";
  Namespace2["STANDALONE_FORMS"] = "STANDALONE_FORMS";
  Namespace2["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
  Namespace2["MIMIR"] = "MIMIR";
  Namespace2["TWINS"] = "TWINS";
  Namespace2["NANO"] = "NANO";
  Namespace2["BASE44"] = "BASE44";
  Namespace2["CHANNELS"] = "CHANNELS";
  Namespace2["NAUTILUS"] = "NAUTILUS";
  Namespace2["SYMPHONY"] = "SYMPHONY";
  return Namespace2;
})(Namespace || {});
var DeleteStatus = /* @__PURE__ */ ((DeleteStatus2) => {
  DeleteStatus2["UNKNOWN"] = "UNKNOWN";
  DeleteStatus2["TRASH"] = "TRASH";
  DeleteStatus2["DELETED"] = "DELETED";
  DeleteStatus2["PENDING_PURGE"] = "PENDING_PURGE";
  DeleteStatus2["PURGED_EXTERNALLY"] = "PURGED_EXTERNALLY";
  return DeleteStatus2;
})(DeleteStatus || {});
var ValidationResultStatus = /* @__PURE__ */ ((ValidationResultStatus2) => {
  ValidationResultStatus2["VALID"] = "VALID";
  ValidationResultStatus2["VALID_WITH_WARNINGS"] = "VALID_WITH_WARNINGS";
  ValidationResultStatus2["INVALID"] = "INVALID";
  return ValidationResultStatus2;
})(ValidationResultStatus || {});
var TriggerValidationErrorValidationErrorType = /* @__PURE__ */ ((TriggerValidationErrorValidationErrorType2) => {
  TriggerValidationErrorValidationErrorType2["UNKNOWN_VALIDATION_ERROR_TYPE"] = "UNKNOWN_VALIDATION_ERROR_TYPE";
  TriggerValidationErrorValidationErrorType2["CONFIGURATION_ERROR"] = "CONFIGURATION_ERROR";
  TriggerValidationErrorValidationErrorType2["PROVIDER_ERROR"] = "PROVIDER_ERROR";
  return TriggerValidationErrorValidationErrorType2;
})(TriggerValidationErrorValidationErrorType || {});
var TriggerErrorType = /* @__PURE__ */ ((TriggerErrorType2) => {
  TriggerErrorType2["UNKNOWN_TRIGGER_ERROR_TYPE"] = "UNKNOWN_TRIGGER_ERROR_TYPE";
  TriggerErrorType2["NOT_FOUND"] = "NOT_FOUND";
  TriggerErrorType2["APP_NOT_INSTALLED"] = "APP_NOT_INSTALLED";
  TriggerErrorType2["INVALID_TRIGGER_KEY"] = "INVALID_TRIGGER_KEY";
  TriggerErrorType2["INVALID_FILTER_FIELD_KEY"] = "INVALID_FILTER_FIELD_KEY";
  TriggerErrorType2["INVALID_FILTER_EXPRESSION"] = "INVALID_FILTER_EXPRESSION";
  TriggerErrorType2["MISSING_REQUIRED_FILTER"] = "MISSING_REQUIRED_FILTER";
  return TriggerErrorType2;
})(TriggerErrorType || {});
var ValidationErrorSeverity = /* @__PURE__ */ ((ValidationErrorSeverity2) => {
  ValidationErrorSeverity2["UNKNOWN_VALIDATION_ERROR_SEVERITY"] = "UNKNOWN_VALIDATION_ERROR_SEVERITY";
  ValidationErrorSeverity2["WARNING"] = "WARNING";
  ValidationErrorSeverity2["ERROR"] = "ERROR";
  return ValidationErrorSeverity2;
})(ValidationErrorSeverity || {});
var Severity = /* @__PURE__ */ ((Severity2) => {
  Severity2["UNKNOWN_SEVERITY"] = "UNKNOWN_SEVERITY";
  Severity2["WARNING"] = "WARNING";
  Severity2["CRITICAL"] = "CRITICAL";
  return Severity2;
})(Severity || {});
var ValidationErrorType = /* @__PURE__ */ ((ValidationErrorType2) => {
  ValidationErrorType2["UNKNOWN_VALIDATION_ERROR_TYPE"] = "UNKNOWN_VALIDATION_ERROR_TYPE";
  ValidationErrorType2["CONFIGURATION_ERROR"] = "CONFIGURATION_ERROR";
  ValidationErrorType2["PROVIDER_ERROR"] = "PROVIDER_ERROR";
  return ValidationErrorType2;
})(ValidationErrorType || {});
var ActionErrorType = /* @__PURE__ */ ((ActionErrorType2) => {
  ActionErrorType2["UNKNOWN_ACTION_ERROR_TYPE"] = "UNKNOWN_ACTION_ERROR_TYPE";
  ActionErrorType2["NOT_FOUND"] = "NOT_FOUND";
  ActionErrorType2["APP_NOT_INSTALLED"] = "APP_NOT_INSTALLED";
  ActionErrorType2["INVALID_ACTION_KEY"] = "INVALID_ACTION_KEY";
  ActionErrorType2["INVALID_MAPPING"] = "INVALID_MAPPING";
  ActionErrorType2["MAPPING_TYPE_MISMATCH"] = "MAPPING_TYPE_MISMATCH";
  ActionErrorType2["MAPPING_MISSING_REQUIRED_FIELD"] = "MAPPING_MISSING_REQUIRED_FIELD";
  ActionErrorType2["MAPPING_SCHEMA_MISMATCH"] = "MAPPING_SCHEMA_MISMATCH";
  ActionErrorType2["MAPPING_VARIABLE_MISSING_FROM_SCHEMA"] = "MAPPING_VARIABLE_MISSING_FROM_SCHEMA";
  ActionErrorType2["POST_ACTION_NOT_FOUND"] = "POST_ACTION_NOT_FOUND";
  return ActionErrorType2;
})(ActionErrorType || {});
var AutomationValidationErrorValidationErrorType = /* @__PURE__ */ ((AutomationValidationErrorValidationErrorType2) => {
  AutomationValidationErrorValidationErrorType2["UNKNOWN_VALIDATION_ERROR_TYPE"] = "UNKNOWN_VALIDATION_ERROR_TYPE";
  AutomationValidationErrorValidationErrorType2["CONFIGURATION_ERROR"] = "CONFIGURATION_ERROR";
  AutomationValidationErrorValidationErrorType2["PROVIDER_ERROR"] = "PROVIDER_ERROR";
  return AutomationValidationErrorValidationErrorType2;
})(AutomationValidationErrorValidationErrorType || {});
var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
  return AutomationErrorType2;
})(AutomationErrorType || {});

// src/automations-v2-automation-automations-v-2.meta.ts
function getAutomationRevision2() {
  const payload = { automationId: ":automationId" };
  const getRequestOptions = getAutomationRevision(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "GET",
    path: "/v1/automation-revisions/{automationId}",
    pathParams: { automationId: "automationId" },
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function createAutomation2() {
  const payload = {};
  const getRequestOptions = createAutomation(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "POST",
    path: "/v2/automations",
    pathParams: {},
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function createAutomationFromTemplateId2() {
  const payload = { automationTemplateId: ":automationTemplateId" };
  const getRequestOptions = createAutomationFromTemplateId(
    payload
  );
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "POST",
    path: "/v2/automations/from-template/{automationTemplateId}",
    pathParams: { automationTemplateId: "automationTemplateId" },
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function getAutomation2() {
  const payload = { automationId: ":automationId" };
  const getRequestOptions = getAutomation(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "GET",
    path: "/v2/automations/{automationId}",
    pathParams: { automationId: "automationId" },
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function updateAutomation2() {
  const payload = { automation: { id: ":automationId" } };
  const getRequestOptions = updateAutomation(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "PATCH",
    path: "/v2/automations/{automation.id}",
    pathParams: { automationId: "automationId" },
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function deleteAutomation2() {
  const payload = { automationId: ":automationId" };
  const getRequestOptions = deleteAutomation(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "DELETE",
    path: "/v2/automations/{automationId}",
    pathParams: { automationId: "automationId" },
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function bulkDeleteAutomations2() {
  const payload = {};
  const getRequestOptions = bulkDeleteAutomations(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "POST",
    path: "/v2/bulk/automations/delete",
    pathParams: {},
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function createPreinstalledAutomation2() {
  const payload = {};
  const getRequestOptions = createPreinstalledAutomation(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "POST",
    path: "/v2/preinstalled-automation",
    pathParams: {},
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function updatePreinstalledAutomation2() {
  const payload = {};
  const getRequestOptions = updatePreinstalledAutomation(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "PATCH",
    path: "/v2/preinstalled-automation",
    pathParams: {},
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function deletePreinstalledAutomation2() {
  const payload = { componentId: ":componentId" };
  const getRequestOptions = deletePreinstalledAutomation(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "DELETE",
    path: "/v2/preinstalled-automation/{componentId}",
    pathParams: { componentId: "componentId" },
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function generatePreinstalledAutomation2() {
  const payload = {};
  const getRequestOptions = generatePreinstalledAutomation(
    payload
  );
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "POST",
    path: "/v2/preinstalled-automation/generate",
    pathParams: {},
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function queryPreinstalledAutomationsForApp2() {
  const payload = {};
  const getRequestOptions = queryPreinstalledAutomationsForApp(
    payload
  );
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "POST",
    path: "/v2/preinstalled-automations/query",
    pathParams: {},
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function queryPreinstalledAutomations2() {
  const payload = {};
  const getRequestOptions = queryPreinstalledAutomations(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "POST",
    path: "/v2/preinstalled-automations/global/query",
    pathParams: {},
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function queryAutomations2() {
  const payload = {};
  const getRequestOptions = queryAutomations(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "POST",
    path: "/v2/automations/query",
    pathParams: {},
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function getAggregatedUsageInfo2() {
  const payload = {};
  const getRequestOptions = getAggregatedUsageInfo(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "GET",
    path: "/v2/automations/usage",
    pathParams: {},
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function copyAutomation2() {
  const payload = { automationId: ":automationId" };
  const getRequestOptions = copyAutomation(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "POST",
    path: "/v2/automations/{automationId}/copy",
    pathParams: { automationId: "automationId" },
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function createDraftAutomation2() {
  const payload = {};
  const getRequestOptions = createDraftAutomation(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "POST",
    path: "/v2/automations/drafts",
    pathParams: {},
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function createDraftAutomationFromTemplateId2() {
  const payload = { automationTemplateId: ":automationTemplateId" };
  const getRequestOptions = createDraftAutomationFromTemplateId(
    payload
  );
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "POST",
    path: "/v2/automations/drafts/from-template/{automationTemplateId}",
    pathParams: { automationTemplateId: "automationTemplateId" },
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function getOrCreateDraftAutomation2() {
  const payload = { originalAutomationId: ":originalAutomationId" };
  const getRequestOptions = getOrCreateDraftAutomation(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "POST",
    path: "/v2/automations/drafts/get-or-create/original-automation-id/{originalAutomationId}",
    pathParams: { originalAutomationId: "originalAutomationId" },
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function updateDraftAutomation2() {
  const payload = { automation: { id: ":automationId" } };
  const getRequestOptions = updateDraftAutomation(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "PATCH",
    path: "/v2/automations/drafts/{automation.id}",
    pathParams: { automationId: "automationId" },
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function queryAutomationsWithDrafts2() {
  const payload = {};
  const getRequestOptions = queryAutomationsWithDrafts(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "POST",
    path: "/v2/automations/query-with-drafts",
    pathParams: {},
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function bulkCountAutomationsWithDrafts2() {
  const payload = {};
  const getRequestOptions = bulkCountAutomationsWithDrafts(
    payload
  );
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "POST",
    path: "/v2/automations/bulk-count-with-drafts",
    pathParams: {},
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function deleteDraftAutomation2() {
  const payload = { automationId: ":automationId" };
  const getRequestOptions = deleteDraftAutomation(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "DELETE",
    path: "/v2/automations/drafts/{automationId}",
    pathParams: { automationId: "automationId" },
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function publishDraftAutomation2() {
  const payload = { automationId: ":automationId" };
  const getRequestOptions = publishDraftAutomation(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "POST",
    path: "/v2/automations/drafts/{automationId}/publish",
    pathParams: { automationId: "automationId" },
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function validateAutomation2() {
  const payload = {};
  const getRequestOptions = validateAutomation(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "POST",
    path: "/v2/automations/validate",
    pathParams: {},
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function validateAutomationById2() {
  const payload = { automationId: ":automationId" };
  const getRequestOptions = validateAutomationById(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "POST",
    path: "/v2/automations/{automationId}/validate",
    pathParams: { automationId: "automationId" },
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function getActionsQuotaInfo2() {
  const payload = {};
  const getRequestOptions = getActionsQuotaInfo(payload);
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "GET",
    path: "/v2/automations/actions/quota",
    pathParams: {},
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
function generateActionInputMappingFromTemplate2() {
  const payload = {};
  const getRequestOptions = generateActionInputMappingFromTemplate(
    payload
  );
  const getUrl = (context) => {
    const { url } = getRequestOptions(context);
    return url;
  };
  return {
    getUrl,
    httpMethod: "POST",
    path: "/v2/automations/actions/generate-action-input-mapping-from-template",
    pathParams: {},
    __requestType: null,
    __originalRequestType: null,
    __responseType: null,
    __originalResponseType: null
  };
}
export {
  ActionErrorType as ActionErrorTypeOriginal,
  AutomationErrorType as AutomationErrorTypeOriginal,
  AutomationValidationErrorValidationErrorType as AutomationValidationErrorValidationErrorTypeOriginal,
  DeleteStatus as DeleteStatusOriginal,
  Domain as DomainOriginal,
  Language as LanguageOriginal,
  Namespace as NamespaceOriginal,
  Operator as OperatorOriginal,
  Origin as OriginOriginal,
  RequestedFields as RequestedFieldsOriginal,
  Severity as SeverityOriginal,
  SiteCreatedContext as SiteCreatedContextOriginal,
  SortOrder as SortOrderOriginal,
  State as StateOriginal,
  Status as StatusOriginal,
  TimeUnit as TimeUnitOriginal,
  TriggerErrorType as TriggerErrorTypeOriginal,
  TriggerValidationErrorValidationErrorType as TriggerValidationErrorValidationErrorTypeOriginal,
  Type as TypeOriginal,
  ValidationErrorSeverity as ValidationErrorSeverityOriginal,
  ValidationErrorType as ValidationErrorTypeOriginal,
  ValidationResultStatus as ValidationResultStatusOriginal,
  WebhookIdentityType as WebhookIdentityTypeOriginal,
  bulkCountAutomationsWithDrafts2 as bulkCountAutomationsWithDrafts,
  bulkDeleteAutomations2 as bulkDeleteAutomations,
  copyAutomation2 as copyAutomation,
  createAutomation2 as createAutomation,
  createAutomationFromTemplateId2 as createAutomationFromTemplateId,
  createDraftAutomation2 as createDraftAutomation,
  createDraftAutomationFromTemplateId2 as createDraftAutomationFromTemplateId,
  createPreinstalledAutomation2 as createPreinstalledAutomation,
  deleteAutomation2 as deleteAutomation,
  deleteDraftAutomation2 as deleteDraftAutomation,
  deletePreinstalledAutomation2 as deletePreinstalledAutomation,
  generateActionInputMappingFromTemplate2 as generateActionInputMappingFromTemplate,
  generatePreinstalledAutomation2 as generatePreinstalledAutomation,
  getActionsQuotaInfo2 as getActionsQuotaInfo,
  getAggregatedUsageInfo2 as getAggregatedUsageInfo,
  getAutomation2 as getAutomation,
  getAutomationRevision2 as getAutomationRevision,
  getOrCreateDraftAutomation2 as getOrCreateDraftAutomation,
  publishDraftAutomation2 as publishDraftAutomation,
  queryAutomations2 as queryAutomations,
  queryAutomationsWithDrafts2 as queryAutomationsWithDrafts,
  queryPreinstalledAutomations2 as queryPreinstalledAutomations,
  queryPreinstalledAutomationsForApp2 as queryPreinstalledAutomationsForApp,
  updateAutomation2 as updateAutomation,
  updateDraftAutomation2 as updateDraftAutomation,
  updatePreinstalledAutomation2 as updatePreinstalledAutomation,
  validateAutomation2 as validateAutomation,
  validateAutomationById2 as validateAutomationById
};
//# sourceMappingURL=meta.mjs.map