google-apps-script-type 1.8.0 → 1.9.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3deb15c8c5b0c763b5340474d7086c578382bfe2ea56feef4cb3997312aeeb63
4
- data.tar.gz: 866e548d23f258637857537c28a7e826376b32cbabda2c0d73021c5f3abf0a02
3
+ metadata.gz: dac89ebd2f9af80ede4cce330631f18ff10ba24c7797b588663277ea4fd8f420
4
+ data.tar.gz: 8189b19cd76290e0763e339ad69cd0110c9c132589b1073e3864d2d9313d39fe
5
5
  SHA512:
6
- metadata.gz: fbf274253f8f94a8a6665846c51cf73b80099c7ddc89959e9030055e3dfe43f25e92f8de5cc4230ad7ef07d64244a4eed9ca900469c5e7a25dfeedf9c8088234
7
- data.tar.gz: bef5786f650d8e634ec8d6a323d41d515f15dff77b6e1e489e75f74b9bf5721a6d44b771a20fd0f65e89fededbfbcd79fa4092ca2f35502013586fc41db31eb5
6
+ metadata.gz: d008ff47e8d2f76bbaf0d6293923fcbd0849a90f204a5f6e9a5325c4351c00d8b3cb4e9f8c259e2886d85f80dc6f4486885e23506b2dbd17ab52caaa1e80d7ed
7
+ data.tar.gz: c5a4e5d8cb8be0d42fd05c738d60fdc2842a2987951059e77a8011697ff23a1c09adbf7d51c06c80b289fbb7be25f977f11cb8ec326a4f9bdc59086c069ec992
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.9.0 (2026-10-29)
4
+
5
+ #### Features
6
+
7
+ * Automated update of google-apps-script-type ([#426](https://github.com/googleapis/common-protos-ruby/issues/426))
8
+
3
9
  ### 1.8.0 (2026-05-19)
4
10
 
5
11
  #### Features
@@ -7,8 +7,29 @@ require 'google/protobuf'
7
7
 
8
8
  descriptor_data = "\n.google/apps/script/type/addon_widget_set.proto\x12\x17google.apps.script.type\"\xa4\x02\n\x0e\x41\x64\x64OnWidgetSet\x12H\n\x0cused_widgets\x18\x01 \x03(\x0e\x32\x32.google.apps.script.type.AddOnWidgetSet.WidgetType\"\xc7\x01\n\nWidgetType\x12\x1b\n\x17WIDGET_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x44\x41TE_PICKER\x10\x01\x12\x12\n\x0eSTYLED_BUTTONS\x10\x02\x12\x14\n\x10PERSISTENT_FORMS\x10\x03\x12\x10\n\x0c\x46IXED_FOOTER\x10\x04\x12!\n\x1dUPDATE_SUBJECT_AND_RECIPIENTS\x10\x05\x12\x0f\n\x0bGRID_WIDGET\x10\x06\x12\x1b\n\x17\x41\x44\x44ON_COMPOSE_UI_ACTION\x10\x07\x42\xbd\x01\n\x1b\x63om.google.apps.script.typeB\x13\x41\x64\x64OnWidgetSetProtoP\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"
9
9
 
10
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
11
- pool.add_serialized_file(descriptor_data)
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
28
+ end
29
+ end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
32
+ end
12
33
 
13
34
  module Google
14
35
  module Apps
@@ -10,8 +10,30 @@ require 'google/apps/script/type/extension_point_pb'
10
10
 
11
11
  descriptor_data = "\n>google/apps/script/type/calendar/calendar_addon_manifest.proto\x12 google.apps.script.type.calendar\x1a\x1fgoogle/api/field_behavior.proto\x1a-google/apps/script/type/extension_point.proto\"\xbf\x04\n\x15\x43\x61lendarAddOnManifest\x12I\n\x10homepage_trigger\x18\x06 \x01(\x0b\x32/.google.apps.script.type.HomepageExtensionPoint\x12Q\n\x13\x63onference_solution\x18\x03 \x03(\x0b\x32\x34.google.apps.script.type.calendar.ConferenceSolution\x12$\n\x1c\x63reate_settings_url_function\x18\x05 \x01(\t\x12T\n\x12\x65vent_open_trigger\x18\n \x01(\x0b\x32\x38.google.apps.script.type.calendar.CalendarExtensionPoint\x12V\n\x14\x65vent_update_trigger\x18\x0b \x01(\x0b\x32\x38.google.apps.script.type.calendar.CalendarExtensionPoint\x12\x61\n\x14\x63urrent_event_access\x18\x0c \x01(\x0e\x32\x43.google.apps.script.type.calendar.CalendarAddOnManifest.EventAccess\"Q\n\x0b\x45ventAccess\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0c\n\x08METADATA\x10\x01\x12\x08\n\x04READ\x10\x03\x12\t\n\x05WRITE\x10\x04\x12\x0e\n\nREAD_WRITE\x10\x05\"p\n\x12\x43onferenceSolution\x12\x1f\n\x12on_create_function\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x02id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04name\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08logo_url\x18\x06 \x01(\tB\x03\xe0\x41\x02\"3\n\x16\x43\x61lendarExtensionPoint\x12\x19\n\x0crun_function\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\xf2\x01\n$com.google.apps.script.type.calendarB\x1a\x43\x61lendarAddOnManifestProtoP\x01Z?google.golang.org/genproto/googleapis/apps/script/type/calendar\xaa\x02 Google.Apps.Script.Type.Calendar\xca\x02 Google\\Apps\\Script\\Type\\Calendar\xea\x02$Google::Apps::Script::Type::Calendarb\x06proto3"
12
12
 
13
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
14
- pool.add_serialized_file(descriptor_data)
13
+ pool = Google::Protobuf::DescriptorPool.generated_pool
14
+
15
+ begin
16
+ pool.add_serialized_file(descriptor_data)
17
+ rescue TypeError
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}"
32
+ end
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."
36
+ end
15
37
 
16
38
  module Google
17
39
  module Apps
@@ -10,8 +10,30 @@ require 'google/apps/script/type/extension_point_pb'
10
10
 
11
11
  descriptor_data = "\n6google/apps/script/type/docs/docs_addon_manifest.proto\x12\x1cgoogle.apps.script.type.docs\x1a\x1fgoogle/api/field_behavior.proto\x1a-google/apps/script/type/extension_point.proto\"\xb7\x01\n\x11\x44ocsAddOnManifest\x12I\n\x10homepage_trigger\x18\x01 \x01(\x0b\x32/.google.apps.script.type.HomepageExtensionPoint\x12W\n\x1don_file_scope_granted_trigger\x18\x02 \x01(\x0b\x32\x30.google.apps.script.type.docs.DocsExtensionPoint\"/\n\x12\x44ocsExtensionPoint\x12\x19\n\x0crun_function\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\xda\x01\n com.google.apps.script.type.docsB\x16\x44ocsAddOnManifestProtoP\x01Z;google.golang.org/genproto/googleapis/apps/script/type/docs\xaa\x02\x1cGoogle.Apps.Script.Type.Docs\xca\x02\x1cGoogle\\Apps\\Script\\Type\\Docs\xea\x02 Google::Apps::Script::Type::Docsb\x06proto3"
12
12
 
13
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
14
- pool.add_serialized_file(descriptor_data)
13
+ pool = Google::Protobuf::DescriptorPool.generated_pool
14
+
15
+ begin
16
+ pool.add_serialized_file(descriptor_data)
17
+ rescue TypeError
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}"
32
+ end
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."
36
+ end
15
37
 
