google-apps-script-type 0.1.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/apps/script/type/extension_point.proto
3
4
 
@@ -5,25 +6,32 @@ require 'google/protobuf'
5
6
 
6
7
  require 'google/protobuf/wrappers_pb'
7
8
 
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_file("google/apps/script/type/extension_point.proto", :syntax => :proto3) do
10
- add_message "google.apps.script.type.MenuItemExtensionPoint" do
11
- optional :run_function, :string, 1
12
- optional :label, :string, 2
13
- optional :logo_url, :string, 3
14
- end
15
- add_message "google.apps.script.type.HomepageExtensionPoint" do
16
- optional :run_function, :string, 1
17
- optional :enabled, :message, 2, "google.protobuf.BoolValue"
18
- end
19
- add_message "google.apps.script.type.UniversalActionExtensionPoint" do
20
- optional :label, :string, 1
21
- oneof :action_type do
22
- optional :open_link, :string, 2
23
- optional :run_function, :string, 3
24
- end
9
+
10
+ descriptor_data = "\n-google/apps/script/type/extension_point.proto\x12\x17google.apps.script.type\x1a\x1egoogle/protobuf/wrappers.proto\"O\n\x16MenuItemExtensionPoint\x12\x14\n\x0crun_function\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12\x10\n\x08logo_url\x18\x03 \x01(\t\"[\n\x16HomepageExtensionPoint\x12\x14\n\x0crun_function\x18\x01 \x01(\t\x12+\n\x07\x65nabled\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\"j\n\x1dUniversalActionExtensionPoint\x12\r\n\x05label\x18\x01 \x01(\t\x12\x13\n\topen_link\x18\x02 \x01(\tH\x00\x12\x16\n\x0crun_function\x18\x03 \x01(\tH\x00\x42\r\n\x0b\x61\x63tion_typeB\xa8\x01\n\x1b\x63om.google.apps.script.typeP\x01Z6google.golang.org/genproto/googleapis/apps/script/type\xaa\x02\x17Google.Apps.Script.Type\xca\x02\x17Google\\Apps\\Script\\Type\xea\x02\x1aGoogle::Apps::Script::Typeb\x06proto3"
11
+
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError => e
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ["google.protobuf.BoolValue", "google/protobuf/wrappers.proto"],
26
+ ]
27
+ imports.each do |type_name, expected_filename|
28
+ import_file = pool.lookup(type_name).file_descriptor
29
+ if import_file.name != expected_filename
30
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
25
31
  end
26
32
  end
33
+ warn "Each proto file must use a consistent fully-qualified name."
34
+ warn "This will become an error in the next major version."
27
35
  end
28
36
 
29
37
  module Google
@@ -37,3 +45,83 @@ module Google
37
45
  end
38
46
  end
39
47
  end
48
+
49
+ #### Source proto file: google/apps/script/type/extension_point.proto ####
50
+ #
51
+ # // Copyright 2020 Google LLC
52
+ # //
53
+ # // Licensed under the Apache License, Version 2.0 (the "License");
54
+ # // you may not use this file except in compliance with the License.
55
+ # // You may obtain a copy of the License at
56
+ # //
57
+ # // http://www.apache.org/licenses/LICENSE-2.0
58
+ # //
59
+ # // Unless required by applicable law or agreed to in writing, software
60
+ # // distributed under the License is distributed on an "AS IS" BASIS,
61
+ # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
62
+ # // See the License for the specific language governing permissions and
63
+ # // limitations under the License.
64
+ #
65
+ # syntax = "proto3";
66
+ #
67
+ # package google.apps.script.type;
68
+ #
69
+ # import "google/protobuf/wrappers.proto";
70
+ #
71
+ # option csharp_namespace = "Google.Apps.Script.Type";
72
+ # option go_package = "google.golang.org/genproto/googleapis/apps/script/type";
73
+ # option java_multiple_files = true;
74
+ # option java_package = "com.google.apps.script.type";
75
+ # option php_namespace = "Google\\Apps\\Script\\Type";
76
+ # option ruby_package = "Google::Apps::Script::Type";
77
+ #
78
+ # // Common Manifest protos for G Suite extension-point configuration.
79
+ #
80
+ # // Common format for declaring a menu item, or button, that appears within a
81
+ # // host app.
82
+ # message MenuItemExtensionPoint {
83
+ # // Required. The endpoint to execute when this extension point is
84
+ # // activated.
85
+ # string run_function = 1;
86
+ #
87
+ # // Required. User-visible text describing the action taken by activating this
88
+ # // extension point. For example, "Insert invoice".
89
+ # string label = 2;
90
+ #
91
+ # // The URL for the logo image shown in the add-on toolbar.
92
+ # //
93
+ # // If not set, defaults to the add-on's primary logo URL.
94
+ # string logo_url = 3;
95
+ # }
96
+ #
97
+ # // Common format for declaring an add-on's home-page view.
98
+ # message HomepageExtensionPoint {
99
+ # // Required. The endpoint to execute when this extension point is
100
+ # // activated.
101
+ # string run_function = 1;
102
+ #
103
+ # // Optional. If set to `false`, disable the home-page view in this context.
104
+ # //
105
+ # // Defaults to `true` if unset.
106
+ # //
107
+ # // If an add-ons custom home-page view is disabled, an autogenerated overview
108
+ # // card will be provided for users instead.
109
+ # google.protobuf.BoolValue enabled = 2;
110
+ # }
111
+ #
112
+ # // Format for declaring a universal action menu item extension point.
113
+ # message UniversalActionExtensionPoint {
114
+ # // Required. User-visible text describing the action taken by activating this
115
+ # // extension point, for example, "Add a new contact".
116
+ # string label = 1;
117
+ #
118
+ # // Required. The action type supported on a universal action menu item. It
119
+ # // could be either a link to open or an endpoint to execute.
120
+ # oneof action_type {
121
+ # // URL to be opened by the UniversalAction.
122
+ # string open_link = 2;
123
+ #
124
+ # // Endpoint to be run by the UniversalAction.
125
+ # string run_function = 3;
126
+ # }
127
+ # }
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/apps/script/type/gmail/gmail_addon_manifest.proto
3
4
 
@@ -6,40 +7,32 @@ require 'google/protobuf'
6
7
  require 'google/apps/script/type/addon_widget_set_pb'
7
8
  require 'google/apps/script/type/extension_point_pb'
8
9
 
9
- Google::Protobuf::DescriptorPool.generated_pool.build do
10
- add_file("google/apps/script/type/gmail/gmail_addon_manifest.proto", :syntax => :proto3) do
11
- add_message "google.apps.script.type.gmail.GmailAddOnManifest" do
12
- optional :homepage_trigger, :message, 14, "google.apps.script.type.HomepageExtensionPoint"
13
- repeated :contextual_triggers, :message, 3, "google.apps.script.type.gmail.ContextualTrigger"
14
- repeated :universal_actions, :message, 4, "google.apps.script.type.gmail.UniversalAction"
15
- optional :compose_trigger, :message, 12, "google.apps.script.type.gmail.ComposeTrigger"
16
- optional :authorization_check_function, :string, 7
17
- end
18
- add_message "google.apps.script.type.gmail.UniversalAction" do
19
- optional :text, :string, 1
20
- oneof :action_type do
21
- optional :open_link, :string, 2
22
- optional :run_function, :string, 3
23
- end
24
- end
25
- add_message "google.apps.script.type.gmail.ComposeTrigger" do
26
- repeated :actions, :message, 5, "google.apps.script.type.MenuItemExtensionPoint"
27
- optional :draft_access, :enum, 4, "google.apps.script.type.gmail.ComposeTrigger.DraftAccess"
28
- end
29
- add_enum "google.apps.script.type.gmail.ComposeTrigger.DraftAccess" do
30
- value :UNSPECIFIED, 0
31
- value :NONE, 1
32
- value :METADATA, 2
33
- end
34
- add_message "google.apps.script.type.gmail.ContextualTrigger" do
35
- optional :on_trigger_function, :string, 4
36
- oneof :trigger do
37
- optional :unconditional, :message, 1, "google.apps.script.type.gmail.UnconditionalTrigger"
38
- end
39
- end
40
- add_message "google.apps.script.type.gmail.UnconditionalTrigger" do
10
+
11
+ descriptor_data = "\n8google/apps/script/type/gmail/gmail_addon_manifest.proto\x12\x1dgoogle.apps.script.type.gmail\x1a.google/apps/script/type/addon_widget_set.proto\x1a-google/apps/script/type/extension_point.proto\"\xe7\x02\n\x12GmailAddOnManifest\x12I\n\x10homepage_trigger\x18\x0e \x01(\x0b\x32/.google.apps.script.type.HomepageExtensionPoint\x12M\n\x13\x63ontextual_triggers\x18\x03 \x03(\x0b\x32\x30.google.apps.script.type.gmail.ContextualTrigger\x12I\n\x11universal_actions\x18\x04 \x03(\x0b\x32..google.apps.script.type.gmail.UniversalAction\x12\x46\n\x0f\x63ompose_trigger\x18\x0c \x01(\x0b\x32-.google.apps.script.type.gmail.ComposeTrigger\x12$\n\x1c\x61uthorization_check_function\x18\x07 \x01(\t\"[\n\x0fUniversalAction\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x13\n\topen_link\x18\x02 \x01(\tH\x00\x12\x16\n\x0crun_function\x18\x03 \x01(\tH\x00\x42\r\n\x0b\x61\x63tion_type\"\xdb\x01\n\x0e\x43omposeTrigger\x12@\n\x07\x61\x63tions\x18\x05 \x03(\x0b\x32/.google.apps.script.type.MenuItemExtensionPoint\x12O\n\x0c\x64raft_access\x18\x04 \x01(\x0e\x32\x39.google.apps.script.type.gmail.ComposeTrigger.DraftAccess\"6\n\x0b\x44raftAccess\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x0c\n\x08METADATA\x10\x02\"\x89\x01\n\x11\x43ontextualTrigger\x12L\n\runconditional\x18\x01 \x01(\x0b\x32\x33.google.apps.script.type.gmail.UnconditionalTriggerH\x00\x12\x1b\n\x13on_trigger_function\x18\x04 \x01(\tB\t\n\x07trigger\"\x16\n\x14UnconditionalTriggerB\xe0\x01\n!com.google.apps.script.type.gmailB\x17GmailAddOnManifestProtoP\x01Z<google.golang.org/genproto/googleapis/apps/script/type/gmail\xaa\x02\x1dGoogle.Apps.Script.Type.Gmail\xca\x02\x1dGoogle\\Apps\\Script\\Type\\Gmail\xea\x02!Google::Apps::Script::Type::Gmailb\x06proto3"
12
+
13
+ pool = Google::Protobuf::DescriptorPool.generated_pool
14
+
15
+ begin
16
+ pool.add_serialized_file(descriptor_data)
17
+ rescue TypeError => e
18
+ # Compatibility code: will be removed in the next major version.
19
+ require 'google/protobuf/descriptor_pb'
20
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
21
+ parsed.clear_dependency
22
+ serialized = parsed.class.encode(parsed)
23
+ file = pool.add_serialized_file(serialized)
24
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
25
+ imports = [
26
+ ["google.apps.script.type.HomepageExtensionPoint", "google/apps/script/type/extension_point.proto"],
27
+ ]
28
+ imports.each do |type_name, expected_filename|
29
+ import_file = pool.lookup(type_name).file_descriptor
30
+ if import_file.name != expected_filename
31
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
41
32
  end
42
33
  end
34
+ warn "Each proto file must use a consistent fully-qualified name."
35
+ warn "This will become an error in the next major version."
43
36
  end
44
37
 
45
38
  module Google
@@ -58,3 +51,133 @@ module Google
58
51
  end
59
52
  end
60
53
  end
