noresponse 7.0.5 → 7.1.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 (68) hide show
  1. checksums.yaml +4 -4
  2. data/lib/no_response/keys.rb +866 -0
  3. data/lib/no_response/models/operations/createkey_request.rb +37 -0
  4. data/lib/no_response/models/operations/createkey_request.rbi +20 -0
  5. data/lib/no_response/models/operations/createkey_response.rb +32 -0
  6. data/lib/no_response/models/operations/createkey_response.rbi +20 -0
  7. data/lib/no_response/models/operations/getsettings_request.rb +41 -0
  8. data/lib/no_response/models/operations/getsettings_request.rbi +20 -0
  9. data/lib/no_response/models/operations/getsettings_response.rb +32 -0
  10. data/lib/no_response/models/operations/getsettings_response.rbi +20 -0
  11. data/lib/no_response/models/operations/listkeys_request.rb +33 -0
  12. data/lib/no_response/models/operations/listkeys_request.rbi +14 -0
  13. data/lib/no_response/models/operations/listkeys_response.rb +32 -0
  14. data/lib/no_response/models/operations/listkeys_response.rbi +20 -0
  15. data/lib/no_response/models/operations/revokekey_request.rb +37 -0
  16. data/lib/no_response/models/operations/revokekey_request.rbi +20 -0
  17. data/lib/no_response/models/operations/revokekey_response.rb +32 -0
  18. data/lib/no_response/models/operations/revokekey_response.rbi +20 -0
  19. data/lib/no_response/models/operations/updatesettings_request.rb +52 -0
  20. data/lib/no_response/models/operations/updatesettings_request.rbi +26 -0
  21. data/lib/no_response/models/operations/updatesettings_response.rb +32 -0
  22. data/lib/no_response/models/operations/updatesettings_response.rbi +20 -0
  23. data/lib/no_response/models/operations.rb +10 -0
  24. data/lib/no_response/models/shared/admission.rb +19 -0
  25. data/lib/no_response/models/shared/admission.rbi +9 -0
  26. data/lib/no_response/models/shared/conflicterrorcode.rb +2 -0
  27. data/lib/no_response/models/shared/defaultdepth.rb +19 -0
  28. data/lib/no_response/models/shared/defaultdepth.rbi +9 -0
  29. data/lib/no_response/models/shared/flowchange.rb +136 -0
  30. data/lib/no_response/models/shared/flowchange.rbi +62 -0
  31. data/lib/no_response/models/shared/flowsettings.rb +127 -0
  32. data/lib/no_response/models/shared/flowsettings.rbi +56 -0
  33. data/lib/no_response/models/shared/key.rb +158 -0
  34. data/lib/no_response/models/shared/key.rbi +80 -0
  35. data/lib/no_response/models/shared/{scope.rb → key_scope.rb} +2 -1
  36. data/lib/no_response/models/shared/{scope.rbi → key_scope.rbi} +2 -2
  37. data/lib/no_response/models/shared/keyenvironment.rb +19 -0
  38. data/lib/no_response/models/shared/keyenvironment.rbi +9 -0
  39. data/lib/no_response/models/shared/keylist.rb +32 -0
  40. data/lib/no_response/models/shared/keylist.rbi +14 -0
  41. data/lib/no_response/models/shared/keyrequest.rb +49 -0
  42. data/lib/no_response/models/shared/keyrequest.rbi +20 -0
  43. data/lib/no_response/models/shared/keyrequest_scope.rb +21 -0
  44. data/lib/no_response/models/shared/keyrequest_scope.rbi +9 -0
  45. data/lib/no_response/models/shared/keyrotation.rb +2 -2
  46. data/lib/no_response/models/shared/keyrotation_scope.rb +24 -0
  47. data/lib/no_response/models/shared/keyrotation_scope.rbi +9 -0
  48. data/lib/no_response/models/shared/keystatus.rb +20 -0
  49. data/lib/no_response/models/shared/keystatus.rbi +9 -0
  50. data/lib/no_response/models/shared/onexpiry.rb +20 -0
  51. data/lib/no_response/models/shared/onexpiry.rbi +9 -0
  52. data/lib/no_response/models/shared/permissiondeniederrorcode.rb +1 -0
  53. data/lib/no_response/models/shared/settings.rb +116 -0
  54. data/lib/no_response/models/shared/settings.rbi +56 -0
  55. data/lib/no_response/models/shared/settingsflows.rb +56 -0
  56. data/lib/no_response/models/shared/settingsflows.rbi +26 -0
  57. data/lib/no_response/models/shared/settingsrequest.rb +55 -0
  58. data/lib/no_response/models/shared/settingsrequest.rbi +26 -0
  59. data/lib/no_response/models/shared/settingsrequestflows.rb +65 -0
  60. data/lib/no_response/models/shared/settingsrequestflows.rbi +32 -0
  61. data/lib/no_response/models/shared/sourceid.rb +23 -0
  62. data/lib/no_response/models/shared/sourceid.rbi +9 -0
  63. data/lib/no_response/models/shared.rb +18 -1
  64. data/lib/no_response/noresponseclient.rb +2 -1
  65. data/lib/no_response/sdkconfiguration.rb +2 -2
  66. data/lib/no_response/settings.rb +633 -0
  67. data/lib/noresponse.rb +1 -0
  68. metadata +58 -3
