src/app/shared/api-objects/basic-message-components/src/basic-type-aliases.ts
Represents a date value
Properties |
calendar |
calendar:
|
Type : string
|
Calendar used |
dateval1 |
dateval1:
|
Type : string
|
Start date in string format |
dateval2 |
dateval2:
|
Type : string
|
End end in string format |
export type StringOrNumber = integer | string;
/**
* Numeric code representing the result (success or failure) of an API operation.
*
* 0: OK (Success)
*
* 1: INVALID_REQUEST_METHOD
*
* 2: CREDENTIALS_NOT_VALID
*
* 3: NO_RIGHTS_FOR_OPERATION
*
* 4: INTERNAL_SALSAH_ERROR
*
* 5: NO_PROPERTIES
*
* 6: NOT_IN_USERDATA
*
* 7: RESOURCE_ID_MISSING
*
* 8: UNKNOWN_VOCABULARY
*
* 9: NOT_FOUND
*
* 10: API_ENDPOINT_NOT_FOUND
*
* 11: INVALID_REQUEST_TYPE
*
* 12: PROPERTY_ID_MISSING
*
* 13: NOT_YET_IMPLEMENTED
*
* 14: COULD_NOT_OPEN_PROGRESS_FILE
*
* 15: VALUE_ID_OR_RESTYPE_ID_MISSING
*
* 16: HLIST_ALREADY_EXISTENT
*
* 17: HLIST_NO_LABELS
*
* 18: HLIST_NOT_EXISTING
*
* 19: HLIST_NO_POSITION
*
* 20: HLIST_INVALID_POSITION
*
* 21: SELECTION_NO_LABELS
*
* 22: SELECTION_ALREADY_EXISTENT
*
* 23: SELECTION_MISSING_OR_INVALID_POSITION
*
* 24: SELECTION_DELETE_FAILED
*
* 25: SELECTION_NODE_ALREADY_EXISTENT
*
* 26: GEONAMES_GEONAME_ID_EXISTING
*
* 27: UPDATE_NOT_PERFORMED
*
* 28: DUPLICATE_VALUE
*
* 29: ONTOLOGY_CONSTRAINT
*
* 999: UNSPECIFIED_ERROR
*
*/
export type KnoraStatusCode = integer;
/**
* Obsolete
*
* String representing the user's permission on a resource.
*
* "OK": the user has sufficient permission to view the resource
*/
export type KnoraAccess = string;
/**
* String must be a valid Knora IRI, e.g. "http://data.knora.org/c5058f3a".
*/
export type KnoraIRI = string;
/**
* A Knora List Node IRI
*/
export type KnoraListNodeIRI = KnoraIRI;
/**
* Numeric code representing the user's rights on a Knora resource.
*
* 0: No rights
*
* 1: Restricted View Permission
*
* 2: View Permission
*
* 6: Modify Permission
*
* 7: Delete Permission
*
* 8: Change Rights Permission
*/
export type KnoraRights = integer | string;
/**
* Describes a Knora Value.
* Either a simple type or a complex represented by an interface.
*/
export type KnoraValue =
| integer
| decimal
| boolean
| Richtext
| Interval
| Date
| color
| KnoraIRI
| URI
| geometry
| geoname
| KnoraListNodeIRI;
/**
* Represents how a binary representation (location) can be accessed.
* Either locally stored (file) or referenced from an external location (url)
*/
export type ProtocolOptions = 'file' | 'url';
/**
* String must be a hexadecimal RGB color code, e.g. "#4169E1"
*/
type color = string;
/**
* A floating point number (may have fractions).
*/
type decimal = integer;
/**
* A string representing a geometrical figure on a surface (2D).
*/
type geometry = string;
/**
* A geoname identifier
*/
type geoname = string;
/**
* An integer number (no fractions).
*/
type integer = number;
/**
* String must be a stringified [[textattr]] (using `JSON.stringify()`)
* that can pe parsed in a [[textattr]] using `JSON.parse()`.
*/
type textattrStringified = string;
/**
* A string representing a URI
*/
type URI = string;
/**
* Represents a rich text value
*/
interface Richtext {
/**
* Mere string representation
*/
utf8str: string;
/**
* Markup information in standoff format
*/
textattr: textattrStringified;
/**
* References to Knora resources from the text
*/
resource_reference: Array<KnoraIRI>;
}
/**
* Represents a date value
*/
interface Date {
/**
* Start date in string format
*/
dateval1: string;
/**
* End end in string format
*/
dateval2: string;
/**
* Calendar used
*/
calendar: string;
}
/**
* Represents an interval value
*/
interface Interval {
/**
* Begin of the interval in seconds
*/
timeval1: integer;
/**
* End ofg the interval in seconds
*/
timeval2: integer;
}