fastcomments-sdk
Version:
FastComments API Client - A SDK for interacting with the FastComments API
77 lines • 3.07 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.instanceOfUserBadgeProgress = instanceOfUserBadgeProgress;
exports.UserBadgeProgressFromJSON = UserBadgeProgressFromJSON;
exports.UserBadgeProgressFromJSONTyped = UserBadgeProgressFromJSONTyped;
exports.UserBadgeProgressToJSON = UserBadgeProgressToJSON;
exports.UserBadgeProgressToJSONTyped = UserBadgeProgressToJSONTyped;
/**
* Check if a given object implements the UserBadgeProgress interface.
*/
function instanceOfUserBadgeProgress(value) {
if (!('id' in value) || value['id'] === undefined)
return false;
if (!('tenantId' in value) || value['tenantId'] === undefined)
return false;
if (!('userId' in value) || value['userId'] === undefined)
return false;
if (!('firstCommentId' in value) || value['firstCommentId'] === undefined)
return false;
if (!('firstCommentDate' in value) || value['firstCommentDate'] === undefined)
return false;
if (!('progress' in value) || value['progress'] === undefined)
return false;
return true;
}
function UserBadgeProgressFromJSON(json) {
return UserBadgeProgressFromJSONTyped(json, false);
}
function UserBadgeProgressFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'id': json['_id'],
'tenantId': json['tenantId'],
'userId': json['userId'],
'firstCommentId': json['firstCommentId'],
'firstCommentDate': (new Date(json['firstCommentDate'])),
'autoTrustFactor': json['autoTrustFactor'] == null ? undefined : json['autoTrustFactor'],
'manualTrustFactor': json['manualTrustFactor'] == null ? undefined : json['manualTrustFactor'],
'progress': json['progress'],
'tosAcceptedAt': json['tosAcceptedAt'] == null ? undefined : (new Date(json['tosAcceptedAt'])),
};
}
function UserBadgeProgressToJSON(json) {
return UserBadgeProgressToJSONTyped(json, false);
}
function UserBadgeProgressToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'_id': value['id'],
'tenantId': value['tenantId'],
'userId': value['userId'],
'firstCommentId': value['firstCommentId'],
'firstCommentDate': ((value['firstCommentDate']).toISOString()),
'autoTrustFactor': value['autoTrustFactor'],
'manualTrustFactor': value['manualTrustFactor'],
'progress': value['progress'],
'tosAcceptedAt': value['tosAcceptedAt'] == null ? undefined : ((value['tosAcceptedAt']).toISOString()),
};
}
//# sourceMappingURL=UserBadgeProgress.js.map