strongmind-platform-sdk 3.22.1 → 3.23.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: 9e26622af2ec26d4e97d517f053cdc8a077eaa80bc3e2c4c91143d4a0f871fe2
4
- data.tar.gz: 9ca6bcac51beb3ec94dedbe8518e46a381883a134f924249efa9668bcc35509a
3
+ metadata.gz: 2766d87e3bb7bc2b37f10b6441c2a688e0a6ae67bda75c1ddcf3a088c64055c2
4
+ data.tar.gz: 12e9481163dbcf28b8d5fa156c1bc9c89be9919ea757186c21fbeace37aa6195
5
5
  SHA512:
6
- metadata.gz: 34454fe1d43263ce569451d399ac6b29351cb95c743343275a08a65f06fee688a6542d36b8c0c156dff59f56003692e7a20c55177b7c43bfa38604b578955c7e
7
- data.tar.gz: 343f741b4485492ba1d103d19d681ed5bb18f8f248c6ef0f57534f840077e60a2a5a60c4a4c8192f35def49061c62b0d07c0329d0ec0e16a4b79701768e528b6
6
+ metadata.gz: f1c09d8a91009d678d95f8cd42262b42c3f968aecf814edfaf0f2b19fef6b40919946f8b576441656d0234b2a331c83d528371fdf1d6b6c77938c907461d9253
7
+ data.tar.gz: 6a7ab100cb5be82aa425b2d3be5b7efad7cba2eaf6c6ad9240c8a6602ddd9c3be8843a5f6eed98daca438d0ad20a4a199dd81f129aea97c266249626e3a241ae
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- strongmind-platform-sdk (3.22.0)
4
+ strongmind-platform-sdk (3.23.0)
5
5
  asset_sync
6
6
  aws-sdk-cloudwatch
7
7
  aws-sdk-secretsmanager (~> 1.66)
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PlatformSdk
4
+ module Jira
5
+ class ServiceManagementClient
6
+ attr_accessor :conn, :cloud_id, :team_id
7
+
8
+ def initialize(auth_email, auth_api_token, cloud_id, team_id, conn = nil)
9
+ raise ArgumentError, 'auth_email cannot be nil' unless auth_email
10
+ raise ArgumentError, 'auth_api_token cannot be nil' unless auth_api_token
11
+ raise ArgumentError, 'cloud_id cannot be nil' unless cloud_id
12
+ raise ArgumentError, 'team_id cannot be nil' unless team_id
13
+
14
+ @conn = conn || build_connection(auth_email, auth_api_token)
15
+ @cloud_id = cloud_id
16
+ @team_id = team_id
17
+ end
18
+
19
+ def build_connection(auth_email, auth_api_token)
20
+ Faraday.new(url: 'https://api.atlassian.com/jsm/ops/api') do |conn|
21
+ conn.request(:authorization, :basic, auth_email, auth_api_token)
22
+ conn.request :url_encoded
23
+ conn.request :retry
24
+ conn.response :raise_error
25
+ conn.adapter :net_http
26
+ conn.headers = headers
27
+ end
28
+ end
29
+
30
+ def headers
31
+ { 'Content-Type': 'application/json' }
32
+ end
33
+
34
+ def send_heartbeat(heartbeat_name)
35
+ @conn.get("#{cloud_id}/v1/teams/#{team_id}/heartbeats/ping?name=#{heartbeat_name}")
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "platform_sdk/jira/service_management_client"
4
+
5
+ module PlatformSdk
6
+ module Jira
7
+ class Error < StandardError; end
8
+ end
9
+ end
@@ -52,7 +52,7 @@ module PlatformSdk
52
52
  # @option opts [String] :filter The filtering rules to be applied when identifying the records to be supplied in the response message.
53
53
  # @option opts [Array<String>] :fields To identify the range of fields that should be supplied in the response message.
54
54
  # @return [Array<(UsersType, Integer, Hash)>] UsersType data, response status code and response headers
55
- %i[users classes courses enrollments demographics orgs line_items results].each do |records_type|
55
+ %i[users classes courses enrollments demographics orgs line_items results academic_sessions].each do |records_type|
56
56
  define_method(records_type) do |opts = {}|
57
57
  api = instance_variable_get "@#{records_type}_api"
58
58
  with_rescue_and_set_token do
@@ -2,7 +2,7 @@
2
2
 
3
3
  module PlatformSdk
4
4
  MAJOR = 3
5
- MINOR = 22
5
+ MINOR = 23
6
6
  PATCH = 1
7
7
 
8
8
  VERSION = "#{PlatformSdk::MAJOR}.#{PlatformSdk::MINOR}.#{PlatformSdk::PATCH}"
data/lib/platform_sdk.rb CHANGED
@@ -24,6 +24,7 @@ require "platform_sdk/asset_sync_initializer"
24
24
  require "platform_sdk/sidekiq/ecs_task_protection_middleware"
25
25
  require "platform_sdk/sidekiq"
26
26
  require "platform_sdk/jobs/send_noun_to_pipeline_job"
27
+ require "platform_sdk/jira"
27
28
 
28
29
  module PlatformSdk
29
30
  class Error < StandardError; 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.22.1
4
+ version: 3.23.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: 2024-11-27 00:00:00.000000000 Z
11
+ date: 2024-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -274,6 +274,8 @@ files:
274
274
  - lib/platform_sdk/id_mapper/models/partner.rb
275
275
  - lib/platform_sdk/identity.rb
276
276
  - lib/platform_sdk/identity/clients.rb
277
+ - lib/platform_sdk/jira.rb
278
+ - lib/platform_sdk/jira/service_management_client.rb
277
279
  - lib/platform_sdk/jobs/send_noun_to_pipeline_job.rb
278
280
  - lib/platform_sdk/learnosity_api.rb
279
281
  - lib/platform_sdk/learnosity_api/client.rb