signalhouse-sms 1.7.0 → 1.8.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: fa244c4661c7422637836f6c2cff44f1cb28c7184b429bb642a08aae32581335
4
- data.tar.gz: c1843fa74c0e307fa89961f73152d1db80bedf8071a7f885ce4c57887fb8409a
3
+ metadata.gz: df9f3bb087ee41e1ec4ca5a91c5e26b460a5477ba1cb49f3fb8a56ca0eedf9a2
4
+ data.tar.gz: a108bcbc6f729d054b05635b4427c9f83065b3b7b88d57a4e4d9a6025db4214f
5
5
  SHA512:
6
- metadata.gz: 1d0421fbe53aa531b7cecb7516fe9dfc45d4054172bf691e3e501a8112bec8f8de77568779bcc9a4168d46144a8c96771f37fc8833177f8d7bae7ff60e3d595c
7
- data.tar.gz: 84c5e34688e5a24a629080d4b9b00b6ce5703d409e4295a58bdc100625880b3b47afcdb7126c2841a782c92deda4f437883589b3d7cc0b775780fdc054284c1f
6
+ metadata.gz: b1b3f3375705f9d00251657ff2a1b031e265810d599be2ccb54596bf6a6b08101af6d3d4772266722b715f449d40cf3b7df9322f2da16d382f2e46b6f120648b
7
+ data.tar.gz: 87b25efad1010d0c8122d36b346d5672c006f86856b8ef3b947391a457dcc576d0ec4d61b818e1848f1040ca97d006037bafc0a8e5a8b7a14ff59f2949fa86a4
@@ -114,8 +114,9 @@ module SignalHouseSms
114
114
  # Start signing in again with a provider already linked to the caller's account, to confirm it's them.
115
115
  # Returns { reauthTicket, reauthSecret, expiresInSeconds }. Keep reauthSecret in the client that started the
116
116
  # flow: it is returned only here, and confirm_oauth_reauth needs it. Pass reauthTicket as reauth_ticket: to
117
- # get_oauth_authorization_url and navigate the browser there. provider is "google", "microsoft", "apple" or
118
- # "sso"; the ticket is single-use and valid 2 minutes, and nothing is spent. The browser comes back to
117
+ # get_oauth_authorization_url and navigate the browser there. provider is "microsoft", "apple" or "sso"
118
+ # (Google is refused with a 400 because it can't confirm a fresh sign-in; confirm with a code instead); the
119
+ # ticket is single-use and valid 2 minutes, and nothing is spent. The browser comes back to
119
120
  # /Settings/Security with a single-use `pendingReauth` (the session that started it redeems it with confirm_oauth_reauth) or `reauthError` (reauth_wrong_account, reauth_unsupported,
120
121
  # reauth_stale, invalid_state, sso_not_configured, access_denied or provider_error).
121
122
  def create_oauth_reauth(provider:, **opts)
@@ -150,7 +151,7 @@ module SignalHouseSms
150
151
 
151
152
  # DELETE /auth/oauth/:provider/link
152
153
  # Unlink a sign-in provider (provider may be "sso") from the caller's account. Refused (400) if it is the
153
- # account's only way to sign in. Requires a fresh confirm_two_factor_identity from the same session (403 otherwise).
154
+ # account's only way to sign in. With 2FA on and no password, the last linked Microsoft, Apple or SSO sign-in is refused (400) too. Requires a fresh confirm_two_factor_identity from the same session (403 otherwise).
154
155
  def delete_oauth_link(provider:, **opts)
155
156
  @client.require_params("provider" => provider)
156
157
  @client.request("/auth/oauth/#{CGI.escape(provider.to_s)}/link", method: :delete, token: opts[:token], headers: opts[:headers])
@@ -70,6 +70,19 @@ module SignalHouseSms
70
70
  @client.request("/campaign/throughput-limits#{qs}", method: :get, token: token, headers: headers)
71
71
  end
72
72
 
73
+ # Get today's T-Mobile usage against the daily limit for every active campaign in a group that has one: the same limits and counter as get_campaign_throughput_limits, for the whole group in one
74
+ # call. Returns [{ campaignId, brandId, brandName, usecase, tmobile: { tier, dailyLimit, usedToday: { date, segments, resetsAt } } }].
75
+ # Campaigns without a T-Mobile limit (unverified brand, GOVERNMENT entity, PUBLIC_SAFETY_RESTRICTED usecase) are left out. The counter is per brand EIN and UTC day, so every campaign of a brand shows the same usage; a LOW_VOLUME campaign's limit is 2,000 whatever the brand's score.
76
+ #
77
+ # GET /campaign/throughput-usage?groupId=...
78
+ def get_group_throughput_usage(group_id:, **opts)
79
+ @client.require_params("groupId" => group_id)
80
+ token = opts[:token]
81
+ headers = HttpClient.headers_for(opts)
82
+ qs = @client.get_query_string(groupId: group_id)
83
+ @client.request("/campaign/throughput-usage#{qs}", method: :get, token: token, headers: headers)
84
+ end
85
+
73
86
  # POST /campaign
74
87
  # Optional campaign_data[:sampleMediaIds] (10DLC only): up to 5 mediaId strings from
75
88
  # upload_sample_media, attached to the TCR campaign as sample MMS media for carrier review.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SignalHouseSms
4
- VERSION = "1.7.0"
4
+ VERSION = "1.8.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: signalhouse-sms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - SignalHouse LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-30 00:00:00.000000000 Z
11
+ date: 2026-11-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Official Ruby SDK for the SignalHouse API. Provides a simple interface
14
14
  for sending SMS/MMS messages, managing phone numbers, 10DLC brand/campaign registration,