openlayer 0.16.0 → 0.17.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.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/openlayer/models/background_task_retrieve_response.rb +4 -0
  5. data/lib/openlayer/models/governance/framework_create_response.rb +7 -2
  6. data/lib/openlayer/models/governance/framework_export_params.rb +7 -2
  7. data/lib/openlayer/models/governance/framework_list_project_rule_stats_response.rb +2 -0
  8. data/lib/openlayer/models/governance/framework_list_response.rb +7 -2
  9. data/lib/openlayer/models/governance/framework_list_rules_response.rb +69 -29
  10. data/lib/openlayer/models/governance/framework_retrieve_response.rb +7 -2
  11. data/lib/openlayer/models/governance/framework_update_response.rb +7 -2
  12. data/lib/openlayer/models/governance/frameworks/document_list_response.rb +54 -28
  13. data/lib/openlayer/models/governance/frameworks/document_retrieve_response.rb +54 -28
  14. data/lib/openlayer/models/governance/frameworks/section_list_rules_response.rb +69 -29
  15. data/lib/openlayer/models/governance/frameworks/subsection_list_rules_response.rb +69 -29
  16. data/lib/openlayer/models/governance/rule_create_params.rb +21 -12
  17. data/lib/openlayer/models/governance/rule_create_response.rb +68 -29
  18. data/lib/openlayer/models/governance/rule_list_response.rb +69 -29
  19. data/lib/openlayer/models/governance/rule_result_create_evidence_params.rb +2 -1
  20. data/lib/openlayer/models/governance/rule_result_create_evidence_response.rb +6 -1
  21. data/lib/openlayer/models/governance/rule_result_list_evidence_response.rb +6 -1
  22. data/lib/openlayer/models/governance/rule_result_list_response.rb +34 -13
  23. data/lib/openlayer/models/governance/rule_result_retrieve_response.rb +34 -13
  24. data/lib/openlayer/models/governance/rule_result_update_params.rb +26 -10
  25. data/lib/openlayer/models/governance/rule_result_update_response.rb +34 -13
  26. data/lib/openlayer/models/governance/rule_retrieve_response.rb +68 -29
  27. data/lib/openlayer/models/governance/rule_stat_retrieve_response.rb +4 -0
  28. data/lib/openlayer/models/governance/rule_tag_list_response.rb +5 -2
  29. data/lib/openlayer/models/governance/rule_update_params.rb +2 -1
  30. data/lib/openlayer/models/governance/rule_update_response.rb +68 -29
  31. data/lib/openlayer/models/inference_pipeline_retrieve_sessions_response.rb +3 -0
  32. data/lib/openlayer/models/inference_pipeline_retrieve_users_response.rb +3 -0
  33. data/lib/openlayer/models/storage/presigned_url_retrieve_params.rb +6 -2
  34. data/lib/openlayer/models/workspaces/api_key_create_params.rb +17 -1
  35. data/lib/openlayer/models/workspaces/api_key_create_response.rb +73 -3
  36. data/lib/openlayer/models/workspaces/api_key_delete_params.rb +28 -0
  37. data/lib/openlayer/models/workspaces/api_key_list_params.rb +22 -0
  38. data/lib/openlayer/models/workspaces/api_key_list_response.rb +134 -0
  39. data/lib/openlayer/models/workspaces/api_key_retrieve_params.rb +28 -0
  40. data/lib/openlayer/models/workspaces/api_key_retrieve_response.rb +131 -0
  41. data/lib/openlayer/models/workspaces/api_key_rotate_params.rb +56 -0
  42. data/lib/openlayer/models/workspaces/api_key_rotate_response.rb +131 -0
  43. data/lib/openlayer/models/workspaces/api_key_update_params.rb +38 -0
  44. data/lib/openlayer/models/workspaces/api_key_update_response.rb +131 -0
  45. data/lib/openlayer/resources/background_tasks.rb +1 -5
  46. data/lib/openlayer/resources/commits.rb +1 -1
  47. data/lib/openlayer/resources/governance/frameworks/documents.rb +1 -9
  48. data/lib/openlayer/resources/governance/frameworks/sections.rb +1 -5
  49. data/lib/openlayer/resources/governance/frameworks/subsections.rb +1 -5
  50. data/lib/openlayer/resources/governance/frameworks.rb +10 -62
  51. data/lib/openlayer/resources/governance/rule_results.rb +8 -33
  52. data/lib/openlayer/resources/governance/rule_stats.rb +1 -5
  53. data/lib/openlayer/resources/governance/rule_tags.rb +0 -4
  54. data/lib/openlayer/resources/governance/rules.rb +7 -38
  55. data/lib/openlayer/resources/inference_pipelines/rows.rb +4 -5
  56. data/lib/openlayer/resources/inference_pipelines.rb +5 -14
  57. data/lib/openlayer/resources/projects/tests.rb +3 -3
  58. data/lib/openlayer/resources/storage/presigned_url.rb +5 -11
  59. data/lib/openlayer/resources/tests.rb +1 -4
  60. data/lib/openlayer/resources/workspaces/api_keys.rb +146 -2
  61. data/lib/openlayer/resources/workspaces/invites.rb +1 -1
  62. data/lib/openlayer/resources/workspaces.rb +1 -1
  63. data/lib/openlayer/version.rb +1 -1
  64. data/lib/openlayer.rb +9 -0
  65. data/rbi/openlayer/models/background_task_retrieve_response.rbi +3 -0
  66. data/rbi/openlayer/models/governance/framework_create_response.rbi +7 -2
  67. data/rbi/openlayer/models/governance/framework_export_params.rbi +6 -2
  68. data/rbi/openlayer/models/governance/framework_list_project_rule_stats_response.rbi +1 -0
  69. data/rbi/openlayer/models/governance/framework_list_response.rbi +7 -2
  70. data/rbi/openlayer/models/governance/framework_list_rules_response.rbi +70 -34
  71. data/rbi/openlayer/models/governance/framework_retrieve_response.rbi +7 -2
  72. data/rbi/openlayer/models/governance/framework_update_response.rbi +7 -2
  73. data/rbi/openlayer/models/governance/frameworks/document_list_response.rbi +76 -38
  74. data/rbi/openlayer/models/governance/frameworks/document_retrieve_response.rbi +76 -38
  75. data/rbi/openlayer/models/governance/frameworks/section_list_rules_response.rbi +70 -34
  76. data/rbi/openlayer/models/governance/frameworks/subsection_list_rules_response.rbi +70 -34
  77. data/rbi/openlayer/models/governance/rule_create_params.rbi +32 -17
  78. data/rbi/openlayer/models/governance/rule_create_response.rbi +70 -34
  79. data/rbi/openlayer/models/governance/rule_list_response.rbi +70 -34
  80. data/rbi/openlayer/models/governance/rule_result_create_evidence_params.rbi +4 -2
  81. data/rbi/openlayer/models/governance/rule_result_create_evidence_response.rbi +7 -2
  82. data/rbi/openlayer/models/governance/rule_result_list_evidence_response.rbi +7 -2
  83. data/rbi/openlayer/models/governance/rule_result_list_response.rbi +26 -13
  84. data/rbi/openlayer/models/governance/rule_result_retrieve_response.rbi +26 -13
  85. data/rbi/openlayer/models/governance/rule_result_update_params.rbi +18 -10
  86. data/rbi/openlayer/models/governance/rule_result_update_response.rbi +26 -13
  87. data/rbi/openlayer/models/governance/rule_retrieve_response.rbi +70 -34
  88. data/rbi/openlayer/models/governance/rule_stat_retrieve_response.rbi +3 -0
  89. data/rbi/openlayer/models/governance/rule_tag_list_response.rbi +4 -2
  90. data/rbi/openlayer/models/governance/rule_update_params.rbi +4 -2
  91. data/rbi/openlayer/models/governance/rule_update_response.rbi +70 -34
  92. data/rbi/openlayer/models/inference_pipeline_retrieve_sessions_response.rbi +2 -0
  93. data/rbi/openlayer/models/inference_pipeline_retrieve_users_response.rbi +2 -0
  94. data/rbi/openlayer/models/storage/presigned_url_retrieve_params.rbi +4 -2
  95. data/rbi/openlayer/models/workspaces/api_key_create_params.rbi +18 -0
  96. data/rbi/openlayer/models/workspaces/api_key_create_response.rbi +117 -5
  97. data/rbi/openlayer/models/workspaces/api_key_delete_params.rbi +48 -0
  98. data/rbi/openlayer/models/workspaces/api_key_list_params.rbi +40 -0
  99. data/rbi/openlayer/models/workspaces/api_key_list_response.rbi +202 -0
  100. data/rbi/openlayer/models/workspaces/api_key_retrieve_params.rbi +48 -0
  101. data/rbi/openlayer/models/workspaces/api_key_retrieve_response.rbi +194 -0
  102. data/rbi/openlayer/models/workspaces/api_key_rotate_params.rbi +85 -0
  103. data/rbi/openlayer/models/workspaces/api_key_rotate_response.rbi +194 -0
  104. data/rbi/openlayer/models/workspaces/api_key_update_params.rbi +60 -0
  105. data/rbi/openlayer/models/workspaces/api_key_update_response.rbi +194 -0
  106. data/rbi/openlayer/resources/background_tasks.rbi +1 -5
  107. data/rbi/openlayer/resources/commits.rbi +1 -1
  108. data/rbi/openlayer/resources/governance/frameworks/documents.rbi +1 -9
  109. data/rbi/openlayer/resources/governance/frameworks/sections.rbi +1 -5
  110. data/rbi/openlayer/resources/governance/frameworks/subsections.rbi +1 -5
  111. data/rbi/openlayer/resources/governance/frameworks.rbi +10 -63
  112. data/rbi/openlayer/resources/governance/rule_results.rbi +9 -35
  113. data/rbi/openlayer/resources/governance/rule_stats.rbi +1 -5
  114. data/rbi/openlayer/resources/governance/rule_tags.rbi +0 -4
  115. data/rbi/openlayer/resources/governance/rules.rbi +20 -44
  116. data/rbi/openlayer/resources/inference_pipelines/rows.rbi +4 -5
  117. data/rbi/openlayer/resources/inference_pipelines.rbi +5 -14
  118. data/rbi/openlayer/resources/projects/tests.rbi +3 -3
  119. data/rbi/openlayer/resources/storage/presigned_url.rbi +4 -12
  120. data/rbi/openlayer/resources/tests.rbi +1 -4
  121. data/rbi/openlayer/resources/workspaces/api_keys.rbi +110 -1
  122. data/rbi/openlayer/resources/workspaces/invites.rbi +1 -1
  123. data/rbi/openlayer/resources/workspaces.rbi +1 -1
  124. data/sig/openlayer/models/workspaces/api_key_create_params.rbs +5 -1
  125. data/sig/openlayer/models/workspaces/api_key_create_response.rbs +42 -3
  126. data/sig/openlayer/models/workspaces/api_key_delete_params.rbs +30 -0
  127. data/sig/openlayer/models/workspaces/api_key_list_params.rbs +25 -0
  128. data/sig/openlayer/models/workspaces/api_key_list_response.rbs +91 -0
  129. data/sig/openlayer/models/workspaces/api_key_retrieve_params.rbs +30 -0
  130. data/sig/openlayer/models/workspaces/api_key_retrieve_response.rbs +86 -0
  131. data/sig/openlayer/models/workspaces/api_key_rotate_params.rbs +45 -0
  132. data/sig/openlayer/models/workspaces/api_key_rotate_response.rbs +86 -0
  133. data/sig/openlayer/models/workspaces/api_key_update_params.rbs +34 -0
  134. data/sig/openlayer/models/workspaces/api_key_update_response.rbs +86 -0
  135. data/sig/openlayer/resources/workspaces/api_keys.rbs +33 -0
  136. metadata +29 -2