54
+
55
+ #### Source proto file: google/apps/script/type/gmail/gmail_addon_manifest.proto ####
56
+ #
57
+ # // Copyright 2020 Google LLC
58
+ # //
59
+ # // Licensed under the Apache License, Version 2.0 (the "License");
60
+ # // you may not use this file except in compliance with the License.
61
+ # // You may obtain a copy of the License at
62
+ # //
63
+ # // http://www.apache.org/licenses/LICENSE-2.0
64
+ # //
65
+ # // Unless required by applicable law or agreed to in writing, software
66
+ # // distributed under the License is distributed on an "AS IS" BASIS,
67
+ # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
68
+ # // See the License for the specific language governing permissions and
69
+ # // limitations under the License.
70
+ #
71
+ # syntax = "proto3";
72
+ #
73
+ # package google.apps.script.type.gmail;
74
+ #
75
+ # import "google/apps/script/type/addon_widget_set.proto";
76
+ # import "google/apps/script/type/extension_point.proto";
77
+ #
78
+ # option csharp_namespace = "Google.Apps.Script.Type.Gmail";
79
+ # option go_package = "google.golang.org/genproto/googleapis/apps/script/type/gmail";
80
+ # option java_multiple_files = true;
81
+ # option java_outer_classname = "GmailAddOnManifestProto";
82
+ # option java_package = "com.google.apps.script.type.gmail";
83
+ # option php_namespace = "Google\\Apps\\Script\\Type\\Gmail";
84
+ # option ruby_package = "Google::Apps::Script::Type::Gmail";
85
+ #
86
+ # // Properties customizing the appearance and execution of a Gmail add-on.
87
+ # message GmailAddOnManifest {
88
+ # // Defines an endpoint that will be executed in contexts that don't
89
+ # // match a declared contextual trigger. Any cards generated by this function
90
+ # // will always be available to the user, but may be eclipsed by contextual
91
+ # // content when this add-on declares more targeted triggers.
92
+ # //
93
+ # // If present, this overrides the configuration from
94
+ # // `addOns.common.homepageTrigger`.
95
+ # google.apps.script.type.HomepageExtensionPoint homepage_trigger = 14;
96
+ #
97
+ # // Defines the set of conditions that trigger the add-on.
98
+ # repeated ContextualTrigger contextual_triggers = 3;
99
+ #
100
+ # // Defines set of [universal
101
+ # // actions](/gmail/add-ons/how-tos/universal-actions) for the add-on. The user
102
+ # // triggers universal actions from the add-on toolbar menu.
103
+ # repeated UniversalAction universal_actions = 4;
104
+ #
105
+ # // Defines the compose time trigger for a compose time add-on. This is the
106
+ # // trigger that causes an add-on to take action when the user is composing an
107
+ # // email.
108
+ # // All compose time addons are required to have the
109
+ # // gmail.addons.current.action.compose scope even though it might not edit the
110
+ # // draft.
111
+ # ComposeTrigger compose_trigger = 12;
112
+ #
113
+ # // The name of an endpoint that verifies that the add-on has
114
+ # // all the required third-party authorizations, by probing the third-party
115
+ # // APIs. If the probe fails, the function should throw an exception to
116
+ # // initiate the authorization flow. This function is called before each
117
+ # // invocation of the add-on, in order to ensure a smooth user experience.
118
+ # string authorization_check_function = 7;
119
+ # }
120
+ #
121
+ # // An action that is always available in the add-on toolbar menu regardless of
122
+ # // message context.
123
+ # message UniversalAction {
124
+ # // Required. User-visible text describing the action, for example, "Add a new
125
+ # // contact."
126
+ # string text = 1;
127
+ #
128
+ # // The type of the action determines the behavior of Gmail when the user
129
+ # // invokes the action.
130
+ # oneof action_type {
131
+ # // A link that is opened by Gmail when the user triggers the action.
132
+ # string open_link = 2;
133
+ #
134
+ # // An endpoint that is called when the user triggers the
135
+ # // action. See the [universal actions
136
+ # // guide](/gmail/add-ons/how-tos/universal-actions) for details.
137
+ # string run_function = 3;
138
+ # }
139
+ # }
140
+ #
141
+ # // A trigger that activates when user is composing an email.
142
+ # message ComposeTrigger {
143
+ # // An enum defining the level of data access this compose trigger requires.
144
+ # enum DraftAccess {
145
+ # // Default value when nothing is set for DraftAccess.
146
+ # UNSPECIFIED = 0;
147
+ #
148
+ # // NONE means compose trigger won't be able to access any data of the draft
149
+ # // when a compose addon is triggered.
150
+ # NONE = 1;
151
+ #
152
+ # // METADATA gives compose trigger the permission to access the metadata of
153
+ # // the draft when a compose addon is triggered. This includes the audience
154
+ # // list (To/cc list) of a draft message.
155
+ # METADATA = 2;
156
+ # }
157
+ #
158
+ # // Defines the set of actions for compose time add-on. These are actions
159
+ # // that user can trigger on a compose time addon.
160
+ # repeated google.apps.script.type.MenuItemExtensionPoint actions = 5;
161
+ #
162
+ # // Define the level of data access when a compose time addon is triggered.
163
+ # DraftAccess draft_access = 4;
164
+ # }
165
+ #
166
+ # // Defines a trigger that fires when the open email meets a specific criteria.
167
+ # // When the trigger fires, it executes a specific endpoint, usually
168
+ # // in order to create new cards and update the UI.
169
+ # message ContextualTrigger {
170
+ # // The type of trigger determines the conditions Gmail uses to show the
171
+ # // add-on.
172
+ # oneof trigger {
173
+ # // UnconditionalTriggers are executed when any mail message is opened.
174
+ # UnconditionalTrigger unconditional = 1;
175
+ # }
176
+ #
177
+ # // Required. The name of the endpoint to call when a message matches the
178
+ # // trigger.
179
+ # string on_trigger_function = 4;
180
+ # }
181
+ #
182
+ # // A trigger that fires when any email message is opened.
183
+ # message UnconditionalTrigger {}
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/apps/script/type/script_manifest.proto
3
4
 
