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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +1 -1
- data/lib/openlayer/models/background_task_retrieve_response.rb +4 -0
- data/lib/openlayer/models/governance/framework_create_response.rb +7 -2
- data/lib/openlayer/models/governance/framework_export_params.rb +7 -2
- data/lib/openlayer/models/governance/framework_list_project_rule_stats_response.rb +2 -0
- data/lib/openlayer/models/governance/framework_list_response.rb +7 -2
- data/lib/openlayer/models/governance/framework_list_rules_response.rb +69 -29
- data/lib/openlayer/models/governance/framework_retrieve_response.rb +7 -2
- data/lib/openlayer/models/governance/framework_update_response.rb +7 -2
- data/lib/openlayer/models/governance/frameworks/document_list_response.rb +54 -28
- data/lib/openlayer/models/governance/frameworks/document_retrieve_response.rb +54 -28
- data/lib/openlayer/models/governance/frameworks/section_list_rules_response.rb +69 -29
- data/lib/openlayer/models/governance/frameworks/subsection_list_rules_response.rb +69 -29
- data/lib/openlayer/models/governance/rule_create_params.rb +21 -12
- data/lib/openlayer/models/governance/rule_create_response.rb +68 -29
- data/lib/openlayer/models/governance/rule_list_response.rb +69 -29
- data/lib/openlayer/models/governance/rule_result_create_evidence_params.rb +2 -1
- data/lib/openlayer/models/governance/rule_result_create_evidence_response.rb +6 -1
- data/lib/openlayer/models/governance/rule_result_list_evidence_response.rb +6 -1
- data/lib/openlayer/models/governance/rule_result_list_response.rb +34 -13
- data/lib/openlayer/models/governance/rule_result_retrieve_response.rb +34 -13
- data/lib/openlayer/models/governance/rule_result_update_params.rb +26 -10
- data/lib/openlayer/models/governance/rule_result_update_response.rb +34 -13
- data/lib/openlayer/models/governance/rule_retrieve_response.rb +68 -29
- data/lib/openlayer/models/governance/rule_stat_retrieve_response.rb +4 -0
- data/lib/openlayer/models/governance/rule_tag_list_response.rb +5 -2
- data/lib/openlayer/models/governance/rule_update_params.rb +2 -1
- data/lib/openlayer/models/governance/rule_update_response.rb +68 -29
- data/lib/openlayer/models/inference_pipeline_retrieve_sessions_response.rb +3 -0
- data/lib/openlayer/models/inference_pipeline_retrieve_users_response.rb +3 -0
- data/lib/openlayer/models/storage/presigned_url_retrieve_params.rb +6 -2
- data/lib/openlayer/models/workspaces/api_key_create_params.rb +17 -1
- data/lib/openlayer/models/workspaces/api_key_create_response.rb +73 -3
- data/lib/openlayer/models/workspaces/api_key_delete_params.rb +28 -0
- data/lib/openlayer/models/workspaces/api_key_list_params.rb +22 -0
- data/lib/openlayer/models/workspaces/api_key_list_response.rb +134 -0
- data/lib/openlayer/models/workspaces/api_key_retrieve_params.rb +28 -0
- data/lib/openlayer/models/workspaces/api_key_retrieve_response.rb +131 -0
- data/lib/openlayer/models/workspaces/api_key_rotate_params.rb +56 -0
- data/lib/openlayer/models/workspaces/api_key_rotate_response.rb +131 -0
- data/lib/openlayer/models/workspaces/api_key_update_params.rb +38 -0
- data/lib/openlayer/models/workspaces/api_key_update_response.rb +131 -0
- data/lib/openlayer/resources/background_tasks.rb +1 -5
- data/lib/openlayer/resources/commits.rb +1 -1
- data/lib/openlayer/resources/governance/frameworks/documents.rb +1 -9
- data/lib/openlayer/resources/governance/frameworks/sections.rb +1 -5
- data/lib/openlayer/resources/governance/frameworks/subsections.rb +1 -5
- data/lib/openlayer/resources/governance/frameworks.rb +10 -62
- data/lib/openlayer/resources/governance/rule_results.rb +8 -33
- data/lib/openlayer/resources/governance/rule_stats.rb +1 -5
- data/lib/openlayer/resources/governance/rule_tags.rb +0 -4
- data/lib/openlayer/resources/governance/rules.rb +7 -38
- data/lib/openlayer/resources/inference_pipelines/rows.rb +4 -5
- data/lib/openlayer/resources/inference_pipelines.rb +5 -14
- data/lib/openlayer/resources/projects/tests.rb +3 -3
- data/lib/openlayer/resources/storage/presigned_url.rb +5 -11
- data/lib/openlayer/resources/tests.rb +1 -4
- data/lib/openlayer/resources/workspaces/api_keys.rb +146 -2
- data/lib/openlayer/resources/workspaces/invites.rb +1 -1
- data/lib/openlayer/resources/workspaces.rb +1 -1
- data/lib/openlayer/version.rb +1 -1
- data/lib/openlayer.rb +9 -0
- data/rbi/openlayer/models/background_task_retrieve_response.rbi +3 -0
- data/rbi/openlayer/models/governance/framework_create_response.rbi +7 -2
- data/rbi/openlayer/models/governance/framework_export_params.rbi +6 -2
- data/rbi/openlayer/models/governance/framework_list_project_rule_stats_response.rbi +1 -0
- data/rbi/openlayer/models/governance/framework_list_response.rbi +7 -2
- data/rbi/openlayer/models/governance/framework_list_rules_response.rbi +70 -34
- data/rbi/openlayer/models/governance/framework_retrieve_response.rbi +7 -2
- data/rbi/openlayer/models/governance/framework_update_response.rbi +7 -2
- data/rbi/openlayer/models/governance/frameworks/document_list_response.rbi +76 -38
- data/rbi/openlayer/models/governance/frameworks/document_retrieve_response.rbi +76 -38
- data/rbi/openlayer/models/governance/frameworks/section_list_rules_response.rbi +70 -34
- data/rbi/openlayer/models/governance/frameworks/subsection_list_rules_response.rbi +70 -34
- data/rbi/openlayer/models/governance/rule_create_params.rbi +32 -17
- data/rbi/openlayer/models/governance/rule_create_response.rbi +70 -34
- data/rbi/openlayer/models/governance/rule_list_response.rbi +70 -34
- data/rbi/openlayer/models/governance/rule_result_create_evidence_params.rbi +4 -2
- data/rbi/openlayer/models/governance/rule_result_create_evidence_response.rbi +7 -2
- data/rbi/openlayer/models/governance/rule_result_list_evidence_response.rbi +7 -2
- data/rbi/openlayer/models/governance/rule_result_list_response.rbi +26 -13
- data/rbi/openlayer/models/governance/rule_result_retrieve_response.rbi +26 -13
- data/rbi/openlayer/models/governance/rule_result_update_params.rbi +18 -10
- data/rbi/openlayer/models/governance/rule_result_update_response.rbi +26 -13
- data/rbi/openlayer/models/governance/rule_retrieve_response.rbi +70 -34
- data/rbi/openlayer/models/governance/rule_stat_retrieve_response.rbi +3 -0
- data/rbi/openlayer/models/governance/rule_tag_list_response.rbi +4 -2
- data/rbi/openlayer/models/governance/rule_update_params.rbi +4 -2
- data/rbi/openlayer/models/governance/rule_update_response.rbi +70 -34
- data/rbi/openlayer/models/inference_pipeline_retrieve_sessions_response.rbi +2 -0
- data/rbi/openlayer/models/inference_pipeline_retrieve_users_response.rbi +2 -0
- data/rbi/openlayer/models/storage/presigned_url_retrieve_params.rbi +4 -2
- data/rbi/openlayer/models/workspaces/api_key_create_params.rbi +18 -0
- data/rbi/openlayer/models/workspaces/api_key_create_response.rbi +117 -5
- data/rbi/openlayer/models/workspaces/api_key_delete_params.rbi +48 -0
- data/rbi/openlayer/models/workspaces/api_key_list_params.rbi +40 -0
- data/rbi/openlayer/models/workspaces/api_key_list_response.rbi +202 -0
- data/rbi/openlayer/models/workspaces/api_key_retrieve_params.rbi +48 -0
- data/rbi/openlayer/models/workspaces/api_key_retrieve_response.rbi +194 -0
- data/rbi/openlayer/models/workspaces/api_key_rotate_params.rbi +85 -0
- data/rbi/openlayer/models/workspaces/api_key_rotate_response.rbi +194 -0
- data/rbi/openlayer/models/workspaces/api_key_update_params.rbi +60 -0
- data/rbi/openlayer/models/workspaces/api_key_update_response.rbi +194 -0
- data/rbi/openlayer/resources/background_tasks.rbi +1 -5
- data/rbi/openlayer/resources/commits.rbi +1 -1
- data/rbi/openlayer/resources/governance/frameworks/documents.rbi +1 -9
- data/rbi/openlayer/resources/governance/frameworks/sections.rbi +1 -5
- data/rbi/openlayer/resources/governance/frameworks/subsections.rbi +1 -5
- data/rbi/openlayer/resources/governance/frameworks.rbi +10 -63
- data/rbi/openlayer/resources/governance/rule_results.rbi +9 -35
- data/rbi/openlayer/resources/governance/rule_stats.rbi +1 -5
- data/rbi/openlayer/resources/governance/rule_tags.rbi +0 -4
- data/rbi/openlayer/resources/governance/rules.rbi +20 -44
- data/rbi/openlayer/resources/inference_pipelines/rows.rbi +4 -5
- data/rbi/openlayer/resources/inference_pipelines.rbi +5 -14
- data/rbi/openlayer/resources/projects/tests.rbi +3 -3
- data/rbi/openlayer/resources/storage/presigned_url.rbi +4 -12
- data/rbi/openlayer/resources/tests.rbi +1 -4
- data/rbi/openlayer/resources/workspaces/api_keys.rbi +110 -1
- data/rbi/openlayer/resources/workspaces/invites.rbi +1 -1
- data/rbi/openlayer/resources/workspaces.rbi +1 -1
- data/sig/openlayer/models/workspaces/api_key_create_params.rbs +5 -1
- data/sig/openlayer/models/workspaces/api_key_create_response.rbs +42 -3
- data/sig/openlayer/models/workspaces/api_key_delete_params.rbs +30 -0
- data/sig/openlayer/models/workspaces/api_key_list_params.rbs +25 -0
- data/sig/openlayer/models/workspaces/api_key_list_response.rbs +91 -0
- data/sig/openlayer/models/workspaces/api_key_retrieve_params.rbs +30 -0
- data/sig/openlayer/models/workspaces/api_key_retrieve_response.rbs +86 -0
- data/sig/openlayer/models/workspaces/api_key_rotate_params.rbs +45 -0
- data/sig/openlayer/models/workspaces/api_key_rotate_response.rbs +86 -0
- data/sig/openlayer/models/workspaces/api_key_update_params.rbs +34 -0
- data/sig/openlayer/models/workspaces/api_key_update_response.rbs +86 -0
- data/sig/openlayer/resources/workspaces/api_keys.rbs +33 -0
- metadata +29 -2
|
@@ -4,11 +4,7 @@ module Openlayer
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Governance
|
|
6
6
|
class RuleResults
|
|
7
|
-
# Retrieve a rule result
|
|
8
|
-
#
|
|
9
|
-
# Alongside the status, the response carries the evaluation and renewal dates that
|
|
10
|
-
# explain it: `dateLastEvaluated` and `dateOfNextEvaluation` for platform rules,
|
|
11
|
-
# `dateOfLatestEvidence` and `dateOfRenewal` for evidence rules.
|
|
7
|
+
# Retrieve a rule result.
|
|
12
8
|
sig do
|
|
13
9
|
params(
|
|
14
10
|
rule_result_id: String,
|
|
@@ -22,13 +18,7 @@ module Openlayer
|
|
|
22
18
|
)
|
|
23
19
|
end
|
|
24
20
|
|
|
25
|
-
# Update a rule result.
|
|
26
|
-
#
|
|
27
|
-
# Use this to assign an owner, or to exclude a single result from compliance
|
|
28
|
-
# without deactivating the rule everywhere. `deactivatedReason` is required when
|
|
29
|
-
# setting `deactivated` to `true`.
|
|
30
|
-
#
|
|
31
|
-
# A result's `status` is computed by Openlayer and cannot be set directly.
|
|
21
|
+
# Update a rule result.
|
|
32
22
|
sig do
|
|
33
23
|
params(
|
|
34
24
|
rule_result_id: String,
|
|
@@ -55,20 +45,16 @@ module Openlayer
|
|
|
55
45
|
blocked_by: nil,
|
|
56
46
|
# Rule results that this one blocks.
|
|
57
47
|
blocking: nil,
|
|
58
|
-
# Whether this result is excluded from compliance calculations.
|
|
48
|
+
# Whether this result is excluded from compliance calculations. Excludes just this
|
|
49
|
+
# result, without deactivating the rule everywhere.
|
|
59
50
|
deactivated: nil,
|
|
60
|
-
# Why the result was excluded.
|
|
51
|
+
# Why the result was excluded. Required when setting `deactivated` to `true`.
|
|
61
52
|
deactivated_reason: nil,
|
|
62
53
|
request_options: {}
|
|
63
54
|
)
|
|
64
55
|
end
|
|
65
56
|
|
|
66
|
-
# List rule results
|
|
67
|
-
#
|
|
68
|
-
# A rule result is the compliance status of one rule for one entity: a project for
|
|
69
|
-
# project-scoped rules, or the workspace itself for workspace-scoped rules. This
|
|
70
|
-
# is the endpoint to poll or export when you want your current compliance state,
|
|
71
|
-
# filtered to a framework, a project, or a status.
|
|
57
|
+
# List the rule results in a workspace.
|
|
72
58
|
sig do
|
|
73
59
|
params(
|
|
74
60
|
workspace_id: String,
|
|
@@ -116,16 +102,7 @@ module Openlayer
|
|
|
116
102
|
)
|
|
117
103
|
end
|
|
118
104
|
|
|
119
|
-
# Attach evidence to a rule result
|
|
120
|
-
#
|
|
121
|
-
# Send the field that matches the rule's `evidenceType`: `storageUri` for an
|
|
122
|
-
# uploaded document, `text` for a written statement, or `url` for a link.
|
|
123
|
-
#
|
|
124
|
-
# For a document, upload the file first with `POST /storage/presigned-url` and
|
|
125
|
-
# send the resulting storage URI as `storageUri`.
|
|
126
|
-
#
|
|
127
|
-
# Attaching evidence re-evaluates the rule result. If the rule sets
|
|
128
|
-
# `renewalCadenceDays`, the renewal window restarts from this evidence.
|
|
105
|
+
# Attach evidence to a rule result.
|
|
129
106
|
sig do
|
|
130
107
|
params(
|
|
131
108
|
rule_result_id: String,
|
|
@@ -147,7 +124,8 @@ module Openlayer
|
|
|
147
124
|
# The evidence name.
|
|
148
125
|
name: nil,
|
|
149
126
|
# Where the uploaded file is stored. Set when the rule's `evidenceType` is
|
|
150
|
-
# `document`.
|
|
127
|
+
# `document`. Upload the file first with `POST /storage/presigned-url` and send
|
|
128
|
+
# the storage URI it returns.
|
|
151
129
|
storage_uri: nil,
|
|
152
130
|
# The evidence text. Set when the rule's `evidenceType` is `text`.
|
|
153
131
|
text: nil,
|
|
@@ -158,10 +136,6 @@ module Openlayer
|
|
|
158
136
|
end
|
|
159
137
|
|
|
160
138
|
# List the evidence attached to a rule result.
|
|
161
|
-
#
|
|
162
|
-
# Which field carries the evidence depends on the rule's `evidenceType`:
|
|
163
|
-
# `storageUri` for uploaded documents, `text` for written statements, and `url`
|
|
164
|
-
# for links.
|
|
165
139
|
sig do
|
|
166
140
|
params(
|
|
167
141
|
rule_result_id: String,
|
|
@@ -4,11 +4,7 @@ module Openlayer
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Governance
|
|
6
6
|
class RuleStats
|
|
7
|
-
# Get
|
|
8
|
-
# their results are passing, failing, pending, or due for renewal.
|
|
9
|
-
#
|
|
10
|
-
# Counts respect the filters you pass, so `frameworkId` gives you a single
|
|
11
|
-
# framework's overall compliance and `projectId` gives you a single project's.
|
|
7
|
+
# Get compliance statistics for a workspace.
|
|
12
8
|
sig do
|
|
13
9
|
params(
|
|
14
10
|
workspace_id: String,
|
|
@@ -5,10 +5,6 @@ module Openlayer
|
|
|
5
5
|
class Governance
|
|
6
6
|
class RuleTags
|
|
7
7
|
# List the rule tags in a workspace.
|
|
8
|
-
#
|
|
9
|
-
# Tags group rules across frameworks, for example by team or by control family.
|
|
10
|
-
# Use the ids returned here with the `tags` filter on
|
|
11
|
-
# [List rules](/api-reference/rest/governance/list-rules).
|
|
12
8
|
sig do
|
|
13
9
|
params(
|
|
14
10
|
workspace_id: String,
|
|
@@ -4,19 +4,7 @@ module Openlayer
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Governance
|
|
6
6
|
class Rules
|
|
7
|
-
# Create a
|
|
8
|
-
#
|
|
9
|
-
# A rule is one requirement. Its `type` decides how it is satisfied, and the two
|
|
10
|
-
# types accept different fields:
|
|
11
|
-
#
|
|
12
|
-
# - `platform` rules are evaluated automatically from the state of your workspace.
|
|
13
|
-
# Set `automationType` to the signal to check. Their `scope` must be `project`,
|
|
14
|
-
# and `evidenceType` and `renewalCadenceDays` must be omitted or `null`.
|
|
15
|
-
# - `evidence` rules are satisfied by attaching evidence. Set `evidenceType` to
|
|
16
|
-
# the kind of evidence that satisfies them. `automationType` and
|
|
17
|
-
# `automationParams` must be omitted or `null`.
|
|
18
|
-
#
|
|
19
|
-
# A new rule belongs to no framework. Map it to one from the Openlayer app.
|
|
7
|
+
# Create a rule in a workspace.
|
|
20
8
|
sig do
|
|
21
9
|
params(
|
|
22
10
|
workspace_id: String,
|
|
@@ -43,27 +31,33 @@ module Openlayer
|
|
|
43
31
|
# The rule name.
|
|
44
32
|
name:,
|
|
45
33
|
# Whether the rule is evaluated once for the whole workspace, or once per project
|
|
46
|
-
# the rule's frameworks apply to.
|
|
34
|
+
# the rule's frameworks apply to. Must be `project` for platform rules. Fixed once
|
|
35
|
+
# the rule is created.
|
|
47
36
|
scope:,
|
|
48
37
|
# `platform` rules are evaluated automatically from the state of your Openlayer
|
|
49
|
-
# workspace. `evidence` rules are satisfied by attaching evidence.
|
|
38
|
+
# workspace. `evidence` rules are satisfied by attaching evidence. Fixed once the
|
|
39
|
+
# rule is created.
|
|
50
40
|
type:,
|
|
51
41
|
# The user responsible for satisfying the rule.
|
|
52
42
|
assignee_id: nil,
|
|
53
|
-
# Configuration for the platform check, when the automation takes parameters.
|
|
43
|
+
# Configuration for the platform check, when the automation takes parameters. Omit
|
|
44
|
+
# or `null` for evidence rules. Fixed once the rule is created.
|
|
54
45
|
automation_params: nil,
|
|
55
46
|
# Which workspace signal a platform rule checks, for example
|
|
56
|
-
# `monitoring_mode_enabled`, `test_setup`, or `project_owner_set`.
|
|
57
|
-
# evidence rules.
|
|
47
|
+
# `monitoring_mode_enabled`, `test_setup`, or `project_owner_set`. Set it for
|
|
48
|
+
# platform rules; omit or `null` for evidence rules. Fixed once the rule is
|
|
49
|
+
# created.
|
|
58
50
|
automation_type: nil,
|
|
59
51
|
# Whether the rule is excluded from compliance calculations.
|
|
60
52
|
deactivated: nil,
|
|
61
53
|
# What the rule requires.
|
|
62
54
|
description: nil,
|
|
63
|
-
# The kind of evidence that satisfies the rule.
|
|
55
|
+
# The kind of evidence that satisfies the rule. Set it for evidence rules; omit or
|
|
56
|
+
# `null` for platform rules. Fixed once the rule is created.
|
|
64
57
|
evidence_type: nil,
|
|
65
58
|
# How often evidence must be renewed, in days. Once evidence is older than this,
|
|
66
|
-
# the rule result becomes `due_soon` and then `failing`.
|
|
59
|
+
# the rule result becomes `due_soon` and then `failing`. The window restarts
|
|
60
|
+
# whenever evidence is attached. Omit or `null` for platform rules.
|
|
67
61
|
renewal_cadence_days: nil,
|
|
68
62
|
# The ids of the rule tags to associate with the rule. Replaces the rule's tags.
|
|
69
63
|
# Read them back from `tags`, and list the tags available in the workspace with
|
|
@@ -73,8 +67,7 @@ module Openlayer
|
|
|
73
67
|
)
|
|
74
68
|
end
|
|
75
69
|
|
|
76
|
-
# Retrieve a
|
|
77
|
-
# its tags.
|
|
70
|
+
# Retrieve a rule with its frameworks and tags.
|
|
78
71
|
sig do
|
|
79
72
|
params(
|
|
80
73
|
rule_id: String,
|
|
@@ -88,12 +81,7 @@ module Openlayer
|
|
|
88
81
|
)
|
|
89
82
|
end
|
|
90
83
|
|
|
91
|
-
# Update a
|
|
92
|
-
#
|
|
93
|
-
# Rules that ship with Openlayer report `immutable: true` and cannot be edited.
|
|
94
|
-
#
|
|
95
|
-
# A rule's `scope`, `type`, `evidenceType`, and automation are fixed once it
|
|
96
|
-
# exists -- create a new rule instead of converting one.
|
|
84
|
+
# Update a rule.
|
|
97
85
|
sig do
|
|
98
86
|
params(
|
|
99
87
|
rule_id: String,
|
|
@@ -118,7 +106,8 @@ module Openlayer
|
|
|
118
106
|
# The rule name.
|
|
119
107
|
name: nil,
|
|
120
108
|
# How often evidence must be renewed, in days. Once evidence is older than this,
|
|
121
|
-
# the rule result becomes `due_soon` and then `failing`.
|
|
109
|
+
# the rule result becomes `due_soon` and then `failing`. The window restarts
|
|
110
|
+
# whenever evidence is attached. Omit or `null` for platform rules.
|
|
122
111
|
renewal_cadence_days: nil,
|
|
123
112
|
# The ids of the rule tags to associate with the rule. Replaces the rule's tags.
|
|
124
113
|
# Read them back from `tags`, and list the tags available in the workspace with
|
|
@@ -128,16 +117,7 @@ module Openlayer
|
|
|
128
117
|
)
|
|
129
118
|
end
|
|
130
119
|
|
|
131
|
-
# List the
|
|
132
|
-
#
|
|
133
|
-
# A rule is a single requirement Openlayer tracks. `platform` rules are evaluated
|
|
134
|
-
# automatically from the state of your workspace; `evidence` rules are satisfied
|
|
135
|
-
# by attaching evidence. A rule can belong to several frameworks at once, and
|
|
136
|
-
# rules that belong to none are returned too unless you pass
|
|
137
|
-
# `includeUnframed=false`.
|
|
138
|
-
#
|
|
139
|
-
# Pass `includeResults=true` to get each rule's compliance results inline instead
|
|
140
|
-
# of fetching them separately.
|
|
120
|
+
# List the rules in a workspace.
|
|
141
121
|
sig do
|
|
142
122
|
params(
|
|
143
123
|
workspace_id: String,
|
|
@@ -205,11 +185,7 @@ module Openlayer
|
|
|
205
185
|
)
|
|
206
186
|
end
|
|
207
187
|
|
|
208
|
-
# Delete a
|
|
209
|
-
#
|
|
210
|
-
# Only rules you created can be deleted. Rules that ship with Openlayer report
|
|
211
|
-
# `immutable: true` and cannot be deleted -- exclude one from compliance by
|
|
212
|
-
# setting `deactivated` with `PUT /rules/{ruleId}` instead.
|
|
188
|
+
# Delete a rule and its results.
|
|
213
189
|
sig do
|
|
214
190
|
params(
|
|
215
191
|
rule_id: String,
|
|
@@ -4,7 +4,7 @@ module Openlayer
|
|
|
4
4
|
module Resources
|
|
5
5
|
class InferencePipelines
|
|
6
6
|
class Rows
|
|
7
|
-
#
|
|
7
|
+
# Retrieve a row by inference ID, including OTel steps.
|
|
8
8
|
sig do
|
|
9
9
|
params(
|
|
10
10
|
inference_id: String,
|
|
@@ -20,7 +20,7 @@ module Openlayer
|
|
|
20
20
|
)
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
# Update
|
|
23
|
+
# Update a row in an inference pipeline.
|
|
24
24
|
sig do
|
|
25
25
|
params(
|
|
26
26
|
inference_pipeline_id: String,
|
|
@@ -46,7 +46,7 @@ module Openlayer
|
|
|
46
46
|
)
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
#
|
|
49
|
+
# List the rows in an inference pipeline.
|
|
50
50
|
sig do
|
|
51
51
|
params(
|
|
52
52
|
inference_pipeline_id: String,
|
|
@@ -102,8 +102,7 @@ module Openlayer
|
|
|
102
102
|
)
|
|
103
103
|
end
|
|
104
104
|
|
|
105
|
-
# Delete a
|
|
106
|
-
# perform this action.
|
|
105
|
+
# Delete a row by inference ID.
|
|
107
106
|
sig do
|
|
108
107
|
params(
|
|
109
108
|
inference_id: String,
|
|
@@ -12,7 +12,7 @@ module Openlayer
|
|
|
12
12
|
sig { returns(Openlayer::Resources::InferencePipelines::TestResults) }
|
|
13
13
|
attr_reader :test_results
|
|
14
14
|
|
|
15
|
-
# Retrieve inference pipeline.
|
|
15
|
+
# Retrieve an inference pipeline.
|
|
16
16
|
sig do
|
|
17
17
|
params(
|
|
18
18
|
inference_pipeline_id: String,
|
|
@@ -32,7 +32,7 @@ module Openlayer
|
|
|
32
32
|
)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
# Update inference pipeline.
|
|
35
|
+
# Update an inference pipeline.
|
|
36
36
|
sig do
|
|
37
37
|
params(
|
|
38
38
|
inference_pipeline_id: String,
|
|
@@ -56,7 +56,7 @@ module Openlayer
|
|
|
56
56
|
)
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
-
# Delete inference pipeline.
|
|
59
|
+
# Delete an inference pipeline.
|
|
60
60
|
sig do
|
|
61
61
|
params(
|
|
62
62
|
inference_pipeline_id: String,
|
|
@@ -70,12 +70,7 @@ module Openlayer
|
|
|
70
70
|
)
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
-
#
|
|
74
|
-
# metadata.
|
|
75
|
-
#
|
|
76
|
-
# Returns a list of sessions for the inference pipeline, including activity
|
|
77
|
-
# statistics such as record counts, token usage, cost, latency, and the first and
|
|
78
|
-
# last records.
|
|
73
|
+
# List the sessions in an inference pipeline, with their stats.
|
|
79
74
|
sig do
|
|
80
75
|
params(
|
|
81
76
|
inference_pipeline_id: String,
|
|
@@ -131,11 +126,7 @@ module Openlayer
|
|
|
131
126
|
)
|
|
132
127
|
end
|
|
133
128
|
|
|
134
|
-
#
|
|
135
|
-
#
|
|
136
|
-
# Returns a list of users who have interacted with the inference pipeline,
|
|
137
|
-
# including their activity statistics such as session counts, record counts, token
|
|
138
|
-
# usage, and costs.
|
|
129
|
+
# List the users of an inference pipeline, with their stats.
|
|
139
130
|
sig do
|
|
140
131
|
params(
|
|
141
132
|
inference_pipeline_id: String,
|
|
@@ -4,7 +4,7 @@ module Openlayer
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Projects
|
|
6
6
|
class Tests
|
|
7
|
-
# Create a test.
|
|
7
|
+
# Create a test in a project.
|
|
8
8
|
sig do
|
|
9
9
|
params(
|
|
10
10
|
project_id: String,
|
|
@@ -76,7 +76,7 @@ module Openlayer
|
|
|
76
76
|
)
|
|
77
77
|
end
|
|
78
78
|
|
|
79
|
-
# Update tests.
|
|
79
|
+
# Update tests in a project.
|
|
80
80
|
sig do
|
|
81
81
|
params(
|
|
82
82
|
project_id: String,
|
|
@@ -93,7 +93,7 @@ module Openlayer
|
|
|
93
93
|
)
|
|
94
94
|
end
|
|
95
95
|
|
|
96
|
-
# List tests
|
|
96
|
+
# List the tests in a project.
|
|
97
97
|
sig do
|
|
98
98
|
params(
|
|
99
99
|
project_id: String,
|
|
@@ -4,7 +4,7 @@ module Openlayer
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Storage
|
|
6
6
|
class PresignedURL
|
|
7
|
-
#
|
|
7
|
+
# Get a presigned url to upload a file.
|
|
8
8
|
sig do
|
|
9
9
|
params(
|
|
10
10
|
object_name: String,
|
|
@@ -18,16 +18,7 @@ module Openlayer
|
|
|
18
18
|
)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
#
|
|
22
|
-
# object from.
|
|
23
|
-
#
|
|
24
|
-
# Use it to collect anything the platform stored on your behalf -- for example the
|
|
25
|
-
# archive a framework export leaves behind, whose `storageUri` comes back in the
|
|
26
|
-
# background task's `outputs`.
|
|
27
|
-
#
|
|
28
|
-
# The workspace is taken from the API key, so there is nothing else to send. The
|
|
29
|
-
# url is only issued for objects your workspace owns, and `404` covers both "no
|
|
30
|
-
# such object" and "not yours".
|
|
21
|
+
# Get a short-lived download url for a stored object.
|
|
31
22
|
sig do
|
|
32
23
|
params(
|
|
33
24
|
storage_uri: String,
|
|
@@ -35,7 +26,8 @@ module Openlayer
|
|
|
35
26
|
).returns(Openlayer::Models::Storage::PresignedURLRetrieveResponse)
|
|
36
27
|
end
|
|
37
28
|
def retrieve(
|
|
38
|
-
# The object's storage uri.
|
|
29
|
+
# The object's storage uri, for example `outputs.storageUri` from a framework
|
|
30
|
+
# export's background task.
|
|
39
31
|
storage_uri:,
|
|
40
32
|
request_options: {}
|
|
41
33
|
)
|
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
module Openlayer
|
|
4
4
|
module Resources
|
|
5
5
|
class Tests
|
|
6
|
-
#
|
|
7
|
-
# range. This allows evaluating tests for historical data or custom time periods
|
|
8
|
-
# outside the regular evaluation window schedule. It also allows overwriting the
|
|
9
|
-
# existing test results.
|
|
6
|
+
# Evaluate a test over a custom time range.
|
|
10
7
|
sig do
|
|
11
8
|
params(
|
|
12
9
|
test_id: String,
|
|
@@ -4,10 +4,11 @@ module Openlayer
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Workspaces
|
|
6
6
|
class APIKeys
|
|
7
|
-
# Create a new API key
|
|
7
|
+
# Create a new API key.
|
|
8
8
|
sig do
|
|
9
9
|
params(
|
|
10
10
|
workspace_id: String,
|
|
11
|
+
expires_at: T.nilable(Time),
|
|
11
12
|
name: T.nilable(String),
|
|
12
13
|
request_options: Openlayer::RequestOptions::OrHash
|
|
13
14
|
).returns(Openlayer::Models::Workspaces::APIKeyCreateResponse)
|
|
@@ -15,12 +16,120 @@ module Openlayer
|
|
|
15
16
|
def create(
|
|
16
17
|
# The workspace id.
|
|
17
18
|
workspace_id,
|
|
19
|
+
# When the key stops authenticating. `null` means the key never expires. Set when
|
|
20
|
+
# the key is created or rotated, and must be in the future. When the request is
|
|
21
|
+
# authenticated with an API key that expires, the result can't be later than that
|
|
22
|
+
# key's expiry. On create, omit it to inherit that expiry. On rotate, omit it to
|
|
23
|
+
# keep the current one. It can't be changed with an update; rotate the key
|
|
24
|
+
# instead.
|
|
25
|
+
expires_at: nil,
|
|
18
26
|
# The API key name.
|
|
19
27
|
name: nil,
|
|
20
28
|
request_options: {}
|
|
21
29
|
)
|
|
22
30
|
end
|
|
23
31
|
|
|
32
|
+
# Retrieve an API key.
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
api_key_id: String,
|
|
36
|
+
workspace_id: String,
|
|
37
|
+
request_options: Openlayer::RequestOptions::OrHash
|
|
38
|
+
).returns(Openlayer::Models::Workspaces::APIKeyRetrieveResponse)
|
|
39
|
+
end
|
|
40
|
+
def retrieve(
|
|
41
|
+
# The API key id.
|
|
42
|
+
api_key_id,
|
|
43
|
+
# The workspace id.
|
|
44
|
+
workspace_id:,
|
|
45
|
+
request_options: {}
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Rename an API key.
|
|
50
|
+
sig do
|
|
51
|
+
params(
|
|
52
|
+
api_key_id: String,
|
|
53
|
+
workspace_id: String,
|
|
54
|
+
name: T.nilable(String),
|
|
55
|
+
request_options: Openlayer::RequestOptions::OrHash
|
|
56
|
+
).returns(Openlayer::Models::Workspaces::APIKeyUpdateResponse)
|
|
57
|
+
end
|
|
58
|
+
def update(
|
|
59
|
+
# Path param: The API key id.
|
|
60
|
+
api_key_id,
|
|
61
|
+
# Path param: The workspace id.
|
|
62
|
+
workspace_id:,
|
|
63
|
+
# Body param: The API key name.
|
|
64
|
+
name: nil,
|
|
65
|
+
request_options: {}
|
|
66
|
+
)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# List your API keys in a workspace.
|
|
70
|
+
sig do
|
|
71
|
+
params(
|
|
72
|
+
workspace_id: String,
|
|
73
|
+
request_options: Openlayer::RequestOptions::OrHash
|
|
74
|
+
).returns(
|
|
75
|
+
T::Array[Openlayer::Models::Workspaces::APIKeyListResponseItem]
|
|
76
|
+
)
|
|
77
|
+
end
|
|
78
|
+
def list(
|
|
79
|
+
# The workspace id.
|
|
80
|
+
workspace_id,
|
|
81
|
+
request_options: {}
|
|
82
|
+
)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Delete an API key.
|
|
86
|
+
sig do
|
|
87
|
+
params(
|
|
88
|
+
api_key_id: String,
|
|
89
|
+
workspace_id: String,
|
|
90
|
+
request_options: Openlayer::RequestOptions::OrHash
|
|
91
|
+
).void
|
|
92
|
+
end
|
|
93
|
+
def delete(
|
|
94
|
+
# The API key id.
|
|
95
|
+
api_key_id,
|
|
96
|
+
# The workspace id.
|
|
97
|
+
workspace_id:,
|
|
98
|
+
request_options: {}
|
|
99
|
+
)
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Replace an API key's secret.
|
|
103
|
+
sig do
|
|
104
|
+
params(
|
|
105
|
+
api_key_id: String,
|
|
106
|
+
workspace_id: String,
|
|
107
|
+
expires_at: T.nilable(Time),
|
|
108
|
+
grace_period_hours: Integer,
|
|
109
|
+
request_options: Openlayer::RequestOptions::OrHash
|
|
110
|
+
).returns(Openlayer::Models::Workspaces::APIKeyRotateResponse)
|
|
111
|
+
end
|
|
112
|
+
def rotate(
|
|
113
|
+
# Path param: The API key id.
|
|
114
|
+
api_key_id,
|
|
115
|
+
# Path param: The workspace id.
|
|
116
|
+
workspace_id:,
|
|
117
|
+
# Body param: When the key stops authenticating. `null` means the key never
|
|
118
|
+
# expires. Set when the key is created or rotated, and must be in the future. When
|
|
119
|
+
# the request is authenticated with an API key that expires, the result can't be
|
|
120
|
+
# later than that key's expiry. On create, omit it to inherit that expiry. On
|
|
121
|
+
# rotate, omit it to keep the current one. It can't be changed with an update;
|
|
122
|
+
# rotate the key instead.
|
|
123
|
+
expires_at: nil,
|
|
124
|
+
# Body param: Hours the previous secret keeps authenticating. The default of 0
|
|
125
|
+
# retires it immediately. It never outlives `expiresAt`. Only one previous secret
|
|
126
|
+
# is kept, so rotating again during a grace period retires the older one
|
|
127
|
+
# immediately.
|
|
128
|
+
grace_period_hours: nil,
|
|
129
|
+
request_options: {}
|
|
130
|
+
)
|
|
131
|
+
end
|
|
132
|
+
|
|
24
133
|
# @api private
|
|
25
134
|
sig { params(client: Openlayer::Client).returns(T.attached_class) }
|
|
26
135
|
def self.new(client:)
|
|
@@ -2,7 +2,7 @@ module Openlayer
|
|
|
2
2
|
module Models
|
|
3
3
|
module Workspaces
|
|
4
4
|
type api_key_create_params =
|
|
5
|
-
{ workspace_id: String, name: String? }
|
|
5
|
+
{ workspace_id: String, expires_at: Time?, name: String? }
|
|
6
6
|
& Openlayer::Internal::Type::request_parameters
|
|
7
7
|
|
|
8
8
|
class APIKeyCreateParams < Openlayer::Internal::Type::BaseModel
|
|
@@ -11,16 +11,20 @@ module Openlayer
|
|
|
11
11
|
|
|
12
12
|
attr_accessor workspace_id: String
|
|
13
13
|
|
|
14
|
+
attr_accessor expires_at: Time?
|
|
15
|
+
|
|
14
16
|
attr_accessor name: String?
|
|
15
17
|
|
|
16
18
|
def initialize: (
|
|
17
19
|
workspace_id: String,
|
|
20
|
+
?expires_at: Time?,
|
|
18
21
|
?name: String?,
|
|
19
22
|
?request_options: Openlayer::request_opts
|
|
20
23
|
) -> void
|
|
21
24
|
|
|
22
25
|
def to_hash: -> {
|
|
23
26
|
workspace_id: String,
|
|
27
|
+
expires_at: Time?,
|
|
24
28
|
name: String?,
|
|
25
29
|
request_options: Openlayer::RequestOptions
|
|
26
30
|
}
|
|
@@ -8,10 +8,17 @@ module Openlayer
|
|
|
8
8
|
date_last_used: Time?,
|
|
9
9
|
date_updated: Time,
|
|
10
10
|
secure_key: String,
|
|
11
|
-
|
|
11
|
+
status: Openlayer::Models::Workspaces::APIKeyCreateResponse::status,
|
|
12
|
+
expires_at: Time?,
|
|
13
|
+
last_rotated_at: Time?,
|
|
14
|
+
name: String?,
|
|
15
|
+
previous_key_expires_at: Time?,
|
|
16
|
+
secret: String
|
|
12
17
|
}
|
|
13
18
|
|
|
14
19
|
class APIKeyCreateResponse < Openlayer::Internal::Type::BaseModel
|
|
20
|
+
attr_accessor expires_at: Time?
|
|
21
|
+
|
|
15
22
|
attr_accessor name: String?
|
|
16
23
|
|
|
17
24
|
attr_accessor id: String
|
|
@@ -24,13 +31,28 @@ module Openlayer
|
|
|
24
31
|
|
|
25
32
|
attr_accessor secure_key: String
|
|
26
33
|
|
|
34
|
+
attr_accessor status: Openlayer::Models::Workspaces::APIKeyCreateResponse::status
|
|
35
|
+
|
|
36
|
+
attr_accessor last_rotated_at: Time?
|
|
37
|
+
|
|
38
|
+
attr_accessor previous_key_expires_at: Time?
|
|
39
|
+
|
|
40
|
+
attr_reader secret: String?
|
|
41
|
+
|
|
42
|
+
def secret=: (String) -> String
|
|
43
|
+
|
|
27
44
|
def initialize: (
|
|
28
45
|
id: String,
|
|
29
46
|
date_created: Time,
|
|
30
47
|
date_last_used: Time?,
|
|
31
48
|
date_updated: Time,
|
|
32
49
|
secure_key: String,
|
|
33
|
-
|
|
50
|
+
status: Openlayer::Models::Workspaces::APIKeyCreateResponse::status,
|
|
51
|
+
?expires_at: Time?,
|
|
52
|
+
?last_rotated_at: Time?,
|
|
53
|
+
?name: String?,
|
|
54
|
+
?previous_key_expires_at: Time?,
|
|
55
|
+
?secret: String
|
|
34
56
|
) -> void
|
|
35
57
|
|
|
36
58
|
def to_hash: -> {
|
|
@@ -39,8 +61,25 @@ module Openlayer
|
|
|
39
61
|
date_last_used: Time?,
|
|
40
62
|
date_updated: Time,
|
|
41
63
|
secure_key: String,
|
|
42
|
-
|
|
64
|
+
status: Openlayer::Models::Workspaces::APIKeyCreateResponse::status,
|
|
65
|
+
expires_at: Time?,
|
|
66
|
+
last_rotated_at: Time?,
|
|
67
|
+
name: String?,
|
|
68
|
+
previous_key_expires_at: Time?,
|
|
69
|
+
secret: String
|
|
43
70
|
}
|
|
71
|
+
|
|
72
|
+
type status = :active | :rotating | :expired
|
|
73
|
+
|
|
74
|
+
module Status
|
|
75
|
+
extend Openlayer::Internal::Type::Enum
|
|
76
|
+
|
|
77
|
+
ACTIVE: :active
|
|
78
|
+
ROTATING: :rotating
|
|
79
|
+
EXPIRED: :expired
|
|
80
|
+
|
|
81
|
+
def self?.values: -> ::Array[Openlayer::Models::Workspaces::APIKeyCreateResponse::status]
|
|
82
|
+
end
|
|
44
83
|
end
|
|
45
84
|
end
|
|
46
85
|
end
|