@flexbe/sdk 0.2.7 → 0.2.9
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/dist/browser/client/pages.js +10 -10
- package/dist/browser/types/pages.js +1 -0
- package/dist/cjs/client/pages.js +10 -10
- package/dist/cjs/types/pages.js +1 -0
- package/dist/esm/client/pages.js +10 -10
- package/dist/esm/types/pages.js +1 -0
- package/dist/types/client/pages.d.ts +6 -6
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/pages.d.ts +6 -5
- package/package.json +1 -1
|
@@ -69,15 +69,15 @@ export class Pages {
|
|
|
69
69
|
* @throws {ServerException} When the server encounters an error
|
|
70
70
|
* @throws {TimeoutException} When the request times out
|
|
71
71
|
*/
|
|
72
|
-
getFolder(
|
|
72
|
+
getFolder(id) {
|
|
73
73
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
-
const response = yield this.api.get(`/sites/${this.siteId}/pages-folders/${
|
|
74
|
+
const response = yield this.api.get(`/sites/${this.siteId}/pages-folders/${id}`);
|
|
75
75
|
return response.data;
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
79
|
* Update a folder's properties
|
|
80
|
-
* @param
|
|
80
|
+
* @param id - ID of the folder to update
|
|
81
81
|
* @param data - Update parameters:
|
|
82
82
|
* - title: New title for the folder
|
|
83
83
|
* - sortIndex: New position in the folder list
|
|
@@ -88,9 +88,9 @@ export class Pages {
|
|
|
88
88
|
* @throws {ServerException} When the server encounters an error
|
|
89
89
|
* @throws {TimeoutException} When the request times out
|
|
90
90
|
*/
|
|
91
|
-
updateFolder(
|
|
91
|
+
updateFolder(id, data) {
|
|
92
92
|
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
-
const response = yield this.api.patch(`/sites/${this.siteId}/pages-folders/${
|
|
93
|
+
const response = yield this.api.patch(`/sites/${this.siteId}/pages-folders/${id}`, data);
|
|
94
94
|
return response.data;
|
|
95
95
|
});
|
|
96
96
|
}
|
|
@@ -119,9 +119,9 @@ export class Pages {
|
|
|
119
119
|
* @throws {ServerException} When the server encounters an error
|
|
120
120
|
* @throws {TimeoutException} When the request times out
|
|
121
121
|
*/
|
|
122
|
-
deleteFolder(
|
|
122
|
+
deleteFolder(id) {
|
|
123
123
|
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
-
yield this.api.delete(`/sites/${this.siteId}/pages-folders/${
|
|
124
|
+
yield this.api.delete(`/sites/${this.siteId}/pages-folders/${id}`);
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
/**
|
|
@@ -219,7 +219,7 @@ export class Pages {
|
|
|
219
219
|
}
|
|
220
220
|
/**
|
|
221
221
|
* Bulk delete multiple pages
|
|
222
|
-
* @param
|
|
222
|
+
* @param ids - Array of page IDs to delete
|
|
223
223
|
* @returns Object containing:
|
|
224
224
|
* - deleted: Array of successfully deleted page IDs
|
|
225
225
|
* - errors: Array of errors for failed deletions
|
|
@@ -229,10 +229,10 @@ export class Pages {
|
|
|
229
229
|
* @throws {ServerException} When the server encounters an error
|
|
230
230
|
* @throws {TimeoutException} When the request times out
|
|
231
231
|
*/
|
|
232
|
-
bulkDeletePages(
|
|
232
|
+
bulkDeletePages(ids) {
|
|
233
233
|
return __awaiter(this, void 0, void 0, function* () {
|
|
234
234
|
const response = yield this.api.delete(`/sites/${this.siteId}/pages`, {
|
|
235
|
-
body: JSON.stringify({
|
|
235
|
+
body: JSON.stringify({ ids })
|
|
236
236
|
});
|
|
237
237
|
return response.data;
|
|
238
238
|
});
|
package/dist/cjs/client/pages.js
CHANGED
|
@@ -61,13 +61,13 @@ class Pages {
|
|
|
61
61
|
* @throws {ServerException} When the server encounters an error
|
|
62
62
|
* @throws {TimeoutException} When the request times out
|
|
63
63
|
*/
|
|
64
|
-
async getFolder(
|
|
65
|
-
const response = await this.api.get(`/sites/${this.siteId}/pages-folders/${
|
|
64
|
+
async getFolder(id) {
|
|
65
|
+
const response = await this.api.get(`/sites/${this.siteId}/pages-folders/${id}`);
|
|
66
66
|
return response.data;
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
69
|
* Update a folder's properties
|
|
70
|
-
* @param
|
|
70
|
+
* @param id - ID of the folder to update
|
|
71
71
|
* @param data - Update parameters:
|
|
72
72
|
* - title: New title for the folder
|
|
73
73
|
* - sortIndex: New position in the folder list
|
|
@@ -78,8 +78,8 @@ class Pages {
|
|
|
78
78
|
* @throws {ServerException} When the server encounters an error
|
|
79
79
|
* @throws {TimeoutException} When the request times out
|
|
80
80
|
*/
|
|
81
|
-
async updateFolder(
|
|
82
|
-
const response = await this.api.patch(`/sites/${this.siteId}/pages-folders/${
|
|
81
|
+
async updateFolder(id, data) {
|
|
82
|
+
const response = await this.api.patch(`/sites/${this.siteId}/pages-folders/${id}`, data);
|
|
83
83
|
return response.data;
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
@@ -105,8 +105,8 @@ class Pages {
|
|
|
105
105
|
* @throws {ServerException} When the server encounters an error
|
|
106
106
|
* @throws {TimeoutException} When the request times out
|
|
107
107
|
*/
|
|
108
|
-
async deleteFolder(
|
|
109
|
-
await this.api.delete(`/sites/${this.siteId}/pages-folders/${
|
|
108
|
+
async deleteFolder(id) {
|
|
109
|
+
await this.api.delete(`/sites/${this.siteId}/pages-folders/${id}`);
|
|
110
110
|
}
|
|
111
111
|
/**
|
|
112
112
|
* Delete a page
|
|
@@ -195,7 +195,7 @@ class Pages {
|
|
|
195
195
|
}
|
|
196
196
|
/**
|
|
197
197
|
* Bulk delete multiple pages
|
|
198
|
-
* @param
|
|
198
|
+
* @param ids - Array of page IDs to delete
|
|
199
199
|
* @returns Object containing:
|
|
200
200
|
* - deleted: Array of successfully deleted page IDs
|
|
201
201
|
* - errors: Array of errors for failed deletions
|
|
@@ -205,9 +205,9 @@ class Pages {
|
|
|
205
205
|
* @throws {ServerException} When the server encounters an error
|
|
206
206
|
* @throws {TimeoutException} When the request times out
|
|
207
207
|
*/
|
|
208
|
-
async bulkDeletePages(
|
|
208
|
+
async bulkDeletePages(ids) {
|
|
209
209
|
const response = await this.api.delete(`/sites/${this.siteId}/pages`, {
|
|
210
|
-
body: JSON.stringify({
|
|
210
|
+
body: JSON.stringify({ ids })
|
|
211
211
|
});
|
|
212
212
|
return response.data;
|
|
213
213
|
}
|
package/dist/cjs/types/pages.js
CHANGED
package/dist/esm/client/pages.js
CHANGED
|
@@ -58,13 +58,13 @@ export class Pages {
|
|
|
58
58
|
* @throws {ServerException} When the server encounters an error
|
|
59
59
|
* @throws {TimeoutException} When the request times out
|
|
60
60
|
*/
|
|
61
|
-
async getFolder(
|
|
62
|
-
const response = await this.api.get(`/sites/${this.siteId}/pages-folders/${
|
|
61
|
+
async getFolder(id) {
|
|
62
|
+
const response = await this.api.get(`/sites/${this.siteId}/pages-folders/${id}`);
|
|
63
63
|
return response.data;
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
66
|
* Update a folder's properties
|
|
67
|
-
* @param
|
|
67
|
+
* @param id - ID of the folder to update
|
|
68
68
|
* @param data - Update parameters:
|
|
69
69
|
* - title: New title for the folder
|
|
70
70
|
* - sortIndex: New position in the folder list
|
|
@@ -75,8 +75,8 @@ export class Pages {
|
|
|
75
75
|
* @throws {ServerException} When the server encounters an error
|
|
76
76
|
* @throws {TimeoutException} When the request times out
|
|
77
77
|
*/
|
|
78
|
-
async updateFolder(
|
|
79
|
-
const response = await this.api.patch(`/sites/${this.siteId}/pages-folders/${
|
|
78
|
+
async updateFolder(id, data) {
|
|
79
|
+
const response = await this.api.patch(`/sites/${this.siteId}/pages-folders/${id}`, data);
|
|
80
80
|
return response.data;
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
@@ -102,8 +102,8 @@ export class Pages {
|
|
|
102
102
|
* @throws {ServerException} When the server encounters an error
|
|
103
103
|
* @throws {TimeoutException} When the request times out
|
|
104
104
|
*/
|
|
105
|
-
async deleteFolder(
|
|
106
|
-
await this.api.delete(`/sites/${this.siteId}/pages-folders/${
|
|
105
|
+
async deleteFolder(id) {
|
|
106
|
+
await this.api.delete(`/sites/${this.siteId}/pages-folders/${id}`);
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
109
|
* Delete a page
|
|
@@ -192,7 +192,7 @@ export class Pages {
|
|
|
192
192
|
}
|
|
193
193
|
/**
|
|
194
194
|
* Bulk delete multiple pages
|
|
195
|
-
* @param
|
|
195
|
+
* @param ids - Array of page IDs to delete
|
|
196
196
|
* @returns Object containing:
|
|
197
197
|
* - deleted: Array of successfully deleted page IDs
|
|
198
198
|
* - errors: Array of errors for failed deletions
|
|
@@ -202,9 +202,9 @@ export class Pages {
|
|
|
202
202
|
* @throws {ServerException} When the server encounters an error
|
|
203
203
|
* @throws {TimeoutException} When the request times out
|
|
204
204
|
*/
|
|
205
|
-
async bulkDeletePages(
|
|
205
|
+
async bulkDeletePages(ids) {
|
|
206
206
|
const response = await this.api.delete(`/sites/${this.siteId}/pages`, {
|
|
207
|
-
body: JSON.stringify({
|
|
207
|
+
body: JSON.stringify({ ids })
|
|
208
208
|
});
|
|
209
209
|
return response.data;
|
|
210
210
|
}
|
package/dist/esm/types/pages.js
CHANGED
|
@@ -45,10 +45,10 @@ export declare class Pages {
|
|
|
45
45
|
* @throws {ServerException} When the server encounters an error
|
|
46
46
|
* @throws {TimeoutException} When the request times out
|
|
47
47
|
*/
|
|
48
|
-
getFolder(
|
|
48
|
+
getFolder(id: number): Promise<PageFolder>;
|
|
49
49
|
/**
|
|
50
50
|
* Update a folder's properties
|
|
51
|
-
* @param
|
|
51
|
+
* @param id - ID of the folder to update
|
|
52
52
|
* @param data - Update parameters:
|
|
53
53
|
* - title: New title for the folder
|
|
54
54
|
* - sortIndex: New position in the folder list
|
|
@@ -59,7 +59,7 @@ export declare class Pages {
|
|
|
59
59
|
* @throws {ServerException} When the server encounters an error
|
|
60
60
|
* @throws {TimeoutException} When the request times out
|
|
61
61
|
*/
|
|
62
|
-
updateFolder(
|
|
62
|
+
updateFolder(id: number, data: UpdateFolderParams): Promise<PageFolder>;
|
|
63
63
|
/**
|
|
64
64
|
* Create a new folder
|
|
65
65
|
* @param data - Create parameters:
|
|
@@ -80,7 +80,7 @@ export declare class Pages {
|
|
|
80
80
|
* @throws {ServerException} When the server encounters an error
|
|
81
81
|
* @throws {TimeoutException} When the request times out
|
|
82
82
|
*/
|
|
83
|
-
deleteFolder(
|
|
83
|
+
deleteFolder(id: number): Promise<void>;
|
|
84
84
|
/**
|
|
85
85
|
* Delete a page
|
|
86
86
|
* @param pageId - ID of the page to delete
|
|
@@ -157,7 +157,7 @@ export declare class Pages {
|
|
|
157
157
|
bulkUpdateFolders(updates: BulkUpdateFolderItem[]): Promise<BulkUpdateFolderResponse>;
|
|
158
158
|
/**
|
|
159
159
|
* Bulk delete multiple pages
|
|
160
|
-
* @param
|
|
160
|
+
* @param ids - Array of page IDs to delete
|
|
161
161
|
* @returns Object containing:
|
|
162
162
|
* - deleted: Array of successfully deleted page IDs
|
|
163
163
|
* - errors: Array of errors for failed deletions
|
|
@@ -167,5 +167,5 @@ export declare class Pages {
|
|
|
167
167
|
* @throws {ServerException} When the server encounters an error
|
|
168
168
|
* @throws {TimeoutException} When the request times out
|
|
169
169
|
*/
|
|
170
|
-
bulkDeletePages(
|
|
170
|
+
bulkDeletePages(ids: number[]): Promise<BulkDeleteResponseDto>;
|
|
171
171
|
}
|
|
@@ -40,6 +40,7 @@ export declare enum PageType {
|
|
|
40
40
|
export declare enum PageStatus {
|
|
41
41
|
PUBLISHED = "published",
|
|
42
42
|
DRAFTED = "drafted",
|
|
43
|
+
REMOVED = "removed",
|
|
43
44
|
DELETED = "deleted"
|
|
44
45
|
}
|
|
45
46
|
export interface Page {
|
|
@@ -102,10 +103,10 @@ export interface UpdatePageParams {
|
|
|
102
103
|
};
|
|
103
104
|
}
|
|
104
105
|
export interface BulkUpdatePageItem extends UpdatePageParams {
|
|
105
|
-
|
|
106
|
+
id: number;
|
|
106
107
|
}
|
|
107
108
|
export interface BulkUpdateError {
|
|
108
|
-
|
|
109
|
+
id: number;
|
|
109
110
|
code: number;
|
|
110
111
|
message: string;
|
|
111
112
|
}
|
|
@@ -114,10 +115,10 @@ export interface BulkUpdateResponse {
|
|
|
114
115
|
errors: BulkUpdateError[];
|
|
115
116
|
}
|
|
116
117
|
export interface BulkUpdateFolderItem extends UpdateFolderParams {
|
|
117
|
-
|
|
118
|
+
id: number;
|
|
118
119
|
}
|
|
119
120
|
export interface BulkUpdateFolderError {
|
|
120
|
-
|
|
121
|
+
id: number;
|
|
121
122
|
code: number;
|
|
122
123
|
message: string;
|
|
123
124
|
}
|
|
@@ -129,7 +130,7 @@ export interface BulkDeletePagesDto {
|
|
|
129
130
|
pageIds: number[];
|
|
130
131
|
}
|
|
131
132
|
export interface BulkDeleteError {
|
|
132
|
-
|
|
133
|
+
id: number;
|
|
133
134
|
code: number;
|
|
134
135
|
message: string;
|
|
135
136
|
}
|