schematichq 1.4.9 → 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 (82) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +2 -2
  3. data/.fern/replay.lock +344 -2
  4. data/WASM_VERSION +1 -1
  5. data/lib/schematic/catalogs/client.rb +480 -0
  6. data/lib/schematic/catalogs/types/create_catalog_request_body.rb +13 -0
  7. data/lib/schematic/catalogs/types/create_catalog_response.rb +12 -0
  8. data/lib/schematic/catalogs/types/delete_catalog_response.rb +12 -0
  9. data/lib/schematic/catalogs/types/get_catalog_response.rb +12 -0
  10. data/lib/schematic/catalogs/types/get_configuration_response.rb +12 -0
  11. data/lib/schematic/catalogs/types/get_credit_bundles_in_catalog_response.rb +12 -0
  12. data/lib/schematic/catalogs/types/get_derived_features_response.rb +12 -0
  13. data/lib/schematic/catalogs/types/get_plans_in_catalog_response.rb +12 -0
  14. data/lib/schematic/catalogs/types/list_catalogs_params.rb +15 -0
  15. data/lib/schematic/catalogs/types/list_catalogs_request.rb +14 -0
  16. data/lib/schematic/catalogs/types/list_catalogs_response.rb +12 -0
  17. data/lib/schematic/catalogs/types/update_catalog_configuration_request_body.rb +20 -0
  18. data/lib/schematic/catalogs/types/update_catalog_request_body.rb +14 -0
  19. data/lib/schematic/catalogs/types/update_catalog_response.rb +12 -0
  20. data/lib/schematic/catalogs/types/update_configuration_response.rb +12 -0
  21. data/lib/schematic/checkout/client.rb +69 -0
  22. data/lib/schematic/checkout/types/get_company_billing_details_response.rb +12 -0
  23. data/lib/schematic/checkout/types/update_company_billing_details_request_body.rb +15 -0
  24. data/lib/schematic/checkout/types/update_company_billing_details_response.rb +12 -0
  25. data/lib/schematic/client.rb +6 -1
  26. data/lib/schematic/components/client.rb +37 -0
  27. data/lib/schematic/components/types/bind_catalog_request_body.rb +12 -0
  28. data/lib/schematic/components/types/bind_catalog_response.rb +12 -0
  29. data/lib/schematic/dataexports/client.rb +76 -0
  30. data/lib/schematic/dataexports/types/create_data_export_request_body.rb +3 -3
  31. data/lib/schematic/dataexports/types/get_data_export_response.rb +12 -0
  32. data/lib/schematic/dataexports/types/list_data_exports_params.rb +15 -0
  33. data/lib/schematic/dataexports/types/list_data_exports_request.rb +14 -0
  34. data/lib/schematic/dataexports/types/list_data_exports_response.rb +12 -0
  35. data/lib/schematic/planbundle/types/create_custom_plan_bundle_request_body.rb +1 -0
  36. data/lib/schematic/types/audit_log_export_metadata.rb +13 -0
  37. data/lib/schematic/types/catalog_config_ordered_bundle.rb +9 -0
  38. data/lib/schematic/types/catalog_config_ordered_bundle_response_data.rb +9 -0
  39. data/lib/schematic/types/catalog_config_ordered_entitlement.rb +10 -0
  40. data/lib/schematic/types/catalog_config_ordered_entitlement_response_data.rb +10 -0
  41. data/lib/schematic/types/catalog_config_ordered_plan.rb +10 -0
  42. data/lib/schematic/types/catalog_config_ordered_plan_response_data.rb +10 -0
  43. data/lib/schematic/types/catalog_configuration_response_data.rb +19 -0
  44. data/lib/schematic/types/catalog_credit_bundle_i_ds_response_data.rb +9 -0
  45. data/lib/schematic/types/catalog_derived_feature_response_data.rb +11 -0
  46. data/lib/schematic/types/catalog_derived_features_response_data.rb +9 -0
  47. data/lib/schematic/types/catalog_plan_i_ds_response_data.rb +9 -0
  48. data/lib/schematic/types/catalog_response_data.rb +22 -0
  49. data/lib/schematic/types/company_billing_address_view.rb +14 -0
  50. data/lib/schematic/types/company_billing_checkout_settings.rb +11 -0
  51. data/lib/schematic/types/company_billing_details_response_data.rb +13 -0
  52. data/lib/schematic/types/company_billing_details_view.rb +13 -0
  53. data/lib/schematic/types/company_feature_usage_export_metadata.rb +25 -0
  54. data/lib/schematic/types/company_plan_detail_response_data.rb +1 -0
  55. data/lib/schematic/types/component_response_data.rb +1 -0
  56. data/lib/schematic/types/create_entitlement_in_bundle_request_body.rb +1 -0
  57. data/lib/schematic/types/credits_auto_topup_success.rb +12 -0
  58. data/lib/schematic/types/credits_credit_purchase_success.rb +14 -0
  59. data/lib/schematic/types/credits_webhook_company_summary.rb +10 -0
  60. data/lib/schematic/types/credits_webhook_credit_summary.rb +10 -0
  61. data/lib/schematic/types/customer_billing_address.rb +14 -0
  62. data/lib/schematic/types/data_export_metadata.rb +14 -0
  63. data/lib/schematic/types/data_export_output_file_type.rb +3 -14
  64. data/lib/schematic/types/data_export_response_data.rb +3 -3
  65. data/lib/schematic/types/data_export_type.rb +3 -14
  66. data/lib/schematic/types/feature_entitlement.rb +1 -0
  67. data/lib/schematic/types/plan_catalog_membership_response_data.rb +10 -0
  68. data/lib/schematic/types/plan_detail_response_data.rb +1 -0
  69. data/lib/schematic/types/plan_group_plan_detail_response_data.rb +1 -0
  70. data/lib/schematic/types/plan_view_public_response_data.rb +1 -0
  71. data/lib/schematic/types/preview_subscription_discount_response_data.rb +19 -0
  72. data/lib/schematic/types/preview_subscription_finance_response_data.rb +2 -0
  73. data/lib/schematic/types/rulesengine_feature_entitlement.rb +1 -0
  74. data/lib/schematic/types/rulesengine_warning_tier.rb +10 -0
  75. data/lib/schematic/types/upsert_company_request_body.rb +2 -0
  76. data/lib/schematic/types/warning_tier.rb +10 -0
  77. data/lib/schematic/types/webhook_request_type.rb +2 -0
  78. data/lib/schematic/version.rb +1 -1
  79. data/lib/schematic/wasm/rulesengine.wasm +0 -0
  80. data/lib/schematic.rb +91 -38
  81. data/reference.md +1231 -48
  82. metadata +55 -2
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CompanyFeatureUsageExportMetadata < Internal::Types::Model
6
+ field :company_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
7
+ field :credit_type_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
8
+ field :feature_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
9
+ field :has_scheduled_downgrade, -> { Internal::Types::Boolean }, optional: true, nullable: false
10
+ field :monetized_subscriptions, -> { Internal::Types::Boolean }, optional: true, nullable: false
11
+ field :notification_email_recipient_email_addresses, -> { Internal::Types::Array[String] }, optional: true, nullable: false
12
+ field :plan_id, -> { String }, optional: true, nullable: false
13
+ field :plan_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
14
+ field :plan_version_id, -> { String }, optional: true, nullable: false
15
+ field :q, -> { String }, optional: true, nullable: false
16
+ field :subscription_statuses, -> { Internal::Types::Array[String] }, optional: true, nullable: false
17
+ field :subscription_types, -> { Internal::Types::Array[String] }, optional: true, nullable: false
18
+ field :with_entitlement_for, -> { String }, optional: true, nullable: false
19
+ field :with_subscription, -> { Internal::Types::Boolean }, optional: true, nullable: false
20
+ field :without_feature_override_for, -> { String }, optional: true, nullable: false
21
+ field :without_plan, -> { Internal::Types::Boolean }, optional: true, nullable: false
22
+ field :without_subscription, -> { Internal::Types::Boolean }, optional: true, nullable: false
23
+ end
24
+ end
25
+ end
@@ -9,6 +9,7 @@ module Schematic
9
9
  field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false
