cadenya 0.3.0 → 0.5.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 (46) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +6 -6
  4. data/lib/cadenya/client.rb +4 -0
  5. data/lib/cadenya/internal/cursor_pagination.rb +2 -2
  6. data/lib/cadenya/models/ai_provider_key.rb +66 -0
  7. data/lib/cadenya/models/ai_provider_key_create_params.rb +41 -0
  8. data/lib/cadenya/models/ai_provider_key_delete_params.rb +26 -0
  9. data/lib/cadenya/models/ai_provider_key_list_params.rb +73 -0
  10. data/lib/cadenya/models/ai_provider_key_retrieve_params.rb +26 -0
  11. data/lib/cadenya/models/ai_provider_key_spec.rb +51 -0
  12. data/lib/cadenya/models/ai_provider_key_update_params.rb +56 -0
  13. data/lib/cadenya/models/model.rb +56 -1
  14. data/lib/cadenya/models/model_list_params.rb +22 -1
  15. data/lib/cadenya/models.rb +14 -0
  16. data/lib/cadenya/resources/ai_provider_keys.rb +173 -0
  17. data/lib/cadenya/resources/models.rb +14 -2
  18. data/lib/cadenya/version.rb +1 -1
  19. data/lib/cadenya.rb +8 -0
  20. data/rbi/cadenya/client.rbi +3 -0
  21. data/rbi/cadenya/models/ai_provider_key.rbi +109 -0
  22. data/rbi/cadenya/models/ai_provider_key_create_params.rbi +65 -0
  23. data/rbi/cadenya/models/ai_provider_key_delete_params.rbi +43 -0
  24. data/rbi/cadenya/models/ai_provider_key_list_params.rbi +109 -0
  25. data/rbi/cadenya/models/ai_provider_key_retrieve_params.rbi +46 -0
  26. data/rbi/cadenya/models/ai_provider_key_spec.rbi +98 -0
  27. data/rbi/cadenya/models/ai_provider_key_update_params.rbi +82 -0
  28. data/rbi/cadenya/models/model.rbi +102 -3
  29. data/rbi/cadenya/models/model_list_params.rbi +26 -0
  30. data/rbi/cadenya/models.rbi +14 -0
  31. data/rbi/cadenya/resources/ai_provider_keys.rbi +129 -0
  32. data/rbi/cadenya/resources/models.rbi +8 -0
  33. data/sig/cadenya/client.rbs +2 -0
  34. data/sig/cadenya/models/ai_provider_key.rbs +55 -0
  35. data/sig/cadenya/models/ai_provider_key_create_params.rbs +36 -0
  36. data/sig/cadenya/models/ai_provider_key_delete_params.rbs +28 -0
  37. data/sig/cadenya/models/ai_provider_key_list_params.rbs +68 -0
  38. data/sig/cadenya/models/ai_provider_key_retrieve_params.rbs +28 -0
  39. data/sig/cadenya/models/ai_provider_key_spec.rbs +49 -0
  40. data/sig/cadenya/models/ai_provider_key_update_params.rbs +54 -0
  41. data/sig/cadenya/models/model.rbs +52 -3
  42. data/sig/cadenya/models/model_list_params.rbs +14 -0
  43. data/sig/cadenya/models.rbs +14 -0
  44. data/sig/cadenya/resources/ai_provider_keys.rbs +46 -0
  45. data/sig/cadenya/resources/models.rbs +2 -0
  46. metadata +26 -2
@@ -0,0 +1,173 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Resources
5
+ class AIProviderKeys
6
+ # Some parameter documentations has been truncated, see
7
+ # {Cadenya::Models::AIProviderKeyCreateParams} for more details.
8
+ #
9
+ # Creates a new customer-provided AI provider key in the workspace
10
+ #
11
+ # @overload create(workspace_id, metadata:, spec:, request_options: {})
12
+ #
13
+ # @param workspace_id [String] The workspace that will own this key.
14
+ #
15
+ # @param metadata [Cadenya::Models::CreateResourceMetadata] CreateResourceMetadata contains the user-provided fields for creating
16
+ #
17
+ # @param spec [Cadenya::Models::AIProviderKeySpec]
18
+ #
19
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
20
+ #
21
+ # @return [Cadenya::Models::AIProviderKey]
22
+ #
23
+ # @see Cadenya::Models::AIProviderKeyCreateParams
24
+ def create(workspace_id, params)
25
+ parsed, options = Cadenya::AIProviderKeyCreateParams.dump_request(params)
26
+ @client.request(
27
+ method: :post,
28
+ path: ["v1/workspaces/%1$s/ai_provider_keys", workspace_id],
29
+ body: parsed,
30
+ model: Cadenya::AIProviderKey,
31
+ options: options
32
+ )
33
+ end
34
+
35
+ # Retrieves an AI provider key by ID from the workspace
36
+ #
37
+ # @overload retrieve(id, workspace_id:, request_options: {})
38
+ #
39
+ # @param id [String] The key to retrieve.
40
+ #
41
+ # @param workspace_id [String] The workspace the key belongs to.
42
+ #
43
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
44
+ #
45
+ # @return [Cadenya::Models::AIProviderKey]
46
+ #
47
+ # @see Cadenya::Models::AIProviderKeyRetrieveParams
48
+ def retrieve(id, params)
49
+ parsed, options = Cadenya::AIProviderKeyRetrieveParams.dump_request(params)
50
+ workspace_id =
51
+ parsed.delete(:workspace_id) do
52
+ raise ArgumentError.new("missing required path argument #{_1}")
53
+ end
54
+ @client.request(
55
+ method: :get,
56
+ path: ["v1/workspaces/%1$s/ai_provider_keys/%2$s", workspace_id, id],
57
+ model: Cadenya::AIProviderKey,
58
+ options: options
59
+ )
60
+ end
61
+
62
+ # Some parameter documentations has been truncated, see
63
+ # {Cadenya::Models::AIProviderKeyUpdateParams} for more details.
64
+ #
65
+ # Updates an AI provider key's name or key value in the workspace
66
+ #
67
+ # @overload update(id, workspace_id:, metadata: nil, spec: nil, update_mask: nil, request_options: {})
68
+ #
69
+ # @param id [String] Path param: The key to update.
70
+ #
71
+ # @param workspace_id [String] Path param: The workspace the key belongs to.
72
+ #
73
+ # @param metadata [Cadenya::Models::UpdateResourceMetadata] Body param: UpdateResourceMetadata contains the user-provided fields for updatin
74
+ #
75
+ # @param spec [Cadenya::Models::AIProviderKeySpec] Body param
76
+ #
77
+ # @param update_mask [String] Body param: Fields to update.
78
+ #
79
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
80
+ #
81
+ # @return [Cadenya::Models::AIProviderKey]
82
+ #
83
+ # @see Cadenya::Models::AIProviderKeyUpdateParams
84
+ def update(id, params)
85
+ parsed, options = Cadenya::AIProviderKeyUpdateParams.dump_request(params)
86
+ workspace_id =
87
+ parsed.delete(:workspace_id) do
88
+ raise ArgumentError.new("missing required path argument #{_1}")
89
+ end
90
+ @client.request(
91
+ method: :patch,
92
+ path: ["v1/workspaces/%1$s/ai_provider_keys/%2$s", workspace_id, id],
93
+ body: parsed,
94
+ model: Cadenya::AIProviderKey,
95
+ options: options
96
+ )
97
+ end
98
+
99
+ # Some parameter documentations has been truncated, see
100
+ # {Cadenya::Models::AIProviderKeyListParams} for more details.
101
+ #
102
+ # Lists all customer-provided AI provider keys in the workspace
103
+ #
104
+ # @overload list(workspace_id, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, request_options: {})
105
+ #
106
+ # @param workspace_id [String] The workspace whose keys will be listed.
107
+ #
108
+ # @param cursor [String] Pagination cursor from previous response
109
+ #
110
+ # @param include_info [Boolean] When true, populate each item's info (model counts), at the cost of extra
111
+ #
112
+ # @param limit [Integer] Maximum number of results to return
113
+ #
114
+ # @param prefix [String] Filter expression (query param: prefix)
115
+ #
116
+ # @param query [String] Free-form search query
117
+ #
118
+ # @param sort_order [String] Sort order for results (asc or desc by creation time)
119
+ #
120
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
121
+ #
122
+ # @return [Cadenya::Internal::CursorPagination<Cadenya::Models::AIProviderKey>]
123
+ #
124
+ # @see Cadenya::Models::AIProviderKeyListParams
125
+ def list(workspace_id, params = {})
126
+ parsed, options = Cadenya::AIProviderKeyListParams.dump_request(params)
127
+ query = Cadenya::Internal::Util.encode_query_params(parsed)
128
+ @client.request(
129
+ method: :get,
130
+ path: ["v1/workspaces/%1$s/ai_provider_keys", workspace_id],
131
+ query: query.transform_keys(include_info: "includeInfo", sort_order: "sortOrder"),
132
+ page: Cadenya::Internal::CursorPagination,
133
+ model: Cadenya::AIProviderKey,
134
+ options: options
135
+ )
136
+ end
137
+
138
+ # Deletes an AI provider key from the workspace
139
+ #
140
+ # @overload delete(id, workspace_id:, request_options: {})
141
+ #
142
+ # @param id [String] The key to delete.
143
+ #
144
+ # @param workspace_id [String] The workspace the key belongs to.
145
+ #
146
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
147
+ #
148
+ # @return [nil]
149
+ #
150
+ # @see Cadenya::Models::AIProviderKeyDeleteParams
151
+ def delete(id, params)
152
+ parsed, options = Cadenya::AIProviderKeyDeleteParams.dump_request(params)
153
+ workspace_id =
154
+ parsed.delete(:workspace_id) do
155
+ raise ArgumentError.new("missing required path argument #{_1}")
156
+ end
157
+ @client.request(
158
+ method: :delete,
159
+ path: ["v1/workspaces/%1$s/ai_provider_keys/%2$s", workspace_id, id],
160
+ model: NilClass,
161
+ options: options
162
+ )
163
+ end
164
+
165
+ # @api private
166
+ #
167
+ # @param client [Cadenya::Client]
168
+ def initialize(client:)
169
+ @client = client
170
+ end
171
+ end
172
+ end
173
+ end
@@ -33,16 +33,23 @@ module Cadenya
33
33
  )
34
34
  end
35
35
 
36
+ # Some parameter documentations has been truncated, see
37
+ # {Cadenya::Models::ModelListParams} for more details.
38
+ #
36
39
  # Lists all models in the workspace
37
40
  #
38
- # @overload list(workspace_id, bundle_key: nil, cursor: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, status: nil, request_options: {})
41
+ # @overload list(workspace_id, ai_provider_key_id: nil, bundle_key: nil, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, status: nil, request_options: {})
39
42
  #
40
43
  # @param workspace_id [String] Workspace ID.
41
44
  #
45
+ # @param ai_provider_key_id [String] Filter to models provisioned on a specific AI provider key. Accepts the
46
+ #
42
47
  # @param bundle_key [String] Filter by bundle_key — return only resources owned by this bundle.
43
48
  #
44
49
  # @param cursor [String] Pagination cursor from previous response
45
50
  #
51
+ # @param include_info [Boolean] When true, populate each item's info (e.g. the AI provider), at the cost of
52
+ #
46
53
  # @param limit [Integer] Maximum number of results to return
47
54
  #
48
55
  # @param prefix [String] Filter by name prefix
@@ -64,7 +71,12 @@ module Cadenya
64
71
  @client.request(
65
72
  method: :get,
66
73
  path: ["v1/workspaces/%1$s/models", workspace_id],
67
- query: query.transform_keys(bundle_key: "bundleKey", sort_order: "sortOrder"),
74
+ query: query.transform_keys(
75
+ ai_provider_key_id: "aiProviderKeyId",
76
+ bundle_key: "bundleKey",
77
+ include_info: "includeInfo",
78
+ sort_order: "sortOrder"
79
+ ),
68
80
  page: Cadenya::Internal::CursorPagination,
69
81
  model: Cadenya::Model,
70
82
  options: options
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cadenya
4
- VERSION = "0.3.0"
4
+ VERSION = "0.5.0"
5
5
  end
data/lib/cadenya.rb CHANGED
@@ -108,6 +108,13 @@ require_relative "cadenya/models/agent_schedule_entry"
108
108
  require_relative "cadenya/models/agent_spec"
109
109
  require_relative "cadenya/models/agent_update_params"
110
110
  require_relative "cadenya/models/agent_variation_entry"
111
+ require_relative "cadenya/models/ai_provider_key"
112
+ require_relative "cadenya/models/ai_provider_key_create_params"
113
+ require_relative "cadenya/models/ai_provider_key_delete_params"
114
+ require_relative "cadenya/models/ai_provider_key_list_params"
115
+ require_relative "cadenya/models/ai_provider_key_retrieve_params"
116
+ require_relative "cadenya/models/ai_provider_key_spec"
117
+ require_relative "cadenya/models/ai_provider_key_update_params"
111
118
  require_relative "cadenya/models/api_key"
112
119
  require_relative "cadenya/models/api_key_create_params"
113
120
  require_relative "cadenya/models/api_key_delete_params"
@@ -309,6 +316,7 @@ require_relative "cadenya/resources/agents/feedback"
309
316
  require_relative "cadenya/resources/agents/schedules"
310
317
  require_relative "cadenya/resources/agents/variations"
311
318
  require_relative "cadenya/resources/agents/webhook_deliveries"
319
+ require_relative "cadenya/resources/ai_provider_keys"
312
320
  require_relative "cadenya/resources/api_keys"
313
321
  require_relative "cadenya/resources/api_keys/access"
314
322
  require_relative "cadenya/resources/bulk_workspace_resources"
@@ -16,6 +16,9 @@ module Cadenya
16
16
  sig { returns(T.nilable(String)) }
17
17
  attr_reader :webhook_key
18
18
 
19
+ sig { returns(Cadenya::Resources::AIProviderKeys) }
20
+ attr_reader :ai_provider_keys
21
+
19
22
  # Manage the authenticated account. Accounts are the top-level organizational unit
20
23
  # and contain one or more workspaces.
21
24
  sig { returns(Cadenya::Resources::Account) }
@@ -0,0 +1,109 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Models
5
+ class AIProviderKey < Cadenya::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Cadenya::AIProviderKey, Cadenya::Internal::AnyHash)
9
+ end
10
+
11
+ # Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
12
+ sig { returns(Cadenya::ResourceMetadata) }
13
+ attr_reader :metadata
14
+
15
+ sig { params(metadata: Cadenya::ResourceMetadata::OrHash).void }
16
+ attr_writer :metadata
17
+
18
+ sig { returns(Cadenya::AIProviderKeySpec) }
19
+ attr_reader :spec
20
+
21
+ sig { params(spec: Cadenya::AIProviderKeySpec::OrHash).void }
22
+ attr_writer :spec
23
+
24
+ # AIProviderKeyInfo carries server-derived, read-only details about a key, for AI
25
+ # provider management UIs.
26
+ sig { returns(T.nilable(Cadenya::AIProviderKey::Info)) }
27
+ attr_reader :info
28
+
29
+ sig { params(info: Cadenya::AIProviderKey::Info::OrHash).void }
30
+ attr_writer :info
31
+
32
+ # AIProviderKey is a customer-provided (BYOK) credential for an AI provider,
33
+ # scoped to a workspace. The secret value is never returned in responses.
34
+ sig do
35
+ params(
36
+ metadata: Cadenya::ResourceMetadata::OrHash,
37
+ spec: Cadenya::AIProviderKeySpec::OrHash,
38
+ info: Cadenya::AIProviderKey::Info::OrHash
39
+ ).returns(T.attached_class)
40
+ end
41
+ def self.new(
42
+ # Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
43
+ metadata:,
44
+ spec:,
45
+ # AIProviderKeyInfo carries server-derived, read-only details about a key, for AI
46
+ # provider management UIs.
47
+ info: nil
48
+ )
49
+ end
50
+
51
+ sig do
52
+ override.returns(
53
+ {
54
+ metadata: Cadenya::ResourceMetadata,
55
+ spec: Cadenya::AIProviderKeySpec,
56
+ info: Cadenya::AIProviderKey::Info
57
+ }
58
+ )
59
+ end
60
+ def to_hash
61
+ end
62
+
63
+ class Info < Cadenya::Internal::Type::BaseModel
64
+ OrHash =
65
+ T.type_alias do
66
+ T.any(Cadenya::AIProviderKey::Info, Cadenya::Internal::AnyHash)
67
+ end
68
+
69
+ # Number of disabled models provisioned on this key.
70
+ sig { returns(T.nilable(Integer)) }
71
+ attr_reader :disabled_model_count
72
+
73
+ sig { params(disabled_model_count: Integer).void }
74
+ attr_writer :disabled_model_count
75
+
76
+ # Number of enabled models provisioned on this key.
77
+ sig { returns(T.nilable(Integer)) }
78
+ attr_reader :enabled_model_count
79
+
80
+ sig { params(enabled_model_count: Integer).void }
81
+ attr_writer :enabled_model_count
82
+
83
+ # AIProviderKeyInfo carries server-derived, read-only details about a key, for AI
84
+ # provider management UIs.
85
+ sig do
86
+ params(
87
+ disabled_model_count: Integer,
88
+ enabled_model_count: Integer
89
+ ).returns(T.attached_class)
90
+ end
91
+ def self.new(
92
+ # Number of disabled models provisioned on this key.
93
+ disabled_model_count: nil,
94
+ # Number of enabled models provisioned on this key.
95
+ enabled_model_count: nil
96
+ )
97
+ end
98
+
99
+ sig do
100
+ override.returns(
101
+ { disabled_model_count: Integer, enabled_model_count: Integer }
102
+ )
103
+ end
104
+ def to_hash
105
+ end
106
+ end
107
+ end
108
+ end
109
+ end
@@ -0,0 +1,65 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Models
5
+ class AIProviderKeyCreateParams < Cadenya::Internal::Type::BaseModel
6
+ extend Cadenya::Internal::Type::RequestParameters::Converter
7
+ include Cadenya::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Cadenya::AIProviderKeyCreateParams, Cadenya::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :workspace_id
16
+
17
+ # CreateResourceMetadata contains the user-provided fields for creating a
18
+ # workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
19
+ # profile_id, created_at) are excluded since they are set by the server.
20
+ sig { returns(Cadenya::CreateResourceMetadata) }
21
+ attr_reader :metadata
22
+
23
+ sig { params(metadata: Cadenya::CreateResourceMetadata::OrHash).void }
24
+ attr_writer :metadata
25
+
26
+ sig { returns(Cadenya::AIProviderKeySpec) }
27
+ attr_reader :spec
28
+
29
+ sig { params(spec: Cadenya::AIProviderKeySpec::OrHash).void }
30
+ attr_writer :spec
31
+
32
+ sig do
33
+ params(
34
+ workspace_id: String,
35
+ metadata: Cadenya::CreateResourceMetadata::OrHash,
36
+ spec: Cadenya::AIProviderKeySpec::OrHash,
37
+ request_options: Cadenya::RequestOptions::OrHash
38
+ ).returns(T.attached_class)
39
+ end
40
+ def self.new(
41
+ workspace_id:,
42
+ # CreateResourceMetadata contains the user-provided fields for creating a
43
+ # workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
44
+ # profile_id, created_at) are excluded since they are set by the server.
45
+ metadata:,
46
+ spec:,
47
+ request_options: {}
48
+ )
49
+ end
50
+
51
+ sig do
52
+ override.returns(
53
+ {
54
+ workspace_id: String,
55
+ metadata: Cadenya::CreateResourceMetadata,
56
+ spec: Cadenya::AIProviderKeySpec,
57
+ request_options: Cadenya::RequestOptions
58
+ }
59
+ )
60
+ end
61
+ def to_hash
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,43 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Models
5
+ class AIProviderKeyDeleteParams < Cadenya::Internal::Type::BaseModel
6
+ extend Cadenya::Internal::Type::RequestParameters::Converter
7
+ include Cadenya::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Cadenya::AIProviderKeyDeleteParams, Cadenya::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :workspace_id
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :id
19
+
20
+ sig do
21
+ params(
22
+ workspace_id: String,
23
+ id: String,
24
+ request_options: Cadenya::RequestOptions::OrHash
25
+ ).returns(T.attached_class)
26
+ end
27
+ def self.new(workspace_id:, id:, request_options: {})
28
+ end
29
+
30
+ sig do
31
+ override.returns(
32
+ {
33
+ workspace_id: String,
34
+ id: String,
35
+ request_options: Cadenya::RequestOptions
36
+ }
37
+ )
38
+ end
39
+ def to_hash
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,109 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Models
5
+ class AIProviderKeyListParams < Cadenya::Internal::Type::BaseModel
6
+ extend Cadenya::Internal::Type::RequestParameters::Converter
7
+ include Cadenya::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Cadenya::AIProviderKeyListParams, Cadenya::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :workspace_id
16
+
17
+ # Pagination cursor from previous response
18
+ sig { returns(T.nilable(String)) }
19
+ attr_reader :cursor
20
+
21
+ sig { params(cursor: String).void }
22
+ attr_writer :cursor
23
+
24
+ # When true, populate each item's info (model counts), at the cost of extra
25
+ # lookups.
26
+ sig { returns(T.nilable(T::Boolean)) }
27
+ attr_reader :include_info
28
+
29
+ sig { params(include_info: T::Boolean).void }
30
+ attr_writer :include_info
31
+
32
+ # Maximum number of results to return
33
+ sig { returns(T.nilable(Integer)) }
34
+ attr_reader :limit
35
+
36
+ sig { params(limit: Integer).void }
37
+ attr_writer :limit
38
+
39
+ # Filter expression (query param: prefix)
40
+ sig { returns(T.nilable(String)) }
41
+ attr_reader :prefix
42
+
43
+ sig { params(prefix: String).void }
44
+ attr_writer :prefix
45
+
46
+ # Free-form search query
47
+ sig { returns(T.nilable(String)) }
48
+ attr_reader :query
49
+
50
+ sig { params(query: String).void }
51
+ attr_writer :query
52
+
53
+ # Sort order for results (asc or desc by creation time)
54
+ sig { returns(T.nilable(String)) }
55
+ attr_reader :sort_order
56
+
57
+ sig { params(sort_order: String).void }
58
+ attr_writer :sort_order
59
+
60
+ sig do
61
+ params(
62
+ workspace_id: String,
63
+ cursor: String,
64
+ include_info: T::Boolean,
65
+ limit: Integer,
66
+ prefix: String,
67
+ query: String,
68
+ sort_order: String,
69
+ request_options: Cadenya::RequestOptions::OrHash
70
+ ).returns(T.attached_class)
71
+ end
72
+ def self.new(
73
+ workspace_id:,
74
+ # Pagination cursor from previous response
75
+ cursor: nil,
76
+ # When true, populate each item's info (model counts), at the cost of extra
77
+ # lookups.
78
+ include_info: nil,
79
+ # Maximum number of results to return
80
+ limit: nil,
81
+ # Filter expression (query param: prefix)
82
+ prefix: nil,
83
+ # Free-form search query
84
+ query: nil,
85
+ # Sort order for results (asc or desc by creation time)
86
+ sort_order: nil,
87
+ request_options: {}
88
+ )
89
+ end
90
+
91
+ sig do
92
+ override.returns(
93
+ {
94
+ workspace_id: String,
95
+ cursor: String,
96
+ include_info: T::Boolean,
97
+ limit: Integer,
98
+ prefix: String,
99
+ query: String,
100
+ sort_order: String,
101
+ request_options: Cadenya::RequestOptions
102
+ }
103
+ )
104
+ end
105
+ def to_hash
106
+ end
107
+ end
108
+ end
109
+ end
@@ -0,0 +1,46 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Models
5
+ class AIProviderKeyRetrieveParams < Cadenya::Internal::Type::BaseModel
6
+ extend Cadenya::Internal::Type::RequestParameters::Converter
7
+ include Cadenya::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Cadenya::AIProviderKeyRetrieveParams,
13
+ Cadenya::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :workspace_id
19
+
20
+ sig { returns(String) }
21
+ attr_accessor :id
22
+
23
+ sig do
24
+ params(
25
+ workspace_id: String,
26
+ id: String,
27
+ request_options: Cadenya::RequestOptions::OrHash
28
+ ).returns(T.attached_class)
29
+ end
30
+ def self.new(workspace_id:, id:, request_options: {})
31
+ end
32
+
33
+ sig do
34
+ override.returns(
35
+ {
36
+ workspace_id: String,
37
+ id: String,
38
+ request_options: Cadenya::RequestOptions
39
+ }
40
+ )
41
+ end
42
+ def to_hash
43
+ end
44
+ end
45
+ end
46
+ end