noresponse 9.0.0 → 9.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2683501bd085a9d906920785f0b05c5e64f700a52e5948cf99784c09a10842a2
4
- data.tar.gz: dcf5904871ec73529d76a406e83502d555aeca8032c6d698509448690a4b4e8c
3
+ metadata.gz: 367df5573ff9088996a143ec41390cdc957575ed544f365e90c08d7c0920fbd4
4
+ data.tar.gz: 9cb00b8cd819c7266ca22da8277ac91fa650d2d7c2927bb0667c1e0bc0aa754c
5
5
  SHA512:
6
- metadata.gz: c91b613a10f29a16f273474ce11124a531b1c470da9ebad9497409c647b02ede74509e5528f9eb4e5b697bedda6dbe959438548e3e77e3ba3740bfcc201ce626
7
- data.tar.gz: d1ef68c0d2bb919fd0e0cd4071a1ff5da3b0959d2febda4ca594f32f5ad09c17e8ddbd02691383acbb2875bef6ef88f1c2ab5f350bc76dd328490f53376d262c
6
+ metadata.gz: e1a5b42991418819390e8045b89605b6cfa472c98d39b53502dbec211c4794187d2c85ecb8641f084b6ce4746504ca3619d372ae3c96915b69b113b27d53b242
7
+ data.tar.gz: dacfc2999ae04d3f5f937004a2d7f4a577f8e18369287a8b5f3d63a9788c08746873ba76e737ea35ea0a371e6335568c1fa09a209c08b396ed88e3b3f49e9791
@@ -0,0 +1,45 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # The live environment's daily cap on assessments members make through the console (the playground), as spent on the current UTC day. Each console submission with a new Idempotency-Key spends one lookup; a replay spends nothing, and API keys and the test environment spend none. When used reaches limit, the next lookup answers 429 lookup_limit_reached until resets_at. The count is the one the cap enforces.
8
+ class ConsoleLookups
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ # Lookups spent since the last reset.
13
+ field :used, ::Integer, {'format_json': {'letter_case': ::NoResponse::Utils.field_name("used"), required: true}}
14
+ # Lookups allowed per UTC day.
15
+ field(
16
+ :limit,
17
+ ::Integer,
18
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("limit"), required: true}}
19
+ )
20
+ # The next reset: the coming midnight UTC, when used returns to 0.
21
+ field(
22
+ :resets_at,
23
+ ::String,
24
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("resets_at"), required: true}}
25
+ )
26
+
27
+ sig { params(used: ::Integer, limit: ::Integer, resets_at: ::String).void }
28
+ def initialize(used:, limit:, resets_at:)
29
+ @used = used
30
+ @limit = limit
31
+ @resets_at = resets_at
32
+ end
33
+
34
+ sig { params(other: T.untyped).returns(T::Boolean) }
35
+ def ==(other)
36
+ return false unless other.is_a?(self.class)
37
+ return false unless @used == other.used
38
+ return false unless @limit == other.limit
39
+ return false unless @resets_at == other.resets_at
40
+ true
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,26 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::ConsoleLookups
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::ConsoleLookups
9
+ def used
10
+ end
11
+
12
+ def used=(str_)
13
+ end
14
+
15
+ def limit
16
+ end
17
+
18
+ def limit=(str_)
19
+ end
20
+
21
+ def resets_at
22
+ end
23
+
24
+ def resets_at=(str_)
25
+ end
26
+ end
@@ -4,7 +4,7 @@
4
4
  module NoResponse
5
5
  module Models
6
6
  module Shared
7
- # Body of the 200 answer to GET /v1/workspaces/{workspace_id}/usage: what the workspace's environments were metered for on each UTC day from from through to. Each billable unit is counted once, where it becomes final: an assessment when it is admitted (by flow and depth), a webhook delivery once per event per endpoint (retries and replays add nothing), and a key-usage event once when the ingest accepts it. A count does not change when the assessment, account or workspace is later deleted. A day, environment or metric with nothing counted has no item. No prices, limits or billing.
7
+ # Body of the 200 answer to GET /v1/workspaces/{workspace_id}/usage: what the workspace's environments were metered for on each UTC day from from through to. Each billable unit is counted once, where it becomes final: an assessment when it is admitted (by flow and depth), a webhook delivery once per event per endpoint (retries and replays add nothing), and a key-usage event once when the ingest accepts it. A count does not change when the assessment, account or workspace is later deleted. A day, environment or metric with nothing counted has no item. No prices or billing. console_lookups is the one limit: the live environment's daily cap on console lookups, as spent today.
8
8
  class Usage
9
9
  extend T::Sig
10
10
  include Crystalline::MetadataFields