@@ -0,0 +1,19 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # KeyEnvironment - The environment the key belongs to. A live key assesses with live sources; a test key answers from the deterministic simulator.
8
+ class KeyEnvironment
9
+ include ::Crystalline::Enum
10
+ enums do
11
+ LIVE = new("live")
12
+ TEST = new("test")
13
+ end
14
+
15
+ open!
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,9 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::KeyEnvironment
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::KeyEnvironment
9
+ end
@@ -0,0 +1,32 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # GET /v1/workspaces/{workspace_id}/keys: the keys of both of the workspace's environments, newest first, at most 200 of each, revoked and expired keys included. No item carries a secret.
8
+ class KeyList
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ field(
13
+ :items,
14
+ Crystalline::Array.new(Models::Shared::Key),
15
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("items"), required: true}}
16
+ )
17
+
18
+ sig { params(items: T::Array[Models::Shared::Key]).void }
19
+ def initialize(items:)
20
+ @items = items
21
+ end
22
+
23
+ sig { params(other: T.untyped).returns(T::Boolean) }
24
+ def ==(other)
25
+ return false unless other.is_a?(self.class)
26
+ return false unless @items == other.items
27
+ true
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,14 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::KeyList
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::KeyList
9
+ def items
10
+ end
11
+
12
+ def items=(str_)
13
+ end
14
+ end
@@ -0,0 +1,49 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # POST /v1/workspaces/{workspace_id}/keys body. Creates an API key in one environment of the workspace with the scopes named, and returns its secret once. A live key needs the admin or owner role; a test key needs developer or above. An API key with the management scope creates keys in its own environment with scopes it holds itself. Each scope may appear once.
8
+ class KeyRequest
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ # The environment the key belongs to. A live key assesses with live sources; a test key answers from the deterministic simulator.
13
+ field(
14
+ :environment,
15
+ Models::Shared::KeyEnvironment,
16
+ {
17
+ 'format_json': {
18
+ 'letter_case': ::NoResponse::Utils.field_name("environment"),
19
+ required: true,
20
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::KeyEnvironment, false)
21
+ }
22
+ }
23
+ )
24
+ # The key's scopes, each at most once.
25
+ field(
26
+ :scopes,
27
+ Crystalline::Array.new(Models::Shared::KeyRequestScope),
28
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("scopes"), required: true}}
29
+ )
30
+
31
+ sig {
32
+ params(environment: Models::Shared::KeyEnvironment, scopes: T::Array[Models::Shared::KeyRequestScope]).void
33
+ }
34
+ def initialize(environment:, scopes:)
35
+ @environment = environment
36
+ @scopes = scopes
37
+ end
38
+
39
+ sig { params(other: T.untyped).returns(T::Boolean) }
40
+ def ==(other)
41
+ return false unless other.is_a?(self.class)
42
+ return false unless @environment == other.environment
43
+ return false unless @scopes == other.scopes
44
+ true
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,20 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::KeyRequest
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::KeyRequest
9
+ def environment
10
+ end
11
+
12
+ def environment=(str_)
13
+ end
14
+
15
+ def scopes
16
+ end
17
+
18
+ def scopes=(str_)
19
+ end
20
+ end
@@ -0,0 +1,21 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+
8
+ class KeyRequestScope < T::Enum
9
+ enums do
10
+ ASSESS = new("assess")
11
+ HISTORY = new("history")
12
+ DELETE = new("delete")
13
+ WEBHOOKS = new("webhooks")
14
+ DETAILED = new("detailed")
15
+ INTEGRATIONS = new("integrations")
16
+ MANAGEMENT = new("management")
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,9 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::KeyRequestScope
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::KeyRequestScope
9
+ end
@@ -20,7 +20,7 @@ module NoResponse
20
20
  # The scopes of the new key: those of the presented key.
