noresponse 8.2.0 → 8.3.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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/no_response/accounts.rb +2 -2
  3. data/lib/no_response/assessments.rb +298 -5
  4. data/lib/no_response/models/operations/aggregateassessments_response.rb +32 -0
  5. data/lib/no_response/models/operations/aggregateassessments_response.rbi +20 -0
  6. data/lib/no_response/models/operations.rb +1 -0
  7. data/lib/no_response/models/shared/aggregatebucket.rb +73 -0
  8. data/lib/no_response/models/shared/aggregatebucket.rbi +38 -0
  9. data/lib/no_response/models/shared/aggregatedimension.rb +26 -0
  10. data/lib/no_response/models/shared/aggregatedimension.rbi +9 -0
  11. data/lib/no_response/models/shared/aggregategroup.rb +179 -0
  12. data/lib/no_response/models/shared/aggregategroup.rbi +74 -0
  13. data/lib/no_response/models/shared/aggregatelateflip.rb +83 -0
  14. data/lib/no_response/models/shared/aggregatelateflip.rbi +32 -0
  15. data/lib/no_response/models/shared/aggregatescorecount.rb +63 -0
  16. data/lib/no_response/models/shared/aggregatescorecount.rbi +32 -0
  17. data/lib/no_response/models/shared/answerrevision.rb +16 -0
  18. data/lib/no_response/models/shared/answerrevision.rbi +9 -0
  19. data/lib/no_response/models/shared/assessmentaggregate.rb +121 -0
  20. data/lib/no_response/models/shared/assessmentaggregate.rbi +62 -0
  21. data/lib/no_response/models/shared/assessmentaggregate_metric.rb +20 -0
  22. data/lib/no_response/models/shared/assessmentaggregate_metric.rbi +9 -0
  23. data/lib/no_response/models/shared/assessmentaggregaterequest.rb +163 -0
  24. data/lib/no_response/models/shared/assessmentaggregaterequest.rbi +74 -0
  25. data/lib/no_response/models/shared/assessmentaggregaterequest_metric.rb +17 -0
  26. data/lib/no_response/models/shared/assessmentaggregaterequest_metric.rbi +9 -0
  27. data/lib/no_response/models/shared/assessmentdetail.rb +10 -0
  28. data/lib/no_response/models/shared/assessmentdetail.rbi +6 -0
  29. data/lib/no_response/models/shared/assessmentsearchrequest.rb +17 -2
  30. data/lib/no_response/models/shared/assessmentsearchrequest.rbi +6 -0
  31. data/lib/no_response/models/shared/bucket.rb +20 -0
  32. data/lib/no_response/models/shared/bucket.rbi +9 -0
  33. data/lib/no_response/models/shared/decision.rb +5 -2
  34. data/lib/no_response/models/shared/delay.rb +23 -0
  35. data/lib/no_response/models/shared/delay.rbi +9 -0
  36. data/lib/no_response/models/shared/listmatch.rb +19 -0
  37. data/lib/no_response/models/shared/listmatch.rbi +9 -0
  38. data/lib/no_response/models/shared/sentidentifiers.rb +74 -0
  39. data/lib/no_response/models/shared/sentidentifiers.rbi +38 -0
  40. data/lib/no_response/models/shared.rb +14 -0
  41. data/lib/no_response/sdkconfiguration.rb +2 -2
  42. metadata +31 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0c991c74c5d3a8b4c657e5734916987e2e39f1599a49553eec08288fdd6380b
4
- data.tar.gz: a580b13bbc7b2cc91a14c61831787fe8250e8c3b72100f297b68a36ce33c2627
3
+ metadata.gz: 0f9e488e772432bf291e12c927572051286be92d2e7571b8a0d5897d413f1a9f
4
+ data.tar.gz: 41ce407e0b72b2cb45b757d87ec2f70353cb73f1d563f981865aadd239e3b933
5
5
  SHA512:
