cadenya 0.2.0 → 0.4.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 (144) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/README.md +6 -6
  4. data/lib/cadenya/client.rb +18 -0
  5. data/lib/cadenya/internal/cursor_pagination.rb +2 -2
  6. data/lib/cadenya/models/agent_spec.rb +19 -4
  7. data/lib/cadenya/models/agents/webhook_delivery_data.rb +1 -0
  8. data/lib/cadenya/models/agents/webhook_delivery_list_params.rb +1 -0
  9. data/lib/cadenya/models/ai_provider_key.rb +30 -0
  10. data/lib/cadenya/models/ai_provider_key_create_params.rb +41 -0
  11. data/lib/cadenya/models/ai_provider_key_delete_params.rb +26 -0
  12. data/lib/cadenya/models/ai_provider_key_list_params.rb +61 -0
  13. data/lib/cadenya/models/ai_provider_key_retrieve_params.rb +26 -0
  14. data/lib/cadenya/models/ai_provider_key_spec.rb +36 -0
  15. data/lib/cadenya/models/ai_provider_key_update_params.rb +56 -0
  16. data/lib/cadenya/models/approval_requirement_filter.rb +26 -0
  17. data/lib/cadenya/models/attribute_filter.rb +38 -0
  18. data/lib/cadenya/models/objective_data.rb +21 -1
  19. data/lib/cadenya/models/objective_event_data.rb +32 -1
  20. data/lib/cadenya/models/objective_list_params.rb +2 -1
  21. data/lib/cadenya/models/objective_status.rb +2 -1
  22. data/lib/cadenya/models/profile_spec.rb +1 -0
  23. data/lib/cadenya/models/string_matcher.rb +47 -0
  24. data/lib/cadenya/models/tool_filter.rb +35 -0
  25. data/lib/cadenya/models/tool_set_adapter.rb +7 -1
  26. data/lib/cadenya/models/tool_set_adapter_mcp.rb +11 -33
  27. data/lib/cadenya/models/tool_set_adapter_openapi.rb +79 -0
  28. data/lib/cadenya/models/tool_set_get_openapi_spec_params.rb +26 -0
  29. data/lib/cadenya/models/tool_set_get_openapi_spec_response.rb +17 -0
  30. data/lib/cadenya/models/tool_sets/config_openapi.rb +29 -0
  31. data/lib/cadenya/models/tool_sets/tool_spec_config.rb +7 -1
  32. data/lib/cadenya/models/workspace.rb +27 -1
  33. data/lib/cadenya/models/workspace_admin/member_add_params.rb +39 -0
  34. data/lib/cadenya/models/workspace_admin/member_list_params.rb +39 -0
  35. data/lib/cadenya/models/workspace_admin/member_remove_params.rb +28 -0
  36. data/lib/cadenya/models/workspace_admin/profile_list_params.rb +44 -0
  37. data/lib/cadenya/models/workspace_admin_archive_params.rb +20 -0
  38. data/lib/cadenya/models/workspace_admin_create_params.rb +70 -0
  39. data/lib/cadenya/models/workspace_admin_list_params.rb +42 -0
  40. data/lib/cadenya/models/workspace_admin_retrieve_params.rb +20 -0
  41. data/lib/cadenya/models/workspace_admin_update_params.rb +85 -0
  42. data/lib/cadenya/models/workspace_member.rb +53 -0
  43. data/lib/cadenya/models.rb +40 -2
  44. data/lib/cadenya/resources/ai_provider_keys.rb +168 -0
  45. data/lib/cadenya/resources/tool_sets.rb +31 -0
  46. data/lib/cadenya/resources/workspace_admin/members.rb +107 -0
  47. data/lib/cadenya/resources/workspace_admin/profiles.rb +54 -0
  48. data/lib/cadenya/resources/workspace_admin.rb +173 -0
  49. data/lib/cadenya/resources/workspaces.rb +4 -0
  50. data/lib/cadenya/version.rb +1 -1
  51. data/lib/cadenya.rb +29 -1
  52. data/rbi/cadenya/client.rbi +16 -0
  53. data/rbi/cadenya/models/agent_spec.rbi +21 -4
  54. data/rbi/cadenya/models/agents/webhook_delivery_data.rbi +5 -0
  55. data/rbi/cadenya/models/agents/webhook_delivery_list_params.rbi +5 -0
  56. data/rbi/cadenya/models/ai_provider_key.rbi +51 -0
  57. data/rbi/cadenya/models/ai_provider_key_create_params.rbi +65 -0
  58. data/rbi/cadenya/models/ai_provider_key_delete_params.rbi +43 -0
  59. data/rbi/cadenya/models/ai_provider_key_list_params.rbi +96 -0
  60. data/rbi/cadenya/models/ai_provider_key_retrieve_params.rbi +46 -0
  61. data/rbi/cadenya/models/ai_provider_key_spec.rbi +56 -0
  62. data/rbi/cadenya/models/ai_provider_key_update_params.rbi +82 -0
  63. data/rbi/cadenya/models/approval_requirement_filter.rbi +45 -0
  64. data/rbi/cadenya/models/attribute_filter.rbi +84 -0
  65. data/rbi/cadenya/models/objective_data.rbi +26 -0
  66. data/rbi/cadenya/models/objective_event_data.rbi +52 -0
  67. data/rbi/cadenya/models/objective_list_params.rbi +7 -2
  68. data/rbi/cadenya/models/objective_status.rbi +4 -2
  69. data/rbi/cadenya/models/profile_spec.rbi +5 -0
  70. data/rbi/cadenya/models/string_matcher.rbi +84 -0
  71. data/rbi/cadenya/models/tool_filter.rbi +66 -0
  72. data/rbi/cadenya/models/tool_set_adapter.rbi +14 -3
  73. data/rbi/cadenya/models/tool_set_adapter_mcp.rbi +16 -62
  74. data/rbi/cadenya/models/tool_set_adapter_openapi.rbi +127 -0
  75. data/rbi/cadenya/models/tool_set_get_openapi_spec_params.rbi +46 -0
  76. data/rbi/cadenya/models/tool_set_get_openapi_spec_response.rbi +33 -0
  77. data/rbi/cadenya/models/tool_sets/config_openapi.rbi +48 -0
  78. data/rbi/cadenya/models/tool_sets/tool_spec_config.rbi +11 -3
  79. data/rbi/cadenya/models/workspace.rbi +39 -3
  80. data/rbi/cadenya/models/workspace_admin/member_add_params.rbi +68 -0
  81. data/rbi/cadenya/models/workspace_admin/member_list_params.rbi +68 -0
  82. data/rbi/cadenya/models/workspace_admin/member_remove_params.rbi +48 -0
  83. data/rbi/cadenya/models/workspace_admin/profile_list_params.rbi +75 -0
  84. data/rbi/cadenya/models/workspace_admin_archive_params.rbi +38 -0
  85. data/rbi/cadenya/models/workspace_admin_create_params.rbi +127 -0
  86. data/rbi/cadenya/models/workspace_admin_list_params.rbi +70 -0
  87. data/rbi/cadenya/models/workspace_admin_retrieve_params.rbi +38 -0
  88. data/rbi/cadenya/models/workspace_admin_update_params.rbi +144 -0
  89. data/rbi/cadenya/models/workspace_member.rbi +80 -0
  90. data/rbi/cadenya/models.rbi +40 -2
  91. data/rbi/cadenya/resources/ai_provider_keys.rbi +125 -0
  92. data/rbi/cadenya/resources/tool_sets.rbi +18 -0
  93. data/rbi/cadenya/resources/workspace_admin/members.rbi +83 -0
  94. data/rbi/cadenya/resources/workspace_admin/profiles.rbi +42 -0
  95. data/rbi/cadenya/resources/workspace_admin.rbi +131 -0
  96. data/rbi/cadenya/resources/workspaces.rbi +4 -0
  97. data/sig/cadenya/client.rbs +4 -0
  98. data/sig/cadenya/models/agent_spec.rbs +12 -5
  99. data/sig/cadenya/models/agents/webhook_delivery_data.rbs +2 -0
  100. data/sig/cadenya/models/agents/webhook_delivery_list_params.rbs +2 -0
  101. data/sig/cadenya/models/ai_provider_key.rbs +22 -0
  102. data/sig/cadenya/models/ai_provider_key_create_params.rbs +36 -0
  103. data/sig/cadenya/models/ai_provider_key_delete_params.rbs +28 -0
  104. data/sig/cadenya/models/ai_provider_key_list_params.rbs +61 -0
  105. data/sig/cadenya/models/ai_provider_key_retrieve_params.rbs +28 -0
  106. data/sig/cadenya/models/ai_provider_key_spec.rbs +28 -0
  107. data/sig/cadenya/models/ai_provider_key_update_params.rbs +54 -0
  108. data/sig/cadenya/models/approval_requirement_filter.rbs +20 -0
  109. data/sig/cadenya/models/attribute_filter.rbs +44 -0
  110. data/sig/cadenya/models/objective_data.rbs +14 -0
  111. data/sig/cadenya/models/objective_event_data.rbs +21 -0
  112. data/sig/cadenya/models/objective_list_params.rbs +4 -2
  113. data/sig/cadenya/models/objective_status.rbs +4 -2
  114. data/sig/cadenya/models/profile_spec.rbs +5 -1
  115. data/sig/cadenya/models/string_matcher.rbs +57 -0
  116. data/sig/cadenya/models/tool_filter.rbs +41 -0
  117. data/sig/cadenya/models/tool_set_adapter.rbs +15 -3
  118. data/sig/cadenya/models/tool_set_adapter_mcp.rbs +16 -32
  119. data/sig/cadenya/models/tool_set_adapter_openapi.rbs +73 -0
  120. data/sig/cadenya/models/tool_set_get_openapi_spec_params.rbs +28 -0
  121. data/sig/cadenya/models/tool_set_get_openapi_spec_response.rbs +15 -0
  122. data/sig/cadenya/models/tool_sets/config_openapi.rbs +30 -0
  123. data/sig/cadenya/models/tool_sets/tool_spec_config.rbs +12 -3
  124. data/sig/cadenya/models/workspace.rbs +24 -3
  125. data/sig/cadenya/models/workspace_admin/member_add_params.rbs +38 -0
  126. data/sig/cadenya/models/workspace_admin/member_list_params.rbs +38 -0
  127. data/sig/cadenya/models/workspace_admin/member_remove_params.rbs +30 -0
  128. data/sig/cadenya/models/workspace_admin/profile_list_params.rbs +40 -0
  129. data/sig/cadenya/models/workspace_admin_archive_params.rbs +23 -0
  130. data/sig/cadenya/models/workspace_admin_create_params.rbs +58 -0
  131. data/sig/cadenya/models/workspace_admin_list_params.rbs +38 -0
  132. data/sig/cadenya/models/workspace_admin_retrieve_params.rbs +23 -0
  133. data/sig/cadenya/models/workspace_admin_update_params.rbs +76 -0
  134. data/sig/cadenya/models/workspace_member.rbs +46 -0
  135. data/sig/cadenya/models.rbs +40 -2
  136. data/sig/cadenya/resources/ai_provider_keys.rbs +45 -0
  137. data/sig/cadenya/resources/tool_sets.rbs +6 -0
  138. data/sig/cadenya/resources/workspace_admin/members.rbs +29 -0
  139. data/sig/cadenya/resources/workspace_admin/profiles.rbs +16 -0
  140. data/sig/cadenya/resources/workspace_admin.rbs +42 -0
  141. metadata +89 -5
  142. data/lib/cadenya/models/mcp_tool_filter.rb +0 -111
  143. data/rbi/cadenya/models/mcp_tool_filter.rbi +0 -235
  144. data/sig/cadenya/models/mcp_tool_filter.rbs +0 -138
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ # @see Cadenya::Resources::WorkspaceAdmin#list
6
+ class WorkspaceAdminListParams < Cadenya::Internal::Type::BaseModel
7
+ extend Cadenya::Internal::Type::RequestParameters::Converter
8
+ include Cadenya::Internal::Type::RequestParameters
9
+
10
+ # @!attribute cursor
11
+ # Pagination cursor from previous response
12
+ #
13
+ # @return [String, nil]
14
+ optional :cursor, String
15
+
16
+ # @!attribute include_archived
17
+ # When true, archived workspaces are included in the results. Defaults to false
18
+ # (active workspaces only).
19
+ #
20
+ # @return [Boolean, nil]
21
+ optional :include_archived, Cadenya::Internal::Type::Boolean
22
+
23
+ # @!attribute limit
24
+ # Maximum number of results to return
25
+ #
26
+ # @return [Integer, nil]
27
+ optional :limit, Integer
28
+
29
+ # @!method initialize(cursor: nil, include_archived: nil, limit: nil, request_options: {})
30
+ # Some parameter documentations has been truncated, see
31
+ # {Cadenya::Models::WorkspaceAdminListParams} for more details.
32
+ #
33
+ # @param cursor [String] Pagination cursor from previous response
34
+ #
35
+ # @param include_archived [Boolean] When true, archived workspaces are included in the results. Defaults to
36
+ #
37
+ # @param limit [Integer] Maximum number of results to return
38
+ #
39
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ # @see Cadenya::Resources::WorkspaceAdmin#retrieve
6
+ class WorkspaceAdminRetrieveParams < Cadenya::Internal::Type::BaseModel
7
+ extend Cadenya::Internal::Type::RequestParameters::Converter
8
+ include Cadenya::Internal::Type::RequestParameters
9
+
10
+ # @!attribute workspace_id
11
+ #
12
+ # @return [String]
13
+ required :workspace_id, String
14
+
15
+ # @!method initialize(workspace_id:, request_options: {})
16
+ # @param workspace_id [String]
17
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,85 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ # @see Cadenya::Resources::WorkspaceAdmin#update
6
+ class WorkspaceAdminUpdateParams < Cadenya::Internal::Type::BaseModel
7
+ extend Cadenya::Internal::Type::RequestParameters::Converter
8
+ include Cadenya::Internal::Type::RequestParameters
9
+
10
+ # @!attribute workspace_id
11
+ #
12
+ # @return [String]
13
+ required :workspace_id, String
14
+
15
+ # @!attribute metadata
16
+ # UpdateAccountResourceMetadata contains the user-provided fields for updating an
17
+ # account-scoped resource. Read-only fields (id, account_id, profile_id) are
18
+ # excluded since they are set by the server.
19
+ #
20
+ # @return [Cadenya::Models::WorkspaceAdminUpdateParams::Metadata, nil]
21
+ optional :metadata, -> { Cadenya::WorkspaceAdminUpdateParams::Metadata }
22
+
23
+ # @!attribute spec
24
+ #
25
+ # @return [Cadenya::Models::WorkspaceSpec, nil]
26
+ optional :spec, -> { Cadenya::WorkspaceSpec }
27
+
28
+ # @!attribute update_mask
29
+ # Fields to update.
30
+ #
31
+ # @return [String, nil]
32
+ optional :update_mask, String, api_name: :updateMask
33
+
34
+ # @!method initialize(workspace_id:, metadata: nil, spec: nil, update_mask: nil, request_options: {})
35
+ # Some parameter documentations has been truncated, see
36
+ # {Cadenya::Models::WorkspaceAdminUpdateParams} for more details.
37
+ #
38
+ # @param workspace_id [String]
39
+ #
40
+ # @param metadata [Cadenya::Models::WorkspaceAdminUpdateParams::Metadata] UpdateAccountResourceMetadata contains the user-provided fields for updating
41
+ #
42
+ # @param spec [Cadenya::Models::WorkspaceSpec]
43
+ #
44
+ # @param update_mask [String] Fields to update.
45
+ #
46
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
47
+
48
+ class Metadata < Cadenya::Internal::Type::BaseModel
49
+ # @!attribute name
50
+ # Human-readable name for the resource (e.g., "Production API Key", "Staging
51
+ # Workspace")
52
+ #
53
+ # @return [String]
54
+ required :name, String
55
+
56
+ # @!attribute external_id
57
+ # External ID for the resource (e.g., a workflow ID from an external system)
58
+ #
59
+ # @return [String, nil]
60
+ optional :external_id, String, api_name: :externalId
61
+
62
+ # @!attribute labels
63
+ # Arbitrary key-value pairs for categorization and filtering Examples:
64
+ # {"environment": "production", "team": "platform", "version": "v2"}
65
+ #
66
+ # @return [Hash{Symbol=>String}, nil]
67
+ optional :labels, Cadenya::Internal::Type::HashOf[String]
68
+
69
+ # @!method initialize(name:, external_id: nil, labels: nil)
70
+ # Some parameter documentations has been truncated, see
71
+ # {Cadenya::Models::WorkspaceAdminUpdateParams::Metadata} for more details.
72
+ #
73
+ # UpdateAccountResourceMetadata contains the user-provided fields for updating an
74
+ # account-scoped resource. Read-only fields (id, account_id, profile_id) are
75
+ # excluded since they are set by the server.
76
+ #
77
+ # @param name [String] Human-readable name for the resource (e.g., "Production API Key", "Staging Works
78
+ #
79
+ # @param external_id [String] External ID for the resource (e.g., a workflow ID from an external system)
80
+ #
81
+ # @param labels [Hash{Symbol=>String}] Arbitrary key-value pairs for categorization and filtering
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ class WorkspaceMember < Cadenya::Internal::Type::BaseModel
6
+ response_only do
7
+ # @!attribute actor_id
8
+ # The actor row linking the profile to the workspace (the junction record).
9
+ #
10
+ # @return [String]
11
+ required :actor_id, String, api_name: :actorId
12
+
13
+ # @!attribute profile_id
14
+ # The account profile that has access to the workspace.
15
+ #
16
+ # @return [String]
17
+ required :profile_id, String, api_name: :profileId
18
+
19
+ # @!attribute added_at
20
+ # When the member was added to the workspace.
21
+ #
22
+ # @return [Time, nil]
23
+ optional :added_at, Time, api_name: :addedAt
24
+
25
+ # @!attribute email
26
+ # Email address of the member's profile.
27
+ #
28
+ # @return [String, nil]
29
+ optional :email, String
30
+
31
+ # @!attribute name
32
+ # Display name of the member's profile.
33
+ #
34
+ # @return [String, nil]
35
+ optional :name, String
36
+ end
37
+
38
+ # @!method initialize(actor_id:, profile_id:, added_at: nil, email: nil, name: nil)
39
+ # A member of a workspace: the profile granted access plus the actor row that
40
+ # links it to the workspace. Returned by member list/add operations.
41
+ #
42
+ # @param actor_id [String] The actor row linking the profile to the workspace (the junction record).
43
+ #
44
+ # @param profile_id [String] The account profile that has access to the workspace.
45
+ #
46
+ # @param added_at [Time] When the member was added to the workspace.
47
+ #
48
+ # @param email [String] Email address of the member's profile.
49
+ #
50
+ # @param name [String] Display name of the member's profile.
51
+ end
52
+ end
53
+ end
@@ -75,6 +75,20 @@ module Cadenya
75
75
 
76
76
  AgentVariationEntry = Cadenya::Models::AgentVariationEntry
77
77
 
78
+ AIProviderKey = Cadenya::Models::AIProviderKey
79
+
80
+ AIProviderKeyCreateParams = Cadenya::Models::AIProviderKeyCreateParams
81
+
82
+ AIProviderKeyDeleteParams = Cadenya::Models::AIProviderKeyDeleteParams
83
+
84
+ AIProviderKeyListParams = Cadenya::Models::AIProviderKeyListParams
85
+
86
+ AIProviderKeyRetrieveParams = Cadenya::Models::AIProviderKeyRetrieveParams
87
+
88
+ AIProviderKeySpec = Cadenya::Models::AIProviderKeySpec
89
+
90
+ AIProviderKeyUpdateParams = Cadenya::Models::AIProviderKeyUpdateParams
91
+
78
92
  APIKey = Cadenya::Models::APIKey
79
93
 
80
94
  APIKeyCreateParams = Cadenya::Models::APIKeyCreateParams
@@ -95,10 +109,14 @@ module Cadenya
95
109
 
96
110
  APIKeyUpdateParams = Cadenya::Models::APIKeyUpdateParams
97
111
 
112
+ ApprovalRequirementFilter = Cadenya::Models::ApprovalRequirementFilter
113
+
98
114
  AssistantMessage = Cadenya::Models::AssistantMessage
