@wix/auto_sdk_editor-branches_branches 1.0.10 → 1.0.12
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 +726 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1265 -1
- package/build/cjs/index.typings.js +602 -15
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +317 -1
- package/build/cjs/meta.js +430 -15
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +89 -0
- package/build/es/index.mjs +687 -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} +221 -107
- package/build/es/index.typings.mjs +566 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +317 -0
- package/build/es/meta.mjs +400 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +89 -1
- package/build/internal/cjs/index.js +726 -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 +602 -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 +430 -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 +687 -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} +221 -107
- package/build/internal/es/index.typings.mjs +566 -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 +400 -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 -19
- package/build/cjs/src/editor-branches-v1-branch-branches.context.js +0 -31
- 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 -18
- package/build/cjs/src/editor-branches-v1-branch-branches.http.js +0 -228
- 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 -23
- package/build/cjs/src/editor-branches-v1-branch-branches.meta.js +0 -123
- 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 -54
- package/build/cjs/src/editor-branches-v1-branch-branches.public.js +0 -80
- 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 -890
- 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 -373
- 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 -19
- package/build/es/src/editor-branches-v1-branch-branches.context.js +0 -19
- 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 -18
- package/build/es/src/editor-branches-v1-branch-branches.http.js +0 -220
- 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 -23
- package/build/es/src/editor-branches-v1-branch-branches.meta.js +0 -92
- 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 -54
- package/build/es/src/editor-branches-v1-branch-branches.public.js +0 -63
- 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 -890
- 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 -1151
- package/build/es/src/editor-branches-v1-branch-branches.universal.js +0 -342
- 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 -19
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.context.js +0 -31
- 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 -18
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.http.js +0 -228
- 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 -23
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.meta.js +0 -123
- 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 -54
- package/build/internal/cjs/src/editor-branches-v1-branch-branches.public.js +0 -80
- 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 -890
- 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 -373
- 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 -19
- package/build/internal/es/src/editor-branches-v1-branch-branches.context.js +0 -19
- 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 -18
- package/build/internal/es/src/editor-branches-v1-branch-branches.http.js +0 -220
- 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 -23
- package/build/internal/es/src/editor-branches-v1-branch-branches.meta.js +0 -92
- 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 -54
- package/build/internal/es/src/editor-branches-v1-branch-branches.public.js +0 -63
- 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 -890
- 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 -1151
- package/build/internal/es/src/editor-branches-v1-branch-branches.universal.js +0 -342
- package/build/internal/es/src/editor-branches-v1-branch-branches.universal.js.map +0 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* A branch is a version of draft site content that can be edited independently. Also known as a test site.
|
|
4
5
|
* Read more about branches in this [article](https://support.wix.com/en/article/about-test-sites).
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
+
interface Branch extends BranchSourceOneOf {
|
|
7
8
|
/** Source branch properties. */
|
|
8
9
|
sourceBranchProperties?: SourceBranch;
|
|
9
10
|
/** Source template properties. */
|
|
@@ -22,14 +23,14 @@ export interface Branch extends BranchSourceOneOf {
|
|
|
22
23
|
*/
|
|
23
24
|
revision?: string | null;
|
|
24
25
|
/** Branch type. */
|
|
25
|
-
type?:
|
|
26
|
+
type?: TypeWithLiterals;
|
|
26
27
|
/**
|
|
27
28
|
* Branch name.
|
|
28
29
|
* @maxLength 50
|
|
29
30
|
*/
|
|
30
31
|
name?: string | null;
|
|
31
32
|
/** Source type. */
|
|
32
|
-
sourceType?:
|
|
33
|
+
sourceType?: SourceTypeWithLiterals;
|
|
33
34
|
/**
|
|
34
35
|
* Date and time the branch was last published, if relevant.
|
|
35
36
|
* @readonly
|
|
@@ -40,6 +41,11 @@ export interface Branch extends BranchSourceOneOf {
|
|
|
40
41
|
* @readonly
|
|
41
42
|
*/
|
|
42
43
|
editorType?: EditorType;
|
|
44
|
+
/**
|
|
45
|
+
* Default branch
|
|
46
|
+
* @readonly
|
|
47
|
+
*/
|
|
48
|
+
default?: boolean | null;
|
|
43
49
|
/**
|
|
44
50
|
* Date and time the branch was created.
|
|
45
51
|
* @readonly
|
|
@@ -57,13 +63,13 @@ export interface Branch extends BranchSourceOneOf {
|
|
|
57
63
|
extendedFields?: ExtendedFields;
|
|
58
64
|
}
|
|
59
65
|
/** @oneof */
|
|
60
|
-
|
|
66
|
+
interface BranchSourceOneOf {
|
|
61
67
|
/** Source branch properties. */
|
|
62
68
|
sourceBranchProperties?: SourceBranch;
|
|
63
69
|
/** Source template properties. */
|
|
64
70
|
sourceTemplateProperties?: SourceTemplate;
|
|
65
71
|
}
|
|
66
|
-
|
|
72
|
+
declare enum Type {
|
|
67
73
|
/** Unknown branch type. */
|
|
68
74
|
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
69
75
|
/** A branch created by a Wix user, that can be accessed for editing and publishing via the editor UI. */
|
|
@@ -73,7 +79,9 @@ export declare enum Type {
|
|
|
73
79
|
/** The original branch of the site, created when the site is created. Can be accessed for editing and publishing in the editor. */
|
|
74
80
|
ORIGINAL_BRANCH = "ORIGINAL_BRANCH"
|
|
75
81
|
}
|
|
76
|
-
|
|
82
|
+
/** @enumType */
|
|
83
|
+
type TypeWithLiterals = Type | 'UNKNOWN_TYPE' | 'USER' | 'TECHNICAL' | 'ORIGINAL_BRANCH';
|
|
84
|
+
declare enum SourceType {
|
|
77
85
|
/** Unknown source type. */
|
|
78
86
|
UNKNOWN_SOURCE_TYPE = "UNKNOWN_SOURCE_TYPE",
|
|
79
87
|
/** This branch's source was a branch. */
|
|
@@ -81,11 +89,13 @@ export declare enum SourceType {
|
|
|
81
89
|
/** This branch's source was a template. For internal use. */
|
|
82
90
|
SOURCE_TEMPLATE = "SOURCE_TEMPLATE"
|
|
83
91
|
}
|
|
84
|
-
|
|
92
|
+
/** @enumType */
|
|
93
|
+
type SourceTypeWithLiterals = SourceType | 'UNKNOWN_SOURCE_TYPE' | 'SOURCE_BRANCH' | 'SOURCE_TEMPLATE';
|
|
94
|
+
interface EditorType {
|
|
85
95
|
/** Editor type */
|
|
86
|
-
editorTypeOptions?:
|
|
96
|
+
editorTypeOptions?: EditorTypeOptionsWithLiterals;
|
|
87
97
|
}
|
|
88
|
-
|
|
98
|
+
declare enum EditorTypeOptions {
|
|
89
99
|
/** Unknown editor type */
|
|
90
100
|
UNKNOWN_EDITOR_TYPE = "UNKNOWN_EDITOR_TYPE",
|
|
91
101
|
/** STUDIO */
|
|
@@ -93,7 +103,9 @@ export declare enum EditorTypeOptions {
|
|
|
93
103
|
/** CLASSIC */
|
|
94
104
|
CLASSIC = "CLASSIC"
|
|
95
105
|
}
|
|
96
|
-
|
|
106
|
+
/** @enumType */
|
|
107
|
+
type EditorTypeOptionsWithLiterals = EditorTypeOptions | 'UNKNOWN_EDITOR_TYPE' | 'STUDIO' | 'CLASSIC';
|
|
108
|
+
interface SourceBranch {
|
|
97
109
|
/**
|
|
98
110
|
* Source branch ID.
|
|
99
111
|
* @format GUID
|
|
@@ -102,14 +114,14 @@ export interface SourceBranch {
|
|
|
102
114
|
/** Source branch revision. */
|
|
103
115
|
branchRevision?: string | null;
|
|
104
116
|
}
|
|
105
|
-
|
|
117
|
+
interface SourceTemplate {
|
|
106
118
|
/**
|
|
107
119
|
* Source template ID.
|
|
108
120
|
* @format GUID
|
|
109
121
|
*/
|
|
110
122
|
templateId?: string;
|
|
111
123
|
}
|
|
112
|
-
|
|
124
|
+
interface ExtendedFields {
|
|
113
125
|
/**
|
|
114
126
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
115
127
|
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
@@ -120,47 +132,47 @@ export interface ExtendedFields {
|
|
|
120
132
|
*/
|
|
121
133
|
namespaces?: Record<string, Record<string, any>>;
|
|
122
134
|
}
|
|
123
|
-
|
|
135
|
+
interface CreateBranchRequest {
|
|
124
136
|
/** Branch to be created. */
|
|
125
137
|
branch: Branch;
|
|
126
138
|
}
|
|
127
|
-
|
|
139
|
+
interface CreateBranchResponse {
|
|
128
140
|
/** Created branch. */
|
|
129
141
|
branch?: Branch;
|
|
130
142
|
}
|
|
131
|
-
|
|
143
|
+
interface GetBranchRequest {
|
|
132
144
|
/**
|
|
133
145
|
* ID of branch to retrieve.
|
|
134
146
|
* @format GUID
|
|
135
147
|
*/
|
|
136
148
|
branchId: string;
|
|
137
149
|
}
|
|
138
|
-
|
|
150
|
+
interface GetBranchResponse {
|
|
139
151
|
/** Requested branch. */
|
|
140
152
|
branch?: Branch;
|
|
141
153
|
}
|
|
142
|
-
|
|
154
|
+
interface UpdateBranchRequest {
|
|
143
155
|
/** Branch to be updated. */
|
|
144
156
|
branch: Branch;
|
|
145
157
|
}
|
|
146
|
-
|
|
158
|
+
interface UpdateBranchResponse {
|
|
147
159
|
/** Updated branch. */
|
|
148
160
|
branch?: Branch;
|
|
149
161
|
}
|
|
150
|
-
|
|
162
|
+
interface DeleteBranchRequest {
|
|
151
163
|
/**
|
|
152
164
|
* ID of branch to delete.
|
|
153
165
|
* @format GUID
|
|
154
166
|
*/
|
|
155
167
|
branchId: string;
|
|
156
168
|
}
|
|
157
|
-
|
|
169
|
+
interface DeleteBranchResponse {
|
|
158
170
|
}
|
|
159
|
-
|
|
171
|
+
interface QueryBranchesRequest {
|
|
160
172
|
/** WQL expression. */
|
|
161
173
|
query?: CursorQuery;
|
|
162
174
|
}
|
|
163
|
-
|
|
175
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
164
176
|
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
165
177
|
cursorPaging?: CursorPaging;
|
|
166
178
|
/**
|
|
@@ -192,24 +204,26 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
192
204
|
sort?: Sorting[];
|
|
193
205
|
}
|
|
194
206
|
/** @oneof */
|
|
195
|
-
|
|
207
|
+
interface CursorQueryPagingMethodOneOf {
|
|
196
208
|
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
197
209
|
cursorPaging?: CursorPaging;
|
|
198
210
|
}
|
|
199
|
-
|
|
211
|
+
interface Sorting {
|
|
200
212
|
/**
|
|
201
213
|
* Name of the field to sort by.
|
|
202
214
|
* @maxLength 512
|
|
203
215
|
*/
|
|
204
216
|
fieldName?: string;
|
|
205
217
|
/** Sort order. */
|
|
206
|
-
order?:
|
|
218
|
+
order?: SortOrderWithLiterals;
|
|
207
219
|
}
|
|
208
|
-
|
|
220
|
+
declare enum SortOrder {
|
|
209
221
|
ASC = "ASC",
|
|
210
222
|
DESC = "DESC"
|
|
211
223
|
}
|
|
212
|
-
|
|
224
|
+
/** @enumType */
|
|
225
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
226
|
+
interface CursorPaging {
|
|
213
227
|
/**
|
|
214
228
|
* Maximum number of items to return in the results.
|
|
215
229
|
* @max 100
|
|
@@ -224,13 +238,13 @@ export interface CursorPaging {
|
|
|
224
238
|
*/
|
|
225
239
|
cursor?: string | null;
|
|
226
240
|
}
|
|
227
|
-
|
|
241
|
+
interface QueryBranchesResponse {
|
|
228
242
|
/** List of branches. */
|
|
229
243
|
branches?: Branch[];
|
|
230
244
|
/** Paging metadata */
|
|
231
245
|
pagingMetadata?: CursorPagingMetadata;
|
|
232
246
|
}
|
|
233
|
-
|
|
247
|
+
interface CursorPagingMetadata {
|
|
234
248
|
/** Number of items returned in the response. */
|
|
235
249
|
count?: number | null;
|
|
236
250
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
@@ -243,7 +257,7 @@ export interface CursorPagingMetadata {
|
|
|
243
257
|
*/
|
|
244
258
|
hasNext?: boolean | null;
|
|
245
259
|
}
|
|
246
|
-
|
|
260
|
+
interface Cursors {
|
|
247
261
|
/**
|
|
248
262
|
* Cursor string pointing to the next page in the list of results.
|
|
249
263
|
* @maxLength 16000
|
|
@@ -255,7 +269,7 @@ export interface Cursors {
|
|
|
255
269
|
*/
|
|
256
270
|
prev?: string | null;
|
|
257
271
|
}
|
|
258
|
-
|
|
272
|
+
interface UpdateExtendedFieldsRequest {
|
|
259
273
|
/** ID of the entity to update. */
|
|
260
274
|
_id?: string;
|
|
261
275
|
/** Identifier for the app whose extended fields are being updated. */
|
|
@@ -263,11 +277,11 @@ export interface UpdateExtendedFieldsRequest {
|
|
|
263
277
|
/** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
|
|
264
278
|
namespaceData?: Record<string, any> | null;
|
|
265
279
|
}
|
|
266
|
-
|
|
280
|
+
interface UpdateExtendedFieldsResponse {
|
|
267
281
|
/** Updated branch. */
|
|
268
282
|
branch?: Branch;
|
|
269
283
|
}
|
|
270
|
-
|
|
284
|
+
interface HtmlSitePublished {
|
|
271
285
|
/**
|
|
272
286
|
* Application instance ID
|
|
273
287
|
* @maxLength 50
|
|
@@ -297,16 +311,16 @@ export interface HtmlSitePublished {
|
|
|
297
311
|
/** Site's publish date */
|
|
298
312
|
publishDate?: string;
|
|
299
313
|
}
|
|
300
|
-
|
|
314
|
+
interface Page {
|
|
301
315
|
/**
|
|
302
316
|
* Page's Id
|
|
303
317
|
* @maxLength 100
|
|
304
318
|
*/
|
|
305
319
|
_id?: string;
|
|
306
320
|
}
|
|
307
|
-
|
|
321
|
+
interface Empty {
|
|
308
322
|
}
|
|
309
|
-
|
|
323
|
+
interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
|
|
310
324
|
/** Emitted on a meta site creation. */
|
|
311
325
|
siteCreated?: SiteCreated;
|
|
312
326
|
/** Emitted on a meta site transfer completion. */
|
|
@@ -372,7 +386,7 @@ export interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
|
|
|
372
386
|
assets?: Asset[];
|
|
373
387
|
}
|
|
374
388
|
/** @oneof */
|
|
375
|
-
|
|
389
|
+
interface MetaSiteSpecialEventPayloadOneOf {
|
|
376
390
|
/** Emitted on a meta site creation. */
|
|
377
391
|
siteCreated?: SiteCreated;
|
|
378
392
|
/** Emitted on a meta site transfer completion. */
|
|
@@ -422,7 +436,7 @@ export interface MetaSiteSpecialEventPayloadOneOf {
|
|
|
422
436
|
/** Emitted when Picasso is detached. */
|
|
423
437
|
picassoUnassigned?: PicassoUnassigned;
|
|
424
438
|
}
|
|
425
|
-
|
|
439
|
+
interface Asset {
|
|
426
440
|
/**
|
|
427
441
|
* An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum).
|
|
428
442
|
* @maxLength 36
|
|
@@ -434,16 +448,18 @@ export interface Asset {
|
|
|
434
448
|
*/
|
|
435
449
|
instanceId?: string;
|
|
436
450
|
/** An application state. */
|
|
437
|
-
state?:
|
|
451
|
+
state?: StateWithLiterals;
|
|
438
452
|
}
|
|
439
|
-
|
|
453
|
+
declare enum State {
|
|
440
454
|
UNKNOWN = "UNKNOWN",
|
|
441
455
|
ENABLED = "ENABLED",
|
|
442
456
|
DISABLED = "DISABLED",
|
|
443
457
|
PENDING = "PENDING",
|
|
444
458
|
DEMO = "DEMO"
|
|
445
459
|
}
|
|
446
|
-
|
|
460
|
+
/** @enumType */
|
|
461
|
+
type StateWithLiterals = State | 'UNKNOWN' | 'ENABLED' | 'DISABLED' | 'PENDING' | 'DEMO';
|
|
462
|
+
interface SiteCreated {
|
|
447
463
|
/**
|
|
448
464
|
* A template identifier (empty if not created from a template).
|
|
449
465
|
* @maxLength 36
|
|
@@ -455,7 +471,7 @@ export interface SiteCreated {
|
|
|
455
471
|
*/
|
|
456
472
|
ownerId?: string;
|
|
457
473
|
/** A context in which meta site was created. */
|
|
458
|
-
context?:
|
|
474
|
+
context?: SiteCreatedContextWithLiterals;
|
|
459
475
|
/**
|
|
460
476
|
* A meta site id from which this site was created.
|
|
461
477
|
*
|
|
@@ -470,9 +486,9 @@ export interface SiteCreated {
|
|
|
470
486
|
*/
|
|
471
487
|
siteName?: string;
|
|
472
488
|
/** A namespace. */
|
|
473
|
-
namespace?:
|
|
489
|
+
namespace?: NamespaceWithLiterals;
|
|
474
490
|
}
|
|
475
|
-
|
|
491
|
+
declare enum SiteCreatedContext {
|
|
476
492
|
/** A valid option, we don't expose all reasons why site might be created. */
|
|
477
493
|
OTHER = "OTHER",
|
|
478
494
|
/** A meta site was created from template. */
|
|
@@ -486,7 +502,9 @@ export declare enum SiteCreatedContext {
|
|
|
486
502
|
/** deprecated A meta site was created for Flash editor. */
|
|
487
503
|
FLASH = "FLASH"
|
|
488
504
|
}
|
|
489
|
-
|
|
505
|
+
/** @enumType */
|
|
506
|
+
type SiteCreatedContextWithLiterals = SiteCreatedContext | 'OTHER' | 'FROM_TEMPLATE' | 'DUPLICATE_BY_SITE_TRANSFER' | 'DUPLICATE' | 'OLD_SITE_TRANSFER' | 'FLASH';
|
|
507
|
+
declare enum Namespace {
|
|
490
508
|
UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE",
|
|
491
509
|
/** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
|
|
492
510
|
WIX = "WIX",
|
|
@@ -566,10 +584,14 @@ export declare enum Namespace {
|
|
|
566
584
|
/** Standalone events (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
567
585
|
STANDALONE_EVENTS = "STANDALONE_EVENTS",
|
|
568
586
|
/** MIMIR - Siteless account for MIMIR Ai Job runner. */
|
|
569
|
-
MIMIR = "MIMIR"
|
|
587
|
+
MIMIR = "MIMIR",
|
|
588
|
+
/** Wix Twins platform. */
|
|
589
|
+
TWINS = "TWINS"
|
|
570
590
|
}
|
|
591
|
+
/** @enumType */
|
|
592
|
+
type NamespaceWithLiterals = Namespace | 'UNKNOWN_NAMESPACE' | 'WIX' | 'SHOUT_OUT' | 'ALBUMS' | 'WIX_STORES_TEST_DRIVE' | 'HOTELS' | 'CLUBS' | 'ONBOARDING_DRAFT' | 'DEV_SITE' | 'LOGOS' | 'VIDEO_MAKER' | 'PARTNER_DASHBOARD' | 'DEV_CENTER_COMPANY' | 'HTML_DRAFT' | 'SITELESS_BUSINESS' | 'CREATOR_ECONOMY' | 'DASHBOARD_FIRST' | 'ANYWHERE' | 'HEADLESS' | 'ACCOUNT_MASTER_CMS' | 'RISE' | 'BRANDED_FIRST' | 'NOWNIA' | 'UGC_TEMPLATE' | 'CODUX' | 'MEDIA_DESIGN_CREATOR' | 'SHARED_BLOG_ENTERPRISE' | 'STANDALONE_FORMS' | 'STANDALONE_EVENTS' | 'MIMIR' | 'TWINS';
|
|
571
593
|
/** Site transferred to another user. */
|
|
572
|
-
|
|
594
|
+
interface SiteTransferred {
|
|
573
595
|
/**
|
|
574
596
|
* A previous owner id (user that transfers meta site).
|
|
575
597
|
* @format GUID
|
|
@@ -582,15 +604,15 @@ export interface SiteTransferred {
|
|
|
582
604
|
newOwnerId?: string;
|
|
583
605
|
}
|
|
584
606
|
/** Soft deletion of the meta site. Could be restored. */
|
|
585
|
-
|
|
607
|
+
interface SiteDeleted {
|
|
586
608
|
/** A deletion context. */
|
|
587
609
|
deleteContext?: DeleteContext;
|
|
588
610
|
}
|
|
589
|
-
|
|
611
|
+
interface DeleteContext {
|
|
590
612
|
/** When the meta site was deleted. */
|
|
591
613
|
dateDeleted?: Date | null;
|
|
592
614
|
/** A status. */
|
|
593
|
-
deleteStatus?:
|
|
615
|
+
deleteStatus?: DeleteStatusWithLiterals;
|
|
594
616
|
/**
|
|
595
617
|
* A reason (flow).
|
|
596
618
|
* @maxLength 255
|
|
@@ -602,20 +624,22 @@ export interface DeleteContext {
|
|
|
602
624
|
*/
|
|
603
625
|
initiatorId?: string | null;
|
|
604
626
|
}
|
|
605
|
-
|
|
627
|
+
declare enum DeleteStatus {
|
|
606
628
|
UNKNOWN = "UNKNOWN",
|
|
607
629
|
TRASH = "TRASH",
|
|
608
630
|
DELETED = "DELETED",
|
|
609
631
|
PENDING_PURGE = "PENDING_PURGE",
|
|
610
632
|
PURGED_EXTERNALLY = "PURGED_EXTERNALLY"
|
|
611
633
|
}
|
|
634
|
+
/** @enumType */
|
|
635
|
+
type DeleteStatusWithLiterals = DeleteStatus | 'UNKNOWN' | 'TRASH' | 'DELETED' | 'PENDING_PURGE' | 'PURGED_EXTERNALLY';
|
|
612
636
|
/** Restoration of the meta site. */
|
|
613
|
-
|
|
637
|
+
interface SiteUndeleted {
|
|
614
638
|
}
|
|
615
639
|
/** First publish of a meta site. Or subsequent publish after unpublish. */
|
|
616
|
-
|
|
640
|
+
interface SitePublished {
|
|
617
641
|
}
|
|
618
|
-
|
|
642
|
+
interface SiteUnpublished {
|
|
619
643
|
/**
|
|
620
644
|
* A list of URLs previously associated with the meta site.
|
|
621
645
|
* @maxLength 4000
|
|
@@ -623,9 +647,9 @@ export interface SiteUnpublished {
|
|
|
623
647
|
*/
|
|
624
648
|
urls?: string[];
|
|
625
649
|
}
|
|
626
|
-
|
|
650
|
+
interface SiteMarkedAsTemplate {
|
|
627
651
|
}
|
|
628
|
-
|
|
652
|
+
interface SiteMarkedAsWixSite {
|
|
629
653
|
}
|
|
630
654
|
/**
|
|
631
655
|
* Represents a service provisioned a site.
|
|
@@ -642,7 +666,7 @@ export interface SiteMarkedAsWixSite {
|
|
|
642
666
|
* changes made to the original template afterward.
|
|
643
667
|
* To ensure this, the TPA on the template gets a new instance_id.
|
|
644
668
|
*/
|
|
645
|
-
|
|
669
|
+
interface ServiceProvisioned {
|
|
646
670
|
/**
|
|
647
671
|
* Either UUID or EmbeddedServiceType.
|
|
648
672
|
* @maxLength 36
|
|
@@ -669,7 +693,7 @@ export interface ServiceProvisioned {
|
|
|
669
693
|
*/
|
|
670
694
|
originMetaSiteId?: string | null;
|
|
671
695
|
}
|
|
672
|
-
|
|
696
|
+
interface ServiceRemoved {
|
|
673
697
|
/**
|
|
674
698
|
* Either UUID or EmbeddedServiceType.
|
|
675
699
|
* @maxLength 36
|
|
@@ -687,7 +711,7 @@ export interface ServiceRemoved {
|
|
|
687
711
|
version?: string | null;
|
|
688
712
|
}
|
|
689
713
|
/** Rename of the site. Meaning, free public url has been changed as well. */
|
|
690
|
-
|
|
714
|
+
interface SiteRenamed {
|
|
691
715
|
/**
|
|
692
716
|
* A new meta site name (URL slug).
|
|
693
717
|
* @maxLength 20
|
|
@@ -704,21 +728,21 @@ export interface SiteRenamed {
|
|
|
704
728
|
*
|
|
705
729
|
* Could not be restored. Therefore it's desirable to cleanup data.
|
|
706
730
|
*/
|
|
707
|
-
|
|
731
|
+
interface SiteHardDeleted {
|
|
708
732
|
/** A deletion context. */
|
|
709
733
|
deleteContext?: DeleteContext;
|
|
710
734
|
}
|
|
711
|
-
|
|
735
|
+
interface NamespaceChanged {
|
|
712
736
|
/** A previous namespace. */
|
|
713
|
-
oldNamespace?:
|
|
737
|
+
oldNamespace?: NamespaceWithLiterals;
|
|
714
738
|
/** A new namespace. */
|
|
715
|
-
newNamespace?:
|
|
739
|
+
newNamespace?: NamespaceWithLiterals;
|
|
716
740
|
}
|
|
717
741
|
/** Assigned Studio editor */
|
|
718
|
-
|
|
742
|
+
interface StudioAssigned {
|
|
719
743
|
}
|
|
720
744
|
/** Unassigned Studio editor */
|
|
721
|
-
|
|
745
|
+
interface StudioUnassigned {
|
|
722
746
|
}
|
|
723
747
|
/**
|
|
724
748
|
* Fired in case site URLs were changed in any way: new secondary domain, published, account slug rename, site rename etc.
|
|
@@ -728,13 +752,13 @@ export interface StudioUnassigned {
|
|
|
728
752
|
*
|
|
729
753
|
* https://bo.wix.com/wix-docs/rest/meta-site/meta-site---urls-service
|
|
730
754
|
*/
|
|
731
|
-
|
|
755
|
+
interface SiteUrlChanged {
|
|
732
756
|
}
|
|
733
757
|
/**
|
|
734
758
|
* Used at the end of the deletion flow for both draft sites and when a user deletes a site.
|
|
735
759
|
* Consumed by other teams to remove relevant data.
|
|
736
760
|
*/
|
|
737
|
-
|
|
761
|
+
interface SitePurgedExternally {
|
|
738
762
|
/**
|
|
739
763
|
* @maxLength 2048
|
|
740
764
|
* @maxSize 100
|
|
@@ -744,18 +768,35 @@ export interface SitePurgedExternally {
|
|
|
744
768
|
appDefId?: string[];
|
|
745
769
|
}
|
|
746
770
|
/** Assigned Odeditor */
|
|
747
|
-
|
|
771
|
+
interface OdeditorAssigned {
|
|
748
772
|
}
|
|
749
773
|
/** Unassigned Odeditor */
|
|
750
|
-
|
|
774
|
+
interface OdeditorUnassigned {
|
|
751
775
|
}
|
|
752
776
|
/** Assigned Picasso editor */
|
|
753
|
-
|
|
777
|
+
interface PicassoAssigned {
|
|
754
778
|
}
|
|
755
779
|
/** Unassigned Picasso */
|
|
756
|
-
|
|
780
|
+
interface PicassoUnassigned {
|
|
781
|
+
}
|
|
782
|
+
interface SetDefaultBranchRequest {
|
|
783
|
+
/**
|
|
784
|
+
* Branch Id.
|
|
785
|
+
* @format GUID
|
|
786
|
+
*/
|
|
787
|
+
branchId: string;
|
|
788
|
+
}
|
|
789
|
+
interface SetDefaultBranchResponse {
|
|
790
|
+
/** Updated branch. */
|
|
791
|
+
branch?: Branch;
|
|
792
|
+
}
|
|
793
|
+
interface GetDefaultBranchRequest {
|
|
794
|
+
}
|
|
795
|
+
interface GetDefaultBranchResponse {
|
|
796
|
+
/** Default branch. */
|
|
797
|
+
branch?: Branch;
|
|
757
798
|
}
|
|
758
|
-
|
|
799
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
759
800
|
createdEvent?: EntityCreatedEvent;
|
|
760
801
|
updatedEvent?: EntityUpdatedEvent;
|
|
761
802
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -790,19 +831,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
790
831
|
entityEventSequence?: string | null;
|
|
791
832
|
}
|
|
792
833
|
/** @oneof */
|
|
793
|
-
|
|
834
|
+
interface DomainEventBodyOneOf {
|
|
794
835
|
createdEvent?: EntityCreatedEvent;
|
|
795
836
|
updatedEvent?: EntityUpdatedEvent;
|
|
796
837
|
deletedEvent?: EntityDeletedEvent;
|
|
797
838
|
actionEvent?: ActionEvent;
|
|
798
839
|
}
|
|
799
|
-
|
|
840
|
+
interface EntityCreatedEvent {
|
|
800
841
|
entity?: string;
|
|
801
842
|
}
|
|
802
|
-
|
|
843
|
+
interface RestoreInfo {
|
|
803
844
|
deletedDate?: Date | null;
|
|
804
845
|
}
|
|
805
|
-
|
|
846
|
+
interface EntityUpdatedEvent {
|
|
806
847
|
/**
|
|
807
848
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
808
849
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -810,14 +851,14 @@ export interface EntityUpdatedEvent {
|
|
|
810
851
|
*/
|
|
811
852
|
currentEntity?: string;
|
|
812
853
|
}
|
|
813
|
-
|
|
854
|
+
interface EntityDeletedEvent {
|
|
814
855
|
/** Entity that was deleted. */
|
|
815
856
|
deletedEntity?: string | null;
|
|
816
857
|
}
|
|
817
|
-
|
|
858
|
+
interface ActionEvent {
|
|
818
859
|
body?: string;
|
|
819
860
|
}
|
|
820
|
-
|
|
861
|
+
interface MessageEnvelope {
|
|
821
862
|
/**
|
|
822
863
|
* App instance ID.
|
|
823
864
|
* @format GUID
|
|
@@ -833,7 +874,7 @@ export interface MessageEnvelope {
|
|
|
833
874
|
/** Stringify payload. */
|
|
834
875
|
data?: string;
|
|
835
876
|
}
|
|
836
|
-
|
|
877
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
837
878
|
/**
|
|
838
879
|
* ID of a site visitor that has not logged in to the site.
|
|
839
880
|
* @format GUID
|
|
@@ -855,10 +896,10 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
855
896
|
*/
|
|
856
897
|
appId?: string;
|
|
857
898
|
/** @readonly */
|
|
858
|
-
identityType?:
|
|
899
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
859
900
|
}
|
|
860
901
|
/** @oneof */
|
|
861
|
-
|
|
902
|
+
interface IdentificationDataIdOneOf {
|
|
862
903
|
/**
|
|
863
904
|
* ID of a site visitor that has not logged in to the site.
|
|
864
905
|
* @format GUID
|
|
@@ -880,14 +921,58 @@ export interface IdentificationDataIdOneOf {
|
|
|
880
921
|
*/
|
|
881
922
|
appId?: string;
|
|
882
923
|
}
|
|
883
|
-
|
|
924
|
+
declare enum WebhookIdentityType {
|
|
884
925
|
UNKNOWN = "UNKNOWN",
|
|
885
926
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
886
927
|
MEMBER = "MEMBER",
|
|
887
928
|
WIX_USER = "WIX_USER",
|
|
888
929
|
APP = "APP"
|
|
889
930
|
}
|
|
890
|
-
|
|
931
|
+
/** @enumType */
|
|
932
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
933
|
+
/** @docsIgnore */
|
|
934
|
+
type CreateBranchApplicationErrors = {
|
|
935
|
+
code?: 'SOURCE_BRANCH_NOT_FOUND';
|
|
936
|
+
description?: string;
|
|
937
|
+
data?: Record<string, any>;
|
|
938
|
+
} | {
|
|
939
|
+
code?: 'TEMPLATE_ID_NOT_SUPPORTED';
|
|
940
|
+
description?: string;
|
|
941
|
+
data?: Record<string, any>;
|
|
942
|
+
} | {
|
|
943
|
+
code?: 'ORIGINAL_BRANCH_ALREADY_EXISTS';
|
|
944
|
+
description?: string;
|
|
945
|
+
data?: Record<string, any>;
|
|
946
|
+
} | {
|
|
947
|
+
code?: 'TARGET_BRANCH_SITE_HEADER_ALREADY_EXISTS';
|
|
948
|
+
description?: string;
|
|
949
|
+
data?: Record<string, any>;
|
|
950
|
+
} | {
|
|
951
|
+
code?: 'ILLEGAL_SOURCE_TYPE';
|
|
952
|
+
description?: string;
|
|
953
|
+
data?: Record<string, any>;
|
|
954
|
+
} | {
|
|
955
|
+
code?: 'SOURCE_USER_BRANCH_NOT_EXISTS';
|
|
956
|
+
description?: string;
|
|
957
|
+
data?: Record<string, any>;
|
|
958
|
+
};
|
|
959
|
+
/** @docsIgnore */
|
|
960
|
+
type UpdateBranchApplicationErrors = {
|
|
961
|
+
code?: 'FORBIDDEN_UPDATE_ORIGINAL_BRANCH_TYPE';
|
|
962
|
+
description?: string;
|
|
963
|
+
data?: Record<string, any>;
|
|
964
|
+
};
|
|
965
|
+
/** @docsIgnore */
|
|
966
|
+
type DeleteBranchApplicationErrors = {
|
|
967
|
+
code?: 'BRANCH_NOT_FOUND';
|
|
968
|
+
description?: string;
|
|
969
|
+
data?: Record<string, any>;
|
|
970
|
+
} | {
|
|
971
|
+
code?: 'FORBIDDEN_DELETE_ORIGINAL_BRANCH';
|
|
972
|
+
description?: string;
|
|
973
|
+
data?: Record<string, any>;
|
|
974
|
+
};
|
|
975
|
+
interface BaseEventMetadata {
|
|
891
976
|
/**
|
|
892
977
|
* App instance ID.
|
|
893
978
|
* @format GUID
|
|
@@ -901,7 +986,7 @@ export interface BaseEventMetadata {
|
|
|
901
986
|
/** The identification type and identity data. */
|
|
902
987
|
identity?: IdentificationData;
|
|
903
988
|
}
|
|
904
|
-
|
|
989
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
905
990
|
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
906
991
|
_id?: string;
|
|
907
992
|
/**
|
|
@@ -931,7 +1016,7 @@ export interface EventMetadata extends BaseEventMetadata {
|
|
|
931
1016
|
*/
|
|
932
1017
|
entityEventSequence?: string | null;
|
|
933
1018
|
}
|
|
934
|
-
|
|
1019
|
+
interface BranchCreatedEnvelope {
|
|
935
1020
|
entity: Branch;
|
|
936
1021
|
metadata: EventMetadata;
|
|
937
1022
|
}
|
|
@@ -940,8 +1025,8 @@ export interface BranchCreatedEnvelope {
|
|
|
940
1025
|
* @eventType wix.editor.branches.v1.branch_created
|
|
941
1026
|
* @slug created
|
|
942
1027
|
*/
|
|
943
|
-
|
|
944
|
-
|
|
1028
|
+
declare function onBranchCreated(handler: (event: BranchCreatedEnvelope) => void | Promise<void>): void;
|
|
1029
|
+
interface BranchDeletedEnvelope {
|
|
945
1030
|
entity: Branch;
|
|
946
1031
|
metadata: EventMetadata;
|
|
947
1032
|
}
|
|
@@ -950,8 +1035,8 @@ export interface BranchDeletedEnvelope {
|
|
|
950
1035
|
* @eventType wix.editor.branches.v1.branch_deleted
|
|
951
1036
|
* @slug deleted
|
|
952
1037
|
*/
|
|
953
|
-
|
|
954
|
-
|
|
1038
|
+
declare function onBranchDeleted(handler: (event: BranchDeletedEnvelope) => void | Promise<void>): void;
|
|
1039
|
+
interface BranchUpdatedEnvelope {
|
|
955
1040
|
entity: Branch;
|
|
956
1041
|
metadata: EventMetadata;
|
|
957
1042
|
}
|
|
@@ -960,8 +1045,7 @@ export interface BranchUpdatedEnvelope {
|
|
|
960
1045
|
* @eventType wix.editor.branches.v1.branch_updated
|
|
961
1046
|
* @slug updated
|
|
962
1047
|
*/
|
|
963
|
-
|
|
964
|
-
type BranchNonNullablePaths = `sourceBranchProperties.branchId` | `sourceTemplateProperties.templateId` | `type` | `sourceType` | `editorType.editorTypeOptions`;
|
|
1048
|
+
declare function onBranchUpdated(handler: (event: BranchUpdatedEnvelope) => void | Promise<void>): void;
|
|
965
1049
|
/**
|
|
966
1050
|
* Creates a branch.
|
|
967
1051
|
* If a source branch is not provided, the branch will include a blank website.
|
|
@@ -973,7 +1057,9 @@ type BranchNonNullablePaths = `sourceBranchProperties.branchId` | `sourceTemplat
|
|
|
973
1057
|
* @returns Created branch.
|
|
974
1058
|
* @fqn wix.editor.branches.v1.BranchesService.CreateBranch
|
|
975
1059
|
*/
|
|
976
|
-
|
|
1060
|
+
declare function createBranch(branch: Branch): Promise<NonNullablePaths<Branch, `sourceBranchProperties.branchId` | `sourceTemplateProperties.templateId` | `type` | `sourceType` | `editorType.editorTypeOptions`, 3> & {
|
|
1061
|
+
__applicationErrorsType?: CreateBranchApplicationErrors;
|
|
1062
|
+
}>;
|
|
977
1063
|
/**
|
|
978
1064
|
* Retrieves a branch.
|
|
979
1065
|
* @param branchId - ID of branch to retrieve.
|
|
@@ -984,7 +1070,7 @@ export declare function createBranch(branch: Branch): Promise<NonNullablePaths<B
|
|
|
984
1070
|
* @returns Requested branch.
|
|
985
1071
|
* @fqn wix.editor.branches.v1.BranchesService.GetBranch
|
|
986
1072
|
*/
|
|
987
|
-
|
|
1073
|
+
declare function getBranch(branchId: string): Promise<NonNullablePaths<Branch, `sourceBranchProperties.branchId` | `sourceTemplateProperties.templateId` | `type` | `sourceType` | `editorType.editorTypeOptions`, 3>>;
|
|
988
1074
|
/**
|
|
989
1075
|
* Updates a branch.
|
|
990
1076
|
*
|
|
@@ -999,8 +1085,10 @@ export declare function getBranch(branchId: string): Promise<NonNullablePaths<Br
|
|
|
999
1085
|
* @returns Updated branch.
|
|
1000
1086
|
* @fqn wix.editor.branches.v1.BranchesService.UpdateBranch
|
|
1001
1087
|
*/
|
|
1002
|
-
|
|
1003
|
-
|
|
1088
|
+
declare function updateBranch(_id: string, branch: NonNullablePaths<UpdateBranch, `revision`, 2>): Promise<NonNullablePaths<Branch, `sourceBranchProperties.branchId` | `sourceTemplateProperties.templateId` | `type` | `sourceType` | `editorType.editorTypeOptions`, 3> & {
|
|
1089
|
+
__applicationErrorsType?: UpdateBranchApplicationErrors;
|
|
1090
|
+
}>;
|
|
1091
|
+
interface UpdateBranch {
|
|
1004
1092
|
/** Source branch properties. */
|
|
1005
1093
|
sourceBranchProperties?: SourceBranch;
|
|
1006
1094
|
/** Source template properties. */
|
|
@@ -1019,14 +1107,14 @@ export interface UpdateBranch {
|
|
|
1019
1107
|
*/
|
|
1020
1108
|
revision?: string | null;
|
|
1021
1109
|
/** Branch type. */
|
|
1022
|
-
type?:
|
|
1110
|
+
type?: TypeWithLiterals;
|
|
1023
1111
|
/**
|
|
1024
1112
|
* Branch name.
|
|
1025
1113
|
* @maxLength 50
|
|
1026
1114
|
*/
|
|
1027
1115
|
name?: string | null;
|
|
1028
1116
|
/** Source type. */
|
|
1029
|
-
sourceType?:
|
|
1117
|
+
sourceType?: SourceTypeWithLiterals;
|
|
1030
1118
|
/**
|
|
1031
1119
|
* Date and time the branch was last published, if relevant.
|
|
1032
1120
|
* @readonly
|
|
@@ -1037,6 +1125,11 @@ export interface UpdateBranch {
|
|
|
1037
1125
|
* @readonly
|
|
1038
1126
|
*/
|
|
1039
1127
|
editorType?: EditorType;
|
|
1128
|
+
/**
|
|
1129
|
+
* Default branch
|
|
1130
|
+
* @readonly
|
|
1131
|
+
*/
|
|
1132
|
+
default?: boolean | null;
|
|
1040
1133
|
/**
|
|
1041
1134
|
* Date and time the branch was created.
|
|
1042
1135
|
* @readonly
|
|
@@ -1062,7 +1155,9 @@ export interface UpdateBranch {
|
|
|
1062
1155
|
* @permissionId EDITOR.BRANCH_DELETE
|
|
1063
1156
|
* @fqn wix.editor.branches.v1.BranchesService.DeleteBranch
|
|
1064
1157
|
*/
|
|
1065
|
-
|
|
1158
|
+
declare function deleteBranch(branchId: string): Promise<void & {
|
|
1159
|
+
__applicationErrorsType?: DeleteBranchApplicationErrors;
|
|
1160
|
+
}>;
|
|
1066
1161
|
/**
|
|
1067
1162
|
* Retrieves a list of branches, given the specified [paging, filtering, and sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language).
|
|
1068
1163
|
* @public
|
|
@@ -1070,7 +1165,7 @@ export declare function deleteBranch(branchId: string): Promise<void>;
|
|
|
1070
1165
|
* @permissionId EDITOR.BRANCH_READ
|
|
1071
1166
|
* @fqn wix.editor.branches.v1.BranchesService.QueryBranches
|
|
1072
1167
|
*/
|
|
1073
|
-
|
|
1168
|
+
declare function queryBranches(): BranchesQueryBuilder;
|
|
1074
1169
|
interface QueryCursorResult {
|
|
1075
1170
|
cursors: Cursors;
|
|
1076
1171
|
hasNext: () => boolean;
|
|
@@ -1078,13 +1173,13 @@ interface QueryCursorResult {
|
|
|
1078
1173
|
length: number;
|
|
1079
1174
|
pageSize: number;
|
|
1080
1175
|
}
|
|
1081
|
-
|
|
1176
|
+
interface BranchesQueryResult extends QueryCursorResult {
|
|
1082
1177
|
items: Branch[];
|
|
1083
1178
|
query: BranchesQueryBuilder;
|
|
1084
1179
|
next: () => Promise<BranchesQueryResult>;
|
|
1085
1180
|
prev: () => Promise<BranchesQueryResult>;
|
|
1086
1181
|
}
|
|
1087
|
-
|
|
1182
|
+
interface BranchesQueryBuilder {
|
|
1088
1183
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1089
1184
|
* @param value - Value to compare against.
|
|
1090
1185
|
* @documentationMaturity preview
|
|
@@ -1099,22 +1194,22 @@ export interface BranchesQueryBuilder {
|
|
|
1099
1194
|
* @param value - Value to compare against.
|
|
1100
1195
|
* @documentationMaturity preview
|
|
1101
1196
|
*/
|
|
1102
|
-
ge: (propertyName: 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
|
|
1197
|
+
ge: (propertyName: 'name' | 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
|
|
1103
1198
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1104
1199
|
* @param value - Value to compare against.
|
|
1105
1200
|
* @documentationMaturity preview
|
|
1106
1201
|
*/
|
|
1107
|
-
gt: (propertyName: 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
|
|
1202
|
+
gt: (propertyName: 'name' | 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
|
|
1108
1203
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1109
1204
|
* @param value - Value to compare against.
|
|
1110
1205
|
* @documentationMaturity preview
|
|
1111
1206
|
*/
|
|
1112
|
-
le: (propertyName: 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
|
|
1207
|
+
le: (propertyName: 'name' | 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
|
|
1113
1208
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1114
1209
|
* @param value - Value to compare against.
|
|
1115
1210
|
* @documentationMaturity preview
|
|
1116
1211
|
*/
|
|
1117
|
-
lt: (propertyName: 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
|
|
1212
|
+
lt: (propertyName: 'name' | 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
|
|
1118
1213
|
/** @param propertyName - Property whose value is compared with `string`.
|
|
1119
1214
|
* @param string - String to compare against. Case-insensitive.
|
|
1120
1215
|
* @documentationMaturity preview
|
|
@@ -1148,4 +1243,23 @@ export interface BranchesQueryBuilder {
|
|
|
1148
1243
|
/** @documentationMaturity preview */
|
|
1149
1244
|
find: () => Promise<BranchesQueryResult>;
|
|
1150
1245
|
}
|
|
1151
|
-
|
|
1246
|
+
/**
|
|
1247
|
+
* Set branch as the default branch.
|
|
1248
|
+
* @param branchId - Branch Id.
|
|
1249
|
+
* @public
|
|
1250
|
+
* @documentationMaturity preview
|
|
1251
|
+
* @requiredField branchId
|
|
1252
|
+
* @permissionId EDITOR.SET_DEFAULT_BRANCH
|
|
1253
|
+
* @fqn wix.editor.branches.v1.BranchesService.SetDefaultBranch
|
|
1254
|
+
*/
|
|
1255
|
+
declare function setDefaultBranch(branchId: string): Promise<NonNullablePaths<SetDefaultBranchResponse, `branch.sourceBranchProperties.branchId` | `branch.sourceTemplateProperties.templateId` | `branch.type` | `branch.sourceType` | `branch.editorType.editorTypeOptions`, 4>>;
|
|
1256
|
+
/**
|
|
1257
|
+
* Get default branch.
|
|
1258
|
+
* @public
|
|
1259
|
+
* @documentationMaturity preview
|
|
1260
|
+
* @permissionId EDITOR.BRANCH_READ
|
|
1261
|
+
* @fqn wix.editor.branches.v1.BranchesService.GetDefaultBranch
|
|
1262
|
+
*/
|
|
1263
|
+
declare function getDefaultBranch(): Promise<NonNullablePaths<GetDefaultBranchResponse, `branch.sourceBranchProperties.branchId` | `branch.sourceTemplateProperties.templateId` | `branch.type` | `branch.sourceType` | `branch.editorType.editorTypeOptions`, 4>>;
|
|
1264
|
+
|
|
1265
|
+
export { type ActionEvent, type Asset, type BaseEventMetadata, type Branch, type BranchCreatedEnvelope, type BranchDeletedEnvelope, type BranchSourceOneOf, type BranchUpdatedEnvelope, type BranchesQueryBuilder, type BranchesQueryResult, type CreateBranchApplicationErrors, type CreateBranchRequest, type CreateBranchResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteBranchApplicationErrors, type DeleteBranchRequest, type DeleteBranchResponse, type DeleteContext, DeleteStatus, type DeleteStatusWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type EditorType, EditorTypeOptions, type EditorTypeOptionsWithLiterals, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GetBranchRequest, type GetBranchResponse, type GetDefaultBranchRequest, type GetDefaultBranchResponse, type HtmlSitePublished, type IdentificationData, type IdentificationDataIdOneOf, type MessageEnvelope, type MetaSiteSpecialEvent, type MetaSiteSpecialEventPayloadOneOf, Namespace, type NamespaceChanged, type NamespaceWithLiterals, type OdeditorAssigned, type OdeditorUnassigned, type Page, type PicassoAssigned, type PicassoUnassigned, type QueryBranchesRequest, type QueryBranchesResponse, type RestoreInfo, type ServiceProvisioned, type ServiceRemoved, type SetDefaultBranchRequest, type SetDefaultBranchResponse, type SiteCreated, SiteCreatedContext, type SiteCreatedContextWithLiterals, type SiteDeleted, type SiteHardDeleted, type SiteMarkedAsTemplate, type SiteMarkedAsWixSite, type SitePublished, type SitePurgedExternally, type SiteRenamed, type SiteTransferred, type SiteUndeleted, type SiteUnpublished, type SiteUrlChanged, SortOrder, type SortOrderWithLiterals, type Sorting, type SourceBranch, type SourceTemplate, SourceType, type SourceTypeWithLiterals, State, type StateWithLiterals, type StudioAssigned, type StudioUnassigned, Type, type TypeWithLiterals, type UpdateBranch, type UpdateBranchApplicationErrors, type UpdateBranchRequest, type UpdateBranchResponse, type UpdateExtendedFieldsRequest, type UpdateExtendedFieldsResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createBranch, deleteBranch, getBranch, getDefaultBranch, onBranchCreated, onBranchDeleted, onBranchUpdated, queryBranches, setDefaultBranch, updateBranch };
|