zavudev 0.10.0 → 0.12.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 (122) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -0
  3. data/README.md +1 -1
  4. data/lib/zavudev/client.rb +8 -0
  5. data/lib/zavudev/models/broadcast_contact.rb +10 -1
  6. data/lib/zavudev/models/broadcast_content.rb +18 -4
  7. data/lib/zavudev/models/broadcasts/contact_add_params.rb +17 -4
  8. data/lib/zavudev/models/contact_delete_params.rb +20 -0
  9. data/lib/zavudev/models/function_create_params.rb +104 -0
  10. data/lib/zavudev/models/function_create_response.rb +168 -0
  11. data/lib/zavudev/models/function_delete_params.rb +20 -0
  12. data/lib/zavudev/models/function_delete_response.rb +28 -0
  13. data/lib/zavudev/models/function_deploy_params.rb +37 -0
  14. data/lib/zavudev/models/function_deploy_response.rb +104 -0
  15. data/lib/zavudev/models/function_get_deployment_params.rb +20 -0
  16. data/lib/zavudev/models/function_get_deployment_response.rb +104 -0
  17. data/lib/zavudev/models/function_retrieve_params.rb +20 -0
  18. data/lib/zavudev/models/function_retrieve_response.rb +168 -0
  19. data/lib/zavudev/models/function_tail_logs_params.rb +58 -0
  20. data/lib/zavudev/models/function_tail_logs_response.rb +41 -0
  21. data/lib/zavudev/models/function_update_params.rb +37 -0
  22. data/lib/zavudev/models/function_update_response.rb +168 -0
  23. data/lib/zavudev/models/functions/secret_list_params.rb +22 -0
  24. data/lib/zavudev/models/functions/secret_list_response.rb +59 -0
  25. data/lib/zavudev/models/functions/secret_set_params.rb +34 -0
  26. data/lib/zavudev/models/functions/secret_set_response.rb +10 -0
  27. data/lib/zavudev/models/functions/secret_unset_params.rb +28 -0
  28. data/lib/zavudev/models/me_retrieve_params.rb +14 -0
  29. data/lib/zavudev/models/me_retrieve_response.rb +85 -0
  30. data/lib/zavudev/models/message_content.rb +20 -4
  31. data/lib/zavudev/models/message_show_typing_params.rb +26 -0
  32. data/lib/zavudev/models/message_show_typing_response.rb +16 -0
  33. data/lib/zavudev/models/senders/agent/execution_retrieve_params.rb +30 -0
  34. data/lib/zavudev/models/senders/agent/execution_retrieve_response.rb +20 -0
  35. data/lib/zavudev/models/template.rb +6 -3
  36. data/lib/zavudev/models.rb +22 -0
  37. data/lib/zavudev/resources/contacts.rb +24 -0
  38. data/lib/zavudev/resources/functions/secrets.rb +98 -0
  39. data/lib/zavudev/resources/functions.rb +220 -0
  40. data/lib/zavudev/resources/me.rb +33 -0
  41. data/lib/zavudev/resources/messages.rb +31 -0
  42. data/lib/zavudev/resources/senders/agent/executions.rb +26 -0
  43. data/lib/zavudev/version.rb +1 -1
  44. data/lib/zavudev.rb +29 -0
  45. data/rbi/zavudev/client.rbi +6 -0
  46. data/rbi/zavudev/models/broadcast_contact.rbi +9 -0
  47. data/rbi/zavudev/models/broadcast_content.rbi +23 -4
  48. data/rbi/zavudev/models/broadcasts/contact_add_params.rbi +23 -4
  49. data/rbi/zavudev/models/contact_delete_params.rbi +35 -0
  50. data/rbi/zavudev/models/function_create_params.rbi +177 -0
  51. data/rbi/zavudev/models/function_create_response.rbi +277 -0
  52. data/rbi/zavudev/models/function_delete_params.rbi +35 -0
  53. data/rbi/zavudev/models/function_delete_response.rbi +44 -0
  54. data/rbi/zavudev/models/function_deploy_params.rbi +63 -0
  55. data/rbi/zavudev/models/function_deploy_response.rbi +196 -0
  56. data/rbi/zavudev/models/function_get_deployment_params.rbi +38 -0
  57. data/rbi/zavudev/models/function_get_deployment_response.rbi +201 -0
  58. data/rbi/zavudev/models/function_retrieve_params.rbi +35 -0
  59. data/rbi/zavudev/models/function_retrieve_response.rbi +277 -0
  60. data/rbi/zavudev/models/function_tail_logs_params.rbi +90 -0
  61. data/rbi/zavudev/models/function_tail_logs_response.rbi +75 -0
  62. data/rbi/zavudev/models/function_update_params.rbi +63 -0
  63. data/rbi/zavudev/models/function_update_response.rbi +277 -0
  64. data/rbi/zavudev/models/functions/secret_list_params.rbi +40 -0
  65. data/rbi/zavudev/models/functions/secret_list_response.rbi +118 -0
  66. data/rbi/zavudev/models/functions/secret_set_params.rbi +53 -0
  67. data/rbi/zavudev/models/functions/secret_set_response.rbi +9 -0
  68. data/rbi/zavudev/models/functions/secret_unset_params.rbi +48 -0
  69. data/rbi/zavudev/models/me_retrieve_params.rbi +27 -0
  70. data/rbi/zavudev/models/me_retrieve_response.rbi +151 -0
  71. data/rbi/zavudev/models/message_content.rbi +27 -4
  72. data/rbi/zavudev/models/message_show_typing_params.rbi +46 -0
  73. data/rbi/zavudev/models/message_show_typing_response.rbi +26 -0
  74. data/rbi/zavudev/models/senders/agent/execution_retrieve_params.rbi +50 -0
  75. data/rbi/zavudev/models/senders/agent/execution_retrieve_response.rbi +41 -0
  76. data/rbi/zavudev/models/template.rbi +10 -4
  77. data/rbi/zavudev/models.rbi +22 -0
  78. data/rbi/zavudev/resources/contacts.rbi +15 -0
  79. data/rbi/zavudev/resources/functions/secrets.rbi +69 -0
  80. data/rbi/zavudev/resources/functions.rbi +171 -0
  81. data/rbi/zavudev/resources/me.rbi +22 -0
  82. data/rbi/zavudev/resources/messages.rbi +21 -0
  83. data/rbi/zavudev/resources/senders/agent/executions.rbi +14 -0
  84. data/sig/zavudev/client.rbs +4 -0
  85. data/sig/zavudev/models/broadcast_contact.rbs +9 -0
  86. data/sig/zavudev/models/broadcast_content.rbs +9 -0
  87. data/sig/zavudev/models/broadcasts/contact_add_params.rbs +9 -0
  88. data/sig/zavudev/models/contact_delete_params.rbs +23 -0
  89. data/sig/zavudev/models/function_create_params.rbs +107 -0
  90. data/sig/zavudev/models/function_create_response.rbs +126 -0
  91. data/sig/zavudev/models/function_delete_params.rbs +23 -0
  92. data/sig/zavudev/models/function_delete_response.rbs +22 -0
  93. data/sig/zavudev/models/function_deploy_params.rbs +40 -0
  94. data/sig/zavudev/models/function_deploy_response.rbs +98 -0
  95. data/sig/zavudev/models/function_get_deployment_params.rbs +23 -0
  96. data/sig/zavudev/models/function_get_deployment_response.rbs +98 -0
  97. data/sig/zavudev/models/function_retrieve_params.rbs +23 -0
  98. data/sig/zavudev/models/function_retrieve_response.rbs +126 -0
  99. data/sig/zavudev/models/function_tail_logs_params.rbs +61 -0
  100. data/sig/zavudev/models/function_tail_logs_response.rbs +37 -0
  101. data/sig/zavudev/models/function_update_params.rbs +40 -0
  102. data/sig/zavudev/models/function_update_response.rbs +126 -0
  103. data/sig/zavudev/models/functions/secret_list_params.rbs +25 -0
  104. data/sig/zavudev/models/functions/secret_list_response.rbs +70 -0
  105. data/sig/zavudev/models/functions/secret_set_params.rbs +34 -0
  106. data/sig/zavudev/models/functions/secret_set_response.rbs +7 -0
  107. data/sig/zavudev/models/functions/secret_unset_params.rbs +30 -0
  108. data/sig/zavudev/models/me_retrieve_params.rbs +14 -0
  109. data/sig/zavudev/models/me_retrieve_response.rbs +75 -0
  110. data/sig/zavudev/models/message_content.rbs +9 -0
  111. data/sig/zavudev/models/message_show_typing_params.rbs +30 -0
  112. data/sig/zavudev/models/message_show_typing_response.rbs +13 -0
  113. data/sig/zavudev/models/senders/agent/execution_retrieve_params.rbs +32 -0
  114. data/sig/zavudev/models/senders/agent/execution_retrieve_response.rbs +18 -0
  115. data/sig/zavudev/models.rbs +22 -0
  116. data/sig/zavudev/resources/contacts.rbs +5 -0
  117. data/sig/zavudev/resources/functions/secrets.rbs +27 -0
  118. data/sig/zavudev/resources/functions.rbs +61 -0
  119. data/sig/zavudev/resources/me.rbs +11 -0
  120. data/sig/zavudev/resources/messages.rbs +6 -0
  121. data/sig/zavudev/resources/senders/agent/executions.rbs +6 -0
  122. metadata +89 -2
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zavudev
4
+ module Models
5
+ # @see Zavudev::Resources::Functions#get_deployment
6
+ class FunctionGetDeploymentParams < Zavudev::Internal::Type::BaseModel
7
+ extend Zavudev::Internal::Type::RequestParameters::Converter
8
+ include Zavudev::Internal::Type::RequestParameters
9
+
10
+ # @!attribute deployment_id
11
+ #
12
+ # @return [String]
13
+ required :deployment_id, String
14
+
15
+ # @!method initialize(deployment_id:, request_options: {})
16
+ # @param deployment_id [String]
17
+ # @param request_options [Zavudev::RequestOptions, Hash{Symbol=>Object}]
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,104 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zavudev
4
+ module Models
5
+ # @see Zavudev::Resources::Functions#get_deployment
6
+ class FunctionGetDeploymentResponse < Zavudev::Internal::Type::BaseModel
7
+ # @!attribute deployment
8
+ #
9
+ # @return [Zavudev::Models::FunctionGetDeploymentResponse::Deployment]
10
+ required :deployment, -> { Zavudev::Models::FunctionGetDeploymentResponse::Deployment }
11
+
12
+ # @!method initialize(deployment:)
13
+ # @param deployment [Zavudev::Models::FunctionGetDeploymentResponse::Deployment]
14
+
15
+ # @see Zavudev::Models::FunctionGetDeploymentResponse#deployment
16
+ class Deployment < Zavudev::Internal::Type::BaseModel
17
+ # @!attribute id
18
+ #
19
+ # @return [String]
20
+ required :id, String
21
+
22
+ # @!attribute created_at
23
+ #
24
+ # @return [Time]
25
+ required :created_at, Time, api_name: :createdAt
26
+
27
+ # @!attribute function_id
28
+ #
29
+ # @return [String]
30
+ required :function_id, String, api_name: :functionId
31
+
32
+ # @!attribute status
33
+ # Stage of a function deployment.
34
+ #
35
+ # @return [Symbol, Zavudev::Models::FunctionGetDeploymentResponse::Deployment::Status]
36
+ required :status, enum: -> { Zavudev::Models::FunctionGetDeploymentResponse::Deployment::Status }
37
+
38
+ # @!attribute version
39
+ # Monotonically increasing deployment version, starting at 1.
40
+ #
41
+ # @return [Integer]
42
+ required :version, Integer
43
+
44
+ # @!attribute bundle_bytes
45
+ #
46
+ # @return [Integer, nil]
47
+ optional :bundle_bytes, Integer, api_name: :bundleBytes, nil?: true
48
+
49
+ # @!attribute deployed_at
50
+ #
51
+ # @return [Time, nil]
52
+ optional :deployed_at, Time, api_name: :deployedAt, nil?: true
53
+
54
+ # @!attribute error_message
55
+ # Failure reason when status is 'failed'.
56
+ #
57
+ # @return [String, nil]
58
+ optional :error_message, String, api_name: :errorMessage, nil?: true
59
+
60
+ # @!attribute source_code_bytes
61
+ #
62
+ # @return [Integer, nil]
63
+ optional :source_code_bytes, Integer, api_name: :sourceCodeBytes, nil?: true
64
+
65
+ # @!method initialize(id:, created_at:, function_id:, status:, version:, bundle_bytes: nil, deployed_at: nil, error_message: nil, source_code_bytes: nil)
66
+ # @param id [String]
67
+ #
68
+ # @param created_at [Time]
69
+ #
70
+ # @param function_id [String]
71
+ #
72
+ # @param status [Symbol, Zavudev::Models::FunctionGetDeploymentResponse::Deployment::Status] Stage of a function deployment.
73
+ #
74
+ # @param version [Integer] Monotonically increasing deployment version, starting at 1.
75
+ #
76
+ # @param bundle_bytes [Integer, nil]
77
+ #
78
+ # @param deployed_at [Time, nil]
79
+ #
80
+ # @param error_message [String, nil] Failure reason when status is 'failed'.
81
+ #
82
+ # @param source_code_bytes [Integer, nil]
83
+
84
+ # Stage of a function deployment.
85
+ #
86
+ # @see Zavudev::Models::FunctionGetDeploymentResponse::Deployment#status
87
+ module Status
88
+ extend Zavudev::Internal::Type::Enum
89
+
90
+ PENDING = :pending
91
+ BUNDLING = :bundling
92
+ UPLOADING = :uploading
93
+ PUBLISHING = :publishing
94
+ ACTIVE = :active
95
+ FAILED = :failed
96
+ SUPERSEDED = :superseded
97
+
98
+ # @!method self.values
99
+ # @return [Array<Symbol>]
100
+ end
101
+ end
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zavudev
4
+ module Models
5
+ # @see Zavudev::Resources::Functions#retrieve
6
+ class FunctionRetrieveParams < Zavudev::Internal::Type::BaseModel
7
+ extend Zavudev::Internal::Type::RequestParameters::Converter
8
+ include Zavudev::Internal::Type::RequestParameters
9
+
10
+ # @!attribute function_id
11
+ #
12
+ # @return [String]
13
+ required :function_id, String
14
+
15
+ # @!method initialize(function_id:, request_options: {})
16
+ # @param function_id [String]
17
+ # @param request_options [Zavudev::RequestOptions, Hash{Symbol=>Object}]
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,168 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zavudev
4
+ module Models
5
+ # @see Zavudev::Resources::Functions#retrieve
6
+ class FunctionRetrieveResponse < Zavudev::Internal::Type::BaseModel
7
+ # @!attribute function
8
+ # A Zavu Function — user-supplied TypeScript that runs in Zavu Cloud and reacts to
9
+ # messaging events or HTTP requests.
10
+ #
11
+ # @return [Zavudev::Models::FunctionRetrieveResponse::Function]
12
+ required :function, -> { Zavudev::Models::FunctionRetrieveResponse::Function }
13
+
14
+ # @!method initialize(function:)
15
+ # Some parameter documentations has been truncated, see
16
+ # {Zavudev::Models::FunctionRetrieveResponse} for more details.
17
+ #
18
+ # @param function [Zavudev::Models::FunctionRetrieveResponse::Function] A Zavu Function — user-supplied TypeScript that runs in Zavu Cloud and reacts to
19
+
20
+ # @see Zavudev::Models::FunctionRetrieveResponse#function
21
+ class Function < Zavudev::Internal::Type::BaseModel
22
+ # @!attribute id
23
+ #
24
+ # @return [String]
25
+ required :id, String
26
+
27
+ # @!attribute created_at
28
+ #
29
+ # @return [Time]
30
+ required :created_at, Time, api_name: :createdAt
31
+
32
+ # @!attribute dependencies
33
+ # npm dependencies installed in the function bundle. Keys are package names,
34
+ # values are semver ranges.
35
+ #
36
+ # @return [Hash{Symbol=>String}]
37
+ required :dependencies, Zavudev::Internal::Type::HashOf[String]
38
+
39
+ # @!attribute http_enabled
40
+ # Whether the function can be invoked over HTTPS via its public URL.
41
+ #
42
+ # @return [Boolean]
43
+ required :http_enabled, Zavudev::Internal::Type::Boolean, api_name: :httpEnabled
44
+
45
+ # @!attribute memory_mb
46
+ # Memory allocation in MB.
47
+ #
48
+ # @return [Integer]
49
+ required :memory_mb, Integer, api_name: :memoryMb
50
+
51
+ # @!attribute name
52
+ #
53
+ # @return [String]
54
+ required :name, String
55
+
56
+ # @!attribute runtime
57
+ # Runtime the function is deployed on.
58
+ #
59
+ # @return [Symbol, Zavudev::Models::FunctionRetrieveResponse::Function::Runtime]
60
+ required :runtime, enum: -> { Zavudev::Models::FunctionRetrieveResponse::Function::Runtime }
61
+
62
+ # @!attribute slug
63
+ # URL-safe identifier, unique per project.
64
+ #
65
+ # @return [String]
66
+ required :slug, String
67
+
68
+ # @!attribute status
69
+ # Lifecycle status of a Zavu Function.
70
+ #
71
+ # @return [Symbol, Zavudev::Models::FunctionRetrieveResponse::Function::Status]
72
+ required :status, enum: -> { Zavudev::Models::FunctionRetrieveResponse::Function::Status }
73
+
74
+ # @!attribute timeout_sec
75
+ # Per-invocation timeout in seconds.
76
+ #
77
+ # @return [Integer]
78
+ required :timeout_sec, Integer, api_name: :timeoutSec
79
+
80
+ # @!attribute updated_at
81
+ #
82
+ # @return [Time]
83
+ required :updated_at, Time, api_name: :updatedAt
84
+
85
+ # @!attribute active_deployment_id
86
+ # ID of the deployment currently serving traffic.
87
+ #
88
+ # @return [String, nil]
89
+ optional :active_deployment_id, String, api_name: :activeDeploymentId, nil?: true
90
+
91
+ # @!attribute description
92
+ #
93
+ # @return [String, nil]
94
+ optional :description, String, nil?: true
95
+
96
+ # @!attribute public_url
97
+ # HTTPS endpoint when httpEnabled is true.
98
+ #
99
+ # @return [String, nil]
100
+ optional :public_url, String, api_name: :publicUrl, nil?: true
101
+
102
+ # @!method initialize(id:, created_at:, dependencies:, http_enabled:, memory_mb:, name:, runtime:, slug:, status:, timeout_sec:, updated_at:, active_deployment_id: nil, description: nil, public_url: nil)
103
+ # Some parameter documentations has been truncated, see
104
+ # {Zavudev::Models::FunctionRetrieveResponse::Function} for more details.
105
+ #
106
+ # A Zavu Function — user-supplied TypeScript that runs in Zavu Cloud and reacts to
107
+ # messaging events or HTTP requests.
108
+ #
109
+ # @param id [String]
110
+ #
111
+ # @param created_at [Time]
112
+ #
113
+ # @param dependencies [Hash{Symbol=>String}] npm dependencies installed in the function bundle. Keys are package names, value
114
+ #
115
+ # @param http_enabled [Boolean] Whether the function can be invoked over HTTPS via its public URL.
116
+ #
117
+ # @param memory_mb [Integer] Memory allocation in MB.
118
+ #
119
+ # @param name [String]
120
+ #
121
+ # @param runtime [Symbol, Zavudev::Models::FunctionRetrieveResponse::Function::Runtime] Runtime the function is deployed on.
122
+ #
123
+ # @param slug [String] URL-safe identifier, unique per project.
124
+ #
125
+ # @param status [Symbol, Zavudev::Models::FunctionRetrieveResponse::Function::Status] Lifecycle status of a Zavu Function.
126
+ #
127
+ # @param timeout_sec [Integer] Per-invocation timeout in seconds.
128
+ #
129
+ # @param updated_at [Time]
130
+ #
131
+ # @param active_deployment_id [String, nil] ID of the deployment currently serving traffic.
132
+ #
133
+ # @param description [String, nil]
134
+ #
135
+ # @param public_url [String, nil] HTTPS endpoint when httpEnabled is true.
136
+
137
+ # Runtime the function is deployed on.
138
+ #
139
+ # @see Zavudev::Models::FunctionRetrieveResponse::Function#runtime
140
+ module Runtime
141
+ extend Zavudev::Internal::Type::Enum
142
+
143
+ NODEJS24 = :nodejs24
144
+
145
+ # @!method self.values
146
+ # @return [Array<Symbol>]
147
+ end
148
+
149
+ # Lifecycle status of a Zavu Function.
150
+ #
151
+ # @see Zavudev::Models::FunctionRetrieveResponse::Function#status
152
+ module Status
153
+ extend Zavudev::Internal::Type::Enum
154
+
155
+ DRAFT = :draft
156
+ BUNDLING = :bundling
157
+ DEPLOYING = :deploying
158
+ ACTIVE = :active
159
+ FAILED = :failed
160
+ DISABLED = :disabled
161
+
162
+ # @!method self.values
163
+ # @return [Array<Symbol>]
164
+ end
165
+ end
166
+ end
167
+ end
168
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zavudev
4
+ module Models
5
+ # @see Zavudev::Resources::Functions#tail_logs
6
+ class FunctionTailLogsParams < Zavudev::Internal::Type::BaseModel
7
+ extend Zavudev::Internal::Type::RequestParameters::Converter
8
+ include Zavudev::Internal::Type::RequestParameters
9
+
10
+ # @!attribute function_id
11
+ #
12
+ # @return [String]
13
+ required :function_id, String
14
+
15
+ # @!attribute end_time
16
+ # End of the log window in Unix epoch milliseconds.
17
+ #
18
+ # @return [Integer, nil]
19
+ optional :end_time, Integer
20
+
21
+ # @!attribute filter_pattern
22
+ #
23
+ # @return [String, nil]
24
+ optional :filter_pattern, String
25
+
26
+ # @!attribute limit
27
+ #
28
+ # @return [Integer, nil]
29
+ optional :limit, Integer
30
+
31
+ # @!attribute next_token
32
+ #
33
+ # @return [String, nil]
34
+ optional :next_token, String
35
+
36
+ # @!attribute start_time
37
+ # Start of the log window in Unix epoch milliseconds.
38
+ #
39
+ # @return [Integer, nil]
40
+ optional :start_time, Integer
41
+
42
+ # @!method initialize(function_id:, end_time: nil, filter_pattern: nil, limit: nil, next_token: nil, start_time: nil, request_options: {})
43
+ # @param function_id [String]
44
+ #
45
+ # @param end_time [Integer] End of the log window in Unix epoch milliseconds.
46
+ #
47
+ # @param filter_pattern [String]
48
+ #
49
+ # @param limit [Integer]
50
+ #
51
+ # @param next_token [String]
52
+ #
53
+ # @param start_time [Integer] Start of the log window in Unix epoch milliseconds.
54
+ #
55
+ # @param request_options [Zavudev::RequestOptions, Hash{Symbol=>Object}]
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zavudev
4
+ module Models
5
+ # @see Zavudev::Resources::Functions#tail_logs
6
+ class FunctionTailLogsResponse < Zavudev::Internal::Type::BaseModel
7
+ # @!attribute events
8
+ #
9
+ # @return [Array<Zavudev::Models::FunctionTailLogsResponse::Event>]
10
+ required :events,
11
+ -> { Zavudev::Internal::Type::ArrayOf[Zavudev::Models::FunctionTailLogsResponse::Event] }
12
+
13
+ # @!attribute next_token
14
+ # Pass to the next request to fetch the following page of logs.
15
+ #
16
+ # @return [String, nil]
17
+ optional :next_token, String, api_name: :nextToken, nil?: true
18
+
19
+ # @!method initialize(events:, next_token: nil)
20
+ # @param events [Array<Zavudev::Models::FunctionTailLogsResponse::Event>]
21
+ #
22
+ # @param next_token [String, nil] Pass to the next request to fetch the following page of logs.
23
+
24
+ class Event < Zavudev::Internal::Type::BaseModel
25
+ # @!attribute message
26
+ #
27
+ # @return [String]
28
+ required :message, String
29
+
30
+ # @!attribute timestamp
31
+ #
32
+ # @return [Time]
33
+ required :timestamp, Time
34
+
35
+ # @!method initialize(message:, timestamp:)
36
+ # @param message [String]
37
+ # @param timestamp [Time]
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zavudev
4
+ module Models
5
+ # @see Zavudev::Resources::Functions#update
6
+ class FunctionUpdateParams < Zavudev::Internal::Type::BaseModel
7
+ extend Zavudev::Internal::Type::RequestParameters::Converter
8
+ include Zavudev::Internal::Type::RequestParameters
9
+
10
+ # @!attribute function_id
11
+ #
12
+ # @return [String]
13
+ required :function_id, String
14
+
15
+ # @!attribute dependencies
16
+ # New dependency map (replaces existing dependencies).
17
+ #
18
+ # @return [Hash{Symbol=>String}, nil]
19
+ optional :dependencies, Zavudev::Internal::Type::HashOf[String]
20
+
21
+ # @!attribute source_code
22
+ # New source code to publish (replaces the draft).
23
+ #
24
+ # @return [String, nil]
25
+ optional :source_code, String, api_name: :sourceCode
26
+
27
+ # @!method initialize(function_id:, dependencies: nil, source_code: nil, request_options: {})
28
+ # @param function_id [String]
29
+ #
30
+ # @param dependencies [Hash{Symbol=>String}] New dependency map (replaces existing dependencies).
31
+ #
32
+ # @param source_code [String] New source code to publish (replaces the draft).
33
+ #
34
+ # @param request_options [Zavudev::RequestOptions, Hash{Symbol=>Object}]
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,168 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zavudev
4
+ module Models
5
+ # @see Zavudev::Resources::Functions#update
6
+ class FunctionUpdateResponse < Zavudev::Internal::Type::BaseModel
7
+ # @!attribute function
8
+ # A Zavu Function — user-supplied TypeScript that runs in Zavu Cloud and reacts to
9
+ # messaging events or HTTP requests.
10
+ #
11
+ # @return [Zavudev::Models::FunctionUpdateResponse::Function]
12
+ required :function, -> { Zavudev::Models::FunctionUpdateResponse::Function }
13
+
14
+ # @!method initialize(function:)
15
+ # Some parameter documentations has been truncated, see
16
+ # {Zavudev::Models::FunctionUpdateResponse} for more details.
17
+ #
18
+ # @param function [Zavudev::Models::FunctionUpdateResponse::Function] A Zavu Function — user-supplied TypeScript that runs in Zavu Cloud and reacts to
19
+
20
+ # @see Zavudev::Models::FunctionUpdateResponse#function
21
+ class Function < Zavudev::Internal::Type::BaseModel
22
+ # @!attribute id
23
+ #
24
+ # @return [String]
25
+ required :id, String
26
+
27
+ # @!attribute created_at
28
+ #
29
+ # @return [Time]
30
+ required :created_at, Time, api_name: :createdAt
31
+
32
+ # @!attribute dependencies
33
+ # npm dependencies installed in the function bundle. Keys are package names,
34
+ # values are semver ranges.
35
+ #
36
+ # @return [Hash{Symbol=>String}]
37
+ required :dependencies, Zavudev::Internal::Type::HashOf[String]
38
+
39
+ # @!attribute http_enabled
40
+ # Whether the function can be invoked over HTTPS via its public URL.
41
+ #
42
+ # @return [Boolean]
43
+ required :http_enabled, Zavudev::Internal::Type::Boolean, api_name: :httpEnabled
44
+
45
+ # @!attribute memory_mb
46
+ # Memory allocation in MB.
47
+ #
48
+ # @return [Integer]
49
+ required :memory_mb, Integer, api_name: :memoryMb
50
+
51
+ # @!attribute name
52
+ #
53
+ # @return [String]
54
+ required :name, String
55
+
56
+ # @!attribute runtime
57
+ # Runtime the function is deployed on.
58
+ #
59
+ # @return [Symbol, Zavudev::Models::FunctionUpdateResponse::Function::Runtime]
60
+ required :runtime, enum: -> { Zavudev::Models::FunctionUpdateResponse::Function::Runtime }
61
+
62
+ # @!attribute slug
63
+ # URL-safe identifier, unique per project.
64
+ #
65
+ # @return [String]
66
+ required :slug, String
67
+
68
+ # @!attribute status
69
+ # Lifecycle status of a Zavu Function.
70
+ #
71
+ # @return [Symbol, Zavudev::Models::FunctionUpdateResponse::Function::Status]
72
+ required :status, enum: -> { Zavudev::Models::FunctionUpdateResponse::Function::Status }
73
+
74
+ # @!attribute timeout_sec
75
+ # Per-invocation timeout in seconds.
76
+ #
77
+ # @return [Integer]
78
+ required :timeout_sec, Integer, api_name: :timeoutSec
79
+
80
+ # @!attribute updated_at
81
+ #
82
+ # @return [Time]
83
+ required :updated_at, Time, api_name: :updatedAt
84
+
85
+ # @!attribute active_deployment_id
86
+ # ID of the deployment currently serving traffic.
87
+ #
88
+ # @return [String, nil]
89
+ optional :active_deployment_id, String, api_name: :activeDeploymentId, nil?: true
90
+
91
+ # @!attribute description
92
+ #
93
+ # @return [String, nil]
94
+ optional :description, String, nil?: true
95
+
96
+ # @!attribute public_url
97
+ # HTTPS endpoint when httpEnabled is true.
98
+ #
99
+ # @return [String, nil]
100
+ optional :public_url, String, api_name: :publicUrl, nil?: true
101
+
102
+ # @!method initialize(id:, created_at:, dependencies:, http_enabled:, memory_mb:, name:, runtime:, slug:, status:, timeout_sec:, updated_at:, active_deployment_id: nil, description: nil, public_url: nil)
103
+ # Some parameter documentations has been truncated, see
104
+ # {Zavudev::Models::FunctionUpdateResponse::Function} for more details.
105
+ #
106
+ # A Zavu Function — user-supplied TypeScript that runs in Zavu Cloud and reacts to
107
+ # messaging events or HTTP requests.
108
+ #
109
+ # @param id [String]
110
+ #
111
+ # @param created_at [Time]
112
+ #
113
+ # @param dependencies [Hash{Symbol=>String}] npm dependencies installed in the function bundle. Keys are package names, value
114
+ #
115
+ # @param http_enabled [Boolean] Whether the function can be invoked over HTTPS via its public URL.
116
+ #
117
+ # @param memory_mb [Integer] Memory allocation in MB.
118
+ #
119
+ # @param name [String]
120
+ #
121
+ # @param runtime [Symbol, Zavudev::Models::FunctionUpdateResponse::Function::Runtime] Runtime the function is deployed on.
122
+ #
123
+ # @param slug [String] URL-safe identifier, unique per project.
124
+ #
125
+ # @param status [Symbol, Zavudev::Models::FunctionUpdateResponse::Function::Status] Lifecycle status of a Zavu Function.
126
+ #
127
+ # @param timeout_sec [Integer] Per-invocation timeout in seconds.
128
+ #
129
+ # @param updated_at [Time]
130
+ #
131
+ # @param active_deployment_id [String, nil] ID of the deployment currently serving traffic.
132
+ #
133
+ # @param description [String, nil]
134
+ #
135
+ # @param public_url [String, nil] HTTPS endpoint when httpEnabled is true.
136
+
137
+ # Runtime the function is deployed on.
138
+ #
139
+ # @see Zavudev::Models::FunctionUpdateResponse::Function#runtime
140
+ module Runtime
141
+ extend Zavudev::Internal::Type::Enum
142
+
143
+ NODEJS24 = :nodejs24
144
+
145
+ # @!method self.values
146
+ # @return [Array<Symbol>]
147
+ end
148
+
149
+ # Lifecycle status of a Zavu Function.
150
+ #
151
+ # @see Zavudev::Models::FunctionUpdateResponse::Function#status
152
+ module Status
153
+ extend Zavudev::Internal::Type::Enum
154
+
155
+ DRAFT = :draft
156
+ BUNDLING = :bundling
157
+ DEPLOYING = :deploying
158
+ ACTIVE = :active
159
+ FAILED = :failed
160
+ DISABLED = :disabled
161
+
162
+ # @!method self.values
163
+ # @return [Array<Symbol>]
164
+ end
165
+ end
166
+ end
167
+ end
168
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zavudev
4
+ module Models
5
+ module Functions
6
+ # @see Zavudev::Resources::Functions::Secrets#list
7
+ class SecretListParams < Zavudev::Internal::Type::BaseModel
8
+ extend Zavudev::Internal::Type::RequestParameters::Converter
9
+ include Zavudev::Internal::Type::RequestParameters
10
+
11
+ # @!attribute function_id
12
+ #
13
+ # @return [String]
14
+ required :function_id, String
15
+
16
+ # @!method initialize(function_id:, request_options: {})
17
+ # @param function_id [String]
18
+ # @param request_options [Zavudev::RequestOptions, Hash{Symbol=>Object}]
19
+ end
20
+ end
21
+ end
22
+ end