@@ -7,32 +8,34 @@ require 'google/apps/script/type/addon_widget_set_pb'
7
8
  require 'google/apps/script/type/extension_point_pb'
8
9
  require 'google/protobuf/struct_pb'
9
10
 
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_file("google/apps/script/type/script_manifest.proto", :syntax => :proto3) do
12
- add_message "google.apps.script.type.CommonAddOnManifest" do
13
- optional :name, :string, 1
14
- optional :logo_url, :string, 2
15
- optional :layout_properties, :message, 3, "google.apps.script.type.LayoutProperties"
16
- optional :add_on_widget_set, :message, 4, "google.apps.script.type.AddOnWidgetSet"
17
- optional :use_locale_from_app, :bool, 5
18
- optional :homepage_trigger, :message, 6, "google.apps.script.type.HomepageExtensionPoint"
19
- repeated :universal_actions, :message, 7, "google.apps.script.type.UniversalActionExtensionPoint"
20
- optional :open_link_url_prefixes, :message, 8, "google.protobuf.ListValue"
21
- end
22
- add_message "google.apps.script.type.LayoutProperties" do
23
- optional :primary_color, :string, 1
24
- optional :secondary_color, :string, 2
25
- end
26
- add_message "google.apps.script.type.HttpOptions" do
27
- optional :authorization_header, :enum, 1, "google.apps.script.type.HttpAuthorizationHeader"
28
- end
29
- add_enum "google.apps.script.type.HttpAuthorizationHeader" do
30
- value :HTTP_AUTHORIZATION_HEADER_UNSPECIFIED, 0
31
- value :SYSTEM_ID_TOKEN, 1
32
- value :USER_ID_TOKEN, 2
33
- value :NONE, 3
11
+
12
+ descriptor_data = "\n-google/apps/script/type/script_manifest.proto\x12\x17google.apps.script.type\x1a.google/apps/script/type/addon_widget_set.proto\x1a-google/apps/script/type/extension_point.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xb6\x03\n\x13\x43ommonAddOnManifest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08logo_url\x18\x02 \x01(\t\x12\x44\n\x11layout_properties\x18\x03 \x01(\x0b\x32).google.apps.script.type.LayoutProperties\x12\x42\n\x11\x61\x64\x64_on_widget_set\x18\x04 \x01(\x0b\x32\'.google.apps.script.type.AddOnWidgetSet\x12\x1b\n\x13use_locale_from_app\x18\x05 \x01(\x08\x12I\n\x10homepage_trigger\x18\x06 \x01(\x0b\x32/.google.apps.script.type.HomepageExtensionPoint\x12Q\n\x11universal_actions\x18\x07 \x03(\x0b\x32\x36.google.apps.script.type.UniversalActionExtensionPoint\x12:\n\x16open_link_url_prefixes\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.ListValue\"B\n\x10LayoutProperties\x12\x15\n\rprimary_color\x18\x01 \x01(\t\x12\x17\n\x0fsecondary_color\x18\x02 \x01(\t\"]\n\x0bHttpOptions\x12N\n\x14\x61uthorization_header\x18\x01 \x01(\x0e\x32\x30.google.apps.script.type.HttpAuthorizationHeader*v\n\x17HttpAuthorizationHeader\x12)\n%HTTP_AUTHORIZATION_HEADER_UNSPECIFIED\x10\x00\x12\x13\n\x0fSYSTEM_ID_TOKEN\x10\x01\x12\x11\n\rUSER_ID_TOKEN\x10\x02\x12\x08\n\x04NONE\x10\x03\x42\xa8\x01\n\x1b\x63om.google.apps.script.typeP\x01Z6google.golang.org/genproto/googleapis/apps/script/type\xaa\x02\x17Google.Apps.Script.Type\xca\x02\x17Google\\Apps\\Script\\Type\xea\x02\x1aGoogle::Apps::Script::Typeb\x06proto3"
13
+
14
+ pool = Google::Protobuf::DescriptorPool.generated_pool
15
+
16
+ begin
17
+ pool.add_serialized_file(descriptor_data)
18
+ rescue TypeError => e
19
+ # Compatibility code: will be removed in the next major version.
20
+ require 'google/protobuf/descriptor_pb'
21
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
22
+ parsed.clear_dependency
23
+ serialized = parsed.class.encode(parsed)
24
+ file = pool.add_serialized_file(serialized)
25
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
26
+ imports = [
27
+ ["google.apps.script.type.AddOnWidgetSet", "google/apps/script/type/addon_widget_set.proto"],
28
+ ["google.apps.script.type.HomepageExtensionPoint", "google/apps/script/type/extension_point.proto"],
29
+ ["google.protobuf.ListValue", "google/protobuf/struct.proto"],
30
+ ]
31
+ imports.each do |type_name, expected_filename|
32
+ import_file = pool.lookup(type_name).file_descriptor
33
+ if import_file.name != expected_filename
34
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
34
35
  end
