moonbase-sdk 0.1.0.pre.alpha.7 → 0.1.0.pre.alpha.8

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 (81) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/moonbase/client.rb +19 -4
  5. data/lib/moonbase/models/call.rb +85 -1
  6. data/lib/moonbase/models/call_list_params.rb +46 -0
  7. data/lib/moonbase/models/call_retrieve_params.rb +37 -0
  8. data/lib/moonbase/models/client_search_params.rb +20 -0
  9. data/lib/moonbase/models/collections/item_list_params.rb +18 -1
  10. data/lib/moonbase/models/collections/item_search_params.rb +74 -0
  11. data/lib/moonbase/models/collections/item_search_response.rb +25 -0
  12. data/lib/moonbase/models/file_delete_params.rb +14 -0
  13. data/lib/moonbase/models/items_filter.rb +30 -0
  14. data/lib/moonbase/models/items_filter_and_group.rb +29 -0
  15. data/lib/moonbase/models/items_filter_not_group.rb +23 -0
  16. data/lib/moonbase/models/items_filter_or_group.rb +29 -0
  17. data/lib/moonbase/models/items_filter_value_exists.rb +25 -0
  18. data/lib/moonbase/models/items_filter_value_matches.rb +81 -0
  19. data/lib/moonbase/models/note_delete_params.rb +14 -0
  20. data/lib/moonbase/models/search_response.rb +41 -0
  21. data/lib/moonbase/models.rb +21 -1
  22. data/lib/moonbase/resources/calls.rb +57 -0
  23. data/lib/moonbase/resources/collections/items.rb +45 -1
  24. data/lib/moonbase/resources/files.rb +20 -0
  25. data/lib/moonbase/resources/notes.rb +20 -0
  26. data/lib/moonbase/version.rb +1 -1
  27. data/lib/moonbase.rb +14 -3
  28. data/rbi/moonbase/client.rbi +9 -3
  29. data/rbi/moonbase/models/call.rbi +149 -1
  30. data/rbi/moonbase/models/call_list_params.rbi +78 -0
  31. data/rbi/moonbase/models/call_retrieve_params.rbi +81 -0
  32. data/rbi/moonbase/models/client_search_params.rbi +35 -0
  33. data/rbi/moonbase/models/collections/item_list_params.rbi +24 -0
  34. data/rbi/moonbase/models/collections/item_search_params.rbi +157 -0
  35. data/rbi/moonbase/models/collections/item_search_response.rbi +38 -0
  36. data/rbi/moonbase/models/file_delete_params.rbi +27 -0
  37. data/rbi/moonbase/models/items_filter.rbi +26 -0
  38. data/rbi/moonbase/models/items_filter_and_group.rbi +42 -0
  39. data/rbi/moonbase/models/items_filter_not_group.rbi +35 -0
  40. data/rbi/moonbase/models/items_filter_or_group.rbi +42 -0
  41. data/rbi/moonbase/models/items_filter_value_exists.rbi +32 -0
  42. data/rbi/moonbase/models/items_filter_value_matches.rbi +118 -0
  43. data/rbi/moonbase/models/note_delete_params.rbi +27 -0
  44. data/rbi/moonbase/models/search_response.rbi +70 -0
  45. data/rbi/moonbase/models.rbi +21 -1
  46. data/rbi/moonbase/resources/calls.rbi +43 -0
  47. data/rbi/moonbase/resources/collections/items.rbi +58 -0
  48. data/rbi/moonbase/resources/files.rbi +14 -0
  49. data/rbi/moonbase/resources/notes.rbi +14 -0
  50. data/sig/moonbase/client.rbs +5 -2
  51. data/sig/moonbase/models/call.rbs +79 -2
  52. data/sig/moonbase/models/call_list_params.rbs +38 -0
  53. data/sig/moonbase/models/call_retrieve_params.rbs +40 -0
  54. data/sig/moonbase/models/client_search_params.rbs +23 -0
  55. data/sig/moonbase/models/collections/item_list_params.rbs +19 -1
  56. data/sig/moonbase/models/collections/item_search_params.rbs +67 -0
  57. data/sig/moonbase/models/collections/item_search_response.rbs +15 -0
  58. data/sig/moonbase/models/file_delete_params.rbs +15 -0
  59. data/sig/moonbase/models/items_filter.rbs +16 -0
  60. data/sig/moonbase/models/items_filter_and_group.rbs +22 -0
  61. data/sig/moonbase/models/items_filter_not_group.rbs +19 -0
  62. data/sig/moonbase/models/items_filter_or_group.rbs +22 -0
  63. data/sig/moonbase/models/items_filter_value_exists.rbs +15 -0
  64. data/sig/moonbase/models/items_filter_value_matches.rbs +67 -0
  65. data/sig/moonbase/models/note_delete_params.rbs +15 -0
  66. data/sig/moonbase/models/search_response.rbs +32 -0
  67. data/sig/moonbase/models.rbs +21 -1
  68. data/sig/moonbase/resources/calls.rbs +13 -0
  69. data/sig/moonbase/resources/collections/items.rbs +13 -0
  70. data/sig/moonbase/resources/files.rbs +2 -0
  71. data/sig/moonbase/resources/notes.rbs +2 -0
  72. metadata +44 -11
  73. data/lib/moonbase/models/item_search_params.rb +0 -53
  74. data/lib/moonbase/models/item_search_response.rb +0 -22
  75. data/lib/moonbase/resources/items.rb +0 -38
  76. data/rbi/moonbase/models/item_search_params.rbi +0 -119
  77. data/rbi/moonbase/models/item_search_response.rbi +0 -33
  78. data/rbi/moonbase/resources/items.rbi +0 -29
  79. data/sig/moonbase/models/item_search_params.rbs +0 -63
  80. data/sig/moonbase/models/item_search_response.rbs +0 -15
  81. data/sig/moonbase/resources/items.rbs +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 152175f6a749114154155328a0e652c1aaa2f0708e25f9ad036a6f289e255b8c
