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,38 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for dynamic methods in `ExpoNotifier::Mapper::PushReceiptErrorDetails`.
5
+ # Please instead update this file by running `bin/tapioca dsl ExpoNotifier::Mapper::PushReceiptErrorDetails`.
6
+
7
+
8
+ class ExpoNotifier::Mapper::PushReceiptErrorDetails
9
+ include ShaleAttributeMethods
10
+
11
+ module ShaleAttributeMethods
12
+ # Available values:
13
+ #
14
+ # - DeviceNotRegistered: The device cannot receive push notifications anymore and you should stop
15
+ # sending messages to the corresponding Expo push token.
16
+ #
17
+ # - MessageTooBig: The total notification payload was too large. On Android and iOS, the total payload must be at most 4096 bytes.
18
+ #
19
+ # - MismatchSenderId: This indicates that there is an issue with your FCM push credentials.
20
+ #
21
+ # - InvalidCredentials: Your push notification credentials for your standalone app are invalid.
22
+ sig { returns(T.nilable(String)) }
23
+ def error; end
24
+
25
+ # Available values:
26
+ #
27
+ # - DeviceNotRegistered: The device cannot receive push notifications anymore and you should stop
28
+ # sending messages to the corresponding Expo push token.
29
+ #
30
+ # - MessageTooBig: The total notification payload was too large. On Android and iOS, the total payload must be at most 4096 bytes.
31
+ #
32
+ # - MismatchSenderId: This indicates that there is an issue with your FCM push credentials.
33
+ #
34
+ # - InvalidCredentials: Your push notification credentials for your standalone app are invalid.
35
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
36
+ def error=(value); end
37
+ end
38
+ end
@@ -0,0 +1,20 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for dynamic methods in `ExpoNotifier::Mapper::PushReceiptIds`.
5
+ # Please instead update this file by running `bin/tapioca dsl ExpoNotifier::Mapper::PushReceiptIds`.
6
+
7
+
8
+ class ExpoNotifier::Mapper::PushReceiptIds
9
+ include ShaleAttributeMethods
10
+
11
+ module ShaleAttributeMethods
12
+ # An array of Expo push receipt ids.
13
+ sig { returns(T.nilable(T::Array[String])) }
14
+ def ids; end
15
+
16
+ # An array of Expo push receipt ids.
17
+ sig { params(value: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) }
18
+ def ids=(value); end
19
+ end
20
+ end
@@ -0,0 +1,25 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for dynamic methods in `ExpoNotifier::Mapper::PushReceipts`.
5
+ # Please instead update this file by running `bin/tapioca dsl ExpoNotifier::Mapper::PushReceipts`.
6
+
7
+
8
+ class ExpoNotifier::Mapper::PushReceipts
9
+ include ShaleAttributeMethods
10
+
11
+ module ShaleAttributeMethods
12
+ # Errors — only populated if there was an error with the entire request.
13
+ sig { params(block: NilClass).returns(T.nilable(T::Array[ExpoNotifier::Mapper::Error])) }
14
+ sig { params(block: T.proc.params(arg0: ExpoNotifier::Mapper::Error).void).returns(ExpoNotifier::Mapper::Error) }
15
+ def errors(&block); end
16
+
17
+ # Errors — only populated if there was an error with the entire request.
18
+ sig do
19
+ params(
20
+ value: T.nilable(T::Array[ExpoNotifier::Mapper::Error])
21
+ ).returns(T.nilable(T::Array[ExpoNotifier::Mapper::Error]))
22
+ end
23
+ def errors=(value); end
24
+ end
25
+ end
@@ -0,0 +1,59 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for dynamic methods in `ExpoNotifier::Mapper::PushTicket`.
5
+ # Please instead update this file by running `bin/tapioca dsl ExpoNotifier::Mapper::PushTicket`.
6
+
7
+
8
+ class ExpoNotifier::Mapper::PushTicket
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::PushTicketErrorDetails)) }
14
+ sig do
15
+ params(
16
+ block: T.proc.params(arg0: ExpoNotifier::Mapper::PushTicketErrorDetails).void
17
+ ).returns(ExpoNotifier::Mapper::PushTicketErrorDetails)
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::PushTicketErrorDetails)
25
+ ).returns(T.nilable(ExpoNotifier::Mapper::PushTicketErrorDetails))
26
+ end
27
+ def details=(value); end
28
+
29
+ # The Receipt ID.
30
+ sig { returns(T.nilable(String)) }
31
+ def id; end
32
+
33
+ # The Receipt ID.
34
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
35
+ def id=(value); end
36
+
37
+ # Error message. Only populated if `status` is equal to `error`.
38
+ sig { returns(T.nilable(String)) }
39
+ def message; end
40
+
41
+ # Error message. Only populated if `status` is equal to `error`.
42
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
43
+ def message=(value); end
44
+
45
+ # Available values: 'error' | 'ok'
46
+ #
47
+ # A status of ok along with a receipt ID means that the message was received by Expo's servers,
48
+ # not that it was received by the user (for that you will need to check the push receipt).
49
+ sig { returns(T.nilable(String)) }
50
+ def status; end
51
+
52
+ # Available values: 'error' | 'ok'
53
+ #
54
+ # A status of ok along with a receipt ID means that the message was received by Expo's servers,
55
+ # not that it was received by the user (for that you will need to check the push receipt).
56
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
57
+ def status=(value); end
58
+ end
59
+ end
@@ -0,0 +1,32 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for dynamic methods in `ExpoNotifier::Mapper::PushTicketErrorDetails`.
5
+ # Please instead update this file by running `bin/tapioca dsl ExpoNotifier::Mapper::PushTicketErrorDetails`.
6
+
7
+
8
+ class ExpoNotifier::Mapper::PushTicketErrorDetails
9
+ include ShaleAttributeMethods
10
+
11
+ module ShaleAttributeMethods
12
+ # Available values:
13
+ #
14
+ # - DeviceNotRegistered: The device cannot receive push notifications anymore and you should stop
15
+ # sending messages to the corresponding Expo push token.
16
+ sig { returns(T.nilable(String)) }
17
+ def error; end
18
+
19
+ # Available values:
20
+ #
21
+ # - DeviceNotRegistered: The device cannot receive push notifications anymore and you should stop
22
+ # sending messages to the corresponding Expo push token.
23
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
24
+ def error=(value); end
25
+
26
+ sig { returns(T.nilable(String)) }
27
+ def expo_push_token; end
28
+
29
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
30
+ def expo_push_token=(value); end
31
+ end
32
+ end
@@ -0,0 +1,54 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for dynamic methods in `ExpoNotifier::Mapper::PushTickets`.
5
+ # Please instead update this file by running `bin/tapioca dsl ExpoNotifier::Mapper::PushTickets`.
6
+
7
+
8
+ class ExpoNotifier::Mapper::PushTickets
9
+ include ShaleAttributeMethods
10
+
11
+ module ShaleAttributeMethods
12
+ # An array of Expo push tickets.
13
+ #
14
+ # The Expo push notification service responds with push tickets upon successfully receiving notifications.
15
+ # A push ticket indicates that Expo has received your notification payload but may still need to send it.
16
+ # Each push ticket contains a ticket ID, which you later use to look up a push receipt.
17
+ # A push receipt is available after Expo has tried to deliver the notification to FCM or APNs.
18
+ # It tells you whether delivery to the push notification provider was successful.
19
+ sig { params(block: NilClass).returns(T.nilable(T::Array[ExpoNotifier::Mapper::PushTicket])) }
20
+ sig do
21
+ params(
22
+ block: T.proc.params(arg0: ExpoNotifier::Mapper::PushTicket).void
23
+ ).returns(ExpoNotifier::Mapper::PushTicket)
24
+ end
25
+ def data(&block); end
26
+
27
+ # An array of Expo push tickets.
28
+ #
29
+ # The Expo push notification service responds with push tickets upon successfully receiving notifications.
30
+ # A push ticket indicates that Expo has received your notification payload but may still need to send it.
31
+ # Each push ticket contains a ticket ID, which you later use to look up a push receipt.
32
+ # A push receipt is available after Expo has tried to deliver the notification to FCM or APNs.
33
+ # It tells you whether delivery to the push notification provider was successful.
34
+ sig do
35
+ params(
36
+ value: T.nilable(T::Array[ExpoNotifier::Mapper::PushTicket])
37
+ ).returns(T.nilable(T::Array[ExpoNotifier::Mapper::PushTicket]))
38
+ end
39
+ def data=(value); end
40
+
41
+ # Errors — only populated if there was an error with the entire request.
42
+ sig { params(block: NilClass).returns(T.nilable(T::Array[ExpoNotifier::Mapper::Error])) }
43
+ sig { params(block: T.proc.params(arg0: ExpoNotifier::Mapper::Error).void).returns(ExpoNotifier::Mapper::Error) }
44
+ def errors(&block); end
45
+
46
+ # Errors — only populated if there was an error with the entire request.
47
+ sig do
48
+ params(
49
+ value: T.nilable(T::Array[ExpoNotifier::Mapper::Error])
50
+ ).returns(T.nilable(T::Array[ExpoNotifier::Mapper::Error]))
51
+ end
52
+ def errors=(value); end
53
+ end
54
+ end
@@ -0,0 +1,26 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for dynamic methods in `ExpoNotifier::Mapper::RichContent`.
5
+ # Please instead update this file by running `bin/tapioca dsl ExpoNotifier::Mapper::RichContent`.
6
+
7
+
8
+ class ExpoNotifier::Mapper::RichContent
9
+ include ShaleAttributeMethods
10
+
11
+ module ShaleAttributeMethods
12
+ # Android and iOS
13
+ #
14
+ # The image URL. Android will show the image out of the box. On iOS, you need to add a Notification Service Extension
15
+ # target to your app. See this example on how to do that.
16
+ sig { returns(T.nilable(String)) }
17
+ def image; end
18
+
19
+ # Android and iOS
20
+ #
21
+ # The image URL. Android will show the image out of the box. On iOS, you need to add a Notification Service Extension
22
+ # target to your app. See this example on how to do that.
23
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
24
+ def image=(value); end
25
+ end
26
+ end
@@ -0,0 +1,13 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for dynamic methods in `Time`.
5
+ # Please instead update this file by running `bin/tapioca dsl Time`.
6
+
7
+
8
+ class Time
9
+ class << self
10
+ sig { returns(::Time) }
11
+ def current; end
12
+ end
13
+ end
@@ -0,0 +1 @@
1
+ **/*.rbi linguist-generated=true