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,196 @@
1
+ # typed: strong
2
+
3
+ module Zavudev
4
+ module Models
5
+ class FunctionDeployResponse < Zavudev::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Zavudev::Models::FunctionDeployResponse,
10
+ Zavudev::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ sig { returns(Zavudev::Models::FunctionDeployResponse::Deployment) }
15
+ attr_reader :deployment
16
+
17
+ sig do
18
+ params(
19
+ deployment:
20
+ Zavudev::Models::FunctionDeployResponse::Deployment::OrHash
21
+ ).void
22
+ end
23
+ attr_writer :deployment
24
+
25
+ sig do
26
+ params(
27
+ deployment:
28
+ Zavudev::Models::FunctionDeployResponse::Deployment::OrHash
29
+ ).returns(T.attached_class)
30
+ end
31
+ def self.new(deployment:)
32
+ end
33
+
34
+ sig do
35
+ override.returns(
36
+ { deployment: Zavudev::Models::FunctionDeployResponse::Deployment }
37
+ )
38
+ end
39
+ def to_hash
40
+ end
41
+
42
+ class Deployment < Zavudev::Internal::Type::BaseModel
43
+ OrHash =
44
+ T.type_alias do
45
+ T.any(
46
+ Zavudev::Models::FunctionDeployResponse::Deployment,
47
+ Zavudev::Internal::AnyHash
48
+ )
49
+ end
50
+
51
+ sig { returns(String) }
52
+ attr_accessor :id
53
+
54
+ sig { returns(Time) }
55
+ attr_accessor :created_at
56
+
57
+ sig { returns(String) }
58
+ attr_accessor :function_id
59
+
60
+ # Stage of a function deployment.
61
+ sig do
62
+ returns(
63
+ Zavudev::Models::FunctionDeployResponse::Deployment::Status::TaggedSymbol
64
+ )
65
+ end
66
+ attr_accessor :status
67
+
68
+ # Monotonically increasing deployment version, starting at 1.
69
+ sig { returns(Integer) }
70
+ attr_accessor :version
71
+
72
+ sig { returns(T.nilable(Integer)) }
73
+ attr_accessor :bundle_bytes
74
+
75
+ sig { returns(T.nilable(Time)) }
76
+ attr_accessor :deployed_at
77
+
78
+ # Failure reason when status is 'failed'.
79
+ sig { returns(T.nilable(String)) }
80
+ attr_accessor :error_message
81
+
82
+ sig { returns(T.nilable(Integer)) }
83
+ attr_accessor :source_code_bytes
84
+
85
+ sig do
86
+ params(
87
+ id: String,
88
+ created_at: Time,
89
+ function_id: String,
90
+ status:
91
+ Zavudev::Models::FunctionDeployResponse::Deployment::Status::OrSymbol,
92
+ version: Integer,
93
+ bundle_bytes: T.nilable(Integer),
94
+ deployed_at: T.nilable(Time),
95
+ error_message: T.nilable(String),
96
+ source_code_bytes: T.nilable(Integer)
97
+ ).returns(T.attached_class)
98
+ end
99
+ def self.new(
100
+ id:,
101
+ created_at:,
102
+ function_id:,
103
+ # Stage of a function deployment.
104
+ status:,
105
+ # Monotonically increasing deployment version, starting at 1.
106
+ version:,
107
+ bundle_bytes: nil,
108
+ deployed_at: nil,
109
+ # Failure reason when status is 'failed'.
110
+ error_message: nil,
111
+ source_code_bytes: nil
112
+ )
113
+ end
114
+
115
+ sig do
116
+ override.returns(
117
+ {
118
+ id: String,
119
+ created_at: Time,
120
+ function_id: String,
121
+ status:
122
+ Zavudev::Models::FunctionDeployResponse::Deployment::Status::TaggedSymbol,
123
+ version: Integer,
124
+ bundle_bytes: T.nilable(Integer),
125
+ deployed_at: T.nilable(Time),
126
+ error_message: T.nilable(String),
127
+ source_code_bytes: T.nilable(Integer)
128
+ }
129
+ )
130
+ end
131
+ def to_hash
132
+ end
133
+
134
+ # Stage of a function deployment.
135
+ module Status
136
+ extend Zavudev::Internal::Type::Enum
137
+
138
+ TaggedSymbol =
139
+ T.type_alias do
140
+ T.all(
141
+ Symbol,
142
+ Zavudev::Models::FunctionDeployResponse::Deployment::Status
143
+ )
144
+ end
145
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
146
+
147
+ PENDING =
148
+ T.let(
149
+ :pending,
150
+ Zavudev::Models::FunctionDeployResponse::Deployment::Status::TaggedSymbol
151
+ )
152
+ BUNDLING =
153
+ T.let(
154
+ :bundling,
155
+ Zavudev::Models::FunctionDeployResponse::Deployment::Status::TaggedSymbol
156
+ )
157
+ UPLOADING =
158
+ T.let(
159
+ :uploading,
160
+ Zavudev::Models::FunctionDeployResponse::Deployment::Status::TaggedSymbol
161
+ )
162
+ PUBLISHING =
163
+ T.let(
164
+ :publishing,
165
+ Zavudev::Models::FunctionDeployResponse::Deployment::Status::TaggedSymbol
166
+ )
167
+ ACTIVE =
168
+ T.let(
169
+ :active,
170
+ Zavudev::Models::FunctionDeployResponse::Deployment::Status::TaggedSymbol
171
+ )
172
+ FAILED =
173
+ T.let(
174
+ :failed,
175
+ Zavudev::Models::FunctionDeployResponse::Deployment::Status::TaggedSymbol
176
+ )
177
+ SUPERSEDED =
178
+ T.let(
179
+ :superseded,
180
+ Zavudev::Models::FunctionDeployResponse::Deployment::Status::TaggedSymbol
181
+ )
182
+
183
+ sig do
184
+ override.returns(
185
+ T::Array[
186
+ Zavudev::Models::FunctionDeployResponse::Deployment::Status::TaggedSymbol
187
+ ]
188
+ )
189
+ end
190
+ def self.values
191
+ end
192
+ end
193
+ end
194
+ end
195
+ end
196
+ end
@@ -0,0 +1,38 @@
1
+ # typed: strong
2
+
3
+ module Zavudev
4
+ module Models
5
+ class FunctionGetDeploymentParams < Zavudev::Internal::Type::BaseModel
6
+ extend Zavudev::Internal::Type::RequestParameters::Converter
7
+ include Zavudev::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Zavudev::FunctionGetDeploymentParams,
13
+ Zavudev::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :deployment_id
19
+
20
+ sig do
21
+ params(
22
+ deployment_id: String,
23
+ request_options: Zavudev::RequestOptions::OrHash
24
+ ).returns(T.attached_class)
25
+ end
26
+ def self.new(deployment_id:, request_options: {})
27
+ end
28
+
29
+ sig do
30
+ override.returns(
31
+ { deployment_id: String, request_options: Zavudev::RequestOptions }
32
+ )
33
+ end
34
+ def to_hash
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,201 @@
1
+ # typed: strong
2
+
3
+ module Zavudev
4
+ module Models
5
+ class FunctionGetDeploymentResponse < Zavudev::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Zavudev::Models::FunctionGetDeploymentResponse,
10
+ Zavudev::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ sig do
15
+ returns(Zavudev::Models::FunctionGetDeploymentResponse::Deployment)
16
+ end
17
+ attr_reader :deployment
18
+
19
+ sig do
20
+ params(
21
+ deployment:
22
+ Zavudev::Models::FunctionGetDeploymentResponse::Deployment::OrHash
23
+ ).void
24
+ end
25
+ attr_writer :deployment
26
+
27
+ sig do
28
+ params(
29
+ deployment:
30
+ Zavudev::Models::FunctionGetDeploymentResponse::Deployment::OrHash
31
+ ).returns(T.attached_class)
32
+ end
33
+ def self.new(deployment:)
34
+ end
35
+
36
+ sig do
37
+ override.returns(
38
+ {
39
+ deployment:
40
+ Zavudev::Models::FunctionGetDeploymentResponse::Deployment
41
+ }
42
+ )
43
+ end
44
+ def to_hash
45
+ end
46
+
47
+ class Deployment < Zavudev::Internal::Type::BaseModel
48
+ OrHash =
49
+ T.type_alias do
50
+ T.any(
51
+ Zavudev::Models::FunctionGetDeploymentResponse::Deployment,
52
+ Zavudev::Internal::AnyHash
53
+ )
54
+ end
55
+
56
+ sig { returns(String) }
57
+ attr_accessor :id
58
+
59
+ sig { returns(Time) }
60
+ attr_accessor :created_at
61
+
62
+ sig { returns(String) }
63
+ attr_accessor :function_id
64
+
65
+ # Stage of a function deployment.
66
+ sig do
67
+ returns(
68
+ Zavudev::Models::FunctionGetDeploymentResponse::Deployment::Status::TaggedSymbol
69
+ )
70
+ end
71
+ attr_accessor :status
72
+
73
+ # Monotonically increasing deployment version, starting at 1.
74
+ sig { returns(Integer) }
75
+ attr_accessor :version
76
+
77
+ sig { returns(T.nilable(Integer)) }
78
+ attr_accessor :bundle_bytes
79
+
80
+ sig { returns(T.nilable(Time)) }
81
+ attr_accessor :deployed_at
82
+
83
+ # Failure reason when status is 'failed'.
84
+ sig { returns(T.nilable(String)) }
85
+ attr_accessor :error_message
86
+
87
+ sig { returns(T.nilable(Integer)) }
88
+ attr_accessor :source_code_bytes
89
+
90
+ sig do
91
+ params(
92
+ id: String,
93
+ created_at: Time,
94
+ function_id: String,
95
+ status:
96
+ Zavudev::Models::FunctionGetDeploymentResponse::Deployment::Status::OrSymbol,
97
+ version: Integer,
98
+ bundle_bytes: T.nilable(Integer),
99
+ deployed_at: T.nilable(Time),
100
+ error_message: T.nilable(String),
101
+ source_code_bytes: T.nilable(Integer)
102
+ ).returns(T.attached_class)
103
+ end
104
+ def self.new(
105
+ id:,
106
+ created_at:,
107
+ function_id:,
108
+ # Stage of a function deployment.
109
+ status:,
110
+ # Monotonically increasing deployment version, starting at 1.
111
+ version:,
112
+ bundle_bytes: nil,
113
+ deployed_at: nil,
114
+ # Failure reason when status is 'failed'.
115
+ error_message: nil,
116
+ source_code_bytes: nil
117
+ )
118
+ end
119
+
120
+ sig do
121
+ override.returns(
122
+ {
123
+ id: String,
124
+ created_at: Time,
125
+ function_id: String,
126
+ status:
127
+ Zavudev::Models::FunctionGetDeploymentResponse::Deployment::Status::TaggedSymbol,
128
+ version: Integer,
129
+ bundle_bytes: T.nilable(Integer),
130
+ deployed_at: T.nilable(Time),
131
+ error_message: T.nilable(String),
132
+ source_code_bytes: T.nilable(Integer)
133
+ }
134
+ )
135
+ end
136
+ def to_hash
137
+ end
138
+
139
+ # Stage of a function deployment.
140
+ module Status
141
+ extend Zavudev::Internal::Type::Enum
142
+
143
+ TaggedSymbol =
144
+ T.type_alias do
145
+ T.all(
146
+ Symbol,
147
+ Zavudev::Models::FunctionGetDeploymentResponse::Deployment::Status
148
+ )
149
+ end
150
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
151
+
152
+ PENDING =
153
+ T.let(
154
+ :pending,
155
+ Zavudev::Models::FunctionGetDeploymentResponse::Deployment::Status::TaggedSymbol
156
+ )
157
+ BUNDLING =
158
+ T.let(
159
+ :bundling,
160
+ Zavudev::Models::FunctionGetDeploymentResponse::Deployment::Status::TaggedSymbol
161
+ )
162
+ UPLOADING =
163
+ T.let(
164
+ :uploading,
165
+ Zavudev::Models::FunctionGetDeploymentResponse::Deployment::Status::TaggedSymbol
166
+ )
167
+ PUBLISHING =
168
+ T.let(
169
+ :publishing,
170
+ Zavudev::Models::FunctionGetDeploymentResponse::Deployment::Status::TaggedSymbol
171
+ )
172
+ ACTIVE =
173
+ T.let(
174
+ :active,
175
+ Zavudev::Models::FunctionGetDeploymentResponse::Deployment::Status::TaggedSymbol
176
+ )
177
+ FAILED =
178
+ T.let(
179
+ :failed,
180
+ Zavudev::Models::FunctionGetDeploymentResponse::Deployment::Status::TaggedSymbol
181
+ )
182
+ SUPERSEDED =
183
+ T.let(
184
+ :superseded,
185
+ Zavudev::Models::FunctionGetDeploymentResponse::Deployment::Status::TaggedSymbol
186
+ )
187
+
188
+ sig do
189
+ override.returns(
190
+ T::Array[
191
+ Zavudev::Models::FunctionGetDeploymentResponse::Deployment::Status::TaggedSymbol
192
+ ]
193
+ )
194
+ end
195
+ def self.values
196
+ end
197
+ end
198
+ end
199
+ end
200
+ end
201
+ end
@@ -0,0 +1,35 @@
1
+ # typed: strong
2
+
3
+ module Zavudev
4
+ module Models
5
+ class FunctionRetrieveParams < Zavudev::Internal::Type::BaseModel
6
+ extend Zavudev::Internal::Type::RequestParameters::Converter
7
+ include Zavudev::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Zavudev::FunctionRetrieveParams, Zavudev::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :function_id
16
+
17
+ sig do
18
+ params(
19
+ function_id: String,
20
+ request_options: Zavudev::RequestOptions::OrHash
21
+ ).returns(T.attached_class)
22
+ end
23
+ def self.new(function_id:, request_options: {})
24
+ end
25
+
26
+ sig do
27
+ override.returns(
28
+ { function_id: String, request_options: Zavudev::RequestOptions }
29
+ )
30
+ end
31
+ def to_hash
32
+ end
33
+ end
34
+ end
35
+ end