@flexbe/sdk 0.2.6 → 0.2.8
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 +20 -0
- package/dist/browser/types/pages.js +1 -0
- package/dist/cjs/client/pages.js +18 -0
- package/dist/cjs/types/pages.js +1 -0
- package/dist/esm/client/pages.js +18 -0
- package/dist/esm/types/pages.js +1 -0
- package/dist/types/client/pages.d.ts +14 -1
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/pages.d.ts +13 -0
- package/package.json +1 -1
|
@@ -217,4 +217,24 @@ export class Pages {
|
|
|
217
217
|
return response.data;
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* Bulk delete multiple pages
|
|
222
|
+
* @param pageIds - Array of page IDs to delete
|
|
223
|
+
* @returns Object containing:
|
|
224
|
+
* - deleted: Array of successfully deleted page IDs
|
|
225
|
+
* - errors: Array of errors for failed deletions
|
|
226
|
+
* @throws {UnauthorizedException} When the API key is invalid or expired
|
|
227
|
+
* @throws {ForbiddenException} When the site is not accessible
|
|
228
|
+
* @throws {BadRequestException} When all pages fail to delete
|
|
229
|
+
* @throws {ServerException} When the server encounters an error
|
|
230
|
+
* @throws {TimeoutException} When the request times out
|
|
231
|
+
*/
|
|
232
|
+
bulkDeletePages(pageIds) {
|
|
233
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
234
|
+
const response = yield this.api.delete(`/sites/${this.siteId}/pages`, {
|
|
235
|
+
body: JSON.stringify({ pageIds })
|
|
236
|
+
});
|
|
237
|
+
return response.data;
|
|
238
|
+
});
|
|
239
|
+
}
|
|
220
240
|
}
|
package/dist/cjs/client/pages.js
CHANGED
|
@@ -193,5 +193,23 @@ class Pages {
|
|
|
193
193
|
const response = await this.api.patch(`/sites/${this.siteId}/pages-folders`, updates);
|
|
194
194
|
return response.data;
|
|
195
195
|
}
|
|
196
|
+
/**
|
|
197
|
+
* Bulk delete multiple pages
|
|
198
|
+
* @param pageIds - Array of page IDs to delete
|
|
199
|
+
* @returns Object containing:
|
|
200
|
+
* - deleted: Array of successfully deleted page IDs
|
|
201
|
+
* - errors: Array of errors for failed deletions
|
|
202
|
+
* @throws {UnauthorizedException} When the API key is invalid or expired
|
|
203
|
+
* @throws {ForbiddenException} When the site is not accessible
|
|
204
|
+
* @throws {BadRequestException} When all pages fail to delete
|
|
205
|
+
* @throws {ServerException} When the server encounters an error
|
|
206
|
+
* @throws {TimeoutException} When the request times out
|
|
207
|
+
*/
|
|
208
|
+
async bulkDeletePages(pageIds) {
|
|
209
|
+
const response = await this.api.delete(`/sites/${this.siteId}/pages`, {
|
|
210
|
+
body: JSON.stringify({ pageIds })
|
|
211
|
+
});
|
|
212
|
+
return response.data;
|
|
213
|
+
}
|
|
196
214
|
}
|
|
197
215
|
exports.Pages = Pages;
|
package/dist/cjs/types/pages.js
CHANGED
package/dist/esm/client/pages.js
CHANGED
|
@@ -190,4 +190,22 @@ export class Pages {
|
|
|
190
190
|
const response = await this.api.patch(`/sites/${this.siteId}/pages-folders`, updates);
|
|
191
191
|
return response.data;
|
|
192
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* Bulk delete multiple pages
|
|
195
|
+
* @param pageIds - Array of page IDs to delete
|
|
196
|
+
* @returns Object containing:
|
|
197
|
+
* - deleted: Array of successfully deleted page IDs
|
|
198
|
+
* - errors: Array of errors for failed deletions
|
|
199
|
+
* @throws {UnauthorizedException} When the API key is invalid or expired
|
|
200
|
+
* @throws {ForbiddenException} When the site is not accessible
|
|
201
|
+
* @throws {BadRequestException} When all pages fail to delete
|
|
202
|
+
* @throws {ServerException} When the server encounters an error
|
|
203
|
+
* @throws {TimeoutException} When the request times out
|
|
204
|
+
*/
|
|
205
|
+
async bulkDeletePages(pageIds) {
|
|
206
|
+
const response = await this.api.delete(`/sites/${this.siteId}/pages`, {
|
|
207
|
+
body: JSON.stringify({ pageIds })
|
|
208
|
+
});
|
|
209
|
+
return response.data;
|
|
210
|
+
}
|
|
193
211
|
}
|
package/dist/esm/types/pages.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Page, GetPagesParams, PageListResponse, PageFolder, PageFolderListResponse, UpdateFolderParams, CreateFolderParams, UpdatePageParams, BulkUpdatePageItem, BulkUpdateResponse, BulkUpdateFolderItem, BulkUpdateFolderResponse } from '../types/pages';
|
|
1
|
+
import { Page, GetPagesParams, PageListResponse, PageFolder, PageFolderListResponse, UpdateFolderParams, CreateFolderParams, UpdatePageParams, BulkUpdatePageItem, BulkUpdateResponse, BulkUpdateFolderItem, BulkUpdateFolderResponse, BulkDeleteResponseDto } from '../types/pages';
|
|
2
2
|
import { ApiClient } from './api-client';
|
|
3
3
|
export declare class Pages {
|
|
4
4
|
private readonly api;
|
|
@@ -155,4 +155,17 @@ export declare class Pages {
|
|
|
155
155
|
* @throws {TimeoutException} When the request times out
|
|
156
156
|
*/
|
|
157
157
|
bulkUpdateFolders(updates: BulkUpdateFolderItem[]): Promise<BulkUpdateFolderResponse>;
|
|
158
|
+
/**
|
|
159
|
+
* Bulk delete multiple pages
|
|
160
|
+
* @param pageIds - Array of page IDs to delete
|
|
161
|
+
* @returns Object containing:
|
|
162
|
+
* - deleted: Array of successfully deleted page IDs
|
|
163
|
+
* - errors: Array of errors for failed deletions
|
|
164
|
+
* @throws {UnauthorizedException} When the API key is invalid or expired
|
|
165
|
+
* @throws {ForbiddenException} When the site is not accessible
|
|
166
|
+
* @throws {BadRequestException} When all pages fail to delete
|
|
167
|
+
* @throws {ServerException} When the server encounters an error
|
|
168
|
+
* @throws {TimeoutException} When the request times out
|
|
169
|
+
*/
|
|
170
|
+
bulkDeletePages(pageIds: number[]): Promise<BulkDeleteResponseDto>;
|
|
158
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 {
|
|
@@ -125,3 +126,15 @@ export interface BulkUpdateFolderResponse {
|
|
|
125
126
|
updated: PageFolder[];
|
|
126
127
|
errors: BulkUpdateFolderError[];
|
|
127
128
|
}
|
|
129
|
+
export interface BulkDeletePagesDto {
|
|
130
|
+
pageIds: number[];
|
|
131
|
+
}
|
|
132
|
+
export interface BulkDeleteError {
|
|
133
|
+
pageId: number;
|
|
134
|
+
code: number;
|
|
135
|
+
message: string;
|
|
136
|
+
}
|
|
137
|
+
export interface BulkDeleteResponseDto {
|
|
138
|
+
deleted: number[];
|
|
139
|
+
errors: BulkDeleteError[];
|
|
140
|
+
}
|