cadenya 0.9.0 → 0.10.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 (123) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +7 -7
  4. data/lib/cadenya/models/agent.rb +28 -1
  5. data/lib/cadenya/models/agent_archive_params.rb +26 -0
  6. data/lib/cadenya/models/agent_entry.rb +31 -1
  7. data/lib/cadenya/models/agent_list_params.rb +12 -12
  8. data/lib/cadenya/models/agent_publish_params.rb +26 -0
  9. data/lib/cadenya/models/agent_schedule_entry.rb +31 -1
  10. data/lib/cadenya/models/agent_spec.rb +1 -24
  11. data/lib/cadenya/models/agent_unarchive_params.rb +26 -0
  12. data/lib/cadenya/models/agent_unpublish_params.rb +26 -0
  13. data/lib/cadenya/models/agents/agent_schedule.rb +30 -1
  14. data/lib/cadenya/models/agents/agent_schedule_info.rb +1 -1
  15. data/lib/cadenya/models/agents/agent_schedule_spec.rb +1 -24
  16. data/lib/cadenya/models/agents/schedule_archive_params.rb +34 -0
  17. data/lib/cadenya/models/agents/schedule_pause_params.rb +34 -0
  18. data/lib/cadenya/models/agents/schedule_resume_params.rb +34 -0
  19. data/lib/cadenya/models/bulk_workspace_apply_data.rb +6 -7
  20. data/lib/cadenya/models/model.rb +25 -1
  21. data/lib/cadenya/models/model_disable_params.rb +26 -0
  22. data/lib/cadenya/models/model_enable_params.rb +26 -0
  23. data/lib/cadenya/models/model_list_params.rb +11 -11
  24. data/lib/cadenya/models/model_spec.rb +1 -23
  25. data/lib/cadenya/models/resource_metadata.rb +9 -1
  26. data/lib/cadenya/models/tool_entry.rb +31 -1
  27. data/lib/cadenya/models/tool_set.rb +27 -1
  28. data/lib/cadenya/models/tool_set_archive_params.rb +26 -0
  29. data/lib/cadenya/models/tool_set_list_params.rb +26 -1
  30. data/lib/cadenya/models/tool_set_unarchive_params.rb +26 -0
  31. data/lib/cadenya/models/tool_sets/tool.rb +28 -1
  32. data/lib/cadenya/models/tool_sets/tool_list_params.rb +11 -12
  33. data/lib/cadenya/models/tool_sets/tool_omit_params.rb +34 -0
  34. data/lib/cadenya/models/tool_sets/tool_restore_params.rb +34 -0
  35. data/lib/cadenya/models/tool_sets/tool_spec.rb +3 -23
  36. data/lib/cadenya/models.rb +16 -2
  37. data/lib/cadenya/resources/account.rb +1 -1
  38. data/lib/cadenya/resources/agents/schedules.rb +112 -0
  39. data/lib/cadenya/resources/agents.rb +126 -2
  40. data/lib/cadenya/resources/api_keys.rb +2 -2
  41. data/lib/cadenya/resources/models.rb +39 -13
  42. data/lib/cadenya/resources/tool_sets/tools.rb +77 -3
  43. data/lib/cadenya/resources/tool_sets.rb +73 -2
  44. data/lib/cadenya/version.rb +1 -1
  45. data/lib/cadenya.rb +13 -1
  46. data/rbi/cadenya/models/agent.rbi +34 -0
  47. data/rbi/cadenya/models/agent_archive_params.rbi +43 -0
  48. data/rbi/cadenya/models/agent_entry.rbi +41 -0
  49. data/rbi/cadenya/models/agent_list_params.rbi +22 -31
  50. data/rbi/cadenya/models/agent_publish_params.rbi +43 -0
  51. data/rbi/cadenya/models/agent_schedule_entry.rbi +52 -3
  52. data/rbi/cadenya/models/agent_spec.rbi +0 -41
  53. data/rbi/cadenya/models/agent_unarchive_params.rbi +43 -0
  54. data/rbi/cadenya/models/agent_unpublish_params.rbi +43 -0
  55. data/rbi/cadenya/models/agents/agent_schedule.rbi +54 -0
  56. data/rbi/cadenya/models/agents/agent_schedule_info.rbi +2 -2
  57. data/rbi/cadenya/models/agents/agent_schedule_spec.rbi +0 -59
  58. data/rbi/cadenya/models/agents/schedule_archive_params.rbi +53 -0
  59. data/rbi/cadenya/models/agents/schedule_pause_params.rbi +53 -0
  60. data/rbi/cadenya/models/agents/schedule_resume_params.rbi +53 -0
  61. data/rbi/cadenya/models/bulk_workspace_apply_data.rbi +12 -14
  62. data/rbi/cadenya/models/model.rbi +30 -0
  63. data/rbi/cadenya/models/model_disable_params.rbi +43 -0
  64. data/rbi/cadenya/models/model_enable_params.rbi +43 -0
  65. data/rbi/cadenya/models/model_list_params.rbi +20 -26
  66. data/rbi/cadenya/models/model_spec.rbi +3 -42
  67. data/rbi/cadenya/models/resource_metadata.rbi +14 -3
  68. data/rbi/cadenya/models/tool_entry.rbi +44 -3
  69. data/rbi/cadenya/models/tool_set.rbi +35 -0
  70. data/rbi/cadenya/models/tool_set_archive_params.rbi +43 -0
  71. data/rbi/cadenya/models/tool_set_list_params.rbi +44 -0
  72. data/rbi/cadenya/models/tool_set_unarchive_params.rbi +43 -0
  73. data/rbi/cadenya/models/tool_sets/tool.rbi +43 -0
  74. data/rbi/cadenya/models/tool_sets/tool_list_params.rbi +26 -27
  75. data/rbi/cadenya/models/tool_sets/tool_omit_params.rbi +50 -0
  76. data/rbi/cadenya/models/tool_sets/tool_restore_params.rbi +53 -0
  77. data/rbi/cadenya/models/tool_sets/tool_spec.rbi +3 -49
  78. data/rbi/cadenya/models.rbi +16 -2
  79. data/rbi/cadenya/resources/agents/schedules.rbi +70 -0
  80. data/rbi/cadenya/resources/agents.rbi +79 -3
  81. data/rbi/cadenya/resources/models.rbi +26 -10
  82. data/rbi/cadenya/resources/tool_sets/tools.rbi +46 -4
  83. data/rbi/cadenya/resources/tool_sets.rbi +44 -0
  84. data/sig/cadenya/models/agent.rbs +19 -0
  85. data/sig/cadenya/models/agent_archive_params.rbs +28 -0
  86. data/sig/cadenya/models/agent_entry.rbs +23 -0
  87. data/sig/cadenya/models/agent_list_params.rbs +15 -18
  88. data/sig/cadenya/models/agent_publish_params.rbs +28 -0
  89. data/sig/cadenya/models/agent_schedule_entry.rbs +26 -3
  90. data/sig/cadenya/models/agent_spec.rbs +0 -22
  91. data/sig/cadenya/models/agent_unarchive_params.rbs +28 -0
  92. data/sig/cadenya/models/agent_unpublish_params.rbs +28 -0
  93. data/sig/cadenya/models/agents/agent_schedule.rbs +19 -0
  94. data/sig/cadenya/models/agents/agent_schedule_spec.rbs +0 -26
  95. data/sig/cadenya/models/agents/schedule_archive_params.rbs +34 -0
  96. data/sig/cadenya/models/agents/schedule_pause_params.rbs +34 -0
  97. data/sig/cadenya/models/agents/schedule_resume_params.rbs +34 -0
  98. data/sig/cadenya/models/model.rbs +17 -0
  99. data/sig/cadenya/models/model_disable_params.rbs +28 -0
  100. data/sig/cadenya/models/model_enable_params.rbs +28 -0
  101. data/sig/cadenya/models/model_list_params.rbs +13 -16
  102. data/sig/cadenya/models/model_spec.rbs +3 -27
  103. data/sig/cadenya/models/resource_metadata.rbs +10 -3
  104. data/sig/cadenya/models/tool_entry.rbs +26 -3
  105. data/sig/cadenya/models/tool_set.rbs +17 -0
  106. data/sig/cadenya/models/tool_set_archive_params.rbs +28 -0
  107. data/sig/cadenya/models/tool_set_list_params.rbs +22 -1
  108. data/sig/cadenya/models/tool_set_unarchive_params.rbs +28 -0
  109. data/sig/cadenya/models/tool_sets/tool.rbs +22 -0
  110. data/sig/cadenya/models/tool_sets/tool_list_params.rbs +18 -18
  111. data/sig/cadenya/models/tool_sets/tool_omit_params.rbs +34 -0
  112. data/sig/cadenya/models/tool_sets/tool_restore_params.rbs +34 -0
  113. data/sig/cadenya/models/tool_sets/tool_spec.rbs +2 -26
  114. data/sig/cadenya/models.rbs +16 -2
  115. data/sig/cadenya/resources/agents/schedules.rbs +21 -0
  116. data/sig/cadenya/resources/agents.rbs +25 -1
  117. data/sig/cadenya/resources/models.rbs +8 -3
  118. data/sig/cadenya/resources/tool_sets/tools.rbs +15 -1
  119. data/sig/cadenya/resources/tool_sets.rbs +13 -0
  120. metadata +41 -5
  121. data/lib/cadenya/models/model_set_status_params.rb +0 -48
  122. data/rbi/cadenya/models/model_set_status_params.rbi +0 -95
  123. data/sig/cadenya/models/model_set_status_params.rbs +0 -55
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3e78e865ea1a9838b148148fe690c8df1265661c672222de2646e0b90b2d840
4
- data.tar.gz: 6404da69bb9771a5c784d9a93820b1ea22a8bc94d56d923eb95cfc9116ea7891
3
+ metadata.gz: fdbe6be38292a9c2cdb1398a82675a4b9d83e2a633479147843681b820dc21fb
4
+ data.tar.gz: 26192932a4a0229f48bcbcb6bc4f1ae119351fd349eabaadafcfe746a8f3a2de
5
5
  SHA512:
6
- metadata.gz: 0e0f72e933688ded58e7fd885bf999c8fc74279b10447fe6c45e28436c8280dd2f05e9743cab5ca5b94d06afef6d74d92f153231c175b6961069677aa19a1b6a
7
- data.tar.gz: 514982d691d62da5bf6b7a197dc9de64f81e8a4292d26e68be6406908584178b23f17ac20ab8e0f9933b7de63e46ff2f7392b3d9eca62357ce254f3e79945ceb
6
+ metadata.gz: b68888435e7da1c39ecb5a13f8543e8aee96e07cdef1433fe1ce5d4310bfe75f114f2efd1b43f290a278ec307c0697f2ff8dfd41712bf2c080114c1afb4dbed0
7
+ data.tar.gz: ab0ea603fe0175091589cb156b96129cc82a88468e627ff2232f5fb7d500b6863372f81c0ce3b12ec02d1c849b49363991334f37b22c725a404e2344ba04f049
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.0 (2026-06-09)
4
+
5
+ Full Changelog: [v0.9.0...v0.10.0](https://github.com/cadenya/cadenya-ruby/compare/v0.9.0...v0.10.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([cdaa521](https://github.com/cadenya/cadenya-ruby/commit/cdaa521d795cd4bf7b9f6df4223a3e9efab77d57))
10
+
3
11
  ## 0.9.0 (2026-06-08)
4
12
 
5
13
  Full Changelog: [v0.8.0...v0.9.0](https://github.com/cadenya/cadenya-ruby/compare/v0.8.0...v0.9.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "cadenya", "~> 0.9.0"
20
+ gem "cadenya", "~> 0.10.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -224,11 +224,11 @@ cadenya.account.retrieve(**params)
224
224
  Since this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols" instead, which is always a primitive at runtime:
225
225
 
226
226
  ```ruby
227
- # :AGENT_STATUS_UNSPECIFIED
228
- puts(Cadenya::AgentListParams::Status::AGENT_STATUS_UNSPECIFIED)
227
+ # :STATE_UNSPECIFIED
228
+ puts(Cadenya::AgentListParams::State::STATE_UNSPECIFIED)
229
229
 
230
- # Revealed type: `T.all(Cadenya::AgentListParams::Status, Symbol)`
231
- T.reveal_type(Cadenya::AgentListParams::Status::AGENT_STATUS_UNSPECIFIED)
230
+ # Revealed type: `T.all(Cadenya::AgentListParams::State, Symbol)`
231
+ T.reveal_type(Cadenya::AgentListParams::State::STATE_UNSPECIFIED)
232
232
  ```
233
233
 
234
234
  Enum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:
@@ -236,13 +236,13 @@ Enum parameters have a "relaxed" type, so you can either pass in enum constants
236
236
  ```ruby
237
237
  # Using the enum constants preserves the tagged type information:
238
238
  cadenya.agents.list(
239
- status: Cadenya::AgentListParams::Status::AGENT_STATUS_UNSPECIFIED,
239
+ state: Cadenya::AgentListParams::State::STATE_UNSPECIFIED,
240
240
  # …
241
241
  )
242
242
 
243
243
  # Literal values are also permissible:
244
244
  cadenya.agents.list(
245
- status: :AGENT_STATUS_UNSPECIFIED,
245
+ state: :STATE_UNSPECIFIED,
246
246
  # …
247
247
  )
248
248
  ```
@@ -17,6 +17,14 @@ module Cadenya
17
17
  required :spec, -> { Cadenya::AgentSpec }
18
18
 
19
19
  response_only do
20
+ # @!attribute state
21
+ # The current lifecycle state of the agent. Output only. Agents are created in
22
+ # STATE_DRAFT; use the :publish, :unpublish, :archive, and :unarchive actions to
23
+ # transition between states.
24
+ #
25
+ # @return [Symbol, Cadenya::Models::Agent::State]
26
+ required :state, enum: -> { Cadenya::Agent::State }
27
+
20
28
  # @!attribute info
21
29
  # AgentInfo contains simple information about an agent for display or quick
22
30
  # reference
@@ -25,7 +33,7 @@ module Cadenya
25
33
  optional :info, -> { Cadenya::AgentInfo }
26
34
  end
27
35
 
28
- # @!method initialize(metadata:, spec:, info: nil)
36
+ # @!method initialize(metadata:, spec:, state:, info: nil)
29
37
  # Some parameter documentations has been truncated, see {Cadenya::Models::Agent}
30
38
  # for more details.
31
39
  #
@@ -35,7 +43,26 @@ module Cadenya
35
43
  #
36
44
  # @param spec [Cadenya::Models::AgentSpec] Agent specification (user-provided configuration)
37
45
  #
46
+ # @param state [Symbol, Cadenya::Models::Agent::State] The current lifecycle state of the agent. Output only. Agents are created
47
+ #
38
48
  # @param info [Cadenya::Models::AgentInfo] AgentInfo contains simple information about an agent for display or quick refere
49
+
50
+ # The current lifecycle state of the agent. Output only. Agents are created in
51
+ # STATE_DRAFT; use the :publish, :unpublish, :archive, and :unarchive actions to
52
+ # transition between states.
53
+ #
54
+ # @see Cadenya::Models::Agent#state
55
+ module State
56
+ extend Cadenya::Internal::Type::Enum
57
+
58
+ STATE_UNSPECIFIED = :STATE_UNSPECIFIED
59
+ STATE_DRAFT = :STATE_DRAFT
60
+ STATE_PUBLISHED = :STATE_PUBLISHED
61
+ STATE_ARCHIVED = :STATE_ARCHIVED
62
+
63
+ # @!method self.values
64
+ # @return [Array<Symbol>]
65
+ end
39
66
  end
40
67
  end
41
68
  end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ # @see Cadenya::Resources::Agents#archive
6
+ class AgentArchiveParams < 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 id
16
+ #
17
+ # @return [String]
18
+ required :id, String
19
+
20
+ # @!method initialize(workspace_id:, id:, request_options: {})
21
+ # @param workspace_id [String]
22
+ # @param id [String]
23
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
24
+ end
25
+ end
26
+ end
@@ -25,13 +25,24 @@ module Cadenya
25
25
  # @return [Hash{Symbol=>Cadenya::Models::AgentScheduleEntry}, nil]
26
26
  optional :schedules, -> { Cadenya::Internal::Type::HashOf[Cadenya::AgentScheduleEntry] }
27
27
 
28
+ # @!attribute state
29
+ # Desired lifecycle state for the agent. Defaults to STATE_DRAFT when unspecified.
30
+ # STATE_PUBLISHED publishes the agent once its variations exist; see also
31
+ # BulkWorkspaceApplyData.automatically_publish_agents.
32
+ #
33
+ # @return [Symbol, Cadenya::Models::AgentEntry::State, nil]
34
+ optional :state, enum: -> { Cadenya::AgentEntry::State }
35
+
28
36
  # @!attribute variations
29
37
  # Variations under this agent, keyed by external_id.
30
38
  #
31
39
  # @return [Hash{Symbol=>Cadenya::Models::AgentVariationEntry}, nil]
32
40
  optional :variations, -> { Cadenya::Internal::Type::HashOf[Cadenya::AgentVariationEntry] }
33
41
 
34
- # @!method initialize(name:, spec:, labels: nil, schedules: nil, variations: nil)
42
+ # @!method initialize(name:, spec:, labels: nil, schedules: nil, state: nil, variations: nil)
43
+ # Some parameter documentations has been truncated, see
44
+ # {Cadenya::Models::AgentEntry} for more details.
45
+ #
35
46
  # @param name [String]
36
47
  #
37
48
  # @param spec [Cadenya::Models::AgentSpec] Agent specification (user-provided configuration)
@@ -40,7 +51,26 @@ module Cadenya
40
51
  #
41
52
  # @param schedules [Hash{Symbol=>Cadenya::Models::AgentScheduleEntry}] Schedules under this agent, keyed by external_id.
42
53
  #
54
+ # @param state [Symbol, Cadenya::Models::AgentEntry::State] Desired lifecycle state for the agent. Defaults to STATE_DRAFT when
55
+ #
43
56
  # @param variations [Hash{Symbol=>Cadenya::Models::AgentVariationEntry}] Variations under this agent, keyed by external_id.
57
+
58
+ # Desired lifecycle state for the agent. Defaults to STATE_DRAFT when unspecified.
59
+ # STATE_PUBLISHED publishes the agent once its variations exist; see also
60
+ # BulkWorkspaceApplyData.automatically_publish_agents.
61
+ #
62
+ # @see Cadenya::Models::AgentEntry#state
63
+ module State
64
+ extend Cadenya::Internal::Type::Enum
65
+
66
+ STATE_UNSPECIFIED = :STATE_UNSPECIFIED
67
+ STATE_DRAFT = :STATE_DRAFT
68
+ STATE_PUBLISHED = :STATE_PUBLISHED
69
+ STATE_ARCHIVED = :STATE_ARCHIVED
70
+
71
+ # @!method self.values
72
+ # @return [Array<Symbol>]
73
+ end
44
74
  end
45
75
  end
46
76
  end
@@ -55,11 +55,11 @@ module Cadenya
55
55
  # @return [String, nil]
56
56
  optional :sort_order, String
57
57
 
58
- # @!attribute status
59
- # Filter by agent publication status
58
+ # @!attribute state
59
+ # Filter by agent lifecycle state
60
60
  #
61
- # @return [Symbol, Cadenya::Models::AgentListParams::Status, nil]
62
- optional :status, enum: -> { Cadenya::AgentListParams::Status }
61
+ # @return [Symbol, Cadenya::Models::AgentListParams::State, nil]
62
+ optional :state, enum: -> { Cadenya::AgentListParams::State }
63
63
 
64
64
  # @!attribute variation_selection_mode
65
65
  # Filter by variation selection mode
@@ -67,7 +67,7 @@ module Cadenya
67
67
  # @return [Symbol, Cadenya::Models::AgentListParams::VariationSelectionMode, nil]
68
68
  optional :variation_selection_mode, enum: -> { Cadenya::AgentListParams::VariationSelectionMode }
69
69
 
70
- # @!method initialize(workspace_id:, bundle_key: nil, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, status: nil, variation_selection_mode: nil, request_options: {})
70
+ # @!method initialize(workspace_id:, bundle_key: nil, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, state: nil, variation_selection_mode: nil, request_options: {})
71
71
  # Some parameter documentations has been truncated, see
72
72
  # {Cadenya::Models::AgentListParams} for more details.
73
73
  #
@@ -87,20 +87,20 @@ module Cadenya
87
87
  #
88
88
  # @param sort_order [String] Sort order for results (asc or desc by creation time)
89
89
  #
90
- # @param status [Symbol, Cadenya::Models::AgentListParams::Status] Filter by agent publication status
90
+ # @param state [Symbol, Cadenya::Models::AgentListParams::State] Filter by agent lifecycle state
91
91
  #
92
92
  # @param variation_selection_mode [Symbol, Cadenya::Models::AgentListParams::VariationSelectionMode] Filter by variation selection mode
93
93
  #
94
94
  # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
95
95
 
96
- # Filter by agent publication status
97
- module Status
96
+ # Filter by agent lifecycle state
97
+ module State
98
98
  extend Cadenya::Internal::Type::Enum
99
99
 
100
- AGENT_STATUS_UNSPECIFIED = :AGENT_STATUS_UNSPECIFIED
101
- AGENT_STATUS_DRAFT = :AGENT_STATUS_DRAFT
102
- AGENT_STATUS_PUBLISHED = :AGENT_STATUS_PUBLISHED
103
- AGENT_STATUS_ARCHIVED = :AGENT_STATUS_ARCHIVED
100
+ STATE_UNSPECIFIED = :STATE_UNSPECIFIED
101
+ STATE_DRAFT = :STATE_DRAFT
102
+ STATE_PUBLISHED = :STATE_PUBLISHED
103
+ STATE_ARCHIVED = :STATE_ARCHIVED
104
104
 
105
105
  # @!method self.values
106
106
  # @return [Array<Symbol>]
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ # @see Cadenya::Resources::Agents#publish
6
+ class AgentPublishParams < 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 id
16
+ #
17
+ # @return [String]
18
+ required :id, String
19
+
20
+ # @!method initialize(workspace_id:, id:, request_options: {})
21
+ # @param workspace_id [String]
22
+ # @param id [String]
23
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
24
+ end
25
+ end
26
+ end
@@ -19,12 +19,42 @@ module Cadenya
19
19
  # @return [Hash{Symbol=>String}, nil]
20
20
  optional :labels, Cadenya::Internal::Type::HashOf[String]
21
21
 
22
- # @!method initialize(name:, spec:, labels: nil)
22
+ # @!attribute state
23
+ # Desired lifecycle state for the schedule. Defaults to STATE_ACTIVE when
24
+ # unspecified. Declare STATE_PAUSED to provision a schedule without it firing.
25
+ # STATE_ARCHIVED is rejected here.
26
+ #
27
+ # @return [Symbol, Cadenya::Models::AgentScheduleEntry::State, nil]
28
+ optional :state, enum: -> { Cadenya::AgentScheduleEntry::State }
29
+
30
+ # @!method initialize(name:, spec:, labels: nil, state: nil)
31
+ # Some parameter documentations has been truncated, see
32
+ # {Cadenya::Models::AgentScheduleEntry} for more details.
33
+ #
23
34
  # @param name [String]
24
35
  #
25
36
  # @param spec [Cadenya::Models::Agents::AgentScheduleSpec] AgentScheduleSpec is the user-provided configuration for a schedule.
26
37
  #
27
38
  # @param labels [Hash{Symbol=>String}]
39
+ #
40
+ # @param state [Symbol, Cadenya::Models::AgentScheduleEntry::State] Desired lifecycle state for the schedule. Defaults to STATE_ACTIVE when
41
+
42
+ # Desired lifecycle state for the schedule. Defaults to STATE_ACTIVE when
43
+ # unspecified. Declare STATE_PAUSED to provision a schedule without it firing.
44
+ # STATE_ARCHIVED is rejected here.
45
+ #
46
+ # @see Cadenya::Models::AgentScheduleEntry#state
47
+ module State
48
+ extend Cadenya::Internal::Type::Enum
49
+
50
+ STATE_UNSPECIFIED = :STATE_UNSPECIFIED
51
+ STATE_ACTIVE = :STATE_ACTIVE
52
+ STATE_PAUSED = :STATE_PAUSED
53
+ STATE_ARCHIVED = :STATE_ARCHIVED
54
+
55
+ # @!method self.values
56
+ # @return [Array<Symbol>]
57
+ end
28
58
  end
29
59
  end
30
60
  end
@@ -3,12 +3,6 @@
3
3
  module Cadenya
4
4
  module Models
5
5
  class AgentSpec < Cadenya::Internal::Type::BaseModel
6
- # @!attribute status
7
- # Status of the agent
8
- #
9
- # @return [Symbol, Cadenya::Models::AgentSpec::Status]
10
- required :status, enum: -> { Cadenya::AgentSpec::Status }
11
-
12
6
  # @!attribute variation_selection_mode
13
7
  # Controls how variations are automatically selected when creating objectives
14
8
  # Defaults to RANDOM when unspecified
@@ -53,14 +47,12 @@ module Cadenya
53
47
  # @return [String, nil]
54
48
  optional :webhook_events_url, String, api_name: :webhookEventsUrl
55
49
 
56
- # @!method initialize(status:, variation_selection_mode:, description: nil, input_data_schema: nil, output_definition: nil, webhook_events_url: nil)
50
+ # @!method initialize(variation_selection_mode:, description: nil, input_data_schema: nil, output_definition: nil, webhook_events_url: nil)
57
51
  # Some parameter documentations has been truncated, see
58
52
  # {Cadenya::Models::AgentSpec} for more details.
59
53
  #
60
54
  # Agent specification (user-provided configuration)
61
55
  #
62
- # @param status [Symbol, Cadenya::Models::AgentSpec::Status] Status of the agent
63
- #
64
56
  # @param variation_selection_mode [Symbol, Cadenya::Models::AgentSpec::VariationSelectionMode] Controls how variations are automatically selected when creating objectives
65
57
  #
66
58
  # @param description [String] Description of the agent's purpose
@@ -71,21 +63,6 @@ module Cadenya
71
63
  #
72
64
  # @param webhook_events_url [String] The URL that Cadenya will send events for any objective assigned to the agent.
73
65
 
74
- # Status of the agent
75
- #
76
- # @see Cadenya::Models::AgentSpec#status
77
- module Status
78
- extend Cadenya::Internal::Type::Enum
79
-
80
- AGENT_STATUS_UNSPECIFIED = :AGENT_STATUS_UNSPECIFIED
81
- AGENT_STATUS_DRAFT = :AGENT_STATUS_DRAFT
82
- AGENT_STATUS_PUBLISHED = :AGENT_STATUS_PUBLISHED
83
- AGENT_STATUS_ARCHIVED = :AGENT_STATUS_ARCHIVED
84
-
85
- # @!method self.values
86
- # @return [Array<Symbol>]
87
- end
88
-
89
66
  # Controls how variations are automatically selected when creating objectives
90
67
  # Defaults to RANDOM when unspecified
91
68
  #
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ # @see Cadenya::Resources::Agents#unarchive
6
+ class AgentUnarchiveParams < 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 id
16
+ #
17
+ # @return [String]
18
+ required :id, String
19
+
20
+ # @!method initialize(workspace_id:, id:, request_options: {})
21
+ # @param workspace_id [String]
22
+ # @param id [String]
23
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ # @see Cadenya::Resources::Agents#unpublish
6
+ class AgentUnpublishParams < 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 id
16
+ #
17
+ # @return [String]
18
+ required :id, String
19
+
20
+ # @!method initialize(workspace_id:, id:, request_options: {})
21
+ # @param workspace_id [String]
22
+ # @param id [String]
23
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
24
+ end
25
+ end
26
+ end
@@ -23,7 +23,17 @@ module Cadenya
23
23
  # @return [Cadenya::Models::Agents::AgentScheduleInfo, nil]
24
24
  optional :info, -> { Cadenya::Agents::AgentScheduleInfo }
25
25
 
26
- # @!method initialize(metadata:, spec:, info: nil)
26
+ response_only do
27
+ # @!attribute state
28
+ # The current lifecycle state of the schedule. Output only. Schedules are created
29
+ # STATE_ACTIVE; use the :pause, :resume, and :archive actions to transition
30
+ # between states.
31
+ #
32
+ # @return [Symbol, Cadenya::Models::Agents::AgentSchedule::State]
33
+ required :state, enum: -> { Cadenya::Agents::AgentSchedule::State }
34
+ end
35
+
36
+ # @!method initialize(metadata:, spec:, state:, info: nil)
27
37
  # Some parameter documentations has been truncated, see
28
38
  # {Cadenya::Models::Agents::AgentSchedule} for more details.
29
39
  #
@@ -34,7 +44,26 @@ module Cadenya
34
44
  #
35
45
  # @param spec [Cadenya::Models::Agents::AgentScheduleSpec] AgentScheduleSpec is the user-provided configuration for a schedule.
36
46
  #
47
+ # @param state [Symbol, Cadenya::Models::Agents::AgentSchedule::State] The current lifecycle state of the schedule. Output only. Schedules are
48
+ #
37
49
  # @param info [Cadenya::Models::Agents::AgentScheduleInfo] AgentScheduleInfo provides read-only runtime data about a schedule.
50
+
51
+ # The current lifecycle state of the schedule. Output only. Schedules are created
52
+ # STATE_ACTIVE; use the :pause, :resume, and :archive actions to transition
53
+ # between states.
54
+ #
55
+ # @see Cadenya::Models::Agents::AgentSchedule#state
56
+ module State
57
+ extend Cadenya::Internal::Type::Enum
58
+
59
+ STATE_UNSPECIFIED = :STATE_UNSPECIFIED
60
+ STATE_ACTIVE = :STATE_ACTIVE
61
+ STATE_PAUSED = :STATE_PAUSED
62
+ STATE_ARCHIVED = :STATE_ARCHIVED
63
+
64
+ # @!method self.values
65
+ # @return [Array<Symbol>]
66
+ end
38
67
  end
39
68
  end
40
69
 
@@ -39,7 +39,7 @@ module Cadenya
39
39
 
40
40
  # @!attribute next_fire_at
41
41
  # When the schedule will next fire. Computed from the spec; absent when the
42
- # schedule is PAUSED/ARCHIVED or has no future fire times.
42
+ # schedule is STATE_PAUSED/STATE_ARCHIVED or has no future fire times.
43
43
  #
44
44
  # @return [Time, nil]
45
45
  optional :next_fire_at, Time, api_name: :nextFireAt
@@ -34,12 +34,6 @@ module Cadenya
34
34
  enum: -> { Cadenya::Agents::AgentScheduleSpec::OverlapPolicy },
35
35
  api_name: :overlapPolicy
36
36
 
37
- # @!attribute status
38
- # Lifecycle. Defaults to ACTIVE on create when unspecified.
39
- #
40
- # @return [Symbol, Cadenya::Models::Agents::AgentScheduleSpec::Status, nil]
41
- optional :status, enum: -> { Cadenya::Agents::AgentScheduleSpec::Status }
42
-
43
37
  # @!attribute variation_id
44
38
  # Optional explicit variation. When unset, the agent's variation_selection_mode
45
39
  # chooses per fire.
@@ -47,7 +41,7 @@ module Cadenya
47
41
  # @return [String, nil]
48
42
  optional :variation_id, String, api_name: :variationId
49
43
 
50
- # @!method initialize(initial_message:, schedule:, data: nil, overlap_policy: nil, status: nil, variation_id: nil)
44
+ # @!method initialize(initial_message:, schedule:, data: nil, overlap_policy: nil, variation_id: nil)
51
45
  # Some parameter documentations has been truncated, see
52
46
  # {Cadenya::Models::Agents::AgentScheduleSpec} for more details.
53
47
  #
@@ -61,8 +55,6 @@ module Cadenya
61
55
  #
62
56
  # @param overlap_policy [Symbol, Cadenya::Models::Agents::AgentScheduleSpec::OverlapPolicy] What to do when the previous run is still in flight. Defaults to SKIP.
63
57
  #
64
- # @param status [Symbol, Cadenya::Models::Agents::AgentScheduleSpec::Status] Lifecycle. Defaults to ACTIVE on create when unspecified.
65
- #
66
58
  # @param variation_id [String] Optional explicit variation. When unset, the agent's variation_selection_mode
67
59
 
68
60
  # What to do when the previous run is still in flight. Defaults to SKIP.
@@ -78,21 +70,6 @@ module Cadenya
78
70
  # @!method self.values
79
71
  # @return [Array<Symbol>]
80
72
  end
81
-
82
- # Lifecycle. Defaults to ACTIVE on create when unspecified.
83
- #
84
- # @see Cadenya::Models::Agents::AgentScheduleSpec#status
85
- module Status
86
- extend Cadenya::Internal::Type::Enum
87
-
88
- AGENT_SCHEDULE_STATUS_UNSPECIFIED = :AGENT_SCHEDULE_STATUS_UNSPECIFIED
89
- AGENT_SCHEDULE_STATUS_ACTIVE = :AGENT_SCHEDULE_STATUS_ACTIVE
90
- AGENT_SCHEDULE_STATUS_PAUSED = :AGENT_SCHEDULE_STATUS_PAUSED
91
- AGENT_SCHEDULE_STATUS_ARCHIVED = :AGENT_SCHEDULE_STATUS_ARCHIVED
92
-
93
- # @!method self.values
94
- # @return [Array<Symbol>]
95
- end
96
73
  end
97
74
  end
98
75
 
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ module Agents
6
+ # @see Cadenya::Resources::Agents::Schedules#archive
7
+ class ScheduleArchiveParams < Cadenya::Internal::Type::BaseModel
8
+ extend Cadenya::Internal::Type::RequestParameters::Converter
9
+ include Cadenya::Internal::Type::RequestParameters
10
+
11
+ # @!attribute workspace_id
12
+ #
13
+ # @return [String]
14
+ required :workspace_id, String
15
+
16
+ # @!attribute agent_id
17
+ #
18
+ # @return [String]
19
+ required :agent_id, String
20
+
21
+ # @!attribute id
22
+ #
23
+ # @return [String]
24
+ required :id, String
25
+
26
+ # @!method initialize(workspace_id:, agent_id:, id:, request_options: {})
27
+ # @param workspace_id [String]
28
+ # @param agent_id [String]
29
+ # @param id [String]
30
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ module Agents
6
+ # @see Cadenya::Resources::Agents::Schedules#pause
7
+ class SchedulePauseParams < Cadenya::Internal::Type::BaseModel
8
+ extend Cadenya::Internal::Type::RequestParameters::Converter
9
+ include Cadenya::Internal::Type::RequestParameters
10
+
11
+ # @!attribute workspace_id
12
+ #
13
+ # @return [String]
14
+ required :workspace_id, String
15
+
16
+ # @!attribute agent_id
17
+ #
18
+ # @return [String]
19
+ required :agent_id, String
20
+
21
+ # @!attribute id
22
+ #
23
+ # @return [String]
24
+ required :id, String
25
+
26
+ # @!method initialize(workspace_id:, agent_id:, id:, request_options: {})
27
+ # @param workspace_id [String]
28
+ # @param agent_id [String]
29
+ # @param id [String]
30
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ module Agents
6
+ # @see Cadenya::Resources::Agents::Schedules#resume
7
+ class ScheduleResumeParams < Cadenya::Internal::Type::BaseModel
8
+ extend Cadenya::Internal::Type::RequestParameters::Converter
9
+ include Cadenya::Internal::Type::RequestParameters
10
+
11
+ # @!attribute workspace_id
12
+ #
13
+ # @return [String]
14
+ required :workspace_id, String
15
+
16
+ # @!attribute agent_id
17
+ #
18
+ # @return [String]
19
+ required :agent_id, String
20
+
21
+ # @!attribute id
22
+ #
23
+ # @return [String]
24
+ required :id, String
25
+
26
+ # @!method initialize(workspace_id:, agent_id:, id:, request_options: {})
27
+ # @param workspace_id [String]
28
+ # @param agent_id [String]
29
+ # @param id [String]
30
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
31
+ end
32
+ end
33
+ end
34
+ end
@@ -19,14 +19,13 @@ module Cadenya
19
19
  optional :agents, -> { Cadenya::Internal::Type::HashOf[Cadenya::AgentEntry] }
20
20
 
21
21
  # @!attribute automatically_publish_agents
22
- # When true, every agent created or updated by this Apply has its status forced to
23
- # AGENT_STATUS_PUBLISHED, regardless of the status declared in the agent's
24
- # AgentSpec. Useful when the bundle represents a production configuration and you
25
- # want all of its agents live without setting status: AGENT_STATUS_PUBLISHED on
26
- # each entry.
22
+ # When true, every agent created or updated by this Apply has its state forced to
23
+ # STATE_PUBLISHED, regardless of the state declared on the agent's entry. Useful
24
+ # when the bundle represents a production configuration and you want all of its
25
+ # agents live without setting state: STATE_PUBLISHED on each entry.
27
26
  #
28
- # Default false: each agent's AgentSpec.status controls (which is
29
- # AGENT_STATUS_DRAFT on create when unspecified).
27
+ # Default false: each agent entry's `state` controls (which is STATE_DRAFT on
28
+ # create when unspecified).
30
29
  #
31
30
  # @return [Boolean, nil]
32
31
  optional :automatically_publish_agents,