diff --git a/cs3/app/provider/v1beta1/provider_api.proto b/cs3/app/provider/v1beta1/provider_api.proto index 6eea2d4d..94115091 100644 --- a/cs3/app/provider/v1beta1/provider_api.proto +++ b/cs3/app/provider/v1beta1/provider_api.proto @@ -53,11 +53,39 @@ import "cs3/types/v1beta1/types.proto"; // Any method MAY return UNKNOWN. // Any method MAY return UNAUTHENTICATED. service ProviderAPI { - // Returns the App provider URL + // Creates a new file to be opened by an app. The new file MAY be either + // empty or generated out of a template if the AppProvider has such capability. + rpc CreateFileForApp(CreateFileForAppRequest) returns (CreateFileForAppResponse); + // Returns the App URL and all necessary info to open a resource in an online editor. // MUST return CODE_NOT_FOUND if the resource does not exist. rpc OpenInApp(OpenInAppRequest) returns (OpenInAppResponse); } + +message CreateFileForAppRequest { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. + // The target container where the file has to be created. + cs3.types.v1beta1.Reference ref = 2; + // REQUIRED. + // The file name of the created file. + string filename = 2; + } + + message CreateFileForAppResponse { + // REQUIRED. + // The response status. + cs3.rpc.v1beta1.Status status = 1; + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 2; + // REQUIRED. + // The resourceInfo of the file that was created. + storage.provider.v1beta1.ResourceInfo resource_info = 3; + } + message OpenInAppRequest { // OPTIONAL. // Opaque information. diff --git a/cs3/gateway/v1beta1/gateway_api.proto b/cs3/gateway/v1beta1/gateway_api.proto index bb0238aa..7e893af8 100644 --- a/cs3/gateway/v1beta1/gateway_api.proto +++ b/cs3/gateway/v1beta1/gateway_api.proto @@ -179,7 +179,11 @@ service GatewayAPI { // ************************ APP PROVIDER ********************/ // *****************************************************************/ - // Returns the App provider URL, which allows the user to open a resource in an online editor. + // Creates a new file to be opened by an app. The new file MAY be either + // empty or generated out of a template if the AppProvider has such capability. + rpc CreateFileForApp(cs3.app.provider.v1beta1.CreateFileForAppRequest) returns (cs3.app.provider.v1beta1.CreateFileForAppResponse); + // Returns the App URL and all necessary info to open a resource in an online editor. + // MUST return CODE_NOT_FOUND if the resource does not exist. rpc OpenInApp(OpenInAppRequest) returns (cs3.app.provider.v1beta1.OpenInAppResponse); // *****************************************************************/ // ************************ USER SHARE PROVIDER ********************/