@wix/auto_sdk_sites_site-actions 1.0.13 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +16 -2
  2. package/build/cjs/index.js +62 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +20 -1
  5. package/build/cjs/index.typings.js +55 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +65 -2
  8. package/build/cjs/meta.js +50 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +16 -2
  11. package/build/es/index.mjs +61 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +20 -1
  14. package/build/es/index.typings.mjs +54 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +65 -2
  17. package/build/es/meta.mjs +49 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +16 -2
  20. package/build/internal/cjs/index.js +62 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +20 -1
  23. package/build/internal/cjs/index.typings.js +55 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +65 -2
  26. package/build/internal/cjs/meta.js +50 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +16 -2
  29. package/build/internal/es/index.mjs +61 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +20 -1
  32. package/build/internal/es/index.typings.mjs +54 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +65 -2
  35. package/build/internal/es/meta.mjs +49 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { PublishSiteApplicationErrors, DuplicateSiteOptions, DuplicateSiteResponse, BulkDeleteSiteResponse } from './index.typings.js';
2
+ import { PublishSiteApplicationErrors, DeployStandalonePagesApplicationErrors, DuplicateSiteOptions, DuplicateSiteResponse, BulkDeleteSiteResponse } from './index.typings.js';
3
3
  export { ApplicationError, BulkActionMetadata, BulkDeleteSiteRequest, BulkSiteResult, DeleteSiteFromTrashRequest, DeleteSiteFromTrashResponse, DeployStandalonePagesRequest, DeployStandalonePagesResponse, DuplicateSiteRequest, EmptyEntity, ItemMetadata, MoveSiteToTrashRequest, MoveSiteToTrashResponse, PublishSiteRequest, PublishSiteResponse, RenameSiteRequest, RenameSiteResponse, RestoreSiteFromTrashRequest, RestoreSiteFromTrashResponse, UnpublishSiteRequest, UnpublishSiteResponse, ValidateSiteNameRequest, ValidateSiteNameResponse } from './index.typings.js';
4
4
 
5
5
  declare function publishSite$1(httpClient: HttpClient): PublishSiteSignature;
@@ -16,6 +16,19 @@ interface PublishSiteSignature {
16
16
  __applicationErrorsType?: PublishSiteApplicationErrors;
17
17
  }>;
18
18
  }
19
+ declare function deployStandalonePages$1(httpClient: HttpClient): DeployStandalonePagesSignature;
20
+ interface DeployStandalonePagesSignature {
21
+ /**
22
+ * Publishes a headless site.
23
+ *
24
+ * Publishing only the headless pages of the site.
25
+ *
26
+ * When using an API key for authentication, include a `wix-site-id` header with the ID of the site you want to publish.
27
+ */
28
+ (): Promise<void & {
29
+ __applicationErrorsType?: DeployStandalonePagesApplicationErrors;
30
+ }>;
31
+ }
19
32
  declare function duplicateSite$1(httpClient: HttpClient): DuplicateSiteSignature;