4
- data.tar.gz: f3ac09e2b7402221821ce8c9657423d76672d609bee8f7dfa1895606f0a191d0
3
+ metadata.gz: e03284abe6f7fc28ddef264df8add1e58c2ea12ed0c615ee3a381a1a561135e8
4
+ data.tar.gz: 7fd59defee63bb9da6221286420017ec6bd756fb37668be56620840ab6ba7d6e
5
5
  SHA512:
6
- metadata.gz: b683ac149d1606cfbc4b9501a753ad78c645f1b24d1e1a32376e5cce60fcc924a13cbd69d18e7475629e6483938db886a92590d4e433d66f48ebc5eb06b8a494
7
- data.tar.gz: d28d6a89f04dd6a25a846a02a821fb2f56ca838b9da287d90936d5e30b4dfe4b213c0ae5878a31475fe248391c48afe9bc96cba03ca0522a56940bfcf859a788
6
+ metadata.gz: 7fe47484e421bb3412ea1d91229d70f4ddb099e6f20a55b5ed4715e1e560c26e3a950bb2fb4c134fd0570d6001cd87d457944c5ba2f0479166406480bc7437a8
7
+ data.tar.gz: c12b4dc94ebe53d337f24ad01ca2265654db25ac8f24d4534db916ad636b31897f1e8af374b5a59e03429df370ba91f53fa2da4451baab4751fd6b007e0ad560
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.8 (2026-02-23)
4
+
5
+ Full Changelog: [v0.1.0-alpha.7...v0.1.0-alpha.8](https://github.com/moonbaseai/moonbase-sdk-ruby/compare/v0.1.0-alpha.7...v0.1.0-alpha.8)
6
+
7
+ ### Features
8
+
9
+ * **api:** add search resource, move items.search to collections.items, add include/sort params ([d99456c](https://github.com/moonbaseai/moonbase-sdk-ruby/commit/d99456c265311a9c11e88f73ed405a8b34570eb9))
10
+
11
+
12
+ ### Chores
13
+
14
+ * update mock server docs ([cefe0f8](https://github.com/moonbaseai/moonbase-sdk-ruby/commit/cefe0f8a2f94b567596d621d8f993d15b3c8a6dd))
15
+
3
16
  ## 0.1.0-alpha.7 (2026-02-09)
4
17
 
5
18
  Full Changelog: [v0.1.0-alpha.6...v0.1.0-alpha.7](https://github.com/moonbaseai/moonbase-sdk-ruby/compare/v0.1.0-alpha.6...v0.1.0-alpha.7)
data/README.md CHANGED
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "moonbase-sdk", "~> 0.1.0.pre.alpha.7"
27
+ gem "moonbase-sdk", "~> 0.1.0.pre.alpha.8"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -25,9 +25,6 @@ module Moonbase
25
25
  # @return [Moonbase::Resources::Collections]
26
26
  attr_reader :collections
27
27
 
28
- # @return [Moonbase::Resources::Items]
29
- attr_reader :items
30
-
31
28
  # @return [Moonbase::Resources::Views]
32
29
  attr_reader :views
33
30
 
@@ -76,6 +73,25 @@ module Moonbase
76
73
  # @return [Moonbase::Resources::AgentSettings]
77
74
  attr_reader :agent_settings
78
75
 
76
+ # @overload search(query:, request_options: {})
77
+ #
78
+ # @param query [String]
79
+ # @param request_options [Moonbase::RequestOptions, Hash{Symbol=>Object}, nil]
80
+ #
81
+ # @return [Moonbase::Models::SearchResponse]
82
+ #
83
+ # @see Moonbase::Models::ClientSearchParams
84
+ def search(params)
85
+ parsed, options = Moonbase::ClientSearchParams.dump_request(params)
86
+ request(
87
+ method: :post,
88
+ path: "search",
89
+ query: parsed,
90
+ model: Moonbase::Models::SearchResponse,
91
+ options: options
92
+ )
93
+ end
94
+
79
95
  # @api private
80
96
  #
81
97
  # @return [Hash{String=>String}]
@@ -125,7 +141,6 @@ module Moonbase
125
141
 
126
142
  @funnels = Moonbase::Resources::Funnels.new(client: self)
127
143
  @collections = Moonbase::Resources::Collections.new(client: self)
128
- @items = Moonbase::Resources::Items.new(client: self)
129
144
  @views = Moonbase::Resources::Views.new(client: self)
130
145
  @inboxes = Moonbase::Resources::Inboxes.new(client: self)
131
146
  @inbox_conversations = Moonbase::Resources::InboxConversations.new(client: self)
@@ -76,13 +76,35 @@ module Moonbase
76
76
  # @return [Time, nil]
77
77
  optional :end_at, Time
78
78
 
79
+ # @!attribute note
80
+ # The Note object represents a block of text content, often used for meeting notes
81
+ # or summaries.
82
+ #
83
+ # @return [Moonbase::Models::Note, nil]
84
+ optional :note, -> { Moonbase::Note }
85
+
79
86
  # @!attribute provider_metadata
80
87
  # A hash of additional metadata from the provider.
81
88
  #
82
89
  # @return [Hash{Symbol=>Object}, nil]
83
90
  optional :provider_metadata, Moonbase::Internal::Type::HashOf[Moonbase::Internal::Type::Unknown]
84
91
 
85
- # @!method initialize(id:, created_at:, direction:, participants:, provider:, provider_id:, provider_status:, start_at:, updated_at:, answered_at: nil, end_at: nil, provider_metadata: nil, type: :call)
92
+ # @!attribute summary
93
+ # The Note object represents a block of text content, often used for meeting notes
94
+ # or summaries.
95
+ #
96
+ # @return [Moonbase::Models::Note, nil]
97
+ optional :summary, -> { Moonbase::Note }
98
+
99
+ # @!attribute transcript
100
+ #
101
+ # @return [Moonbase::Models::Call::Transcript, nil]
102
+ optional :transcript, -> { Moonbase::Call::Transcript }, nil?: true
103
+
104
+ # @!method initialize(id:, created_at:, direction:, participants:, provider:, provider_id:, provider_status:, start_at:, updated_at:, answered_at: nil, end_at: nil, note: nil, provider_metadata: nil, summary: nil, transcript: nil, type: :call)
105
+ # Some parameter documentations has been truncated, see {Moonbase::Models::Call}
106
+ # for more details.
107
+ #
86
108
  # The Call object represents a phone call that has been logged in the system. It
87
109
  # contains details about the participants, timing, and outcome of the call.
88
110
  #
@@ -108,8 +130,14 @@ module Moonbase
108
130
  #
109
131
  # @param end_at [Time] The time the call ended, if available, as an ISO 8601 timestamp in UTC.
110
132
  #
133
+ # @param note [Moonbase::Models::Note] The Note object represents a block of text content, often used for meeting notes
134
+ #
111
135
  # @param provider_metadata [Hash{Symbol=>Object}] A hash of additional metadata from the provider.
112
136
  #
137
+ # @param summary [Moonbase::Models::Note] The Note object represents a block of text content, often used for meeting notes
138
+ #
139
+ # @param transcript [Moonbase::Models::Call::Transcript, nil]
140
+ #
113
141
  # @param type [Symbol, :call] String representing the object’s type. Always `call` for this object.
114
142
 
115
143
  # The direction of the call, either `incoming` or `outgoing`.
@@ -195,6 +223,62 @@ module Moonbase
195
223
  # @return [Array<Symbol>]
196
224
  end
197
225
  end
226
+
227
+ # @see Moonbase::Models::Call#transcript
228
+ class Transcript < Moonbase::Internal::Type::BaseModel
229
+ # @!attribute cues
230
+ #
231
+ # @return [Array<Moonbase::Models::Call::Transcript::Cue>]
232
+ required :cues, -> { Moonbase::Internal::Type::ArrayOf[Moonbase::Call::Transcript::Cue] }
233
+
234
+ # @!method initialize(cues:)
235
+ # @param cues [Array<Moonbase::Models::Call::Transcript::Cue>]
236
+
237
+ class Cue < Moonbase::Internal::Type::BaseModel
238
+ # @!attribute from
239
+ #
240
+ # @return [Float]
241
+ required :from, Float
242
+
243
+ # @!attribute speaker
244
+ #
245
+ # @return [Moonbase::Models::Call::Transcript::Cue::Speaker]
246
+ required :speaker, -> { Moonbase::Call::Transcript::Cue::Speaker }
247
+
248
+ # @!attribute text
249
+ #
250
+ # @return [String]
251
+ required :text, String
252
+
253
+ # @!attribute to
254
+ #
255
+ # @return [Float]
256
+ required :to, Float
257
+
258
+ # @!method initialize(from:, speaker:, text:, to:)
259
+ # @param from [Float]
260
+ # @param speaker [Moonbase::Models::Call::Transcript::Cue::Speaker]
261
+ # @param text [String]
262
+ # @param to [Float]
263
+
264
+ # @see Moonbase::Models::Call::Transcript::Cue#speaker
265
+ class Speaker < Moonbase::Internal::Type::BaseModel
266
+ # @!attribute attendee_id
267
+ #
268
+ # @return [String, nil]
269
+ optional :attendee_id, String
270
+
271
+ # @!attribute label
272
+ #
273
+ # @return [String, nil]
274
+ optional :label, String
275
+
276
+ # @!method initialize(attendee_id: nil, label: nil)
277
+ # @param attendee_id [String]
278
+ # @param label [String]
279
+ end
280
+ end
281
+ end
198
282
  end
199
283
  end
200
284
  end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Moonbase
4
+ module Models
5
+ # @see Moonbase::Resources::Calls#list
6
+ class CallListParams < Moonbase::Internal::Type::BaseModel
7
+ extend Moonbase::Internal::Type::RequestParameters::Converter
8
+ include Moonbase::Internal::Type::RequestParameters
9
+
10
+ # @!attribute after
11
+ # When specified, returns results starting immediately after the item identified
12
+ # by this cursor. Use the cursor value from the previous response's metadata to
13
+ # fetch the next page of results.
14
+ #
15
+ # @return [String, nil]
16
+ optional :after, String
17
+
18
+ # @!attribute before
19
+ # When specified, returns results starting immediately before the item identified
20
+ # by this cursor. Use the cursor value from the response's metadata to fetch the
21
+ # previous page of results.
22
+ #
23
+ # @return [String, nil]
24
+ optional :before, String
25
+
26
+ # @!attribute limit
27
+ # Maximum number of items to return per page. Must be between 1 and 100. Defaults
28
+ # to 20 if not specified.
29
+ #
30
+ # @return [Integer, nil]
31
+ optional :limit, Integer
32
+
33
+ # @!method initialize(after: nil, before: nil, limit: nil, request_options: {})
34
+ # Some parameter documentations has been truncated, see
35
+ # {Moonbase::Models::CallListParams} for more details.
36
+ #
37
+ # @param after [String] When specified, returns results starting immediately after the item identified b
38
+ #
39
+ # @param before [String] When specified, returns results starting immediately before the item identified
40
+ #
41
+ # @param limit [Integer] Maximum number of items to return per page. Must be between 1 and 100. Defaults
42
+ #
43
+ # @param request_options [Moonbase::RequestOptions, Hash{Symbol=>Object}]
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Moonbase
4
+ module Models
5
+ # @see Moonbase::Resources::Calls#retrieve
6
+ class CallRetrieveParams < Moonbase::Internal::Type::BaseModel
7
+ extend Moonbase::Internal::Type::RequestParameters::Converter
8
+ include Moonbase::Internal::Type::RequestParameters
9
+
10
+ # @!attribute include
11
+ # Specifies which related objects to include in the response. Valid options are
12
+ # `transcript`, `note`, and `summary`.
13
+ #
14
+ # @return [Array<Symbol, Moonbase::Models::CallRetrieveParams::Include>, nil]
15
+ optional :include, -> { Moonbase::Internal::Type::ArrayOf[enum: Moonbase::CallRetrieveParams::Include] }
16
+
17
+ # @!method initialize(include: nil, request_options: {})
18
+ # Some parameter documentations has been truncated, see
19
+ # {Moonbase::Models::CallRetrieveParams} for more details.
20
+ #
21
+ # @param include [Array<Symbol, Moonbase::Models::CallRetrieveParams::Include>] Specifies which related objects to include in the response. Valid options are `t
22
+ #
23
+ # @param request_options [Moonbase::RequestOptions, Hash{Symbol=>Object}]
24
+
25
+ module Include
26
+ extend Moonbase::Internal::Type::Enum
27
+
28
+ TRANSCRIPT = :transcript
29
+ NOTE = :note
30
+ SUMMARY = :summary
31
+
32
+ # @!method self.values
33
+ # @return [Array<Symbol>]
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Moonbase
4
+ module Models
5
+ # @see Moonbase::Resources::Client#search
6
+ class ClientSearchParams < Moonbase::Internal::Type::BaseModel
7
+ extend Moonbase::Internal::Type::RequestParameters::Converter
8
+ include Moonbase::Internal::Type::RequestParameters
9
+
10
+ # @!attribute query
11
+ #
12
+ # @return [String]
13
+ required :query, String
14
+
15
+ # @!method initialize(query:, request_options: {})
16
+ # @param query [String]
17
+ # @param request_options [Moonbase::RequestOptions, Hash{Symbol=>Object}]
18
+ end
19
+ end
20
+ end
@@ -24,6 +24,12 @@ module Moonbase
24
24
  # @return [String, nil]
25
25
  optional :before, String
26
26
 
27
+ # @!attribute include
28
+ # Include only specific fields in the returned items. Specify fields by id or key.
29
+ #
30
+ # @return [Array<String>, nil]
31
+ optional :include, Moonbase::Internal::Type::ArrayOf[String]
32
+
27
33
  # @!attribute limit
28
34
  # Maximum number of items to return per page. Must be between 1 and 100. Defaults
29
35
  # to 20 if not specified.
@@ -31,7 +37,14 @@ module Moonbase
31
37
  # @return [Integer, nil]
32
38
  optional :limit, Integer
33
39
 
34
- # @!method initialize(after: nil, before: nil, limit: nil, request_options: {})
40
+ # @!attribute sort
41
+ # Sort items by the specified field ids or keys. Prefix a field with a
42
+ # hyphen/minus (`-`) to sort in descending order by that field.
43
+ #
44
+ # @return [Array<String>, nil]
45
+ optional :sort, Moonbase::Internal::Type::ArrayOf[String]
46
+
47
+ # @!method initialize(after: nil, before: nil, include: nil, limit: nil, sort: nil, request_options: {})
35
48
  # Some parameter documentations has been truncated, see
36
49
  # {Moonbase::Models::Collections::ItemListParams} for more details.
37
50
  #
@@ -39,8 +52,12 @@ module Moonbase
39
52
  #
40
53
  # @param before [String] When specified, returns results starting immediately before the item identified
41
54
  #
55
+ # @param include [Array<String>] Include only specific fields in the returned items. Specify fields by id or key.
56
+ #
42
57
  # @param limit [Integer] Maximum number of items to return per page. Must be between 1 and 100. Defaults
43
58
  #
59
+ # @param sort [Array<String>] Sort items by the specified field ids or keys. Prefix a field with a hyphen/minu
60
+ #
44
61
  # @param request_options [Moonbase::RequestOptions, Hash{Symbol=>Object}]
45
62
  end
46
63
  end
@@ -0,0 +1,74 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Moonbase
4
+ module Models
5
+ module Collections
6
+ # @see Moonbase::Resources::Collections::Items#search
7
+ class ItemSearchParams < Moonbase::Internal::Type::BaseModel
8
+ extend Moonbase::Internal::Type::RequestParameters::Converter
9
+ include Moonbase::Internal::Type::RequestParameters
10
+
11
+ # @!attribute after
12
+ # When specified, returns results starting immediately after the item identified
13
+ # by this cursor. Use the cursor value from the previous response's metadata to
14
+ # fetch the next page of results.
15
+ #
16
+ # @return [String, nil]
17
+ optional :after, String
18
+
19
+ # @!attribute before
20
+ # When specified, returns results starting immediately before the item identified
21
+ # by this cursor. Use the cursor value from the response's metadata to fetch the
22
+ # previous page of results.
23
+ #
24
+ # @return [String, nil]
25
+ optional :before, String
26
+
27
+ # @!attribute limit
28
+ # Maximum number of items to return per page. Must be between 1 and 100. Defaults
29
+ # to 20 if not specified.
30
+ #
31
+ # @return [Integer, nil]
32
+ optional :limit, Integer
33
+
34
+ # @!attribute filter
35
+ # Return only items that match the filter conditions. Complex filters can be
36
+ # created by nesting filters inside of `AND`, `OR`, and `NOT` filters.
37
+ #
38
+ # @return [Moonbase::Models::ItemsFilterValueMatches, Moonbase::Models::ItemsFilterValueExists, Moonbase::Models::ItemsFilterAndGroup, Moonbase::Models::ItemsFilterOrGroup, Moonbase::Models::ItemsFilterNotGroup, nil]
39
+ optional :filter, union: -> { Moonbase::ItemsFilter }
40
+
41
+ # @!attribute include
42
+ # Include only specific fields in the returned items. Specify fields by id or key.
43
+ #
44
+ # @return [Array<String>, nil]
45
+ optional :include, Moonbase::Internal::Type::ArrayOf[String]
46
+
47
+ # @!attribute sort
48
+ # Sort items by the specified field ids or keys. Prefix a field with a
49
+ # hyphen/minus (`-`) to sort in descending order by that field.
50
+ #
51
+ # @return [Array<String>, nil]
52
+ optional :sort, Moonbase::Internal::Type::ArrayOf[String]
53
+
54
+ # @!method initialize(after: nil, before: nil, limit: nil, filter: nil, include: nil, sort: nil, request_options: {})
55
+ # Some parameter documentations has been truncated, see
56
+ # {Moonbase::Models::Collections::ItemSearchParams} for more details.
57
+ #
58
+ # @param after [String] When specified, returns results starting immediately after the item identified b
59
+ #
60
+ # @param before [String] When specified, returns results starting immediately before the item identified
61
+ #
62
+ # @param limit [Integer] Maximum number of items to return per page. Must be between 1 and 100. Defaults
63
+ #
64
+ # @param filter [Moonbase::Models::ItemsFilterValueMatches, Moonbase::Models::ItemsFilterValueExists, Moonbase::Models::ItemsFilterAndGroup, Moonbase::Models::ItemsFilterOrGroup, Moonbase::Models::ItemsFilterNotGroup] Return only items that match the filter conditions. Complex filters can be creat
65
+ #
66
+ # @param include [Array<String>] Include only specific fields in the returned items. Specify fields by id or key.
67
+ #
68
+ # @param sort [Array<String>] Sort items by the specified field ids or keys. Prefix a field with a hyphen/minu
69
+ #
70
+ # @param request_options [Moonbase::RequestOptions, Hash{Symbol=>Object}]
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Moonbase
4
+ module Models
5
+ module Collections
6
+ # @see Moonbase::Resources::Collections::Items#search
7
+ class ItemSearchResponse < Moonbase::Internal::Type::BaseModel
8
+ # @!attribute data
9
+ # An Item represents a single record or row within a Collection. It holds a set of
10
+ # `values` corresponding to the Collection's `fields`.
11
+ #
12
+ # @return [Moonbase::Models::Item]
13
+ required :data, -> { Moonbase::Item }
14
+
15
+ # @!method initialize(data:)
16
+ # Some parameter documentations has been truncated, see
17
+ # {Moonbase::Models::Collections::ItemSearchResponse} for more details.
18
+ #
19
+ # A search result entry
20
+ #
21
+ # @param data [Moonbase::Models::Item] An Item represents a single record or row within a Collection. It holds a set of
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Moonbase
4
+ module Models
5
+ # @see Moonbase::Resources::Files#delete
6
+ class FileDeleteParams < Moonbase::Internal::Type::BaseModel
7
+ extend Moonbase::Internal::Type::RequestParameters::Converter
8
+ include Moonbase::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [Moonbase::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Moonbase
4
+ module Models
5
+ # Return only items that match the filter conditions. Complex filters can be
6
+ # created by nesting filters inside of `AND`, `OR`, and `NOT` filters.
7
+ module ItemsFilter
8
+ extend Moonbase::Internal::Type::Union
9
+
10
+ discriminator :op
11
+
12
+ # Include only items with a value in the given `field` that satisfies the `op` condition.
13
+ variant -> { Moonbase::ItemsFilterValueMatches }
14
+
15
+ # Include only items that have a value in the given `field`.
16
+ variant -> { Moonbase::ItemsFilterValueExists }
17
+
18
+ # Include only items that match ALL of the filters in `filters`.
19
+ variant -> { Moonbase::ItemsFilterAndGroup }
20
+
21
+ # Include only items that match ANY of the filters in `filters`.
22
+ variant -> { Moonbase::ItemsFilterOrGroup }
23
+
24
+ variant -> { Moonbase::ItemsFilterNotGroup }
25
+
26
+ # @!method self.variants
27
+ # @return [Array(Moonbase::Models::ItemsFilterValueMatches, Moonbase::Models::ItemsFilterValueExists, Moonbase::Models::ItemsFilterAndGroup, Moonbase::Models::ItemsFilterOrGroup, Moonbase::Models::ItemsFilterNotGroup)]
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Moonbase
4
+ module Models
5
+ class ItemsFilterAndGroup < Moonbase::Internal::Type::BaseModel
6
+ # @!attribute filters
7
+ # An array of filters, ALL of which must be satisfied for this `and` filter to
8
+ # match.
9
+ #
10
+ # @return [Array<Moonbase::Models::ItemsFilter>]
11
+ required :filters, -> { Moonbase::Internal::Type::ArrayOf[union: Moonbase::ItemsFilter] }
12
+
13
+ # @!attribute op
14
+ #
15
+ # @return [Symbol, :and]
16
+ required :op, const: :and
17
+
18
+ # @!method initialize(filters:, op: :and)
19
+ # Some parameter documentations has been truncated, see
20
+ # {Moonbase::Models::ItemsFilterAndGroup} for more details.
21
+ #
22
+ # Include only items that match ALL of the filters in `filters`.
23
+ #
24
+ # @param filters [Array<Moonbase::Models::ItemsFilter>] An array of filters, ALL of which must be satisfied for this `and` filter to mat
25
+ #
26
+ # @param op [Symbol, :and]
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Moonbase
4
+ module Models
5
+ class ItemsFilterNotGroup < Moonbase::Internal::Type::BaseModel
6
+ # @!attribute filter
7
+ # A nested filter which must NOT match in order for this `not` filter to match.
8
+ #
9
+ # @return [Moonbase::Models::ItemsFilter]
10
+ required :filter, union: -> { Moonbase::ItemsFilter }
11
+
12
+ # @!attribute op
13
+ #
14
+ # @return [Symbol, :not]
15
+ required :op, const: :not
16
+
17
+ # @!method initialize(filter:, op: :not)
18
+ # @param filter [Moonbase::Models::ItemsFilter] A nested filter which must NOT match in order for this `not` filter to match.
19
+ #
20
+ # @param op [Symbol, :not]
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Moonbase
4
+ module Models
5
+ class ItemsFilterOrGroup < Moonbase::Internal::Type::BaseModel
6
+ # @!attribute filters
7
+ # An array of filters, ANY of which must be satisfied for this `or` filter to
8
+ # match.
9
+ #
10
+ # @return [Array<Moonbase::Models::ItemsFilter>]
11
+ required :filters, -> { Moonbase::Internal::Type::ArrayOf[union: Moonbase::ItemsFilter] }
12
+
13
+ # @!attribute op
14
+ #
15
+ # @return [Symbol, :or]
16
+ required :op, const: :or
17
+
18
+ # @!method initialize(filters:, op: :or)
19
+ # Some parameter documentations has been truncated, see
20
+ # {Moonbase::Models::ItemsFilterOrGroup} for more details.
21
+ #
22
+ # Include only items that match ANY of the filters in `filters`.
23
+ #
24
+ # @param filters [Array<Moonbase::Models::ItemsFilter>] An array of filters, ANY of which must be satisfied for this `or` filter to matc
25
+ #
26
+ # @param op [Symbol, :or]
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Moonbase
4
+ module Models
5
+ class ItemsFilterValueExists < Moonbase::Internal::Type::BaseModel
6
+ # @!attribute field
7
+ # The id or key of the field for which a value must exist.
8
+ #
9
+ # @return [String]
10
+ required :field, String
11
+
12
+ # @!attribute op
13
+ #
14
+ # @return [Symbol, :exists]
15
+ required :op, const: :exists
16
+
17
+ # @!method initialize(field:, op: :exists)
18
+ # Include only items that have a value in the given `field`.
19
+ #
20
+ # @param field [String] The id or key of the field for which a value must exist.
21
+ #
22
+ # @param op [Symbol, :exists]
23
+ end
24
+ end
25
+ end