@hermoso/sdk 0.0.0-stage → 0.1.1

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 (39) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +86 -2
  3. package/dist/gen/client/client.gen.d.ts +2 -0
  4. package/dist/gen/client/client.gen.js +216 -0
  5. package/dist/gen/client/index.d.ts +10 -0
  6. package/dist/gen/client/index.js +6 -0
  7. package/dist/gen/client/types.gen.d.ts +120 -0
  8. package/dist/gen/client/types.gen.js +2 -0
  9. package/dist/gen/client/utils.gen.d.ts +37 -0
  10. package/dist/gen/client/utils.gen.js +228 -0
  11. package/dist/gen/client.gen.d.ts +12 -0
  12. package/dist/gen/client.gen.js +3 -0
  13. package/dist/gen/core/auth.gen.d.ts +25 -0
  14. package/dist/gen/core/auth.gen.js +14 -0
  15. package/dist/gen/core/bodySerializer.gen.d.ts +25 -0
  16. package/dist/gen/core/bodySerializer.gen.js +57 -0
  17. package/dist/gen/core/params.gen.d.ts +43 -0
  18. package/dist/gen/core/params.gen.js +109 -0
  19. package/dist/gen/core/pathSerializer.gen.d.ts +33 -0
  20. package/dist/gen/core/pathSerializer.gen.js +106 -0
  21. package/dist/gen/core/queryKeySerializer.gen.d.ts +18 -0
  22. package/dist/gen/core/queryKeySerializer.gen.js +92 -0
  23. package/dist/gen/core/serverSentEvents.gen.d.ts +71 -0
  24. package/dist/gen/core/serverSentEvents.gen.js +132 -0
  25. package/dist/gen/core/types.gen.d.ts +83 -0
  26. package/dist/gen/core/types.gen.js +2 -0
  27. package/dist/gen/core/utils.gen.d.ts +19 -0
  28. package/dist/gen/core/utils.gen.js +87 -0
  29. package/dist/gen/index.d.ts +2 -0
  30. package/dist/gen/index.js +2 -0
  31. package/dist/gen/sdk.gen.d.ts +433 -0
  32. package/dist/gen/sdk.gen.js +771 -0
  33. package/dist/gen/spec.gen.d.ts +4 -0
  34. package/dist/gen/spec.gen.js +5 -0
  35. package/dist/gen/types.gen.d.ts +4621 -0
  36. package/dist/gen/types.gen.js +2 -0
  37. package/dist/index.d.ts +75 -0
  38. package/dist/index.js +101 -0
  39. package/package.json +51 -4
