diff --git a/cs3/app/provider/v1beta1/provider_api.proto b/cs3/app/provider/v1beta1/provider_api.proto index e5138d54..6eea2d4d 100644 --- a/cs3/app/provider/v1beta1/provider_api.proto +++ b/cs3/app/provider/v1beta1/provider_api.proto @@ -28,6 +28,7 @@ option java_package = "com.cs3.app.provider.v1beta1"; option objc_class_prefix = "CAP"; option php_namespace = "Cs3\\App\\Provider\\V1Beta1"; +import "cs3/app/provider/v1beta1/resources.proto"; import "cs3/rpc/v1beta1/status.proto"; import "cs3/storage/provider/v1beta1/resources.proto"; import "cs3/types/v1beta1/types.proto"; @@ -98,5 +99,5 @@ message OpenInAppResponse { // REQUIRED. // The url that user agents will render to clients. // Usually the rendering happens by using HTML iframes or in separate browser tabs. - string app_url = 3; + OpenInAppURL app_url = 3; } diff --git a/cs3/app/provider/v1beta1/resources.proto b/cs3/app/provider/v1beta1/resources.proto new file mode 100644 index 00000000..b27901d8 --- /dev/null +++ b/cs3/app/provider/v1beta1/resources.proto @@ -0,0 +1,47 @@ +// Copyright 2018-2019 CERN +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// In applying this license, CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +syntax = "proto3"; + +package cs3.app.provider.v1beta1; + +option csharp_namespace = "Cs3.App.Provider.V1Beta1"; +option go_package = "providerv1beta1"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.cs3.app.provider.v1beta1"; +option objc_class_prefix = "CAP"; +option php_namespace = "Cs3\\App\\Provider\\V1Beta1"; + +// Represents the information for the app URL to be called by the clients. +message OpenInAppURL { + // REQUIRED. + // The URL that clients will perform requests to. + string app_url = 1; + // REQUIRED. + // The method for the request to be made. + // Only GET and POST are supported. + string method = 2; + // OPTIONAL. + // The form parameters which have to be passed along with the request. + // These are sent only if the method is 'POST'. + map form_parameters = 3; + // OPTIONAL. + // The headers to be added to the request. + map headers = 4; +} diff --git a/cs3/app/registry/v1beta1/registry_api.proto b/cs3/app/registry/v1beta1/registry_api.proto index 6aa89efb..6deabf1b 100644 --- a/cs3/app/registry/v1beta1/registry_api.proto +++ b/cs3/app/registry/v1beta1/registry_api.proto @@ -137,7 +137,7 @@ message ListSupportedMimeTypesResponse { cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The list of supported mime types with the apps which they can be opened with. - map mime_types = 3; + map mime_types = 3; } message GetDefaultAppProviderForMimeTypeRequest { diff --git a/cs3/app/registry/v1beta1/resources.proto b/cs3/app/registry/v1beta1/resources.proto index 9c62d466..b80d7b0a 100644 --- a/cs3/app/registry/v1beta1/resources.proto +++ b/cs3/app/registry/v1beta1/resources.proto @@ -50,9 +50,15 @@ message ProviderInfo { // offered by the app provider. Meant to be read // by humans. string description = 5; + // OPTIONAL. + // A URI to a static asset which represents the app icon. + string icon = 6; + // OPTIONAL. + // Whether the app can be opened only on desktop + bool desktop_only = 7; } -// Holds a list of app names which can open a particular mime type. -message AppProviderNameList { - repeated string app_provider_name = 1; +// Holds a list of app providers which can open a particular mime type. +message AppProviderList { + repeated ProviderInfo app_providers = 1; } diff --git a/docs/index.html b/docs/index.html index 13da95b6..a400e511 100644 --- a/docs/index.html +++ b/docs/index.html @@ -515,6 +515,29 @@

Table of Contents

+
  • + cs3/app/provider/v1beta1/resources.proto + +
  • + +
  • cs3/app/registry/v1beta1/registry_api.proto
      @@ -587,7 +610,7 @@

      Table of Contents

      • - MAppProviderNameList + MAppProviderList
      • @@ -5055,7 +5078,7 @@

        OpenInAppResponse

        app_url - string + OpenInAppURL

        REQUIRED. The url that user agents will render to clients. @@ -5132,6 +5155,133 @@

        ProviderAPI

        +
        +

        cs3/app/provider/v1beta1/resources.proto

        Top +
        +

        + + +

        OpenInAppURL

        +

        Represents the information for the app URL to be called by the clients.

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        FieldTypeLabelDescription
        app_urlstring

        REQUIRED. +The URL that clients will perform requests to.

        methodstring

        REQUIRED. +The method for the request to be made. +Only GET and POST are supported.

        form_parametersOpenInAppURL.FormParametersEntryrepeated

        OPTIONAL. +The form parameters which have to be passed along with the request. +These are sent only if the method is 'POST'.

        headersOpenInAppURL.HeadersEntryrepeated

        OPTIONAL. +The headers to be added to the request.

        + + + + + +

        OpenInAppURL.FormParametersEntry

        +

        + + + + + + + + + + + + + + + + + + + + + + + +
        FieldTypeLabelDescription
        keystring

        valuestring

        + + + + + +

        OpenInAppURL.HeadersEntry

        +

        + + + + + + + + + + + + + + + + + + + + + + + +
        FieldTypeLabelDescription
        keystring

        valuestring

        + + + + + + + + + + + + +

        cs3/app/registry/v1beta1/registry_api.proto

        Top
        @@ -5503,7 +5653,7 @@

        value - AppProviderNameList + AppProviderList

        @@ -5658,8 +5808,8 @@

        cs3/app/registry/v1beta1/resou

        -

        AppProviderNameList

        -

        Holds a list of app names which can open a particular mime type.

        +

        AppProviderList

        +

        Holds a list of app providers which can open a particular mime type.

        @@ -5669,8 +5819,8 @@

        AppProviderNameList

        - - + + @@ -5735,6 +5885,22 @@

        ProviderInfo

        by humans.

        + + + + + + + + + + + + + +
        app_provider_namestringapp_providersProviderInfo repeated

        iconstring

        OPTIONAL. +A URI to a static asset which represents the app icon.

        desktop_onlybool

        OPTIONAL. +Whether the app can be opened only on desktop

        diff --git a/proto.lock b/proto.lock index 29711fe2..e4644342 100644 --- a/proto.lock +++ b/proto.lock @@ -416,7 +416,7 @@ { "id": 3, "name": "app_url", - "type": "string" + "type": "OpenInAppURL" } ] } @@ -434,6 +434,9 @@ } ], "imports": [ + { + "path": "cs3/app/provider/v1beta1/resources.proto" + }, { "path": "cs3/rpc/v1beta1/status.proto" }, @@ -479,6 +482,79 @@ ] } }, + { + "protopath": "cs3:/:app:/:provider:/:v1beta1:/:resources.proto", + "def": { + "messages": [ + { + "name": "OpenInAppURL", + "fields": [ + { + "id": 1, + "name": "app_url", + "type": "string" + }, + { + "id": 2, + "name": "method", + "type": "string" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 3, + "name": "form_parameters", + "type": "string" + } + }, + { + "key_type": "string", + "field": { + "id": 4, + "name": "headers", + "type": "string" + } + } + ] + } + ], + "package": { + "name": "cs3.app.provider.v1beta1" + }, + "options": [ + { + "name": "csharp_namespace", + "value": "Cs3.App.Provider.V1Beta1" + }, + { + "name": "go_package", + "value": "providerv1beta1" + }, + { + "name": "java_multiple_files", + "value": "true" + }, + { + "name": "java_outer_classname", + "value": "ResourcesProto" + }, + { + "name": "java_package", + "value": "com.cs3.app.provider.v1beta1" + }, + { + "name": "objc_class_prefix", + "value": "CAP" + }, + { + "name": "php_namespace", + "value": "Cs3\\\\App\\\\Provider\\\\V1Beta1" + } + ] + } + }, { "protopath": "cs3:/:app:/:registry:/:v1beta1:/:registry_api.proto", "def": { @@ -580,6 +656,41 @@ } ] }, + { + "name": "ListSupportedMimeTypesRequest", + "fields": [ + { + "id": 1, + "name": "opaque", + "type": "cs3.types.v1beta1.Opaque" + } + ] + }, + { + "name": "ListSupportedMimeTypesResponse", + "fields": [ + { + "id": 1, + "name": "status", + "type": "cs3.rpc.v1beta1.Status" + }, + { + "id": 2, + "name": "opaque", + "type": "cs3.types.v1beta1.Opaque" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 3, + "name": "mime_types", + "type": "AppProviderList" + } + } + ] + }, { "name": "GetDefaultAppProviderForMimeTypeRequest", "fields": [ @@ -670,6 +781,11 @@ "in_type": "ListAppProvidersRequest", "out_type": "ListAppProvidersResponse" }, + { + "name": "ListSupportedMimeTypes", + "in_type": "ListSupportedMimeTypesRequest", + "out_type": "ListSupportedMimeTypesResponse" + }, { "name": "GetDefaultAppProviderForMimeType", "in_type": "GetDefaultAppProviderForMimeTypeRequest", @@ -764,6 +880,27 @@ "id": 5, "name": "description", "type": "string" + }, + { + "id": 6, + "name": "icon", + "type": "string" + }, + { + "id": 7, + "name": "desktop_only", + "type": "bool" + } + ] + }, + { + "name": "AppProviderList", + "fields": [ + { + "id": 1, + "name": "app_providers", + "type": "ProviderInfo", + "is_repeated": true } ] } @@ -2128,6 +2265,11 @@ "in_type": "cs3.app.registry.v1beta1.ListAppProvidersRequest", "out_type": "cs3.app.registry.v1beta1.ListAppProvidersResponse" }, + { + "name": "ListSupportedMimeTypes", + "in_type": "cs3.app.registry.v1beta1.ListSupportedMimeTypesRequest", + "out_type": "cs3.app.registry.v1beta1.ListSupportedMimeTypesResponse" + }, { "name": "GetDefaultAppProviderForMimeType", "in_type": "cs3.app.registry.v1beta1.GetDefaultAppProviderForMimeTypeRequest", @@ -6523,6 +6665,41 @@ } ] }, + { + "name": "DenyGrantRequest", + "fields": [ + { + "id": 1, + "name": "opaque", + "type": "cs3.types.v1beta1.Opaque" + }, + { + "id": 2, + "name": "ref", + "type": "Reference" + }, + { + "id": 3, + "name": "grantee", + "type": "Grantee" + } + ] + }, + { + "name": "DenyGrantResponse", + "fields": [ + { + "id": 1, + "name": "status", + "type": "cs3.rpc.v1beta1.Status" + }, + { + "id": 2, + "name": "opaque", + "type": "cs3.types.v1beta1.Opaque" + } + ] + }, { "name": "CreateContainerRequest", "fields": [ @@ -7597,6 +7774,11 @@ "in_type": "DeleteRequest", "out_type": "DeleteResponse" }, + { + "name": "DenyGrant", + "in_type": "DenyGrantRequest", + "out_type": "DenyGrantResponse" + }, { "name": "GetPath", "in_type": "GetPathRequest", @@ -8110,6 +8292,11 @@ "id": 19, "name": "update_grant", "type": "bool" + }, + { + "id": 20, + "name": "deny_grant", + "type": "bool" } ] },