zavudev 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -0
- data/README.md +1 -1
- data/lib/zavudev/models/function_create_params.rb +36 -4
- data/lib/zavudev/models/function_create_response.rb +4 -2
- data/lib/zavudev/models/function_deploy_params.rb +31 -3
- data/lib/zavudev/models/function_deploy_response.rb +20 -3
- data/lib/zavudev/models/function_get_deployment_response.rb +20 -3
- data/lib/zavudev/models/function_retrieve_response.rb +4 -2
- data/lib/zavudev/models/function_update_params.rb +41 -3
- data/lib/zavudev/models/function_update_response.rb +4 -2
- data/lib/zavudev/models/invitation.rb +101 -8
- data/lib/zavudev/models/invitation_create_params.rb +34 -8
- data/lib/zavudev/models/invitation_list_params.rb +14 -0
- data/lib/zavudev/models/message.rb +14 -0
- data/lib/zavudev/models/message_type.rb +16 -0
- data/lib/zavudev/models/phone_number_pricing.rb +7 -2
- data/lib/zavudev/models/phone_number_search_available_params.rb +13 -1
- data/lib/zavudev/models/sender.rb +12 -1
- data/lib/zavudev/models/sender_create_params.rb +72 -4
- data/lib/zavudev/models/sender_update_params.rb +65 -1
- data/lib/zavudev/models/sender_webhook.rb +47 -1
- data/lib/zavudev/models/senders/agent/agent_tool.rb +19 -1
- data/lib/zavudev/models/senders/agent/tool_create_params.rb +7 -2
- data/lib/zavudev/models/senders/agent/tool_test_response.rb +90 -5
- data/lib/zavudev/models/senders/agent.rb +198 -1
- data/lib/zavudev/models/senders/agent_create_params.rb +188 -1
- data/lib/zavudev/models/senders/agent_execution.rb +26 -1
- data/lib/zavudev/models/senders/agent_update_params.rb +188 -1
- data/lib/zavudev/models/template.rb +1 -0
- data/lib/zavudev/models/template_create_params.rb +19 -9
- data/lib/zavudev/models/webhook_event.rb +31 -1
- data/lib/zavudev/resources/broadcasts.rb +20 -4
- data/lib/zavudev/resources/functions.rb +35 -10
- data/lib/zavudev/resources/invitations.rb +19 -6
- data/lib/zavudev/resources/messages.rb +13 -4
- data/lib/zavudev/resources/number_10dlc/brands.rb +5 -1
- data/lib/zavudev/resources/number_10dlc/campaigns.rb +6 -1
- data/lib/zavudev/resources/phone_numbers.rb +12 -3
- data/lib/zavudev/resources/senders/agent/executions.rb +5 -0
- data/lib/zavudev/resources/senders/agent/tools.rb +14 -2
- data/lib/zavudev/resources/senders/agent.rb +18 -2
- data/lib/zavudev/resources/senders.rb +15 -3
- data/lib/zavudev/version.rb +1 -1
- data/rbi/zavudev/models/function_create_params.rbi +50 -2
- data/rbi/zavudev/models/function_create_response.rbi +6 -2
- data/rbi/zavudev/models/function_deploy_params.rbi +42 -2
- data/rbi/zavudev/models/function_deploy_response.rbi +20 -0
- data/rbi/zavudev/models/function_get_deployment_response.rbi +20 -0
- data/rbi/zavudev/models/function_retrieve_response.rbi +6 -2
- data/rbi/zavudev/models/function_update_params.rbi +57 -2
- data/rbi/zavudev/models/function_update_response.rbi +6 -2
- data/rbi/zavudev/models/invitation.rbi +162 -8
- data/rbi/zavudev/models/invitation_create_params.rbi +54 -10
- data/rbi/zavudev/models/invitation_list_params.rbi +17 -0
- data/rbi/zavudev/models/message.rbi +28 -0
- data/rbi/zavudev/models/message_type.rbi +18 -0
- data/rbi/zavudev/models/phone_number_pricing.rbi +6 -2
- data/rbi/zavudev/models/phone_number_search_available_params.rbi +13 -0
- data/rbi/zavudev/models/sender.rbi +17 -0
- data/rbi/zavudev/models/sender_create_params.rbi +136 -4
- data/rbi/zavudev/models/sender_update_params.rbi +124 -0
- data/rbi/zavudev/models/sender_webhook.rbi +69 -0
- data/rbi/zavudev/models/senders/agent/agent_tool.rbi +26 -3
- data/rbi/zavudev/models/senders/agent/tool_create_params.rbi +6 -2
- data/rbi/zavudev/models/senders/agent/tool_test_response.rbi +130 -5
- data/rbi/zavudev/models/senders/agent.rbi +320 -3
- data/rbi/zavudev/models/senders/agent_create_params.rbi +304 -0
- data/rbi/zavudev/models/senders/agent_execution.rbi +31 -3
- data/rbi/zavudev/models/senders/agent_update_params.rbi +304 -0
- data/rbi/zavudev/models/template.rbi +5 -0
- data/rbi/zavudev/models/template_create_params.rbi +27 -6
- data/rbi/zavudev/models/webhook_event.rbi +35 -1
- data/rbi/zavudev/resources/broadcasts.rbi +20 -4
- data/rbi/zavudev/resources/functions.rbi +62 -6
- data/rbi/zavudev/resources/invitations.rbi +37 -8
- data/rbi/zavudev/resources/messages.rbi +12 -3
- data/rbi/zavudev/resources/number_10dlc/brands.rbi +5 -1
- data/rbi/zavudev/resources/number_10dlc/campaigns.rbi +6 -1
- data/rbi/zavudev/resources/phone_numbers.rbi +10 -2
- data/rbi/zavudev/resources/senders/agent/executions.rbi +5 -0
- data/rbi/zavudev/resources/senders/agent/tools.rbi +13 -2
- data/rbi/zavudev/resources/senders/agent.rbi +16 -0
- data/rbi/zavudev/resources/senders.rbi +56 -2
- data/sig/zavudev/models/function_create_params.rbs +14 -0
- data/sig/zavudev/models/function_deploy_params.rbs +14 -0
- data/sig/zavudev/models/function_deploy_response.rbs +5 -0
- data/sig/zavudev/models/function_get_deployment_response.rbs +5 -0
- data/sig/zavudev/models/function_update_params.rbs +21 -0
- data/sig/zavudev/models/invitation.rbs +58 -2
- data/sig/zavudev/models/invitation_create_params.rbs +2 -1
- data/sig/zavudev/models/invitation_list_params.rbs +3 -1
- data/sig/zavudev/models/message_type.rbs +4 -0
- data/sig/zavudev/models/phone_number_search_available_params.rbs +7 -0
- data/sig/zavudev/models/sender.rbs +7 -0
- data/sig/zavudev/models/sender_create_params.rbs +35 -0
- data/sig/zavudev/models/sender_update_params.rbs +35 -0
- data/sig/zavudev/models/sender_webhook.rbs +17 -0
- data/sig/zavudev/models/senders/agent/agent_tool.rbs +10 -3
- data/sig/zavudev/models/senders/agent/tool_test_response.rbs +68 -4
- data/sig/zavudev/models/senders/agent.rbs +161 -3
- data/sig/zavudev/models/senders/agent_create_params.rbs +152 -1
- data/sig/zavudev/models/senders/agent_execution.rbs +13 -3
- data/sig/zavudev/models/senders/agent_update_params.rbs +152 -1
- data/sig/zavudev/models/template.rbs +2 -1
- data/sig/zavudev/models/template_create_params.rbs +9 -6
- data/sig/zavudev/models/webhook_event.rbs +10 -0
- data/sig/zavudev/resources/functions.rbs +7 -0
- data/sig/zavudev/resources/phone_numbers.rbs +1 -0
- data/sig/zavudev/resources/senders/agent.rbs +2 -0
- data/sig/zavudev/resources/senders.rbs +6 -0
- metadata +2 -2
|
@@ -16,9 +16,12 @@ module Zavudev
|
|
|
16
16
|
# @return [Zavudev::Resources::Senders::Agent::KnowledgeBases]
|
|
17
17
|
attr_reader :knowledge_bases
|
|
18
18
|
|
|
19
|
+
# Some parameter documentations has been truncated, see
|
|
20
|
+
# {Zavudev::Models::Senders::AgentCreateParams} for more details.
|
|
21
|
+
#
|
|
19
22
|
# Create an AI agent for a sender. Each sender can have at most one agent.
|
|
20
23
|
#
|
|
21
|
-
# @overload create(sender_id, model:, name:, provider:, system_prompt:, api_key: nil, context_window_messages: nil, include_contact_metadata: nil, max_tokens: nil, temperature: nil, trigger_on_channels: nil, trigger_on_message_types: nil, request_options: {})
|
|
24
|
+
# @overload create(sender_id, model:, name:, provider:, system_prompt:, api_key: nil, context_window_messages: nil, include_contact_metadata: nil, max_tokens: nil, temperature: nil, trigger_on_channels: nil, trigger_on_message_types: nil, voice: nil, request_options: {})
|
|
22
25
|
#
|
|
23
26
|
# @param sender_id [String]
|
|
24
27
|
#
|
|
@@ -44,6 +47,8 @@ module Zavudev
|
|
|
44
47
|
#
|
|
45
48
|
# @param trigger_on_message_types [Array<String>]
|
|
46
49
|
#
|
|
50
|
+
# @param voice [Zavudev::Models::Senders::AgentCreateParams::Voice] Voice Agent configuration. Enable this to let the agent answer and place phone c
|
|
51
|
+
#
|
|
47
52
|
# @param request_options [Zavudev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
48
53
|
#
|
|
49
54
|
# @return [Zavudev::Models::Senders::AgentResponse]
|
|
@@ -79,9 +84,12 @@ module Zavudev
|
|
|
79
84
|
)
|
|
80
85
|
end
|
|
81
86
|
|
|
87
|
+
# Some parameter documentations has been truncated, see
|
|
88
|
+
# {Zavudev::Models::Senders::AgentUpdateParams} for more details.
|
|
89
|
+
#
|
|
82
90
|
# Update an AI agent's configuration.
|
|
83
91
|
#
|
|
84
|
-
# @overload update(sender_id, api_key: nil, context_window_messages: nil, enabled: nil, include_contact_metadata: nil, max_tokens: nil, model: nil, name: nil, provider: nil, system_prompt: nil, temperature: nil, trigger_on_channels: nil, trigger_on_message_types: nil, request_options: {})
|
|
92
|
+
# @overload update(sender_id, api_key: nil, context_window_messages: nil, enabled: nil, include_contact_metadata: nil, max_tokens: nil, model: nil, name: nil, provider: nil, system_prompt: nil, temperature: nil, trigger_on_channels: nil, trigger_on_message_types: nil, voice: nil, request_options: {})
|
|
85
93
|
#
|
|
86
94
|
# @param sender_id [String]
|
|
87
95
|
#
|
|
@@ -109,6 +117,8 @@ module Zavudev
|
|
|
109
117
|
#
|
|
110
118
|
# @param trigger_on_message_types [Array<String>]
|
|
111
119
|
#
|
|
120
|
+
# @param voice [Zavudev::Models::Senders::AgentUpdateParams::Voice] Voice Agent configuration. Patch this object to enable voice, change the greetin
|
|
121
|
+
#
|
|
112
122
|
# @param request_options [Zavudev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
113
123
|
#
|
|
114
124
|
# @return [Zavudev::Models::Senders::AgentResponse]
|
|
@@ -146,6 +156,12 @@ module Zavudev
|
|
|
146
156
|
|
|
147
157
|
# Get statistics for an AI agent including invocations, tokens, and costs.
|
|
148
158
|
#
|
|
159
|
+
# Covers the messaging channels only. Voice calls are not counted here: a call is
|
|
160
|
+
# a multi-turn conversation rather than one inbound message and one reply, so it
|
|
161
|
+
# is recorded as a call, not an execution. An agent that only answers phone calls
|
|
162
|
+
# reports zeros on every field. Use `GET /v1/calls` for voice activity, duration,
|
|
163
|
+
# and cost.
|
|
164
|
+
#
|
|
149
165
|
# @overload stats(sender_id, request_options: {})
|
|
150
166
|
#
|
|
151
167
|
# @param sender_id [String]
|
|
@@ -14,7 +14,7 @@ module Zavudev
|
|
|
14
14
|
#
|
|
15
15
|
# Create sender
|
|
16
16
|
#
|
|
17
|
-
# @overload create(name:, email_address: nil, email_domain_id: nil, email_from_name: nil, email_receiving_enabled: nil, phone_number: nil, set_as_default: nil, webhook_events: nil, webhook_url: nil, request_options: {})
|
|
17
|
+
# @overload create(name:, email_address: nil, email_domain_id: nil, email_from_name: nil, email_receiving_enabled: nil, enable_sms_oneway: nil, enable_voice: nil, phone_number: nil, set_as_default: nil, webhook_events: nil, webhook_signature_version: nil, webhook_url: nil, request_options: {})
|
|
18
18
|
#
|
|
19
19
|
# @param name [String]
|
|
20
20
|
#
|
|
@@ -26,12 +26,18 @@ module Zavudev
|
|
|
26
26
|
#
|
|
27
27
|
# @param email_receiving_enabled [Boolean] Enable inbound email receiving on this sender. Requires a verified MX record on
|
|
28
28
|
#
|
|
29
|
-
# @param
|
|
29
|
+
# @param enable_sms_oneway [Boolean] Enable the one-way SMS channel (`sms_oneway`). Needs nothing else — no phone num
|
|
30
|
+
#
|
|
31
|
+
# @param enable_voice [Boolean] Let this sender place and answer phone calls. Requires `phoneNumber`; enabling i
|
|
32
|
+
#
|
|
33
|
+
# @param phone_number [String] Phone number in E.164 format, and it must be a number your project already owns
|
|
30
34
|
#
|
|
31
35
|
# @param set_as_default [Boolean]
|
|
32
36
|
#
|
|
33
37
|
# @param webhook_events [Array<Symbol, Zavudev::Models::WebhookEvent>] Events to subscribe to.
|
|
34
38
|
#
|
|
39
|
+
# @param webhook_signature_version [Symbol, Zavudev::Models::SenderCreateParams::WebhookSignatureVersion] Which `X-Zavu-Signature` scheme this receiver is sent.
|
|
40
|
+
#
|
|
35
41
|
# @param webhook_url [String] HTTPS URL for webhook events.
|
|
36
42
|
#
|
|
37
43
|
# @param request_options [Zavudev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
@@ -74,7 +80,7 @@ module Zavudev
|
|
|
74
80
|
#
|
|
75
81
|
# Update sender
|
|
76
82
|
#
|
|
77
|
-
# @overload update(sender_id, email_address: nil, email_catch_all_enabled: nil, email_domain_id: nil, email_from_name: nil, email_receiving_enabled: nil, name: nil, set_as_default: nil, webhook_active: nil, webhook_events: nil, webhook_url: nil, request_options: {})
|
|
83
|
+
# @overload update(sender_id, email_address: nil, email_catch_all_enabled: nil, email_domain_id: nil, email_from_name: nil, email_receiving_enabled: nil, enable_sms_oneway: nil, enable_voice: nil, name: nil, set_as_default: nil, webhook_active: nil, webhook_events: nil, webhook_signature_version: nil, webhook_url: nil, request_options: {})
|
|
78
84
|
#
|
|
79
85
|
# @param sender_id [String]
|
|
80
86
|
#
|
|
@@ -88,6 +94,10 @@ module Zavudev
|
|
|
88
94
|
#
|
|
89
95
|
# @param email_receiving_enabled [Boolean] Enable or disable inbound email receiving for this sender.
|
|
90
96
|
#
|
|
97
|
+
# @param enable_sms_oneway [Boolean] Turn the one-way SMS channel on or off. Enabling needs nothing else and takes ef
|
|
98
|
+
#
|
|
99
|
+
# @param enable_voice [Boolean] Turn the voice channel on or off. The sender must already have a phone number pr
|
|
100
|
+
#
|
|
91
101
|
# @param name [String]
|
|
92
102
|
#
|
|
93
103
|
# @param set_as_default [Boolean]
|
|
@@ -96,6 +106,8 @@ module Zavudev
|
|
|
96
106
|
#
|
|
97
107
|
# @param webhook_events [Array<Symbol, Zavudev::Models::WebhookEvent>] Events to subscribe to.
|
|
98
108
|
#
|
|
109
|
+
# @param webhook_signature_version [Symbol, Zavudev::Models::SenderUpdateParams::WebhookSignatureVersion] Which `X-Zavu-Signature` scheme this receiver is sent.
|
|
110
|
+
#
|
|
99
111
|
# @param webhook_url [String, nil] HTTPS URL for webhook events. Set to null to remove webhook.
|
|
100
112
|
#
|
|
101
113
|
# @param request_options [Zavudev::RequestOptions, Hash{Symbol=>Object}, nil]
|
data/lib/zavudev/version.rb
CHANGED
|
@@ -31,6 +31,27 @@ module Zavudev
|
|
|
31
31
|
sig { params(description: String).void }
|
|
32
32
|
attr_writer :description
|
|
33
33
|
|
|
34
|
+
# Which file in `files` is the entry point. Defaults to `index.ts`.
|
|
35
|
+
sig { returns(T.nilable(String)) }
|
|
36
|
+
attr_reader :entrypoint
|
|
37
|
+
|
|
38
|
+
sig { params(entrypoint: String).void }
|
|
39
|
+
attr_writer :entrypoint
|
|
40
|
+
|
|
41
|
+
# The project's source files, keyed by path relative to the project root (e.g.
|
|
42
|
+
# `index.ts`, `lib/orders.ts`). Imports between them are resolved when the
|
|
43
|
+
# function is built, so a function can be split across as many files as it needs.
|
|
44
|
+
#
|
|
45
|
+
# Paths must be relative and use forward slashes; `..`, `node_modules/` and
|
|
46
|
+
# `package.json` are rejected. npm packages are not uploaded here — declare them
|
|
47
|
+
# under `dependencies` and Zavu installs them. Limits: 200 files and 900,000 bytes
|
|
48
|
+
# for the whole tree.
|
|
49
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
50
|
+
attr_reader :files
|
|
51
|
+
|
|
52
|
+
sig { params(files: T::Hash[Symbol, String]).void }
|
|
53
|
+
attr_writer :files
|
|
54
|
+
|
|
34
55
|
# Whether to expose a public HTTPS URL for this function.
|
|
35
56
|
sig { returns(T.nilable(T::Boolean)) }
|
|
36
57
|
attr_reader :http_enabled
|
|
@@ -61,13 +82,19 @@ module Zavudev
|
|
|
61
82
|
end
|
|
62
83
|
attr_writer :runtime
|
|
63
84
|
|
|
64
|
-
#
|
|
85
|
+
# Shortcut for a single-file function: exactly equivalent to sending `files` with
|
|
86
|
+
# one entry named after `entrypoint` (`index.ts` by default). Fully supported —
|
|
87
|
+
# use whichever fits. If both are sent, `files` wins.
|
|
65
88
|
sig { returns(T.nilable(String)) }
|
|
66
89
|
attr_reader :source_code
|
|
67
90
|
|
|
68
91
|
sig { params(source_code: String).void }
|
|
69
92
|
attr_writer :source_code
|
|
70
93
|
|
|
94
|
+
# Per-invocation timeout in seconds. Event and cron invocations are asynchronous,
|
|
95
|
+
# so a long timeout only bounds cost; a tool called during a live conversation
|
|
96
|
+
# holds up the reply, and a function exposed over HTTP is additionally bounded by
|
|
97
|
+
# the platform's HTTP response limit.
|
|
71
98
|
sig { returns(T.nilable(Integer)) }
|
|
72
99
|
attr_reader :timeout_sec
|
|
73
100
|
|
|
@@ -80,6 +107,8 @@ module Zavudev
|
|
|
80
107
|
slug: String,
|
|
81
108
|
dependencies: T::Hash[Symbol, String],
|
|
82
109
|
description: String,
|
|
110
|
+
entrypoint: String,
|
|
111
|
+
files: T::Hash[Symbol, String],
|
|
83
112
|
http_enabled: T::Boolean,
|
|
84
113
|
memory_mb: Zavudev::FunctionCreateParams::MemoryMB::OrInteger,
|
|
85
114
|
runtime: Zavudev::FunctionCreateParams::Runtime::OrSymbol,
|
|
@@ -95,13 +124,30 @@ module Zavudev
|
|
|
95
124
|
# npm dependencies. Keys are package names, values are semver ranges.
|
|
96
125
|
dependencies: nil,
|
|
97
126
|
description: nil,
|
|
127
|
+
# Which file in `files` is the entry point. Defaults to `index.ts`.
|
|
128
|
+
entrypoint: nil,
|
|
129
|
+
# The project's source files, keyed by path relative to the project root (e.g.
|
|
130
|
+
# `index.ts`, `lib/orders.ts`). Imports between them are resolved when the
|
|
131
|
+
# function is built, so a function can be split across as many files as it needs.
|
|
132
|
+
#
|
|
133
|
+
# Paths must be relative and use forward slashes; `..`, `node_modules/` and
|
|
134
|
+
# `package.json` are rejected. npm packages are not uploaded here — declare them
|
|
135
|
+
# under `dependencies` and Zavu installs them. Limits: 200 files and 900,000 bytes
|
|
136
|
+
# for the whole tree.
|
|
137
|
+
files: nil,
|
|
98
138
|
# Whether to expose a public HTTPS URL for this function.
|
|
99
139
|
http_enabled: nil,
|
|
100
140
|
memory_mb: nil,
|
|
101
141
|
# Runtime the function is deployed on.
|
|
102
142
|
runtime: nil,
|
|
103
|
-
#
|
|
143
|
+
# Shortcut for a single-file function: exactly equivalent to sending `files` with
|
|
144
|
+
# one entry named after `entrypoint` (`index.ts` by default). Fully supported —
|
|
145
|
+
# use whichever fits. If both are sent, `files` wins.
|
|
104
146
|
source_code: nil,
|
|
147
|
+
# Per-invocation timeout in seconds. Event and cron invocations are asynchronous,
|
|
148
|
+
# so a long timeout only bounds cost; a tool called during a live conversation
|
|
149
|
+
# holds up the reply, and a function exposed over HTTP is additionally bounded by
|
|
150
|
+
# the platform's HTTP response limit.
|
|
105
151
|
timeout_sec: nil,
|
|
106
152
|
request_options: {}
|
|
107
153
|
)
|
|
@@ -114,6 +160,8 @@ module Zavudev
|
|
|
114
160
|
slug: String,
|
|
115
161
|
dependencies: T::Hash[Symbol, String],
|
|
116
162
|
description: String,
|
|
163
|
+
entrypoint: String,
|
|
164
|
+
files: T::Hash[Symbol, String],
|
|
117
165
|
http_enabled: T::Boolean,
|
|
118
166
|
memory_mb: Zavudev::FunctionCreateParams::MemoryMB::OrInteger,
|
|
119
167
|
runtime: Zavudev::FunctionCreateParams::Runtime::OrSymbol,
|
|
@@ -108,7 +108,9 @@ module Zavudev
|
|
|
108
108
|
sig { returns(T.nilable(String)) }
|
|
109
109
|
attr_accessor :description
|
|
110
110
|
|
|
111
|
-
# HTTPS endpoint
|
|
111
|
+
# HTTPS endpoint, present only while httpEnabled is true. Null otherwise,
|
|
112
|
+
# including for a function that was previously exposed — the stored URL stops
|
|
113
|
+
# serving the moment HTTP is turned off, so it is never returned.
|
|
112
114
|
sig { returns(T.nilable(String)) }
|
|
113
115
|
attr_accessor :public_url
|
|
114
116
|
|
|
@@ -157,7 +159,9 @@ module Zavudev
|
|
|
157
159
|
# ID of the deployment currently serving traffic.
|
|
158
160
|
active_deployment_id: nil,
|
|
159
161
|
description: nil,
|
|
160
|
-
# HTTPS endpoint
|
|
162
|
+
# HTTPS endpoint, present only while httpEnabled is true. Null otherwise,
|
|
163
|
+
# including for a function that was previously exposed — the stored URL stops
|
|
164
|
+
# serving the moment HTTP is turned off, so it is never returned.
|
|
161
165
|
public_url: nil
|
|
162
166
|
)
|
|
163
167
|
end
|
|
@@ -21,7 +21,30 @@ module Zavudev
|
|
|
21
21
|
sig { params(dependencies: T::Hash[Symbol, String]).void }
|
|
22
22
|
attr_writer :dependencies
|
|
23
23
|
|
|
24
|
-
#
|
|
24
|
+
# Which file in `files` is the entry point. Defaults to `index.ts`.
|
|
25
|
+
sig { returns(T.nilable(String)) }
|
|
26
|
+
attr_reader :entrypoint
|
|
27
|
+
|
|
28
|
+
sig { params(entrypoint: String).void }
|
|
29
|
+
attr_writer :entrypoint
|
|
30
|
+
|
|
31
|
+
# The project's source files, keyed by path relative to the project root (e.g.
|
|
32
|
+
# `index.ts`, `lib/orders.ts`). Imports between them are resolved when the
|
|
33
|
+
# function is built, so a function can be split across as many files as it needs.
|
|
34
|
+
#
|
|
35
|
+
# Paths must be relative and use forward slashes; `..`, `node_modules/` and
|
|
36
|
+
# `package.json` are rejected. npm packages are not uploaded here — declare them
|
|
37
|
+
# under `dependencies` and Zavu installs them. Limits: 200 files and 900,000 bytes
|
|
38
|
+
# for the whole tree.
|
|
39
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
40
|
+
attr_reader :files
|
|
41
|
+
|
|
42
|
+
sig { params(files: T::Hash[Symbol, String]).void }
|
|
43
|
+
attr_writer :files
|
|
44
|
+
|
|
45
|
+
# Shortcut for a single-file function: exactly equivalent to sending `files` with
|
|
46
|
+
# one entry named after `entrypoint` (`index.ts` by default). Fully supported —
|
|
47
|
+
# use whichever fits. If both are sent, `files` wins.
|
|
25
48
|
sig { returns(T.nilable(String)) }
|
|
26
49
|
attr_reader :source_code
|
|
27
50
|
|
|
@@ -32,6 +55,8 @@ module Zavudev
|
|
|
32
55
|
params(
|
|
33
56
|
function_id: String,
|
|
34
57
|
dependencies: T::Hash[Symbol, String],
|
|
58
|
+
entrypoint: String,
|
|
59
|
+
files: T::Hash[Symbol, String],
|
|
35
60
|
source_code: String,
|
|
36
61
|
request_options: Zavudev::RequestOptions::OrHash
|
|
37
62
|
).returns(T.attached_class)
|
|
@@ -40,7 +65,20 @@ module Zavudev
|
|
|
40
65
|
function_id:,
|
|
41
66
|
# New dependency map (replaces existing dependencies).
|
|
42
67
|
dependencies: nil,
|
|
43
|
-
#
|
|
68
|
+
# Which file in `files` is the entry point. Defaults to `index.ts`.
|
|
69
|
+
entrypoint: nil,
|
|
70
|
+
# The project's source files, keyed by path relative to the project root (e.g.
|
|
71
|
+
# `index.ts`, `lib/orders.ts`). Imports between them are resolved when the
|
|
72
|
+
# function is built, so a function can be split across as many files as it needs.
|
|
73
|
+
#
|
|
74
|
+
# Paths must be relative and use forward slashes; `..`, `node_modules/` and
|
|
75
|
+
# `package.json` are rejected. npm packages are not uploaded here — declare them
|
|
76
|
+
# under `dependencies` and Zavu installs them. Limits: 200 files and 900,000 bytes
|
|
77
|
+
# for the whole tree.
|
|
78
|
+
files: nil,
|
|
79
|
+
# Shortcut for a single-file function: exactly equivalent to sending `files` with
|
|
80
|
+
# one entry named after `entrypoint` (`index.ts` by default). Fully supported —
|
|
81
|
+
# use whichever fits. If both are sent, `files` wins.
|
|
44
82
|
source_code: nil,
|
|
45
83
|
request_options: {}
|
|
46
84
|
)
|
|
@@ -51,6 +89,8 @@ module Zavudev
|
|
|
51
89
|
{
|
|
52
90
|
function_id: String,
|
|
53
91
|
dependencies: T::Hash[Symbol, String],
|
|
92
|
+
entrypoint: String,
|
|
93
|
+
files: T::Hash[Symbol, String],
|
|
54
94
|
source_code: String,
|
|
55
95
|
request_options: Zavudev::RequestOptions
|
|
56
96
|
}
|
|
@@ -69,6 +69,15 @@ module Zavudev
|
|
|
69
69
|
sig { returns(Integer) }
|
|
70
70
|
attr_accessor :version
|
|
71
71
|
|
|
72
|
+
# What the build printed: dependency installation, the bundler's output, and the
|
|
73
|
+
# compiler's message when it failed. Returned when fetching a single deployment,
|
|
74
|
+
# omitted from the list. Read this first when a deploy fails — `errorMessage` is
|
|
75
|
+
# often the outer wrapper's summary, and the line that names the broken import or
|
|
76
|
+
# the syntax error is here.
|
|
77
|
+
sig { returns(T.nilable(String)) }
|
|
78
|
+
attr_accessor :build_logs
|
|
79
|
+
|
|
80
|
+
# Size of the built bundle in bytes. Null until the build finishes.
|
|
72
81
|
sig { returns(T.nilable(Integer)) }
|
|
73
82
|
attr_accessor :bundle_bytes
|
|
74
83
|
|
|
@@ -79,6 +88,7 @@ module Zavudev
|
|
|
79
88
|
sig { returns(T.nilable(String)) }
|
|
80
89
|
attr_accessor :error_message
|
|
81
90
|
|
|
91
|
+
# Total size of the deployed source tree in bytes.
|
|
82
92
|
sig { returns(T.nilable(Integer)) }
|
|
83
93
|
attr_accessor :source_code_bytes
|
|
84
94
|
|
|
@@ -90,6 +100,7 @@ module Zavudev
|
|
|
90
100
|
status:
|
|
91
101
|
Zavudev::Models::FunctionDeployResponse::Deployment::Status::OrSymbol,
|
|
92
102
|
version: Integer,
|
|
103
|
+
build_logs: T.nilable(String),
|
|
93
104
|
bundle_bytes: T.nilable(Integer),
|
|
94
105
|
deployed_at: T.nilable(Time),
|
|
95
106
|
error_message: T.nilable(String),
|
|
@@ -104,10 +115,18 @@ module Zavudev
|
|
|
104
115
|
status:,
|
|
105
116
|
# Monotonically increasing deployment version, starting at 1.
|
|
106
117
|
version:,
|
|
118
|
+
# What the build printed: dependency installation, the bundler's output, and the
|
|
119
|
+
# compiler's message when it failed. Returned when fetching a single deployment,
|
|
120
|
+
# omitted from the list. Read this first when a deploy fails — `errorMessage` is
|
|
121
|
+
# often the outer wrapper's summary, and the line that names the broken import or
|
|
122
|
+
# the syntax error is here.
|
|
123
|
+
build_logs: nil,
|
|
124
|
+
# Size of the built bundle in bytes. Null until the build finishes.
|
|
107
125
|
bundle_bytes: nil,
|
|
108
126
|
deployed_at: nil,
|
|
109
127
|
# Failure reason when status is 'failed'.
|
|
110
128
|
error_message: nil,
|
|
129
|
+
# Total size of the deployed source tree in bytes.
|
|
111
130
|
source_code_bytes: nil
|
|
112
131
|
)
|
|
113
132
|
end
|
|
@@ -121,6 +140,7 @@ module Zavudev
|
|
|
121
140
|
status:
|
|
122
141
|
Zavudev::Models::FunctionDeployResponse::Deployment::Status::TaggedSymbol,
|
|
123
142
|
version: Integer,
|
|
143
|
+
build_logs: T.nilable(String),
|
|
124
144
|
bundle_bytes: T.nilable(Integer),
|
|
125
145
|
deployed_at: T.nilable(Time),
|
|
126
146
|
error_message: T.nilable(String),
|
|
@@ -74,6 +74,15 @@ module Zavudev
|
|
|
74
74
|
sig { returns(Integer) }
|
|
75
75
|
attr_accessor :version
|
|
76
76
|
|
|
77
|
+
# What the build printed: dependency installation, the bundler's output, and the
|
|
78
|
+
# compiler's message when it failed. Returned when fetching a single deployment,
|
|
79
|
+
# omitted from the list. Read this first when a deploy fails — `errorMessage` is
|
|
80
|
+
# often the outer wrapper's summary, and the line that names the broken import or
|
|
81
|
+
# the syntax error is here.
|
|
82
|
+
sig { returns(T.nilable(String)) }
|
|
83
|
+
attr_accessor :build_logs
|
|
84
|
+
|
|
85
|
+
# Size of the built bundle in bytes. Null until the build finishes.
|
|
77
86
|
sig { returns(T.nilable(Integer)) }
|
|
78
87
|
attr_accessor :bundle_bytes
|
|
79
88
|
|
|
@@ -84,6 +93,7 @@ module Zavudev
|
|
|
84
93
|
sig { returns(T.nilable(String)) }
|
|
85
94
|
attr_accessor :error_message
|
|
86
95
|
|
|
96
|
+
# Total size of the deployed source tree in bytes.
|
|
87
97
|
sig { returns(T.nilable(Integer)) }
|
|
88
98
|
attr_accessor :source_code_bytes
|
|
89
99
|
|
|
@@ -95,6 +105,7 @@ module Zavudev
|
|
|
95
105
|
status:
|
|
96
106
|
Zavudev::Models::FunctionGetDeploymentResponse::Deployment::Status::OrSymbol,
|
|
97
107
|
version: Integer,
|
|
108
|
+
build_logs: T.nilable(String),
|
|
98
109
|
bundle_bytes: T.nilable(Integer),
|
|
99
110
|
deployed_at: T.nilable(Time),
|
|
100
111
|
error_message: T.nilable(String),
|
|
@@ -109,10 +120,18 @@ module Zavudev
|
|
|
109
120
|
status:,
|
|
110
121
|
# Monotonically increasing deployment version, starting at 1.
|
|
111
122
|
version:,
|
|
123
|
+
# What the build printed: dependency installation, the bundler's output, and the
|
|
124
|
+
# compiler's message when it failed. Returned when fetching a single deployment,
|
|
125
|
+
# omitted from the list. Read this first when a deploy fails — `errorMessage` is
|
|
126
|
+
# often the outer wrapper's summary, and the line that names the broken import or
|
|
127
|
+
# the syntax error is here.
|
|
128
|
+
build_logs: nil,
|
|
129
|
+
# Size of the built bundle in bytes. Null until the build finishes.
|
|
112
130
|
bundle_bytes: nil,
|
|
113
131
|
deployed_at: nil,
|
|
114
132
|
# Failure reason when status is 'failed'.
|
|
115
133
|
error_message: nil,
|
|
134
|
+
# Total size of the deployed source tree in bytes.
|
|
116
135
|
source_code_bytes: nil
|
|
117
136
|
)
|
|
118
137
|
end
|
|
@@ -126,6 +145,7 @@ module Zavudev
|
|
|
126
145
|
status:
|
|
127
146
|
Zavudev::Models::FunctionGetDeploymentResponse::Deployment::Status::TaggedSymbol,
|
|
128
147
|
version: Integer,
|
|
148
|
+
build_logs: T.nilable(String),
|
|
129
149
|
bundle_bytes: T.nilable(Integer),
|
|
130
150
|
deployed_at: T.nilable(Time),
|
|
131
151
|
error_message: T.nilable(String),
|
|
@@ -108,7 +108,9 @@ module Zavudev
|
|
|
108
108
|
sig { returns(T.nilable(String)) }
|
|
109
109
|
attr_accessor :description
|
|
110
110
|
|
|
111
|
-
# HTTPS endpoint
|
|
111
|
+
# HTTPS endpoint, present only while httpEnabled is true. Null otherwise,
|
|
112
|
+
# including for a function that was previously exposed — the stored URL stops
|
|
113
|
+
# serving the moment HTTP is turned off, so it is never returned.
|
|
112
114
|
sig { returns(T.nilable(String)) }
|
|
113
115
|
attr_accessor :public_url
|
|
114
116
|
|
|
@@ -157,7 +159,9 @@ module Zavudev
|
|
|
157
159
|
# ID of the deployment currently serving traffic.
|
|
158
160
|
active_deployment_id: nil,
|
|
159
161
|
description: nil,
|
|
160
|
-
# HTTPS endpoint
|
|
162
|
+
# HTTPS endpoint, present only while httpEnabled is true. Null otherwise,
|
|
163
|
+
# including for a function that was previously exposed — the stored URL stops
|
|
164
|
+
# serving the moment HTTP is turned off, so it is never returned.
|
|
161
165
|
public_url: nil
|
|
162
166
|
)
|
|
163
167
|
end
|
|
@@ -21,7 +21,39 @@ module Zavudev
|
|
|
21
21
|
sig { params(dependencies: T::Hash[Symbol, String]).void }
|
|
22
22
|
attr_writer :dependencies
|
|
23
23
|
|
|
24
|
-
#
|
|
24
|
+
# Which file in `files` is the entry point. Defaults to `index.ts`.
|
|
25
|
+
sig { returns(T.nilable(String)) }
|
|
26
|
+
attr_reader :entrypoint
|
|
27
|
+
|
|
28
|
+
sig { params(entrypoint: String).void }
|
|
29
|
+
attr_writer :entrypoint
|
|
30
|
+
|
|
31
|
+
# The project's source files, keyed by path relative to the project root (e.g.
|
|
32
|
+
# `index.ts`, `lib/orders.ts`). Imports between them are resolved when the
|
|
33
|
+
# function is built, so a function can be split across as many files as it needs.
|
|
34
|
+
#
|
|
35
|
+
# Paths must be relative and use forward slashes; `..`, `node_modules/` and
|
|
36
|
+
# `package.json` are rejected. npm packages are not uploaded here — declare them
|
|
37
|
+
# under `dependencies` and Zavu installs them. Limits: 200 files and 900,000 bytes
|
|
38
|
+
# for the whole tree.
|
|
39
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
40
|
+
attr_reader :files
|
|
41
|
+
|
|
42
|
+
sig { params(files: T::Hash[Symbol, String]).void }
|
|
43
|
+
attr_writer :files
|
|
44
|
+
|
|
45
|
+
# Expose the function on its public HTTPS URL, or take it down. Applies to the
|
|
46
|
+
# already-deployed function without redeploying; the URL is returned as
|
|
47
|
+
# `publicUrl`.
|
|
48
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
49
|
+
attr_reader :http_enabled
|
|
50
|
+
|
|
51
|
+
sig { params(http_enabled: T::Boolean).void }
|
|
52
|
+
attr_writer :http_enabled
|
|
53
|
+
|
|
54
|
+
# Shortcut for a single-file function: exactly equivalent to sending `files` with
|
|
55
|
+
# one entry named after `entrypoint` (`index.ts` by default). Fully supported —
|
|
56
|
+
# use whichever fits. If both are sent, `files` wins.
|
|
25
57
|
sig { returns(T.nilable(String)) }
|
|
26
58
|
attr_reader :source_code
|
|
27
59
|
|
|
@@ -32,6 +64,9 @@ module Zavudev
|
|
|
32
64
|
params(
|
|
33
65
|
function_id: String,
|
|
34
66
|
dependencies: T::Hash[Symbol, String],
|
|
67
|
+
entrypoint: String,
|
|
68
|
+
files: T::Hash[Symbol, String],
|
|
69
|
+
http_enabled: T::Boolean,
|
|
35
70
|
source_code: String,
|
|
36
71
|
request_options: Zavudev::RequestOptions::OrHash
|
|
37
72
|
).returns(T.attached_class)
|
|
@@ -40,7 +75,24 @@ module Zavudev
|
|
|
40
75
|
function_id:,
|
|
41
76
|
# New dependency map (replaces existing dependencies).
|
|
42
77
|
dependencies: nil,
|
|
43
|
-
#
|
|
78
|
+
# Which file in `files` is the entry point. Defaults to `index.ts`.
|
|
79
|
+
entrypoint: nil,
|
|
80
|
+
# The project's source files, keyed by path relative to the project root (e.g.
|
|
81
|
+
# `index.ts`, `lib/orders.ts`). Imports between them are resolved when the
|
|
82
|
+
# function is built, so a function can be split across as many files as it needs.
|
|
83
|
+
#
|
|
84
|
+
# Paths must be relative and use forward slashes; `..`, `node_modules/` and
|
|
85
|
+
# `package.json` are rejected. npm packages are not uploaded here — declare them
|
|
86
|
+
# under `dependencies` and Zavu installs them. Limits: 200 files and 900,000 bytes
|
|
87
|
+
# for the whole tree.
|
|
88
|
+
files: nil,
|
|
89
|
+
# Expose the function on its public HTTPS URL, or take it down. Applies to the
|
|
90
|
+
# already-deployed function without redeploying; the URL is returned as
|
|
91
|
+
# `publicUrl`.
|
|
92
|
+
http_enabled: nil,
|
|
93
|
+
# Shortcut for a single-file function: exactly equivalent to sending `files` with
|
|
94
|
+
# one entry named after `entrypoint` (`index.ts` by default). Fully supported —
|
|
95
|
+
# use whichever fits. If both are sent, `files` wins.
|
|
44
96
|
source_code: nil,
|
|
45
97
|
request_options: {}
|
|
46
98
|
)
|
|
@@ -51,6 +103,9 @@ module Zavudev
|
|
|
51
103
|
{
|
|
52
104
|
function_id: String,
|
|
53
105
|
dependencies: T::Hash[Symbol, String],
|
|
106
|
+
entrypoint: String,
|
|
107
|
+
files: T::Hash[Symbol, String],
|
|
108
|
+
http_enabled: T::Boolean,
|
|
54
109
|
source_code: String,
|
|
55
110
|
request_options: Zavudev::RequestOptions
|
|
56
111
|
}
|
|
@@ -108,7 +108,9 @@ module Zavudev
|
|
|
108
108
|
sig { returns(T.nilable(String)) }
|
|
109
109
|
attr_accessor :description
|
|
110
110
|
|
|
111
|
-
# HTTPS endpoint
|
|
111
|
+
# HTTPS endpoint, present only while httpEnabled is true. Null otherwise,
|
|
112
|
+
# including for a function that was previously exposed — the stored URL stops
|
|
113
|
+
# serving the moment HTTP is turned off, so it is never returned.
|
|
112
114
|
sig { returns(T.nilable(String)) }
|
|
113
115
|
attr_accessor :public_url
|
|
114
116
|
|
|
@@ -157,7 +159,9 @@ module Zavudev
|
|
|
157
159
|
# ID of the deployment currently serving traffic.
|
|
158
160
|
active_deployment_id: nil,
|
|
159
161
|
description: nil,
|
|
160
|
-
# HTTPS endpoint
|
|
162
|
+
# HTTPS endpoint, present only while httpEnabled is true. Null otherwise,
|
|
163
|
+
# including for a function that was previously exposed — the stored URL stops
|
|
164
|
+
# serving the moment HTTP is turned off, so it is never returned.
|
|
161
165
|
public_url: nil
|
|
162
166
|
)
|
|
163
167
|
end
|