@hubs101/js-api-skd-client 1.0.10666 → 1.0.10668

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.
@@ -239,7 +239,19 @@ const _createFeed = (basePath, token, accountId, data, files) => __awaiter(void
239
239
  exports._createFeed = _createFeed;
240
240
  const _updateFeed = (basePath, token, accountId, feedId, data, files) => __awaiter(void 0, void 0, void 0, function* () {
241
241
  const base = (0, base_1.getBasePath)(basePath);
242
- const response = yield (0, api_1.postFilesAndDataRequest)(`${base.ACCOUNTS}/${accountId}/feeds/${feedId}`, data, files !== null && files !== void 0 ? files : [], token, "put");
242
+ const requestUrl = `${base.ACCOUNTS}/${accountId}/feeds/${feedId}`;
243
+ const normalizedFiles = files !== null && files !== void 0 ? files : [];
244
+ const hasBinaryFile = normalizedFiles.some((file) => (file === null || file === void 0 ? void 0 : file.value) && typeof file.value !== "string");
245
+ if ((data === null || data === void 0 ? void 0 : data.webinar_id) === null && !hasBinaryFile) {
246
+ return (0, api_1.putRequestDirect)(requestUrl, token, data);
247
+ }
248
+ if ((data === null || data === void 0 ? void 0 : data.webinar_id) === null && hasBinaryFile) {
249
+ yield (0, api_1.putRequestDirect)(requestUrl, token, data);
250
+ const payloadWithoutWebinarId = Object.assign({}, data);
251
+ delete payloadWithoutWebinarId.webinar_id;
252
+ return (0, api_1.postFilesAndDataRequest)(requestUrl, payloadWithoutWebinarId, normalizedFiles, token, "put");
253
+ }
254
+ const response = yield (0, api_1.postFilesAndDataRequest)(requestUrl, data, normalizedFiles, token, "put");
243
255
  return response;
244
256
  });
245
257
  exports._updateFeed = _updateFeed;
@@ -101,6 +101,8 @@ export type FeedType = {
101
101
  slug: string;
102
102
  tags: string;
103
103
  published: boolean;
104
+ highlighted: boolean;
105
+ priority: number;
104
106
  design: {
105
107
  design_feature_image?: string;
106
108
  design_cover_image?: string;
@@ -129,6 +131,8 @@ export type FeedDetailsType = {
129
131
  slug: string;
130
132
  tags: string;
131
133
  published: boolean;
134
+ highlighted: boolean;
135
+ priority: number;
132
136
  design: {
133
137
  design_feature_image?: string;
134
138
  design_cover_image?: string;
@@ -162,6 +166,8 @@ export type FeedInputType = {
162
166
  slug: string;
163
167
  tags: string;
164
168
  published: number;
169
+ highlighted: boolean;
170
+ priority: number;
165
171
  design: {
166
172
  design_feature_image?: string;
167
173
  design_cover_image?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubs101/js-api-skd-client",
3
- "version": "1.0.10666",
3
+ "version": "1.0.10668",
4
4
  "author": "Liveware",
5
5
  "scripts": {
6
6
  "test": "jest --config jestconfig.json",