schematichq 1.4.8 → 1.4.10

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 (100) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +3 -3
  3. data/.fern/replay.lock +350 -2
  4. data/WASM_VERSION +1 -1
  5. data/lib/schematic/billing/types/create_invoice_request_body.rb +2 -0
  6. data/lib/schematic/catalogs/client.rb +480 -0
  7. data/lib/schematic/catalogs/types/create_catalog_request_body.rb +13 -0
  8. data/lib/schematic/catalogs/types/create_catalog_response.rb +12 -0
  9. data/lib/schematic/catalogs/types/delete_catalog_response.rb +12 -0
  10. data/lib/schematic/catalogs/types/get_catalog_response.rb +12 -0
  11. data/lib/schematic/catalogs/types/get_configuration_response.rb +12 -0
  12. data/lib/schematic/catalogs/types/get_credit_bundles_in_catalog_response.rb +12 -0
  13. data/lib/schematic/catalogs/types/get_derived_features_response.rb +12 -0
  14. data/lib/schematic/catalogs/types/get_plans_in_catalog_response.rb +12 -0
  15. data/lib/schematic/catalogs/types/list_catalogs_params.rb +15 -0
  16. data/lib/schematic/catalogs/types/list_catalogs_request.rb +14 -0
  17. data/lib/schematic/catalogs/types/list_catalogs_response.rb +12 -0
  18. data/lib/schematic/catalogs/types/update_catalog_configuration_request_body.rb +20 -0
  19. data/lib/schematic/catalogs/types/update_catalog_request_body.rb +14 -0
  20. data/lib/schematic/catalogs/types/update_catalog_response.rb +12 -0
  21. data/lib/schematic/catalogs/types/update_configuration_response.rb +12 -0
  22. data/lib/schematic/checkout/client.rb +69 -0
  23. data/lib/schematic/checkout/types/get_company_billing_details_response.rb +12 -0
  24. data/lib/schematic/checkout/types/update_company_billing_details_request_body.rb +15 -0
  25. data/lib/schematic/checkout/types/update_company_billing_details_response.rb +12 -0
  26. data/lib/schematic/client.rb +6 -1
  27. data/lib/schematic/components/client.rb +37 -0
  28. data/lib/schematic/components/types/bind_catalog_request_body.rb +12 -0
  29. data/lib/schematic/components/types/bind_catalog_response.rb +12 -0
  30. data/lib/schematic/dataexports/client.rb +76 -0
  31. data/lib/schematic/dataexports/types/create_data_export_request_body.rb +3 -3
  32. data/lib/schematic/dataexports/types/get_data_export_response.rb +12 -0
  33. data/lib/schematic/dataexports/types/list_data_exports_params.rb +15 -0
  34. data/lib/schematic/dataexports/types/list_data_exports_request.rb +14 -0
  35. data/lib/schematic/dataexports/types/list_data_exports_response.rb +12 -0
  36. data/lib/schematic/entitlements/types/create_billing_linked_plan_entitlement_request_body.rb +1 -0
  37. data/lib/schematic/entitlements/types/create_plan_entitlement_request_body.rb +1 -0
  38. data/lib/schematic/entitlements/types/update_plan_entitlement_request_body.rb +1 -0
  39. data/lib/schematic/planbundle/types/create_custom_plan_bundle_request_body.rb +1 -0
  40. data/lib/schematic/planbundle/types/create_plan_bundle_request_body.rb +0 -1
  41. data/lib/schematic/planbundle/types/update_plan_bundle_request_body.rb +0 -1
  42. data/lib/schematic/rules_engine.rb +11 -0
  43. data/lib/schematic/types/account_member_permission.rb +1 -0
  44. data/lib/schematic/types/audit_log_export_metadata.rb +13 -0
  45. data/lib/schematic/types/billing_plan_credit_grant_reset_cadence.rb +2 -0
  46. data/lib/schematic/types/catalog_config_ordered_bundle.rb +9 -0
  47. data/lib/schematic/types/catalog_config_ordered_bundle_response_data.rb +9 -0
  48. data/lib/schematic/types/catalog_config_ordered_entitlement.rb +10 -0
  49. data/lib/schematic/types/catalog_config_ordered_entitlement_response_data.rb +10 -0
  50. data/lib/schematic/types/catalog_config_ordered_plan.rb +10 -0
  51. data/lib/schematic/types/catalog_config_ordered_plan_response_data.rb +10 -0
  52. data/lib/schematic/types/catalog_configuration_response_data.rb +19 -0
  53. data/lib/schematic/types/catalog_credit_bundle_i_ds_response_data.rb +9 -0
  54. data/lib/schematic/types/catalog_derived_feature_response_data.rb +11 -0
  55. data/lib/schematic/types/catalog_derived_features_response_data.rb +9 -0
  56. data/lib/schematic/types/catalog_plan_i_ds_response_data.rb +9 -0
  57. data/lib/schematic/types/catalog_response_data.rb +22 -0
  58. data/lib/schematic/types/company_billing_address_view.rb +14 -0
  59. data/lib/schematic/types/company_billing_checkout_settings.rb +11 -0
  60. data/lib/schematic/types/company_billing_details_response_data.rb +13 -0
  61. data/lib/schematic/types/company_billing_details_view.rb +13 -0
  62. data/lib/schematic/types/company_feature_usage_export_metadata.rb +25 -0
  63. data/lib/schematic/types/company_plan_detail_response_data.rb +1 -0
  64. data/lib/schematic/types/component_response_data.rb +1 -0
  65. data/lib/schematic/types/create_entitlement_in_bundle_request_body.rb +1 -0
  66. data/lib/schematic/types/credits_auto_topup_success.rb +12 -0
  67. data/lib/schematic/types/credits_credit_purchase_success.rb +14 -0
  68. data/lib/schematic/types/credits_webhook_company_summary.rb +10 -0
  69. data/lib/schematic/types/credits_webhook_credit_summary.rb +10 -0
  70. data/lib/schematic/types/customer_billing_address.rb +14 -0
  71. data/lib/schematic/types/data_export_metadata.rb +14 -0
  72. data/lib/schematic/types/data_export_output_file_type.rb +3 -14
  73. data/lib/schematic/types/data_export_response_data.rb +3 -3
  74. data/lib/schematic/types/data_export_type.rb +3 -14
  75. data/lib/schematic/types/event_body.rb +1 -0
  76. data/lib/schematic/types/event_body_inference.rb +22 -0
  77. data/lib/schematic/types/event_type.rb +1 -0
  78. data/lib/schematic/types/feature_entitlement.rb +1 -0
  79. data/lib/schematic/types/invoice_request_body.rb +2 -0
  80. data/lib/schematic/types/invoice_response_data.rb +2 -0
  81. data/lib/schematic/types/plan_bundle_response_data.rb +0 -1
  82. data/lib/schematic/types/plan_catalog_membership_response_data.rb +10 -0
  83. data/lib/schematic/types/plan_detail_response_data.rb +1 -0
  84. data/lib/schematic/types/plan_entitlement_response_data.rb +1 -0
  85. data/lib/schematic/types/plan_group_plan_detail_response_data.rb +1 -0
  86. data/lib/schematic/types/plan_view_public_response_data.rb +1 -0
  87. data/lib/schematic/types/preview_subscription_discount_response_data.rb +19 -0
  88. data/lib/schematic/types/preview_subscription_finance_response_data.rb +2 -0
  89. data/lib/schematic/types/rulesengine_feature_entitlement.rb +1 -0
  90. data/lib/schematic/types/rulesengine_warning_tier.rb +10 -0
  91. data/lib/schematic/types/upsert_company_request_body.rb +2 -0
  92. data/lib/schematic/types/warning_tier.rb +10 -0
  93. data/lib/schematic/types/warning_tier_request_body.rb +10 -0
  94. data/lib/schematic/types/warning_tier_response_data.rb +11 -0
  95. data/lib/schematic/types/webhook_request_type.rb +2 -0
  96. data/lib/schematic/version.rb +1 -1
  97. data/lib/schematic/wasm/rulesengine.wasm +0 -0
  98. data/lib/schematic.rb +92 -36
  99. data/reference.md +1290 -83
  100. metadata +58 -2
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Catalogs
5
+ module Types
6
+ class UpdateCatalogResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::CatalogResponseData }, optional: false, nullable: false
8
+ field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Catalogs
5
+ module Types
6
+ class UpdateConfigurationResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::CatalogResponseData }, optional: false, nullable: false
8
+ field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -106,6 +106,75 @@ module Schematic
106
106
  end
