@getlatedev/node 0.2.1305 → 0.2.1307
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +40 -6
- package/dist/index.d.ts +40 -6
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +21 -7
- package/src/generated/types.gen.ts +41 -5
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
36
36
|
// package.json
|
|
37
37
|
var package_default = {
|
|
38
38
|
name: "@getlatedev/node",
|
|
39
|
-
version: "0.2.
|
|
39
|
+
version: "0.2.1307",
|
|
40
40
|
description: "The official Node.js library for the Zernio API",
|
|
41
41
|
main: "dist/index.js",
|
|
42
42
|
module: "dist/index.mjs",
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5
5
|
// package.json
|
|
6
6
|
var package_default = {
|
|
7
7
|
name: "@getlatedev/node",
|
|
8
|
-
version: "0.2.
|
|
8
|
+
version: "0.2.1307",
|
|
9
9
|
description: "The official Node.js library for the Zernio API",
|
|
10
10
|
main: "dist/index.js",
|
|
11
11
|
module: "dist/index.mjs",
|
package/package.json
CHANGED
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -986,6 +986,12 @@ export const listPosts = <ThrowOnError extends boolean = false>(options?: Option
|
|
|
986
986
|
*
|
|
987
987
|
* See each platform's schema for media constraints.
|
|
988
988
|
*
|
|
989
|
+
* ## LinkedIn @mentions
|
|
990
|
+
*
|
|
991
|
+
* Put the profile or company URL inside `@[...]` in `content`, or in a LinkedIn entry's `customContent`: `@[https://www.linkedin.com/in/jane-doe]` or `@[https://www.linkedin.com/company/acme]`. The post is published with LinkedIn's real name and link, and no lookup call is needed first. Custom text is optional, as in `@[Jane](https://www.linkedin.com/in/jane-doe)`: for a person it must be the first name, last name or full name, for a company the exact company name, both case-sensitive. Any other text is replaced with LinkedIn's name and a `warnings` entry is returned (`linkedin_mention_name_replaced`). `@[Text](urn:li:person:ID)` markup, as returned by `GET /v1/accounts/{accountId}/linkedin-mentions`, is published exactly as you wrote it: it is not looked up, checked or changed, so its text must already be LinkedIn's name.
|
|
992
|
+
*
|
|
993
|
+
* Resolving a person's profile URL needs one of your LinkedIn accounts to administer a Page; publishing does not. Only profile and company URLs can fail. A scheduled or published post is rejected when one cannot be resolved: `400` with code `linkedin_mentions_invalid`, `429` with `rate_limited` (LinkedIn is rate limiting), `401` with `reconnect_required` (expired token) or a retryable `503` with `temporarily_unavailable` (LinkedIn did not answer within 8 seconds in total). Each failing mention is listed under `details.mentions[]` (`LinkedInMentionIssue`) with its own code: `linkedin_mention_unresolvable`, `linkedin_mention_requires_page_admin` or `linkedin_mention_name_unavailable` (LinkedIn withheld the name and none was given). A post can resolve at most 10 profile or company URL mentions across its shared content and LinkedIn entries: more is a `400` with `linkedin_mentions_limit_exceeded`. Drafts never fail on a mention: unresolved ones (and more than 10) stay as written and come back as `warnings`. A draft is checked again when it is scheduled. On platforms other than LinkedIn, `@[linkedin.com/in/jane]` is posted as its text, or as the vanity (`jane`) when you wrote no text, and `@[Text](urn:li:...)` as `Text`.
|
|
994
|
+
*
|
|
989
995
|
* ## Scheduling
|
|
990
996
|
*
|
|
991
997
|
* Pick one of:
|
|
@@ -1084,6 +1090,17 @@ export const getPost = <ThrowOnError extends boolean = false>(options: OptionsLe
|
|
|
1084
1090
|
* Non-draft updates run the same per-platform validation as post creation (media requirements, platform-specific
|
|
1085
1091
|
* field rules, etc.) against the resulting platforms, returning 400 on failure.
|
|
1086
1092
|
*
|
|
1093
|
+
* ## LinkedIn @mentions
|
|
1094
|
+
*
|
|
1095
|
+
* Profile and company URLs written as `@[https://www.linkedin.com/in/jane-doe]` or
|
|
1096
|
+
* `@[Jane](https://www.linkedin.com/company/acme)` in the `content` or LinkedIn `customContent` you send are
|
|
1097
|
+
* resolved to LinkedIn's name and link, exactly as on `POST /v1/posts` (see Create post for the rules). Only what
|
|
1098
|
+
* the request sends is looked up: an update of the schedule, status or media makes no LinkedIn call, and
|
|
1099
|
+
* `@[Text](urn:li:...)` markup is stored as written. Moving a draft out of draft also resolves the stored
|
|
1100
|
+
* `content` and the stored `customContent` of its LinkedIn entries, and saves the result. A mention that cannot be resolved on a non-draft returns `400` `linkedin_mentions_invalid`, `429`
|
|
1101
|
+
* `rate_limited`, `401` `reconnect_required` or a retryable `503` `temporarily_unavailable`, with each mention
|
|
1102
|
+
* under `details.mentions[]` (`LinkedInMentionIssue`). Drafts get `warnings` instead.
|
|
1103
|
+
*
|
|
1087
1104
|
*/
|
|
1088
1105
|
export const updatePost = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdatePostData, ThrowOnError>) => {
|
|
1089
1106
|
return (options?.client ?? client).put<UpdatePostResponse, UpdatePostError, ThrowOnError>({
|
|
@@ -3042,22 +3059,19 @@ export const updateLinkedInOrganization = <ThrowOnError extends boolean = false>
|
|
|
3042
3059
|
* Resolve LinkedIn mention
|
|
3043
3060
|
* Converts a LinkedIn profile or company URL to a URN for @mentions in posts.
|
|
3044
3061
|
*
|
|
3045
|
-
*
|
|
3046
|
-
*
|
|
3047
|
-
* 1. Call this endpoint with the LinkedIn profile/company URL to get the mention URN and format.
|
|
3048
|
-
* 2. Embed the returned mentionFormat (e.g. @[Vincent Jong](urn:li:person:xxx)) directly in your post's content field.
|
|
3062
|
+
* You usually do not need this endpoint. Put the profile or company URL inside `@[...]` in the post `content` (for example `@[https://www.linkedin.com/in/vincentjong]`) and the post resolves it for you, using LinkedIn's own name. Use this endpoint to preview what a URL resolves to, or to get ready-made `@[Name](urn)` markup, which still works in `content` and is published exactly as written.
|
|
3049
3063
|
*
|
|
3050
3064
|
* Example:
|
|
3051
|
-
* - Resolve: GET /v1/accounts/{id}/linkedin-mentions?url=linkedin.com/in/vincentjong
|
|
3065
|
+
* - Resolve: GET /v1/accounts/{id}/linkedin-mentions?url=linkedin.com/in/vincentjong
|
|
3052
3066
|
* - Returns: mentionFormat: "@[Vincent Jong](urn:li:person:xxx)"
|
|
3053
3067
|
* - Use in post content: "Great talk with @[Vincent Jong](urn:li:person:xxx) today!"
|
|
3054
3068
|
*
|
|
3055
|
-
* Important: The mentions array field in POST /v1/posts is stored for reference only and does NOT trigger @mentions on LinkedIn.
|
|
3069
|
+
* Important: The mentions array field in POST /v1/posts is stored for reference only and does NOT trigger @mentions on LinkedIn. Write the mention in the content text.
|
|
3056
3070
|
*
|
|
3057
3071
|
* Requirements:
|
|
3058
3072
|
* - Resolving a profile URL to a person mention requires the LinkedIn account to be admin of at least one organization: both endpoints that resolve a profile URL to a member URN take an organization you administer. A resolved person mention publishes from any account. Organization mentions (e.g. @Microsoft) have no such requirement.
|
|
3059
3073
|
* - The two are not scoped alike. peopleTypeahead?q=organizationFollowers only returns that organization's followers; vanityUrl?q=vanityUrlAsOrganization does not, and its resolvable set is opaque. A 404 here does not mean the person is unknown to you or unknown to LinkedIn: a live public profile can 404 with no reason given.
|
|
3060
|
-
* - displayName is
|
|
3074
|
+
* - displayName is deprecated and ignored in practice: the endpoint reads the person's real name from LinkedIn itself. LinkedIn renders a person mention as a link only when the mention text is the person's first name, last name or full name (case-sensitive).
|
|
3061
3075
|
* - Person mentions DO work when published from personal profiles (the URN only needs to be valid). The limitation is only in the resolution step (URL to URN), not in publishing.
|
|
3062
3076
|
*
|
|
3063
3077
|
*/
|
|
@@ -9405,6 +9405,29 @@ export type LinkedInAggregateAnalyticsTotalResponse = {
|
|
|
9405
9405
|
|
|
9406
9406
|
export type aggregation2 = 'TOTAL';
|
|
9407
9407
|
|
|
9408
|
+
/**
|
|
9409
|
+
* One LinkedIn mention that could not be resolved, listed under `details.mentions[]` of the error.
|
|
9410
|
+
*/
|
|
9411
|
+
export type LinkedInMentionIssue = {
|
|
9412
|
+
/**
|
|
9413
|
+
* The mention exactly as written in the request, for example `@[https://www.linkedin.com/in/jane-doe]`.
|
|
9414
|
+
*/
|
|
9415
|
+
input: string;
|
|
9416
|
+
/**
|
|
9417
|
+
* Why it failed.
|
|
9418
|
+
*/
|
|
9419
|
+
code: 'linkedin_mention_unresolvable' | 'linkedin_mention_requires_page_admin' | 'linkedin_mention_name_unavailable' | 'linkedin_mentions_limit_exceeded' | 'rate_limited' | 'reconnect_required' | 'temporarily_unavailable';
|
|
9420
|
+
/**
|
|
9421
|
+
* Human-readable reason.
|
|
9422
|
+
*/
|
|
9423
|
+
message: string;
|
|
9424
|
+
};
|
|
9425
|
+
|
|
9426
|
+
/**
|
|
9427
|
+
* Why it failed.
|
|
9428
|
+
*/
|
|
9429
|
+
export type code = 'linkedin_mention_unresolvable' | 'linkedin_mention_requires_page_admin' | 'linkedin_mention_name_unavailable' | 'linkedin_mentions_limit_exceeded' | 'rate_limited' | 'reconnect_required' | 'temporarily_unavailable';
|
|
9430
|
+
|
|
9408
9431
|
/**
|
|
9409
9432
|
* Up to 20 images, no multi-video. Single PDF supported (max 100MB). Link previews auto-generated when no media attached. Use organizationUrn for multi-org posting. Geo-restriction only works for organization pages (not personal profiles) and requires the targeted audience to exceed 300 followers. Polls are supported via the poll object: 2-4 options, cannot be combined with media or reshareUrl, cannot be edited after publishing, and API-created polls are non-sponsored only.
|
|
9410
9433
|
*
|
|
@@ -10617,7 +10640,7 @@ export type Post = {
|
|
|
10617
10640
|
*/
|
|
10618
10641
|
hashtags?: Array<(string)>;
|
|
10619
10642
|
/**
|
|
10620
|
-
* Stored for reference only. This field does NOT automatically create @mentions when publishing. For LinkedIn @mentions,
|
|
10643
|
+
* Stored for reference only. This field does NOT automatically create @mentions when publishing. For LinkedIn @mentions, write them in the post content, for example @[https://www.linkedin.com/in/jane-doe] or @[https://www.linkedin.com/company/acme].
|
|
10621
10644
|
*/
|
|
10622
10645
|
mentions?: Array<(string)>;
|
|
10623
10646
|
visibility?: 'public' | 'private' | 'unlisted';
|
|
@@ -17749,7 +17772,7 @@ export type WhatsAppTemplateLookupError = {
|
|
|
17749
17772
|
|
|
17750
17773
|
export type type20 = 'platform_error';
|
|
17751
17774
|
|
|
17752
|
-
export type
|
|
17775
|
+
export type code2 = 'platform_api_error';
|
|
17753
17776
|
|
|
17754
17777
|
export type phase = 'template_lookup';
|
|
17755
17778
|
|
|
@@ -20696,7 +20719,7 @@ export type CreatePostData = {
|
|
|
20696
20719
|
*/
|
|
20697
20720
|
title?: string;
|
|
20698
20721
|
/**
|
|
20699
|
-
* Post caption/text. Optional when media is attached, all platforms have customContent, every platform entry is an X Article (platformSpecificData.article), or every platform entry is a LinkedIn text-free reshare (platformSpecificData.reshareUrl with no text). Required for other text-only posts.
|
|
20722
|
+
* Post caption/text. Optional when media is attached, all platforms have customContent, every platform entry is an X Article (platformSpecificData.article), or every platform entry is a LinkedIn text-free reshare (platformSpecificData.reshareUrl with no text). Required for other text-only posts. LinkedIn @mentions: write @[https://www.linkedin.com/in/jane-doe] or @[https://www.linkedin.com/company/acme] in the text (see the operation description).
|
|
20700
20723
|
*/
|
|
20701
20724
|
content?: string;
|
|
20702
20725
|
/**
|
|
@@ -20753,7 +20776,7 @@ export type CreatePostData = {
|
|
|
20753
20776
|
*/
|
|
20754
20777
|
hashtags?: Array<(string)>;
|
|
20755
20778
|
/**
|
|
20756
|
-
* Stored for reference only. This field does NOT automatically create @mentions when publishing. For LinkedIn @mentions,
|
|
20779
|
+
* Stored for reference only. This field does NOT automatically create @mentions when publishing. For LinkedIn @mentions, write them in the post content, for example @[https://www.linkedin.com/in/jane-doe] or @[https://www.linkedin.com/company/acme].
|
|
20757
20780
|
*/
|
|
20758
20781
|
mentions?: Array<(string)>;
|
|
20759
20782
|
/**
|
|
@@ -20805,6 +20828,10 @@ export type CreatePostResponse = ((TikTokDryRunVerdict | PostCreateResponse) | P
|
|
|
20805
20828
|
|
|
20806
20829
|
export type CreatePostError = ({
|
|
20807
20830
|
error?: string;
|
|
20831
|
+
code?: string;
|
|
20832
|
+
details?: {
|
|
20833
|
+
mentions?: Array<LinkedInMentionIssue>;
|
|
20834
|
+
};
|
|
20808
20835
|
} | ErrorResponse | {
|
|
20809
20836
|
error?: string;
|
|
20810
20837
|
/**
|
|
@@ -27272,7 +27299,8 @@ export type GetLinkedInMentionsData = {
|
|
|
27272
27299
|
};
|
|
27273
27300
|
query: {
|
|
27274
27301
|
/**
|
|
27275
|
-
*
|
|
27302
|
+
* Deprecated: omit it. When sent for a person it overrides the mention text, and LinkedIn renders the mention only if it is exactly the person's first name, last name or full name (case-sensitive). When omitted the real name is read from LinkedIn. Ignored for org mentions, which always use the organization's LinkedIn name.
|
|
27303
|
+
* @deprecated
|
|
27276
27304
|
*/
|
|
27277
27305
|
displayName?: string;
|
|
27278
27306
|
/**
|
|
@@ -37706,6 +37734,10 @@ export type SubmitPhoneNumberKycData = {
|
|
|
37706
37734
|
* Area code (NDC) the number must be in. Hard constraint: an empty area pool fails with 409 code AREA_CODE_UNAVAILABLE instead of ordering from another area. Omit for any area. Options come from GET /v1/phone-numbers/availability (areaOptions); the purchase 202 kycUrl echoes the areaCode picked at purchase time so it can be passed here.
|
|
37707
37735
|
*/
|
|
37708
37736
|
areaCode?: string;
|
|
37737
|
+
/**
|
|
37738
|
+
* Exact number to order, in E.164, taken from GET /v1/phone-numbers/available. It is ordered as is or the request fails with 409 code phone_number_unavailable; another number is never substituted and a pre-order is never placed. Requires quantity 1 (or omitted). Omit to let the carrier pick a number in the area.
|
|
37739
|
+
*/
|
|
37740
|
+
phoneNumber?: string;
|
|
37709
37741
|
/**
|
|
37710
37742
|
* With areaCode: pre-order that area when it has no stock (an area listed in soldOutAreas with preOrderable true) instead of failing with AREA_CODE_UNAVAILABLE. The carrier sources a number in that area. Without areaCode it accepts the pre-order a previous submit offered with 409 code area_pre_order_available (a geographic-match country whose address area has no stock): resend the same body with preOrder true and the order is placed for that area. A whole pair with no stock is pre-ordered without either flag.
|
|
37711
37743
|
*/
|
|
@@ -38546,6 +38578,10 @@ export type SubmitWhatsAppNumberKycData = {
|
|
|
38546
38578
|
* Area code (NDC) the number must be in. Hard constraint: an empty area pool fails with 409 code AREA_CODE_UNAVAILABLE instead of ordering from another area. Omit for any area. Options come from GET /v1/phone-numbers/availability (areaOptions); the purchase 202 kycUrl echoes the areaCode picked at purchase time so it can be passed here.
|
|
38547
38579
|
*/
|
|
38548
38580
|
areaCode?: string;
|
|
38581
|
+
/**
|
|
38582
|
+
* Exact number to order, in E.164, taken from GET /v1/whatsapp/phone-numbers/available. It is ordered as is or the request fails with 409 code phone_number_unavailable; another number is never substituted and a pre-order is never placed. Requires quantity 1 (or omitted). Omit to let the carrier pick a number in the area.
|
|
38583
|
+
*/
|
|
38584
|
+
phoneNumber?: string;
|
|
38549
38585
|
/**
|
|
38550
38586
|
* With areaCode: pre-order that area when it has no stock (an area listed in soldOutAreas with preOrderable true) instead of failing with AREA_CODE_UNAVAILABLE. The carrier sources a number in that area. Without areaCode it accepts the pre-order a previous submit offered with 409 code area_pre_order_available (a geographic-match country whose address area has no stock): resend the same body with preOrder true and the order is placed for that area. A whole pair with no stock is pre-ordered without either flag.
|
|
38551
38587
|
*/
|