99
115
 
100
116
  AssistantToolCall = Cadenya::Models::AssistantToolCall
101
117
 
118
+ AttributeFilter = Cadenya::Models::AttributeFilter
119
+
102
120
  BareMetadata = Cadenya::Models::BareMetadata
103
121
 
104
122
  BulkWorkspaceApply = Cadenya::Models::BulkWorkspaceApply
@@ -125,8 +143,6 @@ module Cadenya
125
143
 
126
144
  CreateResourceMetadata = Cadenya::Models::CreateResourceMetadata
127
145
 
128
- McpToolFilter = Cadenya::Models::McpToolFilter
129
-
130
146
  MemoryEntryItem = Cadenya::Models::MemoryEntryItem
131
147
 
132
148
  MemoryLayer = Cadenya::Models::MemoryLayer
@@ -217,6 +233,8 @@ module Cadenya
217
233
 
218
234
  SearchSearchToolsOrToolSetsParams = Cadenya::Models::SearchSearchToolsOrToolSetsParams
219
235
 
236
+ StringMatcher = Cadenya::Models::StringMatcher
237
+
220
238
  SubAgentSpawned = Cadenya::Models::SubAgentSpawned
221
239
 
222
240
  SubAgentUpdated = Cadenya::Models::SubAgentUpdated
