fastcomments-sdk
Version:
FastComments API Client - A SDK for interacting with the FastComments API
100 lines • 3.79 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.APIAuditLogFromEnum = exports.APIAuditLogCrudTypeEnum = void 0;
exports.instanceOfAPIAuditLog = instanceOfAPIAuditLog;
exports.APIAuditLogFromJSON = APIAuditLogFromJSON;
exports.APIAuditLogFromJSONTyped = APIAuditLogFromJSONTyped;
exports.APIAuditLogToJSON = APIAuditLogToJSON;
exports.APIAuditLogToJSONTyped = APIAuditLogToJSONTyped;
/**
* @export
* @enum {string}
*/
var APIAuditLogCrudTypeEnum;
(function (APIAuditLogCrudTypeEnum) {
APIAuditLogCrudTypeEnum["c"] = "c";
APIAuditLogCrudTypeEnum["r"] = "r";
APIAuditLogCrudTypeEnum["u"] = "u";
APIAuditLogCrudTypeEnum["d"] = "d";
APIAuditLogCrudTypeEnum["login"] = "login";
})(APIAuditLogCrudTypeEnum || (exports.APIAuditLogCrudTypeEnum = APIAuditLogCrudTypeEnum = {}));
/**
* @export
* @enum {string}
*/
var APIAuditLogFromEnum;
(function (APIAuditLogFromEnum) {
APIAuditLogFromEnum["ui"] = "ui";
APIAuditLogFromEnum["api"] = "api";
APIAuditLogFromEnum["cron"] = "cron";
})(APIAuditLogFromEnum || (exports.APIAuditLogFromEnum = APIAuditLogFromEnum = {}));
/**
* Check if a given object implements the APIAuditLog interface.
*/
function instanceOfAPIAuditLog(value) {
if (!('id' in value) || value['id'] === undefined)
return false;
if (!('resourceName' in value) || value['resourceName'] === undefined)
return false;
if (!('crudType' in value) || value['crudType'] === undefined)
return false;
return true;
}
function APIAuditLogFromJSON(json) {
return APIAuditLogFromJSONTyped(json, false);
}
function APIAuditLogFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'id': json['_id'],
'userId': json['userId'] == null ? undefined : json['userId'],
'username': json['username'] == null ? undefined : json['username'],
'resourceName': json['resourceName'],
'crudType': json['crudType'],
'from': json['from'] == null ? undefined : json['from'],
'url': json['url'] == null ? undefined : json['url'],
'ip': json['ip'] == null ? undefined : json['ip'],
'when': json['when'] == null ? undefined : (new Date(json['when'])),
'description': json['description'] == null ? undefined : json['description'],
'serverStartDate': json['serverStartDate'] == null ? undefined : (new Date(json['serverStartDate'])),
'objectDetails': json['objectDetails'] == null ? undefined : json['objectDetails'],
};
}
function APIAuditLogToJSON(json) {
return APIAuditLogToJSONTyped(json, false);
}
function APIAuditLogToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'_id': value['id'],
'userId': value['userId'],
'username': value['username'],
'resourceName': value['resourceName'],
'crudType': value['crudType'],
'from': value['from'],
'url': value['url'],
'ip': value['ip'],
'when': value['when'] == null ? undefined : ((value['when']).toISOString()),
'description': value['description'],
'serverStartDate': value['serverStartDate'] == null ? undefined : ((value['serverStartDate']).toISOString()),
'objectDetails': value['objectDetails'],
};
}
//# sourceMappingURL=APIAuditLog.js.map