expo_notifier 0.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.
Files changed (113) hide show
  1. checksums.yaml +7 -0
  2. data/.ruby-version +1 -0
  3. data/CHANGELOG.md +3 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +172 -0
  6. data/Rakefile +17 -0
  7. data/lib/expo_notifier/mapper/base.rb +30 -0
  8. data/lib/expo_notifier/mapper/error.rb +24 -0
  9. data/lib/expo_notifier/mapper/push_message.rb +132 -0
  10. data/lib/expo_notifier/mapper/push_messages.rb +15 -0
  11. data/lib/expo_notifier/mapper/push_receipt.rb +23 -0
  12. data/lib/expo_notifier/mapper/push_receipt_error_details.rb +23 -0
  13. data/lib/expo_notifier/mapper/push_receipt_ids.rb +16 -0
  14. data/lib/expo_notifier/mapper/push_receipts.rb +38 -0
  15. data/lib/expo_notifier/mapper/push_ticket.rb +30 -0
  16. data/lib/expo_notifier/mapper/push_ticket_error_details.rb +19 -0
  17. data/lib/expo_notifier/mapper/push_tickets.rb +26 -0
  18. data/lib/expo_notifier/mapper/rich_content.rb +17 -0
  19. data/lib/expo_notifier/request/base.rb +162 -0
  20. data/lib/expo_notifier/request/get_push_notification_receipts.rb +18 -0
  21. data/lib/expo_notifier/request/send_push_notifications.rb +26 -0
  22. data/lib/expo_notifier/response.rb +93 -0
  23. data/lib/expo_notifier/sorbet_shim.rb +18 -0
  24. data/lib/expo_notifier/version.rb +6 -0
  25. data/lib/expo_notifier.rb +19 -0
  26. data/sorbet/config +6 -0
  27. data/sorbet/rbi/annotations/.gitattributes +1 -0
  28. data/sorbet/rbi/annotations/activesupport.rbi +495 -0
  29. data/sorbet/rbi/annotations/faraday.rbi +17 -0
  30. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  31. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  32. data/sorbet/rbi/annotations/webmock.rbi +9 -0
  33. data/sorbet/rbi/dsl/.gitattributes +1 -0
  34. data/sorbet/rbi/dsl/active_support/callbacks.rbi +21 -0
  35. data/sorbet/rbi/dsl/expo_notifier/mapper/base.rbi +12 -0
  36. data/sorbet/rbi/dsl/expo_notifier/mapper/error.rbi +42 -0
  37. data/sorbet/rbi/dsl/expo_notifier/mapper/push_message.rbi +263 -0
  38. data/sorbet/rbi/dsl/expo_notifier/mapper/push_messages.rbi +29 -0
  39. data/sorbet/rbi/dsl/expo_notifier/mapper/push_receipt.rbi +45 -0
  40. data/sorbet/rbi/dsl/expo_notifier/mapper/push_receipt_error_details.rbi +38 -0
  41. data/sorbet/rbi/dsl/expo_notifier/mapper/push_receipt_ids.rbi +20 -0
  42. data/sorbet/rbi/dsl/expo_notifier/mapper/push_receipts.rbi +25 -0
  43. data/sorbet/rbi/dsl/expo_notifier/mapper/push_ticket.rbi +59 -0
  44. data/sorbet/rbi/dsl/expo_notifier/mapper/push_ticket_error_details.rbi +32 -0
  45. data/sorbet/rbi/dsl/expo_notifier/mapper/push_tickets.rbi +54 -0
  46. data/sorbet/rbi/dsl/expo_notifier/mapper/rich_content.rbi +26 -0
  47. data/sorbet/rbi/dsl/time.rbi +13 -0
  48. data/sorbet/rbi/gems/.gitattributes +1 -0
  49. data/sorbet/rbi/gems/activesupport@8.1.1.rbi +22456 -0
  50. data/sorbet/rbi/gems/addressable@2.8.8.rbi +2005 -0
  51. data/sorbet/rbi/gems/ast@2.4.3.rbi +586 -0
  52. data/sorbet/rbi/gems/base64@0.3.0.rbi +545 -0
  53. data/sorbet/rbi/gems/benchmark@0.5.0.rbi +637 -0
  54. data/sorbet/rbi/gems/bigdecimal@4.0.1.rbi +409 -0
  55. data/sorbet/rbi/gems/booleans@0.1.3.rbi +31 -0
  56. data/sorbet/rbi/gems/concurrent-ruby@1.3.6.rbi +11729 -0
  57. data/sorbet/rbi/gems/connection_pool@3.0.2.rbi +9 -0
  58. data/sorbet/rbi/gems/crack@1.0.1.rbi +145 -0
  59. data/sorbet/rbi/gems/date@3.5.1.rbi +403 -0
  60. data/sorbet/rbi/gems/drb@2.2.3.rbi +1661 -0
  61. data/sorbet/rbi/gems/erb@6.0.1.rbi +815 -0
  62. data/sorbet/rbi/gems/erubi@1.13.1.rbi +157 -0
  63. data/sorbet/rbi/gems/faraday-net_http@3.4.2.rbi +72 -0
  64. data/sorbet/rbi/gems/faraday@2.14.0.rbi +3301 -0
  65. data/sorbet/rbi/gems/hashdiff@1.2.1.rbi +355 -0
  66. data/sorbet/rbi/gems/i18n@1.14.8.rbi +2383 -0
  67. data/sorbet/rbi/gems/io-console@0.8.2.rbi +9 -0
  68. data/sorbet/rbi/gems/json@2.18.0.rbi +2278 -0
  69. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +323 -0
  70. data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
  71. data/sorbet/rbi/gems/minitest@6.0.1.rbi +1524 -0
  72. data/sorbet/rbi/gems/net-http@0.9.1.rbi +4304 -0
  73. data/sorbet/rbi/gems/netrc@0.11.0.rbi +177 -0
  74. data/sorbet/rbi/gems/parallel@1.27.0.rbi +291 -0
  75. data/sorbet/rbi/gems/parser@3.3.10.0.rbi +5537 -0
  76. data/sorbet/rbi/gems/pp@0.6.3.rbi +390 -0
  77. data/sorbet/rbi/gems/prettyprint@0.2.0.rbi +477 -0
  78. data/sorbet/rbi/gems/prism@1.6.0.rbi +42126 -0
  79. data/sorbet/rbi/gems/psych@5.3.1.rbi +2556 -0
  80. data/sorbet/rbi/gems/public_suffix@7.0.2.rbi +957 -0
  81. data/sorbet/rbi/gems/racc@1.8.1.rbi +168 -0
  82. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +404 -0
  83. data/sorbet/rbi/gems/rake@13.3.1.rbi +3038 -0
  84. data/sorbet/rbi/gems/rbi@0.3.8.rbi +5238 -0
  85. data/sorbet/rbi/gems/rbs@4.0.0.dev.4.rbi +7805 -0
  86. data/sorbet/rbi/gems/regexp_parser@2.11.3.rbi +3849 -0
  87. data/sorbet/rbi/gems/reline@0.6.3.rbi +2995 -0
  88. data/sorbet/rbi/gems/require-hooks@0.2.2.rbi +110 -0
  89. data/sorbet/rbi/gems/rexml@3.4.4.rbi +5258 -0
  90. data/sorbet/rbi/gems/rubocop-espago@1.2.0.rbi +9 -0
  91. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  92. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +75 -0
  93. data/sorbet/rbi/gems/shale-builder@0.8.5.rbi +267 -0
  94. data/sorbet/rbi/gems/shale@1.2.2.rbi +2323 -0
  95. data/sorbet/rbi/gems/shoulda-context@2.0.0.rbi +563 -0
  96. data/sorbet/rbi/gems/spoom@1.7.11.rbi +5878 -0
  97. data/sorbet/rbi/gems/stringio@3.2.0.rbi +9 -0
  98. data/sorbet/rbi/gems/tapioca@0.17.4.rbi +3507 -0
  99. data/sorbet/rbi/gems/thor@1.4.0.rbi +4399 -0
  100. data/sorbet/rbi/gems/tsort@0.2.0.rbi +393 -0
  101. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5919 -0
  102. data/sorbet/rbi/gems/unicode-display_width@3.2.0.rbi +132 -0
  103. data/sorbet/rbi/gems/unicode-emoji@4.2.0.rbi +254 -0
  104. data/sorbet/rbi/gems/uri@1.1.1.rbi +2407 -0
  105. data/sorbet/rbi/gems/vcr@6.4.0.rbi +3055 -0
  106. data/sorbet/rbi/gems/webmock@3.26.1.rbi +1816 -0
  107. data/sorbet/rbi/shims/gems/set.rbi +2 -0
  108. data/sorbet/rbi/shims/gems/shale.rbi +27 -0
  109. data/sorbet/rbi/shims/gems/shoulda-context.rbi +20 -0
  110. data/sorbet/tapioca/config.yml +21 -0
  111. data/sorbet/tapioca/extensions/load_gem.rb +1 -0
  112. data/sorbet/tapioca/require.rb +15 -0
  113. metadata +228 -0
