@wix/auto_sdk_editor-branches_branches 1.0.11 → 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} +156 -109
- 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} +156 -109
- 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 -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
|
@@ -1 +1,1265 @@
|
|
|
1
|
-
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A branch is a version of draft site content that can be edited independently. Also known as a test site.
|
|
5
|
+
* Read more about branches in this [article](https://support.wix.com/en/article/about-test-sites).
|
|
6
|
+
*/
|
|
7
|
+
interface Branch extends BranchSourceOneOf {
|
|
8
|
+
/** Source branch properties. */
|
|
9
|
+
sourceBranchProperties?: SourceBranch;
|
|
10
|
+
/** Source template properties. */
|
|
11
|
+
sourceTemplateProperties?: SourceTemplate;
|
|
12
|
+
/**
|
|
13
|
+
* Branch ID.
|
|
14
|
+
* @format GUID
|
|
15
|
+
* @readonly
|
|
16
|
+
*/
|
|
17
|
+
_id?: string | null;
|
|
18
|
+
/**
|
|
19
|
+
* Revision number, which increments by 1 each time the branch is updated.
|
|
20
|
+
* To prevent conflicting changes,
|
|
21
|
+
* the current revision must be passed when updating the branch.
|
|
22
|
+
* @readonly
|
|
23
|
+
*/
|
|
24
|
+
revision?: string | null;
|
|
25
|
+
/** Branch type. */
|
|
26
|
+
type?: TypeWithLiterals;
|
|
27
|
+
/**
|
|
28
|
+
* Branch name.
|
|
29
|
+
* @maxLength 50
|
|
30
|
+
*/
|
|
31
|
+
name?: string | null;
|
|
32
|
+
/** Source type. */
|
|
33
|
+
sourceType?: SourceTypeWithLiterals;
|
|
34
|
+
/**
|
|
35
|
+
* Date and time the branch was last published, if relevant.
|
|
36
|
+
* @readonly
|
|
37
|
+
*/
|
|
38
|
+
lastPublishDate?: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* Editor type.
|
|
41
|
+
* @readonly
|
|
42
|
+
*/
|
|
43
|
+
editorType?: EditorType;
|
|
44
|
+
/**
|
|
45
|
+
* Default branch
|
|
46
|
+
* @readonly
|
|
47
|
+
*/
|
|
48
|
+
default?: boolean | null;
|
|
49
|
+
/**
|
|
50
|
+
* Date and time the branch was created.
|
|
51
|
+
* @readonly
|
|
52
|
+
*/
|
|
53
|
+
_createdDate?: Date | null;
|
|
54
|
+
/**
|
|
55
|
+
* Date and time the branch was last updated.
|
|
56
|
+
* @readonly
|
|
57
|
+
*/
|
|
58
|
+
_updatedDate?: Date | null;
|
|
59
|
+
/**
|
|
60
|
+
* Custom field data for the branch.
|
|
61
|
+
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
|
|
62
|
+
*/
|
|
63
|
+
extendedFields?: ExtendedFields;
|
|
64
|
+
}
|
|
65
|
+
/** @oneof */
|
|
66
|
+
interface BranchSourceOneOf {
|
|
67
|
+
/** Source branch properties. */
|
|
68
|
+
sourceBranchProperties?: SourceBranch;
|
|
69
|
+
/** Source template properties. */
|
|
70
|
+
sourceTemplateProperties?: SourceTemplate;
|
|
71
|
+
}
|
|
72
|
+
declare enum Type {
|
|
73
|
+
/** Unknown branch type. */
|
|
74
|
+
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
75
|
+
/** A branch created by a Wix user, that can be accessed for editing and publishing via the editor UI. */
|
|
76
|
+
USER = "USER",
|
|
77
|
+
/** A branch created for technical purposes, unrelated to the Wix user. For internal use, can't be accessed via the editor UI. */
|
|
78
|
+
TECHNICAL = "TECHNICAL",
|
|
79
|
+
/** The original branch of the site, created when the site is created. Can be accessed for editing and publishing in the editor. */
|
|
80
|
+
ORIGINAL_BRANCH = "ORIGINAL_BRANCH"
|
|
81
|
+
}
|
|
82
|
+
/** @enumType */
|
|
83
|
+
type TypeWithLiterals = Type | 'UNKNOWN_TYPE' | 'USER' | 'TECHNICAL' | 'ORIGINAL_BRANCH';
|
|
84
|
+
declare enum SourceType {
|
|
85
|
+
/** Unknown source type. */
|
|
86
|
+
UNKNOWN_SOURCE_TYPE = "UNKNOWN_SOURCE_TYPE",
|
|
87
|
+
/** This branch's source was a branch. */
|
|
88
|
+
SOURCE_BRANCH = "SOURCE_BRANCH",
|
|
89
|
+
/** This branch's source was a template. For internal use. */
|
|
90
|
+
SOURCE_TEMPLATE = "SOURCE_TEMPLATE"
|
|
91
|
+
}
|
|
92
|
+
/** @enumType */
|
|
93
|
+
type SourceTypeWithLiterals = SourceType | 'UNKNOWN_SOURCE_TYPE' | 'SOURCE_BRANCH' | 'SOURCE_TEMPLATE';
|
|
94
|
+
interface EditorType {
|
|
95
|
+
/** Editor type */
|
|
96
|
+
editorTypeOptions?: EditorTypeOptionsWithLiterals;
|
|
97
|
+
}
|
|
98
|
+
declare enum EditorTypeOptions {
|
|
99
|
+
/** Unknown editor type */
|
|
100
|
+
UNKNOWN_EDITOR_TYPE = "UNKNOWN_EDITOR_TYPE",
|
|
101
|
+
/** STUDIO */
|
|
102
|
+
STUDIO = "STUDIO",
|
|
103
|
+
/** CLASSIC */
|
|
104
|
+
CLASSIC = "CLASSIC"
|
|
105
|
+
}
|
|
106
|
+
/** @enumType */
|
|
107
|
+
type EditorTypeOptionsWithLiterals = EditorTypeOptions | 'UNKNOWN_EDITOR_TYPE' | 'STUDIO' | 'CLASSIC';
|
|
108
|
+
interface SourceBranch {
|
|
109
|
+
/**
|
|
110
|
+
* Source branch ID.
|
|
111
|
+
* @format GUID
|
|
112
|
+
*/
|
|
113
|
+
branchId?: string;
|
|
114
|
+
/** Source branch revision. */
|
|
115
|
+
branchRevision?: string | null;
|
|
116
|
+
}
|
|
117
|
+
interface SourceTemplate {
|
|
118
|
+
/**
|
|
119
|
+
* Source template ID.
|
|
120
|
+
* @format GUID
|
|
121
|
+
*/
|
|
122
|
+
templateId?: string;
|
|
123
|
+
}
|
|
124
|
+
interface ExtendedFields {
|
|
125
|
+
/**
|
|
126
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
127
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
128
|
+
*
|
|
129
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
130
|
+
*
|
|
131
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
132
|
+
*/
|
|
133
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
134
|
+
}
|
|
135
|
+
interface CreateBranchRequest {
|
|
136
|
+
/** Branch to be created. */
|
|
137
|
+
branch: Branch;
|
|
138
|
+
}
|
|
139
|
+
interface CreateBranchResponse {
|
|
140
|
+
/** Created branch. */
|
|
141
|
+
branch?: Branch;
|
|
142
|
+
}
|
|
143
|
+
interface GetBranchRequest {
|
|
144
|
+
/**
|
|
145
|
+
* ID of branch to retrieve.
|
|
146
|
+
* @format GUID
|
|
147
|
+
*/
|
|
148
|
+
branchId: string;
|
|
149
|
+
}
|
|
150
|
+
interface GetBranchResponse {
|
|
151
|
+
/** Requested branch. */
|
|
152
|
+
branch?: Branch;
|
|
153
|
+
}
|
|
154
|
+
interface UpdateBranchRequest {
|
|
155
|
+
/** Branch to be updated. */
|
|
156
|
+
branch: Branch;
|
|
157
|
+
}
|
|
158
|
+
interface UpdateBranchResponse {
|
|
159
|
+
/** Updated branch. */
|
|
160
|
+
branch?: Branch;
|
|
161
|
+
}
|
|
162
|
+
interface DeleteBranchRequest {
|
|
163
|
+
/**
|
|
164
|
+
* ID of branch to delete.
|
|
165
|
+
* @format GUID
|
|
166
|
+
*/
|
|
167
|
+
branchId: string;
|
|
168
|
+
}
|
|
169
|
+
interface DeleteBranchResponse {
|
|
170
|
+
}
|
|
171
|
+
interface QueryBranchesRequest {
|
|
172
|
+
/** WQL expression. */
|
|
173
|
+
query?: CursorQuery;
|
|
174
|
+
}
|
|
175
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
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`. */
|
|
177
|
+
cursorPaging?: CursorPaging;
|
|
178
|
+
/**
|
|
179
|
+
* Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"}}`.
|
|
180
|
+
*
|
|
181
|
+
* Filterable fields:
|
|
182
|
+
*
|
|
183
|
+
* `type`
|
|
184
|
+
* `name`
|
|
185
|
+
* `updatedDate`
|
|
186
|
+
* `createdDate`
|
|
187
|
+
* `lastPublishDate`
|
|
188
|
+
* `sourceBranchProperties.branchId`
|
|
189
|
+
* `sourceBranchProperties.branchRevision`
|
|
190
|
+
*
|
|
191
|
+
* All operators are valid.
|
|
192
|
+
*/
|
|
193
|
+
filter?: Record<string, any> | null;
|
|
194
|
+
/**
|
|
195
|
+
* Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`.
|
|
196
|
+
*
|
|
197
|
+
* Sortable fields:
|
|
198
|
+
*
|
|
199
|
+
* `updatedDate`
|
|
200
|
+
* `createdDate`
|
|
201
|
+
* `lastPublishDate`
|
|
202
|
+
* @maxSize 5
|
|
203
|
+
*/
|
|
204
|
+
sort?: Sorting[];
|
|
205
|
+
}
|
|
206
|
+
/** @oneof */
|
|
207
|
+
interface CursorQueryPagingMethodOneOf {
|
|
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`. */
|
|
209
|
+
cursorPaging?: CursorPaging;
|
|
210
|
+
}
|
|
211
|
+
interface Sorting {
|
|
212
|
+
/**
|
|
213
|
+
* Name of the field to sort by.
|
|
214
|
+
* @maxLength 512
|
|
215
|
+
*/
|
|
216
|
+
fieldName?: string;
|
|
217
|
+
/** Sort order. */
|
|
218
|
+
order?: SortOrderWithLiterals;
|
|
219
|
+
}
|
|
220
|
+
declare enum SortOrder {
|
|
221
|
+
ASC = "ASC",
|
|
222
|
+
DESC = "DESC"
|
|
223
|
+
}
|
|
224
|
+
/** @enumType */
|
|
225
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
226
|
+
interface CursorPaging {
|
|
227
|
+
/**
|
|
228
|
+
* Maximum number of items to return in the results.
|
|
229
|
+
* @max 100
|
|
230
|
+
*/
|
|
231
|
+
limit?: number | null;
|
|
232
|
+
/**
|
|
233
|
+
* Pointer to the next or previous page in the list of results.
|
|
234
|
+
*
|
|
235
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
236
|
+
* Not relevant for the first request.
|
|
237
|
+
* @maxLength 16000
|
|
238
|
+
*/
|
|
239
|
+
cursor?: string | null;
|
|
240
|
+
}
|
|
241
|
+
interface QueryBranchesResponse {
|
|
242
|
+
/** List of branches. */
|
|
243
|
+
branches?: Branch[];
|
|
244
|
+
/** Paging metadata */
|
|
245
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
246
|
+
}
|
|
247
|
+
interface CursorPagingMetadata {
|
|
248
|
+
/** Number of items returned in the response. */
|
|
249
|
+
count?: number | null;
|
|
250
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
251
|
+
cursors?: Cursors;
|
|
252
|
+
/**
|
|
253
|
+
* Whether there are more pages to retrieve following the current page.
|
|
254
|
+
*
|
|
255
|
+
* + `true`: Another page of results can be retrieved.
|
|
256
|
+
* + `false`: This is the last page.
|
|
257
|
+
*/
|
|
258
|
+
hasNext?: boolean | null;
|
|
259
|
+
}
|
|
260
|
+
interface Cursors {
|
|
261
|
+
/**
|
|
262
|
+
* Cursor string pointing to the next page in the list of results.
|
|
263
|
+
* @maxLength 16000
|
|
264
|
+
*/
|
|
265
|
+
next?: string | null;
|
|
266
|
+
/**
|
|
267
|
+
* Cursor pointing to the previous page in the list of results.
|
|
268
|
+
* @maxLength 16000
|
|
269
|
+
*/
|
|
270
|
+
prev?: string | null;
|
|
271
|
+
}
|
|
272
|
+
interface UpdateExtendedFieldsRequest {
|
|
273
|
+
/** ID of the entity to update. */
|
|
274
|
+
_id?: string;
|
|
275
|
+
/** Identifier for the app whose extended fields are being updated. */
|
|
276
|
+
namespace?: string;
|
|
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. */
|
|
278
|
+
namespaceData?: Record<string, any> | null;
|
|
279
|
+
}
|
|
280
|
+
interface UpdateExtendedFieldsResponse {
|
|
281
|
+
/** Updated branch. */
|
|
282
|
+
branch?: Branch;
|
|
283
|
+
}
|
|
284
|
+
interface HtmlSitePublished {
|
|
285
|
+
/**
|
|
286
|
+
* Application instance ID
|
|
287
|
+
* @maxLength 50
|
|
288
|
+
*/
|
|
289
|
+
appInstanceId?: string;
|
|
290
|
+
/**
|
|
291
|
+
* Application type
|
|
292
|
+
* @maxLength 100
|
|
293
|
+
*/
|
|
294
|
+
appType?: string;
|
|
295
|
+
/** Revision */
|
|
296
|
+
revision?: string;
|
|
297
|
+
/**
|
|
298
|
+
* MSID
|
|
299
|
+
* @maxLength 100
|
|
300
|
+
*/
|
|
301
|
+
metaSiteId?: string | null;
|
|
302
|
+
/**
|
|
303
|
+
* optional branch id if publish is done from branch
|
|
304
|
+
* @format GUID
|
|
305
|
+
*/
|
|
306
|
+
branchId?: string | null;
|
|
307
|
+
/** The site's last transactionId */
|
|
308
|
+
lastTransactionId?: string | null;
|
|
309
|
+
/** A list of the site's pages */
|
|
310
|
+
pages?: Page[];
|
|
311
|
+
/** Site's publish date */
|
|
312
|
+
publishDate?: string;
|
|
313
|
+
}
|
|
314
|
+
interface Page {
|
|
315
|
+
/**
|
|
316
|
+
* Page's Id
|
|
317
|
+
* @maxLength 100
|
|
318
|
+
*/
|
|
319
|
+
_id?: string;
|
|
320
|
+
}
|
|
321
|
+
interface Empty {
|
|
322
|
+
}
|
|
323
|
+
interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
|
|
324
|
+
/** Emitted on a meta site creation. */
|
|
325
|
+
siteCreated?: SiteCreated;
|
|
326
|
+
/** Emitted on a meta site transfer completion. */
|
|
327
|
+
siteTransferred?: SiteTransferred;
|
|
328
|
+
/** Emitted on a meta site deletion. */
|
|
329
|
+
siteDeleted?: SiteDeleted;
|
|
330
|
+
/** Emitted on a meta site restoration. */
|
|
331
|
+
siteUndeleted?: SiteUndeleted;
|
|
332
|
+
/** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
|
|
333
|
+
sitePublished?: SitePublished;
|
|
334
|
+
/** Emitted on a meta site unpublish. */
|
|
335
|
+
siteUnpublished?: SiteUnpublished;
|
|
336
|
+
/** Emitted when meta site is marked as template. */
|
|
337
|
+
siteMarkedAsTemplate?: SiteMarkedAsTemplate;
|
|
338
|
+
/** Emitted when meta site is marked as a WixSite. */
|
|
339
|
+
siteMarkedAsWixSite?: SiteMarkedAsWixSite;
|
|
340
|
+
/** Emitted when an application is provisioned (installed). */
|
|
341
|
+
serviceProvisioned?: ServiceProvisioned;
|
|
342
|
+
/** Emitted when an application is removed (uninstalled). */
|
|
343
|
+
serviceRemoved?: ServiceRemoved;
|
|
344
|
+
/** Emitted when meta site name (URL slug) is changed. */
|
|
345
|
+
siteRenamedPayload?: SiteRenamed;
|
|
346
|
+
/** Emitted when meta site was permanently deleted. */
|
|
347
|
+
hardDeleted?: SiteHardDeleted;
|
|
348
|
+
/** Emitted on a namespace change. */
|
|
349
|
+
namespaceChanged?: NamespaceChanged;
|
|
350
|
+
/** Emitted when Studio is attached. */
|
|
351
|
+
studioAssigned?: StudioAssigned;
|
|
352
|
+
/** Emitted when Studio is detached. */
|
|
353
|
+
studioUnassigned?: StudioUnassigned;
|
|
354
|
+
/**
|
|
355
|
+
* Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch
|
|
356
|
+
* the actual URL.
|
|
357
|
+
*
|
|
358
|
+
* See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT
|
|
359
|
+
* See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459
|
|
360
|
+
*/
|
|
361
|
+
urlChanged?: SiteUrlChanged;
|
|
362
|
+
/** Site is marked as PurgedExternally */
|
|
363
|
+
sitePurgedExternally?: SitePurgedExternally;
|
|
364
|
+
/** Emitted when Odeditor is attached. */
|
|
365
|
+
odeditorAssigned?: OdeditorAssigned;
|
|
366
|
+
/** Emitted when Odeditor is detached. */
|
|
367
|
+
odeditorUnassigned?: OdeditorUnassigned;
|
|
368
|
+
/** Emitted when Picasso is attached. */
|
|
369
|
+
picassoAssigned?: PicassoAssigned;
|
|
370
|
+
/** Emitted when Picasso is detached. */
|
|
371
|
+
picassoUnassigned?: PicassoUnassigned;
|
|
372
|
+
/**
|
|
373
|
+
* A meta site id.
|
|
374
|
+
* @format GUID
|
|
375
|
+
*/
|
|
376
|
+
metaSiteId?: string;
|
|
377
|
+
/** A meta site version. Monotonically increasing. */
|
|
378
|
+
version?: string;
|
|
379
|
+
/** A timestamp of the event. */
|
|
380
|
+
timestamp?: string;
|
|
381
|
+
/**
|
|
382
|
+
* TODO(meta-site): Change validation once validations are disabled for consumers
|
|
383
|
+
* More context: https://wix.slack.com/archives/C0UHEBPFT/p1720957844413149 and https://wix.slack.com/archives/CFWKX325T/p1728892152855659
|
|
384
|
+
* @maxSize 4000
|
|
385
|
+
*/
|
|
386
|
+
assets?: Asset[];
|
|
387
|
+
}
|
|
388
|
+
/** @oneof */
|
|
389
|
+
interface MetaSiteSpecialEventPayloadOneOf {
|
|
390
|
+
/** Emitted on a meta site creation. */
|
|
391
|
+
siteCreated?: SiteCreated;
|
|
392
|
+
/** Emitted on a meta site transfer completion. */
|
|
393
|
+
siteTransferred?: SiteTransferred;
|
|
394
|
+
/** Emitted on a meta site deletion. */
|
|
395
|
+
siteDeleted?: SiteDeleted;
|
|
396
|
+
/** Emitted on a meta site restoration. */
|
|
397
|
+
siteUndeleted?: SiteUndeleted;
|
|
398
|
+
/** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
|
|
399
|
+
sitePublished?: SitePublished;
|
|
400
|
+
/** Emitted on a meta site unpublish. */
|
|
401
|
+
siteUnpublished?: SiteUnpublished;
|
|
402
|
+
/** Emitted when meta site is marked as template. */
|
|
403
|
+
siteMarkedAsTemplate?: SiteMarkedAsTemplate;
|
|
404
|
+
/** Emitted when meta site is marked as a WixSite. */
|
|
405
|
+
siteMarkedAsWixSite?: SiteMarkedAsWixSite;
|
|
406
|
+
/** Emitted when an application is provisioned (installed). */
|
|
407
|
+
serviceProvisioned?: ServiceProvisioned;
|
|
408
|
+
/** Emitted when an application is removed (uninstalled). */
|
|
409
|
+
serviceRemoved?: ServiceRemoved;
|
|
410
|
+
/** Emitted when meta site name (URL slug) is changed. */
|
|
411
|
+
siteRenamedPayload?: SiteRenamed;
|
|
412
|
+
/** Emitted when meta site was permanently deleted. */
|
|
413
|
+
hardDeleted?: SiteHardDeleted;
|
|
414
|
+
/** Emitted on a namespace change. */
|
|
415
|
+
namespaceChanged?: NamespaceChanged;
|
|
416
|
+
/** Emitted when Studio is attached. */
|
|
417
|
+
studioAssigned?: StudioAssigned;
|
|
418
|
+
/** Emitted when Studio is detached. */
|
|
419
|
+
studioUnassigned?: StudioUnassigned;
|
|
420
|
+
/**
|
|
421
|
+
* Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch
|
|
422
|
+
* the actual URL.
|
|
423
|
+
*
|
|
424
|
+
* See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT
|
|
425
|
+
* See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459
|
|
426
|
+
*/
|
|
427
|
+
urlChanged?: SiteUrlChanged;
|
|
428
|
+
/** Site is marked as PurgedExternally */
|
|
429
|
+
sitePurgedExternally?: SitePurgedExternally;
|
|
430
|
+
/** Emitted when Odeditor is attached. */
|
|
431
|
+
odeditorAssigned?: OdeditorAssigned;
|
|
432
|
+
/** Emitted when Odeditor is detached. */
|
|
433
|
+
odeditorUnassigned?: OdeditorUnassigned;
|
|
434
|
+
/** Emitted when Picasso is attached. */
|
|
435
|
+
picassoAssigned?: PicassoAssigned;
|
|
436
|
+
/** Emitted when Picasso is detached. */
|
|
437
|
+
picassoUnassigned?: PicassoUnassigned;
|
|
438
|
+
}
|
|
439
|
+
interface Asset {
|
|
440
|
+
/**
|
|
441
|
+
* An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum).
|
|
442
|
+
* @maxLength 36
|
|
443
|
+
*/
|
|
444
|
+
appDefId?: string;
|
|
445
|
+
/**
|
|
446
|
+
* An instance id. For legacy reasons may be UUID or a string.
|
|
447
|
+
* @maxLength 200
|
|
448
|
+
*/
|
|
449
|
+
instanceId?: string;
|
|
450
|
+
/** An application state. */
|
|
451
|
+
state?: StateWithLiterals;
|
|
452
|
+
}
|
|
453
|
+
declare enum State {
|
|
454
|
+
UNKNOWN = "UNKNOWN",
|
|
455
|
+
ENABLED = "ENABLED",
|
|
456
|
+
DISABLED = "DISABLED",
|
|
457
|
+
PENDING = "PENDING",
|
|
458
|
+
DEMO = "DEMO"
|
|
459
|
+
}
|
|
460
|
+
/** @enumType */
|
|
461
|
+
type StateWithLiterals = State | 'UNKNOWN' | 'ENABLED' | 'DISABLED' | 'PENDING' | 'DEMO';
|
|
462
|
+
interface SiteCreated {
|
|
463
|
+
/**
|
|
464
|
+
* A template identifier (empty if not created from a template).
|
|
465
|
+
* @maxLength 36
|
|
466
|
+
*/
|
|
467
|
+
originTemplateId?: string;
|
|
468
|
+
/**
|
|
469
|
+
* An account id of the owner.
|
|
470
|
+
* @format GUID
|
|
471
|
+
*/
|
|
472
|
+
ownerId?: string;
|
|
473
|
+
/** A context in which meta site was created. */
|
|
474
|
+
context?: SiteCreatedContextWithLiterals;
|
|
475
|
+
/**
|
|
476
|
+
* A meta site id from which this site was created.
|
|
477
|
+
*
|
|
478
|
+
* In case of a creation from a template it's a template id.
|
|
479
|
+
* In case of a site duplication ("Save As" in dashboard or duplicate in UM) it's an id of a source site.
|
|
480
|
+
* @format GUID
|
|
481
|
+
*/
|
|
482
|
+
originMetaSiteId?: string | null;
|
|
483
|
+
/**
|
|
484
|
+
* A meta site name (URL slug).
|
|
485
|
+
* @maxLength 20
|
|
486
|
+
*/
|
|
487
|
+
siteName?: string;
|
|
488
|
+
/** A namespace. */
|
|
489
|
+
namespace?: NamespaceWithLiterals;
|
|
490
|
+
}
|
|
491
|
+
declare enum SiteCreatedContext {
|
|
492
|
+
/** A valid option, we don't expose all reasons why site might be created. */
|
|
493
|
+
OTHER = "OTHER",
|
|
494
|
+
/** A meta site was created from template. */
|
|
495
|
+
FROM_TEMPLATE = "FROM_TEMPLATE",
|
|
496
|
+
/** A meta site was created by copying of the transfferred meta site. */
|
|
497
|
+
DUPLICATE_BY_SITE_TRANSFER = "DUPLICATE_BY_SITE_TRANSFER",
|
|
498
|
+
/** A copy of existing meta site. */
|
|
499
|
+
DUPLICATE = "DUPLICATE",
|
|
500
|
+
/** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */
|
|
501
|
+
OLD_SITE_TRANSFER = "OLD_SITE_TRANSFER",
|
|
502
|
+
/** deprecated A meta site was created for Flash editor. */
|
|
503
|
+
FLASH = "FLASH"
|
|
504
|
+
}
|
|
505
|
+
/** @enumType */
|
|
506
|
+
type SiteCreatedContextWithLiterals = SiteCreatedContext | 'OTHER' | 'FROM_TEMPLATE' | 'DUPLICATE_BY_SITE_TRANSFER' | 'DUPLICATE' | 'OLD_SITE_TRANSFER' | 'FLASH';
|
|
507
|
+
declare enum Namespace {
|
|
508
|
+
UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE",
|
|
509
|
+
/** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
|
|
510
|
+
WIX = "WIX",
|
|
511
|
+
/** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
512
|
+
SHOUT_OUT = "SHOUT_OUT",
|
|
513
|
+
/** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
514
|
+
ALBUMS = "ALBUMS",
|
|
515
|
+
/** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
516
|
+
WIX_STORES_TEST_DRIVE = "WIX_STORES_TEST_DRIVE",
|
|
517
|
+
/** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
518
|
+
HOTELS = "HOTELS",
|
|
519
|
+
/** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
520
|
+
CLUBS = "CLUBS",
|
|
521
|
+
/** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
522
|
+
ONBOARDING_DRAFT = "ONBOARDING_DRAFT",
|
|
523
|
+
/** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
524
|
+
DEV_SITE = "DEV_SITE",
|
|
525
|
+
/** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
526
|
+
LOGOS = "LOGOS",
|
|
527
|
+
/** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
528
|
+
VIDEO_MAKER = "VIDEO_MAKER",
|
|
529
|
+
/** MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
530
|
+
PARTNER_DASHBOARD = "PARTNER_DASHBOARD",
|
|
531
|
+
/** MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
532
|
+
DEV_CENTER_COMPANY = "DEV_CENTER_COMPANY",
|
|
533
|
+
/**
|
|
534
|
+
* A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain.
|
|
535
|
+
*
|
|
536
|
+
* Meta site with this namespace will *not* be shown in a user's site list by default.
|
|
537
|
+
*/
|
|
538
|
+
HTML_DRAFT = "HTML_DRAFT",
|
|
539
|
+
/**
|
|
540
|
+
* the user-journey for Fitness users who want to start from managing their business instead of designing their website.
|
|
541
|
+
* Will be accessible from Site List and will not have a website app.
|
|
542
|
+
* Once the user attaches a site, the site will become a regular wixsite.
|
|
543
|
+
*/
|
|
544
|
+
SITELESS_BUSINESS = "SITELESS_BUSINESS",
|
|
545
|
+
/** Belongs to "strategic products" company. Supports new product in the creator's economy space. */
|
|
546
|
+
CREATOR_ECONOMY = "CREATOR_ECONOMY",
|
|
547
|
+
/** It is to be used in the Business First efforts. */
|
|
548
|
+
DASHBOARD_FIRST = "DASHBOARD_FIRST",
|
|
549
|
+
/** Bookings business flow with no site. */
|
|
550
|
+
ANYWHERE = "ANYWHERE",
|
|
551
|
+
/** Namespace for Headless Backoffice with no editor */
|
|
552
|
+
HEADLESS = "HEADLESS",
|
|
553
|
+
/**
|
|
554
|
+
* Namespace for master site that will exist in parent account that will be referenced by subaccounts
|
|
555
|
+
* The site will be used for account level CSM feature for enterprise
|
|
556
|
+
*/
|
|
557
|
+
ACCOUNT_MASTER_CMS = "ACCOUNT_MASTER_CMS",
|
|
558
|
+
/** Rise.ai Siteless account management for Gift Cards and Store Credit. */
|
|
559
|
+
RISE = "RISE",
|
|
560
|
+
/**
|
|
561
|
+
* As part of the branded app new funnel, users now can create a meta site that will be branded app first.
|
|
562
|
+
* There's a blank site behind the scene but it's blank).
|
|
563
|
+
* The Mobile company will be the owner of this namespace.
|
|
564
|
+
*/
|
|
565
|
+
BRANDED_FIRST = "BRANDED_FIRST",
|
|
566
|
+
/** Nownia.com Siteless account management for Ai Scheduling Assistant. */
|
|
567
|
+
NOWNIA = "NOWNIA",
|
|
568
|
+
/**
|
|
569
|
+
* UGC Templates are templates that are created by users for personal use and to sale to other users.
|
|
570
|
+
* The Partners company owns this namespace.
|
|
571
|
+
*/
|
|
572
|
+
UGC_TEMPLATE = "UGC_TEMPLATE",
|
|
573
|
+
/** Codux Headless Sites */
|
|
574
|
+
CODUX = "CODUX",
|
|
575
|
+
/** Bobb - AI Design Creator. */
|
|
576
|
+
MEDIA_DESIGN_CREATOR = "MEDIA_DESIGN_CREATOR",
|
|
577
|
+
/**
|
|
578
|
+
* Shared Blog Site is a unique single site across Enterprise account,
|
|
579
|
+
* This site will hold all Blog posts related to the Marketing product.
|
|
580
|
+
*/
|
|
581
|
+
SHARED_BLOG_ENTERPRISE = "SHARED_BLOG_ENTERPRISE",
|
|
582
|
+
/** Standalone forms (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
583
|
+
STANDALONE_FORMS = "STANDALONE_FORMS",
|
|
584
|
+
/** Standalone events (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
585
|
+
STANDALONE_EVENTS = "STANDALONE_EVENTS",
|
|
586
|
+
/** MIMIR - Siteless account for MIMIR Ai Job runner. */
|
|
587
|
+
MIMIR = "MIMIR",
|
|
588
|
+
/** Wix Twins platform. */
|
|
589
|
+
TWINS = "TWINS"
|
|
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';
|
|
593
|
+
/** Site transferred to another user. */
|
|
594
|
+
interface SiteTransferred {
|
|
595
|
+
/**
|
|
596
|
+
* A previous owner id (user that transfers meta site).
|
|
597
|
+
* @format GUID
|
|
598
|
+
*/
|
|
599
|
+
oldOwnerId?: string;
|
|
600
|
+
/**
|
|
601
|
+
* A new owner id (user that accepts meta site).
|
|
602
|
+
* @format GUID
|
|
603
|
+
*/
|
|
604
|
+
newOwnerId?: string;
|
|
605
|
+
}
|
|
606
|
+
/** Soft deletion of the meta site. Could be restored. */
|
|
607
|
+
interface SiteDeleted {
|
|
608
|
+
/** A deletion context. */
|
|
609
|
+
deleteContext?: DeleteContext;
|
|
610
|
+
}
|
|
611
|
+
interface DeleteContext {
|
|
612
|
+
/** When the meta site was deleted. */
|
|
613
|
+
dateDeleted?: Date | null;
|
|
614
|
+
/** A status. */
|
|
615
|
+
deleteStatus?: DeleteStatusWithLiterals;
|
|
616
|
+
/**
|
|
617
|
+
* A reason (flow).
|
|
618
|
+
* @maxLength 255
|
|
619
|
+
*/
|
|
620
|
+
deleteOrigin?: string;
|
|
621
|
+
/**
|
|
622
|
+
* A service that deleted it.
|
|
623
|
+
* @maxLength 255
|
|
624
|
+
*/
|
|
625
|
+
initiatorId?: string | null;
|
|
626
|
+
}
|
|
627
|
+
declare enum DeleteStatus {
|
|
628
|
+
UNKNOWN = "UNKNOWN",
|
|
629
|
+
TRASH = "TRASH",
|
|
630
|
+
DELETED = "DELETED",
|
|
631
|
+
PENDING_PURGE = "PENDING_PURGE",
|
|
632
|
+
PURGED_EXTERNALLY = "PURGED_EXTERNALLY"
|
|
633
|
+
}
|
|
634
|
+
/** @enumType */
|
|
635
|
+
type DeleteStatusWithLiterals = DeleteStatus | 'UNKNOWN' | 'TRASH' | 'DELETED' | 'PENDING_PURGE' | 'PURGED_EXTERNALLY';
|
|
636
|
+
/** Restoration of the meta site. */
|
|
637
|
+
interface SiteUndeleted {
|
|
638
|
+
}
|
|
639
|
+
/** First publish of a meta site. Or subsequent publish after unpublish. */
|
|
640
|
+
interface SitePublished {
|
|
641
|
+
}
|
|
642
|
+
interface SiteUnpublished {
|
|
643
|
+
/**
|
|
644
|
+
* A list of URLs previously associated with the meta site.
|
|
645
|
+
* @maxLength 4000
|
|
646
|
+
* @maxSize 10000
|
|
647
|
+
*/
|
|
648
|
+
urls?: string[];
|
|
649
|
+
}
|
|
650
|
+
interface SiteMarkedAsTemplate {
|
|
651
|
+
}
|
|
652
|
+
interface SiteMarkedAsWixSite {
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* Represents a service provisioned a site.
|
|
656
|
+
*
|
|
657
|
+
* Note on `origin_instance_id`:
|
|
658
|
+
* There is no guarantee that you will be able to find a meta site using `origin_instance_id`.
|
|
659
|
+
* This is because of the following scenario:
|
|
660
|
+
*
|
|
661
|
+
* Imagine you have a template where a third-party application (TPA) includes some stub data,
|
|
662
|
+
* such as a product catalog. When you create a site from this template, you inherit this
|
|
663
|
+
* default product catalog. However, if the template's product catalog is modified,
|
|
664
|
+
* your site will retain the catalog as it was at the time of site creation. This ensures that
|
|
665
|
+
* your site remains consistent with what you initially received and does not include any
|
|
666
|
+
* changes made to the original template afterward.
|
|
667
|
+
* To ensure this, the TPA on the template gets a new instance_id.
|
|
668
|
+
*/
|
|
669
|
+
interface ServiceProvisioned {
|
|
670
|
+
/**
|
|
671
|
+
* Either UUID or EmbeddedServiceType.
|
|
672
|
+
* @maxLength 36
|
|
673
|
+
*/
|
|
674
|
+
appDefId?: string;
|
|
675
|
+
/**
|
|
676
|
+
* Not only UUID. Something here could be something weird.
|
|
677
|
+
* @maxLength 36
|
|
678
|
+
*/
|
|
679
|
+
instanceId?: string;
|
|
680
|
+
/**
|
|
681
|
+
* An instance id from which this instance is originated.
|
|
682
|
+
* @maxLength 36
|
|
683
|
+
*/
|
|
684
|
+
originInstanceId?: string;
|
|
685
|
+
/**
|
|
686
|
+
* A version.
|
|
687
|
+
* @maxLength 500
|
|
688
|
+
*/
|
|
689
|
+
version?: string | null;
|
|
690
|
+
/**
|
|
691
|
+
* The origin meta site id
|
|
692
|
+
* @format GUID
|
|
693
|
+
*/
|
|
694
|
+
originMetaSiteId?: string | null;
|
|
695
|
+
}
|
|
696
|
+
interface ServiceRemoved {
|
|
697
|
+
/**
|
|
698
|
+
* Either UUID or EmbeddedServiceType.
|
|
699
|
+
* @maxLength 36
|
|
700
|
+
*/
|
|
701
|
+
appDefId?: string;
|
|
702
|
+
/**
|
|
703
|
+
* Not only UUID. Something here could be something weird.
|
|
704
|
+
* @maxLength 36
|
|
705
|
+
*/
|
|
706
|
+
instanceId?: string;
|
|
707
|
+
/**
|
|
708
|
+
* A version.
|
|
709
|
+
* @maxLength 500
|
|
710
|
+
*/
|
|
711
|
+
version?: string | null;
|
|
712
|
+
}
|
|
713
|
+
/** Rename of the site. Meaning, free public url has been changed as well. */
|
|
714
|
+
interface SiteRenamed {
|
|
715
|
+
/**
|
|
716
|
+
* A new meta site name (URL slug).
|
|
717
|
+
* @maxLength 20
|
|
718
|
+
*/
|
|
719
|
+
newSiteName?: string;
|
|
720
|
+
/**
|
|
721
|
+
* A previous meta site name (URL slug).
|
|
722
|
+
* @maxLength 255
|
|
723
|
+
*/
|
|
724
|
+
oldSiteName?: string;
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
727
|
+
* Hard deletion of the meta site.
|
|
728
|
+
*
|
|
729
|
+
* Could not be restored. Therefore it's desirable to cleanup data.
|
|
730
|
+
*/
|
|
731
|
+
interface SiteHardDeleted {
|
|
732
|
+
/** A deletion context. */
|
|
733
|
+
deleteContext?: DeleteContext;
|
|
734
|
+
}
|
|
735
|
+
interface NamespaceChanged {
|
|
736
|
+
/** A previous namespace. */
|
|
737
|
+
oldNamespace?: NamespaceWithLiterals;
|
|
738
|
+
/** A new namespace. */
|
|
739
|
+
newNamespace?: NamespaceWithLiterals;
|
|
740
|
+
}
|
|
741
|
+
/** Assigned Studio editor */
|
|
742
|
+
interface StudioAssigned {
|
|
743
|
+
}
|
|
744
|
+
/** Unassigned Studio editor */
|
|
745
|
+
interface StudioUnassigned {
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* Fired in case site URLs were changed in any way: new secondary domain, published, account slug rename, site rename etc.
|
|
749
|
+
*
|
|
750
|
+
* This is an internal event, it's not propagated in special events, because it's non-actionable. If you need to keep up
|
|
751
|
+
* with sites and its urls, you need to listen to another topic/event. Read about it:
|
|
752
|
+
*
|
|
753
|
+
* https://bo.wix.com/wix-docs/rest/meta-site/meta-site---urls-service
|
|
754
|
+
*/
|
|
755
|
+
interface SiteUrlChanged {
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* Used at the end of the deletion flow for both draft sites and when a user deletes a site.
|
|
759
|
+
* Consumed by other teams to remove relevant data.
|
|
760
|
+
*/
|
|
761
|
+
interface SitePurgedExternally {
|
|
762
|
+
/**
|
|
763
|
+
* @maxLength 2048
|
|
764
|
+
* @maxSize 100
|
|
765
|
+
* @deprecated
|
|
766
|
+
* @targetRemovalDate 2025-04-15
|
|
767
|
+
*/
|
|
768
|
+
appDefId?: string[];
|
|
769
|
+
}
|
|
770
|
+
/** Assigned Odeditor */
|
|
771
|
+
interface OdeditorAssigned {
|
|
772
|
+
}
|
|
773
|
+
/** Unassigned Odeditor */
|
|
774
|
+
interface OdeditorUnassigned {
|
|
775
|
+
}
|
|
776
|
+
/** Assigned Picasso editor */
|
|
777
|
+
interface PicassoAssigned {
|
|
778
|
+
}
|
|
779
|
+
/** Unassigned Picasso */
|
|
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;
|
|
798
|
+
}
|
|
799
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
800
|
+
createdEvent?: EntityCreatedEvent;
|
|
801
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
802
|
+
deletedEvent?: EntityDeletedEvent;
|
|
803
|
+
actionEvent?: ActionEvent;
|
|
804
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
805
|
+
_id?: string;
|
|
806
|
+
/**
|
|
807
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
808
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
809
|
+
*/
|
|
810
|
+
entityFqdn?: string;
|
|
811
|
+
/**
|
|
812
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
813
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
814
|
+
*/
|
|
815
|
+
slug?: string;
|
|
816
|
+
/** ID of the entity associated with the event. */
|
|
817
|
+
entityId?: string;
|
|
818
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
819
|
+
eventTime?: Date | null;
|
|
820
|
+
/**
|
|
821
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
822
|
+
* (for example, GDPR).
|
|
823
|
+
*/
|
|
824
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
825
|
+
/** If present, indicates the action that triggered the event. */
|
|
826
|
+
originatedFrom?: string | null;
|
|
827
|
+
/**
|
|
828
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
829
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
830
|
+
*/
|
|
831
|
+
entityEventSequence?: string | null;
|
|
832
|
+
}
|
|
833
|
+
/** @oneof */
|
|
834
|
+
interface DomainEventBodyOneOf {
|
|
835
|
+
createdEvent?: EntityCreatedEvent;
|
|
836
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
837
|
+
deletedEvent?: EntityDeletedEvent;
|
|
838
|
+
actionEvent?: ActionEvent;
|
|
839
|
+
}
|
|
840
|
+
interface EntityCreatedEvent {
|
|
841
|
+
entity?: string;
|
|
842
|
+
}
|
|
843
|
+
interface RestoreInfo {
|
|
844
|
+
deletedDate?: Date | null;
|
|
845
|
+
}
|
|
846
|
+
interface EntityUpdatedEvent {
|
|
847
|
+
/**
|
|
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.
|
|
849
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
850
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
851
|
+
*/
|
|
852
|
+
currentEntity?: string;
|
|
853
|
+
}
|
|
854
|
+
interface EntityDeletedEvent {
|
|
855
|
+
/** Entity that was deleted. */
|
|
856
|
+
deletedEntity?: string | null;
|
|
857
|
+
}
|
|
858
|
+
interface ActionEvent {
|
|
859
|
+
body?: string;
|
|
860
|
+
}
|
|
861
|
+
interface MessageEnvelope {
|
|
862
|
+
/**
|
|
863
|
+
* App instance ID.
|
|
864
|
+
* @format GUID
|
|
865
|
+
*/
|
|
866
|
+
instanceId?: string | null;
|
|
867
|
+
/**
|
|
868
|
+
* Event type.
|
|
869
|
+
* @maxLength 150
|
|
870
|
+
*/
|
|
871
|
+
eventType?: string;
|
|
872
|
+
/** The identification type and identity data. */
|
|
873
|
+
identity?: IdentificationData;
|
|
874
|
+
/** Stringify payload. */
|
|
875
|
+
data?: string;
|
|
876
|
+
}
|
|
877
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
878
|
+
/**
|
|
879
|
+
* ID of a site visitor that has not logged in to the site.
|
|
880
|
+
* @format GUID
|
|
881
|
+
*/
|
|
882
|
+
anonymousVisitorId?: string;
|
|
883
|
+
/**
|
|
884
|
+
* ID of a site visitor that has logged in to the site.
|
|
885
|
+
* @format GUID
|
|
886
|
+
*/
|
|
887
|
+
memberId?: string;
|
|
888
|
+
/**
|
|
889
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
890
|
+
* @format GUID
|
|
891
|
+
*/
|
|
892
|
+
wixUserId?: string;
|
|
893
|
+
/**
|
|
894
|
+
* ID of an app.
|
|
895
|
+
* @format GUID
|
|
896
|
+
*/
|
|
897
|
+
appId?: string;
|
|
898
|
+
/** @readonly */
|
|
899
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
900
|
+
}
|
|
901
|
+
/** @oneof */
|
|
902
|
+
interface IdentificationDataIdOneOf {
|
|
903
|
+
/**
|
|
904
|
+
* ID of a site visitor that has not logged in to the site.
|
|
905
|
+
* @format GUID
|
|
906
|
+
*/
|
|
907
|
+
anonymousVisitorId?: string;
|
|
908
|
+
/**
|
|
909
|
+
* ID of a site visitor that has logged in to the site.
|
|
910
|
+
* @format GUID
|
|
911
|
+
*/
|
|
912
|
+
memberId?: string;
|
|
913
|
+
/**
|
|
914
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
915
|
+
* @format GUID
|
|
916
|
+
*/
|
|
917
|
+
wixUserId?: string;
|
|
918
|
+
/**
|
|
919
|
+
* ID of an app.
|
|
920
|
+
* @format GUID
|
|
921
|
+
*/
|
|
922
|
+
appId?: string;
|
|
923
|
+
}
|
|
924
|
+
declare enum WebhookIdentityType {
|
|
925
|
+
UNKNOWN = "UNKNOWN",
|
|
926
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
927
|
+
MEMBER = "MEMBER",
|
|
928
|
+
WIX_USER = "WIX_USER",
|
|
929
|
+
APP = "APP"
|
|
930
|
+
}
|
|
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 {
|
|
976
|
+
/**
|
|
977
|
+
* App instance ID.
|
|
978
|
+
* @format GUID
|
|
979
|
+
*/
|
|
980
|
+
instanceId?: string | null;
|
|
981
|
+
/**
|
|
982
|
+
* Event type.
|
|
983
|
+
* @maxLength 150
|
|
984
|
+
*/
|
|
985
|
+
eventType?: string;
|
|
986
|
+
/** The identification type and identity data. */
|
|
987
|
+
identity?: IdentificationData;
|
|
988
|
+
}
|
|
989
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
990
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
991
|
+
_id?: string;
|
|
992
|
+
/**
|
|
993
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
994
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
995
|
+
*/
|
|
996
|
+
entityFqdn?: string;
|
|
997
|
+
/**
|
|
998
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
999
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
1000
|
+
*/
|
|
1001
|
+
slug?: string;
|
|
1002
|
+
/** ID of the entity associated with the event. */
|
|
1003
|
+
entityId?: string;
|
|
1004
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
1005
|
+
eventTime?: Date | null;
|
|
1006
|
+
/**
|
|
1007
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
1008
|
+
* (for example, GDPR).
|
|
1009
|
+
*/
|
|
1010
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
1011
|
+
/** If present, indicates the action that triggered the event. */
|
|
1012
|
+
originatedFrom?: string | null;
|
|
1013
|
+
/**
|
|
1014
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
1015
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
1016
|
+
*/
|
|
1017
|
+
entityEventSequence?: string | null;
|
|
1018
|
+
}
|
|
1019
|
+
interface BranchCreatedEnvelope {
|
|
1020
|
+
entity: Branch;
|
|
1021
|
+
metadata: EventMetadata;
|
|
1022
|
+
}
|
|
1023
|
+
/** @permissionId EDITOR.BRANCH_READ
|
|
1024
|
+
* @webhook
|
|
1025
|
+
* @eventType wix.editor.branches.v1.branch_created
|
|
1026
|
+
* @slug created
|
|
1027
|
+
*/
|
|
1028
|
+
declare function onBranchCreated(handler: (event: BranchCreatedEnvelope) => void | Promise<void>): void;
|
|
1029
|
+
interface BranchDeletedEnvelope {
|
|
1030
|
+
entity: Branch;
|
|
1031
|
+
metadata: EventMetadata;
|
|
1032
|
+
}
|
|
1033
|
+
/** @permissionId EDITOR.BRANCH_READ
|
|
1034
|
+
* @webhook
|
|
1035
|
+
* @eventType wix.editor.branches.v1.branch_deleted
|
|
1036
|
+
* @slug deleted
|
|
1037
|
+
*/
|
|
1038
|
+
declare function onBranchDeleted(handler: (event: BranchDeletedEnvelope) => void | Promise<void>): void;
|
|
1039
|
+
interface BranchUpdatedEnvelope {
|
|
1040
|
+
entity: Branch;
|
|
1041
|
+
metadata: EventMetadata;
|
|
1042
|
+
}
|
|
1043
|
+
/** @permissionId EDITOR.BRANCH_READ
|
|
1044
|
+
* @webhook
|
|
1045
|
+
* @eventType wix.editor.branches.v1.branch_updated
|
|
1046
|
+
* @slug updated
|
|
1047
|
+
*/
|
|
1048
|
+
declare function onBranchUpdated(handler: (event: BranchUpdatedEnvelope) => void | Promise<void>): void;
|
|
1049
|
+
/**
|
|
1050
|
+
* Creates a branch.
|
|
1051
|
+
* If a source branch is not provided, the branch will include a blank website.
|
|
1052
|
+
* @param branch - Branch to be created.
|
|
1053
|
+
* @public
|
|
1054
|
+
* @documentationMaturity preview
|
|
1055
|
+
* @requiredField branch
|
|
1056
|
+
* @permissionId EDITOR.BRANCH_CREATE
|
|
1057
|
+
* @returns Created branch.
|
|
1058
|
+
* @fqn wix.editor.branches.v1.BranchesService.CreateBranch
|
|
1059
|
+
*/
|
|
1060
|
+
declare function createBranch(branch: Branch): Promise<NonNullablePaths<Branch, `sourceBranchProperties.branchId` | `sourceTemplateProperties.templateId` | `type` | `sourceType` | `editorType.editorTypeOptions`, 3> & {
|
|
1061
|
+
__applicationErrorsType?: CreateBranchApplicationErrors;
|
|
1062
|
+
}>;
|
|
1063
|
+
/**
|
|
1064
|
+
* Retrieves a branch.
|
|
1065
|
+
* @param branchId - ID of branch to retrieve.
|
|
1066
|
+
* @public
|
|
1067
|
+
* @documentationMaturity preview
|
|
1068
|
+
* @requiredField branchId
|
|
1069
|
+
* @permissionId EDITOR.BRANCH_READ
|
|
1070
|
+
* @returns Requested branch.
|
|
1071
|
+
* @fqn wix.editor.branches.v1.BranchesService.GetBranch
|
|
1072
|
+
*/
|
|
1073
|
+
declare function getBranch(branchId: string): Promise<NonNullablePaths<Branch, `sourceBranchProperties.branchId` | `sourceTemplateProperties.templateId` | `type` | `sourceType` | `editorType.editorTypeOptions`, 3>>;
|
|
1074
|
+
/**
|
|
1075
|
+
* Updates a branch.
|
|
1076
|
+
*
|
|
1077
|
+
* `ORIGINAL_BRANCH` types can't be updated.
|
|
1078
|
+
* @param _id - Branch ID.
|
|
1079
|
+
* @public
|
|
1080
|
+
* @documentationMaturity preview
|
|
1081
|
+
* @requiredField _id
|
|
1082
|
+
* @requiredField branch
|
|
1083
|
+
* @requiredField branch.revision
|
|
1084
|
+
* @permissionId EDITOR.BRANCH_UPDATE
|
|
1085
|
+
* @returns Updated branch.
|
|
1086
|
+
* @fqn wix.editor.branches.v1.BranchesService.UpdateBranch
|
|
1087
|
+
*/
|
|
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 {
|
|
1092
|
+
/** Source branch properties. */
|
|
1093
|
+
sourceBranchProperties?: SourceBranch;
|
|
1094
|
+
/** Source template properties. */
|
|
1095
|
+
sourceTemplateProperties?: SourceTemplate;
|
|
1096
|
+
/**
|
|
1097
|
+
* Branch ID.
|
|
1098
|
+
* @format GUID
|
|
1099
|
+
* @readonly
|
|
1100
|
+
*/
|
|
1101
|
+
_id?: string | null;
|
|
1102
|
+
/**
|
|
1103
|
+
* Revision number, which increments by 1 each time the branch is updated.
|
|
1104
|
+
* To prevent conflicting changes,
|
|
1105
|
+
* the current revision must be passed when updating the branch.
|
|
1106
|
+
* @readonly
|
|
1107
|
+
*/
|
|
1108
|
+
revision?: string | null;
|
|
1109
|
+
/** Branch type. */
|
|
1110
|
+
type?: TypeWithLiterals;
|
|
1111
|
+
/**
|
|
1112
|
+
* Branch name.
|
|
1113
|
+
* @maxLength 50
|
|
1114
|
+
*/
|
|
1115
|
+
name?: string | null;
|
|
1116
|
+
/** Source type. */
|
|
1117
|
+
sourceType?: SourceTypeWithLiterals;
|
|
1118
|
+
/**
|
|
1119
|
+
* Date and time the branch was last published, if relevant.
|
|
1120
|
+
* @readonly
|
|
1121
|
+
*/
|
|
1122
|
+
lastPublishDate?: string | null;
|
|
1123
|
+
/**
|
|
1124
|
+
* Editor type.
|
|
1125
|
+
* @readonly
|
|
1126
|
+
*/
|
|
1127
|
+
editorType?: EditorType;
|
|
1128
|
+
/**
|
|
1129
|
+
* Default branch
|
|
1130
|
+
* @readonly
|
|
1131
|
+
*/
|
|
1132
|
+
default?: boolean | null;
|
|
1133
|
+
/**
|
|
1134
|
+
* Date and time the branch was created.
|
|
1135
|
+
* @readonly
|
|
1136
|
+
*/
|
|
1137
|
+
_createdDate?: Date | null;
|
|
1138
|
+
/**
|
|
1139
|
+
* Date and time the branch was last updated.
|
|
1140
|
+
* @readonly
|
|
1141
|
+
*/
|
|
1142
|
+
_updatedDate?: Date | null;
|
|
1143
|
+
/**
|
|
1144
|
+
* Custom field data for the branch.
|
|
1145
|
+
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
|
|
1146
|
+
*/
|
|
1147
|
+
extendedFields?: ExtendedFields;
|
|
1148
|
+
}
|
|
1149
|
+
/**
|
|
1150
|
+
* Permanently deletes a branch.
|
|
1151
|
+
* @param branchId - ID of branch to delete.
|
|
1152
|
+
* @public
|
|
1153
|
+
* @documentationMaturity preview
|
|
1154
|
+
* @requiredField branchId
|
|
1155
|
+
* @permissionId EDITOR.BRANCH_DELETE
|
|
1156
|
+
* @fqn wix.editor.branches.v1.BranchesService.DeleteBranch
|
|
1157
|
+
*/
|
|
1158
|
+
declare function deleteBranch(branchId: string): Promise<void & {
|
|
1159
|
+
__applicationErrorsType?: DeleteBranchApplicationErrors;
|
|
1160
|
+
}>;
|
|
1161
|
+
/**
|
|
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).
|
|
1163
|
+
* @public
|
|
1164
|
+
* @documentationMaturity preview
|
|
1165
|
+
* @permissionId EDITOR.BRANCH_READ
|
|
1166
|
+
* @fqn wix.editor.branches.v1.BranchesService.QueryBranches
|
|
1167
|
+
*/
|
|
1168
|
+
declare function queryBranches(): BranchesQueryBuilder;
|
|
1169
|
+
interface QueryCursorResult {
|
|
1170
|
+
cursors: Cursors;
|
|
1171
|
+
hasNext: () => boolean;
|
|
1172
|
+
hasPrev: () => boolean;
|
|
1173
|
+
length: number;
|
|
1174
|
+
pageSize: number;
|
|
1175
|
+
}
|
|
1176
|
+
interface BranchesQueryResult extends QueryCursorResult {
|
|
1177
|
+
items: Branch[];
|
|
1178
|
+
query: BranchesQueryBuilder;
|
|
1179
|
+
next: () => Promise<BranchesQueryResult>;
|
|
1180
|
+
prev: () => Promise<BranchesQueryResult>;
|
|
1181
|
+
}
|
|
1182
|
+
interface BranchesQueryBuilder {
|
|
1183
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1184
|
+
* @param value - Value to compare against.
|
|
1185
|
+
* @documentationMaturity preview
|
|
1186
|
+
*/
|
|
1187
|
+
eq: (propertyName: 'sourceBranchProperties.branchId' | 'sourceBranchProperties.branchRevision' | 'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
|
|
1188
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1189
|
+
* @param value - Value to compare against.
|
|
1190
|
+
* @documentationMaturity preview
|
|
1191
|
+
*/
|
|
1192
|
+
ne: (propertyName: 'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
|
|
1193
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1194
|
+
* @param value - Value to compare against.
|
|
1195
|
+
* @documentationMaturity preview
|
|
1196
|
+
*/
|
|
1197
|
+
ge: (propertyName: 'name' | 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
|
|
1198
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1199
|
+
* @param value - Value to compare against.
|
|
1200
|
+
* @documentationMaturity preview
|
|
1201
|
+
*/
|
|
1202
|
+
gt: (propertyName: 'name' | 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
|
|
1203
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1204
|
+
* @param value - Value to compare against.
|
|
1205
|
+
* @documentationMaturity preview
|
|
1206
|
+
*/
|
|
1207
|
+
le: (propertyName: 'name' | 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
|
|
1208
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1209
|
+
* @param value - Value to compare against.
|
|
1210
|
+
* @documentationMaturity preview
|
|
1211
|
+
*/
|
|
1212
|
+
lt: (propertyName: 'name' | 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
|
|
1213
|
+
/** @param propertyName - Property whose value is compared with `string`.
|
|
1214
|
+
* @param string - String to compare against. Case-insensitive.
|
|
1215
|
+
* @documentationMaturity preview
|
|
1216
|
+
*/
|
|
1217
|
+
startsWith: (propertyName: 'name', value: string) => BranchesQueryBuilder;
|
|
1218
|
+
/** @param propertyName - Property whose value is compared with `values`.
|
|
1219
|
+
* @param values - List of values to compare against.
|
|
1220
|
+
* @documentationMaturity preview
|
|
1221
|
+
*/
|
|
1222
|
+
hasSome: (propertyName: 'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate', value: any[]) => BranchesQueryBuilder;
|
|
1223
|
+
/** @documentationMaturity preview */
|
|
1224
|
+
in: (propertyName: 'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
|
|
1225
|
+
/** @documentationMaturity preview */
|
|
1226
|
+
exists: (propertyName: 'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate', value: boolean) => BranchesQueryBuilder;
|
|
1227
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1228
|
+
* @documentationMaturity preview
|
|
1229
|
+
*/
|
|
1230
|
+
ascending: (...propertyNames: Array<'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate'>) => BranchesQueryBuilder;
|
|
1231
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1232
|
+
* @documentationMaturity preview
|
|
1233
|
+
*/
|
|
1234
|
+
descending: (...propertyNames: Array<'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate'>) => BranchesQueryBuilder;
|
|
1235
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
1236
|
+
* @documentationMaturity preview
|
|
1237
|
+
*/
|
|
1238
|
+
limit: (limit: number) => BranchesQueryBuilder;
|
|
1239
|
+
/** @param cursor - A pointer to specific record
|
|
1240
|
+
* @documentationMaturity preview
|
|
1241
|
+
*/
|
|
1242
|
+
skipTo: (cursor: string) => BranchesQueryBuilder;
|
|
1243
|
+
/** @documentationMaturity preview */
|
|
1244
|
+
find: () => Promise<BranchesQueryResult>;
|
|
1245
|
+
}
|
|
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 };
|