@hubs101/js-api-skd-client 1.0.10478 → 1.0.10480

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.
@@ -129,4 +129,4 @@ export declare const _deleteMediaDirectoryFiles: (basePath: string, token: strin
129
129
  export declare const _addMediaFolder: (basePath: string, token: string, accountId: string, path: string, name: string) => Promise<APIResponse>;
130
130
  export declare const _updateEventWebsite: (basePath: string, token: string, eventId: string, keyData: string, data: {
131
131
  website_content: Record<string, string | boolean>[];
132
- }, files: any) => Promise<ResponseAPIType1>;
132
+ }, files?: any) => Promise<ResponseAPIType1>;
@@ -670,7 +670,7 @@ const _addMediaFolder = (basePath, token, accountId, path, name) => __awaiter(vo
670
670
  exports._addMediaFolder = _addMediaFolder;
671
671
  const _updateEventWebsite = (basePath, token, eventId, keyData, data, files) => __awaiter(void 0, void 0, void 0, function* () {
672
672
  const base = (0, base_1.getBasePath)(basePath);
673
- const response = yield (0, api_1.postFilesAndDataRequest)(`${base.EVENTS}/${eventId}/websitedata/${keyData}`, data, files, token, "put");
673
+ const response = yield (0, api_1.postFilesAndDataRequest)(`${base.EVENTS}/${eventId}/websitedata/${keyData}`, data, files !== null && files !== void 0 ? files : [], token, "put");
674
674
  return response === null || response === void 0 ? void 0 : response.result;
675
675
  });
676
676
  exports._updateEventWebsite = _updateEventWebsite;
package/lib/index.js CHANGED
@@ -150,7 +150,7 @@ function EventAPIProvider(props) {
150
150
  (0, api_1.validateConfig)(config);
151
151
  return (0, event_1._addMediaFolder)(config.baseUrl, config.token, accountId, path, name);
152
152
  }), [config, config.baseUrl, config.token]);
153
- const updateEventWebsite = (0, react_1.useCallback)((eventId, keyData, files, data) => __awaiter(this, void 0, void 0, function* () {
153
+ const updateEventWebsite = (0, react_1.useCallback)((eventId, keyData, data, files) => __awaiter(this, void 0, void 0, function* () {
154
154
  (0, api_1.validateConfig)(config);
155
155
  return (0, event_1._updateEventWebsite)(config.baseUrl, config.token, eventId, keyData, data, files);
156
156
  }), [config, config.baseUrl, config.token]);
@@ -93,7 +93,7 @@ export type BaseAPIType = {
93
93
  addMediaFolder: (basePath: string, token: string, accountId: string, path: string, name: string) => Promise<APIResponse>;
94
94
  updateEventWebsite: (basePath: string, token: string, eventId: string, keyData: string, data: {
95
95
  website_content: Record<string, string | boolean>[];
96
- }, files: any) => Promise<ResponseAPIType1>;
96
+ }, files?: any) => Promise<ResponseAPIType1>;
97
97
  deleteMediaDirectoryFiles: (basePath: string, token: string, accountId: string, filepath: string) => Promise<APIResponse>;
98
98
  updateAccountGroup: (basePath: string, token: string, accountId: string, groupId: string, data: GroupInputType) => Promise<GroupResponseType>;
99
99
  fetchAccountGroups: (basePath: string, token: string, accountId: string, type: GroupType) => Promise<ResponsePaginationType<GroupResponseType>>;
@@ -345,7 +345,7 @@ export type EventAPIType = {
345
345
  addMediaFolder: (accountId: string, path: string, name: string) => Promise<APIResponse>;
346
346
  updateEventWebsite: (eventId: string, keyData: string, data: {
347
347
  website_content: Record<string, string | boolean>[];
348
- }, files: any) => Promise<ResponseAPIType1>;
348
+ }, files?: any) => Promise<ResponseAPIType1>;
349
349
  deleteMediaDirectoryFiles: (accountId: string, filepath: string) => Promise<APIResponse>;
350
350
  updateAccountGroup: (accountId: string, groupId: string, data: GroupInputType) => Promise<GroupResponseType>;
351
351
  fetchAccountGroups: (accountId: string, type: GroupType) => Promise<ResponsePaginationType<GroupResponseType>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubs101/js-api-skd-client",
3
- "version": "1.0.10478",
3
+ "version": "1.0.10480",
4
4
  "author": "Liveware",
5
5
  "scripts": {
6
6
  "test": "jest --config jestconfig.json",