google-cloud-firestore 1.4.4 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/CHANGELOG.md +55 -0
  4. data/lib/google-cloud-firestore.rb +15 -21
  5. data/lib/google/cloud/firestore.rb +12 -23
  6. data/lib/google/cloud/firestore/client.rb +12 -14
  7. data/lib/google/cloud/firestore/collection_reference.rb +1 -0
  8. data/lib/google/cloud/firestore/collection_reference_list.rb +137 -0
  9. data/lib/google/cloud/firestore/convert.rb +39 -39
  10. data/lib/google/cloud/firestore/credentials.rb +2 -2
  11. data/lib/google/cloud/firestore/document_listener.rb +86 -7
  12. data/lib/google/cloud/firestore/document_reference.rb +9 -10
  13. data/lib/google/cloud/firestore/document_reference/list.rb +2 -2
  14. data/lib/google/cloud/firestore/document_snapshot.rb +5 -6
  15. data/lib/google/cloud/firestore/query.rb +127 -34
  16. data/lib/google/cloud/firestore/query_listener.rb +82 -1
  17. data/lib/google/cloud/firestore/service.rb +63 -104
  18. data/lib/google/cloud/firestore/transaction.rb +2 -2
  19. data/lib/google/cloud/firestore/version.rb +1 -1
  20. data/lib/google/cloud/firestore/watch/inventory.rb +2 -0
  21. data/lib/google/cloud/firestore/watch/listener.rb +32 -25
  22. data/lib/google/cloud/firestore/watch/order.rb +1 -1
  23. metadata +9 -107
  24. data/lib/google/cloud/firestore/admin.rb +0 -144
  25. data/lib/google/cloud/firestore/admin/v1.rb +0 -151
  26. data/lib/google/cloud/firestore/admin/v1/credentials.rb +0 -44
  27. data/lib/google/cloud/firestore/admin/v1/doc/google/firestore/admin/v1/field.rb +0 -86
  28. data/lib/google/cloud/firestore/admin/v1/doc/google/firestore/admin/v1/firestore_admin.rb +0 -161
  29. data/lib/google/cloud/firestore/admin/v1/doc/google/firestore/admin/v1/index.rb +0 -142
  30. data/lib/google/cloud/firestore/admin/v1/doc/google/longrunning/operations.rb +0 -51
  31. data/lib/google/cloud/firestore/admin/v1/doc/google/protobuf/any.rb +0 -131
  32. data/lib/google/cloud/firestore/admin/v1/doc/google/protobuf/empty.rb +0 -29
  33. data/lib/google/cloud/firestore/admin/v1/doc/google/protobuf/field_mask.rb +0 -222
  34. data/lib/google/cloud/firestore/admin/v1/doc/google/rpc/status.rb +0 -39
  35. data/lib/google/cloud/firestore/admin/v1/firestore_admin_client.rb +0 -902
  36. data/lib/google/cloud/firestore/admin/v1/firestore_admin_client_config.json +0 -76
  37. data/lib/google/cloud/firestore/v1.rb +0 -152
  38. data/lib/google/cloud/firestore/v1/credentials.rb +0 -42
  39. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/common.rb +0 -64
  40. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/document.rb +0 -136
  41. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/firestore.rb +0 -566
  42. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/query.rb +0 -227
  43. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/write.rb +0 -241
  44. data/lib/google/cloud/firestore/v1/doc/google/protobuf/any.rb +0 -131
  45. data/lib/google/cloud/firestore/v1/doc/google/protobuf/empty.rb +0 -29
  46. data/lib/google/cloud/firestore/v1/doc/google/protobuf/timestamp.rb +0 -113
  47. data/lib/google/cloud/firestore/v1/doc/google/protobuf/wrappers.rb +0 -26
  48. data/lib/google/cloud/firestore/v1/doc/google/rpc/status.rb +0 -39
  49. data/lib/google/cloud/firestore/v1/firestore_client.rb +0 -1011
  50. data/lib/google/cloud/firestore/v1/firestore_client_config.json +0 -105
  51. data/lib/google/cloud/firestore/v1beta1.rb +0 -162
  52. data/lib/google/cloud/firestore/v1beta1/credentials.rb +0 -42
  53. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/common.rb +0 -64
  54. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/document.rb +0 -136
  55. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/firestore.rb +0 -564
  56. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/query.rb +0 -227
  57. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/write.rb +0 -237
  58. data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/any.rb +0 -131
  59. data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/empty.rb +0 -29
  60. data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/timestamp.rb +0 -113
  61. data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/wrappers.rb +0 -26
  62. data/lib/google/cloud/firestore/v1beta1/doc/google/rpc/status.rb +0 -39
  63. data/lib/google/cloud/firestore/v1beta1/firestore_client.rb +0 -1021
  64. data/lib/google/cloud/firestore/v1beta1/firestore_client_config.json +0 -100
  65. data/lib/google/firestore/admin/v1/field_pb.rb +0 -32
  66. data/lib/google/firestore/admin/v1/firestore_admin_pb.rb +0 -84
  67. data/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb +0 -94
  68. data/lib/google/firestore/admin/v1/index_pb.rb +0 -58
  69. data/lib/google/firestore/admin/v1/location_pb.rb +0 -22
  70. data/lib/google/firestore/admin/v1/operation_pb.rb +0 -90
  71. data/lib/google/firestore/v1/common_pb.rb +0 -45
  72. data/lib/google/firestore/v1/document_pb.rb +0 -50
  73. data/lib/google/firestore/v1/firestore_pb.rb +0 -222
  74. data/lib/google/firestore/v1/firestore_services_pb.rb +0 -80
  75. data/lib/google/firestore/v1/query_pb.rb +0 -107
  76. data/lib/google/firestore/v1/write_pb.rb +0 -80
  77. data/lib/google/firestore/v1beta1/common_pb.rb +0 -45
  78. data/lib/google/firestore/v1beta1/document_pb.rb +0 -50
  79. data/lib/google/firestore/v1beta1/firestore_pb.rb +0 -222
  80. data/lib/google/firestore/v1beta1/firestore_services_pb.rb +0 -89
  81. data/lib/google/firestore/v1beta1/query_pb.rb +0 -107
  82. data/lib/google/firestore/v1beta1/write_pb.rb +0 -79
