cocina-models 0.49.0 → 0.50.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 422ee3a70d8d672a70b4a2125ada5a107941a963c6023e2905dd3f8c893b6ec4
4
- data.tar.gz: d1dbe1479ea5ee1366e621eb8fb44663d4540cfbd84cf02e97ced3017c36bb93
3
+ metadata.gz: a55d992f499fd8f12826d186e7cca1d8ac9eea0fdc78863e8edcee8d04eb588e
4
+ data.tar.gz: 604b254a57b8760b65e1376d71bce54171ed6b539a013ad6efbd09e6a9305380
5
5
  SHA512:
6
- metadata.gz: ce12a8eebecba8a9b4fbfb8275feced7bffd9439c28c171769995495afb4ecfbcdc5aded9ec86a188825684151dc248958c04c5116df3923a015ad4f29e1e283
7
- data.tar.gz: b2cc97124a3c86da0134bcac5987664411cd62473886d8fcc8d1aa6ae11d91b0e6e0ea4f153e15ceb8ad2b4068c29403f45c86df97ed433cbce6e05a8eb0aeeb
6
+ metadata.gz: c0e746e2ba9ce5c02a7653f1fecfa833e59683f0fda8104d9caeec998cb6bb95c51d782f69eb3b2f80508e5f111c259ecd14bfdaa21fd7c1961b743c056b64c5
7
+ data.tar.gz: f24d9a01b2f1fbb1d4fad9d77c2e9b281f4c026ecedaa7ad0ab986302f61fea21b1349f6327a4eeb1b45a6293c3c9659a703ab186da58d8759de7e714ac93db5
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class AccessRole < Struct
6
+ # Name of role
7
+ attribute :name, Types::Strict::String.enum('sdr-administrator', 'sdr-viewer', 'dor-apo-manager', 'hydrus-collection-creator', 'hydrus-collection-manager', 'hydrus-collection-depositor', 'hydrus-collection-item-depositor', 'hydrus-collection-reviewer', 'hydrus-collection-viewer')
8
+ attribute :members, Types::Strict::Array.of(AccessRoleMember).default([].freeze)
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class AccessRoleMember < Struct
6
+ include Checkable
7
+
8
+ TYPES = %w[sunetid
9
+ workgroup].freeze
10
+
11
+ # Name of role
12
+ attribute :type, Types::Strict::String.enum(*AccessRoleMember::TYPES)
13
+ attribute :identifier, Types::Strict::String
14
+ end
15
+ end
16
+ end
@@ -4,8 +4,9 @@ module Cocina
4
4
  module Models
5
5
  class AdminPolicyAdministrative < Struct
6
6
  attribute :defaultObjectRights, Types::Strict::String.default('<?xml version="1.0" encoding="UTF-8"?><rightsMetadata><access type="discover"><machine><world/></machine></access><access type="read"><machine><world/></machine></access><use><human type="useAndReproduction"/><human type="creativeCommons"/><machine type="creativeCommons" uri=""/><human type="openDataCommons"/><machine type="openDataCommons" uri=""/></use><copyright><human/></copyright></rightsMetadata>').meta(omittable: true)
7
- attribute :registrationWorkflow, Types::Strict::String.meta(omittable: true)
7
+ attribute :registrationWorkflow, Types::Strict::Array.of(Types::Strict::String).meta(omittable: true)
8
8
  attribute :collectionsForRegistration, Types::Strict::Array.of(Types::Strict::String).meta(omittable: true)
9
+ attribute :roles, Types::Strict::Array.of(AccessRole).meta(omittable: true)
9
10
  attribute :hasAdminPolicy, Types::Strict::String
10
11
  end
11
12
  end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cocina
