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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b706314b20512aac59b60e0b5ed725ca1dc5800c8b9839b5a23437fb00d531c
|
4
|
+
data.tar.gz: 268af5981c74b5b3894cf4714b2d7c01b23fdca1078202c612a6b7ffe33a229f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66eb41e6bcb8124d02b9988456f03e8383cf68485c9d537d7502f43888d9ccf891c64d31e66fbc7948a8dc768637bcfd2922531168c2d1f954e519862993230f
|
7
|
+
data.tar.gz: 1e1b20670e6f8a134a785fa2015a3f79c0ac7a6fd757ac7c8e657c9b3b97830ca86ea59f731b80af9049d57cb85b46355ae29dd83d2985e90c42c0c850499975
|
data/Gemfile.lock
CHANGED
@@ -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
|
-
{
|
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
|
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]
|
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.
|
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-
|
12
|
+
date: 2025-06-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|