UNPKG

fastcomments-sdk

Version:

FastComments API Client - A SDK for interacting with the FastComments API

130 lines 5.34 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * fastcomments * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfQuestionConfig = instanceOfQuestionConfig; exports.QuestionConfigFromJSON = QuestionConfigFromJSON; exports.QuestionConfigFromJSONTyped = QuestionConfigFromJSONTyped; exports.QuestionConfigToJSON = QuestionConfigToJSON; exports.QuestionConfigToJSONTyped = QuestionConfigToJSONTyped; const QuestionConfigCustomOptionsInner_1 = require("./QuestionConfigCustomOptionsInner"); /** * Check if a given object implements the QuestionConfig interface. */ function instanceOfQuestionConfig(value) { if (!('id' in value) || value['id'] === undefined) return false; if (!('tenantId' in value) || value['tenantId'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('question' in value) || value['question'] === undefined) return false; if (!('helpText' in value) || value['helpText'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('createdBy' in value) || value['createdBy'] === undefined) return false; if (!('usedCount' in value) || value['usedCount'] === undefined) return false; if (!('lastUsed' in value) || value['lastUsed'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; if (!('numStars' in value) || value['numStars'] === undefined) return false; if (!('min' in value) || value['min'] === undefined) return false; if (!('max' in value) || value['max'] === undefined) return false; if (!('defaultValue' in value) || value['defaultValue'] === undefined) return false; if (!('labelNegative' in value) || value['labelNegative'] === undefined) return false; if (!('labelPositive' in value) || value['labelPositive'] === undefined) return false; if (!('customOptions' in value) || value['customOptions'] === undefined) return false; if (!('subQuestionIds' in value) || value['subQuestionIds'] === undefined) return false; if (!('alwaysShowSubQuestions' in value) || value['alwaysShowSubQuestions'] === undefined) return false; if (!('reportingOrder' in value) || value['reportingOrder'] === undefined) return false; return true; } function QuestionConfigFromJSON(json) { return QuestionConfigFromJSONTyped(json, false); } function QuestionConfigFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'id': json['_id'], 'tenantId': json['tenantId'], 'name': json['name'], 'question': json['question'], 'summaryLabel': json['summaryLabel'] == null ? undefined : json['summaryLabel'], 'helpText': json['helpText'], 'createdAt': (new Date(json['createdAt'])), 'createdBy': json['createdBy'], 'usedCount': json['usedCount'], 'lastUsed': (new Date(json['lastUsed'])), 'type': json['type'], 'numStars': json['numStars'], 'min': json['min'], 'max': json['max'], 'defaultValue': json['defaultValue'], 'labelNegative': json['labelNegative'], 'labelPositive': json['labelPositive'], 'customOptions': (json['customOptions'].map(QuestionConfigCustomOptionsInner_1.QuestionConfigCustomOptionsInnerFromJSON)), 'subQuestionIds': json['subQuestionIds'], 'alwaysShowSubQuestions': json['alwaysShowSubQuestions'], 'reportingOrder': json['reportingOrder'], }; } function QuestionConfigToJSON(json) { return QuestionConfigToJSONTyped(json, false); } function QuestionConfigToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { '_id': value['id'], 'tenantId': value['tenantId'], 'name': value['name'], 'question': value['question'], 'summaryLabel': value['summaryLabel'], 'helpText': value['helpText'], 'createdAt': ((value['createdAt']).toISOString()), 'createdBy': value['createdBy'], 'usedCount': value['usedCount'], 'lastUsed': ((value['lastUsed']).toISOString()), 'type': value['type'], 'numStars': value['numStars'], 'min': value['min'], 'max': value['max'], 'defaultValue': value['defaultValue'], 'labelNegative': value['labelNegative'], 'labelPositive': value['labelPositive'], 'customOptions': (value['customOptions'].map(QuestionConfigCustomOptionsInner_1.QuestionConfigCustomOptionsInnerToJSON)), 'subQuestionIds': value['subQuestionIds'], 'alwaysShowSubQuestions': value['alwaysShowSubQuestions'], 'reportingOrder': value['reportingOrder'], }; } //# sourceMappingURL=QuestionConfig.js.map