stigg 0.1.0.pre.beta.59 → 0.1.0.pre.beta.61
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 +33 -0
- data/README.md +1 -1
- data/lib/stigg/client.rb +1 -1
- data/lib/stigg/models/v1/credits/reservation_release_response.rb +1 -0
- data/lib/stigg/models/v1/customer_check_entitlement_response.rb +1 -0
- data/lib/stigg/models/v1/customer_retrieve_entitlements_response.rb +1 -0
- data/lib/stigg/models/v1/events/beta/customer_retrieve_governance_params.rb +23 -14
- data/lib/stigg/models/v1/events/beta/customer_retrieve_governance_response.rb +9 -1
- data/lib/stigg/models/v1/subscription_provision_response.rb +1 -0
- data/lib/stigg/models/v1_beta/customers/assignment_upsert_params.rb +2 -1
- data/lib/stigg/models/v1_beta/customers/entitlement_check_response.rb +1 -0
- data/lib/stigg/models/v1_beta/customers/governance_list_params.rb +180 -0
- data/lib/stigg/models/v1_beta/customers/governance_list_response.rb +138 -0
- data/lib/stigg/resources/v1/events/beta/customers.rb +8 -5
- data/lib/stigg/resources/v1_beta/customers/governance.rb +100 -0
- data/lib/stigg/resources/v1_beta/customers.rb +4 -0
- data/lib/stigg/version.rb +1 -1
- data/lib/stigg.rb +3 -0
- data/rbi/stigg/models/v1/credits/reservation_release_response.rbi +5 -0
- data/rbi/stigg/models/v1/customer_check_entitlement_response.rbi +5 -0
- data/rbi/stigg/models/v1/customer_retrieve_entitlements_response.rbi +5 -0
- data/rbi/stigg/models/v1/events/beta/customer_retrieve_governance_params.rbi +31 -18
- data/rbi/stigg/models/v1/events/beta/customer_retrieve_governance_response.rbi +18 -3
- data/rbi/stigg/models/v1/subscription_provision_response.rbi +5 -0
- data/rbi/stigg/models/v1_beta/customers/assignment_upsert_params.rbi +4 -2
- data/rbi/stigg/models/v1_beta/customers/entitlement_check_response.rbi +5 -0
- data/rbi/stigg/models/v1_beta/customers/governance_list_params.rbi +378 -0
- data/rbi/stigg/models/v1_beta/customers/governance_list_response.rbi +176 -0
- data/rbi/stigg/resources/v1/events/beta/customers.rbi +13 -7
- data/rbi/stigg/resources/v1_beta/customers/governance.rbi +95 -0
- data/rbi/stigg/resources/v1_beta/customers.rbi +3 -0
- data/sig/stigg/models/v1/credits/reservation_release_response.rbs +2 -1
- data/sig/stigg/models/v1/customer_check_entitlement_response.rbs +2 -1
- data/sig/stigg/models/v1/customer_retrieve_entitlements_response.rbs +2 -1
- data/sig/stigg/models/v1/events/beta/customer_retrieve_governance_params.rbs +7 -0
- data/sig/stigg/models/v1/events/beta/customer_retrieve_governance_response.rbs +5 -3
- data/sig/stigg/models/v1/subscription_provision_response.rbs +2 -1
- data/sig/stigg/models/v1_beta/customers/entitlement_check_response.rbs +2 -1
- data/sig/stigg/models/v1_beta/customers/governance_list_params.rbs +171 -0
- data/sig/stigg/models/v1_beta/customers/governance_list_response.rbs +88 -0
- data/sig/stigg/resources/v1/events/beta/customers.rbs +1 -0
- data/sig/stigg/resources/v1_beta/customers/governance.rbs +29 -0
- data/sig/stigg/resources/v1_beta/customers.rbs +2 -0
- metadata +11 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e88869166c7266edc8b8de7dcf709fc44fd4f8db9398797a75a6b14d716ca126
|
|
4
|
+
data.tar.gz: 4aa36a54bba7f279e895f55ea8c7a4607b3754db0a383d65233c7494ac0eae09
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 16520b05658892720891a04b84274142619239bc0e8ff0a5ca760d9a918cfca1b4017b301fafff9c50e677a9024379a8b44e16c9ffd5d13ba4ce8e8e5d4b9f62
|
|
7
|
+
data.tar.gz: 9ce0a688f703ebb995e2d520aaa278347dee1ec7440a6af3d067a86f4fd86c8cc3a2c23bbdc8abc10d207d0ed1450694c2e39ec8663fb2c44474f70645e093f4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.0-beta.61](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.60...v0.1.0-beta.61) (2026-10-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **stainless:** restore edge.api.stigg.io as the production server ([d0c44ea](https://github.com/stiggio/stigg-ruby/commit/d0c44eadad52a1f458eee8176aa33e88952e1dd4))
|
|
9
|
+
* sync OpenAPI spec from stigg-api ([847d6bb](https://github.com/stiggio/stigg-ruby/commit/847d6bbc0e8426b1ae9559fbd35ffc712d0d54f6))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
|
|
14
|
+
* normalize version.rb to gem prerelease format for stlc codegen ([45c00b0](https://github.com/stiggio/stigg-ruby/commit/45c00b079035295798e8b2e7e44e296e1d67dcd4))
|
|
15
|
+
|
|
16
|
+
## [0.1.0-beta.60](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.59...v0.1.0-beta.60) (2026-10-28)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* **STIGG-10529:** governance query as paginated v1Beta.customers.governance.list ([2fc1286](https://github.com/stiggio/stigg-ruby/commit/2fc128611f63f6d1f9796f809ce0e544e3180a2b))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* sync OpenAPI spec from stigg-api ([52f3751](https://github.com/stiggio/stigg-ruby/commit/52f37510727f8e194121d9a25653604b5fc5effd))
|
|
27
|
+
* sync OpenAPI spec from stigg-api ([a9f365b](https://github.com/stiggio/stigg-ruby/commit/a9f365b4575f6fcf1533b41ab8fa6ce7cb4a6572))
|
|
28
|
+
* sync OpenAPI spec from stigg-api ([02707c8](https://github.com/stiggio/stigg-ruby/commit/02707c8c8d471921155cfcc15e5ab95088fa32c3))
|
|
29
|
+
* sync OpenAPI spec from stigg-api ([38173fc](https://github.com/stiggio/stigg-ruby/commit/38173fc2c35268bfcd3e85cc0520a542cc567b3f))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Chores
|
|
33
|
+
|
|
34
|
+
* normalize version.rb to gem prerelease format for stlc codegen ([9071057](https://github.com/stiggio/stigg-ruby/commit/9071057684924855f38983cc91fca3f9095af8fc))
|
|
35
|
+
|
|
3
36
|
## [0.1.0-beta.59](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.58...v0.1.0-beta.59) (2026-10-22)
|
|
4
37
|
|
|
5
38
|
|
data/README.md
CHANGED
data/lib/stigg/client.rb
CHANGED
|
@@ -56,7 +56,7 @@ module Stigg
|
|
|
56
56
|
initial_retry_delay: self.class::DEFAULT_INITIAL_RETRY_DELAY,
|
|
57
57
|
max_retry_delay: self.class::DEFAULT_MAX_RETRY_DELAY
|
|
58
58
|
)
|
|
59
|
-
base_url ||= "https://api.stigg.io"
|
|
59
|
+
base_url ||= "https://edge.api.stigg.io"
|
|
60
60
|
|
|
61
61
|
if api_key.nil?
|
|
62
62
|
raise ArgumentError.new("api_key is required, and can be set via environ: \"STIGG_API_KEY\"")
|
|
@@ -16,14 +16,22 @@ module Stigg
|
|
|
16
16
|
required :id, String
|
|
17
17
|
|
|
18
18
|
# @!attribute after
|
|
19
|
-
#
|
|
19
|
+
# Opaque cursor from a page’s `next`; returns the page after it. Mutually
|
|
20
|
+
# exclusive with `before`.
|
|
20
21
|
#
|
|
21
22
|
# @return [String, nil]
|
|
22
23
|
optional :after, String
|
|
23
24
|
|
|
25
|
+
# @!attribute before
|
|
26
|
+
# Opaque cursor from a page’s `prev`; returns the page before it. Mutually
|
|
27
|
+
# exclusive with `after`.
|
|
28
|
+
#
|
|
29
|
+
# @return [String, nil]
|
|
30
|
+
optional :before, String
|
|
31
|
+
|
|
24
32
|
# @!attribute currency_ids
|
|
25
|
-
# Currency ids to include,
|
|
26
|
-
# both featureIds and currencyIds for tree mode.
|
|
33
|
+
# Currency ids to include, comma-separated (e.g. `?currencyIds=credits`), up
|
|
34
|
+
# to 100. Omit both featureIds and currencyIds for tree mode.
|
|
27
35
|
#
|
|
28
36
|
# @return [Array<String>, nil]
|
|
29
37
|
optional :currency_ids, Stigg::Internal::Type::ArrayOf[String]
|
|
@@ -36,17 +44,16 @@ module Stigg
|
|
|
36
44
|
optional :entity_id_search, String
|
|
37
45
|
|
|
38
46
|
# @!attribute entity_type_ids
|
|
39
|
-
# Filter to one or more entity types,
|
|
40
|
-
# `?entityTypeIds=team
|
|
47
|
+
# Filter to one or more entity types, comma-separated (e.g.
|
|
48
|
+
# `?entityTypeIds=team,user`), up to 100.
|
|
41
49
|
#
|
|
42
50
|
# @return [Array<String>, nil]
|
|
43
51
|
optional :entity_type_ids, Stigg::Internal::Type::ArrayOf[String]
|
|
44
52
|
|
|
45
53
|
# @!attribute feature_ids
|
|
46
|
-
# Feature ids to include,
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
# attached.
|
|
54
|
+
# Feature ids to include, comma-separated (e.g. `?featureIds=ai-tokens,seats`), up
|
|
55
|
+
# to 100. Omit both featureIds and currencyIds for tree mode — every node in the
|
|
56
|
+
# hierarchy with no usage configuration attached.
|
|
50
57
|
#
|
|
51
58
|
# @return [Array<String>, nil]
|
|
52
59
|
optional :feature_ids, Stigg::Internal::Type::ArrayOf[String]
|
|
@@ -94,22 +101,24 @@ module Stigg
|
|
|
94
101
|
# @return [String, nil]
|
|
95
102
|
optional :x_environment_id, String
|
|
96
103
|
|
|
97
|
-
# @!method initialize(id:, after: nil, currency_ids: nil, entity_id_search: nil, entity_type_ids: nil, feature_ids: nil, limit: nil, min_utilization: nil, order: nil, scope: nil, sort_by: nil, x_account_id: nil, x_environment_id: nil, request_options: {})
|
|
104
|
+
# @!method initialize(id:, after: nil, before: nil, currency_ids: nil, entity_id_search: nil, entity_type_ids: nil, feature_ids: nil, limit: nil, min_utilization: nil, order: nil, scope: nil, sort_by: nil, x_account_id: nil, x_environment_id: nil, request_options: {})
|
|
98
105
|
# Some parameter documentations has been truncated, see
|
|
99
106
|
# {Stigg::Models::V1::Events::Beta::CustomerRetrieveGovernanceParams} for more
|
|
100
107
|
# details.
|
|
101
108
|
#
|
|
102
109
|
# @param id [String]
|
|
103
110
|
#
|
|
104
|
-
# @param after [String]
|
|
111
|
+
# @param after [String] Opaque cursor from a page’s `next`; returns the page after it. Mutually exclusiv
|
|
112
|
+
#
|
|
113
|
+
# @param before [String] Opaque cursor from a page’s `prev`; returns the page before it. Mutually exclusi
|
|
105
114
|
#
|
|
106
|
-
# @param currency_ids [Array<String>] Currency ids to include,
|
|
115
|
+
# @param currency_ids [Array<String>] Currency ids to include, comma-separated (e.g. `?currencyIds=credits`), up to 10
|
|
107
116
|
#
|
|
108
117
|
# @param entity_id_search [String] Case-insensitive substring match on the entity id or its display name (`%`/`_` m
|
|
109
118
|
#
|
|
110
|
-
# @param entity_type_ids [Array<String>] Filter to one or more entity types,
|
|
119
|
+
# @param entity_type_ids [Array<String>] Filter to one or more entity types, comma-separated (e.g. `?entityTypeIds=team,u
|
|
111
120
|
#
|
|
112
|
-
# @param feature_ids [Array<String>] Feature ids to include,
|
|
121
|
+
# @param feature_ids [Array<String>] Feature ids to include, comma-separated (e.g. `?featureIds=ai-tokens,seats`), up
|
|
113
122
|
#
|
|
114
123
|
# @param limit [Integer] Maximum number of items to return
|
|
115
124
|
#
|
|
@@ -164,12 +164,20 @@ module Stigg
|
|
|
164
164
|
# @return [String, nil]
|
|
165
165
|
required :next_, String, api_name: :next, nil?: true
|
|
166
166
|
|
|
167
|
-
# @!
|
|
167
|
+
# @!attribute prev
|
|
168
|
+
# Cursor for fetching the previous page of results, or null if at the beginning
|
|
169
|
+
#
|
|
170
|
+
# @return [String, nil]
|
|
171
|
+
required :prev, String, nil?: true
|
|
172
|
+
|
|
173
|
+
# @!method initialize(next_:, prev:)
|
|
168
174
|
# Some parameter documentations has been truncated, see
|
|
169
175
|
# {Stigg::Models::V1::Events::Beta::CustomerRetrieveGovernanceResponse::Pagination}
|
|
170
176
|
# for more details.
|
|
171
177
|
#
|
|
172
178
|
# @param next_ [String, nil] Cursor for fetching the next page of results, or null if no additional pages exi
|
|
179
|
+
#
|
|
180
|
+
# @param prev [String, nil] Cursor for fetching the previous page of results, or null if at the beginning
|
|
173
181
|
end
|
|
174
182
|
end
|
|
175
183
|
end
|
|
@@ -72,7 +72,8 @@ module Stigg
|
|
|
72
72
|
# @!attribute parent_id
|
|
73
73
|
# Parent entity ID in the hierarchy. Omit to leave the current parent untouched (a
|
|
74
74
|
# new node defaults to a root); `null` detaches to a root; an ID sets or changes
|
|
75
|
-
# the parent. Reparenting an existing node is leaf-only
|
|
75
|
+
# the parent. Reparenting or detaching an existing node is leaf-only; place a
|
|
76
|
+
# parent before its children, or in the same batch.
|
|
76
77
|
#
|
|
77
78
|
# @return [String, nil]
|
|
78
79
|
optional :parent_id, String, api_name: :parentId, nil?: true
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1Beta
|
|
6
|
+
module Customers
|
|
7
|
+
# @see Stigg::Resources::V1Beta::Customers::Governance#list
|
|
8
|
+
class GovernanceListParams < Stigg::Internal::Type::BaseModel
|
|
9
|
+
extend Stigg::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include Stigg::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!attribute id
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :id, String
|
|
16
|
+
|
|
17
|
+
# @!attribute after
|
|
18
|
+
# Opaque cursor from a page’s `next`; returns the page after it. Mutually
|
|
19
|
+
# exclusive with `before`.
|
|
20
|
+
#
|
|
21
|
+
# @return [String, nil]
|
|
22
|
+
optional :after, String
|
|
23
|
+
|
|
24
|
+
# @!attribute before
|
|
25
|
+
# Opaque cursor from a page’s `prev`; returns the page before it. Mutually
|
|
26
|
+
# exclusive with `after`.
|
|
27
|
+
#
|
|
28
|
+
# @return [String, nil]
|
|
29
|
+
optional :before, String
|
|
30
|
+
|
|
31
|
+
# @!attribute currency_ids
|
|
32
|
+
# Currency ids to include, comma-separated (e.g. `?currencyIds=credits`), up
|
|
33
|
+
# to 100. Omit both featureIds and currencyIds for tree mode.
|
|
34
|
+
#
|
|
35
|
+
# @return [Array<String>, nil]
|
|
36
|
+
optional :currency_ids, Stigg::Internal::Type::ArrayOf[String]
|
|
37
|
+
|
|
38
|
+
# @!attribute entity_id_search
|
|
39
|
+
# Case-insensitive substring match on the entity id or its display name (`%`/`_`
|
|
40
|
+
# matched literally).
|
|
41
|
+
#
|
|
42
|
+
# @return [String, nil]
|
|
43
|
+
optional :entity_id_search, String
|
|
44
|
+
|
|
45
|
+
# @!attribute entity_type_ids
|
|
46
|
+
# Filter to one or more entity types, comma-separated (e.g.
|
|
47
|
+
# `?entityTypeIds=team,user`), up to 100.
|
|
48
|
+
#
|
|
49
|
+
# @return [Array<String>, nil]
|
|
50
|
+
optional :entity_type_ids, Stigg::Internal::Type::ArrayOf[String]
|
|
51
|
+
|
|
52
|
+
# @!attribute feature_ids
|
|
53
|
+
# Feature ids to include, comma-separated (e.g. `?featureIds=ai-tokens,seats`), up
|
|
54
|
+
# to 100. Omit both featureIds and currencyIds for tree mode — every node in the
|
|
55
|
+
# hierarchy with no usage configuration attached.
|
|
56
|
+
#
|
|
57
|
+
# @return [Array<String>, nil]
|
|
58
|
+
optional :feature_ids, Stigg::Internal::Type::ArrayOf[String]
|
|
59
|
+
|
|
60
|
+
# @!attribute limit
|
|
61
|
+
# Maximum number of items to return
|
|
62
|
+
#
|
|
63
|
+
# @return [Integer, nil]
|
|
64
|
+
optional :limit, Integer
|
|
65
|
+
|
|
66
|
+
# @!attribute min_utilization
|
|
67
|
+
# Only nodes with utilization ≥ this value (e.g. 0.8 for ≥80%, 1 for at/over
|
|
68
|
+
# limit).
|
|
69
|
+
#
|
|
70
|
+
# @return [Float, nil]
|
|
71
|
+
optional :min_utilization, Float
|
|
72
|
+
|
|
73
|
+
# @!attribute order
|
|
74
|
+
# Sort direction: `asc` or `desc` (default `desc`).
|
|
75
|
+
#
|
|
76
|
+
# @return [Symbol, Stigg::Models::V1Beta::Customers::GovernanceListParams::Order, nil]
|
|
77
|
+
optional :order, enum: -> { Stigg::V1Beta::Customers::GovernanceListParams::Order }
|
|
78
|
+
|
|
79
|
+
# @!attribute scope
|
|
80
|
+
# Filter by configuration scope: `all` (default), `nodeWide` (`[]` only), or
|
|
81
|
+
# `scoped` (non-empty only).
|
|
82
|
+
#
|
|
83
|
+
# @return [Symbol, Stigg::Models::V1Beta::Customers::GovernanceListParams::Scope, nil]
|
|
84
|
+
optional :scope, enum: -> { Stigg::V1Beta::Customers::GovernanceListParams::Scope }
|
|
85
|
+
|
|
86
|
+
# @!attribute sort_by
|
|
87
|
+
# Sort key: `utilization` (default, cross-capability-safe), `currentUsage`,
|
|
88
|
+
# `usageLimit`, `scopeSize`, `id`, or `createdAt`.
|
|
89
|
+
#
|
|
90
|
+
# @return [Symbol, Stigg::Models::V1Beta::Customers::GovernanceListParams::SortBy, nil]
|
|
91
|
+
optional :sort_by, enum: -> { Stigg::V1Beta::Customers::GovernanceListParams::SortBy }
|
|
92
|
+
|
|
93
|
+
# @!attribute x_account_id
|
|
94
|
+
#
|
|
95
|
+
# @return [String, nil]
|
|
96
|
+
optional :x_account_id, String
|
|
97
|
+
|
|
98
|
+
# @!attribute x_environment_id
|
|
99
|
+
#
|
|
100
|
+
# @return [String, nil]
|
|
101
|
+
optional :x_environment_id, String
|
|
102
|
+
|
|
103
|
+
# @!method initialize(id:, after: nil, before: nil, currency_ids: nil, entity_id_search: nil, entity_type_ids: nil, feature_ids: nil, limit: nil, min_utilization: nil, order: nil, scope: nil, sort_by: nil, x_account_id: nil, x_environment_id: nil, request_options: {})
|
|
104
|
+
# Some parameter documentations has been truncated, see
|
|
105
|
+
# {Stigg::Models::V1Beta::Customers::GovernanceListParams} for more details.
|
|
106
|
+
#
|
|
107
|
+
# @param id [String]
|
|
108
|
+
#
|
|
109
|
+
# @param after [String] Opaque cursor from a page’s `next`; returns the page after it. Mutually exclusiv
|
|
110
|
+
#
|
|
111
|
+
# @param before [String] Opaque cursor from a page’s `prev`; returns the page before it. Mutually exclusi
|
|
112
|
+
#
|
|
113
|
+
# @param currency_ids [Array<String>] Currency ids to include, comma-separated (e.g. `?currencyIds=credits`), up to 10
|
|
114
|
+
#
|
|
115
|
+
# @param entity_id_search [String] Case-insensitive substring match on the entity id or its display name (`%`/`_` m
|
|
116
|
+
#
|
|
117
|
+
# @param entity_type_ids [Array<String>] Filter to one or more entity types, comma-separated (e.g. `?entityTypeIds=team,u
|
|
118
|
+
#
|
|
119
|
+
# @param feature_ids [Array<String>] Feature ids to include, comma-separated (e.g. `?featureIds=ai-tokens,seats`), up
|
|
120
|
+
#
|
|
121
|
+
# @param limit [Integer] Maximum number of items to return
|
|
122
|
+
#
|
|
123
|
+
# @param min_utilization [Float] Only nodes with utilization ≥ this value (e.g. 0.8 for ≥80%, 1 for at/over limit
|
|
124
|
+
#
|
|
125
|
+
# @param order [Symbol, Stigg::Models::V1Beta::Customers::GovernanceListParams::Order] Sort direction: `asc` or `desc` (default `desc`).
|
|
126
|
+
#
|
|
127
|
+
# @param scope [Symbol, Stigg::Models::V1Beta::Customers::GovernanceListParams::Scope] Filter by configuration scope: `all` (default), `nodeWide` (`[]` only), or `scop
|
|
128
|
+
#
|
|
129
|
+
# @param sort_by [Symbol, Stigg::Models::V1Beta::Customers::GovernanceListParams::SortBy] Sort key: `utilization` (default, cross-capability-safe), `currentUsage`, `usage
|
|
130
|
+
#
|
|
131
|
+
# @param x_account_id [String]
|
|
132
|
+
#
|
|
133
|
+
# @param x_environment_id [String]
|
|
134
|
+
#
|
|
135
|
+
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
|
|
136
|
+
|
|
137
|
+
# Sort direction: `asc` or `desc` (default `desc`).
|
|
138
|
+
module Order
|
|
139
|
+
extend Stigg::Internal::Type::Enum
|
|
140
|
+
|
|
141
|
+
ASC = :asc
|
|
142
|
+
DESC = :desc
|
|
143
|
+
|
|
144
|
+
# @!method self.values
|
|
145
|
+
# @return [Array<Symbol>]
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Filter by configuration scope: `all` (default), `nodeWide` (`[]` only), or
|
|
149
|
+
# `scoped` (non-empty only).
|
|
150
|
+
module Scope
|
|
151
|
+
extend Stigg::Internal::Type::Enum
|
|
152
|
+
|
|
153
|
+
ALL = :all
|
|
154
|
+
NODE_WIDE = :nodeWide
|
|
155
|
+
SCOPED = :scoped
|
|
156
|
+
|
|
157
|
+
# @!method self.values
|
|
158
|
+
# @return [Array<Symbol>]
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Sort key: `utilization` (default, cross-capability-safe), `currentUsage`,
|
|
162
|
+
# `usageLimit`, `scopeSize`, `id`, or `createdAt`.
|
|
163
|
+
module SortBy
|
|
164
|
+
extend Stigg::Internal::Type::Enum
|
|
165
|
+
|
|
166
|
+
UTILIZATION = :utilization
|
|
167
|
+
CURRENT_USAGE = :currentUsage
|
|
168
|
+
USAGE_LIMIT = :usageLimit
|
|
169
|
+
SCOPE_SIZE = :scopeSize
|
|
170
|
+
ID = :id
|
|
171
|
+
CREATED_AT = :createdAt
|
|
172
|
+
|
|
173
|
+
# @!method self.values
|
|
174
|
+
# @return [Array<Symbol>]
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
end
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1Beta
|
|
6
|
+
module Customers
|
|
7
|
+
# @see Stigg::Resources::V1Beta::Customers::Governance#list
|
|
8
|
+
class GovernanceListResponse < Stigg::Internal::Type::BaseModel
|
|
9
|
+
# @!attribute cadence
|
|
10
|
+
# Usage-reset cadence as an ISO-8601 single-unit duration, e.g. `P1M`, `P30D`,
|
|
11
|
+
# `PT1M`; `null` when the node has no usage configuration.
|
|
12
|
+
#
|
|
13
|
+
# @return [String, nil]
|
|
14
|
+
required :cadence, String, nil?: true
|
|
15
|
+
|
|
16
|
+
# @!attribute current_usage
|
|
17
|
+
# Usage consumed in the current cadence period (may lag the live counter by a
|
|
18
|
+
# short interval).
|
|
19
|
+
#
|
|
20
|
+
# @return [Float, nil]
|
|
21
|
+
required :current_usage, Float, api_name: :currentUsage, nil?: true
|
|
22
|
+
|
|
23
|
+
# @!attribute display_name
|
|
24
|
+
# Human-readable name of the entity, or null when none is set (display the entity
|
|
25
|
+
# id instead).
|
|
26
|
+
#
|
|
27
|
+
# @return [String, nil]
|
|
28
|
+
required :display_name, String, api_name: :displayName, nil?: true
|
|
29
|
+
|
|
30
|
+
# @!attribute entity_id
|
|
31
|
+
# External id of the entity at this node.
|
|
32
|
+
#
|
|
33
|
+
# @return [String]
|
|
34
|
+
required :entity_id, String, api_name: :entityId
|
|
35
|
+
|
|
36
|
+
# @!attribute entity_type_id
|
|
37
|
+
# External id of the entity type (e.g. `team`, `user`).
|
|
38
|
+
#
|
|
39
|
+
# @return [String]
|
|
40
|
+
required :entity_type_id, String, api_name: :entityTypeId
|
|
41
|
+
|
|
42
|
+
# @!attribute parent_id
|
|
43
|
+
# External id of the parent entity in the tree. `null` means the entity is either
|
|
44
|
+
# a root or not yet placed in the hierarchy — placement rides on an assignment, so
|
|
45
|
+
# an entity with no limits set has no parent yet. Both render at the top level;
|
|
46
|
+
# use it to rebuild the tree.
|
|
47
|
+
#
|
|
48
|
+
# @return [String, nil]
|
|
49
|
+
required :parent_id, String, api_name: :parentId, nil?: true
|
|
50
|
+
|
|
51
|
+
# @!attribute scope_entity_ids
|
|
52
|
+
# The configuration scope (entity ids). Empty is the node-wide configuration; a
|
|
53
|
+
# non-empty set is a dimension-scoped sub-configuration.
|
|
54
|
+
#
|
|
55
|
+
# @return [Array<String>]
|
|
56
|
+
required :scope_entity_ids, Stigg::Internal::Type::ArrayOf[String], api_name: :scopeEntityIds
|
|
57
|
+
|
|
58
|
+
# @!attribute usage_limit
|
|
59
|
+
# Hard usage limit for this node per cadence period.
|
|
60
|
+
#
|
|
61
|
+
# @return [Float, nil]
|
|
62
|
+
required :usage_limit, Float, api_name: :usageLimit, nil?: true
|
|
63
|
+
|
|
64
|
+
# @!attribute usage_period_end
|
|
65
|
+
# Exclusive end of the cadence period in progress now — when usage resets. `null`
|
|
66
|
+
# when the node has no usage configuration, or when a stored cadence cannot be
|
|
67
|
+
# parsed.
|
|
68
|
+
#
|
|
69
|
+
# @return [Time, nil]
|
|
70
|
+
required :usage_period_end, Time, api_name: :usagePeriodEnd, nil?: true
|
|
71
|
+
|
|
72
|
+
# @!attribute usage_period_start
|
|
73
|
+
# Start of the cadence period in progress now, derived from the cadence and the
|
|
74
|
+
# assignment anchor — it stays correct across a rollover. `null` when the node has
|
|
75
|
+
# no usage configuration, or when a stored cadence cannot be parsed.
|
|
76
|
+
#
|
|
77
|
+
# @return [Time, nil]
|
|
78
|
+
required :usage_period_start, Time, api_name: :usagePeriodStart, nil?: true
|
|
79
|
+
|
|
80
|
+
# @!attribute utilization
|
|
81
|
+
# `currentUsage / usageLimit` (1 when usageLimit is 0 — always at limit). The
|
|
82
|
+
# cross-capability-safe sort key.
|
|
83
|
+
#
|
|
84
|
+
# @return [Float, nil]
|
|
85
|
+
required :utilization, Float, nil?: true
|
|
86
|
+
|
|
87
|
+
# @!attribute currency_id
|
|
88
|
+
# The metered currency ID (present when the configured capability is a credit
|
|
89
|
+
# currency).
|
|
90
|
+
#
|
|
91
|
+
# @return [String, nil]
|
|
92
|
+
optional :currency_id, String, api_name: :currencyId
|
|
93
|
+
|
|
94
|
+
# @!attribute feature_id
|
|
95
|
+
# The metered feature ID (present when the configured capability is a feature).
|
|
96
|
+
#
|
|
97
|
+
# @return [String, nil]
|
|
98
|
+
optional :feature_id, String, api_name: :featureId
|
|
99
|
+
|
|
100
|
+
# @!method initialize(cadence:, current_usage:, display_name:, entity_id:, entity_type_id:, parent_id:, scope_entity_ids:, usage_limit:, usage_period_end:, usage_period_start:, utilization:, currency_id: nil, feature_id: nil)
|
|
101
|
+
# Some parameter documentations has been truncated, see
|
|
102
|
+
# {Stigg::Models::V1Beta::Customers::GovernanceListResponse} for more details.
|
|
103
|
+
#
|
|
104
|
+
# A node of the governance hierarchy tree with its usage configuration (limit,
|
|
105
|
+
# cadence, scope) and current usage. Usage is read from a periodically-refreshed
|
|
106
|
+
# read model and may lag the live counter by a short interval; it never gates
|
|
107
|
+
# access.
|
|
108
|
+
#
|
|
109
|
+
# @param cadence [String, nil] Usage-reset cadence as an ISO-8601 single-unit duration, e.g. `P1M`, `P30D`, `PT
|
|
110
|
+
#
|
|
111
|
+
# @param current_usage [Float, nil] Usage consumed in the current cadence period (may lag the live counter by a shor
|
|
112
|
+
#
|
|
113
|
+
# @param display_name [String, nil] Human-readable name of the entity, or null when none is set (display the entity
|
|
114
|
+
#
|
|
115
|
+
# @param entity_id [String] External id of the entity at this node.
|
|
116
|
+
#
|
|
117
|
+
# @param entity_type_id [String] External id of the entity type (e.g. `team`, `user`).
|
|
118
|
+
#
|
|
119
|
+
# @param parent_id [String, nil] External id of the parent entity in the tree. `null` means the entity is either
|
|
120
|
+
#
|
|
121
|
+
# @param scope_entity_ids [Array<String>] The configuration scope (entity ids). Empty is the node-wide configuration; a no
|
|
122
|
+
#
|
|
123
|
+
# @param usage_limit [Float, nil] Hard usage limit for this node per cadence period.
|
|
124
|
+
#
|
|
125
|
+
# @param usage_period_end [Time, nil] Exclusive end of the cadence period in progress now — when usage resets. `null`
|
|
126
|
+
#
|
|
127
|
+
# @param usage_period_start [Time, nil] Start of the cadence period in progress now, derived from the cadence and the as
|
|
128
|
+
#
|
|
129
|
+
# @param utilization [Float, nil] `currentUsage / usageLimit` (1 when usageLimit is 0 — always at limit). The cros
|
|
130
|
+
#
|
|
131
|
+
# @param currency_id [String] The metered currency ID (present when the configured capability is a credit curr
|
|
132
|
+
#
|
|
133
|
+
# @param feature_id [String] The metered feature ID (present when the configured capability is a feature).
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
end
|
|
@@ -16,19 +16,21 @@ module Stigg
|
|
|
16
16
|
# tree can be rebuilt client-side. Usage is read from a periodically-refreshed
|
|
17
17
|
# read model and never gates access.
|
|
18
18
|
#
|
|
19
|
-
# @overload retrieve_governance(id, after: nil, currency_ids: nil, entity_id_search: nil, entity_type_ids: nil, feature_ids: nil, limit: nil, min_utilization: nil, order: nil, scope: nil, sort_by: nil, x_account_id: nil, x_environment_id: nil, request_options: {})
|
|
19
|
+
# @overload retrieve_governance(id, after: nil, before: nil, currency_ids: nil, entity_id_search: nil, entity_type_ids: nil, feature_ids: nil, limit: nil, min_utilization: nil, order: nil, scope: nil, sort_by: nil, x_account_id: nil, x_environment_id: nil, request_options: {})
|
|
20
20
|
#
|
|
21
21
|
# @param id [String] Path param: The customer ID.
|
|
22
22
|
#
|
|
23
|
-
# @param after [String] Query param:
|
|
23
|
+
# @param after [String] Query param: Opaque cursor from a page’s `next`; returns the page after it. Mutu
|
|
24
24
|
#
|
|
25
|
-
# @param
|
|
25
|
+
# @param before [String] Query param: Opaque cursor from a page’s `prev`; returns the page before it. Mut
|
|
26
|
+
#
|
|
27
|
+
# @param currency_ids [Array<String>] Query param: Currency ids to include, comma-separated (e.g. `?currencyIds=credit
|
|
26
28
|
#
|
|
27
29
|
# @param entity_id_search [String] Query param: Case-insensitive substring match on the entity id or its display na
|
|
28
30
|
#
|
|
29
|
-
# @param entity_type_ids [Array<String>] Query param: Filter to one or more entity types,
|
|
31
|
+
# @param entity_type_ids [Array<String>] Query param: Filter to one or more entity types, comma-separated (e.g. `?entityT
|
|
30
32
|
#
|
|
31
|
-
# @param feature_ids [Array<String>] Query param: Feature ids to include,
|
|
33
|
+
# @param feature_ids [Array<String>] Query param: Feature ids to include, comma-separated (e.g. `?featureIds=ai-token
|
|
32
34
|
#
|
|
33
35
|
# @param limit [Integer] Query param: Maximum number of items to return
|
|
34
36
|
#
|
|
@@ -53,6 +55,7 @@ module Stigg
|
|
|
53
55
|
query_params =
|
|
54
56
|
[
|
|
55
57
|
:after,
|
|
58
|
+
:before,
|
|
56
59
|
:currency_ids,
|
|
57
60
|
:entity_id_search,
|
|
58
61
|
:entity_type_ids,
|