@wix/auto_sdk_sites_site-actions 1.0.0
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.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/site-actions-v1-site-actions-site-actions.context.d.ts +6 -0
- package/build/cjs/src/site-actions-v1-site-actions-site-actions.context.js +9 -0
- package/build/cjs/src/site-actions-v1-site-actions-site-actions.context.js.map +1 -0
- package/build/cjs/src/site-actions-v1-site-actions-site-actions.http.d.ts +35 -0
- package/build/cjs/src/site-actions-v1-site-actions-site-actions.http.js +140 -0
- package/build/cjs/src/site-actions-v1-site-actions-site-actions.http.js.map +1 -0
- package/build/cjs/src/site-actions-v1-site-actions-site-actions.meta.d.ts +15 -0
- package/build/cjs/src/site-actions-v1-site-actions-site-actions.meta.js +85 -0
- package/build/cjs/src/site-actions-v1-site-actions-site-actions.meta.js.map +1 -0
- package/build/cjs/src/site-actions-v1-site-actions-site-actions.public.d.ts +54 -0
- package/build/cjs/src/site-actions-v1-site-actions-site-actions.public.js +24 -0
- package/build/cjs/src/site-actions-v1-site-actions-site-actions.public.js.map +1 -0
- package/build/cjs/src/site-actions-v1-site-actions-site-actions.types.d.ts +102 -0
- package/build/cjs/src/site-actions-v1-site-actions-site-actions.types.js +3 -0
- package/build/cjs/src/site-actions-v1-site-actions-site-actions.types.js.map +1 -0
- package/build/cjs/src/site-actions-v1-site-actions-site-actions.universal.d.ts +164 -0
- package/build/cjs/src/site-actions-v1-site-actions-site-actions.universal.js +152 -0
- package/build/cjs/src/site-actions-v1-site-actions-site-actions.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/site-actions-v1-site-actions-site-actions.context.d.ts +6 -0
- package/build/es/src/site-actions-v1-site-actions-site-actions.context.js +6 -0
- package/build/es/src/site-actions-v1-site-actions-site-actions.context.js.map +1 -0
- package/build/es/src/site-actions-v1-site-actions-site-actions.http.d.ts +35 -0
- package/build/es/src/site-actions-v1-site-actions-site-actions.http.js +134 -0
- package/build/es/src/site-actions-v1-site-actions-site-actions.http.js.map +1 -0
- package/build/es/src/site-actions-v1-site-actions-site-actions.meta.d.ts +15 -0
- package/build/es/src/site-actions-v1-site-actions-site-actions.meta.js +56 -0
- package/build/es/src/site-actions-v1-site-actions-site-actions.meta.js.map +1 -0
- package/build/es/src/site-actions-v1-site-actions-site-actions.public.d.ts +54 -0
- package/build/es/src/site-actions-v1-site-actions-site-actions.public.js +18 -0
- package/build/es/src/site-actions-v1-site-actions-site-actions.public.js.map +1 -0
- package/build/es/src/site-actions-v1-site-actions-site-actions.types.d.ts +102 -0
- package/build/es/src/site-actions-v1-site-actions-site-actions.types.js +2 -0
- package/build/es/src/site-actions-v1-site-actions-site-actions.types.js.map +1 -0
- package/build/es/src/site-actions-v1-site-actions-site-actions.universal.d.ts +164 -0
- package/build/es/src/site-actions-v1-site-actions-site-actions.universal.js +123 -0
- package/build/es/src/site-actions-v1-site-actions-site-actions.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/site-actions-v1-site-actions-site-actions.context.d.ts +6 -0
- package/build/internal/cjs/src/site-actions-v1-site-actions-site-actions.context.js +9 -0
- package/build/internal/cjs/src/site-actions-v1-site-actions-site-actions.context.js.map +1 -0
- package/build/internal/cjs/src/site-actions-v1-site-actions-site-actions.http.d.ts +35 -0
- package/build/internal/cjs/src/site-actions-v1-site-actions-site-actions.http.js +140 -0
- package/build/internal/cjs/src/site-actions-v1-site-actions-site-actions.http.js.map +1 -0
- package/build/internal/cjs/src/site-actions-v1-site-actions-site-actions.meta.d.ts +15 -0
- package/build/internal/cjs/src/site-actions-v1-site-actions-site-actions.meta.js +85 -0
- package/build/internal/cjs/src/site-actions-v1-site-actions-site-actions.meta.js.map +1 -0
- package/build/internal/cjs/src/site-actions-v1-site-actions-site-actions.public.d.ts +54 -0
- package/build/internal/cjs/src/site-actions-v1-site-actions-site-actions.public.js +24 -0
- package/build/internal/cjs/src/site-actions-v1-site-actions-site-actions.public.js.map +1 -0
- package/build/internal/cjs/src/site-actions-v1-site-actions-site-actions.types.d.ts +102 -0
- package/build/internal/cjs/src/site-actions-v1-site-actions-site-actions.types.js +3 -0
- package/build/internal/cjs/src/site-actions-v1-site-actions-site-actions.types.js.map +1 -0
- package/build/internal/cjs/src/site-actions-v1-site-actions-site-actions.universal.d.ts +164 -0
- package/build/internal/cjs/src/site-actions-v1-site-actions-site-actions.universal.js +152 -0
- package/build/internal/cjs/src/site-actions-v1-site-actions-site-actions.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/site-actions-v1-site-actions-site-actions.context.d.ts +6 -0
- package/build/internal/es/src/site-actions-v1-site-actions-site-actions.context.js +6 -0
- package/build/internal/es/src/site-actions-v1-site-actions-site-actions.context.js.map +1 -0
- package/build/internal/es/src/site-actions-v1-site-actions-site-actions.http.d.ts +35 -0
- package/build/internal/es/src/site-actions-v1-site-actions-site-actions.http.js +134 -0
- package/build/internal/es/src/site-actions-v1-site-actions-site-actions.http.js.map +1 -0
- package/build/internal/es/src/site-actions-v1-site-actions-site-actions.meta.d.ts +15 -0
- package/build/internal/es/src/site-actions-v1-site-actions-site-actions.meta.js +56 -0
- package/build/internal/es/src/site-actions-v1-site-actions-site-actions.meta.js.map +1 -0
- package/build/internal/es/src/site-actions-v1-site-actions-site-actions.public.d.ts +54 -0
- package/build/internal/es/src/site-actions-v1-site-actions-site-actions.public.js +18 -0
- package/build/internal/es/src/site-actions-v1-site-actions-site-actions.public.js.map +1 -0
- package/build/internal/es/src/site-actions-v1-site-actions-site-actions.types.d.ts +102 -0
- package/build/internal/es/src/site-actions-v1-site-actions-site-actions.types.js +2 -0
- package/build/internal/es/src/site-actions-v1-site-actions-site-actions.types.js.map +1 -0
- package/build/internal/es/src/site-actions-v1-site-actions-site-actions.universal.d.ts +164 -0
- package/build/internal/es/src/site-actions-v1-site-actions-site-actions.universal.js +123 -0
- package/build/internal/es/src/site-actions-v1-site-actions-site-actions.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site-actions-v1-site-actions-site-actions.types.js","sourceRoot":"","sources":["../../../../src/site-actions-v1-site-actions-site-actions.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A package is group of instances of Wix services that a reseller offers to a
|
|
3
|
+
* customer as part of a single transaction.
|
|
4
|
+
*/
|
|
5
|
+
export interface EmptyEntity {
|
|
6
|
+
}
|
|
7
|
+
export interface PublishSiteRequest {
|
|
8
|
+
}
|
|
9
|
+
export interface PublishSiteResponse {
|
|
10
|
+
}
|
|
11
|
+
export interface DeployStandalonePagesRequest {
|
|
12
|
+
}
|
|
13
|
+
export interface DeployStandalonePagesResponse {
|
|
14
|
+
}
|
|
15
|
+
export interface DuplicateSiteRequest {
|
|
16
|
+
/**
|
|
17
|
+
* ID of the site to duplicated.
|
|
18
|
+
* @format GUID
|
|
19
|
+
*/
|
|
20
|
+
sourceSiteId: string;
|
|
21
|
+
/**
|
|
22
|
+
* Display name for the new site.
|
|
23
|
+
* @minLength 1
|
|
24
|
+
* @maxLength 40
|
|
25
|
+
*/
|
|
26
|
+
siteDisplayName: string;
|
|
27
|
+
}
|
|
28
|
+
export interface DuplicateSiteResponse {
|
|
29
|
+
/**
|
|
30
|
+
* ID of the new site.
|
|
31
|
+
* @format GUID
|
|
32
|
+
*/
|
|
33
|
+
newSiteId?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface BulkDeleteSiteRequest {
|
|
36
|
+
/**
|
|
37
|
+
* Site IDs.
|
|
38
|
+
*
|
|
39
|
+
* Min: 1 site ID <br>
|
|
40
|
+
* Max: 20 site IDs
|
|
41
|
+
* @format GUID
|
|
42
|
+
* @minSize 1
|
|
43
|
+
* @maxSize 20
|
|
44
|
+
*/
|
|
45
|
+
ids: string[];
|
|
46
|
+
}
|
|
47
|
+
export interface BulkDeleteSiteResponse {
|
|
48
|
+
/** List of deletion results. */
|
|
49
|
+
results?: BulkSiteResult[];
|
|
50
|
+
/** Summary of deletion data. */
|
|
51
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
52
|
+
}
|
|
53
|
+
export interface BulkSiteResult {
|
|
54
|
+
/** Result of deletion request per site describing the success or failure of each deletion. */
|
|
55
|
+
itemMetadata?: ItemMetadata;
|
|
56
|
+
}
|
|
57
|
+
export interface ItemMetadata {
|
|
58
|
+
/** Site ID. */
|
|
59
|
+
_id?: string | null;
|
|
60
|
+
/** Index of the site in the request array. Allows for correlation between request and response. */
|
|
61
|
+
originalIndex?: number;
|
|
62
|
+
/** Whether the requested action was successful for the site. When `false`, the action failed and an `error` object is populated. */
|
|
63
|
+
success?: boolean;
|
|
64
|
+
/** Details about the error. */
|
|
65
|
+
error?: ApplicationError;
|
|
66
|
+
}
|
|
67
|
+
export interface ApplicationError {
|
|
68
|
+
/** Error code. */
|
|
69
|
+
code?: string;
|
|
70
|
+
/** Description of error. */
|
|
71
|
+
description?: string;
|
|
72
|
+
}
|
|
73
|
+
export interface BulkActionMetadata {
|
|
74
|
+
/** Number of sites that were deleted successfully. */
|
|
75
|
+
totalSuccesses?: number;
|
|
76
|
+
/** Number of sites that were not deleted successfully. */
|
|
77
|
+
totalFailures?: number;
|
|
78
|
+
}
|
|
79
|
+
export interface DuplicateSiteResponseNonNullableFields {
|
|
80
|
+
newSiteId: string;
|
|
81
|
+
}
|
|
82
|
+
interface ApplicationErrorNonNullableFields {
|
|
83
|
+
code: string;
|
|
84
|
+
description: string;
|
|
85
|
+
}
|
|
86
|
+
interface ItemMetadataNonNullableFields {
|
|
87
|
+
originalIndex: number;
|
|
88
|
+
success: boolean;
|
|
89
|
+
error?: ApplicationErrorNonNullableFields;
|
|
90
|
+
}
|
|
91
|
+
interface BulkSiteResultNonNullableFields {
|
|
92
|
+
itemMetadata?: ItemMetadataNonNullableFields;
|
|
93
|
+
}
|
|
94
|
+
interface BulkActionMetadataNonNullableFields {
|
|
95
|
+
totalSuccesses: number;
|
|
96
|
+
totalFailures: number;
|
|
97
|
+
}
|
|
98
|
+
export interface BulkDeleteSiteResponseNonNullableFields {
|
|
99
|
+
results: BulkSiteResultNonNullableFields[];
|
|
100
|
+
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Publishes a site.
|
|
104
|
+
*
|
|
105
|
+
* Publishing a site makes any changes previously saved on the site available on the internet.
|
|
106
|
+
* After publishing, changes to your site appear in the [site's history](https://support.wix.com/en/article/viewing-and-managing-your-site-history).
|
|
107
|
+
*
|
|
108
|
+
* When you call this API, you must pass a header called `wix-site-id` whose value is the ID of the site you want to publish. Learn more about
|
|
109
|
+
* working with [API keys and site IDs](https://dev.wix.com/docs/rest/articles/getting-started/api-keys#create-and-use-api-keys).
|
|
110
|
+
*
|
|
111
|
+
* >**Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.
|
|
112
|
+
* @public
|
|
113
|
+
* @permissionId METASITE.UPDATE
|
|
114
|
+
* @fqn wix.site.v1.SitePublisher.PublishSite
|
|
115
|
+
*/
|
|
116
|
+
export declare function publishSite(): Promise<void>;
|
|
117
|
+
/**
|
|
118
|
+
* Duplicates a site with a new site name.
|
|
119
|
+
*
|
|
120
|
+
* > **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.
|
|
121
|
+
* > The duplicated site won’t have a domain or any Premium capabilities.
|
|
122
|
+
*
|
|
123
|
+
* Any installed apps that can be used only on sites with a Premium Plan, will be copied to the duplicated site and
|
|
124
|
+
* will appear unactivated. Once the site is upgraded, the app will be available for use.
|
|
125
|
+
*
|
|
126
|
+
* > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.
|
|
127
|
+
* @param sourceSiteId - ID of the site to duplicated.
|
|
128
|
+
* @public
|
|
129
|
+
* @documentationMaturity preview
|
|
130
|
+
* @requiredField options
|
|
131
|
+
* @requiredField options.siteDisplayName
|
|
132
|
+
* @requiredField sourceSiteId
|
|
133
|
+
* @permissionId my-account.duplicate-site
|
|
134
|
+
* @fqn com.wix.site.actions.SiteActionsService.DuplicateSite
|
|
135
|
+
*/
|
|
136
|
+
export declare function duplicateSite(sourceSiteId: string, options: DuplicateSiteOptions): Promise<DuplicateSiteResponse & DuplicateSiteResponseNonNullableFields>;
|
|
137
|
+
export interface DuplicateSiteOptions {
|
|
138
|
+
/**
|
|
139
|
+
* Display name for the new site.
|
|
140
|
+
* @minLength 1
|
|
141
|
+
* @maxLength 40
|
|
142
|
+
*/
|
|
143
|
+
siteDisplayName: string;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* This endpoint enables you to delete multiple sites.
|
|
147
|
+
*
|
|
148
|
+
* This is not a permanent delete. Sites are moved to the trash bin and can be restored through site collaborators.
|
|
149
|
+
*
|
|
150
|
+
* Learn more about [deleting multiple sites](https://support.wix.com/en/article/moving-a-site-to-trash).
|
|
151
|
+
*
|
|
152
|
+
* > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.
|
|
153
|
+
* @param ids - Site IDs.
|
|
154
|
+
*
|
|
155
|
+
* Min: 1 site ID <br>
|
|
156
|
+
* Max: 20 site IDs
|
|
157
|
+
* @public
|
|
158
|
+
* @documentationMaturity preview
|
|
159
|
+
* @requiredField ids
|
|
160
|
+
* @permissionId my-account.delete-site
|
|
161
|
+
* @fqn com.wix.site.actions.SiteActionsService.BulkDeleteSite
|
|
162
|
+
*/
|
|
163
|
+
export declare function bulkDeleteSite(ids: string[]): Promise<BulkDeleteSiteResponse & BulkDeleteSiteResponseNonNullableFields>;
|
|
164
|
+
export {};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
|
|
2
|
+
import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
|
|
3
|
+
import * as ambassadorWixSiteActionsV1SiteActions from './site-actions-v1-site-actions-site-actions.http.js';
|
|
4
|
+
/**
|
|
5
|
+
* Publishes a site.
|
|
6
|
+
*
|
|
7
|
+
* Publishing a site makes any changes previously saved on the site available on the internet.
|
|
8
|
+
* After publishing, changes to your site appear in the [site's history](https://support.wix.com/en/article/viewing-and-managing-your-site-history).
|
|
9
|
+
*
|
|
10
|
+
* When you call this API, you must pass a header called `wix-site-id` whose value is the ID of the site you want to publish. Learn more about
|
|
11
|
+
* working with [API keys and site IDs](https://dev.wix.com/docs/rest/articles/getting-started/api-keys#create-and-use-api-keys).
|
|
12
|
+
*
|
|
13
|
+
* >**Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.
|
|
14
|
+
* @public
|
|
15
|
+
* @permissionId METASITE.UPDATE
|
|
16
|
+
* @fqn wix.site.v1.SitePublisher.PublishSite
|
|
17
|
+
*/
|
|
18
|
+
export async function publishSite() {
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
21
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({});
|
|
22
|
+
const reqOpts = ambassadorWixSiteActionsV1SiteActions.publishSite(payload);
|
|
23
|
+
sideEffects?.onSiteCall?.();
|
|
24
|
+
try {
|
|
25
|
+
const result = await httpClient.request(reqOpts);
|
|
26
|
+
sideEffects?.onSuccess?.(result);
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
const transformedError = sdkTransformError(err, {
|
|
30
|
+
spreadPathsToArguments: {},
|
|
31
|
+
explicitPathsToArguments: {},
|
|
32
|
+
singleArgumentUnchanged: false,
|
|
33
|
+
}, []);
|
|
34
|
+
sideEffects?.onError?.(err);
|
|
35
|
+
throw transformedError;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Duplicates a site with a new site name.
|
|
40
|
+
*
|
|
41
|
+
* > **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.
|
|
42
|
+
* > The duplicated site won’t have a domain or any Premium capabilities.
|
|
43
|
+
*
|
|
44
|
+
* Any installed apps that can be used only on sites with a Premium Plan, will be copied to the duplicated site and
|
|
45
|
+
* will appear unactivated. Once the site is upgraded, the app will be available for use.
|
|
46
|
+
*
|
|
47
|
+
* > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.
|
|
48
|
+
* @param sourceSiteId - ID of the site to duplicated.
|
|
49
|
+
* @public
|
|
50
|
+
* @documentationMaturity preview
|
|
51
|
+
* @requiredField options
|
|
52
|
+
* @requiredField options.siteDisplayName
|
|
53
|
+
* @requiredField sourceSiteId
|
|
54
|
+
* @permissionId my-account.duplicate-site
|
|
55
|
+
* @fqn com.wix.site.actions.SiteActionsService.DuplicateSite
|
|
56
|
+
*/
|
|
57
|
+
export async function duplicateSite(sourceSiteId, options) {
|
|
58
|
+
// @ts-ignore
|
|
59
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
60
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
61
|
+
sourceSiteId: sourceSiteId,
|
|
62
|
+
siteDisplayName: options?.siteDisplayName,
|
|
63
|
+
});
|
|
64
|
+
const reqOpts = ambassadorWixSiteActionsV1SiteActions.duplicateSite(payload);
|
|
65
|
+
sideEffects?.onSiteCall?.();
|
|
66
|
+
try {
|
|
67
|
+
const result = await httpClient.request(reqOpts);
|
|
68
|
+
sideEffects?.onSuccess?.(result);
|
|
69
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
70
|
+
}
|
|
71
|
+
catch (err) {
|
|
72
|
+
const transformedError = sdkTransformError(err, {
|
|
73
|
+
spreadPathsToArguments: {},
|
|
74
|
+
explicitPathsToArguments: {
|
|
75
|
+
sourceSiteId: '$[0]',
|
|
76
|
+
siteDisplayName: '$[1].siteDisplayName',
|
|
77
|
+
},
|
|
78
|
+
singleArgumentUnchanged: false,
|
|
79
|
+
}, ['sourceSiteId', 'options']);
|
|
80
|
+
sideEffects?.onError?.(err);
|
|
81
|
+
throw transformedError;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* This endpoint enables you to delete multiple sites.
|
|
86
|
+
*
|
|
87
|
+
* This is not a permanent delete. Sites are moved to the trash bin and can be restored through site collaborators.
|
|
88
|
+
*
|
|
89
|
+
* Learn more about [deleting multiple sites](https://support.wix.com/en/article/moving-a-site-to-trash).
|
|
90
|
+
*
|
|
91
|
+
* > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.
|
|
92
|
+
* @param ids - Site IDs.
|
|
93
|
+
*
|
|
94
|
+
* Min: 1 site ID <br>
|
|
95
|
+
* Max: 20 site IDs
|
|
96
|
+
* @public
|
|
97
|
+
* @documentationMaturity preview
|
|
98
|
+
* @requiredField ids
|
|
99
|
+
* @permissionId my-account.delete-site
|
|
100
|
+
* @fqn com.wix.site.actions.SiteActionsService.BulkDeleteSite
|
|
101
|
+
*/
|
|
102
|
+
export async function bulkDeleteSite(ids) {
|
|
103
|
+
// @ts-ignore
|
|
104
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
105
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ ids: ids });
|
|
106
|
+
const reqOpts = ambassadorWixSiteActionsV1SiteActions.bulkDeleteSite(payload);
|
|
107
|
+
sideEffects?.onSiteCall?.();
|
|
108
|
+
try {
|
|
109
|
+
const result = await httpClient.request(reqOpts);
|
|
110
|
+
sideEffects?.onSuccess?.(result);
|
|
111
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
112
|
+
}
|
|
113
|
+
catch (err) {
|
|
114
|
+
const transformedError = sdkTransformError(err, {
|
|
115
|
+
spreadPathsToArguments: {},
|
|
116
|
+
explicitPathsToArguments: { ids: '$[0]' },
|
|
117
|
+
singleArgumentUnchanged: false,
|
|
118
|
+
}, ['ids']);
|
|
119
|
+
sideEffects?.onError?.(err);
|
|
120
|
+
throw transformedError;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=site-actions-v1-site-actions-site-actions.universal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site-actions-v1-site-actions-site-actions.universal.js","sourceRoot":"","sources":["../../../../src/site-actions-v1-site-actions-site-actions.universal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EACL,qCAAqC,EACrC,uCAAuC,GACxC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,qCAAqC,MAAM,q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AAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE;YACzC,uBAAuB,EAAE,KAAK;SAC/B,EACD,CAAC,KAAK,CAAC,CACR,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wix/auto_sdk_sites_site-actions",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"registry": "https://registry.npmjs.org/",
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"keywords": [],
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"main": "./build/cjs/index.js",
|
|
11
|
+
"types": "./build/es/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./build/es/index.js",
|
|
15
|
+
"require": "./build/cjs/index.js",
|
|
16
|
+
"types": "./build/es/index.d.ts"
|
|
17
|
+
},
|
|
18
|
+
"./package.json": "./package.json",
|
|
19
|
+
"./meta": {
|
|
20
|
+
"import": "./build/es/meta.js",
|
|
21
|
+
"require": "./build/cjs/meta.js",
|
|
22
|
+
"types": "./build/es/meta.d.ts"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"build",
|
|
27
|
+
"meta",
|
|
28
|
+
"service-plugins"
|
|
29
|
+
],
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@wix/sdk-runtime": "^0.3.42",
|
|
32
|
+
"@wix/sdk-types": "^1.13.9"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"typescript": "^5.3.2"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsc -b tsconfig.json tsconfig.esm.json tsconfig.internal.json tsconfig.internal.esm.json",
|
|
39
|
+
"test": ":"
|
|
40
|
+
},
|
|
41
|
+
"wix": {
|
|
42
|
+
"artifact": {
|
|
43
|
+
"artifactId": "auto-sdk-sites-site-actions",
|
|
44
|
+
"groupId": "com.wixpress.public-sdk-dependencies"
|
|
45
|
+
},
|
|
46
|
+
"sdkDependency": {
|
|
47
|
+
"fqdnNamespace": "siteActions",
|
|
48
|
+
"fqdn": "wix.site_actions.v1.site_actions"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"falconPackageHash": "d45d6551032bd0a14c5eef5d18c0d20ea7c8e0446db70c5aef41133b"
|
|
52
|
+
}
|