@hubs101/js-api-skd-client 1.0.10386 → 1.0.10388

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.
@@ -110,7 +110,7 @@ export declare const _updatePortfolio: (basePath: string, token: string, portfol
110
110
  }[]) => Promise<any>;
111
111
  export declare const _fetchPortfolioDetails: (basePath: string, token: string, portfolioId: string) => Promise<Portfolio>;
112
112
  export declare const _fetchPortfolioEvents: (basePath: string, token: string, portfolioId: string) => Promise<Event[]>;
113
- export declare const _fetchBlogPages: (basePath: string, token: string, portfolioId: string) => Promise<BlogPage[]>;
113
+ export declare const _fetchBlogPages: (basePath: string, token: string, accountId: string, portfolioId: string) => Promise<BlogPage[]>;
114
114
  export declare const _createBlogPage: (basePath: string, token: string, portfolioId: string, data: BlogPageInput, files: {
115
115
  name: string;
116
116
  value: File;
@@ -605,9 +605,11 @@ const _fetchPortfolioEvents = (basePath, token, portfolioId) => __awaiter(void 0
605
605
  return (portfolioEvents === null || portfolioEvents === void 0 ? void 0 : portfolioEvents.data) || portfolioEvents;
606
606
  });
607
607
  exports._fetchPortfolioEvents = _fetchPortfolioEvents;
608
- const _fetchBlogPages = (basePath, token, portfolioId) => __awaiter(void 0, void 0, void 0, function* () {
608
+ const _fetchBlogPages = (basePath, token, accountId, portfolioId) => __awaiter(void 0, void 0, void 0, function* () {
609
609
  const base = (0, base_1.getBasePath)(basePath);
610
- const { data: portfolioPages } = yield (0, api_1.getRequest)(`${base.PORTFOLIOS}/${portfolioId}/pages`, token);
610
+ const { data: portfolioPages } = yield (0, api_1.getRequest)(portfolioId
611
+ ? `${base.ACCOUNTS}/${accountId}/pages?portfolio=${portfolioId}`
612
+ : `${base.ACCOUNTS}/${accountId}/pages`, token);
611
613
  return (portfolioPages === null || portfolioPages === void 0 ? void 0 : portfolioPages.data) || portfolioPages;
612
614
  });
613
615
  exports._fetchBlogPages = _fetchBlogPages;
@@ -864,7 +864,7 @@ export type BlogPage = {
864
864
  subHeadline: string;
865
865
  slug: string;
866
866
  contentHtml: string;
867
- contentText: string;
867
+ contentStructure: string;
868
868
  language: string;
869
869
  createdAt: string;
870
870
  updatedAt: string;
package/lib/index.js CHANGED
@@ -869,9 +869,9 @@ function EventAPIProvider(props) {
869
869
  (0, api_1.validateConfig)(config);
870
870
  return (0, event_1._fetchPortfolioEvents)(config.baseUrl, config.token, portfolioId);
871
871
  }), [config, config.baseUrl, config.token]);
872
- const fetchBlogPages = react_1.default.useCallback((portfolioId) => __awaiter(this, void 0, void 0, function* () {
872
+ const fetchBlogPages = react_1.default.useCallback((accountId, portfolioId) => __awaiter(this, void 0, void 0, function* () {
873
873
  (0, api_1.validateConfig)(config);
874
- return (0, event_1._fetchBlogPages)(config.baseUrl, config.token, portfolioId);
874
+ return (0, event_1._fetchBlogPages)(config.baseUrl, config.token, accountId, portfolioId);
875
875
  }), [config, config.baseUrl, config.token]);
876
876
  const createBlogPage = react_1.default.useCallback((portfolioId, data, files) => __awaiter(this, void 0, void 0, function* () {
877
877
  (0, api_1.validateConfig)(config);
@@ -296,7 +296,7 @@ export type BaseAPIType = {
296
296
  name: string;
297
297
  value: File;
298
298
  }[]) => Promise<BlogPage>;
299
- fetchBlogPages: (basePath: string, token: string, portfolioId: string) => Promise<BlogPage[]>;
299
+ fetchBlogPages: (basePath: string, token: string, accountId: string, portfolioId?: string) => Promise<BlogPage[]>;
300
300
  };
301
301
  export type EventAPIType = {
302
302
  config: BaseAPIConfigType;
@@ -522,7 +522,7 @@ export type EventAPIType = {
522
522
  name: string;
523
523
  value: File;
524
524
  }[]) => Promise<BlogPage>;
525
- fetchBlogPages: (portfolioId: string) => Promise<BlogPage[]>;
525
+ fetchBlogPages: (accountId: string, portfolioId?: string) => Promise<BlogPage[]>;
526
526
  };
527
527
  export type BaseAPIConfigType = {
528
528
  baseUrl?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubs101/js-api-skd-client",
3
- "version": "1.0.10386",
3
+ "version": "1.0.10388",
4
4
  "author": "Liveware",
5
5
  "scripts": {
6
6
  "test": "jest --config jestconfig.json",