dor-services-client 15.15.2 → 15.16.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: 664c758fdb6930cfa0c0756f6282d6268b0174ed59a23266006cc4ca75e366a1
4
- data.tar.gz: e723073e8376db61491580fe0e02d3a8d3affd146387743f24ffdff2c8d42521
3
+ metadata.gz: ab50c5a851df383096d632a859cbac9a0afcdbbb54f95910ab31a266b044e6f4
4
+ data.tar.gz: 233523b1995ef21dadb3aba64708bc1b8512650c18b33a1500602340a73a0638
5
5
  SHA512:
6
- metadata.gz: efc9dfa6cef3526a8a9af187b851c2344fb2508880364ee1825c3df74a1812317a70e1073d50732ad25829796c12726e2c6a8bfff5988c6d7b7698e7df366d69
7
- data.tar.gz: f7de64fac118e5cfaaca0b73449baa6f72f1431ca9cd220ba7edf1cd154233a5e9da16824c00e8ad0b75ad0e7280ddd71e64fa5f993cdfa3f49ca6be8e9c6eaa
6
+ metadata.gz: 81ebf90e472f4a6548df3a8282a9a95de3c4177508cab234b31cbf8c66eed9c9af9d2ccc889e6e12a743f8bb92a14d3f4ddf68d43cee24645b65e08fb46b7494
7
+ data.tar.gz: e5e4a931b65ecd85a4421f9df55b96a2511ba620088642462c455dcae872d9ba427d4e03f9016ad10d52936aad1efce7c32ac73187b4ed8594c02c0d064bb079
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dor-services-client (15.15.2)
4
+ dor-services-client (15.16.0)
5
5
  activesupport (>= 7.0.0)
6
6
  cocina-models (~> 0.104.1)
7
7
  deprecation
data/README.md CHANGED
@@ -178,6 +178,8 @@ Dor::Services::Client.administrative_tags.search(q: 'Project')
178
178
 
179
179
  # Get a list of workflow templates
180
180
  Dor::Services::Client.workflows.templates
181
+ # Show a workflow template (e.g., to view its list of steps)
182
+ Dor::Services::Client.workflows.template('accessionWF')
181
183
  ```
182
184
 
183
185
  ## Asynchronous results
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '15.15.2'
6
+ VERSION = '15.16.0'
7
7
  end
8
8
  end
9
9
  end
@@ -8,9 +8,20 @@ module Dor
8
8
  # Retrieves a list of workflow template name
9
9
  # @return [Array<String>] the list of templates
10
10
  def templates
11
- resp = connection.post do |req|
11
+ resp = connection.get do |req|
12
12
  req.url "#{api_version}/workflow_templates"
13
- req.headers['Content-Type'] = 'application/json'
13
+ req.headers['Accept'] = 'application/json'
14
+ end
15
+ raise_exception_based_on_response!(resp) unless resp.success?
16
+
17
+ JSON.parse(resp.body)
18
+ end
19
+
20
+ # Retrieves a workflow template given a workflow name
21
+ # @return [Hash] the set of processes within a template
22
+ def template(workflow_name)
23
+ resp = connection.get do |req|
24
+ req.url "#{api_version}/workflow_templates/#{workflow_name}"
14
25
  req.headers['Accept'] = 'application/json'
15
26
  end
16
27
  raise_exception_based_on_response!(resp) unless resp.success?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dor-services-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 15.15.2
4
+ version: 15.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne