UNPKG

@bitblit/ratchet-misc

Version:

Ratchet miscellaneous tooling that requires smallish dependant libraries

76 lines 3.5 kB
import { exists } from '../runtime.js'; export var LocalIdentityTypeEnum; (function (LocalIdentityTypeEnum) { LocalIdentityTypeEnum["local_identity"] = "local_identity"; })(LocalIdentityTypeEnum || (LocalIdentityTypeEnum = {})); (function (LocalIdentityTypeEnum) { LocalIdentityTypeEnum["email"] = "email"; LocalIdentityTypeEnum["discord"] = "discord"; LocalIdentityTypeEnum["eth_wallet"] = "eth_wallet"; })(LocalIdentityTypeEnum || (LocalIdentityTypeEnum = {})); export function instanceOfLocalIdentity(value) { let isInstance = true; isInstance = isInstance && '_id' in value; isInstance = isInstance && '_rootId' in value; isInstance = isInstance && '_createdBy' in value; isInstance = isInstance && 'identityId' in value; isInstance = isInstance && 'type' in value; return isInstance; } export function LocalIdentityFromJSON(json) { return LocalIdentityFromJSONTyped(json, false); } export function LocalIdentityFromJSONTyped(json, ignoreDiscriminator) { if (json === undefined || json === null) { return json; } return { _id: json['_id'], _type: !exists(json, '_type') ? undefined : json['_type'], _rootId: json['_rootId'], _createdOn: !exists(json, '_createdOn') ? undefined : new Date(json['_createdOn']), _createdBy: json['_createdBy'], _updatedOn: !exists(json, '_updatedOn') ? undefined : new Date(json['_updatedOn']), _updatedBy: !exists(json, '_updatedBy') ? undefined : json['_updatedBy'], _archivedOn: !exists(json, '_archivedOn') ? undefined : new Date(json['_archivedOn']), _archivedBy: !exists(json, '_archivedBy') ? undefined : json['_archivedBy'], _deletedOn: !exists(json, '_deletedOn') ? undefined : new Date(json['_deletedOn']), _deletedBy: !exists(json, '_deletedBy') ? undefined : json['_deletedBy'], _operationId: !exists(json, '_operationId') ? undefined : json['_operationId'], _isPublic: !exists(json, '_isPublic') ? undefined : json['_isPublic'], identityId: json['identityId'], displayId: !exists(json, 'displayId') ? undefined : json['displayId'], type: json['type'], globalIdentityId: !exists(json, 'globalIdentityId') ? undefined : json['globalIdentityId'], isRequired: !exists(json, 'isRequired') ? undefined : json['isRequired'], }; } export function LocalIdentityToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { _id: value._id, _type: value._type, _rootId: value._rootId, _createdOn: value._createdOn === undefined ? undefined : value._createdOn.toISOString(), _createdBy: value._createdBy, _updatedOn: value._updatedOn === undefined ? undefined : value._updatedOn.toISOString(), _updatedBy: value._updatedBy, _archivedOn: value._archivedOn === undefined ? undefined : value._archivedOn.toISOString(), _archivedBy: value._archivedBy, _deletedOn: value._deletedOn === undefined ? undefined : value._deletedOn.toISOString(), _deletedBy: value._deletedBy, _operationId: value._operationId, _isPublic: value._isPublic, identityId: value.identityId, displayId: value.displayId, type: value.type, globalIdentityId: value.globalIdentityId, isRequired: value.isRequired, }; } //# sourceMappingURL=LocalIdentity.js.map