@mentio-dev/sdk 0.13.1 → 0.13.3
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/dist/index.d.ts +136 -38
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1815,6 +1815,10 @@ type Segment = {
|
|
|
1815
1815
|
*/
|
|
1816
1816
|
ownerIds?: Array<string>;
|
|
1817
1817
|
};
|
|
1818
|
+
/**
|
|
1819
|
+
* The group this segment belongs to, or null for a workspace segment.
|
|
1820
|
+
*/
|
|
1821
|
+
groupId: string | null;
|
|
1818
1822
|
/**
|
|
1819
1823
|
* People in the segment right now; it is evaluated on every read.
|
|
1820
1824
|
*/
|
|
@@ -2981,6 +2985,14 @@ type Wallet = {
|
|
|
2981
2985
|
* How much to add per automatic charge (same bounds as a manual top-up).
|
|
2982
2986
|
*/
|
|
2983
2987
|
amountCents: number;
|
|
2988
|
+
/**
|
|
2989
|
+
* Most the saved card may be charged automatically over any 7 days, before tax; null = no limit.
|
|
2990
|
+
*/
|
|
2991
|
+
weeklyLimitCents: number | null;
|
|
2992
|
+
/**
|
|
2993
|
+
* What counts against the weekly limit over the last 7 days, before tax: automatic charges made plus any still settling.
|
|
2994
|
+
*/
|
|
2995
|
+
spentThisWeekCents: number;
|
|
2984
2996
|
/**
|
|
2985
2997
|
* Newest successful automatic charge.
|
|
2986
2998
|
*/
|
|
@@ -6011,6 +6023,10 @@ type ExportPeopleCsvData = {
|
|
|
6011
6023
|
body?: never;
|
|
6012
6024
|
path?: never;
|
|
6013
6025
|
query?: {
|
|
6026
|
+
/**
|
|
6027
|
+
* Scope to one keyword group (grp_...): only people who mentioned that group's keywords, with that group's own tags, notes, merges, activities and segments. Omit for the whole workspace.
|
|
6028
|
+
*/
|
|
6029
|
+
groupId?: string;
|
|
6014
6030
|
/**
|
|
6015
6031
|
* People with an account on this platform.
|
|
6016
6032
|
*/
|
|
@@ -6124,7 +6140,7 @@ type ExportPeopleCsvErrors = {
|
|
|
6124
6140
|
*/
|
|
6125
6141
|
401: ErrorResponse;
|
|
6126
6142
|
/**
|
|
6127
|
-
* No such segment
|
|
6143
|
+
* No such segment in this scope, or no such group
|
|
6128
6144
|
*/
|
|
6129
6145
|
404: ErrorResponse;
|
|
6130
6146
|
/**
|
|
@@ -6144,6 +6160,10 @@ type ListPeopleData = {
|
|
|
6144
6160
|
body?: never;
|
|
6145
6161
|
path?: never;
|
|
6146
6162
|
query?: {
|
|
6163
|
+
/**
|
|
6164
|
+
* Scope to one keyword group (grp_...): only people who mentioned that group's keywords, with that group's own tags, notes, merges, activities and segments. Omit for the whole workspace.
|
|
6165
|
+
*/
|
|
6166
|
+
groupId?: string;
|
|
6147
6167
|
/**
|
|
6148
6168
|
* People with an account on this platform.
|
|
6149
6169
|
*/
|
|
@@ -6265,7 +6285,7 @@ type ListPeopleErrors = {
|
|
|
6265
6285
|
*/
|
|
6266
6286
|
401: ErrorResponse;
|
|
6267
6287
|
/**
|
|
6268
|
-
* No such segment
|
|
6288
|
+
* No such segment in this scope, or no such group
|
|
6269
6289
|
*/
|
|
6270
6290
|
404: ErrorResponse;
|
|
6271
6291
|
};
|
|
@@ -6431,7 +6451,12 @@ type GetPersonData = {
|
|
|
6431
6451
|
*/
|
|
6432
6452
|
id: string;
|
|
6433
6453
|
};
|
|
6434
|
-
query?:
|
|
6454
|
+
query?: {
|
|
6455
|
+
/**
|
|
6456
|
+
* Scope to one keyword group (grp_...): only people who mentioned that group's keywords, with that group's own tags, notes, merges, activities and segments. Omit for the whole workspace.
|
|
6457
|
+
*/
|
|
6458
|
+
groupId?: string;
|
|
6459
|
+
};
|
|
6435
6460
|
url: '/v1/people/{id}';
|
|
6436
6461
|
};
|
|
6437
6462
|
type GetPersonErrors = {
|
|
@@ -6440,7 +6465,7 @@ type GetPersonErrors = {
|
|
|
6440
6465
|
*/
|
|
6441
6466
|
401: ErrorResponse;
|
|
6442
6467
|
/**
|
|
6443
|
-
* No mention by this person
|
|
6468
|
+
* No mention by this person in this scope, or no such group
|
|
6444
6469
|
*/
|
|
6445
6470
|
404: ErrorResponse;
|
|
6446
6471
|
};
|
|
@@ -6478,12 +6503,17 @@ type UpdatePersonData = {
|
|
|
6478
6503
|
*/
|
|
6479
6504
|
id: string;
|
|
6480
6505
|
};
|
|
6481
|
-
query?:
|
|
6506
|
+
query?: {
|
|
6507
|
+
/**
|
|
6508
|
+
* Scope to one keyword group (grp_...): only people who mentioned that group's keywords, with that group's own tags, notes, merges, activities and segments. Omit for the whole workspace.
|
|
6509
|
+
*/
|
|
6510
|
+
groupId?: string;
|
|
6511
|
+
};
|
|
6482
6512
|
url: '/v1/people/{id}';
|
|
6483
6513
|
};
|
|
6484
6514
|
type UpdatePersonErrors = {
|
|
6485
6515
|
/**
|
|
6486
|
-
* Invalid body,
|
|
6516
|
+
* Invalid body, the owner is not a workspace member, or `muted` sent with `groupId`
|
|
6487
6517
|
*/
|
|
6488
6518
|
400: ErrorResponse;
|
|
6489
6519
|
/**
|
|
@@ -6491,7 +6521,7 @@ type UpdatePersonErrors = {
|
|
|
6491
6521
|
*/
|
|
6492
6522
|
401: ErrorResponse;
|
|
6493
6523
|
/**
|
|
6494
|
-
* No mention by this person
|
|
6524
|
+
* No mention by this person in this scope, or no such group
|
|
6495
6525
|
*/
|
|
6496
6526
|
404: ErrorResponse;
|
|
6497
6527
|
};
|
|
@@ -6516,7 +6546,12 @@ type MergePeopleData = {
|
|
|
6516
6546
|
*/
|
|
6517
6547
|
id: string;
|
|
6518
6548
|
};
|
|
6519
|
-
query?:
|
|
6549
|
+
query?: {
|
|
6550
|
+
/**
|
|
6551
|
+
* Scope to one keyword group (grp_...): only people who mentioned that group's keywords, with that group's own tags, notes, merges, activities and segments. Omit for the whole workspace.
|
|
6552
|
+
*/
|
|
6553
|
+
groupId?: string;
|
|
6554
|
+
};
|
|
6520
6555
|
url: '/v1/people/{id}/merge';
|
|
6521
6556
|
};
|
|
6522
6557
|
type MergePeopleErrors = {
|
|
@@ -6525,7 +6560,7 @@ type MergePeopleErrors = {
|
|
|
6525
6560
|
*/
|
|
6526
6561
|
401: ErrorResponse;
|
|
6527
6562
|
/**
|
|
6528
|
-
* Either side is unknown
|
|
6563
|
+
* Either side is unknown in this scope, or no such group
|
|
6529
6564
|
*/
|
|
6530
6565
|
404: ErrorResponse;
|
|
6531
6566
|
};
|
|
@@ -6545,7 +6580,12 @@ type SplitPersonData = {
|
|
|
6545
6580
|
*/
|
|
6546
6581
|
id: string;
|
|
6547
6582
|
};
|
|
6548
|
-
query?:
|
|
6583
|
+
query?: {
|
|
6584
|
+
/**
|
|
6585
|
+
* Scope to one keyword group (grp_...): only people who mentioned that group's keywords, with that group's own tags, notes, merges, activities and segments. Omit for the whole workspace.
|
|
6586
|
+
*/
|
|
6587
|
+
groupId?: string;
|
|
6588
|
+
};
|
|
6549
6589
|
url: '/v1/people/{id}/split';
|
|
6550
6590
|
};
|
|
6551
6591
|
type SplitPersonErrors = {
|
|
@@ -6554,7 +6594,7 @@ type SplitPersonErrors = {
|
|
|
6554
6594
|
*/
|
|
6555
6595
|
401: ErrorResponse;
|
|
6556
6596
|
/**
|
|
6557
|
-
* This account was not merged into anyone
|
|
6597
|
+
* This account was not merged into anyone in this scope, or no such group
|
|
6558
6598
|
*/
|
|
6559
6599
|
404: ErrorResponse;
|
|
6560
6600
|
};
|
|
@@ -6574,7 +6614,12 @@ type ListPersonActivitiesData = {
|
|
|
6574
6614
|
*/
|
|
6575
6615
|
id: string;
|
|
6576
6616
|
};
|
|
6577
|
-
query?:
|
|
6617
|
+
query?: {
|
|
6618
|
+
/**
|
|
6619
|
+
* Scope to one keyword group (grp_...): only people who mentioned that group's keywords, with that group's own tags, notes, merges, activities and segments. Omit for the whole workspace.
|
|
6620
|
+
*/
|
|
6621
|
+
groupId?: string;
|
|
6622
|
+
};
|
|
6578
6623
|
url: '/v1/people/{id}/activities';
|
|
6579
6624
|
};
|
|
6580
6625
|
type ListPersonActivitiesErrors = {
|
|
@@ -6583,7 +6628,7 @@ type ListPersonActivitiesErrors = {
|
|
|
6583
6628
|
*/
|
|
6584
6629
|
401: ErrorResponse;
|
|
6585
6630
|
/**
|
|
6586
|
-
* No mention by this person
|
|
6631
|
+
* No mention by this person in this scope, or no such group
|
|
6587
6632
|
*/
|
|
6588
6633
|
404: ErrorResponse;
|
|
6589
6634
|
};
|
|
@@ -6661,7 +6706,12 @@ type LogPersonActivityData = {
|
|
|
6661
6706
|
*/
|
|
6662
6707
|
id: string;
|
|
6663
6708
|
};
|
|
6664
|
-
query?:
|
|
6709
|
+
query?: {
|
|
6710
|
+
/**
|
|
6711
|
+
* Scope to one keyword group (grp_...): only people who mentioned that group's keywords, with that group's own tags, notes, merges, activities and segments. Omit for the whole workspace.
|
|
6712
|
+
*/
|
|
6713
|
+
groupId?: string;
|
|
6714
|
+
};
|
|
6665
6715
|
url: '/v1/people/{id}/activities';
|
|
6666
6716
|
};
|
|
6667
6717
|
type LogPersonActivityErrors = {
|
|
@@ -6674,7 +6724,7 @@ type LogPersonActivityErrors = {
|
|
|
6674
6724
|
*/
|
|
6675
6725
|
401: ErrorResponse;
|
|
6676
6726
|
/**
|
|
6677
|
-
* No mention by this person
|
|
6727
|
+
* No mention by this person in this scope, or no such group
|
|
6678
6728
|
*/
|
|
6679
6729
|
404: ErrorResponse;
|
|
6680
6730
|
};
|
|
@@ -6698,7 +6748,12 @@ type DeletePersonActivityData = {
|
|
|
6698
6748
|
*/
|
|
6699
6749
|
activityId: string;
|
|
6700
6750
|
};
|
|
6701
|
-
query?:
|
|
6751
|
+
query?: {
|
|
6752
|
+
/**
|
|
6753
|
+
* Scope to one keyword group (grp_...): only people who mentioned that group's keywords, with that group's own tags, notes, merges, activities and segments. Omit for the whole workspace.
|
|
6754
|
+
*/
|
|
6755
|
+
groupId?: string;
|
|
6756
|
+
};
|
|
6702
6757
|
url: '/v1/people/{id}/activities/{activityId}';
|
|
6703
6758
|
};
|
|
6704
6759
|
type DeletePersonActivityErrors = {
|
|
@@ -6707,7 +6762,7 @@ type DeletePersonActivityErrors = {
|
|
|
6707
6762
|
*/
|
|
6708
6763
|
401: ErrorResponse;
|
|
6709
6764
|
/**
|
|
6710
|
-
* No such activity on this person
|
|
6765
|
+
* No such activity on this person in this scope, or no such group
|
|
6711
6766
|
*/
|
|
6712
6767
|
404: ErrorResponse;
|
|
6713
6768
|
};
|
|
@@ -6722,7 +6777,12 @@ type DeletePersonActivityResponse = DeletePersonActivityResponses[keyof DeletePe
|
|
|
6722
6777
|
type ListSegmentsData = {
|
|
6723
6778
|
body?: never;
|
|
6724
6779
|
path?: never;
|
|
6725
|
-
query?:
|
|
6780
|
+
query?: {
|
|
6781
|
+
/**
|
|
6782
|
+
* Scope to one keyword group (grp_...): only people who mentioned that group's keywords, with that group's own tags, notes, merges, activities and segments. Omit for the whole workspace.
|
|
6783
|
+
*/
|
|
6784
|
+
groupId?: string;
|
|
6785
|
+
};
|
|
6726
6786
|
url: '/v1/segments';
|
|
6727
6787
|
};
|
|
6728
6788
|
type ListSegmentsErrors = {
|
|
@@ -6730,6 +6790,10 @@ type ListSegmentsErrors = {
|
|
|
6730
6790
|
* Missing or invalid API key
|
|
6731
6791
|
*/
|
|
6732
6792
|
401: ErrorResponse;
|
|
6793
|
+
/**
|
|
6794
|
+
* No such group
|
|
6795
|
+
*/
|
|
6796
|
+
404: ErrorResponse;
|
|
6733
6797
|
};
|
|
6734
6798
|
type ListSegmentsError = ListSegmentsErrors[keyof ListSegmentsErrors];
|
|
6735
6799
|
type ListSegmentsResponses = {
|
|
@@ -6818,6 +6882,10 @@ type ListSegmentsResponses = {
|
|
|
6818
6882
|
*/
|
|
6819
6883
|
ownerIds?: Array<string>;
|
|
6820
6884
|
};
|
|
6885
|
+
/**
|
|
6886
|
+
* The group this segment belongs to, or null for a workspace segment.
|
|
6887
|
+
*/
|
|
6888
|
+
groupId: string | null;
|
|
6821
6889
|
/**
|
|
6822
6890
|
* People in the segment right now; it is evaluated on every read.
|
|
6823
6891
|
*/
|
|
@@ -6996,7 +7064,12 @@ type CreateSegmentData = {
|
|
|
6996
7064
|
};
|
|
6997
7065
|
};
|
|
6998
7066
|
path?: never;
|
|
6999
|
-
query?:
|
|
7067
|
+
query?: {
|
|
7068
|
+
/**
|
|
7069
|
+
* Scope to one keyword group (grp_...): only people who mentioned that group's keywords, with that group's own tags, notes, merges, activities and segments. Omit for the whole workspace.
|
|
7070
|
+
*/
|
|
7071
|
+
groupId?: string;
|
|
7072
|
+
};
|
|
7000
7073
|
url: '/v1/segments';
|
|
7001
7074
|
};
|
|
7002
7075
|
type CreateSegmentErrors = {
|
|
@@ -7009,7 +7082,11 @@ type CreateSegmentErrors = {
|
|
|
7009
7082
|
*/
|
|
7010
7083
|
401: ErrorResponse;
|
|
7011
7084
|
/**
|
|
7012
|
-
*
|
|
7085
|
+
* No such group
|
|
7086
|
+
*/
|
|
7087
|
+
404: ErrorResponse;
|
|
7088
|
+
/**
|
|
7089
|
+
* A segment with this name already exists in this scope
|
|
7013
7090
|
*/
|
|
7014
7091
|
409: ErrorResponse;
|
|
7015
7092
|
};
|
|
@@ -7029,7 +7106,12 @@ type DeleteSegmentData = {
|
|
|
7029
7106
|
*/
|
|
7030
7107
|
id: string;
|
|
7031
7108
|
};
|
|
7032
|
-
query?:
|
|
7109
|
+
query?: {
|
|
7110
|
+
/**
|
|
7111
|
+
* Scope to one keyword group (grp_...): only people who mentioned that group's keywords, with that group's own tags, notes, merges, activities and segments. Omit for the whole workspace.
|
|
7112
|
+
*/
|
|
7113
|
+
groupId?: string;
|
|
7114
|
+
};
|
|
7033
7115
|
url: '/v1/segments/{id}';
|
|
7034
7116
|
};
|
|
7035
7117
|
type DeleteSegmentErrors = {
|
|
@@ -7038,7 +7120,7 @@ type DeleteSegmentErrors = {
|
|
|
7038
7120
|
*/
|
|
7039
7121
|
401: ErrorResponse;
|
|
7040
7122
|
/**
|
|
7041
|
-
* No such segment
|
|
7123
|
+
* No such segment in this scope, or no such group
|
|
7042
7124
|
*/
|
|
7043
7125
|
404: ErrorResponse;
|
|
7044
7126
|
};
|
|
@@ -7058,7 +7140,12 @@ type GetSegmentData = {
|
|
|
7058
7140
|
*/
|
|
7059
7141
|
id: string;
|
|
7060
7142
|
};
|
|
7061
|
-
query?:
|
|
7143
|
+
query?: {
|
|
7144
|
+
/**
|
|
7145
|
+
* Scope to one keyword group (grp_...): only people who mentioned that group's keywords, with that group's own tags, notes, merges, activities and segments. Omit for the whole workspace.
|
|
7146
|
+
*/
|
|
7147
|
+
groupId?: string;
|
|
7148
|
+
};
|
|
7062
7149
|
url: '/v1/segments/{id}';
|
|
7063
7150
|
};
|
|
7064
7151
|
type GetSegmentErrors = {
|
|
@@ -7067,7 +7154,7 @@ type GetSegmentErrors = {
|
|
|
7067
7154
|
*/
|
|
7068
7155
|
401: ErrorResponse;
|
|
7069
7156
|
/**
|
|
7070
|
-
* No such segment
|
|
7157
|
+
* No such segment in this scope, or no such group
|
|
7071
7158
|
*/
|
|
7072
7159
|
404: ErrorResponse;
|
|
7073
7160
|
};
|
|
@@ -7170,7 +7257,12 @@ type UpdateSegmentData = {
|
|
|
7170
7257
|
*/
|
|
7171
7258
|
id: string;
|
|
7172
7259
|
};
|
|
7173
|
-
query?:
|
|
7260
|
+
query?: {
|
|
7261
|
+
/**
|
|
7262
|
+
* Scope to one keyword group (grp_...): only people who mentioned that group's keywords, with that group's own tags, notes, merges, activities and segments. Omit for the whole workspace.
|
|
7263
|
+
*/
|
|
7264
|
+
groupId?: string;
|
|
7265
|
+
};
|
|
7174
7266
|
url: '/v1/segments/{id}';
|
|
7175
7267
|
};
|
|
7176
7268
|
type UpdateSegmentErrors = {
|
|
@@ -7179,11 +7271,11 @@ type UpdateSegmentErrors = {
|
|
|
7179
7271
|
*/
|
|
7180
7272
|
401: ErrorResponse;
|
|
7181
7273
|
/**
|
|
7182
|
-
* No such segment
|
|
7274
|
+
* No such segment in this scope, or no such group
|
|
7183
7275
|
*/
|
|
7184
7276
|
404: ErrorResponse;
|
|
7185
7277
|
/**
|
|
7186
|
-
* A segment with this name already exists
|
|
7278
|
+
* A segment with this name already exists in this scope
|
|
7187
7279
|
*/
|
|
7188
7280
|
409: ErrorResponse;
|
|
7189
7281
|
};
|
|
@@ -10143,79 +10235,85 @@ declare const exportMentionsJson: <ThrowOnError extends boolean = false>(options
|
|
|
10143
10235
|
/**
|
|
10144
10236
|
* Export people as CSV
|
|
10145
10237
|
*
|
|
10146
|
-
* 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, then outreach stage, owner and last contacted. Capped at 5,000 people. At most 6 exports per minute per workspace; a 429 carries Retry-After.
|
|
10238
|
+
* 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, then outreach stage, owner and last contacted. Capped at 5,000 people. `groupId` scopes the export like the list. At most 6 exports per minute per workspace; a 429 carries Retry-After.
|
|
10147
10239
|
*/
|
|
10148
10240
|
declare const exportPeopleCsv: <ThrowOnError extends boolean = false>(options?: Options<ExportPeopleCsvData, ThrowOnError>) => RequestResult<ExportPeopleCsvResponses, ExportPeopleCsvErrors, ThrowOnError>;
|
|
10149
10241
|
/**
|
|
10150
10242
|
* List people
|
|
10151
10243
|
*
|
|
10152
|
-
* The people behind your mentions: one row per person, with their accounts, reach, public profile, per-workspace stats, your annotations and where your outreach stands. Filter by platform, tag, follower range, mention counts, intents seen, keyword kinds mentioned or never mentioned, outreach stage, owner, automated (bot accounts, whose matched posts are mostly machine-made), or a saved segment. Offset-paginated with a total.
|
|
10244
|
+
* The people behind your mentions: one row per person, with their accounts, reach, public profile, per-workspace stats, your annotations and where your outreach stands. Filter by platform, tag, follower range, mention counts, intents seen, keyword kinds mentioned or never mentioned, outreach stage, owner, automated (bot accounts, whose matched posts are mostly machine-made), or a saved segment. Offset-paginated with a total. With `groupId`, only the people who mentioned that keyword group's keywords, counted over those mentions, with that group's own annotations, merges, outreach and segments.
|
|
10153
10245
|
*/
|
|
10154
10246
|
declare const listPeople: <ThrowOnError extends boolean = false>(options?: Options<ListPeopleData, ThrowOnError>) => RequestResult<ListPeopleResponses, ListPeopleErrors, ThrowOnError>;
|
|
10155
10247
|
/**
|
|
10156
10248
|
* Get a person
|
|
10157
10249
|
*
|
|
10158
|
-
* One person as your workspace sees them. An account merged into someone resolves to that person.
|
|
10250
|
+
* One person as your workspace sees them. An account merged into someone resolves to that person. With `groupId`, the call works inside that keyword group: its people, and its own tags, notes, merges and activities, apart from the workspace's and from every other group's.
|
|
10159
10251
|
*/
|
|
10160
10252
|
declare const getPerson: <ThrowOnError extends boolean = false>(options: Options<GetPersonData, ThrowOnError>) => RequestResult<GetPersonResponses, GetPersonErrors, ThrowOnError>;
|
|
10161
10253
|
/**
|
|
10162
10254
|
* Update your annotations on a person
|
|
10163
10255
|
*
|
|
10164
|
-
* Tags, notes, mute, and the outreach owner (a workspace member; null clears) and stage, for your workspace only. Mute hides their posts from your feed and every channel; ingest and billing never change.
|
|
10256
|
+
* Tags, notes, mute, and the outreach owner (a workspace member; null clears) and stage, for your workspace only. Mute hides their posts from your feed and every channel; ingest and billing never change. With `groupId` the annotations are that keyword group's own; `muted` is not supported there yet and is a 400.
|
|
10165
10257
|
*/
|
|
10166
10258
|
declare const updatePerson: <ThrowOnError extends boolean = false>(options: Options<UpdatePersonData, ThrowOnError>) => RequestResult<UpdatePersonResponses, UpdatePersonErrors, ThrowOnError>;
|
|
10167
10259
|
/**
|
|
10168
10260
|
* Merge an account into a person
|
|
10169
10261
|
*
|
|
10170
|
-
* Declare that this account and another person are the same human, for your workspace only. Their mentions, tags, notes and outreach activities combine under the person named by `into`, which keeps its owner and stage unless it had none.
|
|
10262
|
+
* Declare that this account and another person are the same human, for your workspace only. Their mentions, tags, notes and outreach activities combine under the person named by `into`, which keeps its owner and stage unless it had none. With `groupId`, the call works inside that keyword group: its people, and its own tags, notes, merges and activities, apart from the workspace's and from every other group's.
|
|
10171
10263
|
*/
|
|
10172
10264
|
declare const mergePeople: <ThrowOnError extends boolean = false>(options: Options<MergePeopleData, ThrowOnError>) => RequestResult<MergePeopleResponses, MergePeopleErrors, ThrowOnError>;
|
|
10173
10265
|
/**
|
|
10174
10266
|
* Undo a merge
|
|
10175
10267
|
*
|
|
10176
|
-
* The account becomes its own person again.
|
|
10268
|
+
* The account becomes its own person again. With `groupId`, the call works inside that keyword group: its people, and its own tags, notes, merges and activities, apart from the workspace's and from every other group's.
|
|
10177
10269
|
*/
|
|
10178
10270
|
declare const splitPerson: <ThrowOnError extends boolean = false>(options: Options<SplitPersonData, ThrowOnError>) => RequestResult<SplitPersonResponses, SplitPersonErrors, ThrowOnError>;
|
|
10179
10271
|
/**
|
|
10180
10272
|
* List outreach activities
|
|
10181
10273
|
*
|
|
10182
|
-
* Every logged contact with this person across all their accounts, newest first (at most 200): who reached out, the channel, when, and a short note. Read it before reaching out so two teammates never contact the same person without knowing.
|
|
10274
|
+
* Every logged contact with this person across all their accounts, newest first (at most 200): who reached out, the channel, when, and a short note. Read it before reaching out so two teammates never contact the same person without knowing. With `groupId`, the call works inside that keyword group: its people, and its own tags, notes, merges and activities, apart from the workspace's and from every other group's.
|
|
10183
10275
|
*/
|
|
10184
10276
|
declare const listPersonActivities: <ThrowOnError extends boolean = false>(options: Options<ListPersonActivitiesData, ThrowOnError>) => RequestResult<ListPersonActivitiesResponses, ListPersonActivitiesErrors, ThrowOnError>;
|
|
10185
10277
|
/**
|
|
10186
10278
|
* Log an outreach activity
|
|
10187
10279
|
*
|
|
10188
|
-
* Record that a teammate reached out to this person: an email, a DM, a call. The first activity claims an unowned person for whoever reached out and moves not_contacted to contacted; an existing owner and a later stage are kept. `memberId` defaults to the signed-in member; an API key that omits it logs an unattributed activity, which claims nobody.
|
|
10280
|
+
* Record that a teammate reached out to this person: an email, a DM, a call. The first activity claims an unowned person for whoever reached out and moves not_contacted to contacted; an existing owner and a later stage are kept. `memberId` defaults to the signed-in member; an API key that omits it logs an unattributed activity, which claims nobody. With `groupId`, the call works inside that keyword group: its people, and its own tags, notes, merges and activities, apart from the workspace's and from every other group's.
|
|
10189
10281
|
*/
|
|
10190
10282
|
declare const logPersonActivity: <ThrowOnError extends boolean = false>(options: Options<LogPersonActivityData, ThrowOnError>) => RequestResult<LogPersonActivityResponses, LogPersonActivityErrors, ThrowOnError>;
|
|
10191
10283
|
/**
|
|
10192
10284
|
* Delete an outreach activity
|
|
10193
10285
|
*
|
|
10194
|
-
* Remove a contact logged by mistake. The person's owner and stage stay as they are.
|
|
10286
|
+
* Remove a contact logged by mistake. The person's owner and stage stay as they are. With `groupId`, the call works inside that keyword group: its people, and its own tags, notes, merges and activities, apart from the workspace's and from every other group's.
|
|
10195
10287
|
*/
|
|
10196
10288
|
declare const deletePersonActivity: <ThrowOnError extends boolean = false>(options: Options<DeletePersonActivityData, ThrowOnError>) => RequestResult<DeletePersonActivityResponses, DeletePersonActivityErrors, ThrowOnError>;
|
|
10197
10289
|
/**
|
|
10198
10290
|
* List segments
|
|
10199
10291
|
*
|
|
10200
|
-
* 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.
|
|
10292
|
+
* 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. With `groupId`, that keyword group's own segments, counted over its own people; without it, the workspace's. A segment belongs to one scope and is not visible from another.
|
|
10201
10293
|
*/
|
|
10202
10294
|
declare const listSegments: <ThrowOnError extends boolean = false>(options?: Options<ListSegmentsData, ThrowOnError>) => RequestResult<ListSegmentsResponses, ListSegmentsErrors, ThrowOnError>;
|
|
10203
10295
|
/**
|
|
10204
10296
|
* Create a segment
|
|
10297
|
+
*
|
|
10298
|
+
* Save a named filter over your people. With `groupId` the segment belongs to that keyword group: it is listed, counted and changed only there, and its name only has to be unique in the group.
|
|
10205
10299
|
*/
|
|
10206
10300
|
declare const createSegment: <ThrowOnError extends boolean = false>(options: Options<CreateSegmentData, ThrowOnError>) => RequestResult<CreateSegmentResponses, CreateSegmentErrors, ThrowOnError>;
|
|
10207
10301
|
/**
|
|
10208
10302
|
* Delete a segment
|
|
10209
10303
|
*
|
|
10210
|
-
* Nobody in it is affected.
|
|
10304
|
+
* Nobody in it is affected. Pass the `groupId` the segment was saved in.
|
|
10211
10305
|
*/
|
|
10212
10306
|
declare const deleteSegment: <ThrowOnError extends boolean = false>(options: Options<DeleteSegmentData, ThrowOnError>) => RequestResult<DeleteSegmentResponses, DeleteSegmentErrors, ThrowOnError>;
|
|
10213
10307
|
/**
|
|
10214
10308
|
* Get a segment
|
|
10309
|
+
*
|
|
10310
|
+
* One segment of the scope the call names: the workspace, or the keyword group in `groupId`. A segment saved in another scope is a 404.
|
|
10215
10311
|
*/
|
|
10216
10312
|
declare const getSegment: <ThrowOnError extends boolean = false>(options: Options<GetSegmentData, ThrowOnError>) => RequestResult<GetSegmentResponses, GetSegmentErrors, ThrowOnError>;
|
|
10217
10313
|
/**
|
|
10218
10314
|
* Update a segment
|
|
10315
|
+
*
|
|
10316
|
+
* Only the fields sent change. Pass the `groupId` the segment was saved in; a segment cannot move between scopes.
|
|
10219
10317
|
*/
|
|
10220
10318
|
declare const updateSegment: <ThrowOnError extends boolean = false>(options: Options<UpdateSegmentData, ThrowOnError>) => RequestResult<UpdateSegmentResponses, UpdateSegmentErrors, ThrowOnError>;
|
|
10221
10319
|
/**
|
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, CreateGroupData, CreateGroupErrors, CreateGroupResponses, CreateInvitationData, CreateInvitationErrors, CreateInvitationResponses, CreateKeywordData, CreateKeywordErrors, CreateKeywordResponses, CreateSegmentData, CreateSegmentErrors, CreateSegmentResponses, CreateTopUpData, CreateTopUpErrors, CreateTopUpResponses, CreateViewData, CreateViewErrors, CreateViewResponses, DeleteAlertData, DeleteAlertErrors, DeleteAlertResponses, DeleteChannelData, DeleteChannelErrors, DeleteChannelResponses, DeleteGroupData, DeleteGroupErrors, DeleteGroupResponses, DeleteKeywordData, DeleteKeywordErrors, DeleteKeywordResponses, DeletePersonActivityData, DeletePersonActivityErrors, DeletePersonActivityResponses, DeleteSegmentData, DeleteSegmentErrors, DeleteSegmentResponses, DeleteViewData, DeleteViewErrors, DeleteViewResponses, DismissAttentionData, DismissAttentionErrors, DismissAttentionResponses, DuplicateKeywordData, DuplicateKeywordErrors, DuplicateKeywordResponses, ExportMentionsCsvData, ExportMentionsCsvErrors, ExportMentionsCsvResponses, ExportMentionsJsonData, ExportMentionsJsonErrors, ExportMentionsJsonResponses, ExportPeopleCsvData, ExportPeopleCsvErrors, ExportPeopleCsvResponses, GetAlertData, GetAlertErrors, GetAlertResponses, GetAnalyticsBreakdownData, GetAnalyticsBreakdownErrors, GetAnalyticsBreakdownResponses, GetAnalyticsSeriesData, GetAnalyticsSeriesErrors, GetAnalyticsSeriesResponses, GetAnalyticsSummaryData, GetAnalyticsSummaryErrors, GetAnalyticsSummaryResponses, GetChannelData, GetChannelErrors, GetChannelResponses, GetCompanyData, GetCompanyErrors, GetCompanyResponses, GetFiltersData, GetFiltersErrors, GetFiltersResponses, GetGroupData, GetGroupErrors, GetGroupResponses, GetHealthData, GetHealthResponses, GetInvoiceUrlData, GetInvoiceUrlErrors, GetInvoiceUrlResponses, GetKeywordData, GetKeywordErrors, GetKeywordHealthData, GetKeywordHealthErrors, GetKeywordHealthResponses, GetKeywordResponses, GetMentionData, GetMentionErrors, GetMentionResponses, GetPersonData, GetPersonErrors, GetPersonResponses, GetReviewsReportData, GetReviewsReportErrors, GetReviewsReportResponses, GetSegmentData, GetSegmentErrors, GetSegmentResponses, GetShareOfVoiceData, GetShareOfVoiceErrors, GetShareOfVoiceResponses, GetUsageBreakdownData, GetUsageBreakdownErrors, GetUsageBreakdownResponses, GetUsageData, GetUsageErrors, GetUsageResponses, GetViewData, GetViewErrors, GetViewResponses, GetWalletData, GetWalletErrors, GetWalletResponses, ListAlertsData, ListAlertsErrors, ListAlertsResponses, ListApiKeysData, ListApiKeysErrors, ListApiKeysResponses, ListAttentionData, ListAttentionErrors, ListAttentionResponses, ListChannelDeliveriesData, ListChannelDeliveriesErrors, ListChannelDeliveriesResponses, ListChannelsData, ListChannelsErrors, ListChannelsResponses, ListGroupsData, ListGroupsErrors, ListGroupsResponses, ListInvitationsData, ListInvitationsErrors, ListInvitationsResponses, ListInvoicesData, ListInvoicesErrors, ListInvoicesResponses, ListKeywordsData, ListKeywordsErrors, ListKeywordsResponses, ListLedgerData, ListLedgerErrors, ListLedgerResponses, ListMembersData, ListMembersErrors, ListMembersResponses, ListMentionCommentsData, ListMentionCommentsErrors, ListMentionCommentsResponses, ListPeopleData, ListPeopleErrors, ListPeopleResponses, ListPersonActivitiesData, ListPersonActivitiesErrors, ListPersonActivitiesResponses, ListSegmentsData, ListSegmentsErrors, ListSegmentsResponses, ListViewsData, ListViewsErrors, ListViewsResponses, LogPersonActivityData, LogPersonActivityErrors, LogPersonActivityResponses, MergePeopleData, MergePeopleErrors, MergePeopleResponses, MuteAlertAuthorsData, MuteAlertAuthorsErrors, MuteAlertAuthorsResponses, RemoveMemberData, RemoveMemberErrors, RemoveMemberResponses, RevokeApiKeyData, RevokeApiKeyErrors, RevokeApiKeyResponses, RevokeInvitationData, RevokeInvitationErrors, RevokeInvitationResponses, 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, UpdateFiltersData, UpdateFiltersErrors, UpdateFiltersResponses, UpdateGroupData, UpdateGroupErrors, UpdateGroupResponses, UpdateKeywordData, UpdateKeywordErrors, UpdateKeywordResponses, UpdateMentionData, UpdateMentionErrors, UpdateMentionResponses, UpdatePersonData, UpdatePersonErrors, UpdatePersonResponses, UpdateSegmentData, UpdateSegmentErrors, UpdateSegmentResponses, UpdateViewData, UpdateViewErrors, UpdateViewResponses, WhoamiData, WhoamiErrors, WhoamiResponses } 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 * The keywords of the workspace with their match stats and poll health. Without parameters: every keyword, newest first. `q` searches the term and the context; `kind`, `status` and `platform` narrow the list; `sort` orders it; `limit` and `offset` page it. `total` counts the keywords that matched before paging.\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. `matching` narrows what the term matches (required and excluded terms, excluded authors, case, subreddits, GitHub repository events) before a mention is stored, so a rejected post is never billed; `context` is a sentence the classifier reads for this keyword only. `cap` puts a monthly ceiling on its matched mentions: at the cap it stops matching until the first of the next month (UTC) or until the cap is raised, while its daily keyword charge continues.\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 * Rename it (`term`: the new term is tracked from now on, with no look-back; the mentions the old term found stay), mute or unmute it, reclassify it (`kind`), change the platforms it is tracked on, its classifier `context`, its `matching` rules (each rule field optional; an empty list clears one), or its monthly mention `cap` (null removes it; a cap above this month's count resumes a capped keyword at once). Rules apply to new mentions from the next poll; stored mentions are untouched.\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 keyword's health\n *\n * Whether the keyword earns what it costs over a trailing window (`range`, default 30d): a status (healthy, noisy, quiet, capped, paused, new) with the reasons in plain words, its numbers by platform and week, what it cost, the words and authors its noise is made of, and suggestions. Each suggestion carries a `patch` to send to PATCH /v1/keywords/{id} as is, and the effect it would have had, measured by running the matcher's own rules over the window's posts. `ai=true` adds a context rewritten by a language model (cached a day, at most 20 model calls an hour per workspace). Read only and never billed; the report is cached for 5 minutes, and a change to the keyword starts a fresh one. At most 30 reads a minute per workspace.\n */\nexport const getKeywordHealth = <ThrowOnError extends boolean = false>(options: Options<GetKeywordHealthData, ThrowOnError>): RequestResult<GetKeywordHealthResponses, GetKeywordHealthErrors, ThrowOnError> => (options.client ?? client).get<GetKeywordHealthResponses, GetKeywordHealthErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords/{id}/health',\n ...options\n});\n\n/**\n * Duplicate a keyword\n *\n * A new keyword with this one's settings and a new `term` (or the same term in another group): its kind, platforms, context, every matching rule, its monthly mention cap and its comments setting. Review apps and feeds are copied only when listed in `include`. It is a new keyword: $5 per month, and the newest posts of the last 30 days come in at once, as with any new keyword.\n */\nexport const duplicateKeyword = <ThrowOnError extends boolean = false>(options: Options<DuplicateKeywordData, ThrowOnError>): RequestResult<DuplicateKeywordResponses, DuplicateKeywordErrors, ThrowOnError> => (options.client ?? client).post<DuplicateKeywordResponses, DuplicateKeywordErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords/{id}/duplicate',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Get the workspace filters\n *\n * The noise rules applied to every keyword before a mention is stored: excluded terms and authors, excluded GitHub repositories, and the subreddits Reddit posts may (or may not) come from. A post they reject is never classified, delivered or billed. Keyword-level rules live on each keyword (`matching`); both apply.\n */\nexport const getFilters = <ThrowOnError extends boolean = false>(options?: Options<GetFiltersData, ThrowOnError>): RequestResult<GetFiltersResponses, GetFiltersErrors, ThrowOnError> => (options?.client ?? client).get<GetFiltersResponses, GetFiltersErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/filters',\n ...options\n});\n\n/**\n * Update the workspace filters\n *\n * Replace any of the lists; an omitted list is untouched and an empty one clears it. Entries are stored in canonical form (terms lowercased, authors as profile links or bare names, repositories as owner/name, subreddits without r/). Takes effect on new mentions within a minute; stored mentions are untouched.\n */\nexport const updateFilters = <ThrowOnError extends boolean = false>(options: Options<UpdateFiltersData, ThrowOnError>): RequestResult<UpdateFiltersResponses, UpdateFiltersErrors, ThrowOnError> => (options.client ?? client).patch<UpdateFiltersResponses, UpdateFiltersErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/filters',\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, leave an internal note, or correct the classifier: `relevant` true or false is your verdict (relevance becomes 100 or 0, and every list, filter, digest and report follows it), `sentiment` replaces the label; null withdraws a verdict and restores the classifier's value. 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. alertId applies an alert rule's filter on top of the others: the same mentions that rule would send. anyOf adds OR: URL-encoded JSON groups of conditions, at least one of which must hold on top of every other filter.\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), language, confidence, status, relevant, delivered, url, links (pipe-separated), text (first 1,000 characters), group, group_external_id, rating and app_id (app store reviews only), title and image_url (where the platform has them), duplicate_of (the mention a cross-post copies; the CSV keeps one row per mention, copies included, so it adds up to the bill), kind (post, comment or repository), parent_url (the post a comment answers), comments (comments of it delivered to you), subreddit and flair (Reddit only). 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 * List the comments of a mention\n *\n * The comments under a mention's post, newest first: every comment in the thread, whether or not it names your keyword. Read once, about a day after the post, for mentions scored relevant whose keyword has comments enabled (keywords.comments), on Hacker News, Bluesky, GitHub, Stack Overflow, DEV, YouTube and Reddit; empty before that and for other keywords. Each comment delivered costs $0.008 on the comments line of the bill, once per workspace. A comment that itself names one of your keywords is also a mention: `mentionId` links it. Two mentions of one post (two keywords) list the same thread.\n */\nexport const listMentionComments = <ThrowOnError extends boolean = false>(options: Options<ListMentionCommentsData, ThrowOnError>): RequestResult<ListMentionCommentsResponses, ListMentionCommentsErrors, ThrowOnError> => (options.client ?? client).get<ListMentionCommentsResponses, ListMentionCommentsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions/{id}/comments',\n ...options\n});\n\n/**\n * Export mentions as JSON\n *\n * The same mentions GET /v1/mentions would list for these filters, in one response, newest matched first (the order they entered your feed): every row is the full Mention object the list returns, text included. Capped at 10,000 mentions; `truncated` (and the X-Mentions-Truncated header) says when the cap cut the list. Shares the CSV export's limit: at most 6 exports per minute per workspace, either format; a 429 carries Retry-After.\n */\nexport const exportMentionsJson = <ThrowOnError extends boolean = false>(options?: Options<ExportMentionsJsonData, ThrowOnError>): RequestResult<ExportMentionsJsonResponses, ExportMentionsJsonErrors, ThrowOnError> => (options?.client ?? client).get<ExportMentionsJsonResponses, ExportMentionsJsonErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions/export.json',\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, then outreach stage, owner and last contacted. 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, your annotations and where your outreach stands. Filter by platform, tag, follower range, mention counts, intents seen, keyword kinds mentioned or never mentioned, outreach stage, owner, automated (bot accounts, whose matched posts are mostly machine-made), 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, mute, and the outreach owner (a workspace member; null clears) and stage, 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, notes and outreach activities combine under the person named by `into`, which keeps its owner and stage unless it had none.\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 outreach activities\n *\n * Every logged contact with this person across all their accounts, newest first (at most 200): who reached out, the channel, when, and a short note. Read it before reaching out so two teammates never contact the same person without knowing.\n */\nexport const listPersonActivities = <ThrowOnError extends boolean = false>(options: Options<ListPersonActivitiesData, ThrowOnError>): RequestResult<ListPersonActivitiesResponses, ListPersonActivitiesErrors, ThrowOnError> => (options.client ?? client).get<ListPersonActivitiesResponses, ListPersonActivitiesErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}/activities',\n ...options\n});\n\n/**\n * Log an outreach activity\n *\n * Record that a teammate reached out to this person: an email, a DM, a call. The first activity claims an unowned person for whoever reached out and moves not_contacted to contacted; an existing owner and a later stage are kept. `memberId` defaults to the signed-in member; an API key that omits it logs an unattributed activity, which claims nobody.\n */\nexport const logPersonActivity = <ThrowOnError extends boolean = false>(options: Options<LogPersonActivityData, ThrowOnError>): RequestResult<LogPersonActivityResponses, LogPersonActivityErrors, ThrowOnError> => (options.client ?? client).post<LogPersonActivityResponses, LogPersonActivityErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}/activities',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete an outreach activity\n *\n * Remove a contact logged by mistake. The person's owner and stage stay as they are.\n */\nexport const deletePersonActivity = <ThrowOnError extends boolean = false>(options: Options<DeletePersonActivityData, ThrowOnError>): RequestResult<DeletePersonActivityResponses, DeletePersonActivityErrors, ThrowOnError> => (options.client ?? client).delete<DeletePersonActivityResponses, DeletePersonActivityErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}/activities/{activityId}',\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 * List views\n *\n * The saved views of the workspace, oldest first. A view is a named filter over mentions: pass its id as `viewId` to GET /v1/mentions or the export to read exactly what it selects.\n */\nexport const listViews = <ThrowOnError extends boolean = false>(options?: Options<ListViewsData, ThrowOnError>): RequestResult<ListViewsResponses, ListViewsErrors, ThrowOnError> => (options?.client ?? client).get<ListViewsResponses, ListViewsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/views',\n ...options\n});\n\n/**\n * Save a view\n *\n * Save a named filter over mentions. The filter takes the same fields as GET /v1/mentions (lists are any-of, `not` lists none-of, every condition ANDed), plus `anyOf`, groups of those conditions of which at least one must hold; an empty filter is every mention. Nothing is materialized: the view selects whatever matches when it is read.\n */\nexport const createView = <ThrowOnError extends boolean = false>(options: Options<CreateViewData, ThrowOnError>): RequestResult<CreateViewResponses, CreateViewErrors, ThrowOnError> => (options.client ?? client).post<CreateViewResponses, CreateViewErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/views',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a view\n *\n * Removes the view. No mention is affected.\n */\nexport const deleteView = <ThrowOnError extends boolean = false>(options: Options<DeleteViewData, ThrowOnError>): RequestResult<DeleteViewResponses, DeleteViewErrors, ThrowOnError> => (options.client ?? client).delete<DeleteViewResponses, DeleteViewErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/views/{id}',\n ...options\n});\n\n/**\n * Get a view\n */\nexport const getView = <ThrowOnError extends boolean = false>(options: Options<GetViewData, ThrowOnError>): RequestResult<GetViewResponses, GetViewErrors, ThrowOnError> => (options.client ?? client).get<GetViewResponses, GetViewErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/views/{id}',\n ...options\n});\n\n/**\n * Update a view\n *\n * Rename, describe or refilter a view. `filter` replaces the whole filter.\n */\nexport const updateView = <ThrowOnError extends boolean = false>(options: Options<UpdateViewData, ThrowOnError>): RequestResult<UpdateViewResponses, UpdateViewErrors, ThrowOnError> => (options.client ?? client).patch<UpdateViewResponses, UpdateViewErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/views/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List attention items\n *\n * What needs a person, newest first: a keyword whose mentions spiked in the last hour (mention.spike), whose negative share of the last 24 hours jumped (sentiment.negative_spike), that turned noisy (keyword.noisy), or a channel whose last sends all failed (channel.failing). Detected once an hour; an item opens when its condition starts and resolves on its own when the condition is gone. Open items by default; `status=all` reads the history. Each opening is also an account event of the same name, which webhook, Slack, email and Telegram channels can subscribe to.\n */\nexport const listAttention = <ThrowOnError extends boolean = false>(options?: Options<ListAttentionData, ThrowOnError>): RequestResult<ListAttentionResponses, ListAttentionErrors, ThrowOnError> => (options?.client ?? client).get<ListAttentionResponses, ListAttentionErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/attention',\n ...options\n});\n\n/**\n * Dismiss an attention item\n *\n * Put an item away. It leaves the open list and does not come back while its condition lasts; once the condition clears, a new episode may open a new item. Idempotent.\n */\nexport const dismissAttention = <ThrowOnError extends boolean = false>(options: Options<DismissAttentionData, ThrowOnError>): RequestResult<DismissAttentionResponses, DismissAttentionErrors, ThrowOnError> => (options.client ?? client).post<DismissAttentionResponses, DismissAttentionErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/attention/{id}/dismiss',\n ...options\n});\n\n/**\n * List groups\n *\n * The keyword groups of the workspace, the default group first, then oldest first. A group is how keywords are grouped (a customer, a campaign, a product): a term may be tracked once per group, every keyword belongs to one, and GET /v1/usage/breakdown?by=group says what each group cost. Pass `externalId` to find the group carrying your own id.\n */\nexport const listGroups = <ThrowOnError extends boolean = false>(options?: Options<ListGroupsData, ThrowOnError>): RequestResult<ListGroupsResponses, ListGroupsErrors, ThrowOnError> => (options?.client ?? client).get<ListGroupsResponses, ListGroupsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/groups',\n ...options\n});\n\n/**\n * Create a group\n *\n * Create a keyword group. `name` is unique per workspace; `externalId` (optional, unique too) is your own id for it, a customer id say, so you can find it again without storing ours; `context` (optional) is the group's own company description, which the classifier reads in place of the whole workspace profile for the group's keywords. Then pass the group id as `groupId` when creating a keyword.\n */\nexport const createGroup = <ThrowOnError extends boolean = false>(options: Options<CreateGroupData, ThrowOnError>): RequestResult<CreateGroupResponses, CreateGroupErrors, ThrowOnError> => (options.client ?? client).post<CreateGroupResponses, CreateGroupErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/groups',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a group and its keywords\n *\n * Deletes the group and EVERY keyword in it, each the way DELETE /v1/keywords/{id} does (its mentions go with it, alert rules that named it are adjusted; charges already made stay on the usage record). Read the group first: `stats.keywords` says how many go. The default group cannot be deleted: move or delete its keywords instead.\n */\nexport const deleteGroup = <ThrowOnError extends boolean = false>(options: Options<DeleteGroupData, ThrowOnError>): RequestResult<DeleteGroupResponses, DeleteGroupErrors, ThrowOnError> => (options.client ?? client).delete<DeleteGroupResponses, DeleteGroupErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/groups/{id}',\n ...options\n});\n\n/**\n * Get a group\n */\nexport const getGroup = <ThrowOnError extends boolean = false>(options: Options<GetGroupData, ThrowOnError>): RequestResult<GetGroupResponses, GetGroupErrors, ThrowOnError> => (options.client ?? client).get<GetGroupResponses, GetGroupErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/groups/{id}',\n ...options\n});\n\n/**\n * Update a group\n *\n * Rename a group, change your id for it (`externalId`, null clears) or its company description (`context`, null clears: the workspace profile applies again; new mentions are judged with it at once, old ones are not rescored). The default group can be renamed like any other but takes no description: it is the workspace itself and reads the company profile.\n */\nexport const updateGroup = <ThrowOnError extends boolean = false>(options: Options<UpdateGroupData, ThrowOnError>): RequestResult<UpdateGroupResponses, UpdateGroupErrors, ThrowOnError> => (options.client ?? client).patch<UpdateGroupResponses, UpdateGroupErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/groups/{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. `expiresAt` makes it stop working at an instant (a key for a contractor or a one-off script); it stays listed until revoked.\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 * Introspect the credential\n *\n * The workspace this credential acts on, how the request authenticated (an API key, an OAuth access token from an MCP sign-in, or the dashboard session), whether it may write, and for a key its id and expiry. Run it first: a read key answers 403 read_only_key on every write, and a wrong workspace is the classic scripting mistake.\n */\nexport const whoami = <ThrowOnError extends boolean = false>(options?: Options<WhoamiData, ThrowOnError>): RequestResult<WhoamiResponses, WhoamiErrors, ThrowOnError> => (options?.client ?? client).get<WhoamiResponses, WhoamiErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/whoami',\n ...options\n});\n\n/**\n * List members\n *\n * Everyone in the workspace, owners first. `userId` is what a mention's assigneeId and a person's ownerId take.\n */\nexport const listMembers = <ThrowOnError extends boolean = false>(options?: Options<ListMembersData, ThrowOnError>): RequestResult<ListMembersResponses, ListMembersErrors, ThrowOnError> => (options?.client ?? client).get<ListMembersResponses, ListMembersErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/members',\n ...options\n});\n\n/**\n * List pending invitations\n *\n * Invitations sent and not yet accepted, declined or expired. An accepted one appears in GET /v1/members instead.\n */\nexport const listInvitations = <ThrowOnError extends boolean = false>(options?: Options<ListInvitationsData, ThrowOnError>): RequestResult<ListInvitationsResponses, ListInvitationsErrors, ThrowOnError> => (options?.client ?? client).get<ListInvitationsResponses, ListInvitationsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/members/invitations',\n ...options\n});\n\n/**\n * Invite a member\n *\n * Send an email invitation to join the workspace as admin or member; it expires after 48 hours. Idempotent: an address that already holds an open invitation gets it back with 200 and no second email. An address that is already a member is a 409 already_member. Team changes need a signed-in owner or admin (an OAuth token from an MCP sign-in, or the dashboard session): an API key answers 403.\n */\nexport const createInvitation = <ThrowOnError extends boolean = false>(options: Options<CreateInvitationData, ThrowOnError>): RequestResult<CreateInvitationResponses, CreateInvitationErrors, ThrowOnError> => (options.client ?? client).post<CreateInvitationResponses, CreateInvitationErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/members/invitations',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Revoke an invitation\n *\n * The link in the email stops working at once. Needs a signed-in owner or admin; an API key answers 403.\n */\nexport const revokeInvitation = <ThrowOnError extends boolean = false>(options: Options<RevokeInvitationData, ThrowOnError>): RequestResult<RevokeInvitationResponses, RevokeInvitationErrors, ThrowOnError> => (options.client ?? client).delete<RevokeInvitationResponses, RevokeInvitationErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/members/invitations/{id}',\n ...options\n});\n\n/**\n * Remove a member\n *\n * The person loses the workspace within a minute (their dashboard session on the next request, an OAuth token when its short cache lapses). Their mentions, notes and outreach stay. Needs a signed-in owner or admin; only an owner removes another owner, and the last owner cannot be removed (409 last_owner).\n */\nexport const removeMember = <ThrowOnError extends boolean = false>(options: Options<RemoveMemberData, ThrowOnError>): RequestResult<RemoveMemberResponses, RemoveMemberErrors, ThrowOnError> => (options.client ?? client).delete<RemoveMemberResponses, RemoveMemberErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/members/{id}',\n ...options\n});\n\n/**\n * Get usage and balance\n *\n * The prepaid balance (ledger, pending mention charges, and the effective balance the stop rule reads), the daily burn and the days it buys, the keywords the wallet runs and pauses, the matches recorded today and over 30 days, and whether tracking is stopped or the balance is low. Every matched mention bills ($0.008), relevant or not; every active keyword bills $5 a month, charged daily.\n */\nexport const getUsage = <ThrowOnError extends boolean = false>(options?: Options<GetUsageData, ThrowOnError>): RequestResult<GetUsageResponses, GetUsageErrors, ThrowOnError> => (options?.client ?? client).get<GetUsageResponses, GetUsageErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/usage',\n ...options\n});\n\n/**\n * Get the usage breakdown\n *\n * What the workspace consumed and was charged over a window, grouped by one dimension per call (`by`: day, platform or keyword), in USD cents at list price, with the window's totals on every call. `range` reads a trailing window of UTC days ending today (default 30d); `month` reads one calendar month (YYYY-MM), the shape a bill or a per-customer margin is reconciled against. Keyword-days come from the daily tick and mention charges from the matches that billed, so a deleted keyword keeps its charges in the keyword rows (`keyword.removed`) while its mention counts read 0; the same numbers ride on each keyword as `stats.cost` for the running month. `totals.ledgerDebitCents` is what the wallet has debited so far for the window's days: mentions settle the morning after their day, so a window ending today lags `totals.totalCents` by the unsettled ones, and a closed month differs from it only by cumulative rounding. Rows are paged (`limit`, `offset`, `total`); a workspace may read this at most 30 times a minute through its keys and tokens together.\n */\nexport const getUsageBreakdown = <ThrowOnError extends boolean = false>(options?: Options<GetUsageBreakdownData, ThrowOnError>): RequestResult<GetUsageBreakdownResponses, GetUsageBreakdownErrors, ThrowOnError> => (options?.client ?? client).get<GetUsageBreakdownResponses, GetUsageBreakdownErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/usage/breakdown',\n ...options\n});\n\n/**\n * Create a top-up checkout\n *\n * Returns a hosted checkout URL with `amountCents` prefilled (editable there, $20 to $5,000). The balance is credited when the payment lands, within a minute, and tracking the wallet had paused resumes at once. Nothing is charged by this call itself. `successUrl` must be on an origin this deployment trusts; omit it for the dashboard's billing page.\n */\nexport const createTopUp = <ThrowOnError extends boolean = false>(options: Options<CreateTopUpData, ThrowOnError>): RequestResult<CreateTopUpResponses, CreateTopUpErrors, ThrowOnError> => (options.client ?? client).post<CreateTopUpResponses, CreateTopUpErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/billing/top-ups',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Get the wallet\n *\n * The prepaid balance in full: ledger, pending mention charges and the effective balance the stop rule reads, the daily burn and the days it buys, how many keywords run and how many the wallet paused, what a day costs and what a resume needs, the welcome credit, the newest top-up, the top-up bounds and the auto-recharge settings. `GET /v1/usage` is the short form.\n */\nexport const getWallet = <ThrowOnError extends boolean = false>(options?: Options<GetWalletData, ThrowOnError>): RequestResult<GetWalletResponses, GetWalletErrors, ThrowOnError> => (options?.client ?? client).get<GetWalletResponses, GetWalletErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/billing/wallet',\n ...options\n});\n\n/**\n * List ledger entries\n *\n * Every movement of the balance, newest first: the welcome credit, top-ups, refunds, the daily keyword-day and mention debits, adjustments. A debit row carries the UTC day it settled and the cumulative units behind it. Cursor paged.\n */\nexport const listLedger = <ThrowOnError extends boolean = false>(options?: Options<ListLedgerData, ThrowOnError>): RequestResult<ListLedgerResponses, ListLedgerErrors, ThrowOnError> => (options?.client ?? client).get<ListLedgerResponses, ListLedgerErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/billing/ledger',\n ...options\n});\n\n/**\n * List receipts\n *\n * The orders behind the top-ups, newest first, as the merchant of record (Polar) holds them: this workspace's share of the billing customer's newest 100 orders. Empty before the first top-up.\n */\nexport const listInvoices = <ThrowOnError extends boolean = false>(options?: Options<ListInvoicesData, ThrowOnError>): RequestResult<ListInvoicesResponses, ListInvoicesErrors, ThrowOnError> => (options?.client ?? client).get<ListInvoicesResponses, ListInvoicesErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/billing/invoices',\n ...options\n});\n\n/**\n * Get a receipt link\n *\n * A short-lived link to the receipt PDF of one paid order (an id from the receipts list).\n */\nexport const getInvoiceUrl = <ThrowOnError extends boolean = false>(options: Options<GetInvoiceUrlData, ThrowOnError>): RequestResult<GetInvoiceUrlResponses, GetInvoiceUrlErrors, ThrowOnError> => (options.client ?? client).get<GetInvoiceUrlResponses, GetInvoiceUrlErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/billing/invoices/{id}/url',\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 *\n * A rule (what to watch, the filter) times channels. mode instant sends each matching mention as it happens; hourly sends one digest every UTC hour (five minutes past) for the previous full hour, nothing when it had no mention over the rule's floor, to Slack, Telegram and webhook channels only (no schedule); daily sends one digest at schedule.hour in schedule.timezone; weekly sends one a week on schedule.weekday (0 Sunday to 6 Saturday). filter.anyOf adds OR: groups of conditions in the vocabulary of the mentions list, at least one of which must hold on top of the rest of the filter.\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 * Reviews: stars over a window, per review page\n *\n * The reviews a keyword collects (App Store, Google Play, Trustpilot, Google Maps): count, average stars, distribution, replies and open 1-2 star reviews, for the workspace and per review page with a series of average stars per `bucket`, plus the tags the unhappy reviews carry. A review matched by two keywords counts once. 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 getReviewsReport = <ThrowOnError extends boolean = false>(options?: Options<GetReviewsReportData, ThrowOnError>): RequestResult<GetReviewsReportResponses, GetReviewsReportErrors, ThrowOnError> => (options?.client ?? client).get<GetReviewsReportResponses, GetReviewsReportErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/analytics/reviews',\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,O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AQ,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;;;AEx7BM,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, CreateGroupData, CreateGroupErrors, CreateGroupResponses, CreateInvitationData, CreateInvitationErrors, CreateInvitationResponses, CreateKeywordData, CreateKeywordErrors, CreateKeywordResponses, CreateSegmentData, CreateSegmentErrors, CreateSegmentResponses, CreateTopUpData, CreateTopUpErrors, CreateTopUpResponses, CreateViewData, CreateViewErrors, CreateViewResponses, DeleteAlertData, DeleteAlertErrors, DeleteAlertResponses, DeleteChannelData, DeleteChannelErrors, DeleteChannelResponses, DeleteGroupData, DeleteGroupErrors, DeleteGroupResponses, DeleteKeywordData, DeleteKeywordErrors, DeleteKeywordResponses, DeletePersonActivityData, DeletePersonActivityErrors, DeletePersonActivityResponses, DeleteSegmentData, DeleteSegmentErrors, DeleteSegmentResponses, DeleteViewData, DeleteViewErrors, DeleteViewResponses, DismissAttentionData, DismissAttentionErrors, DismissAttentionResponses, DuplicateKeywordData, DuplicateKeywordErrors, DuplicateKeywordResponses, ExportMentionsCsvData, ExportMentionsCsvErrors, ExportMentionsCsvResponses, ExportMentionsJsonData, ExportMentionsJsonErrors, ExportMentionsJsonResponses, ExportPeopleCsvData, ExportPeopleCsvErrors, ExportPeopleCsvResponses, GetAlertData, GetAlertErrors, GetAlertResponses, GetAnalyticsBreakdownData, GetAnalyticsBreakdownErrors, GetAnalyticsBreakdownResponses, GetAnalyticsSeriesData, GetAnalyticsSeriesErrors, GetAnalyticsSeriesResponses, GetAnalyticsSummaryData, GetAnalyticsSummaryErrors, GetAnalyticsSummaryResponses, GetChannelData, GetChannelErrors, GetChannelResponses, GetCompanyData, GetCompanyErrors, GetCompanyResponses, GetFiltersData, GetFiltersErrors, GetFiltersResponses, GetGroupData, GetGroupErrors, GetGroupResponses, GetHealthData, GetHealthResponses, GetInvoiceUrlData, GetInvoiceUrlErrors, GetInvoiceUrlResponses, GetKeywordData, GetKeywordErrors, GetKeywordHealthData, GetKeywordHealthErrors, GetKeywordHealthResponses, GetKeywordResponses, GetMentionData, GetMentionErrors, GetMentionResponses, GetPersonData, GetPersonErrors, GetPersonResponses, GetReviewsReportData, GetReviewsReportErrors, GetReviewsReportResponses, GetSegmentData, GetSegmentErrors, GetSegmentResponses, GetShareOfVoiceData, GetShareOfVoiceErrors, GetShareOfVoiceResponses, GetUsageBreakdownData, GetUsageBreakdownErrors, GetUsageBreakdownResponses, GetUsageData, GetUsageErrors, GetUsageResponses, GetViewData, GetViewErrors, GetViewResponses, GetWalletData, GetWalletErrors, GetWalletResponses, ListAlertsData, ListAlertsErrors, ListAlertsResponses, ListApiKeysData, ListApiKeysErrors, ListApiKeysResponses, ListAttentionData, ListAttentionErrors, ListAttentionResponses, ListChannelDeliveriesData, ListChannelDeliveriesErrors, ListChannelDeliveriesResponses, ListChannelsData, ListChannelsErrors, ListChannelsResponses, ListGroupsData, ListGroupsErrors, ListGroupsResponses, ListInvitationsData, ListInvitationsErrors, ListInvitationsResponses, ListInvoicesData, ListInvoicesErrors, ListInvoicesResponses, ListKeywordsData, ListKeywordsErrors, ListKeywordsResponses, ListLedgerData, ListLedgerErrors, ListLedgerResponses, ListMembersData, ListMembersErrors, ListMembersResponses, ListMentionCommentsData, ListMentionCommentsErrors, ListMentionCommentsResponses, ListPeopleData, ListPeopleErrors, ListPeopleResponses, ListPersonActivitiesData, ListPersonActivitiesErrors, ListPersonActivitiesResponses, ListSegmentsData, ListSegmentsErrors, ListSegmentsResponses, ListViewsData, ListViewsErrors, ListViewsResponses, LogPersonActivityData, LogPersonActivityErrors, LogPersonActivityResponses, MergePeopleData, MergePeopleErrors, MergePeopleResponses, MuteAlertAuthorsData, MuteAlertAuthorsErrors, MuteAlertAuthorsResponses, RemoveMemberData, RemoveMemberErrors, RemoveMemberResponses, RevokeApiKeyData, RevokeApiKeyErrors, RevokeApiKeyResponses, RevokeInvitationData, RevokeInvitationErrors, RevokeInvitationResponses, 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, UpdateFiltersData, UpdateFiltersErrors, UpdateFiltersResponses, UpdateGroupData, UpdateGroupErrors, UpdateGroupResponses, UpdateKeywordData, UpdateKeywordErrors, UpdateKeywordResponses, UpdateMentionData, UpdateMentionErrors, UpdateMentionResponses, UpdatePersonData, UpdatePersonErrors, UpdatePersonResponses, UpdateSegmentData, UpdateSegmentErrors, UpdateSegmentResponses, UpdateViewData, UpdateViewErrors, UpdateViewResponses, WhoamiData, WhoamiErrors, WhoamiResponses } 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 * The keywords of the workspace with their match stats and poll health. Without parameters: every keyword, newest first. `q` searches the term and the context; `kind`, `status` and `platform` narrow the list; `sort` orders it; `limit` and `offset` page it. `total` counts the keywords that matched before paging.\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. `matching` narrows what the term matches (required and excluded terms, excluded authors, case, subreddits, GitHub repository events) before a mention is stored, so a rejected post is never billed; `context` is a sentence the classifier reads for this keyword only. `cap` puts a monthly ceiling on its matched mentions: at the cap it stops matching until the first of the next month (UTC) or until the cap is raised, while its daily keyword charge continues.\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 * Rename it (`term`: the new term is tracked from now on, with no look-back; the mentions the old term found stay), mute or unmute it, reclassify it (`kind`), change the platforms it is tracked on, its classifier `context`, its `matching` rules (each rule field optional; an empty list clears one), or its monthly mention `cap` (null removes it; a cap above this month's count resumes a capped keyword at once). Rules apply to new mentions from the next poll; stored mentions are untouched.\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 keyword's health\n *\n * Whether the keyword earns what it costs over a trailing window (`range`, default 30d): a status (healthy, noisy, quiet, capped, paused, new) with the reasons in plain words, its numbers by platform and week, what it cost, the words and authors its noise is made of, and suggestions. Each suggestion carries a `patch` to send to PATCH /v1/keywords/{id} as is, and the effect it would have had, measured by running the matcher's own rules over the window's posts. `ai=true` adds a context rewritten by a language model (cached a day, at most 20 model calls an hour per workspace). Read only and never billed; the report is cached for 5 minutes, and a change to the keyword starts a fresh one. At most 30 reads a minute per workspace.\n */\nexport const getKeywordHealth = <ThrowOnError extends boolean = false>(options: Options<GetKeywordHealthData, ThrowOnError>): RequestResult<GetKeywordHealthResponses, GetKeywordHealthErrors, ThrowOnError> => (options.client ?? client).get<GetKeywordHealthResponses, GetKeywordHealthErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords/{id}/health',\n ...options\n});\n\n/**\n * Duplicate a keyword\n *\n * A new keyword with this one's settings and a new `term` (or the same term in another group): its kind, platforms, context, every matching rule, its monthly mention cap and its comments setting. Review apps and feeds are copied only when listed in `include`. It is a new keyword: $5 per month, and the newest posts of the last 30 days come in at once, as with any new keyword.\n */\nexport const duplicateKeyword = <ThrowOnError extends boolean = false>(options: Options<DuplicateKeywordData, ThrowOnError>): RequestResult<DuplicateKeywordResponses, DuplicateKeywordErrors, ThrowOnError> => (options.client ?? client).post<DuplicateKeywordResponses, DuplicateKeywordErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/keywords/{id}/duplicate',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Get the workspace filters\n *\n * The noise rules applied to every keyword before a mention is stored: excluded terms and authors, excluded GitHub repositories, and the subreddits Reddit posts may (or may not) come from. A post they reject is never classified, delivered or billed. Keyword-level rules live on each keyword (`matching`); both apply.\n */\nexport const getFilters = <ThrowOnError extends boolean = false>(options?: Options<GetFiltersData, ThrowOnError>): RequestResult<GetFiltersResponses, GetFiltersErrors, ThrowOnError> => (options?.client ?? client).get<GetFiltersResponses, GetFiltersErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/filters',\n ...options\n});\n\n/**\n * Update the workspace filters\n *\n * Replace any of the lists; an omitted list is untouched and an empty one clears it. Entries are stored in canonical form (terms lowercased, authors as profile links or bare names, repositories as owner/name, subreddits without r/). Takes effect on new mentions within a minute; stored mentions are untouched.\n */\nexport const updateFilters = <ThrowOnError extends boolean = false>(options: Options<UpdateFiltersData, ThrowOnError>): RequestResult<UpdateFiltersResponses, UpdateFiltersErrors, ThrowOnError> => (options.client ?? client).patch<UpdateFiltersResponses, UpdateFiltersErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/filters',\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, leave an internal note, or correct the classifier: `relevant` true or false is your verdict (relevance becomes 100 or 0, and every list, filter, digest and report follows it), `sentiment` replaces the label; null withdraws a verdict and restores the classifier's value. 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. alertId applies an alert rule's filter on top of the others: the same mentions that rule would send. anyOf adds OR: URL-encoded JSON groups of conditions, at least one of which must hold on top of every other filter.\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), language, confidence, status, relevant, delivered, url, links (pipe-separated), text (first 1,000 characters), group, group_external_id, rating and app_id (app store reviews only), title and image_url (where the platform has them), duplicate_of (the mention a cross-post copies; the CSV keeps one row per mention, copies included, so it adds up to the bill), kind (post, comment or repository), parent_url (the post a comment answers), comments (comments of it delivered to you), subreddit and flair (Reddit only). 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 * List the comments of a mention\n *\n * The comments under a mention's post, newest first: every comment in the thread, whether or not it names your keyword. Read once, about a day after the post, for mentions scored relevant whose keyword has comments enabled (keywords.comments), on Hacker News, Bluesky, GitHub, Stack Overflow, DEV, YouTube and Reddit; empty before that and for other keywords. Each comment delivered costs $0.008 on the comments line of the bill, once per workspace. A comment that itself names one of your keywords is also a mention: `mentionId` links it. Two mentions of one post (two keywords) list the same thread.\n */\nexport const listMentionComments = <ThrowOnError extends boolean = false>(options: Options<ListMentionCommentsData, ThrowOnError>): RequestResult<ListMentionCommentsResponses, ListMentionCommentsErrors, ThrowOnError> => (options.client ?? client).get<ListMentionCommentsResponses, ListMentionCommentsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions/{id}/comments',\n ...options\n});\n\n/**\n * Export mentions as JSON\n *\n * The same mentions GET /v1/mentions would list for these filters, in one response, newest matched first (the order they entered your feed): every row is the full Mention object the list returns, text included. Capped at 10,000 mentions; `truncated` (and the X-Mentions-Truncated header) says when the cap cut the list. Shares the CSV export's limit: at most 6 exports per minute per workspace, either format; a 429 carries Retry-After.\n */\nexport const exportMentionsJson = <ThrowOnError extends boolean = false>(options?: Options<ExportMentionsJsonData, ThrowOnError>): RequestResult<ExportMentionsJsonResponses, ExportMentionsJsonErrors, ThrowOnError> => (options?.client ?? client).get<ExportMentionsJsonResponses, ExportMentionsJsonErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/mentions/export.json',\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, then outreach stage, owner and last contacted. Capped at 5,000 people. `groupId` scopes the export like the list. 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, your annotations and where your outreach stands. Filter by platform, tag, follower range, mention counts, intents seen, keyword kinds mentioned or never mentioned, outreach stage, owner, automated (bot accounts, whose matched posts are mostly machine-made), or a saved segment. Offset-paginated with a total. With `groupId`, only the people who mentioned that keyword group's keywords, counted over those mentions, with that group's own annotations, merges, outreach and segments.\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. With `groupId`, the call works inside that keyword group: its people, and its own tags, notes, merges and activities, apart from the workspace's and from every other group's.\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, mute, and the outreach owner (a workspace member; null clears) and stage, for your workspace only. Mute hides their posts from your feed and every channel; ingest and billing never change. With `groupId` the annotations are that keyword group's own; `muted` is not supported there yet and is a 400.\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, notes and outreach activities combine under the person named by `into`, which keeps its owner and stage unless it had none. With `groupId`, the call works inside that keyword group: its people, and its own tags, notes, merges and activities, apart from the workspace's and from every other group's.\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. With `groupId`, the call works inside that keyword group: its people, and its own tags, notes, merges and activities, apart from the workspace's and from every other group's.\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 outreach activities\n *\n * Every logged contact with this person across all their accounts, newest first (at most 200): who reached out, the channel, when, and a short note. Read it before reaching out so two teammates never contact the same person without knowing. With `groupId`, the call works inside that keyword group: its people, and its own tags, notes, merges and activities, apart from the workspace's and from every other group's.\n */\nexport const listPersonActivities = <ThrowOnError extends boolean = false>(options: Options<ListPersonActivitiesData, ThrowOnError>): RequestResult<ListPersonActivitiesResponses, ListPersonActivitiesErrors, ThrowOnError> => (options.client ?? client).get<ListPersonActivitiesResponses, ListPersonActivitiesErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}/activities',\n ...options\n});\n\n/**\n * Log an outreach activity\n *\n * Record that a teammate reached out to this person: an email, a DM, a call. The first activity claims an unowned person for whoever reached out and moves not_contacted to contacted; an existing owner and a later stage are kept. `memberId` defaults to the signed-in member; an API key that omits it logs an unattributed activity, which claims nobody. With `groupId`, the call works inside that keyword group: its people, and its own tags, notes, merges and activities, apart from the workspace's and from every other group's.\n */\nexport const logPersonActivity = <ThrowOnError extends boolean = false>(options: Options<LogPersonActivityData, ThrowOnError>): RequestResult<LogPersonActivityResponses, LogPersonActivityErrors, ThrowOnError> => (options.client ?? client).post<LogPersonActivityResponses, LogPersonActivityErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}/activities',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete an outreach activity\n *\n * Remove a contact logged by mistake. The person's owner and stage stay as they are. With `groupId`, the call works inside that keyword group: its people, and its own tags, notes, merges and activities, apart from the workspace's and from every other group's.\n */\nexport const deletePersonActivity = <ThrowOnError extends boolean = false>(options: Options<DeletePersonActivityData, ThrowOnError>): RequestResult<DeletePersonActivityResponses, DeletePersonActivityErrors, ThrowOnError> => (options.client ?? client).delete<DeletePersonActivityResponses, DeletePersonActivityErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/people/{id}/activities/{activityId}',\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. With `groupId`, that keyword group's own segments, counted over its own people; without it, the workspace's. A segment belongs to one scope and is not visible from another.\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 *\n * Save a named filter over your people. With `groupId` the segment belongs to that keyword group: it is listed, counted and changed only there, and its name only has to be unique in the group.\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. Pass the `groupId` the segment was saved in.\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 *\n * One segment of the scope the call names: the workspace, or the keyword group in `groupId`. A segment saved in another scope is a 404.\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 *\n * Only the fields sent change. Pass the `groupId` the segment was saved in; a segment cannot move between scopes.\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 * List views\n *\n * The saved views of the workspace, oldest first. A view is a named filter over mentions: pass its id as `viewId` to GET /v1/mentions or the export to read exactly what it selects.\n */\nexport const listViews = <ThrowOnError extends boolean = false>(options?: Options<ListViewsData, ThrowOnError>): RequestResult<ListViewsResponses, ListViewsErrors, ThrowOnError> => (options?.client ?? client).get<ListViewsResponses, ListViewsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/views',\n ...options\n});\n\n/**\n * Save a view\n *\n * Save a named filter over mentions. The filter takes the same fields as GET /v1/mentions (lists are any-of, `not` lists none-of, every condition ANDed), plus `anyOf`, groups of those conditions of which at least one must hold; an empty filter is every mention. Nothing is materialized: the view selects whatever matches when it is read.\n */\nexport const createView = <ThrowOnError extends boolean = false>(options: Options<CreateViewData, ThrowOnError>): RequestResult<CreateViewResponses, CreateViewErrors, ThrowOnError> => (options.client ?? client).post<CreateViewResponses, CreateViewErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/views',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a view\n *\n * Removes the view. No mention is affected.\n */\nexport const deleteView = <ThrowOnError extends boolean = false>(options: Options<DeleteViewData, ThrowOnError>): RequestResult<DeleteViewResponses, DeleteViewErrors, ThrowOnError> => (options.client ?? client).delete<DeleteViewResponses, DeleteViewErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/views/{id}',\n ...options\n});\n\n/**\n * Get a view\n */\nexport const getView = <ThrowOnError extends boolean = false>(options: Options<GetViewData, ThrowOnError>): RequestResult<GetViewResponses, GetViewErrors, ThrowOnError> => (options.client ?? client).get<GetViewResponses, GetViewErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/views/{id}',\n ...options\n});\n\n/**\n * Update a view\n *\n * Rename, describe or refilter a view. `filter` replaces the whole filter.\n */\nexport const updateView = <ThrowOnError extends boolean = false>(options: Options<UpdateViewData, ThrowOnError>): RequestResult<UpdateViewResponses, UpdateViewErrors, ThrowOnError> => (options.client ?? client).patch<UpdateViewResponses, UpdateViewErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/views/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List attention items\n *\n * What needs a person, newest first: a keyword whose mentions spiked in the last hour (mention.spike), whose negative share of the last 24 hours jumped (sentiment.negative_spike), that turned noisy (keyword.noisy), or a channel whose last sends all failed (channel.failing). Detected once an hour; an item opens when its condition starts and resolves on its own when the condition is gone. Open items by default; `status=all` reads the history. Each opening is also an account event of the same name, which webhook, Slack, email and Telegram channels can subscribe to.\n */\nexport const listAttention = <ThrowOnError extends boolean = false>(options?: Options<ListAttentionData, ThrowOnError>): RequestResult<ListAttentionResponses, ListAttentionErrors, ThrowOnError> => (options?.client ?? client).get<ListAttentionResponses, ListAttentionErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/attention',\n ...options\n});\n\n/**\n * Dismiss an attention item\n *\n * Put an item away. It leaves the open list and does not come back while its condition lasts; once the condition clears, a new episode may open a new item. Idempotent.\n */\nexport const dismissAttention = <ThrowOnError extends boolean = false>(options: Options<DismissAttentionData, ThrowOnError>): RequestResult<DismissAttentionResponses, DismissAttentionErrors, ThrowOnError> => (options.client ?? client).post<DismissAttentionResponses, DismissAttentionErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/attention/{id}/dismiss',\n ...options\n});\n\n/**\n * List groups\n *\n * The keyword groups of the workspace, the default group first, then oldest first. A group is how keywords are grouped (a customer, a campaign, a product): a term may be tracked once per group, every keyword belongs to one, and GET /v1/usage/breakdown?by=group says what each group cost. Pass `externalId` to find the group carrying your own id.\n */\nexport const listGroups = <ThrowOnError extends boolean = false>(options?: Options<ListGroupsData, ThrowOnError>): RequestResult<ListGroupsResponses, ListGroupsErrors, ThrowOnError> => (options?.client ?? client).get<ListGroupsResponses, ListGroupsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/groups',\n ...options\n});\n\n/**\n * Create a group\n *\n * Create a keyword group. `name` is unique per workspace; `externalId` (optional, unique too) is your own id for it, a customer id say, so you can find it again without storing ours; `context` (optional) is the group's own company description, which the classifier reads in place of the whole workspace profile for the group's keywords. Then pass the group id as `groupId` when creating a keyword.\n */\nexport const createGroup = <ThrowOnError extends boolean = false>(options: Options<CreateGroupData, ThrowOnError>): RequestResult<CreateGroupResponses, CreateGroupErrors, ThrowOnError> => (options.client ?? client).post<CreateGroupResponses, CreateGroupErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/groups',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a group and its keywords\n *\n * Deletes the group and EVERY keyword in it, each the way DELETE /v1/keywords/{id} does (its mentions go with it, alert rules that named it are adjusted; charges already made stay on the usage record). Read the group first: `stats.keywords` says how many go. The default group cannot be deleted: move or delete its keywords instead.\n */\nexport const deleteGroup = <ThrowOnError extends boolean = false>(options: Options<DeleteGroupData, ThrowOnError>): RequestResult<DeleteGroupResponses, DeleteGroupErrors, ThrowOnError> => (options.client ?? client).delete<DeleteGroupResponses, DeleteGroupErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/groups/{id}',\n ...options\n});\n\n/**\n * Get a group\n */\nexport const getGroup = <ThrowOnError extends boolean = false>(options: Options<GetGroupData, ThrowOnError>): RequestResult<GetGroupResponses, GetGroupErrors, ThrowOnError> => (options.client ?? client).get<GetGroupResponses, GetGroupErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/groups/{id}',\n ...options\n});\n\n/**\n * Update a group\n *\n * Rename a group, change your id for it (`externalId`, null clears) or its company description (`context`, null clears: the workspace profile applies again; new mentions are judged with it at once, old ones are not rescored). The default group can be renamed like any other but takes no description: it is the workspace itself and reads the company profile.\n */\nexport const updateGroup = <ThrowOnError extends boolean = false>(options: Options<UpdateGroupData, ThrowOnError>): RequestResult<UpdateGroupResponses, UpdateGroupErrors, ThrowOnError> => (options.client ?? client).patch<UpdateGroupResponses, UpdateGroupErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/groups/{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. `expiresAt` makes it stop working at an instant (a key for a contractor or a one-off script); it stays listed until revoked.\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 * Introspect the credential\n *\n * The workspace this credential acts on, how the request authenticated (an API key, an OAuth access token from an MCP sign-in, or the dashboard session), whether it may write, and for a key its id and expiry. Run it first: a read key answers 403 read_only_key on every write, and a wrong workspace is the classic scripting mistake.\n */\nexport const whoami = <ThrowOnError extends boolean = false>(options?: Options<WhoamiData, ThrowOnError>): RequestResult<WhoamiResponses, WhoamiErrors, ThrowOnError> => (options?.client ?? client).get<WhoamiResponses, WhoamiErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/whoami',\n ...options\n});\n\n/**\n * List members\n *\n * Everyone in the workspace, owners first. `userId` is what a mention's assigneeId and a person's ownerId take.\n */\nexport const listMembers = <ThrowOnError extends boolean = false>(options?: Options<ListMembersData, ThrowOnError>): RequestResult<ListMembersResponses, ListMembersErrors, ThrowOnError> => (options?.client ?? client).get<ListMembersResponses, ListMembersErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/members',\n ...options\n});\n\n/**\n * List pending invitations\n *\n * Invitations sent and not yet accepted, declined or expired. An accepted one appears in GET /v1/members instead.\n */\nexport const listInvitations = <ThrowOnError extends boolean = false>(options?: Options<ListInvitationsData, ThrowOnError>): RequestResult<ListInvitationsResponses, ListInvitationsErrors, ThrowOnError> => (options?.client ?? client).get<ListInvitationsResponses, ListInvitationsErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/members/invitations',\n ...options\n});\n\n/**\n * Invite a member\n *\n * Send an email invitation to join the workspace as admin or member; it expires after 48 hours. Idempotent: an address that already holds an open invitation gets it back with 200 and no second email. An address that is already a member is a 409 already_member. Team changes need a signed-in owner or admin (an OAuth token from an MCP sign-in, or the dashboard session): an API key answers 403.\n */\nexport const createInvitation = <ThrowOnError extends boolean = false>(options: Options<CreateInvitationData, ThrowOnError>): RequestResult<CreateInvitationResponses, CreateInvitationErrors, ThrowOnError> => (options.client ?? client).post<CreateInvitationResponses, CreateInvitationErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/members/invitations',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Revoke an invitation\n *\n * The link in the email stops working at once. Needs a signed-in owner or admin; an API key answers 403.\n */\nexport const revokeInvitation = <ThrowOnError extends boolean = false>(options: Options<RevokeInvitationData, ThrowOnError>): RequestResult<RevokeInvitationResponses, RevokeInvitationErrors, ThrowOnError> => (options.client ?? client).delete<RevokeInvitationResponses, RevokeInvitationErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/members/invitations/{id}',\n ...options\n});\n\n/**\n * Remove a member\n *\n * The person loses the workspace within a minute (their dashboard session on the next request, an OAuth token when its short cache lapses). Their mentions, notes and outreach stay. Needs a signed-in owner or admin; only an owner removes another owner, and the last owner cannot be removed (409 last_owner).\n */\nexport const removeMember = <ThrowOnError extends boolean = false>(options: Options<RemoveMemberData, ThrowOnError>): RequestResult<RemoveMemberResponses, RemoveMemberErrors, ThrowOnError> => (options.client ?? client).delete<RemoveMemberResponses, RemoveMemberErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/members/{id}',\n ...options\n});\n\n/**\n * Get usage and balance\n *\n * The prepaid balance (ledger, pending mention charges, and the effective balance the stop rule reads), the daily burn and the days it buys, the keywords the wallet runs and pauses, the matches recorded today and over 30 days, and whether tracking is stopped or the balance is low. Every matched mention bills ($0.008), relevant or not; every active keyword bills $5 a month, charged daily.\n */\nexport const getUsage = <ThrowOnError extends boolean = false>(options?: Options<GetUsageData, ThrowOnError>): RequestResult<GetUsageResponses, GetUsageErrors, ThrowOnError> => (options?.client ?? client).get<GetUsageResponses, GetUsageErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/usage',\n ...options\n});\n\n/**\n * Get the usage breakdown\n *\n * What the workspace consumed and was charged over a window, grouped by one dimension per call (`by`: day, platform or keyword), in USD cents at list price, with the window's totals on every call. `range` reads a trailing window of UTC days ending today (default 30d); `month` reads one calendar month (YYYY-MM), the shape a bill or a per-customer margin is reconciled against. Keyword-days come from the daily tick and mention charges from the matches that billed, so a deleted keyword keeps its charges in the keyword rows (`keyword.removed`) while its mention counts read 0; the same numbers ride on each keyword as `stats.cost` for the running month. `totals.ledgerDebitCents` is what the wallet has debited so far for the window's days: mentions settle the morning after their day, so a window ending today lags `totals.totalCents` by the unsettled ones, and a closed month differs from it only by cumulative rounding. Rows are paged (`limit`, `offset`, `total`); a workspace may read this at most 30 times a minute through its keys and tokens together.\n */\nexport const getUsageBreakdown = <ThrowOnError extends boolean = false>(options?: Options<GetUsageBreakdownData, ThrowOnError>): RequestResult<GetUsageBreakdownResponses, GetUsageBreakdownErrors, ThrowOnError> => (options?.client ?? client).get<GetUsageBreakdownResponses, GetUsageBreakdownErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/usage/breakdown',\n ...options\n});\n\n/**\n * Create a top-up checkout\n *\n * Returns a hosted checkout URL with `amountCents` prefilled (editable there, $20 to $5,000). The balance is credited when the payment lands, within a minute, and tracking the wallet had paused resumes at once. Nothing is charged by this call itself. `successUrl` must be on an origin this deployment trusts; omit it for the dashboard's billing page.\n */\nexport const createTopUp = <ThrowOnError extends boolean = false>(options: Options<CreateTopUpData, ThrowOnError>): RequestResult<CreateTopUpResponses, CreateTopUpErrors, ThrowOnError> => (options.client ?? client).post<CreateTopUpResponses, CreateTopUpErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/billing/top-ups',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Get the wallet\n *\n * The prepaid balance in full: ledger, pending mention charges and the effective balance the stop rule reads, the daily burn and the days it buys, how many keywords run and how many the wallet paused, what a day costs and what a resume needs, the welcome credit, the newest top-up, the top-up bounds and the auto-recharge settings. `GET /v1/usage` is the short form.\n */\nexport const getWallet = <ThrowOnError extends boolean = false>(options?: Options<GetWalletData, ThrowOnError>): RequestResult<GetWalletResponses, GetWalletErrors, ThrowOnError> => (options?.client ?? client).get<GetWalletResponses, GetWalletErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/billing/wallet',\n ...options\n});\n\n/**\n * List ledger entries\n *\n * Every movement of the balance, newest first: the welcome credit, top-ups, refunds, the daily keyword-day and mention debits, adjustments. A debit row carries the UTC day it settled and the cumulative units behind it. Cursor paged.\n */\nexport const listLedger = <ThrowOnError extends boolean = false>(options?: Options<ListLedgerData, ThrowOnError>): RequestResult<ListLedgerResponses, ListLedgerErrors, ThrowOnError> => (options?.client ?? client).get<ListLedgerResponses, ListLedgerErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/billing/ledger',\n ...options\n});\n\n/**\n * List receipts\n *\n * The orders behind the top-ups, newest first, as the merchant of record (Polar) holds them: this workspace's share of the billing customer's newest 100 orders. Empty before the first top-up.\n */\nexport const listInvoices = <ThrowOnError extends boolean = false>(options?: Options<ListInvoicesData, ThrowOnError>): RequestResult<ListInvoicesResponses, ListInvoicesErrors, ThrowOnError> => (options?.client ?? client).get<ListInvoicesResponses, ListInvoicesErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/billing/invoices',\n ...options\n});\n\n/**\n * Get a receipt link\n *\n * A short-lived link to the receipt PDF of one paid order (an id from the receipts list).\n */\nexport const getInvoiceUrl = <ThrowOnError extends boolean = false>(options: Options<GetInvoiceUrlData, ThrowOnError>): RequestResult<GetInvoiceUrlResponses, GetInvoiceUrlErrors, ThrowOnError> => (options.client ?? client).get<GetInvoiceUrlResponses, GetInvoiceUrlErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/billing/invoices/{id}/url',\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 *\n * A rule (what to watch, the filter) times channels. mode instant sends each matching mention as it happens; hourly sends one digest every UTC hour (five minutes past) for the previous full hour, nothing when it had no mention over the rule's floor, to Slack, Telegram and webhook channels only (no schedule); daily sends one digest at schedule.hour in schedule.timezone; weekly sends one a week on schedule.weekday (0 Sunday to 6 Saturday). filter.anyOf adds OR: groups of conditions in the vocabulary of the mentions list, at least one of which must hold on top of the rest of the filter.\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 * Reviews: stars over a window, per review page\n *\n * The reviews a keyword collects (App Store, Google Play, Trustpilot, Google Maps): count, average stars, distribution, replies and open 1-2 star reviews, for the workspace and per review page with a series of average stars per `bucket`, plus the tags the unhappy reviews carry. A review matched by two keywords counts once. 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 getReviewsReport = <ThrowOnError extends boolean = false>(options?: Options<GetReviewsReportData, ThrowOnError>): RequestResult<GetReviewsReportResponses, GetReviewsReportErrors, ThrowOnError> => (options?.client ?? client).get<GetReviewsReportResponses, GetReviewsReportErrors, ThrowOnError>({\n security: [{ scheme: 'bearer', type: 'http' }],\n url: '/v1/analytics/reviews',\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,OAAe,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,EAAE,CAAC;AAE7F,QAAM,eAAe,mBAAmB;AACtC,QAAI,aAAqB,wBAAwB;AACjD,QAAI,UAAU;AACd,UAAM,SAAS,QAAQ,UAAU,IAAI,gBAAgB,EAAE;AAEvD,WAAO,MAAM;AACX,UAAI,OAAO,QAAS;AAEpB;AAEA,YAAM,UACJ,QAAQ,mBAAmB,UACvB,QAAQ,UACR,IAAI,QAAQ,QAAQ,OAA6C;AAEvE,UAAI,gBAAgB,QAAW;AAC7B,gBAAQ,IAAI,iBAAiB,W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