zyphr 0.1.32 → 0.1.34

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 (107) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +54 -0
  3. data/docs/AddOrganizationMemberRequest.md +20 -0
  4. data/docs/AuthOrganizationsApi.md +864 -0
  5. data/docs/AuthUserProfileApi.md +76 -0
  6. data/docs/CreateOrganizationRequest.md +22 -0
  7. data/docs/DomainsApi.md +73 -0
  8. data/docs/InboundAttachmentUrlResponse.md +20 -0
  9. data/docs/InboundAttachmentUrlResponseData.md +22 -0
  10. data/docs/InboundEmail.md +48 -0
  11. data/docs/InboundEmailApi.md +235 -0
  12. data/docs/InboundEmailAttachment.md +24 -0
  13. data/docs/InboundEmailFrom.md +20 -0
  14. data/docs/InboundEmailListResponse.md +20 -0
  15. data/docs/InboundEmailListResponseMeta.md +24 -0
  16. data/docs/InboundEmailResponse.md +20 -0
  17. data/docs/LoginRequest.md +3 -1
  18. data/docs/MuseApi.md +681 -0
  19. data/docs/Organization.md +34 -0
  20. data/docs/OrganizationListResponse.md +20 -0
  21. data/docs/OrganizationListResponseMeta.md +20 -0
  22. data/docs/OrganizationMembersListResponse.md +20 -0
  23. data/docs/OrganizationMembership.md +30 -0
  24. data/docs/OrganizationMembershipResponse.md +20 -0
  25. data/docs/OrganizationMembershipWithUser.md +34 -0
  26. data/docs/OrganizationResponse.md +20 -0
  27. data/docs/RegisterRequest.md +5 -1
  28. data/docs/SetDomainInboundRequest.md +18 -0
  29. data/docs/SwitchOrganizationRequest.md +20 -0
  30. data/docs/SwitchOrganizationResponse.md +20 -0
  31. data/docs/SwitchOrganizationResponseData.md +22 -0
  32. data/docs/SwitchOrganizationResponseDataTokens.md +24 -0
  33. data/docs/SwitchOrganizationResponseDataUser.md +20 -0
  34. data/docs/UpdateOrganizationMemberRoleRequest.md +18 -0
  35. data/docs/UpdateOrganizationRequest.md +22 -0
  36. data/docs/V1MuseSubjectsSuggestPostRequest.md +24 -0
  37. data/lib/zyphr/api/auth_organizations_api.rb +773 -0
  38. data/lib/zyphr/api/auth_user_profile_api.rb +61 -0
  39. data/lib/zyphr/api/domains_api.rb +72 -0
  40. data/lib/zyphr/api/inbound_email_api.rb +234 -0
  41. data/lib/zyphr/api/muse_api.rb +644 -0
  42. data/lib/zyphr/models/add_organization_member_request.rb +248 -0
  43. data/lib/zyphr/models/create_organization_request.rb +258 -0
  44. data/lib/zyphr/models/inbound_attachment_url_response.rb +229 -0
  45. data/lib/zyphr/models/inbound_attachment_url_response_data.rb +240 -0
  46. data/lib/zyphr/models/inbound_email.rb +441 -0
  47. data/lib/zyphr/models/inbound_email_attachment.rb +250 -0
  48. data/lib/zyphr/models/inbound_email_from.rb +230 -0
  49. data/lib/zyphr/models/inbound_email_list_response.rb +231 -0
  50. data/lib/zyphr/models/inbound_email_list_response_meta.rb +247 -0
  51. data/lib/zyphr/models/inbound_email_response.rb +229 -0
  52. data/lib/zyphr/models/login_request.rb +14 -4
  53. data/lib/zyphr/models/organization.rb +434 -0
  54. data/lib/zyphr/models/organization_list_response.rb +265 -0
  55. data/lib/zyphr/models/organization_list_response_meta.rb +230 -0
  56. data/lib/zyphr/models/organization_members_list_response.rb +265 -0
  57. data/lib/zyphr/models/organization_membership.rb +379 -0
  58. data/lib/zyphr/models/organization_membership_response.rb +263 -0
  59. data/lib/zyphr/models/organization_membership_with_user.rb +405 -0
  60. data/lib/zyphr/models/organization_response.rb +263 -0
  61. data/lib/zyphr/models/register_request.rb +43 -4
  62. data/lib/zyphr/models/set_domain_inbound_request.rb +220 -0
  63. data/lib/zyphr/models/switch_organization_request.rb +263 -0
  64. data/lib/zyphr/models/switch_organization_response.rb +263 -0
  65. data/lib/zyphr/models/switch_organization_response_data.rb +289 -0
  66. data/lib/zyphr/models/switch_organization_response_data_tokens.rb +339 -0
  67. data/lib/zyphr/models/switch_organization_response_data_user.rb +230 -0
  68. data/lib/zyphr/models/update_organization_member_role_request.rb +223 -0
  69. data/lib/zyphr/models/update_organization_request.rb +239 -0
  70. data/lib/zyphr/models/v1_muse_subjects_suggest_post_request.rb +326 -0
  71. data/lib/zyphr.rb +30 -0
  72. data/spec/api/auth_organizations_api_spec.rb +171 -0
  73. data/spec/api/auth_user_profile_api_spec.rb +12 -0
  74. data/spec/api/domains_api_spec.rb +13 -0
  75. data/spec/api/inbound_email_api_spec.rb +76 -0
  76. data/spec/api/muse_api_spec.rb +156 -0
  77. data/spec/models/add_organization_member_request_spec.rb +42 -0
  78. data/spec/models/create_organization_request_spec.rb +48 -0
  79. data/spec/models/inbound_attachment_url_response_data_spec.rb +48 -0
  80. data/spec/models/inbound_attachment_url_response_spec.rb +42 -0
  81. data/spec/models/inbound_email_attachment_spec.rb +54 -0
  82. data/spec/models/inbound_email_from_spec.rb +42 -0
  83. data/spec/models/inbound_email_list_response_meta_spec.rb +54 -0
  84. data/spec/models/inbound_email_list_response_spec.rb +42 -0
  85. data/spec/models/inbound_email_response_spec.rb +42 -0
  86. data/spec/models/inbound_email_spec.rb +142 -0
  87. data/spec/models/login_request_spec.rb +6 -0
  88. data/spec/models/organization_list_response_meta_spec.rb +42 -0
  89. data/spec/models/organization_list_response_spec.rb +42 -0
  90. data/spec/models/organization_members_list_response_spec.rb +42 -0
  91. data/spec/models/organization_membership_response_spec.rb +42 -0
  92. data/spec/models/organization_membership_spec.rb +72 -0
  93. data/spec/models/organization_membership_with_user_spec.rb +84 -0
  94. data/spec/models/organization_response_spec.rb +42 -0
  95. data/spec/models/organization_spec.rb +84 -0
  96. data/spec/models/register_request_spec.rb +12 -0
  97. data/spec/models/set_domain_inbound_request_spec.rb +36 -0
  98. data/spec/models/switch_organization_request_spec.rb +42 -0
  99. data/spec/models/switch_organization_response_data_spec.rb +48 -0
  100. data/spec/models/switch_organization_response_data_tokens_spec.rb +58 -0
  101. data/spec/models/switch_organization_response_data_user_spec.rb +42 -0
  102. data/spec/models/switch_organization_response_spec.rb +42 -0
  103. data/spec/models/update_organization_member_role_request_spec.rb +36 -0
  104. data/spec/models/update_organization_request_spec.rb +48 -0
  105. data/spec/models/v1_muse_subjects_suggest_post_request_spec.rb +58 -0
  106. data/zyphr.gemspec +1 -1
  107. metadata +122 -2
