Skip to content

Commit

Permalink
Further to #121, added the relevant gateway API (#128)
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo Labrador <labkode@users.noreply.github.com>
  • Loading branch information
glpatcern and labkode authored May 27, 2021
1 parent e3ac6ae commit f4588ef
Show file tree
Hide file tree
Showing 2 changed files with 132 additions and 3 deletions.
31 changes: 30 additions & 1 deletion cs3/gateway/v1beta1/gateway_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ service GatewayAPI {
// ************************ APP PROVIDER ********************/
// *****************************************************************/

// Returns the App provider URL, which lets the user open a file in the correct online document editor.
// Returns the App provider URL, which allows the user to open a resource in an online editor.
rpc OpenInApp(OpenInAppRequest) returns (cs3.app.provider.v1beta1.OpenInAppResponse);
// Deprecated.
rpc OpenFileInAppProvider(OpenFileInAppProviderRequest) returns (cs3.app.provider.v1beta1.OpenFileInAppProviderResponse);
// *****************************************************************/
// ************************ USER SHARE PROVIDER ********************/
Expand Down Expand Up @@ -521,6 +523,33 @@ message ListAuthProvidersResponse {
repeated string types = 3;
}

message OpenInAppRequest {
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
// The resource reference. If a path is given, it will be resolved via Stat() to a ResourceInfo
// when a call to the WOPI server is to be issued (cf. the provider grpc message)
storage.provider.v1beta1.Reference ref = 2;
// REQUIRED.
// View mode.
enum ViewMode {
VIEW_MODE_INVALID = 0;
// The resource can be opened but not downloaded.
VIEW_MODE_VIEW_ONLY = 1;
// The resource can be downloaded.
VIEW_MODE_READ_ONLY = 2;
// The resource can be downloaded and updated.
VIEW_MODE_READ_WRITE = 3;
}
ViewMode view_mode = 3;
// OPTIONAL.
// The application to be used to open the resource. Defaults to the primary application
// registered for the mime type of the given resource.
string app = 4;
}

// Deprecated
message OpenFileInAppProviderRequest {
// OPTIONAL.
// Opaque information.
Expand Down
104 changes: 102 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ <h2>Table of Contents</h2>
<a href="#cs3.gateway.v1beta1.OpenFileInAppProviderRequest"><span class="badge">M</span>OpenFileInAppProviderRequest</a>
</li>

<li>
<a href="#cs3.gateway.v1beta1.OpenInAppRequest"><span class="badge">M</span>OpenInAppRequest</a>
</li>

<li>
<a href="#cs3.gateway.v1beta1.PurgeRecycleRequest"><span class="badge">M</span>PurgeRecycleRequest</a>
</li>
Expand All @@ -231,6 +235,10 @@ <h2>Table of Contents</h2>
<a href="#cs3.gateway.v1beta1.OpenFileInAppProviderRequest.ViewMode"><span class="badge">E</span>OpenFileInAppProviderRequest.ViewMode</a>
</li>

<li>
<a href="#cs3.gateway.v1beta1.OpenInAppRequest.ViewMode"><span class="badge">E</span>OpenInAppRequest.ViewMode</a>
</li>



<li>
Expand Down Expand Up @@ -2259,7 +2267,7 @@ <h3 id="cs3.gateway.v1beta1.ListRecycleStreamRequest">ListRecycleStreamRequest</


<h3 id="cs3.gateway.v1beta1.OpenFileInAppProviderRequest">OpenFileInAppProviderRequest</h3>
<p></p>
<p>Deprecated</p>


<table class="field-table">
Expand Down Expand Up @@ -2299,6 +2307,56 @@ <h3 id="cs3.gateway.v1beta1.OpenFileInAppProviderRequest">OpenFileInAppProviderR



<h3 id="cs3.gateway.v1beta1.OpenInAppRequest">OpenInAppRequest</h3>
<p></p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>opaque</td>
<td><a href="#cs3.types.v1beta1.Opaque">cs3.types.v1beta1.Opaque</a></td>
<td></td>
<td><p>OPTIONAL.
Opaque information. </p></td>
</tr>

<tr>
<td>ref</td>
<td><a href="#cs3.storage.provider.v1beta1.Reference">cs3.storage.provider.v1beta1.Reference</a></td>
<td></td>
<td><p>REQUIRED.
The resource reference. If a path is given, it will be resolved via Stat() to a ResourceInfo
when a call to the WOPI server is to be issued (cf. the provider grpc message) </p></td>
</tr>

<tr>
<td>view_mode</td>
<td><a href="#cs3.gateway.v1beta1.OpenInAppRequest.ViewMode">OpenInAppRequest.ViewMode</a></td>
<td></td>
<td><p> </p></td>
</tr>

<tr>
<td>app</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>OPTIONAL.
The application to be used to open the resource. Defaults to the primary application
registered for the mime type of the given resource. </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.gateway.v1beta1.PurgeRecycleRequest">PurgeRecycleRequest</h3>
<p></p>

Expand Down Expand Up @@ -2443,6 +2501,41 @@ <h3 id="cs3.gateway.v1beta1.OpenFileInAppProviderRequest.ViewMode">OpenFileInApp
</tbody>
</table>

<h3 id="cs3.gateway.v1beta1.OpenInAppRequest.ViewMode">OpenInAppRequest.ViewMode</h3>
<p>REQUIRED.</p><p>View mode.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>VIEW_MODE_INVALID</td>
<td>0</td>
<td><p></p></td>
</tr>

<tr>
<td>VIEW_MODE_VIEW_ONLY</td>
<td>1</td>
<td><p>The resource can be opened but not downloaded.</p></td>
</tr>

<tr>
<td>VIEW_MODE_READ_ONLY</td>
<td>2</td>
<td><p>The resource can be downloaded.</p></td>
</tr>

<tr>
<td>VIEW_MODE_READ_WRITE</td>
<td>3</td>
<td><p>The resource can be downloaded and updated.</p></td>
</tr>

</tbody>
</table>




Expand Down Expand Up @@ -2713,11 +2806,18 @@ <h3 id="cs3.gateway.v1beta1.GatewayAPI">GatewayAPI</h3>
*****************************************************************/</p></td>
</tr>

<tr>
<td>OpenInApp</td>
<td><a href="#cs3.gateway.v1beta1.OpenInAppRequest">OpenInAppRequest</a></td>
<td><a href="#cs3.app.provider.v1beta1.OpenInAppResponse">.cs3.app.provider.v1beta1.OpenInAppResponse</a></td>
<td><p>Returns the App provider URL, which allows the user to open a resource in an online editor.</p></td>
</tr>

<tr>
<td>OpenFileInAppProvider</td>
<td><a href="#cs3.gateway.v1beta1.OpenFileInAppProviderRequest">OpenFileInAppProviderRequest</a></td>
<td><a href="#cs3.app.provider.v1beta1.OpenFileInAppProviderResponse">.cs3.app.provider.v1beta1.OpenFileInAppProviderResponse</a></td>
<td><p>Returns the App provider URL, which lets the user open a file in the correct online document editor.
<td><p>Deprecated.

*****************************************************************/
************************ USER SHARE PROVIDER ********************/
Expand Down

0 comments on commit f4588ef

Please sign in to comment.