@@ -239,6 +257,8 @@ module Cadenya
239
257
 
240
258
  ToolError = Cadenya::Models::ToolError
241
259
 
260
+ ToolFilter = Cadenya::Models::ToolFilter
261
+
242
262
  ToolResult = Cadenya::Models::ToolResult
243
263
 
244
264
  ToolSet = Cadenya::Models::ToolSet
@@ -249,6 +269,8 @@ module Cadenya
249
269
 
250
270
  ToolSetAdapterMcp = Cadenya::Models::ToolSetAdapterMcp
251
271
 
272
+ ToolSetAdapterOpenAPI = Cadenya::Models::ToolSetAdapterOpenAPI
273
+
252
274
  ToolSetCreateParams = Cadenya::Models::ToolSetCreateParams
253
275
 
254
276
  ToolSetDeleteParams = Cadenya::Models::ToolSetDeleteParams
@@ -259,6 +281,8 @@ module Cadenya
259
281
 
260
282
  ToolSetEventData = Cadenya::Models::ToolSetEventData
261
283
 
284
+ ToolSetGetOpenAPISpecParams = Cadenya::Models::ToolSetGetOpenAPISpecParams
285
+
262
286
  ToolSetInfo = Cadenya::Models::ToolSetInfo
263
287
 
264
288
  ToolSetListEventsParams = Cadenya::Models::ToolSetListEventsParams
@@ -301,10 +325,24 @@ module Cadenya
301
325
 
302
326
  Workspace = Cadenya::Models::Workspace
303
327
 
328
+ WorkspaceAdmin = Cadenya::Models::WorkspaceAdmin
329
+
330
+ WorkspaceAdminArchiveParams = Cadenya::Models::WorkspaceAdminArchiveParams
331
+
332
+ WorkspaceAdminCreateParams = Cadenya::Models::WorkspaceAdminCreateParams
333
+
334
+ WorkspaceAdminListParams = Cadenya::Models::WorkspaceAdminListParams
335
+
336
+ WorkspaceAdminRetrieveParams = Cadenya::Models::WorkspaceAdminRetrieveParams
337
+
338
+ WorkspaceAdminUpdateParams = Cadenya::Models::WorkspaceAdminUpdateParams
339
+
304
340
  WorkspaceGetParams = Cadenya::Models::WorkspaceGetParams
305
341
 
306
342
  WorkspaceListParams = Cadenya::Models::WorkspaceListParams
307
343
 
344
+ WorkspaceMember = Cadenya::Models::WorkspaceMember
345
+
308
346
  WorkspaceSecret = Cadenya::Models::WorkspaceSecret
309
347
 
310
348
  WorkspaceSecretCreateParams = Cadenya::Models::WorkspaceSecretCreateParams