@@ -0,0 +1,644 @@
1
+ =begin
2
+ #Zyphr API
3
+
4
+ #Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@zyphr.dev
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.12.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Zyphr
16
+ class MuseApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Paginated per-call audit log for Muse
23
+ # Returns Muse invocations for the caller's account, ordered by most recent first. The request_payload is the PII-scrubbed payload we record at call time; the response payload is NOT returned by this endpoint for size reasons (use the per-row detail endpoint when built).
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [nil]
26
+ def v1_muse_audit_log_get(opts = {})
27
+ v1_muse_audit_log_get_with_http_info(opts)
28
+ nil
29
+ end
30
+
31
+ # Paginated per-call audit log for Muse
32
+ # Returns Muse invocations for the caller's account, ordered by most recent first. The request_payload is the PII-scrubbed payload we record at call time; the response payload is NOT returned by this endpoint for size reasons (use the per-row detail endpoint when built).
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
35
+ def v1_muse_audit_log_get_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_audit_log_get ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/v1/muse/audit-log'
41
+
42
+ # query parameters
43
+ query_params = opts[:query_params] || {}
44
+
45
+ # header parameters
46
+ header_params = opts[:header_params] || {}
47
+
48
+ # form parameters
49
+ form_params = opts[:form_params] || {}
50
+
51
+ # http body (model)
52
+ post_body = opts[:debug_body]
53
+
54
+ # return_type
55
+ return_type = opts[:debug_return_type]
56
+
57
+ # auth_names
58
+ auth_names = opts[:debug_auth_names] || []
59
+
60
+ new_options = opts.merge(
61
+ :operation => :"MuseApi.v1_muse_audit_log_get",
62
+ :header_params => header_params,
63
+ :query_params => query_params,
64
+ :form_params => form_params,
65
+ :body => post_body,
66
+ :auth_names => auth_names,
67
+ :return_type => return_type
68
+ )
69
+
70
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: MuseApi#v1_muse_audit_log_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+
77
+ # Stream a pre-send advisory for a draft broadcast
78
+ # Streams Opus tokens then emits a structured advisory covering deliverability risks, frequency conflicts, audience warnings, send-time suggestions, and content notes — plus a single recommended_action so the dashboard can render a CTA without interpreting prose. Advisory is purely advisory — the platform does not block sends on AI output.
79
+ # @param [Hash] opts the optional parameters
80
+ # @return [nil]
81
+ def v1_muse_broadcasts_analyze_post(opts = {})
82
+ v1_muse_broadcasts_analyze_post_with_http_info(opts)
83
+ nil
84
+ end
85
+
86
+ # Stream a pre-send advisory for a draft broadcast
87
+ # Streams Opus tokens then emits a structured advisory covering deliverability risks, frequency conflicts, audience warnings, send-time suggestions, and content notes — plus a single recommended_action so the dashboard can render a CTA without interpreting prose. Advisory is purely advisory — the platform does not block sends on AI output.
88
+ # @param [Hash] opts the optional parameters
89
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
90
+ def v1_muse_broadcasts_analyze_post_with_http_info(opts = {})
91
+ if @api_client.config.debugging
92
+ @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_broadcasts_analyze_post ...'
93
+ end
94
+ # resource path
95
+ local_var_path = '/v1/muse/broadcasts/analyze'
96
+
97
+ # query parameters
98
+ query_params = opts[:query_params] || {}
99
+
100
+ # header parameters
101
+ header_params = opts[:header_params] || {}
102
+
103
+ # form parameters
104
+ form_params = opts[:form_params] || {}
105
+
106
+ # http body (model)
107
+ post_body = opts[:debug_body]
108
+
109
+ # return_type
110
+ return_type = opts[:debug_return_type]
111
+
112
+ # auth_names
113
+ auth_names = opts[:debug_auth_names] || []
114
+
115
+ new_options = opts.merge(
116
+ :operation => :"MuseApi.v1_muse_broadcasts_analyze_post",
117
+ :header_params => header_params,
118
+ :query_params => query_params,
119
+ :form_params => form_params,
120
+ :body => post_body,
121
+ :auth_names => auth_names,
122
+ :return_type => return_type
123
+ )
124
+
125
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
126
+ if @api_client.config.debugging
127
+ @api_client.config.logger.debug "API called: MuseApi#v1_muse_broadcasts_analyze_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
128
+ end
129
+ return data, status_code, headers
130
+ end
131
+
132
+ # Return the current account's Zyphr Muse entitlement
133
+ # Returns whether the caller's account plan unlocks Zyphr Muse, the cheapest plan that would unlock it, and the monthly Bedrock spend cap for the current plan. Available to every authenticated caller (including free accounts).
134
+ # @param [Hash] opts the optional parameters
135
+ # @return [nil]
136
+ def v1_muse_entitlement_get(opts = {})
137
+ v1_muse_entitlement_get_with_http_info(opts)
138
+ nil
139
+ end
140
+
141
+ # Return the current account&#39;s Zyphr Muse entitlement
142
+ # Returns whether the caller&#39;s account plan unlocks Zyphr Muse, the cheapest plan that would unlock it, and the monthly Bedrock spend cap for the current plan. Available to every authenticated caller (including free accounts).
143
+ # @param [Hash] opts the optional parameters
144
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
145
+ def v1_muse_entitlement_get_with_http_info(opts = {})
146
+ if @api_client.config.debugging
147
+ @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_entitlement_get ...'
148
+ end
149
+ # resource path
150
+ local_var_path = '/v1/muse/entitlement'
151
+
152
+ # query parameters
153
+ query_params = opts[:query_params] || {}
154
+
155
+ # header parameters
156
+ header_params = opts[:header_params] || {}
157
+
158
+ # form parameters
159
+ form_params = opts[:form_params] || {}
160
+
161
+ # http body (model)
162
+ post_body = opts[:debug_body]
163
+
164
+ # return_type
165
+ return_type = opts[:debug_return_type]
166
+
167
+ # auth_names
168
+ auth_names = opts[:debug_auth_names] || []
169
+
170
+ new_options = opts.merge(
171
+ :operation => :"MuseApi.v1_muse_entitlement_get",
172
+ :header_params => header_params,
173
+ :query_params => query_params,
174
+ :form_params => form_params,
175
+ :body => post_body,
176
+ :auth_names => auth_names,
177
+ :return_type => return_type
178
+ )
179
+
180
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
181
+ if @api_client.config.debugging
182
+ @api_client.config.logger.debug "API called: MuseApi#v1_muse_entitlement_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
183
+ end
184
+ return data, status_code, headers
185
+ end
186
+
187
+ # Per-prompt eval baseline snapshots
188
+ # Reads the committed baseline JSON files from src/services/muse/evals/baselines/ and returns them keyed by prompt name. Customers don't see this — it's for the internal Muse settings page / admin portal.
189
+ # @param [Hash] opts the optional parameters
190
+ # @return [nil]
191
+ def v1_muse_eval_baselines_get(opts = {})
192
+ v1_muse_eval_baselines_get_with_http_info(opts)
193
+ nil
194
+ end
195
+
196
+ # Per-prompt eval baseline snapshots
197
+ # Reads the committed baseline JSON files from src/services/muse/evals/baselines/ and returns them keyed by prompt name. Customers don&#39;t see this — it&#39;s for the internal Muse settings page / admin portal.
198
+ # @param [Hash] opts the optional parameters
199
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
200
+ def v1_muse_eval_baselines_get_with_http_info(opts = {})
201
+ if @api_client.config.debugging
202
+ @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_eval_baselines_get ...'
203
+ end
204
+ # resource path
205
+ local_var_path = '/v1/muse/eval-baselines'
206
+
207
+ # query parameters
208
+ query_params = opts[:query_params] || {}
209
+
210
+ # header parameters
211
+ header_params = opts[:header_params] || {}
212
+
213
+ # form parameters
214
+ form_params = opts[:form_params] || {}
215
+
216
+ # http body (model)
217
+ post_body = opts[:debug_body]
218
+
219
+ # return_type
220
+ return_type = opts[:debug_return_type]
221
+
222
+ # auth_names
223
+ auth_names = opts[:debug_auth_names] || []
224
+
225
+ new_options = opts.merge(
226
+ :operation => :"MuseApi.v1_muse_eval_baselines_get",
227
+ :header_params => header_params,
228
+ :query_params => query_params,
229
+ :form_params => form_params,
230
+ :body => post_body,
231
+ :auth_names => auth_names,
232
+ :return_type => return_type
233
+ )
234
+
235
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
236
+ if @api_client.config.debugging
237
+ @api_client.config.logger.debug "API called: MuseApi#v1_muse_eval_baselines_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
238
+ end
239
+ return data, status_code, headers
240
+ end
241
+
242
+ # Read Muse settings for a project
243
+ # Returns the project's Muse settings (cap override, allowed roles, blocked tiers). If no row exists yet, returns synthesized defaults so the caller never sees a 404.
244
+ # @param project_id [String]
245
+ # @param [Hash] opts the optional parameters
246
+ # @return [nil]
247
+ def v1_muse_settings_project_id_get(project_id, opts = {})
248
+ v1_muse_settings_project_id_get_with_http_info(project_id, opts)
249
+ nil
250
+ end
251
+
252
+ # Read Muse settings for a project
253
+ # Returns the project&#39;s Muse settings (cap override, allowed roles, blocked tiers). If no row exists yet, returns synthesized defaults so the caller never sees a 404.
254
+ # @param project_id [String]
255
+ # @param [Hash] opts the optional parameters
256
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
257
+ def v1_muse_settings_project_id_get_with_http_info(project_id, opts = {})
258
+ if @api_client.config.debugging
259
+ @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_settings_project_id_get ...'
260
+ end
261
+ # verify the required parameter 'project_id' is set
262
+ if @api_client.config.client_side_validation && project_id.nil?
263
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling MuseApi.v1_muse_settings_project_id_get"
264
+ end
265
+ # resource path
266
+ local_var_path = '/v1/muse/settings/{project_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
267
+
268
+ # query parameters
269
+ query_params = opts[:query_params] || {}
270
+
271
+ # header parameters
272
+ header_params = opts[:header_params] || {}
273
+
274
+ # form parameters
275
+ form_params = opts[:form_params] || {}
276
+
277
+ # http body (model)
278
+ post_body = opts[:debug_body]
279
+
280
+ # return_type
281
+ return_type = opts[:debug_return_type]
282
+
283
+ # auth_names
284
+ auth_names = opts[:debug_auth_names] || []
285
+
286
+ new_options = opts.merge(
287
+ :operation => :"MuseApi.v1_muse_settings_project_id_get",
288
+ :header_params => header_params,
289
+ :query_params => query_params,
290
+ :form_params => form_params,
291
+ :body => post_body,
292
+ :auth_names => auth_names,
293
+ :return_type => return_type
294
+ )
295
+
296
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
297
+ if @api_client.config.debugging
298
+ @api_client.config.logger.debug "API called: MuseApi#v1_muse_settings_project_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
299
+ end
300
+ return data, status_code, headers
301
+ end
302
+
303
+ # Update Muse settings for a project (admin or developer only)
304
+ # Partial update — any omitted field keeps its existing value. Pass `monthly_cap_usd_override: null` to clear an override. Requires project-level role admin or developer. Account owner/admin cascades.
305
+ # @param project_id [String]
306
+ # @param [Hash] opts the optional parameters
307
+ # @return [nil]
308
+ def v1_muse_settings_project_id_patch(project_id, opts = {})
309
+ v1_muse_settings_project_id_patch_with_http_info(project_id, opts)
310
+ nil
311
+ end
312
+
313
+ # Update Muse settings for a project (admin or developer only)
314
+ # Partial update — any omitted field keeps its existing value. Pass &#x60;monthly_cap_usd_override: null&#x60; to clear an override. Requires project-level role admin or developer. Account owner/admin cascades.
315
+ # @param project_id [String]
316
+ # @param [Hash] opts the optional parameters
317
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
318
+ def v1_muse_settings_project_id_patch_with_http_info(project_id, opts = {})
319
+ if @api_client.config.debugging
320
+ @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_settings_project_id_patch ...'
321
+ end
322
+ # verify the required parameter 'project_id' is set
323
+ if @api_client.config.client_side_validation && project_id.nil?
324
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling MuseApi.v1_muse_settings_project_id_patch"
325
+ end
326
+ # resource path
327
+ local_var_path = '/v1/muse/settings/{project_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
328
+
329
+ # query parameters
330
+ query_params = opts[:query_params] || {}
331
+
332
+ # header parameters
333
+ header_params = opts[:header_params] || {}
334
+
335
+ # form parameters
336
+ form_params = opts[:form_params] || {}
337
+
338
+ # http body (model)
339
+ post_body = opts[:debug_body]
340
+
341
+ # return_type
342
+ return_type = opts[:debug_return_type]
343
+
344
+ # auth_names
345
+ auth_names = opts[:debug_auth_names] || []
346
+
347
+ new_options = opts.merge(
348
+ :operation => :"MuseApi.v1_muse_settings_project_id_patch",
349
+ :header_params => header_params,
350
+ :query_params => query_params,
351
+ :form_params => form_params,
352
+ :body => post_body,
353
+ :auth_names => auth_names,
354
+ :return_type => return_type
355
+ )
356
+
357
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
358
+ if @api_client.config.debugging
359
+ @api_client.config.logger.debug "API called: MuseApi#v1_muse_settings_project_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
360
+ end
361
+ return data, status_code, headers
362
+ end
363
+
364
+ # Suggest 5 ranked subject-line candidates for a template
365
+ # @param v1_muse_subjects_suggest_post_request [V1MuseSubjectsSuggestPostRequest]
366
+ # @param [Hash] opts the optional parameters
367
+ # @return [nil]
368
+ def v1_muse_subjects_suggest_post(v1_muse_subjects_suggest_post_request, opts = {})
369
+ v1_muse_subjects_suggest_post_with_http_info(v1_muse_subjects_suggest_post_request, opts)
370
+ nil
371
+ end
372
+
373
+ # Suggest 5 ranked subject-line candidates for a template
374
+ # @param v1_muse_subjects_suggest_post_request [V1MuseSubjectsSuggestPostRequest]
375
+ # @param [Hash] opts the optional parameters
376
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
377
+ def v1_muse_subjects_suggest_post_with_http_info(v1_muse_subjects_suggest_post_request, opts = {})
378
+ if @api_client.config.debugging
379
+ @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_subjects_suggest_post ...'
380
+ end
381
+ # verify the required parameter 'v1_muse_subjects_suggest_post_request' is set
382
+ if @api_client.config.client_side_validation && v1_muse_subjects_suggest_post_request.nil?
383
+ fail ArgumentError, "Missing the required parameter 'v1_muse_subjects_suggest_post_request' when calling MuseApi.v1_muse_subjects_suggest_post"
384
+ end
385
+ # resource path
386
+ local_var_path = '/v1/muse/subjects/suggest'
387
+
388
+ # query parameters
389
+ query_params = opts[:query_params] || {}
390
+
391
+ # header parameters
392
+ header_params = opts[:header_params] || {}
393
+ # HTTP header 'Content-Type'
394
+ content_type = @api_client.select_header_content_type(['application/json'])
395
+ if !content_type.nil?
396
+ header_params['Content-Type'] = content_type
397
+ end
398
+
399
+ # form parameters
400
+ form_params = opts[:form_params] || {}
401
+
402
+ # http body (model)
403
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(v1_muse_subjects_suggest_post_request)
404
+
405
+ # return_type
406
+ return_type = opts[:debug_return_type]
407
+
408
+ # auth_names
409
+ auth_names = opts[:debug_auth_names] || []
410
+
411
+ new_options = opts.merge(
412
+ :operation => :"MuseApi.v1_muse_subjects_suggest_post",
413
+ :header_params => header_params,
414
+ :query_params => query_params,
415
+ :form_params => form_params,
416
+ :body => post_body,
417
+ :auth_names => auth_names,
418
+ :return_type => return_type
419
+ )
420
+
421
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
422
+ if @api_client.config.debugging
423
+ @api_client.config.logger.debug "API called: MuseApi#v1_muse_subjects_suggest_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
424
+ end
425
+ return data, status_code, headers
426
+ end
427
+
428
+ # Stream a draft template from a natural-language brief
429
+ # @param [Hash] opts the optional parameters
430
+ # @return [nil]
431
+ def v1_muse_templates_draft_post(opts = {})
432
+ v1_muse_templates_draft_post_with_http_info(opts)
433
+ nil
434
+ end
435
+
436
+ # Stream a draft template from a natural-language brief
437
+ # @param [Hash] opts the optional parameters
438
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
439
+ def v1_muse_templates_draft_post_with_http_info(opts = {})
440
+ if @api_client.config.debugging
441
+ @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_templates_draft_post ...'
442
+ end
443
+ # resource path
444
+ local_var_path = '/v1/muse/templates/draft'
445
+
446
+ # query parameters
447
+ query_params = opts[:query_params] || {}
448
+
449
+ # header parameters
450
+ header_params = opts[:header_params] || {}
451
+
452
+ # form parameters
453
+ form_params = opts[:form_params] || {}
454
+
455
+ # http body (model)
456
+ post_body = opts[:debug_body]
457
+
458
+ # return_type
459
+ return_type = opts[:debug_return_type]
460
+
461
+ # auth_names
462
+ auth_names = opts[:debug_auth_names] || []
463
+
464
+ new_options = opts.merge(
465
+ :operation => :"MuseApi.v1_muse_templates_draft_post",
466
+ :header_params => header_params,
467
+ :query_params => query_params,
468
+ :form_params => form_params,
469
+ :body => post_body,
470
+ :auth_names => auth_names,
471
+ :return_type => return_type
472
+ )
473
+
474
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
475
+ if @api_client.config.debugging
476
+ @api_client.config.logger.debug "API called: MuseApi#v1_muse_templates_draft_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
477
+ end
478
+ return data, status_code, headers
479
+ end
480
+
481
+ # Stream a rewritten block per the user's instruction
482
+ # @param [Hash] opts the optional parameters
483
+ # @return [nil]
484
+ def v1_muse_templates_rewrite_post(opts = {})
485
+ v1_muse_templates_rewrite_post_with_http_info(opts)
486
+ nil
487
+ end
488
+
489
+ # Stream a rewritten block per the user&#39;s instruction
490
+ # @param [Hash] opts the optional parameters
491
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
492
+ def v1_muse_templates_rewrite_post_with_http_info(opts = {})
493
+ if @api_client.config.debugging
494
+ @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_templates_rewrite_post ...'
495
+ end
496
+ # resource path
497
+ local_var_path = '/v1/muse/templates/rewrite'
498
+
499
+ # query parameters
500
+ query_params = opts[:query_params] || {}
501
+
502
+ # header parameters
503
+ header_params = opts[:header_params] || {}
504
+
505
+ # form parameters
506
+ form_params = opts[:form_params] || {}
507
+
508
+ # http body (model)
509
+ post_body = opts[:debug_body]
510
+
511
+ # return_type
512
+ return_type = opts[:debug_return_type]
513
+
514
+ # auth_names
515
+ auth_names = opts[:debug_auth_names] || []
516
+
517
+ new_options = opts.merge(
518
+ :operation => :"MuseApi.v1_muse_templates_rewrite_post",
519
+ :header_params => header_params,
520
+ :query_params => query_params,
521
+ :form_params => form_params,
522
+ :body => post_body,
523
+ :auth_names => auth_names,
524
+ :return_type => return_type
525
+ )
526
+
527
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
528
+ if @api_client.config.debugging
529
+ @api_client.config.logger.debug "API called: MuseApi#v1_muse_templates_rewrite_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
530
+ end
531
+ return data, status_code, headers
532
+ end
533
+
534
+ # Per-account Zyphr Muse usage + budget tier
535
+ # Current calendar-month spend, plan cap, soft warning tier, and breakdowns by action and model tier. Dashboard polls this for the budget meter; 60s edge-cached via Redis is reasonable but not enforced server-side (lightweight aggregate).
536
+ # @param [Hash] opts the optional parameters
537
+ # @return [nil]
538
+ def v1_muse_usage_get(opts = {})
539
+ v1_muse_usage_get_with_http_info(opts)
540
+ nil
541
+ end
542
+
543
+ # Per-account Zyphr Muse usage + budget tier
544
+ # Current calendar-month spend, plan cap, soft warning tier, and breakdowns by action and model tier. Dashboard polls this for the budget meter; 60s edge-cached via Redis is reasonable but not enforced server-side (lightweight aggregate).
545
+ # @param [Hash] opts the optional parameters
546
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
547
+ def v1_muse_usage_get_with_http_info(opts = {})
548
+ if @api_client.config.debugging
549
+ @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_usage_get ...'
550
+ end
551
+ # resource path
552
+ local_var_path = '/v1/muse/usage'
553
+
554
+ # query parameters
555
+ query_params = opts[:query_params] || {}
556
+
557
+ # header parameters
558
+ header_params = opts[:header_params] || {}
559
+
560
+ # form parameters
561
+ form_params = opts[:form_params] || {}
562
+
563
+ # http body (model)
564
+ post_body = opts[:debug_body]
565
+
566
+ # return_type
567
+ return_type = opts[:debug_return_type]
568
+
569
+ # auth_names
570
+ auth_names = opts[:debug_auth_names] || []
571
+
572
+ new_options = opts.merge(
573
+ :operation => :"MuseApi.v1_muse_usage_get",
574
+ :header_params => header_params,
575
+ :query_params => query_params,
576
+ :form_params => form_params,
577
+ :body => post_body,
578
+ :auth_names => auth_names,
579
+ :return_type => return_type
580
+ )
581
+
582
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
583
+ if @api_client.config.debugging
584
+ @api_client.config.logger.debug "API called: MuseApi#v1_muse_usage_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
585
+ end
586
+ return data, status_code, headers
587
+ end
588
+
589
+ # Stream a generated workflow from a natural-language description
590
+ # Streams Opus tokens then emits a fully-validated workflow JSON object (single root, no cycles, branch_path coherent, all step types valid). Channels referenced by the workflow must appear in the project's available_channels grounding; unsupported channels fall back to email via the prompt's hard rules.
591
+ # @param [Hash] opts the optional parameters
592
+ # @return [nil]
593
+ def v1_muse_workflows_generate_post(opts = {})
594
+ v1_muse_workflows_generate_post_with_http_info(opts)
595
+ nil
596
+ end
597
+
598
+ # Stream a generated workflow from a natural-language description
599
+ # Streams Opus tokens then emits a fully-validated workflow JSON object (single root, no cycles, branch_path coherent, all step types valid). Channels referenced by the workflow must appear in the project&#39;s available_channels grounding; unsupported channels fall back to email via the prompt&#39;s hard rules.
600
+ # @param [Hash] opts the optional parameters
601
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
602
+ def v1_muse_workflows_generate_post_with_http_info(opts = {})
603
+ if @api_client.config.debugging
604
+ @api_client.config.logger.debug 'Calling API: MuseApi.v1_muse_workflows_generate_post ...'
605
+ end
606
+ # resource path
607
+ local_var_path = '/v1/muse/workflows/generate'
608
+
609
+ # query parameters
610
+ query_params = opts[:query_params] || {}
611
+
612
+ # header parameters
613
+ header_params = opts[:header_params] || {}
614
+
615
+ # form parameters
616
+ form_params = opts[:form_params] || {}
617
+
618
+ # http body (model)
619
+ post_body = opts[:debug_body]
620
+
621
+ # return_type
622
+ return_type = opts[:debug_return_type]
623
+
624
+ # auth_names
625
+ auth_names = opts[:debug_auth_names] || []
626
+
627
+ new_options = opts.merge(
628
+ :operation => :"MuseApi.v1_muse_workflows_generate_post",
629
+ :header_params => header_params,
630
+ :query_params => query_params,
631
+ :form_params => form_params,
632
+ :body => post_body,
633
+ :auth_names => auth_names,
634
+ :return_type => return_type
635
+ )
636
+
637
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
638
+ if @api_client.config.debugging
639
+ @api_client.config.logger.debug "API called: MuseApi#v1_muse_workflows_generate_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
640
+ end
641
+ return data, status_code, headers
642
+ end
643
+ end
644
+ end