@myinterview/widget-react 1.1.12 → 1.1.13

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.
@@ -49,7 +49,7 @@ export interface IWidgetConfig {
49
49
  styleUrls?: string | string[];
50
50
  fontsUrls?: string | string[];
51
51
  }
52
- export type IClientWidgetConfig = Omit<IWidgetConfig, 'job' | 'config'> & {
52
+ export type IClientWidgetConfig = Omit<IWidgetConfig, 'job' | 'config' | 'event_id'> & {
53
53
  job: IClientJob;
54
54
  config: IClientConfig;
55
55
  };
@@ -1,6 +1,6 @@
1
1
  import { IWidgetConfigRequest, IWidgetConfigResponse } from '../interfaces/configInterface';
2
2
  import { IVideo, ALL_VIDEO_FILE_TYPES, IVideoDimensions } from '../interfaces/videoInterface';
3
- export declare const createVideo: (widgetConfig: IWidgetConfigRequest) => Promise<IWidgetConfigResponse>;
3
+ export declare const createVideo: (widgetConfig: IWidgetConfigRequest, event_id?: string) => Promise<IWidgetConfigResponse>;
4
4
  export declare const getVideo: (videoId: string) => Promise<IWidgetConfigResponse>;
5
5
  export declare const updateVideo: ({ video_id, started, completed, uploaded, bandwidth }: IVideo) => Promise<IWidgetConfigResponse>;
6
6
  export declare const updateVideoFile: (videoId: string, videoFile: ALL_VIDEO_FILE_TYPES) => Promise<IWidgetConfigResponse>;
package/dist/esm/index.js CHANGED
@@ -44211,7 +44211,7 @@ var EVENTS$1;
44211
44211
  EVENTS["CONNECTION_CHANGED"] = "CONNECTION_CHANGED";
44212
44212
  })(EVENTS$1 || (EVENTS$1 = {}));
44213
44213
 
44214
- const createVideo = (widgetConfig) => videoAxiosInstance.post('/video', widgetConfig);
44214
+ const createVideo = (widgetConfig, event_id) => videoAxiosInstance.post('/video', widgetConfig, { headers: Object.assign({}, (event_id && { 'x-event_id': event_id })) });
44215
44215
  const getVideo = (videoId) => videoAxiosInstance.get(`/video/${videoId}`);
44216
44216
  const updateVideo = ({ video_id, started, completed, uploaded, bandwidth }) => videoAxiosInstance.patch(`/video/${video_id}`, { video: { video_id, started, completed, uploaded, bandwidth } });
44217
44217
  const updateVideoFile = (videoId, videoFile) => videoAxiosInstance.patch(`/video/${videoId}/part/${videoFile.filename}`, videoFile);
@@ -44672,7 +44672,7 @@ const accWidgetMachine = createMachine({
44672
44672
  tags: [TAGS.LOADING],
44673
44673
  invoke: {
44674
44674
  id: 'createVideo',
44675
- src: ({ widgetConfig: { candidate, job, video } }) => createVideo({ candidate, job, video }),
44675
+ src: ({ widgetConfig: { candidate, job, video, config } }) => createVideo({ candidate, job, video }, config.event_id),
44676
44676
  onDone: [
44677
44677
  {
44678
44678
  actions: [ACTIONS$6.SET_CONFIG, ACTIONS$6.SET_EVENT_ID, ACTIONS$6.SET_SESSION, { type: ACTIONS$6.CONSOLE_DEBUG, data: { message: DEBUG.INTERVIEW_DATA_RECEIVED } }],