6
- metadata.gz: 54275c1432e5f05dbf9b99f051d53eedcc97263f5c12457cc99d898640f620ee23f0169b90be712fdc3094113051d318678ca4789e5f4ad7a50f4545bc9d9c41
7
- data.tar.gz: 3877ee1a41acb9d0f768ca7709e80cd24202127e8640f6afcf6759222ec645d51bab21f0c4a2b61193fc4eedb500eb8cb12bcb0afccdf3550217dc5317b0db7b
6
+ metadata.gz: 8244940ad0a13006308c976eecd9a5982144d36059373f18101d69c574fca874e1192c16af296d6e15473125fa668c8b02885795d1b4240c3c84e8e3e1cb8461
7
+ data.tar.gz: b130ae6e02b8d2db706cd843ff6b2ae9552c4d0ec869a3f96431cc76e75247a833adb0f64624f1c3a53ca9b10572cd7146cd4ec8b6f43d25b47eca77be747935
@@ -925,7 +925,7 @@ module NoResponse
925
925
  http_headers: nil
926
926
  )
927
927
  # list_assessments - Page through one account's unexpired assessments.
928
- # The account's history: the same page as POST /v1/assessments/query for this account_id, newest first, each at its latest assessment_version. Requires the history scope. Read-only and safe to retry. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your workspace and the account; a tampered or expired cursor answers 400 invalid_cursor. response_mode=detailed needs the detailed scope. The account_id travels in the URL; use POST /v1/assessments/query to keep it out of access logs.
928
+ # The account's history: the same page as POST /v1/assessments/query for this account_id, newest first, each at its latest assessment_version. Requires the history scope. Read-only and safe to retry. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your workspace and the account; a tampered or expired cursor answers 400 invalid_cursor. response_mode=detailed needs the detailed scope. Each item's identifiers holds the identifiers its assessment was sent, exactly as received. The account_id travels in the URL; use POST /v1/assessments/query to keep it out of access logs.
929
929
  request = Models::Operations::ListAccountAssessmentsRequest.new(
930
930
  account_id: account_id,
931
931
  limit: limit,
@@ -3319,7 +3319,7 @@ module NoResponse
3319
3319
  }
3320
3320
  def export(account_id:, response_mode: nil, retries: nil, timeout_ms: nil, http_headers: nil)
3321
3321
  # export - Export an account
3322
- # Retrieve one consistent snapshot of retained customer-accessible records, including assessment revisions, account decisions, feedback, key associations, enforcements and request diagnostics. Secrets, restricted source information, other customers' data and legacy free-text notes are excluded. The same standard/detailed permissions apply. An export exceeding 10000 records or 8 MiB returns export_too_large without a partial result. Historical decisions that were not captured are identified as an exclusion.
3322
+ # Retrieve one consistent snapshot of retained customer-accessible records, including assessment revisions, account decisions, feedback, key associations, enforcements and request diagnostics. Each assessment revision's detail.identifiers holds the identifiers that assessment was sent, exactly as received. Secrets, restricted source information, other customers' data and legacy free-text notes are excluded. The same standard/detailed permissions apply. An export exceeding 10000 records or 8 MiB returns export_too_large without a partial result. Historical decisions that were not captured are identified as an exclusion.
3323
3323
  request = Models::Operations::ExportAccountRequest.new(
3324
3324
  account_id: account_id,
3325
3325
  response_mode: response_mode
@@ -50,7 +50,7 @@ module NoResponse
50
50
  }
51
51
  def create(body:, idempotency_key: nil, retries: nil, timeout_ms: nil, http_headers: nil)
52
52
  # create - Assess identifiers for a signup or gateway decision.
53
- # Assesses one account creation, login or purchase (flow) and answers with the account's one current risk: account.risk.decision is the decision for this flow (allow, step_up, review or block, where block means your block threshold was reached), and detail holds this assessment's own facts. depth sets how long the answer waits for sources: quick waits only for the fast ones (500 ms), full for the whole budget (3000 ms at most); it defaults to full for account_creation and purchase and quick for login. 200 carries complete or partial, 202 carries pending with Location and Retry-After. While the account's first assessment is pending, account is absent: apply your own fallback for that, 429, 503 or a timeout. NoResponse blocks nothing itself; you decide. Requires the assess scope. Idempotency-Key is optional in the SDK and is bound to the body for 24 hours: the same key with the same body replays the latest assessment with Idempotent-Replayed: true and starts no new work; the same key with a different body answers 409 idempotency_key_reused. response_mode defaults to standard; detailed needs the detailed scope.
53
+ # Assesses one account creation, login or purchase (flow) and answers with the account's one current risk: account.risk.decision is the decision for this flow (allow, step_up, review or block, where block means your block threshold was reached), and detail holds this assessment's own facts. depth sets how long the answer waits for sources: quick waits only for the fast ones (500 ms), full for the whole budget (3000 ms at most); it defaults to full for account_creation and purchase and quick for login. 200 carries complete or partial, 202 carries pending with Location and Retry-After. While the account's first assessment is pending, account is absent: apply your own fallback for that, 429, 503 or a timeout. NoResponse blocks nothing itself; you decide. Requires the assess scope. Idempotency-Key is optional in the SDK and is bound to the body for 24 hours: the same key with the same body replays the latest assessment with Idempotent-Replayed: true and starts no new work; the same key with a different body answers 409 idempotency_key_reused. response_mode defaults to standard; detailed needs the detailed scope. The answer leaves out detail.identifiers: you hold what you sent, and a key with the history scope gets them back with GET.
54
54
  request = Models::Operations::CreateAssessmentRequest.new(
55
55
  body: body,
56
56
  idempotency_key: idempotency_key
@@ -348,7 +348,7 @@ module NoResponse
348
348
  }
