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,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Openlayer
4
+ module Models
5
+ module Workspaces
6
+ # @see Openlayer::Resources::Workspaces::APIKeys#retrieve
7
+ class APIKeyRetrieveParams < Openlayer::Internal::Type::BaseModel
8
+ extend Openlayer::Internal::Type::RequestParameters::Converter
9
+ include Openlayer::Internal::Type::RequestParameters
10
+
11
+ # @!attribute workspace_id
12
+ #
13
+ # @return [String]
14
+ required :workspace_id, String
15
+
16
+ # @!attribute api_key_id
17
+ #
18
+ # @return [String]
19
+ required :api_key_id, String
20
+
21
+ # @!method initialize(workspace_id:, api_key_id:, request_options: {})
22
+ # @param workspace_id [String]
23
+ # @param api_key_id [String]
24
+ # @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}]
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,131 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Openlayer
4
+ module Models
5
+ module Workspaces
6
+ # @see Openlayer::Resources::Workspaces::APIKeys#retrieve
7
+ class APIKeyRetrieveResponse < Openlayer::Internal::Type::BaseModel
8
+ # @!attribute expires_at
9
+ # When the key stops authenticating. `null` means the key never expires. Set when
10
+ # the key is created or rotated, and must be in the future. When the request is
11
+ # authenticated with an API key that expires, the result can't be later than that
12
+ # key's expiry. On create, omit it to inherit that expiry. On rotate, omit it to
13
+ # keep the current one. It can't be changed with an update; rotate the key
14
+ # instead.
15
+ #
16
+ # @return [Time, nil]
17
+ optional :expires_at, Time, api_name: :expiresAt, nil?: true
18
+
19
+ # @!attribute name
20
+ # The API key name.
21
+ #
22
+ # @return [String, nil]
23
+ optional :name, String, nil?: true
24
+
25
+ response_only do
26
+ # @!attribute id
27
+ # The API key id.
28
+ #
29
+ # @return [String]
30
+ required :id, String
31
+
32
+ # @!attribute date_created
33
+ # The API key creation date.
34
+ #
35
+ # @return [Time]
36
+ required :date_created, Time, api_name: :dateCreated
37
+
38
+ # @!attribute date_last_used
39
+ # The API key last use date.
40
+ #
41
+ # @return [Time, nil]
42
+ required :date_last_used, Time, api_name: :dateLastUsed, nil?: true
43
+
44
+ # @!attribute date_updated
45
+ # The API key last update date.
46
+ #
47
+ # @return [Time]
48
+ required :date_updated, Time, api_name: :dateUpdated
49
+
50
+ # @!attribute secure_key
51
+ # An obfuscated hint of the API key value. When a key is created or rotated this
52
+ # also holds the full secret, for backward compatibility; prefer `secret`.
53
+ #
54
+ # @return [String]
55
+ required :secure_key, String, api_name: :secureKey
56
+
57
+ # @!attribute status
58
+ # The key's lifecycle state. `active`: the current secret authenticates.
59
+ # `rotating`: the key was rotated and the previous secret still authenticates
60
+ # until `previousKeyExpiresAt`. `expired`: `expiresAt` has passed, no secret
61
+ # authenticates, and the key can't be rotated.
62
+ #
63
+ # @return [Symbol, Openlayer::Models::Workspaces::APIKeyRetrieveResponse::Status]
64
+ required :status, enum: -> { Openlayer::Models::Workspaces::APIKeyRetrieveResponse::Status }
65
+
66
+ # @!attribute last_rotated_at
67
+ # When the key was last rotated.
68
+ #
69
+ # @return [Time, nil]
70
+ optional :last_rotated_at, Time, api_name: :lastRotatedAt, nil?: true
71
+
72
+ # @!attribute previous_key_expires_at
73
+ # While `status` is `rotating`, when the previous secret stops authenticating.
74
+ #
75
+ # @return [Time, nil]
76
+ optional :previous_key_expires_at, Time, api_name: :previousKeyExpiresAt, nil?: true
77
+
78
+ # @!attribute secret
79
+ # The full API key. Only present in the response that creates or rotates the key,
80
+ # and never shown again.
81
+ #
82
+ # @return [String, nil]
83
+ optional :secret, String
84
+ end
85
+
86
+ # @!method initialize(id:, date_created:, date_last_used:, date_updated:, secure_key:, status:, expires_at: nil, last_rotated_at: nil, name: nil, previous_key_expires_at: nil, secret: nil)
87
+ # Some parameter documentations has been truncated, see
88
+ # {Openlayer::Models::Workspaces::APIKeyRetrieveResponse} for more details.
89
+ #
90
+ # @param id [String] The API key id.
91
+ #
92
+ # @param date_created [Time] The API key creation date.
93
+ #
94
+ # @param date_last_used [Time, nil] The API key last use date.
95
+ #
96
+ # @param date_updated [Time] The API key last update date.
97
+ #
98
+ # @param secure_key [String] An obfuscated hint of the API key value. When a key is created or rotated this a
99
+ #
100
+ # @param status [Symbol, Openlayer::Models::Workspaces::APIKeyRetrieveResponse::Status] The key's lifecycle state. `active`: the current secret authenticates. `rotating
101
+ #
102
+ # @param expires_at [Time, nil] When the key stops authenticating. `null` means the key never expires. Set when
103
+ #
104
+ # @param last_rotated_at [Time, nil] When the key was last rotated.
105
+ #
106
+ # @param name [String, nil] The API key name.
107
+ #
108
+ # @param previous_key_expires_at [Time, nil] While `status` is `rotating`, when the previous secret stops authenticating.
109
+ #
110
+ # @param secret [String] The full API key. Only present in the response that creates or rotates the key,
111
+
112
+ # The key's lifecycle state. `active`: the current secret authenticates.
113
+ # `rotating`: the key was rotated and the previous secret still authenticates
114
+ # until `previousKeyExpiresAt`. `expired`: `expiresAt` has passed, no secret
115
+ # authenticates, and the key can't be rotated.
116
+ #
117
+ # @see Openlayer::Models::Workspaces::APIKeyRetrieveResponse#status
118
+ module Status
119
+ extend Openlayer::Internal::Type::Enum
120
+
121
+ ACTIVE = :active
122
+ ROTATING = :rotating
123
+ EXPIRED = :expired
124
+
125
+ # @!method self.values
126
+ # @return [Array<Symbol>]
127
+ end
128
+ end
129
+ end
130
+ end
131
+ end
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Openlayer
4
+ module Models
5
+ module Workspaces
6
+ # @see Openlayer::Resources::Workspaces::APIKeys#rotate
7
+ class APIKeyRotateParams < Openlayer::Internal::Type::BaseModel
8
+ extend Openlayer::Internal::Type::RequestParameters::Converter
9
+ include Openlayer::Internal::Type::RequestParameters
10
+
11
+ # @!attribute workspace_id
12
+ #
13
+ # @return [String]
14
+ required :workspace_id, String
15
+
16
+ # @!attribute api_key_id
17
+ #
18
+ # @return [String]
19
+ required :api_key_id, String
20
+
21
+ # @!attribute expires_at
22
+ # When the key stops authenticating. `null` means the key never expires. Set when
23
+ # the key is created or rotated, and must be in the future. When the request is
24
+ # authenticated with an API key that expires, the result can't be later than that
25
+ # key's expiry. On create, omit it to inherit that expiry. On rotate, omit it to
26
+ # keep the current one. It can't be changed with an update; rotate the key
27
+ # instead.
28
+ #
29
+ # @return [Time, nil]
30
+ optional :expires_at, Time, api_name: :expiresAt, nil?: true
31
+
32
+ # @!attribute grace_period_hours
33
+ # Hours the previous secret keeps authenticating. The default of 0 retires it
34
+ # immediately. It never outlives `expiresAt`. Only one previous secret is kept, so
35
+ # rotating again during a grace period retires the older one immediately.
36
+ #
37
+ # @return [Integer, nil]
38
+ optional :grace_period_hours, Integer, api_name: :gracePeriodHours
39
+
40
+ # @!method initialize(workspace_id:, api_key_id:, expires_at: nil, grace_period_hours: nil, request_options: {})
41
+ # Some parameter documentations has been truncated, see
42
+ # {Openlayer::Models::Workspaces::APIKeyRotateParams} for more details.
43
+ #
44
+ # @param workspace_id [String]
45
+ #
46
+ # @param api_key_id [String]
47
+ #
48
+ # @param expires_at [Time, nil] When the key stops authenticating. `null` means the key never expires. Set when
49
+ #
50
+ # @param grace_period_hours [Integer] Hours the previous secret keeps authenticating. The default of 0 retires it imme
51
+ #
52
+ # @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}]
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,131 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Openlayer
4
+ module Models
5
+ module Workspaces
6
+ # @see Openlayer::Resources::Workspaces::APIKeys#rotate
7
+ class APIKeyRotateResponse < Openlayer::Internal::Type::BaseModel
8
+ # @!attribute expires_at
9
+ # When the key stops authenticating. `null` means the key never expires. Set when
10
+ # the key is created or rotated, and must be in the future. When the request is
11
+ # authenticated with an API key that expires, the result can't be later than that
12
+ # key's expiry. On create, omit it to inherit that expiry. On rotate, omit it to
13
+ # keep the current one. It can't be changed with an update; rotate the key
14
+ # instead.
15
+ #
16
+ # @return [Time, nil]
17
+ optional :expires_at, Time, api_name: :expiresAt, nil?: true
18
+
19
+ # @!attribute name
20
+ # The API key name.
21
+ #
22
+ # @return [String, nil]
23
+ optional :name, String, nil?: true
24
+
25
+ response_only do
26
+ # @!attribute id
27
+ # The API key id.
28
+ #
29
+ # @return [String]
30
+ required :id, String
31
+
32
+ # @!attribute date_created
33
+ # The API key creation date.
34
+ #
35
+ # @return [Time]
36
+ required :date_created, Time, api_name: :dateCreated
37
+
38
+ # @!attribute date_last_used
39
+ # The API key last use date.
40
+ #
41
+ # @return [Time, nil]
42
+ required :date_last_used, Time, api_name: :dateLastUsed, nil?: true
43
+
44
+ # @!attribute date_updated
45
+ # The API key last update date.
46
+ #
47
+ # @return [Time]
48
+ required :date_updated, Time, api_name: :dateUpdated
49
+
50
+ # @!attribute secure_key
51
+ # An obfuscated hint of the API key value. When a key is created or rotated this
52
+ # also holds the full secret, for backward compatibility; prefer `secret`.
53
+ #
54
+ # @return [String]
55
+ required :secure_key, String, api_name: :secureKey
56
+
57
+ # @!attribute status
58
+ # The key's lifecycle state. `active`: the current secret authenticates.
59
+ # `rotating`: the key was rotated and the previous secret still authenticates
60
+ # until `previousKeyExpiresAt`. `expired`: `expiresAt` has passed, no secret
61
+ # authenticates, and the key can't be rotated.
62
+ #
63
+ # @return [Symbol, Openlayer::Models::Workspaces::APIKeyRotateResponse::Status]
64
+ required :status, enum: -> { Openlayer::Models::Workspaces::APIKeyRotateResponse::Status }
65
+
66
+ # @!attribute last_rotated_at
67
+ # When the key was last rotated.
68
+ #
69
+ # @return [Time, nil]
70
+ optional :last_rotated_at, Time, api_name: :lastRotatedAt, nil?: true
71
+
72
+ # @!attribute previous_key_expires_at
73
+ # While `status` is `rotating`, when the previous secret stops authenticating.
74
+ #
75
+ # @return [Time, nil]
76
+ optional :previous_key_expires_at, Time, api_name: :previousKeyExpiresAt, nil?: true
77
+
78
+ # @!attribute secret
79
+ # The full API key. Only present in the response that creates or rotates the key,
80
+ # and never shown again.
81
+ #
82
+ # @return [String, nil]
83
+ optional :secret, String
84
+ end
85
+
86
+ # @!method initialize(id:, date_created:, date_last_used:, date_updated:, secure_key:, status:, expires_at: nil, last_rotated_at: nil, name: nil, previous_key_expires_at: nil, secret: nil)
87
+ # Some parameter documentations has been truncated, see
88
+ # {Openlayer::Models::Workspaces::APIKeyRotateResponse} for more details.
89
+ #
90
+ # @param id [String] The API key id.
91
+ #
92
+ # @param date_created [Time] The API key creation date.
93
+ #
94
+ # @param date_last_used [Time, nil] The API key last use date.
95
+ #
96
+ # @param date_updated [Time] The API key last update date.
97
+ #
98
+ # @param secure_key [String] An obfuscated hint of the API key value. When a key is created or rotated this a
99
+ #
100
+ # @param status [Symbol, Openlayer::Models::Workspaces::APIKeyRotateResponse::Status] The key's lifecycle state. `active`: the current secret authenticates. `rotating
101
+ #
102
+ # @param expires_at [Time, nil] When the key stops authenticating. `null` means the key never expires. Set when
103
+ #
104
+ # @param last_rotated_at [Time, nil] When the key was last rotated.
105
+ #
106
+ # @param name [String, nil] The API key name.
107
+ #
108
+ # @param previous_key_expires_at [Time, nil] While `status` is `rotating`, when the previous secret stops authenticating.
109
+ #
110
+ # @param secret [String] The full API key. Only present in the response that creates or rotates the key,
111
+
112
+ # The key's lifecycle state. `active`: the current secret authenticates.
113
+ # `rotating`: the key was rotated and the previous secret still authenticates
114
+ # until `previousKeyExpiresAt`. `expired`: `expiresAt` has passed, no secret
115
+ # authenticates, and the key can't be rotated.
116
+ #
117
+ # @see Openlayer::Models::Workspaces::APIKeyRotateResponse#status
118
+ module Status
119
+ extend Openlayer::Internal::Type::Enum
120
+
121
+ ACTIVE = :active
122
+ ROTATING = :rotating
123
+ EXPIRED = :expired
124
+
125
+ # @!method self.values
126
+ # @return [Array<Symbol>]
127
+ end
128
+ end
129
+ end
130
+ end
131
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Openlayer
4
+ module Models
5
+ module Workspaces
6
+ # @see Openlayer::Resources::Workspaces::APIKeys#update
7
+ class APIKeyUpdateParams < Openlayer::Internal::Type::BaseModel
8
+ extend Openlayer::Internal::Type::RequestParameters::Converter
9
+ include Openlayer::Internal::Type::RequestParameters
10
+
11
+ # @!attribute workspace_id
12
+ #
13
+ # @return [String]
14
+ required :workspace_id, String
15
+
16
+ # @!attribute api_key_id
17
+ #
18
+ # @return [String]
19
+ required :api_key_id, String
20
+
21
+ # @!attribute name
22
+ # The API key name.
23
+ #
24
+ # @return [String, nil]
25
+ optional :name, String, nil?: true
26
+
27
+ # @!method initialize(workspace_id:, api_key_id:, name: nil, request_options: {})
28
+ # @param workspace_id [String]
29
+ #
30
+ # @param api_key_id [String]
31
+ #
32
+ # @param name [String, nil] The API key name.
33
+ #
34
+ # @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}]
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,131 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Openlayer
4
+ module Models
5
+ module Workspaces
6
+ # @see Openlayer::Resources::Workspaces::APIKeys#update
7
+ class APIKeyUpdateResponse < Openlayer::Internal::Type::BaseModel
8
+ # @!attribute expires_at
9
+ # When the key stops authenticating. `null` means the key never expires. Set when
10
+ # the key is created or rotated, and must be in the future. When the request is
11
+ # authenticated with an API key that expires, the result can't be later than that
12
+ # key's expiry. On create, omit it to inherit that expiry. On rotate, omit it to
13
+ # keep the current one. It can't be changed with an update; rotate the key
14
+ # instead.
15
+ #
16
+ # @return [Time, nil]
17
+ optional :expires_at, Time, api_name: :expiresAt, nil?: true
18
+
19
+ # @!attribute name
20
+ # The API key name.
21
+ #
22
+ # @return [String, nil]
23
+ optional :name, String, nil?: true
24
+
25
+ response_only do
26
+ # @!attribute id
27
+ # The API key id.
28
+ #
29
+ # @return [String]
30
+ required :id, String
31
+
32
+ # @!attribute date_created
33
+ # The API key creation date.
34
+ #
35
+ # @return [Time]
36
+ required :date_created, Time, api_name: :dateCreated
37
+
38
+ # @!attribute date_last_used
39
+ # The API key last use date.
40
+ #
41
+ # @return [Time, nil]
42
+ required :date_last_used, Time, api_name: :dateLastUsed, nil?: true
43
+
44
+ # @!attribute date_updated
45
+ # The API key last update date.
46
+ #
47
+ # @return [Time]
48
+ required :date_updated, Time, api_name: :dateUpdated
49
+
50
+ # @!attribute secure_key
51
+ # An obfuscated hint of the API key value. When a key is created or rotated this
52
+ # also holds the full secret, for backward compatibility; prefer `secret`.
53
+ #
54
+ # @return [String]
55
+ required :secure_key, String, api_name: :secureKey
56
+
57
+ # @!attribute status
58
+ # The key's lifecycle state. `active`: the current secret authenticates.
59
+ # `rotating`: the key was rotated and the previous secret still authenticates
60
+ # until `previousKeyExpiresAt`. `expired`: `expiresAt` has passed, no secret
61
+ # authenticates, and the key can't be rotated.
62
+ #
63
+ # @return [Symbol, Openlayer::Models::Workspaces::APIKeyUpdateResponse::Status]
64
+ required :status, enum: -> { Openlayer::Models::Workspaces::APIKeyUpdateResponse::Status }
65
+
66
+ # @!attribute last_rotated_at
67
+ # When the key was last rotated.
68
+ #
69
+ # @return [Time, nil]
70
+ optional :last_rotated_at, Time, api_name: :lastRotatedAt, nil?: true
71
+
72
+ # @!attribute previous_key_expires_at
73
+ # While `status` is `rotating`, when the previous secret stops authenticating.
74
+ #
75
+ # @return [Time, nil]
76
+ optional :previous_key_expires_at, Time, api_name: :previousKeyExpiresAt, nil?: true
77
+
78
+ # @!attribute secret
79
+ # The full API key. Only present in the response that creates or rotates the key,
80
+ # and never shown again.
81
+ #
82
+ # @return [String, nil]
83
+ optional :secret, String
84
+ end
85
+
86
+ # @!method initialize(id:, date_created:, date_last_used:, date_updated:, secure_key:, status:, expires_at: nil, last_rotated_at: nil, name: nil, previous_key_expires_at: nil, secret: nil)
87
+ # Some parameter documentations has been truncated, see
88
+ # {Openlayer::Models::Workspaces::APIKeyUpdateResponse} for more details.
89
+ #
90
+ # @param id [String] The API key id.
91
+ #
92
+ # @param date_created [Time] The API key creation date.
93
+ #
94
+ # @param date_last_used [Time, nil] The API key last use date.
95
+ #
96
+ # @param date_updated [Time] The API key last update date.
97
+ #
98
+ # @param secure_key [String] An obfuscated hint of the API key value. When a key is created or rotated this a
99
+ #
100
+ # @param status [Symbol, Openlayer::Models::Workspaces::APIKeyUpdateResponse::Status] The key's lifecycle state. `active`: the current secret authenticates. `rotating
101
+ #
102
+ # @param expires_at [Time, nil] When the key stops authenticating. `null` means the key never expires. Set when
103
+ #
104
+ # @param last_rotated_at [Time, nil] When the key was last rotated.
105
+ #
106
+ # @param name [String, nil] The API key name.
107
+ #
108
+ # @param previous_key_expires_at [Time, nil] While `status` is `rotating`, when the previous secret stops authenticating.
109
+ #
110
+ # @param secret [String] The full API key. Only present in the response that creates or rotates the key,
111
+
112
+ # The key's lifecycle state. `active`: the current secret authenticates.
113
+ # `rotating`: the key was rotated and the previous secret still authenticates
114
+ # until `previousKeyExpiresAt`. `expired`: `expiresAt` has passed, no secret
115
+ # authenticates, and the key can't be rotated.
116
+ #
117
+ # @see Openlayer::Models::Workspaces::APIKeyUpdateResponse#status
118
+ module Status
119
+ extend Openlayer::Internal::Type::Enum
120
+
121
+ ACTIVE = :active
122
+ ROTATING = :rotating
123
+ EXPIRED = :expired
124
+
125
+ # @!method self.values
126
+ # @return [Array<Symbol>]
127
+ end
128
+ end
129
+ end
130
+ end
131
+ 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
  #
