@mentio-dev/sdk 0.2.2 → 0.3.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/README.md +187 -6
- package/dist/index.d.ts +106 -2
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -1,25 +1,206 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Mentio TypeScript SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@mentio-dev/sdk)
|
|
4
|
+
[](./LICENSE)
|
|
5
|
+
[](https://docs.mentio.dev/sdks/typescript)
|
|
6
|
+
|
|
7
|
+
Social listening for developers, typed. [Mentio](https://mentio.dev) watches Reddit, Hacker News, X, GitHub, Bluesky, LinkedIn, Stack Overflow, DEV, YouTube and news for your keywords and scores every mention for relevance, sentiment and intent. This package is the official TypeScript client for its API: one function per endpoint, generated from the OpenAPI document, request and response types included. Node 22+, Bun, Deno and browsers. No runtime dependencies.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
4
10
|
|
|
5
11
|
```bash
|
|
6
12
|
npm install @mentio-dev/sdk
|
|
7
13
|
```
|
|
8
14
|
|
|
15
|
+
## Quick start
|
|
16
|
+
|
|
9
17
|
```ts
|
|
10
18
|
import { createMentio } from '@mentio-dev/sdk';
|
|
11
19
|
|
|
12
20
|
const mentio = createMentio({ apiKey: process.env.MENTIO_API_KEY! });
|
|
13
21
|
|
|
22
|
+
// Track a keyword on two platforms.
|
|
23
|
+
await mentio.createKeyword({ body: { term: 'acme cloud', kind: 'brand', platforms: ['reddit', 'x'] } });
|
|
24
|
+
|
|
25
|
+
// Read what arrived, relevant posts only, newest first.
|
|
14
26
|
const { data, error } = await mentio.searchMentions({
|
|
15
27
|
query: { platform: 'reddit', relevant: true, limit: 25 },
|
|
16
28
|
});
|
|
17
|
-
if (error) throw new Error(error.error.message);
|
|
29
|
+
if (error) throw new Error(`${error.error.code}: ${error.error.message}`);
|
|
30
|
+
|
|
18
31
|
for (const mention of data.data) {
|
|
19
|
-
console.log(mention.post.platform, mention.classification?.relevance, mention.post.url);
|
|
32
|
+
console.log(mention.post.platform, mention.classification?.relevance, mention.classification?.intents, mention.post.url);
|
|
20
33
|
}
|
|
21
34
|
```
|
|
22
35
|
|
|
23
|
-
|
|
36
|
+
An API key comes from the dashboard (Settings, API keys) or from `POST /v1/api-keys`. Every account starts with $5.80 of credit and no card.
|
|
37
|
+
|
|
38
|
+
## Configuration
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
const mentio = createMentio({
|
|
42
|
+
apiKey: 'mk_live_...', // required
|
|
43
|
+
baseUrl: 'https://api.mentio.dev', // another deployment's host, if you run one
|
|
44
|
+
fetch: customFetch, // tests, or a runtime without a global fetch
|
|
45
|
+
headers: { 'x-request-id': 'my-id' }, // sent on every request; the id comes back on the response
|
|
46
|
+
});
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Every call resolves to `{ data, error, request, response }` and never throws on a non-2xx. Pass `throwOnError: true` on a call to get `data` alone and an exception instead:
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
const keyword = await mentio.getKeyword({ path: { id: 'kw_...' }, throwOnError: true });
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`mentio.client` is the underlying client for interceptors and raw requests:
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
mentio.client.interceptors.response.use((response) => {
|
|
59
|
+
console.log(response.status, response.headers.get('x-request-id'));
|
|
60
|
+
return response;
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Examples
|
|
65
|
+
|
|
66
|
+
### Page through every mention of the last week
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
let cursor: string | undefined;
|
|
70
|
+
do {
|
|
71
|
+
const { data } = await mentio.searchMentions({
|
|
72
|
+
query: { since: '2026-09-07T00:00:00Z', relevant: true, limit: 100, cursor },
|
|
73
|
+
throwOnError: true,
|
|
74
|
+
});
|
|
75
|
+
for (const mention of data.data) console.log(mention.post.url);
|
|
76
|
+
cursor = data.nextCursor ?? undefined;
|
|
77
|
+
} while (cursor);
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Filter by intent and sentiment
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
const { data } = await mentio.searchMentions({
|
|
84
|
+
query: { intent: 'buy_intent', sentiment: 'negative', minFollowers: 1000, sort: 'priority' },
|
|
85
|
+
throwOnError: true,
|
|
86
|
+
});
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Intents are `buy_intent`, `question`, `complaint`, `praise` and `comparison`. `sort: 'priority'` puts fresh, relevant, high-reach posts first.
|
|
90
|
+
|
|
91
|
+
### Triage
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
await mentio.updateMention({ path: { id: 'mm_...' }, body: { status: 'done', note: 'replied 2026-09-14' } });
|
|
95
|
+
await mentio.updateMention({ path: { id: 'mm_...' }, body: { status: 'ignored' } });
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### An instant Slack alert for buying signals on Reddit
|
|
99
|
+
|
|
100
|
+
```ts
|
|
101
|
+
const { data: channels } = await mentio.listChannels({ throwOnError: true });
|
|
102
|
+
const slack = channels.data.find((c) => c.kind === 'slack');
|
|
103
|
+
|
|
104
|
+
await mentio.createAlert({
|
|
105
|
+
body: {
|
|
106
|
+
name: 'Reddit buying signals',
|
|
107
|
+
mode: 'instant',
|
|
108
|
+
filter: { platforms: ['reddit'], intents: ['buy_intent'], minRelevance: 40 },
|
|
109
|
+
channelIds: slack ? [slack.id] : [],
|
|
110
|
+
},
|
|
111
|
+
throwOnError: true,
|
|
112
|
+
});
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Slack, Telegram, email and webhook channels are created with `createChannel`; `testAlert` sends a sample; `runAlertDigest` sends a daily alert's last 24 hours now.
|
|
116
|
+
|
|
117
|
+
### Analytics
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
const { data: summary } = await mentio.getAnalyticsSummary({
|
|
121
|
+
query: { range: '30d', compare: true, timezone: 'Europe/Madrid' },
|
|
122
|
+
throwOnError: true,
|
|
123
|
+
});
|
|
124
|
+
const { data: byPlatform } = await mentio.getAnalyticsBreakdown({ query: { range: '30d', by: 'platform' }, throwOnError: true });
|
|
125
|
+
const { data: sov } = await mentio.getShareOfVoice({ query: { range: '90d' }, throwOnError: true });
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### People
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
const { data: people } = await mentio.listPeople({ query: { platforms: ['x'], minFollowers: 5000 }, throwOnError: true });
|
|
132
|
+
await mentio.updatePerson({ path: { id: people.data[0].id }, body: { tags: ['influencer'], muted: false } });
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### CSV export
|
|
136
|
+
|
|
137
|
+
```ts
|
|
138
|
+
const { data: csv } = await mentio.exportMentionsCsv({ query: { since: '2026-09-01T00:00:00Z' }, throwOnError: true });
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Error handling
|
|
142
|
+
|
|
143
|
+
A non-2xx response comes back as `error` with a stable code, the message, and the request id to quote to support:
|
|
144
|
+
|
|
145
|
+
```ts
|
|
146
|
+
const { error } = await mentio.createKeyword({ body: { term: 'acme', kind: 'brand' } });
|
|
147
|
+
if (error) {
|
|
148
|
+
switch (error.error.code) {
|
|
149
|
+
case 'duplicate_keyword': // already tracked
|
|
150
|
+
case 'insufficient_balance': // top up from Billing
|
|
151
|
+
case 'keyword_limit_reached': // 500 keywords is an enterprise conversation
|
|
152
|
+
case 'rate_limited': // Retry-After is on the response
|
|
153
|
+
default:
|
|
154
|
+
console.error(error.error.code, error.error.message, error.error.requestId);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
The full catalog, with status and meaning, is at [docs.mentio.dev/errors](https://docs.mentio.dev/errors). Common ones: `unauthorized`, `forbidden`, `read_only_key`, `validation_error`, `not_found`, `invalid_cursor`, `rate_limited`, `duplicate_keyword`, `insufficient_balance`, `keyword_limit_reached`, `upstream_unavailable`, `internal_error`.
|
|
160
|
+
|
|
161
|
+
## SDK reference
|
|
162
|
+
|
|
163
|
+
One function per operation. Names match the [API reference](https://docs.mentio.dev/api/keywords/create-keyword).
|
|
164
|
+
|
|
165
|
+
| Resource | Functions |
|
|
166
|
+
| --- | --- |
|
|
167
|
+
| Keywords | `createKeyword`, `listKeywords`, `getKeyword`, `updateKeyword`, `deleteKeyword` |
|
|
168
|
+
| Mentions | `searchMentions`, `getMention`, `updateMention`, `exportMentionsCsv` |
|
|
169
|
+
| People | `listPeople`, `getPerson`, `updatePerson`, `mergePeople`, `splitPerson`, `exportPeopleCsv` |
|
|
170
|
+
| Segments | `listSegments`, `createSegment`, `getSegment`, `updateSegment`, `deleteSegment` |
|
|
171
|
+
| Alerts | `listAlerts`, `createAlert`, `getAlert`, `updateAlert`, `deleteAlert`, `testAlert`, `runAlertDigest` |
|
|
172
|
+
| Channels | `listChannels`, `createChannel`, `getChannel`, `updateChannel`, `deleteChannel`, `testChannel`, `rotateWebhookSecret`, `listChannelDeliveries` |
|
|
173
|
+
| Analytics | `getAnalyticsSummary`, `getAnalyticsSeries`, `getAnalyticsBreakdown`, `getShareOfVoice` |
|
|
174
|
+
| Company | `getCompany`, `updateCompany` |
|
|
175
|
+
| API keys | `createApiKey`, `listApiKeys`, `revokeApiKey` |
|
|
176
|
+
| System | `getHealth` |
|
|
177
|
+
|
|
178
|
+
Lists return `{ data, nextCursor }` (cursor lists) or `{ data, total }` (offset lists). Timestamps are ISO 8601 strings; instants in accept ISO or epoch milliseconds. The public word is `platform` everywhere.
|
|
179
|
+
|
|
180
|
+
## MCP server
|
|
181
|
+
|
|
182
|
+
The same API is available to Claude Code, Cursor, Codex, claude.ai and ChatGPT as tools, with no SDK at all:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
claude mcp add --transport http mentio https://mcp.mentio.dev/mcp
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Guide: [docs.mentio.dev/mcp](https://docs.mentio.dev/mcp).
|
|
189
|
+
|
|
190
|
+
## Requirements
|
|
191
|
+
|
|
192
|
+
- Node 22+, Bun, Deno, or a browser with `fetch`
|
|
193
|
+
- A Mentio API key
|
|
194
|
+
|
|
195
|
+
## Links
|
|
196
|
+
|
|
197
|
+
- [Documentation](https://docs.mentio.dev) and the [TypeScript guide](https://docs.mentio.dev/sdks/typescript)
|
|
198
|
+
- [API reference](https://docs.mentio.dev/api/keywords/create-keyword) and the [OpenAPI document](https://api.mentio.dev/v1/openapi.json)
|
|
199
|
+
- [Dashboard](https://app.mentio.dev)
|
|
200
|
+
- [Python SDK](https://github.com/mentio-dev/sdk-python), [CLI](https://github.com/mentio-dev/cli), [Claude Code skills](https://github.com/mentio-dev/claude-skills)
|
|
201
|
+
|
|
202
|
+
This repository is published from the Mentio monorepo on every release; regenerate from a checkout with `pnpm --filter @mentio-dev/sdk generate`.
|
|
203
|
+
|
|
204
|
+
## License
|
|
24
205
|
|
|
25
|
-
|
|
206
|
+
MIT.
|
package/dist/index.d.ts
CHANGED
|
@@ -456,6 +456,10 @@ type Mention = {
|
|
|
456
456
|
* Title and body, truncated to 8 KB at ingest.
|
|
457
457
|
*/
|
|
458
458
|
text: string;
|
|
459
|
+
/**
|
|
460
|
+
* Links the post carries, in the order written, at most 20. Empty for a post with none, and for posts ingested before September 2026.
|
|
461
|
+
*/
|
|
462
|
+
links: Array<string>;
|
|
459
463
|
/**
|
|
460
464
|
* When the post was published.
|
|
461
465
|
*/
|
|
@@ -2052,6 +2056,10 @@ type SearchMentionsData = {
|
|
|
2052
2056
|
* Only authors your workspace tagged with any of these (exact, case-sensitive). Repeatable, or comma-separated.
|
|
2053
2057
|
*/
|
|
2054
2058
|
tags?: Array<string> | null;
|
|
2059
|
+
/**
|
|
2060
|
+
* Only posts linking to any of these hosts, matched exactly and without `www.` (docs.mentio.dev). Repeatable, or comma-separated.
|
|
2061
|
+
*/
|
|
2062
|
+
linkHost?: Array<string> | null;
|
|
2055
2063
|
/**
|
|
2056
2064
|
* Substring search in the post text.
|
|
2057
2065
|
*/
|
|
@@ -2163,6 +2171,10 @@ type ExportMentionsCsvData = {
|
|
|
2163
2171
|
* Only authors your workspace tagged with any of these (exact, case-sensitive). Repeatable, or comma-separated.
|
|
2164
2172
|
*/
|
|
2165
2173
|
tags?: Array<string> | null;
|
|
2174
|
+
/**
|
|
2175
|
+
* Only posts linking to any of these hosts, matched exactly and without `www.` (docs.mentio.dev). Repeatable, or comma-separated.
|
|
2176
|
+
*/
|
|
2177
|
+
linkHost?: Array<string> | null;
|
|
2166
2178
|
/**
|
|
2167
2179
|
* Substring search in the post text.
|
|
2168
2180
|
*/
|
|
@@ -3631,6 +3643,84 @@ type RunAlertDigestResponses = {
|
|
|
3631
3643
|
};
|
|
3632
3644
|
};
|
|
3633
3645
|
type RunAlertDigestResponse = RunAlertDigestResponses[keyof RunAlertDigestResponses];
|
|
3646
|
+
type MuteAlertAuthorsData = {
|
|
3647
|
+
/**
|
|
3648
|
+
* Authors to add to or remove from the alert's muted list.
|
|
3649
|
+
*/
|
|
3650
|
+
body: {
|
|
3651
|
+
/**
|
|
3652
|
+
* Profile or post links (x.com/name, linkedin.com/in/name, reddit.com/user/name, a post URL), handles (@name, u/name), Bluesky DIDs or display names. A link is stored as the author's profile; a plain name or handle matches that name on every platform.
|
|
3653
|
+
*/
|
|
3654
|
+
authors: Array<string>;
|
|
3655
|
+
};
|
|
3656
|
+
path: {
|
|
3657
|
+
/**
|
|
3658
|
+
* Alert id (feed_...).
|
|
3659
|
+
*/
|
|
3660
|
+
id: string;
|
|
3661
|
+
};
|
|
3662
|
+
query?: never;
|
|
3663
|
+
url: '/v1/alerts/{id}/mute';
|
|
3664
|
+
};
|
|
3665
|
+
type MuteAlertAuthorsErrors = {
|
|
3666
|
+
/**
|
|
3667
|
+
* An entry names no person, or the alert would mute more than 200 authors
|
|
3668
|
+
*/
|
|
3669
|
+
400: ErrorResponse;
|
|
3670
|
+
/**
|
|
3671
|
+
* Missing or invalid API key
|
|
3672
|
+
*/
|
|
3673
|
+
401: ErrorResponse;
|
|
3674
|
+
/**
|
|
3675
|
+
* Rule not found
|
|
3676
|
+
*/
|
|
3677
|
+
404: ErrorResponse;
|
|
3678
|
+
};
|
|
3679
|
+
type MuteAlertAuthorsError = MuteAlertAuthorsErrors[keyof MuteAlertAuthorsErrors];
|
|
3680
|
+
type MuteAlertAuthorsResponses = {
|
|
3681
|
+
/**
|
|
3682
|
+
* The alert, with its muted list
|
|
3683
|
+
*/
|
|
3684
|
+
200: Alert;
|
|
3685
|
+
};
|
|
3686
|
+
type MuteAlertAuthorsResponse = MuteAlertAuthorsResponses[keyof MuteAlertAuthorsResponses];
|
|
3687
|
+
type UnmuteAlertAuthorsData = {
|
|
3688
|
+
/**
|
|
3689
|
+
* Authors to add to or remove from the alert's muted list.
|
|
3690
|
+
*/
|
|
3691
|
+
body: {
|
|
3692
|
+
/**
|
|
3693
|
+
* Profile or post links (x.com/name, linkedin.com/in/name, reddit.com/user/name, a post URL), handles (@name, u/name), Bluesky DIDs or display names. A link is stored as the author's profile; a plain name or handle matches that name on every platform.
|
|
3694
|
+
*/
|
|
3695
|
+
authors: Array<string>;
|
|
3696
|
+
};
|
|
3697
|
+
path: {
|
|
3698
|
+
/**
|
|
3699
|
+
* Alert id (feed_...).
|
|
3700
|
+
*/
|
|
3701
|
+
id: string;
|
|
3702
|
+
};
|
|
3703
|
+
query?: never;
|
|
3704
|
+
url: '/v1/alerts/{id}/unmute';
|
|
3705
|
+
};
|
|
3706
|
+
type UnmuteAlertAuthorsErrors = {
|
|
3707
|
+
/**
|
|
3708
|
+
* Missing or invalid API key
|
|
3709
|
+
*/
|
|
3710
|
+
401: ErrorResponse;
|
|
3711
|
+
/**
|
|
3712
|
+
* Rule not found
|
|
3713
|
+
*/
|
|
3714
|
+
404: ErrorResponse;
|
|
3715
|
+
};
|
|
3716
|
+
type UnmuteAlertAuthorsError = UnmuteAlertAuthorsErrors[keyof UnmuteAlertAuthorsErrors];
|
|
3717
|
+
type UnmuteAlertAuthorsResponses = {
|
|
3718
|
+
/**
|
|
3719
|
+
* The alert, with its muted list
|
|
3720
|
+
*/
|
|
3721
|
+
200: Alert;
|
|
3722
|
+
};
|
|
3723
|
+
type UnmuteAlertAuthorsResponse = UnmuteAlertAuthorsResponses[keyof UnmuteAlertAuthorsResponses];
|
|
3634
3724
|
type GetAnalyticsSummaryData = {
|
|
3635
3725
|
body?: never;
|
|
3636
3726
|
path?: never;
|
|
@@ -4323,6 +4413,18 @@ declare const testAlert: <ThrowOnError extends boolean = false>(options: Options
|
|
|
4323
4413
|
* Send a digest now
|
|
4324
4414
|
*/
|
|
4325
4415
|
declare const runAlertDigest: <ThrowOnError extends boolean = false>(options: Options<RunAlertDigestData, ThrowOnError>) => RequestResult<RunAlertDigestResponses, RunAlertDigestErrors, ThrowOnError>;
|
|
4416
|
+
/**
|
|
4417
|
+
* Mute authors on an alert
|
|
4418
|
+
*
|
|
4419
|
+
* Add authors to the alert's muted list without touching the rest of its filter. Links are read the way the dashboard reads them: a post link mutes its author, twitter.com becomes x.com, a Hacker News profile keeps its id. Authors already muted are skipped, so a retry is safe. An entry that names no person (a subreddit, a story) rejects the request with that entry named.
|
|
4420
|
+
*/
|
|
4421
|
+
declare const muteAlertAuthors: <ThrowOnError extends boolean = false>(options: Options<MuteAlertAuthorsData, ThrowOnError>) => RequestResult<MuteAlertAuthorsResponses, MuteAlertAuthorsErrors, ThrowOnError>;
|
|
4422
|
+
/**
|
|
4423
|
+
* Unmute authors on an alert
|
|
4424
|
+
*
|
|
4425
|
+
* Remove authors from the alert's muted list without touching the rest of its filter. Name each one by the stored entry or by any link to that profile or its posts. Authors that are not muted are ignored, so a retry is safe.
|
|
4426
|
+
*/
|
|
4427
|
+
declare const unmuteAlertAuthors: <ThrowOnError extends boolean = false>(options: Options<UnmuteAlertAuthorsData, ThrowOnError>) => RequestResult<UnmuteAlertAuthorsResponses, UnmuteAlertAuthorsErrors, ThrowOnError>;
|
|
4326
4428
|
/**
|
|
4327
4429
|
* Headline counts for a window
|
|
4328
4430
|
*
|
|
@@ -4412,6 +4514,7 @@ declare const sdk_listKeywords: typeof listKeywords;
|
|
|
4412
4514
|
declare const sdk_listPeople: typeof listPeople;
|
|
4413
4515
|
declare const sdk_listSegments: typeof listSegments;
|
|
4414
4516
|
declare const sdk_mergePeople: typeof mergePeople;
|
|
4517
|
+
declare const sdk_muteAlertAuthors: typeof muteAlertAuthors;
|
|
4415
4518
|
declare const sdk_revokeApiKey: typeof revokeApiKey;
|
|
4416
4519
|
declare const sdk_rotateWebhookSecret: typeof rotateWebhookSecret;
|
|
4417
4520
|
declare const sdk_runAlertDigest: typeof runAlertDigest;
|
|
@@ -4419,6 +4522,7 @@ declare const sdk_searchMentions: typeof searchMentions;
|
|
|
4419
4522
|
declare const sdk_splitPerson: typeof splitPerson;
|
|
4420
4523
|
declare const sdk_testAlert: typeof testAlert;
|
|
4421
4524
|
declare const sdk_testChannel: typeof testChannel;
|
|
4525
|
+
declare const sdk_unmuteAlertAuthors: typeof unmuteAlertAuthors;
|
|
4422
4526
|
declare const sdk_updateAlert: typeof updateAlert;
|
|
4423
4527
|
declare const sdk_updateChannel: typeof updateChannel;
|
|
4424
4528
|
declare const sdk_updateCompany: typeof updateCompany;
|
|
@@ -4427,7 +4531,7 @@ declare const sdk_updateMention: typeof updateMention;
|
|
|
4427
4531
|
declare const sdk_updatePerson: typeof updatePerson;
|
|
4428
4532
|
declare const sdk_updateSegment: typeof updateSegment;
|
|
4429
4533
|
declare namespace sdk {
|
|
4430
|
-
export { type sdk_Options as Options, sdk_createAlert as createAlert, sdk_createApiKey as createApiKey, sdk_createChannel as createChannel, sdk_createKeyword as createKeyword, sdk_createSegment as createSegment, sdk_deleteAlert as deleteAlert, sdk_deleteChannel as deleteChannel, sdk_deleteKeyword as deleteKeyword, sdk_deleteSegment as deleteSegment, sdk_exportMentionsCsv as exportMentionsCsv, sdk_exportPeopleCsv as exportPeopleCsv, sdk_getAlert as getAlert, sdk_getAnalyticsBreakdown as getAnalyticsBreakdown, sdk_getAnalyticsSeries as getAnalyticsSeries, sdk_getAnalyticsSummary as getAnalyticsSummary, sdk_getChannel as getChannel, sdk_getCompany as getCompany, sdk_getHealth as getHealth, sdk_getKeyword as getKeyword, sdk_getMention as getMention, sdk_getPerson as getPerson, sdk_getSegment as getSegment, sdk_getShareOfVoice as getShareOfVoice, sdk_listAlerts as listAlerts, sdk_listApiKeys as listApiKeys, sdk_listChannelDeliveries as listChannelDeliveries, sdk_listChannels as listChannels, sdk_listKeywords as listKeywords, sdk_listPeople as listPeople, sdk_listSegments as listSegments, sdk_mergePeople as mergePeople, sdk_revokeApiKey as revokeApiKey, sdk_rotateWebhookSecret as rotateWebhookSecret, sdk_runAlertDigest as runAlertDigest, sdk_searchMentions as searchMentions, sdk_splitPerson as splitPerson, sdk_testAlert as testAlert, sdk_testChannel as testChannel, sdk_updateAlert as updateAlert, sdk_updateChannel as updateChannel, sdk_updateCompany as updateCompany, sdk_updateKeyword as updateKeyword, sdk_updateMention as updateMention, sdk_updatePerson as updatePerson, sdk_updateSegment as updateSegment };
|
|
4534
|
+
export { type sdk_Options as Options, sdk_createAlert as createAlert, sdk_createApiKey as createApiKey, sdk_createChannel as createChannel, sdk_createKeyword as createKeyword, sdk_createSegment as createSegment, sdk_deleteAlert as deleteAlert, sdk_deleteChannel as deleteChannel, sdk_deleteKeyword as deleteKeyword, sdk_deleteSegment as deleteSegment, sdk_exportMentionsCsv as exportMentionsCsv, sdk_exportPeopleCsv as exportPeopleCsv, sdk_getAlert as getAlert, sdk_getAnalyticsBreakdown as getAnalyticsBreakdown, sdk_getAnalyticsSeries as getAnalyticsSeries, sdk_getAnalyticsSummary as getAnalyticsSummary, sdk_getChannel as getChannel, sdk_getCompany as getCompany, sdk_getHealth as getHealth, sdk_getKeyword as getKeyword, sdk_getMention as getMention, sdk_getPerson as getPerson, sdk_getSegment as getSegment, sdk_getShareOfVoice as getShareOfVoice, sdk_listAlerts as listAlerts, sdk_listApiKeys as listApiKeys, sdk_listChannelDeliveries as listChannelDeliveries, sdk_listChannels as listChannels, sdk_listKeywords as listKeywords, sdk_listPeople as listPeople, sdk_listSegments as listSegments, sdk_mergePeople as mergePeople, sdk_muteAlertAuthors as muteAlertAuthors, sdk_revokeApiKey as revokeApiKey, sdk_rotateWebhookSecret as rotateWebhookSecret, sdk_runAlertDigest as runAlertDigest, sdk_searchMentions as searchMentions, sdk_splitPerson as splitPerson, sdk_testAlert as testAlert, sdk_testChannel as testChannel, sdk_unmuteAlertAuthors as unmuteAlertAuthors, sdk_updateAlert as updateAlert, sdk_updateChannel as updateChannel, sdk_updateCompany as updateCompany, sdk_updateKeyword as updateKeyword, sdk_updateMention as updateMention, sdk_updatePerson as updatePerson, sdk_updateSegment as updateSegment };
|
|
4431
4535
|
}
|
|
4432
4536
|
|
|
4433
4537
|
/**
|
|
@@ -4455,4 +4559,4 @@ type Mentio = typeof sdk & {
|
|
|
4455
4559
|
};
|
|
4456
4560
|
declare function createMentio(options: MentioOptions): Mentio;
|
|
4457
4561
|
|
|
4458
|
-
export { type Alert, type AnalyticsBreakdown, type AnalyticsSeries, type AnalyticsSummary, type Channel, type Client, type ClientOptions, type Company, type Config, type CreateAlertData, type CreateAlertError, type CreateAlertErrors, type CreateAlertResponse, type CreateAlertResponses, type CreateApiKeyData, type CreateApiKeyError, type CreateApiKeyErrors, type CreateApiKeyResponse, type CreateApiKeyResponses, type CreateChannelData, type CreateChannelError, type CreateChannelErrors, type CreateChannelResponse, type CreateChannelResponses, type CreateEmailChannel, type CreateKeywordData, type CreateKeywordError, type CreateKeywordErrors, type CreateKeywordResponse, type CreateKeywordResponses, type CreateSegmentData, type CreateSegmentError, type CreateSegmentErrors, type CreateSegmentResponse, type CreateSegmentResponses, type CreateSlackChannel, type CreateWebhookChannel, DEFAULT_BASE_URL, type DeleteAlertData, type DeleteAlertError, type DeleteAlertErrors, type DeleteAlertResponse, type DeleteAlertResponses, type DeleteChannelData, type DeleteChannelError, type DeleteChannelErrors, type DeleteChannelResponse, type DeleteChannelResponses, type DeleteKeywordData, type DeleteKeywordError, type DeleteKeywordErrors, type DeleteKeywordResponse, type DeleteKeywordResponses, type DeleteSegmentData, type DeleteSegmentError, type DeleteSegmentErrors, type DeleteSegmentResponse, type DeleteSegmentResponses, type EmailChannel, type ErrorResponse, type ExportMentionsCsvData, type ExportMentionsCsvError, type ExportMentionsCsvErrors, type ExportMentionsCsvResponse, type ExportMentionsCsvResponses, type ExportPeopleCsvData, type ExportPeopleCsvError, type ExportPeopleCsvErrors, type ExportPeopleCsvResponse, type ExportPeopleCsvResponses, type GetAlertData, type GetAlertError, type GetAlertErrors, type GetAlertResponse, type GetAlertResponses, type GetAnalyticsBreakdownData, type GetAnalyticsBreakdownError, type GetAnalyticsBreakdownErrors, type GetAnalyticsBreakdownResponse, type GetAnalyticsBreakdownResponses, type GetAnalyticsSeriesData, type GetAnalyticsSeriesError, type GetAnalyticsSeriesErrors, type GetAnalyticsSeriesResponse, type GetAnalyticsSeriesResponses, type GetAnalyticsSummaryData, type GetAnalyticsSummaryError, type GetAnalyticsSummaryErrors, type GetAnalyticsSummaryResponse, type GetAnalyticsSummaryResponses, type GetChannelData, type GetChannelError, type GetChannelErrors, type GetChannelResponse, type GetChannelResponses, type GetCompanyData, type GetCompanyError, type GetCompanyErrors, type GetCompanyResponse, type GetCompanyResponses, type GetHealthData, type GetHealthResponse, type GetHealthResponses, type GetKeywordData, type GetKeywordError, type GetKeywordErrors, type GetKeywordResponse, type GetKeywordResponses, type GetMentionData, type GetMentionError, type GetMentionErrors, type GetMentionResponse, type GetMentionResponses, type GetPersonData, type GetPersonError, type GetPersonErrors, type GetPersonResponse, type GetPersonResponses, type GetSegmentData, type GetSegmentError, type GetSegmentErrors, type GetSegmentResponse, type GetSegmentResponses, type GetShareOfVoiceData, type GetShareOfVoiceError, type GetShareOfVoiceErrors, type GetShareOfVoiceResponse, type GetShareOfVoiceResponses, type Keyword, type ListAlertsData, type ListAlertsError, type ListAlertsErrors, type ListAlertsResponse, type ListAlertsResponses, type ListApiKeysData, type ListApiKeysError, type ListApiKeysErrors, type ListApiKeysResponse, type ListApiKeysResponses, type ListChannelDeliveriesData, type ListChannelDeliveriesError, type ListChannelDeliveriesErrors, type ListChannelDeliveriesResponse, type ListChannelDeliveriesResponses, type ListChannelsData, type ListChannelsError, type ListChannelsErrors, type ListChannelsResponse, type ListChannelsResponses, type ListKeywordsData, type ListKeywordsError, type ListKeywordsErrors, type ListKeywordsResponse, type ListKeywordsResponses, type ListPeopleData, type ListPeopleError, type ListPeopleErrors, type ListPeopleResponse, type ListPeopleResponses, type ListSegmentsData, type ListSegmentsError, type ListSegmentsErrors, type ListSegmentsResponse, type ListSegmentsResponses, type Mentio, type MentioOptions, type Mention, type MergePeopleData, type MergePeopleError, type MergePeopleErrors, type MergePeopleResponse, type MergePeopleResponses, type Options, type Person, type RequestResult, type RevokeApiKeyData, type RevokeApiKeyError, type RevokeApiKeyErrors, type RevokeApiKeyResponse, type RevokeApiKeyResponses, type RotateWebhookSecretData, type RotateWebhookSecretError, type RotateWebhookSecretErrors, type RotateWebhookSecretResponse, type RotateWebhookSecretResponses, type RunAlertDigestData, type RunAlertDigestError, type RunAlertDigestErrors, type RunAlertDigestResponse, type RunAlertDigestResponses, type SearchMentionsData, type SearchMentionsError, type SearchMentionsErrors, type SearchMentionsResponse, type SearchMentionsResponses, type Segment, type ShareOfVoice, type SlackChannel, type SplitPersonData, type SplitPersonError, type SplitPersonErrors, type SplitPersonResponse, type SplitPersonResponses, type TelegramChannel, type TestAlertData, type TestAlertError, type TestAlertErrors, type TestAlertResponse, type TestAlertResponses, type TestChannelData, type TestChannelError, type TestChannelErrors, type TestChannelResponse, type TestChannelResponses, type UpdateAlertData, type UpdateAlertError, type UpdateAlertErrors, type UpdateAlertResponse, type UpdateAlertResponses, type UpdateChannelData, type UpdateChannelError, type UpdateChannelErrors, type UpdateChannelResponse, type UpdateChannelResponses, type UpdateCompanyData, type UpdateCompanyError, type UpdateCompanyErrors, type UpdateCompanyResponse, type UpdateCompanyResponses, type UpdateKeywordData, type UpdateKeywordError, type UpdateKeywordErrors, type UpdateKeywordResponse, type UpdateKeywordResponses, type UpdateMentionData, type UpdateMentionError, type UpdateMentionErrors, type UpdateMentionResponse, type UpdateMentionResponses, type UpdatePersonData, type UpdatePersonError, type UpdatePersonErrors, type UpdatePersonResponse, type UpdatePersonResponses, type UpdateSegmentData, type UpdateSegmentError, type UpdateSegmentErrors, type UpdateSegmentResponse, type UpdateSegmentResponses, type WebhookChannel, createAlert, createApiKey, createChannel, createClient, createConfig, createKeyword, createMentio, createSegment, deleteAlert, deleteChannel, deleteKeyword, deleteSegment, exportMentionsCsv, exportPeopleCsv, getAlert, getAnalyticsBreakdown, getAnalyticsSeries, getAnalyticsSummary, getChannel, getCompany, getHealth, getKeyword, getMention, getPerson, getSegment, getShareOfVoice, listAlerts, listApiKeys, listChannelDeliveries, listChannels, listKeywords, listPeople, listSegments, mergePeople, revokeApiKey, rotateWebhookSecret, runAlertDigest, searchMentions, splitPerson, testAlert, testChannel, updateAlert, updateChannel, updateCompany, updateKeyword, updateMention, updatePerson, updateSegment };
|
|
4562
|
+
export { type Alert, type AnalyticsBreakdown, type AnalyticsSeries, type AnalyticsSummary, type Channel, type Client, type ClientOptions, type Company, type Config, type CreateAlertData, type CreateAlertError, type CreateAlertErrors, type CreateAlertResponse, type CreateAlertResponses, type CreateApiKeyData, type CreateApiKeyError, type CreateApiKeyErrors, type CreateApiKeyResponse, type CreateApiKeyResponses, type CreateChannelData, type CreateChannelError, type CreateChannelErrors, type CreateChannelResponse, type CreateChannelResponses, type CreateEmailChannel, type CreateKeywordData, type CreateKeywordError, type CreateKeywordErrors, type CreateKeywordResponse, type CreateKeywordResponses, type CreateSegmentData, type CreateSegmentError, type CreateSegmentErrors, type CreateSegmentResponse, type CreateSegmentResponses, type CreateSlackChannel, type CreateWebhookChannel, DEFAULT_BASE_URL, type DeleteAlertData, type DeleteAlertError, type DeleteAlertErrors, type DeleteAlertResponse, type DeleteAlertResponses, type DeleteChannelData, type DeleteChannelError, type DeleteChannelErrors, type DeleteChannelResponse, type DeleteChannelResponses, type DeleteKeywordData, type DeleteKeywordError, type DeleteKeywordErrors, type DeleteKeywordResponse, type DeleteKeywordResponses, type DeleteSegmentData, type DeleteSegmentError, type DeleteSegmentErrors, type DeleteSegmentResponse, type DeleteSegmentResponses, type EmailChannel, type ErrorResponse, type ExportMentionsCsvData, type ExportMentionsCsvError, type ExportMentionsCsvErrors, type ExportMentionsCsvResponse, type ExportMentionsCsvResponses, type ExportPeopleCsvData, type ExportPeopleCsvError, type ExportPeopleCsvErrors, type ExportPeopleCsvResponse, type ExportPeopleCsvResponses, type GetAlertData, type GetAlertError, type GetAlertErrors, type GetAlertResponse, type GetAlertResponses, type GetAnalyticsBreakdownData, type GetAnalyticsBreakdownError, type GetAnalyticsBreakdownErrors, type GetAnalyticsBreakdownResponse, type GetAnalyticsBreakdownResponses, type GetAnalyticsSeriesData, type GetAnalyticsSeriesError, type GetAnalyticsSeriesErrors, type GetAnalyticsSeriesResponse, type GetAnalyticsSeriesResponses, type GetAnalyticsSummaryData, type GetAnalyticsSummaryError, type GetAnalyticsSummaryErrors, type GetAnalyticsSummaryResponse, type GetAnalyticsSummaryResponses, type GetChannelData, type GetChannelError, type GetChannelErrors, type GetChannelResponse, type GetChannelResponses, type GetCompanyData, type GetCompanyError, type GetCompanyErrors, type GetCompanyResponse, type GetCompanyResponses, type GetHealthData, type GetHealthResponse, type GetHealthResponses, type GetKeywordData, type GetKeywordError, type GetKeywordErrors, type GetKeywordResponse, type GetKeywordResponses, type GetMentionData, type GetMentionError, type GetMentionErrors, type GetMentionResponse, type GetMentionResponses, type GetPersonData, type GetPersonError, type GetPersonErrors, type GetPersonResponse, type GetPersonResponses, type GetSegmentData, type GetSegmentError, type GetSegmentErrors, type GetSegmentResponse, type GetSegmentResponses, type GetShareOfVoiceData, type GetShareOfVoiceError, type GetShareOfVoiceErrors, type GetShareOfVoiceResponse, type GetShareOfVoiceResponses, type Keyword, type ListAlertsData, type ListAlertsError, type ListAlertsErrors, type ListAlertsResponse, type ListAlertsResponses, type ListApiKeysData, type ListApiKeysError, type ListApiKeysErrors, type ListApiKeysResponse, type ListApiKeysResponses, type ListChannelDeliveriesData, type ListChannelDeliveriesError, type ListChannelDeliveriesErrors, type ListChannelDeliveriesResponse, type ListChannelDeliveriesResponses, type ListChannelsData, type ListChannelsError, type ListChannelsErrors, type ListChannelsResponse, type ListChannelsResponses, type ListKeywordsData, type ListKeywordsError, type ListKeywordsErrors, type ListKeywordsResponse, type ListKeywordsResponses, type ListPeopleData, type ListPeopleError, type ListPeopleErrors, type ListPeopleResponse, type ListPeopleResponses, type ListSegmentsData, type ListSegmentsError, type ListSegmentsErrors, type ListSegmentsResponse, type ListSegmentsResponses, type Mentio, type MentioOptions, type Mention, type MergePeopleData, type MergePeopleError, type MergePeopleErrors, type MergePeopleResponse, type MergePeopleResponses, type MuteAlertAuthorsData, type MuteAlertAuthorsError, type MuteAlertAuthorsErrors, type MuteAlertAuthorsResponse, type MuteAlertAuthorsResponses, type Options, type Person, type RequestResult, type RevokeApiKeyData, type RevokeApiKeyError, type RevokeApiKeyErrors, type RevokeApiKeyResponse, type RevokeApiKeyResponses, type RotateWebhookSecretData, type RotateWebhookSecretError, type RotateWebhookSecretErrors, type RotateWebhookSecretResponse, type RotateWebhookSecretResponses, type RunAlertDigestData, type RunAlertDigestError, type RunAlertDigestErrors, type RunAlertDigestResponse, type RunAlertDigestResponses, type SearchMentionsData, type SearchMentionsError, type SearchMentionsErrors, type SearchMentionsResponse, type SearchMentionsResponses, type Segment, type ShareOfVoice, type SlackChannel, type SplitPersonData, type SplitPersonError, type SplitPersonErrors, type SplitPersonResponse, type SplitPersonResponses, type TelegramChannel, type TestAlertData, type TestAlertError, type TestAlertErrors, type TestAlertResponse, type TestAlertResponses, type TestChannelData, type TestChannelError, type TestChannelErrors, type TestChannelResponse, type TestChannelResponses, type UnmuteAlertAuthorsData, type UnmuteAlertAuthorsError, type UnmuteAlertAuthorsErrors, type UnmuteAlertAuthorsResponse, type UnmuteAlertAuthorsResponses, type UpdateAlertData, type UpdateAlertError, type UpdateAlertErrors, type UpdateAlertResponse, type UpdateAlertResponses, type UpdateChannelData, type UpdateChannelError, type UpdateChannelErrors, type UpdateChannelResponse, type UpdateChannelResponses, type UpdateCompanyData, type UpdateCompanyError, type UpdateCompanyErrors, type UpdateCompanyResponse, type UpdateCompanyResponses, type UpdateKeywordData, type UpdateKeywordError, type UpdateKeywordErrors, type UpdateKeywordResponse, type UpdateKeywordResponses, type UpdateMentionData, type UpdateMentionError, type UpdateMentionErrors, type UpdateMentionResponse, type UpdateMentionResponses, type UpdatePersonData, type UpdatePersonError, type UpdatePersonErrors, type UpdatePersonResponse, type UpdatePersonResponses, type UpdateSegmentData, type UpdateSegmentError, type UpdateSegmentErrors, type UpdateSegmentResponse, type UpdateSegmentResponses, type WebhookChannel, createAlert, createApiKey, createChannel, createClient, createConfig, createKeyword, createMentio, createSegment, deleteAlert, deleteChannel, deleteKeyword, deleteSegment, exportMentionsCsv, exportPeopleCsv, getAlert, getAnalyticsBreakdown, getAnalyticsSeries, getAnalyticsSummary, getChannel, getCompany, getHealth, getKeyword, getMention, getPerson, getSegment, getShareOfVoice, listAlerts, listApiKeys, listChannelDeliveries, listChannels, listKeywords, listPeople, listSegments, mergePeople, muteAlertAuthors, revokeApiKey, rotateWebhookSecret, runAlertDigest, searchMentions, splitPerson, testAlert, testChannel, unmuteAlertAuthors, updateAlert, updateChannel, updateCompany, updateKeyword, updateMention, updatePerson, updateSegment };
|
package/dist/index.js
CHANGED
|
@@ -823,6 +823,7 @@ __export(sdk_gen_exports, {
|
|
|
823
823
|
listPeople: () => listPeople,
|
|
824
824
|
listSegments: () => listSegments,
|
|
825
825
|
mergePeople: () => mergePeople,
|
|
826
|
+
muteAlertAuthors: () => muteAlertAuthors,
|
|
826
827
|
revokeApiKey: () => revokeApiKey,
|
|
827
828
|
rotateWebhookSecret: () => rotateWebhookSecret,
|
|
828
829
|
runAlertDigest: () => runAlertDigest,
|
|
@@ -830,6 +831,7 @@ __export(sdk_gen_exports, {
|
|
|
830
831
|
splitPerson: () => splitPerson,
|
|
831
832
|
testAlert: () => testAlert,
|
|
832
833
|
testChannel: () => testChannel,
|
|
834
|
+
unmuteAlertAuthors: () => unmuteAlertAuthors,
|
|
833
835
|
updateAlert: () => updateAlert,
|
|
834
836
|
updateChannel: () => updateChannel,
|
|
835
837
|
updateCompany: () => updateCompany,
|
|
@@ -1048,6 +1050,24 @@ var runAlertDigest = (options) => (options.client ?? client).post({
|
|
|
1048
1050
|
url: "/v1/alerts/{id}/run",
|
|
1049
1051
|
...options
|
|
1050
1052
|
});
|
|
1053
|
+
var muteAlertAuthors = (options) => (options.client ?? client).post({
|
|
1054
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1055
|
+
url: "/v1/alerts/{id}/mute",
|
|
1056
|
+
...options,
|
|
1057
|
+
headers: {
|
|
1058
|
+
"Content-Type": "application/json",
|
|
1059
|
+
...options.headers
|
|
1060
|
+
}
|
|
1061
|
+
});
|
|
1062
|
+
var unmuteAlertAuthors = (options) => (options.client ?? client).post({
|
|
1063
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1064
|
+
url: "/v1/alerts/{id}/unmute",
|
|
1065
|
+
...options,
|
|
1066
|
+
headers: {
|
|
1067
|
+
"Content-Type": "application/json",
|
|
1068
|
+
...options.headers
|
|
1069
|
+
}
|
|
1070
|
+
});
|
|
1051
1071
|
var getAnalyticsSummary = (options) => (options?.client ?? client).get({
|
|
1052
1072
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1053
1073
|
url: "/v1/analytics/summary",
|
|
@@ -1172,6 +1192,7 @@ export {
|
|
|
1172
1192
|
listPeople,
|
|
1173
1193
|
listSegments,
|
|
1174
1194
|
mergePeople,
|
|
1195
|
+
muteAlertAuthors,
|
|
1175
1196
|
revokeApiKey,
|
|
1176
1197
|
rotateWebhookSecret,
|
|
1177
1198
|
runAlertDigest,
|
|
@@ -1179,6 +1200,7 @@ export {
|
|
|
1179
1200
|
splitPerson,
|
|
1180
1201
|
testAlert,
|
|
1181
1202
|
testChannel,
|
|
1203
|
+
unmuteAlertAuthors,
|
|
1182
1204
|
updateAlert,
|
|
1183
1205
|
updateChannel,
|
|
1184
1206
|
updateCompany,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/generated/core/bodySerializer.gen.ts","../src/generated/core/params.gen.ts","../src/generated/core/serverSentEvents.gen.ts","../src/generated/core/pathSerializer.gen.ts","../src/generated/core/utils.gen.ts","../src/generated/core/auth.gen.ts","../src/generated/client/utils.gen.ts","../src/generated/client/client.gen.ts","../src/generated/sdk.gen.ts","../src/generated/client.gen.ts","../src/index.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen';\n\nexport type QuerySerializer = (query: Record<string, unknown>) => string;\n\nexport type BodySerializer = (body: unknown) => unknown;\n\ntype QuerySerializerOptionsObject = {\n allowReserved?: boolean;\n array?: Partial<SerializerOptions<ArrayStyle>>;\n object?: Partial<SerializerOptions<ObjectStyle>>;\n};\n\nexport type QuerySerializerOptions = QuerySerializerOptionsObject & {\n /**\n * Per-parameter serialization overrides. When provided, these settings\n * override the global array/object settings for specific parameter names.\n */\n parameters?: Record<string, QuerySerializerOptionsObject>;\n};\n\nconst serializeFormDataPair = (data: FormData, key: string, value: unknown): void => {\n if (typeof value === 'string' || value instanceof Blob) {\n data.append(key, value);\n } else if (value instanceof Date) {\n data.append(key, value.toISOString());\n } else {\n data.append(key, JSON.stringify(value));\n }\n};\n\nconst serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown): void => {\n if (typeof value === 'string') {\n data.append(key, value);\n } else {\n data.append(key, JSON.stringify(value));\n }\n};\n\nexport const formDataBodySerializer = {\n bodySerializer: (body: unknown): FormData => {\n const data = new FormData();\n\n Object.entries(body as Record<string, unknown>).forEach(([key, value]) => {\n if (value === undefined || value === null) {\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((v) => serializeFormDataPair(data, key, v));\n } else {\n serializeFormDataPair(data, key, value);\n }\n });\n\n return data;\n },\n};\n\nexport const jsonBodySerializer = {\n bodySerializer: (body: unknown): string =>\n JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)),\n};\n\nexport const urlSearchParamsBodySerializer = {\n bodySerializer: (body: unknown): string => {\n const data = new URLSearchParams();\n\n Object.entries(body as Record<string, unknown>).forEach(([key, value]) => {\n if (value === undefined || value === null) {\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((v) => serializeUrlSearchParamsPair(data, key, v));\n } else {\n serializeUrlSearchParamsPair(data, key, value);\n }\n });\n\n return data.toString();\n },\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\ntype Slot = 'body' | 'headers' | 'path' | 'query';\n\nexport type Field =\n | {\n in: Exclude<Slot, 'body'>;\n /**\n * Field name. This is the name we want the user to see and use.\n */\n key: string;\n /**\n * Field mapped name. This is the name we want to use in the request.\n * If omitted, we use the same value as `key`.\n */\n map?: string;\n }\n | {\n in: Extract<Slot, 'body'>;\n /**\n * Key isn't required for bodies.\n */\n key?: string;\n map?: string;\n }\n | {\n /**\n * Field name. This is the name we want the user to see and use.\n */\n key: string;\n /**\n * Field mapped name. This is the name we want to use in the request.\n * If `in` is omitted, `map` aliases `key` to the transport layer.\n */\n map: Slot;\n };\n\nexport interface Fields {\n allowExtra?: Partial<Record<Slot, boolean>>;\n args?: ReadonlyArray<Field>;\n}\n\nexport type FieldsConfig = ReadonlyArray<Field | Fields>;\n\nconst extraPrefixesMap: Record<string, Slot> = {\n $body_: 'body',\n $headers_: 'headers',\n $path_: 'path',\n $query_: 'query',\n};\nconst extraPrefixes = Object.entries(extraPrefixesMap);\n\ntype KeyMap = Map<\n string,\n | {\n in: Slot;\n map?: string;\n }\n | {\n in?: never;\n map: Slot;\n }\n>;\n\nfunction buildKeyMap(fields: FieldsConfig, map?: KeyMap): KeyMap {\n if (!map) {\n map = new Map();\n }\n\n for (const config of fields) {\n if ('in' in config) {\n if (config.key) {\n map.set(config.key, {\n in: config.in,\n map: config.map,\n });\n }\n } else if ('key' in config) {\n map.set(config.key, {\n map: config.map,\n });\n } else if (config.args) {\n buildKeyMap(config.args, map);\n }\n }\n\n return map;\n}\n\ninterface Params {\n body?: unknown;\n headers: Record<string, unknown>;\n path: Record<string, unknown>;\n query: Record<string, unknown>;\n}\n\nfunction stripEmptySlots(params: Params): void {\n for (const [slot, value] of Object.entries(params)) {\n if (slot === 'body') continue;\n if (value && typeof value === 'object' && !Array.isArray(value) && !Object.keys(value).length) {\n delete params[slot as Slot];\n }\n }\n}\n\nexport function buildClientParams(args: ReadonlyArray<unknown>, fields: FieldsConfig): Params {\n const params: Params = {\n headers: Object.create(null),\n path: Object.create(null),\n query: Object.create(null),\n };\n\n const map = buildKeyMap(fields);\n\n function writeSlot(slot: Slot, key: string, value: unknown): void {\n let record = params[slot] as Record<string, unknown> | undefined;\n if (record === undefined) {\n record = Object.create(null) as Record<string, unknown>;\n params[slot] = record;\n }\n record[key] = value;\n }\n\n let config: FieldsConfig[number] | undefined;\n\n for (const [index, arg] of args.entries()) {\n if (fields[index]) {\n config = fields[index];\n }\n\n if (!config) {\n continue;\n }\n\n if ('in' in config) {\n if (config.key) {\n const field = map.get(config.key)!;\n const name = field.map || config.key;\n if (field.in) {\n writeSlot(field.in, name, arg);\n }\n } else {\n params.body = arg;\n }\n } else {\n for (const [key, value] of Object.entries(arg ?? {})) {\n const field = map.get(key);\n\n if (field) {\n if (field.in) {\n const name = field.map || key;\n writeSlot(field.in, name, value);\n } else {\n params[field.map] = value;\n }\n } else {\n const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix));\n\n if (extra) {\n const [prefix, slot] = extra;\n writeSlot(slot, key.slice(prefix.length), value);\n } else if ('allowExtra' in config && config.allowExtra) {\n for (const [slot, allowed] of Object.entries(config.allowExtra)) {\n if (allowed) {\n writeSlot(slot as Slot, key, value);\n break;\n }\n }\n }\n }\n }\n }\n }\n\n stripEmptySlots(params);\n\n return params;\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen';\n\nexport type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> &\n Pick<Config, 'method' | 'responseTransformer' | 'responseValidator'> & {\n /**\n * Fetch API implementation. You can use this option to provide a custom\n * fetch instance.\n *\n * @default globalThis.fetch\n */\n fetch?: typeof fetch;\n /**\n * Implementing clients can call request interceptors inside this hook.\n */\n onRequest?: (url: string, init: RequestInit) => Promise<Request>;\n /**\n * Callback invoked when a network or parsing error occurs during streaming.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @param error The error that occurred.\n */\n onSseError?: (error: unknown) => void;\n /**\n * Callback invoked when an event is streamed from the server.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @param event Event streamed from the server.\n * @returns Nothing (void).\n */\n onSseEvent?: (event: StreamEvent<TData>) => void;\n serializedBody?: RequestInit['body'];\n /**\n * Default retry delay in milliseconds.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @default 3000\n */\n sseDefaultRetryDelay?: number;\n /**\n * Maximum number of retry attempts before giving up.\n */\n sseMaxRetryAttempts?: number;\n /**\n * Maximum retry delay in milliseconds.\n *\n * Applies only when exponential backoff is used.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @default 30000\n */\n sseMaxRetryDelay?: number;\n /**\n * Optional sleep function for retry backoff.\n *\n * Defaults to using `setTimeout`.\n */\n sseSleepFn?: (ms: number) => Promise<void>;\n url: string;\n };\n\nexport interface StreamEvent<TData = unknown> {\n data: TData;\n event?: string;\n id?: string;\n retry?: number;\n}\n\nexport type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {\n stream: AsyncGenerator<\n TData extends Record<string, unknown> ? TData[keyof TData] : TData,\n TReturn,\n TNext\n >;\n};\n\nexport function createSseClient<TData = unknown>({\n onRequest,\n onSseError,\n onSseEvent,\n responseTransformer,\n responseValidator,\n sseDefaultRetryDelay,\n sseMaxRetryAttempts,\n sseMaxRetryDelay,\n sseSleepFn,\n url,\n ...options\n}: ServerSentEventsOptions): ServerSentEventsResult<TData> {\n let lastEventId: string | undefined;\n\n const sleep = sseSleepFn ?? ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms)));\n\n const createStream = async function* () {\n let retryDelay: number = sseDefaultRetryDelay ?? 3000;\n let attempt = 0;\n const signal = options.signal ?? new AbortController().signal;\n\n while (true) {\n if (signal.aborted) break;\n\n attempt++;\n\n const headers =\n options.headers instanceof Headers\n ? options.headers\n : new Headers(options.headers as Record<string, string> | undefined);\n\n if (lastEventId !== undefined) {\n headers.set('Last-Event-ID', lastEventId);\n }\n\n try {\n const requestInit: RequestInit = {\n redirect: 'follow',\n ...options,\n body: options.serializedBody,\n headers,\n signal,\n };\n let request = new Request(url, requestInit);\n if (onRequest) {\n request = await onRequest(url, requestInit);\n }\n // fetch must be assigned here, otherwise it would throw the error:\n // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation\n const _fetch = options.fetch ?? globalThis.fetch;\n const response = await _fetch(request);\n\n if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);\n\n if (!response.body) throw new Error('No body in SSE response');\n\n const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();\n\n let buffer = '';\n\n const abortHandler = () => {\n try {\n reader.cancel();\n } catch {\n // noop\n }\n };\n\n signal.addEventListener('abort', abortHandler);\n\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n buffer += value;\n buffer = buffer.replace(/\\r\\n?/g, '\\n'); // normalize line endings\n\n const chunks = buffer.split('\\n\\n');\n buffer = chunks.pop() ?? '';\n\n for (const chunk of chunks) {\n const lines = chunk.split('\\n');\n const dataLines: Array<string> = [];\n let eventName: string | undefined;\n\n for (const line of lines) {\n if (line.startsWith('data:')) {\n dataLines.push(line.replace(/^data:\\s*/, ''));\n } else if (line.startsWith('event:')) {\n eventName = line.replace(/^event:\\s*/, '');\n } else if (line.startsWith('id:')) {\n lastEventId = line.replace(/^id:\\s*/, '');\n } else if (line.startsWith('retry:')) {\n const parsed = Number.parseInt(line.replace(/^retry:\\s*/, ''), 10);\n if (!Number.isNaN(parsed)) {\n retryDelay = parsed;\n }\n }\n }\n\n let data: unknown;\n let parsedJson = false;\n\n if (dataLines.length) {\n const rawData = dataLines.join('\\n');\n try {\n data = JSON.parse(rawData);\n parsedJson = true;\n } catch {\n data = rawData;\n }\n }\n\n if (parsedJson) {\n if (responseValidator) {\n await responseValidator(data);\n }\n\n if (responseTransformer) {\n data = await responseTransformer(data);\n }\n }\n\n onSseEvent?.({\n data,\n event: eventName,\n id: lastEventId,\n retry: retryDelay,\n });\n\n if (dataLines.length) {\n yield data as any;\n }\n }\n }\n } finally {\n signal.removeEventListener('abort', abortHandler);\n reader.releaseLock();\n }\n\n break; // exit loop on normal completion\n } catch (error) {\n // connection failed or aborted; retry after delay\n onSseError?.(error);\n\n if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) {\n break; // stop after firing error\n }\n\n // exponential backoff: double retry each attempt, cap at 30s\n const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000);\n await sleep(backoff);\n }\n }\n };\n\n const stream = createStream();\n\n return { stream };\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\ninterface SerializeOptions<T> extends SerializePrimitiveOptions, SerializerOptions<T> {}\n\ninterface SerializePrimitiveOptions {\n allowReserved?: boolean;\n name: string;\n}\n\nexport interface SerializerOptions<T> {\n /**\n * @default true\n */\n explode: boolean;\n style: T;\n}\n\nexport type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectStyle = 'form' | 'deepObject';\ntype ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\n\ninterface SerializePrimitiveParam extends SerializePrimitiveOptions {\n value: string;\n}\n\nexport const separatorArrayExplode = (style: ArraySeparatorStyle): '.' | ';' | ',' | '&' => {\n switch (style) {\n case 'label':\n return '.';\n case 'matrix':\n return ';';\n case 'simple':\n return ',';\n default:\n return '&';\n }\n};\n\nexport const separatorArrayNoExplode = (style: ArraySeparatorStyle): ',' | '|' | '%20' => {\n switch (style) {\n case 'form':\n return ',';\n case 'pipeDelimited':\n return '|';\n case 'spaceDelimited':\n return '%20';\n default:\n return ',';\n }\n};\n\nexport const separatorObjectExplode = (style: ObjectSeparatorStyle): '.' | ';' | ',' | '&' => {\n switch (style) {\n case 'label':\n return '.';\n case 'matrix':\n return ';';\n case 'simple':\n return ',';\n default:\n return '&';\n }\n};\n\nexport const serializeArrayParam = ({\n allowReserved,\n explode,\n name,\n style,\n value,\n}: SerializeOptions<ArraySeparatorStyle> & {\n value: unknown[];\n}): string => {\n if (!explode) {\n const joinedValues = (\n allowReserved ? value : value.map((v) => encodeURIComponent(v as string))\n ).join(separatorArrayNoExplode(style));\n switch (style) {\n case 'label':\n return `.${joinedValues}`;\n case 'matrix':\n return `;${name}=${joinedValues}`;\n case 'simple':\n return joinedValues;\n default:\n return `${name}=${joinedValues}`;\n }\n }\n\n const separator = separatorArrayExplode(style);\n const joinedValues = value\n .map((v) => {\n if (style === 'label' || style === 'simple') {\n return allowReserved ? v : encodeURIComponent(v as string);\n }\n\n return serializePrimitiveParam({\n allowReserved,\n name,\n value: v as string,\n });\n })\n .join(separator);\n return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;\n};\n\nexport const serializePrimitiveParam = ({\n allowReserved,\n name,\n value,\n}: SerializePrimitiveParam): string => {\n if (value === undefined || value === null) {\n return '';\n }\n\n if (typeof value === 'object') {\n throw new Error(\n 'Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.',\n );\n }\n\n return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;\n};\n\nexport const serializeObjectParam = ({\n allowReserved,\n explode,\n name,\n style,\n value,\n valueOnly,\n}: SerializeOptions<ObjectSeparatorStyle> & {\n value: Record<string, unknown> | Date;\n valueOnly?: boolean;\n}): string => {\n if (value instanceof Date) {\n return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;\n }\n\n if (style !== 'deepObject' && !explode) {\n let values: string[] = [];\n Object.entries(value).forEach(([key, v]) => {\n values = [...values, key, allowReserved ? (v as string) : encodeURIComponent(v as string)];\n });\n const joinedValues = values.join(',');\n switch (style) {\n case 'form':\n return `${name}=${joinedValues}`;\n case 'label':\n return `.${joinedValues}`;\n case 'matrix':\n return `;${name}=${joinedValues}`;\n default:\n return joinedValues;\n }\n }\n\n const separator = separatorObjectExplode(style);\n const joinedValues = Object.entries(value)\n .map(([key, v]) =>\n serializePrimitiveParam({\n allowReserved,\n name: style === 'deepObject' ? `${name}[${key}]` : key,\n value: v as string,\n }),\n )\n .join(separator);\n return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen';\nimport {\n type ArraySeparatorStyle,\n serializeArrayParam,\n serializeObjectParam,\n serializePrimitiveParam,\n} from './pathSerializer.gen';\n\nexport interface PathSerializer {\n path: Record<string, unknown>;\n url: string;\n}\n\nexport const PATH_PARAM_RE: RegExp = /\\{[^{}]+\\}/g;\n\nexport const defaultPathSerializer = ({ path, url: _url }: PathSerializer): string => {\n let url = _url;\n const matches = _url.match(PATH_PARAM_RE);\n if (matches) {\n for (const match of matches) {\n let explode = false;\n let name = match.substring(1, match.length - 1);\n let style: ArraySeparatorStyle = 'simple';\n\n if (name.endsWith('*')) {\n explode = true;\n name = name.substring(0, name.length - 1);\n }\n\n if (name.startsWith('.')) {\n name = name.substring(1);\n style = 'label';\n } else if (name.startsWith(';')) {\n name = name.substring(1);\n style = 'matrix';\n }\n\n const value = path[name];\n\n if (value === undefined || value === null) {\n continue;\n }\n\n if (Array.isArray(value)) {\n url = url.replace(match, serializeArrayParam({ explode, name, style, value }));\n continue;\n }\n\n if (typeof value === 'object') {\n url = url.replace(\n match,\n serializeObjectParam({\n explode,\n name,\n style,\n value: value as Record<string, unknown>,\n valueOnly: true,\n }),\n );\n continue;\n }\n\n if (style === 'matrix') {\n url = url.replace(\n match,\n `;${serializePrimitiveParam({\n name,\n value: value as string,\n })}`,\n );\n continue;\n }\n\n const replaceValue = encodeURIComponent(\n style === 'label' ? `.${value as string}` : (value as string),\n );\n url = url.replace(match, replaceValue);\n }\n }\n return url;\n};\n\nexport const getUrl = ({\n baseUrl,\n path,\n query,\n querySerializer,\n url: _url,\n}: {\n baseUrl?: string;\n path?: Record<string, unknown>;\n query?: Record<string, unknown>;\n querySerializer: QuerySerializer;\n url: string;\n}): string => {\n const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;\n let url = (baseUrl ?? '') + pathUrl;\n if (path) {\n url = defaultPathSerializer({ path, url });\n }\n let search = query ? querySerializer(query) : '';\n if (search.startsWith('?')) {\n search = search.substring(1);\n }\n if (search) {\n url += `?${search}`;\n }\n return url;\n};\n\nexport function getValidRequestBody(options: {\n body?: unknown;\n bodySerializer?: BodySerializer | null;\n serializedBody?: unknown;\n}): unknown {\n const hasBody = options.body !== undefined;\n const isSerializedBody = hasBody && options.bodySerializer;\n\n if (isSerializedBody) {\n if ('serializedBody' in options) {\n const hasSerializedBody =\n options.serializedBody !== undefined && options.serializedBody !== '';\n\n return hasSerializedBody ? options.serializedBody : null;\n }\n\n // not all clients implement a serializedBody property (i.e., client-axios)\n return options.body !== '' ? options.body : null;\n }\n\n // plain/text body\n if (hasBody) {\n return options.body;\n }\n\n // no body was provided\n return undefined;\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\nexport type AuthToken = string | undefined;\n\nexport interface Auth {\n /**\n * Which part of the request do we use to send the auth?\n *\n * @default 'header'\n */\n in?: 'header' | 'query' | 'cookie';\n /**\n * A unique identifier for the security scheme.\n *\n * Defined only when there are multiple security schemes whose `Auth`\n * shape would otherwise be identical.\n */\n key?: string;\n /**\n * Header or query parameter name.\n *\n * @default 'Authorization'\n */\n name?: string;\n scheme?: 'basic' | 'bearer';\n type: 'apiKey' | 'http';\n}\n\nexport const getAuthToken = async (\n auth: Auth,\n callback: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken,\n): Promise<string | undefined> => {\n const token = typeof callback === 'function' ? await callback(auth) : callback;\n\n if (!token) {\n return;\n }\n\n if (auth.scheme === 'bearer') {\n return `Bearer ${token}`;\n }\n\n if (auth.scheme === 'basic') {\n return `Basic ${btoa(token)}`;\n }\n\n return token;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen';\nimport {\n serializeArrayParam,\n serializeObjectParam,\n serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport { getUrl } from '../core/utils.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\nexport const createQuerySerializer = <T = unknown>({\n parameters = {},\n ...args\n}: QuerySerializerOptions = {}): ((queryParams: T) => string) => {\n const querySerializer = (queryParams: T): string => {\n const search: string[] = [];\n if (queryParams && typeof queryParams === 'object') {\n for (const name in queryParams) {\n const value = queryParams[name];\n\n if (value === undefined || value === null) {\n continue;\n }\n\n const options = parameters[name] || args;\n\n if (Array.isArray(value)) {\n const serializedArray = serializeArrayParam({\n allowReserved: options.allowReserved,\n explode: true,\n name,\n style: 'form',\n value,\n ...options.array,\n });\n if (serializedArray) search.push(serializedArray);\n } else if (typeof value === 'object') {\n const serializedObject = serializeObjectParam({\n allowReserved: options.allowReserved,\n explode: true,\n name,\n style: 'deepObject',\n value: value as Record<string, unknown>,\n ...options.object,\n });\n if (serializedObject) search.push(serializedObject);\n } else {\n const serializedPrimitive = serializePrimitiveParam({\n allowReserved: options.allowReserved,\n name,\n value: value as string,\n });\n if (serializedPrimitive) search.push(serializedPrimitive);\n }\n }\n }\n return search.join('&');\n };\n return querySerializer;\n};\n\n/**\n * Infers parseAs value from provided Content-Type header.\n */\nexport const getParseAs = (contentType: string | null): Exclude<Config['parseAs'], 'auto'> => {\n if (!contentType) {\n // If no Content-Type header is provided, the best we can do is return the raw response body,\n // which is effectively the same as the 'stream' option.\n return 'stream';\n }\n\n const cleanContent = contentType.split(';')[0]?.trim();\n\n if (!cleanContent) {\n return;\n }\n\n if (cleanContent.startsWith('application/json') || cleanContent.endsWith('+json')) {\n return 'json';\n }\n\n if (cleanContent === 'multipart/form-data') {\n return 'formData';\n }\n\n if (\n ['application/', 'audio/', 'image/', 'video/'].some((type) => cleanContent.startsWith(type))\n ) {\n return 'blob';\n }\n\n if (cleanContent.startsWith('text/')) {\n return 'text';\n }\n\n return;\n};\n\nconst checkForExistence = (\n options: Pick<RequestOptions, 'auth' | 'query'> & {\n headers: Headers;\n },\n name?: string,\n): boolean => {\n if (!name) {\n return false;\n }\n if (\n options.headers.has(name) ||\n options.query?.[name] ||\n options.headers.get('Cookie')?.includes(`${name}=`)\n ) {\n return true;\n }\n return false;\n};\n\nexport async function setAuthParams(\n options: Pick<RequestOptions, 'auth' | 'query' | 'security'> & {\n headers: Headers;\n },\n): Promise<void> {\n for (const auth of options.security ?? []) {\n if (checkForExistence(options, auth.name)) {\n continue;\n }\n\n const token = await getAuthToken(auth, options.auth);\n\n if (!token) {\n continue;\n }\n\n const name = auth.name ?? 'Authorization';\n\n switch (auth.in) {\n case 'query':\n if (!options.query) {\n options.query = {};\n }\n options.query[name] = token;\n break;\n case 'cookie':\n options.headers.append('Cookie', `${name}=${token}`);\n break;\n case 'header':\n default:\n options.headers.set(name, token);\n break;\n }\n }\n}\n\nexport const buildUrl: Client['buildUrl'] = (options) =>\n getUrl({\n baseUrl: options.baseUrl as string,\n path: options.path,\n query: options.query,\n querySerializer:\n typeof options.querySerializer === 'function'\n ? options.querySerializer\n : createQuerySerializer(options.querySerializer),\n url: options.url,\n });\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n const config = { ...a, ...b };\n if (config.baseUrl?.endsWith('/')) {\n config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);\n }\n config.headers = mergeHeaders(a.headers, b.headers);\n return config;\n};\n\nconst headersEntries = (headers: Headers): Array<[string, string]> => {\n const entries: Array<[string, string]> = [];\n headers.forEach((value, key) => {\n entries.push([key, value]);\n });\n return entries;\n};\n\nexport const mergeHeaders = (\n ...headers: Array<Required<Config>['headers'] | undefined>\n): Headers => {\n const mergedHeaders = new Headers();\n for (const header of headers) {\n if (!header) {\n continue;\n }\n\n const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);\n\n for (const [key, value] of iterator) {\n if (value === null) {\n mergedHeaders.delete(key);\n } else if (Array.isArray(value)) {\n for (const v of value) {\n mergedHeaders.append(key, v as string);\n }\n } else if (value !== undefined) {\n // assume object headers are meant to be JSON stringified, i.e., their\n // content value in OpenAPI specification is 'application/json'\n mergedHeaders.set(\n key,\n typeof value === 'object' ? JSON.stringify(value) : (value as string),\n );\n }\n }\n }\n return mergedHeaders;\n};\n\ntype ErrInterceptor<Err, Res, Req, Options> = (\n error: Err,\n /** response may be undefined due to a network error where no response object is produced */\n response: Res | undefined,\n /** request may be undefined, because error may be from building the request object itself */\n request: Req | undefined,\n options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;\n\ntype ResInterceptor<Res, Req, Options> = (\n response: Res,\n request: Req,\n options: Options,\n) => Res | Promise<Res>;\n\nclass Interceptors<Interceptor> {\n fns: Array<Interceptor | null> = [];\n\n clear(): void {\n this.fns = [];\n }\n\n eject(id: number | Interceptor): void {\n const index = this.getInterceptorIndex(id);\n if (this.fns[index]) {\n this.fns[index] = null;\n }\n }\n\n exists(id: number | Interceptor): boolean {\n const index = this.getInterceptorIndex(id);\n return Boolean(this.fns[index]);\n }\n\n getInterceptorIndex(id: number | Interceptor): number {\n if (typeof id === 'number') {\n return this.fns[id] ? id : -1;\n }\n return this.fns.indexOf(id);\n }\n\n update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false {\n const index = this.getInterceptorIndex(id);\n if (this.fns[index]) {\n this.fns[index] = fn;\n return id;\n }\n return false;\n }\n\n use(fn: Interceptor): number {\n this.fns.push(fn);\n return this.fns.length - 1;\n }\n}\n\nexport interface Middleware<Req, Res, Err, Options> {\n error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;\n request: Interceptors<ReqInterceptor<Req, Options>>;\n response: Interceptors<ResInterceptor<Res, Req, Options>>;\n}\n\nexport const createInterceptors = <Req, Res, Err, Options>(): Middleware<\n Req,\n Res,\n Err,\n Options\n> => ({\n error: new Interceptors<ErrInterceptor<Err, Res, Req, Options>>(),\n request: new Interceptors<ReqInterceptor<Req, Options>>(),\n response: new Interceptors<ResInterceptor<Res, Req, Options>>(),\n});\n\nconst defaultQuerySerializer = createQuerySerializer({\n allowReserved: false,\n array: {\n explode: true,\n style: 'form',\n },\n object: {\n explode: true,\n style: 'deepObject',\n },\n});\n\nconst defaultHeaders = {\n 'Content-Type': 'application/json',\n};\n\nexport const createConfig = <T extends ClientOptions = ClientOptions>(\n override: Config<Omit<ClientOptions, keyof T> & T> = {},\n): Config<Omit<ClientOptions, keyof T> & T> => ({\n ...jsonBodySerializer,\n headers: defaultHeaders,\n parseAs: 'auto',\n querySerializer: defaultQuerySerializer,\n ...override,\n});\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen';\nimport {\n buildUrl,\n createConfig,\n createInterceptors,\n getParseAs,\n mergeConfigs,\n mergeHeaders,\n setAuthParams,\n} from './utils.gen';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n body?: any;\n headers: ReturnType<typeof mergeHeaders>;\n};\n\nexport const createClient = (config: Config = {}): Client => {\n let _config = mergeConfigs(createConfig(), config);\n\n const getConfig = (): Config => ({ ..._config });\n\n const setConfig = (config: Config): Config => {\n _config = mergeConfigs(_config, config);\n return getConfig();\n };\n\n const interceptors = createInterceptors<Request, Response, unknown, ResolvedRequestOptions>();\n\n const beforeRequest = async <\n TData = unknown,\n TResponseStyle extends 'data' | 'fields' = 'fields',\n ThrowOnError extends boolean = boolean,\n Url extends string = string,\n >(\n options: RequestOptions<TData, TResponseStyle, ThrowOnError, Url>,\n ) => {\n const opts = {\n ..._config,\n ...options,\n fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n headers: mergeHeaders(_config.headers, options.headers),\n serializedBody: undefined as string | undefined,\n };\n\n if (opts.security) {\n await setAuthParams(opts);\n }\n\n if (opts.requestValidator) {\n await opts.requestValidator(opts);\n }\n\n if (opts.body !== undefined && opts.bodySerializer) {\n opts.serializedBody = opts.bodySerializer(opts.body) as string | undefined;\n }\n\n // remove Content-Type header if body is empty to avoid sending invalid requests\n if (opts.body === undefined || opts.serializedBody === '') {\n opts.headers.delete('Content-Type');\n }\n\n const resolvedOpts = opts as typeof opts &\n ResolvedRequestOptions<TResponseStyle, ThrowOnError, Url>;\n const url = buildUrl(resolvedOpts);\n\n return { opts: resolvedOpts, url };\n };\n\n const request: Client['request'] = async (options) => {\n const throwOnError = options.throwOnError ?? _config.throwOnError;\n const responseStyle = options.responseStyle ?? _config.responseStyle;\n\n let request: Request | undefined;\n let response: Response | undefined;\n\n try {\n const { opts, url } = await beforeRequest(options);\n const requestInit: ReqInit = {\n redirect: 'follow',\n ...opts,\n body: getValidRequestBody(opts),\n };\n\n request = new Request(url, requestInit);\n\n for (const fn of interceptors.request.fns) {\n if (fn) {\n request = await fn(request, opts);\n }\n }\n\n // fetch must be assigned here, otherwise it would throw the error:\n // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation\n const _fetch = opts.fetch!;\n\n response = await _fetch(request);\n\n for (const fn of interceptors.response.fns) {\n if (fn) {\n response = await fn(response, request, opts);\n }\n }\n\n const result = {\n request,\n response,\n };\n\n if (response.ok) {\n const parseAs =\n (opts.parseAs === 'auto'\n ? getParseAs(response.headers.get('Content-Type'))\n : opts.parseAs) ?? 'json';\n\n if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n let emptyData: any;\n switch (parseAs) {\n case 'arrayBuffer':\n case 'blob':\n case 'text':\n emptyData = await response[parseAs]();\n break;\n case 'formData':\n emptyData = new FormData();\n break;\n case 'stream':\n emptyData = response.body;\n break;\n case 'json':\n default:\n emptyData = {};\n break;\n }\n return opts.responseStyle === 'data'\n ? emptyData\n : {\n data: emptyData,\n ...result,\n };\n }\n\n let data: any;\n switch (parseAs) {\n case 'arrayBuffer':\n case 'blob':\n case 'formData':\n case 'text':\n data = await response[parseAs]();\n break;\n case 'json': {\n // Some servers return 200 with no Content-Length and empty body.\n // response.json() would throw; read as text and parse if non-empty.\n const text = await response.text();\n data = text ? JSON.parse(text) : {};\n break;\n }\n case 'stream':\n return opts.responseStyle === 'data'\n ? response.body\n : {\n data: response.body,\n ...result,\n };\n }\n\n if (parseAs === 'json') {\n if (opts.responseValidator) {\n await opts.responseValidator(data);\n }\n\n if (opts.responseTransformer) {\n data = await opts.responseTransformer(data);\n }\n }\n\n return opts.responseStyle === 'data'\n ? data\n : {\n data,\n ...result,\n };\n }\n\n const textError = await response.text();\n let jsonError: unknown;\n\n try {\n jsonError = JSON.parse(textError);\n } catch {\n // noop\n }\n\n throw jsonError ?? textError;\n } catch (error) {\n let finalError = error;\n\n for (const fn of interceptors.error.fns) {\n if (fn) {\n finalError = await fn(finalError, response, request, options as ResolvedRequestOptions);\n }\n }\n\n finalError = finalError || {};\n\n if (throwOnError) {\n throw finalError;\n }\n\n // TODO: we probably want to return error and improve types\n return responseStyle === 'data'\n ? undefined\n : {\n error: finalError,\n request,\n response,\n };\n }\n };\n\n const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n request({ ...options, method });\n\n const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n const { opts, url } = await beforeRequest(options);\n return createSseClient({\n ...opts,\n body: opts.body as BodyInit | null | undefined,\n method,\n onRequest: async (url, init) => {\n let request = new Request(url, init);\n for (const fn of interceptors.request.fns) {\n if (fn) {\n request = await fn(request, opts);\n }\n }\n return request;\n },\n serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n url,\n });\n };\n\n const _buildUrl: Client['buildUrl'] = (options) => buildUrl({ ..._config, ...options });\n\n return {\n buildUrl: _buildUrl,\n connect: makeMethodFn('CONNECT'),\n delete: makeMethodFn('DELETE'),\n get: makeMethodFn('GET'),\n getConfig,\n head: makeMethodFn('HEAD'),\n interceptors,\n options: makeMethodFn('OPTIONS'),\n patch: makeMethodFn('PATCH'),\n post: makeMethodFn('POST'),\n put: makeMethodFn('PUT'),\n request,\n setConfig,\n sse: {\n connect: makeSseFn('CONNECT'),\n delete: makeSseFn('DELETE'),\n get: makeSseFn('GET'),\n head: makeSseFn('HEAD'),\n options: makeSseFn('OPTIONS'),\n patch: makeSseFn('PATCH'),\n post: makeSseFn('POST'),\n put: makeSseFn('PUT'),\n trace: makeSseFn('TRACE'),\n },\n trace: makeMethodFn('TRACE'),\n } as Client;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client';\nimport { client } from './client.gen';\nimport type { CreateAlertData, CreateAlertErrors, CreateAlertResponses, CreateApiKeyData, CreateApiKeyErrors, CreateApiKeyResponses, CreateChannelData, CreateChannelErrors, CreateChannelResponses, CreateKeywordData, CreateKeywordErrors, CreateKeywordResponses, CreateSegmentData, CreateSegmentErrors, CreateSegmentResponses, DeleteAlertData, DeleteAlertErrors, DeleteAlertResponses, DeleteChannelData, DeleteChannelErrors, DeleteChannelResponses, DeleteKeywordData, DeleteKeywordErrors, DeleteKeywordResponses, DeleteSegmentData, DeleteSegmentErrors, DeleteSegmentResponses, ExportMentionsCsvData, ExportMentionsCsvErrors, ExportMentionsCsvResponses, ExportPeopleCsvData, ExportPeopleCsvErrors, ExportPeopleCsvResponses, GetAlertData, GetAlertErrors, GetAlertResponses, GetAnalyticsBreakdownData, GetAnalyticsBreakdownErrors, GetAnalyticsBreakdownResponses, GetAnalyticsSeriesData, GetAnalyticsSeriesErrors, GetAnalyticsSeriesResponses, GetAnalyticsSummaryData, GetAnalyticsSummaryErrors, GetAnalyticsSummaryResponses, GetChannelData, GetChannelErrors, GetChannelResponses, GetCompanyData, GetCompanyErrors, GetCompanyResponses, GetHealthData, GetHealthResponses, GetKeywordData, GetKeywordErrors, GetKeywordResponses, GetMentionData, GetMentionErrors, GetMentionResponses, GetPersonData, GetPersonErrors, GetPersonResponses, GetSegmentData, GetSegmentErrors, GetSegmentResponses, GetShareOfVoiceData, GetShareOfVoiceErrors, GetShareOfVoiceResponses, ListAlertsData, ListAlertsErrors, ListAlertsResponses, ListApiKeysData, ListApiKeysErrors, ListApiKeysResponses, ListChannelDeliveriesData, ListChannelDeliveriesErrors, ListChannelDeliveriesResponses, ListChannelsData, ListChannelsErrors, ListChannelsResponses, ListKeywordsData, ListKeywordsErrors, ListKeywordsResponses, ListPeopleData, ListPeopleErrors, ListPeopleResponses, ListSegmentsData, ListSegmentsErrors, ListSegmentsResponses, MergePeopleData, MergePeopleErrors, MergePeopleResponses, RevokeApiKeyData, RevokeApiKeyErrors, RevokeApiKeyResponses, RotateWebhookSecretData, RotateWebhookSecretErrors, RotateWebhookSecretResponses, RunAlertDigestData, RunAlertDigestErrors, RunAlertDigestResponses, SearchMentionsData, SearchMentionsErrors, SearchMentionsResponses, SplitPersonData, SplitPersonErrors, SplitPersonResponses, TestAlertData, TestAlertErrors, TestAlertResponses, TestChannelData, TestChannelErrors, TestChannelResponses, UpdateAlertData, UpdateAlertErrors, UpdateAlertResponses, UpdateChannelData, UpdateChannelErrors, UpdateChannelResponses, UpdateCompanyData, UpdateCompanyErrors, UpdateCompanyResponses, UpdateKeywordData, UpdateKeywordErrors, UpdateKeywordResponses, UpdateMentionData, UpdateMentionErrors, UpdateMentionResponses, UpdatePersonData, UpdatePersonErrors, UpdatePersonResponses, UpdateSegmentData, UpdateSegmentErrors, UpdateSegmentResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {\n /**\n * You can provide a client instance returned by `createClient()` instead of\n * individual options. This might be also useful if you want to implement a\n * custom client.\n */\n client?: Client;\n /**\n * You can pass arbitrary values through the `meta` object. This can be\n * used to access values that aren't defined as part of the SDK function.\n */\n meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;\n};\n\nexport const getHealth = <ThrowOnError extends boolean = false>(options?: Options<GetHealthData, ThrowOnError>): RequestResult<GetHealthResponses, unknown, ThrowOnError> => (options?.client ?? client).get<GetHealthResponses, unknown, ThrowOnError>({ url: '/v1/health', ...options });\n\n/**\n * List keywords\n *\n * Every keyword of the workspace, newest first, with its match stats and poll health.\n */\nexport const listKeywords = <ThrowOnError extends boolean = false>(options?: Options<ListKeywordsData, ThrowOnError>): RequestResult<ListKeywordsResponses, ListKeywordsErrors, ThrowOnError> => (options?.client ?? client).get<ListKeywordsResponses, ListKeywordsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords',\n ...options\n});\n\n/**\n * Track a keyword\n *\n * Start tracking a word or phrase. Matching, classification and delivery begin on the next poll. A funded workspace tracks up to 500 keywords; each costs $5 per month, deducted daily from the balance.\n */\nexport const createKeyword = <ThrowOnError extends boolean = false>(options: Options<CreateKeywordData, ThrowOnError>): RequestResult<CreateKeywordResponses, CreateKeywordErrors, ThrowOnError> => (options.client ?? client).post<CreateKeywordResponses, CreateKeywordErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a keyword\n *\n * Removes the keyword and its matches. Posts also matched by another keyword stay.\n */\nexport const deleteKeyword = <ThrowOnError extends boolean = false>(options: Options<DeleteKeywordData, ThrowOnError>): RequestResult<DeleteKeywordResponses, DeleteKeywordErrors, ThrowOnError> => (options.client ?? client).delete<DeleteKeywordResponses, DeleteKeywordErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords/{id}',\n ...options\n});\n\n/**\n * Get a keyword\n */\nexport const getKeyword = <ThrowOnError extends boolean = false>(options: Options<GetKeywordData, ThrowOnError>): RequestResult<GetKeywordResponses, GetKeywordErrors, ThrowOnError> => (options.client ?? client).get<GetKeywordResponses, GetKeywordErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords/{id}',\n ...options\n});\n\n/**\n * Update a keyword\n *\n * Mute or unmute it, or change the platforms it is tracked on.\n */\nexport const updateKeyword = <ThrowOnError extends boolean = false>(options: Options<UpdateKeywordData, ThrowOnError>): RequestResult<UpdateKeywordResponses, UpdateKeywordErrors, ThrowOnError> => (options.client ?? client).patch<UpdateKeywordResponses, UpdateKeywordErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Get a mention\n *\n * One mention by id, as it appears in the list: the post, its author with reach and your tags, the classification, the priority score and the triage fields. Ids belong to your organization; any other id is a 404.\n */\nexport const getMention = <ThrowOnError extends boolean = false>(options: Options<GetMentionData, ThrowOnError>): RequestResult<GetMentionResponses, GetMentionErrors, ThrowOnError> => (options.client ?? client).get<GetMentionResponses, GetMentionErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions/{id}',\n ...options\n});\n\n/**\n * Update a mention\n *\n * The one write on a mention. Set status to ignored or done to handle it (open puts it back), assign it to a workspace member, snooze it out of the feed, or leave an internal note. Null clears a field; omitted fields are untouched. Delivery and billing never change.\n */\nexport const updateMention = <ThrowOnError extends boolean = false>(options: Options<UpdateMentionData, ThrowOnError>): RequestResult<UpdateMentionResponses, UpdateMentionErrors, ThrowOnError> => (options.client ?? client).patch<UpdateMentionResponses, UpdateMentionErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List mentions\n *\n * Mentions matched to your keywords, filtered and paginated. Default order is newest match first; sort=priority ranks the last 30 days of matches by attention score. Page with nextCursor, passing the same filters and sort. A mention is one post matched to one keyword.\n */\nexport const searchMentions = <ThrowOnError extends boolean = false>(options?: Options<SearchMentionsData, ThrowOnError>): RequestResult<SearchMentionsResponses, SearchMentionsErrors, ThrowOnError> => (options?.client ?? client).get<SearchMentionsResponses, SearchMentionsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions',\n ...options\n});\n\n/**\n * Export mentions as CSV\n *\n * The same mentions GET /v1/mentions would list for these filters, as CSV, newest matched first (the order they entered your feed, which can differ from the post date): id, published_at, platform, keyword, author, author_url, author_followers, relevance, sentiment, intents (pipe-separated), status, relevant, delivered, url, text (first 1,000 characters). Capped at 10,000 rows; the X-Mentions-Truncated header says when the cap cut the list. At most 6 exports per minute per workspace; a 429 carries Retry-After.\n */\nexport const exportMentionsCsv = <ThrowOnError extends boolean = false>(options?: Options<ExportMentionsCsvData, ThrowOnError>): RequestResult<ExportMentionsCsvResponses, ExportMentionsCsvErrors, ThrowOnError> => (options?.client ?? client).get<ExportMentionsCsvResponses, ExportMentionsCsvErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions/export.csv',\n ...options\n});\n\n/**\n * Export people as CSV\n *\n * The same list as GET /v1/people (segmentId included) as CSV, one row per person with their contact columns: handle, followers, email, website, company, location, tags. Capped at 5,000 people. At most 6 exports per minute per workspace; a 429 carries Retry-After.\n */\nexport const exportPeopleCsv = <ThrowOnError extends boolean = false>(options?: Options<ExportPeopleCsvData, ThrowOnError>): RequestResult<ExportPeopleCsvResponses, ExportPeopleCsvErrors, ThrowOnError> => (options?.client ?? client).get<ExportPeopleCsvResponses, ExportPeopleCsvErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/export.csv',\n ...options\n});\n\n/**\n * List people\n *\n * The people behind your mentions: one row per person, with their accounts, reach, public profile, per-workspace stats and your annotations. Filter by platform, tag, follower range, mention counts, intents seen, keyword kinds mentioned or never mentioned, or a saved segment. Offset-paginated with a total.\n */\nexport const listPeople = <ThrowOnError extends boolean = false>(options?: Options<ListPeopleData, ThrowOnError>): RequestResult<ListPeopleResponses, ListPeopleErrors, ThrowOnError> => (options?.client ?? client).get<ListPeopleResponses, ListPeopleErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people',\n ...options\n});\n\n/**\n * Get a person\n *\n * One person as your workspace sees them. An account merged into someone resolves to that person.\n */\nexport const getPerson = <ThrowOnError extends boolean = false>(options: Options<GetPersonData, ThrowOnError>): RequestResult<GetPersonResponses, GetPersonErrors, ThrowOnError> => (options.client ?? client).get<GetPersonResponses, GetPersonErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}',\n ...options\n});\n\n/**\n * Update your annotations on a person\n *\n * Tags, notes and mute, for your workspace only. Mute hides their posts from your feed and every channel; ingest and billing never change.\n */\nexport const updatePerson = <ThrowOnError extends boolean = false>(options: Options<UpdatePersonData, ThrowOnError>): RequestResult<UpdatePersonResponses, UpdatePersonErrors, ThrowOnError> => (options.client ?? client).patch<UpdatePersonResponses, UpdatePersonErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Merge an account into a person\n *\n * Declare that this account and another person are the same human, for your workspace only. Their mentions, tags and notes combine under the person named by `into`.\n */\nexport const mergePeople = <ThrowOnError extends boolean = false>(options: Options<MergePeopleData, ThrowOnError>): RequestResult<MergePeopleResponses, MergePeopleErrors, ThrowOnError> => (options.client ?? client).post<MergePeopleResponses, MergePeopleErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}/merge',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Undo a merge\n *\n * The account becomes its own person again.\n */\nexport const splitPerson = <ThrowOnError extends boolean = false>(options: Options<SplitPersonData, ThrowOnError>): RequestResult<SplitPersonResponses, SplitPersonErrors, ThrowOnError> => (options.client ?? client).post<SplitPersonResponses, SplitPersonErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}/split',\n ...options\n});\n\n/**\n * List segments\n *\n * Your saved segments, each with the number of people in it right now (segments are evaluated on every read, never materialized), plus presets you can save as a starting point. Pass a segment id to GET /v1/people to list its members.\n */\nexport const listSegments = <ThrowOnError extends boolean = false>(options?: Options<ListSegmentsData, ThrowOnError>): RequestResult<ListSegmentsResponses, ListSegmentsErrors, ThrowOnError> => (options?.client ?? client).get<ListSegmentsResponses, ListSegmentsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments',\n ...options\n});\n\n/**\n * Create a segment\n */\nexport const createSegment = <ThrowOnError extends boolean = false>(options: Options<CreateSegmentData, ThrowOnError>): RequestResult<CreateSegmentResponses, CreateSegmentErrors, ThrowOnError> => (options.client ?? client).post<CreateSegmentResponses, CreateSegmentErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a segment\n *\n * Nobody in it is affected.\n */\nexport const deleteSegment = <ThrowOnError extends boolean = false>(options: Options<DeleteSegmentData, ThrowOnError>): RequestResult<DeleteSegmentResponses, DeleteSegmentErrors, ThrowOnError> => (options.client ?? client).delete<DeleteSegmentResponses, DeleteSegmentErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments/{id}',\n ...options\n});\n\n/**\n * Get a segment\n */\nexport const getSegment = <ThrowOnError extends boolean = false>(options: Options<GetSegmentData, ThrowOnError>): RequestResult<GetSegmentResponses, GetSegmentErrors, ThrowOnError> => (options.client ?? client).get<GetSegmentResponses, GetSegmentErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments/{id}',\n ...options\n});\n\n/**\n * Update a segment\n */\nexport const updateSegment = <ThrowOnError extends boolean = false>(options: Options<UpdateSegmentData, ThrowOnError>): RequestResult<UpdateSegmentResponses, UpdateSegmentErrors, ThrowOnError> => (options.client ?? client).patch<UpdateSegmentResponses, UpdateSegmentErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Get the company profile\n *\n * What the classifier knows about you: name, description, use cases, your own accounts, and the composed context it reads.\n */\nexport const getCompany = <ThrowOnError extends boolean = false>(options?: Options<GetCompanyData, ThrowOnError>): RequestResult<GetCompanyResponses, GetCompanyErrors, ThrowOnError> => (options?.client ?? client).get<GetCompanyResponses, GetCompanyErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/company',\n ...options\n});\n\n/**\n * Update the company profile\n *\n * Changing profile fields recomposes the classifier context; setting `context` directly overrides it until the next profile edit. Relevance scores for new mentions follow at once.\n */\nexport const updateCompany = <ThrowOnError extends boolean = false>(options: Options<UpdateCompanyData, ThrowOnError>): RequestResult<UpdateCompanyResponses, UpdateCompanyErrors, ThrowOnError> => (options.client ?? client).patch<UpdateCompanyResponses, UpdateCompanyErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/company',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List API keys\n */\nexport const listApiKeys = <ThrowOnError extends boolean = false>(options?: Options<ListApiKeysData, ThrowOnError>): RequestResult<ListApiKeysResponses, ListApiKeysErrors, ThrowOnError> => (options?.client ?? client).get<ListApiKeysResponses, ListApiKeysErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/api-keys',\n ...options\n});\n\n/**\n * Create an API key\n *\n * Mint a key for this workspace. The key itself is returned once; only its hash is stored.\n */\nexport const createApiKey = <ThrowOnError extends boolean = false>(options: Options<CreateApiKeyData, ThrowOnError>): RequestResult<CreateApiKeyResponses, CreateApiKeyErrors, ThrowOnError> => (options.client ?? client).post<CreateApiKeyResponses, CreateApiKeyErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/api-keys',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Revoke an API key\n *\n * Takes effect at once on the API and within a few minutes on cached verifications.\n */\nexport const revokeApiKey = <ThrowOnError extends boolean = false>(options: Options<RevokeApiKeyData, ThrowOnError>): RequestResult<RevokeApiKeyResponses, RevokeApiKeyErrors, ThrowOnError> => (options.client ?? client).delete<RevokeApiKeyResponses, RevokeApiKeyErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/api-keys/{id}',\n ...options\n});\n\n/**\n * Delete an alert\n */\nexport const deleteAlert = <ThrowOnError extends boolean = false>(options: Options<DeleteAlertData, ThrowOnError>): RequestResult<DeleteAlertResponses, DeleteAlertErrors, ThrowOnError> => (options.client ?? client).delete<DeleteAlertResponses, DeleteAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}',\n ...options\n});\n\n/**\n * Get an alert\n */\nexport const getAlert = <ThrowOnError extends boolean = false>(options: Options<GetAlertData, ThrowOnError>): RequestResult<GetAlertResponses, GetAlertErrors, ThrowOnError> => (options.client ?? client).get<GetAlertResponses, GetAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}',\n ...options\n});\n\n/**\n * Update an alert\n */\nexport const updateAlert = <ThrowOnError extends boolean = false>(options: Options<UpdateAlertData, ThrowOnError>): RequestResult<UpdateAlertResponses, UpdateAlertErrors, ThrowOnError> => (options.client ?? client).patch<UpdateAlertResponses, UpdateAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List alerts\n */\nexport const listAlerts = <ThrowOnError extends boolean = false>(options?: Options<ListAlertsData, ThrowOnError>): RequestResult<ListAlertsResponses, ListAlertsErrors, ThrowOnError> => (options?.client ?? client).get<ListAlertsResponses, ListAlertsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts',\n ...options\n});\n\n/**\n * Create an alert\n */\nexport const createAlert = <ThrowOnError extends boolean = false>(options: Options<CreateAlertData, ThrowOnError>): RequestResult<CreateAlertResponses, CreateAlertErrors, ThrowOnError> => (options.client ?? client).post<CreateAlertResponses, CreateAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Send a test through an alert's channels\n */\nexport const testAlert = <ThrowOnError extends boolean = false>(options: Options<TestAlertData, ThrowOnError>): RequestResult<TestAlertResponses, TestAlertErrors, ThrowOnError> => (options.client ?? client).post<TestAlertResponses, TestAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}/test',\n ...options\n});\n\n/**\n * Send a digest now\n */\nexport const runAlertDigest = <ThrowOnError extends boolean = false>(options: Options<RunAlertDigestData, ThrowOnError>): RequestResult<RunAlertDigestResponses, RunAlertDigestErrors, ThrowOnError> => (options.client ?? client).post<RunAlertDigestResponses, RunAlertDigestErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}/run',\n ...options\n});\n\n/**\n * Headline counts for a window\n *\n * Matched and relevant mentions, distinct posts and people, sentiment, buying intent and questions, estimated reach, and where the matches stand in triage. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\n */\nexport const getAnalyticsSummary = <ThrowOnError extends boolean = false>(options?: Options<GetAnalyticsSummaryData, ThrowOnError>): RequestResult<GetAnalyticsSummaryResponses, GetAnalyticsSummaryErrors, ThrowOnError> => (options?.client ?? client).get<GetAnalyticsSummaryResponses, GetAnalyticsSummaryErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/analytics/summary',\n ...options\n});\n\n/**\n * Mentions over time\n *\n * Matched, relevant and sentiment counts per day or week across the window, as one total series or split per platform or per keyword with `by`. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\n */\nexport const getAnalyticsSeries = <ThrowOnError extends boolean = false>(options?: Options<GetAnalyticsSeriesData, ThrowOnError>): RequestResult<GetAnalyticsSeriesResponses, GetAnalyticsSeriesErrors, ThrowOnError> => (options?.client ?? client).get<GetAnalyticsSeriesResponses, GetAnalyticsSeriesErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/analytics/series',\n ...options\n});\n\n/**\n * Mentions grouped by one dimension\n *\n * One table of matched, relevant and sentiment counts grouped by `by`: platform, keyword, sentiment, intent, status, hour (weekday and hour of day) or person. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\n */\nexport const getAnalyticsBreakdown = <ThrowOnError extends boolean = false>(options: Options<GetAnalyticsBreakdownData, ThrowOnError>): RequestResult<GetAnalyticsBreakdownResponses, GetAnalyticsBreakdownErrors, ThrowOnError> => (options.client ?? client).get<GetAnalyticsBreakdownResponses, GetAnalyticsBreakdownErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/analytics/breakdown',\n ...options\n});\n\n/**\n * Brand against competitors\n *\n * Every keyword matched in the window with its counts and its share of brand plus competitor matches; topic keywords are counted but stay out of the split. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\n */\nexport const getShareOfVoice = <ThrowOnError extends boolean = false>(options?: Options<GetShareOfVoiceData, ThrowOnError>): RequestResult<GetShareOfVoiceResponses, GetShareOfVoiceErrors, ThrowOnError> => (options?.client ?? client).get<GetShareOfVoiceResponses, GetShareOfVoiceErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/analytics/share-of-voice',\n ...options\n});\n\n/**\n * Delete a channel\n */\nexport const deleteChannel = <ThrowOnError extends boolean = false>(options: Options<DeleteChannelData, ThrowOnError>): RequestResult<DeleteChannelResponses, DeleteChannelErrors, ThrowOnError> => (options.client ?? client).delete<DeleteChannelResponses, DeleteChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}',\n ...options\n});\n\n/**\n * Get a channel\n */\nexport const getChannel = <ThrowOnError extends boolean = false>(options: Options<GetChannelData, ThrowOnError>): RequestResult<GetChannelResponses, GetChannelErrors, ThrowOnError> => (options.client ?? client).get<GetChannelResponses, GetChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}',\n ...options\n});\n\n/**\n * Update a channel\n */\nexport const updateChannel = <ThrowOnError extends boolean = false>(options: Options<UpdateChannelData, ThrowOnError>): RequestResult<UpdateChannelResponses, UpdateChannelErrors, ThrowOnError> => (options.client ?? client).patch<UpdateChannelResponses, UpdateChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Send a test to a channel\n */\nexport const testChannel = <ThrowOnError extends boolean = false>(options: Options<TestChannelData, ThrowOnError>): RequestResult<TestChannelResponses, TestChannelErrors, ThrowOnError> => (options.client ?? client).post<TestChannelResponses, TestChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}/test',\n ...options\n});\n\n/**\n * Rotate a webhook secret\n */\nexport const rotateWebhookSecret = <ThrowOnError extends boolean = false>(options: Options<RotateWebhookSecretData, ThrowOnError>): RequestResult<RotateWebhookSecretResponses, RotateWebhookSecretErrors, ThrowOnError> => (options.client ?? client).post<RotateWebhookSecretResponses, RotateWebhookSecretErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}/rotate-secret',\n ...options\n});\n\n/**\n * List deliveries to a channel\n */\nexport const listChannelDeliveries = <ThrowOnError extends boolean = false>(options: Options<ListChannelDeliveriesData, ThrowOnError>): RequestResult<ListChannelDeliveriesResponses, ListChannelDeliveriesErrors, ThrowOnError> => (options.client ?? client).get<ListChannelDeliveriesResponses, ListChannelDeliveriesErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}/deliveries',\n ...options\n});\n\n/**\n * List channels\n */\nexport const listChannels = <ThrowOnError extends boolean = false>(options?: Options<ListChannelsData, ThrowOnError>): RequestResult<ListChannelsResponses, ListChannelsErrors, ThrowOnError> => (options?.client ?? client).get<ListChannelsResponses, ListChannelsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels',\n ...options\n});\n\n/**\n * Create a channel\n */\nexport const createChannel = <ThrowOnError extends boolean = false>(options: Options<CreateChannelData, ThrowOnError>): RequestResult<CreateChannelResponses, CreateChannelErrors, ThrowOnError> => (options.client ?? client).post<CreateChannelResponses, CreateChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, type ClientOptions, type Config, createClient, createConfig } from './client';\nimport type { ClientOptions as ClientOptions2 } from './types.gen';\n\n/**\n * The `createClientConfig()` function will be called on client initialization\n * and the returned object will become the client's initial configuration.\n *\n * You may want to initialize your client this way instead of calling\n * `setConfig()`. This is useful for example if you're using Next.js\n * to ensure your client always has the correct values.\n */\nexport type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;\n\nexport const client: Client = createClient(createConfig<ClientOptions2>({ baseUrl: 'https://api.mentio.dev' }));\n","/**\n * @mentio-dev/sdk: a typed client for the Mentio API. Everything under\n * ./generated comes from the API's OpenAPI document (`pnpm generate`), one\n * function per operation; this file adds the constructor that binds a key\n * and a host once so calls read `mentio.searchMentions({ query })`.\n */\nimport { createClient, createConfig, type Client } from './generated/client';\nimport * as sdk from './generated/sdk.gen';\n\nexport * from './generated';\nexport { createClient, createConfig } from './generated/client';\nexport type { Client, Config, RequestResult } from './generated/client';\n\nexport const DEFAULT_BASE_URL = 'https://api.mentio.dev';\n\nexport interface MentioOptions {\n /** API key from the dashboard or POST /v1/api-keys (mk_live_...). */\n apiKey: string;\n /** Another deployment's host; the hosted API by default. */\n baseUrl?: string;\n /** Custom fetch, for tests or runtimes without a global one. */\n fetch?: typeof fetch;\n /** Extra headers sent on every request. */\n headers?: Record<string, string>;\n}\n\n/** Every SDK function, pre-bound to one client, plus the client itself for\n * interceptors and raw requests. Passing `client` in a call still wins. */\nexport type Mentio = typeof sdk & { client: Client };\n\nexport function createMentio(options: MentioOptions): Mentio {\n const client = createClient(\n createConfig({\n baseUrl: (options.baseUrl ?? DEFAULT_BASE_URL).replace(/\\/+$/, ''),\n auth: () => options.apiKey,\n ...(options.fetch ? { fetch: options.fetch } : {}),\n ...(options.headers ? { headers: options.headers } : {}),\n }),\n );\n const bound: Record<string, unknown> = {};\n for (const [name, fn] of Object.entries(sdk)) {\n if (typeof fn !== 'function') continue;\n const call = fn as (callOptions?: { client?: Client }) => unknown;\n bound[name] = (callOptions?: { client?: Client }) => call({ ...callOptions, client: callOptions?.client ?? client });\n }\n return { ...(bound as typeof sdk), client };\n}\n"],"mappings":";;;;;;;AA2DO,IAAM,qBAAqB;AAAA,EAChC,gBAAgB,CAAC,SACf,KAAK,UAAU,MAAM,CAAC,MAAM,UAAW,OAAO,UAAU,WAAW,MAAM,SAAS,IAAI,KAAM;AAChG;;;AClBA,IAAM,mBAAyC;AAAA,EAC7C,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,SAAS;AACX;AACA,IAAM,gBAAgB,OAAO,QAAQ,gBAAgB;;;AC+B9C,SAAS,gBAAiC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAA2D;AACzD,MAAI;AAEJ,QAAM,QAAQ,eAAe,CAAC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AAG;AACP,CAAC;AAKM,IAAM,eAAe,CAAuC,aAA+H,SAAS,UAAU,QAAQ,IAA6D;AAAA,EACtR,UAAU,CAAC,EAAE,QAAQ,UAAU,MAAM,OAAO,CAAC;AAAA,EAC7C,KAAK;AAAA,EACL,GAAG;AACP,CAAC;AAKM,IAAM,gBAAgB,CAAuC,aAAiI,QAAQ,UAAU,QAAQ,KAAgE;AAAA,EAC3R,UAAU,CAAC,EAAE,QAAQ,UAAU,MAAM,OAAO,CAAC;AAAA,EAC7C,KAAK;AAAA,EACL,GAAG;AAAA,EACH,SAAS;AAAA,IACL,gBAAgB;AAAA,IAChB,GAAG,QAAQ;AAAA,EACf;AACJ,CAAC;;;AEvfM,IAAM,mBAAmB;AAiBzB,SAAS,aAAa,SAAgC;AAC3D,QAAME,UAAS;AAAA,IACb,aAAa;AAAA,MACX,UAAU,QAAQ,WAAW,kBAAkB,QAAQ,QAAQ,EAAE;AAAA,MACjE,MAAM,MAAM,QAAQ;AAAA,MACpB,GAAI,QAAQ,QAAQ,EAAE,OAAO,QAAQ,MAAM,IAAI,CAAC;AAAA,MAChD,GAAI,QAAQ,UAAU,EAAE,SAAS,QAAQ,QAAQ,IAAI,CAAC;AAAA,IACxD,CAAC;AAAA,EACH;AACA,QAAM,QAAiC,CAAC;AACxC,aAAW,CAAC,MAAM,EAAE,KAAK,OAAO,QAAQ,eAAG,GAAG;AAC5C,QAAI,OAAO,OAAO,WAAY;AAC9B,UAAM,OAAO;AACb,UAAM,IAAI,IAAI,CAAC,gBAAsC,KAAK,EAAE,GAAG,aAAa,QAAQ,aAAa,UAAUA,QAAO,CAAC;AAAA,EACrH;AACA,SAAO,EAAE,GAAI,OAAsB,QAAAA,QAAO;AAC5C;","names":["joinedValues","config","request","url","client"]}
|
|
1
|
+
{"version":3,"sources":["../src/generated/core/bodySerializer.gen.ts","../src/generated/core/params.gen.ts","../src/generated/core/serverSentEvents.gen.ts","../src/generated/core/pathSerializer.gen.ts","../src/generated/core/utils.gen.ts","../src/generated/core/auth.gen.ts","../src/generated/client/utils.gen.ts","../src/generated/client/client.gen.ts","../src/generated/sdk.gen.ts","../src/generated/client.gen.ts","../src/index.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen';\n\nexport type QuerySerializer = (query: Record<string, unknown>) => string;\n\nexport type BodySerializer = (body: unknown) => unknown;\n\ntype QuerySerializerOptionsObject = {\n allowReserved?: boolean;\n array?: Partial<SerializerOptions<ArrayStyle>>;\n object?: Partial<SerializerOptions<ObjectStyle>>;\n};\n\nexport type QuerySerializerOptions = QuerySerializerOptionsObject & {\n /**\n * Per-parameter serialization overrides. When provided, these settings\n * override the global array/object settings for specific parameter names.\n */\n parameters?: Record<string, QuerySerializerOptionsObject>;\n};\n\nconst serializeFormDataPair = (data: FormData, key: string, value: unknown): void => {\n if (typeof value === 'string' || value instanceof Blob) {\n data.append(key, value);\n } else if (value instanceof Date) {\n data.append(key, value.toISOString());\n } else {\n data.append(key, JSON.stringify(value));\n }\n};\n\nconst serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown): void => {\n if (typeof value === 'string') {\n data.append(key, value);\n } else {\n data.append(key, JSON.stringify(value));\n }\n};\n\nexport const formDataBodySerializer = {\n bodySerializer: (body: unknown): FormData => {\n const data = new FormData();\n\n Object.entries(body as Record<string, unknown>).forEach(([key, value]) => {\n if (value === undefined || value === null) {\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((v) => serializeFormDataPair(data, key, v));\n } else {\n serializeFormDataPair(data, key, value);\n }\n });\n\n return data;\n },\n};\n\nexport const jsonBodySerializer = {\n bodySerializer: (body: unknown): string =>\n JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)),\n};\n\nexport const urlSearchParamsBodySerializer = {\n bodySerializer: (body: unknown): string => {\n const data = new URLSearchParams();\n\n Object.entries(body as Record<string, unknown>).forEach(([key, value]) => {\n if (value === undefined || value === null) {\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((v) => serializeUrlSearchParamsPair(data, key, v));\n } else {\n serializeUrlSearchParamsPair(data, key, value);\n }\n });\n\n return data.toString();\n },\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\ntype Slot = 'body' | 'headers' | 'path' | 'query';\n\nexport type Field =\n | {\n in: Exclude<Slot, 'body'>;\n /**\n * Field name. This is the name we want the user to see and use.\n */\n key: string;\n /**\n * Field mapped name. This is the name we want to use in the request.\n * If omitted, we use the same value as `key`.\n */\n map?: string;\n }\n | {\n in: Extract<Slot, 'body'>;\n /**\n * Key isn't required for bodies.\n */\n key?: string;\n map?: string;\n }\n | {\n /**\n * Field name. This is the name we want the user to see and use.\n */\n key: string;\n /**\n * Field mapped name. This is the name we want to use in the request.\n * If `in` is omitted, `map` aliases `key` to the transport layer.\n */\n map: Slot;\n };\n\nexport interface Fields {\n allowExtra?: Partial<Record<Slot, boolean>>;\n args?: ReadonlyArray<Field>;\n}\n\nexport type FieldsConfig = ReadonlyArray<Field | Fields>;\n\nconst extraPrefixesMap: Record<string, Slot> = {\n $body_: 'body',\n $headers_: 'headers',\n $path_: 'path',\n $query_: 'query',\n};\nconst extraPrefixes = Object.entries(extraPrefixesMap);\n\ntype KeyMap = Map<\n string,\n | {\n in: Slot;\n map?: string;\n }\n | {\n in?: never;\n map: Slot;\n }\n>;\n\nfunction buildKeyMap(fields: FieldsConfig, map?: KeyMap): KeyMap {\n if (!map) {\n map = new Map();\n }\n\n for (const config of fields) {\n if ('in' in config) {\n if (config.key) {\n map.set(config.key, {\n in: config.in,\n map: config.map,\n });\n }\n } else if ('key' in config) {\n map.set(config.key, {\n map: config.map,\n });\n } else if (config.args) {\n buildKeyMap(config.args, map);\n }\n }\n\n return map;\n}\n\ninterface Params {\n body?: unknown;\n headers: Record<string, unknown>;\n path: Record<string, unknown>;\n query: Record<string, unknown>;\n}\n\nfunction stripEmptySlots(params: Params): void {\n for (const [slot, value] of Object.entries(params)) {\n if (slot === 'body') continue;\n if (value && typeof value === 'object' && !Array.isArray(value) && !Object.keys(value).length) {\n delete params[slot as Slot];\n }\n }\n}\n\nexport function buildClientParams(args: ReadonlyArray<unknown>, fields: FieldsConfig): Params {\n const params: Params = {\n headers: Object.create(null),\n path: Object.create(null),\n query: Object.create(null),\n };\n\n const map = buildKeyMap(fields);\n\n function writeSlot(slot: Slot, key: string, value: unknown): void {\n let record = params[slot] as Record<string, unknown> | undefined;\n if (record === undefined) {\n record = Object.create(null) as Record<string, unknown>;\n params[slot] = record;\n }\n record[key] = value;\n }\n\n let config: FieldsConfig[number] | undefined;\n\n for (const [index, arg] of args.entries()) {\n if (fields[index]) {\n config = fields[index];\n }\n\n if (!config) {\n continue;\n }\n\n if ('in' in config) {\n if (config.key) {\n const field = map.get(config.key)!;\n const name = field.map || config.key;\n if (field.in) {\n writeSlot(field.in, name, arg);\n }\n } else {\n params.body = arg;\n }\n } else {\n for (const [key, value] of Object.entries(arg ?? {})) {\n const field = map.get(key);\n\n if (field) {\n if (field.in) {\n const name = field.map || key;\n writeSlot(field.in, name, value);\n } else {\n params[field.map] = value;\n }\n } else {\n const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix));\n\n if (extra) {\n const [prefix, slot] = extra;\n writeSlot(slot, key.slice(prefix.length), value);\n } else if ('allowExtra' in config && config.allowExtra) {\n for (const [slot, allowed] of Object.entries(config.allowExtra)) {\n if (allowed) {\n writeSlot(slot as Slot, key, value);\n break;\n }\n }\n }\n }\n }\n }\n }\n\n stripEmptySlots(params);\n\n return params;\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen';\n\nexport type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> &\n Pick<Config, 'method' | 'responseTransformer' | 'responseValidator'> & {\n /**\n * Fetch API implementation. You can use this option to provide a custom\n * fetch instance.\n *\n * @default globalThis.fetch\n */\n fetch?: typeof fetch;\n /**\n * Implementing clients can call request interceptors inside this hook.\n */\n onRequest?: (url: string, init: RequestInit) => Promise<Request>;\n /**\n * Callback invoked when a network or parsing error occurs during streaming.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @param error The error that occurred.\n */\n onSseError?: (error: unknown) => void;\n /**\n * Callback invoked when an event is streamed from the server.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @param event Event streamed from the server.\n * @returns Nothing (void).\n */\n onSseEvent?: (event: StreamEvent<TData>) => void;\n serializedBody?: RequestInit['body'];\n /**\n * Default retry delay in milliseconds.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @default 3000\n */\n sseDefaultRetryDelay?: number;\n /**\n * Maximum number of retry attempts before giving up.\n */\n sseMaxRetryAttempts?: number;\n /**\n * Maximum retry delay in milliseconds.\n *\n * Applies only when exponential backoff is used.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @default 30000\n */\n sseMaxRetryDelay?: number;\n /**\n * Optional sleep function for retry backoff.\n *\n * Defaults to using `setTimeout`.\n */\n sseSleepFn?: (ms: number) => Promise<void>;\n url: string;\n };\n\nexport interface StreamEvent<TData = unknown> {\n data: TData;\n event?: string;\n id?: string;\n retry?: number;\n}\n\nexport type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {\n stream: AsyncGenerator<\n TData extends Record<string, unknown> ? TData[keyof TData] : TData,\n TReturn,\n TNext\n >;\n};\n\nexport function createSseClient<TData = unknown>({\n onRequest,\n onSseError,\n onSseEvent,\n responseTransformer,\n responseValidator,\n sseDefaultRetryDelay,\n sseMaxRetryAttempts,\n sseMaxRetryDelay,\n sseSleepFn,\n url,\n ...options\n}: ServerSentEventsOptions): ServerSentEventsResult<TData> {\n let lastEventId: string | undefined;\n\n const sleep = sseSleepFn ?? ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms)));\n\n const createStream = async function* () {\n let retryDelay: number = sseDefaultRetryDelay ?? 3000;\n let attempt = 0;\n const signal = options.signal ?? new AbortController().signal;\n\n while (true) {\n if (signal.aborted) break;\n\n attempt++;\n\n const headers =\n options.headers instanceof Headers\n ? options.headers\n : new Headers(options.headers as Record<string, string> | undefined);\n\n if (lastEventId !== undefined) {\n headers.set('Last-Event-ID', lastEventId);\n }\n\n try {\n const requestInit: RequestInit = {\n redirect: 'follow',\n ...options,\n body: options.serializedBody,\n headers,\n signal,\n };\n let request = new Request(url, requestInit);\n if (onRequest) {\n request = await onRequest(url, requestInit);\n }\n // fetch must be assigned here, otherwise it would throw the error:\n // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation\n const _fetch = options.fetch ?? globalThis.fetch;\n const response = await _fetch(request);\n\n if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);\n\n if (!response.body) throw new Error('No body in SSE response');\n\n const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();\n\n let buffer = '';\n\n const abortHandler = () => {\n try {\n reader.cancel();\n } catch {\n // noop\n }\n };\n\n signal.addEventListener('abort', abortHandler);\n\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n buffer += value;\n buffer = buffer.replace(/\\r\\n?/g, '\\n'); // normalize line endings\n\n const chunks = buffer.split('\\n\\n');\n buffer = chunks.pop() ?? '';\n\n for (const chunk of chunks) {\n const lines = chunk.split('\\n');\n const dataLines: Array<string> = [];\n let eventName: string | undefined;\n\n for (const line of lines) {\n if (line.startsWith('data:')) {\n dataLines.push(line.replace(/^data:\\s*/, ''));\n } else if (line.startsWith('event:')) {\n eventName = line.replace(/^event:\\s*/, '');\n } else if (line.startsWith('id:')) {\n lastEventId = line.replace(/^id:\\s*/, '');\n } else if (line.startsWith('retry:')) {\n const parsed = Number.parseInt(line.replace(/^retry:\\s*/, ''), 10);\n if (!Number.isNaN(parsed)) {\n retryDelay = parsed;\n }\n }\n }\n\n let data: unknown;\n let parsedJson = false;\n\n if (dataLines.length) {\n const rawData = dataLines.join('\\n');\n try {\n data = JSON.parse(rawData);\n parsedJson = true;\n } catch {\n data = rawData;\n }\n }\n\n if (parsedJson) {\n if (responseValidator) {\n await responseValidator(data);\n }\n\n if (responseTransformer) {\n data = await responseTransformer(data);\n }\n }\n\n onSseEvent?.({\n data,\n event: eventName,\n id: lastEventId,\n retry: retryDelay,\n });\n\n if (dataLines.length) {\n yield data as any;\n }\n }\n }\n } finally {\n signal.removeEventListener('abort', abortHandler);\n reader.releaseLock();\n }\n\n break; // exit loop on normal completion\n } catch (error) {\n // connection failed or aborted; retry after delay\n onSseError?.(error);\n\n if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) {\n break; // stop after firing error\n }\n\n // exponential backoff: double retry each attempt, cap at 30s\n const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000);\n await sleep(backoff);\n }\n }\n };\n\n const stream = createStream();\n\n return { stream };\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\ninterface SerializeOptions<T> extends SerializePrimitiveOptions, SerializerOptions<T> {}\n\ninterface SerializePrimitiveOptions {\n allowReserved?: boolean;\n name: string;\n}\n\nexport interface SerializerOptions<T> {\n /**\n * @default true\n */\n explode: boolean;\n style: T;\n}\n\nexport type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectStyle = 'form' | 'deepObject';\ntype ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\n\ninterface SerializePrimitiveParam extends SerializePrimitiveOptions {\n value: string;\n}\n\nexport const separatorArrayExplode = (style: ArraySeparatorStyle): '.' | ';' | ',' | '&' => {\n switch (style) {\n case 'label':\n return '.';\n case 'matrix':\n return ';';\n case 'simple':\n return ',';\n default:\n return '&';\n }\n};\n\nexport const separatorArrayNoExplode = (style: ArraySeparatorStyle): ',' | '|' | '%20' => {\n switch (style) {\n case 'form':\n return ',';\n case 'pipeDelimited':\n return '|';\n case 'spaceDelimited':\n return '%20';\n default:\n return ',';\n }\n};\n\nexport const separatorObjectExplode = (style: ObjectSeparatorStyle): '.' | ';' | ',' | '&' => {\n switch (style) {\n case 'label':\n return '.';\n case 'matrix':\n return ';';\n case 'simple':\n return ',';\n default:\n return '&';\n }\n};\n\nexport const serializeArrayParam = ({\n allowReserved,\n explode,\n name,\n style,\n value,\n}: SerializeOptions<ArraySeparatorStyle> & {\n value: unknown[];\n}): string => {\n if (!explode) {\n const joinedValues = (\n allowReserved ? value : value.map((v) => encodeURIComponent(v as string))\n ).join(separatorArrayNoExplode(style));\n switch (style) {\n case 'label':\n return `.${joinedValues}`;\n case 'matrix':\n return `;${name}=${joinedValues}`;\n case 'simple':\n return joinedValues;\n default:\n return `${name}=${joinedValues}`;\n }\n }\n\n const separator = separatorArrayExplode(style);\n const joinedValues = value\n .map((v) => {\n if (style === 'label' || style === 'simple') {\n return allowReserved ? v : encodeURIComponent(v as string);\n }\n\n return serializePrimitiveParam({\n allowReserved,\n name,\n value: v as string,\n });\n })\n .join(separator);\n return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;\n};\n\nexport const serializePrimitiveParam = ({\n allowReserved,\n name,\n value,\n}: SerializePrimitiveParam): string => {\n if (value === undefined || value === null) {\n return '';\n }\n\n if (typeof value === 'object') {\n throw new Error(\n 'Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.',\n );\n }\n\n return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;\n};\n\nexport const serializeObjectParam = ({\n allowReserved,\n explode,\n name,\n style,\n value,\n valueOnly,\n}: SerializeOptions<ObjectSeparatorStyle> & {\n value: Record<string, unknown> | Date;\n valueOnly?: boolean;\n}): string => {\n if (value instanceof Date) {\n return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;\n }\n\n if (style !== 'deepObject' && !explode) {\n let values: string[] = [];\n Object.entries(value).forEach(([key, v]) => {\n values = [...values, key, allowReserved ? (v as string) : encodeURIComponent(v as string)];\n });\n const joinedValues = values.join(',');\n switch (style) {\n case 'form':\n return `${name}=${joinedValues}`;\n case 'label':\n return `.${joinedValues}`;\n case 'matrix':\n return `;${name}=${joinedValues}`;\n default:\n return joinedValues;\n }\n }\n\n const separator = separatorObjectExplode(style);\n const joinedValues = Object.entries(value)\n .map(([key, v]) =>\n serializePrimitiveParam({\n allowReserved,\n name: style === 'deepObject' ? `${name}[${key}]` : key,\n value: v as string,\n }),\n )\n .join(separator);\n return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen';\nimport {\n type ArraySeparatorStyle,\n serializeArrayParam,\n serializeObjectParam,\n serializePrimitiveParam,\n} from './pathSerializer.gen';\n\nexport interface PathSerializer {\n path: Record<string, unknown>;\n url: string;\n}\n\nexport const PATH_PARAM_RE: RegExp = /\\{[^{}]+\\}/g;\n\nexport const defaultPathSerializer = ({ path, url: _url }: PathSerializer): string => {\n let url = _url;\n const matches = _url.match(PATH_PARAM_RE);\n if (matches) {\n for (const match of matches) {\n let explode = false;\n let name = match.substring(1, match.length - 1);\n let style: ArraySeparatorStyle = 'simple';\n\n if (name.endsWith('*')) {\n explode = true;\n name = name.substring(0, name.length - 1);\n }\n\n if (name.startsWith('.')) {\n name = name.substring(1);\n style = 'label';\n } else if (name.startsWith(';')) {\n name = name.substring(1);\n style = 'matrix';\n }\n\n const value = path[name];\n\n if (value === undefined || value === null) {\n continue;\n }\n\n if (Array.isArray(value)) {\n url = url.replace(match, serializeArrayParam({ explode, name, style, value }));\n continue;\n }\n\n if (typeof value === 'object') {\n url = url.replace(\n match,\n serializeObjectParam({\n explode,\n name,\n style,\n value: value as Record<string, unknown>,\n valueOnly: true,\n }),\n );\n continue;\n }\n\n if (style === 'matrix') {\n url = url.replace(\n match,\n `;${serializePrimitiveParam({\n name,\n value: value as string,\n })}`,\n );\n continue;\n }\n\n const replaceValue = encodeURIComponent(\n style === 'label' ? `.${value as string}` : (value as string),\n );\n url = url.replace(match, replaceValue);\n }\n }\n return url;\n};\n\nexport const getUrl = ({\n baseUrl,\n path,\n query,\n querySerializer,\n url: _url,\n}: {\n baseUrl?: string;\n path?: Record<string, unknown>;\n query?: Record<string, unknown>;\n querySerializer: QuerySerializer;\n url: string;\n}): string => {\n const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;\n let url = (baseUrl ?? '') + pathUrl;\n if (path) {\n url = defaultPathSerializer({ path, url });\n }\n let search = query ? querySerializer(query) : '';\n if (search.startsWith('?')) {\n search = search.substring(1);\n }\n if (search) {\n url += `?${search}`;\n }\n return url;\n};\n\nexport function getValidRequestBody(options: {\n body?: unknown;\n bodySerializer?: BodySerializer | null;\n serializedBody?: unknown;\n}): unknown {\n const hasBody = options.body !== undefined;\n const isSerializedBody = hasBody && options.bodySerializer;\n\n if (isSerializedBody) {\n if ('serializedBody' in options) {\n const hasSerializedBody =\n options.serializedBody !== undefined && options.serializedBody !== '';\n\n return hasSerializedBody ? options.serializedBody : null;\n }\n\n // not all clients implement a serializedBody property (i.e., client-axios)\n return options.body !== '' ? options.body : null;\n }\n\n // plain/text body\n if (hasBody) {\n return options.body;\n }\n\n // no body was provided\n return undefined;\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\nexport type AuthToken = string | undefined;\n\nexport interface Auth {\n /**\n * Which part of the request do we use to send the auth?\n *\n * @default 'header'\n */\n in?: 'header' | 'query' | 'cookie';\n /**\n * A unique identifier for the security scheme.\n *\n * Defined only when there are multiple security schemes whose `Auth`\n * shape would otherwise be identical.\n */\n key?: string;\n /**\n * Header or query parameter name.\n *\n * @default 'Authorization'\n */\n name?: string;\n scheme?: 'basic' | 'bearer';\n type: 'apiKey' | 'http';\n}\n\nexport const getAuthToken = async (\n auth: Auth,\n callback: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken,\n): Promise<string | undefined> => {\n const token = typeof callback === 'function' ? await callback(auth) : callback;\n\n if (!token) {\n return;\n }\n\n if (auth.scheme === 'bearer') {\n return `Bearer ${token}`;\n }\n\n if (auth.scheme === 'basic') {\n return `Basic ${btoa(token)}`;\n }\n\n return token;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen';\nimport {\n serializeArrayParam,\n serializeObjectParam,\n serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport { getUrl } from '../core/utils.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\nexport const createQuerySerializer = <T = unknown>({\n parameters = {},\n ...args\n}: QuerySerializerOptions = {}): ((queryParams: T) => string) => {\n const querySerializer = (queryParams: T): string => {\n const search: string[] = [];\n if (queryParams && typeof queryParams === 'object') {\n for (const name in queryParams) {\n const value = queryParams[name];\n\n if (value === undefined || value === null) {\n continue;\n }\n\n const options = parameters[name] || args;\n\n if (Array.isArray(value)) {\n const serializedArray = serializeArrayParam({\n allowReserved: options.allowReserved,\n explode: true,\n name,\n style: 'form',\n value,\n ...options.array,\n });\n if (serializedArray) search.push(serializedArray);\n } else if (typeof value === 'object') {\n const serializedObject = serializeObjectParam({\n allowReserved: options.allowReserved,\n explode: true,\n name,\n style: 'deepObject',\n value: value as Record<string, unknown>,\n ...options.object,\n });\n if (serializedObject) search.push(serializedObject);\n } else {\n const serializedPrimitive = serializePrimitiveParam({\n allowReserved: options.allowReserved,\n name,\n value: value as string,\n });\n if (serializedPrimitive) search.push(serializedPrimitive);\n }\n }\n }\n return search.join('&');\n };\n return querySerializer;\n};\n\n/**\n * Infers parseAs value from provided Content-Type header.\n */\nexport const getParseAs = (contentType: string | null): Exclude<Config['parseAs'], 'auto'> => {\n if (!contentType) {\n // If no Content-Type header is provided, the best we can do is return the raw response body,\n // which is effectively the same as the 'stream' option.\n return 'stream';\n }\n\n const cleanContent = contentType.split(';')[0]?.trim();\n\n if (!cleanContent) {\n return;\n }\n\n if (cleanContent.startsWith('application/json') || cleanContent.endsWith('+json')) {\n return 'json';\n }\n\n if (cleanContent === 'multipart/form-data') {\n return 'formData';\n }\n\n if (\n ['application/', 'audio/', 'image/', 'video/'].some((type) => cleanContent.startsWith(type))\n ) {\n return 'blob';\n }\n\n if (cleanContent.startsWith('text/')) {\n return 'text';\n }\n\n return;\n};\n\nconst checkForExistence = (\n options: Pick<RequestOptions, 'auth' | 'query'> & {\n headers: Headers;\n },\n name?: string,\n): boolean => {\n if (!name) {\n return false;\n }\n if (\n options.headers.has(name) ||\n options.query?.[name] ||\n options.headers.get('Cookie')?.includes(`${name}=`)\n ) {\n return true;\n }\n return false;\n};\n\nexport async function setAuthParams(\n options: Pick<RequestOptions, 'auth' | 'query' | 'security'> & {\n headers: Headers;\n },\n): Promise<void> {\n for (const auth of options.security ?? []) {\n if (checkForExistence(options, auth.name)) {\n continue;\n }\n\n const token = await getAuthToken(auth, options.auth);\n\n if (!token) {\n continue;\n }\n\n const name = auth.name ?? 'Authorization';\n\n switch (auth.in) {\n case 'query':\n if (!options.query) {\n options.query = {};\n }\n options.query[name] = token;\n break;\n case 'cookie':\n options.headers.append('Cookie', `${name}=${token}`);\n break;\n case 'header':\n default:\n options.headers.set(name, token);\n break;\n }\n }\n}\n\nexport const buildUrl: Client['buildUrl'] = (options) =>\n getUrl({\n baseUrl: options.baseUrl as string,\n path: options.path,\n query: options.query,\n querySerializer:\n typeof options.querySerializer === 'function'\n ? options.querySerializer\n : createQuerySerializer(options.querySerializer),\n url: options.url,\n });\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n const config = { ...a, ...b };\n if (config.baseUrl?.endsWith('/')) {\n config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);\n }\n config.headers = mergeHeaders(a.headers, b.headers);\n return config;\n};\n\nconst headersEntries = (headers: Headers): Array<[string, string]> => {\n const entries: Array<[string, string]> = [];\n headers.forEach((value, key) => {\n entries.push([key, value]);\n });\n return entries;\n};\n\nexport const mergeHeaders = (\n ...headers: Array<Required<Config>['headers'] | undefined>\n): Headers => {\n const mergedHeaders = new Headers();\n for (const header of headers) {\n if (!header) {\n continue;\n }\n\n const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);\n\n for (const [key, value] of iterator) {\n if (value === null) {\n mergedHeaders.delete(key);\n } else if (Array.isArray(value)) {\n for (const v of value) {\n mergedHeaders.append(key, v as string);\n }\n } else if (value !== undefined) {\n // assume object headers are meant to be JSON stringified, i.e., their\n // content value in OpenAPI specification is 'application/json'\n mergedHeaders.set(\n key,\n typeof value === 'object' ? JSON.stringify(value) : (value as string),\n );\n }\n }\n }\n return mergedHeaders;\n};\n\ntype ErrInterceptor<Err, Res, Req, Options> = (\n error: Err,\n /** response may be undefined due to a network error where no response object is produced */\n response: Res | undefined,\n /** request may be undefined, because error may be from building the request object itself */\n request: Req | undefined,\n options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;\n\ntype ResInterceptor<Res, Req, Options> = (\n response: Res,\n request: Req,\n options: Options,\n) => Res | Promise<Res>;\n\nclass Interceptors<Interceptor> {\n fns: Array<Interceptor | null> = [];\n\n clear(): void {\n this.fns = [];\n }\n\n eject(id: number | Interceptor): void {\n const index = this.getInterceptorIndex(id);\n if (this.fns[index]) {\n this.fns[index] = null;\n }\n }\n\n exists(id: number | Interceptor): boolean {\n const index = this.getInterceptorIndex(id);\n return Boolean(this.fns[index]);\n }\n\n getInterceptorIndex(id: number | Interceptor): number {\n if (typeof id === 'number') {\n return this.fns[id] ? id : -1;\n }\n return this.fns.indexOf(id);\n }\n\n update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false {\n const index = this.getInterceptorIndex(id);\n if (this.fns[index]) {\n this.fns[index] = fn;\n return id;\n }\n return false;\n }\n\n use(fn: Interceptor): number {\n this.fns.push(fn);\n return this.fns.length - 1;\n }\n}\n\nexport interface Middleware<Req, Res, Err, Options> {\n error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;\n request: Interceptors<ReqInterceptor<Req, Options>>;\n response: Interceptors<ResInterceptor<Res, Req, Options>>;\n}\n\nexport const createInterceptors = <Req, Res, Err, Options>(): Middleware<\n Req,\n Res,\n Err,\n Options\n> => ({\n error: new Interceptors<ErrInterceptor<Err, Res, Req, Options>>(),\n request: new Interceptors<ReqInterceptor<Req, Options>>(),\n response: new Interceptors<ResInterceptor<Res, Req, Options>>(),\n});\n\nconst defaultQuerySerializer = createQuerySerializer({\n allowReserved: false,\n array: {\n explode: true,\n style: 'form',\n },\n object: {\n explode: true,\n style: 'deepObject',\n },\n});\n\nconst defaultHeaders = {\n 'Content-Type': 'application/json',\n};\n\nexport const createConfig = <T extends ClientOptions = ClientOptions>(\n override: Config<Omit<ClientOptions, keyof T> & T> = {},\n): Config<Omit<ClientOptions, keyof T> & T> => ({\n ...jsonBodySerializer,\n headers: defaultHeaders,\n parseAs: 'auto',\n querySerializer: defaultQuerySerializer,\n ...override,\n});\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen';\nimport {\n buildUrl,\n createConfig,\n createInterceptors,\n getParseAs,\n mergeConfigs,\n mergeHeaders,\n setAuthParams,\n} from './utils.gen';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n body?: any;\n headers: ReturnType<typeof mergeHeaders>;\n};\n\nexport const createClient = (config: Config = {}): Client => {\n let _config = mergeConfigs(createConfig(), config);\n\n const getConfig = (): Config => ({ ..._config });\n\n const setConfig = (config: Config): Config => {\n _config = mergeConfigs(_config, config);\n return getConfig();\n };\n\n const interceptors = createInterceptors<Request, Response, unknown, ResolvedRequestOptions>();\n\n const beforeRequest = async <\n TData = unknown,\n TResponseStyle extends 'data' | 'fields' = 'fields',\n ThrowOnError extends boolean = boolean,\n Url extends string = string,\n >(\n options: RequestOptions<TData, TResponseStyle, ThrowOnError, Url>,\n ) => {\n const opts = {\n ..._config,\n ...options,\n fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n headers: mergeHeaders(_config.headers, options.headers),\n serializedBody: undefined as string | undefined,\n };\n\n if (opts.security) {\n await setAuthParams(opts);\n }\n\n if (opts.requestValidator) {\n await opts.requestValidator(opts);\n }\n\n if (opts.body !== undefined && opts.bodySerializer) {\n opts.serializedBody = opts.bodySerializer(opts.body) as string | undefined;\n }\n\n // remove Content-Type header if body is empty to avoid sending invalid requests\n if (opts.body === undefined || opts.serializedBody === '') {\n opts.headers.delete('Content-Type');\n }\n\n const resolvedOpts = opts as typeof opts &\n ResolvedRequestOptions<TResponseStyle, ThrowOnError, Url>;\n const url = buildUrl(resolvedOpts);\n\n return { opts: resolvedOpts, url };\n };\n\n const request: Client['request'] = async (options) => {\n const throwOnError = options.throwOnError ?? _config.throwOnError;\n const responseStyle = options.responseStyle ?? _config.responseStyle;\n\n let request: Request | undefined;\n let response: Response | undefined;\n\n try {\n const { opts, url } = await beforeRequest(options);\n const requestInit: ReqInit = {\n redirect: 'follow',\n ...opts,\n body: getValidRequestBody(opts),\n };\n\n request = new Request(url, requestInit);\n\n for (const fn of interceptors.request.fns) {\n if (fn) {\n request = await fn(request, opts);\n }\n }\n\n // fetch must be assigned here, otherwise it would throw the error:\n // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation\n const _fetch = opts.fetch!;\n\n response = await _fetch(request);\n\n for (const fn of interceptors.response.fns) {\n if (fn) {\n response = await fn(response, request, opts);\n }\n }\n\n const result = {\n request,\n response,\n };\n\n if (response.ok) {\n const parseAs =\n (opts.parseAs === 'auto'\n ? getParseAs(response.headers.get('Content-Type'))\n : opts.parseAs) ?? 'json';\n\n if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n let emptyData: any;\n switch (parseAs) {\n case 'arrayBuffer':\n case 'blob':\n case 'text':\n emptyData = await response[parseAs]();\n break;\n case 'formData':\n emptyData = new FormData();\n break;\n case 'stream':\n emptyData = response.body;\n break;\n case 'json':\n default:\n emptyData = {};\n break;\n }\n return opts.responseStyle === 'data'\n ? emptyData\n : {\n data: emptyData,\n ...result,\n };\n }\n\n let data: any;\n switch (parseAs) {\n case 'arrayBuffer':\n case 'blob':\n case 'formData':\n case 'text':\n data = await response[parseAs]();\n break;\n case 'json': {\n // Some servers return 200 with no Content-Length and empty body.\n // response.json() would throw; read as text and parse if non-empty.\n const text = await response.text();\n data = text ? JSON.parse(text) : {};\n break;\n }\n case 'stream':\n return opts.responseStyle === 'data'\n ? response.body\n : {\n data: response.body,\n ...result,\n };\n }\n\n if (parseAs === 'json') {\n if (opts.responseValidator) {\n await opts.responseValidator(data);\n }\n\n if (opts.responseTransformer) {\n data = await opts.responseTransformer(data);\n }\n }\n\n return opts.responseStyle === 'data'\n ? data\n : {\n data,\n ...result,\n };\n }\n\n const textError = await response.text();\n let jsonError: unknown;\n\n try {\n jsonError = JSON.parse(textError);\n } catch {\n // noop\n }\n\n throw jsonError ?? textError;\n } catch (error) {\n let finalError = error;\n\n for (const fn of interceptors.error.fns) {\n if (fn) {\n finalError = await fn(finalError, response, request, options as ResolvedRequestOptions);\n }\n }\n\n finalError = finalError || {};\n\n if (throwOnError) {\n throw finalError;\n }\n\n // TODO: we probably want to return error and improve types\n return responseStyle === 'data'\n ? undefined\n : {\n error: finalError,\n request,\n response,\n };\n }\n };\n\n const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n request({ ...options, method });\n\n const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n const { opts, url } = await beforeRequest(options);\n return createSseClient({\n ...opts,\n body: opts.body as BodyInit | null | undefined,\n method,\n onRequest: async (url, init) => {\n let request = new Request(url, init);\n for (const fn of interceptors.request.fns) {\n if (fn) {\n request = await fn(request, opts);\n }\n }\n return request;\n },\n serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n url,\n });\n };\n\n const _buildUrl: Client['buildUrl'] = (options) => buildUrl({ ..._config, ...options });\n\n return {\n buildUrl: _buildUrl,\n connect: makeMethodFn('CONNECT'),\n delete: makeMethodFn('DELETE'),\n get: makeMethodFn('GET'),\n getConfig,\n head: makeMethodFn('HEAD'),\n interceptors,\n options: makeMethodFn('OPTIONS'),\n patch: makeMethodFn('PATCH'),\n post: makeMethodFn('POST'),\n put: makeMethodFn('PUT'),\n request,\n setConfig,\n sse: {\n connect: makeSseFn('CONNECT'),\n delete: makeSseFn('DELETE'),\n get: makeSseFn('GET'),\n head: makeSseFn('HEAD'),\n options: makeSseFn('OPTIONS'),\n patch: makeSseFn('PATCH'),\n post: makeSseFn('POST'),\n put: makeSseFn('PUT'),\n trace: makeSseFn('TRACE'),\n },\n trace: makeMethodFn('TRACE'),\n } as Client;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client';\nimport { client } from './client.gen';\nimport type { CreateAlertData, CreateAlertErrors, CreateAlertResponses, CreateApiKeyData, CreateApiKeyErrors, CreateApiKeyResponses, CreateChannelData, CreateChannelErrors, CreateChannelResponses, CreateKeywordData, CreateKeywordErrors, CreateKeywordResponses, CreateSegmentData, CreateSegmentErrors, CreateSegmentResponses, DeleteAlertData, DeleteAlertErrors, DeleteAlertResponses, DeleteChannelData, DeleteChannelErrors, DeleteChannelResponses, DeleteKeywordData, DeleteKeywordErrors, DeleteKeywordResponses, DeleteSegmentData, DeleteSegmentErrors, DeleteSegmentResponses, ExportMentionsCsvData, ExportMentionsCsvErrors, ExportMentionsCsvResponses, ExportPeopleCsvData, ExportPeopleCsvErrors, ExportPeopleCsvResponses, GetAlertData, GetAlertErrors, GetAlertResponses, GetAnalyticsBreakdownData, GetAnalyticsBreakdownErrors, GetAnalyticsBreakdownResponses, GetAnalyticsSeriesData, GetAnalyticsSeriesErrors, GetAnalyticsSeriesResponses, GetAnalyticsSummaryData, GetAnalyticsSummaryErrors, GetAnalyticsSummaryResponses, GetChannelData, GetChannelErrors, GetChannelResponses, GetCompanyData, GetCompanyErrors, GetCompanyResponses, GetHealthData, GetHealthResponses, GetKeywordData, GetKeywordErrors, GetKeywordResponses, GetMentionData, GetMentionErrors, GetMentionResponses, GetPersonData, GetPersonErrors, GetPersonResponses, GetSegmentData, GetSegmentErrors, GetSegmentResponses, GetShareOfVoiceData, GetShareOfVoiceErrors, GetShareOfVoiceResponses, ListAlertsData, ListAlertsErrors, ListAlertsResponses, ListApiKeysData, ListApiKeysErrors, ListApiKeysResponses, ListChannelDeliveriesData, ListChannelDeliveriesErrors, ListChannelDeliveriesResponses, ListChannelsData, ListChannelsErrors, ListChannelsResponses, ListKeywordsData, ListKeywordsErrors, ListKeywordsResponses, ListPeopleData, ListPeopleErrors, ListPeopleResponses, ListSegmentsData, ListSegmentsErrors, ListSegmentsResponses, MergePeopleData, MergePeopleErrors, MergePeopleResponses, MuteAlertAuthorsData, MuteAlertAuthorsErrors, MuteAlertAuthorsResponses, RevokeApiKeyData, RevokeApiKeyErrors, RevokeApiKeyResponses, RotateWebhookSecretData, RotateWebhookSecretErrors, RotateWebhookSecretResponses, RunAlertDigestData, RunAlertDigestErrors, RunAlertDigestResponses, SearchMentionsData, SearchMentionsErrors, SearchMentionsResponses, SplitPersonData, SplitPersonErrors, SplitPersonResponses, TestAlertData, TestAlertErrors, TestAlertResponses, TestChannelData, TestChannelErrors, TestChannelResponses, UnmuteAlertAuthorsData, UnmuteAlertAuthorsErrors, UnmuteAlertAuthorsResponses, UpdateAlertData, UpdateAlertErrors, UpdateAlertResponses, UpdateChannelData, UpdateChannelErrors, UpdateChannelResponses, UpdateCompanyData, UpdateCompanyErrors, UpdateCompanyResponses, UpdateKeywordData, UpdateKeywordErrors, UpdateKeywordResponses, UpdateMentionData, UpdateMentionErrors, UpdateMentionResponses, UpdatePersonData, UpdatePersonErrors, UpdatePersonResponses, UpdateSegmentData, UpdateSegmentErrors, UpdateSegmentResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {\n /**\n * You can provide a client instance returned by `createClient()` instead of\n * individual options. This might be also useful if you want to implement a\n * custom client.\n */\n client?: Client;\n /**\n * You can pass arbitrary values through the `meta` object. This can be\n * used to access values that aren't defined as part of the SDK function.\n */\n meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;\n};\n\nexport const getHealth = <ThrowOnError extends boolean = false>(options?: Options<GetHealthData, ThrowOnError>): RequestResult<GetHealthResponses, unknown, ThrowOnError> => (options?.client ?? client).get<GetHealthResponses, unknown, ThrowOnError>({ url: '/v1/health', ...options });\n\n/**\n * List keywords\n *\n * Every keyword of the workspace, newest first, with its match stats and poll health.\n */\nexport const listKeywords = <ThrowOnError extends boolean = false>(options?: Options<ListKeywordsData, ThrowOnError>): RequestResult<ListKeywordsResponses, ListKeywordsErrors, ThrowOnError> => (options?.client ?? client).get<ListKeywordsResponses, ListKeywordsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords',\n ...options\n});\n\n/**\n * Track a keyword\n *\n * Start tracking a word or phrase. Matching, classification and delivery begin on the next poll. A funded workspace tracks up to 500 keywords; each costs $5 per month, deducted daily from the balance.\n */\nexport const createKeyword = <ThrowOnError extends boolean = false>(options: Options<CreateKeywordData, ThrowOnError>): RequestResult<CreateKeywordResponses, CreateKeywordErrors, ThrowOnError> => (options.client ?? client).post<CreateKeywordResponses, CreateKeywordErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a keyword\n *\n * Removes the keyword and its matches. Posts also matched by another keyword stay.\n */\nexport const deleteKeyword = <ThrowOnError extends boolean = false>(options: Options<DeleteKeywordData, ThrowOnError>): RequestResult<DeleteKeywordResponses, DeleteKeywordErrors, ThrowOnError> => (options.client ?? client).delete<DeleteKeywordResponses, DeleteKeywordErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords/{id}',\n ...options\n});\n\n/**\n * Get a keyword\n */\nexport const getKeyword = <ThrowOnError extends boolean = false>(options: Options<GetKeywordData, ThrowOnError>): RequestResult<GetKeywordResponses, GetKeywordErrors, ThrowOnError> => (options.client ?? client).get<GetKeywordResponses, GetKeywordErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords/{id}',\n ...options\n});\n\n/**\n * Update a keyword\n *\n * Mute or unmute it, or change the platforms it is tracked on.\n */\nexport const updateKeyword = <ThrowOnError extends boolean = false>(options: Options<UpdateKeywordData, ThrowOnError>): RequestResult<UpdateKeywordResponses, UpdateKeywordErrors, ThrowOnError> => (options.client ?? client).patch<UpdateKeywordResponses, UpdateKeywordErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Get a mention\n *\n * One mention by id, as it appears in the list: the post, its author with reach and your tags, the classification, the priority score and the triage fields. Ids belong to your organization; any other id is a 404.\n */\nexport const getMention = <ThrowOnError extends boolean = false>(options: Options<GetMentionData, ThrowOnError>): RequestResult<GetMentionResponses, GetMentionErrors, ThrowOnError> => (options.client ?? client).get<GetMentionResponses, GetMentionErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions/{id}',\n ...options\n});\n\n/**\n * Update a mention\n *\n * The one write on a mention. Set status to ignored or done to handle it (open puts it back), assign it to a workspace member, snooze it out of the feed, or leave an internal note. Null clears a field; omitted fields are untouched. Delivery and billing never change.\n */\nexport const updateMention = <ThrowOnError extends boolean = false>(options: Options<UpdateMentionData, ThrowOnError>): RequestResult<UpdateMentionResponses, UpdateMentionErrors, ThrowOnError> => (options.client ?? client).patch<UpdateMentionResponses, UpdateMentionErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List mentions\n *\n * Mentions matched to your keywords, filtered and paginated. Default order is newest match first; sort=priority ranks the last 30 days of matches by attention score. Page with nextCursor, passing the same filters and sort. A mention is one post matched to one keyword.\n */\nexport const searchMentions = <ThrowOnError extends boolean = false>(options?: Options<SearchMentionsData, ThrowOnError>): RequestResult<SearchMentionsResponses, SearchMentionsErrors, ThrowOnError> => (options?.client ?? client).get<SearchMentionsResponses, SearchMentionsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions',\n ...options\n});\n\n/**\n * Export mentions as CSV\n *\n * The same mentions GET /v1/mentions would list for these filters, as CSV, newest matched first (the order they entered your feed, which can differ from the post date): id, published_at, platform, keyword, author, author_url, author_followers, relevance, sentiment, intents (pipe-separated), status, relevant, delivered, url, text (first 1,000 characters). Capped at 10,000 rows; the X-Mentions-Truncated header says when the cap cut the list. At most 6 exports per minute per workspace; a 429 carries Retry-After.\n */\nexport const exportMentionsCsv = <ThrowOnError extends boolean = false>(options?: Options<ExportMentionsCsvData, ThrowOnError>): RequestResult<ExportMentionsCsvResponses, ExportMentionsCsvErrors, ThrowOnError> => (options?.client ?? client).get<ExportMentionsCsvResponses, ExportMentionsCsvErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions/export.csv',\n ...options\n});\n\n/**\n * Export people as CSV\n *\n * The same list as GET /v1/people (segmentId included) as CSV, one row per person with their contact columns: handle, followers, email, website, company, location, tags. Capped at 5,000 people. At most 6 exports per minute per workspace; a 429 carries Retry-After.\n */\nexport const exportPeopleCsv = <ThrowOnError extends boolean = false>(options?: Options<ExportPeopleCsvData, ThrowOnError>): RequestResult<ExportPeopleCsvResponses, ExportPeopleCsvErrors, ThrowOnError> => (options?.client ?? client).get<ExportPeopleCsvResponses, ExportPeopleCsvErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/export.csv',\n ...options\n});\n\n/**\n * List people\n *\n * The people behind your mentions: one row per person, with their accounts, reach, public profile, per-workspace stats and your annotations. Filter by platform, tag, follower range, mention counts, intents seen, keyword kinds mentioned or never mentioned, or a saved segment. Offset-paginated with a total.\n */\nexport const listPeople = <ThrowOnError extends boolean = false>(options?: Options<ListPeopleData, ThrowOnError>): RequestResult<ListPeopleResponses, ListPeopleErrors, ThrowOnError> => (options?.client ?? client).get<ListPeopleResponses, ListPeopleErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people',\n ...options\n});\n\n/**\n * Get a person\n *\n * One person as your workspace sees them. An account merged into someone resolves to that person.\n */\nexport const getPerson = <ThrowOnError extends boolean = false>(options: Options<GetPersonData, ThrowOnError>): RequestResult<GetPersonResponses, GetPersonErrors, ThrowOnError> => (options.client ?? client).get<GetPersonResponses, GetPersonErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}',\n ...options\n});\n\n/**\n * Update your annotations on a person\n *\n * Tags, notes and mute, for your workspace only. Mute hides their posts from your feed and every channel; ingest and billing never change.\n */\nexport const updatePerson = <ThrowOnError extends boolean = false>(options: Options<UpdatePersonData, ThrowOnError>): RequestResult<UpdatePersonResponses, UpdatePersonErrors, ThrowOnError> => (options.client ?? client).patch<UpdatePersonResponses, UpdatePersonErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Merge an account into a person\n *\n * Declare that this account and another person are the same human, for your workspace only. Their mentions, tags and notes combine under the person named by `into`.\n */\nexport const mergePeople = <ThrowOnError extends boolean = false>(options: Options<MergePeopleData, ThrowOnError>): RequestResult<MergePeopleResponses, MergePeopleErrors, ThrowOnError> => (options.client ?? client).post<MergePeopleResponses, MergePeopleErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}/merge',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Undo a merge\n *\n * The account becomes its own person again.\n */\nexport const splitPerson = <ThrowOnError extends boolean = false>(options: Options<SplitPersonData, ThrowOnError>): RequestResult<SplitPersonResponses, SplitPersonErrors, ThrowOnError> => (options.client ?? client).post<SplitPersonResponses, SplitPersonErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}/split',\n ...options\n});\n\n/**\n * List segments\n *\n * Your saved segments, each with the number of people in it right now (segments are evaluated on every read, never materialized), plus presets you can save as a starting point. Pass a segment id to GET /v1/people to list its members.\n */\nexport const listSegments = <ThrowOnError extends boolean = false>(options?: Options<ListSegmentsData, ThrowOnError>): RequestResult<ListSegmentsResponses, ListSegmentsErrors, ThrowOnError> => (options?.client ?? client).get<ListSegmentsResponses, ListSegmentsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments',\n ...options\n});\n\n/**\n * Create a segment\n */\nexport const createSegment = <ThrowOnError extends boolean = false>(options: Options<CreateSegmentData, ThrowOnError>): RequestResult<CreateSegmentResponses, CreateSegmentErrors, ThrowOnError> => (options.client ?? client).post<CreateSegmentResponses, CreateSegmentErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a segment\n *\n * Nobody in it is affected.\n */\nexport const deleteSegment = <ThrowOnError extends boolean = false>(options: Options<DeleteSegmentData, ThrowOnError>): RequestResult<DeleteSegmentResponses, DeleteSegmentErrors, ThrowOnError> => (options.client ?? client).delete<DeleteSegmentResponses, DeleteSegmentErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments/{id}',\n ...options\n});\n\n/**\n * Get a segment\n */\nexport const getSegment = <ThrowOnError extends boolean = false>(options: Options<GetSegmentData, ThrowOnError>): RequestResult<GetSegmentResponses, GetSegmentErrors, ThrowOnError> => (options.client ?? client).get<GetSegmentResponses, GetSegmentErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments/{id}',\n ...options\n});\n\n/**\n * Update a segment\n */\nexport const updateSegment = <ThrowOnError extends boolean = false>(options: Options<UpdateSegmentData, ThrowOnError>): RequestResult<UpdateSegmentResponses, UpdateSegmentErrors, ThrowOnError> => (options.client ?? client).patch<UpdateSegmentResponses, UpdateSegmentErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/segments/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Get the company profile\n *\n * What the classifier knows about you: name, description, use cases, your own accounts, and the composed context it reads.\n */\nexport const getCompany = <ThrowOnError extends boolean = false>(options?: Options<GetCompanyData, ThrowOnError>): RequestResult<GetCompanyResponses, GetCompanyErrors, ThrowOnError> => (options?.client ?? client).get<GetCompanyResponses, GetCompanyErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/company',\n ...options\n});\n\n/**\n * Update the company profile\n *\n * Changing profile fields recomposes the classifier context; setting `context` directly overrides it until the next profile edit. Relevance scores for new mentions follow at once.\n */\nexport const updateCompany = <ThrowOnError extends boolean = false>(options: Options<UpdateCompanyData, ThrowOnError>): RequestResult<UpdateCompanyResponses, UpdateCompanyErrors, ThrowOnError> => (options.client ?? client).patch<UpdateCompanyResponses, UpdateCompanyErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/company',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List API keys\n */\nexport const listApiKeys = <ThrowOnError extends boolean = false>(options?: Options<ListApiKeysData, ThrowOnError>): RequestResult<ListApiKeysResponses, ListApiKeysErrors, ThrowOnError> => (options?.client ?? client).get<ListApiKeysResponses, ListApiKeysErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/api-keys',\n ...options\n});\n\n/**\n * Create an API key\n *\n * Mint a key for this workspace. The key itself is returned once; only its hash is stored.\n */\nexport const createApiKey = <ThrowOnError extends boolean = false>(options: Options<CreateApiKeyData, ThrowOnError>): RequestResult<CreateApiKeyResponses, CreateApiKeyErrors, ThrowOnError> => (options.client ?? client).post<CreateApiKeyResponses, CreateApiKeyErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/api-keys',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Revoke an API key\n *\n * Takes effect at once on the API and within a few minutes on cached verifications.\n */\nexport const revokeApiKey = <ThrowOnError extends boolean = false>(options: Options<RevokeApiKeyData, ThrowOnError>): RequestResult<RevokeApiKeyResponses, RevokeApiKeyErrors, ThrowOnError> => (options.client ?? client).delete<RevokeApiKeyResponses, RevokeApiKeyErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/api-keys/{id}',\n ...options\n});\n\n/**\n * Delete an alert\n */\nexport const deleteAlert = <ThrowOnError extends boolean = false>(options: Options<DeleteAlertData, ThrowOnError>): RequestResult<DeleteAlertResponses, DeleteAlertErrors, ThrowOnError> => (options.client ?? client).delete<DeleteAlertResponses, DeleteAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}',\n ...options\n});\n\n/**\n * Get an alert\n */\nexport const getAlert = <ThrowOnError extends boolean = false>(options: Options<GetAlertData, ThrowOnError>): RequestResult<GetAlertResponses, GetAlertErrors, ThrowOnError> => (options.client ?? client).get<GetAlertResponses, GetAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}',\n ...options\n});\n\n/**\n * Update an alert\n */\nexport const updateAlert = <ThrowOnError extends boolean = false>(options: Options<UpdateAlertData, ThrowOnError>): RequestResult<UpdateAlertResponses, UpdateAlertErrors, ThrowOnError> => (options.client ?? client).patch<UpdateAlertResponses, UpdateAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List alerts\n */\nexport const listAlerts = <ThrowOnError extends boolean = false>(options?: Options<ListAlertsData, ThrowOnError>): RequestResult<ListAlertsResponses, ListAlertsErrors, ThrowOnError> => (options?.client ?? client).get<ListAlertsResponses, ListAlertsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts',\n ...options\n});\n\n/**\n * Create an alert\n */\nexport const createAlert = <ThrowOnError extends boolean = false>(options: Options<CreateAlertData, ThrowOnError>): RequestResult<CreateAlertResponses, CreateAlertErrors, ThrowOnError> => (options.client ?? client).post<CreateAlertResponses, CreateAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Send a test through an alert's channels\n */\nexport const testAlert = <ThrowOnError extends boolean = false>(options: Options<TestAlertData, ThrowOnError>): RequestResult<TestAlertResponses, TestAlertErrors, ThrowOnError> => (options.client ?? client).post<TestAlertResponses, TestAlertErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}/test',\n ...options\n});\n\n/**\n * Send a digest now\n */\nexport const runAlertDigest = <ThrowOnError extends boolean = false>(options: Options<RunAlertDigestData, ThrowOnError>): RequestResult<RunAlertDigestResponses, RunAlertDigestErrors, ThrowOnError> => (options.client ?? client).post<RunAlertDigestResponses, RunAlertDigestErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}/run',\n ...options\n});\n\n/**\n * Mute authors on an alert\n *\n * Add authors to the alert's muted list without touching the rest of its filter. Links are read the way the dashboard reads them: a post link mutes its author, twitter.com becomes x.com, a Hacker News profile keeps its id. Authors already muted are skipped, so a retry is safe. An entry that names no person (a subreddit, a story) rejects the request with that entry named.\n */\nexport const muteAlertAuthors = <ThrowOnError extends boolean = false>(options: Options<MuteAlertAuthorsData, ThrowOnError>): RequestResult<MuteAlertAuthorsResponses, MuteAlertAuthorsErrors, ThrowOnError> => (options.client ?? client).post<MuteAlertAuthorsResponses, MuteAlertAuthorsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}/mute',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Unmute authors on an alert\n *\n * Remove authors from the alert's muted list without touching the rest of its filter. Name each one by the stored entry or by any link to that profile or its posts. Authors that are not muted are ignored, so a retry is safe.\n */\nexport const unmuteAlertAuthors = <ThrowOnError extends boolean = false>(options: Options<UnmuteAlertAuthorsData, ThrowOnError>): RequestResult<UnmuteAlertAuthorsResponses, UnmuteAlertAuthorsErrors, ThrowOnError> => (options.client ?? client).post<UnmuteAlertAuthorsResponses, UnmuteAlertAuthorsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/alerts/{id}/unmute',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Headline counts for a window\n *\n * Matched and relevant mentions, distinct posts and people, sentiment, buying intent and questions, estimated reach, and where the matches stand in triage. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\n */\nexport const getAnalyticsSummary = <ThrowOnError extends boolean = false>(options?: Options<GetAnalyticsSummaryData, ThrowOnError>): RequestResult<GetAnalyticsSummaryResponses, GetAnalyticsSummaryErrors, ThrowOnError> => (options?.client ?? client).get<GetAnalyticsSummaryResponses, GetAnalyticsSummaryErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/analytics/summary',\n ...options\n});\n\n/**\n * Mentions over time\n *\n * Matched, relevant and sentiment counts per day or week across the window, as one total series or split per platform or per keyword with `by`. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\n */\nexport const getAnalyticsSeries = <ThrowOnError extends boolean = false>(options?: Options<GetAnalyticsSeriesData, ThrowOnError>): RequestResult<GetAnalyticsSeriesResponses, GetAnalyticsSeriesErrors, ThrowOnError> => (options?.client ?? client).get<GetAnalyticsSeriesResponses, GetAnalyticsSeriesErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/analytics/series',\n ...options\n});\n\n/**\n * Mentions grouped by one dimension\n *\n * One table of matched, relevant and sentiment counts grouped by `by`: platform, keyword, sentiment, intent, status, hour (weekday and hour of day) or person. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\n */\nexport const getAnalyticsBreakdown = <ThrowOnError extends boolean = false>(options: Options<GetAnalyticsBreakdownData, ThrowOnError>): RequestResult<GetAnalyticsBreakdownResponses, GetAnalyticsBreakdownErrors, ThrowOnError> => (options.client ?? client).get<GetAnalyticsBreakdownResponses, GetAnalyticsBreakdownErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/analytics/breakdown',\n ...options\n});\n\n/**\n * Brand against competitors\n *\n * Every keyword matched in the window with its counts and its share of brand plus competitor matches; topic keywords are counted but stay out of the split. The window is `range` (7d, 30d, 90d, 365d, ending today) or `from` and `to`, cut into days in `timezone` (UTC by default); `keywordIds` and `platforms` narrow it; `compare=true` adds the period of the same length right before it. Time axis is the publish date.\n */\nexport const getShareOfVoice = <ThrowOnError extends boolean = false>(options?: Options<GetShareOfVoiceData, ThrowOnError>): RequestResult<GetShareOfVoiceResponses, GetShareOfVoiceErrors, ThrowOnError> => (options?.client ?? client).get<GetShareOfVoiceResponses, GetShareOfVoiceErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/analytics/share-of-voice',\n ...options\n});\n\n/**\n * Delete a channel\n */\nexport const deleteChannel = <ThrowOnError extends boolean = false>(options: Options<DeleteChannelData, ThrowOnError>): RequestResult<DeleteChannelResponses, DeleteChannelErrors, ThrowOnError> => (options.client ?? client).delete<DeleteChannelResponses, DeleteChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}',\n ...options\n});\n\n/**\n * Get a channel\n */\nexport const getChannel = <ThrowOnError extends boolean = false>(options: Options<GetChannelData, ThrowOnError>): RequestResult<GetChannelResponses, GetChannelErrors, ThrowOnError> => (options.client ?? client).get<GetChannelResponses, GetChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}',\n ...options\n});\n\n/**\n * Update a channel\n */\nexport const updateChannel = <ThrowOnError extends boolean = false>(options: Options<UpdateChannelData, ThrowOnError>): RequestResult<UpdateChannelResponses, UpdateChannelErrors, ThrowOnError> => (options.client ?? client).patch<UpdateChannelResponses, UpdateChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Send a test to a channel\n */\nexport const testChannel = <ThrowOnError extends boolean = false>(options: Options<TestChannelData, ThrowOnError>): RequestResult<TestChannelResponses, TestChannelErrors, ThrowOnError> => (options.client ?? client).post<TestChannelResponses, TestChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}/test',\n ...options\n});\n\n/**\n * Rotate a webhook secret\n */\nexport const rotateWebhookSecret = <ThrowOnError extends boolean = false>(options: Options<RotateWebhookSecretData, ThrowOnError>): RequestResult<RotateWebhookSecretResponses, RotateWebhookSecretErrors, ThrowOnError> => (options.client ?? client).post<RotateWebhookSecretResponses, RotateWebhookSecretErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}/rotate-secret',\n ...options\n});\n\n/**\n * List deliveries to a channel\n */\nexport const listChannelDeliveries = <ThrowOnError extends boolean = false>(options: Options<ListChannelDeliveriesData, ThrowOnError>): RequestResult<ListChannelDeliveriesResponses, ListChannelDeliveriesErrors, ThrowOnError> => (options.client ?? client).get<ListChannelDeliveriesResponses, ListChannelDeliveriesErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels/{id}/deliveries',\n ...options\n});\n\n/**\n * List channels\n */\nexport const listChannels = <ThrowOnError extends boolean = false>(options?: Options<ListChannelsData, ThrowOnError>): RequestResult<ListChannelsResponses, ListChannelsErrors, ThrowOnError> => (options?.client ?? client).get<ListChannelsResponses, ListChannelsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels',\n ...options\n});\n\n/**\n * Create a channel\n */\nexport const createChannel = <ThrowOnError extends boolean = false>(options: Options<CreateChannelData, ThrowOnError>): RequestResult<CreateChannelResponses, CreateChannelErrors, ThrowOnError> => (options.client ?? client).post<CreateChannelResponses, CreateChannelErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/channels',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, type ClientOptions, type Config, createClient, createConfig } from './client';\nimport type { ClientOptions as ClientOptions2 } from './types.gen';\n\n/**\n * The `createClientConfig()` function will be called on client initialization\n * and the returned object will become the client's initial configuration.\n *\n * You may want to initialize your client this way instead of calling\n * `setConfig()`. This is useful for example if you're using Next.js\n * to ensure your client always has the correct values.\n */\nexport type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;\n\nexport const client: Client = createClient(createConfig<ClientOptions2>({ baseUrl: 'https://api.mentio.dev' }));\n","/**\n * @mentio-dev/sdk: a typed client for the Mentio API. Everything under\n * ./generated comes from the API's OpenAPI document (`pnpm generate`), one\n * function per operation; this file adds the constructor that binds a key\n * and a host once so calls read `mentio.searchMentions({ query })`.\n */\nimport { createClient, createConfig, type Client } from './generated/client';\nimport * as sdk from './generated/sdk.gen';\n\nexport * from './generated';\nexport { createClient, createConfig } from './generated/client';\nexport type { Client, Config, RequestResult } from './generated/client';\n\nexport const DEFAULT_BASE_URL = 'https://api.mentio.dev';\n\nexport interface MentioOptions {\n /** API key from the dashboard or POST /v1/api-keys (mk_live_...). */\n apiKey: string;\n /** Another deployment's host; the hosted API by default. */\n baseUrl?: string;\n /** Custom fetch, for tests or runtimes without a global one. */\n fetch?: typeof fetch;\n /** Extra headers sent on every request. */\n headers?: Record<string, string>;\n}\n\n/** Every SDK function, pre-bound to one client, plus the client itself for\n * interceptors and raw requests. Passing `client` in a call still wins. */\nexport type Mentio = typeof sdk & { client: Client };\n\nexport function createMentio(options: MentioOptions): Mentio {\n const client = createClient(\n createConfig({\n baseUrl: (options.baseUrl ?? DEFAULT_BASE_URL).replace(/\\/+$/, ''),\n auth: () => options.apiKey,\n ...(options.fetch ? { fetch: options.fetch } : {}),\n ...(options.headers ? { headers: options.headers } : {}),\n }),\n );\n const bound: Record<string, unknown> = {};\n for (const [name, fn] of Object.entries(sdk)) {\n if (typeof fn !== 'function') continue;\n const call = fn as (callOptions?: { client?: Client }) => unknown;\n bound[name] = (callOptions?: { client?: Client }) => call({ ...callOptions, client: callOptions?.client ?? client });\n }\n return { ...(bound as typeof sdk), client };\n}\n"],"mappings":";;;;;;;AA2DO,IAAM,qBAAqB;AAAA,EAChC,g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AAQ,UAAU,MAAM,OAAO,CAAC;AAAA,EAC7C,KAAK;AAAA,EACL,GAAG;AAAA,EACH,SAAS;AAAA,IACL,gBAAgB;AAAA,IAChB,GAAG,QAAQ;AAAA,EACf;AACJ,CAAC;;;AErhBM,IAAM,mBAAmB;AAiBzB,SAAS,aAAa,SAAgC;AAC3D,QAAME,UAAS;AAAA,IACb,aAAa;AAAA,MACX,UAAU,QAAQ,WAAW,kBAAkB,QAAQ,QAAQ,EAAE;AAAA,MACjE,MAAM,MAAM,QAAQ;AAAA,MACpB,GAAI,QAAQ,QAAQ,EAAE,OAAO,QAAQ,MAAM,IAAI,CAAC;AAAA,MAChD,GAAI,QAAQ,UAAU,EAAE,SAAS,QAAQ,QAAQ,IAAI,CAAC;AAAA,IACxD,CAAC;AAAA,EACH;AACA,QAAM,QAAiC,CAAC;AACxC,aAAW,CAAC,MAAM,EAAE,KAAK,OAAO,QAAQ,eAAG,GAAG;AAC5C,QAAI,OAAO,OAAO,WAAY;AAC9B,UAAM,OAAO;AACb,UAAM,IAAI,IAAI,CAAC,gBAAsC,KAAK,EAAE,GAAG,aAAa,QAAQ,aAAa,UAAUA,QAAO,CAAC;AAAA,EACrH;AACA,SAAO,EAAE,GAAI,OAAsB,QAAAA,QAAO;AAC5C;","names":["joinedValues","config","request","url","client"]}
|
package/package.json
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mentio-dev/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "TypeScript SDK for the Mentio API, generated from its OpenAPI document.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://docs.mentio.dev/sdks",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/
|
|
10
|
-
"directory": "packages/sdk"
|
|
9
|
+
"url": "git+https://github.com/mentio-dev/sdk.git"
|
|
11
10
|
},
|
|
12
11
|
"bugs": {
|
|
13
|
-
"url": "https://github.com/
|
|
12
|
+
"url": "https://github.com/mentio-dev/sdk/issues"
|
|
14
13
|
},
|
|
15
14
|
"keywords": [
|
|
16
15
|
"mentio",
|