Class: Cadenya::Models::WidgetSession

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/cadenya/models/widget_session.rb,
sig/cadenya/models/widget_session.rbs

Overview

See Also:

  • Cadenya::Resources::WidgetSessions#create

Defined Under Namespace

Modules: State Classes: Secret

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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(metadata:, spec:, state:, info: nil, secrets: nil) ⇒ Object

Some parameter documentations has been truncated, see Cadenya::Models::WidgetSession for more details.

WidgetSession is a delegated, narrowed credential for one visitor's use of a widget, minted server-to-server by the customer's backend. The session carries all customer-asserted context — tenant, subject, labels, secrets — and every conversation (objective) created through the widget inherits it. The bearer token returned at mint is short-lived and refreshed at the widget host; the session row is what makes revocation possible.

Parameters:



# File 'lib/cadenya/models/widget_session.rb', line 43

Instance Attribute Details

#infoCadenya::Models::WidgetSessionInfo?

WidgetSessionInfo provides read-only server-derived data about a session.



24
# File 'lib/cadenya/models/widget_session.rb', line 24

optional :info, -> { Cadenya::WidgetSessionInfo }

#metadataCadenya::Models::OperationMetadata

Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)



12
# File 'lib/cadenya/models/widget_session.rb', line 12

required :metadata, -> { Cadenya::OperationMetadata }

#secrets::Array[Cadenya::WidgetSession::Secret]? (readonly)

Returns the value of attribute secrets.

Returns:

  • (::Array[Cadenya::WidgetSession::Secret], nil)


23
24
25
# File 'sig/cadenya/models/widget_session.rbs', line 23

def secrets
  @secrets
end

#specCadenya::Models::WidgetSessionSpec

WidgetSessionSpec is the configuration of a session, fixed at mint.



18
# File 'lib/cadenya/models/widget_session.rb', line 18

required :spec, -> { Cadenya::WidgetSessionSpec }

#stateCadenya::Models::WidgetSession::state

Returns the value of attribute state.

Returns:

  • (Cadenya::Models::WidgetSession::state)


21
22
23
# File 'sig/cadenya/models/widget_session.rbs', line 21

def state
  @state
end

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/cadenya/models/widget_session.rb', line 77

Instance Method Details

#secrets=Object (readonly)



25
# File 'sig/cadenya/models/widget_session.rbs', line 25

def secrets=: (

#to_hash{

Returns:

  • ({)


37
# File 'sig/cadenya/models/widget_session.rbs', line 37

def to_hash: -> {