fastcomments-sdk
Version:
FastComments API Client - A SDK for interacting with the FastComments API
121 lines • 4.93 kB
JavaScript
"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.instanceOfModerator = instanceOfModerator;
exports.ModeratorFromJSON = ModeratorFromJSON;
exports.ModeratorFromJSONTyped = ModeratorFromJSONTyped;
exports.ModeratorToJSON = ModeratorToJSON;
exports.ModeratorToJSONTyped = ModeratorToJSONTyped;
/**
* Check if a given object implements the Moderator interface.
*/
function instanceOfModerator(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 (!('userId' in value) || value['userId'] === undefined)
return false;
if (!('acceptedInvite' in value) || value['acceptedInvite'] === undefined)
return false;
if (!('email' in value) || value['email'] === undefined)
return false;
if (!('markReviewedCount' in value) || value['markReviewedCount'] === undefined)
return false;
if (!('deletedCount' in value) || value['deletedCount'] === undefined)
return false;
if (!('markedSpamCount' in value) || value['markedSpamCount'] === undefined)
return false;
if (!('markedNotSpamCount' in value) || value['markedNotSpamCount'] === undefined)
return false;
if (!('approvedCount' in value) || value['approvedCount'] === undefined)
return false;
if (!('unApprovedCount' in value) || value['unApprovedCount'] === undefined)
return false;
if (!('editedCount' in value) || value['editedCount'] === undefined)
return false;
if (!('bannedCount' in value) || value['bannedCount'] === undefined)
return false;
if (!('unFlaggedCount' in value) || value['unFlaggedCount'] === undefined)
return false;
if (!('verificationId' in value) || value['verificationId'] === undefined)
return false;
if (!('createdAt' in value) || value['createdAt'] === undefined)
return false;
if (!('moderationGroupIds' in value) || value['moderationGroupIds'] === undefined)
return false;
return true;
}
function ModeratorFromJSON(json) {
return ModeratorFromJSONTyped(json, false);
}
function ModeratorFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'id': json['_id'],
'tenantId': json['tenantId'],
'name': json['name'],
'userId': json['userId'],
'acceptedInvite': json['acceptedInvite'],
'email': json['email'],
'markReviewedCount': json['markReviewedCount'],
'deletedCount': json['deletedCount'],
'markedSpamCount': json['markedSpamCount'],
'markedNotSpamCount': json['markedNotSpamCount'],
'approvedCount': json['approvedCount'],
'unApprovedCount': json['unApprovedCount'],
'editedCount': json['editedCount'],
'bannedCount': json['bannedCount'],
'unFlaggedCount': json['unFlaggedCount'],
'verificationId': json['verificationId'],
'createdAt': (new Date(json['createdAt'])),
'moderationGroupIds': json['moderationGroupIds'] == null ? null : json['moderationGroupIds'],
'isEmailSuppressed': json['isEmailSuppressed'] == null ? undefined : json['isEmailSuppressed'],
};
}
function ModeratorToJSON(json) {
return ModeratorToJSONTyped(json, false);
}
function ModeratorToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'_id': value['id'],
'tenantId': value['tenantId'],
'name': value['name'],
'userId': value['userId'],
'acceptedInvite': value['acceptedInvite'],
'email': value['email'],
'markReviewedCount': value['markReviewedCount'],
'deletedCount': value['deletedCount'],
'markedSpamCount': value['markedSpamCount'],
'markedNotSpamCount': value['markedNotSpamCount'],
'approvedCount': value['approvedCount'],
'unApprovedCount': value['unApprovedCount'],
'editedCount': value['editedCount'],
'bannedCount': value['bannedCount'],
'unFlaggedCount': value['unFlaggedCount'],
'verificationId': value['verificationId'],
'createdAt': ((value['createdAt']).toISOString()),
'moderationGroupIds': value['moderationGroupIds'],
'isEmailSuppressed': value['isEmailSuppressed'],
};
}
//# sourceMappingURL=Moderator.js.map