@@ -0,0 +1,269 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This file was pulled from a central RBI files repository.
5
+ # Please run `bin/tapioca annotations` to update it.
6
+
7
+ module Rainbow
8
+ # @shim: https://github.com/sickill/rainbow/blob/master/lib/rainbow.rb#L10-L12
9
+ sig { returns(T::Boolean) }
10
+ attr_accessor :enabled
11
+
12
+ class Color
13
+ sig { returns(Symbol) }
14
+ attr_reader :ground
15
+
16
+ sig { params(ground: Symbol, values: T.any([Integer], [Integer, Integer, Integer])).returns(Color) }
17
+ def self.build(ground, values); end
18
+
19
+ sig { params(hex: String).returns([Integer, Integer, Integer]) }
20
+ def self.parse_hex_color(hex); end
21
+
22
+ class Indexed < Rainbow::Color
23
+ sig { returns(Integer) }
24
+ attr_reader :num
25
+
26
+ sig { params(ground: Symbol, num: Integer).void }
27
+ def initialize(ground, num); end
28
+
29
+ sig { returns(T::Array[Integer]) }
30
+ def codes; end
31
+ end
32
+
33
+ class Named < Rainbow::Color::Indexed
34
+ NAMES = T.let(nil, T::Hash[Symbol, Integer])
35
+
36
+ sig { params(ground: Symbol, name: Symbol).void }
37
+ def initialize(ground, name); end
38
+
39
+ sig { returns(T::Array[Symbol]) }
40
+ def self.color_names; end
41
+
42
+ sig { returns(String) }
43
+ def self.valid_names; end
44
+ end
45
+
46
+ class RGB < Rainbow::Color::Indexed
47
+ sig { returns(Integer) }
48
+ attr_reader :r, :g, :b
49
+
50
+ sig { params(ground: Symbol, values: Integer).void }
51
+ def initialize(ground, *values); end
52
+
53
+ sig { returns(T::Array[Integer]) }
54
+ def codes; end
55
+
56
+ sig { params(value: Numeric).returns(Integer) }
57
+ def self.to_ansi_domain(value); end
58
+ end
59
+
60
+ class X11Named < Rainbow::Color::RGB
61
+ include Rainbow::X11ColorNames
62
+
63
+ sig { params(ground: Symbol, name: Symbol).void }
64
+ def initialize(ground, name); end
65
+
66
+ sig { returns(T::Array[Symbol]) }
67
+ def self.color_names; end
68
+
69
+ sig { returns(String) }
70
+ def self.valid_names; end
71
+ end
72
+ end
73
+
74
+ sig { returns(Wrapper) }
75
+ def self.global; end
76
+
77
+ sig { returns(T::Boolean) }
78
+ def self.enabled; end
79
+
80
+ sig { params(value: T::Boolean).returns(T::Boolean) }
81
+ def self.enabled=(value); end
82
+
83
+ sig { params(string: String).returns(String) }
84
+ def self.uncolor(string); end
85
+
86
+ class NullPresenter < String
87
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
88
+ def color(*values); end
89
+
90
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
91
+ def foreground(*values); end
92
+
93
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
94
+ def fg(*values); end
95
+
96
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
97
+ def background(*values); end
98
+
99
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
100
+ def bg(*values); end
101
+
102
+ sig { returns(NullPresenter) }
103
+ def reset; end
104
+
105
+ sig { returns(NullPresenter) }
106
+ def bright; end
107
+
108
+ sig { returns(NullPresenter) }
109
+ def faint; end
110
+
111
+ sig { returns(NullPresenter) }
112
+ def italic; end
113
+
114
+ sig { returns(NullPresenter) }
115
+ def underline; end
116
+
117
+ sig { returns(NullPresenter) }
118
+ def blink; end
119
+
120
+ sig { returns(NullPresenter) }
121
+ def inverse; end
122
+
123
+ sig { returns(NullPresenter) }
124
+ def hide; end
125
+
126
+ sig { returns(NullPresenter) }
127
+ def cross_out; end
128
+
129
+ sig { returns(NullPresenter) }
130
+ def black; end
131
+
132
+ sig { returns(NullPresenter) }
133
+ def red; end
134
+
135
+ sig { returns(NullPresenter) }
136
+ def green; end
137
+
138
+ sig { returns(NullPresenter) }
139
+ def yellow; end
140
+
141
+ sig { returns(NullPresenter) }
142
+ def blue; end
143
+
144
+ sig { returns(NullPresenter) }
145
+ def magenta; end
146
+
147
+ sig { returns(NullPresenter) }
148
+ def cyan; end
149
+
150
+ sig { returns(NullPresenter) }
151
+ def white; end
152
+
153
+ sig { returns(NullPresenter) }
154
+ def bold; end
155
+
156
+ sig { returns(NullPresenter) }
157
+ def dark; end
158
+
159
+ sig { returns(NullPresenter) }
160
+ def strike; end
161
+ end
162
+
163
+ class Presenter < String
164
+ TERM_EFFECTS = T.let(nil, T::Hash[Symbol, Integer])
165
+
166
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
167
+ def color(*values); end
168
+
169
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
170
+ def foreground(*values); end
171
+
172
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
173
+ def fg(*values); end
174
+
175
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
176
+ def background(*values); end
177
+
178
+ sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
179
+ def bg(*values); end
180
+
181
+ sig { returns(Presenter) }
182
+ def reset; end
183
+
184
+ sig { returns(Presenter) }
185
+ def bright; end
186
+
187
+ sig { returns(Presenter) }
188
+ def faint; end
189
+
190
+ sig { returns(Presenter) }
191
+ def italic; end
192
+
193
+ sig { returns(Presenter) }
194
+ def underline; end
195
+
196
+ sig { returns(Presenter) }
197
+ def blink; end
198
+
199
+ sig { returns(Presenter) }
200
+ def inverse; end
201
+
202
+ sig { returns(Presenter) }
203
+ def hide; end
204
+
205
+ sig { returns(Presenter) }
206
+ def cross_out; end
207
+
208
+ sig { returns(Presenter) }
209
+ def black; end
210
+
211
+ sig { returns(Presenter) }
212
+ def red; end
213
+
214
+ sig { returns(Presenter) }
215
+ def green; end
216
+
217
+ sig { returns(Presenter) }
218
+ def yellow; end
219
+
220
+ sig { returns(Presenter) }
221
+ def blue; end
222
+
223
+ sig { returns(Presenter) }
224
+ def magenta; end
225
+
226
+ sig { returns(Presenter) }
227
+ def cyan; end
228
+
229
+ sig { returns(Presenter) }
230
+ def white; end
231
+
232
+ sig { returns(Presenter) }
233
+ def bold; end
234
+
235
+ sig { returns(Presenter) }
236
+ def dark; end
237
+
238
+ sig { returns(Presenter) }
239
+ def strike; end
240
+ end
241
+
242
+ class StringUtils
243
+ sig { params(string: String, codes: T::Array[Integer]).returns(String) }
244
+ def self.wrap_with_sgr(string, codes); end
245
+
246
+ sig { params(string: String).returns(String) }
247
+ def self.uncolor(string); end
248
+ end
249
+
250
+ VERSION = T.let(nil, String)
251
+
252
+ class Wrapper
253
+ sig { returns(T::Boolean) }
254
+ attr_accessor :enabled
255
+
256
+ sig { params(enabled: T::Boolean).void }
257
+ def initialize(enabled = true); end
258
+
259
+ sig { params(string: String).returns(T.any(Rainbow::Presenter, Rainbow::NullPresenter)) }
260
+ def wrap(string); end
261
+ end
262
+
263
+ module X11ColorNames
264
+ NAMES = T.let(nil, T::Hash[Symbol, [Integer, Integer, Integer]])
265
+ end
266
+ end
267
+
268
+ sig { params(string: String).returns(Rainbow::Presenter) }
269
+ def Rainbow(string); end
@@ -0,0 +1,9 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This file was pulled from a central RBI files repository.
5
+ # Please run `bin/tapioca annotations` to update it.
6
+
7
+ class Minitest::Test
8
+ include WebMock::API
9
+ end
@@ -0,0 +1 @@
1
+ **/*.rbi linguist-generated=true
@@ -0,0 +1,21 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for dynamic methods in `ActiveSupport::Callbacks`.
5
+ # Please instead update this file by running `bin/tapioca dsl ActiveSupport::Callbacks`.
6
+
7
+
8
+ module ActiveSupport::Callbacks
9
+ include GeneratedInstanceMethods
10
+
11
+ mixes_in_class_methods GeneratedClassMethods
12
+
13
+ module GeneratedClassMethods
14
+ def __callbacks; end
15
+ def __callbacks=(value); end
16
+ end
17
+
18
+ module GeneratedInstanceMethods
19
+ def __callbacks; end
20
+ end
21
+ end
@@ -0,0 +1,12 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for dynamic methods in `ExpoNotifier::Mapper::Base`.
5
+ # Please instead update this file by running `bin/tapioca dsl ExpoNotifier::Mapper::Base`.
6
+
7
+
8
+ class ExpoNotifier::Mapper::Base
9
+ include ShaleAttributeMethods
10
+
11
+ module ShaleAttributeMethods; end
12
+ end
@@ -0,0 +1,42 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for dynamic methods in `ExpoNotifier::Mapper::Error`.
5
+ # Please instead update this file by running `bin/tapioca dsl ExpoNotifier::Mapper::Error`.
6
+
7
+
8
+ class ExpoNotifier::Mapper::Error
9
+ include ShaleAttributeMethods
10
+
11
+ module ShaleAttributeMethods
12
+ # Available values:
13
+ #
14
+ # - TOO_MANY_REQUESTS: You are exceeding the request limit of 600 notifications per second per project.
15
+ #
16
+ # - PUSH_TOO_MANY_EXPERIENCE_IDS: You are trying to send push notifications to different Expo experiences.
17
+ #
18
+ # - PUSH_TOO_MANY_NOTIFICATIONS: You are trying to send more than 100 push notifications in one request.
19
+ #
20
+ # - PUSH_TOO_MANY_RECEIPTS: You are trying to get more than 1000 push receipts in one request.
21
+ sig { returns(T.nilable(String)) }
22
+ def code; end
23
+
24
+ # Available values:
25
+ #
26
+ # - TOO_MANY_REQUESTS: You are exceeding the request limit of 600 notifications per second per project.
27
+ #
28
+ # - PUSH_TOO_MANY_EXPERIENCE_IDS: You are trying to send push notifications to different Expo experiences.
29
+ #
30
+ # - PUSH_TOO_MANY_NOTIFICATIONS: You are trying to send more than 100 push notifications in one request.
31
+ #
32
+ # - PUSH_TOO_MANY_RECEIPTS: You are trying to get more than 1000 push receipts in one request.
33
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
34
+ def code=(value); end
35
+
36
+ sig { returns(T.nilable(String)) }
37
+ def message; end
38
+
39
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
40
+ def message=(value); end
41
+ end
42
+ end
@@ -0,0 +1,263 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for dynamic methods in `ExpoNotifier::Mapper::PushMessage`.
5
+ # Please instead update this file by running `bin/tapioca dsl ExpoNotifier::Mapper::PushMessage`.
6
+
7
+
8
+ class ExpoNotifier::Mapper::PushMessage
9
+ include ShaleAttributeMethods
10
+
11
+ module ShaleAttributeMethods
12
+ # iOS Only
13
+ #
14
+ # Number to display in the badge on the app icon. Specify zero to clear the badge.
15
+ sig { returns(T.nilable(Integer)) }
16
+ def badge; end
17
+
18
+ # iOS Only
19
+ #
20
+ # Number to display in the badge on the app icon. Specify zero to clear the badge.
21
+ sig { params(value: T.nilable(Integer)).returns(T.nilable(Integer)) }
22
+ def badge=(value); end
23
+
24
+ # Android and iOS
25
+ #
26
+ # The message to display in the notification. Maps to `AndroidNotification.body` and `aps.alert.body`.
27
+ sig { returns(T.nilable(String)) }
28
+ def body; end
29
+
30
+ # Android and iOS
31
+ #
32
+ # The message to display in the notification. Maps to `AndroidNotification.body` and `aps.alert.body`.
33
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
34
+ def body=(value); end
35
+
36
+ # Android and iOS
37
+ #
38
+ # ID of the notification category that this notification is associated with.
39
+ sig { returns(T.nilable(String)) }
40
+ def category_id; end
41
+
42
+ # Android and iOS
43
+ #
44
+ # ID of the notification category that this notification is associated with.
45
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
46
+ def category_id=(value); end
47
+
48
+ # Android Only
49
+ #
50
+ # ID of the Notification Channel through which to display this notification. If an ID is specified but
51
+ # the corresponding channel does not exist on the device (that has not yet been created by your app),
52
+ # the notification will not be displayed to the user.
53
+ sig { returns(T.nilable(String)) }
54
+ def channel_id; end
55
+
56
+ # Android Only
57
+ #
58
+ # ID of the Notification Channel through which to display this notification. If an ID is specified but
59
+ # the corresponding channel does not exist on the device (that has not yet been created by your app),
60
+ # the notification will not be displayed to the user.
61
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
62
+ def channel_id=(value); end
63
+
64
+ # iOS Only
65
+ #
66
+ # When this is set to true, the notification will cause the iOS app to start in the background to
67
+ # run a background task. Your app needs to be configured to support this.
68
+ sig { returns(T.nilable(T::Boolean)) }
69
+ def content_available; end
70
+
71
+ # iOS Only
72
+ #
73
+ # When this is set to true, the notification will cause the iOS app to start in the background to
74
+ # run a background task. Your app needs to be configured to support this.
75
+ sig { params(value: Object).returns(Object) }
76
+ def content_available=(value); end
77
+
78
+ # Android and iOS
79
+ #
80
+ # A JSON object delivered to your app.It may be up to about 4KiB; the total notification payload
81
+ # sent to Apple and Google must be at most 4KiB or else you will get a "Message Too Big" error.
82
+ sig { returns(T.untyped) }
83
+ def data; end
84
+
85
+ # Android and iOS
86
+ #
87
+ # A JSON object delivered to your app.It may be up to about 4KiB; the total notification payload
88
+ # sent to Apple and Google must be at most 4KiB or else you will get a "Message Too Big" error.
89
+ sig { params(value: T.untyped).returns(T.untyped) }
90
+ def data=(value); end
91
+
92
+ # Android and iOS
93
+ #
94
+ # Timestamp since the Unix epoch specifying when the message expires.
95
+ # Same effect as `ttl` (`ttl` takes precedence over `expiration`).
96
+ sig { returns(T.nilable(Integer)) }
97
+ def expiration; end
98
+
99
+ # Android and iOS
100
+ #
101
+ # Timestamp since the Unix epoch specifying when the message expires.
102
+ # Same effect as `ttl` (`ttl` takes precedence over `expiration`).
103
+ sig { params(value: T.nilable(Integer)).returns(T.nilable(Integer)) }
104
+ def expiration=(value); end
105
+
106
+ # Android Only
107
+ #
108
+ # The notification's icon. Name of an Android drawable resource (example: my_icon).
109
+ # Defaults to the icon specified in the config plugin.
110
+ sig { returns(T.nilable(String)) }
111
+ def icon; end
112
+
113
+ # Android Only
114
+ #
115
+ # The notification's icon. Name of an Android drawable resource (example: my_icon).
116
+ # Defaults to the icon specified in the config plugin.
117
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
118
+ def icon=(value); end
119
+
120
+ # iOS Only
121
+ #
122
+ # Accepted values: 'active' | 'critical' | 'passive' | 'time-sensitive'
123
+ #
124
+ # The importance and delivery timing of a notification. The string values correspond to the
125
+ # `UNNotificationInterruptionLevel` enumeration cases.
126
+ sig { returns(T.nilable(String)) }
127
+ def interruption_level; end
128
+
129
+ # iOS Only
130
+ #
131
+ # Accepted values: 'active' | 'critical' | 'passive' | 'time-sensitive'
132
+ #
133
+ # The importance and delivery timing of a notification. The string values correspond to the
134
+ # `UNNotificationInterruptionLevel` enumeration cases.
135
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
136
+ def interruption_level=(value); end
137
+
138
+ # iOS Only
139
+ #
140
+ # Specifies whether this notification can be intercepted by the client app. Defaults to false.
141
+ sig { returns(T.nilable(T::Boolean)) }
142
+ def mutable_content; end
143
+
144
+ # iOS Only
145
+ #
146
+ # Specifies whether this notification can be intercepted by the client app. Defaults to false.
147
+ sig { params(value: Object).returns(Object) }
148
+ def mutable_content=(value); end
149
+
150
+ # Android and iOS
151
+ #
152
+ # Accepted values: 'default' | 'normal' | 'high'
153
+ #
154
+ # The delivery priority of the message. Specify default or omit this field to use the default priority
155
+ # on each platform ("normal" on Android and "high" on iOS).
156
+ sig { returns(T.nilable(String)) }
157
+ def priority; end
158
+
159
+ # Android and iOS
160
+ #
161
+ # Accepted values: 'default' | 'normal' | 'high'
162
+ #
163
+ # The delivery priority of the message. Specify default or omit this field to use the default priority
164
+ # on each platform ("normal" on Android and "high" on iOS).
165
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
166
+ def priority=(value); end
167
+
168
+ # Android and iOS
169
+ #
170
+ # Currently supports setting a notification image. Provide an object with key image and value of
171
+ # type string, which is the image URL. Android will show the image out of the box. On iOS, you need to add
172
+ # a Notification Service Extension target to your app.
173
+ sig { params(block: NilClass).returns(T.nilable(ExpoNotifier::Mapper::RichContent)) }
174
+ sig do
175
+ params(
176
+ block: T.proc.params(arg0: ExpoNotifier::Mapper::RichContent).void
177
+ ).returns(ExpoNotifier::Mapper::RichContent)
178
+ end
179
+ def rich_content(&block); end
180
+
181
+ # Android and iOS
182
+ #
183
+ # Currently supports setting a notification image. Provide an object with key image and value of
184
+ # type string, which is the image URL. Android will show the image out of the box. On iOS, you need to add
185
+ # a Notification Service Extension target to your app.
186
+ sig do
187
+ params(
188
+ value: T.nilable(ExpoNotifier::Mapper::RichContent)
189
+ ).returns(T.nilable(ExpoNotifier::Mapper::RichContent))
190
+ end
191
+ def rich_content=(value); end
192
+
193
+ # iOS Only
194
+ #
195
+ # Play a sound when the recipient receives this notification. Specify default to play the device's
196
+ # default notification sound, or omit this field to play no sound. Custom sounds need to be configured
197
+ # via the config plugin and then specified including the file extension. Example: bells_sound.wav.
198
+ sig { returns(T.nilable(String)) }
199
+ def sound; end
200
+
201
+ # iOS Only
202
+ #
203
+ # Play a sound when the recipient receives this notification. Specify default to play the device's
204
+ # default notification sound, or omit this field to play no sound. Custom sounds need to be configured
205
+ # via the config plugin and then specified including the file extension. Example: bells_sound.wav.
206
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
207
+ def sound=(value); end
208
+
209
+ # iOS Only
210
+ #
211
+ # The subtitle to display in the notification below the title. Maps to `aps.alert.subtitle`.
212
+ sig { returns(T.nilable(String)) }
213
+ def subtitle; end
214
+
215
+ # iOS Only
216
+ #
217
+ # The subtitle to display in the notification below the title. Maps to `aps.alert.subtitle`.
218
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
219
+ def subtitle=(value); end
220
+
221
+ # Android and iOS
222
+ #
223
+ # The title to display in the notification. Often displayed above the notification body.
224
+ # Maps to `AndroidNotification.title` and `aps.alert.title`.
225
+ sig { returns(T.nilable(String)) }
226
+ def title; end
227
+
228
+ # Android and iOS
229
+ #
230
+ # The title to display in the notification. Often displayed above the notification body.
231
+ # Maps to `AndroidNotification.title` and `aps.alert.title`.
232
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
233
+ def title=(value); end
234
+
235
+ # Android and iOS
236
+ #
237
+ # An array of Expo push tokens specifying the recipient(s) of this message.
238
+ sig { returns(T.nilable(T::Array[String])) }
239
+ def to; end
240
+
241
+ # Android and iOS
242
+ #
243
+ # An array of Expo push tokens specifying the recipient(s) of this message.
244
+ sig { params(value: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) }
245
+ def to=(value); end
246
+
247
+ # Android and iOS
248
+ #
249
+ # Time to Live: the number of seconds for which the message may be kept around for redelivery if
250
+ # it hasn't been delivered yet. Defaults to undefined to use the respective defaults of each
251
+ # provider (1 month for Android/FCM as well as iOS/APNs).
252
+ sig { returns(T.nilable(Integer)) }
253
+ def ttl; end
254
+
255
+ # Android and iOS
256
+ #
257
+ # Time to Live: the number of seconds for which the message may be kept around for redelivery if
258
+ # it hasn't been delivered yet. Defaults to undefined to use the respective defaults of each
259
+ # provider (1 month for Android/FCM as well as iOS/APNs).
260
+ sig { params(value: T.nilable(Integer)).returns(T.nilable(Integer)) }
261
+ def ttl=(value); end
262
+ end
263
+ end
@@ -0,0 +1,29 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for dynamic methods in `ExpoNotifier::Mapper::PushMessages`.
5
+ # Please instead update this file by running `bin/tapioca dsl ExpoNotifier::Mapper::PushMessages`.
6
+
7
+
8
+ class ExpoNotifier::Mapper::PushMessages
9
+ include ShaleAttributeMethods
10
+
11
+ module ShaleAttributeMethods
12
+ # An array of push messages.
13
+ sig { params(block: NilClass).returns(T.nilable(T::Array[ExpoNotifier::Mapper::PushMessage])) }
14
+ sig do
15
+ params(
16
+ block: T.proc.params(arg0: ExpoNotifier::Mapper::PushMessage).void
17
+ ).returns(ExpoNotifier::Mapper::PushMessage)
18
+ end
19
+ def push_message(&block); end
20
+
21
+ # An array of push messages.
22
+ sig do
23
+ params(
24
+ value: T.nilable(T::Array[ExpoNotifier::Mapper::PushMessage])
25
+ ).returns(T.nilable(T::Array[ExpoNotifier::Mapper::PushMessage]))
26
+ end
27
+ def push_message=(value); end
28
+ end
29
+ end
@@ -0,0 +1,45 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for dynamic methods in `ExpoNotifier::Mapper::PushReceipt`.
5
+ # Please instead update this file by running `bin/tapioca dsl ExpoNotifier::Mapper::PushReceipt`.
6
+
7
+
8
+ class ExpoNotifier::Mapper::PushReceipt
9
+ include ShaleAttributeMethods
10
+
11
+ module ShaleAttributeMethods
12
+ # Error details. Only populated if `status` is equal to `error`.
13
+ sig { params(block: NilClass).returns(T.nilable(ExpoNotifier::Mapper::PushReceiptErrorDetails)) }
14
+ sig do
15
+ params(
16
+ block: T.proc.params(arg0: ExpoNotifier::Mapper::PushReceiptErrorDetails).void
17
+ ).returns(ExpoNotifier::Mapper::PushReceiptErrorDetails)
18
+ end
19
+ def details(&block); end
20
+
21
+ # Error details. Only populated if `status` is equal to `error`.
22
+ sig do
23
+ params(
24
+ value: T.nilable(ExpoNotifier::Mapper::PushReceiptErrorDetails)
25
+ ).returns(T.nilable(ExpoNotifier::Mapper::PushReceiptErrorDetails))
26
+ end
27
+ def details=(value); end
28
+
29
+ # Error message. Only populated if `status` is equal to `error`.
30
+ sig { returns(T.nilable(String)) }
31
+ def message; end
32
+
33
+ # Error message. Only populated if `status` is equal to `error`.
34
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
35
+ def message=(value); end
36
+
37
+ # Available values: 'error' | 'ok'
38
+ sig { returns(T.nilable(String)) }
39
+ def status; end
40
+
41
+ # Available values: 'error' | 'ok'
42
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
43
+ def status=(value); end
44
+ end
45
+ end