21
21
  field(
22
22
  :scopes,
23
- Crystalline::Array.new(Models::Shared::Scope),
23
+ Crystalline::Array.new(Models::Shared::KeyRotationScope),
24
24
  {'format_json': {'letter_case': ::NoResponse::Utils.field_name("scopes"), required: true}}
25
25
  )
26
26
 
@@ -46,7 +46,7 @@ module NoResponse
46
46
  params(
47
47
  key: ::String,
48
48
  key_id: ::String,
49
- scopes: T::Array[Models::Shared::Scope],
49
+ scopes: T::Array[Models::Shared::KeyRotationScope],
50
50
  created_at: ::String,
51
51
  previous_key_id: ::String,
52
52
  previous_key_expires_at: ::String
@@ -0,0 +1,24 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+
8
+ class KeyRotationScope
9
+ include ::Crystalline::Enum
10
+ enums do
11
+ ASSESS = new("assess")
12
+ HISTORY = new("history")
13
+ DELETE = new("delete")
14
+ WEBHOOKS = new("webhooks")
15
+ DETAILED = new("detailed")
16
+ INTEGRATIONS = new("integrations")
17
+ MANAGEMENT = new("management")
18
+ end
19
+
20
+ open!
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,9 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::KeyRotationScope
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::KeyRotationScope
9
+ end
@@ -0,0 +1,20 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # KeyStatus - active: the key authenticates. expired: a rotation's overlap window has ended (expires_at). revoked: the key was revoked (revoked_at) and answers 401.
8
+ class KeyStatus
9
+ include ::Crystalline::Enum
10
+ enums do
11
+ ACTIVE = new("active")
12
+ EXPIRED = new("expired")
13
+ REVOKED = new("revoked")
14
+ end
15
+
16
+ open!
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,9 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::KeyStatus
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::KeyStatus
9
+ end
@@ -0,0 +1,20 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # OnExpiry - The decision a held assessment takes when hold_seconds pass before its investigation completes, unless the evidence so far gives a stricter one (default review). It is announced as account.risk_changed like any other change, so an expired hold is always announced. A hosted provider hook, which cannot wait, answers a held account by it at once: deny for block, allow otherwise. Kept while the flow is immediate.
8
+ class OnExpiry
9
+ include ::Crystalline::Enum
10
+ enums do
11
+ ALLOW = new("allow")
12
+ REVIEW = new("review")
13
+ BLOCK = new("block")
14
+ end
15
+
16
+ open!
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,9 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::OnExpiry
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::OnExpiry
9
+ end
@@ -9,6 +9,7 @@ module NoResponse
9
9
  include ::Crystalline::Enum
10
10
  enums do
11
11
  WORKSPACE_FORBIDDEN = new("workspace_forbidden")
12
+ ROLE_FORBIDDEN = new("role_forbidden")
12
13
  end
13
14
 
14
15
  open!
@@ -0,0 +1,116 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # One environment's settings: how long its assessments are kept, and for each flow the risk thresholds that decide it and the depth a request that names none is served at, and the sources it refuses. Live and test each have their own. A flow without thresholds of its own uses account_creation's (inherits_account_creation). Every change is recorded in the audit log as settings.updated, with who made it.
8
+ class Settings
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ # The workspace id, which is also its live environment's workspace id; the test environment's is the same id with :test appended. A workspace created through the API is tnt_ and a 26-character ULID.
13
+ field(
14
+ :workspace_id,
15
+ ::String,
16
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("workspace_id"), required: true}}
17
+ )
18
+ # The environment the key belongs to. A live key assesses with live sources; a test key answers from the deterministic simulator.
19
+ field(
20
+ :environment,
21
+ Models::Shared::KeyEnvironment,
22
+ {
23
+ 'format_json': {
24
+ 'letter_case': ::NoResponse::Utils.field_name("environment"),
25
+ required: true,
26
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::KeyEnvironment, false)
27
+ }
28
+ }
29
+ )
30
+ # Days an assessment is kept after it is created, 1 to 365 (default 365). Shortening hides older assessments at once.
31
+ field(
32
+ :retention_days,
33
+ ::Integer,
34
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("retention_days"), required: true}}
35
+ )
36
+ # How many times this environment's policy has changed; 0 while the defaults apply. A served risk.policy_version ends in +t<policy_version> once it is above 0.
37
+ field(
38
+ :policy_version,
39
+ ::Integer,
40
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("policy_version"), required: true}}
41
+ )
42
+
43
+ field(
44
+ :flows,
45
+ Models::Shared::SettingsFlows,
46
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("flows"), required: true}}
47
+ )
48
+ # The sources this environment refuses, sorted; empty, the default, refuses none. An assessment leaves a refused source out: its coverage is missing (an identifier with no other source lists coverage-unavailable as unavailable) rather than not_found, and a stored result of a refused source is not reused.
49
+ field(
50
+ :refused_sources,
51
+ Crystalline::Array.new(Models::Shared::SourceId),
52
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("refused_sources"), required: true}}
53
+ )
54
+ # Who last changed the policy: the member's external user id for a change made through the console, the prefix (nrk_<environment>_<key id>) of the management key that made it, or NoResponse. Absent while the defaults apply.
55
+ field(
56
+ :updated_by,
57
+ Crystalline::Nilable.new(::String),
58
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("updated_by")}}
59
+ )
60
+ # When the policy last changed. Absent while the defaults apply.
61
+ field(
62
+ :updated_at,
63
+ Crystalline::Nilable.new(::String),
64
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("updated_at")}}
65
+ )
66
+
67
+ sig {
68
+ params(
69
+ workspace_id: ::String,
70
+ environment: Models::Shared::KeyEnvironment,
71
+ retention_days: ::Integer,
72
+ policy_version: ::Integer,
73
+ flows: Models::Shared::SettingsFlows,
74
+ refused_sources: T::Array[Models::Shared::SourceId],
75
+ updated_by: T.nilable(::String),
76
+ updated_at: T.nilable(::String)
77
+ )
78
+ .void
79
+ }
80
+ def initialize(
81
+ workspace_id:,
82
+ environment:,
83
+ retention_days:,
84
+ policy_version:,
85
+ flows:,
86
+ refused_sources:,
87
+ updated_by: nil,
88
+ updated_at: nil
89
+ )
90
+ @workspace_id = workspace_id
91
+ @environment = environment
92
+ @retention_days = retention_days
93
+ @policy_version = policy_version
94
+ @flows = flows
95
+ @refused_sources = refused_sources
96
+ @updated_by = updated_by
97
+ @updated_at = updated_at
98
+ end
99
+
100
+ sig { params(other: T.untyped).returns(T::Boolean) }
101
+ def ==(other)
102
+ return false unless other.is_a?(self.class)
103
+ return false unless @workspace_id == other.workspace_id
104
+ return false unless @environment == other.environment
105
+ return false unless @retention_days == other.retention_days
106
+ return false unless @policy_version == other.policy_version
107
+ return false unless @flows == other.flows
108
+ return false unless @refused_sources == other.refused_sources
109
+ return false unless @updated_by == other.updated_by
110
+ return false unless @updated_at == other.updated_at
111
+ true
112
+ end
113
+ end
114
+ end
115
+ end
116
+ end
@@ -0,0 +1,56 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::Settings
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::Settings
9
+ def workspace_id
10
+ end
11
+
12
+ def workspace_id=(str_)
13
+ end
14
+
15
+ def environment
16
+ end
17
+
18
+ def environment=(str_)
19
+ end
20
+
21
+ def retention_days
22
+ end
23
+
24
+ def retention_days=(str_)
25
+ end
26
+
27
+ def policy_version
28
+ end
29
+
30
+ def policy_version=(str_)
31
+ end
32
+
33
+ def flows
34
+ end
35
+
36
+ def flows=(str_)
37
+ end
38
+
39
+ def refused_sources
40
+ end
41
+
42
+ def refused_sources=(str_)
43
+ end
44
+
45
+ def updated_by
46
+ end
47
+
48
+ def updated_by=(str_)
49
+ end
50
+
51
+ def updated_at
52
+ end
53
+
54
+ def updated_at=(str_)
55
+ end
56
+ end
@@ -0,0 +1,56 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+
8
+ class SettingsFlows
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ # One flow's policy in force. A score below step_up is allow, below review step_up, and from review review; from block, when present, the decision is block. admission says when the flow's decision is final.
13
+ field(
14
+ :account_creation,
15
+ Models::Shared::FlowSettings,
16
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("account_creation"), required: true}}
17
+ )
18
+ # One flow's policy in force. A score below step_up is allow, below review step_up, and from review review; from block, when present, the decision is block. admission says when the flow's decision is final.
19
+ field(
20
+ :login,
21
+ Models::Shared::FlowSettings,
22
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("login"), required: true}}
23
+ )
24
+ # One flow's policy in force. A score below step_up is allow, below review step_up, and from review review; from block, when present, the decision is block. admission says when the flow's decision is final.
25
+ field(
26
+ :purchase,
27
+ Models::Shared::FlowSettings,
28
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("purchase"), required: true}}
29
+ )
30
+
31
+ sig {
32
+ params(
33
+ account_creation: Models::Shared::FlowSettings,
34
+ login: Models::Shared::FlowSettings,
35
+ purchase: Models::Shared::FlowSettings
36
+ )
37
+ .void
38
+ }
39
+ def initialize(account_creation:, login:, purchase:)
40
+ @account_creation = account_creation
41
+ @login = login
42
+ @purchase = purchase
43
+ end
44
+
45
+ sig { params(other: T.untyped).returns(T::Boolean) }
46
+ def ==(other)
47
+ return false unless other.is_a?(self.class)
48
+ return false unless @account_creation == other.account_creation
49
+ return false unless @login == other.login
50
+ return false unless @purchase == other.purchase
51
+ true
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,26 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::SettingsFlows
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::SettingsFlows
9
+ def account_creation
10
+ end
11
+
12
+ def account_creation=(str_)
13
+ end
14
+
15
+ def login
16
+ end
17
+
18
+ def login=(str_)
19
+ end
20
+
21
+ def purchase
22
+ end
23
+
24
+ def purchase=(str_)
25
+ end
26
+ end
@@ -0,0 +1,55 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # PATCH /v1/workspaces/{workspace_id}/settings/{environment} body. Changes only what it names, in one transaction; a policy change is one new policy_version. Needs the admin or owner role, or an API key with the management scope for its own environment.
8
+ class SettingsRequest
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ field(
13
+ :retention_days,
14
+ Crystalline::Nilable.new(::Integer),
15
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("retention_days")}}
16
+ )
17
+ # Replaces the refused sources; [] refuses none. A change applies to new assessments within a minute.
18
+ field(
19
+ :refused_sources,
20
+ Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::SourceId)),
21
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("refused_sources")}}
22
+ )
23
+ # Use account_creation or its deprecated alias signup, not both.
24
+ field(
25
+ :flows,
26
+ Crystalline::Nilable.new(Models::Shared::SettingsRequestFlows),
27
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("flows")}}
28
+ )
29
+
30
+ sig {
31
+ params(
32
+ retention_days: T.nilable(::Integer),
33
+ refused_sources: T.nilable(T::Array[Models::Shared::SourceId]),
34
+ flows: T.nilable(Models::Shared::SettingsRequestFlows)
35
+ )
36
+ .void
37
+ }
38
+ def initialize(retention_days: nil, refused_sources: nil, flows: nil)
39
+ @retention_days = retention_days
40
+ @refused_sources = refused_sources
41
+ @flows = flows
42
+ end
43
+
44
+ sig { params(other: T.untyped).returns(T::Boolean) }
45
+ def ==(other)
46
+ return false unless other.is_a?(self.class)
47
+ return false unless @retention_days == other.retention_days
48
+ return false unless @refused_sources == other.refused_sources
49
+ return false unless @flows == other.flows
50
+ true
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,26 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::SettingsRequest
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::SettingsRequest
9
+ def retention_days
10
+ end
11
+
12
+ def retention_days=(str_)
13
+ end
14
+
15
+ def refused_sources
16
+ end
17
+
18
+ def refused_sources=(str_)
19
+ end
20
+
21
+ def flows
22
+ end
23
+
24
+ def flows=(str_)
25
+ end
26
+ end