@wix/auto_sdk_editor-branches_branches 1.0.20 → 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.
- package/build/cjs/index.d.ts +15 -9
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +50 -44
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +30 -30
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +15 -9
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +50 -44
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +30 -30
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +15 -9
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +50 -44
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +30 -30
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +15 -9
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +50 -44
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +30 -30
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -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
|
|
8
|
+
/** Source branch properties. Use when `sourceType` = `SOURCE_BRANCH`. */
|
|
9
9
|
sourceBranchProperties?: SourceBranch;
|
|
10
|
-
/** Source template properties. Use when
|
|
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
|
|
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
|
-
*
|
|
40
|
+
* Wix editor type.
|
|
41
41
|
* @readonly
|
|
42
42
|
*/
|
|
43
43
|
editorType?: EditorType;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
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
|
|
67
|
+
/** Source branch properties. Use when `sourceType` = `SOURCE_BRANCH`. */
|
|
68
68
|
sourceBranchProperties?: SourceBranch;
|
|
69
|
-
/** Source template properties. Use when
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
101
|
+
/** Wix Studio Editor. */
|
|
102
102
|
STUDIO = "STUDIO",
|
|
103
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
|
786
|
+
* Branch ID.
|
|
787
787
|
* @format GUID
|
|
788
788
|
*/
|
|
789
789
|
branchId: string;
|
|
@@ -1022,7 +1022,9 @@ interface BranchCreatedEnvelope {
|
|
|
1022
1022
|
entity: Branch;
|
|
1023
1023
|
metadata: EventMetadata;
|
|
1024
1024
|
}
|
|
1025
|
-
/**
|
|
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
|
|
@@ -1034,7 +1036,9 @@ interface BranchDeletedEnvelope {
|
|
|
1034
1036
|
entity: Branch;
|
|
1035
1037
|
metadata: EventMetadata;
|
|
1036
1038
|
}
|
|
1037
|
-
/**
|
|
1039
|
+
/**
|
|
1040
|
+
* Triggered when a branch is deleted.
|
|
1041
|
+
* @permissionScope Manage Site Branches
|
|
1038
1042
|
* @permissionScopeId SCOPE.DC-DOCUMENT-MANAGEMENT.MANAGE-BRANCHES
|
|
1039
1043
|
* @permissionId EDITOR.BRANCH_READ
|
|
1040
1044
|
* @webhook
|
|
@@ -1046,7 +1050,9 @@ interface BranchUpdatedEnvelope {
|
|
|
1046
1050
|
entity: Branch;
|
|
1047
1051
|
metadata: EventMetadata;
|
|
1048
1052
|
}
|
|
1049
|
-
/**
|
|
1053
|
+
/**
|
|
1054
|
+
* Triggered when a branch is updated.
|
|
1055
|
+
* @permissionScope Manage Site Branches
|
|
1050
1056
|
* @permissionScopeId SCOPE.DC-DOCUMENT-MANAGEMENT.MANAGE-BRANCHES
|
|
1051
1057
|
* @permissionId EDITOR.BRANCH_READ
|
|
1052
1058
|
* @webhook
|
|
@@ -1058,10 +1064,10 @@ declare function onBranchUpdated(handler: (event: BranchUpdatedEnvelope) => void
|
|
|
1058
1064
|
* Creates a branch.
|
|
1059
1065
|
* If a source branch is not provided, the branch will include a blank website.
|
|
1060
1066
|
*
|
|
1061
|
-
*
|
|
1062
|
-
* - When `
|
|
1063
|
-
* - When `
|
|
1064
|
-
* - 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.
|
|
1065
1071
|
* @param branch - Branch to be created.
|
|
1066
1072
|
* @public
|
|
1067
1073
|
* @requiredField branch
|
|
@@ -1087,7 +1093,7 @@ declare function getBranch(branchId: string): Promise<NonNullablePaths<Branch, `
|
|
|
1087
1093
|
/**
|
|
1088
1094
|
* Updates a branch.
|
|
1089
1095
|
*
|
|
1090
|
-
* `ORIGINAL_BRANCH` types can't be updated.
|
|
1096
|
+
* Note that `ORIGINAL_BRANCH` types can't be updated.
|
|
1091
1097
|
* @param _id - Branch ID.
|
|
1092
1098
|
* @public
|
|
1093
1099
|
* @requiredField _id
|
|
@@ -1102,9 +1108,9 @@ declare function updateBranch(_id: string, branch: NonNullablePaths<UpdateBranch
|
|
|
1102
1108
|
__applicationErrorsType?: UpdateBranchApplicationErrors;
|
|
1103
1109
|
}>;
|
|
1104
1110
|
interface UpdateBranch {
|
|
1105
|
-
/** Source branch properties. Use when
|
|
1111
|
+
/** Source branch properties. Use when `sourceType` = `SOURCE_BRANCH`. */
|
|
1106
1112
|
sourceBranchProperties?: SourceBranch;
|
|
1107
|
-
/** Source template properties. Use when
|
|
1113
|
+
/** Source template properties. Use when `sourceType` = `SOURCE_TEMPLATE`. */
|
|
1108
1114
|
sourceTemplateProperties?: SourceTemplate;
|
|
1109
1115
|
/**
|
|
1110
1116
|
* Branch ID.
|
|
@@ -1126,7 +1132,7 @@ interface UpdateBranch {
|
|
|
1126
1132
|
* @maxLength 50
|
|
1127
1133
|
*/
|
|
1128
1134
|
name?: string | null;
|
|
1129
|
-
/** Source type. Must be aligned with the corresponding source properties
|
|
1135
|
+
/** Source type. Must be aligned with the corresponding source properties below. */
|
|
1130
1136
|
sourceType?: SourceTypeWithLiterals;
|
|
1131
1137
|
/**
|
|
1132
1138
|
* Date and time the branch was last published, if relevant.
|
|
@@ -1134,12 +1140,12 @@ interface UpdateBranch {
|
|
|
1134
1140
|
*/
|
|
1135
1141
|
lastPublishDate?: string | null;
|
|
1136
1142
|
/**
|
|
1137
|
-
*
|
|
1143
|
+
* Wix editor type.
|
|
1138
1144
|
* @readonly
|
|
1139
1145
|
*/
|
|
1140
1146
|
editorType?: EditorType;
|
|
1141
1147
|
/**
|
|
1142
|
-
*
|
|
1148
|
+
* Whether this branch is the default.
|
|
1143
1149
|
* @readonly
|
|
1144
1150
|
*/
|
|
1145
1151
|
default?: boolean | null;
|
|
@@ -1239,7 +1245,7 @@ interface BranchesQueryBuilder {
|
|
|
1239
1245
|
}
|
|
1240
1246
|
/**
|
|
1241
1247
|
* Sets the specified branch as the default.
|
|
1242
|
-
* @param branchId - Branch
|
|
1248
|
+
* @param branchId - Branch ID.
|
|
1243
1249
|
* @public
|
|
1244
1250
|
* @requiredField branchId
|
|
1245
1251
|
* @permissionId EDITOR.SET_DEFAULT_BRANCH
|