35
36
  end
37
+ warn "Each proto file must use a consistent fully-qualified name."
38
+ warn "This will become an error in the next major version."
36
39
  end
37
40
 
38
41
  module Google
@@ -47,3 +50,111 @@ module Google
47
50
  end
48
51
  end
49
52
  end
53
+
54
+ #### Source proto file: google/apps/script/type/script_manifest.proto ####
55
+ #
56
+ # // Copyright 2020 Google LLC
57
+ # //
58
+ # // Licensed under the Apache License, Version 2.0 (the "License");
59
+ # // you may not use this file except in compliance with the License.
60
+ # // You may obtain a copy of the License at
61
+ # //
62
+ # // http://www.apache.org/licenses/LICENSE-2.0
63
+ # //
64
+ # // Unless required by applicable law or agreed to in writing, software
65
+ # // distributed under the License is distributed on an "AS IS" BASIS,
66
+ # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
67
+ # // See the License for the specific language governing permissions and
68
+ # // limitations under the License.
69
+ #
70
+ # syntax = "proto3";
71
+ #
72
+ # package google.apps.script.type;
73
+ #
74
+ # import "google/apps/script/type/addon_widget_set.proto";
75
+ # import "google/apps/script/type/extension_point.proto";
76
+ # import "google/protobuf/struct.proto";
77
+ #
78
+ # option csharp_namespace = "Google.Apps.Script.Type";
79
+ # option go_package = "google.golang.org/genproto/googleapis/apps/script/type";
80
+ # option java_multiple_files = true;
81
+ # option java_package = "com.google.apps.script.type";
82
+ # option php_namespace = "Google\\Apps\\Script\\Type";
83
+ # option ruby_package = "Google::Apps::Script::Type";
84
+ #
85
+ # // Add-on configuration that is shared across all add-on host applications.
86
+ # message CommonAddOnManifest {
87
+ # // Required. The display name of the add-on.
88
+ # string name = 1;
89
+ #
90
+ # // Required. The URL for the logo image shown in the add-on toolbar.
91
+ # string logo_url = 2;
92
+ #
93
+ # // Common layout properties for the add-on cards.
94
+ # LayoutProperties layout_properties = 3;
95
+ #
96
+ # // The widgets used in the add-on. If this field is not specified,
97
+ # // it indicates that default set is used.
98
+ # AddOnWidgetSet add_on_widget_set = 4;
99
+ #
100
+ # // Whether to pass locale information from host app.
101
+ # bool use_locale_from_app = 5;
102
+ #
103
+ # // Defines an endpoint that will be executed in any context, in
104
+ # // any host. Any cards generated by this function will always be available to
105
+ # // the user, but may be eclipsed by contextual content when this add-on
106
+ # // declares more targeted triggers.
107
+ # HomepageExtensionPoint homepage_trigger = 6;
108
+ #
109
+ # // Defines a list of extension points in the universal action menu which
110
+ # // serves as a setting menu for the add-on. The extension point can be
111
+ # // link URL to open or an endpoint to execute as a form
112
+ # // submission.
113
+ # repeated UniversalActionExtensionPoint universal_actions = 7;
114
+ #
115
+ # // An OpenLink action
116
+ # // can only use a URL with an HTTPS, MAILTO or TEL scheme. For HTTPS links,
117
+ # // the URL must also
118
+ # // [match](/gmail/add-ons/concepts/manifests#whitelisting_urls) one of the
119
+ # // prefixes specified in this whitelist. If the prefix omits the scheme, HTTPS
120
+ # // is assumed. Notice that HTTP links are automatically rewritten to HTTPS
121
+ # // links.
122
+ # google.protobuf.ListValue open_link_url_prefixes = 8;
123
+ # }
124
+ #
125
+ # // Card layout properties shared across all add-on host applications.
126
+ # message LayoutProperties {
127
+ # // The primary color of the add-on. It sets the color of toolbar. If no
128
+ # // primary color is set explicitly, the default value provided by the
129
+ # // framework is used.
130
+ # string primary_color = 1;
131
+ #
132
+ # // The secondary color of the add-on. It sets the color of buttons.
133
+ # // If primary color is set but no secondary color is set, the
134
+ # // secondary color is the same as the primary color. If neither primary
135
+ # // color nor secondary color is set, the default value provided by the
136
+ # // framework is used.
137
+ # string secondary_color = 2;
138
+ # }
139
+ #
140
+ # // Options for sending requests to add-on HTTP endpoints
141
+ # message HttpOptions {
142
+ # // Configuration for the token sent in the HTTP Authorization header
143
+ # HttpAuthorizationHeader authorization_header = 1;
144
+ # }
145
+ #
146
+ # // Authorization header sent in add-on HTTP requests
147
+ # enum HttpAuthorizationHeader {
148
+ # // Default value, equivalent to `SYSTEM_ID_TOKEN`
149
+ # HTTP_AUTHORIZATION_HEADER_UNSPECIFIED = 0;
150
+ #
151
+ # // Send an ID token for the project-specific Google Workspace Add-ons system
152
+ # // service account (default)
153
+ # SYSTEM_ID_TOKEN = 1;
154
+ #
155
+ # // Send an ID token for the end user
156
+ # USER_ID_TOKEN = 2;
157
+ #
158
+ # // Do not send an Authentication header
159
+ # NONE = 3;
160
+ # }
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/apps/script/type/sheets/sheets_addon_manifest.proto
3
4
 