@@ -0,0 +1,194 @@
1
+ # typed: strong
2
+
3
+ module Openlayer
4
+ module Models
5
+ module Workspaces
6
+ class APIKeyRotateResponse < Openlayer::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Openlayer::Models::Workspaces::APIKeyRotateResponse,
11
+ Openlayer::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # When the key stops authenticating. `null` means the key never expires. Set when
16
+ # the key is created or rotated, and must be in the future. When the request is
17
+ # authenticated with an API key that expires, the result can't be later than that
18
+ # key's expiry. On create, omit it to inherit that expiry. On rotate, omit it to
19
+ # keep the current one. It can't be changed with an update; rotate the key
20
+ # instead.
21
+ sig { returns(T.nilable(Time)) }
22
+ attr_accessor :expires_at
23
+
24
+ # The API key name.
25
+ sig { returns(T.nilable(String)) }
26
+ attr_accessor :name
27
+
28
+ # The API key id.
29
+ sig { returns(String) }
30
+ attr_accessor :id
31
+
32
+ # The API key creation date.
33
+ sig { returns(Time) }
34
+ attr_accessor :date_created
35
+
36
+ # The API key last use date.
37
+ sig { returns(T.nilable(Time)) }
38
+ attr_accessor :date_last_used
39
+
40
+ # The API key last update date.
41
+ sig { returns(Time) }
42
+ attr_accessor :date_updated
43
+
44
+ # An obfuscated hint of the API key value. When a key is created or rotated this
45
+ # also holds the full secret, for backward compatibility; prefer `secret`.
46
+ sig { returns(String) }
47
+ attr_accessor :secure_key
48
+
49
+ # The key's lifecycle state. `active`: the current secret authenticates.
50
+ # `rotating`: the key was rotated and the previous secret still authenticates
51
+ # until `previousKeyExpiresAt`. `expired`: `expiresAt` has passed, no secret
52
+ # authenticates, and the key can't be rotated.
53
+ sig do
54
+ returns(
55
+ Openlayer::Models::Workspaces::APIKeyRotateResponse::Status::TaggedSymbol
56
+ )
57
+ end
58
+ attr_accessor :status
59
+
60
+ # When the key was last rotated.
61
+ sig { returns(T.nilable(Time)) }
62
+ attr_accessor :last_rotated_at
63
+
64
+ # While `status` is `rotating`, when the previous secret stops authenticating.
65
+ sig { returns(T.nilable(Time)) }
66
+ attr_accessor :previous_key_expires_at
67
+
68
+ # The full API key. Only present in the response that creates or rotates the key,
69
+ # and never shown again.
70
+ sig { returns(T.nilable(String)) }
71
+ attr_reader :secret
72
+
73
+ sig { params(secret: String).void }
74
+ attr_writer :secret
75
+
76
+ sig do
77
+ params(
78
+ id: String,
79
+ date_created: Time,
80
+ date_last_used: T.nilable(Time),
81
+ date_updated: Time,
82
+ secure_key: String,
83
+ status:
84
+ Openlayer::Models::Workspaces::APIKeyRotateResponse::Status::OrSymbol,
85
+ expires_at: T.nilable(Time),
86
+ last_rotated_at: T.nilable(Time),
87
+ name: T.nilable(String),
88
+ previous_key_expires_at: T.nilable(Time),
89
+ secret: String
90
+ ).returns(T.attached_class)
91
+ end
92
+ def self.new(
93
+ # The API key id.
94
+ id:,
95
+ # The API key creation date.
96
+ date_created:,
97
+ # The API key last use date.
98
+ date_last_used:,
99
+ # The API key last update date.
100
+ date_updated:,
101
+ # An obfuscated hint of the API key value. When a key is created or rotated this
102
+ # also holds the full secret, for backward compatibility; prefer `secret`.
103
+ secure_key:,
104
+ # The key's lifecycle state. `active`: the current secret authenticates.
105
+ # `rotating`: the key was rotated and the previous secret still authenticates
106
+ # until `previousKeyExpiresAt`. `expired`: `expiresAt` has passed, no secret
107
+ # authenticates, and the key can't be rotated.
108
+ status:,
109
+ # When the key stops authenticating. `null` means the key never expires. Set when
110
+ # the key is created or rotated, and must be in the future. When the request is
111
+ # authenticated with an API key that expires, the result can't be later than that
112
+ # key's expiry. On create, omit it to inherit that expiry. On rotate, omit it to
113
+ # keep the current one. It can't be changed with an update; rotate the key
114
+ # instead.
115
+ expires_at: nil,
116
+ # When the key was last rotated.
117
+ last_rotated_at: nil,
118
+ # The API key name.
119
+ name: nil,
120
+ # While `status` is `rotating`, when the previous secret stops authenticating.
121
+ previous_key_expires_at: nil,
122
+ # The full API key. Only present in the response that creates or rotates the key,
123
+ # and never shown again.
124
+ secret: nil
125
+ )
126
+ end
127
+
128
+ sig do
129
+ override.returns(
130
+ {
131
+ id: String,
132
+ date_created: Time,
133
+ date_last_used: T.nilable(Time),
134
+ date_updated: Time,
135
+ secure_key: String,
136
+ status:
137
+ Openlayer::Models::Workspaces::APIKeyRotateResponse::Status::TaggedSymbol,
138
+ expires_at: T.nilable(Time),
139
+ last_rotated_at: T.nilable(Time),
140
+ name: T.nilable(String),
141
+ previous_key_expires_at: T.nilable(Time),
142
+ secret: String
143
+ }
144
+ )
145
+ end
146
+ def to_hash
147
+ end
148
+
149
+ # The key's lifecycle state. `active`: the current secret authenticates.
150
+ # `rotating`: the key was rotated and the previous secret still authenticates
151
+ # until `previousKeyExpiresAt`. `expired`: `expiresAt` has passed, no secret
152
+ # authenticates, and the key can't be rotated.
153
+ module Status
154
+ extend Openlayer::Internal::Type::Enum
155
+
156
+ TaggedSymbol =
157
+ T.type_alias do
158
+ T.all(
159
+ Symbol,
160
+ Openlayer::Models::Workspaces::APIKeyRotateResponse::Status
161
+ )
162
+ end
163
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
164
+
165
+ ACTIVE =
166
+ T.let(
167
+ :active,
168
+ Openlayer::Models::Workspaces::APIKeyRotateResponse::Status::TaggedSymbol
169
+ )
170
+ ROTATING =
171
+ T.let(
172
+ :rotating,
173
+ Openlayer::Models::Workspaces::APIKeyRotateResponse::Status::TaggedSymbol
174
+ )
175
+ EXPIRED =
176
+ T.let(
177
+ :expired,
178
+ Openlayer::Models::Workspaces::APIKeyRotateResponse::Status::TaggedSymbol
179
+ )
180
+
181
+ sig do
182
+ override.returns(
183
+ T::Array[
184
+ Openlayer::Models::Workspaces::APIKeyRotateResponse::Status::TaggedSymbol
185
+ ]
186
+ )
187
+ end
188
+ def self.values
189
+ end
190
+ end
191
+ end
192
+ end
193
+ end
194
+ end
@@ -0,0 +1,60 @@
1
+ # typed: strong
2
+
3
+ module Openlayer
4
+ module Models
5
+ module Workspaces
6
+ class APIKeyUpdateParams < Openlayer::Internal::Type::BaseModel
7
+ extend Openlayer::Internal::Type::RequestParameters::Converter
8
+ include Openlayer::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Openlayer::Workspaces::APIKeyUpdateParams,
14
+ Openlayer::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :workspace_id
20
+
21
+ sig { returns(String) }
22
+ attr_accessor :api_key_id
23
+
24
+ # The API key name.
25
+ sig { returns(T.nilable(String)) }
26
+ attr_accessor :name
27
+
28
+ sig do
29
+ params(
30
+ workspace_id: String,
31
+ api_key_id: String,
32
+ name: T.nilable(String),
33
+ request_options: Openlayer::RequestOptions::OrHash
34
+ ).returns(T.attached_class)
35
+ end
36
+ def self.new(
37
+ workspace_id:,
38
+ api_key_id:,
39
+ # The API key name.
40
+ name: nil,
41
+ request_options: {}
42
+ )
43
+ end
44
+
45
+ sig do
46
+ override.returns(
47
+ {
48
+ workspace_id: String,
49
+ api_key_id: String,
50
+ name: T.nilable(String),
51
+ request_options: Openlayer::RequestOptions
52
+ }
53
+ )
54
+ end
55
+ def to_hash
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,194 @@
1
+ # typed: strong
2
+
3
+ module Openlayer
4
+ module Models
5
+ module Workspaces
6
+ class APIKeyUpdateResponse < Openlayer::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Openlayer::Models::Workspaces::APIKeyUpdateResponse,
11
+ Openlayer::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # When the key stops authenticating. `null` means the key never expires. Set when
16
+ # the key is created or rotated, and must be in the future. When the request is
17
+ # authenticated with an API key that expires, the result can't be later than that
18
+ # key's expiry. On create, omit it to inherit that expiry. On rotate, omit it to
19
+ # keep the current one. It can't be changed with an update; rotate the key
20
+ # instead.
21
+ sig { returns(T.nilable(Time)) }
22
+ attr_accessor :expires_at
23
+
24
+ # The API key name.
25
+ sig { returns(T.nilable(String)) }
26
+ attr_accessor :name
27
+
28
+ # The API key id.
29
+ sig { returns(String) }
30
+ attr_accessor :id
31
+
32
+ # The API key creation date.
33
+ sig { returns(Time) }
34
+ attr_accessor :date_created
35
+
36
+ # The API key last use date.
37
+ sig { returns(T.nilable(Time)) }
38
+ attr_accessor :date_last_used
39
+
40
+ # The API key last update date.
41
+ sig { returns(Time) }
42
+ attr_accessor :date_updated
43
+
44
+ # An obfuscated hint of the API key value. When a key is created or rotated this
45
+ # also holds the full secret, for backward compatibility; prefer `secret`.
46
+ sig { returns(String) }
47
+ attr_accessor :secure_key
48
+
49
+ # The key's lifecycle state. `active`: the current secret authenticates.
50
+ # `rotating`: the key was rotated and the previous secret still authenticates
51
+ # until `previousKeyExpiresAt`. `expired`: `expiresAt` has passed, no secret
52
+ # authenticates, and the key can't be rotated.
53
+ sig do
54
+ returns(
55
+ Openlayer::Models::Workspaces::APIKeyUpdateResponse::Status::TaggedSymbol
56
+ )
57
+ end
58
+ attr_accessor :status
59
+
60
+ # When the key was last rotated.
61
+ sig { returns(T.nilable(Time)) }
62
+ attr_accessor :last_rotated_at
63
+
64
+ # While `status` is `rotating`, when the previous secret stops authenticating.
65
+ sig { returns(T.nilable(Time)) }
66
+ attr_accessor :previous_key_expires_at
67
+
68
+ # The full API key. Only present in the response that creates or rotates the key,
69
+ # and never shown again.
70
+ sig { returns(T.nilable(String)) }
71
+ attr_reader :secret
72
+
73
+ sig { params(secret: String).void }
74
+ attr_writer :secret
75
+
76
+ sig do
77
+ params(
78
+ id: String,
79
+ date_created: Time,
80
+ date_last_used: T.nilable(Time),
81
+ date_updated: Time,
82
+ secure_key: String,
83
+ status:
84
+ Openlayer::Models::Workspaces::APIKeyUpdateResponse::Status::OrSymbol,
85
+ expires_at: T.nilable(Time),
86
+ last_rotated_at: T.nilable(Time),
87
+ name: T.nilable(String),
88
+ previous_key_expires_at: T.nilable(Time),
89
+ secret: String
90
+ ).returns(T.attached_class)
91
+ end
92
+ def self.new(
93
+ # The API key id.
94
+ id:,
95
+ # The API key creation date.
96
+ date_created:,
97
+ # The API key last use date.
98
+ date_last_used:,
99
+ # The API key last update date.
100
+ date_updated:,
101
+ # An obfuscated hint of the API key value. When a key is created or rotated this
102
+ # also holds the full secret, for backward compatibility; prefer `secret`.
103
+ secure_key:,
104
+ # The key's lifecycle state. `active`: the current secret authenticates.
105
+ # `rotating`: the key was rotated and the previous secret still authenticates
106
+ # until `previousKeyExpiresAt`. `expired`: `expiresAt` has passed, no secret
107
+ # authenticates, and the key can't be rotated.
108
+ status:,
109
+ # When the key stops authenticating. `null` means the key never expires. Set when
110
+ # the key is created or rotated, and must be in the future. When the request is
111
+ # authenticated with an API key that expires, the result can't be later than that
112
+ # key's expiry. On create, omit it to inherit that expiry. On rotate, omit it to
113
+ # keep the current one. It can't be changed with an update; rotate the key
114
+ # instead.
115
+ expires_at: nil,
116
+ # When the key was last rotated.
117
+ last_rotated_at: nil,
118
+ # The API key name.
119
+ name: nil,
120
+ # While `status` is `rotating`, when the previous secret stops authenticating.
121
+ previous_key_expires_at: nil,
122
+ # The full API key. Only present in the response that creates or rotates the key,
123
+ # and never shown again.
124
+ secret: nil
125
+ )
126
+ end
127
+
128
+ sig do
129
+ override.returns(
130
+ {
131
+ id: String,
132
+ date_created: Time,
133
+ date_last_used: T.nilable(Time),
134
+ date_updated: Time,
135
+ secure_key: String,
136
+ status:
137
+ Openlayer::Models::Workspaces::APIKeyUpdateResponse::Status::TaggedSymbol,
138
+ expires_at: T.nilable(Time),
139
+ last_rotated_at: T.nilable(Time),
140
+ name: T.nilable(String),
141
+ previous_key_expires_at: T.nilable(Time),
142
+ secret: String
143
+ }
144
+ )
145
+ end
146
+ def to_hash
147
+ end
148
+
149
+ # The key's lifecycle state. `active`: the current secret authenticates.
150
+ # `rotating`: the key was rotated and the previous secret still authenticates
151
+ # until `previousKeyExpiresAt`. `expired`: `expiresAt` has passed, no secret
152
+ # authenticates, and the key can't be rotated.
153
+ module Status
154
+ extend Openlayer::Internal::Type::Enum
155
+
156
+ TaggedSymbol =
157
+ T.type_alias do
158
+ T.all(
159
+ Symbol,
160
+ Openlayer::Models::Workspaces::APIKeyUpdateResponse::Status
161
+ )
162
+ end
163
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
164
+
165
+ ACTIVE =
166
+ T.let(
167
+ :active,
168
+ Openlayer::Models::Workspaces::APIKeyUpdateResponse::Status::TaggedSymbol
169
+ )
170
+ ROTATING =
171
+ T.let(
172
+ :rotating,
173
+ Openlayer::Models::Workspaces::APIKeyUpdateResponse::Status::TaggedSymbol
174
+ )
175
+ EXPIRED =
176
+ T.let(
177
+ :expired,
178
+ Openlayer::Models::Workspaces::APIKeyUpdateResponse::Status::TaggedSymbol
179
+ )
180
+
181
+ sig do
182
+ override.returns(
183
+ T::Array[
184
+ Openlayer::Models::Workspaces::APIKeyUpdateResponse::Status::TaggedSymbol
185
+ ]
186
+ )
187
+ end
188
+ def self.values
189
+ end
190
+ end
191
+ end
192
+ end
193
+ end
194
+ end
@@ -3,11 +3,7 @@
3
3
  module Openlayer
