strongmind-platform-sdk 3.25.0 → 3.26.1

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: 6f930e77e47e55b1fa3fb719b6f9942a98a07acd6c2a2ab3a20a501fb4333c51
4
- data.tar.gz: 7cab4ae8783329c570c05898fad3d39a42e7c3eda862a9f918c49966f8acda4b
3
+ metadata.gz: 904e2317257e40d33b87128a2dc52727f0e3deecf97ea1e3fd4a394b8bd2acfc
4
+ data.tar.gz: f1f7d1bdb6e5f5a2159f23aefde1c64f3548bd2a9948990ce9849d1a07c73558
5
5
  SHA512:
6
- metadata.gz: bb8d2d5d0155a1acf3308557826da93c2e23a47a705f1a06677d7702f2134dfd2605f3090c84fd7a428e241a8f30fb63bebe703196e11953fedcd42d03483afc
7
- data.tar.gz: 78d445477ae290ad06c9c75b2a0c47fb0e1131918a26771cc93cb8517704772a1a0df599e5322637ad47d5b821bf90695ca9c51645ae678b83e98be0bce2dbe5
6
+ metadata.gz: b0d15c0c42bed2199d26099462d71e2bc058afefd03b7f7e922c51773b8e774539f4419d400d72912bf2e598aa151de2ef2d763a482ef16e04d915afa7afff72
7
+ data.tar.gz: 7f4c54fff042a92776a42c76e057e0308d2bc3ba1902fcbca12f2ae8f67bffa834e4837a05b82090f8aed1066ca3f94b7d9179c340a905df8acd7cd54a3034fe
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- strongmind-platform-sdk (3.25.0)
4
+ strongmind-platform-sdk (3.26.0)
5
5
  asset_sync
6
6
  aws-sdk-cloudwatch
7
7
  aws-sdk-secretsmanager (~> 1.66)
@@ -203,7 +203,7 @@ GEM
203
203
  mutex_m (0.2.0)
204
204
  net-http (0.4.1)
205
205
  uri
206
- net-imap (0.5.5)
206
+ net-imap (0.5.6)
207
207
  date
208
208
  net-protocol
209
209
  net-pop (0.1.2)
@@ -436,6 +436,26 @@ module PlatformSdk
436
436
  end
437
437
  end
438
438
 
439
+ # renames a module to recompute module prerequisites.
440
+ def put_recompute_module_prerequisites(course_id:, module_id:, original_name:)
441
+ uri = "/api/v1/courses/#{course_id}/modules/#{module_id}"
442
+ response = @connection.put(uri) do |req|
443
+ req.headers['Content-Type'] = 'application/x-www-form-urlencoded'
444
+ req.body = { 'module[name]' => original_name }
445
+ end
446
+ handle_rate_limiting response
447
+ result = MultiJson.load response.body, symbolize_keys: true
448
+ if success?(response.status)
449
+ result
450
+ else
451
+ error_messages = String.new
452
+ result[:errors]&.each do |error|
453
+ error_messages << "#{error[:message]} "
454
+ end
455
+ raise "Error updating refreshing module prerequisite: #{error_messages}"
456
+ end
457
+ end
458
+
439
459
  # @param course_id [Integer]
440
460
  # @param module_id [Integer]
441
461
  # @param body [Hash]
@@ -10,11 +10,17 @@ module PlatformSdk
10
10
  @conn = Faraday.new(identity_base_url) do |conn|
11
11
  conn.request :authorization, 'Bearer', -> { @auth.auth_token }
12
12
  conn.request :retry
13
+ conn.request :json
13
14
  conn.response :json
14
15
  conn.adapter :net_http
15
16
  end
16
17
  end
17
18
 
19
+ def provision_identity(user_params)
20
+ response = @conn.post('/api/accounts/WithProfile', user_params)
21
+ response.body
22
+ end
23
+
18
24
  def with_rescue
19
25
  yield
20
26
  rescue ResourceNotFound => e
@@ -2,8 +2,8 @@
2
2
 
3
3
  module PlatformSdk
4
4
  MAJOR = 3
5
- MINOR = 25
6
- PATCH = 0
5
+ MINOR = 26
6
+ PATCH = 1
7
7
 
8
8
  VERSION = "#{PlatformSdk::MAJOR}.#{PlatformSdk::MINOR}.#{PlatformSdk::PATCH}"
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strongmind-platform-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.25.0
4
+ version: 3.26.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Platform Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-09 00:00:00.000000000 Z
11
+ date: 2025-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday