@flexbe/sdk 0.2.3 → 0.2.4

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.
@@ -17,15 +17,15 @@ export class Pages {
17
17
  * @param params - Query parameters including:
18
18
  * - offset: Number of items to skip (default: 0)
19
19
  * - limit: Maximum number of items to return (default: 100)
20
- * - type: Filter by page type
21
- * - status: Filter by page status
20
+ * - type: Filter by page type (could be an array of types)
21
+ * - status: Filter by page status (could be an array of statuses)
22
22
  * - uri: Search by URI (exact match with '/' or partial match with '%word%')
23
- * - title: Search by title
24
23
  * - folderId: Filter by folder ID
25
24
  */
26
25
  getPages(params) {
27
26
  return __awaiter(this, void 0, void 0, function* () {
28
- const response = yield this.api.get(`/sites/${this.siteId}/pages`, { params });
27
+ const processedParams = params ? Object.assign(Object.assign({}, params), { type: Array.isArray(params.type) ? params.type.join(',') : params.type, status: Array.isArray(params.status) ? params.status.join(',') : params.status }) : undefined;
28
+ const response = yield this.api.get(`/sites/${this.siteId}/pages`, { params: processedParams });
29
29
  return response.data;
30
30
  });
31
31
  }
@@ -11,14 +11,18 @@ class Pages {
11
11
  * @param params - Query parameters including:
12
12
  * - offset: Number of items to skip (default: 0)
13
13
  * - limit: Maximum number of items to return (default: 100)
14
- * - type: Filter by page type
15
- * - status: Filter by page status
14
+ * - type: Filter by page type (could be an array of types)
15
+ * - status: Filter by page status (could be an array of statuses)
16
16
  * - uri: Search by URI (exact match with '/' or partial match with '%word%')
17
- * - title: Search by title
18
17
  * - folderId: Filter by folder ID
19
18
  */
20
19
  async getPages(params) {
21
- const response = await this.api.get(`/sites/${this.siteId}/pages`, { params });
20
+ const processedParams = params ? {
21
+ ...params,
22
+ type: Array.isArray(params.type) ? params.type.join(',') : params.type,
23
+ status: Array.isArray(params.status) ? params.status.join(',') : params.status
24
+ } : undefined;
25
+ const response = await this.api.get(`/sites/${this.siteId}/pages`, { params: processedParams });
22
26
  return response.data;
23
27
  }
24
28
  /**
@@ -8,14 +8,18 @@ export class Pages {
8
8
  * @param params - Query parameters including:
9
9
  * - offset: Number of items to skip (default: 0)
10
10
  * - limit: Maximum number of items to return (default: 100)
11
- * - type: Filter by page type
12
- * - status: Filter by page status
11
+ * - type: Filter by page type (could be an array of types)
12
+ * - status: Filter by page status (could be an array of statuses)
13
13
  * - uri: Search by URI (exact match with '/' or partial match with '%word%')
14
- * - title: Search by title
15
14
  * - folderId: Filter by folder ID
16
15
  */
17
16
  async getPages(params) {
18
- const response = await this.api.get(`/sites/${this.siteId}/pages`, { params });
17
+ const processedParams = params ? {
18
+ ...params,
19
+ type: Array.isArray(params.type) ? params.type.join(',') : params.type,
20
+ status: Array.isArray(params.status) ? params.status.join(',') : params.status
21
+ } : undefined;
22
+ const response = await this.api.get(`/sites/${this.siteId}/pages`, { params: processedParams });
19
23
  return response.data;
20
24
  }
21
25
  /**
@@ -9,10 +9,9 @@ export declare class Pages {
9
9
  * @param params - Query parameters including:
10
10
  * - offset: Number of items to skip (default: 0)
11
11
  * - limit: Maximum number of items to return (default: 100)
12
- * - type: Filter by page type
13
- * - status: Filter by page status
12
+ * - type: Filter by page type (could be an array of types)
13
+ * - status: Filter by page status (could be an array of statuses)
14
14
  * - uri: Search by URI (exact match with '/' or partial match with '%word%')
15
- * - title: Search by title
16
15
  * - folderId: Filter by folder ID
17
16
  */
18
17
  getPages(params?: GetPagesParams): Promise<PageListResponse>;
@@ -55,15 +55,13 @@ export interface Page {
55
55
  deletedAt: Date | null;
56
56
  screenshot: Screenshot | null;
57
57
  meta: PageMeta | null;
58
- grid?: GridConfig;
59
58
  }
60
59
  export interface GetPagesParams {
61
60
  offset?: number;
62
61
  limit?: number;
63
- type?: PageType;
64
- status?: PageStatus;
62
+ type?: PageType | PageType[];
63
+ status?: PageStatus | PageStatus[];
65
64
  uri?: string;
66
- title?: string;
67
65
  folderId?: number;
68
66
  }
69
67
  export interface PageListResponse {
@@ -102,19 +100,4 @@ export interface UpdatePageParams {
102
100
  ogDescription?: string;
103
101
  noindex?: boolean;
104
102
  };
105
- grid?: {
106
- color?: string;
107
- desktop?: {
108
- columns: number;
109
- containerWidth: number;
110
- columnWidth: number;
111
- gap: number;
112
- };
113
- mobile?: {
114
- columns: number;
115
- containerWidth: number;
116
- columnWidth: number;
117
- gap: number;
118
- };
119
- };
120
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flexbe/sdk",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "TypeScript SDK for Flexbe API",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",