@wix/auto_sdk_editor-branches_branches 1.0.19 → 1.0.21

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.
@@ -5,9 +5,9 @@ import { NonNullablePaths } from '@wix/sdk-types';
5
5
  * Read more about branches in this [article](https://support.wix.com/en/article/about-test-sites).
6
6
  */
7
7
  interface Branch extends BranchSourceOneOf {
8
- /** Source branch properties. Use when source_type = SOURCE_BRANCH. */
8
+ /** Source branch properties. Use when `sourceType` = `SOURCE_BRANCH`. */
9
9
  sourceBranchProperties?: SourceBranch;
10
- /** Source template properties. Use when source_type = SOURCE_TEMPLATE. */
10
+ /** Source template properties. Use when `sourceType` = `SOURCE_TEMPLATE`. */
11
11
  sourceTemplateProperties?: SourceTemplate;
12
12
  /**
13
13
  * Branch ID.
@@ -29,7 +29,7 @@ interface Branch extends BranchSourceOneOf {
29
29
  * @maxLength 50
30
30
  */
31
31
  name?: string | null;
32
- /** Source type. Must be aligned with the corresponding source properties in the oneof below. */
32
+ /** Source type. Must be aligned with the corresponding source properties below. */
33
33
  sourceType?: SourceTypeWithLiterals;
34
34
  /**
35
35
  * Date and time the branch was last published, if relevant.
@@ -37,12 +37,12 @@ interface Branch extends BranchSourceOneOf {
37
37
  */
38
38
  lastPublishDate?: string | null;
39
39
  /**
40
- * Editor type.
40
+ * Wix editor type.
41
41
  * @readonly
42
42
  */
43
43
  editorType?: EditorType;
44
44
  /**
45
- * Default branch
45
+ * Whether this branch is the default.
46
46
  * @readonly
47
47
  */
48
48
  default?: boolean | null;
@@ -64,19 +64,19 @@ interface Branch extends BranchSourceOneOf {
64
64
  }
65
65
  /** @oneof */
66
66
  interface BranchSourceOneOf {
67
- /** Source branch properties. Use when source_type = SOURCE_BRANCH. */
67
+ /** Source branch properties. Use when `sourceType` = `SOURCE_BRANCH`. */
68
68
  sourceBranchProperties?: SourceBranch;
69
- /** Source template properties. Use when source_type = SOURCE_TEMPLATE. */
69
+ /** Source template properties. Use when `sourceType` = `SOURCE_TEMPLATE`. */
70
70
  sourceTemplateProperties?: SourceTemplate;
71
71
  }
72
72
  declare enum Type {
73
73
  /** Unknown branch type. */
74
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. */
75
+ /** A branch created by a Wix user, that can be accessed for editing and publishing in the editor UI. */
76
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. */
77
+ /** A branch created for technical purposes, unrelated to the Wix user. For internal use, can't be accessed in the editor UI. */
78
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. */
79
+ /** The original branch of the site, created when the site is created. Can be accessed for editing and publishing in the editor UI. */
80
80
  ORIGINAL_BRANCH = "ORIGINAL_BRANCH"
81
81
  }
82
82
  /** @enumType */
@@ -84,23 +84,23 @@ type TypeWithLiterals = Type | 'UNKNOWN_TYPE' | 'USER' | 'TECHNICAL' | 'ORIGINAL
84
84
  declare enum SourceType {
85
85
  /** Unknown source type. Do not use - will cause ILLEGAL_SOURCE_TYPE error. */
86
86
  UNKNOWN_SOURCE_TYPE = "UNKNOWN_SOURCE_TYPE",
87
- /** This branch's source was a branch. Must be used with source_branch_properties. */
87
+ /** This branch's source was a branch. Must be used with `sourceBranchProperties`. */
88
88
  SOURCE_BRANCH = "SOURCE_BRANCH",
89
- /** This branch's source was a template. Must be used with source_template_properties. For internal use. */
89
+ /** This branch's source was a template. Must be used with `sourceTemplateProperties`. For internal use. */
90
90
  SOURCE_TEMPLATE = "SOURCE_TEMPLATE"
91
91
  }
92
92
  /** @enumType */
93
93
  type SourceTypeWithLiterals = SourceType | 'UNKNOWN_SOURCE_TYPE' | 'SOURCE_BRANCH' | 'SOURCE_TEMPLATE';
94
94
  interface EditorType {
95
- /** Editor type */
95
+ /** Wix editor types. */
96
96
  editorTypeOptions?: EditorTypeOptionsWithLiterals;
97
97
  }
98
98
  declare enum EditorTypeOptions {
99
- /** Unknown editor type */
99
+ /** Unknown editor type. Not supported. */
100
100
  UNKNOWN_EDITOR_TYPE = "UNKNOWN_EDITOR_TYPE",
101
- /** STUDIO */
101
+ /** Wix Studio Editor. */
102
102
  STUDIO = "STUDIO",
103
- /** CLASSIC */
103
+ /** Wix's Classic Editor. */
104
104
  CLASSIC = "CLASSIC"
105
105
  }
106
106
  /** @enumType */
@@ -111,7 +111,7 @@ interface SourceBranch {
111
111
  * @format GUID
112
112
  */
113
113
  branchId?: string;
114
- /** Source branch revision. */
114
+ /** Revision number, which increments by 1 each time the branch is updated. To prevent conflicting changes, the current revision must be passed when updating the branch. */
115
115
  branchRevision?: string | null;
116
116
  }
117
117
  interface SourceTemplate {
@@ -169,7 +169,7 @@ interface DeleteBranchRequest {
169
169
  interface DeleteBranchResponse {
170
170
  }
171
171
  interface QueryBranchesRequest {
172
- /** WQL expression. */
172
+ /** Query options. */
173
173
  query?: CursorQuery;
174
174
  }
175
175
  interface CursorQuery extends CursorQueryPagingMethodOneOf {
@@ -180,13 +180,13 @@ interface CursorQuery extends CursorQueryPagingMethodOneOf {
180
180
  *
181
181
  * Filterable fields:
182
182
  *
183
- * `type`
184
- * `name`
185
- * `updatedDate`
186
- * `createdDate`
187
- * `lastPublishDate`
188
- * `sourceBranchProperties.branchId`
189
- * `sourceBranchProperties.branchRevision`
183
+ * - `type`,
184
+ * - `name`,
185
+ * - `updatedDate`,
186
+ * - `createdDate`,
187
+ * - `lastPublishDate`,
188
+ * - `sourceBranchProperties.branchId`,
189
+ * - `sourceBranchProperties.branchRevision`
190
190
  *
191
191
  * All operators are valid.
192
192
  */
@@ -196,9 +196,9 @@ interface CursorQuery extends CursorQueryPagingMethodOneOf {
196
196
  *
197
197
  * Sortable fields:
198
198
  *
199
- * `updatedDate`
200
- * `createdDate`
201
- * `lastPublishDate`
199
+ * - `updatedDate`,
200
+ * - `createdDate`,
201
+ * - `lastPublishDate`
202
202
  * @maxSize 5
203
203
  */
204
204
  sort?: Sorting[];
@@ -241,7 +241,7 @@ interface CursorPaging {
241
241
  interface QueryBranchesResponse {
242
242
  /** List of branches. */
243
243
  branches?: Branch[];
244
- /** Paging metadata */
244
+ /** Metadata of the paginated results. */
245
245
  pagingMetadata?: CursorPagingMetadata;
246
246
  }
247
247
  interface CursorPagingMetadata {
@@ -783,7 +783,7 @@ interface PicassoUnassigned {
783
783
  }
784
784
  interface SetDefaultBranchRequest {
785
785
  /**
786
- * Branch Id.
786
+ * Branch ID.
787
787
  * @format GUID
788
788
  */
789
789
  branchId: string;
@@ -1022,52 +1022,54 @@ interface BranchCreatedEnvelope {
1022
1022
  entity: Branch;
1023
1023
  metadata: EventMetadata;
1024
1024
  }
1025
- /** @permissionScope Manage Site Branches
1025
+ /**
1026
+ * Triggered when a branch is created.
1027
+ * @permissionScope Manage Site Branches
1026
1028
  * @permissionScopeId SCOPE.DC-DOCUMENT-MANAGEMENT.MANAGE-BRANCHES
1027
1029
  * @permissionId EDITOR.BRANCH_READ
1028
1030
  * @webhook
1029
1031
  * @eventType wix.editor.branches.v1.branch_created
1030
1032
  * @slug created
1031
- * @documentationMaturity preview
1032
1033
  */
1033
1034
  declare function onBranchCreated(handler: (event: BranchCreatedEnvelope) => void | Promise<void>): void;
1034
1035
  interface BranchDeletedEnvelope {
1035
1036
  entity: Branch;
1036
1037
  metadata: EventMetadata;
1037
1038
  }
1038
- /** @permissionScope Manage Site Branches
1039
+ /**
1040
+ * Triggered when a branch is deleted.
1041
+ * @permissionScope Manage Site Branches
1039
1042
  * @permissionScopeId SCOPE.DC-DOCUMENT-MANAGEMENT.MANAGE-BRANCHES
1040
1043
  * @permissionId EDITOR.BRANCH_READ
1041
1044
  * @webhook
1042
1045
  * @eventType wix.editor.branches.v1.branch_deleted
1043
1046
  * @slug deleted
1044
- * @documentationMaturity preview
1045
1047
  */
1046
1048
  declare function onBranchDeleted(handler: (event: BranchDeletedEnvelope) => void | Promise<void>): void;
1047
1049
  interface BranchUpdatedEnvelope {
1048
1050
  entity: Branch;
1049
1051
  metadata: EventMetadata;
1050
1052
  }
1051
- /** @permissionScope Manage Site Branches
1053
+ /**
1054
+ * Triggered when a branch is updated.
1055
+ * @permissionScope Manage Site Branches
1052
1056
  * @permissionScopeId SCOPE.DC-DOCUMENT-MANAGEMENT.MANAGE-BRANCHES
1053
1057
  * @permissionId EDITOR.BRANCH_READ
1054
1058
  * @webhook
1055
1059
  * @eventType wix.editor.branches.v1.branch_updated
1056
1060
  * @slug updated
1057
- * @documentationMaturity preview
1058
1061
  */
1059
1062
  declare function onBranchUpdated(handler: (event: BranchUpdatedEnvelope) => void | Promise<void>): void;
1060
1063
  /**
1061
1064
  * Creates a branch.
1062
1065
  * If a source branch is not provided, the branch will include a blank website.
1063
1066
  *
1064
- * *Important:** The `source_type` field must be aligned with the corresponding source properties:
1065
- * - When `source_type` is `SOURCE_BRANCH`, you must provide `source_branch_properties`
1066
- * - When `source_type` is `SOURCE_TEMPLATE`, you must provide `source_template_properties`
1067
- * - Using `UNKNOWN_SOURCE_TYPE` or mismatched properties will result in `ILLEGAL_SOURCE_TYPE` error
1067
+ * > **Important:** The `sourceType` field must be aligned with the corresponding source properties:
1068
+ * - When `sourceType` is `SOURCE_BRANCH`, you must provide `source_branch_properties`.
1069
+ * - When `sourceType` is `SOURCE_TEMPLATE`, you must provide `source_template_properties`.
1070
+ * - Using `UNKNOWN_SOURCE_TYPE` or mismatched properties will result in an `ILLEGAL_SOURCE_TYPE` error.
1068
1071
  * @param branch - Branch to be created.
1069
1072
  * @public
1070
- * @documentationMaturity preview
1071
1073
  * @requiredField branch
1072
1074
  * @permissionId EDITOR.BRANCH_CREATE
1073
1075
  * @applicableIdentity APP
@@ -1081,7 +1083,6 @@ declare function createBranch(branch: Branch): Promise<NonNullablePaths<Branch,
1081
1083
  * Retrieves a branch.
1082
1084
  * @param branchId - ID of branch to retrieve.
1083
1085
  * @public
1084
- * @documentationMaturity preview
1085
1086
  * @requiredField branchId
1086
1087
  * @permissionId EDITOR.BRANCH_READ
1087
1088
  * @applicableIdentity APP
@@ -1092,10 +1093,9 @@ declare function getBranch(branchId: string): Promise<NonNullablePaths<Branch, `
1092
1093
  /**
1093
1094
  * Updates a branch.
1094
1095
  *
1095
- * `ORIGINAL_BRANCH` types can't be updated.
1096
+ * Note that `ORIGINAL_BRANCH` types can't be updated.
1096
1097
  * @param _id - Branch ID.
1097
1098
  * @public
1098
- * @documentationMaturity preview
1099
1099
  * @requiredField _id
1100
1100
  * @requiredField branch
1101
1101
  * @requiredField branch.revision
@@ -1108,9 +1108,9 @@ declare function updateBranch(_id: string, branch: NonNullablePaths<UpdateBranch
1108
1108
  __applicationErrorsType?: UpdateBranchApplicationErrors;
1109
1109
  }>;
1110
1110
  interface UpdateBranch {
1111
- /** Source branch properties. Use when source_type = SOURCE_BRANCH. */
1111
+ /** Source branch properties. Use when `sourceType` = `SOURCE_BRANCH`. */
1112
1112
  sourceBranchProperties?: SourceBranch;
1113
- /** Source template properties. Use when source_type = SOURCE_TEMPLATE. */
1113
+ /** Source template properties. Use when `sourceType` = `SOURCE_TEMPLATE`. */
1114
1114
  sourceTemplateProperties?: SourceTemplate;
1115
1115
  /**
1116
1116
  * Branch ID.
@@ -1132,7 +1132,7 @@ interface UpdateBranch {
1132
1132
  * @maxLength 50
1133
1133
  */
1134
1134
  name?: string | null;
1135
- /** Source type. Must be aligned with the corresponding source properties in the oneof below. */
1135
+ /** Source type. Must be aligned with the corresponding source properties below. */
1136
1136
  sourceType?: SourceTypeWithLiterals;
1137
1137
  /**
1138
1138
  * Date and time the branch was last published, if relevant.
@@ -1140,12 +1140,12 @@ interface UpdateBranch {
1140
1140
  */
1141
1141
  lastPublishDate?: string | null;
1142
1142
  /**
1143
- * Editor type.
1143
+ * Wix editor type.
1144
1144
  * @readonly
1145
1145
  */
1146
1146
  editorType?: EditorType;
1147
1147
  /**
1148
- * Default branch
1148
+ * Whether this branch is the default.
1149
1149
  * @readonly
1150
1150
  */
1151
1151
  default?: boolean | null;
@@ -1169,7 +1169,6 @@ interface UpdateBranch {
1169
1169
  * Permanently deletes a branch.
1170
1170
  * @param branchId - ID of branch to delete.
1171
1171
  * @public
1172
- * @documentationMaturity preview
1173
1172
  * @requiredField branchId
1174
1173
  * @permissionId EDITOR.BRANCH_DELETE
1175
1174
  * @applicableIdentity APP
@@ -1181,7 +1180,6 @@ declare function deleteBranch(branchId: string): Promise<void & {
1181
1180
  /**
1182
1181
  * Retrieves a list of branches, given the specified [paging, filtering, and sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language).
1183
1182
  * @public
1184
- * @documentationMaturity preview
1185
1183
  * @permissionId EDITOR.BRANCH_READ
1186
1184
  * @applicableIdentity APP
1187
1185
  * @fqn wix.editor.branches.v1.BranchesService.QueryBranches
@@ -1203,72 +1201,52 @@ interface BranchesQueryResult extends QueryCursorResult {
1203
1201
  interface BranchesQueryBuilder {
1204
1202
  /** @param propertyName - Property whose value is compared with `value`.
1205
1203
  * @param value - Value to compare against.
1206
- * @documentationMaturity preview
1207
1204
  */
1208
1205
  eq: (propertyName: 'sourceBranchProperties.branchId' | 'sourceBranchProperties.branchRevision' | 'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
1209
1206
  /** @param propertyName - Property whose value is compared with `value`.
1210
1207
  * @param value - Value to compare against.
1211
- * @documentationMaturity preview
1212
1208
  */
1213
1209
  ne: (propertyName: 'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
1214
1210
  /** @param propertyName - Property whose value is compared with `value`.
1215
1211
  * @param value - Value to compare against.
1216
- * @documentationMaturity preview
1217
1212
  */
1218
1213
  ge: (propertyName: 'name' | 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
1219
1214
  /** @param propertyName - Property whose value is compared with `value`.
1220
1215
  * @param value - Value to compare against.
1221
- * @documentationMaturity preview
1222
1216
  */
1223
1217
  gt: (propertyName: 'name' | 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
1224
1218
  /** @param propertyName - Property whose value is compared with `value`.
1225
1219
  * @param value - Value to compare against.
1226
- * @documentationMaturity preview
1227
1220
  */
1228
1221
  le: (propertyName: 'name' | 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
1229
1222
  /** @param propertyName - Property whose value is compared with `value`.
1230
1223
  * @param value - Value to compare against.
1231
- * @documentationMaturity preview
1232
1224
  */
1233
1225
  lt: (propertyName: 'name' | 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
1234
1226
  /** @param propertyName - Property whose value is compared with `string`.
1235
1227
  * @param string - String to compare against. Case-insensitive.
1236
- * @documentationMaturity preview
1237
1228
  */
1238
1229
  startsWith: (propertyName: 'name', value: string) => BranchesQueryBuilder;
1239
1230
  /** @param propertyName - Property whose value is compared with `values`.
1240
1231
  * @param values - List of values to compare against.
1241
- * @documentationMaturity preview
1242
1232
  */
1243
1233
  hasSome: (propertyName: 'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate', value: any[]) => BranchesQueryBuilder;
1244
- /** @documentationMaturity preview */
1245
1234
  in: (propertyName: 'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder;
1246
- /** @documentationMaturity preview */
1247
1235
  exists: (propertyName: 'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate', value: boolean) => BranchesQueryBuilder;
1248
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1249
- * @documentationMaturity preview
1250
- */
1236
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
1251
1237
  ascending: (...propertyNames: Array<'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate'>) => BranchesQueryBuilder;
1252
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1253
- * @documentationMaturity preview
1254
- */
1238
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
1255
1239
  descending: (...propertyNames: Array<'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate'>) => BranchesQueryBuilder;
1256
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1257
- * @documentationMaturity preview
1258
- */
1240
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
1259
1241
  limit: (limit: number) => BranchesQueryBuilder;
1260
- /** @param cursor - A pointer to specific record
1261
- * @documentationMaturity preview
1262
- */
1242
+ /** @param cursor - A pointer to specific record */
1263
1243
  skipTo: (cursor: string) => BranchesQueryBuilder;
1264
- /** @documentationMaturity preview */
1265
1244
  find: () => Promise<BranchesQueryResult>;
1266
1245
  }
1267
1246
  /**
1268
1247
  * Sets the specified branch as the default.
1269
- * @param branchId - Branch Id.
1248
+ * @param branchId - Branch ID.
1270
1249
  * @public
1271
- * @documentationMaturity preview
1272
1250
  * @requiredField branchId
1273
1251
  * @permissionId EDITOR.SET_DEFAULT_BRANCH
1274
1252
  * @applicableIdentity APP
@@ -1278,7 +1256,6 @@ declare function setDefaultBranch(branchId: string): Promise<NonNullablePaths<Se
1278
1256
  /**
1279
1257
  * Retrieves the default branch.
1280
1258
  * @public
1281
- * @documentationMaturity preview
1282
1259
  * @permissionId EDITOR.BRANCH_READ
1283
1260
  * @applicableIdentity APP
1284
1261
  * @fqn wix.editor.branches.v1.BranchesService.GetDefaultBranch