@@ -25,15 +25,29 @@ module NoResponse
25
25
  Crystalline::Array.new(Models::Shared::UsageCount),
26
26
  {'format_json': {'letter_case': ::NoResponse::Utils.field_name("items"), required: true}}
27
27
  )
28
+ # The live environment's daily cap on assessments members make through the console (the playground), as spent on the current UTC day. Each console submission with a new Idempotency-Key spends one lookup; a replay spends nothing, and API keys and the test environment spend none. When used reaches limit, the next lookup answers 429 lookup_limit_reached until resets_at. The count is the one the cap enforces.
29
+ field(
30
+ :console_lookups,
31
+ Crystalline::Nilable.new(Models::Shared::ConsoleLookups),
32
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("console_lookups")}}
33
+ )
28
34
 
29
35
  sig {
30
- params(workspace_id: ::String, from: ::String, to: ::String, items: T::Array[Models::Shared::UsageCount]).void
36
+ params(
37
+ workspace_id: ::String,
38
+ from: ::String,
39
+ to: ::String,
40
+ items: T::Array[Models::Shared::UsageCount],
41
+ console_lookups: T.nilable(Models::Shared::ConsoleLookups)
42
+ )
43
+ .void
31
44
  }
32
- def initialize(workspace_id:, from:, to:, items:)
45
+ def initialize(workspace_id:, from:, to:, items:, console_lookups: nil)
33
46
  @workspace_id = workspace_id
34
47
  @from = from
35
48
  @to = to
36
49
  @items = items
50
+ @console_lookups = console_lookups
37
51
  end
38
52
 
39
53
  sig { params(other: T.untyped).returns(T::Boolean) }
@@ -43,6 +57,7 @@ module NoResponse
43
57
  return false unless @from == other.from
44
58
  return false unless @to == other.to
45
59
  return false unless @items == other.items
60
+ return false unless @console_lookups == other.console_lookups
46
61
  true
47
62
  end
48
63
  end
@@ -29,4 +29,10 @@ class NoResponse::Models::Shared::Usage
29
29
 
30
30
  def items=(str_)
31
31
  end
32
+
33
+ def console_lookups
34
+ end
35
+
36
+ def console_lookups=(str_)
37
+ end
32
38
  end
@@ -94,6 +94,7 @@ module NoResponse
94
94
  autoload :ConflictErrorCode, "no_response/models/shared/conflicterrorcode.rb"
95
95
  autoload :Consistency, "no_response/models/shared/consistency.rb"
96
96
  autoload :ConsistencyValue, "no_response/models/shared/consistencyvalue.rb"
97
+ autoload :ConsoleLookups, "no_response/models/shared/consolelookups.rb"
97
98
  autoload :Cost, "no_response/models/shared/cost.rb"
98
99
  autoload :Country, "no_response/models/shared/country.rb"
99
100
  autoload :Coverage, "no_response/models/shared/coverage.rb"
@@ -95,9 +95,9 @@ module NoResponse
95
95
 
96
96
  @language = "ruby"
97
97
  @openapi_doc_version = "1"
98
- @sdk_version = "9.0.0"
98
+ @sdk_version = "9.1.0"
99
99
  @gen_version = "internal"
100
- @user_agent = "noresponse-sdk/ruby 9.0.0 internal 1 noresponse"
100
+ @user_agent = "noresponse-sdk/ruby 9.1.0 internal 1 noresponse"
101
101
  end
102
102
 
103
103
  sig { returns([String, T::Hash[Symbol, String]]) }
@@ -50,7 +50,7 @@ module NoResponse
50
50
  }
51
51
  def get(workspace_id:, from: nil, to: nil, retries: nil, timeout_ms: nil, http_headers: nil)
52
52
  # get - Read a workspace's usage.
53
- # Read daily usage units for the environments you can access. These counts are unpriced.
53
+ # Read daily usage units for the environments you can access. These counts are unpriced. With live access it also returns the daily console lookup cap: used, limit and resets_at.
54
54
  request = Models::Operations::GetUsageRequest.new(
55
55
  workspace_id: workspace_id,
56
56
  from: from,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noresponse
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.0
4
+ version: 9.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - NoResponse
@@ -845,6 +845,8 @@ files:
845
845
  - lib/no_response/models/shared/consistency.rbi
846
846
  - lib/no_response/models/shared/consistencyvalue.rb
847
847
  - lib/no_response/models/shared/consistencyvalue.rbi
848
+ - lib/no_response/models/shared/consolelookups.rb
849
+ - lib/no_response/models/shared/consolelookups.rbi
848
850
  - lib/no_response/models/shared/cost.rb
849
851
  - lib/no_response/models/shared/cost.rbi
850
852
  - lib/no_response/models/shared/country.rb