16
38
  module Google
17
39
  module Apps
@@ -9,8 +9,30 @@ require 'google/apps/script/type/extension_point_pb'
9
9
 
10
10
  descriptor_data = "\n8google/apps/script/type/drive/drive_addon_manifest.proto\x12\x1dgoogle.apps.script.type.drive\x1a-google/apps/script/type/extension_point.proto\"\xb6\x01\n\x12\x44riveAddOnManifest\x12I\n\x10homepage_trigger\x18\x01 \x01(\x0b\x32/.google.apps.script.type.HomepageExtensionPoint\x12U\n\x19on_items_selected_trigger\x18\x02 \x01(\x0b\x32\x32.google.apps.script.type.drive.DriveExtensionPoint\"+\n\x13\x44riveExtensionPoint\x12\x14\n\x0crun_function\x18\x01 \x01(\tB\xe0\x01\n!com.google.apps.script.type.driveB\x17\x44riveAddOnManifestProtoP\x01Z<google.golang.org/genproto/googleapis/apps/script/type/drive\xaa\x02\x1dGoogle.Apps.Script.Type.Drive\xca\x02\x1dGoogle\\Apps\\Script\\Type\\Drive\xea\x02!Google::Apps::Script::Type::Driveb\x06proto3"
11
11
 
12
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
13
- pool.add_serialized_file(descriptor_data)
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError
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.apps.script.type.HomepageExtensionPoint", "google/apps/script/type/extension_point.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}"
31
+ end
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."
35
+ end
14
36
 
