smplkit 3.0.13 → 3.0.15
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/lib/smplkit/_generated/app/lib/smplkit_app_client/api/api_keys_api.rb +9 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/billing_api.rb +20 -2
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/context_types_api.rb +9 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/context_values_api.rb +97 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/contexts_api.rb +16 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/environments_api.rb +9 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/invitations_api.rb +9 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/metrics_api.rb +27 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/plans_api.rb +9 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/products_api.rb +9 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/services_api.rb +9 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/users_api.rb +8 -17
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/api_key_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context.rb +12 -1
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_resource.rb +1 -1
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_type_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_value.rb +166 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_value_list_response.rb +193 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_value_resource.rb +225 -0
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/environment_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invitation_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invoice_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/{user_list_meta.rb → list_meta.rb} +20 -19
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_names_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_rollup_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/{page_meta.rb → pagination_meta.rb} +43 -75
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/payment_method_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/plan_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/product_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/service_list_response.rb +30 -4
- data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/user_list_response.rb +18 -1
- data/lib/smplkit/_generated/app/lib/smplkit_app_client.rb +6 -2
- data/lib/smplkit/_generated/app/spec/api/api_keys_api_spec.rb +3 -0
- data/lib/smplkit/_generated/app/spec/api/billing_api_spec.rb +7 -1
- data/lib/smplkit/_generated/app/spec/api/context_types_api_spec.rb +3 -0
- data/lib/smplkit/_generated/app/spec/api/context_values_api_spec.rb +52 -0
- data/lib/smplkit/_generated/app/spec/api/contexts_api_spec.rb +6 -2
- data/lib/smplkit/_generated/app/spec/api/environments_api_spec.rb +3 -0
- data/lib/smplkit/_generated/app/spec/api/invitations_api_spec.rb +3 -0
- data/lib/smplkit/_generated/app/spec/api/metrics_api_spec.rb +9 -0
- data/lib/smplkit/_generated/app/spec/api/plans_api_spec.rb +3 -0
- data/lib/smplkit/_generated/app/spec/api/products_api_spec.rb +3 -0
- data/lib/smplkit/_generated/app/spec/api/services_api_spec.rb +3 -0
- data/lib/smplkit/_generated/app/spec/api/users_api_spec.rb +3 -2
- data/lib/smplkit/_generated/app/spec/models/api_key_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/context_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/context_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/context_type_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/context_value_list_response_spec.rb +42 -0
- data/lib/smplkit/_generated/app/spec/models/context_value_resource_spec.rb +52 -0
- data/lib/smplkit/_generated/app/spec/models/{user_list_meta_spec.rb → context_value_spec.rb} +7 -7
- data/lib/smplkit/_generated/app/spec/models/environment_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/invitation_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/invoice_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/list_meta_spec.rb +36 -0
- data/lib/smplkit/_generated/app/spec/models/metric_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/metric_names_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/metric_rollup_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/{page_meta_spec.rb → pagination_meta_spec.rb} +9 -9
- data/lib/smplkit/_generated/app/spec/models/payment_method_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/plan_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/product_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/app/spec/models/service_list_response_spec.rb +6 -0
- data/lib/smplkit/logging/client.rb +2 -2
- data/lib/smplkit/management/client.rb +81 -17
- metadata +13 -5
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit API
|
|
3
|
+
|
|
4
|
+
#API for the smplkit platform.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for SmplkitGeneratedClient::App::ContextValueListResponse
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe SmplkitGeneratedClient::App::ContextValueListResponse do
|
|
21
|
+
#let(:instance) { SmplkitGeneratedClient::App::ContextValueListResponse.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of ContextValueListResponse' do
|
|
24
|
+
it 'should create an instance of ContextValueListResponse' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(SmplkitGeneratedClient::App::ContextValueListResponse)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "data"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "meta"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit API
|
|
3
|
+
|
|
4
|
+
#API for the smplkit platform.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for SmplkitGeneratedClient::App::ContextValueResource
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe SmplkitGeneratedClient::App::ContextValueResource do
|
|
21
|
+
#let(:instance) { SmplkitGeneratedClient::App::ContextValueResource.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of ContextValueResource' do
|
|
24
|
+
it 'should create an instance of ContextValueResource' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(SmplkitGeneratedClient::App::ContextValueResource)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "id"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "type"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["context_value"])
|
|
40
|
+
# validator.allowable_values.each do |value|
|
|
41
|
+
# expect { instance.type = value }.not_to raise_error
|
|
42
|
+
# end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
describe 'test attribute "attributes"' do
|
|
47
|
+
it 'should work' do
|
|
48
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
end
|
data/lib/smplkit/_generated/app/spec/models/{user_list_meta_spec.rb → context_value_spec.rb}
RENAMED
|
@@ -14,20 +14,20 @@ require 'spec_helper'
|
|
|
14
14
|
require 'json'
|
|
15
15
|
require 'date'
|
|
16
16
|
|
|
17
|
-
# Unit tests for SmplkitGeneratedClient::App::
|
|
17
|
+
# Unit tests for SmplkitGeneratedClient::App::ContextValue
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
|
-
describe SmplkitGeneratedClient::App::
|
|
21
|
-
#let(:instance) { SmplkitGeneratedClient::App::
|
|
20
|
+
describe SmplkitGeneratedClient::App::ContextValue do
|
|
21
|
+
#let(:instance) { SmplkitGeneratedClient::App::ContextValue.new }
|
|
22
22
|
|
|
23
|
-
describe 'test an instance of
|
|
24
|
-
it 'should create an instance of
|
|
23
|
+
describe 'test an instance of ContextValue' do
|
|
24
|
+
it 'should create an instance of ContextValue' do
|
|
25
25
|
# uncomment below to test the instance creation
|
|
26
|
-
#expect(instance).to be_instance_of(SmplkitGeneratedClient::App::
|
|
26
|
+
#expect(instance).to be_instance_of(SmplkitGeneratedClient::App::ContextValue)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
describe 'test attribute "
|
|
30
|
+
describe 'test attribute "value"' do
|
|
31
31
|
it 'should work' do
|
|
32
32
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
33
|
end
|
|
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::EnvironmentListResponse do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "meta"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
end
|
|
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::InvitationListResponse do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "meta"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
end
|
|
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::InvoiceListResponse do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "meta"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit API
|
|
3
|
+
|
|
4
|
+
#API for the smplkit platform.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for SmplkitGeneratedClient::App::ListMeta
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe SmplkitGeneratedClient::App::ListMeta do
|
|
21
|
+
#let(:instance) { SmplkitGeneratedClient::App::ListMeta.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of ListMeta' do
|
|
24
|
+
it 'should create an instance of ListMeta' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(SmplkitGeneratedClient::App::ListMeta)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "pagination"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::MetricListResponse do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "meta"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
end
|
|
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::MetricNamesResponse do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "meta"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
end
|
|
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::MetricRollupListResponse do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "meta"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
end
|
|
@@ -14,32 +14,32 @@ require 'spec_helper'
|
|
|
14
14
|
require 'json'
|
|
15
15
|
require 'date'
|
|
16
16
|
|
|
17
|
-
# Unit tests for SmplkitGeneratedClient::App::
|
|
17
|
+
# Unit tests for SmplkitGeneratedClient::App::PaginationMeta
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
|
-
describe SmplkitGeneratedClient::App::
|
|
21
|
-
#let(:instance) { SmplkitGeneratedClient::App::
|
|
20
|
+
describe SmplkitGeneratedClient::App::PaginationMeta do
|
|
21
|
+
#let(:instance) { SmplkitGeneratedClient::App::PaginationMeta.new }
|
|
22
22
|
|
|
23
|
-
describe 'test an instance of
|
|
24
|
-
it 'should create an instance of
|
|
23
|
+
describe 'test an instance of PaginationMeta' do
|
|
24
|
+
it 'should create an instance of PaginationMeta' do
|
|
25
25
|
# uncomment below to test the instance creation
|
|
26
|
-
#expect(instance).to be_instance_of(SmplkitGeneratedClient::App::
|
|
26
|
+
#expect(instance).to be_instance_of(SmplkitGeneratedClient::App::PaginationMeta)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
describe 'test attribute "
|
|
30
|
+
describe 'test attribute "page"' do
|
|
31
31
|
it 'should work' do
|
|
32
32
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
describe 'test attribute "
|
|
36
|
+
describe 'test attribute "size"' do
|
|
37
37
|
it 'should work' do
|
|
38
38
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
describe 'test attribute "
|
|
42
|
+
describe 'test attribute "total"' do
|
|
43
43
|
it 'should work' do
|
|
44
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
45
|
end
|
|
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::PaymentMethodListResponse do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "meta"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
end
|
|
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::PlanListResponse do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "meta"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
end
|
|
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::ProductListResponse do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "meta"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
end
|
|
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::ServiceListResponse do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "meta"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
end
|
|
@@ -27,6 +27,12 @@ module Smplkit
|
|
|
27
27
|
# etc.) and converts at the boundary via the existing
|
|
28
28
|
# +<resource>_from_resource+ helpers.
|
|
29
29
|
class ManagementClient
|
|
30
|
+
# Default page[size] the runtime asks for when walking a list
|
|
31
|
+
# endpoint to completion. The platform caps page[size] at 1000;
|
|
32
|
+
# using the same value here makes the minimum number of round-trips
|
|
33
|
+
# per exhaustive fetch.
|
|
34
|
+
RUNTIME_PAGE_SIZE = 1000
|
|
35
|
+
|
|
30
36
|
attr_reader :contexts, :context_types, :environments, :account_settings,
|
|
31
37
|
:config, :flags, :loggers, :log_groups, :audit
|
|
32
38
|
|
|
@@ -126,6 +132,33 @@ module Smplkit
|
|
|
126
132
|
end
|
|
127
133
|
end
|
|
128
134
|
|
|
135
|
+
# Walk a generated paginated list endpoint to completion.
|
|
136
|
+
#
|
|
137
|
+
# The block receives a per-page +opts+ hash with +page_number+ and
|
|
138
|
+
# +page_size+ filled in, calls the generated list method through
|
|
139
|
+
# {ErrorMapping.call}, and returns the response object. Pages stop
|
|
140
|
+
# when the server returns fewer rows than requested — the platform's
|
|
141
|
+
# standard last-page signal across every offset-paginated list
|
|
142
|
+
# endpoint. Returns the concatenated +response.data+ rows.
|
|
143
|
+
module PaginatedFetch
|
|
144
|
+
module_function
|
|
145
|
+
|
|
146
|
+
def collect(page_size: RUNTIME_PAGE_SIZE)
|
|
147
|
+
rows = []
|
|
148
|
+
page_number = 1
|
|
149
|
+
loop do
|
|
150
|
+
opts = { page_number: page_number, page_size: page_size }
|
|
151
|
+
response = ErrorMapping.call { yield(opts) }
|
|
152
|
+
page = response.data || []
|
|
153
|
+
rows.concat(page)
|
|
154
|
+
break if page.length < page_size
|
|
155
|
+
|
|
156
|
+
page_number += 1
|
|
157
|
+
end
|
|
158
|
+
rows
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
|
|
129
162
|
# Deep-stringify Hash keys so resources returned by generated +to_hash+
|
|
130
163
|
# (symbol-keyed) match what the wrapper helpers expect (string-keyed).
|
|
131
164
|
module ResourceShim
|
|
@@ -175,8 +208,11 @@ module Smplkit
|
|
|
175
208
|
Smplkit.debug("registration", "context flush failed: #{e.class}: #{e.message}")
|
|
176
209
|
end
|
|
177
210
|
|
|
178
|
-
def list
|
|
179
|
-
|
|
211
|
+
def list(page_number: nil, page_size: nil)
|
|
212
|
+
opts = {}
|
|
213
|
+
opts[:page_number] = page_number unless page_number.nil?
|
|
214
|
+
opts[:page_size] = page_size unless page_size.nil?
|
|
215
|
+
response = ErrorMapping.call { @api.list_contexts(opts) }
|
|
180
216
|
(response.data || []).map { |r| context_from_resource(ResourceShim.from_model(r)) }
|
|
181
217
|
end
|
|
182
218
|
|
|
@@ -237,8 +273,11 @@ module Smplkit
|
|
|
237
273
|
@api = SmplkitGeneratedClient::App::ContextTypesApi.new(api_client)
|
|
238
274
|
end
|
|
239
275
|
|
|
240
|
-
def list
|
|
241
|
-
|
|
276
|
+
def list(page_number: nil, page_size: nil)
|
|
277
|
+
opts = {}
|
|
278
|
+
opts[:page_number] = page_number unless page_number.nil?
|
|
279
|
+
opts[:page_size] = page_size unless page_size.nil?
|
|
280
|
+
response = ErrorMapping.call { @api.list_context_types(opts) }
|
|
242
281
|
(response.data || []).map { |r| from_resource(ResourceShim.from_model(r)) }
|
|
243
282
|
end
|
|
244
283
|
|
|
@@ -296,8 +335,11 @@ module Smplkit
|
|
|
296
335
|
@api = SmplkitGeneratedClient::App::EnvironmentsApi.new(api_client)
|
|
297
336
|
end
|
|
298
337
|
|
|
299
|
-
def list
|
|
300
|
-
|
|
338
|
+
def list(page_number: nil, page_size: nil)
|
|
339
|
+
opts = {}
|
|
340
|
+
opts[:page_number] = page_number unless page_number.nil?
|
|
341
|
+
opts[:page_size] = page_size unless page_size.nil?
|
|
342
|
+
response = ErrorMapping.call { @api.list_environments(opts) }
|
|
301
343
|
(response.data || []).map { |r| from_resource(ResourceShim.from_model(r)) }
|
|
302
344
|
end
|
|
303
345
|
|
|
@@ -413,8 +455,11 @@ module Smplkit
|
|
|
413
455
|
@api = SmplkitGeneratedClient::Config::ConfigsApi.new(api_client)
|
|
414
456
|
end
|
|
415
457
|
|
|
416
|
-
def list
|
|
417
|
-
|
|
458
|
+
def list(page_number: nil, page_size: nil)
|
|
459
|
+
opts = {}
|
|
460
|
+
opts[:page_number] = page_number unless page_number.nil?
|
|
461
|
+
opts[:page_size] = page_size unless page_size.nil?
|
|
462
|
+
response = ErrorMapping.call { @api.list_configs(opts) }
|
|
418
463
|
(response.data || []).map { |r| Smplkit::Config::Helpers.config_from_json(self, ResourceShim.from_model(r)) }
|
|
419
464
|
end
|
|
420
465
|
|
|
@@ -451,8 +496,11 @@ module Smplkit
|
|
|
451
496
|
# Build the parent-chain for a given config, walking +parent_id+
|
|
452
497
|
# pointers across the full config list. Mirrors the Python SDK's
|
|
453
498
|
# client-side resolution — there is no server +/chain+ endpoint.
|
|
499
|
+
#
|
|
500
|
+
# Walks every page of +list_configs+ so an account with more than
|
|
501
|
+
# +RUNTIME_PAGE_SIZE+ configs still resolves chains correctly.
|
|
454
502
|
def fetch_chain(target_key)
|
|
455
|
-
all_configs =
|
|
503
|
+
all_configs = fetch_all_configs
|
|
456
504
|
by_key = all_configs.to_h { |c| [c.key, c] }
|
|
457
505
|
by_id = all_configs.to_h { |c| [c.id, c] }
|
|
458
506
|
|
|
@@ -475,6 +523,11 @@ module Smplkit
|
|
|
475
523
|
|
|
476
524
|
private
|
|
477
525
|
|
|
526
|
+
def fetch_all_configs
|
|
527
|
+
rows = PaginatedFetch.collect { |opts| @api.list_configs(opts) }
|
|
528
|
+
rows.map { |r| Smplkit::Config::Helpers.config_from_json(self, ResourceShim.from_model(r)) }
|
|
529
|
+
end
|
|
530
|
+
|
|
478
531
|
def config_body(config)
|
|
479
532
|
SmplkitGeneratedClient::Config::ConfigResponse.new(
|
|
480
533
|
data: SmplkitGeneratedClient::Config::ConfigResource.new(
|
|
@@ -576,8 +629,11 @@ module Smplkit
|
|
|
576
629
|
@buffer.pending_count
|
|
577
630
|
end
|
|
578
631
|
|
|
579
|
-
def list
|
|
580
|
-
|
|
632
|
+
def list(page_number: nil, page_size: nil)
|
|
633
|
+
opts = {}
|
|
634
|
+
opts[:page_number] = page_number unless page_number.nil?
|
|
635
|
+
opts[:page_size] = page_size unless page_size.nil?
|
|
636
|
+
response = ErrorMapping.call { @api.list_flags(opts) }
|
|
581
637
|
(response.data || []).map { |r| flag_from_resource(ResourceShim.from_model(r)) }
|
|
582
638
|
end
|
|
583
639
|
|
|
@@ -634,9 +690,11 @@ module Smplkit
|
|
|
634
690
|
Smplkit::Flags::Helpers.flag_dict_from_json(ResourceShim.from_model(response.data))
|
|
635
691
|
end
|
|
636
692
|
|
|
693
|
+
# Runtime entry — walks every page so an account holding more than
|
|
694
|
+
# +RUNTIME_PAGE_SIZE+ flags still gets a complete in-memory store.
|
|
637
695
|
def list_flags
|
|
638
|
-
|
|
639
|
-
|
|
696
|
+
rows = PaginatedFetch.collect { |opts| @api.list_flags(opts) }
|
|
697
|
+
rows.map { |r| Smplkit::Flags::Helpers.flag_dict_from_json(ResourceShim.from_model(r)) }
|
|
640
698
|
end
|
|
641
699
|
|
|
642
700
|
private
|
|
@@ -731,8 +789,11 @@ module Smplkit
|
|
|
731
789
|
Smplkit.debug("registration", "logger flush failed: #{e.class}: #{e.message}")
|
|
732
790
|
end
|
|
733
791
|
|
|
734
|
-
def list
|
|
735
|
-
|
|
792
|
+
def list(page_number: nil, page_size: nil)
|
|
793
|
+
opts = {}
|
|
794
|
+
opts[:page_number] = page_number unless page_number.nil?
|
|
795
|
+
opts[:page_size] = page_size unless page_size.nil?
|
|
796
|
+
response = ErrorMapping.call { @api.list_loggers(opts) }
|
|
736
797
|
(response.data || []).map do |r|
|
|
737
798
|
Smplkit::Logging::Helpers.logger_resource_to_model(self, ResourceShim.from_model(r))
|
|
738
799
|
end
|
|
@@ -781,8 +842,11 @@ module Smplkit
|
|
|
781
842
|
@api = SmplkitGeneratedClient::Logging::LogGroupsApi.new(api_client)
|
|
782
843
|
end
|
|
783
844
|
|
|
784
|
-
def list
|
|
785
|
-
|
|
845
|
+
def list(page_number: nil, page_size: nil)
|
|
846
|
+
opts = {}
|
|
847
|
+
opts[:page_number] = page_number unless page_number.nil?
|
|
848
|
+
opts[:page_size] = page_size unless page_size.nil?
|
|
849
|
+
response = ErrorMapping.call { @api.list_log_groups(opts) }
|
|
786
850
|
(response.data || []).map do |r|
|
|
787
851
|
Smplkit::Logging::Helpers.log_group_resource_to_model(self, ResourceShim.from_model(r))
|
|
788
852
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smplkit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.15
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Smpl Solutions LLC
|
|
@@ -157,6 +157,7 @@ files:
|
|
|
157
157
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/api/auth_api.rb
|
|
158
158
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/api/billing_api.rb
|
|
159
159
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/api/context_types_api.rb
|
|
160
|
+
- lib/smplkit/_generated/app/lib/smplkit_app_client/api/context_values_api.rb
|
|
160
161
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/api/contexts_api.rb
|
|
161
162
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/api/email_registrations_api.rb
|
|
162
163
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/api/emails_api.rb
|
|
@@ -203,6 +204,9 @@ files:
|
|
|
203
204
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_type_request.rb
|
|
204
205
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_type_resource.rb
|
|
205
206
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_type_response.rb
|
|
207
|
+
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_value.rb
|
|
208
|
+
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_value_list_response.rb
|
|
209
|
+
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_value_resource.rb
|
|
206
210
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/email.rb
|
|
207
211
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/email_resource.rb
|
|
208
212
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/email_response.rb
|
|
@@ -228,6 +232,7 @@ files:
|
|
|
228
232
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/invoice_resource.rb
|
|
229
233
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/invoice_single_response.rb
|
|
230
234
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/limit_definition.rb
|
|
235
|
+
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/list_meta.rb
|
|
231
236
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/login_request.rb
|
|
232
237
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_attributes.rb
|
|
233
238
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_bulk_request.rb
|
|
@@ -240,7 +245,7 @@ files:
|
|
|
240
245
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_rollup_resource.rb
|
|
241
246
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/next_tier_response.rb
|
|
242
247
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/oidc_provider.rb
|
|
243
|
-
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/
|
|
248
|
+
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/pagination_meta.rb
|
|
244
249
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/payment_method.rb
|
|
245
250
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/payment_method_list_response.rb
|
|
246
251
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/payment_method_request.rb
|
|
@@ -275,7 +280,6 @@ files:
|
|
|
275
280
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_response.rb
|
|
276
281
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_response_attributes.rb
|
|
277
282
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/user.rb
|
|
278
|
-
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/user_list_meta.rb
|
|
279
283
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/user_list_response.rb
|
|
280
284
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/user_request.rb
|
|
281
285
|
- lib/smplkit/_generated/app/lib/smplkit_app_client/models/user_resource.rb
|
|
@@ -288,6 +292,7 @@ files:
|
|
|
288
292
|
- lib/smplkit/_generated/app/spec/api/auth_api_spec.rb
|
|
289
293
|
- lib/smplkit/_generated/app/spec/api/billing_api_spec.rb
|
|
290
294
|
- lib/smplkit/_generated/app/spec/api/context_types_api_spec.rb
|
|
295
|
+
- lib/smplkit/_generated/app/spec/api/context_values_api_spec.rb
|
|
291
296
|
- lib/smplkit/_generated/app/spec/api/contexts_api_spec.rb
|
|
292
297
|
- lib/smplkit/_generated/app/spec/api/email_registrations_api_spec.rb
|
|
293
298
|
- lib/smplkit/_generated/app/spec/api/emails_api_spec.rb
|
|
@@ -330,6 +335,9 @@ files:
|
|
|
330
335
|
- lib/smplkit/_generated/app/spec/models/context_type_resource_spec.rb
|
|
331
336
|
- lib/smplkit/_generated/app/spec/models/context_type_response_spec.rb
|
|
332
337
|
- lib/smplkit/_generated/app/spec/models/context_type_spec.rb
|
|
338
|
+
- lib/smplkit/_generated/app/spec/models/context_value_list_response_spec.rb
|
|
339
|
+
- lib/smplkit/_generated/app/spec/models/context_value_resource_spec.rb
|
|
340
|
+
- lib/smplkit/_generated/app/spec/models/context_value_spec.rb
|
|
333
341
|
- lib/smplkit/_generated/app/spec/models/email_resource_spec.rb
|
|
334
342
|
- lib/smplkit/_generated/app/spec/models/email_response_spec.rb
|
|
335
343
|
- lib/smplkit/_generated/app/spec/models/email_spec.rb
|
|
@@ -355,6 +363,7 @@ files:
|
|
|
355
363
|
- lib/smplkit/_generated/app/spec/models/invoice_single_response_spec.rb
|
|
356
364
|
- lib/smplkit/_generated/app/spec/models/invoice_spec.rb
|
|
357
365
|
- lib/smplkit/_generated/app/spec/models/limit_definition_spec.rb
|
|
366
|
+
- lib/smplkit/_generated/app/spec/models/list_meta_spec.rb
|
|
358
367
|
- lib/smplkit/_generated/app/spec/models/login_request_spec.rb
|
|
359
368
|
- lib/smplkit/_generated/app/spec/models/metric_attributes_spec.rb
|
|
360
369
|
- lib/smplkit/_generated/app/spec/models/metric_bulk_request_spec.rb
|
|
@@ -367,7 +376,7 @@ files:
|
|
|
367
376
|
- lib/smplkit/_generated/app/spec/models/metric_rollup_resource_spec.rb
|
|
368
377
|
- lib/smplkit/_generated/app/spec/models/next_tier_response_spec.rb
|
|
369
378
|
- lib/smplkit/_generated/app/spec/models/oidc_provider_spec.rb
|
|
370
|
-
- lib/smplkit/_generated/app/spec/models/
|
|
379
|
+
- lib/smplkit/_generated/app/spec/models/pagination_meta_spec.rb
|
|
371
380
|
- lib/smplkit/_generated/app/spec/models/payment_method_list_response_spec.rb
|
|
372
381
|
- lib/smplkit/_generated/app/spec/models/payment_method_request_spec.rb
|
|
373
382
|
- lib/smplkit/_generated/app/spec/models/payment_method_resource_spec.rb
|
|
@@ -401,7 +410,6 @@ files:
|
|
|
401
410
|
- lib/smplkit/_generated/app/spec/models/subscription_resource_spec.rb
|
|
402
411
|
- lib/smplkit/_generated/app/spec/models/subscription_response_attributes_spec.rb
|
|
403
412
|
- lib/smplkit/_generated/app/spec/models/subscription_response_spec.rb
|
|
404
|
-
- lib/smplkit/_generated/app/spec/models/user_list_meta_spec.rb
|
|
405
413
|
- lib/smplkit/_generated/app/spec/models/user_list_response_spec.rb
|
|
406
414
|
- lib/smplkit/_generated/app/spec/models/user_request_spec.rb
|
|
407
415
|
- lib/smplkit/_generated/app/spec/models/user_resource_spec.rb
|