10
10
  field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false
11
11
  field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: false, nullable: false
12
+ field :catalogs, -> { Internal::Types::Array[Schematic::Types::PlanCatalogMembershipResponseData] }, optional: true, nullable: false
12
13
  field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false
13
14
  field :company_can_trial, -> { Internal::Types::Boolean }, optional: false, nullable: false
14
15
  field :company_count, -> { Integer }, optional: false, nullable: false
@@ -4,6 +4,7 @@ module Schematic
4
4
  module Types
5
5
  class ComponentResponseData < Internal::Types::Model
6
6
  field :ast, -> { Internal::Types::Hash[String, Integer] }, optional: true, nullable: false
7
+ field :catalog_id, -> { String }, optional: true, nullable: false
7
8
  field :created_at, -> { String }, optional: false, nullable: false
8
9
  field :id, -> { String }, optional: false, nullable: false
9
10
  field :name, -> { String }, optional: false, nullable: false
@@ -32,6 +32,7 @@ module Schematic
32
32
  field :value_numeric, -> { Integer }, optional: true, nullable: false
33
33
  field :value_trait_id, -> { String }, optional: true, nullable: false
34
34
  field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false
35
+ field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::WarningTierRequestBody] }, optional: true, nullable: false
35
36
  field :yearly_metered_price_id, -> { String }, optional: true, nullable: false
36
37
  field :yearly_price_tiers, -> { Internal::Types::Array[Schematic::Types::CreatePriceTierRequestBody] }, optional: true, nullable: false
37
38
  field :yearly_unit_price, -> { Integer }, optional: true, nullable: false
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CreditsAutoTopupSuccess < Internal::Types::Model
6
+ field :company, -> { Schematic::Types::CreditsAutoTopupCompanySummary }, optional: true, nullable: false
7
+ field :credit, -> { Schematic::Types::CreditsAutoTopupCreditSummary }, optional: true, nullable: false
8
+ field :grant_id, -> { String }, optional: false, nullable: false
9
+ field :quantity, -> { Integer }, optional: false, nullable: false
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CreditsCreditPurchaseSuccess < Internal::Types::Model
6
+ field :bundle_id, -> { String }, optional: false, nullable: false
7
+ field :bundle_name, -> { String }, optional: false, nullable: false
8
+ field :company, -> { Schematic::Types::CreditsWebhookCompanySummary }, optional: true, nullable: false
9
+ field :credit, -> { Schematic::Types::CreditsWebhookCreditSummary }, optional: true, nullable: false
10
+ field :grant_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
11
+ field :quantity, -> { Integer }, optional: false, nullable: false
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CreditsWebhookCompanySummary < Internal::Types::Model
6
+ field :id, -> { String }, optional: false, nullable: false
7
+ field :name, -> { 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 CreditsWebhookCreditSummary < Internal::Types::Model
6
+ field :id, -> { String }, optional: false, nullable: false
7
+ field :name, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class CustomerBillingAddress < Internal::Types::Model
6
+ field :city, -> { String }, optional: false, nullable: false
7
+ field :country, -> { String }, optional: false, nullable: false
8
+ field :line_1, -> { String }, optional: false, nullable: false, api_name: "line1"
9
+ field :line_2, -> { String }, optional: false, nullable: false, api_name: "line2"
10
+ field :postal_code, -> { String }, optional: false, nullable: false
11
+ field :state, -> { String }, optional: false, nullable: false
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class DataExportMetadata < Internal::Types::Model
6
+ extend Schematic::Internal::Types::Union
7
+
8
+ discriminant :export_type
9
+
10
+ member -> { Schematic::Types::AuditLogExportMetadata }, key: "AUDIT_LOG"
11
+ member -> { Schematic::Types::CompanyFeatureUsageExportMetadata }, key: "COMPANY_FEATURE_USAGE"
12
+ end
13
+ end
14
+ end
@@ -3,21 +3,10 @@
3
3
  module Schematic
4
4
  module Types
5
5
  module DataExportOutputFileType
6
- # DataExportOutputFileType is an alias for Object
6
+ extend Schematic::Internal::Types::Enum
7
7
 
8
- # @option str [String]
9
- #
10
- # @return [untyped]
11
- def self.load(str)
12
- ::JSON.parse(str)
13
- end
14
-
15
- # @option value [untyped]
16
- #
17
- # @return [String]
18
- def self.dump(value)
19
- ::JSON.generate(value)
20
- end
8
+ CSV = "csv"
9
+ CSV_GZ = "csv.gz"
21
10
  end
22
11
  end
23
12
  end
@@ -6,10 +6,10 @@ module Schematic
6
6
  field :account_id, -> { String }, optional: false, nullable: false
7
7
  field :created_at, -> { String }, optional: false, nullable: false
8
8
  field :environment_id, -> { String }, optional: false, nullable: false
9
- field :export_type, -> { String }, optional: false, nullable: false
9
+ field :export_type, -> { Schematic::Types::DataExportType }, optional: false, nullable: false
10
10
  field :id, -> { String }, optional: false, nullable: false
11
- field :metadata, -> { String }, optional: false, nullable: false
12
- field :output_file_type, -> { String }, optional: false, nullable: false
11
+ field :metadata, -> { Schematic::Types::DataExportMetadata }, optional: true, nullable: false
12
+ field :output_file_type, -> { Schematic::Types::DataExportOutputFileType }, optional: false, nullable: false
13
13
  field :status, -> { Schematic::Types::DataExportStatus }, optional: false, nullable: false
14
14
  field :updated_at, -> { String }, optional: false, nullable: false
15
15
  end
@@ -3,21 +3,10 @@
3
3
  module Schematic
4
4
  module Types
5
5
  module DataExportType
6
- # DataExportType is an alias for Object
6
+ extend Schematic::Internal::Types::Enum
7
7
 
8
- # @option str [String]
9
- #
10
- # @return [untyped]
11
- def self.load(str)
12
- ::JSON.parse(str)
13
- end
14
-
15
- # @option value [untyped]
16
- #
17
- # @return [String]
18
- def self.dump(value)
19
- ::JSON.generate(value)
20
- end
8
+ AUDIT_LOG = "audit-log"
9
+ COMPANY_FEATURE_USAGE = "company-feature-usage"
21
10
  end
22
11
  end
23
12
  end
@@ -21,6 +21,7 @@ module Schematic
21
21
  field :soft_limit, -> { Integer }, optional: true, nullable: false
22
22
  field :usage, -> { Integer }, optional: true, nullable: false
23
23
  field :value_type, -> { Schematic::Types::EntitlementValueType }, optional: false, nullable: false
24
+ field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::WarningTier] }, optional: true, nullable: false
24
25
  end