349
349
  def get(assessment_id:, response_mode: nil, retries: nil, timeout_ms: nil, http_headers: nil)
350
350
  # get - Poll the authoritative assessment of one assessment.
351
- # Returns the highest assessment_version, with the account's current risk. Requires the assess or history scope. While status is pending, or partial with a source still running, the response carries Retry-After; poll no faster than it says. Another workspace's assessment, an unknown or expired assessment and a malformed assessment_id all answer 404 not_found. response_mode=detailed needs the detailed scope.
351
+ # Returns the highest assessment_version, with the account's current risk. Requires the assess or history scope. While status is pending, or partial with a source still running, the response carries Retry-After; poll no faster than it says. Another workspace's assessment, an unknown or expired assessment and a malformed assessment_id all answer 404 not_found. response_mode=detailed needs the detailed scope. A key with the history scope also gets detail.identifiers, the identifiers the assessment was sent, exactly as received.
352
352
  request = Models::Operations::GetAssessmentRequest.new(
353
353
  assessment_id: assessment_id,
354
354
  response_mode: response_mode
@@ -1232,7 +1232,7 @@ module NoResponse
1232
1232
  }
1233
1233
  def query(request:, retries: nil, timeout_ms: nil, http_headers: nil)
1234
1234
  # query - Page through one account's unexpired assessments.
1235
- # History is a POST with account_id in the body so an account identifier stays out of URLs and access logs. Requires the history scope. Read-only and safe to retry. Newest first, each at its latest assessment_version. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your workspace and the account; a tampered or expired cursor answers 400 invalid_cursor. response_mode=detailed needs the detailed scope.
1235
+ # History is a POST with account_id in the body so an account identifier stays out of URLs and access logs. Requires the history scope. Read-only and safe to retry. Newest first, each at its latest assessment_version. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your workspace and the account; a tampered or expired cursor answers 400 invalid_cursor. response_mode=detailed needs the detailed scope. Each item's identifiers holds the identifiers its assessment was sent, exactly as received.
1236
1236
  url, params = @sdk_configuration.get_server_details
1237
1237
  base_url = Utils.template_url(url, params)
1238
1238
  url = "#{base_url}/v1/assessments/query"
@@ -1537,6 +1537,299 @@ module NoResponse
1537
1537
  end
1538
1538
  end
1539
1539
 
