@hubs101/js-api-skd-client 1.0.10402 → 1.0.10404
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.
- package/lib/api/event/index.d.ts +1 -1
- package/lib/api/event/index.js +2 -2
- package/lib/api/event/types.d.ts +2 -0
- package/lib/index.js +2 -2
- package/lib/types/base.d.ts +2 -2
- package/package.json +1 -1
package/lib/api/event/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export declare const _updateDiscount: (basePath: string, token: string, discount
|
|
|
30
30
|
export declare const _deleteDiscount: (basePath: string, token: string, discountId: string) => Promise<string>;
|
|
31
31
|
export declare const _fetchExhibitionDetails: (basePath: string, token: string, exhibitionId: string) => Promise<Exhibition>;
|
|
32
32
|
export declare const _createLocation: (basePath: string, token: string, files: any, data: any) => Promise<any>;
|
|
33
|
-
export declare const _updateLocation: (basePath: string, token: string, locationId: string, data: any) => Promise<any>;
|
|
33
|
+
export declare const _updateLocation: (basePath: string, token: string, locationId: string, data: any, files?: any) => Promise<any>;
|
|
34
34
|
export declare const _deleteLocation: (basePath: string, token: string, locationId: string) => Promise<any>;
|
|
35
35
|
export declare const _fetchEventLocations: (basePath: string, token: string, eventId: string) => Promise<EventLocation[]>;
|
|
36
36
|
export declare const _fetchEventStreams: (basePath: string, token: string, eventId: string) => Promise<EventStream[]>;
|
package/lib/api/event/index.js
CHANGED
|
@@ -186,9 +186,9 @@ const _createLocation = (basePath, token, files, data) => __awaiter(void 0, void
|
|
|
186
186
|
return response;
|
|
187
187
|
});
|
|
188
188
|
exports._createLocation = _createLocation;
|
|
189
|
-
const _updateLocation = (basePath, token, locationId, data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
189
|
+
const _updateLocation = (basePath, token, locationId, data, files) => __awaiter(void 0, void 0, void 0, function* () {
|
|
190
190
|
const base = (0, base_1.getBasePath)(basePath);
|
|
191
|
-
const response = yield (0, api_1.postFilesAndDataRequest)(`${base.LOCATIONS}/${locationId}`, data, [], token, "put");
|
|
191
|
+
const response = yield (0, api_1.postFilesAndDataRequest)(`${base.LOCATIONS}/${locationId}`, data, files !== null && files !== void 0 ? files : [], token, "put");
|
|
192
192
|
return response;
|
|
193
193
|
});
|
|
194
194
|
exports._updateLocation = _updateLocation;
|
package/lib/api/event/types.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -328,9 +328,9 @@ function EventAPIProvider(props) {
|
|
|
328
328
|
(0, api_1.validateConfig)(config);
|
|
329
329
|
return (0, event_1._deleteLocation)(config.baseUrl, config.token, pageId);
|
|
330
330
|
}), [config, config.baseUrl, config.token]);
|
|
331
|
-
const updateLocation = (0, react_1.useCallback)((locationId, data) => __awaiter(this, void 0, void 0, function* () {
|
|
331
|
+
const updateLocation = (0, react_1.useCallback)((locationId, data, files) => __awaiter(this, void 0, void 0, function* () {
|
|
332
332
|
(0, api_1.validateConfig)(config);
|
|
333
|
-
return (0, event_1._updateLocation)(config.baseUrl, config.token, locationId, data);
|
|
333
|
+
return (0, event_1._updateLocation)(config.baseUrl, config.token, locationId, data, files);
|
|
334
334
|
}), [config, config.baseUrl, config.token]);
|
|
335
335
|
const createLocation = (0, react_1.useCallback)((files, data) => __awaiter(this, void 0, void 0, function* () {
|
|
336
336
|
(0, api_1.validateConfig)(config);
|
package/lib/types/base.d.ts
CHANGED
|
@@ -132,7 +132,7 @@ export type BaseAPIType = {
|
|
|
132
132
|
updatePage: (basePath: string, token: string, pageId: string, data: any) => Promise<any>;
|
|
133
133
|
deletePage: (basePath: string, token: string, eventId: string, pageId: string) => Promise<any>;
|
|
134
134
|
createLocation: (basePath: string, token: string, files: any, data: any) => Promise<any>;
|
|
135
|
-
updateLocation: (basePath: string, token: string, locationId: string, data: any) => Promise<any>;
|
|
135
|
+
updateLocation: (basePath: string, token: string, locationId: string, data: any, files?: any) => Promise<any>;
|
|
136
136
|
deleteLocation: (basePath: string, token: string, locationId: string) => Promise<any>;
|
|
137
137
|
deleteDocument: (basePath: string, token: string, documentId: string) => Promise<any>;
|
|
138
138
|
updateDocument: (basePath: string, token: string, documentId: string, data: any) => Promise<any>;
|
|
@@ -363,7 +363,7 @@ export type EventAPIType = {
|
|
|
363
363
|
updatePage: (pageId: string, data: any) => Promise<any>;
|
|
364
364
|
deletePage: (eventId: string, pageId: string) => Promise<any>;
|
|
365
365
|
createLocation: (files: any, data: any) => Promise<any>;
|
|
366
|
-
updateLocation: (locationId: string, data: any) => Promise<any>;
|
|
366
|
+
updateLocation: (locationId: string, data: any, files?: any) => Promise<any>;
|
|
367
367
|
deleteLocation: (locationId: string) => Promise<any>;
|
|
368
368
|
deleteDocument: (documentId: string) => Promise<any>;
|
|
369
369
|
updateDocument: (documentId: string, data: any) => Promise<any>;
|