UNPKG

fastcomments-sdk

Version:

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

187 lines 11.7 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.instanceOfUser = instanceOfUser; exports.UserFromJSON = UserFromJSON; exports.UserFromJSONTyped = UserFromJSONTyped; exports.UserToJSON = UserToJSON; exports.UserToJSONTyped = UserToJSONTyped; const DigestEmailFrequency_1 = require("./DigestEmailFrequency"); const ImportedAgentApprovalNotificationFrequency_1 = require("./ImportedAgentApprovalNotificationFrequency"); /** * Check if a given object implements the User interface. */ function instanceOfUser(value) { if (!('id' in value) || value['id'] === undefined) return false; if (!('username' in value) || value['username'] === undefined) return false; if (!('email' in value) || value['email'] === undefined) return false; if (!('signUpDate' in value) || value['signUpDate'] === undefined) return false; if (!('createdFromTenantId' in value) || value['createdFromTenantId'] === undefined) return false; if (!('createdFromIpHashed' in value) || value['createdFromIpHashed'] === undefined) return false; if (!('verified' in value) || value['verified'] === undefined) return false; if (!('loginId' in value) || value['loginId'] === undefined) return false; if (!('loginIdDate' in value) || value['loginIdDate'] === undefined) return false; return true; } function UserFromJSON(json) { return UserFromJSONTyped(json, false); } function UserFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'id': json['_id'], 'tenantId': json['tenantId'] == null ? undefined : json['tenantId'], 'username': json['username'], 'displayName': json['displayName'] == null ? undefined : json['displayName'], 'websiteUrl': json['websiteUrl'] == null ? undefined : json['websiteUrl'], 'email': json['email'], 'pendingEmail': json['pendingEmail'] == null ? undefined : json['pendingEmail'], 'backupEmail': json['backupEmail'] == null ? undefined : json['backupEmail'], 'pendingBackupEmail': json['pendingBackupEmail'] == null ? undefined : json['pendingBackupEmail'], 'signUpDate': json['signUpDate'], 'createdFromUrlId': json['createdFromUrlId'] == null ? undefined : json['createdFromUrlId'], 'createdFromTenantId': json['createdFromTenantId'], 'createdFromIpHashed': json['createdFromIpHashed'], 'verified': json['verified'], 'loginId': json['loginId'], 'loginIdDate': json['loginIdDate'], 'loginCount': json['loginCount'] == null ? undefined : json['loginCount'], 'optedInNotifications': json['optedInNotifications'] == null ? undefined : json['optedInNotifications'], 'optedInTenantNotifications': json['optedInTenantNotifications'] == null ? undefined : json['optedInTenantNotifications'], 'hideAccountCode': json['hideAccountCode'] == null ? undefined : json['hideAccountCode'], 'avatarSrc': json['avatarSrc'] == null ? undefined : json['avatarSrc'], 'isFastCommentsHelpRequestAdmin': json['isFastCommentsHelpRequestAdmin'] == null ? undefined : json['isFastCommentsHelpRequestAdmin'], 'isHelpRequestAdmin': json['isHelpRequestAdmin'] == null ? undefined : json['isHelpRequestAdmin'], 'isAccountOwner': json['isAccountOwner'] == null ? undefined : json['isAccountOwner'], 'isAdminAdmin': json['isAdminAdmin'] == null ? undefined : json['isAdminAdmin'], 'isBillingAdmin': json['isBillingAdmin'] == null ? undefined : json['isBillingAdmin'], 'isAnalyticsAdmin': json['isAnalyticsAdmin'] == null ? undefined : json['isAnalyticsAdmin'], 'isCustomizationAdmin': json['isCustomizationAdmin'] == null ? undefined : json['isCustomizationAdmin'], 'isManageDataAdmin': json['isManageDataAdmin'] == null ? undefined : json['isManageDataAdmin'], 'isCommentModeratorAdmin': json['isCommentModeratorAdmin'] == null ? undefined : json['isCommentModeratorAdmin'], 'isAPIAdmin': json['isAPIAdmin'] == null ? undefined : json['isAPIAdmin'], 'isSiteAdmin': json['isSiteAdmin'] == null ? undefined : json['isSiteAdmin'], 'moderatorIds': json['moderatorIds'] == null ? undefined : json['moderatorIds'], 'isImpersonator': json['isImpersonator'] == null ? undefined : json['isImpersonator'], 'isCouponManager': json['isCouponManager'] == null ? undefined : json['isCouponManager'], 'locale': json['locale'] == null ? undefined : json['locale'], 'digestEmailFrequency': json['digestEmailFrequency'] == null ? undefined : (0, DigestEmailFrequency_1.DigestEmailFrequencyFromJSON)(json['digestEmailFrequency']), 'notificationFrequency': json['notificationFrequency'] == null ? undefined : json['notificationFrequency'], 'adminNotificationFrequency': json['adminNotificationFrequency'] == null ? undefined : json['adminNotificationFrequency'], 'agentApprovalNotificationFrequency': json['agentApprovalNotificationFrequency'] == null ? undefined : (0, ImportedAgentApprovalNotificationFrequency_1.ImportedAgentApprovalNotificationFrequencyFromJSON)(json['agentApprovalNotificationFrequency']), 'lastTenantNotificationSentDate': json['lastTenantNotificationSentDate'] == null ? undefined : (new Date(json['lastTenantNotificationSentDate'])), 'lastReplyNotificationSentDate': json['lastReplyNotificationSentDate'] == null ? undefined : (new Date(json['lastReplyNotificationSentDate'])), 'ignoredAddToMySiteMessages': json['ignoredAddToMySiteMessages'] == null ? undefined : json['ignoredAddToMySiteMessages'], 'lastLoginDate': json['lastLoginDate'] == null ? undefined : (new Date(json['lastLoginDate'])), 'displayLabel': json['displayLabel'] == null ? undefined : json['displayLabel'], 'isProfileActivityPrivate': json['isProfileActivityPrivate'] == null ? undefined : json['isProfileActivityPrivate'], 'isProfileCommentsPrivate': json['isProfileCommentsPrivate'] == null ? undefined : json['isProfileCommentsPrivate'], 'isProfileDMDisabled': json['isProfileDMDisabled'] == null ? undefined : json['isProfileDMDisabled'], 'profileCommentApprovalMode': json['profileCommentApprovalMode'] == null ? undefined : json['profileCommentApprovalMode'], 'karma': json['karma'] == null ? undefined : json['karma'], 'passwordHash': json['passwordHash'] == null ? undefined : json['passwordHash'], 'averageTicketAckTimeMS': json['averageTicketAckTimeMS'] == null ? undefined : json['averageTicketAckTimeMS'], 'hasBlockedUsers': json['hasBlockedUsers'] == null ? undefined : json['hasBlockedUsers'], 'bio': json['bio'] == null ? undefined : json['bio'], 'headerBackgroundSrc': json['headerBackgroundSrc'] == null ? undefined : json['headerBackgroundSrc'], 'countryCode': json['countryCode'] == null ? undefined : json['countryCode'], 'countryFlag': json['countryFlag'] == null ? undefined : json['countryFlag'], 'socialLinks': json['socialLinks'] == null ? undefined : json['socialLinks'], 'hasTwoFactor': json['hasTwoFactor'] == null ? undefined : json['hasTwoFactor'], 'isEmailSuppressed': json['isEmailSuppressed'] == null ? undefined : json['isEmailSuppressed'], }; } function UserToJSON(json) { return UserToJSONTyped(json, false); } function UserToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { '_id': value['id'], 'tenantId': value['tenantId'], 'username': value['username'], 'displayName': value['displayName'], 'websiteUrl': value['websiteUrl'], 'email': value['email'], 'pendingEmail': value['pendingEmail'], 'backupEmail': value['backupEmail'], 'pendingBackupEmail': value['pendingBackupEmail'], 'signUpDate': value['signUpDate'], 'createdFromUrlId': value['createdFromUrlId'], 'createdFromTenantId': value['createdFromTenantId'], 'createdFromIpHashed': value['createdFromIpHashed'], 'verified': value['verified'], 'loginId': value['loginId'], 'loginIdDate': value['loginIdDate'], 'loginCount': value['loginCount'], 'optedInNotifications': value['optedInNotifications'], 'optedInTenantNotifications': value['optedInTenantNotifications'], 'hideAccountCode': value['hideAccountCode'], 'avatarSrc': value['avatarSrc'], 'isFastCommentsHelpRequestAdmin': value['isFastCommentsHelpRequestAdmin'], 'isHelpRequestAdmin': value['isHelpRequestAdmin'], 'isAccountOwner': value['isAccountOwner'], 'isAdminAdmin': value['isAdminAdmin'], 'isBillingAdmin': value['isBillingAdmin'], 'isAnalyticsAdmin': value['isAnalyticsAdmin'], 'isCustomizationAdmin': value['isCustomizationAdmin'], 'isManageDataAdmin': value['isManageDataAdmin'], 'isCommentModeratorAdmin': value['isCommentModeratorAdmin'], 'isAPIAdmin': value['isAPIAdmin'], 'isSiteAdmin': value['isSiteAdmin'], 'moderatorIds': value['moderatorIds'], 'isImpersonator': value['isImpersonator'], 'isCouponManager': value['isCouponManager'], 'locale': value['locale'], 'digestEmailFrequency': (0, DigestEmailFrequency_1.DigestEmailFrequencyToJSON)(value['digestEmailFrequency']), 'notificationFrequency': value['notificationFrequency'], 'adminNotificationFrequency': value['adminNotificationFrequency'], 'agentApprovalNotificationFrequency': (0, ImportedAgentApprovalNotificationFrequency_1.ImportedAgentApprovalNotificationFrequencyToJSON)(value['agentApprovalNotificationFrequency']), 'lastTenantNotificationSentDate': value['lastTenantNotificationSentDate'] == null ? undefined : ((value['lastTenantNotificationSentDate']).toISOString()), 'lastReplyNotificationSentDate': value['lastReplyNotificationSentDate'] == null ? undefined : ((value['lastReplyNotificationSentDate']).toISOString()), 'ignoredAddToMySiteMessages': value['ignoredAddToMySiteMessages'], 'lastLoginDate': value['lastLoginDate'] == null ? undefined : ((value['lastLoginDate']).toISOString()), 'displayLabel': value['displayLabel'], 'isProfileActivityPrivate': value['isProfileActivityPrivate'], 'isProfileCommentsPrivate': value['isProfileCommentsPrivate'], 'isProfileDMDisabled': value['isProfileDMDisabled'], 'profileCommentApprovalMode': value['profileCommentApprovalMode'], 'karma': value['karma'], 'passwordHash': value['passwordHash'], 'averageTicketAckTimeMS': value['averageTicketAckTimeMS'], 'hasBlockedUsers': value['hasBlockedUsers'], 'bio': value['bio'], 'headerBackgroundSrc': value['headerBackgroundSrc'], 'countryCode': value['countryCode'], 'countryFlag': value['countryFlag'], 'socialLinks': value['socialLinks'], 'hasTwoFactor': value['hasTwoFactor'], 'isEmailSuppressed': value['isEmailSuppressed'], }; } //# sourceMappingURL=User.js.map