107
107
  end
108
108
 
109
+ # @param request_options [Hash]
110
+ # @param params [Hash]
111
+ # @option request_options [String] :base_url
112
+ # @option request_options [Hash{String => Object}] :additional_headers
113
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
114
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
115
+ # @option request_options [Integer] :timeout_in_seconds
116
+ # @option params [String] :company_id
117
+ #
118
+ # @return [Schematic::Checkout::Types::GetCompanyBillingDetailsResponse]
119
+ def get_company_billing_details(request_options: {}, **params)
120
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
121
+ request = Schematic::Internal::JSON::Request.new(
122
+ base_url: request_options[:base_url],
123
+ method: "GET",
124
+ path: "companies/#{URI.encode_uri_component(params[:company_id].to_s)}/billing-details",
125
+ request_options: request_options
126
+ )
127
+ begin
128
+ response = @client.send(request)
129
+ rescue Net::HTTPRequestTimeout
130
+ raise Schematic::Errors::TimeoutError
131
+ end
132
+ code = response.code.to_i
133
+ if code.between?(200, 299)
134
+ Schematic::Checkout::Types::GetCompanyBillingDetailsResponse.load(response.body)
135
+ else
136
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
137
+ raise error_class.new(response.body, code: code)
138
+ end
139
+ end
140
+
141
+ # @param request_options [Hash]
142
+ # @param params [Schematic::Checkout::Types::UpdateCompanyBillingDetailsRequestBody]
143
+ # @option request_options [String] :base_url
144
+ # @option request_options [Hash{String => Object}] :additional_headers
145
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
146
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
147
+ # @option request_options [Integer] :timeout_in_seconds
148
+ # @option params [String] :company_id
149
+ #
150
+ # @return [Schematic::Checkout::Types::UpdateCompanyBillingDetailsResponse]
151
+ def update_company_billing_details(request_options: {}, **params)
152
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
153
+ request_data = Schematic::Checkout::Types::UpdateCompanyBillingDetailsRequestBody.new(params).to_h
154
+ non_body_param_names = ["company_id"]
155
+ body = request_data.except(*non_body_param_names)
156
+
157
+ request = Schematic::Internal::JSON::Request.new(
158
+ base_url: request_options[:base_url],
159
+ method: "PUT",
160
+ path: "companies/#{URI.encode_uri_component(params[:company_id].to_s)}/billing-details",
161
+ body: body,
162
+ request_options: request_options
163
+ )
164
+ begin
165
+ response = @client.send(request)
166
+ rescue Net::HTTPRequestTimeout
167
+ raise Schematic::Errors::TimeoutError
168
+ end
169
+ code = response.code.to_i
170
+ if code.between?(200, 299)
171
+ Schematic::Checkout::Types::UpdateCompanyBillingDetailsResponse.load(response.body)
172
+ else
173
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
174
+ raise error_class.new(response.body, code: code)
175
+ end
176
+ end
177
+
109
178
  # @param request_options [Hash]
110
179
  # @param params [Schematic::Types::ManagePlanRequest]
111
180
  # @option request_options [String] :base_url
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Checkout
5
+ module Types
6
+ class GetCompanyBillingDetailsResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::CompanyBillingDetailsResponseData }, optional: false, nullable: false
8
+ field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Checkout
5
+ module Types
6
+ class UpdateCompanyBillingDetailsRequestBody < Internal::Types::Model
7
+ field :company_id, -> { String }, optional: false, nullable: false
8
+ field :address, -> { Schematic::Types::CustomerBillingAddress }, optional: true, nullable: false
9
+ field :email, -> { String }, optional: true, nullable: false
10
+ field :phone, -> { String }, optional: true, nullable: false
11
+ field :values, -> { Internal::Types::Array[Schematic::Types::CheckoutFieldValue] }, optional: false, nullable: false
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Checkout
5
+ module Types
6
+ class UpdateCompanyBillingDetailsResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::CompanyBillingDetailsResponseData }, optional: false, nullable: false
8
+ field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -10,7 +10,7 @@ module Schematic
10
10
  @raw_client = Schematic::Internal::Http::RawClient.new(
11
11
  base_url: base_url || Schematic::Environment::DEFAULT,
12
12
  headers: {
13
- "User-Agent" => "schematichq/1.4.8",
13
+ "User-Agent" => "schematichq/1.4.10",
14
14
  "X-Fern-Language" => "Ruby",
15
15
  "X-Schematic-Api-Key" => api_key.to_s
16
16
  }
@@ -32,6 +32,11 @@ module Schematic
32
32
  @credits ||= Schematic::Credits::Client.new(client: @raw_client)
33
33
  end
34
34
 
35
+ # @return [Schematic::Catalogs::Client]
36
+ def catalogs
37
+ @catalogs ||= Schematic::Catalogs::Client.new(client: @raw_client)
38
+ end
39
+
35
40
  # @return [Schematic::Checkout::Client]
36
41
  def checkout
37
42
  @checkout ||= Schematic::Checkout::Client.new(client: @raw_client)
@@ -185,6 +185,43 @@ module Schematic
185
185
  end
186
186
  end
187
187
 
188
+ # @param request_options [Hash]
189
+ # @param params [Schematic::Components::Types::BindCatalogRequestBody]
190
+ # @option request_options [String] :base_url
191
+ # @option request_options [Hash{String => Object}] :additional_headers
192
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
193
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
194
+ # @option request_options [Integer] :timeout_in_seconds
195
+ # @option params [String] :component_id
196
+ #
197
+ # @return [Schematic::Components::Types::BindCatalogResponse]
198
+ def bind_catalog(request_options: {}, **params)
199
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
200
+ request_data = Schematic::Components::Types::BindCatalogRequestBody.new(params).to_h
201
+ non_body_param_names = ["component_id"]
202
+ body = request_data.except(*non_body_param_names)
203
+
204
+ request = Schematic::Internal::JSON::Request.new(
205
+ base_url: request_options[:base_url],
206
+ method: "PUT",
207
+ path: "components/#{URI.encode_uri_component(params[:component_id].to_s)}/catalog",
208
+ body: body,
209
+ request_options: request_options
210
+ )
211
+ begin
212
+ response = @client.send(request)
213
+ rescue Net::HTTPRequestTimeout
214
+ raise Schematic::Errors::TimeoutError
215
+ end
216
+ code = response.code.to_i
217
+ if code.between?(200, 299)
218
+ Schematic::Components::Types::BindCatalogResponse.load(response.body)
219
+ else
220
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
221
+ raise error_class.new(response.body, code: code)
222
+ end
223
+ end
224
+
188
225
  # @param request_options [Hash]
189
226
  # @param params [Hash]
190
227
  # @option request_options [String] :base_url
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Components
5
+ module Types
6
+ class BindCatalogRequestBody < Internal::Types::Model
7
+ field :component_id, -> { String }, optional: false, nullable: false
8
+ field :catalog_id, -> { String }, optional: true, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Components
5
+ module Types
6
+ class BindCatalogResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::ComponentResponseData }, optional: false, nullable: false
8
+ field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -10,6 +10,50 @@ module Schematic
10
10
  @client = client
11
11
  end
12
12
 
13
+ # @param request_options [Hash]
14
+ # @param params [Hash]
15
+ # @option request_options [String] :base_url
16
+ # @option request_options [Hash{String => Object}] :additional_headers
17
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
18
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
19
+ # @option request_options [Integer] :timeout_in_seconds
20
+ # @option params [Schematic::Types::DataExportType, nil] :export_type
21
+ # @option params [Schematic::Types::DataExportStatus, nil] :status
22
+ # @option params [Integer, nil] :limit
23
+ # @option params [Integer, nil] :offset
24
+ #
25
+ # @return [Schematic::Dataexports::Types::ListDataExportsResponse]
26
+ def list_data_exports(request_options: {}, **params)
27
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
28
+ query_param_names = %i[export_type status limit offset]
29
+ query_params = {}
30
+ query_params["export_type"] = params[:export_type] if params.key?(:export_type)
31
+ query_params["status"] = params[:status] if params.key?(:status)
32
+ query_params["limit"] = params[:limit] if params.key?(:limit)
33
+ query_params["offset"] = params[:offset] if params.key?(:offset)
34
+ params.except(*query_param_names)
35
+
36
+ request = Schematic::Internal::JSON::Request.new(
37
+ base_url: request_options[:base_url],
38
+ method: "GET",
39
+ path: "data-exports",
40
+ query: query_params,
41
+ request_options: request_options
42
+ )
43
+ begin
44
+ response = @client.send(request)
45
+ rescue Net::HTTPRequestTimeout
46
+ raise Schematic::Errors::TimeoutError
47
+ end
48
+ code = response.code.to_i
49
+ if code.between?(200, 299)
50
+ Schematic::Dataexports::Types::ListDataExportsResponse.load(response.body)
51
+ else
52
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
53
+ raise error_class.new(response.body, code: code)
54
+ end
55
+ end
56
+
13
57
  # @param request_options [Hash]
14
58
  # @param params [Schematic::Dataexports::Types::CreateDataExportRequestBody]
15
59
  # @option request_options [String] :base_url
@@ -42,6 +86,38 @@ module Schematic
42
86
  end
43
87
  end
44
88
 
89
+ # @param request_options [Hash]
90
+ # @param params [Hash]
91
+ # @option request_options [String] :base_url
92
+ # @option request_options [Hash{String => Object}] :additional_headers
93
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
94
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
95
+ # @option request_options [Integer] :timeout_in_seconds
96
+ # @option params [String] :data_export_id
97
+ #
98
+ # @return [Schematic::Dataexports::Types::GetDataExportResponse]
99
+ def get_data_export(request_options: {}, **params)
100
+ params = Schematic::Internal::Types::Utils.normalize_keys(params)
101
+ request = Schematic::Internal::JSON::Request.new(
102
+ base_url: request_options[:base_url],
103
+ method: "GET",
104
+ path: "data-exports/#{URI.encode_uri_component(params[:data_export_id].to_s)}",
105
+ request_options: request_options
106
+ )
107
+ begin
108
+ response = @client.send(request)
109
+ rescue Net::HTTPRequestTimeout
110
+ raise Schematic::Errors::TimeoutError
111
+ end
112
+ code = response.code.to_i
113
+ if code.between?(200, 299)
114
+ Schematic::Dataexports::Types::GetDataExportResponse.load(response.body)
115
+ else
116
+ error_class = Schematic::Errors::ResponseError.subclass_for_code(code)
117
+ raise error_class.new(response.body, code: code)
118
+ end
119
+ end
120
+
45
121
  # @param request_options [Hash]
46
122
  # @param params [Hash]
47
123
  # @option request_options [String] :base_url
@@ -4,9 +4,9 @@ module Schematic
4
4
  module Dataexports
5
5
  module Types
6
6
  class CreateDataExportRequestBody < Internal::Types::Model
7
- field :export_type, -> { String }, optional: false, nullable: false
8
- field :metadata, -> { String }, optional: false, nullable: false
9
- field :output_file_type, -> { String }, optional: false, nullable: false
7
+ field :export_type, -> { Schematic::Types::DataExportType }, optional: false, nullable: false
8
+ field :metadata, -> { Schematic::Types::DataExportMetadata }, optional: true, nullable: false
9
+ field :output_file_type, -> { Schematic::Types::DataExportOutputFileType }, optional: false, nullable: false
10
10
  end
11
11
  end
12
12
  end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Dataexports
5
+ module Types
6
+ class GetDataExportResponse < Internal::Types::Model
7
+ field :data, -> { Schematic::Types::DataExportResponseData }, optional: false, nullable: false
8
+ field :params, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Dataexports
5
+ module Types
6
+ # Input parameters
7
+ class ListDataExportsParams < Internal::Types::Model
8
+ field :export_type, -> { Schematic::Types::DataExportType }, optional: true, nullable: false
9
+ field :limit, -> { Integer }, optional: true, nullable: false
10
+ field :offset, -> { Integer }, optional: true, nullable: false
11
+ field :status, -> { Schematic::Types::DataExportStatus }, optional: true, nullable: false
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Dataexports
5
+ module Types
6
+ class ListDataExportsRequest < Internal::Types::Model
7
+ field :export_type, -> { Schematic::Types::DataExportType }, optional: true, nullable: false
8
+ field :status, -> { Schematic::Types::DataExportStatus }, optional: true, nullable: false
9
+ field :limit, -> { Integer }, optional: true, nullable: false
10
+ field :offset, -> { Integer }, optional: true, nullable: false
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Dataexports
5
+ module Types
6
+ class ListDataExportsResponse < Internal::Types::Model
7
+ field :data, -> { Internal::Types::Array[Schematic::Types::DataExportResponseData] }, optional: false, nullable: false
8
+ field :params, -> { Schematic::Dataexports::Types::ListDataExportsParams }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
@@ -35,6 +35,7 @@ module Schematic
35
35
  field :value_numeric, -> { Integer }, optional: true, nullable: false
36
36
  field :value_trait_id, -> { String }, optional: true, nullable: false
37
37
  field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false
38
+ field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::WarningTierRequestBody] }, optional: true, nullable: false
38
39
  field :yearly_metered_price_id, -> { String }, optional: true, nullable: false
39
40
  field :yearly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false
40
41
  field :yearly_unit_price, -> { Integer }, optional: true, nullable: false
@@ -33,6 +33,7 @@ module Schematic
33
33
  field :value_numeric, -> { Integer }, optional: true, nullable: false
34
34
  field :value_trait_id, -> { String }, optional: true, nullable: false
35
35
  field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false
36
+ field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::WarningTierRequestBody] }, optional: true, nullable: false
36
37
  field :yearly_metered_price_id, -> { String }, optional: true, nullable: false
37
38
  field :yearly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false
38
39
  field :yearly_unit_price, -> { Integer }, optional: true, nullable: false
@@ -31,6 +31,7 @@ module Schematic
31
31
  field :value_numeric, -> { Integer }, optional: true, nullable: false
32
32
  field :value_trait_id, -> { String }, optional: true, nullable: false
33
33
  field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false
34
+ field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::WarningTierRequestBody] }, optional: true, nullable: false
34
35
  field :yearly_metered_price_id, -> { String }, optional: true, nullable: false
35
36
  field :yearly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false
36
37
  field :yearly_unit_price, -> { Integer }, optional: true, nullable: false
@@ -5,6 +5,7 @@ module Schematic
5
5
  module Types
6
6
  class CreateCustomPlanBundleRequestBody < Internal::Types::Model
7
7
  field :billing_product, -> { Schematic::Types::UpsertBillingProductRequestBody }, optional: true, nullable: false
8
+ field :credit_grants, -> { Internal::Types::Array[Schematic::Types::PlanBundleCreditGrantRequestBody] }, optional: true, nullable: false
8
9
  field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanBundleEntitlementRequestBody] }, optional: false, nullable: false