1540
+ sig {
1541
+ params(
1542
+ request: Models::Shared::AssessmentAggregateRequest,
1543
+ retries: T.nilable(Utils::RetryConfig),
1544
+ timeout_ms: T.nilable(Integer),
1545
+ http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])
1546
+ )
1547
+ .returns(Models::Operations::AggregateAssessmentsResponse)
1548
+ }
1549
+ def aggregate(request:, retries: nil, timeout_ms: nil, http_headers: nil)
1550
+ # aggregate - Count assessments by time, decision and reason
1551
+ # Count this environment's assessments created in [from,to) by hour, day or week, grouped by up to two of decision, flow, recommendation, band, reason, lane, country, asn and list_match. Each assessment counts once, by its first answer; late results do not count it again and appear in late_flips. Optional metrics add a score histogram per flow and late account decision changes. from and to start a bucket and cover at most 366 days (31 for hour buckets) inside the retention period. The filters are search's and describe the first answer: send them to search with revision first to list a cell's assessments. Counts hold no identifier, stay when an assessment or account is deleted, and report reasons by code and impact band. No Idempotency-Key.
1552
+ url, params = @sdk_configuration.get_server_details
1553
+ base_url = Utils.template_url(url, params)
1554
+ url = "#{base_url}/v1/assessments/aggregate"
1555
+ headers = {}
1556
+ headers = T.cast(headers, T::Hash[String, String])
1557
+ req_content_type, data, form = Utils.serialize_request_body(request, false, false, :request, :json)
1558
+ headers["content-type"] = req_content_type
1559
+ raise StandardError, "request body is required" if data.nil? && form.nil?
1560
+
1561
+ if form && !form.empty?
1562
+ body = Utils.encode_form(form)
1563
+ elsif Utils.match_content_type(req_content_type, "application/x-www-form-urlencoded")
1564
+ body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
1565
+ else
1566
+ body = data
1567
+ end
1568
+
1569
+ headers["Accept"] = "application/json"
1570
+ headers["user-agent"] = @sdk_configuration.user_agent
1571
+ retries ||= @sdk_configuration.retry_config
1572
+ retries ||= Utils::RetryConfig.new(
1573
+ backoff: Utils::BackoffStrategy.new(
1574
+ exponent: 2.0,
1575
+ initial_interval: 500,
1576
+ max_elapsed_time: 30_000,
1577
+ max_interval: 8000
1578
+ ),
1579
+ retry_connection_errors: true,
1580
+ strategy: "backoff"
1581
+ )
1582
+ retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
1583
+ retry_options[:retry_statuses] = [408, 429, 500, 501, 502, 503, 504, 505]
1584
+
1585
+ security = @sdk_configuration.security_source&.call
1586
+
1587
+ timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
1588
+ timeout ||= @sdk_configuration.timeout
1589
+
1590
+ connection = @sdk_configuration.client.dup
1591
+ connection.use(Utils::RetryMiddleware, retry_options)
1592
+
1593
+ hook_ctx = SDKHooks::HookContext.new(
1594
+ config: @sdk_configuration,
1595
+ base_url: base_url,
1596
+ oauth2_scopes: nil,
1597
+ operation_id: "aggregateAssessments",
1598
+ security_source: @sdk_configuration.security_source
1599
+ )
1600
+
1601
+ error = T.let(nil, T.nilable(StandardError))
1602
+ http_response = T.let(nil, T.nilable(Faraday::Response))
1603
+
1604
+ begin
1605
+ http_response = T.must(connection).post(url) do |req|
1606
+ req.body = body
1607
+ req.headers.merge!(headers)
1608
+ req.options.timeout = timeout unless timeout.nil?
1609
+ Utils.configure_request_security(req, security)
1610
+ http_headers&.each do |key, value|
1611
+ req.headers[key.to_s] = value
1612
+ end
1613
+
1614
+ @sdk_configuration.hooks.before_request(
1615
+ hook_ctx: SDKHooks::BeforeRequestHookContext.new(
1616
+ hook_ctx: hook_ctx
1617
+ ),
1618
+ request: req
1619
+ )
1620
+ end
1621
+
1622
+ rescue StandardError => e
1623
+ error = e
1624
+ ensure
1625
+ if http_response.nil? || Utils.error_status?(http_response.status)
1626
+ http_response = @sdk_configuration.hooks.after_error(
1627
+ error: error,
1628
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
1629
+ hook_ctx: hook_ctx
1630
+ ),
1631
+ response: http_response
1632
+ )
1633
+ else
1634
+ http_response = @sdk_configuration.hooks.after_success(
1635
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1636
+ hook_ctx: hook_ctx
1637
+ ),
1638
+ response: http_response
1639
+ )
1640
+ end
1641
+
1642
+ if http_response.nil?
1643
+ raise error if !error.nil?
1644
+ raise "no response"
1645
+ end
1646
+ end
1647
+
1648
+ content_type = http_response.headers.fetch("Content-Type", "application/octet-stream")
1649
+ if Utils.match_status_code(http_response.status, ["200"])
1650
+ if Utils.match_content_type(content_type, "application/json")
1651
+ @sdk_configuration.hooks.after_success(
1652
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1653
+ hook_ctx: hook_ctx
1654
+ ),
1655
+ response: http_response
1656
+ )
1657
+ response_data = http_response.env.response_body
1658
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::AssessmentAggregate)
1659
+ result = obj
1660
+ response = Models::Operations::AggregateAssessmentsResponse.new(
1661
+ result: result,
1662
+ headers: http_response.headers
1663
+ )
1664
+
1665
+ return response
1666
+ else
1667
+ raise(
1668
+ ::NoResponse::Models::Errors::APIStatusError.new(
1669
+ status_code: http_response.status,
1670
+ body: http_response.env.response_body,
1671
+ raw_response: http_response
1672
+ ),
1673
+ "Unknown content type received"
1674
+ )
1675
+ end
1676
+ elsif Utils.match_status_code(http_response.status, ["400"])
1677
+ if Utils.match_content_type(content_type, "application/problem+json")
1678
+ @sdk_configuration.hooks.after_success(
1679
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1680
+ hook_ctx: hook_ctx
1681
+ ),
1682
+ response: http_response
1683
+ )
1684
+ response_data = http_response.env.response_body
1685
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadRequestError)
1686
+ raise obj
1687
+ else
1688
+ raise(
1689
+ ::NoResponse::Models::Errors::APIStatusError.new(
1690
+ status_code: http_response.status,
1691
+ body: http_response.env.response_body,
1692
+ raw_response: http_response
1693
+ ),
1694
+ "Unknown content type received"
1695
+ )
1696
+ end
1697
+ elsif Utils.match_status_code(http_response.status, ["401"])
1698
+ if Utils.match_content_type(content_type, "application/problem+json")
1699
+ @sdk_configuration.hooks.after_success(
1700
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1701
+ hook_ctx: hook_ctx
1702
+ ),
1703
+ response: http_response
1704
+ )
1705
+ response_data = http_response.env.response_body
1706
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::AuthenticationError)
1707
+ raise obj
1708
+ else
1709
+ raise(
1710
+ ::NoResponse::Models::Errors::APIStatusError.new(
1711
+ status_code: http_response.status,
1712
+ body: http_response.env.response_body,
1713
+ raw_response: http_response
1714
+ ),
1715
+ "Unknown content type received"
1716
+ )
1717
+ end
1718
+ elsif Utils.match_status_code(http_response.status, ["403"])
1719
+ if Utils.match_content_type(content_type, "application/problem+json")
1720
+ @sdk_configuration.hooks.after_success(
1721
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1722
+ hook_ctx: hook_ctx
1723
+ ),
1724
+ response: http_response
1725
+ )
1726
+ response_data = http_response.env.response_body
1727
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::PermissionDeniedError)
1728
+ raise obj
1729
+ else
1730
+ raise(
1731
+ ::NoResponse::Models::Errors::APIStatusError.new(
1732
+ status_code: http_response.status,
1733
+ body: http_response.env.response_body,
1734
+ raw_response: http_response
1735
+ ),
1736
+ "Unknown content type received"
1737
+ )
1738
+ end
1739
+ elsif Utils.match_status_code(http_response.status, ["404"])
1740
+ if Utils.match_content_type(content_type, "application/problem+json")
1741
+ @sdk_configuration.hooks.after_success(
1742
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1743
+ hook_ctx: hook_ctx
1744
+ ),
1745
+ response: http_response
1746
+ )
1747
+ response_data = http_response.env.response_body
1748
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::NotFoundError)
1749
+ raise obj
1750
+ else
1751
+ raise(
1752
+ ::NoResponse::Models::Errors::APIStatusError.new(
1753
+ status_code: http_response.status,
1754
+ body: http_response.env.response_body,
1755
+ raw_response: http_response
1756
+ ),
1757
+ "Unknown content type received"
1758
+ )
1759
+ end
1760
+ elsif Utils.match_status_code(http_response.status, ["409"])
1761
+ if Utils.match_content_type(content_type, "application/problem+json")
1762
+ @sdk_configuration.hooks.after_success(
1763
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1764
+ hook_ctx: hook_ctx
1765
+ ),
1766
+ response: http_response
1767
+ )
1768
+ response_data = http_response.env.response_body
1769
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ConflictError)
1770
+ raise obj
1771
+ else
1772
+ raise(
1773
+ ::NoResponse::Models::Errors::APIStatusError.new(
1774
+ status_code: http_response.status,
1775
+ body: http_response.env.response_body,
1776
+ raw_response: http_response
1777
+ ),
1778
+ "Unknown content type received"
1779
+ )
1780
+ end
1781
+ elsif Utils.match_status_code(http_response.status, ["429"])
1782
+ if Utils.match_content_type(content_type, "application/problem+json")
1783
+ @sdk_configuration.hooks.after_success(
1784
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1785
+ hook_ctx: hook_ctx
1786
+ ),
1787
+ response: http_response
1788
+ )
1789
+ response_data = http_response.env.response_body
1790
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::RateLimitError)
1791
+ raise obj
1792
+ else
1793
+ raise(
1794
+ ::NoResponse::Models::Errors::APIStatusError.new(
1795
+ status_code: http_response.status,
1796
+ body: http_response.env.response_body,
1797
+ raw_response: http_response
1798
+ ),
1799
+ "Unknown content type received"
1800
+ )
1801
+ end
1802
+ elsif Utils.match_status_code(http_response.status, ["4XX"])
1803
+ raise(
1804
+ ::NoResponse::Models::Errors::APIStatusError.new(
1805
+ status_code: http_response.status,
1806
+ body: http_response.env.response_body,
1807
+ raw_response: http_response
1808
+ ),
1809
+ "API error occurred"
1810
+ )
1811
+ elsif Utils.match_status_code(http_response.status, ["5XX"])
1812
+ raise(
1813
+ ::NoResponse::Models::Errors::APIStatusError.new(
1814
+ status_code: http_response.status,
1815
+ body: http_response.env.response_body,
1816
+ raw_response: http_response
1817
+ ),
1818
+ "API error occurred"
1819
+ )
1820
+ else
1821
+ raise(
1822
+ ::NoResponse::Models::Errors::APIStatusError.new(
1823
+ status_code: http_response.status,
1824
+ body: http_response.env.response_body,
1825
+ raw_response: http_response
1826
+ ),
1827
+ "Unknown status code received"
1828
+ )
1829
+
1830
+ end
1831
+ end
1832
+
1540
1833
  sig {
1541
1834
  params(
1542
1835
  request: Models::Shared::AssessmentSearchRequest,
@@ -1548,7 +1841,7 @@ module NoResponse
1548
1841
  }
1549
1842
  def search(request:, retries: nil, timeout_ms: nil, http_headers: nil)
1550
1843
  # search - Search assessments across this environment
1551
- # Search retained assessments created in [from,to), over at most 366 days. Filters use each assessment decision, rather than the current account decision. Results can change between pages. Keep the assessment version to retrieve the exact decision later. This read does not require an idempotency key.
1844
+ # Search retained assessments created in [from,to), over at most 366 days. Filters use each assessment decision, rather than the current account decision. Results can change between pages. Keep the assessment version to retrieve the exact decision later. Each item's detail.identifiers holds the identifiers its assessment was sent, exactly as received. This read does not require an idempotency key.
1552
1845
  url, params = @sdk_configuration.get_server_details
1553
1846
  base_url = Utils.template_url(url, params)
1554
1847
  url = "#{base_url}/v1/assessments/search"
@@ -1843,7 +2136,7 @@ module NoResponse
1843
2136
  }
