UNPKG

fastcomments-sdk

Version:

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

111 lines 5.08 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.instanceOfRenderableUserNotification = instanceOfRenderableUserNotification; exports.RenderableUserNotificationFromJSON = RenderableUserNotificationFromJSON; exports.RenderableUserNotificationFromJSONTyped = RenderableUserNotificationFromJSONTyped; exports.RenderableUserNotificationToJSON = RenderableUserNotificationToJSON; exports.RenderableUserNotificationToJSONTyped = RenderableUserNotificationToJSONTyped; const NotificationObjectType_1 = require("./NotificationObjectType"); const NotificationType_1 = require("./NotificationType"); /** * Check if a given object implements the RenderableUserNotification interface. */ function instanceOfRenderableUserNotification(value) { if (!('optedOut' in value) || value['optedOut'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('sent' in value) || value['sent'] === undefined) return false; if (!('viewed' in value) || value['viewed'] === undefined) return false; if (!('relatedObjectId' in value) || value['relatedObjectId'] === undefined) return false; if (!('relatedObjectType' in value) || value['relatedObjectType'] === undefined) return false; if (!('url' in value) || value['url'] === undefined) return false; if (!('urlId' in value) || value['urlId'] === undefined) return false; if (!('id' in value) || value['id'] === undefined) return false; return true; } function RenderableUserNotificationFromJSON(json) { return RenderableUserNotificationFromJSONTyped(json, false); } function RenderableUserNotificationFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'conversationId': json['conversationId'] == null ? undefined : json['conversationId'], 'contextHTML': json['contextHTML'] == null ? undefined : json['contextHTML'], 'fromUserNames': json['fromUserNames'] == null ? undefined : json['fromUserNames'], 'fromUserIds': json['fromUserIds'] == null ? undefined : json['fromUserIds'], 'relatedIds': json['relatedIds'] == null ? undefined : json['relatedIds'], 'count': json['count'] == null ? undefined : json['count'], 'optedOut': json['optedOut'], 'fromUserAvatarSrc': json['fromUserAvatarSrc'] == null ? undefined : json['fromUserAvatarSrc'], 'fromUserId': json['fromUserId'] == null ? undefined : json['fromUserId'], 'fromUserName': json['fromUserName'] == null ? undefined : json['fromUserName'], 'fromCommentId': json['fromCommentId'] == null ? undefined : json['fromCommentId'], 'type': (0, NotificationType_1.NotificationTypeFromJSON)(json['type']), 'createdAt': json['createdAt'], 'sent': json['sent'], 'viewed': json['viewed'], 'relatedObjectId': json['relatedObjectId'], 'relatedObjectType': (0, NotificationObjectType_1.NotificationObjectTypeFromJSON)(json['relatedObjectType']), 'pageTitle': json['pageTitle'] == null ? undefined : json['pageTitle'], 'url': json['url'], 'urlId': json['urlId'], 'id': json['_id'], }; } function RenderableUserNotificationToJSON(json) { return RenderableUserNotificationToJSONTyped(json, false); } function RenderableUserNotificationToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'conversationId': value['conversationId'], 'contextHTML': value['contextHTML'], 'fromUserNames': value['fromUserNames'], 'fromUserIds': value['fromUserIds'], 'relatedIds': value['relatedIds'], 'count': value['count'], 'optedOut': value['optedOut'], 'fromUserAvatarSrc': value['fromUserAvatarSrc'], 'fromUserId': value['fromUserId'], 'fromUserName': value['fromUserName'], 'fromCommentId': value['fromCommentId'], 'type': (0, NotificationType_1.NotificationTypeToJSON)(value['type']), 'createdAt': value['createdAt'], 'sent': value['sent'], 'viewed': value['viewed'], 'relatedObjectId': value['relatedObjectId'], 'relatedObjectType': (0, NotificationObjectType_1.NotificationObjectTypeToJSON)(value['relatedObjectType']), 'pageTitle': value['pageTitle'], 'url': value['url'], 'urlId': value['urlId'], '_id': value['id'], }; } //# sourceMappingURL=RenderableUserNotification.js.map