Class: Cadenya::Models::WidgetSpec
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Cadenya::Models::WidgetSpec
- Defined in:
- lib/cadenya/models/widget_spec.rb,
sig/cadenya/models/widget_spec.rbs
Instance Attribute Summary collapse
-
#agent_id ⇒ String
Agent this widget is bound to.
-
#origin_allowlist ⇒ Array<String>?
Web origins allowed to embed and use this widget, enforced at the edge on every browser request.
-
#variation_id ⇒ String?
Optional explicit variation pin.
Instance Method Summary collapse
-
#initialize(agent_id:, origin_allowlist: nil, variation_id: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see WidgetSpec for more details.
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(agent_id:, origin_allowlist: nil, variation_id: nil) ⇒ Object
Some parameter documentations has been truncated, see Cadenya::Models::WidgetSpec for more details.
WidgetSpec is the user-provided configuration for a widget.
|
|
# File 'lib/cadenya/models/widget_spec.rb', line 32
|
Instance Attribute Details
#agent_id ⇒ String
Agent this widget is bound to. Accepts the canonical agent_… form or the
external_id:<value> form. Sessions copy the agent at mint: re-pointing a
widget's agent affects new sessions only.
12 |
# File 'lib/cadenya/models/widget_spec.rb', line 12 required :agent_id, String, api_name: :agentId |
#origin_allowlist ⇒ Array<String>?
Web origins allowed to embed and use this widget, enforced at the edge on every browser request. Exact origins only (scheme + host + optional port), no paths, no wildcard subdomains.
20 |
# File 'lib/cadenya/models/widget_spec.rb', line 20 optional :origin_allowlist, Cadenya::Internal::Type::ArrayOf[String], api_name: :originAllowlist |
#variation_id ⇒ String?
Optional explicit variation pin. Must belong to the widget's agent. When set, every objective created through the widget runs this variation — bypassing the agent's variation_selection_mode (staged rollout: pin in production, follow in staging, promote by clearing). When unset, the agent's selection mode chooses per conversation.
30 |
# File 'lib/cadenya/models/widget_spec.rb', line 30 optional :variation_id, String, api_name: :variationId |
Instance Method Details
#to_hash ⇒ {
27 |
# File 'sig/cadenya/models/widget_spec.rbs', line 27
def to_hash: -> {
|