fastcomments-sdk
Version:
FastComments API Client - A SDK for interacting with the FastComments API
153 lines • 8.68 kB
JavaScript
;
/* 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.CommentLogDataPermanentFlagEnum = void 0;
exports.instanceOfCommentLogData = instanceOfCommentLogData;
exports.CommentLogDataFromJSON = CommentLogDataFromJSON;
exports.CommentLogDataFromJSONTyped = CommentLogDataFromJSONTyped;
exports.CommentLogDataToJSON = CommentLogDataToJSON;
exports.CommentLogDataToJSONTyped = CommentLogDataToJSONTyped;
const RepeatCommentHandlingAction_1 = require("./RepeatCommentHandlingAction");
const RepeatCommentCheckIgnoredReason_1 = require("./RepeatCommentCheckIgnoredReason");
const SpamRule_1 = require("./SpamRule");
/**
* @export
* @enum {string}
*/
var CommentLogDataPermanentFlagEnum;
(function (CommentLogDataPermanentFlagEnum) {
CommentLogDataPermanentFlagEnum["permanent"] = "permanent";
})(CommentLogDataPermanentFlagEnum || (exports.CommentLogDataPermanentFlagEnum = CommentLogDataPermanentFlagEnum = {}));
/**
* Check if a given object implements the CommentLogData interface.
*/
function instanceOfCommentLogData(value) {
return true;
}
function CommentLogDataFromJSON(json) {
return CommentLogDataFromJSONTyped(json, false);
}
function CommentLogDataFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'clearContent': json['clearContent'] == null ? undefined : json['clearContent'],
'isDeletedUser': json['isDeletedUser'] == null ? undefined : json['isDeletedUser'],
'phrase': json['phrase'] == null ? undefined : json['phrase'],
'badWord': json['badWord'] == null ? undefined : json['badWord'],
'word': json['word'] == null ? undefined : json['word'],
'locale': json['locale'] == null ? undefined : json['locale'],
'tenantBadgeId': json['tenantBadgeId'] == null ? undefined : json['tenantBadgeId'],
'badgeId': json['badgeId'] == null ? undefined : json['badgeId'],
'wasLoggedIn': json['wasLoggedIn'] == null ? undefined : json['wasLoggedIn'],
'foundUser': json['foundUser'] == null ? undefined : json['foundUser'],
'verified': json['verified'] == null ? undefined : json['verified'],
'engine': json['engine'] == null ? undefined : json['engine'],
'engineResponse': json['engineResponse'] == null ? undefined : json['engineResponse'],
'engineTokens': json['engineTokens'] == null ? undefined : json['engineTokens'],
'trustFactor': json['trustFactor'] == null ? undefined : json['trustFactor'],
'source': json['source'] == null ? undefined : json['source'],
'rule': json['rule'] == null ? undefined : (0, SpamRule_1.SpamRuleFromJSON)(json['rule']),
'userId': json['userId'] == null ? undefined : json['userId'],
'subscribers': json['subscribers'] == null ? undefined : json['subscribers'],
'notificationCount': json['notificationCount'] == null ? undefined : json['notificationCount'],
'votesBefore': json['votesBefore'] == null ? undefined : json['votesBefore'],
'votesUpBefore': json['votesUpBefore'] == null ? undefined : json['votesUpBefore'],
'votesDownBefore': json['votesDownBefore'] == null ? undefined : json['votesDownBefore'],
'votesAfter': json['votesAfter'] == null ? undefined : json['votesAfter'],
'votesUpAfter': json['votesUpAfter'] == null ? undefined : json['votesUpAfter'],
'votesDownAfter': json['votesDownAfter'] == null ? undefined : json['votesDownAfter'],
'repeatAction': json['repeatAction'] == null ? undefined : (0, RepeatCommentHandlingAction_1.RepeatCommentHandlingActionFromJSON)(json['repeatAction']),
'reason': json['reason'] == null ? undefined : (0, RepeatCommentCheckIgnoredReason_1.RepeatCommentCheckIgnoredReasonFromJSON)(json['reason']),
'otherData': json['otherData'] == null ? undefined : json['otherData'],
'spamBefore': json['spamBefore'] == null ? undefined : json['spamBefore'],
'spamAfter': json['spamAfter'] == null ? undefined : json['spamAfter'],
'permanentFlag': json['permanentFlag'] == null ? undefined : json['permanentFlag'],
'approvedBefore': json['approvedBefore'] == null ? undefined : json['approvedBefore'],
'approvedAfter': json['approvedAfter'] == null ? undefined : json['approvedAfter'],
'reviewedBefore': json['reviewedBefore'] == null ? undefined : json['reviewedBefore'],
'reviewedAfter': json['reviewedAfter'] == null ? undefined : json['reviewedAfter'],
'textBefore': json['textBefore'] == null ? undefined : json['textBefore'],
'textAfter': json['textAfter'] == null ? undefined : json['textAfter'],
'expireBefore': json['expireBefore'] == null ? undefined : (new Date(json['expireBefore'])),
'expireAfter': json['expireAfter'] == null ? undefined : (new Date(json['expireAfter'])),
'flagCountBefore': json['flagCountBefore'] == null ? undefined : json['flagCountBefore'],
'trustFactorBefore': json['trustFactorBefore'] == null ? undefined : json['trustFactorBefore'],
'trustFactorAfter': json['trustFactorAfter'] == null ? undefined : json['trustFactorAfter'],
'referencedCommentId': json['referencedCommentId'] == null ? undefined : json['referencedCommentId'],
'invalidLocale': json['invalidLocale'] == null ? undefined : json['invalidLocale'],
'detectedLocale': json['detectedLocale'] == null ? undefined : json['detectedLocale'],
'detectedLanguage': json['detectedLanguage'] == null ? undefined : json['detectedLanguage'],
};
}
function CommentLogDataToJSON(json) {
return CommentLogDataToJSONTyped(json, false);
}
function CommentLogDataToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'clearContent': value['clearContent'],
'isDeletedUser': value['isDeletedUser'],
'phrase': value['phrase'],
'badWord': value['badWord'],
'word': value['word'],
'locale': value['locale'],
'tenantBadgeId': value['tenantBadgeId'],
'badgeId': value['badgeId'],
'wasLoggedIn': value['wasLoggedIn'],
'foundUser': value['foundUser'],
'verified': value['verified'],
'engine': value['engine'],
'engineResponse': value['engineResponse'],
'engineTokens': value['engineTokens'],
'trustFactor': value['trustFactor'],
'source': value['source'],
'rule': (0, SpamRule_1.SpamRuleToJSON)(value['rule']),
'userId': value['userId'],
'subscribers': value['subscribers'],
'notificationCount': value['notificationCount'],
'votesBefore': value['votesBefore'],
'votesUpBefore': value['votesUpBefore'],
'votesDownBefore': value['votesDownBefore'],
'votesAfter': value['votesAfter'],
'votesUpAfter': value['votesUpAfter'],
'votesDownAfter': value['votesDownAfter'],
'repeatAction': (0, RepeatCommentHandlingAction_1.RepeatCommentHandlingActionToJSON)(value['repeatAction']),
'reason': (0, RepeatCommentCheckIgnoredReason_1.RepeatCommentCheckIgnoredReasonToJSON)(value['reason']),
'otherData': value['otherData'],
'spamBefore': value['spamBefore'],
'spamAfter': value['spamAfter'],
'permanentFlag': value['permanentFlag'],
'approvedBefore': value['approvedBefore'],
'approvedAfter': value['approvedAfter'],
'reviewedBefore': value['reviewedBefore'],
'reviewedAfter': value['reviewedAfter'],
'textBefore': value['textBefore'],
'textAfter': value['textAfter'],
'expireBefore': value['expireBefore'] == null ? undefined : (value['expireBefore'].toISOString()),
'expireAfter': value['expireAfter'] == null ? undefined : (value['expireAfter'].toISOString()),
'flagCountBefore': value['flagCountBefore'],
'trustFactorBefore': value['trustFactorBefore'],
'trustFactorAfter': value['trustFactorAfter'],
'referencedCommentId': value['referencedCommentId'],
'invalidLocale': value['invalidLocale'],
'detectedLocale': value['detectedLocale'],
'detectedLanguage': value['detectedLanguage'],
};
}
//# sourceMappingURL=CommentLogData.js.map