@imposium-hub/components 1.38.4 → 1.38.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imposium-hub/components",
3
- "version": "1.38.4",
3
+ "version": "1.38.6",
4
4
  "description": "React & Typescript component / asset library for Imposium front-ends",
5
5
  "main": "dist/components.js",
6
6
  "scripts": {
package/services/API.ts CHANGED
@@ -23,6 +23,8 @@ export interface IImposiumAPI {
23
23
  newStory(story : any);
24
24
  deleteStory(storyId : string);
25
25
  getStoryStatus(storyId : string);
26
+ revertVersion(storyId : string, versionId : string);
27
+ getStoryVersions(storyId : string);
26
28
  processStoryFile(storyId : string, file_key? : string, url? : string);
27
29
  getExperiences(storyId : string, params : any);
28
30
  createExperience(storyId : string, inventory : any, compositionId ? : string, useWorkingCopy ? : boolean);
@@ -194,6 +196,24 @@ export default class API {
194
196
  });
195
197
  }
196
198
 
199
+ public getStoryVersions = (storyId : string) : Promise<any | Error> => {
200
+ return this.doRequest({
201
+ method: 'GET',
202
+ url: `/story/${storyId}/versions`,
203
+ });
204
+ }
205
+
206
+ public revertVersion = (storyId : string, versionId : string) : Promise<any | Error> => {
207
+ const data = {
208
+ version_id: versionId
209
+ };
210
+ return this.doRequest({
211
+ method: 'POST',
212
+ url: `/story/${storyId}/version/revert`,
213
+ data
214
+ });
215
+ }
216
+
197
217
  public getSignedUrl = (storyId : string, file : File) : Promise<any | Error> => {
198
218
 
199
219
  return this.doRequest({