9
10
  field :plan, -> { Schematic::Types::CreateCustomPlanBundlePlanRequestBody }, optional: true, nullable: false
10
11
  end
@@ -8,7 +8,6 @@ module Schematic
8
8
  field :credit_grants, -> { Internal::Types::Array[Schematic::Types::PlanBundleCreditGrantRequestBody] }, optional: true, nullable: false
9
9
  field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanBundleEntitlementRequestBody] }, optional: false, nullable: false
10
10
  field :plan, -> { Schematic::Types::CreatePlanRequestBody }, optional: true, nullable: false
11
- field :traits, -> { Internal::Types::Array[Schematic::Types::UpdatePlanTraitTraitRequestBody] }, optional: true, nullable: false
12
11
  end
13
12
  end
14
13
  end
@@ -10,7 +10,6 @@ module Schematic
10
10
  field :entitlements, -> { Internal::Types::Array[Schematic::Types::PlanBundleEntitlementRequestBody] }, optional: false, nullable: false
11
11
  field :plan, -> { Schematic::Types::UpdatePlanRequestBody }, optional: true, nullable: false
12
12
  field :plan_version_id, -> { String }, optional: true, nullable: false
13
- field :traits, -> { Internal::Types::Array[Schematic::Types::UpdatePlanTraitTraitRequestBody] }, optional: true, nullable: false
14
13
  end
15
14
  end
16
15
  end
@@ -15,6 +15,7 @@ module Schematic
15
15
  @alloc_fn = nil
16
16
  @dealloc_fn = nil
17
17
  @check_flag_fn = nil
18
+ @set_time_fn = nil
18
19
  @get_result_json_fn = nil
19
20
  @get_result_json_length_fn = nil
20
21
  @get_version_key_fn = nil
@@ -47,6 +48,11 @@ module Schematic
47
48
  @alloc_fn = export_func("alloc")
48
49
  @dealloc_fn = export_func("dealloc")
49
50
  @check_flag_fn = export_func("checkFlagCombined")
51
+ # Optional: feed the wasm the current wall-clock time before each check.
52
+ # The raw wasm32-unknown-unknown build has no clock under wasmtime
53
+ # (SCHY-471); without this, metric-period reset timestamps are omitted.
54
+ # Absent on older wasm — hence the safe-navigation call below.
55
+ @set_time_fn = @instance.export("setCurrentTimeMillis")&.to_func
50
56
  @get_result_json_fn = export_func("getResultJson")
51
57
  @get_result_json_length_fn = export_func("getResultJsonLength")
52
58
  @get_version_key_fn = export_func("get_version_key_wasm")
@@ -80,6 +86,11 @@ module Schematic
80
86
  ptr = @alloc_fn.call(json_bytes.bytesize)
81
87
  begin
82
88
  @memory.write(ptr, json_bytes)
89
+
90
+ # Supply the host's current time so the engine can compute
91
+ # metric-period reset timestamps (SCHY-471). No-op on older wasm.
92
+ @set_time_fn&.call((Time.now.to_f * 1000).to_i)
93
+
83
94
  result_len = @check_flag_fn.call(ptr, json_bytes.bytesize)
84
95
 
85
96
  raise "WASM checkFlagCombined returned error" if result_len.negative?
@@ -8,6 +8,7 @@ module Schematic
8
8
  COMPANIES_EDIT = "companies_edit"
9
9
  COMPANY_USERS_EDIT = "company_users_edit"
10
10
  COMPONENTS_EDIT = "components_edit"
11
+ CUSTOM_PLANS_EDIT = "custom_plans_edit"
11
12
  DATA_EXPORTS_EDIT = "data_exports_edit"
12
13
  FEATURES_EDIT = "features_edit"