@@ -0,0 +1,168 @@
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
+ # Lists all customer-provided AI provider keys in the workspace
100
+ #
101
+ # @overload list(workspace_id, cursor: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, request_options: {})
102
+ #
103
+ # @param workspace_id [String] The workspace whose keys will be listed.
104
+ #
105
+ # @param cursor [String] Pagination cursor from previous response
106
+ #
107
+ # @param limit [Integer] Maximum number of results to return
108
+ #
109
+ # @param prefix [String] Filter expression (query param: prefix)
110
+ #
111
+ # @param query [String] Free-form search query
112
+ #
113
+ # @param sort_order [String] Sort order for results (asc or desc by creation time)
114
+ #
115
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
116
+ #
117
+ # @return [Cadenya::Internal::CursorPagination<Cadenya::Models::AIProviderKey>]
118
+ #
119
+ # @see Cadenya::Models::AIProviderKeyListParams
120
+ def list(workspace_id, params = {})
121
+ parsed, options = Cadenya::AIProviderKeyListParams.dump_request(params)
122
+ query = Cadenya::Internal::Util.encode_query_params(parsed)
123
+ @client.request(
124
+ method: :get,
125
+ path: ["v1/workspaces/%1$s/ai_provider_keys", workspace_id],
126
+ query: query.transform_keys(sort_order: "sortOrder"),
127
+ page: Cadenya::Internal::CursorPagination,
128
+ model: Cadenya::AIProviderKey,
129
+ options: options
130
+ )
131
+ end
132
+
133
+ # Deletes an AI provider key from the workspace
134
+ #
135
+ # @overload delete(id, workspace_id:, request_options: {})
136
+ #
137
+ # @param id [String] The key to delete.
138
+ #
139
+ # @param workspace_id [String] The workspace the key belongs to.
140
+ #
141
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
142
+ #
143
+ # @return [nil]
144
+ #
145
+ # @see Cadenya::Models::AIProviderKeyDeleteParams
146
+ def delete(id, params)
147
+ parsed, options = Cadenya::AIProviderKeyDeleteParams.dump_request(params)
148
+ workspace_id =
149
+ parsed.delete(:workspace_id) do
150
+ raise ArgumentError.new("missing required path argument #{_1}")
151
+ end
152
+ @client.request(
153
+ method: :delete,
154
+ path: ["v1/workspaces/%1$s/ai_provider_keys/%2$s", workspace_id, id],
155
+ model: NilClass,
156
+ options: options
157
+ )
158
+ end
159
+
160
+ # @api private
161
+ #
162
+ # @param client [Cadenya::Client]
163
+ def initialize(client:)
164
+ @client = client
165
+ end
166
+ end
167
+ end
168
+ end
@@ -184,6 +184,37 @@ module Cadenya
184
184
  )
