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.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +1 -1
  4. data/lib/zavudev/models/function_create_params.rb +36 -4
  5. data/lib/zavudev/models/function_create_response.rb +4 -2
  6. data/lib/zavudev/models/function_deploy_params.rb +31 -3
  7. data/lib/zavudev/models/function_deploy_response.rb +20 -3
  8. data/lib/zavudev/models/function_get_deployment_response.rb +20 -3
  9. data/lib/zavudev/models/function_retrieve_response.rb +4 -2
  10. data/lib/zavudev/models/function_update_params.rb +41 -3
  11. data/lib/zavudev/models/function_update_response.rb +4 -2
  12. data/lib/zavudev/models/invitation.rb +101 -8
  13. data/lib/zavudev/models/invitation_create_params.rb +34 -8
  14. data/lib/zavudev/models/invitation_list_params.rb +14 -0
  15. data/lib/zavudev/models/message.rb +14 -0
  16. data/lib/zavudev/models/message_type.rb +16 -0
  17. data/lib/zavudev/models/phone_number_pricing.rb +7 -2
  18. data/lib/zavudev/models/phone_number_search_available_params.rb +13 -1
  19. data/lib/zavudev/models/sender.rb +12 -1
  20. data/lib/zavudev/models/sender_create_params.rb +72 -4
  21. data/lib/zavudev/models/sender_update_params.rb +65 -1
  22. data/lib/zavudev/models/sender_webhook.rb +47 -1
  23. data/lib/zavudev/models/senders/agent/agent_tool.rb +19 -1
  24. data/lib/zavudev/models/senders/agent/tool_create_params.rb +7 -2
  25. data/lib/zavudev/models/senders/agent/tool_test_response.rb +90 -5
  26. data/lib/zavudev/models/senders/agent.rb +198 -1
  27. data/lib/zavudev/models/senders/agent_create_params.rb +188 -1
  28. data/lib/zavudev/models/senders/agent_execution.rb +26 -1
  29. data/lib/zavudev/models/senders/agent_update_params.rb +188 -1
  30. data/lib/zavudev/models/template.rb +1 -0
  31. data/lib/zavudev/models/template_create_params.rb +19 -9
  32. data/lib/zavudev/models/webhook_event.rb +31 -1
  33. data/lib/zavudev/resources/broadcasts.rb +20 -4
  34. data/lib/zavudev/resources/functions.rb +35 -10
  35. data/lib/zavudev/resources/invitations.rb +19 -6
  36. data/lib/zavudev/resources/messages.rb +13 -4
  37. data/lib/zavudev/resources/number_10dlc/brands.rb +5 -1
  38. data/lib/zavudev/resources/number_10dlc/campaigns.rb +6 -1
  39. data/lib/zavudev/resources/phone_numbers.rb +12 -3
  40. data/lib/zavudev/resources/senders/agent/executions.rb +5 -0
  41. data/lib/zavudev/resources/senders/agent/tools.rb +14 -2
  42. data/lib/zavudev/resources/senders/agent.rb +18 -2
  43. data/lib/zavudev/resources/senders.rb +15 -3
  44. data/lib/zavudev/version.rb +1 -1
  45. data/rbi/zavudev/models/function_create_params.rbi +50 -2
  46. data/rbi/zavudev/models/function_create_response.rbi +6 -2
  47. data/rbi/zavudev/models/function_deploy_params.rbi +42 -2
  48. data/rbi/zavudev/models/function_deploy_response.rbi +20 -0
  49. data/rbi/zavudev/models/function_get_deployment_response.rbi +20 -0
  50. data/rbi/zavudev/models/function_retrieve_response.rbi +6 -2
  51. data/rbi/zavudev/models/function_update_params.rbi +57 -2
  52. data/rbi/zavudev/models/function_update_response.rbi +6 -2
  53. data/rbi/zavudev/models/invitation.rbi +162 -8
  54. data/rbi/zavudev/models/invitation_create_params.rbi +54 -10
  55. data/rbi/zavudev/models/invitation_list_params.rbi +17 -0
  56. data/rbi/zavudev/models/message.rbi +28 -0
  57. data/rbi/zavudev/models/message_type.rbi +18 -0
  58. data/rbi/zavudev/models/phone_number_pricing.rbi +6 -2
  59. data/rbi/zavudev/models/phone_number_search_available_params.rbi +13 -0
  60. data/rbi/zavudev/models/sender.rbi +17 -0
  61. data/rbi/zavudev/models/sender_create_params.rbi +136 -4
  62. data/rbi/zavudev/models/sender_update_params.rbi +124 -0
  63. data/rbi/zavudev/models/sender_webhook.rbi +69 -0
  64. data/rbi/zavudev/models/senders/agent/agent_tool.rbi +26 -3
  65. data/rbi/zavudev/models/senders/agent/tool_create_params.rbi +6 -2
  66. data/rbi/zavudev/models/senders/agent/tool_test_response.rbi +130 -5
  67. data/rbi/zavudev/models/senders/agent.rbi +320 -3
  68. data/rbi/zavudev/models/senders/agent_create_params.rbi +304 -0
  69. data/rbi/zavudev/models/senders/agent_execution.rbi +31 -3
  70. data/rbi/zavudev/models/senders/agent_update_params.rbi +304 -0
  71. data/rbi/zavudev/models/template.rbi +5 -0
  72. data/rbi/zavudev/models/template_create_params.rbi +27 -6
  73. data/rbi/zavudev/models/webhook_event.rbi +35 -1
  74. data/rbi/zavudev/resources/broadcasts.rbi +20 -4
  75. data/rbi/zavudev/resources/functions.rbi +62 -6
  76. data/rbi/zavudev/resources/invitations.rbi +37 -8
  77. data/rbi/zavudev/resources/messages.rbi +12 -3
  78. data/rbi/zavudev/resources/number_10dlc/brands.rbi +5 -1
  79. data/rbi/zavudev/resources/number_10dlc/campaigns.rbi +6 -1
  80. data/rbi/zavudev/resources/phone_numbers.rbi +10 -2
  81. data/rbi/zavudev/resources/senders/agent/executions.rbi +5 -0
  82. data/rbi/zavudev/resources/senders/agent/tools.rbi +13 -2
  83. data/rbi/zavudev/resources/senders/agent.rbi +16 -0
  84. data/rbi/zavudev/resources/senders.rbi +56 -2
  85. data/sig/zavudev/models/function_create_params.rbs +14 -0
  86. data/sig/zavudev/models/function_deploy_params.rbs +14 -0
  87. data/sig/zavudev/models/function_deploy_response.rbs +5 -0
  88. data/sig/zavudev/models/function_get_deployment_response.rbs +5 -0
  89. data/sig/zavudev/models/function_update_params.rbs +21 -0
  90. data/sig/zavudev/models/invitation.rbs +58 -2
  91. data/sig/zavudev/models/invitation_create_params.rbs +2 -1
  92. data/sig/zavudev/models/invitation_list_params.rbs +3 -1
  93. data/sig/zavudev/models/message_type.rbs +4 -0
  94. data/sig/zavudev/models/phone_number_search_available_params.rbs +7 -0
  95. data/sig/zavudev/models/sender.rbs +7 -0
  96. data/sig/zavudev/models/sender_create_params.rbs +35 -0
  97. data/sig/zavudev/models/sender_update_params.rbs +35 -0
  98. data/sig/zavudev/models/sender_webhook.rbs +17 -0
  99. data/sig/zavudev/models/senders/agent/agent_tool.rbs +10 -3
  100. data/sig/zavudev/models/senders/agent/tool_test_response.rbs +68 -4
  101. data/sig/zavudev/models/senders/agent.rbs +161 -3
  102. data/sig/zavudev/models/senders/agent_create_params.rbs +152 -1
  103. data/sig/zavudev/models/senders/agent_execution.rbs +13 -3
  104. data/sig/zavudev/models/senders/agent_update_params.rbs +152 -1
  105. data/sig/zavudev/models/template.rbs +2 -1
  106. data/sig/zavudev/models/template_create_params.rbs +9 -6
  107. data/sig/zavudev/models/webhook_event.rbs +10 -0
  108. data/sig/zavudev/resources/functions.rbs +7 -0
  109. data/sig/zavudev/resources/phone_numbers.rbs +1 -0
  110. data/sig/zavudev/resources/senders/agent.rbs +2 -0
  111. data/sig/zavudev/resources/senders.rbs +6 -0
  112. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac627d26a28d5901c971cff42e8d371b2d3d7dd0e33cce968fec7ed022b5e313