25
26
  end
26
27
  end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PlanCatalogMembershipResponseData < Internal::Types::Model
6
+ field :id, -> { String }, optional: false, nullable: false
7
+ field :name, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
@@ -8,6 +8,7 @@ module Schematic
8
8
  field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false
9
9
  field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false
10
10
  field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: false, nullable: false
11
+ field :catalogs, -> { Internal::Types::Array[Schematic::Types::PlanCatalogMembershipResponseData] }, optional: true, nullable: false
11
12
  field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false
12
13
  field :company_count, -> { Integer }, optional: false, nullable: false
13
14
  field :company_id, -> { String }, optional: true, nullable: false
@@ -9,6 +9,7 @@ module Schematic
9
9
  field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false
10
10
  field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false
11
11
  field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: false, nullable: false
12
+ field :catalogs, -> { Internal::Types::Array[Schematic::Types::PlanCatalogMembershipResponseData] }, optional: true, nullable: false
12
13
  field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false
13
14
  field :company_count, -> { Integer }, optional: false, nullable: false
14
15
  field :company_id, -> { String }, optional: true, nullable: false
@@ -9,6 +9,7 @@ module Schematic
9
9
  field :billing_linked_resource, -> { Schematic::Types::BillingLinkedResourceResponseData }, optional: true, nullable: false
10
10
  field :billing_product, -> { Schematic::Types::BillingProductDetailResponseData }, optional: true, nullable: false
11
11
  field :billing_strategy, -> { Schematic::Types::BillingStrategy }, optional: false, nullable: false
12
+ field :catalogs, -> { Internal::Types::Array[Schematic::Types::PlanCatalogMembershipResponseData] }, optional: true, nullable: false
12
13
  field :charge_type, -> { Schematic::Types::ChargeType }, optional: false, nullable: false
13
14
  field :company_count, -> { Integer }, optional: false, nullable: false
