Skip to content

Commit f2caf73

Browse files
authored
Send remote share id on OCM share create (#209)
* send remote share id on ocm share create * Update proto.lock
1 parent 742abb3 commit f2caf73

File tree

2 files changed

+160
-10
lines changed

2 files changed

+160
-10
lines changed

cs3/sharing/ocm/v1beta1/resources.proto

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ message ReceivedShare {
9898
// Name of the shared resource.
9999
string name = 2;
100100
// REQUIRED.
101-
storage.provider.v1beta1.ResourceId resource_id = 3;
101+
// Identifier to identify the shared resource at the provider side.
102+
// This is unique per provider such that if the same resource is shared twice, this will not be repeated.
103+
// This correspond to the `providerId` in the OCM API specs.
104+
string remote_share_id = 3;
102105
// REQUIRED.
103106
// The receiver of the share, like a user, group ...
104107
storage.provider.v1beta1.Grantee grantee = 4;

proto.lock

Lines changed: 156 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,6 +2258,11 @@
22582258
"in_type": "cs3.sharing.ocm.v1beta1.GetOCMShareRequest",
22592259
"out_type": "cs3.sharing.ocm.v1beta1.GetOCMShareResponse"
22602260
},
2261+
{
2262+
"name": "GetOCMShareByToken",
2263+
"in_type": "cs3.sharing.ocm.v1beta1.GetOCMShareByTokenRequest",
2264+
"out_type": "cs3.sharing.ocm.v1beta1.GetOCMShareByTokenResponse"
2265+
},
22612266
{
22622267
"name": "ListOCMShares",
22632268
"in_type": "cs3.sharing.ocm.v1beta1.ListOCMSharesRequest",
@@ -2373,6 +2378,11 @@
23732378
"in_type": "cs3.ocm.invite.v1beta1.GenerateInviteTokenRequest",
23742379
"out_type": "cs3.ocm.invite.v1beta1.GenerateInviteTokenResponse"
23752380
},
2381+
{
2382+
"name": "ListInviteTokens",
2383+
"in_type": "cs3.ocm.invite.v1beta1.ListInviteTokensRequest",
2384+
"out_type": "cs3.ocm.invite.v1beta1.ListInviteTokensResponse"
2385+
},
23762386
{
23772387
"name": "ForwardInvite",
23782388
"in_type": "cs3.ocm.invite.v1beta1.ForwardInviteRequest",
@@ -3553,16 +3563,16 @@
35533563
"path": "cs3/identity/user/v1beta1/resources.proto"
35543564
},
35553565
{
3556-
"path": "cs3/storage/provider/v1beta1/resources.proto"
3566+
"path": "cs3/rpc/v1beta1/status.proto"
35573567
},
35583568
{
3559-
"path": "cs3/rpc/v1beta1/status.proto"
3569+
"path": "cs3/sharing/ocm/v1beta1/resources.proto"
35603570
},
35613571
{
3562-
"path": "cs3/types/v1beta1/types.proto"
3572+
"path": "cs3/storage/provider/v1beta1/resources.proto"
35633573
},
35643574
{
3565-
"path": "cs3/sharing/ocm/v1beta1/resources.proto"
3575+
"path": "cs3/types/v1beta1/types.proto"
35663576
}
35673577
],
35683578
"package": {
@@ -3639,6 +3649,25 @@
36393649
}
36403650
]
36413651
},
3652+
{
3653+
"name": "ListInviteTokensRequest"
3654+
},
3655+
{
3656+
"name": "ListInviteTokensResponse",
3657+
"fields": [
3658+
{
3659+
"id": 1,
3660+
"name": "status",
3661+
"type": "cs3.rpc.v1beta1.Status"
3662+
},
3663+
{
3664+
"id": 2,
3665+
"name": "invite_tokens",
3666+
"type": "InviteToken",
3667+
"is_repeated": true
3668+
}
3669+
]
3670+
},
36423671
{
36433672
"name": "ForwardInviteRequest",
36443673
"fields": [
@@ -3820,6 +3849,11 @@
38203849
"in_type": "GenerateInviteTokenRequest",
38213850
"out_type": "GenerateInviteTokenResponse"
38223851
},
3852+
{
3853+
"name": "ListInviteTokens",
3854+
"in_type": "ListInviteTokensRequest",
3855+
"out_type": "ListInviteTokensResponse"
3856+
},
38233857
{
38243858
"name": "ForwardInvite",
38253859
"in_type": "ForwardInviteRequest",
@@ -4890,6 +4924,16 @@
48904924
"id": 3,
48914925
"name": "field",
48924926
"type": "UpdateField"
4927+
},
4928+
{
4929+
"id": 4,
4930+
"name": "update_mask",
4931+
"type": "google.protobuf.FieldMask"
4932+
},
4933+
{
4934+
"id": 5,
4935+
"name": "share",
4936+
"type": "Share"
48934937
}
48944938
],
48954939
"messages": [
@@ -5382,6 +5426,11 @@
53825426
"id": 8,
53835427
"name": "mtime",
53845428
"type": "cs3.types.v1beta1.Timestamp"
5429+
},
5430+
{
5431+
"id": 9,
5432+
"name": "expiration",
5433+
"type": "cs3.types.v1beta1.Timestamp"
53855434
}
53865435
]
53875436
},
@@ -5472,6 +5521,11 @@
54725521
"id": 2,
54735522
"name": "permissions",
54745523
"type": "SharePermissions"
5524+
},
5525+
{
5526+
"id": 3,
5527+
"name": "expiration",
5528+
"type": "cs3.types.v1beta1.Timestamp"
54755529
}
54765530
]
54775531
},
@@ -5591,6 +5645,14 @@
55915645
{
55925646
"name": "TYPE_DESCRIPTION",
55935647
"integer": 5
5648+
},
5649+
{
5650+
"name": "TYPE_NOTIFYUPLOADS",
5651+
"integer": 6
5652+
},
5653+
{
5654+
"name": "TYPE_NOTIFYUPLOADSEXTRARECIPIENTS",
5655+
"integer": 7
55945656
}
55955657
]
55965658
},
@@ -5643,6 +5705,16 @@
56435705
"id": 5,
56445706
"name": "internal",
56455707
"type": "bool"
5708+
},
5709+
{
5710+
"id": 6,
5711+
"name": "notify_uploads",
5712+
"type": "bool"
5713+
},
5714+
{
5715+
"id": 7,
5716+
"name": "notify_uploads_extra_recipients",
5717+
"type": "string"
56465718
}
56475719
]
56485720
},
@@ -5708,6 +5780,16 @@
57085780
"id": 6,
57095781
"name": "description",
57105782
"type": "string"
5783+
},
5784+
{
5785+
"id": 7,
5786+
"name": "notify_uploads",
5787+
"type": "bool"
5788+
},
5789+
{
5790+
"id": 8,
5791+
"name": "notify_uploads_extra_recipients",
5792+
"type": "string"
57115793
}
57125794
]
57135795
}
@@ -6109,6 +6191,16 @@
61096191
"id": 14,
61106192
"name": "description",
61116193
"type": "string"
6194+
},
6195+
{
6196+
"id": 15,
6197+
"name": "notify_uploads",
6198+
"type": "bool"
6199+
},
6200+
{
6201+
"id": 16,
6202+
"name": "notify_uploads_extra_recipients",
6203+
"type": "string"
61126204
}
61136205
]
61146206
},
@@ -6539,6 +6631,31 @@
65396631
}
65406632
]
65416633
},
6634+
{
6635+
"name": "GetOCMShareByTokenRequest",
6636+
"fields": [
6637+
{
6638+
"id": 1,
6639+
"name": "token",
6640+
"type": "string"
6641+
}
6642+
]
6643+
},
6644+
{
6645+
"name": "GetOCMShareByTokenResponse",
6646+
"fields": [
6647+
{
6648+
"id": 1,
6649+
"name": "status",
6650+
"type": "cs3.rpc.v1beta1.Status"
6651+
},
6652+
{
6653+
"id": 2,
6654+
"name": "share",
6655+
"type": "Share"
6656+
}
6657+
]
6658+
},
65426659
{
65436660
"name": "ListReceivedOCMSharesRequest",
65446661
"fields": [
@@ -6675,6 +6792,11 @@
66756792
"in_type": "GetOCMShareRequest",
66766793
"out_type": "GetOCMShareResponse"
66776794
},
6795+
{
6796+
"name": "GetOCMShareByToken",
6797+
"in_type": "GetOCMShareByTokenRequest",
6798+
"out_type": "GetOCMShareByTokenResponse"
6799+
},
66786800
{
66796801
"name": "ListOCMShares",
66806802
"in_type": "ListOCMSharesRequest",
@@ -6904,8 +7026,8 @@
69047026
},
69057027
{
69067028
"id": 3,
6907-
"name": "resource_id",
6908-
"type": "storage.provider.v1beta1.ResourceId"
7029+
"name": "remote_share_id",
7030+
"type": "string"
69097031
},
69107032
{
69117033
"id": 4,
@@ -6957,6 +7079,11 @@
69577079
"id": 13,
69587080
"name": "opaque",
69597081
"type": "cs3.types.v1beta1.Opaque"
7082+
},
7083+
{
7084+
"id": 14,
7085+
"name": "resource_type",
7086+
"type": "cs3.storage.provider.v1beta1.ResourceType"
69607087
}
69617088
]
69627089
},
@@ -7002,6 +7129,11 @@
70027129
"id": 2,
70037130
"name": "key",
70047131
"type": "ShareKey"
7132+
},
7133+
{
7134+
"id": 3,
7135+
"name": "token",
7136+
"type": "string"
70057137
}
70067138
]
70077139
},
@@ -7072,6 +7204,11 @@
70727204
"id": 1,
70737205
"name": "uri_template",
70747206
"type": "string"
7207+
},
7208+
{
7209+
"id": 2,
7210+
"name": "view_mode",
7211+
"type": "cs3.app.provider.v1beta1.ViewMode"
70757212
}
70767213
]
70777214
},
@@ -7145,6 +7282,9 @@
71457282
}
71467283
],
71477284
"imports": [
7285+
{
7286+
"path": "cs3/app/provider/v1beta1/resources.proto"
7287+
},
71487288
{
71497289
"path": "cs3/identity/user/v1beta1/resources.proto"
71507290
},
@@ -7153,9 +7293,6 @@
71537293
},
71547294
{
71557295
"path": "cs3/types/v1beta1/types.proto"
7156-
},
7157-
{
7158-
"path": "cs3/app/provider/v1beta1/resources.proto"
71597296
}
71607297
],
71617298
"package": {
@@ -8553,6 +8690,11 @@
85538690
"id": 1,
85548691
"name": "opaque",
85558692
"type": "cs3.types.v1beta1.Opaque"
8693+
},
8694+
{
8695+
"id": 2,
8696+
"name": "quota",
8697+
"type": "Quota"
85568698
}
85578699
]
85588700
},
@@ -9457,6 +9599,11 @@
94579599
"id": 3,
94589600
"name": "creator",
94599601
"type": "cs3.identity.user.v1beta1.UserId"
9602+
},
9603+
{
9604+
"id": 4,
9605+
"name": "expiration",
9606+
"type": "cs3.types.v1beta1.Timestamp"
94609607
}
94619608
]
94629609
},

0 commit comments

Comments
 (0)