alula-ruby 2.32.0 → 2.34.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: 43063ce672af06858e496cf576c67b3dde36f63def8a24bf6938c29d5e23a791
4
- data.tar.gz: 7d9e6e0cb79a23d4b41926fc755e77d33ee553ac63df442189704d864741be96
3
+ metadata.gz: b83ebcec265a85695b8e1a84d7961ba8f67972bde1ba661fda5f2ea3d0576113
4
+ data.tar.gz: 00621eaa3a8481aa2b526a4b8fd6e5fdc63e5662e8f5a455f329f5ef86e46df9
5
5
  SHA512:
6
- metadata.gz: cf2277aa997330ee970d857d2721b2f554f1aac4cc5fab30b24ad4438d6419178a54f667c8eaff5361979f6e4c2c8e52b6e949006a8a1fe1fde53cda9173b15f
7
- data.tar.gz: 6160a92f5a53bc2d08d382fd4b8bb1114d1f12f033a0385fdea5577b6d87c99945b58c38426dd3097773429d47fc4bb551425b8b352f676b4939621dcefb841c
6
+ metadata.gz: 9e4a8db28f7766bdcda562fb27d77f75c97d4f642c096d2a167ff417d08e848ae7bf0e0042ff71f45e7ba0ec0163481c8c434daec2e9eb821e3d5a68eb890490
7
+ data.tar.gz: 9f0cb4409c0b81afbd25e25bc14c7363244ce2cf0d95065311271bbcd74c4f92c05f1f0dbc3a23fd94925a383ab1df313cd8e60581caccdb936ae2af83483648
data/VERSION.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  | Version | Date | Description |
4
4
  | ------- | ------------| --------------------------------------------------------------------------- |
5
+ | v2.34.0 | 2026-05-04 | Add CONNECT-XiP-INTL (program ID 49) to XiP family and Connect device program IDs |
6
+ | v2.33.0 | 2026-03-02 | Add a new method `Alula::Oauth#authenticate_with_code` for handling grants of type `authorization_code` |
5
7
  | v2.32.0 | 2026-01-30 | Add a new `Alula::Dcp::Config::ClearStaged` class that calls the DCP API endpoint to clear all staged configuration data for a device. |
6
8
  | v2.31.0 | 2025-12-19 | Adds managed_by and sso_access_level properties in Dealer |
7
9
  | v2.30.0 | 2025-12-16 | Adds M2MCentralStation and PermittedCentralStation |
@@ -21,7 +21,8 @@ module Alula
21
21
  44, # WTP-02 (is ALDER-WTP_WIFI)
22
22
  45, # Connect-FLX-Z
23
23
  46, # Connect-FLX-DUAL
24
- 47 # Connect-FLX-DUAL-Z
24
+ 47, # Connect-FLX-DUAL-Z
25
+ 49 # CONNECT-XiP-INTL
25
26
  ].freeze
26
27
 
27
28
  GSM_PROGRAM_IDS = [
@@ -60,7 +61,8 @@ module Alula
60
61
  42, # C+Pro-SC
61
62
  45, # C+Flex-Z
62
63
  46, # C+Flex-Dual
63
- 47 # C+Flex-Dual-Z
64
+ 47, # C+Flex-Dual-Z
65
+ 49 # CONNECT-XiP-INTL
64
66
  ].freeze
65
67
 
66
68
  def connect_device?
data/lib/alula/oauth.rb CHANGED
@@ -50,6 +50,35 @@ module Alula
50
50
  end
51
51
  end
52
52
 
53
+ def authenticate_with_code(code: nil, redirect_uri: nil)
54
+ raise Alula::NotConfiguredError.new('did you forget to call Alula::Oauth.configure ?') unless api_url
55
+
56
+ opts = {
57
+ body: {
58
+ grant_type: "authorization_code",
59
+ client_id: client_id,
60
+ client_secret: client_secret,
61
+ }
62
+ }
63
+
64
+ opts[:body][:code] = code if code
65
+ opts[:body][:redirect_uri] = redirect_uri if redirect_uri
66
+
67
+ if self.debug
68
+ opts[:debug_output] = Alula.logger
69
+ # sets the HTTParty logger
70
+ logger Alula.logger, :info
71
+ end
72
+
73
+ response = post(api_url + '/oauth/token', opts)
74
+
75
+ if response.ok?
76
+ Response.new(response.parsed_response)
77
+ else
78
+ Error.new(response.parsed_response)
79
+ end
80
+ end
81
+
53
82
  def refresh(refresh_token:, access_token:)
54
83
  opts = {
55
84
  body: {
data/lib/alula/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alula
4
- VERSION = '2.32.0'
4
+ VERSION = '2.34.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alula-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.32.0
4
+ version: 2.34.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Titus Johnson