20
33
  interface DuplicateSiteSignature {
21
34
  /**
@@ -51,7 +64,8 @@ interface BulkDeleteSiteSignature {
51
64
  }
52
65
 
53
66
  declare const publishSite: MaybeContext<BuildRESTFunction<typeof publishSite$1> & typeof publishSite$1>;
67
+ declare const deployStandalonePages: MaybeContext<BuildRESTFunction<typeof deployStandalonePages$1> & typeof deployStandalonePages$1>;
54
68
  declare const duplicateSite: MaybeContext<BuildRESTFunction<typeof duplicateSite$1> & typeof duplicateSite$1>;
55
69
  declare const bulkDeleteSite: MaybeContext<BuildRESTFunction<typeof bulkDeleteSite$1> & typeof bulkDeleteSite$1>;
56
70
 
57
- export { BulkDeleteSiteResponse, DuplicateSiteOptions, DuplicateSiteResponse, PublishSiteApplicationErrors, bulkDeleteSite, duplicateSite, publishSite };
71
+ export { BulkDeleteSiteResponse, DeployStandalonePagesApplicationErrors, DuplicateSiteOptions, DuplicateSiteResponse, PublishSiteApplicationErrors, bulkDeleteSite, deployStandalonePages, duplicateSite, publishSite };
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
23
  bulkDeleteSite: () => bulkDeleteSite4,
24
+ deployStandalonePages: () => deployStandalonePages4,
24
25
  duplicateSite: () => duplicateSite4,
25
26
  publishSite: () => publishSite4
26
27
  });
@@ -92,6 +93,9 @@ function publishSite(payload) {
92
93
  method: "POST",
93
94
  methodFqn: "wix.site.v1.SitePublisher.PublishSite",
94
95
  packageName: PACKAGE_NAME,
96
+ migrationOptions: {
97
+ optInTransformResponse: true
98
+ },
95
99
  url: resolveWixSiteV1SitePublisherUrl({
96
100
  protoPath: "/v1/site/publish",
97
101
  data: payload,
@@ -103,6 +107,27 @@ function publishSite(payload) {
103
107
  }
104
108
  return __publishSite;
105
109
  }
110
+ function deployStandalonePages(payload) {
111
+ function __deployStandalonePages({ host }) {
112
+ const metadata = {
113
+ entityFqdn: "wix.site_actions.v1.site_actions",
114
+ method: "POST",
115
+ methodFqn: "wix.site.v1.SitePublisher.DeployStandalonePages",
116
+ packageName: PACKAGE_NAME,
117
+ migrationOptions: {
118
+ optInTransformResponse: true
119
+ },
120
+ url: resolveWixSiteV1SitePublisherUrl({
121
+ protoPath: "/v1/site/deploy-standalone-pages",
122
+ data: payload,
123
+ host
124
+ }),
125
+ data: payload
126
+ };
127
+ return metadata;
128
+ }
129
+ return __deployStandalonePages;
130
+ }
106
131
  function duplicateSite(payload) {
107
132
  function __duplicateSite({ host }) {
108
133
  const metadata = {
@@ -110,6 +135,9 @@ function duplicateSite(payload) {
110
135
  method: "POST",
111
136
  methodFqn: "com.wix.site.actions.SiteActionsService.DuplicateSite",
112
137
  packageName: PACKAGE_NAME,
138
+ migrationOptions: {
139
+ optInTransformResponse: true
140
+ },
113
141
  url: resolveComWixSiteActionsSiteActionsServiceUrl({
114
142
  protoPath: "/v1/sites/duplicate",
115
143
  data: payload,
@@ -128,6 +156,9 @@ function bulkDeleteSite(payload) {
128
156
  method: "POST",
129
157
  methodFqn: "com.wix.site.actions.SiteActionsService.BulkDeleteSite",
130
158
  packageName: PACKAGE_NAME,
159
+ migrationOptions: {
160
+ optInTransformResponse: true
161
+ },
131
162
  url: resolveComWixSiteActionsSiteActionsServiceUrl({
132
163
  protoPath: "/v1/bulk/sites/delete",
133
164
  data: payload,
@@ -164,6 +195,29 @@ async function publishSite2() {
164
195
  throw transformedError;
165
196
  }
166
197
  }
198
+ async function deployStandalonePages2() {
199
+ const { httpClient, sideEffects } = arguments[0];
200
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
201
+ const reqOpts = deployStandalonePages(payload);
202
+ sideEffects?.onSiteCall?.();
203
+ try {
204
+ const result = await httpClient.request(reqOpts);
205
+ sideEffects?.onSuccess?.(result);
206
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
207
+ } catch (err) {
208
+ const transformedError = (0, import_transform_error.transformError)(
209
+ err,
210
+ {
211
+ spreadPathsToArguments: {},
212
+ explicitPathsToArguments: {},
213
+ singleArgumentUnchanged: false
214
+ },
215
+ []
216
+ );
217
+ sideEffects?.onError?.(err);
218
+ throw transformedError;
219
+ }
220
+ }
167
221
  async function duplicateSite2(sourceSiteId, options) {
168
222
  const { httpClient, sideEffects } = arguments[2];
169
223
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -224,6 +278,12 @@ function publishSite3(httpClient) {
224
278
  { httpClient }
225
279
  );
226
280
  }
281
+ function deployStandalonePages3(httpClient) {
282
+ return () => deployStandalonePages2(
283
+ // @ts-ignore
284
+ { httpClient }
285
+ );
286
+ }
227
287
  function duplicateSite3(httpClient) {
228
288
  return (sourceSiteId, options) => duplicateSite2(
229
289
  sourceSiteId,
@@ -243,11 +303,13 @@ function bulkDeleteSite3(httpClient) {
243
303
  // src/site-actions-v1-site-actions-site-actions.context.ts
244
304
  var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
245
305
  var publishSite4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(publishSite3);
306
+ var deployStandalonePages4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(deployStandalonePages3);
246
307
  var duplicateSite4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(duplicateSite3);
247
308
  var bulkDeleteSite4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(bulkDeleteSite3);
248
309
  // Annotate the CommonJS export names for ESM import in node:
249
310
  0 && (module.exports = {
250
311
  bulkDeleteSite,
312
+ deployStandalonePages,
251
313
  duplicateSite,
252
314
  publishSite
253
315
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/site-actions-v1-site-actions-site-actions.universal.ts","../../src/site-actions-v1-site-actions-site-actions.http.ts","../../src/site-actions-v1-site-actions-site-actions.public.ts","../../src/site-actions-v1-site-actions-site-actions.context.ts"],"sourcesContent":["export * from './src/site-actions-v1-site-actions-site-actions.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixSiteActionsV1SiteActions from './site-actions-v1-site-actions-site-actions.http.js';\n\n/**\n * A package is group of instances of Wix services that a reseller offers to a\n * customer as part of a single transaction.\n */\nexport interface EmptyEntity {}\n\nexport interface PublishSiteRequest {}\n\nexport interface PublishSiteResponse {}\n\nexport interface DeployStandalonePagesRequest {}\n\nexport interface DeployStandalonePagesResponse {}\n\nexport interface DuplicateSiteRequest {\n /**\n * ID of the site to duplicated.\n * @format GUID\n */\n sourceSiteId: string;\n /**\n * Display name for the new site.\n * @minLength 1\n * @maxLength 40\n */\n siteDisplayName: string;\n}\n\nexport interface DuplicateSiteResponse {\n /**\n * ID of the new site.\n * @format GUID\n */\n newSiteId?: string;\n}\n\nexport interface BulkDeleteSiteRequest {\n /**\n * Site IDs.\n *\n * Min: 1 site ID <br>\n * Max: 20 site IDs\n * @format GUID\n * @minSize 1\n * @maxSize 20\n */\n ids: string[];\n}\n\nexport interface BulkDeleteSiteResponse {\n /** List of deletion results. */\n results?: BulkSiteResult[];\n /** Summary of deletion data. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkSiteResult {\n /** Result of deletion request per site describing the success or failure of each deletion. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface ItemMetadata {\n /** Site ID. */\n _id?: string | null;\n /** Index of the site in the request array. Allows for correlation between request and response. */\n originalIndex?: number;\n /** Whether the requested action was successful for the site. When `false`, the action failed and an `error` object is populated. */\n success?: boolean;\n /** Details about the error. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of error. */\n description?: string;\n}\n\nexport interface BulkActionMetadata {\n /** Number of sites that were deleted successfully. */\n totalSuccesses?: number;\n /** Number of sites that were not deleted successfully. */\n totalFailures?: number;\n}\n\nexport interface RenameSiteRequest {\n /**\n * @minLength 1\n * @maxLength 40\n */\n siteNewName?: string;\n}\n\nexport interface RenameSiteResponse {}\n\nexport interface ValidateSiteNameRequest {\n /**\n * @minLength 1\n * @maxLength 40\n */\n siteName?: string;\n}\n\nexport interface ValidateSiteNameResponse {\n /** Indicates whether the site name is valid. */\n valid?: boolean;\n}\n\nexport interface UnpublishSiteRequest {}\n\nexport interface UnpublishSiteResponse {}\n\nexport interface MoveSiteToTrashRequest {}\n\nexport interface MoveSiteToTrashResponse {}\n\nexport interface RestoreSiteFromTrashRequest {\n /** @format GUID */\n siteId?: string;\n}\n\nexport interface RestoreSiteFromTrashResponse {}\n\nexport interface DeleteSiteFromTrashRequest {\n /** @format GUID */\n siteId?: string;\n}\n\nexport interface DeleteSiteFromTrashResponse {}\n\n/** @docsIgnore */\nexport type PublishSiteApplicationErrors = {\n code?: 'SITE_IS_NOT_DEFINED_AS_PUBLISHABLE';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Publishes a site.\n *\n * Publishing a site makes any changes previously saved on the site available on the internet.\n * After publishing, changes to your site appear in the [site's history](https://support.wix.com/en/article/viewing-and-managing-your-site-history).\n *\n * When using an API key for authentication, include a `wix-site-id` header with the ID of the site you want to publish.\n * @public\n * @permissionId METASITE.UPDATE\n * @fqn wix.site.v1.SitePublisher.PublishSite\n */\nexport async function publishSite(): Promise<\n void & {\n __applicationErrorsType?: PublishSiteApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts = ambassadorWixSiteActionsV1SiteActions.publishSite(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Duplicates a site with a new site name.\n *\n * > **Note:** When you duplicate a site, some business-related content such as store orders, contacts, invoices, and 3rd-party app settings are not be included.\n * > The duplicated site won’t have a domain or any Premium capabilities.\n *\n * Any installed apps that can be used only on sites with a Premium Plan, will be copied to the duplicated site and\n * will appear unactivated. Once the site is upgraded, the app will be available for use.\n *\n * > **Important:** This call requires an account level API key.\n * @param sourceSiteId - ID of the site to duplicated.\n * @public\n * @requiredField options\n * @requiredField options.siteDisplayName\n * @requiredField sourceSiteId\n * @permissionId my-account.duplicate-site\n * @fqn com.wix.site.actions.SiteActionsService.DuplicateSite\n */\nexport async function duplicateSite(\n sourceSiteId: string,\n options: NonNullablePaths<DuplicateSiteOptions, `siteDisplayName`, 2>\n): Promise<NonNullablePaths<DuplicateSiteResponse, `newSiteId`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n sourceSiteId: sourceSiteId,\n siteDisplayName: options?.siteDisplayName,\n });\n\n const reqOpts = ambassadorWixSiteActionsV1SiteActions.duplicateSite(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n sourceSiteId: '$[0]',\n siteDisplayName: '$[1].siteDisplayName',\n },\n singleArgumentUnchanged: false,\n },\n ['sourceSiteId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DuplicateSiteOptions {\n /**\n * Display name for the new site.\n * @minLength 1\n * @maxLength 40\n */\n siteDisplayName: string;\n}\n\n/**\n * This endpoint enables you to delete multiple sites.\n *\n * This is not a permanent delete. Sites are moved to the trash bin and can be restored through site collaborators.\n *\n * Learn more about [deleting multiple sites](https://support.wix.com/en/article/moving-a-site-to-trash).\n *\n * > **Important:** This call requires an account level API key.\n * @param ids - Site IDs.\n *\n * Min: 1 site ID <br>\n * Max: 20 site IDs\n * @public\n * @requiredField ids\n * @permissionId my-account.delete-site\n * @fqn com.wix.site.actions.SiteActionsService.BulkDeleteSite\n */\nexport async function bulkDeleteSite(\n ids: string[]\n): Promise<\n NonNullablePaths<\n BulkDeleteSiteResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ ids: ids });\n\n const reqOpts = ambassadorWixSiteActionsV1SiteActions.bulkDeleteSite(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { ids: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['ids']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixSiteActionsSiteActionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/site-actions',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/site-actions',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/site-actions',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixSiteV1SitePublisherUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/site-publisher',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/site-publisher',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/site-publisher',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/site-publisher',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_sites_site-actions';\n\n/**\n * Publishes a site.\n *\n * Publishing a site makes any changes previously saved on the site available on the internet.\n * After publishing, changes to your site appear in the [site's history](https://support.wix.com/en/article/viewing-and-managing-your-site-history).\n *\n * When using an API key for authentication, include a `wix-site-id` header with the ID of the site you want to publish.\n */\nexport function publishSite(payload: object): RequestOptionsFactory<any> {\n function __publishSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_actions.v1.site_actions',\n method: 'POST' as any,\n methodFqn: 'wix.site.v1.SitePublisher.PublishSite',\n packageName: PACKAGE_NAME,\n url: resolveWixSiteV1SitePublisherUrl({\n protoPath: '/v1/site/publish',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __publishSite;\n}\n\n/**\n * Duplicates a site with a new site name.\n *\n * > **Note:** When you duplicate a site, some business-related content such as store orders, contacts, invoices, and 3rd-party app settings are not be included.\n * > The duplicated site won’t have a domain or any Premium capabilities.\n *\n * Any installed apps that can be used only on sites with a Premium Plan, will be copied to the duplicated site and\n * will appear unactivated. Once the site is upgraded, the app will be available for use.\n *\n * > **Important:** This call requires an account level API key.\n */\nexport function duplicateSite(payload: object): RequestOptionsFactory<any> {\n function __duplicateSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_actions.v1.site_actions',\n method: 'POST' as any,\n methodFqn: 'com.wix.site.actions.SiteActionsService.DuplicateSite',\n packageName: PACKAGE_NAME,\n url: resolveComWixSiteActionsSiteActionsServiceUrl({\n protoPath: '/v1/sites/duplicate',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __duplicateSite;\n}\n\n/**\n * This endpoint enables you to delete multiple sites.\n *\n * This is not a permanent delete. Sites are moved to the trash bin and can be restored through site collaborators.\n *\n * Learn more about [deleting multiple sites](https://support.wix.com/en/article/moving-a-site-to-trash).\n *\n * > **Important:** This call requires an account level API key.\n */\nexport function bulkDeleteSite(payload: object): RequestOptionsFactory<any> {\n function __bulkDeleteSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_actions.v1.site_actions',\n method: 'POST' as any,\n methodFqn: 'com.wix.site.actions.SiteActionsService.BulkDeleteSite',\n packageName: PACKAGE_NAME,\n url: resolveComWixSiteActionsSiteActionsServiceUrl({\n protoPath: '/v1/bulk/sites/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteSite;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkDeleteSiteResponse,\n DuplicateSiteOptions,\n DuplicateSiteResponse,\n PublishSiteApplicationErrors,\n bulkDeleteSite as universalBulkDeleteSite,\n duplicateSite as universalDuplicateSite,\n publishSite as universalPublishSite,\n} from './site-actions-v1-site-actions-site-actions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/sites' };\n\nexport function publishSite(httpClient: HttpClient): PublishSiteSignature {\n return () =>\n universalPublishSite(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface PublishSiteSignature {\n /**\n * Publishes a site.\n *\n * Publishing a site makes any changes previously saved on the site available on the internet.\n * After publishing, changes to your site appear in the [site's history](https://support.wix.com/en/article/viewing-and-managing-your-site-history).\n *\n * When using an API key for authentication, include a `wix-site-id` header with the ID of the site you want to publish.\n */\n (): Promise<\n void & {\n __applicationErrorsType?: PublishSiteApplicationErrors;\n }\n >;\n}\n\nexport function duplicateSite(httpClient: HttpClient): DuplicateSiteSignature {\n return (\n sourceSiteId: string,\n options: NonNullablePaths<DuplicateSiteOptions, `siteDisplayName`, 2>\n ) =>\n universalDuplicateSite(\n sourceSiteId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DuplicateSiteSignature {\n /**\n * Duplicates a site with a new site name.\n *\n * > **Note:** When you duplicate a site, some business-related content such as store orders, contacts, invoices, and 3rd-party app settings are not be included.\n * > The duplicated site won’t have a domain or any Premium capabilities.\n *\n * Any installed apps that can be used only on sites with a Premium Plan, will be copied to the duplicated site and\n * will appear unactivated. Once the site is upgraded, the app will be available for use.\n *\n * > **Important:** This call requires an account level API key.\n * @param - ID of the site to duplicated.\n */\n (\n sourceSiteId: string,\n options: NonNullablePaths<DuplicateSiteOptions, `siteDisplayName`, 2>\n ): Promise<NonNullablePaths<DuplicateSiteResponse, `newSiteId`, 2>>;\n}\n\nexport function bulkDeleteSite(\n httpClient: HttpClient\n): BulkDeleteSiteSignature {\n return (ids: string[]) =>\n universalBulkDeleteSite(\n ids,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkDeleteSiteSignature {\n /**\n * This endpoint enables you to delete multiple sites.\n *\n * This is not a permanent delete. Sites are moved to the trash bin and can be restored through site collaborators.\n *\n * Learn more about [deleting multiple sites](https://support.wix.com/en/article/moving-a-site-to-trash).\n *\n * > **Important:** This call requires an account level API key.\n * @param - Site IDs.\n *\n * Min: 1 site ID <br>\n * Max: 20 site IDs\n */\n (ids: string[]): Promise<\n NonNullablePaths<\n BulkDeleteSiteResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`,\n 6\n >\n >;\n}\n\nexport {\n ApplicationError,\n BulkActionMetadata,\n BulkDeleteSiteRequest,\n BulkDeleteSiteResponse,\n BulkSiteResult,\n DeleteSiteFromTrashRequest,\n DeleteSiteFromTrashResponse,\n DeployStandalonePagesRequest,\n DeployStandalonePagesResponse,\n DuplicateSiteOptions,\n DuplicateSiteRequest,\n DuplicateSiteResponse,\n EmptyEntity,\n ItemMetadata,\n MoveSiteToTrashRequest,\n MoveSiteToTrashResponse,\n PublishSiteRequest,\n PublishSiteResponse,\n RenameSiteRequest,\n RenameSiteResponse,\n RestoreSiteFromTrashRequest,\n RestoreSiteFromTrashResponse,\n UnpublishSiteRequest,\n UnpublishSiteResponse,\n ValidateSiteNameRequest,\n ValidateSiteNameResponse,\n} from './site-actions-v1-site-actions-site-actions.universal.js';\n","import {\n publishSite as publicPublishSite,\n duplicateSite as publicDuplicateSite,\n bulkDeleteSite as publicBulkDeleteSite,\n} from './site-actions-v1-site-actions-site-actions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const publishSite: MaybeContext<\n BuildRESTFunction<typeof publicPublishSite> & typeof publicPublishSite\n> = /*#__PURE__*/ createRESTModule(publicPublishSite);\nexport const duplicateSite: MaybeContext<\n BuildRESTFunction<typeof publicDuplicateSite> & typeof publicDuplicateSite\n> = /*#__PURE__*/ createRESTModule(publicDuplicateSite);\nexport const bulkDeleteSite: MaybeContext<\n BuildRESTFunction<typeof publicBulkDeleteSite> & typeof publicBulkDeleteSite\n> = /*#__PURE__*/ createRESTModule(publicBulkDeleteSite);\n\nexport {\n EmptyEntity,\n PublishSiteRequest,\n PublishSiteResponse,\n DeployStandalonePagesRequest,\n DeployStandalonePagesResponse,\n DuplicateSiteRequest,\n DuplicateSiteResponse,\n BulkDeleteSiteRequest,\n BulkDeleteSiteResponse,\n BulkSiteResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n RenameSiteRequest,\n RenameSiteResponse,\n ValidateSiteNameRequest,\n ValidateSiteNameResponse,\n UnpublishSiteRequest,\n UnpublishSiteResponse,\n MoveSiteToTrashRequest,\n MoveSiteToTrashResponse,\n RestoreSiteFromTrashRequest,\n RestoreSiteFromTrashResponse,\n DeleteSiteFromTrashRequest,\n DeleteSiteFromTrashResponse,\n DuplicateSiteOptions,\n} from './site-actions-v1-site-actions-site-actions.universal.js';\nexport { PublishSiteApplicationErrors } from './site-actions-v1-site-actions-site-actions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA,qBAAAC;AAAA,EAAA,mBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAA2B;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,gCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,SAAS,iCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;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;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAF;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,KAAK,OAAO;AAAA,QACxC,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,KAAK;AAAA,IACR;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AExTO,SAASG,aAAY,YAA8C;AACxE,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;AAkBO,SAASC,eAAc,YAAgD;AAC5E,SAAO,CACL,cACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAqBO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,QACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACzEA,IAAAC,uBAAiC;AAG1B,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMC,iBAEK,2DAAiBA,cAAmB;AAC/C,IAAMC,kBAEK,2DAAiBA,eAAoB;","names":["bulkDeleteSite","duplicateSite","publishSite","publishSite","sdkTransformError","duplicateSite","bulkDeleteSite","publishSite","duplicateSite","bulkDeleteSite","import_rest_modules","publishSite","duplicateSite","bulkDeleteSite"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/site-actions-v1-site-actions-site-actions.universal.ts","../../src/site-actions-v1-site-actions-site-actions.http.ts","../../src/site-actions-v1-site-actions-site-actions.public.ts","../../src/site-actions-v1-site-actions-site-actions.context.ts"],"sourcesContent":["export * from './src/site-actions-v1-site-actions-site-actions.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixSiteActionsV1SiteActions from './site-actions-v1-site-actions-site-actions.http.js';\n\n/**\n * A package is group of instances of Wix services that a reseller offers to a\n * customer as part of a single transaction.\n */\nexport interface EmptyEntity {}\n\nexport interface PublishSiteRequest {}\n\nexport interface PublishSiteResponse {}\n\nexport interface DeployStandalonePagesRequest {}\n\nexport interface DeployStandalonePagesResponse {}\n\nexport interface DuplicateSiteRequest {\n /**\n * ID of the site to duplicated.\n * @format GUID\n */\n sourceSiteId: string;\n /**\n * Display name for the new site.\n * @minLength 1\n * @maxLength 40\n */\n siteDisplayName: string;\n}\n\nexport interface DuplicateSiteResponse {\n /**\n * ID of the new site.\n * @format GUID\n */\n newSiteId?: string;\n}\n\nexport interface BulkDeleteSiteRequest {\n /**\n * Site IDs.\n *\n * Min: 1 site ID <br>\n * Max: 20 site IDs\n * @format GUID\n * @minSize 1\n * @maxSize 20\n */\n ids: string[];\n}\n\nexport interface BulkDeleteSiteResponse {\n /** List of deletion results. */\n results?: BulkSiteResult[];\n /** Summary of deletion data. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkSiteResult {\n /** Result of deletion request per site describing the success or failure of each deletion. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface ItemMetadata {\n /** Site ID. */\n _id?: string | null;\n /** Index of the site in the request array. Allows for correlation between request and response. */\n originalIndex?: number;\n /** Whether the requested action was successful for the site. When `false`, the action failed and an `error` object is populated. */\n success?: boolean;\n /** Details about the error. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of error. */\n description?: string;\n}\n\nexport interface BulkActionMetadata {\n /** Number of sites that were deleted successfully. */\n totalSuccesses?: number;\n /** Number of sites that were not deleted successfully. */\n totalFailures?: number;\n}\n\nexport interface RenameSiteRequest {\n /**\n * @minLength 1\n * @maxLength 40\n */\n siteNewName?: string;\n}\n\nexport interface RenameSiteResponse {}\n\nexport interface ValidateSiteNameRequest {\n /**\n * @minLength 1\n * @maxLength 40\n */\n siteName?: string;\n}\n\nexport interface ValidateSiteNameResponse {\n /** Indicates whether the site name is valid. */\n valid?: boolean;\n}\n\nexport interface UnpublishSiteRequest {}\n\nexport interface UnpublishSiteResponse {}\n\nexport interface MoveSiteToTrashRequest {}\n\nexport interface MoveSiteToTrashResponse {}\n\nexport interface RestoreSiteFromTrashRequest {\n /** @format GUID */\n siteId?: string;\n}\n\nexport interface RestoreSiteFromTrashResponse {}\n\nexport interface DeleteSiteFromTrashRequest {\n /** @format GUID */\n siteId?: string;\n}\n\nexport interface DeleteSiteFromTrashResponse {}\n\n/** @docsIgnore */\nexport type PublishSiteApplicationErrors = {\n code?: 'SITE_IS_NOT_DEFINED_AS_PUBLISHABLE';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type DeployStandalonePagesApplicationErrors = {\n code?: 'SITE_IS_NOT_HEADLESS';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Publishes a site.\n *\n * Publishing a site makes any changes previously saved on the site available on the internet.\n * After publishing, changes to your site appear in the [site's history](https://support.wix.com/en/article/viewing-and-managing-your-site-history).\n *\n * When using an API key for authentication, include a `wix-site-id` header with the ID of the site you want to publish.\n * @public\n * @permissionId METASITE.UPDATE\n * @fqn wix.site.v1.SitePublisher.PublishSite\n */\nexport async function publishSite(): Promise<\n void & {\n __applicationErrorsType?: PublishSiteApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts = ambassadorWixSiteActionsV1SiteActions.publishSite(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Publishes a headless site.\n *\n * Publishing only the headless pages of the site.\n *\n * When using an API key for authentication, include a `wix-site-id` header with the ID of the site you want to publish.\n * @public\n * @permissionId METASITE.UPDATE\n * @fqn wix.site.v1.SitePublisher.DeployStandalonePages\n */\nexport async function deployStandalonePages(): Promise<\n void & {\n __applicationErrorsType?: DeployStandalonePagesApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixSiteActionsV1SiteActions.deployStandalonePages(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Duplicates a site with a new site name.\n *\n * > **Note:** When you duplicate a site, some business-related content such as store orders, contacts, invoices, and 3rd-party app settings are not be included.\n * > The duplicated site won’t have a domain or any Premium capabilities.\n *\n * Any installed apps that can be used only on sites with a Premium Plan, will be copied to the duplicated site and\n * will appear unactivated. Once the site is upgraded, the app will be available for use.\n *\n * > **Important:** This call requires an account level API key.\n * @param sourceSiteId - ID of the site to duplicated.\n * @public\n * @requiredField options\n * @requiredField options.siteDisplayName\n * @requiredField sourceSiteId\n * @permissionId my-account.duplicate-site\n * @fqn com.wix.site.actions.SiteActionsService.DuplicateSite\n */\nexport async function duplicateSite(\n sourceSiteId: string,\n options: NonNullablePaths<DuplicateSiteOptions, `siteDisplayName`, 2>\n): Promise<NonNullablePaths<DuplicateSiteResponse, `newSiteId`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n sourceSiteId: sourceSiteId,\n siteDisplayName: options?.siteDisplayName,\n });\n\n const reqOpts = ambassadorWixSiteActionsV1SiteActions.duplicateSite(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n sourceSiteId: '$[0]',\n siteDisplayName: '$[1].siteDisplayName',\n },\n singleArgumentUnchanged: false,\n },\n ['sourceSiteId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DuplicateSiteOptions {\n /**\n * Display name for the new site.\n * @minLength 1\n * @maxLength 40\n */\n siteDisplayName: string;\n}\n\n/**\n * This endpoint enables you to delete multiple sites.\n *\n * This is not a permanent delete. Sites are moved to the trash bin and can be restored through site collaborators.\n *\n * Learn more about [deleting multiple sites](https://support.wix.com/en/article/moving-a-site-to-trash).\n *\n * > **Important:** This call requires an account level API key.\n * @param ids - Site IDs.\n *\n * Min: 1 site ID <br>\n * Max: 20 site IDs\n * @public\n * @requiredField ids\n * @permissionId my-account.delete-site\n * @fqn com.wix.site.actions.SiteActionsService.BulkDeleteSite\n */\nexport async function bulkDeleteSite(\n ids: string[]\n): Promise<\n NonNullablePaths<\n BulkDeleteSiteResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ ids: ids });\n\n const reqOpts = ambassadorWixSiteActionsV1SiteActions.bulkDeleteSite(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { ids: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['ids']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixSiteActionsSiteActionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/site-actions',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/site-actions',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/site-actions',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixSiteV1SitePublisherUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/site-publisher',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/site-publisher',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/site-publisher',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/site-publisher',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_sites_site-actions';\n\n/**\n * Publishes a site.\n *\n * Publishing a site makes any changes previously saved on the site available on the internet.\n * After publishing, changes to your site appear in the [site's history](https://support.wix.com/en/article/viewing-and-managing-your-site-history).\n *\n * When using an API key for authentication, include a `wix-site-id` header with the ID of the site you want to publish.\n */\nexport function publishSite(payload: object): RequestOptionsFactory<any> {\n function __publishSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_actions.v1.site_actions',\n method: 'POST' as any,\n methodFqn: 'wix.site.v1.SitePublisher.PublishSite',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSiteV1SitePublisherUrl({\n protoPath: '/v1/site/publish',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __publishSite;\n}\n\n/**\n * Publishes a headless site.\n *\n * Publishing only the headless pages of the site.\n *\n * When using an API key for authentication, include a `wix-site-id` header with the ID of the site you want to publish.\n */\nexport function deployStandalonePages(\n payload: object\n): RequestOptionsFactory<any> {\n function __deployStandalonePages({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_actions.v1.site_actions',\n method: 'POST' as any,\n methodFqn: 'wix.site.v1.SitePublisher.DeployStandalonePages',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSiteV1SitePublisherUrl({\n protoPath: '/v1/site/deploy-standalone-pages',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __deployStandalonePages;\n}\n\n/**\n * Duplicates a site with a new site name.\n *\n * > **Note:** When you duplicate a site, some business-related content such as store orders, contacts, invoices, and 3rd-party app settings are not be included.\n * > The duplicated site won’t have a domain or any Premium capabilities.\n *\n * Any installed apps that can be used only on sites with a Premium Plan, will be copied to the duplicated site and\n * will appear unactivated. Once the site is upgraded, the app will be available for use.\n *\n * > **Important:** This call requires an account level API key.\n */\nexport function duplicateSite(payload: object): RequestOptionsFactory<any> {\n function __duplicateSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_actions.v1.site_actions',\n method: 'POST' as any,\n methodFqn: 'com.wix.site.actions.SiteActionsService.DuplicateSite',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixSiteActionsSiteActionsServiceUrl({\n protoPath: '/v1/sites/duplicate',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __duplicateSite;\n}\n\n/**\n * This endpoint enables you to delete multiple sites.\n *\n * This is not a permanent delete. Sites are moved to the trash bin and can be restored through site collaborators.\n *\n * Learn more about [deleting multiple sites](https://support.wix.com/en/article/moving-a-site-to-trash).\n *\n * > **Important:** This call requires an account level API key.\n */\nexport function bulkDeleteSite(payload: object): RequestOptionsFactory<any> {\n function __bulkDeleteSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_actions.v1.site_actions',\n method: 'POST' as any,\n methodFqn: 'com.wix.site.actions.SiteActionsService.BulkDeleteSite',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixSiteActionsSiteActionsServiceUrl({\n protoPath: '/v1/bulk/sites/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteSite;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkDeleteSiteResponse,\n DeployStandalonePagesApplicationErrors,\n DuplicateSiteOptions,\n DuplicateSiteResponse,\n PublishSiteApplicationErrors,\n bulkDeleteSite as universalBulkDeleteSite,\n deployStandalonePages as universalDeployStandalonePages,\n duplicateSite as universalDuplicateSite,\n publishSite as universalPublishSite,\n} from './site-actions-v1-site-actions-site-actions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/sites' };\n\nexport function publishSite(httpClient: HttpClient): PublishSiteSignature {\n return () =>\n universalPublishSite(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface PublishSiteSignature {\n /**\n * Publishes a site.\n *\n * Publishing a site makes any changes previously saved on the site available on the internet.\n * After publishing, changes to your site appear in the [site's history](https://support.wix.com/en/article/viewing-and-managing-your-site-history).\n *\n * When using an API key for authentication, include a `wix-site-id` header with the ID of the site you want to publish.\n */\n (): Promise<\n void & {\n __applicationErrorsType?: PublishSiteApplicationErrors;\n }\n >;\n}\n\nexport function deployStandalonePages(\n httpClient: HttpClient\n): DeployStandalonePagesSignature {\n return () =>\n universalDeployStandalonePages(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeployStandalonePagesSignature {\n /**\n * Publishes a headless site.\n *\n * Publishing only the headless pages of the site.\n *\n * When using an API key for authentication, include a `wix-site-id` header with the ID of the site you want to publish.\n */\n (): Promise<\n void & {\n __applicationErrorsType?: DeployStandalonePagesApplicationErrors;\n }\n >;\n}\n\nexport function duplicateSite(httpClient: HttpClient): DuplicateSiteSignature {\n return (\n sourceSiteId: string,\n options: NonNullablePaths<DuplicateSiteOptions, `siteDisplayName`, 2>\n ) =>\n universalDuplicateSite(\n sourceSiteId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DuplicateSiteSignature {\n /**\n * Duplicates a site with a new site name.\n *\n * > **Note:** When you duplicate a site, some business-related content such as store orders, contacts, invoices, and 3rd-party app settings are not be included.\n * > The duplicated site won’t have a domain or any Premium capabilities.\n *\n * Any installed apps that can be used only on sites with a Premium Plan, will be copied to the duplicated site and\n * will appear unactivated. Once the site is upgraded, the app will be available for use.\n *\n * > **Important:** This call requires an account level API key.\n * @param - ID of the site to duplicated.\n */\n (\n sourceSiteId: string,\n options: NonNullablePaths<DuplicateSiteOptions, `siteDisplayName`, 2>\n ): Promise<NonNullablePaths<DuplicateSiteResponse, `newSiteId`, 2>>;\n}\n\nexport function bulkDeleteSite(\n httpClient: HttpClient\n): BulkDeleteSiteSignature {\n return (ids: string[]) =>\n universalBulkDeleteSite(\n ids,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkDeleteSiteSignature {\n /**\n * This endpoint enables you to delete multiple sites.\n *\n * This is not a permanent delete. Sites are moved to the trash bin and can be restored through site collaborators.\n *\n * Learn more about [deleting multiple sites](https://support.wix.com/en/article/moving-a-site-to-trash).\n *\n * > **Important:** This call requires an account level API key.\n * @param - Site IDs.\n *\n * Min: 1 site ID <br>\n * Max: 20 site IDs\n */\n (ids: string[]): Promise<\n NonNullablePaths<\n BulkDeleteSiteResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`,\n 6\n >\n >;\n}\n\nexport {\n ApplicationError,\n BulkActionMetadata,\n BulkDeleteSiteRequest,\n BulkDeleteSiteResponse,\n BulkSiteResult,\n DeleteSiteFromTrashRequest,\n DeleteSiteFromTrashResponse,\n DeployStandalonePagesRequest,\n DeployStandalonePagesResponse,\n DuplicateSiteOptions,\n DuplicateSiteRequest,\n DuplicateSiteResponse,\n EmptyEntity,\n ItemMetadata,\n MoveSiteToTrashRequest,\n MoveSiteToTrashResponse,\n PublishSiteRequest,\n PublishSiteResponse,\n RenameSiteRequest,\n RenameSiteResponse,\n RestoreSiteFromTrashRequest,\n RestoreSiteFromTrashResponse,\n UnpublishSiteRequest,\n UnpublishSiteResponse,\n ValidateSiteNameRequest,\n ValidateSiteNameResponse,\n} from './site-actions-v1-site-actions-site-actions.universal.js';\n","import {\n publishSite as publicPublishSite,\n deployStandalonePages as publicDeployStandalonePages,\n duplicateSite as publicDuplicateSite,\n bulkDeleteSite as publicBulkDeleteSite,\n} from './site-actions-v1-site-actions-site-actions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const publishSite: MaybeContext<\n BuildRESTFunction<typeof publicPublishSite> & typeof publicPublishSite\n> = /*#__PURE__*/ createRESTModule(publicPublishSite);\nexport const deployStandalonePages: MaybeContext<\n BuildRESTFunction<typeof publicDeployStandalonePages> &\n typeof publicDeployStandalonePages\n> = /*#__PURE__*/ createRESTModule(publicDeployStandalonePages);\nexport const duplicateSite: MaybeContext<\n BuildRESTFunction<typeof publicDuplicateSite> & typeof publicDuplicateSite\n> = /*#__PURE__*/ createRESTModule(publicDuplicateSite);\nexport const bulkDeleteSite: MaybeContext<\n BuildRESTFunction<typeof publicBulkDeleteSite> & typeof publicBulkDeleteSite\n> = /*#__PURE__*/ createRESTModule(publicBulkDeleteSite);\n\nexport {\n EmptyEntity,\n PublishSiteRequest,\n PublishSiteResponse,\n DeployStandalonePagesRequest,\n DeployStandalonePagesResponse,\n DuplicateSiteRequest,\n DuplicateSiteResponse,\n BulkDeleteSiteRequest,\n BulkDeleteSiteResponse,\n BulkSiteResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n RenameSiteRequest,\n RenameSiteResponse,\n ValidateSiteNameRequest,\n ValidateSiteNameResponse,\n UnpublishSiteRequest,\n UnpublishSiteResponse,\n MoveSiteToTrashRequest,\n MoveSiteToTrashResponse,\n RestoreSiteFromTrashRequest,\n RestoreSiteFromTrashResponse,\n DeleteSiteFromTrashRequest,\n DeleteSiteFromTrashResponse,\n DuplicateSiteOptions,\n} from './site-actions-v1-site-actions-site-actions.universal.js';\nexport {\n PublishSiteApplicationErrors,\n DeployStandalonePagesApplicationErrors,\n} from './site-actions-v1-site-actions-site-actions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA,6BAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,mBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAA2B;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QAC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A,cAAmB;AAC/C,IAAMC,kBAEK,2DAAiBA,eAAoB;","names":["bulkDeleteSite","deployStandalonePages","duplicateSite","publishSite","publishSite","sdkTransformError","deployStandalonePages","duplicateSite","bulkDeleteSite","publishSite","deployStandalonePages","duplicateSite","bulkDeleteSite","import_rest_modules","publishSite","deployStandalonePages","duplicateSite","bulkDeleteSite"]}
@@ -124,6 +124,12 @@ type PublishSiteApplicationErrors = {
124
124
  description?: string;
125
125
  data?: Record<string, any>;
126
126
  };
127
+ /** @docsIgnore */
128
+ type DeployStandalonePagesApplicationErrors = {
129
+ code?: 'SITE_IS_NOT_HEADLESS';
130
+ description?: string;
131
+ data?: Record<string, any>;
132
+ };
127
133
  /**
128
134
  * Publishes a site.
129
135
  *
@@ -138,6 +144,19 @@ type PublishSiteApplicationErrors = {
138
144
  declare function publishSite(): Promise<void & {
139
145
  __applicationErrorsType?: PublishSiteApplicationErrors;
140
146
  }>;
147
+ /**
148
+ * Publishes a headless site.
149
+ *
150
+ * Publishing only the headless pages of the site.
151
+ *
152
+ * When using an API key for authentication, include a `wix-site-id` header with the ID of the site you want to publish.
153
+ * @public
154
+ * @permissionId METASITE.UPDATE
155
+ * @fqn wix.site.v1.SitePublisher.DeployStandalonePages
156
+ */
157
+ declare function deployStandalonePages(): Promise<void & {
158
+ __applicationErrorsType?: DeployStandalonePagesApplicationErrors;
159
+ }>;
141
160
  /**
142
161
  * Duplicates a site with a new site name.
143
162
  *
@@ -184,4 +203,4 @@ interface DuplicateSiteOptions {
184
203
  */
185
204
  declare function bulkDeleteSite(ids: string[]): Promise<NonNullablePaths<BulkDeleteSiteResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures`, 6>>;
186
205
 
187
- export { type ApplicationError, type BulkActionMetadata, type BulkDeleteSiteRequest, type BulkDeleteSiteResponse, type BulkSiteResult, type DeleteSiteFromTrashRequest, type DeleteSiteFromTrashResponse, type DeployStandalonePagesRequest, type DeployStandalonePagesResponse, type DuplicateSiteOptions, type DuplicateSiteRequest, type DuplicateSiteResponse, type EmptyEntity, type ItemMetadata, type MoveSiteToTrashRequest, type MoveSiteToTrashResponse, type PublishSiteApplicationErrors, type PublishSiteRequest, type PublishSiteResponse, type RenameSiteRequest, type RenameSiteResponse, type RestoreSiteFromTrashRequest, type RestoreSiteFromTrashResponse, type UnpublishSiteRequest, type UnpublishSiteResponse, type ValidateSiteNameRequest, type ValidateSiteNameResponse, bulkDeleteSite, duplicateSite, publishSite };
206
+ export { type ApplicationError, type BulkActionMetadata, type BulkDeleteSiteRequest, type BulkDeleteSiteResponse, type BulkSiteResult, type DeleteSiteFromTrashRequest, type DeleteSiteFromTrashResponse, type DeployStandalonePagesApplicationErrors, type DeployStandalonePagesRequest, type DeployStandalonePagesResponse, type DuplicateSiteOptions, type DuplicateSiteRequest, type DuplicateSiteResponse, type EmptyEntity, type ItemMetadata, type MoveSiteToTrashRequest, type MoveSiteToTrashResponse, type PublishSiteApplicationErrors, type PublishSiteRequest, type PublishSiteResponse, type RenameSiteRequest, type RenameSiteResponse, type RestoreSiteFromTrashRequest, type RestoreSiteFromTrashResponse, type UnpublishSiteRequest, type UnpublishSiteResponse, type ValidateSiteNameRequest, type ValidateSiteNameResponse, bulkDeleteSite, deployStandalonePages, duplicateSite, publishSite };
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var index_typings_exports = {};
22
22
  __export(index_typings_exports, {
23
23
  bulkDeleteSite: () => bulkDeleteSite2,
24
+ deployStandalonePages: () => deployStandalonePages2,
24
25
  duplicateSite: () => duplicateSite2,
25
26
  publishSite: () => publishSite2
26
27
  });
@@ -92,6 +93,9 @@ function publishSite(payload) {
92
93
  method: "POST",
93
94
  methodFqn: "wix.site.v1.SitePublisher.PublishSite",
94
95
  packageName: PACKAGE_NAME,
96
+ migrationOptions: {
97
+ optInTransformResponse: true
98
+ },
95
99
  url: resolveWixSiteV1SitePublisherUrl({
96
100
  protoPath: "/v1/site/publish",
97
101
  data: payload,
@@ -103,6 +107,27 @@ function publishSite(payload) {
103
107
  }
104
108
  return __publishSite;
105
109
  }
110
+ function deployStandalonePages(payload) {
111
+ function __deployStandalonePages({ host }) {
112
+ const metadata = {
113
+ entityFqdn: "wix.site_actions.v1.site_actions",
114
+ method: "POST",
115
+ methodFqn: "wix.site.v1.SitePublisher.DeployStandalonePages",
116
+ packageName: PACKAGE_NAME,
117
+ migrationOptions: {
118
+ optInTransformResponse: true
119
+ },
120
+ url: resolveWixSiteV1SitePublisherUrl({
121
+ protoPath: "/v1/site/deploy-standalone-pages",
122
+ data: payload,
123
+ host
124
+ }),
125
+ data: payload
126
+ };
127
+ return metadata;
128
+ }
129
+ return __deployStandalonePages;
130
+ }
106
131
  function duplicateSite(payload) {
107
132
  function __duplicateSite({ host }) {
108
133
  const metadata = {
@@ -110,6 +135,9 @@ function duplicateSite(payload) {
110
135
  method: "POST",
111
136
  methodFqn: "com.wix.site.actions.SiteActionsService.DuplicateSite",
112
137
  packageName: PACKAGE_NAME,
138
+ migrationOptions: {
139
+ optInTransformResponse: true
140
+ },
113
141
  url: resolveComWixSiteActionsSiteActionsServiceUrl({
114
142
  protoPath: "/v1/sites/duplicate",
115
143
  data: payload,
@@ -128,6 +156,9 @@ function bulkDeleteSite(payload) {
128
156
  method: "POST",
129
157
  methodFqn: "com.wix.site.actions.SiteActionsService.BulkDeleteSite",
130
158
  packageName: PACKAGE_NAME,
159
+ migrationOptions: {
160
+ optInTransformResponse: true
161
+ },
131
162
  url: resolveComWixSiteActionsSiteActionsServiceUrl({
132
163
  protoPath: "/v1/bulk/sites/delete",
133
164
  data: payload,
@@ -164,6 +195,29 @@ async function publishSite2() {
164
195
  throw transformedError;
165
196
  }
166
197
  }
198
+ async function deployStandalonePages2() {
199
+ const { httpClient, sideEffects } = arguments[0];
200
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
201
+ const reqOpts = deployStandalonePages(payload);
202
+ sideEffects?.onSiteCall?.();
203
+ try {
204
+ const result = await httpClient.request(reqOpts);
205
+ sideEffects?.onSuccess?.(result);
206
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
207
+ } catch (err) {
208
+ const transformedError = (0, import_transform_error.transformError)(
209
+ err,
210
+ {
211
+ spreadPathsToArguments: {},
212
+ explicitPathsToArguments: {},
213
+ singleArgumentUnchanged: false
214
+ },
215
+ []
216
+ );
217
+ sideEffects?.onError?.(err);
218
+ throw transformedError;
219
+ }
220
+ }
167
221
  async function duplicateSite2(sourceSiteId, options) {
168
222
  const { httpClient, sideEffects } = arguments[2];
169
223
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -219,6 +273,7 @@ async function bulkDeleteSite2(ids) {
219
273
  // Annotate the CommonJS export names for ESM import in node:
220
274
  0 && (module.exports = {
221
275
  bulkDeleteSite,
276
+ deployStandalonePages,
222
277
  duplicateSite,
223
278
  publishSite
224
279
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/site-actions-v1-site-actions-site-actions.universal.ts","../../src/site-actions-v1-site-actions-site-actions.http.ts"],"sourcesContent":["export * from './src/site-actions-v1-site-actions-site-actions.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixSiteActionsV1SiteActions from './site-actions-v1-site-actions-site-actions.http.js';\n\n/**\n * A package is group of instances of Wix services that a reseller offers to a\n * customer as part of a single transaction.\n */\nexport interface EmptyEntity {}\n\nexport interface PublishSiteRequest {}\n\nexport interface PublishSiteResponse {}\n\nexport interface DeployStandalonePagesRequest {}\n\nexport interface DeployStandalonePagesResponse {}\n\nexport interface DuplicateSiteRequest {\n /**\n * ID of the site to duplicated.\n * @format GUID\n */\n sourceSiteId: string;\n /**\n * Display name for the new site.\n * @minLength 1\n * @maxLength 40\n */\n siteDisplayName: string;\n}\n\nexport interface DuplicateSiteResponse {\n /**\n * ID of the new site.\n * @format GUID\n */\n newSiteId?: string;\n}\n\nexport interface BulkDeleteSiteRequest {\n /**\n * Site IDs.\n *\n * Min: 1 site ID <br>\n * Max: 20 site IDs\n * @format GUID\n * @minSize 1\n * @maxSize 20\n */\n ids: string[];\n}\n\nexport interface BulkDeleteSiteResponse {\n /** List of deletion results. */\n results?: BulkSiteResult[];\n /** Summary of deletion data. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkSiteResult {\n /** Result of deletion request per site describing the success or failure of each deletion. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface ItemMetadata {\n /** Site ID. */\n _id?: string | null;\n /** Index of the site in the request array. Allows for correlation between request and response. */\n originalIndex?: number;\n /** Whether the requested action was successful for the site. When `false`, the action failed and an `error` object is populated. */\n success?: boolean;\n /** Details about the error. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of error. */\n description?: string;\n}\n\nexport interface BulkActionMetadata {\n /** Number of sites that were deleted successfully. */\n totalSuccesses?: number;\n /** Number of sites that were not deleted successfully. */\n totalFailures?: number;\n}\n\nexport interface RenameSiteRequest {\n /**\n * @minLength 1\n * @maxLength 40\n */\n siteNewName?: string;\n}\n\nexport interface RenameSiteResponse {}\n\nexport interface ValidateSiteNameRequest {\n /**\n * @minLength 1\n * @maxLength 40\n */\n siteName?: string;\n}\n\nexport interface ValidateSiteNameResponse {\n /** Indicates whether the site name is valid. */\n valid?: boolean;\n}\n\nexport interface UnpublishSiteRequest {}\n\nexport interface UnpublishSiteResponse {}\n\nexport interface MoveSiteToTrashRequest {}\n\nexport interface MoveSiteToTrashResponse {}\n\nexport interface RestoreSiteFromTrashRequest {\n /** @format GUID */\n siteId?: string;\n}\n\nexport interface RestoreSiteFromTrashResponse {}\n\nexport interface DeleteSiteFromTrashRequest {\n /** @format GUID */\n siteId?: string;\n}\n\nexport interface DeleteSiteFromTrashResponse {}\n\n/** @docsIgnore */\nexport type PublishSiteApplicationErrors = {\n code?: 'SITE_IS_NOT_DEFINED_AS_PUBLISHABLE';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Publishes a site.\n *\n * Publishing a site makes any changes previously saved on the site available on the internet.\n * After publishing, changes to your site appear in the [site's history](https://support.wix.com/en/article/viewing-and-managing-your-site-history).\n *\n * When using an API key for authentication, include a `wix-site-id` header with the ID of the site you want to publish.\n * @public\n * @permissionId METASITE.UPDATE\n * @fqn wix.site.v1.SitePublisher.PublishSite\n */\nexport async function publishSite(): Promise<\n void & {\n __applicationErrorsType?: PublishSiteApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts = ambassadorWixSiteActionsV1SiteActions.publishSite(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Duplicates a site with a new site name.\n *\n * > **Note:** When you duplicate a site, some business-related content such as store orders, contacts, invoices, and 3rd-party app settings are not be included.\n * > The duplicated site won’t have a domain or any Premium capabilities.\n *\n * Any installed apps that can be used only on sites with a Premium Plan, will be copied to the duplicated site and\n * will appear unactivated. Once the site is upgraded, the app will be available for use.\n *\n * > **Important:** This call requires an account level API key.\n * @param sourceSiteId - ID of the site to duplicated.\n * @public\n * @requiredField options\n * @requiredField options.siteDisplayName\n * @requiredField sourceSiteId\n * @permissionId my-account.duplicate-site\n * @fqn com.wix.site.actions.SiteActionsService.DuplicateSite\n */\nexport async function duplicateSite(\n sourceSiteId: string,\n options: NonNullablePaths<DuplicateSiteOptions, `siteDisplayName`, 2>\n): Promise<NonNullablePaths<DuplicateSiteResponse, `newSiteId`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n sourceSiteId: sourceSiteId,\n siteDisplayName: options?.siteDisplayName,\n });\n\n const reqOpts = ambassadorWixSiteActionsV1SiteActions.duplicateSite(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n sourceSiteId: '$[0]',\n siteDisplayName: '$[1].siteDisplayName',\n },\n singleArgumentUnchanged: false,\n },\n ['sourceSiteId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DuplicateSiteOptions {\n /**\n * Display name for the new site.\n * @minLength 1\n * @maxLength 40\n */\n siteDisplayName: string;\n}\n\n/**\n * This endpoint enables you to delete multiple sites.\n *\n * This is not a permanent delete. Sites are moved to the trash bin and can be restored through site collaborators.\n *\n * Learn more about [deleting multiple sites](https://support.wix.com/en/article/moving-a-site-to-trash).\n *\n * > **Important:** This call requires an account level API key.\n * @param ids - Site IDs.\n *\n * Min: 1 site ID <br>\n * Max: 20 site IDs\n * @public\n * @requiredField ids\n * @permissionId my-account.delete-site\n * @fqn com.wix.site.actions.SiteActionsService.BulkDeleteSite\n */\nexport async function bulkDeleteSite(\n ids: string[]\n): Promise<\n NonNullablePaths<\n BulkDeleteSiteResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ ids: ids });\n\n const reqOpts = ambassadorWixSiteActionsV1SiteActions.bulkDeleteSite(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { ids: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['ids']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixSiteActionsSiteActionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/site-actions',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/site-actions',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/site-actions',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixSiteV1SitePublisherUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/site-publisher',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/site-publisher',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/site-publisher',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/site-publisher',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_sites_site-actions';\n\n/**\n * Publishes a site.\n *\n * Publishing a site makes any changes previously saved on the site available on the internet.\n * After publishing, changes to your site appear in the [site's history](https://support.wix.com/en/article/viewing-and-managing-your-site-history).\n *\n * When using an API key for authentication, include a `wix-site-id` header with the ID of the site you want to publish.\n */\nexport function publishSite(payload: object): RequestOptionsFactory<any> {\n function __publishSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_actions.v1.site_actions',\n method: 'POST' as any,\n methodFqn: 'wix.site.v1.SitePublisher.PublishSite',\n packageName: PACKAGE_NAME,\n url: resolveWixSiteV1SitePublisherUrl({\n protoPath: '/v1/site/publish',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __publishSite;\n}\n\n/**\n * Duplicates a site with a new site name.\n *\n * > **Note:** When you duplicate a site, some business-related content such as store orders, contacts, invoices, and 3rd-party app settings are not be included.\n * > The duplicated site won’t have a domain or any Premium capabilities.\n *\n * Any installed apps that can be used only on sites with a Premium Plan, will be copied to the duplicated site and\n * will appear unactivated. Once the site is upgraded, the app will be available for use.\n *\n * > **Important:** This call requires an account level API key.\n */\nexport function duplicateSite(payload: object): RequestOptionsFactory<any> {\n function __duplicateSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_actions.v1.site_actions',\n method: 'POST' as any,\n methodFqn: 'com.wix.site.actions.SiteActionsService.DuplicateSite',\n packageName: PACKAGE_NAME,\n url: resolveComWixSiteActionsSiteActionsServiceUrl({\n protoPath: '/v1/sites/duplicate',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __duplicateSite;\n}\n\n/**\n * This endpoint enables you to delete multiple sites.\n *\n * This is not a permanent delete. Sites are moved to the trash bin and can be restored through site collaborators.\n *\n * Learn more about [deleting multiple sites](https://support.wix.com/en/article/moving-a-site-to-trash).\n *\n * > **Important:** This call requires an account level API key.\n */\nexport function bulkDeleteSite(payload: object): RequestOptionsFactory<any> {\n function __bulkDeleteSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_actions.v1.site_actions',\n method: 'POST' as any,\n methodFqn: 'com.wix.site.actions.SiteActionsService.BulkDeleteSite',\n packageName: PACKAGE_NAME,\n url: resolveComWixSiteActionsSiteActionsServiceUrl({\n protoPath: '/v1/bulk/sites/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteSite;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA,qBAAAC;AAAA,EAAA,mBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAA2B;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,gCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,SAAS,iCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;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AAC;AAK/C,QAAM,cAAU,qEAAsC,EAAE,IAAS,CAAC;AAElE,QAAM,UAAgD,eAAe,OAAO;AAE5E,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAF;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,KAAK,OAAO;AAAA,QACxC,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,KAAK;AAAA,IACR;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["bulkDeleteSite","duplicateSite","publishSite","publishSite","sdkTransformError","duplicateSite","bulkDeleteSite"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/site-actions-v1-site-actions-site-actions.universal.ts","../../src/site-actions-v1-site-actions-site-actions.http.ts"],"sourcesContent":["export * from './src/site-actions-v1-site-actions-site-actions.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixSiteActionsV1SiteActions from './site-actions-v1-site-actions-site-actions.http.js';\n\n/**\n * A package is group of instances of Wix services that a reseller offers to a\n * customer as part of a single transaction.\n */\nexport interface EmptyEntity {}\n\nexport interface PublishSiteRequest {}\n\nexport interface PublishSiteResponse {}\n\nexport interface DeployStandalonePagesRequest {}\n\nexport interface DeployStandalonePagesResponse {}\n\nexport interface DuplicateSiteRequest {\n /**\n * ID of the site to duplicated.\n * @format GUID\n */\n sourceSiteId: string;\n /**\n * Display name for the new site.\n * @minLength 1\n * @maxLength 40\n */\n siteDisplayName: string;\n}\n\nexport interface DuplicateSiteResponse {\n /**\n * ID of the new site.\n * @format GUID\n */\n newSiteId?: string;\n}\n\nexport interface BulkDeleteSiteRequest {\n /**\n * Site IDs.\n *\n * Min: 1 site ID <br>\n * Max: 20 site IDs\n * @format GUID\n * @minSize 1\n * @maxSize 20\n */\n ids: string[];\n}\n\nexport interface BulkDeleteSiteResponse {\n /** List of deletion results. */\n results?: BulkSiteResult[];\n /** Summary of deletion data. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkSiteResult {\n /** Result of deletion request per site describing the success or failure of each deletion. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface ItemMetadata {\n /** Site ID. */\n _id?: string | null;\n /** Index of the site in the request array. Allows for correlation between request and response. */\n originalIndex?: number;\n /** Whether the requested action was successful for the site. When `false`, the action failed and an `error` object is populated. */\n success?: boolean;\n /** Details about the error. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of error. */\n description?: string;\n}\n\nexport interface BulkActionMetadata {\n /** Number of sites that were deleted successfully. */\n totalSuccesses?: number;\n /** Number of sites that were not deleted successfully. */\n totalFailures?: number;\n}\n\nexport interface RenameSiteRequest {\n /**\n * @minLength 1\n * @maxLength 40\n */\n siteNewName?: string;\n}\n\nexport interface RenameSiteResponse {}\n\nexport interface ValidateSiteNameRequest {\n /**\n * @minLength 1\n * @maxLength 40\n */\n siteName?: string;\n}\n\nexport interface ValidateSiteNameResponse {\n /** Indicates whether the site name is valid. */\n valid?: boolean;\n}\n\nexport interface UnpublishSiteRequest {}\n\nexport interface UnpublishSiteResponse {}\n\nexport interface MoveSiteToTrashRequest {}\n\nexport interface MoveSiteToTrashResponse {}\n\nexport interface RestoreSiteFromTrashRequest {\n /** @format GUID */\n siteId?: string;\n}\n\nexport interface RestoreSiteFromTrashResponse {}\n\nexport interface DeleteSiteFromTrashRequest {\n /** @format GUID */\n siteId?: string;\n}\n\nexport interface DeleteSiteFromTrashResponse {}\n\n/** @docsIgnore */\nexport type PublishSiteApplicationErrors = {\n code?: 'SITE_IS_NOT_DEFINED_AS_PUBLISHABLE';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type DeployStandalonePagesApplicationErrors = {\n code?: 'SITE_IS_NOT_HEADLESS';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Publishes a site.\n *\n * Publishing a site makes any changes previously saved on the site available on the internet.\n * After publishing, changes to your site appear in the [site's history](https://support.wix.com/en/article/viewing-and-managing-your-site-history).\n *\n * When using an API key for authentication, include a `wix-site-id` header with the ID of the site you want to publish.\n * @public\n * @permissionId METASITE.UPDATE\n * @fqn wix.site.v1.SitePublisher.PublishSite\n */\nexport async function publishSite(): Promise<\n void & {\n __applicationErrorsType?: PublishSiteApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts = ambassadorWixSiteActionsV1SiteActions.publishSite(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Publishes a headless site.\n *\n * Publishing only the headless pages of the site.\n *\n * When using an API key for authentication, include a `wix-site-id` header with the ID of the site you want to publish.\n * @public\n * @permissionId METASITE.UPDATE\n * @fqn wix.site.v1.SitePublisher.DeployStandalonePages\n */\nexport async function deployStandalonePages(): Promise<\n void & {\n __applicationErrorsType?: DeployStandalonePagesApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixSiteActionsV1SiteActions.deployStandalonePages(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Duplicates a site with a new site name.\n *\n * > **Note:** When you duplicate a site, some business-related content such as store orders, contacts, invoices, and 3rd-party app settings are not be included.\n * > The duplicated site won’t have a domain or any Premium capabilities.\n *\n * Any installed apps that can be used only on sites with a Premium Plan, will be copied to the duplicated site and\n * will appear unactivated. Once the site is upgraded, the app will be available for use.\n *\n * > **Important:** This call requires an account level API key.\n * @param sourceSiteId - ID of the site to duplicated.\n * @public\n * @requiredField options\n * @requiredField options.siteDisplayName\n * @requiredField sourceSiteId\n * @permissionId my-account.duplicate-site\n * @fqn com.wix.site.actions.SiteActionsService.DuplicateSite\n */\nexport async function duplicateSite(\n sourceSiteId: string,\n options: NonNullablePaths<DuplicateSiteOptions, `siteDisplayName`, 2>\n): Promise<NonNullablePaths<DuplicateSiteResponse, `newSiteId`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n sourceSiteId: sourceSiteId,\n siteDisplayName: options?.siteDisplayName,\n });\n\n const reqOpts = ambassadorWixSiteActionsV1SiteActions.duplicateSite(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n sourceSiteId: '$[0]',\n siteDisplayName: '$[1].siteDisplayName',\n },\n singleArgumentUnchanged: false,\n },\n ['sourceSiteId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DuplicateSiteOptions {\n /**\n * Display name for the new site.\n * @minLength 1\n * @maxLength 40\n */\n siteDisplayName: string;\n}\n\n/**\n * This endpoint enables you to delete multiple sites.\n *\n * This is not a permanent delete. Sites are moved to the trash bin and can be restored through site collaborators.\n *\n * Learn more about [deleting multiple sites](https://support.wix.com/en/article/moving-a-site-to-trash).\n *\n * > **Important:** This call requires an account level API key.\n * @param ids - Site IDs.\n *\n * Min: 1 site ID <br>\n * Max: 20 site IDs\n * @public\n * @requiredField ids\n * @permissionId my-account.delete-site\n * @fqn com.wix.site.actions.SiteActionsService.BulkDeleteSite\n */\nexport async function bulkDeleteSite(\n ids: string[]\n): Promise<\n NonNullablePaths<\n BulkDeleteSiteResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ ids: ids });\n\n const reqOpts = ambassadorWixSiteActionsV1SiteActions.bulkDeleteSite(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { ids: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['ids']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixSiteActionsSiteActionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/site-actions',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/site-actions',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/site-actions',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixSiteV1SitePublisherUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/site-publisher',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/site-publisher',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/site-publisher',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/site-publisher',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_sites_site-actions';\n\n/**\n * Publishes a site.\n *\n * Publishing a site makes any changes previously saved on the site available on the internet.\n * After publishing, changes to your site appear in the [site's history](https://support.wix.com/en/article/viewing-and-managing-your-site-history).\n *\n * When using an API key for authentication, include a `wix-site-id` header with the ID of the site you want to publish.\n */\nexport function publishSite(payload: object): RequestOptionsFactory<any> {\n function __publishSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_actions.v1.site_actions',\n method: 'POST' as any,\n methodFqn: 'wix.site.v1.SitePublisher.PublishSite',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSiteV1SitePublisherUrl({\n protoPath: '/v1/site/publish',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __publishSite;\n}\n\n/**\n * Publishes a headless site.\n *\n * Publishing only the headless pages of the site.\n *\n * When using an API key for authentication, include a `wix-site-id` header with the ID of the site you want to publish.\n */\nexport function deployStandalonePages(\n payload: object\n): RequestOptionsFactory<any> {\n function __deployStandalonePages({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_actions.v1.site_actions',\n method: 'POST' as any,\n methodFqn: 'wix.site.v1.SitePublisher.DeployStandalonePages',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixSiteV1SitePublisherUrl({\n protoPath: '/v1/site/deploy-standalone-pages',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __deployStandalonePages;\n}\n\n/**\n * Duplicates a site with a new site name.\n *\n * > **Note:** When you duplicate a site, some business-related content such as store orders, contacts, invoices, and 3rd-party app settings are not be included.\n * > The duplicated site won’t have a domain or any Premium capabilities.\n *\n * Any installed apps that can be used only on sites with a Premium Plan, will be copied to the duplicated site and\n * will appear unactivated. Once the site is upgraded, the app will be available for use.\n *\n * > **Important:** This call requires an account level API key.\n */\nexport function duplicateSite(payload: object): RequestOptionsFactory<any> {\n function __duplicateSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_actions.v1.site_actions',\n method: 'POST' as any,\n methodFqn: 'com.wix.site.actions.SiteActionsService.DuplicateSite',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixSiteActionsSiteActionsServiceUrl({\n protoPath: '/v1/sites/duplicate',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __duplicateSite;\n}\n\n/**\n * This endpoint enables you to delete multiple sites.\n *\n * This is not a permanent delete. Sites are moved to the trash bin and can be restored through site collaborators.\n *\n * Learn more about [deleting multiple sites](https://support.wix.com/en/article/moving-a-site-to-trash).\n *\n * > **Important:** This call requires an account level API key.\n */\nexport function bulkDeleteSite(payload: object): RequestOptionsFactory<any> {\n function __bulkDeleteSite({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_actions.v1.site_actions',\n method: 'POST' as any,\n methodFqn: 'com.wix.site.actions.SiteActionsService.BulkDeleteSite',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixSiteActionsSiteActionsServiceUrl({\n protoPath: '/v1/bulk/sites/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteSite;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA,6BAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,mBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAA2B;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,gCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,SAAS,iCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAA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B;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,KAAK,OAAO;AAAA,QACxC,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,KAAK;AAAA,IACR;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["bulkDeleteSite","deployStandalonePages","duplicateSite","publishSite","publishSite","sdkTransformError","deployStandalonePages","duplicateSite","bulkDeleteSite"]}
@@ -1,10 +1,20 @@
1
- import { PublishSiteRequest as PublishSiteRequest$1, PublishSiteResponse as PublishSiteResponse$1, DuplicateSiteRequest as DuplicateSiteRequest$1, DuplicateSiteResponse as DuplicateSiteResponse$1, BulkDeleteSiteRequest as BulkDeleteSiteRequest$1, BulkDeleteSiteResponse as BulkDeleteSiteResponse$1 } from './index.typings.js';
1
+ import { PublishSiteRequest as PublishSiteRequest$1, PublishSiteResponse as PublishSiteResponse$1, DeployStandalonePagesRequest as DeployStandalonePagesRequest$1, DeployStandalonePagesResponse as DeployStandalonePagesResponse$1, DuplicateSiteRequest as DuplicateSiteRequest$1, DuplicateSiteResponse as DuplicateSiteResponse$1, BulkDeleteSiteRequest as BulkDeleteSiteRequest$1, BulkDeleteSiteResponse as BulkDeleteSiteResponse$1 } from './index.typings.js';
2
2
  import '@wix/sdk-types';
3
3
 
4
+ /**
5
+ * A package is group of instances of Wix services that a reseller offers to a
6
+ * customer as part of a single transaction.
7
+ */
8
+ interface EmptyEntity {
9
+ }
4
10
  interface PublishSiteRequest {
5
11
  }
6
12
  interface PublishSiteResponse {
7
13
  }
14
+ interface DeployStandalonePagesRequest {
15
+ }
16
+ interface DeployStandalonePagesResponse {
17
+ }
8
18
  interface DuplicateSiteRequest {
9
19
  /**
10
20
  * ID of the site to duplicated.
@@ -69,6 +79,58 @@ interface BulkActionMetadata {
69
79
  /** Number of sites that were not deleted successfully. */
70
80
  totalFailures?: number;
71
81
  }
82
+ interface RenameSiteRequest {
83
+ /**
84
+ * @minLength 1
85
+ * @maxLength 40
86
+ */
87
+ siteNewName?: string;
88
+ }
89
+ interface RenameSiteResponse {
90
+ }
91
+ interface ValidateSiteNameRequest {
92
+ /**
93
+ * @minLength 1
94
+ * @maxLength 40
95
+ */
96
+ siteName?: string;
97
+ }
98
+ interface ValidateSiteNameResponse {
99
+ /** Indicates whether the site name is valid. */
100
+ valid?: boolean;
101
+ }
102
+ interface UnpublishSiteRequest {
103
+ }
104
+ interface UnpublishSiteResponse {
105
+ }
106
+ interface MoveSiteToTrashRequest {
107
+ }
108
+ interface MoveSiteToTrashResponse {
109
+ }
110
+ interface RestoreSiteFromTrashRequest {
111
+ /** @format GUID */
112
+ siteId?: string;
113
+ }
114
+ interface RestoreSiteFromTrashResponse {
115
+ }
116
+ interface DeleteSiteFromTrashRequest {
117
+ /** @format GUID */
118
+ siteId?: string;
119
+ }
120
+ interface DeleteSiteFromTrashResponse {
121
+ }
122
+ /** @docsIgnore */
123
+ type PublishSiteApplicationErrors = {
124
+ code?: 'SITE_IS_NOT_DEFINED_AS_PUBLISHABLE';
125
+ description?: string;
126
+ data?: Record<string, any>;
127
+ };
128
+ /** @docsIgnore */
129
+ type DeployStandalonePagesApplicationErrors = {
130
+ code?: 'SITE_IS_NOT_HEADLESS';
131
+ description?: string;
132
+ data?: Record<string, any>;
133
+ };
72
134
 
73
135
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
74
136
  getUrl: (context: any) => string;
@@ -81,7 +143,8 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
81
143
  __originalResponseType: R;
82
144
  };
83
145
  declare function publishSite(): __PublicMethodMetaInfo<'POST', {}, PublishSiteRequest$1, PublishSiteRequest, PublishSiteResponse$1, PublishSiteResponse>;
146
+ declare function deployStandalonePages(): __PublicMethodMetaInfo<'POST', {}, DeployStandalonePagesRequest$1, DeployStandalonePagesRequest, DeployStandalonePagesResponse$1, DeployStandalonePagesResponse>;
84
147
  declare function duplicateSite(): __PublicMethodMetaInfo<'POST', {}, DuplicateSiteRequest$1, DuplicateSiteRequest, DuplicateSiteResponse$1, DuplicateSiteResponse>;
85
148
  declare function bulkDeleteSite(): __PublicMethodMetaInfo<'POST', {}, BulkDeleteSiteRequest$1, BulkDeleteSiteRequest, BulkDeleteSiteResponse$1, BulkDeleteSiteResponse>;
86
149
 
87
- export { type __PublicMethodMetaInfo, bulkDeleteSite, duplicateSite, publishSite };
150
+ export { type ApplicationError as ApplicationErrorOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkDeleteSiteRequest as BulkDeleteSiteRequestOriginal, type BulkDeleteSiteResponse as BulkDeleteSiteResponseOriginal, type BulkSiteResult as BulkSiteResultOriginal, type DeleteSiteFromTrashRequest as DeleteSiteFromTrashRequestOriginal, type DeleteSiteFromTrashResponse as DeleteSiteFromTrashResponseOriginal, type DeployStandalonePagesApplicationErrors as DeployStandalonePagesApplicationErrorsOriginal, type DeployStandalonePagesRequest as DeployStandalonePagesRequestOriginal, type DeployStandalonePagesResponse as DeployStandalonePagesResponseOriginal, type DuplicateSiteRequest as DuplicateSiteRequestOriginal, type DuplicateSiteResponse as DuplicateSiteResponseOriginal, type EmptyEntity as EmptyEntityOriginal, type ItemMetadata as ItemMetadataOriginal, type MoveSiteToTrashRequest as MoveSiteToTrashRequestOriginal, type MoveSiteToTrashResponse as MoveSiteToTrashResponseOriginal, type PublishSiteApplicationErrors as PublishSiteApplicationErrorsOriginal, type PublishSiteRequest as PublishSiteRequestOriginal, type PublishSiteResponse as PublishSiteResponseOriginal, type RenameSiteRequest as RenameSiteRequestOriginal, type RenameSiteResponse as RenameSiteResponseOriginal, type RestoreSiteFromTrashRequest as RestoreSiteFromTrashRequestOriginal, type RestoreSiteFromTrashResponse as RestoreSiteFromTrashResponseOriginal, type UnpublishSiteRequest as UnpublishSiteRequestOriginal, type UnpublishSiteResponse as UnpublishSiteResponseOriginal, type ValidateSiteNameRequest as ValidateSiteNameRequestOriginal, type ValidateSiteNameResponse as ValidateSiteNameResponseOriginal, type __PublicMethodMetaInfo, bulkDeleteSite, deployStandalonePages, duplicateSite, publishSite };