4
+ module Models
5
+ class DescriptiveParallelEvent < Struct
6
+ # Code representing the standard or encoding.
7
+ attribute :code, Types::Strict::String.meta(omittable: true)
8
+ # URI for the standard or encoding.
9
+ attribute :uri, Types::Strict::String.meta(omittable: true)
10
+ # String describing the standard or encoding.
11
+ attribute :value, Types::Strict::String.meta(omittable: true)
12
+ attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
13
+ # The version of the standard or encoding.
14
+ attribute :version, Types::Strict::String.meta(omittable: true)
15
+ attribute :source, Source.optional.meta(omittable: true)
16
+ attribute :valueScript, Standard.optional.meta(omittable: true)
17
+ attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
18
+ # Description of the event (creation, publication, etc.).
19
+ attribute :type, Types::Strict::String.meta(omittable: true)
20
+ # The preferred display label to use for the event in access systems.
21
+ attribute :displayLabel, Types::Strict::String.meta(omittable: true)
22
+ attribute :date, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
23
+ attribute :contributor, Types::Strict::Array.of(Contributor).meta(omittable: true)
24
+ attribute :location, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
25
+ attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
26
+ end
27
+ end
28
+ end
@@ -4,7 +4,6 @@ module Cocina
4
4
  module Models
5
5
  class Event < Struct
6
6
  attribute :structuredValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
7
- attribute :parallelValue, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
8
7
  # Description of the event (creation, publication, etc.).
9
8
  attribute :type, Types::Strict::String.meta(omittable: true)
10
9
  # The preferred display label to use for the event in access systems.
@@ -14,6 +13,7 @@ module Cocina
14
13
  attribute :location, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
15
14
  attribute :identifier, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
16
15
  attribute :note, Types::Strict::Array.of(DescriptiveValue).meta(omittable: true)
16
+ attribute :parallelEvent, Types::Strict::Array.of(DescriptiveParallelEvent).meta(omittable: true)
17
17
  end
18
18
  end
19
19
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.49.0'
5
+ VERSION = '0.50.0'
6
6
  end
7
7
  end
data/openapi.yml CHANGED
@@ -118,6 +118,48 @@ components:
118
118
  - 'art'
119
119
  - 'hoover'
120
120
  - 'm&m'
121
+ AccessRole:
122
+ description: Access role conferred by an AdminPolicy to objects within it. (used by Argo)
123
+ type: object
124
+ additionalProperties: false
125
+ properties:
126
+ name:
127
+ description: Name of role
128
+ type: string
129
+ enum:
130
+ - 'sdr-administrator'
131
+ - 'sdr-viewer'
132
+ - 'dor-apo-manager'
133
+ - 'hydrus-collection-creator'
134
+ - 'hydrus-collection-manager'
135
+ - 'hydrus-collection-depositor'
136
+ - 'hydrus-collection-item-depositor'
137
+ - 'hydrus-collection-reviewer'
138
+ - 'hydrus-collection-viewer'
139
+ members:
140
+ description: The users and groups that are members of the role
141
+ type: array
142
+ items:
143
+ $ref: '#/components/schemas/AccessRoleMember'
144
+ required:
145
+ - members
146
+ - name
147
+ AccessRoleMember:
148
+ description: Represents a user or group that is a member of an AccessRole
149
+ type: object
150
+ additionalProperties: false
151
+ properties:
152
+ type:
153
+ description: Name of role
154
+ type: string
155
+ enum:
156
+ - 'sunetid'
157
+ - 'workgroup'
158
+ identifier:
159
+ type: string
160
+ required:
161
+ - identifier
162
+ - type
121
163
  Administrative:
122
164
  type: object
123
165
  additionalProperties: false
@@ -161,6 +203,7 @@ components:
161
203
  - type
162
204
  - version
163
205
  AdminPolicyAdministrative:
206
+ description: Administrative properties for an AdminPolicy
164
207
  type: object
165
208
  additionalProperties: false
166
209
  properties:
@@ -168,12 +211,20 @@ components:
168
211
  type: string
169
212
  default: <?xml version="1.0" encoding="UTF-8"?><rightsMetadata><access type="discover"><machine><world/></machine></access><access type="read"><machine><world/></machine></access><use><human type="useAndReproduction"/><human type="creativeCommons"/><machine type="creativeCommons" uri=""/><human type="openDataCommons"/><machine type="openDataCommons" uri=""/></use><copyright><human/></copyright></rightsMetadata>
170
213
  registrationWorkflow:
171
- type: string
214
+ description: When you register an item with this admin policy, these are the workflows that are available.
215
+ type: array
216
+ items:
217
+ type: string
172
218
  collectionsForRegistration:
173
219
  description: When you register an item with this admin policy, these are the collections that are available.
174
220
  type: array
175
221
  items:
176
222
  type: string
223
+ roles:
224
+ description: The access roles conferred by this AdminPolicy (used by Argo)
225
+ type: array
226
+ items:
227
+ $ref: '#/components/schemas/AccessRole'
177
228
  hasAdminPolicy:
