dor-services-client 15.8.0 → 15.9.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: 69b7435cefebe8517f00e5955cc845e7062c57720600139a62e80fa73c5dac39
4
- data.tar.gz: d30c80f3a34843f8fba79ee6d53f8d0b9491053062388bb4c6801bd40dfbd5a7
3
+ metadata.gz: 7b706314b20512aac59b60e0b5ed725ca1dc5800c8b9839b5a23437fb00d531c
4
+ data.tar.gz: 268af5981c74b5b3894cf4714b2d7c01b23fdca1078202c612a6b7ffe33a229f
5
5
  SHA512:
6
- metadata.gz: 2f7a15823eee50208682bf9b344ade91e3aad0a4e32a9b677c6919ddd3fe3922dcbcc5e9049dc9ac6447bdb202ae2c42f76c965c802ce95db133b2bca7337da9
7
- data.tar.gz: 2a8241c124fc655a0464b6fcf1fe45f1756cdedff9cc0a5ad6786cacff6993df5afd0b55db3d23ba12feea6cbc77eb1710e6d8310abb347e76fae4919be2adbc
6
+ metadata.gz: 66eb41e6bcb8124d02b9988456f03e8383cf68485c9d537d7502f43888d9ccf891c64d31e66fbc7948a8dc768637bcfd2922531168c2d1f954e519862993230f
7
+ data.tar.gz: 1e1b20670e6f8a134a785fa2015a3f79c0ac7a6fd757ac7c8e657c9b3b97830ca86ea59f731b80af9049d57cb85b46355ae29dd83d2985e90c42c0c850499975
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dor-services-client (15.8.0)
4
+ dor-services-client (15.9.1)
5
5
  activesupport (>= 7.0.0)
6
6
  cocina-models (~> 0.103.2)
7
7
  deprecation
@@ -35,7 +35,7 @@ module Dor
35
35
  # @raise [UnexpectedResponse] on an unsuccessful response from the server
36
36
  def list(event_types: nil)
37
37
  resp = connection.get("#{api_version}/objects/#{object_identifier}/events",
38
- { 'event_types[]': event_types }.compact)
38
+ { event_types: event_types }.compact)
39
39
  return response_to_models(resp) if resp.success?
40
40
  return if resp.status == 404
41
41
 
@@ -29,13 +29,14 @@ module Dor
29
29
  # @param [Cocina::Models::DROWithMetadata|CollectionWithMetadata|AdminPolicyWithMetadata|DRO|Collection|AdminPolicy] params model object
30
30
  # @param [boolean] skip_lock do not provide ETag
31
31
  # @param [boolean] validate validate the response object
32
+ # @param [Hash] event_data additional event data to be added to the update object event
32
33
  # @raise [NotFoundResponse] when the response is a 404 (object not found)
33
34
  # @raise [UnexpectedResponse] when the response is not successful.
34
35
  # @raise [BadRequestError] when ETag not provided.
35
36
  # @return [Cocina::Models::DROWithMetadata,Cocina::Models::CollectionWithMetadata,Cocina::Models::AdminPolicyWithMetadata] the returned model
36
37
  # rubocop:disable Metrics/AbcSize
37
38
  # rubocop:disable Metrics/MethodLength
38
- def update(params:, skip_lock: false, validate: false)
39
+ def update(params:, skip_lock: false, validate: false, event_data: {})
39
40
  raise ArgumentError, 'Cocina object not provided.' unless params.respond_to?(:externalIdentifier)
40
41
 
41
42
  # Raised if Cocina::Models::*WithMetadata not provided.
@@ -43,6 +44,7 @@ module Dor
43
44
 
44
45
  resp = connection.patch do |req|
45
46
  req.url object_path
47
+ req.params = { event_data: event_data.to_json }
46
48
  req.headers['Content-Type'] = 'application/json'
47
49
  # asking the service to return JSON (else it'll be plain text)
48
50
  req.headers['Accept'] = 'application/json'
@@ -5,7 +5,7 @@ require 'deprecation'
5
5
  module Dor
6
6
  module Services
7
7
  class Client
8
- # API calls that are about a repository objects
8
+ # API calls that are about repository objects
9
9
  class Objects < VersionedService
10
10
  # Creates a new object in DOR
11
11
  # @param params [Cocina::Models::RequestDRO,Cocina::Models::RequestCollection,Cocina::Models::RequestAdminPolicy]
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '15.8.0'
6
+ VERSION = '15.9.1'
7
7
  end
8
8
  end
9
9
  end
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.8.0
4
+ version: 15.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2025-06-03 00:00:00.000000000 Z
12
+ date: 2025-06-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport