Class: Zavudev::Models::FunctionCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/zavudev/models/function_create_params.rb,
sig/zavudev/models/function_create_params.rbs

Overview

See Also:

  • Zavudev::Resources::Functions#create

Defined Under Namespace

Modules: MemoryMB, Runtime

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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

#initializeObject



67
# File 'sig/zavudev/models/function_create_params.rbs', line 67

def initialize: (

Instance Attribute Details

#dependenciesHash{Symbol=>String}?

npm dependencies. Keys are package names, values are semver ranges.

Parameters:

  • (::Hash[Symbol, String])

Returns:

  • (Hash{Symbol=>String}, nil)


25
# File 'lib/zavudev/models/function_create_params.rb', line 25

optional :dependencies, Zavudev::Internal::Type::HashOf[String]

#descriptionString?

Parameters:

  • (String)

Returns:

  • (String, nil)


30
# File 'lib/zavudev/models/function_create_params.rb', line 30

optional :description, String

#entrypointString?

Which file in files is the entry point. Defaults to index.ts.

Parameters:

  • (String)

Returns:

  • (String, nil)


36
# File 'lib/zavudev/models/function_create_params.rb', line 36

optional :entrypoint, String

#filesHash{Symbol=>String}?

The project's source files, keyed by path relative to the project root (e.g. index.ts, lib/orders.ts). Imports between them are resolved when the function is built, so a function can be split across as many files as it needs.

Paths must be relative and use forward slashes; .., node_modules/ and package.json are rejected. npm packages are not uploaded here — declare them under dependencies and Zavu installs them. Limits: 200 files and 900,000 bytes for the whole tree.

Parameters:

  • (::Hash[Symbol, String])

Returns:

  • (Hash{Symbol=>String}, nil)


49
# File 'lib/zavudev/models/function_create_params.rb', line 49

optional :files, Zavudev::Internal::Type::HashOf[String]

#http_enabledBoolean?

Whether to expose a public HTTPS URL for this function.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


55
# File 'lib/zavudev/models/function_create_params.rb', line 55

optional :http_enabled, Zavudev::Internal::Type::Boolean, api_name: :httpEnabled

#memory_mbInteger, ...



60
# File 'lib/zavudev/models/function_create_params.rb', line 60

optional :memory_mb, enum: -> { Zavudev::FunctionCreateParams::MemoryMB }, api_name: :memoryMb

#nameString

Parameters:

  • value (String)

Returns:

  • (String)


13
# File 'lib/zavudev/models/function_create_params.rb', line 13

required :name, String

#runtimeSymbol, ...

Runtime the function is deployed on.



66
# File 'lib/zavudev/models/function_create_params.rb', line 66

optional :runtime, enum: -> { Zavudev::FunctionCreateParams::Runtime }

#slugString

URL-safe identifier (lowercase, digits, hyphens). Must be unique per project.

Parameters:

  • value (String)

Returns:

  • (String)


19
# File 'lib/zavudev/models/function_create_params.rb', line 19

required :slug, String

#source_codeString?

Shortcut for a single-file function: exactly equivalent to sending files with one entry named after entrypoint (index.ts by default). Fully supported — use whichever fits. If both are sent, files wins.

Parameters:

  • (String)

Returns:

  • (String, nil)


74
# File 'lib/zavudev/models/function_create_params.rb', line 74

optional :source_code, String, api_name: :sourceCode

#timeout_secInteger?

Per-invocation timeout in seconds. Event and cron invocations are asynchronous, so a long timeout only bounds cost; a tool called during a live conversation holds up the reply, and a function exposed over HTTP is additionally bounded by the platform's HTTP response limit.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


83
# File 'lib/zavudev/models/function_create_params.rb', line 83

optional :timeout_sec, Integer, api_name: :timeoutSec

Class Method Details

.valuesArray<Integer>

Returns:

  • (Array<Integer>)


# File 'lib/zavudev/models/function_create_params.rb', line 121

Instance Method Details

#to_hash{

Returns:

  • ({)


82
# File 'sig/zavudev/models/function_create_params.rbs', line 82

def to_hash: -> {