185
185
  end
186
186
 
187
+ # Some parameter documentations has been truncated, see
188
+ # {Cadenya::Models::ToolSetGetOpenAPISpecParams} for more details.
189
+ #
190
+ # Retrieves the current OpenAPI specification JSON that has been consumed by the
191
+ # tool set. Only applicable to tool sets using the OpenAPI adapter.
192
+ #
193
+ # @overload get_openapi_spec(tool_set_id, workspace_id:, request_options: {})
194
+ #
195
+ # @param tool_set_id [String] Tool set ID. Accepts the canonical ts\_… form or the
196
+ #
197
+ # @param workspace_id [String] Workspace ID.
198
+ #
199
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
200
+ #
201
+ # @return [Cadenya::Models::ToolSetGetOpenAPISpecResponse]
202
+ #
203
+ # @see Cadenya::Models::ToolSetGetOpenAPISpecParams
204
+ def get_openapi_spec(tool_set_id, params)
205
+ parsed, options = Cadenya::ToolSetGetOpenAPISpecParams.dump_request(params)
206
+ workspace_id =
207
+ parsed.delete(:workspace_id) do
208
+ raise ArgumentError.new("missing required path argument #{_1}")
209
+ end
210
+ @client.request(
211
+ method: :get,
212
+ path: ["v1/workspaces/%1$s/tool_sets/%2$s/openapi_spec", workspace_id, tool_set_id],
213
+ model: Cadenya::Models::ToolSetGetOpenAPISpecResponse,
214
+ options: options
215
+ )
216
+ end
217
+
187
218
  # Some parameter documentations has been truncated, see
188
219
  # {Cadenya::Models::ToolSetListEventsParams} for more details.
189
220
  #