@@ -6,16 +7,32 @@ require 'google/protobuf'
6
7
  require 'google/api/field_behavior_pb'
7
8
  require 'google/apps/script/type/extension_point_pb'
8
9
 
9
- Google::Protobuf::DescriptorPool.generated_pool.build do
10
- add_file("google/apps/script/type/sheets/sheets_addon_manifest.proto", :syntax => :proto3) do
11
- add_message "google.apps.script.type.sheets.SheetsAddOnManifest" do
12
- optional :homepage_trigger, :message, 3, "google.apps.script.type.HomepageExtensionPoint"
13
- optional :on_file_scope_granted_trigger, :message, 5, "google.apps.script.type.sheets.SheetsExtensionPoint"
14
- end
15
- add_message "google.apps.script.type.sheets.SheetsExtensionPoint" do
16
- optional :run_function, :string, 1
10
+
11
+ descriptor_data = "\n:google/apps/script/type/sheets/sheets_addon_manifest.proto\x12\x1egoogle.apps.script.type.sheets\x1a\x1fgoogle/api/field_behavior.proto\x1a-google/apps/script/type/extension_point.proto\"\xbd\x01\n\x13SheetsAddOnManifest\x12I\n\x10homepage_trigger\x18\x03 \x01(\x0b\x32/.google.apps.script.type.HomepageExtensionPoint\x12[\n\x1don_file_scope_granted_trigger\x18\x05 \x01(\x0b\x32\x34.google.apps.script.type.sheets.SheetsExtensionPoint\"2\n\x14SheetsExtensionPoint\x12\x1a\n\x0crun_function\x18\x01 \x01(\tB\x04\xe2\x41\x01\x02\x42\xe6\x01\n\"com.google.apps.script.type.sheetsB\x18SheetsAddOnManifestProtoP\x01Z=google.golang.org/genproto/googleapis/apps/script/type/sheets\xaa\x02\x1eGoogle.Apps.Script.Type.Sheets\xca\x02\x1eGoogle\\Apps\\Script\\Type\\Sheets\xea\x02\"Google::Apps::Script::Type::Sheetsb\x06proto3"
12
+
13
+ pool = Google::Protobuf::DescriptorPool.generated_pool
14
+
15
+ begin
16
+ pool.add_serialized_file(descriptor_data)
17
+ rescue TypeError => e
18
+ # Compatibility code: will be removed in the next major version.
19
+ require 'google/protobuf/descriptor_pb'
20
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
21
+ parsed.clear_dependency
22
+ serialized = parsed.class.encode(parsed)
23
+ file = pool.add_serialized_file(serialized)
24
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
25
+ imports = [
26
+ ["google.apps.script.type.HomepageExtensionPoint", "google/apps/script/type/extension_point.proto"],
27
+ ]
28
+ imports.each do |type_name, expected_filename|
29
+ import_file = pool.lookup(type_name).file_descriptor
30
+ if import_file.name != expected_filename
31
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
17
32
  end
