Class: Supabase::Functions::Types::Response Deprecated

Inherits:
Struct
  • Object
show all
Defined in:
lib/supabase/functions/types.rb

Overview

Deprecated.

US-026: ‘Client#invoke` now returns parsed body directly. Pass `return_response: true` to Client#invoke to keep building this wrapper temporarily — both paths emit a one-time deprecation warning. Slated for removal in a future release. Read `data` directly from `invoke`’s return value instead.

Constant Summary collapse

DEPRECATION_MESSAGE =
"[DEPRECATION] Supabase::Functions::Types::Response is deprecated " \
"(US-026): Supabase::Functions::Client#invoke now returns the parsed " \
"body directly. Pass `return_response: true` only as a temporary " \
"compatibility shim — this struct will be removed in a future release."

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

._deprecation_warnedObject

Returns the value of attribute _deprecation_warned.



19
20
21
# File 'lib/supabase/functions/types.rb', line 19

def _deprecation_warned
  @_deprecation_warned
end

Instance Attribute Details

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



11
12
13
# File 'lib/supabase/functions/types.rb', line 11

def data
  @data
end

#headersObject

Returns the value of attribute headers

Returns:

  • (Object)

    the current value of headers



11
12
13
# File 'lib/supabase/functions/types.rb', line 11

def headers
  @headers
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



11
12
13
# File 'lib/supabase/functions/types.rb', line 11

def status
  @status
end

Class Method Details

.new(*args, **kwargs) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/supabase/functions/types.rb', line 22

def self.new(*args, **kwargs)
  unless _deprecation_warned
    Kernel.warn(DEPRECATION_MESSAGE)
    self._deprecation_warned = true
  end
  super
end