13
14
  FLAG_RULES_EDIT = "flag_rules_edit"
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class AuditLogExportMetadata < Internal::Types::Model
6
+ field :actor_type, -> { String }, optional: true, nullable: false
7
+ field :end_time, -> { String }, optional: true, nullable: false
8
+ field :notification_email_recipient_email_addresses, -> { Internal::Types::Array[String] }, optional: true, nullable: false
9
+ field :q, -> { String }, optional: true, nullable: false
10
+ field :start_time, -> { String }, optional: true, nullable: false
11
+ end
12
+ end
13
+ end
@@ -6,7 +6,9 @@ module Schematic
6
6
  extend Schematic::Internal::Types::Enum
7
7
 
8
8
  DAILY = "daily"
9
+ EVERY_6_MONTHS = "every_6_months"
9
10
  MONTHLY = "monthly"
11
+ QUARTERLY = "quarterly"
10
12
  WEEKLY = "weekly"
11
13
  YEARLY = "yearly"
12
14
  end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogConfigOrderedBundle < Internal::Types::Model
6
+ field :bundle_id, -> { String }, optional: false, nullable: false
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogConfigOrderedBundleResponseData < Internal::Types::Model
6
+ field :bundle_id, -> { String }, optional: false, nullable: false
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogConfigOrderedEntitlement < Internal::Types::Model
6
+ field :plan_entitlement_id, -> { String }, optional: false, nullable: false
7
+ field :visible, -> { Internal::Types::Boolean }, optional: true, nullable: false
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogConfigOrderedEntitlementResponseData < Internal::Types::Model
6
+ field :plan_entitlement_id, -> { String }, optional: false, nullable: false
7
+ field :visible, -> { Internal::Types::Boolean }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogConfigOrderedPlan < Internal::Types::Model
6
+ field :entitlements, -> { Internal::Types::Array[Schematic::Types::CatalogConfigOrderedEntitlement] }, optional: true, nullable: false
7
+ field :plan_id, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogConfigOrderedPlanResponseData < Internal::Types::Model
6
+ field :entitlements, -> { Internal::Types::Array[Schematic::Types::CatalogConfigOrderedEntitlementResponseData] }, optional: false, nullable: false
7
+ field :plan_id, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogConfigurationResponseData < Internal::Types::Model
6
+ field :add_ons, -> { Internal::Types::Array[Schematic::Types::PlanGroupPlanDetailResponseData] }, optional: false, nullable: false
7
+ field :custom_plan_cta_text, -> { String }, optional: true, nullable: false
8
+ field :custom_plan_cta_url, -> { String }, optional: true, nullable: false
9
+ field :custom_plan_price_text, -> { String }, optional: true, nullable: false
10
+ field :custom_plans_visible, -> { Internal::Types::Boolean }, optional: false, nullable: false
11
+ field :ordered_add_ons, -> { Internal::Types::Array[Schematic::Types::CatalogConfigOrderedPlanResponseData] }, optional: false, nullable: false
12
+ field :ordered_bundles, -> { Internal::Types::Array[Schematic::Types::CatalogConfigOrderedBundleResponseData] }, optional: false, nullable: false
13
+ field :ordered_plans, -> { Internal::Types::Array[Schematic::Types::CatalogConfigOrderedPlanResponseData] }, optional: false, nullable: false
14
+ field :plans, -> { Internal::Types::Array[Schematic::Types::PlanGroupPlanDetailResponseData] }, optional: false, nullable: false
15
+ field :pricing_model, -> { String }, optional: true, nullable: false
16
+ field :pricing_url, -> { String }, optional: true, nullable: false
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogCreditBundleIDsResponseData < Internal::Types::Model
6
+ field :credit_bundle_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogDerivedFeatureResponseData < Internal::Types::Model
6
+ field :icon, -> { String }, optional: false, nullable: false
7
+ field :id, -> { String }, optional: false, nullable: false
8
+ field :name, -> { String }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CatalogDerivedFeaturesResponseData < Internal::Types::Model
6
+ field :features, -> { Internal::Types::Array[Schematic::Types::CatalogDerivedFeatureResponseData] }, optional: false, nullable: false
7
+ end
8
+ end
9
+ end