UNPKG

fastcomments-sdk

Version:

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

88 lines 3.25 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.instanceOfQuestionResult = instanceOfQuestionResult; exports.QuestionResultFromJSON = QuestionResultFromJSON; exports.QuestionResultFromJSONTyped = QuestionResultFromJSONTyped; exports.QuestionResultToJSON = QuestionResultToJSON; exports.QuestionResultToJSONTyped = QuestionResultToJSONTyped; const MetaItem_1 = require("./MetaItem"); /** * Check if a given object implements the QuestionResult interface. */ function instanceOfQuestionResult(value) { if (!('id' in value) || value['id'] === undefined) return false; if (!('tenantId' in value) || value['tenantId'] === undefined) return false; if (!('urlId' in value) || value['urlId'] === undefined) return false; if (!('anonUserId' in value) || value['anonUserId'] === undefined) return false; if (!('userId' in value) || value['userId'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('value' in value) || value['value'] === undefined) return false; if (!('questionId' in value) || value['questionId'] === undefined) return false; if (!('ipHash' in value) || value['ipHash'] === undefined) return false; return true; } function QuestionResultFromJSON(json) { return QuestionResultFromJSONTyped(json, false); } function QuestionResultFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'id': json['_id'], 'tenantId': json['tenantId'], 'urlId': json['urlId'], 'anonUserId': json['anonUserId'], 'userId': json['userId'], 'createdAt': (new Date(json['createdAt'])), 'value': json['value'], 'commentId': json['commentId'] == null ? undefined : json['commentId'], 'questionId': json['questionId'], 'meta': json['meta'] == null ? undefined : (json['meta'].map(MetaItem_1.MetaItemFromJSON)), 'ipHash': json['ipHash'], }; } function QuestionResultToJSON(json) { return QuestionResultToJSONTyped(json, false); } function QuestionResultToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { '_id': value['id'], 'tenantId': value['tenantId'], 'urlId': value['urlId'], 'anonUserId': value['anonUserId'], 'userId': value['userId'], 'createdAt': ((value['createdAt']).toISOString()), 'value': value['value'], 'commentId': value['commentId'], 'questionId': value['questionId'], 'meta': value['meta'] == null ? undefined : (value['meta'].map(MetaItem_1.MetaItemToJSON)), 'ipHash': value['ipHash'], }; } //# sourceMappingURL=QuestionResult.js.map