Class: Zavudev::Models::FunctionDeployParams

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

Overview

See Also:

  • Zavudev::Resources::Functions#deploy

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

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

#initialize(function_id:, dependencies: nil, entrypoint: nil, files: nil, source_code: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Zavudev::Models::FunctionDeployParams for more details.

Parameters:

  • function_id (String)
  • dependencies (Hash{Symbol=>String}) (defaults to: nil)

    New dependency map (replaces existing dependencies).

  • entrypoint (String) (defaults to: nil)

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

  • files (Hash{Symbol=>String}) (defaults to: nil)

    The project's source files, keyed by path relative to the project root (e.g. `in

  • source_code (String) (defaults to: nil)

    Shortcut for a single-file function: exactly equivalent to sending files with

  • request_options (Zavudev::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/zavudev/models/function_deploy_params.rb', line 48

Instance Attribute Details

#dependenciesHash{Symbol=>String}?

New dependency map (replaces existing dependencies).

Parameters:

  • (::Hash[Symbol, String])

Returns:

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


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

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

#entrypointString?

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

Parameters:

  • (String)

Returns:

  • (String, nil)


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

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)


38
# File 'lib/zavudev/models/function_deploy_params.rb', line 38

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

#function_idString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :function_id, 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)


46
# File 'lib/zavudev/models/function_deploy_params.rb', line 46

optional :source_code, String, api_name: :sourceCode

Instance Method Details

#to_hash{

Returns:

  • ({)


44
# File 'sig/zavudev/models/function_deploy_params.rbs', line 44

def to_hash: -> {