hermoso 0.1.4
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.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +53 -0
- data/lib/hermoso/api/account_api.rb +156 -0
- data/lib/hermoso/api/analytics_api.rb +400 -0
- data/lib/hermoso/api/brands_api.rb +82 -0
- data/lib/hermoso/api/campaign_profit_api.rb +103 -0
- data/lib/hermoso/api/campaign_results_api.rb +289 -0
- data/lib/hermoso/api/channels_api.rb +82 -0
- data/lib/hermoso/api/clones_api.rb +93 -0
- data/lib/hermoso/api/connect_links_api.rb +228 -0
- data/lib/hermoso/api/connect_redirects_api.rb +153 -0
- data/lib/hermoso/api/connections_api.rb +151 -0
- data/lib/hermoso/api/credits_api.rb +85 -0
- data/lib/hermoso/api/edits_api.rb +102 -0
- data/lib/hermoso/api/events_api.rb +932 -0
- data/lib/hermoso/api/generations_api.rb +173 -0
- data/lib/hermoso/api/jobs_api.rb +226 -0
- data/lib/hermoso/api/library_api.rb +88 -0
- data/lib/hermoso/api/media_api.rb +158 -0
- data/lib/hermoso/api/models_api.rb +88 -0
- data/lib/hermoso/api/posts_api.rb +377 -0
- data/lib/hermoso/api/recasts_api.rb +102 -0
- data/lib/hermoso/api/signup_api.rb +164 -0
- data/lib/hermoso/api/tag_api.rb +570 -0
- data/lib/hermoso/api/tools_api.rb +252 -0
- data/lib/hermoso/api_client.rb +441 -0
- data/lib/hermoso/api_error.rb +58 -0
- data/lib/hermoso/api_model_base.rb +92 -0
- data/lib/hermoso/configuration.rb +400 -0
- data/lib/hermoso/helpers.rb +116 -0
- data/lib/hermoso/models/asset.rb +241 -0
- data/lib/hermoso/models/asset_list.rb +203 -0
- data/lib/hermoso/models/best_time.rb +250 -0
- data/lib/hermoso/models/best_time_slots_inner.rb +205 -0
- data/lib/hermoso/models/brand.rb +273 -0
- data/lib/hermoso/models/brand_list.rb +203 -0
- data/lib/hermoso/models/campaign_profit.rb +261 -0
- data/lib/hermoso/models/campaign_results.rb +250 -0
- data/lib/hermoso/models/campaign_results_upload.rb +171 -0
- data/lib/hermoso/models/campaign_results_upload_rows_inner.rb +259 -0
- data/lib/hermoso/models/channel.rb +326 -0
- data/lib/hermoso/models/channel_carousel.rb +188 -0
- data/lib/hermoso/models/channel_list.rb +203 -0
- data/lib/hermoso/models/clone_quote.rb +243 -0
- data/lib/hermoso/models/clone_quote_request.rb +227 -0
- data/lib/hermoso/models/clone_quote_step.rb +201 -0
- data/lib/hermoso/models/connect_link.rb +321 -0
- data/lib/hermoso/models/connect_link_account.rb +178 -0
- data/lib/hermoso/models/connect_link_create.rb +236 -0
- data/lib/hermoso/models/connect_link_error.rb +169 -0
- data/lib/hermoso/models/connect_redirects.rb +203 -0
- data/lib/hermoso/models/connect_redirects_set.rb +180 -0
- data/lib/hermoso/models/connection.rb +250 -0
- data/lib/hermoso/models/connection_accounts_inner.rb +178 -0
- data/lib/hermoso/models/connection_deleted.rb +228 -0
- data/lib/hermoso/models/connection_list.rb +203 -0
- data/lib/hermoso/models/contact_email.rb +189 -0
- data/lib/hermoso/models/contact_email_resend.rb +161 -0
- data/lib/hermoso/models/content_decay.rb +223 -0
- data/lib/hermoso/models/content_decay_buckets_inner.rb +187 -0
- data/lib/hermoso/models/conversion_destination_create.rb +317 -0
- data/lib/hermoso/models/conversion_destination_list.rb +223 -0
- data/lib/hermoso/models/conversion_destination_result.rb +221 -0
- data/lib/hermoso/models/conversion_event_list.rb +230 -0
- data/lib/hermoso/models/conversion_event_update.rb +195 -0
- data/lib/hermoso/models/conversion_events_send.rb +236 -0
- data/lib/hermoso/models/conversion_events_send_events_inner.rb +314 -0
- data/lib/hermoso/models/conversion_insights.rb +265 -0
- data/lib/hermoso/models/conversion_send_result.rb +257 -0
- data/lib/hermoso/models/conversion_send_result_destinations_inner.rb +286 -0
- data/lib/hermoso/models/credits.rb +240 -0
- data/lib/hermoso/models/credits_limits.rb +234 -0
- data/lib/hermoso/models/credits_limits_brands_inner.rb +218 -0
- data/lib/hermoso/models/credits_limits_brands_inner_members_inner.rb +196 -0
- data/lib/hermoso/models/deleted.rb +210 -0
- data/lib/hermoso/models/edit.rb +278 -0
- data/lib/hermoso/models/edit_create.rb +317 -0
- data/lib/hermoso/models/edit_preview.rb +199 -0
- data/lib/hermoso/models/edit_quote.rb +231 -0
- data/lib/hermoso/models/error.rb +198 -0
- data/lib/hermoso/models/error_error.rb +335 -0
- data/lib/hermoso/models/error_error_unknown_arguments_inner.rb +171 -0
- data/lib/hermoso/models/follower_history.rb +239 -0
- data/lib/hermoso/models/follower_history_accounts_inner.rb +207 -0
- data/lib/hermoso/models/follower_history_accounts_inner_points_inner.rb +178 -0
- data/lib/hermoso/models/follower_history_date_range.rb +169 -0
- data/lib/hermoso/models/generation_create.rb +435 -0
- data/lib/hermoso/models/generation_quote.rb +263 -0
- data/lib/hermoso/models/hermoso_tag.rb +230 -0
- data/lib/hermoso/models/hermoso_tag_audience_action.rb +325 -0
- data/lib/hermoso/models/hermoso_tag_audiences.rb +241 -0
- data/lib/hermoso/models/hermoso_tag_events.rb +223 -0
- data/lib/hermoso/models/hermoso_tag_events_send.rb +179 -0
- data/lib/hermoso/models/hermoso_tag_events_sent.rb +221 -0
- data/lib/hermoso/models/hermoso_tag_install.rb +246 -0
- data/lib/hermoso/models/hermoso_tag_install_result.rb +255 -0
- data/lib/hermoso/models/hermoso_tag_report.rb +261 -0
- data/lib/hermoso/models/hermoso_tag_tag.rb +211 -0
- data/lib/hermoso/models/hermoso_tag_update.rb +356 -0
- data/lib/hermoso/models/inbox_stats.rb +315 -0
- data/lib/hermoso/models/job.rb +359 -0
- data/lib/hermoso/models/job_cancel.rb +221 -0
- data/lib/hermoso/models/job_list.rb +232 -0
- data/lib/hermoso/models/media.rb +230 -0
- data/lib/hermoso/models/model.rb +327 -0
- data/lib/hermoso/models/model_list.rb +203 -0
- data/lib/hermoso/models/post.rb +382 -0
- data/lib/hermoso/models/post_create.rb +318 -0
- data/lib/hermoso/models/post_create_media_inner.rb +104 -0
- data/lib/hermoso/models/post_create_media_inner_one_of.rb +201 -0
- data/lib/hermoso/models/post_list.rb +221 -0
- data/lib/hermoso/models/post_media_inner.rb +169 -0
- data/lib/hermoso/models/post_results_inner.rb +205 -0
- data/lib/hermoso/models/post_results_inner_first_comment.rb +188 -0
- data/lib/hermoso/models/posting_frequency.rb +241 -0
- data/lib/hermoso/models/posting_frequency_frequency_inner.rb +205 -0
- data/lib/hermoso/models/profit_settings.rb +230 -0
- data/lib/hermoso/models/recast.rb +308 -0
- data/lib/hermoso/models/recast_create.rb +274 -0
- data/lib/hermoso/models/recast_person.rb +182 -0
- data/lib/hermoso/models/recast_quote.rb +232 -0
- data/lib/hermoso/models/recast_step.rb +201 -0
- data/lib/hermoso/models/recast_subject.rb +170 -0
- data/lib/hermoso/models/recast_voice.rb +178 -0
- data/lib/hermoso/models/recast_window.rb +179 -0
- data/lib/hermoso/models/signup.rb +329 -0
- data/lib/hermoso/models/signup_claim.rb +178 -0
- data/lib/hermoso/models/signup_create.rb +247 -0
- data/lib/hermoso/models/tool.rb +360 -0
- data/lib/hermoso/models/tool_invoke.rb +169 -0
- data/lib/hermoso/models/tool_job.rb +262 -0
- data/lib/hermoso/models/tool_list.rb +273 -0
- data/lib/hermoso/models/tool_list_areas_inner.rb +219 -0
- data/lib/hermoso/models/tool_list_search.rb +181 -0
- data/lib/hermoso/models/tool_result.rb +245 -0
- data/lib/hermoso/models/tool_result_images_inner.rb +170 -0
- data/lib/hermoso/models/warning.rb +244 -0
- data/lib/hermoso/spec.rb +8 -0
- data/lib/hermoso/version.rb +15 -0
- data/lib/hermoso.rb +174 -0
- metadata +237 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Hermoso API
|
|
3
|
+
|
|
4
|
+
#The Hermoso public API. Guide: https://hermoso.ai/docs/api/ · OpenAPI: https://app.hermoso.ai/openapi.json
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2026-08-26
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.27.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Hermoso
|
|
16
|
+
class SignupApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Claim a paid signup (poll until ready)
|
|
23
|
+
# Poll this until `status` is `ready`. While payment is outstanding it answers `awaiting_payment` and creates nothing. Once Stripe reports the payment completed it provisions the account, applies the plan and its credits, and returns `api_key` — ONCE. The key is stored only as a hash and can never be re-read. If you lose the response, re-claiming inside 24 hours mints a replacement and revokes the previous key, so a signup never leaves two live credentials behind. After that window there is no self-serve recovery: an agentic account has a synthetic identity and no mailbox to send a link to. Billing is always recoverable regardless — the payer receives Stripe’s receipts and can manage or cancel the subscription from Stripe’s own portal.
|
|
24
|
+
# @param id [String] The `id` from POST /v1/signup (a Stripe Checkout session id), or from POST /api/signup/machine-payment (a PaymentIntent id, `pi_…`, claimed with the claim_token you sent there).
|
|
25
|
+
# @param signup_claim [SignupClaim]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [Signup]
|
|
28
|
+
def claim_signup(id, signup_claim, opts = {})
|
|
29
|
+
data, _status_code, _headers = claim_signup_with_http_info(id, signup_claim, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Claim a paid signup (poll until ready)
|
|
34
|
+
# Poll this until `status` is `ready`. While payment is outstanding it answers `awaiting_payment` and creates nothing. Once Stripe reports the payment completed it provisions the account, applies the plan and its credits, and returns `api_key` — ONCE. The key is stored only as a hash and can never be re-read. If you lose the response, re-claiming inside 24 hours mints a replacement and revokes the previous key, so a signup never leaves two live credentials behind. After that window there is no self-serve recovery: an agentic account has a synthetic identity and no mailbox to send a link to. Billing is always recoverable regardless — the payer receives Stripe’s receipts and can manage or cancel the subscription from Stripe’s own portal.
|
|
35
|
+
# @param id [String] The `id` from POST /v1/signup (a Stripe Checkout session id), or from POST /api/signup/machine-payment (a PaymentIntent id, `pi_…`, claimed with the claim_token you sent there).
|
|
36
|
+
# @param signup_claim [SignupClaim]
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(Signup, Integer, Hash)>] Signup data, response status code and response headers
|
|
39
|
+
def claim_signup_with_http_info(id, signup_claim, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: SignupApi.claim_signup ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SignupApi.claim_signup"
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'signup_claim' is set
|
|
48
|
+
if @api_client.config.client_side_validation && signup_claim.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'signup_claim' when calling SignupApi.claim_signup"
|
|
50
|
+
end
|
|
51
|
+
# resource path
|
|
52
|
+
local_var_path = '/v1/signup/{id}/claim'.sub('{id}', CGI.escape(id.to_s))
|
|
53
|
+
|
|
54
|
+
# query parameters
|
|
55
|
+
query_params = opts[:query_params] || {}
|
|
56
|
+
|
|
57
|
+
# header parameters
|
|
58
|
+
header_params = opts[:header_params] || {}
|
|
59
|
+
# HTTP header 'Accept' (if needed)
|
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
61
|
+
# HTTP header 'Content-Type'
|
|
62
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
63
|
+
if !content_type.nil?
|
|
64
|
+
header_params['Content-Type'] = content_type
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# form parameters
|
|
68
|
+
form_params = opts[:form_params] || {}
|
|
69
|
+
|
|
70
|
+
# http body (model)
|
|
71
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(signup_claim)
|
|
72
|
+
|
|
73
|
+
# return_type
|
|
74
|
+
return_type = opts[:debug_return_type] || 'Signup'
|
|
75
|
+
|
|
76
|
+
# auth_names
|
|
77
|
+
auth_names = opts[:debug_auth_names] || []
|
|
78
|
+
|
|
79
|
+
new_options = opts.merge(
|
|
80
|
+
:operation => :"SignupApi.claim_signup",
|
|
81
|
+
:header_params => header_params,
|
|
82
|
+
:query_params => query_params,
|
|
83
|
+
:form_params => form_params,
|
|
84
|
+
:body => post_body,
|
|
85
|
+
:auth_names => auth_names,
|
|
86
|
+
:return_type => return_type
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
90
|
+
if @api_client.config.debugging
|
|
91
|
+
@api_client.config.logger.debug "API called: SignupApi#claim_signup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
92
|
+
end
|
|
93
|
+
return data, status_code, headers
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Start an agentic signup
|
|
97
|
+
# Create a Hermoso account programmatically, with no human at a browser and no existing credential — the one call in this API that needs no key, because the key is what it creates. Returns a Stripe Checkout URL and a one-time `claim_token`. AN AGENT THAT HOLDS ITS OWN PAYMENT CREDENTIAL (a Shared Payment Token from a Link agent wallet, or any MPP credential) can skip the checkout page entirely: `POST /api/signup/machine-payment` answers HTTP 402, and the paid retry returns the API key in the same response. AGENTIC SIGNUP REQUIRES A PAID PLAN. Nothing is created here: no account, no credits, no row. An account exists only once Stripe reports the payment completed, at which point `POST /v1/signup/{id}/claim` provisions it and returns your API key. The free plan is not available on this path — it is available to a person signing up at https://app.hermoso.ai. A card is entered on Stripe’s own hosted page, never here, so the checkout step itself needs a browser: hand `checkout_url` to whoever is paying. `claim_token` is returned exactly once and is the only proof this signup is yours — a checkout session id alone is not enough, because session ids travel in URLs.
|
|
98
|
+
# @param signup_create [SignupCreate]
|
|
99
|
+
# @param [Hash] opts the optional parameters
|
|
100
|
+
# @return [Signup]
|
|
101
|
+
def create_signup(signup_create, opts = {})
|
|
102
|
+
data, _status_code, _headers = create_signup_with_http_info(signup_create, opts)
|
|
103
|
+
data
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Start an agentic signup
|
|
107
|
+
# Create a Hermoso account programmatically, with no human at a browser and no existing credential — the one call in this API that needs no key, because the key is what it creates. Returns a Stripe Checkout URL and a one-time `claim_token`. AN AGENT THAT HOLDS ITS OWN PAYMENT CREDENTIAL (a Shared Payment Token from a Link agent wallet, or any MPP credential) can skip the checkout page entirely: `POST /api/signup/machine-payment` answers HTTP 402, and the paid retry returns the API key in the same response. AGENTIC SIGNUP REQUIRES A PAID PLAN. Nothing is created here: no account, no credits, no row. An account exists only once Stripe reports the payment completed, at which point `POST /v1/signup/{id}/claim` provisions it and returns your API key. The free plan is not available on this path — it is available to a person signing up at https://app.hermoso.ai. A card is entered on Stripe’s own hosted page, never here, so the checkout step itself needs a browser: hand `checkout_url` to whoever is paying. `claim_token` is returned exactly once and is the only proof this signup is yours — a checkout session id alone is not enough, because session ids travel in URLs.
|
|
108
|
+
# @param signup_create [SignupCreate]
|
|
109
|
+
# @param [Hash] opts the optional parameters
|
|
110
|
+
# @return [Array<(Signup, Integer, Hash)>] Signup data, response status code and response headers
|
|
111
|
+
def create_signup_with_http_info(signup_create, opts = {})
|
|
112
|
+
if @api_client.config.debugging
|
|
113
|
+
@api_client.config.logger.debug 'Calling API: SignupApi.create_signup ...'
|
|
114
|
+
end
|
|
115
|
+
# verify the required parameter 'signup_create' is set
|
|
116
|
+
if @api_client.config.client_side_validation && signup_create.nil?
|
|
117
|
+
fail ArgumentError, "Missing the required parameter 'signup_create' when calling SignupApi.create_signup"
|
|
118
|
+
end
|
|
119
|
+
# resource path
|
|
120
|
+
local_var_path = '/v1/signup'
|
|
121
|
+
|
|
122
|
+
# query parameters
|
|
123
|
+
query_params = opts[:query_params] || {}
|
|
124
|
+
|
|
125
|
+
# header parameters
|
|
126
|
+
header_params = opts[:header_params] || {}
|
|
127
|
+
# HTTP header 'Accept' (if needed)
|
|
128
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
129
|
+
# HTTP header 'Content-Type'
|
|
130
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
131
|
+
if !content_type.nil?
|
|
132
|
+
header_params['Content-Type'] = content_type
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# form parameters
|
|
136
|
+
form_params = opts[:form_params] || {}
|
|
137
|
+
|
|
138
|
+
# http body (model)
|
|
139
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(signup_create)
|
|
140
|
+
|
|
141
|
+
# return_type
|
|
142
|
+
return_type = opts[:debug_return_type] || 'Signup'
|
|
143
|
+
|
|
144
|
+
# auth_names
|
|
145
|
+
auth_names = opts[:debug_auth_names] || []
|
|
146
|
+
|
|
147
|
+
new_options = opts.merge(
|
|
148
|
+
:operation => :"SignupApi.create_signup",
|
|
149
|
+
:header_params => header_params,
|
|
150
|
+
:query_params => query_params,
|
|
151
|
+
:form_params => form_params,
|
|
152
|
+
:body => post_body,
|
|
153
|
+
:auth_names => auth_names,
|
|
154
|
+
:return_type => return_type
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
158
|
+
if @api_client.config.debugging
|
|
159
|
+
@api_client.config.logger.debug "API called: SignupApi#create_signup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
160
|
+
end
|
|
161
|
+
return data, status_code, headers
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
end
|