@hermoso/sdk 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +86 -2
- package/dist/gen/client/client.gen.d.ts +2 -0
- package/dist/gen/client/client.gen.js +216 -0
- package/dist/gen/client/index.d.ts +10 -0
- package/dist/gen/client/index.js +6 -0
- package/dist/gen/client/types.gen.d.ts +120 -0
- package/dist/gen/client/types.gen.js +2 -0
- package/dist/gen/client/utils.gen.d.ts +37 -0
- package/dist/gen/client/utils.gen.js +228 -0
- package/dist/gen/client.gen.d.ts +12 -0
- package/dist/gen/client.gen.js +3 -0
- package/dist/gen/core/auth.gen.d.ts +25 -0
- package/dist/gen/core/auth.gen.js +14 -0
- package/dist/gen/core/bodySerializer.gen.d.ts +25 -0
- package/dist/gen/core/bodySerializer.gen.js +57 -0
- package/dist/gen/core/params.gen.d.ts +43 -0
- package/dist/gen/core/params.gen.js +109 -0
- package/dist/gen/core/pathSerializer.gen.d.ts +33 -0
- package/dist/gen/core/pathSerializer.gen.js +106 -0
- package/dist/gen/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/gen/core/queryKeySerializer.gen.js +92 -0
- package/dist/gen/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/gen/core/serverSentEvents.gen.js +132 -0
- package/dist/gen/core/types.gen.d.ts +83 -0
- package/dist/gen/core/types.gen.js +2 -0
- package/dist/gen/core/utils.gen.d.ts +19 -0
- package/dist/gen/core/utils.gen.js +87 -0
- package/dist/gen/index.d.ts +2 -0
- package/dist/gen/index.js +2 -0
- package/dist/gen/sdk.gen.d.ts +433 -0
- package/dist/gen/sdk.gen.js +771 -0
- package/dist/gen/spec.gen.d.ts +4 -0
- package/dist/gen/spec.gen.js +5 -0
- package/dist/gen/types.gen.d.ts +4621 -0
- package/dist/gen/types.gen.js +2 -0
- package/dist/index.d.ts +75 -0
- package/dist/index.js +101 -0
- package/package.json +51 -4
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
|
|
2
|
+
import type { CallToolData, CallToolErrors, CallToolResponses, CancelJobData, CancelJobErrors, CancelJobResponses, ClaimSignupData, ClaimSignupErrors, ClaimSignupResponses, CreateConnectLinkData, CreateConnectLinkErrors, CreateConnectLinkResponses, CreateConversionDestinationData, CreateConversionDestinationErrors, CreateConversionDestinationResponses, CreateEditData, CreateEditErrors, CreateEditResponses, CreateGenerationData, CreateGenerationErrors, CreateGenerationResponses, CreateMediaData, CreateMediaErrors, CreateMediaResponses, CreatePostData, CreatePostErrors, CreatePostResponses, CreateRecastData, CreateRecastErrors, CreateRecastResponses, CreateSignupData, CreateSignupErrors, CreateSignupResponses, DeleteConnectionData, DeleteConnectionErrors, DeleteConnectionResponses, DeleteConversionDestinationData, DeleteConversionDestinationErrors, DeleteConversionDestinationResponses, DeletePostData, DeletePostErrors, DeletePostResponses, GetBestTimeData, GetBestTimeErrors, GetBestTimeResponses, GetCampaignProfitData, GetCampaignProfitErrors, GetCampaignProfitResponses, GetConnectLinkData, GetConnectLinkErrors, GetConnectLinkResponses, GetConnectRedirectsData, GetConnectRedirectsErrors, GetConnectRedirectsResponses, GetContactEmailData, GetContactEmailErrors, GetContactEmailResponses, GetContentDecayData, GetContentDecayErrors, GetContentDecayResponses, GetConversionAccuracyData, GetConversionAccuracyErrors, GetConversionAccuracyResponses, GetConversionEventData, GetConversionEventErrors, GetConversionEventResponses, GetConversionJourneyData, GetConversionJourneyErrors, GetConversionJourneyResponses, GetConversionLtvData, GetConversionLtvErrors, GetConversionLtvResponses, GetCreditsData, GetCreditsErrors, GetCreditsResponses, GetFollowerHistoryData, GetFollowerHistoryErrors, GetFollowerHistoryResponses, GetInboxStatsData, GetInboxStatsErrors, GetInboxStatsResponses, GetJobData, GetJobErrors, GetJobResponses, GetMediaContentData, GetMediaContentErrors, GetMediaContentResponses, GetPostData, GetPostErrors, GetPostingFrequencyData, GetPostingFrequencyErrors, GetPostingFrequencyResponses, GetPostResponses, GetProfitSettingsData, GetProfitSettingsErrors, GetProfitSettingsResponses, GetTagData, GetTagErrors, GetTagReportData, GetTagReportErrors, GetTagReportResponses, GetTagResponses, GetToolData, GetToolErrors, GetToolResponses, InstallTagData, InstallTagErrors, InstallTagResponses, ListBrandsData, ListBrandsErrors, ListBrandsResponses, ListCampaignResultsData, ListCampaignResultsErrors, ListCampaignResultsResponses, ListChannelsData, ListChannelsErrors, ListChannelsResponses, ListConnectionsData, ListConnectionsErrors, ListConnectionsResponses, ListConversionCustomersData, ListConversionCustomersErrors, ListConversionCustomersResponses, ListConversionDestinationsData, ListConversionDestinationsErrors, ListConversionDestinationsResponses, ListConversionEventsData, ListConversionEventsErrors, ListConversionEventsResponses, ListConversionPathsData, ListConversionPathsErrors, ListConversionPathsResponses, ListJobsData, ListJobsErrors, ListJobsResponses, ListLibraryData, ListLibraryErrors, ListLibraryResponses, ListModelsData, ListModelsErrors, ListModelsResponses, ListPostsData, ListPostsErrors, ListPostsResponses, ListTagAudiencesData, ListTagAudiencesErrors, ListTagAudiencesResponses, ListTagEventsData, ListTagEventsErrors, ListTagEventsResponses, ListToolsData, ListToolsErrors, ListToolsResponses, QuoteCloneData, QuoteCloneErrors, QuoteCloneResponses, QuoteGenerationData, QuoteGenerationErrors, QuoteGenerationResponses, ResendEmailVerificationData, ResendEmailVerificationErrors, ResendEmailVerificationResponses, RetractConversionEventData, RetractConversionEventErrors, RetractConversionEventResponses, RevokeConnectLinkData, RevokeConnectLinkErrors, RevokeConnectLinkResponses, SendConversionEventsData, SendConversionEventsErrors, SendConversionEventsResponses, SendTagEventsData, SendTagEventsErrors, SendTagEventsResponses, SetConnectRedirectsData, SetConnectRedirectsErrors, SetConnectRedirectsResponses, SetProfitSettingsData, SetProfitSettingsErrors, SetProfitSettingsResponses, TagAudiencesData, TagAudiencesErrors, TagAudiencesResponses, UpdateConversionEventData, UpdateConversionEventErrors, UpdateConversionEventResponses, UpdatePostData, UpdatePostErrors, UpdatePostResponses, UpdateTagData, UpdateTagErrors, UpdateTagResponses, UploadCampaignResultsData, UploadCampaignResultsErrors, UploadCampaignResultsResponses } from './types.gen.js';
|
|
3
|
+
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
4
|
+
/**
|
|
5
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
6
|
+
* individual options. This might be also useful if you want to implement a
|
|
7
|
+
* custom client.
|
|
8
|
+
*/
|
|
9
|
+
client?: Client;
|
|
10
|
+
/**
|
|
11
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
12
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
13
|
+
*/
|
|
14
|
+
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* List publishing channels
|
|
18
|
+
*
|
|
19
|
+
* Every channel Hermoso can publish to, whether this workspace has it connected, and what each supports (visibilities, carousel limits, caption length). A channel that is NOT connected is still listed, with `connected: false` — "we do not support that" and "you have not connected it" are different answers and a client must be able to tell them apart.
|
|
20
|
+
*/
|
|
21
|
+
export declare const listChannels: <ThrowOnError extends boolean = false>(options?: Options<ListChannelsData, ThrowOnError>) => RequestResult<ListChannelsResponses, ListChannelsErrors, ThrowOnError>;
|
|
22
|
+
/**
|
|
23
|
+
* List posts
|
|
24
|
+
*
|
|
25
|
+
* Scheduled and already-fired posts for this workspace, newest first. Cursor-paginated.
|
|
26
|
+
*/
|
|
27
|
+
export declare const listPosts: <ThrowOnError extends boolean = false>(options?: Options<ListPostsData, ThrowOnError>) => RequestResult<ListPostsResponses, ListPostsErrors, ThrowOnError>;
|
|
28
|
+
/**
|
|
29
|
+
* Create a post
|
|
30
|
+
*
|
|
31
|
+
* Publish now, or schedule for later. Omit `scheduled_at` to send immediately; pass an ISO-8601 timestamp to queue it. A post fans out across every channel in `channels` INDEPENDENTLY — one channel failing does not stop the others, and `results[]` reports each. Everything that can be refused is refused HERE, while you still hold the request: an unknown channel, a visibility the channel cannot honour, a caption over a channel limit, a carousel a channel cannot carry. Nothing is ever silently downgraded at publish time.
|
|
32
|
+
*/
|
|
33
|
+
export declare const createPost: <ThrowOnError extends boolean = false>(options: Options<CreatePostData, ThrowOnError>) => RequestResult<CreatePostResponses, CreatePostErrors, ThrowOnError>;
|
|
34
|
+
/**
|
|
35
|
+
* Cancel a scheduled post
|
|
36
|
+
*
|
|
37
|
+
* Only while it is still `scheduled`. A post that has already fired cannot be cancelled — it exists on the channel now, and removing it there is that channel’s own delete.
|
|
38
|
+
*/
|
|
39
|
+
export declare const deletePost: <ThrowOnError extends boolean = false>(options: Options<DeletePostData, ThrowOnError>) => RequestResult<DeletePostResponses, DeletePostErrors, ThrowOnError>;
|
|
40
|
+
/**
|
|
41
|
+
* Retrieve a post
|
|
42
|
+
*
|
|
43
|
+
* One post, including per-channel results once it has fired.
|
|
44
|
+
*/
|
|
45
|
+
export declare const getPost: <ThrowOnError extends boolean = false>(options: Options<GetPostData, ThrowOnError>) => RequestResult<GetPostResponses, GetPostErrors, ThrowOnError>;
|
|
46
|
+
/**
|
|
47
|
+
* Update a scheduled post
|
|
48
|
+
*
|
|
49
|
+
* Only while it is still `scheduled`. An omitted field is left alone; an explicit empty value clears it. The edit re-runs the SAME validation a create does — it is not a looser path.
|
|
50
|
+
*/
|
|
51
|
+
export declare const updatePost: <ThrowOnError extends boolean = false>(options: Options<UpdatePostData, ThrowOnError>) => RequestResult<UpdatePostResponses, UpdatePostErrors, ThrowOnError>;
|
|
52
|
+
/**
|
|
53
|
+
* Upload media
|
|
54
|
+
*
|
|
55
|
+
* Turn a file into a Hermoso-hosted URL that `POST /v1/posts` accepts. Two ways in, and exactly ONE per call: send the file’s raw bytes as the request body with its own `Content-Type` (name it with `X-File-Name`), or send `?url=` (or a JSON body `{"url": "…"}`) and we fetch it. Sending both is an error rather than a silent precedence — a caller who sent both has two different files in mind. A form-encoded or multipart body is refused with `400 unsupported_media_body`: send the bytes themselves, not a form around them.
|
|
56
|
+
*/
|
|
57
|
+
export declare const createMedia: <ThrowOnError extends boolean = false>(options?: Options<CreateMediaData, ThrowOnError>) => RequestResult<CreateMediaResponses, CreateMediaErrors, ThrowOnError>;
|
|
58
|
+
/**
|
|
59
|
+
* Retrieve the credit balance
|
|
60
|
+
*
|
|
61
|
+
* This workspace’s Hermoso credit balance and plan. Publishing and scheduling cost no credits; generation does. The Free plan publishes up to 5 posts a month on 3 channels (a post counts once, however many channels it goes to); every paid plan posts without a limit.
|
|
62
|
+
*/
|
|
63
|
+
export declare const getCredits: <ThrowOnError extends boolean = false>(options?: Options<GetCreditsData, ThrowOnError>) => RequestResult<GetCreditsResponses, GetCreditsErrors, ThrowOnError>;
|
|
64
|
+
/**
|
|
65
|
+
* List the callable tools
|
|
66
|
+
*
|
|
67
|
+
* Everything this workspace can do over HTTP, grouped by area, each with its human-readable description, its JSON Schema and its `price` (what one call spends, read live). This is the browsable index: filter by `area`, search by task words (`search=email outreach`, ranked the way the MCP `find_tools` tool ranks), page with a cursor.
|
|
68
|
+
*
|
|
69
|
+
* READ IT, DO NOT HARD-CODE IT. The set grows continuously and a tool absent here is not a missing capability. By default a tool whose connector this workspace has not linked is left out, because it could only ever answer "not connected". Send `include=all` to list EVERY tool, including those: each such row has `available: false`, `unavailable_reason` (`not_connected`, `not_offered` or `shopify_store`), `requires_connector` and a `connect_url` to link it. That is how you build for customers whose accounts are connected to platforms your own test account is not. Calling one of them answers `401` with `error.type: connector_error` and `error.connector`.
|
|
70
|
+
*
|
|
71
|
+
* CONTRACT TIER: this endpoint's SHAPE is stable under the same promise as everything else in `/v1`. The TOOLS inside it are not frozen — their arguments improve as the tools do. Treat the roster as live data.
|
|
72
|
+
*/
|
|
73
|
+
export declare const listTools: <ThrowOnError extends boolean = false>(options?: Options<ListToolsData, ThrowOnError>) => RequestResult<ListToolsResponses, ListToolsErrors, ThrowOnError>;
|
|
74
|
+
/**
|
|
75
|
+
* Retrieve one tool
|
|
76
|
+
*
|
|
77
|
+
* One tool: what it does, what one call costs (`price`), which area it belongs to, whether it is read-only, which connector it needs, and the JSON Schema for its arguments. A tool withheld from the index because its connector is not linked is still described HERE, with `connector_connected: false` — so "what would I have to link to use this?" is answerable without linking anything first.
|
|
78
|
+
*/
|
|
79
|
+
export declare const getTool: <ThrowOnError extends boolean = false>(options: Options<GetToolData, ThrowOnError>) => RequestResult<GetToolResponses, GetToolErrors, ThrowOnError>;
|
|
80
|
+
/**
|
|
81
|
+
* Call a tool
|
|
82
|
+
*
|
|
83
|
+
* Invoke a tool with a JSON body of its arguments and get its result. The body IS the argument object — there is no envelope to wrap it in.
|
|
84
|
+
*
|
|
85
|
+
* UNKNOWN ARGUMENTS are never silently dropped. A key the tool does not declare that looks like a misspelling or synonym of one it does (`pagId`, `platform` for `target`) is refused with `400 invalid_arguments`, and `error.unknown_arguments` lists each one as `{name, did_you_mean}`, the suggestion always being an argument of THIS tool. Any other undeclared key runs the call without it: the result text starts with a line naming it, and the response carries `ignored_arguments: [{name, did_you_mean}]` (the same list is `data.ignoredArguments`). Keys starting with `_` are host metadata and are never named.
|
|
86
|
+
*
|
|
87
|
+
* The same handler the MCP server and the CLI run, on the same credential, through the same spend gate: a tool that costs credits costs the same credits here, and one that publishes publishes to the same connected account. Send an `Idempotency-Key` on anything that spends or publishes and a retry is safe.
|
|
88
|
+
*
|
|
89
|
+
* The reply carries BOTH halves of the tool's answer: `text` is the sentence (what an agent reads) and `data` is the structured result (what an integration reads). A tool that refuses answers with an HTTP error in the standard envelope, never a 200 with a failure inside it.
|
|
90
|
+
*
|
|
91
|
+
* CONTRACT TIER: the envelope here — the route, the auth, the errors, the rate-limit headers, the idempotency semantics — is stable. A tool's own arguments are not frozen: they improve with the tool. Read `GET /v1/tools/{name}` rather than pinning a schema.
|
|
92
|
+
*/
|
|
93
|
+
export declare const callTool: <ThrowOnError extends boolean = false>(options: Options<CallToolData, ThrowOnError>) => RequestResult<CallToolResponses, CallToolErrors, ThrowOnError>;
|
|
94
|
+
/**
|
|
95
|
+
* List jobs
|
|
96
|
+
*
|
|
97
|
+
* Renders and other long-running work for this profile, newest first. Cursor-paginated. A job belongs to the profile that started it (`brand_id`); send `X-Hermoso-User` to list another profile’s. Jobs are kept while they are useful to poll, not forever: a finished job ages out of this list, and its output lives on in the Library.
|
|
98
|
+
*/
|
|
99
|
+
export declare const listJobs: <ThrowOnError extends boolean = false>(options?: Options<ListJobsData, ThrowOnError>) => RequestResult<ListJobsResponses, ListJobsErrors, ThrowOnError>;
|
|
100
|
+
/**
|
|
101
|
+
* Retrieve a job
|
|
102
|
+
*
|
|
103
|
+
* One job. Poll this until `status` is `done` or `error`; a few seconds between reads is plenty, and reads spend the read budget, not the write one. `url` is the finished file once there is one. An id that is not on your account is a 404, whether or not it exists somewhere else, and that answer is final: stop polling it and do not re-run the render on the strength of it.
|
|
104
|
+
*/
|
|
105
|
+
export declare const getJob: <ThrowOnError extends boolean = false>(options: Options<GetJobData, ThrowOnError>) => RequestResult<GetJobResponses, GetJobErrors, ThrowOnError>;
|
|
106
|
+
/**
|
|
107
|
+
* Cancel an image or video job
|
|
108
|
+
*
|
|
109
|
+
* Stop an image or video generation. A job that has not started is stopped and charged nothing. A job that is starting stops before it reaches a model when it still can, and is charged nothing if it does. Once a model is rendering it, the render cannot be called back: it finishes, its credits are used and it lands in the Library, and `outcome` says so. Keep polling `GET /v1/jobs/{id}` for the final state; a stopped job ends `error` with `cancelled: true`. Safe to repeat.
|
|
110
|
+
*/
|
|
111
|
+
export declare const cancelJob: <ThrowOnError extends boolean = false>(options: Options<CancelJobData, ThrowOnError>) => RequestResult<CancelJobResponses, CancelJobErrors, ThrowOnError>;
|
|
112
|
+
/**
|
|
113
|
+
* List profiles
|
|
114
|
+
*
|
|
115
|
+
* Every profile this key can act on (each is a business brand, a creator or a personal workspace): the account’s own, plus any another account shared with you. `id` is the value `X-Hermoso-User` takes. A shared profile also needs `X-Hermoso-Owner`, and each row’s `headers` spells out exactly what to send. `current` marks the profile THIS request resolved to. This is the one endpoint that ignores an unknown `X-Hermoso-User` instead of refusing it, because it is how you find a valid one.
|
|
116
|
+
*/
|
|
117
|
+
export declare const listBrands: <ThrowOnError extends boolean = false>(options?: Options<ListBrandsData, ThrowOnError>) => RequestResult<ListBrandsResponses, ListBrandsErrors, ThrowOnError>;
|
|
118
|
+
/**
|
|
119
|
+
* Price a generation before running it
|
|
120
|
+
*
|
|
121
|
+
* The estimated credits a generation with this body would reserve, from the render’s own pricing, with the brand’s product photos attached exactly as the real run attaches them. Free: nothing is queued, reserved or charged. It is an estimate: the render is charged its actual cost when it finishes, usually within a few percent of this figure. `credits: null` with `refused` means the render would not start, and says why.
|
|
122
|
+
*/
|
|
123
|
+
export declare const quoteGeneration: <ThrowOnError extends boolean = false>(options: Options<QuoteGenerationData, ThrowOnError>) => RequestResult<QuoteGenerationResponses, QuoteGenerationErrors, ThrowOnError>;
|
|
124
|
+
/**
|
|
125
|
+
* Price a clone before running it
|
|
126
|
+
*
|
|
127
|
+
* What cloning an ad for this profile will cost, step by step, before anything runs. `type: image` prices the static clone (`clone_static`): reading the layout (a flat charge) plus the image render’s own hold, with the brand’s product photo attached exactly as the clone attaches it; the copy writing and the final brand check are billed at their real model cost and are listed with `credits: null`. `type: video` prices the first step of a video clone (`clone_video`: watching the original and planning the storyboard) as the server’s own estimate; the render is priced exactly once the plan exists, by calling `render_ad` with `dryRun: true`. Free: nothing is read, reserved or charged.
|
|
128
|
+
*/
|
|
129
|
+
export declare const quoteClone: <ThrowOnError extends boolean = false>(options: Options<QuoteCloneData, ThrowOnError>) => RequestResult<QuoteCloneResponses, QuoteCloneErrors, ThrowOnError>;
|
|
130
|
+
/**
|
|
131
|
+
* List the image and video models
|
|
132
|
+
*
|
|
133
|
+
* The live model catalog this account can render with: ids, labels, the aspect ratios, sizes and lengths each takes, and its list price in credits. For the exact price of one render with your prompt and brand, ask `POST /v1/generations/quote`: brand product photos and video audio can change it. Models that only edit or only animate a supplied picture are marked `needs_reference`. The catalog grows: read it, never hard-code it.
|
|
134
|
+
*/
|
|
135
|
+
export declare const listModels: <ThrowOnError extends boolean = false>(options?: Options<ListModelsData, ThrowOnError>) => RequestResult<ListModelsResponses, ListModelsErrors, ThrowOnError>;
|
|
136
|
+
/**
|
|
137
|
+
* Generate an image or video
|
|
138
|
+
*
|
|
139
|
+
* Queue one image or one video render for this profile and answer 202 with the job. Poll `GET /v1/jobs/{id}` until `status` is `done` (its `url` is the file) or `error`. Billed exactly as the same render is anywhere in Hermoso: the credits are reserved when it starts and settle to the measured cost. A refusal (not enough credits, a prompt the model will not render) is an error in the standard envelope, with the server’s own sentence in `message`. Send an `Idempotency-Key` and a retry never starts a second render.
|
|
140
|
+
*/
|
|
141
|
+
export declare const createGeneration: <ThrowOnError extends boolean = false>(options: Options<CreateGenerationData, ThrowOnError>) => RequestResult<CreateGenerationResponses, CreateGenerationErrors, ThrowOnError>;
|
|
142
|
+
/**
|
|
143
|
+
* Put a person into a video (motion transfer)
|
|
144
|
+
*
|
|
145
|
+
* Replace the person in a video with someone else: a saved or preset creator, a photo, or an AI person made from a description. The new person performs every move, expression and mouth shape of the original, on the same beats and cuts, in the same set and light, and the original sound is kept. Optionally give them a new voice, or have them speak another language with the mouth lip-synced.
|
|
146
|
+
*
|
|
147
|
+
* PRICED UP FRONT. Send `"dry_run": true` and the response is the exact price: the credits the job reserves when it starts, from the job's own pricing. It is an estimate: the real call reserves the same figure and is charged its actual cost, usually within a few percent of it. Nothing runs and nothing is charged on a dry run, except that reading a social post link uses its one lookup.
|
|
148
|
+
*
|
|
149
|
+
* ASYNC. A real call answers `202` with the job inside and a `Location` to poll (`GET /v1/jobs/{id}`), usually a few minutes. Or name a `callback_url` and the finished job is POSTed to you.
|
|
150
|
+
*
|
|
151
|
+
* PEOPLE AND LIKENESS. A photo of a real person needs a paid plan, and sending one is your confirmation that you have that person's permission (it is recorded). An AI person from `describe`, or a preset creator, works on every plan. A request that would be refused is refused before anything is charged, with a stable `error.code` and a plain sentence: `real_face_needs_paid`, `face_review_blocked`, `ref_unreadable`, `insufficient_credits`.
|
|
152
|
+
*/
|
|
153
|
+
export declare const createRecast: <ThrowOnError extends boolean = false>(options: Options<CreateRecastData, ThrowOnError>) => RequestResult<CreateRecastResponses, CreateRecastErrors, ThrowOnError>;
|
|
154
|
+
/**
|
|
155
|
+
* Change one thing in a video
|
|
156
|
+
*
|
|
157
|
+
* Edit a clip from a plain instruction: "change only the mug to red", "swap the bottle for our product", "make it night". The motion, timing, framing and cut stay; the named thing changes, and the rest of the frame is held. A `reference` image anchors the material of what changes (a fabric, a finish, the real product). One change per call holds best, on clips of 3 to 15 seconds.
|
|
158
|
+
*
|
|
159
|
+
* PRICED UP FRONT. `"dry_run": true` returns the estimated credits the edit reserves when it starts, from the job's own pricing. The real call reserves the same figure and is charged its actual cost, usually within a few percent of it.
|
|
160
|
+
*
|
|
161
|
+
* PREVIEW FIRST (optional). `"preview_first_frame": true` edits ONE still of the clip and returns it with the clip's price, and nothing else runs. Look at it, then send the same request with `preview_still` set to the still to render the clip matched to it. A preview is one image edit; with `dry_run` it is priced, not made.
|
|
162
|
+
*
|
|
163
|
+
* ASYNC. A real clip call answers `202` with the job inside; poll `GET /v1/jobs/{id}` or name a `callback_url`.
|
|
164
|
+
*/
|
|
165
|
+
export declare const createEdit: <ThrowOnError extends boolean = false>(options: Options<CreateEditData, ThrowOnError>) => RequestResult<CreateEditResponses, CreateEditErrors, ThrowOnError>;
|
|
166
|
+
/**
|
|
167
|
+
* List the profile’s Library
|
|
168
|
+
*
|
|
169
|
+
* Every image and video this profile has made in Hermoso, newest first: the same Library the app shows. Each `url` is a durable public file; a video carries a `poster_url` still.
|
|
170
|
+
*/
|
|
171
|
+
export declare const listLibrary: <ThrowOnError extends boolean = false>(options?: Options<ListLibraryData, ThrowOnError>) => RequestResult<ListLibraryResponses, ListLibraryErrors, ThrowOnError>;
|
|
172
|
+
/**
|
|
173
|
+
* Download a Hermoso file
|
|
174
|
+
*
|
|
175
|
+
* The bytes of a file Hermoso made or hosts (a Library `url`, a job `url`), streamed with its own `Content-Type`. Only Hermoso-hosted files are served; any other address is refused. For an app that has to hand raw bytes to its host (a design editor inserting the file) and cannot read our file host directly.
|
|
176
|
+
*/
|
|
177
|
+
export declare const getMediaContent: <ThrowOnError extends boolean = false>(options?: Options<GetMediaContentData, ThrowOnError>) => RequestResult<GetMediaContentResponses, GetMediaContentErrors, ThrowOnError>;
|
|
178
|
+
/**
|
|
179
|
+
* Start an agentic signup
|
|
180
|
+
*
|
|
181
|
+
* Create a Hermoso account programmatically, with no human at a browser and no existing credential — the one call in this API that needs no key, because the key is what it creates. Returns a Stripe Checkout URL and a one-time `claim_token`.
|
|
182
|
+
*
|
|
183
|
+
* AGENTIC SIGNUP REQUIRES A PAID PLAN. Nothing is created here: no account, no credits, no row. An account exists only once Stripe reports the payment completed, at which point `POST /v1/signup/{id}/claim` provisions it and returns your API key. The free plan is not available on this path — it is available to a person signing up at https://app.hermoso.ai.
|
|
184
|
+
*
|
|
185
|
+
* A card is entered on Stripe’s own hosted page, never here, so the checkout step itself needs a browser: hand `checkout_url` to whoever is paying. `claim_token` is returned exactly once and is the only proof this signup is yours — a checkout session id alone is not enough, because session ids travel in URLs.
|
|
186
|
+
*/
|
|
187
|
+
export declare const createSignup: <ThrowOnError extends boolean = false>(options: Options<CreateSignupData, ThrowOnError>) => RequestResult<CreateSignupResponses, CreateSignupErrors, ThrowOnError>;
|
|
188
|
+
/**
|
|
189
|
+
* Claim a paid signup (poll until ready)
|
|
190
|
+
*
|
|
191
|
+
* Poll this until `status` is `ready`. While payment is outstanding it answers `awaiting_payment` and creates nothing. Once Stripe reports the payment completed it provisions the account, applies the plan and its credits, and returns `api_key` — ONCE.
|
|
192
|
+
*
|
|
193
|
+
* The key is stored only as a hash and can never be re-read. If you lose the response, re-claiming inside 24 hours mints a replacement and revokes the previous key, so a signup never leaves two live credentials behind. After that window there is no self-serve recovery: an agentic account has a synthetic identity and no mailbox to send a link to. Billing is always recoverable regardless — the payer receives Stripe’s receipts and can manage or cancel the subscription from Stripe’s own portal.
|
|
194
|
+
*/
|
|
195
|
+
export declare const claimSignup: <ThrowOnError extends boolean = false>(options: Options<ClaimSignupData, ThrowOnError>) => RequestResult<ClaimSignupResponses, ClaimSignupErrors, ThrowOnError>;
|
|
196
|
+
/**
|
|
197
|
+
* List the registered redirect addresses
|
|
198
|
+
*
|
|
199
|
+
* The https addresses connect links may send your customers back to. A link’s `redirect_url` must sit under one of them: same scheme, host and port, and a path that starts with the registered path at a `/` boundary. Account-wide.
|
|
200
|
+
*/
|
|
201
|
+
export declare const getConnectRedirects: <ThrowOnError extends boolean = false>(options?: Options<GetConnectRedirectsData, ThrowOnError>) => RequestResult<GetConnectRedirectsResponses, GetConnectRedirectsErrors, ThrowOnError>;
|
|
202
|
+
/**
|
|
203
|
+
* Replace the registered redirect addresses
|
|
204
|
+
*
|
|
205
|
+
* Replaces the whole list (an empty list removes them all). https only; `http://localhost` is accepted for local testing. No query string, fragment, credentials or wildcard — register an exact origin, optionally with a path prefix. Up to 20.
|
|
206
|
+
*/
|
|
207
|
+
export declare const setConnectRedirects: <ThrowOnError extends boolean = false>(options: Options<SetConnectRedirectsData, ThrowOnError>) => RequestResult<SetConnectRedirectsResponses, SetConnectRedirectsErrors, ThrowOnError>;
|
|
208
|
+
/**
|
|
209
|
+
* Create a connect link for your customer
|
|
210
|
+
*
|
|
211
|
+
* A short-lived hosted link that lets someone with NO Hermoso login connect their own account (Facebook and Instagram, Instagram, TikTok, YouTube, LinkedIn, X, Pinterest, Threads, Google Business Profile and the ad platforms) to the brand named by `X-Hermoso-User`. Hand `url` to your customer. They see a short page from Hermoso, accept Hermoso’s Terms and Privacy Policy, sign in on the platform’s own consent screen, and land on your `redirect_url` with `connect_status` (success | cancelled | error), `provider`, `brand`, `link_id`, `account`, `error_code` and your `state` added to its query string (a same-named parameter of yours is overwritten).
|
|
212
|
+
*
|
|
213
|
+
* THE PLATFORM’S CONSENT SCREEN SHOWS HERMOSO’S NAME, because the connection is made with Hermoso’s app on that platform.
|
|
214
|
+
*
|
|
215
|
+
* A link connects ONE provider to ONE brand. It can be retried after a cancel until it expires, and is spent once an account connects. Know when it connects from the `account.connected` webhook event (connect a webhook on the brand and include the `connections` group) or by polling GET /v1/connect-links/{id}. Facebook and LinkedIn then need the Pages chosen: call list_connector_accounts and set_connector_accounts through /v1/tools (the link’s creator owns that choice). Accounts that connect with a pasted key (Bluesky, Telegram) are connected with POST /v1/tools/connect_connector instead.
|
|
216
|
+
*/
|
|
217
|
+
export declare const createConnectLink: <ThrowOnError extends boolean = false>(options: Options<CreateConnectLinkData, ThrowOnError>) => RequestResult<CreateConnectLinkResponses, CreateConnectLinkErrors, ThrowOnError>;
|
|
218
|
+
/**
|
|
219
|
+
* Cancel a connect link
|
|
220
|
+
*
|
|
221
|
+
* The link stops working at once. A link that already connected an account cannot be revoked; remove that connection with DELETE /v1/connections/{provider}.
|
|
222
|
+
*/
|
|
223
|
+
export declare const revokeConnectLink: <ThrowOnError extends boolean = false>(options: Options<RevokeConnectLinkData, ThrowOnError>) => RequestResult<RevokeConnectLinkResponses, RevokeConnectLinkErrors, ThrowOnError>;
|
|
224
|
+
/**
|
|
225
|
+
* Retrieve a connect link
|
|
226
|
+
*
|
|
227
|
+
* `status` is pending, opened, connected, cancelled, failed, expired or revoked. Once connected, `account` names what was connected. Kept for 7 days after the link expires.
|
|
228
|
+
*/
|
|
229
|
+
export declare const getConnectLink: <ThrowOnError extends boolean = false>(options: Options<GetConnectLinkData, ThrowOnError>) => RequestResult<GetConnectLinkResponses, GetConnectLinkErrors, ThrowOnError>;
|
|
230
|
+
/**
|
|
231
|
+
* List the brand’s connected accounts
|
|
232
|
+
*
|
|
233
|
+
* Every account connected to the brand named by `X-Hermoso-User`: the provider, the account name, every account on a channel that holds several, and whether it needs reconnecting. A read that fails is a 503, never an empty list.
|
|
234
|
+
*/
|
|
235
|
+
export declare const listConnections: <ThrowOnError extends boolean = false>(options?: Options<ListConnectionsData, ThrowOnError>) => RequestResult<ListConnectionsResponses, ListConnectionsErrors, ThrowOnError>;
|
|
236
|
+
/**
|
|
237
|
+
* Disconnect an account from the brand
|
|
238
|
+
*
|
|
239
|
+
* Removes the connection from THIS brand only. It never revokes Hermoso’s access at the platform, so the same account keeps working on any other brand it is connected to; the account holder removes that access in the platform’s own settings. Pass `account` to remove one account from a channel that holds several. Posts already published are not affected.
|
|
240
|
+
*/
|
|
241
|
+
export declare const deleteConnection: <ThrowOnError extends boolean = false>(options: Options<DeleteConnectionData, ThrowOnError>) => RequestResult<DeleteConnectionResponses, DeleteConnectionErrors, ThrowOnError>;
|
|
242
|
+
/**
|
|
243
|
+
* List stored conversion events
|
|
244
|
+
*
|
|
245
|
+
* Stored events, newest first, each with its latest delivery per platform. Identifiers are never returned, only whether each was present.
|
|
246
|
+
*/
|
|
247
|
+
export declare const listConversionEvents: <ThrowOnError extends boolean = false>(options?: Options<ListConversionEventsData, ThrowOnError>) => RequestResult<ListConversionEventsResponses, ListConversionEventsErrors, ThrowOnError>;
|
|
248
|
+
/**
|
|
249
|
+
* Send conversion events to every destination
|
|
250
|
+
*
|
|
251
|
+
* Sends each event ONCE to every ad platform conversions API saved for the brand (GET /v1/events/destinations), or to the `destinations` given. Plain identifiers in, hashed per platform on our server; every platform gets the same `event_id` as its dedup key. Each destination reports on its own, read back from the platform. `validate_only` / `test_code` is a dry run that reaches only platforms with a mode that records nothing and skips the rest by name (never Meta, which keeps test events). `forward: false` stores events (page views, touches) without sending them. Non-test events are stored with identifiers hashed. Free.
|
|
252
|
+
*/
|
|
253
|
+
export declare const sendConversionEvents: <ThrowOnError extends boolean = false>(options: Options<SendConversionEventsData, ThrowOnError>) => RequestResult<SendConversionEventsResponses, SendConversionEventsErrors, ThrowOnError>;
|
|
254
|
+
/**
|
|
255
|
+
* List event destinations
|
|
256
|
+
*
|
|
257
|
+
* The ad platform conversions APIs events go to, and for each platform what a destination needs, its test mode and its dedup key.
|
|
258
|
+
*/
|
|
259
|
+
export declare const listConversionDestinations: <ThrowOnError extends boolean = false>(options?: Options<ListConversionDestinationsData, ThrowOnError>) => RequestResult<ListConversionDestinationsResponses, ListConversionDestinationsErrors, ThrowOnError>;
|
|
260
|
+
/**
|
|
261
|
+
* Add an event destination
|
|
262
|
+
*
|
|
263
|
+
* One platform destination: `platform` plus its ids (see `platforms` on GET). Meta pixels, Amazon profiles and LinkedIn rules are checked against the brand’s own account now; others on the first send. A ChatGPT Ads `api_key` is stored encrypted and never returned. LinkedIn and Microsoft need `event_names`. Google Ads is refused by name: Google no longer takes uploads from new integrations.
|
|
264
|
+
*/
|
|
265
|
+
export declare const createConversionDestination: <ThrowOnError extends boolean = false>(options: Options<CreateConversionDestinationData, ThrowOnError>) => RequestResult<CreateConversionDestinationResponses, CreateConversionDestinationErrors, ThrowOnError>;
|
|
266
|
+
/**
|
|
267
|
+
* Remove an event destination
|
|
268
|
+
*
|
|
269
|
+
* Events already sent stay on that platform.
|
|
270
|
+
*/
|
|
271
|
+
export declare const deleteConversionDestination: <ThrowOnError extends boolean = false>(options: Options<DeleteConversionDestinationData, ThrowOnError>) => RequestResult<DeleteConversionDestinationResponses, DeleteConversionDestinationErrors, ThrowOnError>;
|
|
272
|
+
/**
|
|
273
|
+
* One customer’s journey
|
|
274
|
+
*
|
|
275
|
+
* Every touch and conversion of one person, oldest first, with lifetime value per currency. Name them by `email`, `phone`, `external_id`, `visitor_id` or a `customer` key from GET /v1/events/customers. People are tied together across events by any identifier they share.
|
|
276
|
+
*/
|
|
277
|
+
export declare const getConversionJourney: <ThrowOnError extends boolean = false>(options?: Options<GetConversionJourneyData, ThrowOnError>) => RequestResult<GetConversionJourneyResponses, GetConversionJourneyErrors, ThrowOnError>;
|
|
278
|
+
/**
|
|
279
|
+
* Customers who converted
|
|
280
|
+
*
|
|
281
|
+
* Everyone with a conversion in the window, most valuable first, with their touch path and lifetime value.
|
|
282
|
+
*/
|
|
283
|
+
export declare const listConversionCustomers: <ThrowOnError extends boolean = false>(options?: Options<ListConversionCustomersData, ThrowOnError>) => RequestResult<ListConversionCustomersResponses, ListConversionCustomersErrors, ThrowOnError>;
|
|
284
|
+
/**
|
|
285
|
+
* Touch paths that lead to conversions
|
|
286
|
+
*
|
|
287
|
+
* The most frequent sequences of touches (ad clicks by platform, organic search, social, referral, email) before a conversion in the window. Only conversions with more than one touch have a path.
|
|
288
|
+
*/
|
|
289
|
+
export declare const listConversionPaths: <ThrowOnError extends boolean = false>(options?: Options<ListConversionPathsData, ThrowOnError>) => RequestResult<ListConversionPathsResponses, ListConversionPathsErrors, ThrowOnError>;
|
|
290
|
+
/**
|
|
291
|
+
* Buyer cohorts by first purchase month and first channel
|
|
292
|
+
*
|
|
293
|
+
* Cumulative revenue at months 0, 1, 3, 6 and 12 after the first purchase, per currency. A month not reached yet is null.
|
|
294
|
+
*/
|
|
295
|
+
export declare const getConversionLtv: <ThrowOnError extends boolean = false>(options?: Options<GetConversionLtvData, ThrowOnError>) => RequestResult<GetConversionLtvResponses, GetConversionLtvErrors, ThrowOnError>;
|
|
296
|
+
/**
|
|
297
|
+
* Delivery accuracy per destination
|
|
298
|
+
*
|
|
299
|
+
* Per destination over the window: real sales, how many were sent, accepted, failed or never sent (with the reasons), and how many events carried an identifier the platform matches on.
|
|
300
|
+
*/
|
|
301
|
+
export declare const getConversionAccuracy: <ThrowOnError extends boolean = false>(options?: Options<GetConversionAccuracyData, ThrowOnError>) => RequestResult<GetConversionAccuracyResponses, GetConversionAccuracyErrors, ThrowOnError>;
|
|
302
|
+
/**
|
|
303
|
+
* Retract a stored event
|
|
304
|
+
*
|
|
305
|
+
* Removes it from Hermoso’s records (journeys, LTV, profit). No conversions API deletes a sent conversion, so the platforms keep it.
|
|
306
|
+
*/
|
|
307
|
+
export declare const retractConversionEvent: <ThrowOnError extends boolean = false>(options: Options<RetractConversionEventData, ThrowOnError>) => RequestResult<RetractConversionEventResponses, RetractConversionEventErrors, ThrowOnError>;
|
|
308
|
+
/**
|
|
309
|
+
* Retrieve one stored event and its deliveries
|
|
310
|
+
*/
|
|
311
|
+
export declare const getConversionEvent: <ThrowOnError extends boolean = false>(options: Options<GetConversionEventData, ThrowOnError>) => RequestResult<GetConversionEventResponses, GetConversionEventErrors, ThrowOnError>;
|
|
312
|
+
/**
|
|
313
|
+
* Change a stored event’s value
|
|
314
|
+
*
|
|
315
|
+
* For journeys, LTV and profit. The ad platforms keep the value they were sent; send the event again with the same `event_id` to correct it there.
|
|
316
|
+
*/
|
|
317
|
+
export declare const updateConversionEvent: <ThrowOnError extends boolean = false>(options: Options<UpdateConversionEventData, ThrowOnError>) => RequestResult<UpdateConversionEventResponses, UpdateConversionEventErrors, ThrowOnError>;
|
|
318
|
+
/**
|
|
319
|
+
* List uploaded results
|
|
320
|
+
*/
|
|
321
|
+
export declare const listCampaignResults: <ThrowOnError extends boolean = false>(options?: Options<ListCampaignResultsData, ThrowOnError>) => RequestResult<ListCampaignResultsResponses, ListCampaignResultsErrors, ThrowOnError>;
|
|
322
|
+
/**
|
|
323
|
+
* Upload your own results per campaign
|
|
324
|
+
*
|
|
325
|
+
* Daily numbers per campaign (sales, revenue, qualified_leads, cogs, gross_profit or any snake_case metric), each row naming its campaign by exactly one of `campaign_id`, `utm_campaign` or `campaign_name`. Re-sending a day replaces it. Or send `csv`. Up to 1,000 rows.
|
|
326
|
+
*/
|
|
327
|
+
export declare const uploadCampaignResults: <ThrowOnError extends boolean = false>(options: Options<UploadCampaignResultsData, ThrowOnError>) => RequestResult<UploadCampaignResultsResponses, UploadCampaignResultsErrors, ThrowOnError>;
|
|
328
|
+
/**
|
|
329
|
+
* Get your margin and cost per order
|
|
330
|
+
*/
|
|
331
|
+
export declare const getProfitSettings: <ThrowOnError extends boolean = false>(options?: Options<GetProfitSettingsData, ThrowOnError>) => RequestResult<GetProfitSettingsResponses, GetProfitSettingsErrors, ThrowOnError>;
|
|
332
|
+
/**
|
|
333
|
+
* Set your margin and cost per order
|
|
334
|
+
*
|
|
335
|
+
* profit = revenue × margin_percent / 100 − sales × cost_per_order; poas = profit ÷ spend; profit_after_ads = profit − spend. `margin_percent: null` removes profit. `campaign_margins` overrides the margin per campaign.
|
|
336
|
+
*/
|
|
337
|
+
export declare const setProfitSettings: <ThrowOnError extends boolean = false>(options: Options<SetProfitSettingsData, ThrowOnError>) => RequestResult<SetProfitSettingsResponses, SetProfitSettingsErrors, ThrowOnError>;
|
|
338
|
+
/**
|
|
339
|
+
* Profit per campaign
|
|
340
|
+
*
|
|
341
|
+
* Each campaign’s spend read live from every connected ad platform, joined to the brand’s sales from ONE source per campaign (uploaded results, else conversion events credited by `model`, else Shopify / Stripe orders matched by utm_campaign). Money stays per currency; a platform that could not be read is listed in `unreadable`, never shown as zero. At most 92 days.
|
|
342
|
+
*/
|
|
343
|
+
export declare const getCampaignProfit: <ThrowOnError extends boolean = false>(options?: Options<GetCampaignProfitData, ThrowOnError>) => RequestResult<GetCampaignProfitResponses, GetCampaignProfitErrors, ThrowOnError>;
|
|
344
|
+
/**
|
|
345
|
+
* Get the brand’s Hermoso tag
|
|
346
|
+
*
|
|
347
|
+
* The brand’s first-party website tag: the snippet to put in every page’s <head>, its settings, and whether it is firing (the last event seen and from which hosts). Made on the first call. It records page views, each visit’s UTM parameters and ad click ids, the referrer and the conversions the site reports, and forwards conversions server-side to every saved event destination (GET /v1/events/destinations) with one dedup `event_id`. The website owner is responsible for the site’s consent banner and privacy notice; the tag follows the consent the site gives it. Free.
|
|
348
|
+
*/
|
|
349
|
+
export declare const getTag: <ThrowOnError extends boolean = false>(options?: Options<GetTagData, ThrowOnError>) => RequestResult<GetTagResponses, GetTagErrors, ThrowOnError>;
|
|
350
|
+
/**
|
|
351
|
+
* Change the tag’s settings, or verify it on the site
|
|
352
|
+
*
|
|
353
|
+
* `action: "update"` (default) sets any of `consent_default` (granted | denied), `wait_for_consent`, `honor_gpc`, `honor_dnt`, `forward`, `forward_events`, `allowed_domains`, `spa`, `test_mode` ("validate", a TikTok / Reddit test code, or "off") and `conversions` (the brand’s own events counted as conversions: `{"quote_requested": {"as": "Lead"}}`). `action: "verify"` reads the site (`url`, default the brand’s website) for the snippet and reports the last event seen. Also `auto_track` ({forms, outbound, downloads, scroll}) and `link_domains` (cross-domain). `action: "server_key"` returns a new server key ONCE for `POST /htag/s` (a backend’s own endpoint, Authorization: Bearer htsk_…); `action: "stripe"` with `signing_secret` (whsec_…) turns a Stripe webhook into Purchases through the tag. Free.
|
|
354
|
+
*/
|
|
355
|
+
export declare const updateTag: <ThrowOnError extends boolean = false>(options: Options<UpdateTagData, ThrowOnError>) => RequestResult<UpdateTagResponses, UpdateTagErrors, ThrowOnError>;
|
|
356
|
+
/**
|
|
357
|
+
* Put the Hermoso tag on the website
|
|
358
|
+
*
|
|
359
|
+
* Through the site connection the brand has: `google_tag_manager`, `wordpress`, `shopify` (an app pixel in Shopify customer events, which also sees checkout) or `manual` (the snippet and where to paste it). Without `confirm: true` nothing is written and the reply says what would change. `remove: true` uninstalls what Hermoso added. Free.
|
|
360
|
+
*/
|
|
361
|
+
export declare const installTag: <ThrowOnError extends boolean = false>(options: Options<InstallTagData, ThrowOnError>) => RequestResult<InstallTagResponses, InstallTagErrors, ThrowOnError>;
|
|
362
|
+
/**
|
|
363
|
+
* Visits, leads and revenue by source
|
|
364
|
+
*
|
|
365
|
+
* Visits → leads → purchases → revenue (per currency) from the tag, grouped by `group_by`: channel (default), source, medium, campaign, post, ad or page. UTC days, at most 92; bots are left out and test events reported apart. Free.
|
|
366
|
+
*/
|
|
367
|
+
export declare const getTagReport: <ThrowOnError extends boolean = false>(options?: Options<GetTagReportData, ThrowOnError>) => RequestResult<GetTagReportResponses, GetTagReportErrors, ThrowOnError>;
|
|
368
|
+
/**
|
|
369
|
+
* Recent events from the tag
|
|
370
|
+
*
|
|
371
|
+
* The newest events the tag received (conversions by default, visits, or all), each with its page, source and medium, value, and what each ad platform answered when it was forwarded. Free.
|
|
372
|
+
*/
|
|
373
|
+
export declare const listTagEvents: <ThrowOnError extends boolean = false>(options?: Options<ListTagEventsData, ThrowOnError>) => RequestResult<ListTagEventsResponses, ListTagEventsErrors, ThrowOnError>;
|
|
374
|
+
/**
|
|
375
|
+
* Send server-side events into the tag
|
|
376
|
+
*
|
|
377
|
+
* Conversions the browser never saw (a renewal, a phone order, a payment confirmed after the page closed), in the `POST /v1/events` shape: `events: [{ event_name, event_id, value, currency, user: { email, phone, external_id, visitor_id }, source_url }]`, 1 to 500. Send the SAME `event_id` the browser sent and every platform counts one sale. Forwarded to the brand’s event destinations and counted in the tag’s report like the browser’s. Free.
|
|
378
|
+
*/
|
|
379
|
+
export declare const sendTagEvents: <ThrowOnError extends boolean = false>(options: Options<SendTagEventsData, ThrowOnError>) => RequestResult<SendTagEventsResponses, SendTagEventsErrors, ThrowOnError>;
|
|
380
|
+
/**
|
|
381
|
+
* Visitor segments from the tag
|
|
382
|
+
*
|
|
383
|
+
* The brand’s segments of website visitors seen by the tag, each with how many match now, how many are identified (the site gave an email or phone) and how many allowed ad use, plus its past syncs. Free.
|
|
384
|
+
*/
|
|
385
|
+
export declare const listTagAudiences: <ThrowOnError extends boolean = false>(options?: Options<ListTagAudiencesData, ThrowOnError>) => RequestResult<ListTagAudiencesResponses, ListTagAudiencesErrors, ThrowOnError>;
|
|
386
|
+
/**
|
|
387
|
+
* Save, preview, delete or sync a visitor segment
|
|
388
|
+
*
|
|
389
|
+
* `action`: `preview` (default; counts a rule set, saves nothing), `save` (`name` and rules `visited` (page path prefixes), `events` (any of), `not_events` (none of), `within_days` 1-180; `segment_id` to edit), `delete` (`segment_id`, `confirm: true`) or `sync` (`segment_id`, `platform` meta | google_ads | snapchat_ads | pinterest_ads | x_ads, `audience_id` (Meta: omit for a new audience; `ad_account_id`), `accept_terms` for Google Customer Match, `confirm: true`). A sync sends ONLY identified visitors whose latest consent allowed ad use, as SHA-256 hashes; without `confirm` it says what it would send and sends nothing. Free.
|
|
390
|
+
*/
|
|
391
|
+
export declare const tagAudiences: <ThrowOnError extends boolean = false>(options: Options<TagAudiencesData, ThrowOnError>) => RequestResult<TagAudiencesResponses, TagAudiencesErrors, ThrowOnError>;
|
|
392
|
+
/**
|
|
393
|
+
* Retrieve the contact email and whether it is verified
|
|
394
|
+
*
|
|
395
|
+
* The mailbox named at signup and whether its verification link has been clicked. The account works either way; a verified address is where receipts, low-credit alerts and replies to bug reports go. The address is NEVER the account identity and can never be used to sign in to, link, or merge accounts.
|
|
396
|
+
*/
|
|
397
|
+
export declare const getContactEmail: <ThrowOnError extends boolean = false>(options?: Options<GetContactEmailData, ThrowOnError>) => RequestResult<GetContactEmailResponses, GetContactEmailErrors, ThrowOnError>;
|
|
398
|
+
/**
|
|
399
|
+
* Re-send the verification link, or set a different contact email
|
|
400
|
+
*
|
|
401
|
+
* With no body, re-sends the verification link to the current contact address (at most once every 10 minutes — 429 `verification_recently_sent` otherwise). With `email`, replaces the contact address and starts verification over for the new one. An address that is already the sign-in email of another Hermoso account cannot be verified here (409 `email_in_use` when the link is clicked) and this account stays exactly as it is.
|
|
402
|
+
*/
|
|
403
|
+
export declare const resendEmailVerification: <ThrowOnError extends boolean = false>(options: Options<ResendEmailVerificationData, ThrowOnError>) => RequestResult<ResendEmailVerificationResponses, ResendEmailVerificationErrors, ThrowOnError>;
|
|
404
|
+
/**
|
|
405
|
+
* Best time to post
|
|
406
|
+
*
|
|
407
|
+
* From this brand's own measured posts, per channel, on `timezone`: a day × hour grid (`slots`, one row per channel and slot with the post count, the average engagement and the lift against that channel's usual), the best weekday and 3-hour band where one beat the usual by 15% over at least 5 posts, and Instagram's followers-online hours when Instagram is connected. Raw numbers are never pooled across channels; below 15 measured posts nothing is named and `why` says how many there are. `day_of_week` 0 = Monday.
|
|
408
|
+
*/
|
|
409
|
+
export declare const getBestTime: <ThrowOnError extends boolean = false>(options?: Options<GetBestTimeData, ThrowOnError>) => RequestResult<GetBestTimeResponses, GetBestTimeErrors, ThrowOnError>;
|
|
410
|
+
/**
|
|
411
|
+
* Posting frequency vs engagement
|
|
412
|
+
*
|
|
413
|
+
* Per channel, completed weeks only (the last 180 days): for each posts-per-week, the weeks observed, the average engagement per post, the average engagement rate and the average follower change in those weeks. `frequency` has one row per (platform, posts_per_week); each channel names `best`, the highest cadence before engagement per post drops by 15%, once two cadences have 3+ measured weeks each.
|
|
414
|
+
*/
|
|
415
|
+
export declare const getPostingFrequency: <ThrowOnError extends boolean = false>(options?: Options<GetPostingFrequencyData, ThrowOnError>) => RequestResult<GetPostingFrequencyResponses, GetPostingFrequencyErrors, ThrowOnError>;
|
|
416
|
+
/**
|
|
417
|
+
* Content decay
|
|
418
|
+
*
|
|
419
|
+
* How fast posts stop earning: for each age bucket (0-6h … 30d+), the average share of a post's final engagement (and, separately, of its final reach) reached by then, from posts with two or more readings and a settled reading 6+ days after posting. Per channel, plus `buckets` pooled across channels (a share is unitless, so pooling it is legitimate where pooling raw numbers is not).
|
|
420
|
+
*/
|
|
421
|
+
export declare const getContentDecay: <ThrowOnError extends boolean = false>(options?: Options<GetContentDecayData, ThrowOnError>) => RequestResult<GetContentDecayResponses, GetContentDecayErrors, ThrowOnError>;
|
|
422
|
+
/**
|
|
423
|
+
* Follower history
|
|
424
|
+
*
|
|
425
|
+
* Follower count over time for every connected account (read once a day): one point per day, week or month with the change since the period before, up to a year (a longer range is cut and `warning` says so). A day whose read failed is a gap with its reason in `gaps`, never a 0. YouTube keeps its counts without a change (its API policy forbids derived numbers).
|
|
426
|
+
*/
|
|
427
|
+
export declare const getFollowerHistory: <ThrowOnError extends boolean = false>(options?: Options<GetFollowerHistoryData, ThrowOnError>) => RequestResult<GetFollowerHistoryResponses, GetFollowerHistoryErrors, ThrowOnError>;
|
|
428
|
+
/**
|
|
429
|
+
* Inbox stats
|
|
430
|
+
*
|
|
431
|
+
* Across every connected messaging channel (WhatsApp, Messenger, Instagram, Telegram, SMS, LINE, Slack, Discord, email; X only with `include_x=true`, which X bills per message read): messages received and sent per day (`timeseries`) and per channel (`byPlatform`), a day × hour `heatmap` on `timezone` with the busiest hours (`dow` 1 = Monday), `responseTime` (median, p90, p99, mean, fastest, slowest and a histogram, measured from the other person's message to the brand's next reply in the same conversation), reply rate, the receiving accounts by load (`topAccounts`), per-conversation rows (`conversations`) and who is `waiting` now. Hermoso keeps each message's time and direction, never its text, from when the inbox was first read; `coverage` says since when and which channels could not be read.
|
|
432
|
+
*/
|
|
433
|
+
export declare const getInboxStats: <ThrowOnError extends boolean = false>(options?: Options<GetInboxStatsData, ThrowOnError>) => RequestResult<GetInboxStatsResponses, GetInboxStatsErrors, ThrowOnError>;
|