4
- data.tar.gz: 8ae1361683e68009bdf39773686a547d8b52e9f09a03c51bc5cf0760e94cb2cd
3
+ metadata.gz: c816f9f292a722353051f15021fa10ecd35fa46e4c9875dd7233413793fe35b8
4
+ data.tar.gz: 06105ce64497bd6c8880a5faba2149ae0e666a931eab453bd89461bb133a97e2
5
5
  SHA512:
6
- metadata.gz: 8d404f2e36a900ead47771f278bc535196df248578a09eb2e1f60aee91b748c3715dff3c54b69583d243d8b5f6552eeeb9cc33e47d9d6af432bfce1acb2a7d59
7
- data.tar.gz: a1bcb630fc1cd3cd1211d21a2683cc5e643aca7cf13b192df10ec38c42ca806844e4ec5c100c6354c2b141db05b3ba64f1a06c0008a76531df68b0c64e1ca8f1
6
+ metadata.gz: acad7a45105f7224f636557539bddd3d1de2906b5ba7fc5b8986aeae84dc939507d44649d4f7c79f1c03a137e9d3170f76418c12a9eb5df41c118b174abc0c4c
7
+ data.tar.gz: 3c894b958050647adc91b001bbec1b21212f9de083f7211a4cdbf04cac3b108b11436fc892fa3aa790b879dea34f1c649ceca890828e6df7dec4daf91b270438
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.20.0 (2026-08-11)
4
+
5
+ Full Changelog: [v0.19.0...v0.20.0](https://github.com/zavudev/sdk-ruby/compare/v0.19.0...v0.20.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([bfbfdb3](https://github.com/zavudev/sdk-ruby/commit/bfbfdb30beabe539011761e0dbe5e6300bf84fc3))
10
+ * **api:** api update ([3dd2f9a](https://github.com/zavudev/sdk-ruby/commit/3dd2f9ae33f97e322260043770b81046fbcfa86c))
11
+ * **api:** api update ([047bf1a](https://github.com/zavudev/sdk-ruby/commit/047bf1add6b64c168649d72d649aa4f80d9b4783))
12
+ * **api:** api update ([83ac772](https://github.com/zavudev/sdk-ruby/commit/83ac772861fac6e29983becf6ddfa399dbaa3561))
13
+ * **api:** api update ([996f9ab](https://github.com/zavudev/sdk-ruby/commit/996f9ab52620b2ce5052530307e67e593da01f72))
14
+ * **api:** api update ([3c61529](https://github.com/zavudev/sdk-ruby/commit/3c61529d5dac9a675e26719fc5e281805b4c7c6a))
15
+ * **api:** api update ([258a1e6](https://github.com/zavudev/sdk-ruby/commit/258a1e6fff0b2264f4311fcb8bd7c9432256ea41))
16
+ * **api:** api update ([e95c2eb](https://github.com/zavudev/sdk-ruby/commit/e95c2eba76c5a8f947c5e7fa72971908a1be90fe))
17
+ * **api:** api update ([a7c2d4a](https://github.com/zavudev/sdk-ruby/commit/a7c2d4a72c856a10d30d4b59b9e88112459d3ce4))
18
+ * **api:** api update ([4b5e9b6](https://github.com/zavudev/sdk-ruby/commit/4b5e9b6a2057514d9237fac1a37117126ad3fede))
19
+ * **api:** api update ([37619ee](https://github.com/zavudev/sdk-ruby/commit/37619eeff5efc9cb775abc80f6e630cae4b06de1))
20
+ * **api:** api update ([d361391](https://github.com/zavudev/sdk-ruby/commit/d361391e924c3f76eea26c2546495a96c88d86be))
21
+ * **api:** api update ([62a0a2d](https://github.com/zavudev/sdk-ruby/commit/62a0a2d5729c99e9c51dcbe6f76467eb0f469c99))
22
+ * **api:** api update ([554c6f2](https://github.com/zavudev/sdk-ruby/commit/554c6f26bbab79f4958f2478460c1801349d0f02))
23
+ * **api:** api update ([b10ac2f](https://github.com/zavudev/sdk-ruby/commit/b10ac2ff0c6d73e830861515aca2456e042747ea))
24
+ * **api:** api update ([ff8052b](https://github.com/zavudev/sdk-ruby/commit/ff8052b6c5e59819c7a51578209a51064d8c8427))
25
+ * **api:** api update ([e44827f](https://github.com/zavudev/sdk-ruby/commit/e44827f9c758e460194e28a82c29ac57767dcdb9))
26
+ * **api:** api update ([5167496](https://github.com/zavudev/sdk-ruby/commit/516749617b929620cf63104d3f972505c75222f6))
27
+ * **api:** api update ([72b2d6a](https://github.com/zavudev/sdk-ruby/commit/72b2d6aedb40dde4995f5d4d2a7f98b2dd56e686))
28
+
3
29
  ## 0.19.0 (2026-07-23)
4
30
 
5
31
  Full Changelog: [v0.18.0...v0.19.0](https://github.com/zavudev/sdk-ruby/compare/v0.18.0...v0.19.0)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "zavudev", "~> 0.19.0"
29
+ gem "zavudev", "~> 0.20.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -29,6 +29,25 @@ module Zavudev
29
29
  # @return [String, nil]
30
30
  optional :description, String
31
31
 
32
+ # @!attribute entrypoint
33
+ # Which file in `files` is the entry point. Defaults to `index.ts`.
34
+ #
35
+ # @return [String, nil]
36
+ optional :entrypoint, String
37
+
38
+ # @!attribute files
39
+ # The project's source files, keyed by path relative to the project root (e.g.
40
+ # `index.ts`, `lib/orders.ts`). Imports between them are resolved when the
41
+ # function is built, so a function can be split across as many files as it needs.
42
+ #
43
+ # Paths must be relative and use forward slashes; `..`, `node_modules/` and
44
+ # `package.json` are rejected. npm packages are not uploaded here — declare them
45
+ # under `dependencies` and Zavu installs them. Limits: 200 files and 900,000 bytes
46
+ # for the whole tree.
47
+ #
48
+ # @return [Hash{Symbol=>String}, nil]
49
+ optional :files, Zavudev::Internal::Type::HashOf[String]
50
+
32
51
  # @!attribute http_enabled
33
52
  # Whether to expose a public HTTPS URL for this function.
34
53
  #
@@ -47,17 +66,26 @@ module Zavudev
47
66
  optional :runtime, enum: -> { Zavudev::FunctionCreateParams::Runtime }
48
67
 
49
68
  # @!attribute source_code
50
- # TypeScript source code for the function entry point (max ~900KB).
69
+ # Shortcut for a single-file function: exactly equivalent to sending `files` with
70
+ # one entry named after `entrypoint` (`index.ts` by default). Fully supported —
71
+ # use whichever fits. If both are sent, `files` wins.
51
72
  #
52
73
  # @return [String, nil]
53
74
  optional :source_code, String, api_name: :sourceCode
54
75
 
55
76
  # @!attribute timeout_sec
77
+ # Per-invocation timeout in seconds. Event and cron invocations are asynchronous,
78
+ # so a long timeout only bounds cost; a tool called during a live conversation
79
+ # holds up the reply, and a function exposed over HTTP is additionally bounded by
80
+ # the platform's HTTP response limit.
56
81
  #
57
82
  # @return [Integer, nil]
58
83
  optional :timeout_sec, Integer, api_name: :timeoutSec
59
84
 
60
- # @!method initialize(name:, slug:, dependencies: nil, description: nil, http_enabled: nil, memory_mb: nil, runtime: nil, source_code: nil, timeout_sec: nil, request_options: {})
85
+ # @!method initialize(name:, slug:, dependencies: nil, description: nil, entrypoint: nil, files: nil, http_enabled: nil, memory_mb: nil, runtime: nil, source_code: nil, timeout_sec: nil, request_options: {})
86
+ # Some parameter documentations has been truncated, see
87
+ # {Zavudev::Models::FunctionCreateParams} for more details.
88
+ #
61
89
  # @param name [String]
62
90
  #
63
91
  # @param slug [String] URL-safe identifier (lowercase, digits, hyphens). Must be unique per project.
@@ -66,15 +94,19 @@ module Zavudev
66
94
  #
67
95
  # @param description [String]
68
96
  #
97
+ # @param entrypoint [String] Which file in `files` is the entry point. Defaults to `index.ts`.
98
+ #
99
+ # @param files [Hash{Symbol=>String}] The project's source files, keyed by path relative to the project root (e.g. `in
100
+ #
69
101
  # @param http_enabled [Boolean] Whether to expose a public HTTPS URL for this function.
70
102
  #
71
103
  # @param memory_mb [Integer, Zavudev::Models::FunctionCreateParams::MemoryMB]
72
104
  #
73
105
  # @param runtime [Symbol, Zavudev::Models::FunctionCreateParams::Runtime] Runtime the function is deployed on.
74
106
  #
75
- # @param source_code [String] TypeScript source code for the function entry point (max ~900KB).
107
+ # @param source_code [String] Shortcut for a single-file function: exactly equivalent to sending `files` with
76
108
  #
77
- # @param timeout_sec [Integer]
109
+ # @param timeout_sec [Integer] Per-invocation timeout in seconds. Event and cron invocations are asynchronous,
78
110
  #
79
111
  # @param request_options [Zavudev::RequestOptions, Hash{Symbol=>Object}]
80
112
 
@@ -94,7 +94,9 @@ module Zavudev
94
94
  optional :description, String, nil?: true
95
95
 
96
96
  # @!attribute public_url
97
- # HTTPS endpoint when httpEnabled is true.
97
+ # HTTPS endpoint, present only while httpEnabled is true. Null otherwise,
98
+ # including for a function that was previously exposed — the stored URL stops
99
+ # serving the moment HTTP is turned off, so it is never returned.
98
100
  #
99
101
  # @return [String, nil]
100
102
  optional :public_url, String, api_name: :publicUrl, nil?: true
@@ -132,7 +134,7 @@ module Zavudev
132
134
  #
133
135
  # @param description [String, nil]
134
136
  #
135
- # @param public_url [String, nil] HTTPS endpoint when httpEnabled is true.
137
+ # @param public_url [String, nil] HTTPS endpoint, present only while httpEnabled is true. Null otherwise, includin
136
138
 
137
139
  # Runtime the function is deployed on.
138
140
  #
@@ -18,18 +18,46 @@ module Zavudev
18
18
  # @return [Hash{Symbol=>String}, nil]
19
19
  optional :dependencies, Zavudev::Internal::Type::HashOf[String]
20
20
 
21
+ # @!attribute entrypoint
22
+ # Which file in `files` is the entry point. Defaults to `index.ts`.
23
+ #
24
+ # @return [String, nil]
25
+ optional :entrypoint, String
26
+
27
+ # @!attribute files
28
+ # The project's source files, keyed by path relative to the project root (e.g.
29
+ # `index.ts`, `lib/orders.ts`). Imports between them are resolved when the
30
+ # function is built, so a function can be split across as many files as it needs.
31
+ #
32
+ # Paths must be relative and use forward slashes; `..`, `node_modules/` and
33
+ # `package.json` are rejected. npm packages are not uploaded here — declare them
34
+ # under `dependencies` and Zavu installs them. Limits: 200 files and 900,000 bytes
35
+ # for the whole tree.
36
+ #
37
+ # @return [Hash{Symbol=>String}, nil]
38
+ optional :files, Zavudev::Internal::Type::HashOf[String]
39
+
21
40
  # @!attribute source_code
22
- # New source code to publish (replaces the draft).
41
+ # Shortcut for a single-file function: exactly equivalent to sending `files` with
42
+ # one entry named after `entrypoint` (`index.ts` by default). Fully supported —
43
+ # use whichever fits. If both are sent, `files` wins.
23
44
  #
24
45
  # @return [String, nil]
25
46
  optional :source_code, String, api_name: :sourceCode
26
47
 
27
- # @!method initialize(function_id:, dependencies: nil, source_code: nil, request_options: {})
48
+ # @!method initialize(function_id:, dependencies: nil, entrypoint: nil, files: nil, source_code: nil, request_options: {})
49
+ # Some parameter documentations has been truncated, see
50
+ # {Zavudev::Models::FunctionDeployParams} for more details.
51
+ #
28
52
  # @param function_id [String]
29
53
  #
30
54
  # @param dependencies [Hash{Symbol=>String}] New dependency map (replaces existing dependencies).
31
55
  #
32
- # @param source_code [String] New source code to publish (replaces the draft).
56
+ # @param entrypoint [String] Which file in `files` is the entry point. Defaults to `index.ts`.
57
+ #
58
+ # @param files [Hash{Symbol=>String}] The project's source files, keyed by path relative to the project root (e.g. `in
59
+ #
60
+ # @param source_code [String] Shortcut for a single-file function: exactly equivalent to sending `files` with
33
61
  #
34
62
  # @param request_options [Zavudev::RequestOptions, Hash{Symbol=>Object}]
35
63
  end
@@ -41,7 +41,18 @@ module Zavudev
41
41
  # @return [Integer]
42
42
  required :version, Integer
43
43
 
44
+ # @!attribute build_logs
45
+ # What the build printed: dependency installation, the bundler's output, and the
46
+ # compiler's message when it failed. Returned when fetching a single deployment,
47
+ # omitted from the list. Read this first when a deploy fails — `errorMessage` is
48
+ # often the outer wrapper's summary, and the line that names the broken import or
49
+ # the syntax error is here.
50
+ #
51
+ # @return [String, nil]
52
+ optional :build_logs, String, api_name: :buildLogs, nil?: true
53
+
44
54
  # @!attribute bundle_bytes
55
+ # Size of the built bundle in bytes. Null until the build finishes.
45
56
  #
46
57
  # @return [Integer, nil]
47
58
  optional :bundle_bytes, Integer, api_name: :bundleBytes, nil?: true
@@ -58,11 +69,15 @@ module Zavudev
58
69
  optional :error_message, String, api_name: :errorMessage, nil?: true
59
70
 
60
71
  # @!attribute source_code_bytes
72
+ # Total size of the deployed source tree in bytes.
61
73
  #
62
74
  # @return [Integer, nil]
63
75
  optional :source_code_bytes, Integer, api_name: :sourceCodeBytes, nil?: true
64
76
 
65
- # @!method initialize(id:, created_at:, function_id:, status:, version:, bundle_bytes: nil, deployed_at: nil, error_message: nil, source_code_bytes: nil)
77
+ # @!method initialize(id:, created_at:, function_id:, status:, version:, build_logs: nil, bundle_bytes: nil, deployed_at: nil, error_message: nil, source_code_bytes: nil)
78
+ # Some parameter documentations has been truncated, see
79
+ # {Zavudev::Models::FunctionDeployResponse::Deployment} for more details.
80
+ #
66
81
  # @param id [String]
67
82
  #
68
83
  # @param created_at [Time]
@@ -73,13 +88,15 @@ module Zavudev
73
88
  #
74
89
  # @param version [Integer] Monotonically increasing deployment version, starting at 1.
75
90
  #
76
- # @param bundle_bytes [Integer, nil]
91
+ # @param build_logs [String, nil] What the build printed: dependency installation, the bundler's output, and the c
92
+ #
93
+ # @param bundle_bytes [Integer, nil] Size of the built bundle in bytes. Null until the build finishes.
77
94
  #
78
95
  # @param deployed_at [Time, nil]
79
96
  #
80
97
  # @param error_message [String, nil] Failure reason when status is 'failed'.
81
98
  #
82
- # @param source_code_bytes [Integer, nil]
99
+ # @param source_code_bytes [Integer, nil] Total size of the deployed source tree in bytes.
83
100
 
84
101
  # Stage of a function deployment.
85
102
  #
@@ -41,7 +41,18 @@ module Zavudev
41
41
  # @return [Integer]
42
42
  required :version, Integer
43
43
 
44
+ # @!attribute build_logs
45
+ # What the build printed: dependency installation, the bundler's output, and the
46
+ # compiler's message when it failed. Returned when fetching a single deployment,
47
+ # omitted from the list. Read this first when a deploy fails — `errorMessage` is
48
+ # often the outer wrapper's summary, and the line that names the broken import or
49
+ # the syntax error is here.
50
+ #
51
+ # @return [String, nil]
52
+ optional :build_logs, String, api_name: :buildLogs, nil?: true
53
+
44
54
  # @!attribute bundle_bytes
55
+ # Size of the built bundle in bytes. Null until the build finishes.
45
56
  #
46
57
  # @return [Integer, nil]
47
58
  optional :bundle_bytes, Integer, api_name: :bundleBytes, nil?: true
@@ -58,11 +69,15 @@ module Zavudev
58
69
  optional :error_message, String, api_name: :errorMessage, nil?: true
59
70
 
60
71
  # @!attribute source_code_bytes
72
+ # Total size of the deployed source tree in bytes.
61
73
  #
62
74
  # @return [Integer, nil]
63
75
  optional :source_code_bytes, Integer, api_name: :sourceCodeBytes, nil?: true
64
76
 
65
- # @!method initialize(id:, created_at:, function_id:, status:, version:, bundle_bytes: nil, deployed_at: nil, error_message: nil, source_code_bytes: nil)
77
+ # @!method initialize(id:, created_at:, function_id:, status:, version:, build_logs: nil, bundle_bytes: nil, deployed_at: nil, error_message: nil, source_code_bytes: nil)
78
+ # Some parameter documentations has been truncated, see
79
+ # {Zavudev::Models::FunctionGetDeploymentResponse::Deployment} for more details.
80
+ #
66
81
  # @param id [String]
67
82
  #
68
83
  # @param created_at [Time]
@@ -73,13 +88,15 @@ module Zavudev
73
88
  #
74
89
  # @param version [Integer] Monotonically increasing deployment version, starting at 1.
75
90
  #
76
- # @param bundle_bytes [Integer, nil]
91
+ # @param build_logs [String, nil] What the build printed: dependency installation, the bundler's output, and the c
92
+ #
93
+ # @param bundle_bytes [Integer, nil] Size of the built bundle in bytes. Null until the build finishes.
77
94
  #
78
95
  # @param deployed_at [Time, nil]
79
96
  #
80
97
  # @param error_message [String, nil] Failure reason when status is 'failed'.
81
98
  #
82
- # @param source_code_bytes [Integer, nil]
99
+ # @param source_code_bytes [Integer, nil] Total size of the deployed source tree in bytes.
83
100
 
84
101
  # Stage of a function deployment.
85
102
  #
@@ -94,7 +94,9 @@ module Zavudev
94
94
  optional :description, String, nil?: true
95
95
 
96
96
  # @!attribute public_url
97
- # HTTPS endpoint when httpEnabled is true.
97
+ # HTTPS endpoint, present only while httpEnabled is true. Null otherwise,
98
+ # including for a function that was previously exposed — the stored URL stops
99
+ # serving the moment HTTP is turned off, so it is never returned.
98
100
  #
99
101
  # @return [String, nil]
100
102
  optional :public_url, String, api_name: :publicUrl, nil?: true
@@ -132,7 +134,7 @@ module Zavudev
132
134
  #
133
135
  # @param description [String, nil]
134
136
  #
135
- # @param public_url [String, nil] HTTPS endpoint when httpEnabled is true.
137
+ # @param public_url [String, nil] HTTPS endpoint, present only while httpEnabled is true. Null otherwise, includin
136
138
 
137
139
  # Runtime the function is deployed on.
138
140
  #
@@ -18,18 +18,56 @@ module Zavudev
18
18
  # @return [Hash{Symbol=>String}, nil]
19
19
  optional :dependencies, Zavudev::Internal::Type::HashOf[String]
20
20
 
21
+ # @!attribute entrypoint
22
+ # Which file in `files` is the entry point. Defaults to `index.ts`.
23
+ #
24
+ # @return [String, nil]
25
+ optional :entrypoint, String
26
+
27
+ # @!attribute files
28
+ # The project's source files, keyed by path relative to the project root (e.g.
29
+ # `index.ts`, `lib/orders.ts`). Imports between them are resolved when the
30
+ # function is built, so a function can be split across as many files as it needs.
31
+ #
32
+ # Paths must be relative and use forward slashes; `..`, `node_modules/` and
33
+ # `package.json` are rejected. npm packages are not uploaded here — declare them
34
+ # under `dependencies` and Zavu installs them. Limits: 200 files and 900,000 bytes
35
+ # for the whole tree.
36
+ #
37
+ # @return [Hash{Symbol=>String}, nil]
38
+ optional :files, Zavudev::Internal::Type::HashOf[String]
39
+
40
+ # @!attribute http_enabled
41
+ # Expose the function on its public HTTPS URL, or take it down. Applies to the
42
+ # already-deployed function without redeploying; the URL is returned as
43
+ # `publicUrl`.
44
+ #
45
+ # @return [Boolean, nil]
46
+ optional :http_enabled, Zavudev::Internal::Type::Boolean, api_name: :httpEnabled
47
+
21
48
  # @!attribute source_code
22
- # New source code to publish (replaces the draft).
49
+ # Shortcut for a single-file function: exactly equivalent to sending `files` with
50
+ # one entry named after `entrypoint` (`index.ts` by default). Fully supported —
51
+ # use whichever fits. If both are sent, `files` wins.
23
52
  #
24
53
  # @return [String, nil]
25
54
  optional :source_code, String, api_name: :sourceCode
26
55
 
27
- # @!method initialize(function_id:, dependencies: nil, source_code: nil, request_options: {})
56
+ # @!method initialize(function_id:, dependencies: nil, entrypoint: nil, files: nil, http_enabled: nil, source_code: nil, request_options: {})
57
+ # Some parameter documentations has been truncated, see
58
+ # {Zavudev::Models::FunctionUpdateParams} for more details.
59
+ #
28
60
  # @param function_id [String]
29
61
  #
30
62
  # @param dependencies [Hash{Symbol=>String}] New dependency map (replaces existing dependencies).
31
63
  #
32
- # @param source_code [String] New source code to publish (replaces the draft).
64
+ # @param entrypoint [String] Which file in `files` is the entry point. Defaults to `index.ts`.
65
+ #
66
+ # @param files [Hash{Symbol=>String}] The project's source files, keyed by path relative to the project root (e.g. `in
67
+ #
68
+ # @param http_enabled [Boolean] Expose the function on its public HTTPS URL, or take it down. Applies to the alr
69
+ #
70
+ # @param source_code [String] Shortcut for a single-file function: exactly equivalent to sending `files` with
33
71
  #
34
72
  # @param request_options [Zavudev::RequestOptions, Hash{Symbol=>Object}]
35
73
  end
@@ -94,7 +94,9 @@ module Zavudev
94
94
  optional :description, String, nil?: true
95
95
 
96
96
  # @!attribute public_url
97
- # HTTPS endpoint when httpEnabled is true.
97
+ # HTTPS endpoint, present only while httpEnabled is true. Null otherwise,
98
+ # including for a function that was previously exposed — the stored URL stops
99
+ # serving the moment HTTP is turned off, so it is never returned.
98
100
  #
99
101
  # @return [String, nil]
100
102
  optional :public_url, String, api_name: :publicUrl, nil?: true
@@ -132,7 +134,7 @@ module Zavudev
132
134
  #
133
135
  # @param description [String, nil]
134
136
  #
135
- # @param public_url [String, nil] HTTPS endpoint when httpEnabled is true.
137
+ # @param public_url [String, nil] HTTPS endpoint, present only while httpEnabled is true. Null otherwise, includin
136
138
 
137
139
  # Runtime the function is deployed on.
138
140
  #
@@ -28,6 +28,11 @@ module Zavudev
28
28
  # @!attribute status
29
29
  # Current status of the partner invitation.
30
30
  #
31
+ # `failed` means the client started the connection and it did not finish (they
32
+ # cancelled Meta's dialog, denied a permission, or abandoned the tab). A failed
33
+ # invitation is still usable: the same link can be retried, and it moves back to
34
+ # `in_progress` when the client tries again.
35
+ #
31
36
  # @return [Symbol, Zavudev::Models::Invitation::Status]
32
37
  required :status, enum: -> { Zavudev::Invitation::Status }
33
38
 
@@ -62,15 +67,43 @@ module Zavudev
62
67
  # @return [Time, nil]
63
68
  optional :completed_at, Time, api_name: :completedAt, nil?: true
64
69
 
70
+ # @!attribute connected_account
71
+ # The account the client linked, populated once the invitation is `completed`.
72
+ # Null before that. Use it to show the partner what was connected without fetching
73
+ # the sender.
74
+ #
75
+ # @return [Zavudev::Models::Invitation::ConnectedAccount, nil]
76
+ optional :connected_account,
77
+ -> { Zavudev::Invitation::ConnectedAccount },
78
+ api_name: :connectedAccount,
79
+ nil?: true
80
+
65
81
  # @!attribute connection_type
66
- # How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
67
- # embedded signup).
82
+ # Which Meta channel the client connects: `whatsapp_waba` (official WhatsApp Cloud
83
+ # API via embedded signup) or `messenger` (a Facebook Page's Messenger inbox,
84
+ # including Marketplace chats).
68
85
  #
69
86
  # @return [Symbol, Zavudev::Models::Invitation::ConnectionType, nil]
70
87
  optional :connection_type, enum: -> { Zavudev::Invitation::ConnectionType }, api_name: :connectionType
71
88
 
89
+ # @!attribute failed_at
90
+ #
91
+ # @return [Time, nil]
92
+ optional :failed_at, Time, api_name: :failedAt, nil?: true
93
+
94
+ # @!attribute failure_reason
95
+ # Stable code for why the last attempt failed, present when `status` is `failed`.
96
+ # Values include `fb_cancelled` (client closed Meta's dialog), `fb_not_authorized`
97
+ # (permission denied), `signup_abandoned` (started but never finished),
98
+ # `meta_no_pages` (the client administers no Facebook Page), and `internal_error`.
99
+ # Treat unknown codes as a generic failure.
100
+ #
101
+ # @return [String, nil]
102
+ optional :failure_reason, String, api_name: :failureReason, nil?: true
103
+
72
104
  # @!attribute phone_number_id
73
- # ID of a pre-assigned Zavu phone number for WhatsApp registration.
105
+ # ID of a pre-assigned Zavu phone number for WhatsApp registration. Always null
106
+ # for `messenger` invitations.
74
107
  #
75
108
  # @return [String, nil]
76
109
  optional :phone_number_id, String, api_name: :phoneNumberId, nil?: true
@@ -91,7 +124,7 @@ module Zavudev
91
124
  # @return [Time, nil]
92
125
  optional :viewed_at, Time, api_name: :viewedAt, nil?: true
93
126
 
94
- # @!method initialize(id:, token:, created_at:, expires_at:, status:, updated_at:, url:, client_email: nil, client_name: nil, client_phone: nil, completed_at: nil, connection_type: nil, phone_number_id: nil, sender_id: nil, started_at: nil, viewed_at: nil)
127
+ # @!method initialize(id:, token:, created_at:, expires_at:, status:, updated_at:, url:, client_email: nil, client_name: nil, client_phone: nil, completed_at: nil, connected_account: nil, connection_type: nil, failed_at: nil, failure_reason: nil, phone_number_id: nil, sender_id: nil, started_at: nil, viewed_at: nil)
95
128
  # Some parameter documentations has been truncated, see
96
129
  # {Zavudev::Models::Invitation} for more details.
97
130
  #
@@ -117,9 +150,15 @@ module Zavudev
117
150
  #
118
151
  # @param completed_at [Time, nil]
119
152
  #
120
- # @param connection_type [Symbol, Zavudev::Models::Invitation::ConnectionType] How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via embedd
153
+ # @param connected_account [Zavudev::Models::Invitation::ConnectedAccount, nil] The account the client linked, populated once the invitation is `completed`. Nul
154
+ #
155
+ # @param connection_type [Symbol, Zavudev::Models::Invitation::ConnectionType] Which Meta channel the client connects: `whatsapp_waba` (official WhatsApp Cloud
156
+ #
157
+ # @param failed_at [Time, nil]
158
+ #
159
+ # @param failure_reason [String, nil] Stable code for why the last attempt failed, present when `status` is `failed`.
121
160
  #
122
- # @param phone_number_id [String, nil] ID of a pre-assigned Zavu phone number for WhatsApp registration.
161
+ # @param phone_number_id [String, nil] ID of a pre-assigned Zavu phone number for WhatsApp registration. Always null fo
123
162
  #
124
163
  # @param sender_id [String, nil] ID of the sender created when invitation is completed.
125
164
  #
@@ -129,6 +168,11 @@ module Zavudev
129
168
 
130
169
  # Current status of the partner invitation.
131
170
  #
171
+ # `failed` means the client started the connection and it did not finish (they
172
+ # cancelled Meta's dialog, denied a permission, or abandoned the tab). A failed
173
+ # invitation is still usable: the same link can be retried, and it moves back to
174
+ # `in_progress` when the client tries again.
175
+ #
132
176
  # @see Zavudev::Models::Invitation#status
133
177
  module Status
134
178
  extend Zavudev::Internal::Type::Enum
@@ -138,19 +182,68 @@ module Zavudev
138
182
  COMPLETED = :completed
139
183
  EXPIRED = :expired
140
184
  CANCELLED = :cancelled
185
+ FAILED = :failed
141
186
 
142
187
  # @!method self.values
143
188
  # @return [Array<Symbol>]
144
189
  end
145
190
 
146
- # How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
147
- # embedded signup).
191
+ # @see Zavudev::Models::Invitation#connected_account
192
+ class ConnectedAccount < Zavudev::Internal::Type::BaseModel
193
+ # @!attribute id
194
+ # Provider-side identifier: the WhatsApp phone number ID, or the Facebook Page ID.
195
+ #
196
+ # @return [String]
197
+ required :id, String
198
+
199
+ # @!attribute channel
200
+ #
201
+ # @return [Symbol, Zavudev::Models::Invitation::ConnectedAccount::Channel]
202
+ required :channel, enum: -> { Zavudev::Invitation::ConnectedAccount::Channel }
203
+
204
+ # @!attribute name
205
+ # Display name of the connected account: the WhatsApp verified name, or the
206
+ # Facebook Page name.
207
+ #
208
+ # @return [String, nil]
209
+ optional :name, String, nil?: true
210
+
211
+ # @!method initialize(id:, channel:, name: nil)
212
+ # Some parameter documentations has been truncated, see
213
+ # {Zavudev::Models::Invitation::ConnectedAccount} for more details.
214
+ #
215
+ # The account the client linked, populated once the invitation is `completed`.
216
+ # Null before that. Use it to show the partner what was connected without fetching
217
+ # the sender.
218
+ #
219
+ # @param id [String] Provider-side identifier: the WhatsApp phone number ID, or the Facebook Page ID.
220
+ #
221
+ # @param channel [Symbol, Zavudev::Models::Invitation::ConnectedAccount::Channel]
222
+ #
223
+ # @param name [String, nil] Display name of the connected account: the WhatsApp verified name, or the Facebo
224
+
225
+ # @see Zavudev::Models::Invitation::ConnectedAccount#channel
226
+ module Channel
227
+ extend Zavudev::Internal::Type::Enum
228
+
229
+ WHATSAPP = :whatsapp
230
+ MESSENGER = :messenger
231
+
232
+ # @!method self.values
233
+ # @return [Array<Symbol>]
234
+ end
235
+ end
236
+
237
+ # Which Meta channel the client connects: `whatsapp_waba` (official WhatsApp Cloud
238
+ # API via embedded signup) or `messenger` (a Facebook Page's Messenger inbox,
239
+ # including Marketplace chats).
148
240
  #
149
241
  # @see Zavudev::Models::Invitation#connection_type
150
242
  module ConnectionType
151
243
  extend Zavudev::Internal::Type::Enum
152
244
 
153
245
  WHATSAPP_WABA = :whatsapp_waba
246
+ MESSENGER = :messenger
154
247
 
155
248
  # @!method self.values
156
249
  # @return [Array<Symbol>]