178
229
  type: string
179
230
  required:
@@ -521,6 +572,47 @@ components:
521
572
  type: array
522
573
  items:
523
574
  $ref: "#/components/schemas/DescriptiveValue"
575
+ DescriptiveParallelEvent:
576
+ description: Value model for multiple representations of information about the same event (e.g. in different languages).
577
+ type: object
578
+ additionalProperties: false
579
+ allOf:
580
+ - $ref: "#/components/schemas/DescriptiveValueLanguage"
581
+ - $ref: "#/components/schemas/DescriptiveStructuredValue"
582
+ - type: object
583
+ additionalProperties: false
584
+ properties:
585
+ type:
586
+ description: Description of the event (creation, publication, etc.).
587
+ type: string
588
+ displayLabel:
589
+ description: The preferred display label to use for the event in access systems.
590
+ type: string
591
+ date:
592
+ description: Dates associated with the event.
593
+ type: array
594
+ items:
595
+ $ref: "#/components/schemas/DescriptiveValue"
596
+ contributor:
597
+ description: Contributors associated with the event.
598
+ type: array
599
+ items:
600
+ $ref: "#/components/schemas/Contributor"
601
+ location:
602
+ description: Locations associated with the event.
603
+ type: array
604
+ items:
605
+ $ref: "#/components/schemas/DescriptiveValue"
606
+ identifier:
607
+ description: Identifiers and URIs associated with the event.
608
+ type: array
609
+ items:
610
+ $ref: "#/components/schemas/DescriptiveValue"
611
+ note:
612
+ description: Other information about the event.
613
+ type: array
614
+ items:
615
+ $ref: "#/components/schemas/DescriptiveValue"
524
616
  DescriptiveParallelValue:
525
617
  description: Value model for multiple representations of the same information (e.g. in different languages).
526
618
  type: object
@@ -743,7 +835,6 @@ components:
743
835
  additionalProperties: false
744
836
  allOf:
745
837
  - $ref: "#/components/schemas/DescriptiveStructuredValue"
746
- - $ref: "#/components/schemas/DescriptiveParallelValue"
747
838
  - type: object
748
839
  additionalProperties: false
749
840
  properties:
@@ -778,6 +869,11 @@ components:
778
869
  type: array
779
870
  items:
780
871
  $ref: "#/components/schemas/DescriptiveValue"
872
+ parallelEvent:
873
+ description: For multiple representations of information about the same event (e.g. in different languages)
874
+ type: array
875
+ items:
876
+ $ref: "#/components/schemas/DescriptiveParallelEvent"
781
877
  File:
782
878
  description: Binaries that are the basis of what our domain manages. Binaries here do not include metadata files generated for the domain's own management purposes.
783
879
  type: object
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocina-models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.49.0
4
+ version: 0.50.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-26 00:00:00.000000000 Z
11
+ date: 2021-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -254,6 +254,8 @@ files:
254
254
  - lib/cocina/generator/vocab.rb
255
255
  - lib/cocina/models.rb
256
256
  - lib/cocina/models/access.rb
257
+ - lib/cocina/models/access_role.rb
258
+ - lib/cocina/models/access_role_member.rb
257
259
  - lib/cocina/models/admin_policy.rb
258
260
  - lib/cocina/models/admin_policy_administrative.rb
259
261
  - lib/cocina/models/administrative.rb
@@ -269,6 +271,7 @@ files:
269
271
  - lib/cocina/models/descriptive_basic_value.rb
270
272
  - lib/cocina/models/descriptive_geographic_metadata.rb
271
273
  - lib/cocina/models/descriptive_grouped_value.rb
274
+ - lib/cocina/models/descriptive_parallel_event.rb
272
275
  - lib/cocina/models/descriptive_parallel_value.rb
273
276
  - lib/cocina/models/descriptive_structured_value.rb
274
277
  - lib/cocina/models/descriptive_value.rb
@@ -326,7 +329,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
326
329
  - !ruby/object:Gem::Version
327
330
  version: '0'
328
331
  requirements: []
329
- rubygems_version: 3.0.3
332
+ rubygems_version: 3.1.2
330
333
  signing_key:
331
334
  specification_version: 4
332
335
  summary: Data models for the SDR