@flexbe/sdk 0.2.0 → 0.2.1
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.
|
@@ -13,6 +13,14 @@ export class Pages {
|
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Get list of pages for a site
|
|
16
|
+
* @param params - Query parameters including:
|
|
17
|
+
* - offset: Number of items to skip (default: 0)
|
|
18
|
+
* - limit: Maximum number of items to return (default: 100)
|
|
19
|
+
* - type: Filter by page type
|
|
20
|
+
* - status: Filter by page status
|
|
21
|
+
* - uri: Search by URI (exact match with '/' or partial match with '%word%')
|
|
22
|
+
* - title: Search by title
|
|
23
|
+
* - folderId: Filter by folder ID
|
|
16
24
|
*/
|
|
17
25
|
getPages(params) {
|
|
18
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -49,6 +57,10 @@ export class Pages {
|
|
|
49
57
|
}
|
|
50
58
|
/**
|
|
51
59
|
* Update a folder's properties
|
|
60
|
+
* @param folderId - ID of the folder to update
|
|
61
|
+
* @param data - Update parameters:
|
|
62
|
+
* - title: New title for the folder
|
|
63
|
+
* - sortIndex: New position in the folder list
|
|
52
64
|
*/
|
|
53
65
|
updateFolder(folderId, data) {
|
|
54
66
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -58,6 +70,9 @@ export class Pages {
|
|
|
58
70
|
}
|
|
59
71
|
/**
|
|
60
72
|
* Create a new folder
|
|
73
|
+
* @param data - Create parameters:
|
|
74
|
+
* - title: Title of the new folder (required)
|
|
75
|
+
* - sortIndex: Position in the folder list (optional)
|
|
61
76
|
*/
|
|
62
77
|
createFolder(data) {
|
|
63
78
|
return __awaiter(this, void 0, void 0, function* () {
|
package/dist/cjs/client/pages.js
CHANGED
|
@@ -7,6 +7,14 @@ class Pages {
|
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* Get list of pages for a site
|
|
10
|
+
* @param params - Query parameters including:
|
|
11
|
+
* - offset: Number of items to skip (default: 0)
|
|
12
|
+
* - limit: Maximum number of items to return (default: 100)
|
|
13
|
+
* - type: Filter by page type
|
|
14
|
+
* - status: Filter by page status
|
|
15
|
+
* - uri: Search by URI (exact match with '/' or partial match with '%word%')
|
|
16
|
+
* - title: Search by title
|
|
17
|
+
* - folderId: Filter by folder ID
|
|
10
18
|
*/
|
|
11
19
|
async getPages(params) {
|
|
12
20
|
const response = await this.api.get('/sites/:siteId:/pages', { params });
|
|
@@ -35,6 +43,10 @@ class Pages {
|
|
|
35
43
|
}
|
|
36
44
|
/**
|
|
37
45
|
* Update a folder's properties
|
|
46
|
+
* @param folderId - ID of the folder to update
|
|
47
|
+
* @param data - Update parameters:
|
|
48
|
+
* - title: New title for the folder
|
|
49
|
+
* - sortIndex: New position in the folder list
|
|
38
50
|
*/
|
|
39
51
|
async updateFolder(folderId, data) {
|
|
40
52
|
const response = await this.api.patch(`/sites/:siteId:/pages-folders/${folderId}`, data);
|
|
@@ -42,6 +54,9 @@ class Pages {
|
|
|
42
54
|
}
|
|
43
55
|
/**
|
|
44
56
|
* Create a new folder
|
|
57
|
+
* @param data - Create parameters:
|
|
58
|
+
* - title: Title of the new folder (required)
|
|
59
|
+
* - sortIndex: Position in the folder list (optional)
|
|
45
60
|
*/
|
|
46
61
|
async createFolder(data) {
|
|
47
62
|
const response = await this.api.post('/sites/:siteId:/pages-folders', data);
|
package/dist/esm/client/pages.js
CHANGED
|
@@ -4,6 +4,14 @@ export class Pages {
|
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* Get list of pages for a site
|
|
7
|
+
* @param params - Query parameters including:
|
|
8
|
+
* - offset: Number of items to skip (default: 0)
|
|
9
|
+
* - limit: Maximum number of items to return (default: 100)
|
|
10
|
+
* - type: Filter by page type
|
|
11
|
+
* - status: Filter by page status
|
|
12
|
+
* - uri: Search by URI (exact match with '/' or partial match with '%word%')
|
|
13
|
+
* - title: Search by title
|
|
14
|
+
* - folderId: Filter by folder ID
|
|
7
15
|
*/
|
|
8
16
|
async getPages(params) {
|
|
9
17
|
const response = await this.api.get('/sites/:siteId:/pages', { params });
|
|
@@ -32,6 +40,10 @@ export class Pages {
|
|
|
32
40
|
}
|
|
33
41
|
/**
|
|
34
42
|
* Update a folder's properties
|
|
43
|
+
* @param folderId - ID of the folder to update
|
|
44
|
+
* @param data - Update parameters:
|
|
45
|
+
* - title: New title for the folder
|
|
46
|
+
* - sortIndex: New position in the folder list
|
|
35
47
|
*/
|
|
36
48
|
async updateFolder(folderId, data) {
|
|
37
49
|
const response = await this.api.patch(`/sites/:siteId:/pages-folders/${folderId}`, data);
|
|
@@ -39,6 +51,9 @@ export class Pages {
|
|
|
39
51
|
}
|
|
40
52
|
/**
|
|
41
53
|
* Create a new folder
|
|
54
|
+
* @param data - Create parameters:
|
|
55
|
+
* - title: Title of the new folder (required)
|
|
56
|
+
* - sortIndex: Position in the folder list (optional)
|
|
42
57
|
*/
|
|
43
58
|
async createFolder(data) {
|
|
44
59
|
const response = await this.api.post('/sites/:siteId:/pages-folders', data);
|
|
@@ -5,6 +5,14 @@ export declare class Pages {
|
|
|
5
5
|
constructor(api: ApiClient);
|
|
6
6
|
/**
|
|
7
7
|
* Get list of pages for a site
|
|
8
|
+
* @param params - Query parameters including:
|
|
9
|
+
* - offset: Number of items to skip (default: 0)
|
|
10
|
+
* - limit: Maximum number of items to return (default: 100)
|
|
11
|
+
* - type: Filter by page type
|
|
12
|
+
* - status: Filter by page status
|
|
13
|
+
* - uri: Search by URI (exact match with '/' or partial match with '%word%')
|
|
14
|
+
* - title: Search by title
|
|
15
|
+
* - folderId: Filter by folder ID
|
|
8
16
|
*/
|
|
9
17
|
getPages(params?: GetPagesParams): Promise<PageListResponse>;
|
|
10
18
|
/**
|
|
@@ -21,10 +29,17 @@ export declare class Pages {
|
|
|
21
29
|
getFolder(folderId: number): Promise<PageFolder>;
|
|
22
30
|
/**
|
|
23
31
|
* Update a folder's properties
|
|
32
|
+
* @param folderId - ID of the folder to update
|
|
33
|
+
* @param data - Update parameters:
|
|
34
|
+
* - title: New title for the folder
|
|
35
|
+
* - sortIndex: New position in the folder list
|
|
24
36
|
*/
|
|
25
37
|
updateFolder(folderId: number, data: UpdateFolderParams): Promise<PageFolder>;
|
|
26
38
|
/**
|
|
27
39
|
* Create a new folder
|
|
40
|
+
* @param data - Create parameters:
|
|
41
|
+
* - title: Title of the new folder (required)
|
|
42
|
+
* - sortIndex: Position in the folder list (optional)
|
|
28
43
|
*/
|
|
29
44
|
createFolder(data: CreateFolderParams): Promise<PageFolder>;
|
|
30
45
|
/**
|
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
import { Pagination } from './index';
|
|
2
|
+
export interface GridConfig {
|
|
3
|
+
color?: string;
|
|
4
|
+
desktop?: {
|
|
5
|
+
columns: number;
|
|
6
|
+
containerWidth: number;
|
|
7
|
+
columnWidth: number;
|
|
8
|
+
gap: number;
|
|
9
|
+
};
|
|
10
|
+
mobile?: {
|
|
11
|
+
columns: number;
|
|
12
|
+
containerWidth: number;
|
|
13
|
+
columnWidth: number;
|
|
14
|
+
gap: number;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface Screenshot {
|
|
18
|
+
id: number | null;
|
|
19
|
+
ext: string;
|
|
20
|
+
url: string | null;
|
|
21
|
+
}
|
|
22
|
+
export interface PageMeta {
|
|
23
|
+
title: string | null;
|
|
24
|
+
description: string | null;
|
|
25
|
+
keywords: string | null;
|
|
26
|
+
ogImage: string | null;
|
|
27
|
+
ogTitle: string | null;
|
|
28
|
+
ogDescription: string | null;
|
|
29
|
+
noindex: boolean;
|
|
30
|
+
}
|
|
2
31
|
export declare enum PageType {
|
|
3
32
|
PAGE = "page",
|
|
4
33
|
FILE = "file",
|
|
@@ -16,20 +45,25 @@ export declare enum PageStatus {
|
|
|
16
45
|
export interface Page {
|
|
17
46
|
id: number;
|
|
18
47
|
type: PageType;
|
|
19
|
-
uri: string;
|
|
20
|
-
title: string | null;
|
|
21
48
|
status: PageStatus;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
49
|
+
name: string;
|
|
50
|
+
uri: string | null;
|
|
51
|
+
language: string;
|
|
52
|
+
folderId: number;
|
|
25
53
|
sortIndex: number;
|
|
54
|
+
updatedAt?: Date;
|
|
55
|
+
deletedAt: Date | null;
|
|
56
|
+
screenshot: Screenshot | null;
|
|
57
|
+
meta: PageMeta | null;
|
|
58
|
+
grid?: GridConfig;
|
|
26
59
|
}
|
|
27
60
|
export interface GetPagesParams {
|
|
28
61
|
offset?: number;
|
|
29
62
|
limit?: number;
|
|
30
63
|
type?: PageType;
|
|
31
64
|
status?: PageStatus;
|
|
32
|
-
|
|
65
|
+
uri?: string;
|
|
66
|
+
title?: string;
|
|
33
67
|
folderId?: number;
|
|
34
68
|
}
|
|
35
69
|
export interface PageListResponse {
|