Skip to content

Commit

Permalink
feat: update schema files
Browse files Browse the repository at this point in the history
  • Loading branch information
bot-anik committed Nov 16, 2023
1 parent 1449817 commit 2875d32
Show file tree
Hide file tree
Showing 3 changed files with 194 additions and 9 deletions.
6 changes: 3 additions & 3 deletions schema/okp4-dataverse/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@
],
"properties": {
"identifier": {
"description": "The URI that identifies the dataset. This URI makes sense only in the context of the service that provides the resource.\n\nPreconditions: - The URI must be unique within the dataverse.",
"description": "The URI that identifies the resource. This URI makes sense only in the context of the service that provides the resource.\n\nPreconditions: - The URI must be unique within the dataverse.",
"type": "string"
},
"identity": {
"description": "The decentralized identity (DID) of the Digital Resource.\n\nPreconditions: - The identity must be unique within the dataverse.",
"type": "string"
},
"provided_by": {
"description": "The URI of the service, already registered in the dataverse, that provides the dataset.\n\nPreconditions: - The Service must be registered in the dataverse before the resource can be registered.",
"description": "The URI of the service, already registered in the dataverse, that provides the resource.\n\nPreconditions: - The Service must be registered in the dataverse before the resource can be registered.",
"type": "string"
},
"registrar": {
"description": "The URI of the entity responsible for registering and managing the resource in the dataverse (i.e. on the blockchain). It's an optional field, if not provided the dataset is registered by the entity that invokes the transaction.",
"description": "The URI of the entity responsible for registering and managing the resource in the dataverse (i.e. on the blockchain). It's an optional field, if not provided the resource is registered by the entity that invokes the transaction.",
"type": [
"string",
"null"
Expand Down
132 changes: 130 additions & 2 deletions schema/okp4-dataverse/instantiate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,141 @@
"description": "`InstantiateMsg` is used to initialize a new instance of the dataverse.",
"type": "object",
"required": [
"name"
"name",
"triplestore_config"
],
"properties": {
"name": {
"description": "A unique name to identify the dataverse instance.",
"type": "string"
},
"triplestore_config": {
"description": "The configuration used to instantiate the triple store.",
"allOf": [
{
"$ref": "#/definitions/TripleStoreConfig"
}
]
}
},
"additionalProperties": false
"additionalProperties": false,
"definitions": {
"TripleStoreConfig": {
"title": "TripleStoreConfig",
"description": "`TripleStoreConfig` represents the configuration related to the management of the triple store.",
"type": "object",
"required": [
"code_id",
"limits"
],
"properties": {
"code_id": {
"description": "The code id that will be used to instantiate the triple store contract in which to store dataverse semantic data. It must implement the cognitarium interface.",
"allOf": [
{
"$ref": "#/definitions/Uint64"
}
]
},
"limits": {
"description": "Limitations regarding triple store usage.",
"allOf": [
{
"$ref": "#/definitions/TripleStoreLimitsInput"
}
]
}
},
"additionalProperties": false
},
"TripleStoreLimitsInput": {
"title": "TripleStoreLimitsInput",
"description": "Contains requested limitations regarding store usages.",
"type": "object",
"properties": {
"max_byte_size": {
"description": "The maximum number of bytes the store can contain. The size of a triple is counted as the sum of the size of its subject, predicate and object, including the size of data types and language tags if any. Default to [Uint128::MAX] if not set, which can be considered as no limit.",
"anyOf": [
{
"$ref": "#/definitions/Uint128"
},
{
"type": "null"
}
]
},
"max_insert_data_byte_size": {
"description": "The maximum number of bytes an insert data query can contain. Default to [Uint128::MAX] if not set, which can be considered as no limit.",
"anyOf": [
{
"$ref": "#/definitions/Uint128"
},
{
"type": "null"
}
]
},
"max_insert_data_triple_count": {
"description": "The maximum number of triples an insert data query can contain (after parsing). Default to [Uint128::MAX] if not set, which can be considered as no limit.",
"anyOf": [
{
"$ref": "#/definitions/Uint128"
},
{
"type": "null"
}
]
},
"max_query_limit": {
"description": "The maximum limit of a query, i.e. the maximum number of triples returned by a select query. Default to 30 if not set.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"max_query_variable_count": {
"description": "The maximum number of variables a query can select. Default to 30 if not set.",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"max_triple_byte_size": {
"description": "The maximum number of bytes the store can contain for a single triple. The size of a triple is counted as the sum of the size of its subject, predicate and object, including the size of data types and language tags if any. The limit is used to prevent storing very large triples, especially literals. Default to [Uint128::MAX] if not set, which can be considered as no limit.",
"anyOf": [
{
"$ref": "#/definitions/Uint128"
},
{
"type": "null"
}
]
},
"max_triple_count": {
"description": "The maximum number of triples the store can contain. Default to [Uint128::MAX] if not set, which can be considered as no limit.",
"anyOf": [
{
"$ref": "#/definitions/Uint128"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"Uint128": {
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
"type": "string"
},
"Uint64": {
"description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```",
"type": "string"
}
}
}
65 changes: 61 additions & 4 deletions ts/dataverse-schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ Given its role and status, this smart contract serves as the primary access poin
|parameter|description|
|----------|-----------|
|`name`|*(Required.) * **string**. A unique name to identify the dataverse instance.|
|`triplestore_config`|*(Required.) * **[TripleStoreConfig](#triplestoreconfig)**. The configuration used to instantiate the triple store.|
|`triplestore_config.code_id`|**[Uint64](#uint64)**. The code id that will be used to instantiate the triple store contract in which to store dataverse semantic data. It must implement the cognitarium interface.|
|`triplestore_config.limits`|**[TripleStoreLimitsInput](#triplestorelimitsinput)**. Limitations regarding triple store usage.|

## ExecuteMsg

Expand Down Expand Up @@ -117,10 +120,10 @@ The unique identification of each Digital Resource is achieved through a combina
|parameter|description|
|----------|-----------|
|`register_digital_resource`|*(Required.) * **object**. |
|`register_digital_resource.identifier`|*(Required.) * **string**. The URI that identifies the dataset. This URI makes sense only in the context of the service that provides the resource.<br /><br />Preconditions: - The URI must be unique within the dataverse.|
|`register_digital_resource.identifier`|*(Required.) * **string**. The URI that identifies the resource. This URI makes sense only in the context of the service that provides the resource.<br /><br />Preconditions: - The URI must be unique within the dataverse.|
|`register_digital_resource.identity`|*(Required.) * **string**. The decentralized identity (DID) of the Digital Resource.<br /><br />Preconditions: - The identity must be unique within the dataverse.|
|`register_digital_resource.provided_by`|*(Required.) * **string**. The URI of the service, already registered in the dataverse, that provides the dataset.<br /><br />Preconditions: - The Service must be registered in the dataverse before the resource can be registered.|
|`register_digital_resource.registrar`|**string\|null**. The URI of the entity responsible for registering and managing the resource in the dataverse (i.e. on the blockchain). It's an optional field, if not provided the dataset is registered by the entity that invokes the transaction.|
|`register_digital_resource.provided_by`|*(Required.) * **string**. The URI of the service, already registered in the dataverse, that provides the resource.<br /><br />Preconditions: - The Service must be registered in the dataverse before the resource can be registered.|
|`register_digital_resource.registrar`|**string\|null**. The URI of the entity responsible for registering and managing the resource in the dataverse (i.e. on the blockchain). It's an optional field, if not provided the resource is registered by the entity that invokes the transaction.|

### ExecuteMsg::FoundZone

Expand Down Expand Up @@ -236,6 +239,36 @@ RDF/XML is a syntax to express RDF information in XML. See the [official RDF/XML
|-------|
|`"rdf_xml"`|

### TripleStoreConfig

`TripleStoreConfig` represents the configuration related to the management of the triple store.

|property|description|
|----------|-----------|
|`code_id`|*(Required.) * **[Uint64](#uint64)**. The code id that will be used to instantiate the triple store contract in which to store dataverse semantic data. It must implement the cognitarium interface.|
|`limits`|*(Required.) * **[TripleStoreLimitsInput](#triplestorelimitsinput)**. Limitations regarding triple store usage.|
|`limits.max_byte_size`|**[Uint128](#uint128)\|null**. The maximum number of bytes the store can contain. The size of a triple is counted as the sum of the size of its subject, predicate and object, including the size of data types and language tags if any. Default to [Uint128::MAX] if not set, which can be considered as no limit.|
|`limits.max_insert_data_byte_size`|**[Uint128](#uint128)\|null**. The maximum number of bytes an insert data query can contain. Default to [Uint128::MAX] if not set, which can be considered as no limit.|
|`limits.max_insert_data_triple_count`|**[Uint128](#uint128)\|null**. The maximum number of triples an insert data query can contain (after parsing). Default to [Uint128::MAX] if not set, which can be considered as no limit.|
|`limits.max_query_limit`|**integer\|null**. The maximum limit of a query, i.e. the maximum number of triples returned by a select query. Default to 30 if not set.|
|`limits.max_query_variable_count`|**integer\|null**. The maximum number of variables a query can select. Default to 30 if not set.|
|`limits.max_triple_byte_size`|**[Uint128](#uint128)\|null**. The maximum number of bytes the store can contain for a single triple. The size of a triple is counted as the sum of the size of its subject, predicate and object, including the size of data types and language tags if any. The limit is used to prevent storing very large triples, especially literals. Default to [Uint128::MAX] if not set, which can be considered as no limit.|
|`limits.max_triple_count`|**[Uint128](#uint128)\|null**. The maximum number of triples the store can contain. Default to [Uint128::MAX] if not set, which can be considered as no limit.|

### TripleStoreLimitsInput

Contains requested limitations regarding store usages.

|property|description|
|----------|-----------|
|`max_byte_size`|**[Uint128](#uint128)\|null**. The maximum number of bytes the store can contain. The size of a triple is counted as the sum of the size of its subject, predicate and object, including the size of data types and language tags if any. Default to [Uint128::MAX] if not set, which can be considered as no limit.|
|`max_insert_data_byte_size`|**[Uint128](#uint128)\|null**. The maximum number of bytes an insert data query can contain. Default to [Uint128::MAX] if not set, which can be considered as no limit.|
|`max_insert_data_triple_count`|**[Uint128](#uint128)\|null**. The maximum number of triples an insert data query can contain (after parsing). Default to [Uint128::MAX] if not set, which can be considered as no limit.|
|`max_query_limit`|**integer\|null**. The maximum limit of a query, i.e. the maximum number of triples returned by a select query. Default to 30 if not set.|
|`max_query_variable_count`|**integer\|null**. The maximum number of variables a query can select. Default to 30 if not set.|
|`max_triple_byte_size`|**[Uint128](#uint128)\|null**. The maximum number of bytes the store can contain for a single triple. The size of a triple is counted as the sum of the size of its subject, predicate and object, including the size of data types and language tags if any. The limit is used to prevent storing very large triples, especially literals. Default to [Uint128::MAX] if not set, which can be considered as no limit.|
|`max_triple_count`|**[Uint128](#uint128)\|null**. The maximum number of triples the store can contain. Default to [Uint128::MAX] if not set, which can be considered as no limit.|

### Turtle

Turtle (Terse RDF Triple Language) Format
Expand All @@ -246,7 +279,31 @@ Turtle is a textual format for representing RDF triples in a more compact and hu
|-------|
|`"turtle"`|

### Uint128

A string containing a 128-bit integer in decimal representation.

|type|
|----|
|**string**.|

### Uint64

A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.

# Examples

Use `from` to create instances of this and `u64` to get the value out:

``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);
let b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```

|type|
|----|
|**string**.|

---

*Rendered by [Fadroma](https://fadroma.tech) ([@fadroma/schema 1.1.0](https://www.npmjs.com/package/@fadroma/schema)) from `okp4-dataverse.json` (`7dba583f9d24fda1`)*
*Rendered by [Fadroma](https://fadroma.tech) ([@fadroma/schema 1.1.0](https://www.npmjs.com/package/@fadroma/schema)) from `okp4-dataverse.json` (`569cd8a4d521dc5f`)*

0 comments on commit 2875d32

Please sign in to comment.