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