15
37
  module Google
16
38
  module Apps
@@ -9,8 +9,30 @@ require 'google/protobuf/wrappers_pb'
9
9
 
10
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
11
 
12
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
13
- pool.add_serialized_file(descriptor_data)
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError
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}"
31
+ end
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."
35
+ end
14
36
 
15
37
  module Google
16
38
  module Apps
@@ -10,8 +10,30 @@ require 'google/apps/script/type/extension_point_pb'
10
10
 
11
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
12
 
13
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
14
- pool.add_serialized_file(descriptor_data)
13
+ pool = Google::Protobuf::DescriptorPool.generated_pool
14
+
15
+ begin
16
+ pool.add_serialized_file(descriptor_data)
17
+ rescue TypeError
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}"
32
+ end
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."
36
+ end
15
37
 
16
38
  module Google
17
39
  module Apps
@@ -11,8 +11,32 @@ require 'google/protobuf/struct_pb'
11
11
 
12
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
13
 
14
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
15
- pool.add_serialized_file(descriptor_data)
14
+ pool = Google::Protobuf::DescriptorPool.generated_pool
15
+
16
+ begin
17
+ pool.add_serialized_file(descriptor_data)
18
+ rescue TypeError
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}"
35
+ end
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."
39
+ end
16
40
 
17
41
  module Google
18
42
  module Apps
@@ -10,8 +10,30 @@ require 'google/apps/script/type/extension_point_pb'
10
10
 
11
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\"1\n\x14SheetsExtensionPoint\x12\x19\n\x0crun_function\x18\x01 \x01(\tB\x03\xe0\x41\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
12
 
13
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
14
- pool.add_serialized_file(descriptor_data)
13
+ pool = Google::Protobuf::DescriptorPool.generated_pool
14
+
15
+ begin
16
+ pool.add_serialized_file(descriptor_data)
17
+ rescue TypeError
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}"
32
+ end
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."
36
+ end
15
37
 
16
38
  module Google
17
39
  module Apps
@@ -10,8 +10,30 @@ require 'google/apps/script/type/extension_point_pb'
10
10
 
11
11
  descriptor_data = "\n:google/apps/script/type/slides/slides_addon_manifest.proto\x12\x1egoogle.apps.script.type.slides\x1a\x1fgoogle/api/field_behavior.proto\x1a-google/apps/script/type/extension_point.proto\"\xbd\x01\n\x13SlidesAddOnManifest\x12I\n\x10homepage_trigger\x18\x01 \x01(\x0b\x32/.google.apps.script.type.HomepageExtensionPoint\x12[\n\x1don_file_scope_granted_trigger\x18\x02 \x01(\x0b\x32\x34.google.apps.script.type.slides.SlidesExtensionPoint\"1\n\x14SlidesExtensionPoint\x12\x19\n\x0crun_function\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\xe6\x01\n\"com.google.apps.script.type.slidesB\x18SlidesAddOnManifestProtoP\x01Z=google.golang.org/genproto/googleapis/apps/script/type/slides\xaa\x02\x1eGoogle.Apps.Script.Type.Slides\xca\x02\x1eGoogle\\Apps\\Script\\Type\\Slides\xea\x02\"Google::Apps::Script::Type::Slidesb\x06proto3"
12
12
 
13
- pool = ::Google::Protobuf::DescriptorPool.generated_pool
14
- pool.add_serialized_file(descriptor_data)
13
+ pool = Google::Protobuf::DescriptorPool.generated_pool
14
+
15
+ begin
16
+ pool.add_serialized_file(descriptor_data)
17
+ rescue TypeError
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}"
32
+ end
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."
36
+ end
15
37
 
16
38
  module Google
17
39
  module Apps
@@ -18,7 +18,7 @@ module Google
18
18
  module Apps
19
19
  module Script
20
20
  module Type
21
- VERSION = "1.8.0".freeze
21
+ VERSION = "1.9.0".freeze
22
22
  end
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apps-script-type
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC