@curviate/sdk 0.40.1 → 0.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +81 -0
- package/README.md +32 -2
- package/dist/index.d.ts +1848 -204
- package/dist/index.js +245 -18
- package/package.json +1 -1
- package/src/generated/types.ts +1470 -111
package/dist/index.d.ts
CHANGED
|
@@ -90,6 +90,15 @@ interface RequestArgs {
|
|
|
90
90
|
*/
|
|
91
91
|
query?: Record<string, string | number | boolean | string[] | undefined | null>;
|
|
92
92
|
body?: unknown;
|
|
93
|
+
/**
|
|
94
|
+
* A raw (non-JSON) request body with its own `Content-Type`, for the one
|
|
95
|
+
* route that takes a file as the body (`drafts.uploadAttachment`). Mutually
|
|
96
|
+
* exclusive with `body`.
|
|
97
|
+
*/
|
|
98
|
+
rawBody?: {
|
|
99
|
+
data: Blob | ArrayBuffer | Uint8Array;
|
|
100
|
+
contentType: string;
|
|
101
|
+
};
|
|
93
102
|
}
|
|
94
103
|
/** The bound caller a resource receives. */
|
|
95
104
|
type RequestFn = <T = unknown>(args: RequestArgs) => Promise<T>;
|
|
@@ -723,7 +732,7 @@ interface paths {
|
|
|
723
732
|
put?: never;
|
|
724
733
|
/**
|
|
725
734
|
* Search posts
|
|
726
|
-
* @description Searches LinkedIn posts using structured filters. To search from a pasted LinkedIn search URL instead, use POST .../search.
|
|
735
|
+
* @description Searches LinkedIn posts using structured filters. To search from a pasted LinkedIn search URL instead, use POST .../search. Returns text, counts, author and attachments; the text can repeat fragments around links, mentions and hashtags, so get the post by its id for the clean body.
|
|
727
736
|
*/
|
|
728
737
|
post: operations["postV1AccountIdSearchPosts"];
|
|
729
738
|
delete?: never;
|
|
@@ -1575,7 +1584,7 @@ interface paths {
|
|
|
1575
1584
|
put?: never;
|
|
1576
1585
|
/**
|
|
1577
1586
|
* Create a post
|
|
1578
|
-
* @description Publishes a post
|
|
1587
|
+
* @description Publishes a post now; JSON, files as base64. Text is never stored. A publish record (account, post id, time) is kept, listed by GET /v1/drafts?status=published and removed when the post is deleted. To publish later, create a Draft at POST /v1/drafts.
|
|
1579
1588
|
*/
|
|
1580
1589
|
post: operations["postV1AccountIdPosts"];
|
|
1581
1590
|
delete?: never;
|
|
@@ -1696,6 +1705,98 @@ interface paths {
|
|
|
1696
1705
|
patch?: never;
|
|
1697
1706
|
trace?: never;
|
|
1698
1707
|
};
|
|
1708
|
+
"/v1/drafts": {
|
|
1709
|
+
parameters: {
|
|
1710
|
+
query?: never;
|
|
1711
|
+
header?: never;
|
|
1712
|
+
path?: never;
|
|
1713
|
+
cookie?: never;
|
|
1714
|
+
};
|
|
1715
|
+
/**
|
|
1716
|
+
* List drafts
|
|
1717
|
+
* @description Lists your Drafts and, with status=published, publish records (account, post id, time; never Drafts). Filter by status, account (or none) and a [from, to) range on each item's own date.
|
|
1718
|
+
*/
|
|
1719
|
+
get: operations["getV1Drafts"];
|
|
1720
|
+
put?: never;
|
|
1721
|
+
/**
|
|
1722
|
+
* Create a draft
|
|
1723
|
+
* @description Stores an unpublished post until it is published or deleted. Every field is optional, the account too; a Draft has at most one account and can move between yours. Up to 50 Drafts and 2 GiB of media per account, and per no-account. A retry creates a second Draft.
|
|
1724
|
+
*/
|
|
1725
|
+
post: operations["postV1Drafts"];
|
|
1726
|
+
delete?: never;
|
|
1727
|
+
options?: never;
|
|
1728
|
+
head?: never;
|
|
1729
|
+
patch?: never;
|
|
1730
|
+
trace?: never;
|
|
1731
|
+
};
|
|
1732
|
+
"/v1/drafts/{id}": {
|
|
1733
|
+
parameters: {
|
|
1734
|
+
query?: never;
|
|
1735
|
+
header?: never;
|
|
1736
|
+
path?: never;
|
|
1737
|
+
cookie?: never;
|
|
1738
|
+
};
|
|
1739
|
+
/**
|
|
1740
|
+
* Retrieve a draft
|
|
1741
|
+
* @description Returns one Draft, with a fresh signed link (valid 1 hour) for each attachment.
|
|
1742
|
+
*/
|
|
1743
|
+
get: operations["getV1DraftsId"];
|
|
1744
|
+
put?: never;
|
|
1745
|
+
post?: never;
|
|
1746
|
+
/**
|
|
1747
|
+
* Delete a draft
|
|
1748
|
+
* @description Deletes the Draft and its stored media.
|
|
1749
|
+
*/
|
|
1750
|
+
delete: operations["deleteV1DraftsId"];
|
|
1751
|
+
options?: never;
|
|
1752
|
+
head?: never;
|
|
1753
|
+
/**
|
|
1754
|
+
* Update a draft
|
|
1755
|
+
* @description Partial update: an omitted field is left as is, null clears it. attachments replaces the whole list ({id} keeps an existing file, a base64 object adds one, anything left out is deleted). account_id moves the Draft to another of your accounts. Editing a failed Draft clears its failure.
|
|
1756
|
+
*/
|
|
1757
|
+
patch: operations["patchV1DraftsId"];
|
|
1758
|
+
trace?: never;
|
|
1759
|
+
};
|
|
1760
|
+
"/v1/drafts/{id}/publish": {
|
|
1761
|
+
parameters: {
|
|
1762
|
+
query?: never;
|
|
1763
|
+
header?: never;
|
|
1764
|
+
path?: never;
|
|
1765
|
+
cookie?: never;
|
|
1766
|
+
};
|
|
1767
|
+
get?: never;
|
|
1768
|
+
put?: never;
|
|
1769
|
+
/**
|
|
1770
|
+
* Publish a draft now
|
|
1771
|
+
* @description Publishes the Draft now, under the same rules as create post, safety limits included. Success deletes the Draft and its media, writes a publish record and returns the post id, no webhook. Failure leaves the Draft unchanged.
|
|
1772
|
+
*/
|
|
1773
|
+
post: operations["postV1DraftsIdPublish"];
|
|
1774
|
+
delete?: never;
|
|
1775
|
+
options?: never;
|
|
1776
|
+
head?: never;
|
|
1777
|
+
patch?: never;
|
|
1778
|
+
trace?: never;
|
|
1779
|
+
};
|
|
1780
|
+
"/v1/drafts/{id}/attachments": {
|
|
1781
|
+
parameters: {
|
|
1782
|
+
query?: never;
|
|
1783
|
+
header?: never;
|
|
1784
|
+
path?: never;
|
|
1785
|
+
cookie?: never;
|
|
1786
|
+
};
|
|
1787
|
+
get?: never;
|
|
1788
|
+
put?: never;
|
|
1789
|
+
/**
|
|
1790
|
+
* Upload a draft attachment
|
|
1791
|
+
* @description Adds one file to the Draft as the raw request body, for media too large to send inline: a video (MP4, up to 50 MiB), a PDF (up to 50 MiB) or an image. Content-Type is the file's type, Content-Length is required; kept only if it arrives whole. Same media rules as inline.
|
|
1792
|
+
*/
|
|
1793
|
+
post: operations["postV1DraftsIdAttachments"];
|
|
1794
|
+
delete?: never;
|
|
1795
|
+
options?: never;
|
|
1796
|
+
head?: never;
|
|
1797
|
+
patch?: never;
|
|
1798
|
+
trace?: never;
|
|
1799
|
+
};
|
|
1699
1800
|
"/v1/{account_id}/recruiter/profiles/{user_id}": {
|
|
1700
1801
|
parameters: {
|
|
1701
1802
|
query?: never;
|
|
@@ -2390,8 +2491,8 @@ interface paths {
|
|
|
2390
2491
|
options?: never;
|
|
2391
2492
|
head?: never;
|
|
2392
2493
|
/**
|
|
2393
|
-
* Update account metadata
|
|
2394
|
-
* @description Updates
|
|
2494
|
+
* Update an account's metadata or connection location
|
|
2495
|
+
* @description Updates metadata, external_id, the connection location (country) or your own proxy (null plus a country returns to a managed location). Returns the account; connection_location is re-read after a location change.
|
|
2395
2496
|
*/
|
|
2396
2497
|
patch: operations["patchV1AccountsAccountId"];
|
|
2397
2498
|
trace?: never;
|
|
@@ -2611,7 +2712,7 @@ interface paths {
|
|
|
2611
2712
|
put?: never;
|
|
2612
2713
|
/**
|
|
2613
2714
|
* Create a webhook
|
|
2614
|
-
* @description Registers a new webhook endpoint to receive real-time events. Choose a source (messaging / user / account_status) and supply the target URL. The HMAC signing secret is returned exactly once in the 201 response, store it securely.
|
|
2715
|
+
* @description Registers a new webhook endpoint to receive real-time events. Choose a source (messaging / user / account_status / post) and supply the target URL. The HMAC signing secret is returned exactly once in the 201 response, store it securely.
|
|
2615
2716
|
*/
|
|
2616
2717
|
post: operations["postV1Webhooks"];
|
|
2617
2718
|
delete?: never;
|
|
@@ -2629,7 +2730,7 @@ interface paths {
|
|
|
2629
2730
|
};
|
|
2630
2731
|
/**
|
|
2631
2732
|
* List webhook event types
|
|
2632
|
-
* @description Returns the complete canonical event catalogue (
|
|
2733
|
+
* @description Returns the complete canonical event catalogue (29 events) grouped by source: messaging (7), user (2), account_status (15), post (2), plus 3 recruiter/sales_nav events. A local catalogue read: no platform call is made.
|
|
2633
2734
|
*/
|
|
2634
2735
|
get: operations["getV1WebhooksEvents"];
|
|
2635
2736
|
put?: never;
|
|
@@ -2886,6 +2987,20 @@ interface components {
|
|
|
2886
2987
|
challenge_type?: string;
|
|
2887
2988
|
/** @description Present on ACCOUNT_ALREADY_LINKED: the id of your own existing account for this LinkedIn profile, so you can reuse it instead of linking again. Only ever an account of the calling tenant. */
|
|
2888
2989
|
account_id?: string;
|
|
2990
|
+
/** @description Present on CONNECTION_LOCATION_UNAVAILABLE after a location PATCH that did not land where asked: where the account connects from now (country, current_country, mode, strict), re-read after the change. */
|
|
2991
|
+
connection_location?: {
|
|
2992
|
+
/** @description Configured country (ISO 3166-1 alpha-2). */
|
|
2993
|
+
country?: string | null;
|
|
2994
|
+
/** @description Country of the connection in use now. */
|
|
2995
|
+
current_country?: string | null;
|
|
2996
|
+
/**
|
|
2997
|
+
* @description auto: managed. custom: your own proxy.
|
|
2998
|
+
* @enum {string|null}
|
|
2999
|
+
*/
|
|
3000
|
+
mode?: "auto" | "custom" | null;
|
|
3001
|
+
/** @description true: never connects from another country. */
|
|
3002
|
+
strict?: boolean | null;
|
|
3003
|
+
};
|
|
2889
3004
|
/** @description Present on RATE_LIMIT_ACCOUNT: the per-account request ceiling that was breached, with its name, the units remaining and total, and the absolute reset_time. Wait until reset_time before retrying. */
|
|
2890
3005
|
quota?: Record<string, never>;
|
|
2891
3006
|
/** @description Present on TOOLSET_DISABLED: the name of the toolset that is switched off for this tenant, so you can enable it or use another tool. */
|
|
@@ -6056,13 +6171,20 @@ interface operations {
|
|
|
6056
6171
|
id: string;
|
|
6057
6172
|
/** @description Shareable post URL. Present when available. */
|
|
6058
6173
|
share_url?: string;
|
|
6059
|
-
/** @description Post text content. Present when available. */
|
|
6174
|
+
/** @description Post text content. Present when available. Can repeat fragments around links, mentions and hashtags; get the post by its id for the clean body. */
|
|
6060
6175
|
text?: string;
|
|
6176
|
+
/** @description ISO-8601 UTC datetime the post was published, derived from the post's own activity identity (the same source as get-post's `created_at`). null when the result carries no activity identity to derive it from. */
|
|
6177
|
+
created_at: string | null;
|
|
6061
6178
|
/** @description Post author object. Present when available. */
|
|
6062
6179
|
author?: {
|
|
6063
6180
|
id?: string;
|
|
6181
|
+
/** @description Author's display name, on the shape that carries `name`. Read `name` when present, else `display_name`. */
|
|
6064
6182
|
name?: string | null;
|
|
6183
|
+
/** @description Author's display name, on the shape that carries `display_name` instead of `name`. */
|
|
6184
|
+
display_name?: string;
|
|
6065
6185
|
is_company?: boolean;
|
|
6186
|
+
/** @description Author entity type (for example individual or organization), on the shape that carries `display_name`. */
|
|
6187
|
+
type?: string;
|
|
6066
6188
|
public_identifier?: string | null;
|
|
6067
6189
|
} & {
|
|
6068
6190
|
[key: string]: unknown;
|
|
@@ -9144,13 +9266,20 @@ interface operations {
|
|
|
9144
9266
|
id: string;
|
|
9145
9267
|
/** @description Shareable post URL. Present when available. */
|
|
9146
9268
|
share_url?: string;
|
|
9147
|
-
/** @description Post text content. Present when available. */
|
|
9269
|
+
/** @description Post text content. Present when available. Can repeat fragments around links, mentions and hashtags; get the post by its id for the clean body. */
|
|
9148
9270
|
text?: string;
|
|
9271
|
+
/** @description ISO-8601 UTC datetime the post was published, derived from the post's own activity identity (the same source as get-post's `created_at`). null when the result carries no activity identity to derive it from. */
|
|
9272
|
+
created_at: string | null;
|
|
9149
9273
|
/** @description Post author object. Present when available. */
|
|
9150
9274
|
author?: {
|
|
9151
9275
|
id?: string;
|
|
9276
|
+
/** @description Author's display name, on the shape that carries `name`. Read `name` when present, else `display_name`. */
|
|
9152
9277
|
name?: string | null;
|
|
9278
|
+
/** @description Author's display name, on the shape that carries `display_name` instead of `name`. */
|
|
9279
|
+
display_name?: string;
|
|
9153
9280
|
is_company?: boolean;
|
|
9281
|
+
/** @description Author entity type (for example individual or organization), on the shape that carries `display_name`. */
|
|
9282
|
+
type?: string;
|
|
9154
9283
|
public_identifier?: string | null;
|
|
9155
9284
|
} & {
|
|
9156
9285
|
[key: string]: unknown;
|
|
@@ -9673,13 +9802,20 @@ interface operations {
|
|
|
9673
9802
|
id: string;
|
|
9674
9803
|
/** @description Shareable post URL. Present when available. */
|
|
9675
9804
|
share_url?: string;
|
|
9676
|
-
/** @description Post text content. Present when available. */
|
|
9805
|
+
/** @description Post text content. Present when available. Can repeat fragments around links, mentions and hashtags; get the post by its id for the clean body. */
|
|
9677
9806
|
text?: string;
|
|
9807
|
+
/** @description ISO-8601 UTC datetime the post was published, derived from the post's own activity identity (the same source as get-post's `created_at`). null when the result carries no activity identity to derive it from. */
|
|
9808
|
+
created_at: string | null;
|
|
9678
9809
|
/** @description Post author object. Present when available. */
|
|
9679
9810
|
author?: {
|
|
9680
9811
|
id?: string;
|
|
9812
|
+
/** @description Author's display name, on the shape that carries `name`. Read `name` when present, else `display_name`. */
|
|
9681
9813
|
name?: string | null;
|
|
9814
|
+
/** @description Author's display name, on the shape that carries `display_name` instead of `name`. */
|
|
9815
|
+
display_name?: string;
|
|
9682
9816
|
is_company?: boolean;
|
|
9817
|
+
/** @description Author entity type (for example individual or organization), on the shape that carries `display_name`. */
|
|
9818
|
+
type?: string;
|
|
9683
9819
|
public_identifier?: string | null;
|
|
9684
9820
|
} & {
|
|
9685
9821
|
[key: string]: unknown;
|
|
@@ -13000,7 +13136,7 @@ interface operations {
|
|
|
13000
13136
|
};
|
|
13001
13137
|
requestBody?: never;
|
|
13002
13138
|
responses: {
|
|
13003
|
-
/** @description The connected account's home feed as agent-actionable posts. `sort=recent` (default) resolves each post's activity id + author name + post URL + kind; `sort=relevant` resolves the full shape (text, engagement, author id-triple). An empty feed is a valid 200 (items:[], cursor:null). Page until cursor is null. */
|
|
13139
|
+
/** @description The connected account's home feed as agent-actionable posts. `sort=recent` (default) resolves each post's activity id + created_at + text + author name + post URL + kind, with engagement null; `sort=relevant` resolves the full shape (text, engagement, author id-triple). An empty feed is a valid 200 (items:[], cursor:null). Page until cursor is null. */
|
|
13004
13140
|
200: {
|
|
13005
13141
|
headers: {
|
|
13006
13142
|
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
@@ -13047,8 +13183,10 @@ interface operations {
|
|
|
13047
13183
|
/** @description Canonical profile URL. */
|
|
13048
13184
|
profile_url: string | null;
|
|
13049
13185
|
};
|
|
13050
|
-
/** @description Full post body, verbatim
|
|
13186
|
+
/** @description Full post body, verbatim, on both sorts. null when the post has no body. Pass-through, never stored. */
|
|
13051
13187
|
text: string | null;
|
|
13188
|
+
/** @description ISO-8601 UTC datetime the feed activity was created, derived from the activity id (the same source as get-post's `created_at`). Both sorts. For a reshare this is when the reshare was made. null when the id does not carry a time. */
|
|
13189
|
+
created_at: string | null;
|
|
13052
13190
|
/** @description Canonical post URL (recent). null on relevant. */
|
|
13053
13191
|
post_url: string | null;
|
|
13054
13192
|
/** @description Post type parsed from the URL slug: ugcPost | share | groupPost | activity | post (recent). Open enum. null on relevant. */
|
|
@@ -13064,14 +13202,14 @@ interface operations {
|
|
|
13064
13202
|
/** @description Original post body (pass-through; never stored). */
|
|
13065
13203
|
text: string | null;
|
|
13066
13204
|
} | null;
|
|
13067
|
-
/** @description Engagement counts.
|
|
13205
|
+
/** @description Engagement counts. Every count is null on recent, which cannot read them; use sort=relevant for counts. A null count is unknown, never zero. */
|
|
13068
13206
|
engagement: {
|
|
13069
|
-
/** @description Reaction count
|
|
13070
|
-
likes: number;
|
|
13071
|
-
/** @description Comment count
|
|
13072
|
-
comments: number;
|
|
13073
|
-
/** @description Reshare count
|
|
13074
|
-
shares: number;
|
|
13207
|
+
/** @description Reaction count, or null when the sort cannot read it. */
|
|
13208
|
+
likes: number | null;
|
|
13209
|
+
/** @description Comment count, or null when the sort cannot read it. */
|
|
13210
|
+
comments: number | null;
|
|
13211
|
+
/** @description Reshare count, or null when the sort cannot read it. */
|
|
13212
|
+
shares: number | null;
|
|
13075
13213
|
};
|
|
13076
13214
|
}[];
|
|
13077
13215
|
/** @description Opaque cursor for the next page; null when the walk is exhausted. Self-describing of the sort, pass it back verbatim as `cursor`. The relevant cursor expires (~1h). There is no total (an unbounded, reordering stream); page until cursor is null. */
|
|
@@ -18126,7 +18264,7 @@ interface operations {
|
|
|
18126
18264
|
title?: string | null;
|
|
18127
18265
|
/** @description Full post text (content pass-through, never stored). */
|
|
18128
18266
|
text?: string | null;
|
|
18129
|
-
/** @description ISO-8601 UTC datetime this post was
|
|
18267
|
+
/** @description ISO-8601 UTC datetime this post was published, or null when it cannot be told reliably. Derived from the post's own activity identity, so it does not change with the route you used to reach it. null when the post carries no activity identity of its own (often a video or image post), never a guess. For a repost this is when the repost was made, not when the post it reshares was. */
|
|
18130
18268
|
created_at?: string | null;
|
|
18131
18269
|
/** @description Total comment count, or null when the platform hides it. */
|
|
18132
18270
|
comment_count?: number | null;
|
|
@@ -18610,7 +18748,7 @@ interface operations {
|
|
|
18610
18748
|
title?: string | null;
|
|
18611
18749
|
/** @description Full post text (content pass-through, never stored). */
|
|
18612
18750
|
text?: string | null;
|
|
18613
|
-
/** @description ISO-8601 UTC datetime this post was
|
|
18751
|
+
/** @description ISO-8601 UTC datetime this post was published, or null when it cannot be told reliably. Derived from the post's own activity identity, so it does not change with the route you used to reach it. null when the post carries no activity identity of its own (often a video or image post), never a guess. For a repost this is when the repost was made, not when the post it reshares was. */
|
|
18614
18752
|
created_at?: string | null;
|
|
18615
18753
|
/** @description Total comment count, or null when the platform hides it. */
|
|
18616
18754
|
comment_count?: number | null;
|
|
@@ -19613,7 +19751,1169 @@ interface operations {
|
|
|
19613
19751
|
"application/json": components["schemas"]["Error"];
|
|
19614
19752
|
};
|
|
19615
19753
|
};
|
|
19616
|
-
/** @description The account_id does not belong to this tenant (ACCOUNT_NOT_FOUND), or the target post was not found (RESOURCE_NOT_FOUND). An id whose connection was replaced or removed also stops resolving here, and it is already absent from the list, so re-read `GET /v1/accounts` for the current id. */
|
|
19754
|
+
/** @description The account_id does not belong to this tenant (ACCOUNT_NOT_FOUND), or the target post was not found (RESOURCE_NOT_FOUND). An id whose connection was replaced or removed also stops resolving here, and it is already absent from the list, so re-read `GET /v1/accounts` for the current id. */
|
|
19755
|
+
404: {
|
|
19756
|
+
headers: {
|
|
19757
|
+
[name: string]: unknown;
|
|
19758
|
+
};
|
|
19759
|
+
content: {
|
|
19760
|
+
"application/json": components["schemas"]["Error"];
|
|
19761
|
+
};
|
|
19762
|
+
};
|
|
19763
|
+
/** @description Payload too large, the request body exceeds the size limit. */
|
|
19764
|
+
413: {
|
|
19765
|
+
headers: {
|
|
19766
|
+
[name: string]: unknown;
|
|
19767
|
+
};
|
|
19768
|
+
content: {
|
|
19769
|
+
"application/json": components["schemas"]["Error"];
|
|
19770
|
+
};
|
|
19771
|
+
};
|
|
19772
|
+
/** @description Rate limited, slow down and retry after the hinted delay. */
|
|
19773
|
+
429: {
|
|
19774
|
+
headers: {
|
|
19775
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
19776
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
19777
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
19778
|
+
[name: string]: unknown;
|
|
19779
|
+
};
|
|
19780
|
+
content: {
|
|
19781
|
+
"application/json": components["schemas"]["Error"];
|
|
19782
|
+
};
|
|
19783
|
+
};
|
|
19784
|
+
/** @description Internal error. */
|
|
19785
|
+
500: {
|
|
19786
|
+
headers: {
|
|
19787
|
+
[name: string]: unknown;
|
|
19788
|
+
};
|
|
19789
|
+
content: {
|
|
19790
|
+
"application/json": components["schemas"]["Error"];
|
|
19791
|
+
};
|
|
19792
|
+
};
|
|
19793
|
+
/** @description A temporary upstream error occurred, or the upstream response could not be interpreted. Check `retry_likely_to_succeed`: a temporary error is worth retrying, a response that could not be interpreted is not, and carries `retry_hint: {"kind": "never"}`. */
|
|
19794
|
+
502: {
|
|
19795
|
+
headers: {
|
|
19796
|
+
[name: string]: unknown;
|
|
19797
|
+
};
|
|
19798
|
+
content: {
|
|
19799
|
+
"application/json": components["schemas"]["Error"];
|
|
19800
|
+
};
|
|
19801
|
+
};
|
|
19802
|
+
/** @description Service unavailable. */
|
|
19803
|
+
503: {
|
|
19804
|
+
headers: {
|
|
19805
|
+
[name: string]: unknown;
|
|
19806
|
+
};
|
|
19807
|
+
content: {
|
|
19808
|
+
"application/json": components["schemas"]["Error"];
|
|
19809
|
+
};
|
|
19810
|
+
};
|
|
19811
|
+
/** @description Gateway timeout. */
|
|
19812
|
+
504: {
|
|
19813
|
+
headers: {
|
|
19814
|
+
[name: string]: unknown;
|
|
19815
|
+
};
|
|
19816
|
+
content: {
|
|
19817
|
+
"application/json": components["schemas"]["Error"];
|
|
19818
|
+
};
|
|
19819
|
+
};
|
|
19820
|
+
};
|
|
19821
|
+
};
|
|
19822
|
+
deleteV1AccountIdSavedPostsPostId: {
|
|
19823
|
+
parameters: {
|
|
19824
|
+
query?: never;
|
|
19825
|
+
header?: never;
|
|
19826
|
+
path: {
|
|
19827
|
+
/** @description The account ID (`acc_...`) that performs the unsave. */
|
|
19828
|
+
account_id: string;
|
|
19829
|
+
/** @description The post's id from get_post or any list response. A bare activity id, a URN (activity/ugcPost/share), or a full share URL all work. */
|
|
19830
|
+
post_id: string;
|
|
19831
|
+
};
|
|
19832
|
+
cookie?: never;
|
|
19833
|
+
};
|
|
19834
|
+
requestBody?: never;
|
|
19835
|
+
responses: {
|
|
19836
|
+
/** @description The post is no longer saved. Unsaving a not-currently-saved post just returns 200 again, not an error. */
|
|
19837
|
+
200: {
|
|
19838
|
+
headers: {
|
|
19839
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
19840
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
19841
|
+
[name: string]: unknown;
|
|
19842
|
+
};
|
|
19843
|
+
content: {
|
|
19844
|
+
"application/json": {
|
|
19845
|
+
/**
|
|
19846
|
+
* @description Response type discriminator.
|
|
19847
|
+
* @enum {string}
|
|
19848
|
+
*/
|
|
19849
|
+
object: "save_result";
|
|
19850
|
+
/** @description true after save_post, false after unsave_post. */
|
|
19851
|
+
saved: boolean;
|
|
19852
|
+
/** @description The target post's activity id, stripped of the urn:li:activity: prefix. */
|
|
19853
|
+
post_id: string;
|
|
19854
|
+
safety_warning?: components["schemas"]["SafetyWarning"];
|
|
19855
|
+
};
|
|
19856
|
+
};
|
|
19857
|
+
};
|
|
19858
|
+
/** @description Missing/malformed account_id, or post_id is not in an accepted form (the `id` from a post read, a bare numeric activity id, a `urn:li:activity:<id>` URN, or a full LinkedIn post URL). */
|
|
19859
|
+
400: {
|
|
19860
|
+
headers: {
|
|
19861
|
+
[name: string]: unknown;
|
|
19862
|
+
};
|
|
19863
|
+
content: {
|
|
19864
|
+
"application/json": components["schemas"]["Error"];
|
|
19865
|
+
};
|
|
19866
|
+
};
|
|
19867
|
+
/** @description Missing or invalid API key. */
|
|
19868
|
+
401: {
|
|
19869
|
+
headers: {
|
|
19870
|
+
[name: string]: unknown;
|
|
19871
|
+
};
|
|
19872
|
+
content: {
|
|
19873
|
+
"application/json": components["schemas"]["Error"];
|
|
19874
|
+
};
|
|
19875
|
+
};
|
|
19876
|
+
/** @description Forbidden. NO_ACTIVE_SEAT: the account is not attached to an active seat. */
|
|
19877
|
+
403: {
|
|
19878
|
+
headers: {
|
|
19879
|
+
[name: string]: unknown;
|
|
19880
|
+
};
|
|
19881
|
+
content: {
|
|
19882
|
+
"application/json": components["schemas"]["Error"];
|
|
19883
|
+
};
|
|
19884
|
+
};
|
|
19885
|
+
/** @description The account_id does not belong to this tenant (ACCOUNT_NOT_FOUND), or the target post was not found (RESOURCE_NOT_FOUND). An id whose connection was replaced or removed also stops resolving here, and it is already absent from the list, so re-read `GET /v1/accounts` for the current id. */
|
|
19886
|
+
404: {
|
|
19887
|
+
headers: {
|
|
19888
|
+
[name: string]: unknown;
|
|
19889
|
+
};
|
|
19890
|
+
content: {
|
|
19891
|
+
"application/json": components["schemas"]["Error"];
|
|
19892
|
+
};
|
|
19893
|
+
};
|
|
19894
|
+
/** @description Rate limited, slow down and retry after the hinted delay. */
|
|
19895
|
+
429: {
|
|
19896
|
+
headers: {
|
|
19897
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
19898
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
19899
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
19900
|
+
[name: string]: unknown;
|
|
19901
|
+
};
|
|
19902
|
+
content: {
|
|
19903
|
+
"application/json": components["schemas"]["Error"];
|
|
19904
|
+
};
|
|
19905
|
+
};
|
|
19906
|
+
/** @description Internal error. */
|
|
19907
|
+
500: {
|
|
19908
|
+
headers: {
|
|
19909
|
+
[name: string]: unknown;
|
|
19910
|
+
};
|
|
19911
|
+
content: {
|
|
19912
|
+
"application/json": components["schemas"]["Error"];
|
|
19913
|
+
};
|
|
19914
|
+
};
|
|
19915
|
+
/** @description A temporary upstream error occurred, or the upstream response could not be interpreted. Check `retry_likely_to_succeed`: a temporary error is worth retrying, a response that could not be interpreted is not, and carries `retry_hint: {"kind": "never"}`. */
|
|
19916
|
+
502: {
|
|
19917
|
+
headers: {
|
|
19918
|
+
[name: string]: unknown;
|
|
19919
|
+
};
|
|
19920
|
+
content: {
|
|
19921
|
+
"application/json": components["schemas"]["Error"];
|
|
19922
|
+
};
|
|
19923
|
+
};
|
|
19924
|
+
/** @description Service unavailable. */
|
|
19925
|
+
503: {
|
|
19926
|
+
headers: {
|
|
19927
|
+
[name: string]: unknown;
|
|
19928
|
+
};
|
|
19929
|
+
content: {
|
|
19930
|
+
"application/json": components["schemas"]["Error"];
|
|
19931
|
+
};
|
|
19932
|
+
};
|
|
19933
|
+
/** @description Gateway timeout. */
|
|
19934
|
+
504: {
|
|
19935
|
+
headers: {
|
|
19936
|
+
[name: string]: unknown;
|
|
19937
|
+
};
|
|
19938
|
+
content: {
|
|
19939
|
+
"application/json": components["schemas"]["Error"];
|
|
19940
|
+
};
|
|
19941
|
+
};
|
|
19942
|
+
};
|
|
19943
|
+
};
|
|
19944
|
+
getV1Drafts: {
|
|
19945
|
+
parameters: {
|
|
19946
|
+
query?: {
|
|
19947
|
+
/** @description Comma list of draft, scheduled, failed, published. Default draft,scheduled,failed. published items are publish records, never Drafts. */
|
|
19948
|
+
status?: ("draft" | "scheduled" | "failed" | "published")[];
|
|
19949
|
+
/** @description Only items on this account (acc_...), or none for Drafts with no account. Omitted: all of yours. */
|
|
19950
|
+
account_id?: string;
|
|
19951
|
+
/** @description Only items whose date is at or after this instant (inclusive). */
|
|
19952
|
+
from?: string;
|
|
19953
|
+
/** @description Only items whose date is before this instant (exclusive). */
|
|
19954
|
+
to?: string;
|
|
19955
|
+
/** @description Sort by the item's date: desc (default) or asc. */
|
|
19956
|
+
order?: "desc" | "asc";
|
|
19957
|
+
/** @description Max items per page (1-100, default 20). */
|
|
19958
|
+
limit?: number;
|
|
19959
|
+
/** @description Pagination cursor from a previous response; pass it back verbatim with the same filters. */
|
|
19960
|
+
cursor?: string;
|
|
19961
|
+
};
|
|
19962
|
+
header?: never;
|
|
19963
|
+
path?: never;
|
|
19964
|
+
cookie?: never;
|
|
19965
|
+
};
|
|
19966
|
+
requestBody?: never;
|
|
19967
|
+
responses: {
|
|
19968
|
+
/** @description Drafts and publish records, ordered by each item's own date: scheduled_at for scheduled, failure.failed_at for failed, published_at for published, updated_at for draft. */
|
|
19969
|
+
200: {
|
|
19970
|
+
headers: {
|
|
19971
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
19972
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
19973
|
+
[name: string]: unknown;
|
|
19974
|
+
};
|
|
19975
|
+
content: {
|
|
19976
|
+
"application/json": {
|
|
19977
|
+
/**
|
|
19978
|
+
* @description Response type discriminator.
|
|
19979
|
+
* @enum {string}
|
|
19980
|
+
*/
|
|
19981
|
+
object: "draft_list";
|
|
19982
|
+
/** @description Each item is a draft (object: draft) or a publish record (object: publish_record). Publish records are never Drafts. */
|
|
19983
|
+
items: ({
|
|
19984
|
+
/**
|
|
19985
|
+
* @description Response type discriminator.
|
|
19986
|
+
* @enum {string}
|
|
19987
|
+
*/
|
|
19988
|
+
object: "draft";
|
|
19989
|
+
/** @description Draft id (drf_...). */
|
|
19990
|
+
id: string;
|
|
19991
|
+
/** @description The account this Draft will publish as, or null for none yet. */
|
|
19992
|
+
account_id: string | null;
|
|
19993
|
+
/**
|
|
19994
|
+
* @description Derived: failed if failure is set, else scheduled if scheduled_at is set, else draft.
|
|
19995
|
+
* @enum {string}
|
|
19996
|
+
*/
|
|
19997
|
+
status: "draft" | "scheduled" | "failed";
|
|
19998
|
+
/** @description Post body text. May be empty or null while drafting. */
|
|
19999
|
+
text: string | null;
|
|
20000
|
+
/** @description Media, in post order. */
|
|
20001
|
+
attachments: {
|
|
20002
|
+
/** @description Attachment id (att_...). Send {id} in a PATCH attachments list to keep it. */
|
|
20003
|
+
id: string;
|
|
20004
|
+
/** @description The file's type. */
|
|
20005
|
+
content_type: string;
|
|
20006
|
+
/** @description File name. */
|
|
20007
|
+
filename: string;
|
|
20008
|
+
/** @description Stored size in bytes. */
|
|
20009
|
+
size_bytes: number;
|
|
20010
|
+
/** @description Signed download link to the stored file, valid for 1 hour. Read the Draft again for a fresh one. Null when the stored file is unavailable. */
|
|
20011
|
+
url: string | null;
|
|
20012
|
+
}[];
|
|
20013
|
+
/** @description A post to quote or repost when published. */
|
|
20014
|
+
quoted_post_id?: string | null;
|
|
20015
|
+
/**
|
|
20016
|
+
* @description Who can read the post once published.
|
|
20017
|
+
* @enum {string|null}
|
|
20018
|
+
*/
|
|
20019
|
+
can_read?: "anyone" | "relations_only" | null;
|
|
20020
|
+
/**
|
|
20021
|
+
* @description Who may comment once published.
|
|
20022
|
+
* @enum {string|null}
|
|
20023
|
+
*/
|
|
20024
|
+
can_comment?: "anyone" | "relations_only" | "no_one" | null;
|
|
20025
|
+
/** @description Company page id to post as. */
|
|
20026
|
+
post_as?: string | null;
|
|
20027
|
+
/** @description When Curviate publishes the Draft (UTC, whole minute), or null. It goes out up to 20 seconds after this time. A failed Draft has null here; the time that failed is failure.scheduled_at. */
|
|
20028
|
+
scheduled_at: string | null;
|
|
20029
|
+
/** @description Why the last scheduled publish failed; present on failed Drafts only. */
|
|
20030
|
+
failure: {
|
|
20031
|
+
/**
|
|
20032
|
+
* @description Why it failed. outcome_unknown: the platform gave no usable answer, so the post may be live; check the account's posts before you publish again. missed: Curviate could not start within an hour of the time. platform_error and rate_limited: 3 attempts over about 15 minutes all failed.
|
|
20033
|
+
* @enum {string}
|
|
20034
|
+
*/
|
|
20035
|
+
code?: "platform_error" | "rate_limited" | "account_unavailable" | "media_rejected" | "budget_exhausted" | "outside_activity_window" | "no_active_seat" | "not_publishable" | "platform_rejected" | "missed" | "outcome_unknown";
|
|
20036
|
+
/** @description What went wrong and what to do next. Never contains post text. */
|
|
20037
|
+
message?: string;
|
|
20038
|
+
/** @description When it failed. */
|
|
20039
|
+
failed_at?: string;
|
|
20040
|
+
/** @description The time that failed to publish. */
|
|
20041
|
+
scheduled_at?: string;
|
|
20042
|
+
} | null;
|
|
20043
|
+
/** @description Creation time. */
|
|
20044
|
+
created_at: string;
|
|
20045
|
+
/** @description Last change. */
|
|
20046
|
+
updated_at: string;
|
|
20047
|
+
} | {
|
|
20048
|
+
/**
|
|
20049
|
+
* @description Response type discriminator.
|
|
20050
|
+
* @enum {string}
|
|
20051
|
+
*/
|
|
20052
|
+
object: "publish_record";
|
|
20053
|
+
/** @description The published post's id, or null when the platform returned none. */
|
|
20054
|
+
post_id: string | null;
|
|
20055
|
+
/** @description The account that published it. */
|
|
20056
|
+
account_id: string;
|
|
20057
|
+
/** @description When it was published. */
|
|
20058
|
+
published_at: string;
|
|
20059
|
+
/** @description The Draft it came from, or null for a post created directly. */
|
|
20060
|
+
draft_id: string | null;
|
|
20061
|
+
})[];
|
|
20062
|
+
/** @description Pass back as cursor for the next page; null on the last page. */
|
|
20063
|
+
cursor: string | null;
|
|
20064
|
+
safety_warning?: components["schemas"]["SafetyWarning"];
|
|
20065
|
+
};
|
|
20066
|
+
};
|
|
20067
|
+
};
|
|
20068
|
+
/** @description Invalid filter: an unknown status, a malformed date or cursor, or limit out of range. */
|
|
20069
|
+
400: {
|
|
20070
|
+
headers: {
|
|
20071
|
+
[name: string]: unknown;
|
|
20072
|
+
};
|
|
20073
|
+
content: {
|
|
20074
|
+
"application/json": components["schemas"]["Error"];
|
|
20075
|
+
};
|
|
20076
|
+
};
|
|
20077
|
+
/** @description Missing or invalid API key. */
|
|
20078
|
+
401: {
|
|
20079
|
+
headers: {
|
|
20080
|
+
[name: string]: unknown;
|
|
20081
|
+
};
|
|
20082
|
+
content: {
|
|
20083
|
+
"application/json": components["schemas"]["Error"];
|
|
20084
|
+
};
|
|
20085
|
+
};
|
|
20086
|
+
/** @description Rate limited, slow down and retry after the hinted delay. */
|
|
20087
|
+
429: {
|
|
20088
|
+
headers: {
|
|
20089
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
20090
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
20091
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
20092
|
+
[name: string]: unknown;
|
|
20093
|
+
};
|
|
20094
|
+
content: {
|
|
20095
|
+
"application/json": components["schemas"]["Error"];
|
|
20096
|
+
};
|
|
20097
|
+
};
|
|
20098
|
+
};
|
|
20099
|
+
};
|
|
20100
|
+
postV1Drafts: {
|
|
20101
|
+
parameters: {
|
|
20102
|
+
query?: never;
|
|
20103
|
+
header?: never;
|
|
20104
|
+
path?: never;
|
|
20105
|
+
cookie?: never;
|
|
20106
|
+
};
|
|
20107
|
+
requestBody: {
|
|
20108
|
+
content: {
|
|
20109
|
+
"application/json": {
|
|
20110
|
+
/** @description The account (acc_...) this Draft will publish as, or null for none yet. A Draft belongs to at most one account. */
|
|
20111
|
+
account_id?: string | null;
|
|
20112
|
+
/** @description When Curviate publishes this Draft: an ISO 8601 date-time with an offset, at least 5 minutes and at most 365 days ahead, stored in UTC truncated to the minute. Scheduling needs an account and text. Curviate publishes it up to 20 seconds after this time, and keeps scheduled posts on one account at least 5 minutes apart. null unschedules. */
|
|
20113
|
+
scheduled_at?: string | null;
|
|
20114
|
+
/** @description Post body text, up to 3000 characters. May be empty while drafting; publishing needs at least one character. */
|
|
20115
|
+
text?: string | null;
|
|
20116
|
+
/** @description A post to quote or repost when published, the same as on create post. Checked at publish time. */
|
|
20117
|
+
quoted_post_id?: string | null;
|
|
20118
|
+
/**
|
|
20119
|
+
* @description Who can read the post once published.
|
|
20120
|
+
* @enum {string|null}
|
|
20121
|
+
*/
|
|
20122
|
+
can_read?: "anyone" | "relations_only" | null;
|
|
20123
|
+
/**
|
|
20124
|
+
* @description Who may comment once published.
|
|
20125
|
+
* @enum {string|null}
|
|
20126
|
+
*/
|
|
20127
|
+
can_comment?: "anyone" | "relations_only" | "no_one" | null;
|
|
20128
|
+
/** @description Company page id to post as; the account must administer it. Checked at publish time. */
|
|
20129
|
+
post_as?: string | null;
|
|
20130
|
+
/** @description Media as base64 objects: up to 20 images, or one MP4 video, or one PDF, never mixed. 5 MiB per file inline. */
|
|
20131
|
+
attachments?: {
|
|
20132
|
+
/** @description Base64-encoded file bytes. */
|
|
20133
|
+
content: string;
|
|
20134
|
+
/** @description The file's type: image/jpeg, image/png, image/gif, image/webp, video/mp4 or application/pdf. */
|
|
20135
|
+
content_type: string;
|
|
20136
|
+
/** @description File name. */
|
|
20137
|
+
filename: string;
|
|
20138
|
+
}[];
|
|
20139
|
+
};
|
|
20140
|
+
};
|
|
20141
|
+
};
|
|
20142
|
+
responses: {
|
|
20143
|
+
/** @description Draft created. With scheduled_at, status is scheduled and Curviate publishes it on its own. With scheduled_at, the response carries safety_warning (reason activity_window) when the time is outside the account's activity window and its posture is warn; under enforce the request is refused instead (429 BUDGET_EXHAUSTED, reason activity_window) and nothing is saved. */
|
|
20144
|
+
201: {
|
|
20145
|
+
headers: {
|
|
20146
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
20147
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
20148
|
+
[name: string]: unknown;
|
|
20149
|
+
};
|
|
20150
|
+
content: {
|
|
20151
|
+
"application/json": {
|
|
20152
|
+
/**
|
|
20153
|
+
* @description Response type discriminator.
|
|
20154
|
+
* @enum {string}
|
|
20155
|
+
*/
|
|
20156
|
+
object: "draft";
|
|
20157
|
+
/** @description Draft id (drf_...). */
|
|
20158
|
+
id: string;
|
|
20159
|
+
/** @description The account this Draft will publish as, or null for none yet. */
|
|
20160
|
+
account_id: string | null;
|
|
20161
|
+
/**
|
|
20162
|
+
* @description Derived: failed if failure is set, else scheduled if scheduled_at is set, else draft.
|
|
20163
|
+
* @enum {string}
|
|
20164
|
+
*/
|
|
20165
|
+
status: "draft" | "scheduled" | "failed";
|
|
20166
|
+
/** @description Post body text. May be empty or null while drafting. */
|
|
20167
|
+
text: string | null;
|
|
20168
|
+
/** @description Media, in post order. */
|
|
20169
|
+
attachments: {
|
|
20170
|
+
/** @description Attachment id (att_...). Send {id} in a PATCH attachments list to keep it. */
|
|
20171
|
+
id: string;
|
|
20172
|
+
/** @description The file's type. */
|
|
20173
|
+
content_type: string;
|
|
20174
|
+
/** @description File name. */
|
|
20175
|
+
filename: string;
|
|
20176
|
+
/** @description Stored size in bytes. */
|
|
20177
|
+
size_bytes: number;
|
|
20178
|
+
/** @description Signed download link to the stored file, valid for 1 hour. Read the Draft again for a fresh one. Null when the stored file is unavailable. */
|
|
20179
|
+
url: string | null;
|
|
20180
|
+
}[];
|
|
20181
|
+
/** @description A post to quote or repost when published. */
|
|
20182
|
+
quoted_post_id?: string | null;
|
|
20183
|
+
/**
|
|
20184
|
+
* @description Who can read the post once published.
|
|
20185
|
+
* @enum {string|null}
|
|
20186
|
+
*/
|
|
20187
|
+
can_read?: "anyone" | "relations_only" | null;
|
|
20188
|
+
/**
|
|
20189
|
+
* @description Who may comment once published.
|
|
20190
|
+
* @enum {string|null}
|
|
20191
|
+
*/
|
|
20192
|
+
can_comment?: "anyone" | "relations_only" | "no_one" | null;
|
|
20193
|
+
/** @description Company page id to post as. */
|
|
20194
|
+
post_as?: string | null;
|
|
20195
|
+
/** @description When Curviate publishes the Draft (UTC, whole minute), or null. It goes out up to 20 seconds after this time. A failed Draft has null here; the time that failed is failure.scheduled_at. */
|
|
20196
|
+
scheduled_at: string | null;
|
|
20197
|
+
/** @description Why the last scheduled publish failed; present on failed Drafts only. */
|
|
20198
|
+
failure: {
|
|
20199
|
+
/**
|
|
20200
|
+
* @description Why it failed. outcome_unknown: the platform gave no usable answer, so the post may be live; check the account's posts before you publish again. missed: Curviate could not start within an hour of the time. platform_error and rate_limited: 3 attempts over about 15 minutes all failed.
|
|
20201
|
+
* @enum {string}
|
|
20202
|
+
*/
|
|
20203
|
+
code?: "platform_error" | "rate_limited" | "account_unavailable" | "media_rejected" | "budget_exhausted" | "outside_activity_window" | "no_active_seat" | "not_publishable" | "platform_rejected" | "missed" | "outcome_unknown";
|
|
20204
|
+
/** @description What went wrong and what to do next. Never contains post text. */
|
|
20205
|
+
message?: string;
|
|
20206
|
+
/** @description When it failed. */
|
|
20207
|
+
failed_at?: string;
|
|
20208
|
+
/** @description The time that failed to publish. */
|
|
20209
|
+
scheduled_at?: string;
|
|
20210
|
+
} | null;
|
|
20211
|
+
/** @description Creation time. */
|
|
20212
|
+
created_at: string;
|
|
20213
|
+
/** @description Last change. */
|
|
20214
|
+
updated_at: string;
|
|
20215
|
+
safety_warning?: components["schemas"]["SafetyWarning"];
|
|
20216
|
+
};
|
|
20217
|
+
};
|
|
20218
|
+
};
|
|
20219
|
+
/** @description Invalid input. Media rules: up to 20 images (JPEG, PNG, GIF, WEBP, at most 6012 x 6012 px), or one MP4 video, or one PDF, never mixed. scheduled_at must be an ISO 8601 date-time with an offset, 5 minutes to 365 days ahead after truncation to the minute. */
|
|
20220
|
+
400: {
|
|
20221
|
+
headers: {
|
|
20222
|
+
[name: string]: unknown;
|
|
20223
|
+
};
|
|
20224
|
+
content: {
|
|
20225
|
+
"application/json": components["schemas"]["Error"];
|
|
20226
|
+
};
|
|
20227
|
+
};
|
|
20228
|
+
/** @description Missing or invalid API key. */
|
|
20229
|
+
401: {
|
|
20230
|
+
headers: {
|
|
20231
|
+
[name: string]: unknown;
|
|
20232
|
+
};
|
|
20233
|
+
content: {
|
|
20234
|
+
"application/json": components["schemas"]["Error"];
|
|
20235
|
+
};
|
|
20236
|
+
};
|
|
20237
|
+
/** @description Forbidden. NO_ACTIVE_SEAT: the account is not attached to an active seat. */
|
|
20238
|
+
403: {
|
|
20239
|
+
headers: {
|
|
20240
|
+
[name: string]: unknown;
|
|
20241
|
+
};
|
|
20242
|
+
content: {
|
|
20243
|
+
"application/json": components["schemas"]["Error"];
|
|
20244
|
+
};
|
|
20245
|
+
};
|
|
20246
|
+
/** @description The account_id is not one of yours (ACCOUNT_NOT_FOUND). */
|
|
20247
|
+
404: {
|
|
20248
|
+
headers: {
|
|
20249
|
+
[name: string]: unknown;
|
|
20250
|
+
};
|
|
20251
|
+
content: {
|
|
20252
|
+
"application/json": components["schemas"]["Error"];
|
|
20253
|
+
};
|
|
20254
|
+
};
|
|
20255
|
+
/** @description The account is disconnected (REAUTH_REQUIRED). Reconnect it, or choose another account. */
|
|
20256
|
+
409: {
|
|
20257
|
+
headers: {
|
|
20258
|
+
[name: string]: unknown;
|
|
20259
|
+
};
|
|
20260
|
+
content: {
|
|
20261
|
+
"application/json": components["schemas"]["Error"];
|
|
20262
|
+
};
|
|
20263
|
+
};
|
|
20264
|
+
/** @description A file is over its size limit: 5 MiB per image, and 5 MiB per file sent inline. */
|
|
20265
|
+
413: {
|
|
20266
|
+
headers: {
|
|
20267
|
+
[name: string]: unknown;
|
|
20268
|
+
};
|
|
20269
|
+
content: {
|
|
20270
|
+
"application/json": components["schemas"]["Error"];
|
|
20271
|
+
};
|
|
20272
|
+
};
|
|
20273
|
+
/** @description DRAFT_LIMIT_REACHED: the bucket (one account, or Drafts with no account) already holds 50 Drafts. MEDIA_QUOTA_EXCEEDED: the media would take the bucket past its 2 GiB quota; nothing is stored. ACCOUNT_REQUIRED / DRAFT_NOT_PUBLISHABLE: scheduling needs an account and text. SCHEDULE_CONFLICT: another scheduled Draft on the account is less than 5 minutes away; the message names it. */
|
|
20274
|
+
422: {
|
|
20275
|
+
headers: {
|
|
20276
|
+
[name: string]: unknown;
|
|
20277
|
+
};
|
|
20278
|
+
content: {
|
|
20279
|
+
"application/json": components["schemas"]["Error"];
|
|
20280
|
+
};
|
|
20281
|
+
};
|
|
20282
|
+
/** @description BUDGET_EXHAUSTED with reason activity_window: the scheduled time is outside the account's activity window and the account enforces it. Nothing is saved. */
|
|
20283
|
+
429: {
|
|
20284
|
+
headers: {
|
|
20285
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
20286
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
20287
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
20288
|
+
[name: string]: unknown;
|
|
20289
|
+
};
|
|
20290
|
+
content: {
|
|
20291
|
+
"application/json": components["schemas"]["Error"];
|
|
20292
|
+
};
|
|
20293
|
+
};
|
|
20294
|
+
};
|
|
20295
|
+
};
|
|
20296
|
+
getV1DraftsId: {
|
|
20297
|
+
parameters: {
|
|
20298
|
+
query?: never;
|
|
20299
|
+
header?: never;
|
|
20300
|
+
path: {
|
|
20301
|
+
/** @description Draft id (drf_...). */
|
|
20302
|
+
id: string;
|
|
20303
|
+
};
|
|
20304
|
+
cookie?: never;
|
|
20305
|
+
};
|
|
20306
|
+
requestBody?: never;
|
|
20307
|
+
responses: {
|
|
20308
|
+
/** @description The Draft. */
|
|
20309
|
+
200: {
|
|
20310
|
+
headers: {
|
|
20311
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
20312
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
20313
|
+
[name: string]: unknown;
|
|
20314
|
+
};
|
|
20315
|
+
content: {
|
|
20316
|
+
"application/json": {
|
|
20317
|
+
/**
|
|
20318
|
+
* @description Response type discriminator.
|
|
20319
|
+
* @enum {string}
|
|
20320
|
+
*/
|
|
20321
|
+
object: "draft";
|
|
20322
|
+
/** @description Draft id (drf_...). */
|
|
20323
|
+
id: string;
|
|
20324
|
+
/** @description The account this Draft will publish as, or null for none yet. */
|
|
20325
|
+
account_id: string | null;
|
|
20326
|
+
/**
|
|
20327
|
+
* @description Derived: failed if failure is set, else scheduled if scheduled_at is set, else draft.
|
|
20328
|
+
* @enum {string}
|
|
20329
|
+
*/
|
|
20330
|
+
status: "draft" | "scheduled" | "failed";
|
|
20331
|
+
/** @description Post body text. May be empty or null while drafting. */
|
|
20332
|
+
text: string | null;
|
|
20333
|
+
/** @description Media, in post order. */
|
|
20334
|
+
attachments: {
|
|
20335
|
+
/** @description Attachment id (att_...). Send {id} in a PATCH attachments list to keep it. */
|
|
20336
|
+
id: string;
|
|
20337
|
+
/** @description The file's type. */
|
|
20338
|
+
content_type: string;
|
|
20339
|
+
/** @description File name. */
|
|
20340
|
+
filename: string;
|
|
20341
|
+
/** @description Stored size in bytes. */
|
|
20342
|
+
size_bytes: number;
|
|
20343
|
+
/** @description Signed download link to the stored file, valid for 1 hour. Read the Draft again for a fresh one. Null when the stored file is unavailable. */
|
|
20344
|
+
url: string | null;
|
|
20345
|
+
}[];
|
|
20346
|
+
/** @description A post to quote or repost when published. */
|
|
20347
|
+
quoted_post_id?: string | null;
|
|
20348
|
+
/**
|
|
20349
|
+
* @description Who can read the post once published.
|
|
20350
|
+
* @enum {string|null}
|
|
20351
|
+
*/
|
|
20352
|
+
can_read?: "anyone" | "relations_only" | null;
|
|
20353
|
+
/**
|
|
20354
|
+
* @description Who may comment once published.
|
|
20355
|
+
* @enum {string|null}
|
|
20356
|
+
*/
|
|
20357
|
+
can_comment?: "anyone" | "relations_only" | "no_one" | null;
|
|
20358
|
+
/** @description Company page id to post as. */
|
|
20359
|
+
post_as?: string | null;
|
|
20360
|
+
/** @description When Curviate publishes the Draft (UTC, whole minute), or null. It goes out up to 20 seconds after this time. A failed Draft has null here; the time that failed is failure.scheduled_at. */
|
|
20361
|
+
scheduled_at: string | null;
|
|
20362
|
+
/** @description Why the last scheduled publish failed; present on failed Drafts only. */
|
|
20363
|
+
failure: {
|
|
20364
|
+
/**
|
|
20365
|
+
* @description Why it failed. outcome_unknown: the platform gave no usable answer, so the post may be live; check the account's posts before you publish again. missed: Curviate could not start within an hour of the time. platform_error and rate_limited: 3 attempts over about 15 minutes all failed.
|
|
20366
|
+
* @enum {string}
|
|
20367
|
+
*/
|
|
20368
|
+
code?: "platform_error" | "rate_limited" | "account_unavailable" | "media_rejected" | "budget_exhausted" | "outside_activity_window" | "no_active_seat" | "not_publishable" | "platform_rejected" | "missed" | "outcome_unknown";
|
|
20369
|
+
/** @description What went wrong and what to do next. Never contains post text. */
|
|
20370
|
+
message?: string;
|
|
20371
|
+
/** @description When it failed. */
|
|
20372
|
+
failed_at?: string;
|
|
20373
|
+
/** @description The time that failed to publish. */
|
|
20374
|
+
scheduled_at?: string;
|
|
20375
|
+
} | null;
|
|
20376
|
+
/** @description Creation time. */
|
|
20377
|
+
created_at: string;
|
|
20378
|
+
/** @description Last change. */
|
|
20379
|
+
updated_at: string;
|
|
20380
|
+
safety_warning?: components["schemas"]["SafetyWarning"];
|
|
20381
|
+
};
|
|
20382
|
+
};
|
|
20383
|
+
};
|
|
20384
|
+
/** @description Missing or invalid API key. */
|
|
20385
|
+
401: {
|
|
20386
|
+
headers: {
|
|
20387
|
+
[name: string]: unknown;
|
|
20388
|
+
};
|
|
20389
|
+
content: {
|
|
20390
|
+
"application/json": components["schemas"]["Error"];
|
|
20391
|
+
};
|
|
20392
|
+
};
|
|
20393
|
+
/** @description No Draft with this id among yours (RESOURCE_NOT_FOUND). */
|
|
20394
|
+
404: {
|
|
20395
|
+
headers: {
|
|
20396
|
+
[name: string]: unknown;
|
|
20397
|
+
};
|
|
20398
|
+
content: {
|
|
20399
|
+
"application/json": components["schemas"]["Error"];
|
|
20400
|
+
};
|
|
20401
|
+
};
|
|
20402
|
+
/** @description Rate limited, slow down and retry after the hinted delay. */
|
|
20403
|
+
429: {
|
|
20404
|
+
headers: {
|
|
20405
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
20406
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
20407
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
20408
|
+
[name: string]: unknown;
|
|
20409
|
+
};
|
|
20410
|
+
content: {
|
|
20411
|
+
"application/json": components["schemas"]["Error"];
|
|
20412
|
+
};
|
|
20413
|
+
};
|
|
20414
|
+
};
|
|
20415
|
+
};
|
|
20416
|
+
deleteV1DraftsId: {
|
|
20417
|
+
parameters: {
|
|
20418
|
+
query?: never;
|
|
20419
|
+
header?: never;
|
|
20420
|
+
path: {
|
|
20421
|
+
/** @description Draft id (drf_...). */
|
|
20422
|
+
id: string;
|
|
20423
|
+
};
|
|
20424
|
+
cookie?: never;
|
|
20425
|
+
};
|
|
20426
|
+
requestBody?: never;
|
|
20427
|
+
responses: {
|
|
20428
|
+
/** @description Draft and its media deleted. No response body. */
|
|
20429
|
+
204: {
|
|
20430
|
+
headers: {
|
|
20431
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
20432
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
20433
|
+
[name: string]: unknown;
|
|
20434
|
+
};
|
|
20435
|
+
content?: never;
|
|
20436
|
+
};
|
|
20437
|
+
/** @description Missing or invalid API key. */
|
|
20438
|
+
401: {
|
|
20439
|
+
headers: {
|
|
20440
|
+
[name: string]: unknown;
|
|
20441
|
+
};
|
|
20442
|
+
content: {
|
|
20443
|
+
"application/json": components["schemas"]["Error"];
|
|
20444
|
+
};
|
|
20445
|
+
};
|
|
20446
|
+
/** @description No Draft with this id among yours (RESOURCE_NOT_FOUND). */
|
|
20447
|
+
404: {
|
|
20448
|
+
headers: {
|
|
20449
|
+
[name: string]: unknown;
|
|
20450
|
+
};
|
|
20451
|
+
content: {
|
|
20452
|
+
"application/json": components["schemas"]["Error"];
|
|
20453
|
+
};
|
|
20454
|
+
};
|
|
20455
|
+
/** @description DRAFT_PUBLISHING: a publish of this Draft is in flight. Read it again in a few seconds. */
|
|
20456
|
+
409: {
|
|
20457
|
+
headers: {
|
|
20458
|
+
[name: string]: unknown;
|
|
20459
|
+
};
|
|
20460
|
+
content: {
|
|
20461
|
+
"application/json": components["schemas"]["Error"];
|
|
20462
|
+
};
|
|
20463
|
+
};
|
|
20464
|
+
/** @description Rate limited, slow down and retry after the hinted delay. */
|
|
20465
|
+
429: {
|
|
20466
|
+
headers: {
|
|
20467
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
20468
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
20469
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
20470
|
+
[name: string]: unknown;
|
|
20471
|
+
};
|
|
20472
|
+
content: {
|
|
20473
|
+
"application/json": components["schemas"]["Error"];
|
|
20474
|
+
};
|
|
20475
|
+
};
|
|
20476
|
+
};
|
|
20477
|
+
};
|
|
20478
|
+
patchV1DraftsId: {
|
|
20479
|
+
parameters: {
|
|
20480
|
+
query?: never;
|
|
20481
|
+
header?: never;
|
|
20482
|
+
path: {
|
|
20483
|
+
/** @description Draft id (drf_...). */
|
|
20484
|
+
id: string;
|
|
20485
|
+
};
|
|
20486
|
+
cookie?: never;
|
|
20487
|
+
};
|
|
20488
|
+
requestBody: {
|
|
20489
|
+
content: {
|
|
20490
|
+
"application/json": {
|
|
20491
|
+
/** @description The account (acc_...) this Draft will publish as, or null for none yet. A Draft belongs to at most one account. */
|
|
20492
|
+
account_id?: string | null;
|
|
20493
|
+
/** @description When Curviate publishes this Draft: an ISO 8601 date-time with an offset, at least 5 minutes and at most 365 days ahead, stored in UTC truncated to the minute. Scheduling needs an account and text. Curviate publishes it up to 20 seconds after this time, and keeps scheduled posts on one account at least 5 minutes apart. null unschedules. */
|
|
20494
|
+
scheduled_at?: string | null;
|
|
20495
|
+
/** @description Post body text, up to 3000 characters. May be empty while drafting; publishing needs at least one character. */
|
|
20496
|
+
text?: string | null;
|
|
20497
|
+
/** @description A post to quote or repost when published, the same as on create post. Checked at publish time. */
|
|
20498
|
+
quoted_post_id?: string | null;
|
|
20499
|
+
/**
|
|
20500
|
+
* @description Who can read the post once published.
|
|
20501
|
+
* @enum {string|null}
|
|
20502
|
+
*/
|
|
20503
|
+
can_read?: "anyone" | "relations_only" | null;
|
|
20504
|
+
/**
|
|
20505
|
+
* @description Who may comment once published.
|
|
20506
|
+
* @enum {string|null}
|
|
20507
|
+
*/
|
|
20508
|
+
can_comment?: "anyone" | "relations_only" | "no_one" | null;
|
|
20509
|
+
/** @description Company page id to post as; the account must administer it. Checked at publish time. */
|
|
20510
|
+
post_as?: string | null;
|
|
20511
|
+
/** @description Replaces the whole list. Each item is {id} to keep an existing attachment, or a new base64 object. Attachments left out are deleted. */
|
|
20512
|
+
attachments?: ({
|
|
20513
|
+
/** @description An attachment already on this Draft (att_...), kept as is. */
|
|
20514
|
+
id: string;
|
|
20515
|
+
} | {
|
|
20516
|
+
/** @description Base64-encoded file bytes. */
|
|
20517
|
+
content: string;
|
|
20518
|
+
/** @description The file's type: image/jpeg, image/png, image/gif, image/webp, video/mp4 or application/pdf. */
|
|
20519
|
+
content_type: string;
|
|
20520
|
+
/** @description File name. */
|
|
20521
|
+
filename: string;
|
|
20522
|
+
})[];
|
|
20523
|
+
};
|
|
20524
|
+
};
|
|
20525
|
+
};
|
|
20526
|
+
responses: {
|
|
20527
|
+
/** @description The updated Draft. scheduled_at schedules, reschedules or (null) unschedules; changing it or the account cancels a pending publish and its retries. Unscheduling alone needs no active seat. With scheduled_at, the response carries safety_warning (reason activity_window) when the time is outside the account's activity window and its posture is warn; under enforce the request is refused instead (429 BUDGET_EXHAUSTED, reason activity_window) and nothing is saved. */
|
|
20528
|
+
200: {
|
|
20529
|
+
headers: {
|
|
20530
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
20531
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
20532
|
+
[name: string]: unknown;
|
|
20533
|
+
};
|
|
20534
|
+
content: {
|
|
20535
|
+
"application/json": {
|
|
20536
|
+
/**
|
|
20537
|
+
* @description Response type discriminator.
|
|
20538
|
+
* @enum {string}
|
|
20539
|
+
*/
|
|
20540
|
+
object: "draft";
|
|
20541
|
+
/** @description Draft id (drf_...). */
|
|
20542
|
+
id: string;
|
|
20543
|
+
/** @description The account this Draft will publish as, or null for none yet. */
|
|
20544
|
+
account_id: string | null;
|
|
20545
|
+
/**
|
|
20546
|
+
* @description Derived: failed if failure is set, else scheduled if scheduled_at is set, else draft.
|
|
20547
|
+
* @enum {string}
|
|
20548
|
+
*/
|
|
20549
|
+
status: "draft" | "scheduled" | "failed";
|
|
20550
|
+
/** @description Post body text. May be empty or null while drafting. */
|
|
20551
|
+
text: string | null;
|
|
20552
|
+
/** @description Media, in post order. */
|
|
20553
|
+
attachments: {
|
|
20554
|
+
/** @description Attachment id (att_...). Send {id} in a PATCH attachments list to keep it. */
|
|
20555
|
+
id: string;
|
|
20556
|
+
/** @description The file's type. */
|
|
20557
|
+
content_type: string;
|
|
20558
|
+
/** @description File name. */
|
|
20559
|
+
filename: string;
|
|
20560
|
+
/** @description Stored size in bytes. */
|
|
20561
|
+
size_bytes: number;
|
|
20562
|
+
/** @description Signed download link to the stored file, valid for 1 hour. Read the Draft again for a fresh one. Null when the stored file is unavailable. */
|
|
20563
|
+
url: string | null;
|
|
20564
|
+
}[];
|
|
20565
|
+
/** @description A post to quote or repost when published. */
|
|
20566
|
+
quoted_post_id?: string | null;
|
|
20567
|
+
/**
|
|
20568
|
+
* @description Who can read the post once published.
|
|
20569
|
+
* @enum {string|null}
|
|
20570
|
+
*/
|
|
20571
|
+
can_read?: "anyone" | "relations_only" | null;
|
|
20572
|
+
/**
|
|
20573
|
+
* @description Who may comment once published.
|
|
20574
|
+
* @enum {string|null}
|
|
20575
|
+
*/
|
|
20576
|
+
can_comment?: "anyone" | "relations_only" | "no_one" | null;
|
|
20577
|
+
/** @description Company page id to post as. */
|
|
20578
|
+
post_as?: string | null;
|
|
20579
|
+
/** @description When Curviate publishes the Draft (UTC, whole minute), or null. It goes out up to 20 seconds after this time. A failed Draft has null here; the time that failed is failure.scheduled_at. */
|
|
20580
|
+
scheduled_at: string | null;
|
|
20581
|
+
/** @description Why the last scheduled publish failed; present on failed Drafts only. */
|
|
20582
|
+
failure: {
|
|
20583
|
+
/**
|
|
20584
|
+
* @description Why it failed. outcome_unknown: the platform gave no usable answer, so the post may be live; check the account's posts before you publish again. missed: Curviate could not start within an hour of the time. platform_error and rate_limited: 3 attempts over about 15 minutes all failed.
|
|
20585
|
+
* @enum {string}
|
|
20586
|
+
*/
|
|
20587
|
+
code?: "platform_error" | "rate_limited" | "account_unavailable" | "media_rejected" | "budget_exhausted" | "outside_activity_window" | "no_active_seat" | "not_publishable" | "platform_rejected" | "missed" | "outcome_unknown";
|
|
20588
|
+
/** @description What went wrong and what to do next. Never contains post text. */
|
|
20589
|
+
message?: string;
|
|
20590
|
+
/** @description When it failed. */
|
|
20591
|
+
failed_at?: string;
|
|
20592
|
+
/** @description The time that failed to publish. */
|
|
20593
|
+
scheduled_at?: string;
|
|
20594
|
+
} | null;
|
|
20595
|
+
/** @description Creation time. */
|
|
20596
|
+
created_at: string;
|
|
20597
|
+
/** @description Last change. */
|
|
20598
|
+
updated_at: string;
|
|
20599
|
+
safety_warning?: components["schemas"]["SafetyWarning"];
|
|
20600
|
+
};
|
|
20601
|
+
};
|
|
20602
|
+
};
|
|
20603
|
+
/** @description Invalid input. Media rules: up to 20 images (JPEG, PNG, GIF, WEBP, at most 6012 x 6012 px), or one MP4 video, or one PDF, never mixed. Also: an attachment id that is not on this Draft. scheduled_at must be an ISO 8601 date-time with an offset, 5 minutes to 365 days ahead after truncation to the minute. */
|
|
20604
|
+
400: {
|
|
20605
|
+
headers: {
|
|
20606
|
+
[name: string]: unknown;
|
|
20607
|
+
};
|
|
20608
|
+
content: {
|
|
20609
|
+
"application/json": components["schemas"]["Error"];
|
|
20610
|
+
};
|
|
20611
|
+
};
|
|
20612
|
+
/** @description Missing or invalid API key. */
|
|
20613
|
+
401: {
|
|
20614
|
+
headers: {
|
|
20615
|
+
[name: string]: unknown;
|
|
20616
|
+
};
|
|
20617
|
+
content: {
|
|
20618
|
+
"application/json": components["schemas"]["Error"];
|
|
20619
|
+
};
|
|
20620
|
+
};
|
|
20621
|
+
/** @description Forbidden. NO_ACTIVE_SEAT: the account is not attached to an active seat. */
|
|
20622
|
+
403: {
|
|
20623
|
+
headers: {
|
|
20624
|
+
[name: string]: unknown;
|
|
20625
|
+
};
|
|
20626
|
+
content: {
|
|
20627
|
+
"application/json": components["schemas"]["Error"];
|
|
20628
|
+
};
|
|
20629
|
+
};
|
|
20630
|
+
/** @description No such Draft (RESOURCE_NOT_FOUND), or the account_id is not one of yours (ACCOUNT_NOT_FOUND). */
|
|
20631
|
+
404: {
|
|
20632
|
+
headers: {
|
|
20633
|
+
[name: string]: unknown;
|
|
20634
|
+
};
|
|
20635
|
+
content: {
|
|
20636
|
+
"application/json": components["schemas"]["Error"];
|
|
20637
|
+
};
|
|
20638
|
+
};
|
|
20639
|
+
/** @description DRAFT_PUBLISHING: a publish of this Draft is in flight. Read it again in a few seconds. Or the target account is disconnected (REAUTH_REQUIRED). */
|
|
20640
|
+
409: {
|
|
20641
|
+
headers: {
|
|
20642
|
+
[name: string]: unknown;
|
|
20643
|
+
};
|
|
20644
|
+
content: {
|
|
20645
|
+
"application/json": components["schemas"]["Error"];
|
|
20646
|
+
};
|
|
20647
|
+
};
|
|
20648
|
+
/** @description A file is over its size limit: 5 MiB per image, and 5 MiB per file sent inline. */
|
|
20649
|
+
413: {
|
|
20650
|
+
headers: {
|
|
20651
|
+
[name: string]: unknown;
|
|
20652
|
+
};
|
|
20653
|
+
content: {
|
|
20654
|
+
"application/json": components["schemas"]["Error"];
|
|
20655
|
+
};
|
|
20656
|
+
};
|
|
20657
|
+
/** @description DRAFT_LIMIT_REACHED: the bucket (one account, or Drafts with no account) already holds 50 Drafts. MEDIA_QUOTA_EXCEEDED: the media would take the bucket past its 2 GiB quota; nothing is stored. ACCOUNT_REQUIRED: a scheduled Draft cannot drop its account; unschedule it first. ACCOUNT_REQUIRED / DRAFT_NOT_PUBLISHABLE: scheduling needs an account and text. SCHEDULE_CONFLICT: another scheduled Draft on the account is less than 5 minutes away; the message names it. */
|
|
20658
|
+
422: {
|
|
20659
|
+
headers: {
|
|
20660
|
+
[name: string]: unknown;
|
|
20661
|
+
};
|
|
20662
|
+
content: {
|
|
20663
|
+
"application/json": components["schemas"]["Error"];
|
|
20664
|
+
};
|
|
20665
|
+
};
|
|
20666
|
+
/** @description BUDGET_EXHAUSTED with reason activity_window: the scheduled time is outside the account's activity window and the account enforces it. Nothing is saved. */
|
|
20667
|
+
429: {
|
|
20668
|
+
headers: {
|
|
20669
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
20670
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
20671
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
20672
|
+
[name: string]: unknown;
|
|
20673
|
+
};
|
|
20674
|
+
content: {
|
|
20675
|
+
"application/json": components["schemas"]["Error"];
|
|
20676
|
+
};
|
|
20677
|
+
};
|
|
20678
|
+
};
|
|
20679
|
+
};
|
|
20680
|
+
postV1DraftsIdPublish: {
|
|
20681
|
+
parameters: {
|
|
20682
|
+
query?: never;
|
|
20683
|
+
header?: never;
|
|
20684
|
+
path: {
|
|
20685
|
+
/** @description Draft id (drf_...). */
|
|
20686
|
+
id: string;
|
|
20687
|
+
};
|
|
20688
|
+
cookie?: never;
|
|
20689
|
+
};
|
|
20690
|
+
requestBody?: never;
|
|
20691
|
+
responses: {
|
|
20692
|
+
/** @description Published. The Draft and its media are deleted and a publish record is written. No webhook is sent: this response is the result. */
|
|
20693
|
+
201: {
|
|
20694
|
+
headers: {
|
|
20695
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
20696
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
20697
|
+
[name: string]: unknown;
|
|
20698
|
+
};
|
|
20699
|
+
content: {
|
|
20700
|
+
"application/json": {
|
|
20701
|
+
/**
|
|
20702
|
+
* @description Response type discriminator.
|
|
20703
|
+
* @enum {string}
|
|
20704
|
+
*/
|
|
20705
|
+
object: "post_created";
|
|
20706
|
+
/** @description The published post's id. */
|
|
20707
|
+
id: string | null;
|
|
20708
|
+
safety_warning?: components["schemas"]["SafetyWarning"];
|
|
20709
|
+
};
|
|
20710
|
+
};
|
|
20711
|
+
};
|
|
20712
|
+
/** @description Missing or invalid API key. */
|
|
20713
|
+
401: {
|
|
20714
|
+
headers: {
|
|
20715
|
+
[name: string]: unknown;
|
|
20716
|
+
};
|
|
20717
|
+
content: {
|
|
20718
|
+
"application/json": components["schemas"]["Error"];
|
|
20719
|
+
};
|
|
20720
|
+
};
|
|
20721
|
+
/** @description Forbidden. NO_ACTIVE_SEAT: the account is not attached to an active seat. */
|
|
20722
|
+
403: {
|
|
20723
|
+
headers: {
|
|
20724
|
+
[name: string]: unknown;
|
|
20725
|
+
};
|
|
20726
|
+
content: {
|
|
20727
|
+
"application/json": components["schemas"]["Error"];
|
|
20728
|
+
};
|
|
20729
|
+
};
|
|
20730
|
+
/** @description No Draft with this id among yours (RESOURCE_NOT_FOUND). */
|
|
20731
|
+
404: {
|
|
20732
|
+
headers: {
|
|
20733
|
+
[name: string]: unknown;
|
|
20734
|
+
};
|
|
20735
|
+
content: {
|
|
20736
|
+
"application/json": components["schemas"]["Error"];
|
|
20737
|
+
};
|
|
20738
|
+
};
|
|
20739
|
+
/** @description DRAFT_PUBLISHING: a publish of this Draft is in flight. Read it again in a few seconds. */
|
|
20740
|
+
409: {
|
|
20741
|
+
headers: {
|
|
20742
|
+
[name: string]: unknown;
|
|
20743
|
+
};
|
|
20744
|
+
content: {
|
|
20745
|
+
"application/json": components["schemas"]["Error"];
|
|
20746
|
+
};
|
|
20747
|
+
};
|
|
20748
|
+
/** @description ACCOUNT_REQUIRED: the Draft has no account. DRAFT_NOT_PUBLISHABLE: a content gap, the message names the field (for example text: empty). The Draft is unchanged. */
|
|
20749
|
+
422: {
|
|
20750
|
+
headers: {
|
|
20751
|
+
[name: string]: unknown;
|
|
20752
|
+
};
|
|
20753
|
+
content: {
|
|
20754
|
+
"application/json": components["schemas"]["Error"];
|
|
20755
|
+
};
|
|
20756
|
+
};
|
|
20757
|
+
/** @description An account-safety limit or a platform rate limit refused the publish. The Draft is unchanged. */
|
|
20758
|
+
429: {
|
|
20759
|
+
headers: {
|
|
20760
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
20761
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
20762
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
20763
|
+
[name: string]: unknown;
|
|
20764
|
+
};
|
|
20765
|
+
content: {
|
|
20766
|
+
"application/json": components["schemas"]["Error"];
|
|
20767
|
+
};
|
|
20768
|
+
};
|
|
20769
|
+
/** @description The platform refused or failed the publish. The Draft is unchanged; the error says whether a retry can help. */
|
|
20770
|
+
502: {
|
|
20771
|
+
headers: {
|
|
20772
|
+
[name: string]: unknown;
|
|
20773
|
+
};
|
|
20774
|
+
content: {
|
|
20775
|
+
"application/json": components["schemas"]["Error"];
|
|
20776
|
+
};
|
|
20777
|
+
};
|
|
20778
|
+
/** @description PLATFORM_ERROR: the platform did not answer in time. The Draft is unchanged, but the post may still have been published: check the account's posts before publishing again. */
|
|
20779
|
+
504: {
|
|
20780
|
+
headers: {
|
|
20781
|
+
[name: string]: unknown;
|
|
20782
|
+
};
|
|
20783
|
+
content: {
|
|
20784
|
+
"application/json": components["schemas"]["Error"];
|
|
20785
|
+
};
|
|
20786
|
+
};
|
|
20787
|
+
};
|
|
20788
|
+
};
|
|
20789
|
+
postV1DraftsIdAttachments: {
|
|
20790
|
+
parameters: {
|
|
20791
|
+
query: {
|
|
20792
|
+
/** @description The file's name, kept with the attachment. */
|
|
20793
|
+
filename: string;
|
|
20794
|
+
};
|
|
20795
|
+
header?: never;
|
|
20796
|
+
path: {
|
|
20797
|
+
/** @description Draft id (drf_...). */
|
|
20798
|
+
id: string;
|
|
20799
|
+
};
|
|
20800
|
+
cookie?: never;
|
|
20801
|
+
};
|
|
20802
|
+
requestBody: {
|
|
20803
|
+
content: {
|
|
20804
|
+
"video/mp4": string;
|
|
20805
|
+
"application/pdf": string;
|
|
20806
|
+
"image/jpeg": string;
|
|
20807
|
+
"image/png": string;
|
|
20808
|
+
"image/gif": string;
|
|
20809
|
+
"image/webp": string;
|
|
20810
|
+
};
|
|
20811
|
+
};
|
|
20812
|
+
responses: {
|
|
20813
|
+
/** @description The Draft, with the new attachment last in attachments[]. */
|
|
20814
|
+
201: {
|
|
20815
|
+
headers: {
|
|
20816
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
20817
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
20818
|
+
[name: string]: unknown;
|
|
20819
|
+
};
|
|
20820
|
+
content: {
|
|
20821
|
+
"application/json": {
|
|
20822
|
+
/**
|
|
20823
|
+
* @description Response type discriminator.
|
|
20824
|
+
* @enum {string}
|
|
20825
|
+
*/
|
|
20826
|
+
object: "draft";
|
|
20827
|
+
/** @description Draft id (drf_...). */
|
|
20828
|
+
id: string;
|
|
20829
|
+
/** @description The account this Draft will publish as, or null for none yet. */
|
|
20830
|
+
account_id: string | null;
|
|
20831
|
+
/**
|
|
20832
|
+
* @description Derived: failed if failure is set, else scheduled if scheduled_at is set, else draft.
|
|
20833
|
+
* @enum {string}
|
|
20834
|
+
*/
|
|
20835
|
+
status: "draft" | "scheduled" | "failed";
|
|
20836
|
+
/** @description Post body text. May be empty or null while drafting. */
|
|
20837
|
+
text: string | null;
|
|
20838
|
+
/** @description Media, in post order. */
|
|
20839
|
+
attachments: {
|
|
20840
|
+
/** @description Attachment id (att_...). Send {id} in a PATCH attachments list to keep it. */
|
|
20841
|
+
id: string;
|
|
20842
|
+
/** @description The file's type. */
|
|
20843
|
+
content_type: string;
|
|
20844
|
+
/** @description File name. */
|
|
20845
|
+
filename: string;
|
|
20846
|
+
/** @description Stored size in bytes. */
|
|
20847
|
+
size_bytes: number;
|
|
20848
|
+
/** @description Signed download link to the stored file, valid for 1 hour. Read the Draft again for a fresh one. Null when the stored file is unavailable. */
|
|
20849
|
+
url: string | null;
|
|
20850
|
+
}[];
|
|
20851
|
+
/** @description A post to quote or repost when published. */
|
|
20852
|
+
quoted_post_id?: string | null;
|
|
20853
|
+
/**
|
|
20854
|
+
* @description Who can read the post once published.
|
|
20855
|
+
* @enum {string|null}
|
|
20856
|
+
*/
|
|
20857
|
+
can_read?: "anyone" | "relations_only" | null;
|
|
20858
|
+
/**
|
|
20859
|
+
* @description Who may comment once published.
|
|
20860
|
+
* @enum {string|null}
|
|
20861
|
+
*/
|
|
20862
|
+
can_comment?: "anyone" | "relations_only" | "no_one" | null;
|
|
20863
|
+
/** @description Company page id to post as. */
|
|
20864
|
+
post_as?: string | null;
|
|
20865
|
+
/** @description When Curviate publishes the Draft (UTC, whole minute), or null. It goes out up to 20 seconds after this time. A failed Draft has null here; the time that failed is failure.scheduled_at. */
|
|
20866
|
+
scheduled_at: string | null;
|
|
20867
|
+
/** @description Why the last scheduled publish failed; present on failed Drafts only. */
|
|
20868
|
+
failure: {
|
|
20869
|
+
/**
|
|
20870
|
+
* @description Why it failed. outcome_unknown: the platform gave no usable answer, so the post may be live; check the account's posts before you publish again. missed: Curviate could not start within an hour of the time. platform_error and rate_limited: 3 attempts over about 15 minutes all failed.
|
|
20871
|
+
* @enum {string}
|
|
20872
|
+
*/
|
|
20873
|
+
code?: "platform_error" | "rate_limited" | "account_unavailable" | "media_rejected" | "budget_exhausted" | "outside_activity_window" | "no_active_seat" | "not_publishable" | "platform_rejected" | "missed" | "outcome_unknown";
|
|
20874
|
+
/** @description What went wrong and what to do next. Never contains post text. */
|
|
20875
|
+
message?: string;
|
|
20876
|
+
/** @description When it failed. */
|
|
20877
|
+
failed_at?: string;
|
|
20878
|
+
/** @description The time that failed to publish. */
|
|
20879
|
+
scheduled_at?: string;
|
|
20880
|
+
} | null;
|
|
20881
|
+
/** @description Creation time. */
|
|
20882
|
+
created_at: string;
|
|
20883
|
+
/** @description Last change. */
|
|
20884
|
+
updated_at: string;
|
|
20885
|
+
safety_warning?: components["schemas"]["SafetyWarning"];
|
|
20886
|
+
};
|
|
20887
|
+
};
|
|
20888
|
+
};
|
|
20889
|
+
/** @description Invalid input. Media rules: up to 20 images (JPEG, PNG, GIF, WEBP, at most 6012 x 6012 px), or one MP4 video, or one PDF, never mixed. Also: an empty file, a filename missing, or a body that did not carry exactly its Content-Length (a truncated upload; nothing is kept). */
|
|
20890
|
+
400: {
|
|
20891
|
+
headers: {
|
|
20892
|
+
[name: string]: unknown;
|
|
20893
|
+
};
|
|
20894
|
+
content: {
|
|
20895
|
+
"application/json": components["schemas"]["Error"];
|
|
20896
|
+
};
|
|
20897
|
+
};
|
|
20898
|
+
/** @description Missing or invalid API key. */
|
|
20899
|
+
401: {
|
|
20900
|
+
headers: {
|
|
20901
|
+
[name: string]: unknown;
|
|
20902
|
+
};
|
|
20903
|
+
content: {
|
|
20904
|
+
"application/json": components["schemas"]["Error"];
|
|
20905
|
+
};
|
|
20906
|
+
};
|
|
20907
|
+
/** @description Forbidden. NO_ACTIVE_SEAT: the account is not attached to an active seat. */
|
|
20908
|
+
403: {
|
|
20909
|
+
headers: {
|
|
20910
|
+
[name: string]: unknown;
|
|
20911
|
+
};
|
|
20912
|
+
content: {
|
|
20913
|
+
"application/json": components["schemas"]["Error"];
|
|
20914
|
+
};
|
|
20915
|
+
};
|
|
20916
|
+
/** @description No Draft with this id among yours (RESOURCE_NOT_FOUND). */
|
|
19617
20917
|
404: {
|
|
19618
20918
|
headers: {
|
|
19619
20919
|
[name: string]: unknown;
|
|
@@ -19622,47 +20922,8 @@ interface operations {
|
|
|
19622
20922
|
"application/json": components["schemas"]["Error"];
|
|
19623
20923
|
};
|
|
19624
20924
|
};
|
|
19625
|
-
/** @description
|
|
19626
|
-
|
|
19627
|
-
headers: {
|
|
19628
|
-
[name: string]: unknown;
|
|
19629
|
-
};
|
|
19630
|
-
content: {
|
|
19631
|
-
"application/json": components["schemas"]["Error"];
|
|
19632
|
-
};
|
|
19633
|
-
};
|
|
19634
|
-
/** @description Rate limited, slow down and retry after the hinted delay. */
|
|
19635
|
-
429: {
|
|
19636
|
-
headers: {
|
|
19637
|
-
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
19638
|
-
RateLimit: components["headers"]["RateLimit"];
|
|
19639
|
-
"Retry-After": components["headers"]["Retry-After"];
|
|
19640
|
-
[name: string]: unknown;
|
|
19641
|
-
};
|
|
19642
|
-
content: {
|
|
19643
|
-
"application/json": components["schemas"]["Error"];
|
|
19644
|
-
};
|
|
19645
|
-
};
|
|
19646
|
-
/** @description Internal error. */
|
|
19647
|
-
500: {
|
|
19648
|
-
headers: {
|
|
19649
|
-
[name: string]: unknown;
|
|
19650
|
-
};
|
|
19651
|
-
content: {
|
|
19652
|
-
"application/json": components["schemas"]["Error"];
|
|
19653
|
-
};
|
|
19654
|
-
};
|
|
19655
|
-
/** @description A temporary upstream error occurred, or the upstream response could not be interpreted. Check `retry_likely_to_succeed`: a temporary error is worth retrying, a response that could not be interpreted is not, and carries `retry_hint: {"kind": "never"}`. */
|
|
19656
|
-
502: {
|
|
19657
|
-
headers: {
|
|
19658
|
-
[name: string]: unknown;
|
|
19659
|
-
};
|
|
19660
|
-
content: {
|
|
19661
|
-
"application/json": components["schemas"]["Error"];
|
|
19662
|
-
};
|
|
19663
|
-
};
|
|
19664
|
-
/** @description Service unavailable. */
|
|
19665
|
-
503: {
|
|
20925
|
+
/** @description DRAFT_PUBLISHING: a publish of this Draft is in flight. Read it again in a few seconds. */
|
|
20926
|
+
409: {
|
|
19666
20927
|
headers: {
|
|
19667
20928
|
[name: string]: unknown;
|
|
19668
20929
|
};
|
|
@@ -19670,8 +20931,8 @@ interface operations {
|
|
|
19670
20931
|
"application/json": components["schemas"]["Error"];
|
|
19671
20932
|
};
|
|
19672
20933
|
};
|
|
19673
|
-
/** @description
|
|
19674
|
-
|
|
20934
|
+
/** @description INVALID_REQUEST: Content-Length is required; a chunked upload is not accepted. */
|
|
20935
|
+
411: {
|
|
19675
20936
|
headers: {
|
|
19676
20937
|
[name: string]: unknown;
|
|
19677
20938
|
};
|
|
@@ -19679,55 +20940,8 @@ interface operations {
|
|
|
19679
20940
|
"application/json": components["schemas"]["Error"];
|
|
19680
20941
|
};
|
|
19681
20942
|
};
|
|
19682
|
-
|
|
19683
|
-
|
|
19684
|
-
deleteV1AccountIdSavedPostsPostId: {
|
|
19685
|
-
parameters: {
|
|
19686
|
-
query?: never;
|
|
19687
|
-
header?: never;
|
|
19688
|
-
path: {
|
|
19689
|
-
/** @description The account ID (`acc_...`) that performs the unsave. */
|
|
19690
|
-
account_id: string;
|
|
19691
|
-
/** @description The post's id from get_post or any list response. A bare activity id, a URN (activity/ugcPost/share), or a full share URL all work. */
|
|
19692
|
-
post_id: string;
|
|
19693
|
-
};
|
|
19694
|
-
cookie?: never;
|
|
19695
|
-
};
|
|
19696
|
-
requestBody?: never;
|
|
19697
|
-
responses: {
|
|
19698
|
-
/** @description The post is no longer saved. Unsaving a not-currently-saved post just returns 200 again, not an error. */
|
|
19699
|
-
200: {
|
|
19700
|
-
headers: {
|
|
19701
|
-
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
19702
|
-
RateLimit: components["headers"]["RateLimit"];
|
|
19703
|
-
[name: string]: unknown;
|
|
19704
|
-
};
|
|
19705
|
-
content: {
|
|
19706
|
-
"application/json": {
|
|
19707
|
-
/**
|
|
19708
|
-
* @description Response type discriminator.
|
|
19709
|
-
* @enum {string}
|
|
19710
|
-
*/
|
|
19711
|
-
object: "save_result";
|
|
19712
|
-
/** @description true after save_post, false after unsave_post. */
|
|
19713
|
-
saved: boolean;
|
|
19714
|
-
/** @description The target post's activity id, stripped of the urn:li:activity: prefix. */
|
|
19715
|
-
post_id: string;
|
|
19716
|
-
safety_warning?: components["schemas"]["SafetyWarning"];
|
|
19717
|
-
};
|
|
19718
|
-
};
|
|
19719
|
-
};
|
|
19720
|
-
/** @description Missing/malformed account_id, or post_id is not in an accepted form (the `id` from a post read, a bare numeric activity id, a `urn:li:activity:<id>` URN, or a full LinkedIn post URL). */
|
|
19721
|
-
400: {
|
|
19722
|
-
headers: {
|
|
19723
|
-
[name: string]: unknown;
|
|
19724
|
-
};
|
|
19725
|
-
content: {
|
|
19726
|
-
"application/json": components["schemas"]["Error"];
|
|
19727
|
-
};
|
|
19728
|
-
};
|
|
19729
|
-
/** @description Missing or invalid API key. */
|
|
19730
|
-
401: {
|
|
20943
|
+
/** @description PAYLOAD_TOO_LARGE: the file is over its type's limit: 5 MiB per image, 50 MiB for a video, 50 MiB for a PDF. */
|
|
20944
|
+
413: {
|
|
19731
20945
|
headers: {
|
|
19732
20946
|
[name: string]: unknown;
|
|
19733
20947
|
};
|
|
@@ -19735,8 +20949,8 @@ interface operations {
|
|
|
19735
20949
|
"application/json": components["schemas"]["Error"];
|
|
19736
20950
|
};
|
|
19737
20951
|
};
|
|
19738
|
-
/** @description
|
|
19739
|
-
|
|
20952
|
+
/** @description UNSUPPORTED_MEDIA_TYPE: Content-Type is not one of the accepted file types (JSON and multipart bodies included). */
|
|
20953
|
+
415: {
|
|
19740
20954
|
headers: {
|
|
19741
20955
|
[name: string]: unknown;
|
|
19742
20956
|
};
|
|
@@ -19744,8 +20958,8 @@ interface operations {
|
|
|
19744
20958
|
"application/json": components["schemas"]["Error"];
|
|
19745
20959
|
};
|
|
19746
20960
|
};
|
|
19747
|
-
/** @description
|
|
19748
|
-
|
|
20961
|
+
/** @description MEDIA_QUOTA_EXCEEDED: the file would take the bucket past its 2 GiB quota; nothing is stored. */
|
|
20962
|
+
422: {
|
|
19749
20963
|
headers: {
|
|
19750
20964
|
[name: string]: unknown;
|
|
19751
20965
|
};
|
|
@@ -19765,42 +20979,6 @@ interface operations {
|
|
|
19765
20979
|
"application/json": components["schemas"]["Error"];
|
|
19766
20980
|
};
|
|
19767
20981
|
};
|
|
19768
|
-
/** @description Internal error. */
|
|
19769
|
-
500: {
|
|
19770
|
-
headers: {
|
|
19771
|
-
[name: string]: unknown;
|
|
19772
|
-
};
|
|
19773
|
-
content: {
|
|
19774
|
-
"application/json": components["schemas"]["Error"];
|
|
19775
|
-
};
|
|
19776
|
-
};
|
|
19777
|
-
/** @description A temporary upstream error occurred, or the upstream response could not be interpreted. Check `retry_likely_to_succeed`: a temporary error is worth retrying, a response that could not be interpreted is not, and carries `retry_hint: {"kind": "never"}`. */
|
|
19778
|
-
502: {
|
|
19779
|
-
headers: {
|
|
19780
|
-
[name: string]: unknown;
|
|
19781
|
-
};
|
|
19782
|
-
content: {
|
|
19783
|
-
"application/json": components["schemas"]["Error"];
|
|
19784
|
-
};
|
|
19785
|
-
};
|
|
19786
|
-
/** @description Service unavailable. */
|
|
19787
|
-
503: {
|
|
19788
|
-
headers: {
|
|
19789
|
-
[name: string]: unknown;
|
|
19790
|
-
};
|
|
19791
|
-
content: {
|
|
19792
|
-
"application/json": components["schemas"]["Error"];
|
|
19793
|
-
};
|
|
19794
|
-
};
|
|
19795
|
-
/** @description Gateway timeout. */
|
|
19796
|
-
504: {
|
|
19797
|
-
headers: {
|
|
19798
|
-
[name: string]: unknown;
|
|
19799
|
-
};
|
|
19800
|
-
content: {
|
|
19801
|
-
"application/json": components["schemas"]["Error"];
|
|
19802
|
-
};
|
|
19803
|
-
};
|
|
19804
20982
|
};
|
|
19805
20983
|
};
|
|
19806
20984
|
getV1AccountIdRecruiterProfilesUserId: {
|
|
@@ -27958,6 +29136,20 @@ interface operations {
|
|
|
27958
29136
|
items?: {
|
|
27959
29137
|
/** @description Curviate account id (acc_...). */
|
|
27960
29138
|
account_id?: string;
|
|
29139
|
+
/** @description Where LinkedIn sees this account connecting from. country: the configured country (ISO 3166-1 alpha-2), the one the account is set to use. current_country: the country of the connection in use right now; it differs from country only after a fallback, which can happen only when strict is false. mode: auto (a managed connection in country) or custom (your own proxy). strict: true when the account never connects from another country, null when unknown. Each field is null until known; an account connected through ip or your own proxy may show null until the next background refresh. Change it with PATCH /v1/accounts/{account_id} (country), or by reconnecting with country. */
|
|
29140
|
+
connection_location?: {
|
|
29141
|
+
/** @description Configured country (ISO 3166-1 alpha-2). */
|
|
29142
|
+
country?: string | null;
|
|
29143
|
+
/** @description Country of the connection in use right now. */
|
|
29144
|
+
current_country?: string | null;
|
|
29145
|
+
/**
|
|
29146
|
+
* @description auto: managed connection. custom: your own proxy.
|
|
29147
|
+
* @enum {string|null}
|
|
29148
|
+
*/
|
|
29149
|
+
mode?: "auto" | "custom" | null;
|
|
29150
|
+
/** @description true: never connects from another country. */
|
|
29151
|
+
strict?: boolean | null;
|
|
29152
|
+
};
|
|
27961
29153
|
/**
|
|
27962
29154
|
* @description Stable status whitelist.
|
|
27963
29155
|
* @enum {string}
|
|
@@ -28093,6 +29285,20 @@ interface operations {
|
|
|
28093
29285
|
metadata?: {
|
|
28094
29286
|
[key: string]: string;
|
|
28095
29287
|
} | null;
|
|
29288
|
+
/** @description Where LinkedIn sees this account connecting from. country: the configured country (ISO 3166-1 alpha-2), the one the account is set to use. current_country: the country of the connection in use right now; it differs from country only after a fallback, which can happen only when strict is false. mode: auto (a managed connection in country) or custom (your own proxy). strict: true when the account never connects from another country, null when unknown. Each field is null until known; an account connected through ip or your own proxy may show null until the next background refresh. Change it with PATCH /v1/accounts/{account_id} (country), or by reconnecting with country. */
|
|
29289
|
+
connection_location?: {
|
|
29290
|
+
/** @description Configured country (ISO 3166-1 alpha-2). */
|
|
29291
|
+
country?: string | null;
|
|
29292
|
+
/** @description Country of the connection in use right now. */
|
|
29293
|
+
current_country?: string | null;
|
|
29294
|
+
/**
|
|
29295
|
+
* @description auto: managed connection. custom: your own proxy.
|
|
29296
|
+
* @enum {string|null}
|
|
29297
|
+
*/
|
|
29298
|
+
mode?: "auto" | "custom" | null;
|
|
29299
|
+
/** @description true: never connects from another country. */
|
|
29300
|
+
strict?: boolean | null;
|
|
29301
|
+
};
|
|
28096
29302
|
/** @description ISO-8601 UTC creation timestamp of the underlying LinkedIn account, distinct from connected_at. Null until the first background enrichment lands. */
|
|
28097
29303
|
substrate_created_at?: string | null;
|
|
28098
29304
|
/** @description Account-safety rows for this account: one entry per counted action for the current window of its grain, plus the derived total and the invitation backlog. Each row reports where the account stands, what it is allowed, which band that puts it in, what happens at the ceiling, whether the ceiling was raised above the Curviate default, and any active pause the platform caused. Whether a breach is refused or merely reported is `posture`, and the default is to report: nothing here refuses until you configure it to. Pacing is still the caller's responsibility, and nothing on this array paces for you. The per-minute REQUEST ceiling is a different thing and is deliberately not in this array: it protects Curviate's own servers rather than your LinkedIn account, it counts requests where these count platform operations, it is always enforced with HTTP 429 whatever your posture, and its envelope is returned on that refusal. Read this array to see where the account stands; read the safety events surface to see what has already been refused or flagged. */
|
|
@@ -28362,27 +29568,34 @@ interface operations {
|
|
|
28362
29568
|
} | null;
|
|
28363
29569
|
/** @description Your own id for this account's end user (1-255 chars), or null to clear it. Omit to leave it unchanged. */
|
|
28364
29570
|
external_id?: string | null;
|
|
28365
|
-
/** @description
|
|
29571
|
+
/** @description Your own proxy, or null to stop using it and return to a managed location (null requires country in the same request). Omit to leave it unchanged. */
|
|
28366
29572
|
proxy?: {
|
|
28367
29573
|
/**
|
|
28368
|
-
* @description Proxy protocol. One of http, https, socks5.
|
|
29574
|
+
* @description Proxy protocol. One of http, https, socks5, socks4.
|
|
28369
29575
|
* @enum {string}
|
|
28370
29576
|
*/
|
|
28371
|
-
protocol: "http" | "https" | "socks5";
|
|
29577
|
+
protocol: "http" | "https" | "socks5" | "socks4";
|
|
28372
29578
|
/** @description Proxy host or IP. */
|
|
28373
29579
|
host: string;
|
|
28374
29580
|
/** @description Proxy port (1-65535). */
|
|
28375
29581
|
port: number;
|
|
28376
29582
|
/** @description Proxy auth username (optional). */
|
|
28377
29583
|
username?: string;
|
|
28378
|
-
/** @description Proxy auth password (optional).
|
|
29584
|
+
/** @description Proxy auth password (optional). Passed to the connection only: never stored, logged or returned. */
|
|
28379
29585
|
password?: string;
|
|
28380
29586
|
} | null;
|
|
29587
|
+
/**
|
|
29588
|
+
* @description Move this account's connection location to this supported ISO 3166-1 alpha-2 country (e.g. US, DE). LinkedIn sees a new IP in that country and may ask the owner to verify, so change it only when the current location is wrong. Strict unless allow_country_fallback is true. On an account using your own proxy, send proxy: null with it.
|
|
29589
|
+
* @enum {string}
|
|
29590
|
+
*/
|
|
29591
|
+
country?: "AE" | "AO" | "AR" | "AT" | "AU" | "BD" | "BE" | "BG" | "BR" | "CA" | "CH" | "CL" | "CN" | "CO" | "CY" | "CZ" | "DE" | "DK" | "EE" | "EG" | "ES" | "FI" | "FR" | "GB" | "GT" | "HK" | "ID" | "IE" | "IL" | "IN" | "IT" | "JP" | "KR" | "KZ" | "MA" | "MX" | "MY" | "NL" | "NO" | "PA" | "PH" | "PK" | "PL" | "PR" | "PT" | "RO" | "SA" | "SE" | "SG" | "TH" | "TN" | "TR" | "UA" | "US" | "VN" | "ZA";
|
|
29592
|
+
/** @description Optional. false (the default with country or ip): only ever connect from that country; a connect fails when no connection is free there. true: a connection from another country may be used when none is free in the chosen one. Not accepted with proxy. */
|
|
29593
|
+
allow_country_fallback?: boolean;
|
|
28381
29594
|
};
|
|
28382
29595
|
};
|
|
28383
29596
|
};
|
|
28384
29597
|
responses: {
|
|
28385
|
-
/** @description The account
|
|
29598
|
+
/** @description The updated account: the object GET /v1/accounts/{account_id} returns, without quotas and event_log (read those on GET). After a location change, connection_location is re-read from LinkedIn's side, so it shows where the account really connects from now. metadata and external_id are stored by Curviate; a PATCH carrying only those makes no LinkedIn call. */
|
|
28386
29599
|
200: {
|
|
28387
29600
|
headers: {
|
|
28388
29601
|
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
@@ -28397,11 +29610,55 @@ interface operations {
|
|
|
28397
29610
|
*/
|
|
28398
29611
|
object?: "account";
|
|
28399
29612
|
account_id?: string;
|
|
29613
|
+
/** @enum {string} */
|
|
29614
|
+
status?: "active" | "reconnect_needed" | "restricted" | "connecting" | "disconnected";
|
|
29615
|
+
auth_method?: string;
|
|
29616
|
+
full_name?: string | null;
|
|
29617
|
+
headline?: string | null;
|
|
29618
|
+
/** @description ISO-8601 UTC connection timestamp. */
|
|
29619
|
+
connected_at?: string | null;
|
|
29620
|
+
/** @description ISO-8601 UTC time the account state was last checked. */
|
|
29621
|
+
last_checked_at?: string;
|
|
29622
|
+
/** @description The seat this account occupies (null for an admin seatless account). */
|
|
29623
|
+
seat_id?: string | null;
|
|
29624
|
+
/** @description The connection scope this account was last connected with (e.g. ["classic","company","sales_navigator","recruiter"]). A connect asks for every product and LinkedIn activates the ones the account actually has, so this is what was ASKED for, narrowed only by an explicit linkedin_premium on that connect. A linkedin_premium narrowing is not remembered between connects, so this shows what the LAST connect asked for and a reconnect that omits the field widens it again. Null for accounts connected before this was recorded; not attachment truth for Company Pages. */
|
|
29625
|
+
requested_products?: ("classic" | "company" | "sales_navigator" | "recruiter")[] | null;
|
|
29626
|
+
/** @description Your own id for this account's end user, as set on connect or PATCH. Null when none. Not unique. */
|
|
29627
|
+
external_id?: string | null;
|
|
29628
|
+
/** @description Your own flat string map for this account, as last set by PATCH. Null when none. */
|
|
29629
|
+
metadata?: {
|
|
29630
|
+
[key: string]: string;
|
|
29631
|
+
} | null;
|
|
29632
|
+
/** @description Where LinkedIn sees this account connecting from. country: the configured country (ISO 3166-1 alpha-2), the one the account is set to use. current_country: the country of the connection in use right now; it differs from country only after a fallback, which can happen only when strict is false. mode: auto (a managed connection in country) or custom (your own proxy). strict: true when the account never connects from another country, null when unknown. Each field is null until known; an account connected through ip or your own proxy may show null until the next background refresh. Change it with PATCH /v1/accounts/{account_id} (country), or by reconnecting with country. */
|
|
29633
|
+
connection_location?: {
|
|
29634
|
+
/** @description Configured country (ISO 3166-1 alpha-2). */
|
|
29635
|
+
country?: string | null;
|
|
29636
|
+
/** @description Country of the connection in use right now. */
|
|
29637
|
+
current_country?: string | null;
|
|
29638
|
+
/**
|
|
29639
|
+
* @description auto: managed connection. custom: your own proxy.
|
|
29640
|
+
* @enum {string|null}
|
|
29641
|
+
*/
|
|
29642
|
+
mode?: "auto" | "custom" | null;
|
|
29643
|
+
/** @description true: never connects from another country. */
|
|
29644
|
+
strict?: boolean | null;
|
|
29645
|
+
};
|
|
29646
|
+
/** @description ISO-8601 UTC creation timestamp of the underlying LinkedIn account, distinct from connected_at. Null until the first background enrichment lands. */
|
|
29647
|
+
substrate_created_at?: string | null;
|
|
29648
|
+
/** @description Platform conditions this LinkedIn account is currently in, additive to `status` and independent of it. `recruiter_session_evicted`: the account is signed in somewhere else and LinkedIn allows one session at a time for it, so a person has to close the other session; reconnecting will not help. `commercial_use_limited`: LinkedIn's commercial-use limit has tripped, so people search returns only a handful of results per query. It is a paywall, not a penalty, and nothing else about the account is affected. `profile_view_limited`: profile views outside this account's own network are being blocked; first-degree views still work. The two limits are detected from their symptom: LinkedIn publishes no threshold for either, exposes no counter, and lifts neither on request, so no number is reported. `commercial_use_limited` is a present-tense reading and a genuinely narrow search can also produce the shape it looks for, so treat it as a reason to check rather than a certainty; the next people search that returns a full page clears it. An account in none of these reports an empty array. */
|
|
29649
|
+
account_states?: ("recruiter_session_evicted" | "commercial_use_limited" | "profile_view_limited")[];
|
|
29650
|
+
/** @description The account's activity window, the hours in which Curviate reports or refuses live writes to LinkedIn. Reads and anything served from Curviate's own store are never affected, at any hour. Configure it on the account's safety policy. */
|
|
29651
|
+
activity_window?: {
|
|
29652
|
+
/** @description The IANA zone the window is read in, or null when none is set. */
|
|
29653
|
+
timezone?: string | null;
|
|
29654
|
+
/** @description True when no zone is set, which DISABLES the activity window. Curviate never guesses a zone: a guess eight hours wrong inverts the window, refusing every daytime write and permitting every nocturnal one. If you configured a window and it never fires, this is why. */
|
|
29655
|
+
timezone_unset?: boolean;
|
|
29656
|
+
};
|
|
28400
29657
|
safety_warning?: components["schemas"]["SafetyWarning"];
|
|
28401
29658
|
};
|
|
28402
29659
|
};
|
|
28403
29660
|
};
|
|
28404
|
-
/** @description
|
|
29661
|
+
/** @description INVALID_REQUEST: a malformed proxy object; proxy together with country or allow_country_fallback; country on an account that uses your own proxy without proxy: null; allow_country_fallback alone on such an account; an unsupported country; ip (not changeable after connect; reconnect with ip instead); metadata over its limits (16 keys, key 40 chars, value 500); external_id outside 1-255 chars. CONNECTION_LOCATION_REQUIRED: proxy: null without country (clearing your own proxy alone would let the connection land anywhere). */
|
|
28405
29662
|
400: {
|
|
28406
29663
|
headers: {
|
|
28407
29664
|
[name: string]: unknown;
|
|
@@ -28419,6 +29676,15 @@ interface operations {
|
|
|
28419
29676
|
"application/json": components["schemas"]["Error"];
|
|
28420
29677
|
};
|
|
28421
29678
|
};
|
|
29679
|
+
/** @description REAUTH_REQUIRED: the account is disconnected, so its location cannot change in place. Reconnect it (POST /v1/auth/intent with account_id) and pass country there. */
|
|
29680
|
+
409: {
|
|
29681
|
+
headers: {
|
|
29682
|
+
[name: string]: unknown;
|
|
29683
|
+
};
|
|
29684
|
+
content: {
|
|
29685
|
+
"application/json": components["schemas"]["Error"];
|
|
29686
|
+
};
|
|
29687
|
+
};
|
|
28422
29688
|
/** @description Payload too large, the request body exceeds the size limit. */
|
|
28423
29689
|
413: {
|
|
28424
29690
|
headers: {
|
|
@@ -28428,6 +29694,15 @@ interface operations {
|
|
|
28428
29694
|
"application/json": components["schemas"]["Error"];
|
|
28429
29695
|
};
|
|
28430
29696
|
};
|
|
29697
|
+
/** @description CONNECTION_LOCATION_UNAVAILABLE: no connection is free in that country right now, or the account did not end up there. When the change was applied but landed elsewhere, the body carries connection_location with where the account connects from now. Try a nearby country, or allow fallback. */
|
|
29698
|
+
422: {
|
|
29699
|
+
headers: {
|
|
29700
|
+
[name: string]: unknown;
|
|
29701
|
+
};
|
|
29702
|
+
content: {
|
|
29703
|
+
"application/json": components["schemas"]["Error"];
|
|
29704
|
+
};
|
|
29705
|
+
};
|
|
28431
29706
|
/** @description Rate limited, slow down and retry after the hinted delay. */
|
|
28432
29707
|
429: {
|
|
28433
29708
|
headers: {
|
|
@@ -28616,24 +29891,29 @@ interface operations {
|
|
|
28616
29891
|
external_id?: string;
|
|
28617
29892
|
/** @description Optional allow-list of premium products to ask for: sales_navigator, recruiter. Omit to ask for both; [] asks for none. Classic LinkedIn and company pages are always included. */
|
|
28618
29893
|
products?: ("sales_navigator" | "recruiter")[];
|
|
28619
|
-
/**
|
|
28620
|
-
|
|
28621
|
-
|
|
29894
|
+
/**
|
|
29895
|
+
* @description Where LinkedIn sees this account connecting from: a supported ISO 3166-1 alpha-2 country code (e.g. US, DE; case-insensitive). Pick the country the account owner normally signs in from. A new connect needs exactly one of country, ip or proxy. Strict by default: the connect fails rather than use another country, unless allow_country_fallback is true.
|
|
29896
|
+
* @enum {string}
|
|
29897
|
+
*/
|
|
29898
|
+
country?: "AE" | "AO" | "AR" | "AT" | "AU" | "BD" | "BE" | "BG" | "BR" | "CA" | "CH" | "CL" | "CN" | "CO" | "CY" | "CZ" | "DE" | "DK" | "EE" | "EG" | "ES" | "FI" | "FR" | "GB" | "GT" | "HK" | "ID" | "IE" | "IL" | "IN" | "IT" | "JP" | "KR" | "KZ" | "MA" | "MX" | "MY" | "NL" | "NO" | "PA" | "PH" | "PK" | "PL" | "PR" | "PT" | "RO" | "SA" | "SE" | "SG" | "TH" | "TN" | "TR" | "UA" | "US" | "VN" | "ZA";
|
|
29899
|
+
/** @description A public IPv4 address; its country becomes the connection location (strict by default). An alternative to country: send exactly one of country, ip or proxy on a new connect. */
|
|
28622
29900
|
ip?: string;
|
|
28623
|
-
/** @description
|
|
29901
|
+
/** @description Optional. false (the default with country or ip): only ever connect from that country; a connect fails when no connection is free there. true: a connection from another country may be used when none is free in the chosen one. Not accepted with proxy. */
|
|
29902
|
+
allow_country_fallback?: boolean;
|
|
29903
|
+
/** @description Your own proxy for this account's traffic. The proxy decides where LinkedIn sees the account connecting from, so country, ip and allow_country_fallback are not accepted with it. */
|
|
28624
29904
|
proxy?: {
|
|
28625
29905
|
/**
|
|
28626
|
-
* @description Proxy protocol. One of http, https, socks5.
|
|
29906
|
+
* @description Proxy protocol. One of http, https, socks5, socks4.
|
|
28627
29907
|
* @enum {string}
|
|
28628
29908
|
*/
|
|
28629
|
-
protocol: "http" | "https" | "socks5";
|
|
29909
|
+
protocol: "http" | "https" | "socks5" | "socks4";
|
|
28630
29910
|
/** @description Proxy host or IP. */
|
|
28631
29911
|
host: string;
|
|
28632
29912
|
/** @description Proxy port (1-65535). */
|
|
28633
29913
|
port: number;
|
|
28634
29914
|
/** @description Proxy auth username (optional). */
|
|
28635
29915
|
username?: string;
|
|
28636
|
-
/** @description Proxy auth password (optional).
|
|
29916
|
+
/** @description Proxy auth password (optional). Passed to the connection only: never stored, logged or returned. */
|
|
28637
29917
|
password?: string;
|
|
28638
29918
|
};
|
|
28639
29919
|
/** @description Exact browser User-Agent to pin for this account. REQUIRED for a cookie connect: send the User-Agent of the browser the li_at cookie was copied from. Optional for a credentials connect, where it helps an account that hits disconnection issues. */
|
|
@@ -28670,6 +29950,22 @@ interface operations {
|
|
|
28670
29950
|
status?: "active";
|
|
28671
29951
|
/** @description Your own id for this account's end user, as set on connect or PATCH. Null when none. Not unique. */
|
|
28672
29952
|
external_id?: string | null;
|
|
29953
|
+
/** @description Where LinkedIn sees this account connecting from. country: the configured country (ISO 3166-1 alpha-2), the one the account is set to use. current_country: the country of the connection in use right now; it differs from country only after a fallback, which can happen only when strict is false. mode: auto (a managed connection in country) or custom (your own proxy). strict: true when the account never connects from another country, null when unknown. Each field is null until known; an account connected through ip or your own proxy may show null until the next background refresh. Change it with PATCH /v1/accounts/{account_id} (country), or by reconnecting with country. */
|
|
29954
|
+
connection_location?: {
|
|
29955
|
+
/** @description Configured country (ISO 3166-1 alpha-2). */
|
|
29956
|
+
country?: string | null;
|
|
29957
|
+
/** @description Country of the connection in use right now. */
|
|
29958
|
+
current_country?: string | null;
|
|
29959
|
+
/**
|
|
29960
|
+
* @description auto: managed connection. custom: your own proxy.
|
|
29961
|
+
* @enum {string|null}
|
|
29962
|
+
*/
|
|
29963
|
+
mode?: "auto" | "custom" | null;
|
|
29964
|
+
/** @description true: never connects from another country. */
|
|
29965
|
+
strict?: boolean | null;
|
|
29966
|
+
/** @description Present only when this connect landed on an account you already had and changed its configured country (to another one, to unknown with ip, or to your own proxy). It names the country before. */
|
|
29967
|
+
previous_country?: string;
|
|
29968
|
+
};
|
|
28673
29969
|
safety_warning?: components["schemas"]["SafetyWarning"];
|
|
28674
29970
|
};
|
|
28675
29971
|
};
|
|
@@ -28706,6 +30002,22 @@ interface operations {
|
|
|
28706
30002
|
external_id?: string | null;
|
|
28707
30003
|
/** @description Present and true only when this connect reactivated an account you had previously disconnected, instead of opening a brand-new one. Absent on a normal connect. The account keeps its original id, and its status reflects its real observed state, which may need a reconnect. */
|
|
28708
30004
|
recovered?: boolean;
|
|
30005
|
+
/** @description Where LinkedIn sees this account connecting from. country: the configured country (ISO 3166-1 alpha-2), the one the account is set to use. current_country: the country of the connection in use right now; it differs from country only after a fallback, which can happen only when strict is false. mode: auto (a managed connection in country) or custom (your own proxy). strict: true when the account never connects from another country, null when unknown. Each field is null until known; an account connected through ip or your own proxy may show null until the next background refresh. Change it with PATCH /v1/accounts/{account_id} (country), or by reconnecting with country. */
|
|
30006
|
+
connection_location?: {
|
|
30007
|
+
/** @description Configured country (ISO 3166-1 alpha-2). */
|
|
30008
|
+
country?: string | null;
|
|
30009
|
+
/** @description Country of the connection in use right now. */
|
|
30010
|
+
current_country?: string | null;
|
|
30011
|
+
/**
|
|
30012
|
+
* @description auto: managed connection. custom: your own proxy.
|
|
30013
|
+
* @enum {string|null}
|
|
30014
|
+
*/
|
|
30015
|
+
mode?: "auto" | "custom" | null;
|
|
30016
|
+
/** @description true: never connects from another country. */
|
|
30017
|
+
strict?: boolean | null;
|
|
30018
|
+
/** @description Present only when this connect landed on an account you already had and changed its configured country (to another one, to unknown with ip, or to your own proxy). It names the country before. */
|
|
30019
|
+
previous_country?: string;
|
|
30020
|
+
};
|
|
28709
30021
|
safety_warning?: components["schemas"]["SafetyWarning"];
|
|
28710
30022
|
};
|
|
28711
30023
|
};
|
|
@@ -28755,7 +30067,7 @@ interface operations {
|
|
|
28755
30067
|
};
|
|
28756
30068
|
};
|
|
28757
30069
|
};
|
|
28758
|
-
/** @description INVALID_REQUEST. The most common causes: the auth block is at the top level instead of nested (send `credentials: { email, password }` or `cookie: { li_at }`, not bare `email`/`password`/`li_at`); `seat_id` is missing on a new connect; or a cookie connect has no top-level `user_agent`. SEAT_NOT_FOUND if the seat id is unknown or is not yours. */
|
|
30070
|
+
/** @description CONNECTION_LOCATION_REQUIRED: a new connect names no location; send exactly one of `country` (a supported ISO code, e.g. `US`), `ip` (a public IPv4) or your own `proxy`. INVALID_REQUEST. The most common causes: two location sources at once (`ip` overrides `country`, `proxy` overrides both, so send one); an unsupported `country` (use `proxy` for a location we don't serve); a private or reserved `ip`; `allow_country_fallback` together with `proxy`; your own proxy rejected its credentials, could not be reached or timed out (the message names which); the auth block is at the top level instead of nested (send `credentials: { email, password }` or `cookie: { li_at }`, not bare `email`/`password`/`li_at`); `seat_id` is missing on a new connect; or a cookie connect has no top-level `user_agent`. SEAT_NOT_FOUND if the seat id is unknown or is not yours. */
|
|
28759
30071
|
400: {
|
|
28760
30072
|
headers: {
|
|
28761
30073
|
[name: string]: unknown;
|
|
@@ -28791,7 +30103,7 @@ interface operations {
|
|
|
28791
30103
|
"application/json": components["schemas"]["Error"];
|
|
28792
30104
|
};
|
|
28793
30105
|
};
|
|
28794
|
-
/** @description
|
|
30106
|
+
/** @description ACCOUNT_ALREADY_LINKED: this LinkedIn account is already linked. It names your own account_id when your tenant owns it; otherwise no id is named, it is not one you can manage here, and retrying will not help. CONNECTION_IN_PROGRESS: another connection attempt for this identity is open; wait for it to finish or expire. */
|
|
28795
30107
|
409: {
|
|
28796
30108
|
headers: {
|
|
28797
30109
|
[name: string]: unknown;
|
|
@@ -28809,7 +30121,7 @@ interface operations {
|
|
|
28809
30121
|
"application/json": components["schemas"]["Error"];
|
|
28810
30122
|
};
|
|
28811
30123
|
};
|
|
28812
|
-
/** @description
|
|
30124
|
+
/** @description CONNECTION_LOCATION_UNAVAILABLE: no connection is free in the country you chose right now (it is strict); try a nearby country, or send allow_country_fallback: true. Also returned when the connect re-attached an account you already had and its location could not be changed here (sent as ip): the body carries connection_location, and PATCH /v1/accounts/{account_id} with country moves it. CHECKPOINT_UNSUPPORTED: the verification challenge cannot be resolved automatically (a dead-end challenge such as a CAPTCHA or a phone-number registration). For those two dead-ends the error body carries a machine-readable challenge_type (captcha | phone_register) so a client can render the right guidance; other unsupported challenges carry no challenge_type. */
|
|
28813
30125
|
422: {
|
|
28814
30126
|
headers: {
|
|
28815
30127
|
[name: string]: unknown;
|
|
@@ -28914,6 +30226,22 @@ interface operations {
|
|
|
28914
30226
|
external_id?: string | null;
|
|
28915
30227
|
/** @description Present and true only when this connect reactivated an account you had previously disconnected, instead of opening a brand-new one. Absent on a normal connect. The account keeps its original id, and its status reflects its real observed state, which may need a reconnect. */
|
|
28916
30228
|
recovered?: boolean;
|
|
30229
|
+
/** @description Where LinkedIn sees this account connecting from. country: the configured country (ISO 3166-1 alpha-2), the one the account is set to use. current_country: the country of the connection in use right now; it differs from country only after a fallback, which can happen only when strict is false. mode: auto (a managed connection in country) or custom (your own proxy). strict: true when the account never connects from another country, null when unknown. Each field is null until known; an account connected through ip or your own proxy may show null until the next background refresh. Change it with PATCH /v1/accounts/{account_id} (country), or by reconnecting with country. */
|
|
30230
|
+
connection_location?: {
|
|
30231
|
+
/** @description Configured country (ISO 3166-1 alpha-2). */
|
|
30232
|
+
country?: string | null;
|
|
30233
|
+
/** @description Country of the connection in use right now. */
|
|
30234
|
+
current_country?: string | null;
|
|
30235
|
+
/**
|
|
30236
|
+
* @description auto: managed connection. custom: your own proxy.
|
|
30237
|
+
* @enum {string|null}
|
|
30238
|
+
*/
|
|
30239
|
+
mode?: "auto" | "custom" | null;
|
|
30240
|
+
/** @description true: never connects from another country. */
|
|
30241
|
+
strict?: boolean | null;
|
|
30242
|
+
/** @description Present only when this connect landed on an account you already had and changed its configured country (to another one, to unknown with ip, or to your own proxy). It names the country before. */
|
|
30243
|
+
previous_country?: string;
|
|
30244
|
+
};
|
|
28917
30245
|
safety_warning?: components["schemas"]["SafetyWarning"];
|
|
28918
30246
|
};
|
|
28919
30247
|
};
|
|
@@ -28997,7 +30325,7 @@ interface operations {
|
|
|
28997
30325
|
"application/json": components["schemas"]["Error"];
|
|
28998
30326
|
};
|
|
28999
30327
|
};
|
|
29000
|
-
/** @description The submitted code was incorrect, or the challenge type is unsupported. */
|
|
30328
|
+
/** @description The submitted code was incorrect, or the challenge type is unsupported. CONNECTION_LOCATION_UNAVAILABLE: the connect completed onto an account you already had, and the location you sent could not be applied (no connection free in that country, or it was an ip); the account stays connected, the body carries its actual connection_location, and PATCH /v1/accounts/{account_id} with country moves it. */
|
|
29001
30329
|
422: {
|
|
29002
30330
|
headers: {
|
|
29003
30331
|
[name: string]: unknown;
|
|
@@ -29293,6 +30621,22 @@ interface operations {
|
|
|
29293
30621
|
attached_seat_id?: string | null;
|
|
29294
30622
|
/** @description Your own id for this account's end user, as passed on connect. Present on status:"active". */
|
|
29295
30623
|
external_id?: string | null;
|
|
30624
|
+
/** @description Where LinkedIn sees this account connecting from. country: the configured country (ISO 3166-1 alpha-2), the one the account is set to use. current_country: the country of the connection in use right now; it differs from country only after a fallback, which can happen only when strict is false. mode: auto (a managed connection in country) or custom (your own proxy). strict: true when the account never connects from another country, null when unknown. Each field is null until known; an account connected through ip or your own proxy may show null until the next background refresh. Change it with PATCH /v1/accounts/{account_id} (country), or by reconnecting with country. Present on object:"account". */
|
|
30625
|
+
connection_location?: {
|
|
30626
|
+
/** @description Configured country (ISO 3166-1 alpha-2). */
|
|
30627
|
+
country?: string | null;
|
|
30628
|
+
/** @description Country of the connection in use right now. */
|
|
30629
|
+
current_country?: string | null;
|
|
30630
|
+
/**
|
|
30631
|
+
* @description auto: managed connection. custom: your own proxy.
|
|
30632
|
+
* @enum {string|null}
|
|
30633
|
+
*/
|
|
30634
|
+
mode?: "auto" | "custom" | null;
|
|
30635
|
+
/** @description true: never connects from another country. */
|
|
30636
|
+
strict?: boolean | null;
|
|
30637
|
+
/** @description Present only when this connect landed on an account you already had and changed its configured country (to another one, to unknown with ip, or to your own proxy). It names the country before. */
|
|
30638
|
+
previous_country?: string;
|
|
30639
|
+
};
|
|
29296
30640
|
/** @description ISO-8601 expiry. Present on status:"pending" and status:"checkpoint_required". */
|
|
29297
30641
|
expires_at?: string;
|
|
29298
30642
|
/**
|
|
@@ -29347,7 +30691,7 @@ interface operations {
|
|
|
29347
30691
|
"application/json": components["schemas"]["Error"];
|
|
29348
30692
|
};
|
|
29349
30693
|
};
|
|
29350
|
-
/** @description The pending checkpoint is code-based, not mobile_app_approval, use submit instead. */
|
|
30694
|
+
/** @description The pending checkpoint is code-based, not mobile_app_approval, use submit instead. CONNECTION_LOCATION_UNAVAILABLE: the approval completed onto an account you already had, and the location you sent could not be applied; the account stays connected, the body carries its actual connection_location, and PATCH /v1/accounts/{account_id} with country moves it. */
|
|
29351
30695
|
422: {
|
|
29352
30696
|
headers: {
|
|
29353
30697
|
[name: string]: unknown;
|
|
@@ -30014,7 +31358,7 @@ interface operations {
|
|
|
30014
31358
|
* @description The event source this webhook subscribes to.
|
|
30015
31359
|
* @enum {string}
|
|
30016
31360
|
*/
|
|
30017
|
-
source?: "messaging" | "user" | "account_status";
|
|
31361
|
+
source?: "messaging" | "user" | "account_status" | "post";
|
|
30018
31362
|
/** @description The URL that receives delivery POST requests. */
|
|
30019
31363
|
request_url?: string;
|
|
30020
31364
|
name?: string | null;
|
|
@@ -30176,6 +31520,30 @@ interface operations {
|
|
|
30176
31520
|
}[];
|
|
30177
31521
|
/** @description Account-status events to subscribe to (default: all 12 lifecycle events) */
|
|
30178
31522
|
events?: ("account.created" | "account.connected" | "account.synced" | "account.reconnected" | "account.reconnect_needed" | "account.restricted" | "account.creation_failed" | "account.disconnected" | "account.error" | "account.paused" | "account.connecting" | "account.permission_revoked" | "account.initial_sync.running" | "account.initial_sync.completed" | "account.initial_sync.failed")[];
|
|
31523
|
+
} | {
|
|
31524
|
+
/** @constant */
|
|
31525
|
+
source: "post";
|
|
31526
|
+
/** @description HTTPS URL that receives webhook deliveries. Must be a publicly reachable host on the default https port; private, loopback and link-local addresses are rejected. */
|
|
31527
|
+
request_url: string;
|
|
31528
|
+
/** @description Human-readable name for this webhook (1-100 chars) */
|
|
31529
|
+
name?: string;
|
|
31530
|
+
/** @description Per-account targeting. Required and non-empty; each id must be an acc_-prefixed id owned by the tenant. */
|
|
31531
|
+
account_ids: string[];
|
|
31532
|
+
/**
|
|
31533
|
+
* @description A disabled webhook is created but delivers nothing
|
|
31534
|
+
* @default true
|
|
31535
|
+
*/
|
|
31536
|
+
enabled?: boolean;
|
|
31537
|
+
/**
|
|
31538
|
+
* @description Custom headers added to each delivery POST. Names must be valid HTTP header names and values must be printable ASCII (no line breaks or control characters). Reserved names are rejected at registration; they include Content-Type, User-Agent, Host, any Curviate-* or Sec-* name, and the hop-by-hop headers. At most 10 headers, 1024 characters per value, 4096 bytes in total. Custom headers are not covered by the delivery signature, so treat them as a hint, not as proof of origin. Values are encrypted at rest and are never returned by a read. A read shows the header name plus a 8-character keyed fingerprint of the value, which carries no part of the value and no indication of its length. It is deterministic within your account, so a fingerprint confirms a rotation took effect and tells you whether two of your webhooks carry the same credential; fingerprints are not comparable across accounts. The header name is what identifies which credential is configured.
|
|
31539
|
+
* @default []
|
|
31540
|
+
*/
|
|
31541
|
+
headers?: {
|
|
31542
|
+
key: string;
|
|
31543
|
+
value: string;
|
|
31544
|
+
}[];
|
|
31545
|
+
/** @description Post events to subscribe to (default: both post.published and post.publish_failed) */
|
|
31546
|
+
events?: ("post.published" | "post.publish_failed")[];
|
|
30179
31547
|
};
|
|
30180
31548
|
};
|
|
30181
31549
|
};
|
|
@@ -30200,7 +31568,7 @@ interface operations {
|
|
|
30200
31568
|
* @description The event source this webhook subscribes to.
|
|
30201
31569
|
* @enum {string}
|
|
30202
31570
|
*/
|
|
30203
|
-
source?: "messaging" | "user" | "account_status";
|
|
31571
|
+
source?: "messaging" | "user" | "account_status" | "post";
|
|
30204
31572
|
/** @description The URL that receives delivery POST requests. */
|
|
30205
31573
|
request_url?: string;
|
|
30206
31574
|
/** @description Human-readable label. */
|
|
@@ -30218,7 +31586,7 @@ interface operations {
|
|
|
30218
31586
|
}[];
|
|
30219
31587
|
/** @description Canonical event names this webhook subscribes to. */
|
|
30220
31588
|
events?: string[];
|
|
30221
|
-
/** @description Field-remapping keys for the delivery payload (messaging and user sources only). */
|
|
31589
|
+
/** @description Field-remapping keys for the delivery payload (messaging and user sources only; post and account_status have none). */
|
|
30222
31590
|
data?: string[];
|
|
30223
31591
|
/**
|
|
30224
31592
|
* @description HMAC signing secret, 64 hexadecimal characters, returned exactly once at creation. Store it securely.
|
|
@@ -30320,7 +31688,7 @@ interface operations {
|
|
|
30320
31688
|
object?: "webhook_event_catalogue";
|
|
30321
31689
|
/** @description Event types grouped by source. */
|
|
30322
31690
|
sources?: {
|
|
30323
|
-
/** @description Event source group (messaging, user, account_status, recruiter, sales_nav). */
|
|
31691
|
+
/** @description Event source group (messaging, user, account_status, post, recruiter, sales_nav). */
|
|
30324
31692
|
source?: string;
|
|
30325
31693
|
events?: {
|
|
30326
31694
|
/** @description Canonical event name. */
|
|
@@ -30478,7 +31846,7 @@ interface operations {
|
|
|
30478
31846
|
* @description The event source this webhook subscribes to (immutable).
|
|
30479
31847
|
* @enum {string}
|
|
30480
31848
|
*/
|
|
30481
|
-
source?: "messaging" | "user" | "account_status";
|
|
31849
|
+
source?: "messaging" | "user" | "account_status" | "post";
|
|
30482
31850
|
/** @description The URL that receives delivery POST requests. */
|
|
30483
31851
|
request_url?: string;
|
|
30484
31852
|
/** @description Human-readable label. */
|
|
@@ -30496,7 +31864,7 @@ interface operations {
|
|
|
30496
31864
|
}[];
|
|
30497
31865
|
/** @description Canonical event names this webhook subscribes to. */
|
|
30498
31866
|
events?: string[];
|
|
30499
|
-
/** @description Field-remapping keys for the delivery payload (messaging and user sources only). */
|
|
31867
|
+
/** @description Field-remapping keys for the delivery payload (messaging and user sources only; post and account_status have none). */
|
|
30500
31868
|
data?: string[];
|
|
30501
31869
|
/** @description First 8 characters of the signing secret. The full secret is never returned on edit, it is preserved unchanged. */
|
|
30502
31870
|
secret_prefix?: string;
|
|
@@ -30674,7 +32042,7 @@ interface operations {
|
|
|
30674
32042
|
* @description The event source this webhook subscribes to (immutable).
|
|
30675
32043
|
* @enum {string}
|
|
30676
32044
|
*/
|
|
30677
|
-
source?: "messaging" | "user" | "account_status";
|
|
32045
|
+
source?: "messaging" | "user" | "account_status" | "post";
|
|
30678
32046
|
/** @description The URL that receives delivery POST requests. */
|
|
30679
32047
|
request_url?: string;
|
|
30680
32048
|
/** @description Human-readable label. */
|
|
@@ -30692,7 +32060,7 @@ interface operations {
|
|
|
30692
32060
|
}[];
|
|
30693
32061
|
/** @description Canonical event names this webhook subscribes to. */
|
|
30694
32062
|
events?: string[];
|
|
30695
|
-
/** @description Field-remapping keys for the delivery payload (messaging and user sources only). */
|
|
32063
|
+
/** @description Field-remapping keys for the delivery payload (messaging and user sources only; post and account_status have none). */
|
|
30696
32064
|
data?: string[];
|
|
30697
32065
|
/** @description First 8 characters of the signing secret. The full secret is never returned on edit, it is preserved unchanged. */
|
|
30698
32066
|
secret_prefix?: string;
|
|
@@ -31797,7 +33165,7 @@ interface operations {
|
|
|
31797
33165
|
"application/json": components["schemas"]["Error"];
|
|
31798
33166
|
};
|
|
31799
33167
|
};
|
|
31800
|
-
/** @description
|
|
33168
|
+
/** @description No seats were added. Branch on retry_likely_to_succeed. true: today's charge was refunded in full and the seat count was confirmed unchanged, so a retry is safe. false: whether today's charge went through could not be confirmed; a retry is a new purchase and could charge twice, so check your invoices first. */
|
|
31801
33169
|
502: {
|
|
31802
33170
|
headers: {
|
|
31803
33171
|
[name: string]: unknown;
|
|
@@ -32081,7 +33449,7 @@ declare class AccountsResource {
|
|
|
32081
33449
|
* const { items } = await curviate.accounts.listSeats();
|
|
32082
33450
|
* const free = items.find((seat) => !seat.occupied);
|
|
32083
33451
|
* if (!free) throw new Error("No seat is free to connect to right now (add a seat, or check billing).");
|
|
32084
|
-
* await curviate.auth.intent({ seat_id: free.seat_id, auth_method: "cookie", cookie: { li_at }, user_agent });
|
|
33452
|
+
* await curviate.auth.intent({ seat_id: free.seat_id, auth_method: "cookie", cookie: { li_at }, user_agent, country: "US" });
|
|
32085
33453
|
*/
|
|
32086
33454
|
listSeats(): Promise<SeatList>;
|
|
32087
33455
|
/**
|
|
@@ -32128,13 +33496,30 @@ declare class AccountsResource {
|
|
|
32128
33496
|
* `metadata` is a flat string->string map (at most 16 keys, key 40 chars,
|
|
32129
33497
|
* value 500) that **replaces** the stored map wholesale; `null` clears it.
|
|
32130
33498
|
* Both are stored by Curviate, read back on `get`/`list`, and a PATCH
|
|
32131
|
-
* carrying only them makes no LinkedIn call.
|
|
32132
|
-
*
|
|
32133
|
-
*
|
|
32134
|
-
*
|
|
33499
|
+
* carrying only them makes no LinkedIn call.
|
|
33500
|
+
*
|
|
33501
|
+
* `country` moves the account's connection location to that supported ISO
|
|
33502
|
+
* country. LinkedIn sees a new IP there and may ask the owner to verify, so
|
|
33503
|
+
* change it only when the current location is wrong. Strict unless
|
|
33504
|
+
* `allow_country_fallback: true`; `allow_country_fallback` alone changes the
|
|
33505
|
+
* strictness of the configured country. `proxy` sets your own proxy; `null`
|
|
33506
|
+
* returns to a managed location and **requires** a `country` in the same
|
|
33507
|
+
* call (else `CONNECTION_LOCATION_REQUIRED`), and an account on your own
|
|
33508
|
+
* proxy can only take a `country` together with `proxy: null`. The
|
|
33509
|
+
* `proxy.password`, if given, is never returned.
|
|
33510
|
+
*
|
|
33511
|
+
* Returns the account (as `get` returns it, without `quotas` and
|
|
33512
|
+
* `event_log`). After a location change its `connection_location` is re-read,
|
|
33513
|
+
* so it shows where the account really connects from now. A change that did
|
|
33514
|
+
* not land where asked throws `CONNECTION_LOCATION_UNAVAILABLE`, whose
|
|
33515
|
+
* `connectionLocation` carries the actual location.
|
|
32135
33516
|
*
|
|
32136
33517
|
* @example
|
|
32137
33518
|
* await curviate.accounts.update("acc_123", { external_id: "usr_42", metadata: { plan: "pro" } });
|
|
33519
|
+
*
|
|
33520
|
+
* @example
|
|
33521
|
+
* const account = await curviate.accounts.update("acc_123", { country: "DE" });
|
|
33522
|
+
* console.log(account.connection_location?.country); // "DE"
|
|
32138
33523
|
*/
|
|
32139
33524
|
update(accountId: string, body: AccountUpdateBody): Promise<AccountUpdateResult>;
|
|
32140
33525
|
/**
|
|
@@ -32143,7 +33528,7 @@ declare class AccountsResource {
|
|
|
32143
33528
|
disconnect(accountId: string): Promise<AccountDisconnectResult>;
|
|
32144
33529
|
/**
|
|
32145
33530
|
* Buy seats on the workspace's active subscription. Returns the new
|
|
32146
|
-
* `seat_ids`; connect an account into one with `auth.intent({ seat_id })`.
|
|
33531
|
+
* `seat_ids`; connect an account into one with `auth.intent({ seat_id, country, ... })`.
|
|
32147
33532
|
*
|
|
32148
33533
|
* Every call buys the `qty` it asks for, so a repeated call buys again.
|
|
32149
33534
|
* The SDK never retries it for you. A
|
|
@@ -32204,8 +33589,53 @@ declare class AccountsResource {
|
|
|
32204
33589
|
* a mid-flight connect/reconnect, never a path placeholder.
|
|
32205
33590
|
*/
|
|
32206
33591
|
|
|
32207
|
-
/** `POST /v1/auth/intent` request body. */
|
|
32208
|
-
type
|
|
33592
|
+
/** `POST /v1/auth/intent` request body, as the served document declares it (every location key optional). */
|
|
33593
|
+
type IntentWireBody = paths["/v1/auth/intent"]["post"]["requestBody"]["content"]["application/json"];
|
|
33594
|
+
/** A supported connection-location country (ISO 3166-1 alpha-2), the served enum. */
|
|
33595
|
+
type ConnectionCountry = NonNullable<IntentWireBody["country"]>;
|
|
33596
|
+
type LocationKeys = "country" | "ip" | "proxy" | "allow_country_fallback";
|
|
33597
|
+
/**
|
|
33598
|
+
* Where LinkedIn sees the account connecting from: exactly one of `country`,
|
|
33599
|
+
* `ip` or your own `proxy`. The served document cannot express "exactly one",
|
|
33600
|
+
* so the SDK does: two sources, or `allow_country_fallback` with `proxy`, is a
|
|
33601
|
+
* compile error here and a 400 on the wire.
|
|
33602
|
+
*/
|
|
33603
|
+
type ConnectionLocationSource = {
|
|
33604
|
+
country: ConnectionCountry;
|
|
33605
|
+
ip?: never;
|
|
33606
|
+
proxy?: never;
|
|
33607
|
+
allow_country_fallback?: boolean;
|
|
33608
|
+
} | {
|
|
33609
|
+
ip: string;
|
|
33610
|
+
country?: never;
|
|
33611
|
+
proxy?: never;
|
|
33612
|
+
allow_country_fallback?: boolean;
|
|
33613
|
+
} | {
|
|
33614
|
+
proxy: NonNullable<IntentWireBody["proxy"]>;
|
|
33615
|
+
country?: never;
|
|
33616
|
+
ip?: never;
|
|
33617
|
+
allow_country_fallback?: never;
|
|
33618
|
+
};
|
|
33619
|
+
/** No location keys: a reconnect that keeps the account's configured location. */
|
|
33620
|
+
type KeepLocation = {
|
|
33621
|
+
country?: never;
|
|
33622
|
+
ip?: never;
|
|
33623
|
+
proxy?: never;
|
|
33624
|
+
allow_country_fallback?: never;
|
|
33625
|
+
};
|
|
33626
|
+
/**
|
|
33627
|
+
* `POST /v1/auth/intent` request body.
|
|
33628
|
+
*
|
|
33629
|
+
* A NEW connect (no `account_id`) must name a {@link ConnectionLocationSource};
|
|
33630
|
+
* without one the API answers 400 `CONNECTION_LOCATION_REQUIRED`, and this type
|
|
33631
|
+
* refuses it at compile time. A reconnect (`account_id` present) may omit it to
|
|
33632
|
+
* keep the account's configured country and strictness, or send one to move it.
|
|
33633
|
+
*/
|
|
33634
|
+
type AuthIntentBody = Omit<IntentWireBody, LocationKeys | "account_id"> & (({
|
|
33635
|
+
account_id?: undefined;
|
|
33636
|
+
} & ConnectionLocationSource) | ({
|
|
33637
|
+
account_id: string;
|
|
33638
|
+
} & (ConnectionLocationSource | KeepLocation)));
|
|
32209
33639
|
/** `POST /v1/auth/intent` 200 response body, an existing account re-authenticated in place. */
|
|
32210
33640
|
type AuthIntentReconnected = paths["/v1/auth/intent"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
32211
33641
|
/** `POST /v1/auth/intent` 201 response body, a new account connected. */
|
|
@@ -32285,8 +33715,30 @@ declare class AuthResource {
|
|
|
32285
33715
|
* LinkedIn account does not hold throws
|
|
32286
33716
|
* `CurviateError(code: "LINKEDIN_FEATURE_NOT_SUBSCRIBED")` (403); the remedy
|
|
32287
33717
|
* is to activate the subscription on LinkedIn or to point `linkedin_premium`
|
|
32288
|
-
* at the premium the account really has.
|
|
32289
|
-
*
|
|
33718
|
+
* at the premium the account really has.
|
|
33719
|
+
*
|
|
33720
|
+
* **Connection location.** A NEW connect must say where LinkedIn sees the
|
|
33721
|
+
* account connecting from, with exactly one of: `country` (a supported ISO
|
|
33722
|
+
* code such as `"US"`; pick the one the owner normally signs in from), `ip`
|
|
33723
|
+
* (a public IPv4 whose country is used) or your own `proxy`. Without one the
|
|
33724
|
+
* API throws `CurviateError(code: "CONNECTION_LOCATION_REQUIRED")`, and the
|
|
33725
|
+
* {@link AuthIntentBody} type refuses it at compile time. `country` and `ip`
|
|
33726
|
+
* are strict by default: the connect fails with
|
|
33727
|
+
* `CONNECTION_LOCATION_UNAVAILABLE` rather than use another country, unless
|
|
33728
|
+
* you send `allow_country_fallback: true`. A reconnect may omit the location
|
|
33729
|
+
* to keep the account's configured one. The account's `connection_location`
|
|
33730
|
+
* says where it connects from; when a connect re-attached an account you
|
|
33731
|
+
* already had and moved it, `connection_location.previous_country` names
|
|
33732
|
+
* where it was.
|
|
33733
|
+
*
|
|
33734
|
+
* @example
|
|
33735
|
+
* const result = await curviate.auth.intent({
|
|
33736
|
+
* seat_id: "YOUR_SEAT_ID",
|
|
33737
|
+
* auth_method: "credentials",
|
|
33738
|
+
* credentials: { email: "YOUR_EMAIL", password: "YOUR_PASSWORD" },
|
|
33739
|
+
* country: "US",
|
|
33740
|
+
* });
|
|
33741
|
+
* console.log(result.account_id);
|
|
32290
33742
|
*/
|
|
32291
33743
|
intent(body: AuthIntentBody): Promise<AuthIntentResult>;
|
|
32292
33744
|
/**
|
|
@@ -32322,7 +33774,7 @@ declare class AuthResource {
|
|
|
32322
33774
|
* @param body - optional `{ challenge }` for a `challenge_selection` checkpoint.
|
|
32323
33775
|
*
|
|
32324
33776
|
* @example
|
|
32325
|
-
* const cp = await curviate.auth.intent({ seat_id, auth_method: "credentials", credentials });
|
|
33777
|
+
* const cp = await curviate.auth.intent({ seat_id, auth_method: "credentials", credentials, country: "US" });
|
|
32326
33778
|
* if (cp.object === "checkpoint" && cp.challenge_type === "challenge_selection") {
|
|
32327
33779
|
* const next = await curviate.auth.requestCheckpoint(cp.account_id!, { challenge: cp.challenges![0]!.id });
|
|
32328
33780
|
* }
|
|
@@ -32858,15 +34310,15 @@ declare class PostsResource {
|
|
|
32858
34310
|
* Get a single post. `GET /v1/{account_id}/posts/{post_id}`
|
|
32859
34311
|
*
|
|
32860
34312
|
* @param postId - the post's `id` as returned by {@link listUserPosts} or
|
|
32861
|
-
* {@link create}
|
|
32862
|
-
* (`urn:li:activity:N`, `urn:li:ugcPost:N`,
|
|
32863
|
-
* share URL (`https://www.linkedin.com/posts/...`
|
|
34313
|
+
* {@link create}, or a post search result's `id`. A bare numeric id
|
|
34314
|
+
* (`7332661864792854528`), a URN (`urn:li:activity:N`, `urn:li:ugcPost:N`,
|
|
34315
|
+
* `urn:li:share:N`), and a full post URL (`https://www.linkedin.com/posts/...`
|
|
34316
|
+
* with an `activity-`, `ugcPost-` or `share-` slug, or
|
|
32864
34317
|
* `https://www.linkedin.com/feed/update/urn:li:activity:N`) all resolve to
|
|
32865
34318
|
* the same post. Pass the value as-is; it is percent-encoded into the path
|
|
32866
34319
|
* for you, so do not encode it yourself.
|
|
32867
34320
|
*
|
|
32868
|
-
* {@link listComments} and the reaction operations
|
|
32869
|
-
* the opaque `id` form only.
|
|
34321
|
+
* {@link listComments} and the reaction operations accept the same forms.
|
|
32870
34322
|
*/
|
|
32871
34323
|
get(postId: string): Promise<PostDetail>;
|
|
32872
34324
|
/** Delete a post (bodyless, 204). `DELETE /v1/{account_id}/posts/{post_id}` */
|
|
@@ -34334,13 +35786,149 @@ declare class WebhooksResource {
|
|
|
34334
35786
|
delete(id: string): Promise<WebhookDeleteResult>;
|
|
34335
35787
|
}
|
|
34336
35788
|
|
|
35789
|
+
/**
|
|
35790
|
+
* Drafts resource: 7 methods (root-scoped).
|
|
35791
|
+
*
|
|
35792
|
+
* A Draft is a stored, editable, unpublished post. Give it an account and a
|
|
35793
|
+
* `scheduled_at` and Curviate publishes it for you at that time. Scheduling
|
|
35794
|
+
* never changes the id, so one Draft is one object from first save to publish.
|
|
35795
|
+
*
|
|
35796
|
+
* Root-scoped like `webhooks`: a Draft's account is optional, so there is no
|
|
35797
|
+
* `account_id` path segment. `account_id` is a field of the Draft.
|
|
35798
|
+
*
|
|
35799
|
+
* `POST /v1/{account_id}/posts` (`posts.create`) publishes immediately and does
|
|
35800
|
+
* not schedule. To schedule, create a Draft with `scheduled_at`.
|
|
35801
|
+
*
|
|
35802
|
+
* `delete` resolves with nothing (the API answers 204). `list` returns Drafts
|
|
35803
|
+
* and, with `status: ["published"]`, publish records (never Drafts).
|
|
35804
|
+
*/
|
|
35805
|
+
|
|
35806
|
+
type DraftCreateBody = paths["/v1/drafts"]["post"]["requestBody"]["content"]["application/json"];
|
|
35807
|
+
type DraftCreateResult = paths["/v1/drafts"]["post"]["responses"]["201"]["content"]["application/json"];
|
|
35808
|
+
type DraftListParams = NonNullable<paths["/v1/drafts"]["get"]["parameters"]["query"]>;
|
|
35809
|
+
type DraftListResult = paths["/v1/drafts"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
35810
|
+
type DraftGetResult = paths["/v1/drafts/{id}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
35811
|
+
type DraftUpdateBody = paths["/v1/drafts/{id}"]["patch"]["requestBody"]["content"]["application/json"];
|
|
35812
|
+
type DraftUpdateResult = paths["/v1/drafts/{id}"]["patch"]["responses"]["200"]["content"]["application/json"];
|
|
35813
|
+
/** Delete-draft resolves with nothing: the API answers 204 with no body. */
|
|
35814
|
+
type DraftDeleteResult = void;
|
|
35815
|
+
type DraftPublishResult = paths["/v1/drafts/{id}/publish"]["post"]["responses"]["201"]["content"]["application/json"];
|
|
35816
|
+
/** The file types the upload route accepts as the raw body. */
|
|
35817
|
+
type DraftAttachmentContentType = keyof NonNullable<paths["/v1/drafts/{id}/attachments"]["post"]["requestBody"]>["content"];
|
|
35818
|
+
type DraftUploadResult = paths["/v1/drafts/{id}/attachments"]["post"]["responses"]["201"]["content"]["application/json"];
|
|
35819
|
+
/** Options for {@link DraftsResource.uploadAttachment}. */
|
|
35820
|
+
interface DraftUploadOptions {
|
|
35821
|
+
/** The file's name, kept with the attachment. 1 to 255 characters. */
|
|
35822
|
+
filename: string;
|
|
35823
|
+
/**
|
|
35824
|
+
* The file's type. Optional when `data` is a `Blob`/`File` that carries one.
|
|
35825
|
+
* Anything outside {@link DraftAttachmentContentType} is refused with
|
|
35826
|
+
* `415 UNSUPPORTED_MEDIA_TYPE`.
|
|
35827
|
+
*/
|
|
35828
|
+
contentType?: DraftAttachmentContentType;
|
|
35829
|
+
}
|
|
35830
|
+
declare class DraftsResource {
|
|
35831
|
+
protected readonly ctx: RequestContext;
|
|
35832
|
+
constructor(ctx: RequestContext);
|
|
35833
|
+
/**
|
|
35834
|
+
* Store a Draft. Every field is optional, `account_id` and `text` included.
|
|
35835
|
+
* `POST /v1/drafts`
|
|
35836
|
+
*
|
|
35837
|
+
* With `scheduled_at` (ISO 8601 with offset, between 5 minutes and 365 days
|
|
35838
|
+
* ahead) the Draft is scheduled in the same call and needs an account and
|
|
35839
|
+
* publishable text. Up to 50 Drafts and 2 GiB of media per account, and per
|
|
35840
|
+
* no-account. A retry creates a second Draft.
|
|
35841
|
+
*
|
|
35842
|
+
* @example
|
|
35843
|
+
* const draft = await curviate.drafts.create({
|
|
35844
|
+
* account_id: "acc_01J8Z3K9P0Q1R2S3T4V5W6X7Y8",
|
|
35845
|
+
* text: "Three things we learned shipping our first agent integration.",
|
|
35846
|
+
* scheduled_at: "2026-10-12T09:00:00+02:00",
|
|
35847
|
+
* });
|
|
35848
|
+
* // draft.status === "scheduled"
|
|
35849
|
+
*/
|
|
35850
|
+
create(body?: DraftCreateBody): Promise<DraftCreateResult>;
|
|
35851
|
+
/**
|
|
35852
|
+
* List Drafts, cursor-paginated. `GET /v1/drafts`
|
|
35853
|
+
*
|
|
35854
|
+
* `status` defaults to `["draft", "scheduled", "failed"]`; add `"published"`
|
|
35855
|
+
* to include publish records (`object: "publish_record"`, never Drafts).
|
|
35856
|
+
* `account_id` is an `acc_` id or `"none"`. `from`/`to` are a half-open
|
|
35857
|
+
* `[from, to)` range on each item's own date.
|
|
35858
|
+
*
|
|
35859
|
+
* @example
|
|
35860
|
+
* const page = await curviate.drafts.list({ status: ["scheduled"], order: "asc" });
|
|
35861
|
+
*/
|
|
35862
|
+
list(params?: DraftListParams): Promise<DraftListResult>;
|
|
35863
|
+
/**
|
|
35864
|
+
* Return one Draft, with a fresh signed link (valid 1 hour) per attachment.
|
|
35865
|
+
* `GET /v1/drafts/{id}`
|
|
35866
|
+
*
|
|
35867
|
+
* @example
|
|
35868
|
+
* const draft = await curviate.drafts.get("drf_01J8Z3K9P0Q1R2S3T4V5W6X7Y8");
|
|
35869
|
+
*/
|
|
35870
|
+
get(id: string): Promise<DraftGetResult>;
|
|
35871
|
+
/**
|
|
35872
|
+
* Partial update: an omitted field is left as is, `null` clears it.
|
|
35873
|
+
* `PATCH /v1/drafts/{id}`
|
|
35874
|
+
*
|
|
35875
|
+
* `attachments` replaces the whole list (`{ id }` keeps a file, a base64
|
|
35876
|
+
* object adds one, anything left out is deleted). `scheduled_at` schedules,
|
|
35877
|
+
* reschedules or, with `null`, unschedules. Editing a `failed` Draft clears
|
|
35878
|
+
* its `failure`. A Draft being published answers `409 DRAFT_PUBLISHING`.
|
|
35879
|
+
*
|
|
35880
|
+
* @example
|
|
35881
|
+
* await curviate.drafts.update(id, { scheduled_at: null }); // unschedule
|
|
35882
|
+
*/
|
|
35883
|
+
update(id: string, body: DraftUpdateBody): Promise<DraftUpdateResult>;
|
|
35884
|
+
/**
|
|
35885
|
+
* Delete the Draft and its stored media (bodyless, 204).
|
|
35886
|
+
* `DELETE /v1/drafts/{id}`
|
|
35887
|
+
*
|
|
35888
|
+
* @example
|
|
35889
|
+
* await curviate.drafts.delete(id);
|
|
35890
|
+
*/
|
|
35891
|
+
delete(id: string): Promise<DraftDeleteResult>;
|
|
35892
|
+
/**
|
|
35893
|
+
* Publish the Draft now, under the same rules and safety limits as
|
|
35894
|
+
* `posts.create`. `POST /v1/drafts/{id}/publish`
|
|
35895
|
+
*
|
|
35896
|
+
* Success deletes the Draft and its media, writes a publish record and
|
|
35897
|
+
* returns `{ object: "post_created", id }`; no webhook is sent. A known
|
|
35898
|
+
* failure leaves the Draft unchanged. A `504` or `502` whose message says
|
|
35899
|
+
* the outcome is unknown means the post may be live: check the account's
|
|
35900
|
+
* posts before retrying.
|
|
35901
|
+
*
|
|
35902
|
+
* @example
|
|
35903
|
+
* const { id: postId } = await curviate.drafts.publish(draftId);
|
|
35904
|
+
*/
|
|
35905
|
+
publish(id: string): Promise<DraftPublishResult>;
|
|
35906
|
+
/**
|
|
35907
|
+
* Add one file to the Draft as the raw request body, for media too large to
|
|
35908
|
+
* send inline: an MP4 video or a PDF, each up to 50 MiB. An image is capped at 5 MiB on
|
|
35909
|
+
* every route. One file per call.
|
|
35910
|
+
* `POST /v1/drafts/{id}/attachments?filename=...`
|
|
35911
|
+
*
|
|
35912
|
+
* Small files (up to 5 MiB) can instead ride inline in `create` / `update`
|
|
35913
|
+
* as base64. Resolves with the Draft, the new attachment last.
|
|
35914
|
+
*
|
|
35915
|
+
* @example
|
|
35916
|
+
* const bytes = await readFile("clip.mp4");
|
|
35917
|
+
* const draft = await curviate.drafts.uploadAttachment(id, bytes, {
|
|
35918
|
+
* filename: "clip.mp4",
|
|
35919
|
+
* contentType: "video/mp4",
|
|
35920
|
+
* });
|
|
35921
|
+
*/
|
|
35922
|
+
uploadAttachment(id: string, data: Blob | ArrayBuffer | Uint8Array, options: DraftUploadOptions): Promise<DraftUploadResult>;
|
|
35923
|
+
}
|
|
35924
|
+
|
|
34337
35925
|
/**
|
|
34338
35926
|
* Resource namespace assembly.
|
|
34339
35927
|
*
|
|
34340
35928
|
* The surface is split cleanly in two, with no overlap:
|
|
34341
|
-
* - **Root-scoped** (`accounts`, `auth`, `webhooks`) hang off the root client
|
|
34342
|
-
* only. Connected-account management, connect/reconnect,
|
|
34343
|
-
* registration are tenant-wide concerns, not per-account ones; they carry no
|
|
35929
|
+
* - **Root-scoped** (`accounts`, `auth`, `webhooks`, `drafts`) hang off the root client
|
|
35930
|
+
* only. Connected-account management, connect/reconnect, webhook
|
|
35931
|
+
* registration and Drafts (a Draft's account is optional) are tenant-wide concerns, not per-account ones; they carry no
|
|
34344
35932
|
* `account_id` path segment.
|
|
34345
35933
|
* - **Account-scoped** (everything else) hang off `curviate.account(id)` only.
|
|
34346
35934
|
* Every one of their paths leads with the fixed `account_id` segment, so they
|
|
@@ -34370,13 +35958,14 @@ interface ResourceNamespaces {
|
|
|
34370
35958
|
jobs: JobsResource;
|
|
34371
35959
|
companies: CompaniesResource;
|
|
34372
35960
|
webhooks: WebhooksResource;
|
|
35961
|
+
drafts: DraftsResource;
|
|
34373
35962
|
}
|
|
34374
35963
|
/**
|
|
34375
|
-
* The account-scoped accessor surface, every namespace except the
|
|
34376
|
-
* root-only ones (`accounts`, `auth`, `webhooks`). The fixed `account_id` is
|
|
35964
|
+
* The account-scoped accessor surface, every namespace except the four
|
|
35965
|
+
* root-only ones (`accounts`, `auth`, `webhooks`, `drafts`). The fixed `account_id` is
|
|
34377
35966
|
* injected by the bound context as the leading path segment.
|
|
34378
35967
|
*/
|
|
34379
|
-
type AccountScopedNamespaces = Omit<ResourceNamespaces, "accounts" | "auth" | "webhooks">;
|
|
35968
|
+
type AccountScopedNamespaces = Omit<ResourceNamespaces, "accounts" | "auth" | "webhooks" | "drafts">;
|
|
34380
35969
|
|
|
34381
35970
|
/**
|
|
34382
35971
|
* The Curviate client.
|
|
@@ -34397,6 +35986,7 @@ declare class Curviate {
|
|
|
34397
35986
|
readonly accounts: AccountsResource;
|
|
34398
35987
|
readonly auth: AuthResource;
|
|
34399
35988
|
readonly webhooks: WebhooksResource;
|
|
35989
|
+
readonly drafts: DraftsResource;
|
|
34400
35990
|
constructor(config: CurviateConfig);
|
|
34401
35991
|
/**
|
|
34402
35992
|
* Return an account-scoped accessor that fixes `account_id` on every call,
|
|
@@ -34500,7 +36090,7 @@ declare class Curviate {
|
|
|
34500
36090
|
* A code the API NEVER emitted is a different case and goes immediately, since
|
|
34501
36091
|
* no deployment can be sending it: `RATE_LIMITED` went that way in 0.30.0.
|
|
34502
36092
|
*/
|
|
34503
|
-
declare const ERROR_CODES: readonly ["UNAUTHORIZED", "INVALID_REQUEST", "UNSUPPORTED_MEDIA_TYPE", "PAYLOAD_TOO_LARGE", "ACCOUNT_NOT_FOUND", "ACCOUNT_RESTRICTED", "ACCOUNT_ALREADY_LINKED", "RESOURCE_NOT_FOUND", "NOT_STORED", "RESOURCE_ACCESS_RESTRICTED", "FILTER_CANDIDATES_REQUIRED", "NO_ACTIVE_SEAT", "LINKEDIN_FEATURE_NOT_SUBSCRIBED", "BETA_NOT_ENABLED", "RATE_LIMIT_ACCOUNT", "RATE_LIMIT_TENANT", "PLATFORM_RATE_LIMIT", "BUDGET_EXHAUSTED", "PLATFORM_ERROR", "PLATFORM_NOT_IMPLEMENTED", "LINKEDIN_OPERATION_NOT_SUPPORTED", "CHECKPOINT_NOT_FOUND", "CHECKPOINT_EXPIRED", "CHECKPOINT_INVALID_CODE", "CHECKPOINT_MAX_ATTEMPTS", "CHECKPOINT_ALREADY_RESOLVED", "CHECKPOINT_UNSUPPORTED", "CONNECTION_IN_PROGRESS", "REAUTH_REQUIRED", "LINKEDIN_AUTH_FAILED", "LINKEDIN_SESSION_EVICTED", "LINKEDIN_RATE_LIMITED", "LINKEDIN_COOKIE_INVALID", "LINKEDIN_SERVICE_UNAVAILABLE", "MESSAGE_WINDOW_EXPIRED", "RECIPIENT_UNREACHABLE", "CONNECTION_REQUEST_CONFLICT", "PAYMENT_REQUIRED", "PAYMENT_FAILED", "SUBSCRIPTION_BUSY", "SUBSCRIPTION_NOT_FOUND", "SEAT_NOT_FOUND", "SEAT_CANCELLED", "NOT_FOUND", "REACTION_NOT_FOUND", "SUBSTRATE_LINK_FAILED", "SUBSTRATE_CAP_REACHED", "BILLING_CHECKOUT_FAILED", "BILLING_PORTAL_UNAVAILABLE", "ACCOUNT_DISPUTED", "ACCOUNT_LINKING_DISABLED", "PERIOD_LOCKED", "SEAT_NOT_EMPTY", "SEAT_PROVISIONAL", "SUBSCRIPTION_ALREADY_EXISTS", "ALREADY_CANCELLED", "CANCELLATION_ALREADY_EFFECTIVE", "INVALID_CANCELLATION_SOURCE", "TRIAL_EXPIRED", "TRIAL_SEAT_LIMIT", "TRIAL_ACTIVE_SEAT_LIMIT", "TRIAL_IDENTITY_ALREADY_USED", "TRIAL_IDENTITY_UNRESOLVED", "ADMIN_BYPASS", "STRIPE_DRIFT_DETECTED", "INTERNAL"];
|
|
36093
|
+
declare const ERROR_CODES: readonly ["UNAUTHORIZED", "INVALID_REQUEST", "UNSUPPORTED_MEDIA_TYPE", "PAYLOAD_TOO_LARGE", "ACCOUNT_NOT_FOUND", "ACCOUNT_RESTRICTED", "ACCOUNT_ALREADY_LINKED", "RESOURCE_NOT_FOUND", "NOT_STORED", "RESOURCE_ACCESS_RESTRICTED", "FILTER_CANDIDATES_REQUIRED", "NO_ACTIVE_SEAT", "LINKEDIN_FEATURE_NOT_SUBSCRIBED", "BETA_NOT_ENABLED", "RATE_LIMIT_ACCOUNT", "RATE_LIMIT_TENANT", "PLATFORM_RATE_LIMIT", "BUDGET_EXHAUSTED", "PLATFORM_ERROR", "PLATFORM_NOT_IMPLEMENTED", "LINKEDIN_OPERATION_NOT_SUPPORTED", "CHECKPOINT_NOT_FOUND", "CHECKPOINT_EXPIRED", "CHECKPOINT_INVALID_CODE", "CHECKPOINT_MAX_ATTEMPTS", "CHECKPOINT_ALREADY_RESOLVED", "CHECKPOINT_UNSUPPORTED", "CONNECTION_IN_PROGRESS", "CONNECTION_LOCATION_REQUIRED", "CONNECTION_LOCATION_UNAVAILABLE", "REAUTH_REQUIRED", "LINKEDIN_AUTH_FAILED", "LINKEDIN_SESSION_EVICTED", "LINKEDIN_RATE_LIMITED", "LINKEDIN_COOKIE_INVALID", "LINKEDIN_SERVICE_UNAVAILABLE", "MESSAGE_WINDOW_EXPIRED", "RECIPIENT_UNREACHABLE", "CONNECTION_REQUEST_CONFLICT", "PAYMENT_REQUIRED", "PAYMENT_FAILED", "SUBSCRIPTION_BUSY", "SUBSCRIPTION_NOT_FOUND", "SEAT_NOT_FOUND", "SEAT_CANCELLED", "NOT_FOUND", "REACTION_NOT_FOUND", "SUBSTRATE_LINK_FAILED", "SUBSTRATE_CAP_REACHED", "BILLING_CHECKOUT_FAILED", "BILLING_PORTAL_UNAVAILABLE", "ACCOUNT_DISPUTED", "ACCOUNT_LINKING_DISABLED", "PERIOD_LOCKED", "SEAT_NOT_EMPTY", "SEAT_PROVISIONAL", "SUBSCRIPTION_ALREADY_EXISTS", "ALREADY_CANCELLED", "CANCELLATION_ALREADY_EFFECTIVE", "INVALID_CANCELLATION_SOURCE", "TRIAL_EXPIRED", "TRIAL_SEAT_LIMIT", "TRIAL_ACTIVE_SEAT_LIMIT", "TRIAL_IDENTITY_ALREADY_USED", "TRIAL_IDENTITY_UNRESOLVED", "ADMIN_BYPASS", "STRIPE_DRIFT_DETECTED", "DRAFT_LIMIT_REACHED", "MEDIA_QUOTA_EXCEEDED", "ACCOUNT_REQUIRED", "DRAFT_NOT_PUBLISHABLE", "SCHEDULE_CONFLICT", "DRAFT_PUBLISHING", "INTERNAL"];
|
|
34504
36094
|
/**
|
|
34505
36095
|
* The complete set of error codes observable by API callers.
|
|
34506
36096
|
*
|
|
@@ -34508,6 +36098,20 @@ declare const ERROR_CODES: readonly ["UNAUTHORIZED", "INVALID_REQUEST", "UNSUPPO
|
|
|
34508
36098
|
* `switch (error.code)` without fear of unknown codes.
|
|
34509
36099
|
*/
|
|
34510
36100
|
type ErrorCode = (typeof ERROR_CODES)[number];
|
|
36101
|
+
/**
|
|
36102
|
+
* Where LinkedIn sees an account connecting from. Wire field
|
|
36103
|
+
* `connection_location`; the same shape rides every account read.
|
|
36104
|
+
* `country` is the configured country, `current_country` the one in use now
|
|
36105
|
+
* (they differ only after a fallback), `mode` `auto` (managed) or `custom`
|
|
36106
|
+
* (your own proxy), `strict` true when it never connects from another
|
|
36107
|
+
* country. Each is `null` until known.
|
|
36108
|
+
*/
|
|
36109
|
+
interface ConnectionLocation {
|
|
36110
|
+
country?: string | null;
|
|
36111
|
+
current_country?: string | null;
|
|
36112
|
+
mode?: "auto" | "custom" | null;
|
|
36113
|
+
strict?: boolean | null;
|
|
36114
|
+
}
|
|
34511
36115
|
/** Structured retry guidance attached to retryable errors. */
|
|
34512
36116
|
interface RetryHint {
|
|
34513
36117
|
kind: "delay" | "backoff" | "never";
|
|
@@ -34610,6 +36214,12 @@ interface CurviateErrorInit {
|
|
|
34610
36214
|
* moving an account to `enforce` is not a breaking change.
|
|
34611
36215
|
*/
|
|
34612
36216
|
blocked?: boolean;
|
|
36217
|
+
/**
|
|
36218
|
+
* Where the account connects from now, on a `CONNECTION_LOCATION_UNAVAILABLE`
|
|
36219
|
+
* that followed an applied change (re-read after it). Wire field
|
|
36220
|
+
* `connection_location`. Absent when nothing was changed.
|
|
36221
|
+
*/
|
|
36222
|
+
connectionLocation?: ConnectionLocation;
|
|
34613
36223
|
}
|
|
34614
36224
|
/** Plain-object shape produced by {@link CurviateError.toJSON}. */
|
|
34615
36225
|
interface CurviateErrorJSON {
|
|
@@ -34627,6 +36237,7 @@ interface CurviateErrorJSON {
|
|
|
34627
36237
|
safetyHint?: SafetyHint;
|
|
34628
36238
|
safetyReason?: SafetyReason;
|
|
34629
36239
|
blocked?: boolean;
|
|
36240
|
+
connectionLocation?: ConnectionLocation;
|
|
34630
36241
|
}
|
|
34631
36242
|
/**
|
|
34632
36243
|
* The single thrown type for all Curviate API errors.
|
|
@@ -34660,6 +36271,8 @@ declare class CurviateError extends Error {
|
|
|
34660
36271
|
readonly safetyReason: SafetyReason | undefined;
|
|
34661
36272
|
/** Whether the action was refused. See {@link CurviateErrorInit.blocked}. */
|
|
34662
36273
|
readonly blocked: boolean | undefined;
|
|
36274
|
+
/** Where the account connects from now. See {@link CurviateErrorInit.connectionLocation}. */
|
|
36275
|
+
readonly connectionLocation: ConnectionLocation | undefined;
|
|
34663
36276
|
constructor(init: CurviateErrorInit);
|
|
34664
36277
|
/**
|
|
34665
36278
|
* Explicit, credential-safe serialization. Only the documented structured
|
|
@@ -34776,6 +36389,31 @@ interface AccountPayload extends EventPayloadBase {
|
|
|
34776
36389
|
*/
|
|
34777
36390
|
external_id?: string | null;
|
|
34778
36391
|
}
|
|
36392
|
+
/**
|
|
36393
|
+
* Payload of `post.published`: a scheduled Draft went out. Carries ids and
|
|
36394
|
+
* times only, never the post text or media.
|
|
36395
|
+
*/
|
|
36396
|
+
interface PostPublishedPayload extends EventPayloadBase {
|
|
36397
|
+
draft_id: string;
|
|
36398
|
+
/** The published post's id; `null` when none was returned. */
|
|
36399
|
+
post_id: string | null;
|
|
36400
|
+
scheduled_at: string;
|
|
36401
|
+
published_at: string;
|
|
36402
|
+
/** Present when a warn-posture safety limit was breached by this publish. */
|
|
36403
|
+
safety_warning?: unknown;
|
|
36404
|
+
}
|
|
36405
|
+
/**
|
|
36406
|
+
* Payload of `post.publish_failed`: a scheduled Draft could not be published.
|
|
36407
|
+
* `failure_code` `outcome_unknown` means the post may be live: check the
|
|
36408
|
+
* account's posts before retrying. Never carries the post text or media.
|
|
36409
|
+
*/
|
|
36410
|
+
interface PostPublishFailedPayload extends EventPayloadBase {
|
|
36411
|
+
draft_id: string;
|
|
36412
|
+
/** The time that failed (the Draft's own `scheduled_at` is cleared on failure). */
|
|
36413
|
+
scheduled_at: string;
|
|
36414
|
+
failure_code: string;
|
|
36415
|
+
failure_message: string;
|
|
36416
|
+
}
|
|
34779
36417
|
/**
|
|
34780
36418
|
* Delivery metadata that accompanies every Curviate webhook event.
|
|
34781
36419
|
*
|
|
@@ -34909,6 +36547,12 @@ type CurviateEvent = CurviateEventEnvelope & ({
|
|
|
34909
36547
|
} | {
|
|
34910
36548
|
event: "account.initial_sync.failed";
|
|
34911
36549
|
data: AccountPayload;
|
|
36550
|
+
} | {
|
|
36551
|
+
event: "post.published";
|
|
36552
|
+
data: PostPublishedPayload;
|
|
36553
|
+
} | {
|
|
36554
|
+
event: "post.publish_failed";
|
|
36555
|
+
data: PostPublishFailedPayload;
|
|
34912
36556
|
});
|
|
34913
36557
|
/**
|
|
34914
36558
|
* Options for {@link constructEvent}.
|
|
@@ -34968,4 +36612,4 @@ interface ConstructEventOptions {
|
|
|
34968
36612
|
*/
|
|
34969
36613
|
declare function constructEvent(rawBody: string | Buffer, signatureHeader: string, secret: string, opts?: ConstructEventOptions): Promise<CurviateEvent>;
|
|
34970
36614
|
|
|
34971
|
-
export { type AccountListPage, type AccountListParams, type AccountPayload, type AccountScopedNamespaces, type ConnectionPayload, type ConstructEventOptions, Curviate, type CurviateConfig, CurviateError, type CurviateErrorInit, type CurviateErrorJSON, type CurviateEvent, type CurviateEventEnvelope, ERROR_CODES, type ErrorCode, type EventPayloadBase, type MessagePayload, type ResolvedConfig, type ResourceNamespaces, type RetryHint, type SafetyHint, type SafetyReason, type SeatList, WebhookSignatureError, type components, constructEvent, isCurviateError, type operations, type paths };
|
|
36615
|
+
export { type AccountDetail, type AccountListPage, type AccountListParams, type AccountPayload, type AccountScopedNamespaces, type AccountUpdateBody, type AccountUpdateResult, type AuthIntentBody, type ConnectionCountry, type ConnectionLocation, type ConnectionLocationSource, type ConnectionPayload, type ConstructEventOptions, Curviate, type CurviateConfig, CurviateError, type CurviateErrorInit, type CurviateErrorJSON, type CurviateEvent, type CurviateEventEnvelope, type DraftAttachmentContentType, type DraftCreateBody, type DraftCreateResult, type DraftDeleteResult, type DraftGetResult, type DraftListParams, type DraftListResult, type DraftPublishResult, type DraftUpdateBody, type DraftUpdateResult, type DraftUploadOptions, type DraftUploadResult, ERROR_CODES, type ErrorCode, type EventPayloadBase, type MessagePayload, type PostPublishFailedPayload, type PostPublishedPayload, type ResolvedConfig, type ResourceNamespaces, type RetryHint, type SafetyHint, type SafetyReason, type SeatList, WebhookSignatureError, type components, constructEvent, isCurviateError, type operations, type paths };
|