@@ -0,0 +1,107 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Resources
5
+ class WorkspaceAdmin
6
+ # Administer workspaces across the account: create and archive workspaces and
7
+ # manage their membership. These operations are account-scoped and require the
8
+ # admin role (a token whose profile holds the WorkOS admin role); they live under
9
+ # /v1/account/workspaces rather than the workspace-scoped /v1/workspaces tree so
10
+ # an admin can manage any workspace in the account, including ones they are not
11
+ # themselves a member of.
12
+ class Members
13
+ # Lists the members of a workspace. Admin only.
14
+ #
15
+ # @overload list(workspace_id, cursor: nil, limit: nil, request_options: {})
16
+ #
17
+ # @param workspace_id [String] The workspace whose members will be listed (path).
18
+ #
19
+ # @param cursor [String] Pagination cursor from previous response
20
+ #
21
+ # @param limit [Integer] Maximum number of results to return
22
+ #
23
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
24
+ #
25
+ # @return [Cadenya::Internal::CursorPagination<Cadenya::Models::WorkspaceMember>]
26
+ #
27
+ # @see Cadenya::Models::WorkspaceAdmin::MemberListParams
28
+ def list(workspace_id, params = {})
29
+ parsed, options = Cadenya::WorkspaceAdmin::MemberListParams.dump_request(params)
30
+ query = Cadenya::Internal::Util.encode_query_params(parsed)
31
+ @client.request(
32
+ method: :get,
33
+ path: ["v1/account/workspaces/%1$s/members", workspace_id],
34
+ query: query,
35
+ page: Cadenya::Internal::CursorPagination,
36
+ model: Cadenya::WorkspaceMember,
37
+ options: options
38
+ )
39
+ end
40
+
41
+ # Grants a profile access to the workspace by creating (or reactivating) the actor
42
+ # that links the profile to the workspace. Accepts either an existing profile_id
43
+ # or an email to resolve-or-invite. Idempotent for an already-active member. Admin
44
+ # only.
45
+ #
46
+ # @overload add(workspace_id, email: nil, profile_id: nil, request_options: {})
47
+ #
48
+ # @param workspace_id [String] The workspace to add the member to (path).
49
+ #
50
+ # @param email [String] Email address to add (resolve-or-invite). Mutually exclusive with profile_id.
51
+ #
52
+ # @param profile_id [String] An existing account profile to add. Mutually exclusive with email.
53
+ #
54
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
55
+ #
56
+ # @return [Cadenya::Models::WorkspaceMember]
57
+ #
58
+ # @see Cadenya::Models::WorkspaceAdmin::MemberAddParams
59
+ def add(workspace_id, params = {})
60
+ parsed, options = Cadenya::WorkspaceAdmin::MemberAddParams.dump_request(params)
61
+ @client.request(
62
+ method: :post,
63
+ path: ["v1/account/workspaces/%1$s/members", workspace_id],
64
+ body: parsed,
65
+ model: Cadenya::WorkspaceMember,
66
+ options: options
67
+ )
68
+ end
69
+
70
+ # Revokes a member's access by deactivating their actor; the member is immediately
71
+ # cut off. The underlying profile is not deleted. Admin only.
72
+ #
73
+ # @overload remove(profile_id, workspace_id:, request_options: {})
74
+ #
75
+ # @param profile_id [String] The profile to remove from the workspace (path).
76
+ #
77
+ # @param workspace_id [String] The workspace to remove the member from (path).
78
+ #
79
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
80
+ #
81
+ # @return [nil]
82
+ #
83
+ # @see Cadenya::Models::WorkspaceAdmin::MemberRemoveParams
84
+ def remove(profile_id, params)
85
+ parsed, options = Cadenya::WorkspaceAdmin::MemberRemoveParams.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: :delete,
92
+ path: ["v1/account/workspaces/%1$s/members/%2$s", workspace_id, profile_id],
93
+ model: NilClass,
94
+ options: options
95
+ )
96
+ end
97
+
98
+ # @api private
99
+ #
100
+ # @param client [Cadenya::Client]
101
+ def initialize(client:)
102
+ @client = client
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Resources
5
+ class WorkspaceAdmin
6
+ # Administer workspaces across the account: create and archive workspaces and
7
+ # manage their membership. These operations are account-scoped and require the
8
+ # admin role (a token whose profile holds the WorkOS admin role); they live under
9
+ # /v1/account/workspaces rather than the workspace-scoped /v1/workspaces tree so
10
+ # an admin can manage any workspace in the account, including ones they are not
11
+ # themselves a member of.
12
+ class Profiles
13
+ # Some parameter documentations has been truncated, see
14
+ # {Cadenya::Models::WorkspaceAdmin::ProfileListParams} for more details.
15
+ #
16
+ # Searches the account's profiles for a member picker, with free-form name/email
17
+ # search and an optional type filter. Account-scoped; admin only.
18
+ #
19
+ # @overload list(cursor: nil, limit: nil, query: nil, request_options: {})
20
+ #
21
+ # @param cursor [String] Pagination cursor from previous response
22
+ #
23
+ # @param limit [Integer] Maximum number of results to return
24
+ #
25
+ # @param query [String] Free-form search over profile name and email. Case-insensitive substring
26
+ #
27
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
28
+ #
29
+ # @return [Cadenya::Internal::CursorPagination<Cadenya::Models::Profile>]
30
+ #
31
+ # @see Cadenya::Models::WorkspaceAdmin::ProfileListParams
32
+ def list(params = {})
33
+ parsed, options = Cadenya::WorkspaceAdmin::ProfileListParams.dump_request(params)
34
+ query = Cadenya::Internal::Util.encode_query_params(parsed)
35
+ @client.request(
36
+ method: :get,
37
+ path: "v1/account/profiles",
38
+ query: query,
39
+ page: Cadenya::Internal::CursorPagination,
40
+ model: Cadenya::Profile,
41
+ options: options
42
+ )
43
+ end
44
+
45
+ # @api private
46
+ #
47
+ # @param client [Cadenya::Client]
48
+ def initialize(client:)
49
+ @client = client
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end