1844
2137
  def retrieve_version(assessment_id:, version:, response_mode: nil, retries: nil, timeout_ms: nil, http_headers: nil)
1845
2138
  # retrieve_version - Retrieve an exact assessment revision
1846
- # Retrieve a retained assessment version with its original decision, policy, flow and depth. This response excludes the current account decision. Current retention and response-mode permissions still apply.
2139
+ # Retrieve a retained assessment version with its original decision, policy, flow and depth. This response excludes the current account decision. Current retention and response-mode permissions still apply. detail.identifiers holds the identifiers the assessment was sent, exactly as received.
1847
2140
  request = Models::Operations::GetAssessmentVersionRequest.new(
1848
2141
  assessment_id: assessment_id,
1849
2142
  version: version,
@@ -0,0 +1,32 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Operations
7
+
8
+ class AggregateAssessmentsResponse
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ field :headers, Crystalline::Hash.new(Symbol, Crystalline::Array.new(::String))
13
+
14
+ field :result, Models::Shared::AssessmentAggregate, {}
15
+
16
+ sig { params(headers: T::Hash[Symbol, T::Array[::String]], result: Models::Shared::AssessmentAggregate).void }
17
+ def initialize(headers:, result:)
18
+ @headers = headers
19
+ @result = result
20
+ end
21
+
22
+ sig { params(other: T.untyped).returns(T::Boolean) }
23
+ def ==(other)
24
+ return false unless other.is_a?(self.class)
25
+ return false unless @headers == other.headers
26
+ return false unless @result == other.result
27
+ true
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,20 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Operations::AggregateAssessmentsResponse
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Operations::AggregateAssessmentsResponse
9
+ def headers
10
+ end
11
+
12
+ def headers=(str_)
13
+ end
14
+
15
+ def result
16
+ end
17
+
18
+ def result=(str_)
19
+ end
20
+ end
@@ -4,6 +4,7 @@
4
4
  module NoResponse
5
5
  module Models
6
6
  module Operations
7
+ autoload :AggregateAssessmentsResponse, "no_response/models/operations/aggregateassessments_response.rb"
7
8
  autoload :AssociateCredentialRequest, "no_response/models/operations/associatecredential_request.rb"
8
9
  autoload :AssociateCredentialResponse, "no_response/models/operations/associatecredential_response.rb"
9
10
  autoload :BindProvisionalAccountRequest, "no_response/models/operations/bindprovisionalaccount_request.rb"
@@ -0,0 +1,73 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+
8
+ class AggregateBucket
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ field(
13
+ :start,
14
+ ::String,
15
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("start"), required: true}}
16
+ )
17
+ # Assessments first answered whose creation falls in the bucket. With metric count.
18
+ field(
19
+ :count,
20
+ Crystalline::Nilable.new(::Integer),
21
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("count")}}
22
+ )
23
+ # With metric count and group_by: the bucket's counts of the groups answered, largest group first.
24
+ field(
25
+ :groups,
26
+ Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::AggregateGroup)),
27
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("groups")}}
28
+ )
29
+
30
+ field(
31
+ :score_histogram,
32
+ Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::AggregateScoreCount)),
33
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("score_histogram")}}
34
+ )
35
+
36
+ field(
37
+ :late_flips,
38
+ Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::AggregateLateFlip)),
39
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("late_flips")}}
40
+ )
41
+
42
+ sig {
43
+ params(
44
+ start: ::String,
45
+ count: T.nilable(::Integer),
46
+ groups: T.nilable(T::Array[Models::Shared::AggregateGroup]),
47
+ score_histogram: T.nilable(T::Array[Models::Shared::AggregateScoreCount]),
48
+ late_flips: T.nilable(T::Array[Models::Shared::AggregateLateFlip])
49
+ )
50
+ .void
51
+ }
52
+ def initialize(start:, count: nil, groups: nil, score_histogram: nil, late_flips: nil)
53
+ @start = start
54
+ @count = count
55
+ @groups = groups
56
+ @score_histogram = score_histogram
57
+ @late_flips = late_flips
58
+ end
59
+
60
+ sig { params(other: T.untyped).returns(T::Boolean) }
61
+ def ==(other)
62
+ return false unless other.is_a?(self.class)
63
+ return false unless @start == other.start
64
+ return false unless @count == other.count
65
+ return false unless @groups == other.groups
66
+ return false unless @score_histogram == other.score_histogram
67
+ return false unless @late_flips == other.late_flips
68
+ true
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,38 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::AggregateBucket
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::AggregateBucket
9
+ def start
10
+ end
11
+
12
+ def start=(str_)
13
+ end
14
+
15
+ def count
16
+ end
17
+
18
+ def count=(str_)
19
+ end
20
+
21
+ def groups
22
+ end
23
+
24
+ def groups=(str_)
25
+ end
26
+
27
+ def score_histogram
28
+ end
29
+
30
+ def score_histogram=(str_)
31
+ end
32
+
33
+ def late_flips
34
+ end
35
+
36
+ def late_flips=(str_)
37
+ end
38
+ end
@@ -0,0 +1,26 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # AggregateDimension - decision, recommendation and band: the first answer's. flow: the assessment's. list_match: the action of the list entry that decided the account when it was first answered. reason: a reason the first answer fired, with its impact band. lane: an evidence lane the first answer listed in incomplete_sources. country and asn: the submitted IP's, from the IP data.
8
+ class AggregateDimension
9
+ include ::Crystalline::Enum
10
+ enums do
11
+ DECISION = new("decision")
12
+ FLOW = new("flow")
13
+ RECOMMENDATION = new("recommendation")
14
+ BAND = new("band")
15
+ REASON = new("reason")
16
+ LANE = new("lane")
17
+ COUNTRY = new("country")
18
+ ASN = new("asn")
19
+ LIST_MATCH = new("list_match")
20
+ end
21
+
22
+ open!
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,9 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::AggregateDimension
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::AggregateDimension
9
+ end