react-native-lightspeedsdk
Version:
A react-native interface for using the LightspeedSDK
42 lines (36 loc) • 895 B
JavaScript
;
type SurveyInfoMap = {
surveyId:number,
gtmSurveyId:number,
surveyName:string,
surveyDescription:string,
surveyUrl:string,
activityType:Array,
surveyAppType:number,
surveyType:string
};
/**
* Represents an immutable Survey
*/
class SurveyInfo {
surveyId:number;
gtmSurveyId:number;
surveyName:string;
surveyDescription:string;
surveyUrl:string;
activityType:Array;
surveyAppType:number;
surveyType:string;
constructor(map: SurveyInfoMap) {
this.surveyId = map.surveyId;
this.gtmSurveyId = map.gtmSurveyId;
this.surveyName = map.surveyName;
this.surveyDescription = map.surveyDescription;
this.surveyUrl = map.surveyUrl;
this.activityType = map.activityType;
this.surveyAppType = map.surveyAppType;
this.surveyType = map.surveyType;
Object.freeze(this);
}
}
module.exports = SurveyInfo;