@@ -0,0 +1,4621 @@
1
+ export type ClientOptions = {
2
+ baseUrl: 'https://app.hermoso.ai' | (string & {});
3
+ };
4
+ export type Error = {
5
+ error: {
6
+ /**
7
+ * The coarse family — branch on this. New CODES land inside an existing type wherever possible so that branch keeps working; the enum is published for code generation, and a client should still fall through gracefully on a member it does not recognise.
8
+ */
9
+ type: 'authentication_error' | 'permission_error' | 'invalid_request_error' | 'connector_error' | 'rate_limit_error' | 'insufficient_credits' | 'api_error';
10
+ /**
11
+ * The specific reason. Log this. New values may appear at any time.
12
+ */
13
+ code: string;
14
+ message: string;
15
+ /**
16
+ * The offending field, when there is one.
17
+ */
18
+ param?: string;
19
+ /**
20
+ * Present when the reason is a channel that is not connected. Reconnect in the app — an OAuth consent screen cannot be completed headlessly.
21
+ */
22
+ connector?: string;
23
+ /**
24
+ * On `insufficient_credits` from a recast or an edit: what the request needs.
25
+ */
26
+ credits_needed?: number;
27
+ /**
28
+ * On `insufficient_credits` from a recast or an edit: what this workspace has.
29
+ */
30
+ balance?: number;
31
+ /**
32
+ * On `invalid_arguments` from POST /v1/tools/{name}: each key the tool does not take, with the argument it most likely meant. Nothing was run.
33
+ */
34
+ unknown_arguments?: Array<{
35
+ /**
36
+ * The key that was sent.
37
+ */
38
+ name?: string;
39
+ /**
40
+ * An argument THIS tool declares that the key most likely meant, or null.
41
+ */
42
+ did_you_mean?: string;
43
+ }>;
44
+ /**
45
+ * On `real_face_needs_paid`: where to choose a paid plan.
46
+ */
47
+ upgrade_url?: string;
48
+ /**
49
+ * On `real_face_needs_paid`: the field that works on every plan instead (`person.describe`).
50
+ */
51
+ alternative?: string;
52
+ /**
53
+ * On a recast with `person.describe` whose recast step was refused after the person was made: the AI person, in your Library. Send it as `person.image_url` to retry without making a new one.
54
+ */
55
+ person_url?: string;
56
+ };
57
+ request_id?: string;
58
+ /**
59
+ * Present when the request also carried a parameter or field this operation does not take. Often the reason for the error (a misnamed field reads as a missing one).
60
+ */
61
+ warnings?: Array<Warning>;
62
+ };
63
+ export type Post = {
64
+ object?: 'post';
65
+ id?: string;
66
+ /**
67
+ * scheduled | processing | published | partially_published | failed | indeterminate. THIS SET MAY GROW — tolerate an unknown value. `indeterminate` means a restart interrupted the send and we cannot say whether it published: check the channel rather than assuming either way. `failed` is only ever used when we know nothing published.
68
+ */
69
+ status?: string;
70
+ scheduled_at?: string;
71
+ created_at?: string;
72
+ channels?: Array<string>;
73
+ caption?: string;
74
+ title?: string;
75
+ /**
76
+ * The headline actually going out — derived from the caption when you named none.
77
+ */
78
+ title_effective?: string;
79
+ link?: string;
80
+ media?: Array<{
81
+ type?: string;
82
+ url?: string;
83
+ }>;
84
+ captions_by_channel?: {
85
+ [key: string]: string;
86
+ };
87
+ visibility?: string;
88
+ visibility_by_channel?: {
89
+ [key: string]: string;
90
+ };
91
+ /**
92
+ * Which account this goes to, per channel (Page, board, LinkedIn Page, Business listing). Unset means the connection’s default.
93
+ */
94
+ targets?: {
95
+ [key: string]: unknown;
96
+ };
97
+ options?: {
98
+ [key: string]: unknown;
99
+ };
100
+ /**
101
+ * Per-channel outcome once fired. A partial failure is normal and is reported here — the top-level status then says `partially_published`, never a flat `failed`.
102
+ */
103
+ results?: Array<{
104
+ channel?: string;
105
+ ok?: boolean;
106
+ url?: string;
107
+ id?: string;
108
+ error?: string;
109
+ /**
110
+ * Present when the post carried `first_comment`. `posted` true with the comment `id`, or false with `note` saying why (`skipped` when the channel takes no first comment, or it was already posted by an earlier run). A failed comment never fails the channel.
111
+ */
112
+ first_comment?: {
113
+ posted?: boolean;
114
+ id?: string;
115
+ skipped?: boolean;
116
+ note?: string;
117
+ };
118
+ }>;
119
+ retry_of?: string;
120
+ /**
121
+ * Present when the status alone would mislead. Set for `indeterminate`.
122
+ */
123
+ status_detail?: string;
124
+ content_lost?: boolean;
125
+ };
126
+ export type PostList = {
127
+ object?: 'list';
128
+ data?: Array<Post>;
129
+ has_more?: boolean;
130
+ next_cursor?: string;
131
+ };
132
+ export type PostCreate = {
133
+ /**
134
+ * One or more channel ids from GET /v1/channels. DELIBERATELY NOT AN ENUM — the set is derived from what the product can publish to, and it GROWS as platform approvals land. Read it from GET /v1/channels rather than hard-coding it, and treat an id you have not seen as valid.
135
+ */
136
+ channels: Array<string>;
137
+ /**
138
+ * The post text. Per-channel length limits are enforced at create time, not discovered at publish time.
139
+ */
140
+ caption?: string;
141
+ /**
142
+ * The headline Pinterest and YouTube each require. Derived from the caption when omitted.
143
+ */
144
+ title?: string;
145
+ link?: string;
146
+ /**
147
+ * Ordered. One item is a single post; two or more are a carousel, in the order given. Each item is a Hermoso-hosted URL from POST /v1/media, as a bare string or as {url, type}.
148
+ */
149
+ media?: Array<string | {
150
+ url?: string;
151
+ type?: 'image' | 'video';
152
+ }>;
153
+ /**
154
+ * Omit to publish immediately. Otherwise ISO-8601, at least 60 seconds out and within the documented horizon.
155
+ */
156
+ scheduled_at?: string;
157
+ /**
158
+ * Take the next free slot in this profile’s posting schedule instead of naming a time. Mutually exclusive with scheduled_at — sending both is an error, never a silent precedence.
159
+ */
160
+ use_queue?: boolean;
161
+ /**
162
+ * IANA zone for use_queue. Defaults to the profile’s saved zone.
163
+ */
164
+ timezone?: string;
165
+ /**
166
+ * public (default) | unlisted | private | draft. Refused at create time where a channel cannot honour it, never silently downgraded at publish time.
167
+ */
168
+ visibility?: string;
169
+ visibility_by_channel?: {
170
+ [key: string]: string;
171
+ };
172
+ /**
173
+ * Override the caption for one channel.
174
+ */
175
+ captions_by_channel?: {
176
+ [key: string]: string;
177
+ };
178
+ /**
179
+ * Which account to post to, where the connection holds more than one. Omit for the default. GET /v1/channels names the field each channel uses.
180
+ */
181
+ targets?: {
182
+ [key: string]: unknown;
183
+ };
184
+ /**
185
+ * Per-channel publish metadata (YouTube description, tags, categoryId, madeForKids, notifySubscribers, paidProductPlacement, brandPartner and a captionTrack {url|text, language, name} uploaded right after the video; X thread parts, Instagram alt text, and so on).
186
+ */
187
+ options?: {
188
+ [key: string]: unknown;
189
+ };
190
+ /**
191
+ * A comment the account posts on its own post right after it publishes: Facebook Pages, Instagram, and LinkedIn company Pages (LinkedIn needs its comments authorization, provider linkedin_community). Up to 2,000 characters, refused (never cut) when longer. Other channels publish the post without it and say so on their result. A comment that fails never undoes the post; its outcome is reported on the channel’s result.
192
+ */
193
+ first_comment?: string;
194
+ };
195
+ /**
196
+ * Any subset of PostCreate. Omitted means unchanged; an explicit empty value clears.
197
+ */
198
+ export type PostUpdate = {
199
+ [key: string]: unknown;
200
+ };
201
+ export type Deleted = {
202
+ object?: 'post';
203
+ id?: string;
204
+ deleted?: boolean;
205
+ };
206
+ export type BestTime = {
207
+ object?: 'best_time';
208
+ zone?: string;
209
+ days?: number;
210
+ slots?: Array<{
211
+ platform?: string;
212
+ day_of_week?: number;
213
+ hour?: number;
214
+ avg_engagement?: number;
215
+ post_count?: number;
216
+ lift?: number;
217
+ }>;
218
+ overall?: {
219
+ [key: string]: unknown;
220
+ };
221
+ channels?: Array<{
222
+ [key: string]: unknown;
223
+ }>;
224
+ text?: string;
225
+ };
226
+ export type PostingFrequency = {
227
+ object?: 'posting_frequency';
228
+ zone?: string;
229
+ days?: number;
230
+ frequency?: Array<{
231
+ platform?: string;
232
+ posts_per_week?: number;
233
+ weeks_count?: number;
234
+ avg_engagement?: number;
235
+ avg_engagement_rate?: number;
236
+ avg_follower_change?: number;
237
+ }>;
238
+ channels?: Array<{
239
+ [key: string]: unknown;
240
+ }>;
241
+ text?: string;
242
+ };
243
+ export type ContentDecay = {
244
+ object?: 'content_decay';
245
+ buckets?: Array<{
246
+ bucket_order?: number;
247
+ bucket_label?: string;
248
+ avg_pct_of_final?: number;
249
+ post_count?: number;
250
+ }>;
251
+ channels?: Array<{
252
+ [key: string]: unknown;
253
+ }>;
254
+ text?: string;
255
+ };
256
+ export type FollowerHistory = {
257
+ object?: 'follower_history';
258
+ granularity?: string;
259
+ dateRange?: {
260
+ from?: string;
261
+ to?: string;
262
+ };
263
+ accounts?: Array<{
264
+ channel?: string;
265
+ account?: string;
266
+ label?: string;
267
+ latest?: number;
268
+ growth?: number;
269
+ points?: Array<{
270
+ date?: string;
271
+ followers?: number;
272
+ change?: number;
273
+ }>;
274
+ }>;
275
+ warning?: string;
276
+ text?: string;
277
+ };
278
+ export type InboxStats = {
279
+ object?: 'inbox_stats';
280
+ from?: string;
281
+ to?: string;
282
+ zone?: string;
283
+ summary?: {
284
+ [key: string]: unknown;
285
+ };
286
+ timeseries?: Array<{
287
+ [key: string]: unknown;
288
+ }>;
289
+ byPlatform?: Array<{
290
+ [key: string]: unknown;
291
+ }>;
292
+ heatmap?: {
293
+ [key: string]: unknown;
294
+ };
295
+ responseTime?: {
296
+ [key: string]: unknown;
297
+ };
298
+ topAccounts?: Array<{
299
+ [key: string]: unknown;
300
+ }>;
301
+ conversations?: {
302
+ [key: string]: unknown;
303
+ };
304
+ waiting?: {
305
+ [key: string]: unknown;
306
+ };
307
+ coverage?: {
308
+ [key: string]: unknown;
309
+ };
310
+ text?: string;
311
+ };
312
+ export type Channel = {
313
+ object?: 'channel';
314
+ id?: string;
315
+ name?: string;
316
+ /**
317
+ * The connection this channel is reached through. Several channels can share one — Facebook and Instagram both ride the Meta connection.
318
+ */
319
+ connector?: string;
320
+ /**
321
+ * Whether this channel can be connected AT ALL on this deployment. False while a platform approval is outstanding — a different answer from "you have not connected it yet", and collapsing the two would send you to build a connect flow that cannot succeed.
322
+ */
323
+ available?: boolean;
324
+ /**
325
+ * Why, when `available` is false.
326
+ */
327
+ unavailable_reason?: string;
328
+ connected?: boolean;
329
+ /**
330
+ * A row exists but holds no usable credential. Reconnect in the app, or send the account holder a link from POST /v1/connect-links.
331
+ */
332
+ needs_reconnect?: boolean;
333
+ /**
334
+ * Which account is connected, where the provider tells us.
335
+ */
336
+ account?: string;
337
+ visibilities?: Array<string>;
338
+ visibility_notes?: string;
339
+ carousel?: {
340
+ min?: number;
341
+ /**
342
+ * The vendor’s own cap. null means the vendor publishes no number — render that as "no documented limit", never as unlimited and never as an invented cap.
343
+ */
344
+ max?: number;
345
+ effective_max?: number;
346
+ video?: boolean;
347
+ };
348
+ carousel_unsupported_reason?: string;
349
+ caption_max?: number;
350
+ /**
351
+ * The key inside `targets` that names WHICH account on this channel to post to.
352
+ */
353
+ target_field?: string;
354
+ };
355
+ export type ChannelList = {
356
+ object?: 'list';
357
+ data?: Array<Channel>;
358
+ };
359
+ export type Media = {
360
+ object?: 'media';
361
+ /**
362
+ * A durable Hermoso-hosted URL. Pass it straight into POST /v1/posts.
363
+ */
364
+ url?: string;
365
+ /**
366
+ * image | video | audio | document.
367
+ */
368
+ type?: string;
369
+ bytes?: number;
370
+ name?: string;
371
+ };
372
+ export type Credits = {
373
+ object?: 'credits';
374
+ /**
375
+ * Hermoso credits available to this workspace.
376
+ */
377
+ balance?: number;
378
+ plan?: string;
379
+ /**
380
+ * True when this key is acting inside a workspace owned by another account — the balance is then the owner’s pool, which is what your renders spend.
381
+ */
382
+ shared_workspace?: boolean;
383
+ /**
384
+ * The monthly credit limits on the brand this key acts on (or the brand named by `?brand=`). The account owner can cap what a brand, or one member of a shared brand, spends in a UTC calendar month; when one would be passed, paid calls answer `429` with `error.code` `credit_limit` (and `Retry-After` until the reset). `limit: null` means no limit. Null here (with `limits_error`) means the read failed, never that there are no limits.
385
+ */
386
+ limits?: {
387
+ /**
388
+ * The UTC calendar month the usage covers, `YYYY-MM`.
389
+ */
390
+ month?: string;
391
+ /**
392
+ * When every limit’s month resets (00:00 UTC on the 1st).
393
+ */
394
+ reset_at?: string;
395
+ timezone?: 'UTC';
396
+ /**
397
+ * True only for the account owner. Set a limit with the `set_credit_limit` tool (`POST /v1/tools/set_credit_limit`).
398
+ */
399
+ can_edit?: boolean;
400
+ brands?: Array<{
401
+ brand?: string;
402
+ name?: string;
403
+ limit?: number;
404
+ used?: number;
405
+ /**
406
+ * Credits held for work still running, which count against the limit.
407
+ */
408
+ held?: number;
409
+ remaining?: number;
410
+ /**
411
+ * Present for the owner and a brand admin (a member sees only their own row).
412
+ */
413
+ members?: Array<{
414
+ email?: string;
415
+ role?: string;
416
+ limit?: number;
417
+ used?: number;
418
+ remaining?: number;
419
+ }>;
420
+ }>;
421
+ };
422
+ /**
423
+ * Present only when the limits could not be read.
424
+ */
425
+ limits_error?: string;
426
+ };
427
+ export type SignupCreate = {
428
+ /**
429
+ * A PAID plan id — see GET /v1/signup/plans-equivalent on hermoso.ai/pricing, currently starter, pro or studio. The free plan is refused here by name: this path provisions an account only against a completed payment.
430
+ */
431
+ plan: string;
432
+ /**
433
+ * Billing cadence. Defaults to `mo`.
434
+ */
435
+ period?: 'mo' | 'yr';
436
+ /**
437
+ * REQUIRED: a real mailbox for the human this account belongs to. A verification link is emailed there; the account works before it is clicked, and verifying only decides whether we may mail the address (receipts, low-credit alerts, replies to bug reports). It is NEVER the account identity: it cannot sign in to this account, and it can never link or merge this account with one that already uses the address. Hermoso synthetic addresses are refused (400 `email_invalid`).
438
+ */
439
+ email: string;
440
+ };
441
+ export type SignupClaim = {
442
+ /**
443
+ * The token returned exactly once by POST /v1/signup.
444
+ */
445
+ claim_token: string;
446
+ };
447
+ export type Tool = {
448
+ object?: 'tool';
449
+ /**
450
+ * Call it at POST /v1/tools/{name}.
451
+ */
452
+ name?: string;
453
+ title?: string;
454
+ /**
455
+ * Which area of the product it belongs to. THIS SET MAY GROW — tolerate a member you have not seen.
456
+ */
457
+ area?: string;
458
+ /**
459
+ * What it does, written for whoever is choosing: a person reading the index or a model reading the roster.
460
+ */
461
+ description?: string;
462
+ /**
463
+ * It reads and changes nothing. Read-only tools are metered on the READ rate-limit budget.
464
+ */
465
+ read_only?: boolean;
466
+ /**
467
+ * It can remove or overwrite something. Destructive tools carry their own confirmation arguments — read the schema.
468
+ */
469
+ destructive?: boolean;
470
+ /**
471
+ * Calling it twice with the same arguments has the same effect as calling it once. Independent of `Idempotency-Key`, which protects a retry regardless.
472
+ */
473
+ idempotent?: boolean;
474
+ /**
475
+ * The third-party account this tool needs linked, or null when it needs none. Linking is a browser flow: an OAuth consent screen cannot be completed headlessly.
476
+ */
477
+ requires_connector?: string;
478
+ /**
479
+ * Whether that connector is linked in this workspace. NULL means the connections could not be read, which is NOT the same as "no" — never render it as a refusal.
480
+ */
481
+ connector_connected?: boolean;
482
+ /**
483
+ * Which rate-limit budget a call to it spends.
484
+ */
485
+ rate_class?: 'read' | 'write';
486
+ /**
487
+ * What one call spends, in credits, before you run it: "free", a range by model for a raw generation tool ("0.4-32.5 credits by model and size"), "from N credits" for one that scales with length or work, or "credits vary: get_cost prices it". Every number is read live from the model catalog; send `get_cost: true` to a paying tool for the exact quote. NULL means it was not priced on this read.
488
+ */
489
+ price?: string;
490
+ /**
491
+ * Only with `include=all`: whether this workspace can call it right now (false on a tool that needs something first, see `unavailable_reason`). Absent from the default index, every row of which is callable.
492
+ */
493
+ available?: boolean;
494
+ /**
495
+ * Only with `include=all`. `not_connected` (link `requires_connector`, at `connect_url`), `not_offered` (the platform is not offered on this server yet, so there is nothing to link) or `shopify_store` (it needs a Shopify store on the account). Null when `available` is true. THIS SET MAY GROW.
496
+ */
497
+ unavailable_reason?: string;
498
+ /**
499
+ * Only with `include=all`, and only on a `not_connected` row: the link a person opens to connect `requires_connector` to this brand. To have your own customer connect their account from your app, use POST /v1/connect-links instead.
500
+ */
501
+ connect_url?: string;
502
+ invoke?: {
503
+ method?: string;
504
+ path?: string;
505
+ };
506
+ /**
507
+ * JSON Schema for the request body of POST /v1/tools/{name}. The body IS the argument object.
508
+ */
509
+ input_schema?: {
510
+ [key: string]: unknown;
511
+ };
512
+ };
513
+ export type ToolList = {
514
+ object?: 'list';
515
+ /**
516
+ * Every area holding at least one tool available to this workspace, so one call shows the whole map before you page through it.
517
+ */
518
+ areas?: Array<{
519
+ object?: 'tool_area';
520
+ id?: string;
521
+ description?: string;
522
+ tool_count?: number;
523
+ }>;
524
+ data?: Array<Tool>;
525
+ /**
526
+ * Tools matching this filter, across all pages.
527
+ */
528
+ total?: number;
529
+ has_more?: boolean;
530
+ /**
531
+ * Pass it back as `starting_after`.
532
+ */
533
+ next_cursor?: string;
534
+ limit?: number;
535
+ /**
536
+ * Present only when `search` was sent.
537
+ */
538
+ search?: {
539
+ query?: string;
540
+ /**
541
+ * True: rows are in relevance order. False only if the ranking was unavailable on this server, in which case rows are a plain text match in roster order.
542
+ */
543
+ ranked?: boolean;
544
+ /**
545
+ * How many of the top rows match strongly (a word of the query is in the tool’s name). The rows after them are looser matches.
546
+ */
547
+ strong_matches?: number;
548
+ };
549
+ warnings?: Array<Warning>;
550
+ };
551
+ /**
552
+ * Something about the request that did not stop it but probably did not do what you meant. Today: a query parameter or body field this operation does not take, which was IGNORED. Any response, success or error, may carry `warnings`; read it in development and fix what it names. THIS SET OF CODES MAY GROW.
553
+ */
554
+ export type Warning = {
555
+ /**
556
+ * `unknown_parameter` (a query parameter) or `unknown_field` (a JSON body field).
557
+ */
558
+ code?: string;
559
+ /**
560
+ * The name you sent.
561
+ */
562
+ param?: string;
563
+ in?: 'query' | 'body';
564
+ /**
565
+ * The parameter of THIS operation you most likely meant.
566
+ */
567
+ did_you_mean?: string;
568
+ /**
569
+ * Every name this operation takes there.
570
+ */
571
+ valid?: Array<string>;
572
+ message?: string;
573
+ };
574
+ /**
575
+ * The TOOL’S OWN arguments, as a flat object. There is no wrapper: to call a tool that takes `query`, send `{"query":"..."}`. Read the shape from GET /v1/tools/{name}.
576
+ */
577
+ export type ToolCall = {
578
+ [key: string]: unknown;
579
+ };
580
+ export type ToolResult = {
581
+ object?: 'tool_result';
582
+ tool?: string;
583
+ /**
584
+ * The tool’s answer as a sentence — what a model would read. Always present.
585
+ */
586
+ text?: string;
587
+ /**
588
+ * The structured result, when the tool produces one; null when its answer is only prose. Its shape is the tool’s own and moves with the tool.
589
+ */
590
+ data?: {
591
+ [key: string]: unknown;
592
+ };
593
+ /**
594
+ * Present only when the tool returned pictures for a model to look at (view_images, video_frames, a finished image): each as base64 with its mimeType, ready to hand to a vision model.
595
+ */
596
+ images?: Array<{
597
+ mimeType?: string;
598
+ /**
599
+ * Base64 bytes.
600
+ */
601
+ data?: string;
602
+ }>;
603
+ /**
604
+ * Present when the call ran WITHOUT keys the tool does not take: each one, with the argument it most likely meant. The text starts with the same news, and data.ignoredArguments carries it too.
605
+ */
606
+ ignored_arguments?: Array<{
607
+ /**
608
+ * The key that was sent.
609
+ */
610
+ name?: string;
611
+ /**
612
+ * An argument THIS tool declares that the key most likely meant, or null.
613
+ */
614
+ did_you_mean?: string;
615
+ }>;
616
+ };
617
+ /**
618
+ * A handle to a render that is queued or still running, answered with HTTP 202 when `wait` was sent.
619
+ */
620
+ export type ToolJob = {
621
+ object?: 'tool_job';
622
+ /**
623
+ * The tool that was called.
624
+ */
625
+ tool?: string;
626
+ job_id?: string;
627
+ /**
628
+ * queued or running at the moment of the reply. This enum MAY GROW.
629
+ */
630
+ status?: string;
631
+ /**
632
+ * The path to poll: /v1/jobs/{id}. Also sent as the `Location` header.
633
+ */
634
+ poll?: string;
635
+ /**
636
+ * The same, as an absolute URL.
637
+ */
638
+ poll_url?: string;
639
+ /**
640
+ * A sensible gap between polls. Also sent as `Retry-After`.
641
+ */
642
+ retry_after_seconds?: number;
643
+ /**
644
+ * The tool’s own sentence about the queued render.
645
+ */
646
+ text?: string;
647
+ };
648
+ export type Job = {
649
+ object?: 'job';
650
+ id?: string;
651
+ /**
652
+ * What kind of work it is: video, stitch, avatar, templatead, upscale, and so on. This set MAY GROW.
653
+ */
654
+ type?: string;
655
+ /**
656
+ * queued, running, done or error. `done` and `error` are final. This enum MAY GROW: keep polling on a value you have not seen.
657
+ */
658
+ status?: string;
659
+ /**
660
+ * 0 to 1, when the worker reports it.
661
+ */
662
+ progress?: number;
663
+ label?: string;
664
+ /**
665
+ * The profile that started the job.
666
+ */
667
+ brand_id?: string;
668
+ /**
669
+ * ISO-8601.
670
+ */
671
+ created_at?: string;
672
+ /**
673
+ * ISO-8601. For a finished job, when it finished.
674
+ */
675
+ updated_at?: string;
676
+ /**
677
+ * ISO-8601, for work scheduled to start later; null for work that starts immediately.
678
+ */
679
+ run_at?: string;
680
+ /**
681
+ * The finished file, once `status` is `done` and the job produced one. Always an absolute, publicly reachable URL.
682
+ */
683
+ url?: string;
684
+ /**
685
+ * A still for a finished video, when there is one.
686
+ */
687
+ poster_url?: string;
688
+ /**
689
+ * The model that rendered it.
690
+ */
691
+ model?: string;
692
+ credits_used?: number;
693
+ /**
694
+ * Why it failed, when `status` is `error`. Named `error_message` so it can never be mistaken for this API’s error envelope.
695
+ */
696
+ error_message?: string;
697
+ /**
698
+ * True when the job was stopped by `POST /v1/jobs/{id}/cancel` before it reached a model. Its `status` is `error` and nothing was charged.
699
+ */
700
+ cancelled?: boolean;
701
+ /**
702
+ * The worker’s full result. PASSTHROUGH TIER: its shape is the job type’s own and improves with it, like a tool’s `data`. Build on the fields above; read this for detail.
703
+ */
704
+ result?: {
705
+ [key: string]: unknown;
706
+ };
707
+ /**
708
+ * This job’s own path.
709
+ */
710
+ poll?: string;
711
+ };
712
+ export type JobCancel = {
713
+ object?: 'job_cancel';
714
+ /**
715
+ * `cancelled`: it had not started, it is stopped and nothing was charged. `requested`: it is starting; it stops before it reaches a model if it can, and is charged nothing if it does. `too_late`: it has already reached the model, so it finishes, is charged as usual and lands in the Library. `finished`: it had already ended. This enum MAY GROW.
716
+ */
717
+ outcome?: string;
718
+ /**
719
+ * A plain sentence for the person who asked to cancel.
720
+ */
721
+ message?: string;
722
+ job?: Job;
723
+ };
724
+ export type JobList = {
725
+ object?: 'list';
726
+ data?: Array<Job>;
727
+ /**
728
+ * How many of the jobs matching this filter are running right now.
729
+ */
730
+ running?: number;
731
+ has_more?: boolean;
732
+ /**
733
+ * Pass it back as `starting_after`.
734
+ */
735
+ next_cursor?: string;
736
+ };
737
+ export type Brand = {
738
+ object?: 'brand';
739
+ /**
740
+ * The value `X-Hermoso-User` takes.
741
+ */
742
+ id?: string;
743
+ name?: string;
744
+ /**
745
+ * The account’s anchor profile, whose id is the literal `default`. It is what a request with no `X-Hermoso-User` and an unpinned key acts on.
746
+ */
747
+ is_default?: boolean;
748
+ /**
749
+ * The profile THIS request resolved to.
750
+ */
751
+ current?: boolean;
752
+ /**
753
+ * True for a profile owned by another account that you were invited into.
754
+ */
755
+ shared?: boolean;
756
+ /**
757
+ * Only on a shared profile: the value `X-Hermoso-Owner` takes.
758
+ */
759
+ owner_account_id?: string;
760
+ /**
761
+ * owner for your own profiles; your role on a shared one.
762
+ */
763
+ role?: string;
764
+ /**
765
+ * Exactly the headers that select this profile.
766
+ */
767
+ headers?: {
768
+ [key: string]: string;
769
+ };
770
+ };
771
+ export type BrandList = {
772
+ object?: 'list';
773
+ data?: Array<Brand>;
774
+ };
775
+ export type Signup = {
776
+ object?: 'signup';
777
+ /**
778
+ * Pass this to POST /v1/signup/{id}/claim.
779
+ */
780
+ id?: string;
781
+ /**
782
+ * This enum MAY GROW — tolerate a member you have not seen.
783
+ */
784
+ status?: 'awaiting_payment' | 'ready';
785
+ plan?: string;
786
+ period?: 'mo' | 'yr';
787
+ /**
788
+ * Stripe’s hosted checkout. Present while payment is outstanding. A card is entered there, never here.
789
+ */
790
+ checkout_url?: string;
791
+ /**
792
+ * ISO-8601. When the checkout link stops working. Nothing is created and nothing is charged if it lapses.
793
+ */
794
+ expires_at?: string;
795
+ /**
796
+ * Returned ONCE, by the create call. Store it before doing anything else — it is the only proof this signup is yours.
797
+ */
798
+ claim_token?: string;
799
+ /**
800
+ * Returned ONCE, on the claim that provisions the account (or on a re-claim inside 24h, which revokes the previous key). Stored only as a hash — it can never be re-read.
801
+ */
802
+ api_key?: string;
803
+ account_id?: string;
804
+ /**
805
+ * The plan’s credits, already granted.
806
+ */
807
+ credits?: number;
808
+ /**
809
+ * The contact mailbox and its verification state. Present from the create call on.
810
+ */
811
+ email?: ContactEmail;
812
+ /**
813
+ * What to do now, in one sentence.
814
+ */
815
+ next?: string;
816
+ };
817
+ export type ContactEmail = {
818
+ address?: string;
819
+ verified?: boolean;
820
+ /**
821
+ * ISO-8601, or null while unverified.
822
+ */
823
+ verified_at?: string;
824
+ /**
825
+ * What the state means, in one sentence.
826
+ */
827
+ note?: string;
828
+ };
829
+ export type GenerationCreate = {
830
+ /**
831
+ * What to make. This enum MAY GROW.
832
+ */
833
+ type: 'image' | 'video';
834
+ /**
835
+ * What the ad should show, in plain words.
836
+ */
837
+ prompt: string;
838
+ /**
839
+ * A model id from the live catalog (the `hermoso_capabilities` tool lists them with prices). Omit to let Hermoso pick; the quote then prices the model the server would pick.
840
+ */
841
+ model?: string;
842
+ /**
843
+ * e.g. 1:1, 4:5, 9:16, 16:9. Each model lists the ratios it renders.
844
+ */
845
+ aspect_ratio?: string;
846
+ /**
847
+ * Image only: a size tier the model lists (for example 1K, 2K).
848
+ */
849
+ image_size?: string;
850
+ /**
851
+ * Video only: one of the chosen model’s listed lengths.
852
+ */
853
+ duration_seconds?: number;
854
+ /**
855
+ * Video only: a Hermoso-hosted image to animate (image-to-video).
856
+ */
857
+ ref_image?: string;
858
+ /**
859
+ * Image only: up to 3 Hermoso-hosted images (a `POST /v1/media` or Library `url`) the render uses as its reference. When present the brand’s product photos are not attached for you; the quote prices exactly this.
860
+ */
861
+ ref_images?: Array<string>;
862
+ /**
863
+ * Image only, default true: attach the profile’s own product photos (and its logo when the prompt asks for one) so the render shows the real product. The quote prices exactly what this attaches.
864
+ */
865
+ use_brand?: boolean;
866
+ /**
867
+ * Image only, default png. gif = a short looping animated GIF, svg = an editable vector. Both render on gpt-image-2.6 (default) or gpt-image-2.6-flare from the prompt alone: no ref_images, and the profile’s photos are not attached.
868
+ */
869
+ format?: 'png' | 'gif' | 'svg';
870
+ /**
871
+ * format gif only: frames in the loop (default 9).
872
+ */
873
+ frames?: number;
874
+ /**
875
+ * format gif only: milliseconds per frame, rounded to 10 (default 200).
876
+ */
877
+ frame_ms?: number;
878
+ /**
879
+ * gpt-image-2.6 models only: how much the model plans before drawing (default high). No separate charge.
880
+ */
881
+ complexity?: 'low' | 'medium' | 'high';
882
+ /**
883
+ * Image only: transparent = a PNG with no background (an alpha channel), for a cut-out product, icon or sticker. Renders on gpt-image-2.6 (default) or gpt-image-2.6-flare from the prompt alone: no ref_images, and the profile’s photos are not attached. Priced like a plain image of that size (the quote shows it).
884
+ */
885
+ background?: 'transparent';
886
+ };
887
+ export type GenerationQuote = {
888
+ object?: 'quote';
889
+ type?: string;
890
+ /**
891
+ * What the render reserves. null when it would not start (see `refused`).
892
+ */
893
+ credits?: number;
894
+ /**
895
+ * Present when the hold covers an optional step (a label repair) that usually does not run: the likely charge, `credits` being the most it can be.
896
+ */
897
+ likely_credits?: number;
898
+ /**
899
+ * The model or pipeline that will render it.
900
+ */
901
+ label?: string;
902
+ /**
903
+ * Why the render would not start. Nothing was charged.
904
+ */
905
+ refused?: string;
906
+ /**
907
+ * Image only: the pictures the render will use, exactly as it attaches them. With `use_brand` on these are the profile’s own saved product photos (up to three) and its logo when the prompt asks for one; empty when none is on file.
908
+ */
909
+ reference_images?: Array<string>;
910
+ /**
911
+ * Image only: a sentence about those pictures when there is one to say (a photo left out, a lineup, the logo).
912
+ */
913
+ reference_note?: string;
914
+ };
915
+ export type CloneQuoteRequest = {
916
+ /**
917
+ * image = a static ad image to clone; video = a TikTok, Reel, Facebook, X or YouTube link (or a direct video file). This enum MAY GROW.
918
+ */
919
+ type: 'image' | 'video';
920
+ /**
921
+ * The https URL of the ad image (image) or of the post or video file (video).
922
+ */
923
+ url: string;
924
+ };
925
+ export type CloneQuote = {
926
+ object?: 'quote';
927
+ /**
928
+ * clone_image or clone_video. This set MAY GROW.
929
+ */
930
+ type?: string;
931
+ /**
932
+ * The sum of every step priced in advance (`flat` and `hold` steps, plus `estimate` steps). Steps with `credits: null` are billed on top at their real cost.
933
+ */
934
+ credits?: number;
935
+ steps?: Array<CloneQuoteStep>;
936
+ /**
937
+ * Why the clone would not start. Nothing was charged.
938
+ */
939
+ refused?: string;
940
+ /**
941
+ * What runs it, in one sentence.
942
+ */
943
+ next?: string;
944
+ };
945
+ export type CloneQuoteStep = {
946
+ /**
947
+ * read_layout, render, copy_and_check, plan or render_video. This set MAY GROW.
948
+ */
949
+ step?: string;
950
+ /**
951
+ * The step in plain words.
952
+ */
953
+ label?: string;
954
+ /**
955
+ * Its price, or null when it is billed at real cost or priced later.
956
+ */
957
+ credits?: number;
958
+ /**
959
+ * For a `hold` that covers an optional step (a label repair): the likely charge.
960
+ */
961
+ likely_credits?: number;
962
+ /**
963
+ * flat, hold, estimate, metered or later. This set MAY GROW.
964
+ */
965
+ basis?: string;
966
+ };
967
+ export type RecastCreate = {
968
+ /**
969
+ * The video the person goes into: a public https link to a video file, a TikTok, Reel, Facebook, X or YouTube post link (read once, through one lookup), or a Hermoso file URL (`POST /v1/media`, `GET /v1/library`, a job `url`).
970
+ */
971
+ video: string;
972
+ person: RecastPerson;
973
+ /**
974
+ * Optional. A NEW voice for the new person, keeping the original words and timing: `match` (a voice that fits them), `female`, `male`, or a stock voice name (Aria, Sarah, Charlotte, George, Brian, Charlie). Omit to keep the video's own sound. Never the original speaker's voice or a cloned one.
975
+ */
976
+ voice?: string;
977
+ /**
978
+ * Optional. The new person speaks this language instead (for example `Spanish`), with the mouth lip-synced to the new words. `voice` defaults to `match`.
979
+ */
980
+ language?: string;
981
+ /**
982
+ * Optional. Where the recast window starts, in seconds. Default 0.
983
+ */
984
+ start?: number;
985
+ /**
986
+ * Optional. Where it ends, in seconds. Default: the end of the video, up to 60 seconds after `start`. At least 3 seconds.
987
+ */
988
+ end?: number;
989
+ /**
990
+ * Optional, in your own words: who in the video is replaced when there are several people ("the man on the left").
991
+ */
992
+ instruction?: string;
993
+ /**
994
+ * true = return the exact price and the plan, and run nothing.
995
+ */
996
+ dry_run?: boolean;
997
+ /**
998
+ * Optional https URL to POST the finished job to (the same as the `X-Hermoso-Callback-Url` header).
999
+ */
1000
+ callback_url?: string;
1001
+ };
1002
+ /**
1003
+ * Who goes into the video. Send exactly ONE of the three.
1004
+ */
1005
+ export type RecastPerson = {
1006
+ /**
1007
+ * A saved creator's id or exact name, or a preset AI creator's id (the `list_creators` tool lists both). A saved photo of a real person needs a paid plan or a credit pack.
1008
+ */
1009
+ creator_id?: string;
1010
+ /**
1011
+ * A clear photo of the person (https or a Hermoso file URL). A photo of a real person needs a paid plan or a credit pack, and sending it confirms you have their permission; the confirmation is recorded. A portrait Hermoso made from words for this account counts as an AI person on every plan.
1012
+ */
1013
+ image_url?: string;
1014
+ /**
1015
+ * An AI person made from your words, on every plan: age, hair, style, vibe ("a man in his 40s, short grey hair, navy sweater"). Never a real or famous person by name. The person is made first (priced as its own step) and lands in your Library.
1016
+ */
1017
+ describe?: string;
1018
+ };
1019
+ export type RecastStep = {
1020
+ /**
1021
+ * `person` (making a described AI person) or `recast`. This set MAY GROW.
1022
+ */
1023
+ step?: string;
1024
+ /**
1025
+ * The step in plain words.
1026
+ */
1027
+ label?: string;
1028
+ /**
1029
+ * Its price: what the step reserves when it starts (`basis: hold`) or, once it has run, what it was charged (`basis: charged`).
1030
+ */
1031
+ credits?: number;
1032
+ /**
1033
+ * When the hold covers an optional leg that usually does not run: the likely charge.
1034
+ */
1035
+ likely_credits?: number;
1036
+ /**
1037
+ * `hold` or `charged`. This set MAY GROW.
1038
+ */
1039
+ basis?: string;
1040
+ };
1041
+ export type RecastQuote = {
1042
+ object?: 'quote';
1043
+ /**
1044
+ * The whole price: the sum of `steps`. An estimate: a real call reserves it and is charged its actual cost, usually within a few percent. null when it would not start (see `refused`).
1045
+ */
1046
+ credits?: number;
1047
+ likely_credits?: number;
1048
+ /**
1049
+ * Why it would not start. Nothing was charged.
1050
+ */
1051
+ refused?: string;
1052
+ steps?: Array<RecastStep>;
1053
+ };
1054
+ export type Recast = {
1055
+ object?: 'recast';
1056
+ dry_run?: boolean;
1057
+ /**
1058
+ * `quoted` (a dry run), `refused` (a dry run that would not start), or the job's own status once queued: `queued`, `running`, `done`, `error`. This enum MAY GROW.
1059
+ */
1060
+ status?: string;
1061
+ quote?: RecastQuote;
1062
+ /**
1063
+ * The model that will render it.
1064
+ */
1065
+ engine?: string;
1066
+ /**
1067
+ * The part of the video that is recast, in seconds.
1068
+ */
1069
+ window?: {
1070
+ start?: number;
1071
+ end?: number;
1072
+ seconds?: number;
1073
+ };
1074
+ /**
1075
+ * The whole video's length.
1076
+ */
1077
+ source_seconds?: number;
1078
+ subject?: {
1079
+ /**
1080
+ * `person`, or `object` when the picture shows no person (it then replaces the video's subject as an object).
1081
+ */
1082
+ kind?: string;
1083
+ name?: string;
1084
+ };
1085
+ voice?: {
1086
+ voice?: string;
1087
+ language?: string;
1088
+ lip_synced?: boolean;
1089
+ };
1090
+ /**
1091
+ * Plain sentences worth showing: a window that was cut, a recast done in passes and the cut second to watch, a face that is small in a shot.
1092
+ */
1093
+ notes?: Array<string>;
1094
+ /**
1095
+ * With `person.describe` on a real call: the AI person that was made. It is in your Library; send it as `person.image_url` to reuse them.
1096
+ */
1097
+ person_url?: string;
1098
+ job_id?: string;
1099
+ /**
1100
+ * The queued job, as `GET /v1/jobs/{id}` answers it. Poll that until `done`; `url` is the video.
1101
+ */
1102
+ job?: Job;
1103
+ };
1104
+ export type EditCreate = {
1105
+ /**
1106
+ * The clip to edit: a public https link to a video file or a social post, or a Hermoso file URL. 3 to 15 seconds.
1107
+ */
1108
+ video: string;
1109
+ /**
1110
+ * The ONE change, in plain words: "change only the mug to red", "swap the bottle for our product", "make it nighttime".
1111
+ */
1112
+ instruction: string;
1113
+ /**
1114
+ * Optional image (https or a Hermoso file URL) that anchors the material of what changes: a fabric, a finish, a colour swatch, the real product. Only its surface is used, never its framing or light.
1115
+ */
1116
+ reference?: string;
1117
+ /**
1118
+ * Default true: keep the clip's sound. false = silent.
1119
+ */
1120
+ keep_audio?: boolean;
1121
+ /**
1122
+ * Default auto: keep the light unless the change needs new light (night, a lamp). preserve or relight forces it.
1123
+ */
1124
+ lighting?: 'auto' | 'preserve' | 'relight';
1125
+ /**
1126
+ * true = edit ONE still of the clip first and return it with the clip's price. Nothing else runs.
1127
+ */
1128
+ preview_first_frame?: boolean;
1129
+ /**
1130
+ * The `preview.still_url` a preview returned: the clip is then rendered so the change looks the way it does in that still.
1131
+ */
1132
+ preview_still?: string;
1133
+ /**
1134
+ * Which second to preview (default the first frame). Send the same value with `preview_still`.
1135
+ */
1136
+ preview_at?: number;
1137
+ /**
1138
+ * true = return the exact price, and run nothing.
1139
+ */
1140
+ dry_run?: boolean;
1141
+ /**
1142
+ * Optional https URL to POST the finished job to (the same as the `X-Hermoso-Callback-Url` header).
1143
+ */
1144
+ callback_url?: string;
1145
+ };
1146
+ export type EditQuote = {
1147
+ object?: 'quote';
1148
+ /**
1149
+ * What the clip edit reserves when it starts, from its own pricing. An estimate: a real call is charged its actual cost, usually within a few percent. null when it would not start (see `refused`).
1150
+ */
1151
+ credits?: number;
1152
+ likely_credits?: number;
1153
+ /**
1154
+ * The model or pipeline that will render it.
1155
+ */
1156
+ label?: string;
1157
+ /**
1158
+ * Why it would not start. Nothing was charged.
1159
+ */
1160
+ refused?: string;
1161
+ };
1162
+ export type Edit = {
1163
+ object?: 'edit';
1164
+ dry_run?: boolean;
1165
+ /**
1166
+ * `preview` when `preview_first_frame` was sent. This enum MAY GROW.
1167
+ */
1168
+ mode?: 'clip' | 'preview';
1169
+ /**
1170
+ * `quoted`, `refused`, `previewed`, or the job's own status once queued: `queued`, `running`, `done`, `error`. This enum MAY GROW.
1171
+ */
1172
+ status?: string;
1173
+ quote?: EditQuote;
1174
+ preview?: {
1175
+ /**
1176
+ * The edited still (null on a dry run). Send it back as `preview_still`.
1177
+ */
1178
+ still_url?: string;
1179
+ /**
1180
+ * What the still cost, or on a dry run what it reserves.
1181
+ */
1182
+ still_credits?: number;
1183
+ still_refused?: string;
1184
+ /**
1185
+ * The second of the clip the still was taken from.
1186
+ */
1187
+ frame_at?: number;
1188
+ note?: string;
1189
+ };
1190
+ job_id?: string;
1191
+ /**
1192
+ * The queued job, as `GET /v1/jobs/{id}` answers it.
1193
+ */
1194
+ job?: Job;
1195
+ /**
1196
+ * What to do now, in one sentence.
1197
+ */
1198
+ next?: string;
1199
+ };
1200
+ export type Asset = {
1201
+ object?: 'asset';
1202
+ /**
1203
+ * The durable public file.
1204
+ */
1205
+ url?: string;
1206
+ /**
1207
+ * image or video. This set MAY GROW.
1208
+ */
1209
+ type?: string;
1210
+ /**
1211
+ * A still for a video.
1212
+ */
1213
+ poster_url?: string;
1214
+ model?: string;
1215
+ /**
1216
+ * ISO-8601, when known.
1217
+ */
1218
+ created_at?: string;
1219
+ };
1220
+ export type Model = {
1221
+ object?: 'model';
1222
+ /**
1223
+ * Pass as `model` to POST /v1/generations.
1224
+ */
1225
+ id?: string;
1226
+ /**
1227
+ * image or video.
1228
+ */
1229
+ type?: string;
1230
+ label?: string;
1231
+ /**
1232
+ * One of the models Hermoso recommends.
1233
+ */
1234
+ featured?: boolean;
1235
+ /**
1236
+ * The model Hermoso marks as its best-quality pick for this type. It is NOT necessarily the model a request without `model` runs: that depends on the request (an on-brand image is routed to a model that can composite your brand’s photos). POST /v1/generations/quote with your exact body answers `label` with the model it would actually run, and its price.
1237
+ */
1238
+ default?: boolean;
1239
+ aspect_ratios?: Array<string>;
1240
+ image_sizes?: Array<string>;
1241
+ /**
1242
+ * Video: the lengths, in seconds, this model renders in one pass.
1243
+ */
1244
+ durations?: Array<number>;
1245
+ /**
1246
+ * Image: the list price of one render. Video: null (see credits_by_duration).
1247
+ */
1248
+ credits?: number;
1249
+ credits_by_size?: {
1250
+ [key: string]: number;
1251
+ };
1252
+ credits_by_duration?: {
1253
+ [key: string]: number;
1254
+ };
1255
+ /**
1256
+ * Video: renders its own sound.
1257
+ */
1258
+ audio?: boolean;
1259
+ /**
1260
+ * Only works on a picture or clip you supply.
1261
+ */
1262
+ needs_reference?: boolean;
1263
+ };
1264
+ export type ModelList = {
1265
+ object?: 'list';
1266
+ data?: Array<Model>;
1267
+ };
1268
+ export type AssetList = {
1269
+ object?: 'list';
1270
+ data?: Array<Asset>;
1271
+ };
1272
+ /**
1273
+ * The file’s own bytes, with its own Content-Type.
1274
+ */
1275
+ export type Binary = Blob | File;
1276
+ export type ConversionEventsSend = {
1277
+ events: Array<{
1278
+ /**
1279
+ * Purchase, Lead, QualifiedLead, CompleteRegistration, AddToCart, InitiateCheckout, Subscribe, StartTrial, ViewContent, PageView … or your own.
1280
+ */
1281
+ event_name: string;
1282
+ /**
1283
+ * The one dedup key every platform receives.
1284
+ */
1285
+ event_id: string;
1286
+ /**
1287
+ * Unix seconds; default now.
1288
+ */
1289
+ event_time?: number;
1290
+ value?: number;
1291
+ currency?: string;
1292
+ action_source?: string;
1293
+ source_url?: string;
1294
+ referrer?: string;
1295
+ /**
1296
+ * email, phone, first_name, last_name, external_id, ip_address, user_agent, country, city, state, zip, dob, gender, lead_id, visitor_id, click_ids {gclid, fbc, fbp, ttclid, li_fat_id, epik, rdt_cid, twclid, msclkid, sccid, oppref …}. Plain values: hashed per platform on our server.
1297
+ */
1298
+ user?: {
1299
+ [key: string]: unknown;
1300
+ };
1301
+ items?: Array<{
1302
+ [key: string]: unknown;
1303
+ }>;
1304
+ campaign?: {
1305
+ [key: string]: unknown;
1306
+ };
1307
+ consent?: {
1308
+ [key: string]: unknown;
1309
+ };
1310
+ limited_data_use?: boolean;
1311
+ }>;
1312
+ /**
1313
+ * Saved destination ids or destination objects, instead of the saved list.
1314
+ */
1315
+ destinations?: Array<unknown>;
1316
+ validate_only?: boolean;
1317
+ test_code?: string;
1318
+ forward?: boolean;
1319
+ carry_click_ids?: boolean;
1320
+ source?: string;
1321
+ };
1322
+ export type ConversionSendResult = {
1323
+ object?: 'conversion_send';
1324
+ events_received?: number;
1325
+ stored?: boolean;
1326
+ test_code?: string;
1327
+ validate_only?: boolean;
1328
+ destinations?: Array<{
1329
+ destination_id?: string;
1330
+ platform?: string;
1331
+ mode?: 'live' | 'test' | 'validate' | 'skip';
1332
+ events_sent?: number;
1333
+ events_accepted?: number;
1334
+ events_skipped?: number;
1335
+ failures?: Array<{
1336
+ [key: string]: unknown;
1337
+ }>;
1338
+ skipped?: Array<{
1339
+ [key: string]: unknown;
1340
+ }>;
1341
+ error?: string;
1342
+ trace_id?: string;
1343
+ note?: string;
1344
+ }>;
1345
+ carried_click_ids?: number;
1346
+ note?: string;
1347
+ };
1348
+ export type ConversionEventList = {
1349
+ object?: 'list';
1350
+ data?: Array<{
1351
+ [key: string]: unknown;
1352
+ }>;
1353
+ total?: number;
1354
+ next_cursor?: string;
1355
+ note?: string;
1356
+ };
1357
+ export type ConversionEventUpdate = {
1358
+ value: number;
1359
+ currency?: string;
1360
+ event_name?: string;
1361
+ };
1362
+ export type ConversionDestinationList = {
1363
+ object?: 'list';
1364
+ data?: Array<{
1365
+ [key: string]: unknown;
1366
+ }>;
1367
+ platforms?: Array<{
1368
+ [key: string]: unknown;
1369
+ }>;
1370
+ note?: string;
1371
+ };
1372
+ export type ConversionDestinationCreate = {
1373
+ /**
1374
+ * meta, tiktok, linkedin, snapchat, reddit, pinterest, x, microsoft, chatgpt, applovin or amazon.
1375
+ */
1376
+ platform: string;
1377
+ label?: string;
1378
+ pixel_id?: string;
1379
+ ad_account_id?: string;
1380
+ advertiser_id?: string;
1381
+ event_source_id?: string;
1382
+ event_source?: string;
1383
+ conversion_id?: string;
1384
+ conversion_name?: string;
1385
+ event_id?: string;
1386
+ pixel_snippet_id?: string;
1387
+ api_key?: string;
1388
+ amazon_profile_id?: string;
1389
+ country_code?: string;
1390
+ event_names?: Array<string>;
1391
+ event_map?: {
1392
+ [key: string]: string;
1393
+ };
1394
+ [key: string]: unknown;
1395
+ };
1396
+ export type ConversionDestinationResult = {
1397
+ object?: 'event_destination';
1398
+ destination?: {
1399
+ [key: string]: unknown;
1400
+ };
1401
+ verified?: boolean;
1402
+ note?: string;
1403
+ };
1404
+ export type ConversionInsights = {
1405
+ object?: 'conversion_insights';
1406
+ view?: string;
1407
+ journey?: {
1408
+ [key: string]: unknown;
1409
+ };
1410
+ customers?: Array<{
1411
+ [key: string]: unknown;
1412
+ }>;
1413
+ paths?: Array<{
1414
+ [key: string]: unknown;
1415
+ }>;
1416
+ cohorts?: Array<{
1417
+ [key: string]: unknown;
1418
+ }>;
1419
+ destinations?: Array<{
1420
+ [key: string]: unknown;
1421
+ }>;
1422
+ note?: string;
1423
+ [key: string]: unknown;
1424
+ };
1425
+ export type CampaignResultsUpload = {
1426
+ rows?: Array<{
1427
+ date: string;
1428
+ campaign_id?: string;
1429
+ utm_campaign?: string;
1430
+ campaign_name?: string;
1431
+ ad_account_id?: string;
1432
+ platform?: string;
1433
+ currency?: string;
1434
+ values: {
1435
+ [key: string]: number;
1436
+ };
1437
+ }>;
1438
+ csv?: string;
1439
+ };
1440
+ export type CampaignResults = {
1441
+ object?: 'campaign_results';
1442
+ upload_id?: string;
1443
+ received?: number;
1444
+ stored?: number;
1445
+ rows?: Array<{
1446
+ [key: string]: unknown;
1447
+ }>;
1448
+ totals?: {
1449
+ [key: string]: number;
1450
+ };
1451
+ note?: string;
1452
+ [key: string]: unknown;
1453
+ };
1454
+ export type ProfitSettings = {
1455
+ object?: 'profit_settings';
1456
+ margin_percent?: number;
1457
+ cost_per_order?: number;
1458
+ campaign_margins?: {
1459
+ [key: string]: number;
1460
+ };
1461
+ note?: string;
1462
+ };
1463
+ export type CampaignProfit = {
1464
+ object?: 'campaign_profit';
1465
+ from?: string;
1466
+ to?: string;
1467
+ model?: string;
1468
+ rows?: Array<{
1469
+ [key: string]: unknown;
1470
+ }>;
1471
+ totals?: Array<{
1472
+ [key: string]: unknown;
1473
+ }>;
1474
+ unreadable?: Array<{
1475
+ [key: string]: unknown;
1476
+ }>;
1477
+ note?: string;
1478
+ [key: string]: unknown;
1479
+ };
1480
+ export type HermosoTag = {
1481
+ object?: 'hermoso_tag';
1482
+ created?: boolean;
1483
+ tag?: {
1484
+ tag_id?: string;
1485
+ snippet?: string;
1486
+ script_url?: string;
1487
+ settings?: {
1488
+ [key: string]: unknown;
1489
+ };
1490
+ status?: {
1491
+ [key: string]: unknown;
1492
+ };
1493
+ installs?: Array<{
1494
+ [key: string]: unknown;
1495
+ }>;
1496
+ [key: string]: unknown;
1497
+ };
1498
+ page?: {
1499
+ [key: string]: unknown;
1500
+ };
1501
+ note?: string;
1502
+ [key: string]: unknown;
1503
+ };
1504
+ export type HermosoTagUpdate = {
1505
+ action?: 'update' | 'verify' | 'server_key' | 'stripe';
1506
+ auto_track?: {
1507
+ [key: string]: unknown;
1508
+ };
1509
+ link_domains?: Array<string>;
1510
+ signing_secret?: string;
1511
+ consent_default?: 'granted' | 'denied';
1512
+ wait_for_consent?: boolean;
1513
+ honor_gpc?: boolean;
1514
+ honor_dnt?: boolean;
1515
+ forward?: boolean;
1516
+ forward_events?: Array<string>;
1517
+ allowed_domains?: Array<string>;
1518
+ spa?: boolean;
1519
+ test_mode?: string;
1520
+ conversions?: {
1521
+ [key: string]: unknown;
1522
+ };
1523
+ replace_conversions?: boolean;
1524
+ url?: string;
1525
+ render?: boolean;
1526
+ [key: string]: unknown;
1527
+ };
1528
+ export type HermosoTagInstall = {
1529
+ site?: 'google_tag_manager' | 'wordpress' | 'shopify' | 'manual';
1530
+ confirm?: boolean;
1531
+ publish?: boolean;
1532
+ container_path?: string;
1533
+ gtm_workspace?: string;
1534
+ confirm_public_id?: string;
1535
+ remove?: boolean;
1536
+ };
1537
+ export type HermosoTagInstallResult = {
1538
+ object?: 'hermoso_tag_install';
1539
+ tag_id?: string;
1540
+ site?: string;
1541
+ installed?: boolean;
1542
+ removed?: boolean;
1543
+ needs_confirm?: boolean;
1544
+ snippet?: string;
1545
+ note?: string;
1546
+ [key: string]: unknown;
1547
+ };
1548
+ export type HermosoTagReport = {
1549
+ object?: 'hermoso_tag_report';
1550
+ from?: string;
1551
+ to?: string;
1552
+ group_by?: string;
1553
+ totals?: {
1554
+ [key: string]: unknown;
1555
+ };
1556
+ rows?: Array<{
1557
+ [key: string]: unknown;
1558
+ }>;
1559
+ status?: {
1560
+ [key: string]: unknown;
1561
+ };
1562
+ note?: string;
1563
+ [key: string]: unknown;
1564
+ };
1565
+ export type HermosoTagAudienceAction = {
1566
+ action?: 'preview' | 'save' | 'delete' | 'sync';
1567
+ segment_id?: string;
1568
+ name?: string;
1569
+ visited?: Array<string>;
1570
+ events?: Array<string>;
1571
+ not_events?: Array<string>;
1572
+ within_days?: number;
1573
+ platform?: 'meta' | 'google_ads' | 'snapchat_ads' | 'pinterest_ads' | 'x_ads';
1574
+ audience_id?: string;
1575
+ audience_name?: string;
1576
+ ad_account_id?: string;
1577
+ customer_id?: string;
1578
+ accept_terms?: boolean;
1579
+ confirm?: boolean;
1580
+ [key: string]: unknown;
1581
+ };
1582
+ export type HermosoTagAudiences = {
1583
+ object?: 'hermoso_tag_audiences';
1584
+ segments?: Array<{
1585
+ [key: string]: unknown;
1586
+ }>;
1587
+ segment?: {
1588
+ [key: string]: unknown;
1589
+ };
1590
+ sent?: number;
1591
+ needs_confirm?: boolean;
1592
+ note?: string;
1593
+ [key: string]: unknown;
1594
+ };
1595
+ export type HermosoTagEventsSend = {
1596
+ events: Array<{
1597
+ [key: string]: unknown;
1598
+ }>;
1599
+ };
1600
+ export type HermosoTagEventsSent = {
1601
+ object?: 'hermoso_tag_events_sent';
1602
+ accepted?: number;
1603
+ refused?: Array<{
1604
+ [key: string]: unknown;
1605
+ }>;
1606
+ note?: string;
1607
+ [key: string]: unknown;
1608
+ };
1609
+ export type HermosoTagEvents = {
1610
+ object?: 'list';
1611
+ data?: Array<{
1612
+ [key: string]: unknown;
1613
+ }>;
1614
+ status?: {
1615
+ [key: string]: unknown;
1616
+ };
1617
+ note?: string;
1618
+ [key: string]: unknown;
1619
+ };
1620
+ export type ConnectRedirects = {
1621
+ object?: 'connect_redirects';
1622
+ urls?: Array<string>;
1623
+ };
1624
+ export type ConnectRedirectsSet = {
1625
+ /**
1626
+ * https addresses (origin plus an optional path prefix). Replaces the list.
1627
+ */
1628
+ urls: Array<string>;
1629
+ };
1630
+ export type ConnectLinkCreate = {
1631
+ /**
1632
+ * Which platform: meta (Facebook and Instagram), instagram (an Instagram account on its own login), tiktok, youtube, linkedin, linkedin_community (comments as a LinkedIn Page), x, pinterest, threads, google_business, and the ad platforms. An unsupported one is refused with the list.
1633
+ */
1634
+ provider: string;
1635
+ /**
1636
+ * Where your customer lands afterwards. Must sit under a registered address (PUT /v1/connect-redirects). Omit to show them a plain “connected, you can close this window” page.
1637
+ */
1638
+ redirect_url?: string;
1639
+ /**
1640
+ * Your own value, up to 500 characters, returned on the redirect and in the webhook so you can match the connection to your customer.
1641
+ */
1642
+ state?: string;
1643
+ /**
1644
+ * Default 60, at most 2880 (48 hours).
1645
+ */
1646
+ expires_in_minutes?: number;
1647
+ };
1648
+ export type ConnectLink = {
1649
+ object?: 'connect_link';
1650
+ id?: string;
1651
+ /**
1652
+ * Returned when the link is created. Hand it to your customer; it is a bearer link, so treat it like a password until it is used or expires.
1653
+ */
1654
+ url?: string;
1655
+ provider?: string;
1656
+ brand?: string;
1657
+ status?: 'pending' | 'opened' | 'connected' | 'cancelled' | 'failed' | 'expired' | 'revoked';
1658
+ redirect_url?: string;
1659
+ state?: string;
1660
+ created_at?: string;
1661
+ expires_at?: string;
1662
+ connected_at?: string;
1663
+ account?: {
1664
+ label?: string;
1665
+ handle?: string;
1666
+ id?: string;
1667
+ };
1668
+ /**
1669
+ * True for Facebook/Instagram (meta) and LinkedIn: choose which Pages the brand may use with list_connector_accounts + set_connector_accounts before posting.
1670
+ */
1671
+ account_selection_required?: boolean;
1672
+ error?: {
1673
+ code?: string;
1674
+ message?: string;
1675
+ };
1676
+ };
1677
+ export type Connection = {
1678
+ object?: 'connection';
1679
+ provider?: string;
1680
+ name?: string;
1681
+ account?: string;
1682
+ /**
1683
+ * On a channel that holds several accounts (TikTok, X, YouTube, Threads, Pinterest, Reddit, Bluesky, Telegram), each one.
1684
+ */
1685
+ accounts?: Array<{
1686
+ id?: string;
1687
+ label?: string;
1688
+ handle?: string;
1689
+ }>;
1690
+ needs_reconnect?: boolean;
1691
+ /**
1692
+ * This provider needs Pages chosen for the brand (list_connector_accounts / set_connector_accounts).
1693
+ */
1694
+ account_selection_required?: boolean;
1695
+ };
1696
+ export type ConnectionList = {
1697
+ object?: 'list';
1698
+ data?: Array<Connection>;
1699
+ };
1700
+ export type ConnectionDeleted = {
1701
+ object?: 'connection';
1702
+ provider?: string;
1703
+ deleted?: boolean;
1704
+ account?: string;
1705
+ note?: string;
1706
+ };
1707
+ export type ContactEmailResend = {
1708
+ /**
1709
+ * Omit to re-send to the current address. Give a different address to replace it (verification starts over).
1710
+ */
1711
+ email?: string;
1712
+ };
1713
+ export type ListChannelsData = {
1714
+ body?: never;
1715
+ headers?: {
1716
+ /**
1717
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
1718
+ */
1719
+ 'X-Hermoso-User'?: string;
1720
+ };
1721
+ path?: never;
1722
+ query?: never;
1723
+ url: '/v1/channels';
1724
+ };
1725
+ export type ListChannelsErrors = {
1726
+ /**
1727
+ * Invalid request.
1728
+ */
1729
+ 400: Error;
1730
+ /**
1731
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
1732
+ */
1733
+ 401: Error;
1734
+ /**
1735
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
1736
+ */
1737
+ 404: Error;
1738
+ /**
1739
+ * Rate limited. `Retry-After` says how long to wait.
1740
+ */
1741
+ 429: Error;
1742
+ };
1743
+ export type ListChannelsError = ListChannelsErrors[keyof ListChannelsErrors];
1744
+ export type ListChannelsResponses = {
1745
+ /**
1746
+ * Success
1747
+ */
1748
+ 200: ChannelList;
1749
+ };
1750
+ export type ListChannelsResponse = ListChannelsResponses[keyof ListChannelsResponses];
1751
+ export type ListPostsData = {
1752
+ body?: never;
1753
+ headers?: {
1754
+ /**
1755
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
1756
+ */
1757
+ 'X-Hermoso-User'?: string;
1758
+ };
1759
+ path?: never;
1760
+ query?: {
1761
+ /**
1762
+ * 1-100, default 25.
1763
+ */
1764
+ limit?: number;
1765
+ /**
1766
+ * A post id from a previous page; returns the page after it. An unknown cursor is an error, never a silent restart.
1767
+ */
1768
+ starting_after?: string;
1769
+ /**
1770
+ * Filter: scheduled, processing, published, partially_published, failed, indeterminate. `indeterminate` means a restart interrupted the send and we cannot say whether it published.
1771
+ */
1772
+ status?: string;
1773
+ /**
1774
+ * Filter to posts that include this channel.
1775
+ */
1776
+ channel?: string;
1777
+ };
1778
+ url: '/v1/posts';
1779
+ };
1780
+ export type ListPostsErrors = {
1781
+ /**
1782
+ * Invalid request.
1783
+ */
1784
+ 400: Error;
1785
+ /**
1786
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
1787
+ */
1788
+ 401: Error;
1789
+ /**
1790
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
1791
+ */
1792
+ 404: Error;
1793
+ /**
1794
+ * Rate limited. `Retry-After` says how long to wait.
1795
+ */
1796
+ 429: Error;
1797
+ };
1798
+ export type ListPostsError = ListPostsErrors[keyof ListPostsErrors];
1799
+ export type ListPostsResponses = {
1800
+ /**
1801
+ * Success
1802
+ */
1803
+ 200: PostList;
1804
+ };
1805
+ export type ListPostsResponse = ListPostsResponses[keyof ListPostsResponses];
1806
+ export type CreatePostData = {
1807
+ body: PostCreate;
1808
+ headers?: {
1809
+ /**
1810
+ * Send a unique value to make this call safe to retry. A replay returns the original response with `Idempotency-Replayed: true`, for 24 hours — except a call that queued a job, whose replay is that job as it is now (what `GET /v1/jobs/{id}` answers), so a finished render replays as done with its file.
1811
+ */
1812
+ 'Idempotency-Key'?: string;
1813
+ /**
1814
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
1815
+ */
1816
+ 'X-Hermoso-User'?: string;
1817
+ };
1818
+ path?: never;
1819
+ query?: never;
1820
+ url: '/v1/posts';
1821
+ };
1822
+ export type CreatePostErrors = {
1823
+ /**
1824
+ * Invalid request.
1825
+ */
1826
+ 400: Error;
1827
+ /**
1828
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
1829
+ */
1830
+ 401: Error;
1831
+ /**
1832
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
1833
+ */
1834
+ 404: Error;
1835
+ /**
1836
+ * Rate limited. `Retry-After` says how long to wait.
1837
+ */
1838
+ 429: Error;
1839
+ };
1840
+ export type CreatePostError = CreatePostErrors[keyof CreatePostErrors];
1841
+ export type CreatePostResponses = {
1842
+ /**
1843
+ * Success
1844
+ */
1845
+ 200: Post;
1846
+ };
1847
+ export type CreatePostResponse = CreatePostResponses[keyof CreatePostResponses];
1848
+ export type DeletePostData = {
1849
+ body?: never;
1850
+ headers?: {
1851
+ /**
1852
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
1853
+ */
1854
+ 'X-Hermoso-User'?: string;
1855
+ };
1856
+ path: {
1857
+ id: string;
1858
+ };
1859
+ query?: never;
1860
+ url: '/v1/posts/{id}';
1861
+ };
1862
+ export type DeletePostErrors = {
1863
+ /**
1864
+ * Invalid request.
1865
+ */
1866
+ 400: Error;
1867
+ /**
1868
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
1869
+ */
1870
+ 401: Error;
1871
+ /**
1872
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
1873
+ */
1874
+ 404: Error;
1875
+ /**
1876
+ * Rate limited. `Retry-After` says how long to wait.
1877
+ */
1878
+ 429: Error;
1879
+ };
1880
+ export type DeletePostError = DeletePostErrors[keyof DeletePostErrors];
1881
+ export type DeletePostResponses = {
1882
+ /**
1883
+ * Success
1884
+ */
1885
+ 200: Deleted;
1886
+ };
1887
+ export type DeletePostResponse = DeletePostResponses[keyof DeletePostResponses];
1888
+ export type GetPostData = {
1889
+ body?: never;
1890
+ headers?: {
1891
+ /**
1892
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
1893
+ */
1894
+ 'X-Hermoso-User'?: string;
1895
+ };
1896
+ path: {
1897
+ id: string;
1898
+ };
1899
+ query?: never;
1900
+ url: '/v1/posts/{id}';
1901
+ };
1902
+ export type GetPostErrors = {
1903
+ /**
1904
+ * Invalid request.
1905
+ */
1906
+ 400: Error;
1907
+ /**
1908
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
1909
+ */
1910
+ 401: Error;
1911
+ /**
1912
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
1913
+ */
1914
+ 404: Error;
1915
+ /**
1916
+ * Rate limited. `Retry-After` says how long to wait.
1917
+ */
1918
+ 429: Error;
1919
+ };
1920
+ export type GetPostError = GetPostErrors[keyof GetPostErrors];
1921
+ export type GetPostResponses = {
1922
+ /**
1923
+ * Success
1924
+ */
1925
+ 200: Post;
1926
+ };
1927
+ export type GetPostResponse = GetPostResponses[keyof GetPostResponses];
1928
+ export type UpdatePostData = {
1929
+ body: PostUpdate;
1930
+ headers?: {
1931
+ /**
1932
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
1933
+ */
1934
+ 'X-Hermoso-User'?: string;
1935
+ };
1936
+ path: {
1937
+ id: string;
1938
+ };
1939
+ query?: never;
1940
+ url: '/v1/posts/{id}';
1941
+ };
1942
+ export type UpdatePostErrors = {
1943
+ /**
1944
+ * Invalid request.
1945
+ */
1946
+ 400: Error;
1947
+ /**
1948
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
1949
+ */
1950
+ 401: Error;
1951
+ /**
1952
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
1953
+ */
1954
+ 404: Error;
1955
+ /**
1956
+ * Rate limited. `Retry-After` says how long to wait.
1957
+ */
1958
+ 429: Error;
1959
+ };
1960
+ export type UpdatePostError = UpdatePostErrors[keyof UpdatePostErrors];
1961
+ export type UpdatePostResponses = {
1962
+ /**
1963
+ * Success
1964
+ */
1965
+ 200: Post;
1966
+ };
1967
+ export type UpdatePostResponse = UpdatePostResponses[keyof UpdatePostResponses];
1968
+ export type CreateMediaData = {
1969
+ body?: Blob | File;
1970
+ headers?: {
1971
+ /**
1972
+ * Send a unique value to make this call safe to retry. A replay returns the original response with `Idempotency-Replayed: true`, for 24 hours — except a call that queued a job, whose replay is that job as it is now (what `GET /v1/jobs/{id}` answers), so a finished render replays as done with its file.
1973
+ */
1974
+ 'Idempotency-Key'?: string;
1975
+ /**
1976
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
1977
+ */
1978
+ 'X-Hermoso-User'?: string;
1979
+ };
1980
+ path?: never;
1981
+ query?: {
1982
+ /**
1983
+ * A public https URL to fetch instead of sending bytes. The same as a JSON body `{"url": "…"}`.
1984
+ */
1985
+ url?: string;
1986
+ };
1987
+ url: '/v1/media';
1988
+ };
1989
+ export type CreateMediaErrors = {
1990
+ /**
1991
+ * Invalid request.
1992
+ */
1993
+ 400: Error;
1994
+ /**
1995
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
1996
+ */
1997
+ 401: Error;
1998
+ /**
1999
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2000
+ */
2001
+ 404: Error;
2002
+ /**
2003
+ * Rate limited. `Retry-After` says how long to wait.
2004
+ */
2005
+ 429: Error;
2006
+ };
2007
+ export type CreateMediaError = CreateMediaErrors[keyof CreateMediaErrors];
2008
+ export type CreateMediaResponses = {
2009
+ /**
2010
+ * Success
2011
+ */
2012
+ 200: Media;
2013
+ };
2014
+ export type CreateMediaResponse = CreateMediaResponses[keyof CreateMediaResponses];
2015
+ export type GetCreditsData = {
2016
+ body?: never;
2017
+ headers?: {
2018
+ /**
2019
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2020
+ */
2021
+ 'X-Hermoso-User'?: string;
2022
+ };
2023
+ path?: never;
2024
+ query?: {
2025
+ /**
2026
+ * A brand id (`GET /v1/brands`) whose monthly credit limit to report in `limits`. Omit for the brand this key acts on.
2027
+ */
2028
+ brand?: string;
2029
+ };
2030
+ url: '/v1/credits';
2031
+ };
2032
+ export type GetCreditsErrors = {
2033
+ /**
2034
+ * Invalid request.
2035
+ */
2036
+ 400: Error;
2037
+ /**
2038
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2039
+ */
2040
+ 401: Error;
2041
+ /**
2042
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2043
+ */
2044
+ 404: Error;
2045
+ /**
2046
+ * Rate limited. `Retry-After` says how long to wait.
2047
+ */
2048
+ 429: Error;
2049
+ };
2050
+ export type GetCreditsError = GetCreditsErrors[keyof GetCreditsErrors];
2051
+ export type GetCreditsResponses = {
2052
+ /**
2053
+ * Success
2054
+ */
2055
+ 200: Credits;
2056
+ };
2057
+ export type GetCreditsResponse = GetCreditsResponses[keyof GetCreditsResponses];
2058
+ export type ListToolsData = {
2059
+ body?: never;
2060
+ headers?: {
2061
+ /**
2062
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2063
+ */
2064
+ 'X-Hermoso-User'?: string;
2065
+ };
2066
+ path?: never;
2067
+ query?: {
2068
+ /**
2069
+ * Filter to one area. `areas[]` in the response lists them with a description and a count.
2070
+ */
2071
+ area?: string;
2072
+ /**
2073
+ * Words from the task or the tool name, e.g. `email outreach`, `schedule post`, `google ads keyword`. Each word is matched on its own (with plurals, common synonyms and one-letter typos), and the rows come back RANKED, best first: the same ranking the MCP `find_tools` tool uses. `search.strong_matches` in the response says how many rows match strongly; the rest are looser matches, ranked below.
2074
+ */
2075
+ search?: string;
2076
+ /**
2077
+ * `all` lists every tool, including the ones that need a connector this workspace has not linked (`available: false`, with `connect_url`). Omit it for only the tools this workspace can call now. Tools that are not released to anyone are never listed.
2078
+ */
2079
+ include?: string;
2080
+ /**
2081
+ * 1-200, default 25. Each row carries a JSON Schema, so a large page is a large response.
2082
+ */
2083
+ limit?: number;
2084
+ /**
2085
+ * A tool name from a previous page; returns the page after it. An unknown cursor is an error, never a silent restart.
2086
+ */
2087
+ starting_after?: string;
2088
+ };
2089
+ url: '/v1/tools';
2090
+ };
2091
+ export type ListToolsErrors = {
2092
+ /**
2093
+ * Invalid request.
2094
+ */
2095
+ 400: Error;
2096
+ /**
2097
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2098
+ */
2099
+ 401: Error;
2100
+ /**
2101
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2102
+ */
2103
+ 404: Error;
2104
+ /**
2105
+ * Rate limited. `Retry-After` says how long to wait.
2106
+ */
2107
+ 429: Error;
2108
+ };
2109
+ export type ListToolsError = ListToolsErrors[keyof ListToolsErrors];
2110
+ export type ListToolsResponses = {
2111
+ /**
2112
+ * Success
2113
+ */
2114
+ 200: ToolList;
2115
+ };
2116
+ export type ListToolsResponse = ListToolsResponses[keyof ListToolsResponses];
2117
+ export type GetToolData = {
2118
+ body?: never;
2119
+ headers?: {
2120
+ /**
2121
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2122
+ */
2123
+ 'X-Hermoso-User'?: string;
2124
+ };
2125
+ path: {
2126
+ name: string;
2127
+ };
2128
+ query?: never;
2129
+ url: '/v1/tools/{name}';
2130
+ };
2131
+ export type GetToolErrors = {
2132
+ /**
2133
+ * Invalid request.
2134
+ */
2135
+ 400: Error;
2136
+ /**
2137
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2138
+ */
2139
+ 401: Error;
2140
+ /**
2141
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2142
+ */
2143
+ 404: Error;
2144
+ /**
2145
+ * Rate limited. `Retry-After` says how long to wait.
2146
+ */
2147
+ 429: Error;
2148
+ };
2149
+ export type GetToolError = GetToolErrors[keyof GetToolErrors];
2150
+ export type GetToolResponses = {
2151
+ /**
2152
+ * Success
2153
+ */
2154
+ 200: Tool;
2155
+ };
2156
+ export type GetToolResponse = GetToolResponses[keyof GetToolResponses];
2157
+ export type CallToolData = {
2158
+ body: ToolCall;
2159
+ headers?: {
2160
+ /**
2161
+ * An https:// URL to POST the outcome to, for a platform that cannot poll (for example Zapier `z.generateCallbackUrl()`). When the call queued a job, Hermoso POSTs the job resource — exactly what `GET /v1/jobs/{id}` answers — once the job is `done` or `error`, with headers `Hermoso-Event: job.done | job.error` and `Hermoso-Delivery` (also sent as `Idempotency-Key`; drop a repeat). A 2xx ends delivery; a 4xx other than 408, 425 and 429 is final; anything else is retried for about 16 hours. When the call finished inside the request, its response body is POSTed too (`Hermoso-Event: tool.result`). The response header `Hermoso-Callback` says what happened: `registered`, `sent`, `limit-reached` or `not-registered`. Nothing about what runs or what it costs changes: the URL is attached after the job is queued. A refusal is the HTTP error and nothing is POSTed. Must be https on a public host name; a replay with the same `Idempotency-Key` and a new URL adds that URL to the same job.
2162
+ */
2163
+ 'X-Hermoso-Callback-Url'?: string;
2164
+ /**
2165
+ * Send a unique value to make this call safe to retry. A replay returns the original response with `Idempotency-Replayed: true`, for 24 hours — except a call that queued a job, whose replay is that job as it is now (what `GET /v1/jobs/{id}` answers), so a finished render replays as done with its file.
2166
+ */
2167
+ 'Idempotency-Key'?: string;
2168
+ /**
2169
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2170
+ */
2171
+ 'X-Hermoso-User'?: string;
2172
+ };
2173
+ path: {
2174
+ name: string;
2175
+ };
2176
+ query?: {
2177
+ /**
2178
+ * The same as the `X-Hermoso-Callback-Url` header, for a client that cannot set headers. Prefer the header: a callback URL is a secret, and query strings are logged. A callback implies `wait=0` unless you send `wait` yourself.
2179
+ */
2180
+ callback_url?: string;
2181
+ /**
2182
+ * How long to hold this request while a render finishes. Only tools that render through the job queue are affected: video, avatars, template ads, post-production, and image generation (`generate_image` is queued as an image job whenever `wait` is sent, including `wait=0`). Every other tool answers as it always does. OMIT IT and nothing changes: a render is held for up to 45 seconds and then answered 200 with `data.stillRendering: true` and a `data.jobId`. `wait=0` (or `false`) answers 202 with a job handle the moment the job is queued, which is what a platform with a 30-second step limit wants. `wait=<seconds>` holds at most that long, capped at 45, and answers 202 if the render is not finished by then. Not waiting never changes what a render costs or whether it runs: the job is queued, checked against your balance and billed exactly as it is when you wait. Poll `GET /v1/jobs/{id}`.
2183
+ */
2184
+ wait?: string;
2185
+ };
2186
+ url: '/v1/tools/{name}';
2187
+ };
2188
+ export type CallToolErrors = {
2189
+ /**
2190
+ * Invalid request.
2191
+ */
2192
+ 400: Error;
2193
+ /**
2194
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2195
+ */
2196
+ 401: Error;
2197
+ /**
2198
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2199
+ */
2200
+ 404: Error;
2201
+ /**
2202
+ * Rate limited. `Retry-After` says how long to wait.
2203
+ */
2204
+ 429: Error;
2205
+ };
2206
+ export type CallToolError = CallToolErrors[keyof CallToolErrors];
2207
+ export type CallToolResponses = {
2208
+ /**
2209
+ * Success
2210
+ */
2211
+ 200: ToolResult;
2212
+ /**
2213
+ * Only when `wait` was sent: the render is queued or still running. Poll `poll` (also sent as the `Location` header) until `status` is `done` or `error`. Do NOT call the tool again to check on it, that starts and bills a second render.
2214
+ */
2215
+ 202: ToolJob;
2216
+ };
2217
+ export type CallToolResponse = CallToolResponses[keyof CallToolResponses];
2218
+ export type ListJobsData = {
2219
+ body?: never;
2220
+ headers?: {
2221
+ /**
2222
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2223
+ */
2224
+ 'X-Hermoso-User'?: string;
2225
+ };
2226
+ path?: never;
2227
+ query?: {
2228
+ /**
2229
+ * 1-100, default 25.
2230
+ */
2231
+ limit?: number;
2232
+ /**
2233
+ * A job id from a previous page; returns the page after it. An unknown cursor is an error, never a silent restart.
2234
+ */
2235
+ starting_after?: string;
2236
+ /**
2237
+ * Filter: queued, running, done, error.
2238
+ */
2239
+ status?: string;
2240
+ /**
2241
+ * Filter to one job type, e.g. video, stitch, avatar, templatead.
2242
+ */
2243
+ type?: string;
2244
+ };
2245
+ url: '/v1/jobs';
2246
+ };
2247
+ export type ListJobsErrors = {
2248
+ /**
2249
+ * Invalid request.
2250
+ */
2251
+ 400: Error;
2252
+ /**
2253
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2254
+ */
2255
+ 401: Error;
2256
+ /**
2257
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2258
+ */
2259
+ 404: Error;
2260
+ /**
2261
+ * Rate limited. `Retry-After` says how long to wait.
2262
+ */
2263
+ 429: Error;
2264
+ };
2265
+ export type ListJobsError = ListJobsErrors[keyof ListJobsErrors];
2266
+ export type ListJobsResponses = {
2267
+ /**
2268
+ * Success
2269
+ */
2270
+ 200: JobList;
2271
+ };
2272
+ export type ListJobsResponse = ListJobsResponses[keyof ListJobsResponses];
2273
+ export type GetJobData = {
2274
+ body?: never;
2275
+ headers?: {
2276
+ /**
2277
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2278
+ */
2279
+ 'X-Hermoso-User'?: string;
2280
+ };
2281
+ path: {
2282
+ id: string;
2283
+ };
2284
+ query?: never;
2285
+ url: '/v1/jobs/{id}';
2286
+ };
2287
+ export type GetJobErrors = {
2288
+ /**
2289
+ * Invalid request.
2290
+ */
2291
+ 400: Error;
2292
+ /**
2293
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2294
+ */
2295
+ 401: Error;
2296
+ /**
2297
+ * `error.code: job_not_found`: no job with that id on this account. Also `error.code: brand_not_found` when `X-Hermoso-User` names a profile this key cannot act on; `GET /v1/brands` lists the valid ids.
2298
+ */
2299
+ 404: Error;
2300
+ /**
2301
+ * Rate limited. `Retry-After` says how long to wait.
2302
+ */
2303
+ 429: Error;
2304
+ };
2305
+ export type GetJobError = GetJobErrors[keyof GetJobErrors];
2306
+ export type GetJobResponses = {
2307
+ /**
2308
+ * Success
2309
+ */
2310
+ 200: Job;
2311
+ };
2312
+ export type GetJobResponse = GetJobResponses[keyof GetJobResponses];
2313
+ export type CancelJobData = {
2314
+ body?: never;
2315
+ headers?: {
2316
+ /**
2317
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2318
+ */
2319
+ 'X-Hermoso-User'?: string;
2320
+ };
2321
+ path: {
2322
+ id: string;
2323
+ };
2324
+ query?: never;
2325
+ url: '/v1/jobs/{id}/cancel';
2326
+ };
2327
+ export type CancelJobErrors = {
2328
+ /**
2329
+ * Invalid request.
2330
+ */
2331
+ 400: Error;
2332
+ /**
2333
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2334
+ */
2335
+ 401: Error;
2336
+ /**
2337
+ * `error.code: job_not_found`: no job with that id on this account. Also `error.code: brand_not_found` when `X-Hermoso-User` names a profile this key cannot act on; `GET /v1/brands` lists the valid ids.
2338
+ */
2339
+ 404: Error;
2340
+ /**
2341
+ * `error.code: not_cancellable`: only image and video generations are cancelled here.
2342
+ */
2343
+ 409: Error;
2344
+ /**
2345
+ * Rate limited. `Retry-After` says how long to wait.
2346
+ */
2347
+ 429: Error;
2348
+ };
2349
+ export type CancelJobError = CancelJobErrors[keyof CancelJobErrors];
2350
+ export type CancelJobResponses = {
2351
+ /**
2352
+ * Success
2353
+ */
2354
+ 200: JobCancel;
2355
+ };
2356
+ export type CancelJobResponse = CancelJobResponses[keyof CancelJobResponses];
2357
+ export type ListBrandsData = {
2358
+ body?: never;
2359
+ headers?: {
2360
+ /**
2361
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2362
+ */
2363
+ 'X-Hermoso-User'?: string;
2364
+ };
2365
+ path?: never;
2366
+ query?: never;
2367
+ url: '/v1/brands';
2368
+ };
2369
+ export type ListBrandsErrors = {
2370
+ /**
2371
+ * Invalid request.
2372
+ */
2373
+ 400: Error;
2374
+ /**
2375
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2376
+ */
2377
+ 401: Error;
2378
+ /**
2379
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2380
+ */
2381
+ 404: Error;
2382
+ /**
2383
+ * Rate limited. `Retry-After` says how long to wait.
2384
+ */
2385
+ 429: Error;
2386
+ };
2387
+ export type ListBrandsError = ListBrandsErrors[keyof ListBrandsErrors];
2388
+ export type ListBrandsResponses = {
2389
+ /**
2390
+ * Success
2391
+ */
2392
+ 200: BrandList;
2393
+ };
2394
+ export type ListBrandsResponse = ListBrandsResponses[keyof ListBrandsResponses];
2395
+ export type QuoteGenerationData = {
2396
+ body: GenerationCreate;
2397
+ headers?: {
2398
+ /**
2399
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2400
+ */
2401
+ 'X-Hermoso-User'?: string;
2402
+ };
2403
+ path?: never;
2404
+ query?: never;
2405
+ url: '/v1/generations/quote';
2406
+ };
2407
+ export type QuoteGenerationErrors = {
2408
+ /**
2409
+ * Invalid request.
2410
+ */
2411
+ 400: Error;
2412
+ /**
2413
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2414
+ */
2415
+ 401: Error;
2416
+ /**
2417
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2418
+ */
2419
+ 404: Error;
2420
+ /**
2421
+ * Rate limited. `Retry-After` says how long to wait.
2422
+ */
2423
+ 429: Error;
2424
+ };
2425
+ export type QuoteGenerationError = QuoteGenerationErrors[keyof QuoteGenerationErrors];
2426
+ export type QuoteGenerationResponses = {
2427
+ /**
2428
+ * Success
2429
+ */
2430
+ 200: GenerationQuote;
2431
+ };
2432
+ export type QuoteGenerationResponse = QuoteGenerationResponses[keyof QuoteGenerationResponses];
2433
+ export type QuoteCloneData = {
2434
+ body: CloneQuoteRequest;
2435
+ headers?: {
2436
+ /**
2437
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2438
+ */
2439
+ 'X-Hermoso-User'?: string;
2440
+ };
2441
+ path?: never;
2442
+ query?: never;
2443
+ url: '/v1/clones/quote';
2444
+ };
2445
+ export type QuoteCloneErrors = {
2446
+ /**
2447
+ * Invalid request.
2448
+ */
2449
+ 400: Error;
2450
+ /**
2451
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2452
+ */
2453
+ 401: Error;
2454
+ /**
2455
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2456
+ */
2457
+ 404: Error;
2458
+ /**
2459
+ * Rate limited. `Retry-After` says how long to wait.
2460
+ */
2461
+ 429: Error;
2462
+ };
2463
+ export type QuoteCloneError = QuoteCloneErrors[keyof QuoteCloneErrors];
2464
+ export type QuoteCloneResponses = {
2465
+ /**
2466
+ * Success
2467
+ */
2468
+ 200: CloneQuote;
2469
+ };
2470
+ export type QuoteCloneResponse = QuoteCloneResponses[keyof QuoteCloneResponses];
2471
+ export type ListModelsData = {
2472
+ body?: never;
2473
+ headers?: {
2474
+ /**
2475
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2476
+ */
2477
+ 'X-Hermoso-User'?: string;
2478
+ };
2479
+ path?: never;
2480
+ query?: {
2481
+ /**
2482
+ * image or video (default both).
2483
+ */
2484
+ type?: string;
2485
+ /**
2486
+ * `credits`: cheapest first (an image by `credits`, a video by its cheapest length in `credits_by_duration`; a model with no list price last). Omit it for the catalog’s own order, featured models first.
2487
+ */
2488
+ sort?: string;
2489
+ };
2490
+ url: '/v1/models';
2491
+ };
2492
+ export type ListModelsErrors = {
2493
+ /**
2494
+ * Invalid request.
2495
+ */
2496
+ 400: Error;
2497
+ /**
2498
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2499
+ */
2500
+ 401: Error;
2501
+ /**
2502
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2503
+ */
2504
+ 404: Error;
2505
+ /**
2506
+ * Rate limited. `Retry-After` says how long to wait.
2507
+ */
2508
+ 429: Error;
2509
+ };
2510
+ export type ListModelsError = ListModelsErrors[keyof ListModelsErrors];
2511
+ export type ListModelsResponses = {
2512
+ /**
2513
+ * Success
2514
+ */
2515
+ 200: ModelList;
2516
+ };
2517
+ export type ListModelsResponse = ListModelsResponses[keyof ListModelsResponses];
2518
+ export type CreateGenerationData = {
2519
+ body: GenerationCreate;
2520
+ headers?: {
2521
+ /**
2522
+ * An https:// URL to POST the outcome to, for a platform that cannot poll (for example Zapier `z.generateCallbackUrl()`). When the call queued a job, Hermoso POSTs the job resource — exactly what `GET /v1/jobs/{id}` answers — once the job is `done` or `error`, with headers `Hermoso-Event: job.done | job.error` and `Hermoso-Delivery` (also sent as `Idempotency-Key`; drop a repeat). A 2xx ends delivery; a 4xx other than 408, 425 and 429 is final; anything else is retried for about 16 hours. When the call finished inside the request, its response body is POSTed too (`Hermoso-Event: tool.result`). The response header `Hermoso-Callback` says what happened: `registered`, `sent`, `limit-reached` or `not-registered`. Nothing about what runs or what it costs changes: the URL is attached after the job is queued. A refusal is the HTTP error and nothing is POSTed. Must be https on a public host name; a replay with the same `Idempotency-Key` and a new URL adds that URL to the same job.
2523
+ */
2524
+ 'X-Hermoso-Callback-Url'?: string;
2525
+ /**
2526
+ * Send a unique value to make this call safe to retry. A replay returns the original response with `Idempotency-Replayed: true`, for 24 hours — except a call that queued a job, whose replay is that job as it is now (what `GET /v1/jobs/{id}` answers), so a finished render replays as done with its file.
2527
+ */
2528
+ 'Idempotency-Key'?: string;
2529
+ /**
2530
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2531
+ */
2532
+ 'X-Hermoso-User'?: string;
2533
+ };
2534
+ path?: never;
2535
+ query?: {
2536
+ /**
2537
+ * The same as the `X-Hermoso-Callback-Url` header, for a client that cannot set headers. Prefer the header: a callback URL is a secret, and query strings are logged.
2538
+ */
2539
+ callback_url?: string;
2540
+ };
2541
+ url: '/v1/generations';
2542
+ };
2543
+ export type CreateGenerationErrors = {
2544
+ /**
2545
+ * Invalid request.
2546
+ */
2547
+ 400: Error;
2548
+ /**
2549
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2550
+ */
2551
+ 401: Error;
2552
+ /**
2553
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2554
+ */
2555
+ 404: Error;
2556
+ /**
2557
+ * Rate limited. `Retry-After` says how long to wait.
2558
+ */
2559
+ 429: Error;
2560
+ };
2561
+ export type CreateGenerationError = CreateGenerationErrors[keyof CreateGenerationErrors];
2562
+ export type CreateGenerationResponses = {
2563
+ /**
2564
+ * Success
2565
+ */
2566
+ 200: Job;
2567
+ /**
2568
+ * Queued. Poll `poll` (also sent as `Location`).
2569
+ */
2570
+ 202: Job;
2571
+ };
2572
+ export type CreateGenerationResponse = CreateGenerationResponses[keyof CreateGenerationResponses];
2573
+ export type CreateRecastData = {
2574
+ body: RecastCreate;
2575
+ headers?: {
2576
+ /**
2577
+ * An https:// URL to POST the outcome to, for a platform that cannot poll (for example Zapier `z.generateCallbackUrl()`). When the call queued a job, Hermoso POSTs the job resource — exactly what `GET /v1/jobs/{id}` answers — once the job is `done` or `error`, with headers `Hermoso-Event: job.done | job.error` and `Hermoso-Delivery` (also sent as `Idempotency-Key`; drop a repeat). A 2xx ends delivery; a 4xx other than 408, 425 and 429 is final; anything else is retried for about 16 hours. When the call finished inside the request, its response body is POSTed too (`Hermoso-Event: tool.result`). The response header `Hermoso-Callback` says what happened: `registered`, `sent`, `limit-reached` or `not-registered`. Nothing about what runs or what it costs changes: the URL is attached after the job is queued. A refusal is the HTTP error and nothing is POSTed. Must be https on a public host name; a replay with the same `Idempotency-Key` and a new URL adds that URL to the same job.
2578
+ */
2579
+ 'X-Hermoso-Callback-Url'?: string;
2580
+ /**
2581
+ * Send a unique value to make this call safe to retry. A replay returns the original response with `Idempotency-Replayed: true`, for 24 hours — except a call that queued a job, whose replay is that job as it is now (what `GET /v1/jobs/{id}` answers), so a finished render replays as done with its file.
2582
+ */
2583
+ 'Idempotency-Key'?: string;
2584
+ /**
2585
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2586
+ */
2587
+ 'X-Hermoso-User'?: string;
2588
+ };
2589
+ path?: never;
2590
+ query?: {
2591
+ /**
2592
+ * The same as the `X-Hermoso-Callback-Url` header or the body field, for a client that cannot set headers.
2593
+ */
2594
+ callback_url?: string;
2595
+ };
2596
+ url: '/v1/recasts';
2597
+ };
2598
+ export type CreateRecastErrors = {
2599
+ /**
2600
+ * Invalid request.
2601
+ */
2602
+ 400: Error;
2603
+ /**
2604
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2605
+ */
2606
+ 401: Error;
2607
+ /**
2608
+ * `insufficient_credits`: the balance does not cover `credits_needed` (nothing was started). `real_face_needs_paid`: a photo of a real person needs a paid plan or a credit pack (`upgrade_url`), or use `person.describe`.
2609
+ */
2610
+ 402: Error;
2611
+ /**
2612
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2613
+ */
2614
+ 404: Error;
2615
+ /**
2616
+ * `child_safety_blocked`: the request would put a child into sexual or sexualised content, so nothing ran (the only request Hermoso refuses itself; the video model's own refusals are passed through in plain words). `ref_unreadable`: a picture or link could not be opened.
2617
+ */
2618
+ 422: Error;
2619
+ /**
2620
+ * Rate limited. `Retry-After` says how long to wait.
2621
+ */
2622
+ 429: Error;
2623
+ };
2624
+ export type CreateRecastError = CreateRecastErrors[keyof CreateRecastErrors];
2625
+ export type CreateRecastResponses = {
2626
+ /**
2627
+ * Success
2628
+ */
2629
+ 200: Recast;
2630
+ /**
2631
+ * Queued. `job` is the job as it is now; poll `job.poll` (also sent as `Location`) until `status` is `done` (its `url` is the video) or `error`.
2632
+ */
2633
+ 202: Recast;
2634
+ };
2635
+ export type CreateRecastResponse = CreateRecastResponses[keyof CreateRecastResponses];
2636
+ export type CreateEditData = {
2637
+ body: EditCreate;
2638
+ headers?: {
2639
+ /**
2640
+ * An https:// URL to POST the outcome to, for a platform that cannot poll (for example Zapier `z.generateCallbackUrl()`). When the call queued a job, Hermoso POSTs the job resource — exactly what `GET /v1/jobs/{id}` answers — once the job is `done` or `error`, with headers `Hermoso-Event: job.done | job.error` and `Hermoso-Delivery` (also sent as `Idempotency-Key`; drop a repeat). A 2xx ends delivery; a 4xx other than 408, 425 and 429 is final; anything else is retried for about 16 hours. When the call finished inside the request, its response body is POSTed too (`Hermoso-Event: tool.result`). The response header `Hermoso-Callback` says what happened: `registered`, `sent`, `limit-reached` or `not-registered`. Nothing about what runs or what it costs changes: the URL is attached after the job is queued. A refusal is the HTTP error and nothing is POSTed. Must be https on a public host name; a replay with the same `Idempotency-Key` and a new URL adds that URL to the same job.
2641
+ */
2642
+ 'X-Hermoso-Callback-Url'?: string;
2643
+ /**
2644
+ * Send a unique value to make this call safe to retry. A replay returns the original response with `Idempotency-Replayed: true`, for 24 hours — except a call that queued a job, whose replay is that job as it is now (what `GET /v1/jobs/{id}` answers), so a finished render replays as done with its file.
2645
+ */
2646
+ 'Idempotency-Key'?: string;
2647
+ /**
2648
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2649
+ */
2650
+ 'X-Hermoso-User'?: string;
2651
+ };
2652
+ path?: never;
2653
+ query?: {
2654
+ /**
2655
+ * The same as the `X-Hermoso-Callback-Url` header or the body field, for a client that cannot set headers.
2656
+ */
2657
+ callback_url?: string;
2658
+ };
2659
+ url: '/v1/edits';
2660
+ };
2661
+ export type CreateEditErrors = {
2662
+ /**
2663
+ * Invalid request.
2664
+ */
2665
+ 400: Error;
2666
+ /**
2667
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2668
+ */
2669
+ 401: Error;
2670
+ /**
2671
+ * `insufficient_credits`: the balance does not cover `credits_needed`. Nothing was started.
2672
+ */
2673
+ 402: Error;
2674
+ /**
2675
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2676
+ */
2677
+ 404: Error;
2678
+ /**
2679
+ * Rate limited. `Retry-After` says how long to wait.
2680
+ */
2681
+ 429: Error;
2682
+ };
2683
+ export type CreateEditError = CreateEditErrors[keyof CreateEditErrors];
2684
+ export type CreateEditResponses = {
2685
+ /**
2686
+ * Success
2687
+ */
2688
+ 200: Edit;
2689
+ /**
2690
+ * Queued. Poll `job.poll` (also sent as `Location`) until `status` is `done` (its `url` is the edited clip) or `error`.
2691
+ */
2692
+ 202: Edit;
2693
+ };
2694
+ export type CreateEditResponse = CreateEditResponses[keyof CreateEditResponses];
2695
+ export type ListLibraryData = {
2696
+ body?: never;
2697
+ headers?: {
2698
+ /**
2699
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2700
+ */
2701
+ 'X-Hermoso-User'?: string;
2702
+ };
2703
+ path?: never;
2704
+ query?: {
2705
+ /**
2706
+ * image, video or all (default all).
2707
+ */
2708
+ type?: string;
2709
+ /**
2710
+ * 1-60, default 30.
2711
+ */
2712
+ limit?: number;
2713
+ };
2714
+ url: '/v1/library';
2715
+ };
2716
+ export type ListLibraryErrors = {
2717
+ /**
2718
+ * Invalid request.
2719
+ */
2720
+ 400: Error;
2721
+ /**
2722
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2723
+ */
2724
+ 401: Error;
2725
+ /**
2726
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2727
+ */
2728
+ 404: Error;
2729
+ /**
2730
+ * Rate limited. `Retry-After` says how long to wait.
2731
+ */
2732
+ 429: Error;
2733
+ };
2734
+ export type ListLibraryError = ListLibraryErrors[keyof ListLibraryErrors];
2735
+ export type ListLibraryResponses = {
2736
+ /**
2737
+ * Success
2738
+ */
2739
+ 200: AssetList;
2740
+ };
2741
+ export type ListLibraryResponse = ListLibraryResponses[keyof ListLibraryResponses];
2742
+ export type GetMediaContentData = {
2743
+ body?: never;
2744
+ headers?: {
2745
+ /**
2746
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2747
+ */
2748
+ 'X-Hermoso-User'?: string;
2749
+ };
2750
+ path?: never;
2751
+ query?: {
2752
+ /**
2753
+ * A Hermoso-hosted file URL.
2754
+ */
2755
+ url?: string;
2756
+ };
2757
+ url: '/v1/media/content';
2758
+ };
2759
+ export type GetMediaContentErrors = {
2760
+ /**
2761
+ * Invalid request.
2762
+ */
2763
+ 400: Error;
2764
+ /**
2765
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2766
+ */
2767
+ 401: Error;
2768
+ /**
2769
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2770
+ */
2771
+ 404: Error;
2772
+ /**
2773
+ * Rate limited. `Retry-After` says how long to wait.
2774
+ */
2775
+ 429: Error;
2776
+ };
2777
+ export type GetMediaContentError = GetMediaContentErrors[keyof GetMediaContentErrors];
2778
+ export type GetMediaContentResponses = {
2779
+ /**
2780
+ * Success
2781
+ */
2782
+ 200: Binary;
2783
+ };
2784
+ export type GetMediaContentResponse = GetMediaContentResponses[keyof GetMediaContentResponses];
2785
+ export type CreateSignupData = {
2786
+ body: SignupCreate;
2787
+ path?: never;
2788
+ query?: never;
2789
+ url: '/v1/signup';
2790
+ };
2791
+ export type CreateSignupErrors = {
2792
+ /**
2793
+ * Invalid request.
2794
+ */
2795
+ 400: Error;
2796
+ /**
2797
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2798
+ */
2799
+ 401: Error;
2800
+ /**
2801
+ * Rate limited. `Retry-After` says how long to wait.
2802
+ */
2803
+ 429: Error;
2804
+ };
2805
+ export type CreateSignupError = CreateSignupErrors[keyof CreateSignupErrors];
2806
+ export type CreateSignupResponses = {
2807
+ /**
2808
+ * Success
2809
+ */
2810
+ 200: Signup;
2811
+ };
2812
+ export type CreateSignupResponse = CreateSignupResponses[keyof CreateSignupResponses];
2813
+ export type ClaimSignupData = {
2814
+ body: SignupClaim;
2815
+ path: {
2816
+ /**
2817
+ * The `id` from POST /v1/signup (a Stripe Checkout session id).
2818
+ */
2819
+ id: string;
2820
+ };
2821
+ query?: never;
2822
+ url: '/v1/signup/{id}/claim';
2823
+ };
2824
+ export type ClaimSignupErrors = {
2825
+ /**
2826
+ * Invalid request.
2827
+ */
2828
+ 400: Error;
2829
+ /**
2830
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2831
+ */
2832
+ 401: Error;
2833
+ /**
2834
+ * Rate limited. `Retry-After` says how long to wait.
2835
+ */
2836
+ 429: Error;
2837
+ };
2838
+ export type ClaimSignupError = ClaimSignupErrors[keyof ClaimSignupErrors];
2839
+ export type ClaimSignupResponses = {
2840
+ /**
2841
+ * Success
2842
+ */
2843
+ 200: Signup;
2844
+ };
2845
+ export type ClaimSignupResponse = ClaimSignupResponses[keyof ClaimSignupResponses];
2846
+ export type GetConnectRedirectsData = {
2847
+ body?: never;
2848
+ headers?: {
2849
+ /**
2850
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2851
+ */
2852
+ 'X-Hermoso-User'?: string;
2853
+ };
2854
+ path?: never;
2855
+ query?: never;
2856
+ url: '/v1/connect-redirects';
2857
+ };
2858
+ export type GetConnectRedirectsErrors = {
2859
+ /**
2860
+ * Invalid request.
2861
+ */
2862
+ 400: Error;
2863
+ /**
2864
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2865
+ */
2866
+ 401: Error;
2867
+ /**
2868
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2869
+ */
2870
+ 404: Error;
2871
+ /**
2872
+ * Rate limited. `Retry-After` says how long to wait.
2873
+ */
2874
+ 429: Error;
2875
+ };
2876
+ export type GetConnectRedirectsError = GetConnectRedirectsErrors[keyof GetConnectRedirectsErrors];
2877
+ export type GetConnectRedirectsResponses = {
2878
+ /**
2879
+ * Success
2880
+ */
2881
+ 200: ConnectRedirects;
2882
+ };
2883
+ export type GetConnectRedirectsResponse = GetConnectRedirectsResponses[keyof GetConnectRedirectsResponses];
2884
+ export type SetConnectRedirectsData = {
2885
+ body: ConnectRedirectsSet;
2886
+ headers?: {
2887
+ /**
2888
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2889
+ */
2890
+ 'X-Hermoso-User'?: string;
2891
+ };
2892
+ path?: never;
2893
+ query?: never;
2894
+ url: '/v1/connect-redirects';
2895
+ };
2896
+ export type SetConnectRedirectsErrors = {
2897
+ /**
2898
+ * Invalid request.
2899
+ */
2900
+ 400: Error;
2901
+ /**
2902
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2903
+ */
2904
+ 401: Error;
2905
+ /**
2906
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2907
+ */
2908
+ 404: Error;
2909
+ /**
2910
+ * Rate limited. `Retry-After` says how long to wait.
2911
+ */
2912
+ 429: Error;
2913
+ };
2914
+ export type SetConnectRedirectsError = SetConnectRedirectsErrors[keyof SetConnectRedirectsErrors];
2915
+ export type SetConnectRedirectsResponses = {
2916
+ /**
2917
+ * Success
2918
+ */
2919
+ 200: ConnectRedirects;
2920
+ };
2921
+ export type SetConnectRedirectsResponse = SetConnectRedirectsResponses[keyof SetConnectRedirectsResponses];
2922
+ export type CreateConnectLinkData = {
2923
+ body: ConnectLinkCreate;
2924
+ headers?: {
2925
+ /**
2926
+ * Send a unique value to make this call safe to retry. A replay returns the original response with `Idempotency-Replayed: true`, for 24 hours — except a call that queued a job, whose replay is that job as it is now (what `GET /v1/jobs/{id}` answers), so a finished render replays as done with its file.
2927
+ */
2928
+ 'Idempotency-Key'?: string;
2929
+ /**
2930
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2931
+ */
2932
+ 'X-Hermoso-User'?: string;
2933
+ };
2934
+ path?: never;
2935
+ query?: never;
2936
+ url: '/v1/connect-links';
2937
+ };
2938
+ export type CreateConnectLinkErrors = {
2939
+ /**
2940
+ * Invalid request.
2941
+ */
2942
+ 400: Error;
2943
+ /**
2944
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2945
+ */
2946
+ 401: Error;
2947
+ /**
2948
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2949
+ */
2950
+ 404: Error;
2951
+ /**
2952
+ * Rate limited. `Retry-After` says how long to wait.
2953
+ */
2954
+ 429: Error;
2955
+ };
2956
+ export type CreateConnectLinkError = CreateConnectLinkErrors[keyof CreateConnectLinkErrors];
2957
+ export type CreateConnectLinkResponses = {
2958
+ /**
2959
+ * Success
2960
+ */
2961
+ 200: ConnectLink;
2962
+ };
2963
+ export type CreateConnectLinkResponse = CreateConnectLinkResponses[keyof CreateConnectLinkResponses];
2964
+ export type RevokeConnectLinkData = {
2965
+ body?: never;
2966
+ headers?: {
2967
+ /**
2968
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
2969
+ */
2970
+ 'X-Hermoso-User'?: string;
2971
+ };
2972
+ path: {
2973
+ id: string;
2974
+ };
2975
+ query?: never;
2976
+ url: '/v1/connect-links/{id}';
2977
+ };
2978
+ export type RevokeConnectLinkErrors = {
2979
+ /**
2980
+ * Invalid request.
2981
+ */
2982
+ 400: Error;
2983
+ /**
2984
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
2985
+ */
2986
+ 401: Error;
2987
+ /**
2988
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
2989
+ */
2990
+ 404: Error;
2991
+ /**
2992
+ * Rate limited. `Retry-After` says how long to wait.
2993
+ */
2994
+ 429: Error;
2995
+ };
2996
+ export type RevokeConnectLinkError = RevokeConnectLinkErrors[keyof RevokeConnectLinkErrors];
2997
+ export type RevokeConnectLinkResponses = {
2998
+ /**
2999
+ * Success
3000
+ */
3001
+ 200: ConnectLink;
3002
+ };
3003
+ export type RevokeConnectLinkResponse = RevokeConnectLinkResponses[keyof RevokeConnectLinkResponses];
3004
+ export type GetConnectLinkData = {
3005
+ body?: never;
3006
+ headers?: {
3007
+ /**
3008
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3009
+ */
3010
+ 'X-Hermoso-User'?: string;
3011
+ };
3012
+ path: {
3013
+ id: string;
3014
+ };
3015
+ query?: never;
3016
+ url: '/v1/connect-links/{id}';
3017
+ };
3018
+ export type GetConnectLinkErrors = {
3019
+ /**
3020
+ * Invalid request.
3021
+ */
3022
+ 400: Error;
3023
+ /**
3024
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3025
+ */
3026
+ 401: Error;
3027
+ /**
3028
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3029
+ */
3030
+ 404: Error;
3031
+ /**
3032
+ * Rate limited. `Retry-After` says how long to wait.
3033
+ */
3034
+ 429: Error;
3035
+ };
3036
+ export type GetConnectLinkError = GetConnectLinkErrors[keyof GetConnectLinkErrors];
3037
+ export type GetConnectLinkResponses = {
3038
+ /**
3039
+ * Success
3040
+ */
3041
+ 200: ConnectLink;
3042
+ };
3043
+ export type GetConnectLinkResponse = GetConnectLinkResponses[keyof GetConnectLinkResponses];
3044
+ export type ListConnectionsData = {
3045
+ body?: never;
3046
+ headers?: {
3047
+ /**
3048
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3049
+ */
3050
+ 'X-Hermoso-User'?: string;
3051
+ };
3052
+ path?: never;
3053
+ query?: never;
3054
+ url: '/v1/connections';
3055
+ };
3056
+ export type ListConnectionsErrors = {
3057
+ /**
3058
+ * Invalid request.
3059
+ */
3060
+ 400: Error;
3061
+ /**
3062
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3063
+ */
3064
+ 401: Error;
3065
+ /**
3066
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3067
+ */
3068
+ 404: Error;
3069
+ /**
3070
+ * Rate limited. `Retry-After` says how long to wait.
3071
+ */
3072
+ 429: Error;
3073
+ };
3074
+ export type ListConnectionsError = ListConnectionsErrors[keyof ListConnectionsErrors];
3075
+ export type ListConnectionsResponses = {
3076
+ /**
3077
+ * Success
3078
+ */
3079
+ 200: ConnectionList;
3080
+ };
3081
+ export type ListConnectionsResponse = ListConnectionsResponses[keyof ListConnectionsResponses];
3082
+ export type DeleteConnectionData = {
3083
+ body?: never;
3084
+ headers?: {
3085
+ /**
3086
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3087
+ */
3088
+ 'X-Hermoso-User'?: string;
3089
+ };
3090
+ path: {
3091
+ provider: string;
3092
+ };
3093
+ query?: {
3094
+ /**
3095
+ * On a channel with several connected accounts: the @handle or id of the one to remove.
3096
+ */
3097
+ account?: string;
3098
+ };
3099
+ url: '/v1/connections/{provider}';
3100
+ };
3101
+ export type DeleteConnectionErrors = {
3102
+ /**
3103
+ * Invalid request.
3104
+ */
3105
+ 400: Error;
3106
+ /**
3107
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3108
+ */
3109
+ 401: Error;
3110
+ /**
3111
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3112
+ */
3113
+ 404: Error;
3114
+ /**
3115
+ * Rate limited. `Retry-After` says how long to wait.
3116
+ */
3117
+ 429: Error;
3118
+ };
3119
+ export type DeleteConnectionError = DeleteConnectionErrors[keyof DeleteConnectionErrors];
3120
+ export type DeleteConnectionResponses = {
3121
+ /**
3122
+ * Success
3123
+ */
3124
+ 200: ConnectionDeleted;
3125
+ };
3126
+ export type DeleteConnectionResponse = DeleteConnectionResponses[keyof DeleteConnectionResponses];
3127
+ export type ListConversionEventsData = {
3128
+ body?: never;
3129
+ headers?: {
3130
+ /**
3131
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3132
+ */
3133
+ 'X-Hermoso-User'?: string;
3134
+ };
3135
+ path?: never;
3136
+ query?: {
3137
+ /**
3138
+ * YYYY-MM-DD, on the event time.
3139
+ */
3140
+ from?: string;
3141
+ /**
3142
+ * YYYY-MM-DD, inclusive.
3143
+ */
3144
+ to?: string;
3145
+ /**
3146
+ * Only this event name.
3147
+ */
3148
+ event_name?: string;
3149
+ /**
3150
+ * Only this source.
3151
+ */
3152
+ source?: string;
3153
+ /**
3154
+ * Only events sent to this platform.
3155
+ */
3156
+ platform?: string;
3157
+ /**
3158
+ * sent or failed.
3159
+ */
3160
+ delivery_status?: string;
3161
+ /**
3162
+ * Only events tied to this campaign.
3163
+ */
3164
+ campaign_id?: string;
3165
+ /**
3166
+ * 1-200, default 50.
3167
+ */
3168
+ limit?: number;
3169
+ /**
3170
+ * `next_cursor` from the previous page.
3171
+ */
3172
+ cursor?: string;
3173
+ };
3174
+ url: '/v1/events';
3175
+ };
3176
+ export type ListConversionEventsErrors = {
3177
+ /**
3178
+ * Invalid request.
3179
+ */
3180
+ 400: Error;
3181
+ /**
3182
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3183
+ */
3184
+ 401: Error;
3185
+ /**
3186
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3187
+ */
3188
+ 404: Error;
3189
+ /**
3190
+ * Rate limited. `Retry-After` says how long to wait.
3191
+ */
3192
+ 429: Error;
3193
+ };
3194
+ export type ListConversionEventsError = ListConversionEventsErrors[keyof ListConversionEventsErrors];
3195
+ export type ListConversionEventsResponses = {
3196
+ /**
3197
+ * Success
3198
+ */
3199
+ 200: ConversionEventList;
3200
+ };
3201
+ export type ListConversionEventsResponse = ListConversionEventsResponses[keyof ListConversionEventsResponses];
3202
+ export type SendConversionEventsData = {
3203
+ body: ConversionEventsSend;
3204
+ headers?: {
3205
+ /**
3206
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3207
+ */
3208
+ 'X-Hermoso-User'?: string;
3209
+ };
3210
+ path?: never;
3211
+ query?: never;
3212
+ url: '/v1/events';
3213
+ };
3214
+ export type SendConversionEventsErrors = {
3215
+ /**
3216
+ * Invalid request.
3217
+ */
3218
+ 400: Error;
3219
+ /**
3220
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3221
+ */
3222
+ 401: Error;
3223
+ /**
3224
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3225
+ */
3226
+ 404: Error;
3227
+ /**
3228
+ * Rate limited. `Retry-After` says how long to wait.
3229
+ */
3230
+ 429: Error;
3231
+ };
3232
+ export type SendConversionEventsError = SendConversionEventsErrors[keyof SendConversionEventsErrors];
3233
+ export type SendConversionEventsResponses = {
3234
+ /**
3235
+ * Success
3236
+ */
3237
+ 200: ConversionSendResult;
3238
+ };
3239
+ export type SendConversionEventsResponse = SendConversionEventsResponses[keyof SendConversionEventsResponses];
3240
+ export type ListConversionDestinationsData = {
3241
+ body?: never;
3242
+ headers?: {
3243
+ /**
3244
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3245
+ */
3246
+ 'X-Hermoso-User'?: string;
3247
+ };
3248
+ path?: never;
3249
+ query?: never;
3250
+ url: '/v1/events/destinations';
3251
+ };
3252
+ export type ListConversionDestinationsErrors = {
3253
+ /**
3254
+ * Invalid request.
3255
+ */
3256
+ 400: Error;
3257
+ /**
3258
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3259
+ */
3260
+ 401: Error;
3261
+ /**
3262
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3263
+ */
3264
+ 404: Error;
3265
+ /**
3266
+ * Rate limited. `Retry-After` says how long to wait.
3267
+ */
3268
+ 429: Error;
3269
+ };
3270
+ export type ListConversionDestinationsError = ListConversionDestinationsErrors[keyof ListConversionDestinationsErrors];
3271
+ export type ListConversionDestinationsResponses = {
3272
+ /**
3273
+ * Success
3274
+ */
3275
+ 200: ConversionDestinationList;
3276
+ };
3277
+ export type ListConversionDestinationsResponse = ListConversionDestinationsResponses[keyof ListConversionDestinationsResponses];
3278
+ export type CreateConversionDestinationData = {
3279
+ body: ConversionDestinationCreate;
3280
+ headers?: {
3281
+ /**
3282
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3283
+ */
3284
+ 'X-Hermoso-User'?: string;
3285
+ };
3286
+ path?: never;
3287
+ query?: never;
3288
+ url: '/v1/events/destinations';
3289
+ };
3290
+ export type CreateConversionDestinationErrors = {
3291
+ /**
3292
+ * Invalid request.
3293
+ */
3294
+ 400: Error;
3295
+ /**
3296
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3297
+ */
3298
+ 401: Error;
3299
+ /**
3300
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3301
+ */
3302
+ 404: Error;
3303
+ /**
3304
+ * Rate limited. `Retry-After` says how long to wait.
3305
+ */
3306
+ 429: Error;
3307
+ };
3308
+ export type CreateConversionDestinationError = CreateConversionDestinationErrors[keyof CreateConversionDestinationErrors];
3309
+ export type CreateConversionDestinationResponses = {
3310
+ /**
3311
+ * Success
3312
+ */
3313
+ 200: ConversionDestinationResult;
3314
+ };
3315
+ export type CreateConversionDestinationResponse = CreateConversionDestinationResponses[keyof CreateConversionDestinationResponses];
3316
+ export type DeleteConversionDestinationData = {
3317
+ body?: never;
3318
+ headers?: {
3319
+ /**
3320
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3321
+ */
3322
+ 'X-Hermoso-User'?: string;
3323
+ };
3324
+ path: {
3325
+ id: string;
3326
+ };
3327
+ query?: never;
3328
+ url: '/v1/events/destinations/{id}';
3329
+ };
3330
+ export type DeleteConversionDestinationErrors = {
3331
+ /**
3332
+ * Invalid request.
3333
+ */
3334
+ 400: Error;
3335
+ /**
3336
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3337
+ */
3338
+ 401: Error;
3339
+ /**
3340
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3341
+ */
3342
+ 404: Error;
3343
+ /**
3344
+ * Rate limited. `Retry-After` says how long to wait.
3345
+ */
3346
+ 429: Error;
3347
+ };
3348
+ export type DeleteConversionDestinationError = DeleteConversionDestinationErrors[keyof DeleteConversionDestinationErrors];
3349
+ export type DeleteConversionDestinationResponses = {
3350
+ /**
3351
+ * Success
3352
+ */
3353
+ 200: ConversionDestinationResult;
3354
+ };
3355
+ export type DeleteConversionDestinationResponse = DeleteConversionDestinationResponses[keyof DeleteConversionDestinationResponses];
3356
+ export type GetConversionJourneyData = {
3357
+ body?: never;
3358
+ headers?: {
3359
+ /**
3360
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3361
+ */
3362
+ 'X-Hermoso-User'?: string;
3363
+ };
3364
+ path?: never;
3365
+ query?: {
3366
+ customer?: string;
3367
+ email?: string;
3368
+ phone?: string;
3369
+ external_id?: string;
3370
+ visitor_id?: string;
3371
+ };
3372
+ url: '/v1/events/journey';
3373
+ };
3374
+ export type GetConversionJourneyErrors = {
3375
+ /**
3376
+ * Invalid request.
3377
+ */
3378
+ 400: Error;
3379
+ /**
3380
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3381
+ */
3382
+ 401: Error;
3383
+ /**
3384
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3385
+ */
3386
+ 404: Error;
3387
+ /**
3388
+ * Rate limited. `Retry-After` says how long to wait.
3389
+ */
3390
+ 429: Error;
3391
+ };
3392
+ export type GetConversionJourneyError = GetConversionJourneyErrors[keyof GetConversionJourneyErrors];
3393
+ export type GetConversionJourneyResponses = {
3394
+ /**
3395
+ * Success
3396
+ */
3397
+ 200: ConversionInsights;
3398
+ };
3399
+ export type GetConversionJourneyResponse = GetConversionJourneyResponses[keyof GetConversionJourneyResponses];
3400
+ export type ListConversionCustomersData = {
3401
+ body?: never;
3402
+ headers?: {
3403
+ /**
3404
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3405
+ */
3406
+ 'X-Hermoso-User'?: string;
3407
+ };
3408
+ path?: never;
3409
+ query?: {
3410
+ from?: string;
3411
+ to?: string;
3412
+ limit?: number;
3413
+ };
3414
+ url: '/v1/events/customers';
3415
+ };
3416
+ export type ListConversionCustomersErrors = {
3417
+ /**
3418
+ * Invalid request.
3419
+ */
3420
+ 400: Error;
3421
+ /**
3422
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3423
+ */
3424
+ 401: Error;
3425
+ /**
3426
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3427
+ */
3428
+ 404: Error;
3429
+ /**
3430
+ * Rate limited. `Retry-After` says how long to wait.
3431
+ */
3432
+ 429: Error;
3433
+ };
3434
+ export type ListConversionCustomersError = ListConversionCustomersErrors[keyof ListConversionCustomersErrors];
3435
+ export type ListConversionCustomersResponses = {
3436
+ /**
3437
+ * Success
3438
+ */
3439
+ 200: ConversionInsights;
3440
+ };
3441
+ export type ListConversionCustomersResponse = ListConversionCustomersResponses[keyof ListConversionCustomersResponses];
3442
+ export type ListConversionPathsData = {
3443
+ body?: never;
3444
+ headers?: {
3445
+ /**
3446
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3447
+ */
3448
+ 'X-Hermoso-User'?: string;
3449
+ };
3450
+ path?: never;
3451
+ query?: {
3452
+ from?: string;
3453
+ to?: string;
3454
+ limit?: number;
3455
+ };
3456
+ url: '/v1/events/paths';
3457
+ };
3458
+ export type ListConversionPathsErrors = {
3459
+ /**
3460
+ * Invalid request.
3461
+ */
3462
+ 400: Error;
3463
+ /**
3464
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3465
+ */
3466
+ 401: Error;
3467
+ /**
3468
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3469
+ */
3470
+ 404: Error;
3471
+ /**
3472
+ * Rate limited. `Retry-After` says how long to wait.
3473
+ */
3474
+ 429: Error;
3475
+ };
3476
+ export type ListConversionPathsError = ListConversionPathsErrors[keyof ListConversionPathsErrors];
3477
+ export type ListConversionPathsResponses = {
3478
+ /**
3479
+ * Success
3480
+ */
3481
+ 200: ConversionInsights;
3482
+ };
3483
+ export type ListConversionPathsResponse = ListConversionPathsResponses[keyof ListConversionPathsResponses];
3484
+ export type GetConversionLtvData = {
3485
+ body?: never;
3486
+ headers?: {
3487
+ /**
3488
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3489
+ */
3490
+ 'X-Hermoso-User'?: string;
3491
+ };
3492
+ path?: never;
3493
+ query?: {
3494
+ /**
3495
+ * YYYY-MM
3496
+ */
3497
+ from_month?: string;
3498
+ /**
3499
+ * YYYY-MM
3500
+ */
3501
+ to_month?: string;
3502
+ };
3503
+ url: '/v1/events/ltv';
3504
+ };
3505
+ export type GetConversionLtvErrors = {
3506
+ /**
3507
+ * Invalid request.
3508
+ */
3509
+ 400: Error;
3510
+ /**
3511
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3512
+ */
3513
+ 401: Error;
3514
+ /**
3515
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3516
+ */
3517
+ 404: Error;
3518
+ /**
3519
+ * Rate limited. `Retry-After` says how long to wait.
3520
+ */
3521
+ 429: Error;
3522
+ };
3523
+ export type GetConversionLtvError = GetConversionLtvErrors[keyof GetConversionLtvErrors];
3524
+ export type GetConversionLtvResponses = {
3525
+ /**
3526
+ * Success
3527
+ */
3528
+ 200: ConversionInsights;
3529
+ };
3530
+ export type GetConversionLtvResponse = GetConversionLtvResponses[keyof GetConversionLtvResponses];
3531
+ export type GetConversionAccuracyData = {
3532
+ body?: never;
3533
+ headers?: {
3534
+ /**
3535
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3536
+ */
3537
+ 'X-Hermoso-User'?: string;
3538
+ };
3539
+ path?: never;
3540
+ query?: {
3541
+ from?: string;
3542
+ to?: string;
3543
+ };
3544
+ url: '/v1/events/accuracy';
3545
+ };
3546
+ export type GetConversionAccuracyErrors = {
3547
+ /**
3548
+ * Invalid request.
3549
+ */
3550
+ 400: Error;
3551
+ /**
3552
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3553
+ */
3554
+ 401: Error;
3555
+ /**
3556
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3557
+ */
3558
+ 404: Error;
3559
+ /**
3560
+ * Rate limited. `Retry-After` says how long to wait.
3561
+ */
3562
+ 429: Error;
3563
+ };
3564
+ export type GetConversionAccuracyError = GetConversionAccuracyErrors[keyof GetConversionAccuracyErrors];
3565
+ export type GetConversionAccuracyResponses = {
3566
+ /**
3567
+ * Success
3568
+ */
3569
+ 200: ConversionInsights;
3570
+ };
3571
+ export type GetConversionAccuracyResponse = GetConversionAccuracyResponses[keyof GetConversionAccuracyResponses];
3572
+ export type RetractConversionEventData = {
3573
+ body?: never;
3574
+ headers?: {
3575
+ /**
3576
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3577
+ */
3578
+ 'X-Hermoso-User'?: string;
3579
+ };
3580
+ path: {
3581
+ event_id: string;
3582
+ };
3583
+ query?: {
3584
+ /**
3585
+ * Which copy, when one id was stored under two names.
3586
+ */
3587
+ event_name?: string;
3588
+ };
3589
+ url: '/v1/events/{event_id}';
3590
+ };
3591
+ export type RetractConversionEventErrors = {
3592
+ /**
3593
+ * Invalid request.
3594
+ */
3595
+ 400: Error;
3596
+ /**
3597
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3598
+ */
3599
+ 401: Error;
3600
+ /**
3601
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3602
+ */
3603
+ 404: Error;
3604
+ /**
3605
+ * Rate limited. `Retry-After` says how long to wait.
3606
+ */
3607
+ 429: Error;
3608
+ };
3609
+ export type RetractConversionEventError = RetractConversionEventErrors[keyof RetractConversionEventErrors];
3610
+ export type RetractConversionEventResponses = {
3611
+ /**
3612
+ * Success
3613
+ */
3614
+ 200: ConversionEventList;
3615
+ };
3616
+ export type RetractConversionEventResponse = RetractConversionEventResponses[keyof RetractConversionEventResponses];
3617
+ export type GetConversionEventData = {
3618
+ body?: never;
3619
+ headers?: {
3620
+ /**
3621
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3622
+ */
3623
+ 'X-Hermoso-User'?: string;
3624
+ };
3625
+ path: {
3626
+ event_id: string;
3627
+ };
3628
+ query?: never;
3629
+ url: '/v1/events/{event_id}';
3630
+ };
3631
+ export type GetConversionEventErrors = {
3632
+ /**
3633
+ * Invalid request.
3634
+ */
3635
+ 400: Error;
3636
+ /**
3637
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3638
+ */
3639
+ 401: Error;
3640
+ /**
3641
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3642
+ */
3643
+ 404: Error;
3644
+ /**
3645
+ * Rate limited. `Retry-After` says how long to wait.
3646
+ */
3647
+ 429: Error;
3648
+ };
3649
+ export type GetConversionEventError = GetConversionEventErrors[keyof GetConversionEventErrors];
3650
+ export type GetConversionEventResponses = {
3651
+ /**
3652
+ * Success
3653
+ */
3654
+ 200: ConversionEventList;
3655
+ };
3656
+ export type GetConversionEventResponse = GetConversionEventResponses[keyof GetConversionEventResponses];
3657
+ export type UpdateConversionEventData = {
3658
+ body: ConversionEventUpdate;
3659
+ headers?: {
3660
+ /**
3661
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3662
+ */
3663
+ 'X-Hermoso-User'?: string;
3664
+ };
3665
+ path: {
3666
+ event_id: string;
3667
+ };
3668
+ query?: never;
3669
+ url: '/v1/events/{event_id}';
3670
+ };
3671
+ export type UpdateConversionEventErrors = {
3672
+ /**
3673
+ * Invalid request.
3674
+ */
3675
+ 400: Error;
3676
+ /**
3677
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3678
+ */
3679
+ 401: Error;
3680
+ /**
3681
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3682
+ */
3683
+ 404: Error;
3684
+ /**
3685
+ * Rate limited. `Retry-After` says how long to wait.
3686
+ */
3687
+ 429: Error;
3688
+ };
3689
+ export type UpdateConversionEventError = UpdateConversionEventErrors[keyof UpdateConversionEventErrors];
3690
+ export type UpdateConversionEventResponses = {
3691
+ /**
3692
+ * Success
3693
+ */
3694
+ 200: ConversionEventList;
3695
+ };
3696
+ export type UpdateConversionEventResponse = UpdateConversionEventResponses[keyof UpdateConversionEventResponses];
3697
+ export type ListCampaignResultsData = {
3698
+ body?: never;
3699
+ headers?: {
3700
+ /**
3701
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3702
+ */
3703
+ 'X-Hermoso-User'?: string;
3704
+ };
3705
+ path?: never;
3706
+ query?: {
3707
+ from?: string;
3708
+ to?: string;
3709
+ };
3710
+ url: '/v1/campaign-results';
3711
+ };
3712
+ export type ListCampaignResultsErrors = {
3713
+ /**
3714
+ * Invalid request.
3715
+ */
3716
+ 400: Error;
3717
+ /**
3718
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3719
+ */
3720
+ 401: Error;
3721
+ /**
3722
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3723
+ */
3724
+ 404: Error;
3725
+ /**
3726
+ * Rate limited. `Retry-After` says how long to wait.
3727
+ */
3728
+ 429: Error;
3729
+ };
3730
+ export type ListCampaignResultsError = ListCampaignResultsErrors[keyof ListCampaignResultsErrors];
3731
+ export type ListCampaignResultsResponses = {
3732
+ /**
3733
+ * Success
3734
+ */
3735
+ 200: CampaignResults;
3736
+ };
3737
+ export type ListCampaignResultsResponse = ListCampaignResultsResponses[keyof ListCampaignResultsResponses];
3738
+ export type UploadCampaignResultsData = {
3739
+ body: CampaignResultsUpload;
3740
+ headers?: {
3741
+ /**
3742
+ * Send a unique value to make this call safe to retry. A replay returns the original response with `Idempotency-Replayed: true`, for 24 hours — except a call that queued a job, whose replay is that job as it is now (what `GET /v1/jobs/{id}` answers), so a finished render replays as done with its file.
3743
+ */
3744
+ 'Idempotency-Key'?: string;
3745
+ /**
3746
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3747
+ */
3748
+ 'X-Hermoso-User'?: string;
3749
+ };
3750
+ path?: never;
3751
+ query?: never;
3752
+ url: '/v1/campaign-results';
3753
+ };
3754
+ export type UploadCampaignResultsErrors = {
3755
+ /**
3756
+ * Invalid request.
3757
+ */
3758
+ 400: Error;
3759
+ /**
3760
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3761
+ */
3762
+ 401: Error;
3763
+ /**
3764
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3765
+ */
3766
+ 404: Error;
3767
+ /**
3768
+ * Rate limited. `Retry-After` says how long to wait.
3769
+ */
3770
+ 429: Error;
3771
+ };
3772
+ export type UploadCampaignResultsError = UploadCampaignResultsErrors[keyof UploadCampaignResultsErrors];
3773
+ export type UploadCampaignResultsResponses = {
3774
+ /**
3775
+ * Success
3776
+ */
3777
+ 200: CampaignResults;
3778
+ };
3779
+ export type UploadCampaignResultsResponse = UploadCampaignResultsResponses[keyof UploadCampaignResultsResponses];
3780
+ export type GetProfitSettingsData = {
3781
+ body?: never;
3782
+ headers?: {
3783
+ /**
3784
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3785
+ */
3786
+ 'X-Hermoso-User'?: string;
3787
+ };
3788
+ path?: never;
3789
+ query?: never;
3790
+ url: '/v1/campaign-results/profit-settings';
3791
+ };
3792
+ export type GetProfitSettingsErrors = {
3793
+ /**
3794
+ * Invalid request.
3795
+ */
3796
+ 400: Error;
3797
+ /**
3798
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3799
+ */
3800
+ 401: Error;
3801
+ /**
3802
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3803
+ */
3804
+ 404: Error;
3805
+ /**
3806
+ * Rate limited. `Retry-After` says how long to wait.
3807
+ */
3808
+ 429: Error;
3809
+ };
3810
+ export type GetProfitSettingsError = GetProfitSettingsErrors[keyof GetProfitSettingsErrors];
3811
+ export type GetProfitSettingsResponses = {
3812
+ /**
3813
+ * Success
3814
+ */
3815
+ 200: ProfitSettings;
3816
+ };
3817
+ export type GetProfitSettingsResponse = GetProfitSettingsResponses[keyof GetProfitSettingsResponses];
3818
+ export type SetProfitSettingsData = {
3819
+ body: ProfitSettings;
3820
+ headers?: {
3821
+ /**
3822
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3823
+ */
3824
+ 'X-Hermoso-User'?: string;
3825
+ };
3826
+ path?: never;
3827
+ query?: never;
3828
+ url: '/v1/campaign-results/profit-settings';
3829
+ };
3830
+ export type SetProfitSettingsErrors = {
3831
+ /**
3832
+ * Invalid request.
3833
+ */
3834
+ 400: Error;
3835
+ /**
3836
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3837
+ */
3838
+ 401: Error;
3839
+ /**
3840
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3841
+ */
3842
+ 404: Error;
3843
+ /**
3844
+ * Rate limited. `Retry-After` says how long to wait.
3845
+ */
3846
+ 429: Error;
3847
+ };
3848
+ export type SetProfitSettingsError = SetProfitSettingsErrors[keyof SetProfitSettingsErrors];
3849
+ export type SetProfitSettingsResponses = {
3850
+ /**
3851
+ * Success
3852
+ */
3853
+ 200: ProfitSettings;
3854
+ };
3855
+ export type SetProfitSettingsResponse = SetProfitSettingsResponses[keyof SetProfitSettingsResponses];
3856
+ export type GetCampaignProfitData = {
3857
+ body?: never;
3858
+ headers?: {
3859
+ /**
3860
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3861
+ */
3862
+ 'X-Hermoso-User'?: string;
3863
+ };
3864
+ path?: never;
3865
+ query?: {
3866
+ from?: string;
3867
+ to?: string;
3868
+ days?: number;
3869
+ /**
3870
+ * Comma-separated, e.g. meta,tiktok_ads.
3871
+ */
3872
+ platforms?: string;
3873
+ /**
3874
+ * last_click (default), first_touch, linear, position_based, time_decay.
3875
+ */
3876
+ model?: string;
3877
+ /**
3878
+ * Comma-separated: uploads, events, store.
3879
+ */
3880
+ revenue_from?: string;
3881
+ include_idle?: boolean;
3882
+ };
3883
+ url: '/v1/campaign-profit';
3884
+ };
3885
+ export type GetCampaignProfitErrors = {
3886
+ /**
3887
+ * Invalid request.
3888
+ */
3889
+ 400: Error;
3890
+ /**
3891
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3892
+ */
3893
+ 401: Error;
3894
+ /**
3895
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3896
+ */
3897
+ 404: Error;
3898
+ /**
3899
+ * Rate limited. `Retry-After` says how long to wait.
3900
+ */
3901
+ 429: Error;
3902
+ };
3903
+ export type GetCampaignProfitError = GetCampaignProfitErrors[keyof GetCampaignProfitErrors];
3904
+ export type GetCampaignProfitResponses = {
3905
+ /**
3906
+ * Success
3907
+ */
3908
+ 200: CampaignProfit;
3909
+ };
3910
+ export type GetCampaignProfitResponse = GetCampaignProfitResponses[keyof GetCampaignProfitResponses];
3911
+ export type GetTagData = {
3912
+ body?: never;
3913
+ headers?: {
3914
+ /**
3915
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3916
+ */
3917
+ 'X-Hermoso-User'?: string;
3918
+ };
3919
+ path?: never;
3920
+ query?: never;
3921
+ url: '/v1/tag';
3922
+ };
3923
+ export type GetTagErrors = {
3924
+ /**
3925
+ * Invalid request.
3926
+ */
3927
+ 400: Error;
3928
+ /**
3929
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3930
+ */
3931
+ 401: Error;
3932
+ /**
3933
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3934
+ */
3935
+ 404: Error;
3936
+ /**
3937
+ * Rate limited. `Retry-After` says how long to wait.
3938
+ */
3939
+ 429: Error;
3940
+ };
3941
+ export type GetTagError = GetTagErrors[keyof GetTagErrors];
3942
+ export type GetTagResponses = {
3943
+ /**
3944
+ * Success
3945
+ */
3946
+ 200: HermosoTag;
3947
+ };
3948
+ export type GetTagResponse = GetTagResponses[keyof GetTagResponses];
3949
+ export type UpdateTagData = {
3950
+ body: HermosoTagUpdate;
3951
+ headers?: {
3952
+ /**
3953
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3954
+ */
3955
+ 'X-Hermoso-User'?: string;
3956
+ };
3957
+ path?: never;
3958
+ query?: never;
3959
+ url: '/v1/tag';
3960
+ };
3961
+ export type UpdateTagErrors = {
3962
+ /**
3963
+ * Invalid request.
3964
+ */
3965
+ 400: Error;
3966
+ /**
3967
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
3968
+ */
3969
+ 401: Error;
3970
+ /**
3971
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
3972
+ */
3973
+ 404: Error;
3974
+ /**
3975
+ * Rate limited. `Retry-After` says how long to wait.
3976
+ */
3977
+ 429: Error;
3978
+ };
3979
+ export type UpdateTagError = UpdateTagErrors[keyof UpdateTagErrors];
3980
+ export type UpdateTagResponses = {
3981
+ /**
3982
+ * Success
3983
+ */
3984
+ 200: HermosoTag;
3985
+ };
3986
+ export type UpdateTagResponse = UpdateTagResponses[keyof UpdateTagResponses];
3987
+ export type InstallTagData = {
3988
+ body: HermosoTagInstall;
3989
+ headers?: {
3990
+ /**
3991
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
3992
+ */
3993
+ 'X-Hermoso-User'?: string;
3994
+ };
3995
+ path?: never;
3996
+ query?: never;
3997
+ url: '/v1/tag/install';
3998
+ };
3999
+ export type InstallTagErrors = {
4000
+ /**
4001
+ * Invalid request.
4002
+ */
4003
+ 400: Error;
4004
+ /**
4005
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
4006
+ */
4007
+ 401: Error;
4008
+ /**
4009
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
4010
+ */
4011
+ 404: Error;
4012
+ /**
4013
+ * Rate limited. `Retry-After` says how long to wait.
4014
+ */
4015
+ 429: Error;
4016
+ };
4017
+ export type InstallTagError = InstallTagErrors[keyof InstallTagErrors];
4018
+ export type InstallTagResponses = {
4019
+ /**
4020
+ * Success
4021
+ */
4022
+ 200: HermosoTagInstallResult;
4023
+ };
4024
+ export type InstallTagResponse = InstallTagResponses[keyof InstallTagResponses];
4025
+ export type GetTagReportData = {
4026
+ body?: never;
4027
+ headers?: {
4028
+ /**
4029
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
4030
+ */
4031
+ 'X-Hermoso-User'?: string;
4032
+ };
4033
+ path?: never;
4034
+ query?: {
4035
+ /**
4036
+ * channel, source, medium, campaign, post, ad or page.
4037
+ */
4038
+ group_by?: string;
4039
+ /**
4040
+ * YYYY-MM-DD
4041
+ */
4042
+ from?: string;
4043
+ /**
4044
+ * YYYY-MM-DD
4045
+ */
4046
+ to?: string;
4047
+ /**
4048
+ * The last N days, default 30.
4049
+ */
4050
+ days?: number;
4051
+ limit?: number;
4052
+ };
4053
+ url: '/v1/tag/report';
4054
+ };
4055
+ export type GetTagReportErrors = {
4056
+ /**
4057
+ * Invalid request.
4058
+ */
4059
+ 400: Error;
4060
+ /**
4061
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
4062
+ */
4063
+ 401: Error;
4064
+ /**
4065
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
4066
+ */
4067
+ 404: Error;
4068
+ /**
4069
+ * Rate limited. `Retry-After` says how long to wait.
4070
+ */
4071
+ 429: Error;
4072
+ };
4073
+ export type GetTagReportError = GetTagReportErrors[keyof GetTagReportErrors];
4074
+ export type GetTagReportResponses = {
4075
+ /**
4076
+ * Success
4077
+ */
4078
+ 200: HermosoTagReport;
4079
+ };
4080
+ export type GetTagReportResponse = GetTagReportResponses[keyof GetTagReportResponses];
4081
+ export type ListTagEventsData = {
4082
+ body?: never;
4083
+ headers?: {
4084
+ /**
4085
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
4086
+ */
4087
+ 'X-Hermoso-User'?: string;
4088
+ };
4089
+ path?: never;
4090
+ query?: {
4091
+ /**
4092
+ * conversions (default), visits or all.
4093
+ */
4094
+ kind?: string;
4095
+ event_name?: string;
4096
+ /**
4097
+ * 1-150, default 30.
4098
+ */
4099
+ limit?: number;
4100
+ };
4101
+ url: '/v1/tag/events';
4102
+ };
4103
+ export type ListTagEventsErrors = {
4104
+ /**
4105
+ * Invalid request.
4106
+ */
4107
+ 400: Error;
4108
+ /**
4109
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
4110
+ */
4111
+ 401: Error;
4112
+ /**
4113
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
4114
+ */
4115
+ 404: Error;
4116
+ /**
4117
+ * Rate limited. `Retry-After` says how long to wait.
4118
+ */
4119
+ 429: Error;
4120
+ };
4121
+ export type ListTagEventsError = ListTagEventsErrors[keyof ListTagEventsErrors];
4122
+ export type ListTagEventsResponses = {
4123
+ /**
4124
+ * Success
4125
+ */
4126
+ 200: HermosoTagEvents;
4127
+ };
4128
+ export type ListTagEventsResponse = ListTagEventsResponses[keyof ListTagEventsResponses];
4129
+ export type SendTagEventsData = {
4130
+ body: HermosoTagEventsSend;
4131
+ headers?: {
4132
+ /**
4133
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
4134
+ */
4135
+ 'X-Hermoso-User'?: string;
4136
+ };
4137
+ path?: never;
4138
+ query?: never;
4139
+ url: '/v1/tag/events';
4140
+ };
4141
+ export type SendTagEventsErrors = {
4142
+ /**
4143
+ * Invalid request.
4144
+ */
4145
+ 400: Error;
4146
+ /**
4147
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
4148
+ */
4149
+ 401: Error;
4150
+ /**
4151
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
4152
+ */
4153
+ 404: Error;
4154
+ /**
4155
+ * Rate limited. `Retry-After` says how long to wait.
4156
+ */
4157
+ 429: Error;
4158
+ };
4159
+ export type SendTagEventsError = SendTagEventsErrors[keyof SendTagEventsErrors];
4160
+ export type SendTagEventsResponses = {
4161
+ /**
4162
+ * Success
4163
+ */
4164
+ 200: HermosoTagEventsSent;
4165
+ };
4166
+ export type SendTagEventsResponse = SendTagEventsResponses[keyof SendTagEventsResponses];
4167
+ export type ListTagAudiencesData = {
4168
+ body?: never;
4169
+ headers?: {
4170
+ /**
4171
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
4172
+ */
4173
+ 'X-Hermoso-User'?: string;
4174
+ };
4175
+ path?: never;
4176
+ query?: never;
4177
+ url: '/v1/tag/audiences';
4178
+ };
4179
+ export type ListTagAudiencesErrors = {
4180
+ /**
4181
+ * Invalid request.
4182
+ */
4183
+ 400: Error;
4184
+ /**
4185
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
4186
+ */
4187
+ 401: Error;
4188
+ /**
4189
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
4190
+ */
4191
+ 404: Error;
4192
+ /**
4193
+ * Rate limited. `Retry-After` says how long to wait.
4194
+ */
4195
+ 429: Error;
4196
+ };
4197
+ export type ListTagAudiencesError = ListTagAudiencesErrors[keyof ListTagAudiencesErrors];
4198
+ export type ListTagAudiencesResponses = {
4199
+ /**
4200
+ * Success
4201
+ */
4202
+ 200: HermosoTagAudiences;
4203
+ };
4204
+ export type ListTagAudiencesResponse = ListTagAudiencesResponses[keyof ListTagAudiencesResponses];
4205
+ export type TagAudiencesData = {
4206
+ body: HermosoTagAudienceAction;
4207
+ headers?: {
4208
+ /**
4209
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
4210
+ */
4211
+ 'X-Hermoso-User'?: string;
4212
+ };
4213
+ path?: never;
4214
+ query?: never;
4215
+ url: '/v1/tag/audiences';
4216
+ };
4217
+ export type TagAudiencesErrors = {
4218
+ /**
4219
+ * Invalid request.
4220
+ */
4221
+ 400: Error;
4222
+ /**
4223
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
4224
+ */
4225
+ 401: Error;
4226
+ /**
4227
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
4228
+ */
4229
+ 404: Error;
4230
+ /**
4231
+ * Rate limited. `Retry-After` says how long to wait.
4232
+ */
4233
+ 429: Error;
4234
+ };
4235
+ export type TagAudiencesError = TagAudiencesErrors[keyof TagAudiencesErrors];
4236
+ export type TagAudiencesResponses = {
4237
+ /**
4238
+ * Success
4239
+ */
4240
+ 200: HermosoTagAudiences;
4241
+ };
4242
+ export type TagAudiencesResponse = TagAudiencesResponses[keyof TagAudiencesResponses];
4243
+ export type GetContactEmailData = {
4244
+ body?: never;
4245
+ headers?: {
4246
+ /**
4247
+ * Send a unique value to make this call safe to retry. A replay returns the original response with `Idempotency-Replayed: true`, for 24 hours — except a call that queued a job, whose replay is that job as it is now (what `GET /v1/jobs/{id}` answers), so a finished render replays as done with its file.
4248
+ */
4249
+ 'Idempotency-Key'?: string;
4250
+ /**
4251
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
4252
+ */
4253
+ 'X-Hermoso-User'?: string;
4254
+ };
4255
+ path?: never;
4256
+ query?: never;
4257
+ url: '/v1/account/email';
4258
+ };
4259
+ export type GetContactEmailErrors = {
4260
+ /**
4261
+ * Invalid request.
4262
+ */
4263
+ 400: Error;
4264
+ /**
4265
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
4266
+ */
4267
+ 401: Error;
4268
+ /**
4269
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
4270
+ */
4271
+ 404: Error;
4272
+ /**
4273
+ * Rate limited. `Retry-After` says how long to wait.
4274
+ */
4275
+ 429: Error;
4276
+ };
4277
+ export type GetContactEmailError = GetContactEmailErrors[keyof GetContactEmailErrors];
4278
+ export type GetContactEmailResponses = {
4279
+ /**
4280
+ * Success
4281
+ */
4282
+ 200: ContactEmail;
4283
+ };
4284
+ export type GetContactEmailResponse = GetContactEmailResponses[keyof GetContactEmailResponses];
4285
+ export type ResendEmailVerificationData = {
4286
+ body: ContactEmailResend;
4287
+ headers?: {
4288
+ /**
4289
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
4290
+ */
4291
+ 'X-Hermoso-User'?: string;
4292
+ };
4293
+ path?: never;
4294
+ query?: never;
4295
+ url: '/v1/account/email/resend';
4296
+ };
4297
+ export type ResendEmailVerificationErrors = {
4298
+ /**
4299
+ * Invalid request.
4300
+ */
4301
+ 400: Error;
4302
+ /**
4303
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
4304
+ */
4305
+ 401: Error;
4306
+ /**
4307
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
4308
+ */
4309
+ 404: Error;
4310
+ /**
4311
+ * Rate limited. `Retry-After` says how long to wait.
4312
+ */
4313
+ 429: Error;
4314
+ };
4315
+ export type ResendEmailVerificationError = ResendEmailVerificationErrors[keyof ResendEmailVerificationErrors];
4316
+ export type ResendEmailVerificationResponses = {
4317
+ /**
4318
+ * Success
4319
+ */
4320
+ 200: ContactEmail;
4321
+ };
4322
+ export type ResendEmailVerificationResponse = ResendEmailVerificationResponses[keyof ResendEmailVerificationResponses];
4323
+ export type GetBestTimeData = {
4324
+ body?: never;
4325
+ headers?: {
4326
+ /**
4327
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
4328
+ */
4329
+ 'X-Hermoso-User'?: string;
4330
+ };
4331
+ path?: never;
4332
+ query?: {
4333
+ /**
4334
+ * One channel (instagram, tiktok, facebook, linkedin, x, threads, youtube, pinterest, bluesky). Omit for every channel.
4335
+ */
4336
+ channel?: string;
4337
+ /**
4338
+ * One account: handle, Page name or id.
4339
+ */
4340
+ account?: string;
4341
+ /**
4342
+ * `all` (default), `hermoso` (posts made in Hermoso) or `imported` (posts imported from the platform).
4343
+ */
4344
+ source?: string;
4345
+ /**
4346
+ * Look-back, 30-365 days. Default 90.
4347
+ */
4348
+ days?: number;
4349
+ /**
4350
+ * IANA zone for days and hours. Default: the account's.
4351
+ */
4352
+ timezone?: string;
4353
+ };
4354
+ url: '/v1/analytics/best-time';
4355
+ };
4356
+ export type GetBestTimeErrors = {
4357
+ /**
4358
+ * Invalid request.
4359
+ */
4360
+ 400: Error;
4361
+ /**
4362
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
4363
+ */
4364
+ 401: Error;
4365
+ /**
4366
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
4367
+ */
4368
+ 404: Error;
4369
+ /**
4370
+ * Rate limited. `Retry-After` says how long to wait.
4371
+ */
4372
+ 429: Error;
4373
+ };
4374
+ export type GetBestTimeError = GetBestTimeErrors[keyof GetBestTimeErrors];
4375
+ export type GetBestTimeResponses = {
4376
+ /**
4377
+ * Success
4378
+ */
4379
+ 200: BestTime;
4380
+ };
4381
+ export type GetBestTimeResponse = GetBestTimeResponses[keyof GetBestTimeResponses];
4382
+ export type GetPostingFrequencyData = {
4383
+ body?: never;
4384
+ headers?: {
4385
+ /**
4386
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
4387
+ */
4388
+ 'X-Hermoso-User'?: string;
4389
+ };
4390
+ path?: never;
4391
+ query?: {
4392
+ /**
4393
+ * One channel. Omit for every channel.
4394
+ */
4395
+ channel?: string;
4396
+ /**
4397
+ * One account.
4398
+ */
4399
+ account?: string;
4400
+ /**
4401
+ * `all`, `hermoso` or `imported`.
4402
+ */
4403
+ source?: string;
4404
+ /**
4405
+ * IANA zone that decides where a week starts (Monday). Default: the account's.
4406
+ */
4407
+ timezone?: string;
4408
+ };
4409
+ url: '/v1/analytics/posting-frequency';
4410
+ };
4411
+ export type GetPostingFrequencyErrors = {
4412
+ /**
4413
+ * Invalid request.
4414
+ */
4415
+ 400: Error;
4416
+ /**
4417
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
4418
+ */
4419
+ 401: Error;
4420
+ /**
4421
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
4422
+ */
4423
+ 404: Error;
4424
+ /**
4425
+ * Rate limited. `Retry-After` says how long to wait.
4426
+ */
4427
+ 429: Error;
4428
+ };
4429
+ export type GetPostingFrequencyError = GetPostingFrequencyErrors[keyof GetPostingFrequencyErrors];
4430
+ export type GetPostingFrequencyResponses = {
4431
+ /**
4432
+ * Success
4433
+ */
4434
+ 200: PostingFrequency;
4435
+ };
4436
+ export type GetPostingFrequencyResponse = GetPostingFrequencyResponses[keyof GetPostingFrequencyResponses];
4437
+ export type GetContentDecayData = {
4438
+ body?: never;
4439
+ headers?: {
4440
+ /**
4441
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
4442
+ */
4443
+ 'X-Hermoso-User'?: string;
4444
+ };
4445
+ path?: never;
4446
+ query?: {
4447
+ /**
4448
+ * One channel. Omit for every channel.
4449
+ */
4450
+ channel?: string;
4451
+ /**
4452
+ * One account.
4453
+ */
4454
+ account?: string;
4455
+ /**
4456
+ * `all`, `hermoso` or `imported`.
4457
+ */
4458
+ source?: string;
4459
+ };
4460
+ url: '/v1/analytics/content-decay';
4461
+ };
4462
+ export type GetContentDecayErrors = {
4463
+ /**
4464
+ * Invalid request.
4465
+ */
4466
+ 400: Error;
4467
+ /**
4468
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
4469
+ */
4470
+ 401: Error;
4471
+ /**
4472
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
4473
+ */
4474
+ 404: Error;
4475
+ /**
4476
+ * Rate limited. `Retry-After` says how long to wait.
4477
+ */
4478
+ 429: Error;
4479
+ };
4480
+ export type GetContentDecayError = GetContentDecayErrors[keyof GetContentDecayErrors];
4481
+ export type GetContentDecayResponses = {
4482
+ /**
4483
+ * Success
4484
+ */
4485
+ 200: ContentDecay;
4486
+ };
4487
+ export type GetContentDecayResponse = GetContentDecayResponses[keyof GetContentDecayResponses];
4488
+ export type GetFollowerHistoryData = {
4489
+ body?: never;
4490
+ headers?: {
4491
+ /**
4492
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
4493
+ */
4494
+ 'X-Hermoso-User'?: string;
4495
+ };
4496
+ path?: never;
4497
+ query?: {
4498
+ /**
4499
+ * YYYY-MM-DD. Default 30 days before `to`.
4500
+ */
4501
+ from?: string;
4502
+ /**
4503
+ * YYYY-MM-DD. Default today.
4504
+ */
4505
+ to?: string;
4506
+ /**
4507
+ * `daily` (default), `weekly` or `monthly`.
4508
+ */
4509
+ granularity?: string;
4510
+ /**
4511
+ * One channel.
4512
+ */
4513
+ channel?: string;
4514
+ /**
4515
+ * One account.
4516
+ */
4517
+ account?: string;
4518
+ };
4519
+ url: '/v1/analytics/follower-history';
4520
+ };
4521
+ export type GetFollowerHistoryErrors = {
4522
+ /**
4523
+ * Invalid request.
4524
+ */
4525
+ 400: Error;
4526
+ /**
4527
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
4528
+ */
4529
+ 401: Error;
4530
+ /**
4531
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
4532
+ */
4533
+ 404: Error;
4534
+ /**
4535
+ * Rate limited. `Retry-After` says how long to wait.
4536
+ */
4537
+ 429: Error;
4538
+ };
4539
+ export type GetFollowerHistoryError = GetFollowerHistoryErrors[keyof GetFollowerHistoryErrors];
4540
+ export type GetFollowerHistoryResponses = {
4541
+ /**
4542
+ * Success
4543
+ */
4544
+ 200: FollowerHistory;
4545
+ };
4546
+ export type GetFollowerHistoryResponse = GetFollowerHistoryResponses[keyof GetFollowerHistoryResponses];
4547
+ export type GetInboxStatsData = {
4548
+ body?: never;
4549
+ headers?: {
4550
+ /**
4551
+ * Which profile to act on, when the account holds more than one: an `id` from `GET /v1/brands`. Defaults to the workspace the key is pinned to. Membership is re-authorised on every request, and an id this key cannot act on is a 404 `brand_not_found`, never an empty result.
4552
+ */
4553
+ 'X-Hermoso-User'?: string;
4554
+ };
4555
+ path?: never;
4556
+ query?: {
4557
+ /**
4558
+ * Last N days, 1-365. Default 30.
4559
+ */
4560
+ days?: number;
4561
+ /**
4562
+ * YYYY-MM-DD.
4563
+ */
4564
+ from?: string;
4565
+ /**
4566
+ * YYYY-MM-DD.
4567
+ */
4568
+ to?: string;
4569
+ /**
4570
+ * One channel: whatsapp, messenger, instagram, telegram, sms, line, slack, discord, email, x.
4571
+ */
4572
+ channel?: string;
4573
+ /**
4574
+ * One receiving account.
4575
+ */
4576
+ account?: string;
4577
+ /**
4578
+ * Also count X DMs (X bills per message read).
4579
+ */
4580
+ include_x?: boolean;
4581
+ /**
4582
+ * IANA zone for days and hours. Default: the account's.
4583
+ */
4584
+ timezone?: string;
4585
+ /**
4586
+ * Rows in `topAccounts` and per page of `conversations`.
4587
+ */
4588
+ limit?: number;
4589
+ /**
4590
+ * Page of `conversations`, from 1.
4591
+ */
4592
+ page?: number;
4593
+ };
4594
+ url: '/v1/analytics/inbox';
4595
+ };
4596
+ export type GetInboxStatsErrors = {
4597
+ /**
4598
+ * Invalid request.
4599
+ */
4600
+ 400: Error;
4601
+ /**
4602
+ * Missing, invalid or revoked key — or a channel that is not connected, in which case `error.connector` names it and `error.type` is `connector_error`.
4603
+ */
4604
+ 401: Error;
4605
+ /**
4606
+ * `error.code: brand_not_found`: `X-Hermoso-User` (or the profile this key is pinned to) names a profile this key cannot act on. `GET /v1/brands` lists the valid ids.
4607
+ */
4608
+ 404: Error;
4609
+ /**
4610
+ * Rate limited. `Retry-After` says how long to wait.
4611
+ */
4612
+ 429: Error;
4613
+ };
4614
+ export type GetInboxStatsError = GetInboxStatsErrors[keyof GetInboxStatsErrors];
4615
+ export type GetInboxStatsResponses = {
4616
+ /**
4617
+ * Success
4618
+ */
4619
+ 200: InboxStats;
4620
+ };
4621
+ export type GetInboxStatsResponse = GetInboxStatsResponses[keyof GetInboxStatsResponses];