4
4
  module Resources
5
5
  class BackgroundTasks
6
- # Retrieve a background task's status, progress and results.
7
- #
8
- # Endpoints that cannot answer within one request queue a task and hand back its
9
- # id -- for example `POST /frameworks/{frameworkId}/export`. Poll this endpoint
10
- # until `complete` is `true`, then read what the task produced from `outputs`.
6
+ # Retrieve a background task's status and outputs.
11
7
  sig do
12
8
  params(
13
9
  task_id: String,
@@ -6,7 +6,7 @@ module Openlayer
6
6
  sig { returns(Openlayer::Resources::Commits::TestResults) }
7
7
  attr_reader :test_results
8
8
 
9
- # Retrieve a project version (commit) by its id.
9
+ # Retrieve a project commit.
10
10
  sig do
11
11
  params(
12
12
  project_version_id: String,
@@ -5,11 +5,7 @@ module Openlayer
5
5
  class Governance
6
6
  class Frameworks
7
7
  class Documents
8
- # Retrieve a framework document, including its sections, subsections, and the
9
- # rules mapped to each.
10
- #
11
- # Each section and subsection carries a `ruleCount`, so you can tell which
12
- # requirements have rules mapped to them before drilling in.
8
+ # Retrieve a framework document with its sections and rules.
13
9
  sig do
14
10
  params(
15
11
  document_id: String,
@@ -29,10 +25,6 @@ module Openlayer
29
25
  end
30
26
 
31
27
  # List the documents attached to a framework.
32
- #
33
- # A document holds the text of the standard the framework is based on, split into
34
- # sections and subsections. Retrieve a single document to get that structure,
35
- # along with the rules mapped to each part of it.
36
28
  sig do
37
29
  params(
38
30
  framework_id: String,
@@ -5,11 +5,7 @@ module Openlayer
5
5
  class Governance
6
6
  class Frameworks
7
7
  class Sections
8
- # List the rules mapped to a section of a framework document.
9
- #
10
- # Pass `includeSubsectionRules=true` to also return the rules mapped to the
11
- # section's subsections, which is how you get every rule covering a requirement
12
- # and everything under it.
8
+ # List the rules mapped to a document section.
13
9
  sig do
14
10
  params(
15
11
  section_id: String,
@@ -5,11 +5,7 @@ module Openlayer
5
5
  class Governance
6
6
  class Frameworks
7
7
  class Subsections
8
- # List the rules mapped to a subsection of a framework document.
9
- #
10
- # A subsection is usually the level at which a standard states an individual
11
- # requirement, so this is the endpoint to use when you want to show which rules
12
- # cover a specific clause.
8
+ # List the rules mapped to a document subsection.
13
9
  sig do
14
10
  params(
15
11
  subsection_id: String,
@@ -15,14 +15,7 @@ module Openlayer
15
15
  end
16
16
  attr_reader :subsections
17
17
 
18
- # Create a custom governance framework in a workspace.
19
- #
20
- # Use this to track compliance against an internal policy, or against a standard
21
- # Openlayer does not ship as a built-in framework. A new framework starts with no
22
- # rules -- add them from the Openlayer app, or map an existing rule to it.
23
- #
24
- # A framework is created disabled unless you pass `enabled: true`. While it is
25
- # disabled its rules are not evaluated and do not count towards compliance.
18
+ # Create a custom framework in a workspace.
26
19
  sig do
27
20
  params(
28
21
  workspace_id: String,
@@ -56,7 +49,7 @@ module Openlayer
56
49
  )
57
50
  end
58
51
 
59
- # Retrieve a governance framework by its id.
52
+ # Retrieve a framework.
60
53
  sig do
61
54
  params(
62
55
  framework_id: String,
@@ -70,17 +63,7 @@ module Openlayer
70
63
  )
71
64
  end
72
65
 
73
- # Update a governance framework.
74
- #
75
- # The most common use is activating or deactivating a framework for the workspace
76
- # by setting `enabled`. Rules of a disabled framework are not evaluated and do not
77
- # count towards compliance.
78
- #
79
- # Frameworks that ship with Openlayer report `immutable: true`. For those, only
80
- # `enabled`, `tags`, and `projectSelector` can be changed -- their name and
81
- # definition are managed by Openlayer.
82
- #
83
- # Only the fields you send are changed.
66
+ # Update a framework.
84
67
  sig do
85
68
  params(
86
69
  framework_id: String,
@@ -126,12 +109,7 @@ module Openlayer
126
109
  )
127
110
  end
128
111
 
129
- # List the governance frameworks in a workspace.
130
- #
131
- # A framework is a set of rules -- drawn from a regulation, a standard, or your
132
- # own internal policy -- that Openlayer tracks compliance against. Use this
133
- # endpoint to find the framework you want to report on, then read its rules and
134
- # rule results.
112
+ # List the frameworks in a workspace.
135
113
  sig do
136
114
  params(
137
115
  workspace_id: String,
@@ -183,29 +161,7 @@ module Openlayer
183
161
  )
184
162
  end
185
163
 
186
- # Export a framework's evidence and progress as an audit-ready zip archive.
187
- #
188
- # The archive holds every evidence file uploaded against the framework's
189
- # evidence-based rules, a markdown report of the framework's progress and the
190
- # status of all its rules (broken down by documentation section when the framework
191
- # has documents), and CSV manifests of rules and evidence with SHA-256 checksums.
192
- #
193
- # Send `projectId` to export one project's compliance with the framework. Omit it
194
- # for the workspace-wide view across every project in the framework, including
195
- # workspace-scoped rules.
196
- #
197
- # The export runs as a background task, so this returns `202` immediately. To
198
- # collect the archive:
199
- #
200
- # 1. Poll `GET /background-tasks/{taskId}` with the returned `taskResultId` until
201
- # `complete` is `true`.
202
- # 2. Read `outputs.storageUri` off that task.
203
- # 3. Exchange it for a download link at
204
- # `GET /storage/presigned-url?storageUri=<uri>`.
205
- #
206
- # Rate limited to 2 requests per minute per framework. Asking for an export while
207
- # an identical one is still queued returns that task rather than starting a second
208
- # one.
164
+ # Export a framework as an audit-ready zip archive.
209
165
  sig do
210
166
  params(
211
167
  framework_id: String,
@@ -216,17 +172,15 @@ module Openlayer
216
172
  def export(
217
173
  # The framework id.
218
174
  framework_id,
219
- # Scope the export to this project. It must belong to the framework.
175
+ # Scope the export to this project. It must belong to the framework. Omit it for
176
+ # the workspace-wide view across every project in the framework, including
177
+ # workspace-scoped rules.
220
178
  project_id: nil,
221
179
  request_options: {}
222
180
  )
223
181
  end
224
182
 
225
- # Get a compliance roll-up for a framework, one row per project it applies to.
226
- #
227
- # Each row counts the project's rule results by status, so you can report on where
228
- # a framework is complete and where it is not without fetching every individual
229
- # rule result.
183
+ # List a framework's compliance stats per project.
230
184
  sig do
231
185
  params(
232
186
  framework_id: String,
@@ -256,9 +210,6 @@ module Openlayer
256
210
  end
257
211
 
258
212
  # List the projects a framework applies to.
259
- #
260
- # Which projects a framework covers is determined by its `projectSelector`. A
261
- # framework with an empty selector applies to every project in the workspace.
262
213
  sig do
263
214
  params(
264
215
  framework_id: String,
@@ -280,11 +231,7 @@ module Openlayer
280
231
  )
281
232
  end
282
233
 
283
- # List the rules that belong to a framework.
284
- #
285
- # To read the compliance status of these rules, use
286
- # [List rule results](/api-reference/rest/governance/list-rule-results) with the
287
- # `frameworkId` filter, or fetch the results of an individual rule.
234
+ # List the rules in a framework.
288
235
  sig do
289
236
  params(
290
237
  framework_id: String,