18
33
  end
34
+ warn "Each proto file must use a consistent fully-qualified name."
35
+ warn "This will become an error in the next major version."
19
36
  end
20
37
 
21
38
  module Google
@@ -30,3 +47,53 @@ module Google
30
47
  end
31
48
  end
32
49
  end
50
+
51
+ #### Source proto file: google/apps/script/type/sheets/sheets_addon_manifest.proto ####
52
+ #
53
+ # // Copyright 2020 Google LLC
54
+ # //
55
+ # // Licensed under the Apache License, Version 2.0 (the "License");
56
+ # // you may not use this file except in compliance with the License.
57
+ # // You may obtain a copy of the License at
58
+ # //
59
+ # // http://www.apache.org/licenses/LICENSE-2.0
60
+ # //
61
+ # // Unless required by applicable law or agreed to in writing, software
62
+ # // distributed under the License is distributed on an "AS IS" BASIS,
63
+ # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
64
+ # // See the License for the specific language governing permissions and
65
+ # // limitations under the License.
66
+ #
67
+ # syntax = "proto3";
68
+ #
69
+ # package google.apps.script.type.sheets;
70
+ #
71
+ # import "google/api/field_behavior.proto";
72
+ # import "google/apps/script/type/extension_point.proto";
73
+ #
74
+ # option csharp_namespace = "Google.Apps.Script.Type.Sheets";
75
+ # option go_package = "google.golang.org/genproto/googleapis/apps/script/type/sheets";
76
+ # option java_multiple_files = true;
77
+ # option java_outer_classname = "SheetsAddOnManifestProto";
78
+ # option java_package = "com.google.apps.script.type.sheets";
79
+ # option php_namespace = "Google\\Apps\\Script\\Type\\Sheets";
80
+ # option ruby_package = "Google::Apps::Script::Type::Sheets";
81
+ #
82
+ # // Manifest section specific to Sheets Add-ons.
83
+ #
84
+ # // Sheets add-on manifest.
85
+ # message SheetsAddOnManifest {
86
+ # // If present, this overrides the configuration from
87
+ # // `addOns.common.homepageTrigger`.
88
+ # google.apps.script.type.HomepageExtensionPoint homepage_trigger = 3;
89
+ #
90
+ # // Endpoint to execute when file scope authorization is granted
91
+ # // for this document/user pair.
92
+ # SheetsExtensionPoint on_file_scope_granted_trigger = 5;
93
+ # }
94
+ #
95
+ # // Common format for declaring a Sheets add-on's triggers.
96
+ # message SheetsExtensionPoint {
97
+ # // Required. The endpoint to execute when this extension point is activated.
98
+ # string run_function = 1 [(google.api.field_behavior) = REQUIRED];
99
+ # }