diff --git a/cs3/app/provider/v1beta1/provider_api.proto b/cs3/app/provider/v1beta1/provider_api.proto index 8b75163a..dc8c9e8d 100644 --- a/cs3/app/provider/v1beta1/provider_api.proto +++ b/cs3/app/provider/v1beta1/provider_api.proto @@ -52,7 +52,7 @@ import "cs3/types/v1beta1/types.proto"; // Any method MAY return UNKNOWN. // Any method MAY return UNAUTHENTICATED. service ProviderAPI { - // Returns the iframe url + // Returns the App provider URL // MUST return CODE_NOT_FOUND if the resource does not exist. rpc OpenFileInAppProvider(OpenFileInAppProviderRequest) returns (OpenFileInAppProviderResponse); } @@ -62,19 +62,8 @@ message OpenFileInAppProviderRequest { // 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 ResourceId - // when a call to the WOPI server is to be issued. - storage.provider.v1beta1.Reference ref = 2; - // REQUIRED. - // The access token this application provider will use when contacting - // the storage provider to read and write. - // Service implementors MUST make sure that the access token only grants - // access to the requested resource. - // Service implementors should use a ResourceId rather than a filename to grant access, as - // ResourceIds MUST NOT change when a resource is renamed. - // The access token MUST be short-lived. - // TODO(labkode): investigate token derivation techniques. - string access_token = 3; + // The resourceInfo to be opened. The gateway grpc message has a ref instead. + storage.provider.v1beta1.ResourceInfo resource_info = 2; // REQUIRED. // View mode. enum ViewMode { @@ -86,7 +75,17 @@ message OpenFileInAppProviderRequest { // The file can be downloaded and updated. VIEW_MODE_READ_WRITE = 3; } - ViewMode view_mode = 4; + ViewMode view_mode = 3; + // REQUIRED. + // The access token this application provider will use when contacting + // the storage provider to read and write. + // Service implementors MUST make sure that the access token only grants + // access to the requested resource. + // Service implementors should use a ResourceId rather than a filename to grant access, as + // ResourceIds MUST NOT change when a resource is renamed. + // The access token MUST be short-lived. + // TODO(labkode): investigate token derivation techniques. + string access_token = 4; } message OpenFileInAppProviderResponse { @@ -98,7 +97,6 @@ message OpenFileInAppProviderResponse { cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The url that user agents will render to clients. - // Usually the rendering happens by using HTML iframes, - // at least, Office 365, Collabora, OnlyOffice do like that. + // Usually the rendering happens by using HTML iframes or in separate browser tabs. string app_provider_url = 3; } diff --git a/cs3/gateway/v1beta1/gateway_api.proto b/cs3/gateway/v1beta1/gateway_api.proto index 87771bba..0e486338 100644 --- a/cs3/gateway/v1beta1/gateway_api.proto +++ b/cs3/gateway/v1beta1/gateway_api.proto @@ -152,8 +152,8 @@ service GatewayAPI { // ************************ APP PROVIDER ********************/ // *****************************************************************/ - // Returns the iframe url from the WOPI server. The iframe url will let you open the document in the correct online document editor. - rpc OpenFileInAppProvider(cs3.app.provider.v1beta1.OpenFileInAppProviderRequest) returns (cs3.app.provider.v1beta1.OpenFileInAppProviderResponse); + // Returns the App provider URL, which lets the user open a file in the correct online document editor. + rpc OpenFileInAppProvider(OpenFileInAppProviderRequest) returns (cs3.app.provider.v1beta1.OpenFileInAppProviderResponse); // *****************************************************************/ // ************************ USER SHARE PROVIDER ********************/ // *****************************************************************/ @@ -488,3 +488,25 @@ message ListAuthProvidersResponse { // TODO(labkode): maybe add description? repeated string types = 3; } + +message OpenFileInAppProviderRequest { + // 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 file can be opened but not downloaded. + VIEW_MODE_VIEW_ONLY = 1; + // The file can be downloaded. + VIEW_MODE_READ_ONLY = 2; + // The file can be downloaded and updated. + VIEW_MODE_READ_WRITE = 3; + } + ViewMode view_mode = 3; +} diff --git a/docs/index.html b/docs/index.html index 3dd3dee5..c2aa7909 100644 --- a/docs/index.html +++ b/docs/index.html @@ -210,6 +210,10 @@
Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
ref | +cs3.storage.provider.v1beta1.Reference | ++ | 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) |
+
view_mode | +OpenFileInAppProviderRequest.ViewMode | ++ |
|
+
REQUIRED.
View mode.
+Name | Number | Description |
VIEW_MODE_INVALID | +0 | ++ |
VIEW_MODE_VIEW_ONLY | +1 | +The file can be opened but not downloaded. |
+
VIEW_MODE_READ_ONLY | +2 | +The file can be downloaded. |
+
VIEW_MODE_READ_WRITE | +3 | +The file can be downloaded and updated. |
+
Returns the iframe url from the WOPI server. The iframe url will let you open the document in the correct online document editor. +
Returns the App provider URL, which lets the user open a file in the correct online document editor. *****************************************************************/ ************************ USER SHARE PROVIDER ********************/ @@ -3184,12 +3268,18 @@
REQUIRED. -The resource reference. If a path is given, it will be resolved via Stat() to a ResourceId -when a call to the WOPI server is to be issued.
REQUIRED. The url that user agents will render to clients. -Usually the rendering happens by using HTML iframes, -at least, Office 365, Collabora, OnlyOffice do like that.
Returns the iframe url +
Returns the App provider URL MUST return CODE_NOT_FOUND if the resource does not exist.