12
8
  # @overload retrieve(task_id, request_options: {})
13
9
  #
@@ -6,7 +6,7 @@ module Openlayer
6
6
  # @return [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
  #
11
11
  # @overload retrieve(project_version_id, request_options: {})
12
12
  #
@@ -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
  #
14
10
  # @overload retrieve(document_id, framework_id:, request_options: {})
15
11
  #
@@ -38,10 +34,6 @@ module Openlayer
38
34
 
39
35
  # List the documents attached to a framework.
40
36
  #
41
- # A document holds the text of the standard the framework is based on, split into
42
- # sections and subsections. Retrieve a single document to get that structure,
43
- # along with the rules mapped to each part of it.
44
- #
45
37
  # @overload list(framework_id, page: nil, per_page: nil, request_options: {})
46
38
  #
47
39
  # @param framework_id [String] The framework id.
@@ -9,11 +9,7 @@ module Openlayer
9
9
  # {Openlayer::Models::Governance::Frameworks::SectionListRulesParams} for more
10
10
  # details.
11
11
  #
12
- # List the rules mapped to a section of a framework document.
13
- #
14
- # Pass `includeSubsectionRules=true` to also return the rules mapped to the
15
- # section's subsections, which is how you get every rule covering a requirement
16
- # and everything under it.
12
+ # List the rules mapped to a document section.
17
13
  #
18
14
  # @overload list_rules(section_id, framework_id:, include_results: nil, include_subsection_rules: nil, page: nil, per_page: nil, project_id: nil, status: nil, request_options: {})
19
15
  #
@@ -9,11 +9,7 @@ module Openlayer
9
9
  # {Openlayer::Models::Governance::Frameworks::SubsectionListRulesParams} for more
10
10
  # details.
11
11
  #
12
- # List the rules mapped to a subsection of a framework document.
13
- #
14
- # A subsection is usually the level at which a standard states an individual
15
- # requirement, so this is the endpoint to use when you want to show which rules
16
- # cover a specific clause.
12
+ # List the rules mapped to a document subsection.
17
13
  #
18
14
  # @overload list_rules(subsection_id, framework_id:, include_results: nil, page: nil, per_page: nil, project_id: nil, status: nil, request_options: {})
19
15
  #