14
15
  field :company_id, -> { String }, optional: true, nullable: false
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class PreviewSubscriptionDiscountResponseData < Internal::Types::Model
6
+ field :amount_off, -> { Integer }, optional: true, nullable: false
7
+ field :coupon_name, -> { String }, optional: false, nullable: false
8
+ field :currency, -> { String }, optional: true, nullable: false
9
+ field :customer_facing_code, -> { String }, optional: true, nullable: false
10
+ field :duration, -> { String }, optional: false, nullable: false
11
+ field :duration_in_months, -> { Integer }, optional: true, nullable: false
12
+ field :ended_at, -> { String }, optional: true, nullable: false
13
+ field :is_active, -> { Internal::Types::Boolean }, optional: false, nullable: false
14
+ field :percent_off, -> { Integer }, optional: true, nullable: false
15
+ field :promo_code_external_id, -> { String }, optional: true, nullable: false
16
+ field :started_at, -> { String }, optional: false, nullable: false
17
+ end
18
+ end
19
+ end
@@ -4,9 +4,11 @@ module Schematic
4
4
  module Types
5
5
  class PreviewSubscriptionFinanceResponseData < Internal::Types::Model
6
6
  field :amount_off, -> { Integer }, optional: false, nullable: false
7
+ field :discounts, -> { Internal::Types::Array[Schematic::Types::PreviewSubscriptionDiscountResponseData] }, optional: false, nullable: false
7
8
  field :due_now, -> { Integer }, optional: false, nullable: false
8
9
  field :new_charges, -> { Integer }, optional: false, nullable: false
9
10
  field :percent_off, -> { Integer }, optional: false, nullable: false
11
+ field :period_end, -> { String }, optional: false, nullable: false
10
12
  field :period_start, -> { String }, optional: false, nullable: false
11
13
  field :promo_code_applied, -> { Internal::Types::Boolean }, optional: false, nullable: false
12
14
  field :proration, -> { Integer }, optional: false, nullable: false
@@ -21,6 +21,7 @@ module Schematic
21
21
  field :soft_limit, -> { Integer }, optional: true, nullable: false
22
22
  field :usage, -> { Integer }, optional: true, nullable: false
23
23
  field :value_type, -> { Schematic::Types::RulesengineEntitlementValueType }, optional: false, nullable: false
24
+ field :warning_tiers, -> { Internal::Types::Array[Schematic::Types::RulesengineWarningTier] }, optional: true, nullable: false
24
25
  end
25
26
  end
26
27
  end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class RulesengineWarningTier < Internal::Types::Model
6
+ field :key, -> { String }, optional: false, nullable: false
7
+ field :value, -> { Integer }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
@@ -3,6 +3,8 @@
3
3
  module Schematic
4
4
  module Types
5
5
  class UpsertCompanyRequestBody < Internal::Types::Model
6
+ field :base_plan_id, -> { String }, optional: true, nullable: false
7
+ field :base_plan_price_id, -> { String }, optional: true, nullable: false
6
8
  field :id, -> { String }, optional: true, nullable: false
7
9
  field :keys, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: false
8
10
  field :last_seen_at, -> { String }, optional: true, nullable: false
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Schematic
4
+ module Types
5
+ class WarningTier < Internal::Types::Model
6
+ field :key, -> { String }, optional: false, nullable: false
7
+ field :value, -> { Integer }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
@@ -17,6 +17,7 @@ module Schematic
17
17
  COMPANY_UPDATED = "company.updated"
18
18
  CREDIT_LIMIT_REACHED = "credit.limit.reached"
19
19
  CREDIT_LIMIT_WARNING = "credit.limit.warning"
20
+ CREDIT_PURCHASE_SUCCESS = "credit.purchase.success"
20
21
  ENTITLEMENT_LIMIT_REACHED = "entitlement.limit.reached"
21
22
  ENTITLEMENT_LIMIT_WARNING = "entitlement.limit.warning"
22
23
  ENTITLEMENT_SOFT_LIMIT_REACHED = "entitlement.soft_limit.reached"
@@ -44,6 +45,7 @@ module Schematic
44
45
  USER_UPDATED = "user.updated"
45
46
  AUTO_TOPUP_HARD_FAILURE = "auto.topup.hard.failure"
46
47
  AUTO_TOPUP_RETRY_EXCEEDED = "auto.topup.retry.exceeded"
48
+ AUTO_TOPUP_SUCCESS = "auto.topup.success"
47
49
  end
48
50
  end
49
51
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Schematic
4
- VERSION = "1.4.9"
4
+ VERSION = "1.4.10"
5
5
  end
Binary file