dor-services-client 15.7.3 → 15.9.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: 92c1049e9991287e9be8799f2766565ef8ad4f23d7516ca057430a85f4afec0f
4
- data.tar.gz: 8dd70328062b224d7adfe1ed432e1e208fd16cc18d4769d8c474d72c91e0e572
3
+ metadata.gz: '0871dd95e3361050b2d3169851071fc136a0b407c90c1efaeb1f37069521f909'
4
+ data.tar.gz: cf37ad51860c4f972ba9286f8cec0f15e835a01ad71f79721fc0699c9834f80f
5
5
  SHA512:
6
- metadata.gz: 3aa23016ac5d463904b3cf0192823ca2b950e2bbe03cd888c3dba6d46f795f8a823e143b28f094d5c135050bd67dfa29e577b0609cbd8a442458fa5272e9011a
7
- data.tar.gz: f485042813842836615258272cfcc5927b98242cde718a6495904b153f6099c65a33c0add337ef1e30eef358776e50f26fb655699cff71f69532b04eb4f9f474
6
+ metadata.gz: 9a88faf6248beec20bb619926632dbbba797c87e462e79f3a51d821d277b22aa2db8446f87ed058761e5f3c252b66220f60b43bc49020e45d84ac2902a743c0e
7
+ data.tar.gz: 360fe1eb1986c6ae0180f4d7382294d052d030cf8b6ed13b0299abf3acb8b85d5e980fd5f231a367b23e467ed35a9552e5ccac3ad86e5364959663b71b3427bb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dor-services-client (15.7.3)
4
+ dor-services-client (15.9.0)
5
5
  activesupport (>= 7.0.0)
6
6
  cocina-models (~> 0.103.2)
7
7
  deprecation
@@ -29,9 +29,9 @@ GEM
29
29
  public_suffix (>= 2.0.2, < 7.0)
30
30
  ast (2.4.3)
31
31
  attr_extras (7.1.0)
32
- base64 (0.2.0)
33
- benchmark (0.4.0)
34
- bigdecimal (3.1.9)
32
+ base64 (0.3.0)
33
+ benchmark (0.4.1)
34
+ bigdecimal (3.2.1)
35
35
  byebug (12.0.0)
36
36
  cocina-models (0.103.2)
37
37
  activesupport
@@ -56,7 +56,7 @@ GEM
56
56
  activesupport
57
57
  diff-lcs (1.6.2)
58
58
  docile (1.4.1)
59
- drb (2.2.1)
59
+ drb (2.2.3)
60
60
  dry-core (1.1.0)
61
61
  concurrent-ruby (~> 1.0)
62
62
  logger
@@ -91,14 +91,14 @@ GEM
91
91
  net-http (>= 0.5.0)
92
92
  faraday-retry (2.3.1)
93
93
  faraday (~> 2.0)
94
- hashdiff (1.1.2)
94
+ hashdiff (1.2.0)
95
95
  i18n (1.14.7)
96
96
  concurrent-ruby (~> 1.0)
97
97
  ice_nine (0.11.2)
98
- json (2.11.3)
98
+ json (2.12.2)
99
99
  jsonpath (1.1.5)
100
100
  multi_json
101
- language_server-protocol (3.17.0.4)
101
+ language_server-protocol (3.17.0.5)
102
102
  lint_roller (1.1.0)
103
103
  logger (1.7.0)
104
104
  minitest (5.25.5)
@@ -123,23 +123,23 @@ GEM
123
123
  public_suffix (6.0.2)
124
124
  racc (1.8.1)
125
125
  rainbow (3.1.1)
126
- rake (13.2.1)
126
+ rake (13.3.0)
127
127
  regexp_parser (2.10.0)
128
128
  rexml (3.4.1)
129
- rspec (3.13.0)
129
+ rspec (3.13.1)
130
130
  rspec-core (~> 3.13.0)
131
131
  rspec-expectations (~> 3.13.0)
132
132
  rspec-mocks (~> 3.13.0)
133
- rspec-core (3.13.3)
133
+ rspec-core (3.13.4)
134
134
  rspec-support (~> 3.13.0)
135
- rspec-expectations (3.13.4)
135
+ rspec-expectations (3.13.5)
136
136
  diff-lcs (>= 1.2.0, < 2.0)
137
137
  rspec-support (~> 3.13.0)
138
- rspec-mocks (3.13.4)
138
+ rspec-mocks (3.13.5)
139
139
  diff-lcs (>= 1.2.0, < 2.0)
140
140
  rspec-support (~> 3.13.0)
141
- rspec-support (3.13.3)
142
- rubocop (1.75.5)
141
+ rspec-support (3.13.4)
142
+ rubocop (1.75.8)
143
143
  json (~> 2.3)
144
144
  language_server-protocol (~> 3.17.0.2)
145
145
  lint_roller (~> 1.1.0)
@@ -179,7 +179,7 @@ GEM
179
179
  addressable (>= 2.8.0)
180
180
  crack (>= 0.3.2)
181
181
  hashdiff (>= 0.4.0, < 2.0.0)
182
- zeitwerk (2.7.2)
182
+ zeitwerk (2.7.3)
183
183
 
184
184
  PLATFORMS
185
185
  arm64-darwin-23
@@ -202,4 +202,4 @@ DEPENDENCIES
202
202
  webmock
203
203
 
204
204
  BUNDLED WITH
205
- 2.6.8
205
+ 2.6.9
data/LICENSE CHANGED
@@ -1,14 +1,174 @@
1
- Copyright (c) 2018 by The Board of Trustees of the Leland Stanford
2
- Junior University. All rights reserved.
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
3
4
 
4
- Licensed under the Apache License, Version 2.0 (the "License"); you
5
- may not use this file except in compliance with the License. You
6
- may obtain a copy of the License at
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
6
 
8
- http://www.apache.org/licenses/LICENSE-2.0
7
+ 1. Definitions.
9
8
 
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
- implied. See the License for the specific language governing
14
- permissions and limitations under the License.
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
@@ -30,12 +30,12 @@ module Dor
30
30
  true
31
31
  end
32
32
 
33
+ # @param event_types [Array<String>,NilClass] an array of event types to filter by, or nil for all
33
34
  # @return [Array<Event>,NilClass] The events for an object or nil if 404
34
35
  # @raise [UnexpectedResponse] on an unsuccessful response from the server
35
- def list
36
- resp = connection.get do |req|
37
- req.url "#{api_version}/objects/#{object_identifier}/events"
38
- end
36
+ def list(event_types: nil)
37
+ resp = connection.get("#{api_version}/objects/#{object_identifier}/events",
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.7.3'
6
+ VERSION = '15.9.0'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dor-services-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 15.7.3
4
+ version: 15.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
8
8
  - Michael Giarlo
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-05-14 00:00:00.000000000 Z
11
+ date: 2025-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -270,7 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
270
  - !ruby/object:Gem::Version
271
271
  version: '0'
272
272
  requirements: []
273
- rubygems_version: 3.6.2
273
+ rubygems_version: 3.6.3
274
274
  specification_version: 4
275
275
  summary: A client for dor-services-app
276
276
  test_files: []