From 711fa42621baf2c65158264f21987338d035f232 Mon Sep 17 00:00:00 2001 From: Niko PLP Date: Fri, 30 Aug 2024 14:41:19 +0300 Subject: [PATCH] small fix and doc changes --- ng-app/src/store.ts | 12 ++++++------ ng-net/src/app_protocol.rs | 14 ++++++++------ ng-net/src/types.rs | 4 ++-- ng-repo/src/types.rs | 7 +++---- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/ng-app/src/store.ts b/ng-app/src/store.ts index 34ca089..e220f55 100644 --- a/ng-app/src/store.ts +++ b/ng-app/src/store.ts @@ -27,12 +27,12 @@ let retry_branches = {}; export const available_languages = { en: "English", de: "Deutsch", - fr: "Français", - ru: "Русский", - es: "Español", - it: "Italiano", - zh: "中文", - pt: "Português", + //fr: "Français", + //ru: "Русский", + //es: "Español", + //it: "Italiano", + //zh: "中文", + //pt: "Português", }; for (const lang of Object.keys(available_languages)) { diff --git a/ng-net/src/app_protocol.rs b/ng-net/src/app_protocol.rs index c5b147f..3275d5b 100644 --- a/ng-net/src/app_protocol.rs +++ b/ng-net/src/app_protocol.rs @@ -53,7 +53,6 @@ pub enum AppFetchContentV0 { Get, // does not subscribe. Subscribe, Update, - //Invoke, ReadQuery, WriteQuery, RdfDump, @@ -61,6 +60,7 @@ pub enum AppFetchContentV0 { SignatureStatus, SignatureRequest, SignedSnapshotRequest, + //Invoke, } impl AppFetchContentV0 { @@ -80,7 +80,7 @@ pub enum NgAccessV0 { #[serde(with = "serde_bytes")] ExtRequest(Vec), Key(BlockKey), - Inbox(Digest), + Inbox(PubKey), } #[derive(Clone, Debug, Serialize, Deserialize)] @@ -743,10 +743,10 @@ pub enum DocQuery { #[derive(Clone, Debug, Serialize, Deserialize)] pub struct GraphUpdate { - // serialization of Vec + // serialization of Vec #[serde(with = "serde_bytes")] pub inserts: Vec, - // serialization of Vec + // serialization of Vec #[serde(with = "serde_bytes")] pub removes: Vec, } @@ -830,12 +830,14 @@ pub enum AppRequestPayloadV0 { Query(DocQuery), Update(DocUpdate), AddFile(DocAddFile), - //RemoveFile + Delete(DocDelete), - //Invoke(InvokeArguments), + SmallFilePut(SmallFile), RandomAccessFilePut(String), // content_type (iana media type) RandomAccessFilePutChunk((u32, serde_bytes::ByteBuf)), // end the upload with an empty vec + //RemoveFile + //Invoke(InvokeArguments), } #[derive(Clone, Debug, Serialize, Deserialize)] diff --git a/ng-net/src/types.rs b/ng-net/src/types.rs index 2c01f14..d2732a0 100644 --- a/ng-net/src/types.rs +++ b/ng-net/src/types.rs @@ -2975,7 +2975,7 @@ impl OpenRepo { /// Request to pin a repo on the broker. /// -/// When client will disconnect, the subscriptions and publisherAdvert of the topics will be remain active on the broker. +/// When client will disconnect, the subscriptions and publisherAdvert of the topics will remain active on the broker. /// replied with a RepoOpened #[derive(Clone, Debug, Serialize, Deserialize)] pub struct PinRepoV0 { @@ -3329,7 +3329,7 @@ impl BlocksGet { /// and we need to default to using BlocksGet instead. #[derive(Clone, Debug, Serialize, Deserialize)] pub struct CommitGetV0 { - /// Block IDs to request + /// Commit ID to request pub id: ObjectId, /// Topic the commit is referenced from, if it is known by the requester. diff --git a/ng-repo/src/types.rs b/ng-repo/src/types.rs index 44539c5..02251b8 100644 --- a/ng-repo/src/types.rs +++ b/ng-repo/src/types.rs @@ -1669,7 +1669,7 @@ pub enum RemoveMember { V0(RemoveMemberV0), } -/// when a signing capability is removed, a new SignerSecretKeys should be added to wallet, with the removed key set to None +/// when a signing capability is removed, a new SignerCap should be committed to User branch, with the removed key set to None #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] pub struct SignerCap { pub repo: RepoId, @@ -2122,10 +2122,9 @@ pub enum RemoveFile { /// /// Contains a data structure /// computed from the commits at the specified head. -/// ACKS contains the head the snapshot was made from #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] pub struct SnapshotV0 { - // Branch heads the snapshot was made from, can be useful when shared outside and the commit_header_key is set to None. otherwise it is redundant to ACKS + // Branch heads the snapshot was made from pub heads: Vec, /// Reference to Object containing Snapshot data structure @@ -3005,7 +3004,7 @@ impl PeerId { /// Content of EventV0 /// /// Contains the objects of newly published Commit, its optional blocks, and optional FILES and their blocks. -/// If a block is not present in the Event, its ID should be present in block_ids and the block should be put on the emitting broker beforehand with BlocksPut. +/// If a block is not present in the Event, its ID should be present in file_ids and the block should be put on the emitting broker beforehand with BlocksPut. #[derive(Clone, Debug, Serialize, Deserialize)] pub struct EventContentV0 { /// Pub/sub topic