ObjectVersionEx
Object version and object-level information.
| Name | Description | Type |
|---|---|---|
version_info | Object Version information. | ObjectVersion |
object_info | Object-level information. | ObjectLevelInfo |
Helper Methods and Properties
⚠️ Note
These helper methods and properties are available when using the npm package @m-filescorporation/uix-vault-messages. Install it in your project to use these helpers. For more information, see Overview/VaultMessages/.
Instance Methods
| Method | Description | Parameters | Returns |
|---|---|---|---|
AsObjVer | Get as ObjVer object. | ObjVer | |
GetFiles | Get the files associated with the object. | File[] | |
GetPrimaryFileIfAvailable | Gets the primary file of a if available. | File | null |
Properties
| Property | Type | Description |
|---|---|---|
ID | number | Internal object ID. |
ExternalID | string | null | External object ID. |
Title | string | null | Object title. |
Type | number | null | Object type. |
Version | number | null | Object version. |
Class | number | null | Object class. |
IsExternal | boolean | Is the object external? |
IsCheckedOut | boolean | Is the object checked out? |
IsSingleFileObject | boolean | Is the object a single file object? |
IsMFDWithoutFiles | boolean | Is the object a multi-file document without files? |
IsDeleted | boolean | Is the object deleted? |
HasRelatedObjects | boolean | Does the object have related objects? |
HasFileDuplicates | boolean | Does the object have file duplicates? |
GUID | string | null | Object GUID. |
ObjectFileName | string | Get the object file name. For Single File Documents, this is the file name with the extension. If this object is a Multi-File Document, this is the object title. |
IsDocumentCollection | boolean | Is the object a Document Collection? |
ObjID | ObjID | null | The object's objID. |
IsCheckedOutToThisUserOnAnyHost | boolean | Checks if the object is checked out to the user on any host. |
IsCheckedOutToThisUserOnThisHost | boolean | Checks if the object is checked out to the user on this host. |
IsLatestToThisUser | boolean | Checks if the object is the latest version for this user. |
IsLatestAndEditableToThisUser | boolean | Checks if the object is the latest version and editable for this user. |
IsCheckedOutToAnotherUser | boolean | Checks if the object is checked out to another user. |
CheckedOutTo | number | null | Gets the user ID of the user who has checked out the object. Null if object is not checked out. |
CheckedOutToHostName | string | null | Gets the hostname of the machine where the object is checked out. Null if object is not checked out. |
CheckedOutToUserName | string | null | Gets the username to which the object has been checked out. Null if object is not checked out. |
Working with Objects
// Extension helpers for ObjectVersionEx instances
// Get as ObjVer object.
const result = objectversionexInstance.AsObjVer();
// Get the files associated with the object.
const result = objectversionexInstance.GetFiles();
// Gets the primary file of a if available.
const result = objectversionexInstance.GetPrimaryFileIfAvailable();
// Internal object ID.
const id = objectversionexInstance.ID;
// External object ID.
const externalid = objectversionexInstance.ExternalID;
// Object title.
const title = objectversionexInstance.Title;
// Object type.
const type = objectversionexInstance.Type;
// Object version.
const version = objectversionexInstance.Version;
// Object class.
const objectClass = objectversionexInstance.Class;
// Is the object external?
const isexternal = objectversionexInstance.IsExternal;
// Is the object checked out?
const ischeckedout = objectversionexInstance.IsCheckedOut;
// Is the object a single file object?
const issinglefileobject = objectversionexInstance.IsSingleFileObject;
// Is the object a multi-file document without files?
const ismfdwithoutfiles = objectversionexInstance.IsMFDWithoutFiles;
// Is the object deleted?
const isdeleted = objectversionexInstance.IsDeleted;
// Does the object have related objects?
const hasrelatedobjects = objectversionexInstance.HasRelatedObjects;
// Does the object have file duplicates?
const hasfileduplicates = objectversionexInstance.HasFileDuplicates;
// Object GUID.
const guid = objectversionexInstance.GUID;
// Get the object file name. For Single File Documents, this is the file name with the extension. If this object is a Multi-File Document, this is the object title.
const objectfilename = objectversionexInstance.ObjectFileName;
// Is the object a Document Collection?
const isdocumentcollection = objectversionexInstance.IsDocumentCollection;
// The object's objID.
const objid = objectversionexInstance.ObjID;
// Checks if the object is checked out to the user on any host.
const ischeckedouttothisuseronanyhost =
objectversionexInstance.IsCheckedOutToThisUserOnAnyHost;
// Checks if the object is checked out to the user on this host.
const ischeckedouttothisuseronthishost =
objectversionexInstance.IsCheckedOutToThisUserOnThisHost;
// Checks if the object is the latest version for this user.
const islatesttothisuser = objectversionexInstance.IsLatestToThisUser;
// Checks if the object is the latest version and editable for this user.
const islatestandeditabletothisuser =
objectversionexInstance.IsLatestAndEditableToThisUser;
// Checks if the object is checked out to another user.
const ischeckedouttoanotheruser =
objectversionexInstance.IsCheckedOutToAnotherUser;
// Gets the user ID of the user who has checked out the object. Null if object is not checked out.
const checkedoutto = objectversionexInstance.CheckedOutTo;
// Gets the hostname of the machine where the object is checked out. Null if object is not checked out.
const checkedouttohostname = objectversionexInstance.CheckedOutToHostName;
// Gets the username to which the object has been checked out. Null if object is not checked out.
const checkedouttousername = objectversionexInstance.CheckedOutToUserName;
Example
{
"version_info": {
"version": {
"type": 7 /* Enum: ObjVerVersionType */,
"internal_version": 0,
"external_repository_version": "<external repository version>",
"external_repository_sort_key": 0
},
"title": "<title>",
"is_single_file_object": false,
"has_assignments": false,
"last_modified_at_utc": {
"seconds": 0,
"nanos": 0
} /* google.protobuf.Timestamp */,
"files": [] /* Array of File */,
"object_version_flags": {
"all": false,
"is_assignment_completed": false,
"has_related_objects": false,
"is_assignment_rejected": false,
"has_file_duplicates": false
},
"class_id": 0,
"version_guid": "<version guid>",
"primary_file": {
"type": 3 /* Enum: FileIDType */,
"internal_id": 0,
"external_repository_id": "<external repository id>"
}
},
"object_info": {
"obj_id": {
"type": 0,
"item_id": {
"internal_id": 0,
"external_repository_id": {
"connection": "<connection>",
"item": "<item>"
}
}
},
"external_id_status": 5 /* Enum: ExtIDStatus */,
"external_id": "<external id>",
"checked_out_version": {} /* ObjVerVersion */,
"checked_out_to_user_id": 0,
"checked_out_to_user_name": "<checked out to user name>",
"checked_out_to_host_name": "<checked out to host name>",
"checked_out_at_utc": {
"seconds": 0,
"nanos": 0
} /* google.protobuf.Timestamp */,
"checked_in_version": {} /* ObjVerVersion */,
"created_at_utc": {
"seconds": 0,
"nanos": 0
} /* google.protobuf.Timestamp */,
"accessed_by_me_utc": {
"seconds": 0,
"nanos": 0
} /* google.protobuf.Timestamp */,
"guid": "<guid>",
"options": {
"all": false,
"is_shortcut": false,
"is_deleted": false,
"is_accessed_by_valid": false,
"has_shared_files": false,
"is_conflict_object": false,
"is_normal": false,
"is_view": false,
"has_external_data": false,
"is_referred_external_object": false,
"is_external_origin": false,
"is_omitted_from_database": false
},
"original_vault_guid": "<original vault guid>",
"original_vault_obj_id": {} /* ObjID */,
"associated_view_id": {} /* ItemID */,
"external_repository_icon_id": "<external repository icon id>",
"primary_view_id": {} /* ItemID */,
"capabilities": {
"all": false,
"can_have_history": false,
"can_have_relationships": false,
"can_edit_old_versions": false,
"can_delete": false,
"can_destroy": false,
"can_undelete": false,
"can_rename": false,
"can_edit_metadata": false,
"can_edit_assignments": false,
"can_edit_workflows": false,
"can_edit_files": false,
"can_edit_version_comments": false,
"can_convert_single_multi_file": false,
"can_add_and_remove_files": false,
"can_change_file_type": false,
"can_change_permissions": false
}
}
}