@wix/auto_sdk_editor-branches_branches 1.0.11 → 1.0.13
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 +89 -1
- package/build/cjs/index.js +730 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1265 -1
- package/build/cjs/index.typings.js +606 -15
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +317 -1
- package/build/cjs/meta.js +434 -15
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +89 -0
- package/build/es/index.mjs +691 -0
- package/build/es/index.mjs.map +1 -0
- package/build/{internal/cjs/src/editor-branches-v1-branch-branches.universal.d.ts → es/index.typings.d.mts} +156 -109
- package/build/es/index.typings.mjs +570 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +317 -0
- package/build/es/meta.mjs +404 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +89 -1
- package/build/internal/cjs/index.js +730 -15
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +1265 -1
- package/build/internal/cjs/index.typings.js +606 -15
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +317 -1
- package/build/internal/cjs/meta.js +434 -15
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +89 -0
- package/build/internal/es/index.mjs +691 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/{cjs/src/editor-branches-v1-branch-branches.universal.d.ts → internal/es/index.typings.d.mts} +156 -109
- package/build/internal/es/index.typings.mjs +570 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +317 -0
- package/build/internal/es/meta.mjs +404 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +12 -10
- package/build/cjs/src/editor-branches-v1-branch-branches.context.d.ts +0 -21
- package/build/cjs/src/editor-branches-v1-branch-branches.context.js +0 -33
- package/build/cjs/src/editor-branches-v1-branch-branches.context.js.map +0 -1
- package/build/cjs/src/editor-branches-v1-branch-branches.http.d.ts +0 -22
- package/build/cjs/src/editor-branches-v1-branch-branches.http.js +0 -286
- package/build/cjs/src/editor-branches-v1-branch-branches.http.js.map +0 -1
- package/build/cjs/src/editor-branches-v1-branch-branches.meta.d.ts +0 -27
- package/build/cjs/src/editor-branches-v1-branch-branches.meta.js +0 -161
- package/build/cjs/src/editor-branches-v1-branch-branches.meta.js.map +0 -1
- package/build/cjs/src/editor-branches-v1-branch-branches.public.d.ts +0 -69
- package/build/cjs/src/editor-branches-v1-branch-branches.public.js +0 -92
- package/build/cjs/src/editor-branches-v1-branch-branches.public.js.map +0 -1
- package/build/cjs/src/editor-branches-v1-branch-branches.types.d.ts +0 -930
- package/build/cjs/src/editor-branches-v1-branch-branches.types.js +0 -160
- package/build/cjs/src/editor-branches-v1-branch-branches.types.js.map +0 -1
- package/build/cjs/src/editor-branches-v1-branch-branches.universal.js +0 -433
- package/build/cjs/src/editor-branches-v1-branch-branches.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/editor-branches-v1-branch-branches.context.d.ts +0 -21
- package/build/es/src/editor-branches-v1-branch-branches.context.js +0 -21
- package/build/es/src/editor-branches-v1-branch-branches.context.js.map +0 -1
- package/build/es/src/editor-branches-v1-branch-branches.http.d.ts +0 -22
- package/build/es/src/editor-branches-v1-branch-branches.http.js +0 -276
- package/build/es/src/editor-branches-v1-branch-branches.http.js.map +0 -1
- package/build/es/src/editor-branches-v1-branch-branches.meta.d.ts +0 -27
- package/build/es/src/editor-branches-v1-branch-branches.meta.js +0 -128
- package/build/es/src/editor-branches-v1-branch-branches.meta.js.map +0 -1
- package/build/es/src/editor-branches-v1-branch-branches.public.d.ts +0 -69
- package/build/es/src/editor-branches-v1-branch-branches.public.js +0 -73
- package/build/es/src/editor-branches-v1-branch-branches.public.js.map +0 -1
- package/build/es/src/editor-branches-v1-branch-branches.types.d.ts +0 -930
- package/build/es/src/editor-branches-v1-branch-branches.types.js +0 -157
- package/build/es/src/editor-branches-v1-branch-branches.types.js.map +0 -1
- package/build/es/src/editor-branches-v1-branch-branches.universal.d.ts +0 -1218
- package/build/es/src/editor-branches-v1-branch-branches.universal.js +0 -400
- package/build/es/src/editor-branches-v1-branch-branches.universal.js.map +0 -1
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.context.d.ts +0 -21
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.context.js +0 -33
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.context.js.map +0 -1
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.http.d.ts +0 -22
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.http.js +0 -286
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.http.js.map +0 -1
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.meta.d.ts +0 -27
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.meta.js +0 -161
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.meta.js.map +0 -1
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.public.d.ts +0 -69
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.public.js +0 -92
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.public.js.map +0 -1
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.types.d.ts +0 -930
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.types.js +0 -160
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.types.js.map +0 -1
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.universal.js +0 -433
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/editor-branches-v1-branch-branches.context.d.ts +0 -21
- package/build/internal/es/src/editor-branches-v1-branch-branches.context.js +0 -21
- package/build/internal/es/src/editor-branches-v1-branch-branches.context.js.map +0 -1
- package/build/internal/es/src/editor-branches-v1-branch-branches.http.d.ts +0 -22
- package/build/internal/es/src/editor-branches-v1-branch-branches.http.js +0 -276
- package/build/internal/es/src/editor-branches-v1-branch-branches.http.js.map +0 -1
- package/build/internal/es/src/editor-branches-v1-branch-branches.meta.d.ts +0 -27
- package/build/internal/es/src/editor-branches-v1-branch-branches.meta.js +0 -128
- package/build/internal/es/src/editor-branches-v1-branch-branches.meta.js.map +0 -1
- package/build/internal/es/src/editor-branches-v1-branch-branches.public.d.ts +0 -69
- package/build/internal/es/src/editor-branches-v1-branch-branches.public.js +0 -73
- package/build/internal/es/src/editor-branches-v1-branch-branches.public.js.map +0 -1
- package/build/internal/es/src/editor-branches-v1-branch-branches.types.d.ts +0 -930
- package/build/internal/es/src/editor-branches-v1-branch-branches.types.js +0 -157
- package/build/internal/es/src/editor-branches-v1-branch-branches.types.js.map +0 -1
- package/build/internal/es/src/editor-branches-v1-branch-branches.universal.d.ts +0 -1218
- package/build/internal/es/src/editor-branches-v1-branch-branches.universal.js +0 -400
- package/build/internal/es/src/editor-branches-v1-branch-branches.universal.js.map +0 -1
|
@@ -0,0 +1,570 @@
|
|
|
1
|
+
// src/editor-branches-v1-branch-branches.universal.ts
|
|
2
|
+
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
|
|
3
|
+
import { queryBuilder } from "@wix/sdk-runtime/query-builder";
|
|
4
|
+
import {
|
|
5
|
+
renameKeysFromSDKRequestToRESTRequest,
|
|
6
|
+
renameKeysFromRESTResponseToSDKResponse
|
|
7
|
+
} from "@wix/sdk-runtime/rename-all-nested-keys";
|
|
8
|
+
|
|
9
|
+
// src/editor-branches-v1-branch-branches.http.ts
|
|
10
|
+
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
11
|
+
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
12
|
+
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
13
|
+
import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
|
|
14
|
+
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
15
|
+
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
16
|
+
function resolveWixEditorBranchesV1BranchesServiceUrl(opts) {
|
|
17
|
+
const domainToMappings = {
|
|
18
|
+
"editor._base_domain_": [
|
|
19
|
+
{
|
|
20
|
+
srcPath: "/_api/editor-branches",
|
|
21
|
+
destPath: ""
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"blocks._base_domain_": [
|
|
25
|
+
{
|
|
26
|
+
srcPath: "/_api/editor-branches",
|
|
27
|
+
destPath: ""
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"create.editorx": [
|
|
31
|
+
{
|
|
32
|
+
srcPath: "/_api/editor-branches",
|
|
33
|
+
destPath: ""
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"www.wixapis.com": [
|
|
37
|
+
{
|
|
38
|
+
srcPath: "/branches/v1/branches",
|
|
39
|
+
destPath: "/v1/branches"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
srcPath: "/editor/branches/v1/branches",
|
|
43
|
+
destPath: "/v1/branches"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"*.dev.wix-code.com": [
|
|
47
|
+
{
|
|
48
|
+
srcPath: "/_api/editor-branches",
|
|
49
|
+
destPath: ""
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
_: [
|
|
53
|
+
{
|
|
54
|
+
srcPath: "/_api/editor-branches",
|
|
55
|
+
destPath: ""
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"manage._base_domain_": [
|
|
59
|
+
{
|
|
60
|
+
srcPath: "/_api/editor-branches",
|
|
61
|
+
destPath: ""
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
};
|
|
65
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
66
|
+
}
|
|
67
|
+
var PACKAGE_NAME = "@wix/auto_sdk_editor-branches_branches";
|
|
68
|
+
function createBranch(payload) {
|
|
69
|
+
function __createBranch({ host }) {
|
|
70
|
+
const serializedData = transformPaths(payload, [
|
|
71
|
+
{
|
|
72
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
73
|
+
paths: [{ path: "branch.createdDate" }, { path: "branch.updatedDate" }]
|
|
74
|
+
}
|
|
75
|
+
]);
|
|
76
|
+
const metadata = {
|
|
77
|
+
entityFqdn: "wix.editor.branches.v1.branch",
|
|
78
|
+
method: "POST",
|
|
79
|
+
methodFqn: "wix.editor.branches.v1.BranchesService.CreateBranch",
|
|
80
|
+
packageName: PACKAGE_NAME,
|
|
81
|
+
url: resolveWixEditorBranchesV1BranchesServiceUrl({
|
|
82
|
+
protoPath: "/v1/branches",
|
|
83
|
+
data: serializedData,
|
|
84
|
+
host
|
|
85
|
+
}),
|
|
86
|
+
data: serializedData,
|
|
87
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
88
|
+
{
|
|
89
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
90
|
+
paths: [
|
|
91
|
+
{ path: "branch.createdDate" },
|
|
92
|
+
{ path: "branch.updatedDate" }
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
])
|
|
96
|
+
};
|
|
97
|
+
return metadata;
|
|
98
|
+
}
|
|
99
|
+
return __createBranch;
|
|
100
|
+
}
|
|
101
|
+
function getBranch(payload) {
|
|
102
|
+
function __getBranch({ host }) {
|
|
103
|
+
const metadata = {
|
|
104
|
+
entityFqdn: "wix.editor.branches.v1.branch",
|
|
105
|
+
method: "GET",
|
|
106
|
+
methodFqn: "wix.editor.branches.v1.BranchesService.GetBranch",
|
|
107
|
+
packageName: PACKAGE_NAME,
|
|
108
|
+
url: resolveWixEditorBranchesV1BranchesServiceUrl({
|
|
109
|
+
protoPath: "/v1/branches/{branchId}",
|
|
110
|
+
data: payload,
|
|
111
|
+
host
|
|
112
|
+
}),
|
|
113
|
+
params: toURLSearchParams(payload),
|
|
114
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
115
|
+
{
|
|
116
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
117
|
+
paths: [
|
|
118
|
+
{ path: "branch.createdDate" },
|
|
119
|
+
{ path: "branch.updatedDate" }
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
])
|
|
123
|
+
};
|
|
124
|
+
return metadata;
|
|
125
|
+
}
|
|
126
|
+
return __getBranch;
|
|
127
|
+
}
|
|
128
|
+
function updateBranch(payload) {
|
|
129
|
+
function __updateBranch({ host }) {
|
|
130
|
+
const serializedData = transformPaths(payload, [
|
|
131
|
+
{
|
|
132
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
133
|
+
paths: [{ path: "fieldMask" }]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
137
|
+
paths: [{ path: "branch.createdDate" }, { path: "branch.updatedDate" }]
|
|
138
|
+
}
|
|
139
|
+
]);
|
|
140
|
+
const metadata = {
|
|
141
|
+
entityFqdn: "wix.editor.branches.v1.branch",
|
|
142
|
+
method: "PATCH",
|
|
143
|
+
methodFqn: "wix.editor.branches.v1.BranchesService.UpdateBranch",
|
|
144
|
+
packageName: PACKAGE_NAME,
|
|
145
|
+
url: resolveWixEditorBranchesV1BranchesServiceUrl({
|
|
146
|
+
protoPath: "/v1/branches/{branch.id}",
|
|
147
|
+
data: serializedData,
|
|
148
|
+
host
|
|
149
|
+
}),
|
|
150
|
+
data: serializedData,
|
|
151
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
152
|
+
{
|
|
153
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
154
|
+
paths: [
|
|
155
|
+
{ path: "branch.createdDate" },
|
|
156
|
+
{ path: "branch.updatedDate" }
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
])
|
|
160
|
+
};
|
|
161
|
+
return metadata;
|
|
162
|
+
}
|
|
163
|
+
return __updateBranch;
|
|
164
|
+
}
|
|
165
|
+
function deleteBranch(payload) {
|
|
166
|
+
function __deleteBranch({ host }) {
|
|
167
|
+
const metadata = {
|
|
168
|
+
entityFqdn: "wix.editor.branches.v1.branch",
|
|
169
|
+
method: "DELETE",
|
|
170
|
+
methodFqn: "wix.editor.branches.v1.BranchesService.DeleteBranch",
|
|
171
|
+
packageName: PACKAGE_NAME,
|
|
172
|
+
url: resolveWixEditorBranchesV1BranchesServiceUrl({
|
|
173
|
+
protoPath: "/v1/branches/{branchId}",
|
|
174
|
+
data: payload,
|
|
175
|
+
host
|
|
176
|
+
}),
|
|
177
|
+
params: toURLSearchParams(payload)
|
|
178
|
+
};
|
|
179
|
+
return metadata;
|
|
180
|
+
}
|
|
181
|
+
return __deleteBranch;
|
|
182
|
+
}
|
|
183
|
+
function queryBranches(payload) {
|
|
184
|
+
function __queryBranches({ host }) {
|
|
185
|
+
const metadata = {
|
|
186
|
+
entityFqdn: "wix.editor.branches.v1.branch",
|
|
187
|
+
method: "POST",
|
|
188
|
+
methodFqn: "wix.editor.branches.v1.BranchesService.QueryBranches",
|
|
189
|
+
packageName: PACKAGE_NAME,
|
|
190
|
+
url: resolveWixEditorBranchesV1BranchesServiceUrl({
|
|
191
|
+
protoPath: "/v1/branches/query",
|
|
192
|
+
data: payload,
|
|
193
|
+
host
|
|
194
|
+
}),
|
|
195
|
+
data: payload,
|
|
196
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
197
|
+
{
|
|
198
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
199
|
+
paths: [
|
|
200
|
+
{ path: "branches.createdDate" },
|
|
201
|
+
{ path: "branches.updatedDate" }
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
]),
|
|
205
|
+
fallback: [
|
|
206
|
+
{
|
|
207
|
+
method: "POST",
|
|
208
|
+
url: resolveWixEditorBranchesV1BranchesServiceUrl({
|
|
209
|
+
protoPath: "/v1/branches/query",
|
|
210
|
+
data: payload,
|
|
211
|
+
host
|
|
212
|
+
}),
|
|
213
|
+
data: payload
|
|
214
|
+
}
|
|
215
|
+
]
|
|
216
|
+
};
|
|
217
|
+
return metadata;
|
|
218
|
+
}
|
|
219
|
+
return __queryBranches;
|
|
220
|
+
}
|
|
221
|
+
function setDefaultBranch(payload) {
|
|
222
|
+
function __setDefaultBranch({ host }) {
|
|
223
|
+
const metadata = {
|
|
224
|
+
entityFqdn: "wix.editor.branches.v1.branch",
|
|
225
|
+
method: "POST",
|
|
226
|
+
methodFqn: "wix.editor.branches.v1.BranchesService.SetDefaultBranch",
|
|
227
|
+
packageName: PACKAGE_NAME,
|
|
228
|
+
url: resolveWixEditorBranchesV1BranchesServiceUrl({
|
|
229
|
+
protoPath: "/v1/branches/{branchId}/set-default",
|
|
230
|
+
data: payload,
|
|
231
|
+
host
|
|
232
|
+
}),
|
|
233
|
+
data: payload,
|
|
234
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
235
|
+
{
|
|
236
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
237
|
+
paths: [
|
|
238
|
+
{ path: "branch.createdDate" },
|
|
239
|
+
{ path: "branch.updatedDate" }
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
])
|
|
243
|
+
};
|
|
244
|
+
return metadata;
|
|
245
|
+
}
|
|
246
|
+
return __setDefaultBranch;
|
|
247
|
+
}
|
|
248
|
+
function getDefaultBranch(payload) {
|
|
249
|
+
function __getDefaultBranch({ host }) {
|
|
250
|
+
const metadata = {
|
|
251
|
+
entityFqdn: "wix.editor.branches.v1.branch",
|
|
252
|
+
method: "GET",
|
|
253
|
+
methodFqn: "wix.editor.branches.v1.BranchesService.GetDefaultBranch",
|
|
254
|
+
packageName: PACKAGE_NAME,
|
|
255
|
+
url: resolveWixEditorBranchesV1BranchesServiceUrl({
|
|
256
|
+
protoPath: "/v1/branches/default",
|
|
257
|
+
data: payload,
|
|
258
|
+
host
|
|
259
|
+
}),
|
|
260
|
+
params: toURLSearchParams(payload),
|
|
261
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
262
|
+
{
|
|
263
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
264
|
+
paths: [
|
|
265
|
+
{ path: "branch.createdDate" },
|
|
266
|
+
{ path: "branch.updatedDate" }
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
])
|
|
270
|
+
};
|
|
271
|
+
return metadata;
|
|
272
|
+
}
|
|
273
|
+
return __getDefaultBranch;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// src/editor-branches-v1-branch-branches.universal.ts
|
|
277
|
+
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
278
|
+
var Type = /* @__PURE__ */ ((Type2) => {
|
|
279
|
+
Type2["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
|
|
280
|
+
Type2["USER"] = "USER";
|
|
281
|
+
Type2["TECHNICAL"] = "TECHNICAL";
|
|
282
|
+
Type2["ORIGINAL_BRANCH"] = "ORIGINAL_BRANCH";
|
|
283
|
+
return Type2;
|
|
284
|
+
})(Type || {});
|
|
285
|
+
var SourceType = /* @__PURE__ */ ((SourceType2) => {
|
|
286
|
+
SourceType2["UNKNOWN_SOURCE_TYPE"] = "UNKNOWN_SOURCE_TYPE";
|
|
287
|
+
SourceType2["SOURCE_BRANCH"] = "SOURCE_BRANCH";
|
|
288
|
+
SourceType2["SOURCE_TEMPLATE"] = "SOURCE_TEMPLATE";
|
|
289
|
+
return SourceType2;
|
|
290
|
+
})(SourceType || {});
|
|
291
|
+
var EditorTypeOptions = /* @__PURE__ */ ((EditorTypeOptions2) => {
|
|
292
|
+
EditorTypeOptions2["UNKNOWN_EDITOR_TYPE"] = "UNKNOWN_EDITOR_TYPE";
|
|
293
|
+
EditorTypeOptions2["STUDIO"] = "STUDIO";
|
|
294
|
+
EditorTypeOptions2["CLASSIC"] = "CLASSIC";
|
|
295
|
+
return EditorTypeOptions2;
|
|
296
|
+
})(EditorTypeOptions || {});
|
|
297
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
298
|
+
SortOrder2["ASC"] = "ASC";
|
|
299
|
+
SortOrder2["DESC"] = "DESC";
|
|
300
|
+
return SortOrder2;
|
|
301
|
+
})(SortOrder || {});
|
|
302
|
+
var State = /* @__PURE__ */ ((State2) => {
|
|
303
|
+
State2["UNKNOWN"] = "UNKNOWN";
|
|
304
|
+
State2["ENABLED"] = "ENABLED";
|
|
305
|
+
State2["DISABLED"] = "DISABLED";
|
|
306
|
+
State2["PENDING"] = "PENDING";
|
|
307
|
+
State2["DEMO"] = "DEMO";
|
|
308
|
+
return State2;
|
|
309
|
+
})(State || {});
|
|
310
|
+
var SiteCreatedContext = /* @__PURE__ */ ((SiteCreatedContext2) => {
|
|
311
|
+
SiteCreatedContext2["OTHER"] = "OTHER";
|
|
312
|
+
SiteCreatedContext2["FROM_TEMPLATE"] = "FROM_TEMPLATE";
|
|
313
|
+
SiteCreatedContext2["DUPLICATE_BY_SITE_TRANSFER"] = "DUPLICATE_BY_SITE_TRANSFER";
|
|
314
|
+
SiteCreatedContext2["DUPLICATE"] = "DUPLICATE";
|
|
315
|
+
SiteCreatedContext2["OLD_SITE_TRANSFER"] = "OLD_SITE_TRANSFER";
|
|
316
|
+
SiteCreatedContext2["FLASH"] = "FLASH";
|
|
317
|
+
return SiteCreatedContext2;
|
|
318
|
+
})(SiteCreatedContext || {});
|
|
319
|
+
var Namespace = /* @__PURE__ */ ((Namespace2) => {
|
|
320
|
+
Namespace2["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
|
|
321
|
+
Namespace2["WIX"] = "WIX";
|
|
322
|
+
Namespace2["SHOUT_OUT"] = "SHOUT_OUT";
|
|
323
|
+
Namespace2["ALBUMS"] = "ALBUMS";
|
|
324
|
+
Namespace2["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
|
|
325
|
+
Namespace2["HOTELS"] = "HOTELS";
|
|
326
|
+
Namespace2["CLUBS"] = "CLUBS";
|
|
327
|
+
Namespace2["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
|
|
328
|
+
Namespace2["DEV_SITE"] = "DEV_SITE";
|
|
329
|
+
Namespace2["LOGOS"] = "LOGOS";
|
|
330
|
+
Namespace2["VIDEO_MAKER"] = "VIDEO_MAKER";
|
|
331
|
+
Namespace2["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
|
|
332
|
+
Namespace2["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
|
|
333
|
+
Namespace2["HTML_DRAFT"] = "HTML_DRAFT";
|
|
334
|
+
Namespace2["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
|
|
335
|
+
Namespace2["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
|
|
336
|
+
Namespace2["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
|
|
337
|
+
Namespace2["ANYWHERE"] = "ANYWHERE";
|
|
338
|
+
Namespace2["HEADLESS"] = "HEADLESS";
|
|
339
|
+
Namespace2["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
|
|
340
|
+
Namespace2["RISE"] = "RISE";
|
|
341
|
+
Namespace2["BRANDED_FIRST"] = "BRANDED_FIRST";
|
|
342
|
+
Namespace2["NOWNIA"] = "NOWNIA";
|
|
343
|
+
Namespace2["UGC_TEMPLATE"] = "UGC_TEMPLATE";
|
|
344
|
+
Namespace2["CODUX"] = "CODUX";
|
|
345
|
+
Namespace2["MEDIA_DESIGN_CREATOR"] = "MEDIA_DESIGN_CREATOR";
|
|
346
|
+
Namespace2["SHARED_BLOG_ENTERPRISE"] = "SHARED_BLOG_ENTERPRISE";
|
|
347
|
+
Namespace2["STANDALONE_FORMS"] = "STANDALONE_FORMS";
|
|
348
|
+
Namespace2["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
|
|
349
|
+
Namespace2["MIMIR"] = "MIMIR";
|
|
350
|
+
Namespace2["TWINS"] = "TWINS";
|
|
351
|
+
return Namespace2;
|
|
352
|
+
})(Namespace || {});
|
|
353
|
+
var DeleteStatus = /* @__PURE__ */ ((DeleteStatus2) => {
|
|
354
|
+
DeleteStatus2["UNKNOWN"] = "UNKNOWN";
|
|
355
|
+
DeleteStatus2["TRASH"] = "TRASH";
|
|
356
|
+
DeleteStatus2["DELETED"] = "DELETED";
|
|
357
|
+
DeleteStatus2["PENDING_PURGE"] = "PENDING_PURGE";
|
|
358
|
+
DeleteStatus2["PURGED_EXTERNALLY"] = "PURGED_EXTERNALLY";
|
|
359
|
+
return DeleteStatus2;
|
|
360
|
+
})(DeleteStatus || {});
|
|
361
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
362
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
363
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
364
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
365
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
366
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
367
|
+
return WebhookIdentityType2;
|
|
368
|
+
})(WebhookIdentityType || {});
|
|
369
|
+
async function createBranch2(branch) {
|
|
370
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
371
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ branch });
|
|
372
|
+
const reqOpts = createBranch(payload);
|
|
373
|
+
sideEffects?.onSiteCall?.();
|
|
374
|
+
try {
|
|
375
|
+
const result = await httpClient.request(reqOpts);
|
|
376
|
+
sideEffects?.onSuccess?.(result);
|
|
377
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.branch;
|
|
378
|
+
} catch (err) {
|
|
379
|
+
const transformedError = sdkTransformError(
|
|
380
|
+
err,
|
|
381
|
+
{
|
|
382
|
+
spreadPathsToArguments: {},
|
|
383
|
+
explicitPathsToArguments: { branch: "$[0]" },
|
|
384
|
+
singleArgumentUnchanged: false
|
|
385
|
+
},
|
|
386
|
+
["branch"]
|
|
387
|
+
);
|
|
388
|
+
sideEffects?.onError?.(err);
|
|
389
|
+
throw transformedError;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
async function getBranch2(branchId) {
|
|
393
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
394
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ branchId });
|
|
395
|
+
const reqOpts = getBranch(payload);
|
|
396
|
+
sideEffects?.onSiteCall?.();
|
|
397
|
+
try {
|
|
398
|
+
const result = await httpClient.request(reqOpts);
|
|
399
|
+
sideEffects?.onSuccess?.(result);
|
|
400
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.branch;
|
|
401
|
+
} catch (err) {
|
|
402
|
+
const transformedError = sdkTransformError(
|
|
403
|
+
err,
|
|
404
|
+
{
|
|
405
|
+
spreadPathsToArguments: {},
|
|
406
|
+
explicitPathsToArguments: { branchId: "$[0]" },
|
|
407
|
+
singleArgumentUnchanged: false
|
|
408
|
+
},
|
|
409
|
+
["branchId"]
|
|
410
|
+
);
|
|
411
|
+
sideEffects?.onError?.(err);
|
|
412
|
+
throw transformedError;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
async function updateBranch2(_id, branch) {
|
|
416
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
417
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
418
|
+
branch: { ...branch, id: _id }
|
|
419
|
+
});
|
|
420
|
+
const reqOpts = updateBranch(payload);
|
|
421
|
+
sideEffects?.onSiteCall?.();
|
|
422
|
+
try {
|
|
423
|
+
const result = await httpClient.request(reqOpts);
|
|
424
|
+
sideEffects?.onSuccess?.(result);
|
|
425
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.branch;
|
|
426
|
+
} catch (err) {
|
|
427
|
+
const transformedError = sdkTransformError(
|
|
428
|
+
err,
|
|
429
|
+
{
|
|
430
|
+
spreadPathsToArguments: { branch: "$[1]" },
|
|
431
|
+
explicitPathsToArguments: { "branch.id": "$[0]" },
|
|
432
|
+
singleArgumentUnchanged: false
|
|
433
|
+
},
|
|
434
|
+
["_id", "branch"]
|
|
435
|
+
);
|
|
436
|
+
sideEffects?.onError?.(err);
|
|
437
|
+
throw transformedError;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
async function deleteBranch2(branchId) {
|
|
441
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
442
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ branchId });
|
|
443
|
+
const reqOpts = deleteBranch(payload);
|
|
444
|
+
sideEffects?.onSiteCall?.();
|
|
445
|
+
try {
|
|
446
|
+
const result = await httpClient.request(reqOpts);
|
|
447
|
+
sideEffects?.onSuccess?.(result);
|
|
448
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
449
|
+
} catch (err) {
|
|
450
|
+
const transformedError = sdkTransformError(
|
|
451
|
+
err,
|
|
452
|
+
{
|
|
453
|
+
spreadPathsToArguments: {},
|
|
454
|
+
explicitPathsToArguments: { branchId: "$[0]" },
|
|
455
|
+
singleArgumentUnchanged: false
|
|
456
|
+
},
|
|
457
|
+
["branchId"]
|
|
458
|
+
);
|
|
459
|
+
sideEffects?.onError?.(err);
|
|
460
|
+
throw transformedError;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
function queryBranches2() {
|
|
464
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
465
|
+
return queryBuilder({
|
|
466
|
+
func: async (payload) => {
|
|
467
|
+
const reqOpts = queryBranches(payload);
|
|
468
|
+
sideEffects?.onSiteCall?.();
|
|
469
|
+
try {
|
|
470
|
+
const result = await httpClient.request(reqOpts);
|
|
471
|
+
sideEffects?.onSuccess?.(result);
|
|
472
|
+
return result;
|
|
473
|
+
} catch (err) {
|
|
474
|
+
sideEffects?.onError?.(err);
|
|
475
|
+
throw err;
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
requestTransformer: (query) => {
|
|
479
|
+
const args = [query, {}];
|
|
480
|
+
return renameKeysFromSDKRequestToRESTRequest({
|
|
481
|
+
...args?.[1],
|
|
482
|
+
query: args?.[0]
|
|
483
|
+
});
|
|
484
|
+
},
|
|
485
|
+
responseTransformer: ({ data }) => {
|
|
486
|
+
const transformedData = renameKeysFromRESTResponseToSDKResponse(
|
|
487
|
+
transformPaths2(data, [])
|
|
488
|
+
);
|
|
489
|
+
return {
|
|
490
|
+
items: transformedData?.branches,
|
|
491
|
+
pagingMetadata: transformedData?.pagingMetadata
|
|
492
|
+
};
|
|
493
|
+
},
|
|
494
|
+
errorTransformer: (err) => {
|
|
495
|
+
const transformedError = sdkTransformError(err, {
|
|
496
|
+
spreadPathsToArguments: {},
|
|
497
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
498
|
+
singleArgumentUnchanged: false
|
|
499
|
+
});
|
|
500
|
+
throw transformedError;
|
|
501
|
+
},
|
|
502
|
+
pagingMethod: "CURSOR",
|
|
503
|
+
transformationPaths: {}
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
async function setDefaultBranch2(branchId) {
|
|
507
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
508
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ branchId });
|
|
509
|
+
const reqOpts = setDefaultBranch(payload);
|
|
510
|
+
sideEffects?.onSiteCall?.();
|
|
511
|
+
try {
|
|
512
|
+
const result = await httpClient.request(reqOpts);
|
|
513
|
+
sideEffects?.onSuccess?.(result);
|
|
514
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
515
|
+
} catch (err) {
|
|
516
|
+
const transformedError = sdkTransformError(
|
|
517
|
+
err,
|
|
518
|
+
{
|
|
519
|
+
spreadPathsToArguments: {},
|
|
520
|
+
explicitPathsToArguments: { branchId: "$[0]" },
|
|
521
|
+
singleArgumentUnchanged: false
|
|
522
|
+
},
|
|
523
|
+
["branchId"]
|
|
524
|
+
);
|
|
525
|
+
sideEffects?.onError?.(err);
|
|
526
|
+
throw transformedError;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
async function getDefaultBranch2() {
|
|
530
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
531
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({});
|
|
532
|
+
const reqOpts = getDefaultBranch(payload);
|
|
533
|
+
sideEffects?.onSiteCall?.();
|
|
534
|
+
try {
|
|
535
|
+
const result = await httpClient.request(reqOpts);
|
|
536
|
+
sideEffects?.onSuccess?.(result);
|
|
537
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
538
|
+
} catch (err) {
|
|
539
|
+
const transformedError = sdkTransformError(
|
|
540
|
+
err,
|
|
541
|
+
{
|
|
542
|
+
spreadPathsToArguments: {},
|
|
543
|
+
explicitPathsToArguments: {},
|
|
544
|
+
singleArgumentUnchanged: false
|
|
545
|
+
},
|
|
546
|
+
[]
|
|
547
|
+
);
|
|
548
|
+
sideEffects?.onError?.(err);
|
|
549
|
+
throw transformedError;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
export {
|
|
553
|
+
DeleteStatus,
|
|
554
|
+
EditorTypeOptions,
|
|
555
|
+
Namespace,
|
|
556
|
+
SiteCreatedContext,
|
|
557
|
+
SortOrder,
|
|
558
|
+
SourceType,
|
|
559
|
+
State,
|
|
560
|
+
Type,
|
|
561
|
+
WebhookIdentityType,
|
|
562
|
+
createBranch2 as createBranch,
|
|
563
|
+
deleteBranch2 as deleteBranch,
|
|
564
|
+
getBranch2 as getBranch,
|
|
565
|
+
getDefaultBranch2 as getDefaultBranch,
|
|
566
|
+
queryBranches2 as queryBranches,
|
|
567
|
+
setDefaultBranch2 as setDefaultBranch,
|
|
568
|
+
updateBranch2 as updateBranch
|
|
569
|
+
};
|
|
570
|
+
//# sourceMappingURL=index.typings.mjs.map
|