From f2caf73791bffe2557ed98a647b67cd9cfd458c5 Mon Sep 17 00:00:00 2001 From: Gianmaria Del Monte <39946305+gmgigi96@users.noreply.github.com> Date: Mon, 8 May 2023 15:24:59 +0200 Subject: [PATCH] Send remote share id on OCM share create (#209) * send remote share id on ocm share create * Update proto.lock --- cs3/sharing/ocm/v1beta1/resources.proto | 5 +- proto.lock | 165 ++++++++++++++++++++++-- 2 files changed, 160 insertions(+), 10 deletions(-) diff --git a/cs3/sharing/ocm/v1beta1/resources.proto b/cs3/sharing/ocm/v1beta1/resources.proto index 58f934d..cad5dc9 100644 --- a/cs3/sharing/ocm/v1beta1/resources.proto +++ b/cs3/sharing/ocm/v1beta1/resources.proto @@ -98,7 +98,10 @@ message ReceivedShare { // Name of the shared resource. string name = 2; // REQUIRED. - storage.provider.v1beta1.ResourceId resource_id = 3; + // Identifier to identify the shared resource at the provider side. + // This is unique per provider such that if the same resource is shared twice, this will not be repeated. + // This correspond to the `providerId` in the OCM API specs. + string remote_share_id = 3; // REQUIRED. // The receiver of the share, like a user, group ... storage.provider.v1beta1.Grantee grantee = 4; diff --git a/proto.lock b/proto.lock index 6be96b6..a322648 100644 --- a/proto.lock +++ b/proto.lock @@ -2258,6 +2258,11 @@ "in_type": "cs3.sharing.ocm.v1beta1.GetOCMShareRequest", "out_type": "cs3.sharing.ocm.v1beta1.GetOCMShareResponse" }, + { + "name": "GetOCMShareByToken", + "in_type": "cs3.sharing.ocm.v1beta1.GetOCMShareByTokenRequest", + "out_type": "cs3.sharing.ocm.v1beta1.GetOCMShareByTokenResponse" + }, { "name": "ListOCMShares", "in_type": "cs3.sharing.ocm.v1beta1.ListOCMSharesRequest", @@ -2373,6 +2378,11 @@ "in_type": "cs3.ocm.invite.v1beta1.GenerateInviteTokenRequest", "out_type": "cs3.ocm.invite.v1beta1.GenerateInviteTokenResponse" }, + { + "name": "ListInviteTokens", + "in_type": "cs3.ocm.invite.v1beta1.ListInviteTokensRequest", + "out_type": "cs3.ocm.invite.v1beta1.ListInviteTokensResponse" + }, { "name": "ForwardInvite", "in_type": "cs3.ocm.invite.v1beta1.ForwardInviteRequest", @@ -3553,16 +3563,16 @@ "path": "cs3/identity/user/v1beta1/resources.proto" }, { - "path": "cs3/storage/provider/v1beta1/resources.proto" + "path": "cs3/rpc/v1beta1/status.proto" }, { - "path": "cs3/rpc/v1beta1/status.proto" + "path": "cs3/sharing/ocm/v1beta1/resources.proto" }, { - "path": "cs3/types/v1beta1/types.proto" + "path": "cs3/storage/provider/v1beta1/resources.proto" }, { - "path": "cs3/sharing/ocm/v1beta1/resources.proto" + "path": "cs3/types/v1beta1/types.proto" } ], "package": { @@ -3639,6 +3649,25 @@ } ] }, + { + "name": "ListInviteTokensRequest" + }, + { + "name": "ListInviteTokensResponse", + "fields": [ + { + "id": 1, + "name": "status", + "type": "cs3.rpc.v1beta1.Status" + }, + { + "id": 2, + "name": "invite_tokens", + "type": "InviteToken", + "is_repeated": true + } + ] + }, { "name": "ForwardInviteRequest", "fields": [ @@ -3820,6 +3849,11 @@ "in_type": "GenerateInviteTokenRequest", "out_type": "GenerateInviteTokenResponse" }, + { + "name": "ListInviteTokens", + "in_type": "ListInviteTokensRequest", + "out_type": "ListInviteTokensResponse" + }, { "name": "ForwardInvite", "in_type": "ForwardInviteRequest", @@ -4890,6 +4924,16 @@ "id": 3, "name": "field", "type": "UpdateField" + }, + { + "id": 4, + "name": "update_mask", + "type": "google.protobuf.FieldMask" + }, + { + "id": 5, + "name": "share", + "type": "Share" } ], "messages": [ @@ -5382,6 +5426,11 @@ "id": 8, "name": "mtime", "type": "cs3.types.v1beta1.Timestamp" + }, + { + "id": 9, + "name": "expiration", + "type": "cs3.types.v1beta1.Timestamp" } ] }, @@ -5472,6 +5521,11 @@ "id": 2, "name": "permissions", "type": "SharePermissions" + }, + { + "id": 3, + "name": "expiration", + "type": "cs3.types.v1beta1.Timestamp" } ] }, @@ -5591,6 +5645,14 @@ { "name": "TYPE_DESCRIPTION", "integer": 5 + }, + { + "name": "TYPE_NOTIFYUPLOADS", + "integer": 6 + }, + { + "name": "TYPE_NOTIFYUPLOADSEXTRARECIPIENTS", + "integer": 7 } ] }, @@ -5643,6 +5705,16 @@ "id": 5, "name": "internal", "type": "bool" + }, + { + "id": 6, + "name": "notify_uploads", + "type": "bool" + }, + { + "id": 7, + "name": "notify_uploads_extra_recipients", + "type": "string" } ] }, @@ -5708,6 +5780,16 @@ "id": 6, "name": "description", "type": "string" + }, + { + "id": 7, + "name": "notify_uploads", + "type": "bool" + }, + { + "id": 8, + "name": "notify_uploads_extra_recipients", + "type": "string" } ] } @@ -6109,6 +6191,16 @@ "id": 14, "name": "description", "type": "string" + }, + { + "id": 15, + "name": "notify_uploads", + "type": "bool" + }, + { + "id": 16, + "name": "notify_uploads_extra_recipients", + "type": "string" } ] }, @@ -6539,6 +6631,31 @@ } ] }, + { + "name": "GetOCMShareByTokenRequest", + "fields": [ + { + "id": 1, + "name": "token", + "type": "string" + } + ] + }, + { + "name": "GetOCMShareByTokenResponse", + "fields": [ + { + "id": 1, + "name": "status", + "type": "cs3.rpc.v1beta1.Status" + }, + { + "id": 2, + "name": "share", + "type": "Share" + } + ] + }, { "name": "ListReceivedOCMSharesRequest", "fields": [ @@ -6675,6 +6792,11 @@ "in_type": "GetOCMShareRequest", "out_type": "GetOCMShareResponse" }, + { + "name": "GetOCMShareByToken", + "in_type": "GetOCMShareByTokenRequest", + "out_type": "GetOCMShareByTokenResponse" + }, { "name": "ListOCMShares", "in_type": "ListOCMSharesRequest", @@ -6904,8 +7026,8 @@ }, { "id": 3, - "name": "resource_id", - "type": "storage.provider.v1beta1.ResourceId" + "name": "remote_share_id", + "type": "string" }, { "id": 4, @@ -6957,6 +7079,11 @@ "id": 13, "name": "opaque", "type": "cs3.types.v1beta1.Opaque" + }, + { + "id": 14, + "name": "resource_type", + "type": "cs3.storage.provider.v1beta1.ResourceType" } ] }, @@ -7002,6 +7129,11 @@ "id": 2, "name": "key", "type": "ShareKey" + }, + { + "id": 3, + "name": "token", + "type": "string" } ] }, @@ -7072,6 +7204,11 @@ "id": 1, "name": "uri_template", "type": "string" + }, + { + "id": 2, + "name": "view_mode", + "type": "cs3.app.provider.v1beta1.ViewMode" } ] }, @@ -7145,6 +7282,9 @@ } ], "imports": [ + { + "path": "cs3/app/provider/v1beta1/resources.proto" + }, { "path": "cs3/identity/user/v1beta1/resources.proto" }, @@ -7153,9 +7293,6 @@ }, { "path": "cs3/types/v1beta1/types.proto" - }, - { - "path": "cs3/app/provider/v1beta1/resources.proto" } ], "package": { @@ -8553,6 +8690,11 @@ "id": 1, "name": "opaque", "type": "cs3.types.v1beta1.Opaque" + }, + { + "id": 2, + "name": "quota", + "type": "Quota" } ] }, @@ -9457,6 +9599,11 @@ "id": 3, "name": "creator", "type": "cs3.identity.user.v1beta1.UserId" + }, + { + "id": 4, + "name": "expiration", + "type": "cs3.types.v1beta1.Timestamp" } ] },