UNPKG

fastcomments-sdk

Version:

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

96 lines 3.94 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.instanceOfPendingCommentToSyncOutbound = instanceOfPendingCommentToSyncOutbound; exports.PendingCommentToSyncOutboundFromJSON = PendingCommentToSyncOutboundFromJSON; exports.PendingCommentToSyncOutboundFromJSONTyped = PendingCommentToSyncOutboundFromJSONTyped; exports.PendingCommentToSyncOutboundToJSON = PendingCommentToSyncOutboundToJSON; exports.PendingCommentToSyncOutboundToJSONTyped = PendingCommentToSyncOutboundToJSONTyped; const FComment_1 = require("./FComment"); /** * Check if a given object implements the PendingCommentToSyncOutbound interface. */ function instanceOfPendingCommentToSyncOutbound(value) { if (!('id' in value) || value['id'] === undefined) return false; if (!('commentId' in value) || value['commentId'] === undefined) return false; if (!('externalId' in value) || value['externalId'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('tenantId' in value) || value['tenantId'] === undefined) return false; if (!('attemptCount' in value) || value['attemptCount'] === undefined) return false; if (!('nextAttemptAt' in value) || value['nextAttemptAt'] === undefined) return false; if (!('eventType' in value) || value['eventType'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; if (!('domain' in value) || value['domain'] === undefined) return false; if (!('lastError' in value) || value['lastError'] === undefined) return false; return true; } function PendingCommentToSyncOutboundFromJSON(json) { return PendingCommentToSyncOutboundFromJSONTyped(json, false); } function PendingCommentToSyncOutboundFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'id': json['_id'], 'commentId': json['commentId'], 'comment': json['comment'] == null ? undefined : (0, FComment_1.FCommentFromJSON)(json['comment']), 'externalId': json['externalId'], 'createdAt': (new Date(json['createdAt'])), 'tenantId': json['tenantId'], 'attemptCount': json['attemptCount'], 'nextAttemptAt': (new Date(json['nextAttemptAt'])), 'eventType': json['eventType'], 'type': json['type'], 'domain': json['domain'], 'lastError': json['lastError'], 'webhookId': json['webhookId'] == null ? undefined : json['webhookId'], }; } function PendingCommentToSyncOutboundToJSON(json) { return PendingCommentToSyncOutboundToJSONTyped(json, false); } function PendingCommentToSyncOutboundToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { '_id': value['id'], 'commentId': value['commentId'], 'comment': (0, FComment_1.FCommentToJSON)(value['comment']), 'externalId': value['externalId'], 'createdAt': ((value['createdAt']).toISOString()), 'tenantId': value['tenantId'], 'attemptCount': value['attemptCount'], 'nextAttemptAt': ((value['nextAttemptAt']).toISOString()), 'eventType': value['eventType'], 'type': value['type'], 'domain': value['domain'], 'lastError': value['lastError'], 'webhookId': value['webhookId'], }; } //# sourceMappingURL=PendingCommentToSyncOutbound.js.map