@@ -1,107 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/firestore/v1beta1/query.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/firestore/v1beta1/document_pb'
8
- require 'google/protobuf/wrappers_pb'
9
- require 'google/api/annotations_pb'
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_message "google.firestore.v1beta1.StructuredQuery" do
12
- optional :select, :message, 1, "google.firestore.v1beta1.StructuredQuery.Projection"
13
- repeated :from, :message, 2, "google.firestore.v1beta1.StructuredQuery.CollectionSelector"
14
- optional :where, :message, 3, "google.firestore.v1beta1.StructuredQuery.Filter"
15
- repeated :order_by, :message, 4, "google.firestore.v1beta1.StructuredQuery.Order"
16
- optional :start_at, :message, 7, "google.firestore.v1beta1.Cursor"
17
- optional :end_at, :message, 8, "google.firestore.v1beta1.Cursor"
18
- optional :offset, :int32, 6
19
- optional :limit, :message, 5, "google.protobuf.Int32Value"
20
- end
21
- add_message "google.firestore.v1beta1.StructuredQuery.CollectionSelector" do
22
- optional :collection_id, :string, 2
23
- optional :all_descendants, :bool, 3
24
- end
25
- add_message "google.firestore.v1beta1.StructuredQuery.Filter" do
26
- oneof :filter_type do
27
- optional :composite_filter, :message, 1, "google.firestore.v1beta1.StructuredQuery.CompositeFilter"
28
- optional :field_filter, :message, 2, "google.firestore.v1beta1.StructuredQuery.FieldFilter"
29
- optional :unary_filter, :message, 3, "google.firestore.v1beta1.StructuredQuery.UnaryFilter"
30
- end
31
- end
32
- add_message "google.firestore.v1beta1.StructuredQuery.CompositeFilter" do
33
- optional :op, :enum, 1, "google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator"
34
- repeated :filters, :message, 2, "google.firestore.v1beta1.StructuredQuery.Filter"
35
- end
36
- add_enum "google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator" do
37
- value :OPERATOR_UNSPECIFIED, 0
38
- value :AND, 1
39
- end
40
- add_message "google.firestore.v1beta1.StructuredQuery.FieldFilter" do
41
- optional :field, :message, 1, "google.firestore.v1beta1.StructuredQuery.FieldReference"
42
- optional :op, :enum, 2, "google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator"
43
- optional :value, :message, 3, "google.firestore.v1beta1.Value"
44
- end
45
- add_enum "google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator" do
46
- value :OPERATOR_UNSPECIFIED, 0
47
- value :LESS_THAN, 1
48
- value :LESS_THAN_OR_EQUAL, 2
49
- value :GREATER_THAN, 3
50
- value :GREATER_THAN_OR_EQUAL, 4
51
- value :EQUAL, 5
52
- value :ARRAY_CONTAINS, 7
53
- value :IN, 8
54
- value :ARRAY_CONTAINS_ANY, 9
55
- end
56
- add_message "google.firestore.v1beta1.StructuredQuery.UnaryFilter" do
57
- optional :op, :enum, 1, "google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator"
58
- oneof :operand_type do
59
- optional :field, :message, 2, "google.firestore.v1beta1.StructuredQuery.FieldReference"
60
- end
61
- end
62
- add_enum "google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator" do
63
- value :OPERATOR_UNSPECIFIED, 0
64
- value :IS_NAN, 2
65
- value :IS_NULL, 3
66
- end
67
- add_message "google.firestore.v1beta1.StructuredQuery.Order" do
68
- optional :field, :message, 1, "google.firestore.v1beta1.StructuredQuery.FieldReference"
69
- optional :direction, :enum, 2, "google.firestore.v1beta1.StructuredQuery.Direction"
70
- end
71
- add_message "google.firestore.v1beta1.StructuredQuery.FieldReference" do
72
- optional :field_path, :string, 2
73
- end
74
- add_message "google.firestore.v1beta1.StructuredQuery.Projection" do
75
- repeated :fields, :message, 2, "google.firestore.v1beta1.StructuredQuery.FieldReference"
76
- end
77
- add_enum "google.firestore.v1beta1.StructuredQuery.Direction" do
78
- value :DIRECTION_UNSPECIFIED, 0
79
- value :ASCENDING, 1
80
- value :DESCENDING, 2
81
- end
82
- add_message "google.firestore.v1beta1.Cursor" do
83
- repeated :values, :message, 1, "google.firestore.v1beta1.Value"
84
- optional :before, :bool, 2
85
- end
86
- end
87
-
88
- module Google
89
- module Firestore
90
- module V1beta1
91
- StructuredQuery = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.StructuredQuery").msgclass
92
- StructuredQuery::CollectionSelector = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.StructuredQuery.CollectionSelector").msgclass
93
- StructuredQuery::Filter = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.StructuredQuery.Filter").msgclass
94
- StructuredQuery::CompositeFilter = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.StructuredQuery.CompositeFilter").msgclass
95
- StructuredQuery::CompositeFilter::Operator = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator").enummodule
96
- StructuredQuery::FieldFilter = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.StructuredQuery.FieldFilter").msgclass
97
- StructuredQuery::FieldFilter::Operator = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator").enummodule
98
- StructuredQuery::UnaryFilter = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.StructuredQuery.UnaryFilter").msgclass
99
- StructuredQuery::UnaryFilter::Operator = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator").enummodule
100
- StructuredQuery::Order = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.StructuredQuery.Order").msgclass
101
- StructuredQuery::FieldReference = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.StructuredQuery.FieldReference").msgclass
102
- StructuredQuery::Projection = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.StructuredQuery.Projection").msgclass
103
- StructuredQuery::Direction = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.StructuredQuery.Direction").enummodule
104
- Cursor = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.Cursor").msgclass
105
- end
106
- end
107
- end
@@ -1,79 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/firestore/v1beta1/write.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/firestore/v1beta1/common_pb'
8
- require 'google/firestore/v1beta1/document_pb'
9
- require 'google/protobuf/timestamp_pb'
10
- require 'google/api/annotations_pb'
11
- Google::Protobuf::DescriptorPool.generated_pool.build do
12
- add_message "google.firestore.v1beta1.Write" do
13
- optional :update_mask, :message, 3, "google.firestore.v1beta1.DocumentMask"
14
- optional :current_document, :message, 4, "google.firestore.v1beta1.Precondition"
15
- oneof :operation do
16
- optional :update, :message, 1, "google.firestore.v1beta1.Document"
17
- optional :delete, :string, 2
18
- optional :transform, :message, 6, "google.firestore.v1beta1.DocumentTransform"
19
- end
20
- end
21
- add_message "google.firestore.v1beta1.DocumentTransform" do
22
- optional :document, :string, 1
23
- repeated :field_transforms, :message, 2, "google.firestore.v1beta1.DocumentTransform.FieldTransform"
24
- end
25
- add_message "google.firestore.v1beta1.DocumentTransform.FieldTransform" do
26
- optional :field_path, :string, 1
27
- oneof :transform_type do
28
- optional :set_to_server_value, :enum, 2, "google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue"
29
- optional :increment, :message, 3, "google.firestore.v1beta1.Value"
30
- optional :maximum, :message, 4, "google.firestore.v1beta1.Value"
31
- optional :minimum, :message, 5, "google.firestore.v1beta1.Value"
32
- optional :append_missing_elements, :message, 6, "google.firestore.v1beta1.ArrayValue"
33
- optional :remove_all_from_array, :message, 7, "google.firestore.v1beta1.ArrayValue"
34
- end
35
- end
36
- add_enum "google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue" do
37
- value :SERVER_VALUE_UNSPECIFIED, 0
38
- value :REQUEST_TIME, 1
39
- end
40
- add_message "google.firestore.v1beta1.WriteResult" do
41
- optional :update_time, :message, 1, "google.protobuf.Timestamp"
42
- repeated :transform_results, :message, 2, "google.firestore.v1beta1.Value"
43
- end
44
- add_message "google.firestore.v1beta1.DocumentChange" do
45
- optional :document, :message, 1, "google.firestore.v1beta1.Document"
46
- repeated :target_ids, :int32, 5
47
- repeated :removed_target_ids, :int32, 6
48
- end
49
- add_message "google.firestore.v1beta1.DocumentDelete" do
50
- optional :document, :string, 1
51
- repeated :removed_target_ids, :int32, 6
52
- optional :read_time, :message, 4, "google.protobuf.Timestamp"
53
- end
54
- add_message "google.firestore.v1beta1.DocumentRemove" do
55
- optional :document, :string, 1
56
- repeated :removed_target_ids, :int32, 2
57
- optional :read_time, :message, 4, "google.protobuf.Timestamp"
58
- end
59
- add_message "google.firestore.v1beta1.ExistenceFilter" do
60
- optional :target_id, :int32, 1
61
- optional :count, :int32, 2
62
- end
63
- end
64
-
65
- module Google
66
- module Firestore
67
- module V1beta1
68
- Write = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.Write").msgclass
69
- DocumentTransform = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.DocumentTransform").msgclass
70
- DocumentTransform::FieldTransform = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.DocumentTransform.FieldTransform").msgclass
71
- DocumentTransform::FieldTransform::ServerValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue").enummodule
72
- WriteResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.WriteResult").msgclass
73
- DocumentChange = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.DocumentChange").msgclass
74
- DocumentDelete = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.DocumentDelete").msgclass
75
- DocumentRemove = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.DocumentRemove").msgclass
76
- ExistenceFilter = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.ExistenceFilter").msgclass
77
- end
78
- end
79
- end