@getlatedev/node 0.2.1794 → 0.2.1796
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 +71 -8
- package/dist/index.d.ts +71 -8
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +15 -2
- package/src/generated/types.gen.ts +73 -7
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.1796",
|
|
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.1796",
|
|
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
|
@@ -2124,7 +2124,7 @@ export const getXApiPricing = <ThrowOnError extends boolean = false>(options?: O
|
|
|
2124
2124
|
*
|
|
2125
2125
|
* ### With `range`, `granularity`, `from`, or `to`
|
|
2126
2126
|
*
|
|
2127
|
-
* Returns usage METERING: billed spend (USD) by product family over the window, at `day` / `month` / `total` granularity. Product families: `accounts`, `numbers`, `imessage`, `calls`, `sms`, `messages`, `verify`, `dlc`, `xApi`, `ads`, `credits`, `other`.
|
|
2127
|
+
* Returns usage METERING: billed spend (USD) by product family over the window, at `day` / `month` / `total` granularity. Product families: `accounts`, `numbers`, `imessage`, `rcs`, `calls`, `sms`, `messages`, `verify`, `dlc`, `xApi`, `ads`, `automations`, `websiteEvents`, `credits`, `other`.
|
|
2128
2128
|
*
|
|
2129
2129
|
* Data comes from the usage-based invoice breakdown (the CHARGE view, which always reconciles with what gets billed). Also served at `GET /v1/usage/daily`.
|
|
2130
2130
|
*
|
|
@@ -2143,7 +2143,15 @@ export const getXApiPricing = <ThrowOnError extends boolean = false>(options?: O
|
|
|
2143
2143
|
*
|
|
2144
2144
|
* With `groupBy=profile`, each group also carries `profileId` and `externalId`.
|
|
2145
2145
|
*
|
|
2146
|
-
* Profile-scoped API keys and members only see their profiles' groups (`attribution.restricted: true`, with `totals` summing the visible groups).
|
|
2146
|
+
* Profile-scoped API keys and members only see their profiles' groups (`attribution.restricted: true`, with `totals` summing the visible groups).
|
|
2147
|
+
*
|
|
2148
|
+
* Credits, managed messages, RCS messages, ad automations, Verify and website events are always unattributed.
|
|
2149
|
+
*
|
|
2150
|
+
* iMessage sender and RCS agent fees go to the profile of the sender or agent. Automation runs split each day's fee by that day's runs.
|
|
2151
|
+
*
|
|
2152
|
+
* A 10DLC fee goes to a profile only when its registration names one. Registrations filed by API or dashboard belong to the owner and stay unattributed.
|
|
2153
|
+
*
|
|
2154
|
+
* A caller that sees the whole workspace gets `restricted: false` and the same `totals` as without `groupBy`. Shares are measured over everything the bill and its members carry, so `unattributed` can include spend outside the workspace, never named.
|
|
2147
2155
|
*
|
|
2148
2156
|
* Since 1.630.0 a profile-scoped key or member never gets the team payload in metering mode: without `groupBy` or a filter, `days`, `totals` and `lineItems` are projected onto its visible profiles, `peaks`, `callUsage` and `tax` are `null`, and no `attribution` is returned. Full-access keys and sessions keep the team payload.
|
|
2149
2157
|
*
|
|
@@ -2170,6 +2178,7 @@ export const getUsage = <ThrowOnError extends boolean = false>(options?: Options
|
|
|
2170
2178
|
* ### Related endpoints
|
|
2171
2179
|
*
|
|
2172
2180
|
* - Billed spend by product: call `GET /v1/usage` with `range` / `granularity` params.
|
|
2181
|
+
* - Billed spend per profile, by your own `externalId`: `GET /v1/usage?range=cycle&groupBy=profile` ([what each customer costs you](/multi-tenant)).
|
|
2173
2182
|
* - The statement view (balance, credits, caps, payment status) lives at `GET /v1/billing`.
|
|
2174
2183
|
*
|
|
2175
2184
|
* ### Response shape
|
|
@@ -2975,6 +2984,8 @@ export const deleteAccount = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
2975
2984
|
* Check accounts health
|
|
2976
2985
|
* Returns health status of all connected accounts including token validity, permissions, and issues needing attention. A failing or stalled analytics sync (see `analyticsSync`) raises a healthy account to at least warning.
|
|
2977
2986
|
*
|
|
2987
|
+
* An X account whose analytics is off has `analyticsOff` with the reason. It never changes `status`: `analyticsSync` then keeps the date of the last read.
|
|
2988
|
+
*
|
|
2978
2989
|
* An account the platform has restricted or banned (for example a WhatsApp number Meta reports as BANNED) is `error`, with the platform's reason in `issues`. `needsReconnect` stays false, since reconnecting does not lift it.
|
|
2979
2990
|
*
|
|
2980
2991
|
*/
|
|
@@ -3039,6 +3050,8 @@ export const verifyWhatsAppNumber = <ThrowOnError extends boolean = false>(optio
|
|
|
3039
3050
|
*
|
|
3040
3051
|
* A failing or stalled analytics sync (see `analyticsSync`) raises a healthy account to at least `warning`.
|
|
3041
3052
|
*
|
|
3053
|
+
* An X account whose analytics is off has `analyticsOff` with the reason. It never changes `status`: `analyticsSync` then keeps the date of the last read.
|
|
3054
|
+
*
|
|
3042
3055
|
* An account the platform has restricted or banned is `error`, with the platform's reason in `issues` and a recommendation that says reconnecting does not lift it.
|
|
3043
3056
|
*
|
|
3044
3057
|
* ### Facebook, Instagram and Threads
|
|
@@ -4088,8 +4088,42 @@ export type AnalyticsListResponse = {
|
|
|
4088
4088
|
* Whether user has analytics add-on access
|
|
4089
4089
|
*/
|
|
4090
4090
|
hasAnalyticsAccess?: boolean;
|
|
4091
|
+
/**
|
|
4092
|
+
* The X accounts this list covers (after its platform, profile and account filters) whose analytics sync does not run: their numbers stay as of the last read. Also sent with `view=summary`. Absent when there are none.
|
|
4093
|
+
*/
|
|
4094
|
+
analyticsOff?: Array<AnalyticsOffAccount>;
|
|
4091
4095
|
};
|
|
4092
4096
|
|
|
4097
|
+
/**
|
|
4098
|
+
* X only: why no analytics sync runs for the account, so its numbers stay as of the last read (one read is made when the account connects).
|
|
4099
|
+
*/
|
|
4100
|
+
export type AnalyticsOff = {
|
|
4101
|
+
/**
|
|
4102
|
+
* - X_ANALYTICS_NOT_ENABLED: `xCapabilities.analytics` is off on the account. It is opt-in on usage-based billing. Turn it on with `PUT /v1/accounts/{accountId}`, or in the account's X settings in the dashboard.
|
|
4103
|
+
* - X_ANALYTICS_PAUSED: it was on, and the monthly X spend cap turned it off.
|
|
4104
|
+
* - PAYMENT_REQUIRED: X access is paused because billing on this account failed.
|
|
4105
|
+
*
|
|
4106
|
+
* New values may be added.
|
|
4107
|
+
*
|
|
4108
|
+
*/
|
|
4109
|
+
code: 'X_ANALYTICS_NOT_ENABLED' | 'X_ANALYTICS_PAUSED' | 'PAYMENT_REQUIRED';
|
|
4110
|
+
message: string;
|
|
4111
|
+
};
|
|
4112
|
+
|
|
4113
|
+
/**
|
|
4114
|
+
* - X_ANALYTICS_NOT_ENABLED: `xCapabilities.analytics` is off on the account. It is opt-in on usage-based billing. Turn it on with `PUT /v1/accounts/{accountId}`, or in the account's X settings in the dashboard.
|
|
4115
|
+
* - X_ANALYTICS_PAUSED: it was on, and the monthly X spend cap turned it off.
|
|
4116
|
+
* - PAYMENT_REQUIRED: X access is paused because billing on this account failed.
|
|
4117
|
+
*
|
|
4118
|
+
* New values may be added.
|
|
4119
|
+
*
|
|
4120
|
+
*/
|
|
4121
|
+
export type code = 'X_ANALYTICS_NOT_ENABLED' | 'X_ANALYTICS_PAUSED' | 'PAYMENT_REQUIRED';
|
|
4122
|
+
|
|
4123
|
+
export type AnalyticsOffAccount = {
|
|
4124
|
+
accountId: string;
|
|
4125
|
+
} & AnalyticsOff;
|
|
4126
|
+
|
|
4093
4127
|
export type AnalyticsOverview = {
|
|
4094
4128
|
totalPosts?: number;
|
|
4095
4129
|
publishedPosts?: number;
|
|
@@ -4141,6 +4175,10 @@ export type AnalyticsSinglePostResponse = {
|
|
|
4141
4175
|
* Human-readable status message for pending, partial, or failed states
|
|
4142
4176
|
*/
|
|
4143
4177
|
message?: (string) | null;
|
|
4178
|
+
/**
|
|
4179
|
+
* The X accounts of this post whose analytics sync does not run: synced numbers stay as of the last read, and a pending X entry stays pending. Absent when there are none.
|
|
4180
|
+
*/
|
|
4181
|
+
analyticsOff?: Array<AnalyticsOffAccount>;
|
|
4144
4182
|
/**
|
|
4145
4183
|
* Cover image URL. A Facebook, Instagram or TikTok cover whose signed CDN link is still valid is served as that link, which expires (Meta `oe=`, TikTok `x-expires=`): download the image rather than storing the link.
|
|
4146
4184
|
*
|
|
@@ -7941,7 +7979,7 @@ export type CampaignSubmissionFlag = {
|
|
|
7941
7979
|
raisedAt: string;
|
|
7942
7980
|
};
|
|
7943
7981
|
|
|
7944
|
-
export type
|
|
7982
|
+
export type code2 = 'duplicate_media' | 'duplicate_post' | 'view_spike' | 'linked_accounts' | 'cross_operator' | 'unreachable' | 'post_deleted' | 'account_restricted' | 'low_authenticity' | 'x_read_cap' | 'paid_views' | 'organic_unverified';
|
|
7945
7983
|
|
|
7946
7984
|
/**
|
|
7947
7985
|
* The outcome of the latest chat history request Zernio sent Meta for a WhatsApp coexistence number, read from the account (not a live probe).
|
|
@@ -15889,7 +15927,7 @@ export type HubSpotSettings = {
|
|
|
15889
15927
|
|
|
15890
15928
|
export type platform11 = 'hubspot';
|
|
15891
15929
|
|
|
15892
|
-
export type
|
|
15930
|
+
export type code3 = 'REQUIRED_CONTACT_PROPERTIES';
|
|
15893
15931
|
|
|
15894
15932
|
export type ImapConnectResult = {
|
|
15895
15933
|
dryRun?: boolean;
|
|
@@ -17820,7 +17858,7 @@ export type LinkedInMentionIssue = {
|
|
|
17820
17858
|
/**
|
|
17821
17859
|
* Why it failed.
|
|
17822
17860
|
*/
|
|
17823
|
-
export type
|
|
17861
|
+
export type code4 = 'linkedin_mention_unresolvable' | 'linkedin_mention_requires_page_admin' | 'linkedin_mention_name_unavailable' | 'linkedin_mentions_limit_exceeded' | 'rate_limited' | 'reconnect_required' | 'temporarily_unavailable';
|
|
17824
17862
|
|
|
17825
17863
|
/**
|
|
17826
17864
|
* LinkedIn post options.
|
|
@@ -20423,6 +20461,10 @@ export type PostMetricsResponse = {
|
|
|
20423
20461
|
* On a list of posts: the accounts this read queued for a fresh sync, because they were never synced or their stored numbers are over 90 minutes old. The answer holds the stored numbers; the synced ones arrive within minutes.
|
|
20424
20462
|
*/
|
|
20425
20463
|
syncRequestedAccountIds?: Array<(string)>;
|
|
20464
|
+
/**
|
|
20465
|
+
* The X accounts read whose analytics sync does not run: their stored numbers are not refreshed, and their posts without any stay pending. On a list, on the first page. Absent when there are none, and on the groupBy and changedSince reads other than groupBy=post.
|
|
20466
|
+
*/
|
|
20467
|
+
analyticsOff?: Array<AnalyticsOffAccount>;
|
|
20426
20468
|
/**
|
|
20427
20469
|
* With groupBy=format: how many of the newest posts the metrics sum, and the most it reads. Below limit, every post of the range is counted.
|
|
20428
20470
|
*/
|
|
@@ -24160,6 +24202,7 @@ export type UsageAttributionSlice = {
|
|
|
24160
24202
|
accounts?: number;
|
|
24161
24203
|
numbers?: number;
|
|
24162
24204
|
imessage?: number;
|
|
24205
|
+
rcs?: number;
|
|
24163
24206
|
calls?: number;
|
|
24164
24207
|
sms?: number;
|
|
24165
24208
|
messages?: number;
|
|
@@ -24167,6 +24210,8 @@ export type UsageAttributionSlice = {
|
|
|
24167
24210
|
dlc?: number;
|
|
24168
24211
|
xApi?: number;
|
|
24169
24212
|
ads?: number;
|
|
24213
|
+
automations?: number;
|
|
24214
|
+
websiteEvents?: number;
|
|
24170
24215
|
credits?: number;
|
|
24171
24216
|
other?: number;
|
|
24172
24217
|
};
|
|
@@ -24195,6 +24240,10 @@ export type UsageMetering = {
|
|
|
24195
24240
|
* iMessage sender fees.
|
|
24196
24241
|
*/
|
|
24197
24242
|
imessage?: number;
|
|
24243
|
+
/**
|
|
24244
|
+
* RCS agent and message fees.
|
|
24245
|
+
*/
|
|
24246
|
+
rcs?: number;
|
|
24198
24247
|
calls?: number;
|
|
24199
24248
|
sms?: number;
|
|
24200
24249
|
/**
|
|
@@ -24214,6 +24263,14 @@ export type UsageMetering = {
|
|
|
24214
24263
|
* Managed ads fees.
|
|
24215
24264
|
*/
|
|
24216
24265
|
ads?: number;
|
|
24266
|
+
/**
|
|
24267
|
+
* Automation run and ad automation fees.
|
|
24268
|
+
*/
|
|
24269
|
+
automations?: number;
|
|
24270
|
+
/**
|
|
24271
|
+
* Website event fees.
|
|
24272
|
+
*/
|
|
24273
|
+
websiteEvents?: number;
|
|
24217
24274
|
/**
|
|
24218
24275
|
* Applied credits/discounts (negative).
|
|
24219
24276
|
*/
|
|
@@ -24227,6 +24284,7 @@ export type UsageMetering = {
|
|
|
24227
24284
|
accounts?: number;
|
|
24228
24285
|
numbers?: number;
|
|
24229
24286
|
imessage?: number;
|
|
24287
|
+
rcs?: number;
|
|
24230
24288
|
calls?: number;
|
|
24231
24289
|
sms?: number;
|
|
24232
24290
|
messages?: number;
|
|
@@ -24234,6 +24292,8 @@ export type UsageMetering = {
|
|
|
24234
24292
|
dlc?: number;
|
|
24235
24293
|
xApi?: number;
|
|
24236
24294
|
ads?: number;
|
|
24295
|
+
automations?: number;
|
|
24296
|
+
websiteEvents?: number;
|
|
24237
24297
|
credits?: number;
|
|
24238
24298
|
other?: number;
|
|
24239
24299
|
total?: number;
|
|
@@ -24243,7 +24303,7 @@ export type UsageMetering = {
|
|
|
24243
24303
|
*/
|
|
24244
24304
|
lineItems?: Array<{
|
|
24245
24305
|
name?: string;
|
|
24246
|
-
product?: 'accounts' | 'numbers' | 'imessage' | 'calls' | 'sms' | 'messages' | 'verify' | 'dlc' | 'xApi' | 'ads' | 'credits' | 'other';
|
|
24306
|
+
product?: 'accounts' | 'numbers' | 'imessage' | 'rcs' | 'calls' | 'sms' | 'messages' | 'verify' | 'dlc' | 'xApi' | 'ads' | 'automations' | 'websiteEvents' | 'credits' | 'other';
|
|
24247
24307
|
totalUsd?: number;
|
|
24248
24308
|
quantity?: number;
|
|
24249
24309
|
/**
|
|
@@ -24310,7 +24370,7 @@ export type UsageMetering = {
|
|
|
24310
24370
|
groupBy?: 'profile' | 'account';
|
|
24311
24371
|
groups?: Array<UsageAttributionGroup>;
|
|
24312
24372
|
/**
|
|
24313
|
-
* Spend no profile/account can claim: credits,
|
|
24373
|
+
* Spend no profile/account of your workspace can claim: credits, managed messages, RCS messages, ad automations, Verify, website events, 10DLC registrations that name no profile, usage whose record no longer resolves, and the share measured outside your workspace. Zero for a restricted principal.
|
|
24314
24374
|
*/
|
|
24315
24375
|
unattributed?: UsageAttributionSlice;
|
|
24316
24376
|
/**
|
|
@@ -26637,7 +26697,7 @@ export type event27 = 'balance.empty';
|
|
|
26637
26697
|
/**
|
|
26638
26698
|
* The 402 code pay-per-use calls get until the balance is funded. `usage_limit_reached` when the auto top-up monthly limit is what keeps it at $0.
|
|
26639
26699
|
*/
|
|
26640
|
-
export type
|
|
26700
|
+
export type code5 = 'insufficient_balance' | 'usage_limit_reached';
|
|
26641
26701
|
|
|
26642
26702
|
export type WebhookPayloadBalanceLow = {
|
|
26643
26703
|
/**
|
|
@@ -31609,7 +31669,7 @@ export type WhatsAppTemplateLookupError = {
|
|
|
31609
31669
|
|
|
31610
31670
|
export type type42 = 'platform_error';
|
|
31611
31671
|
|
|
31612
|
-
export type
|
|
31672
|
+
export type code6 = 'platform_api_error';
|
|
31613
31673
|
|
|
31614
31674
|
export type phase = 'template_lookup';
|
|
31615
31675
|
|
|
@@ -36274,6 +36334,10 @@ export type GetPostTimelineResponse = ({
|
|
|
36274
36334
|
[key: string]: (number);
|
|
36275
36335
|
};
|
|
36276
36336
|
}>;
|
|
36337
|
+
/**
|
|
36338
|
+
* The X accounts of this post whose analytics sync does not run, so their rows stop at the last read. Absent when there are none.
|
|
36339
|
+
*/
|
|
36340
|
+
analyticsOff?: Array<AnalyticsOffAccount>;
|
|
36277
36341
|
});
|
|
36278
36342
|
|
|
36279
36343
|
export type GetPostTimelineError = ({
|
|
@@ -39141,6 +39205,7 @@ export type GetAllAccountsHealthResponse = ({
|
|
|
39141
39205
|
*/
|
|
39142
39206
|
lastSyncedAt?: (string) | null;
|
|
39143
39207
|
};
|
|
39208
|
+
analyticsOff?: AnalyticsOff;
|
|
39144
39209
|
/**
|
|
39145
39210
|
* Present on WhatsApp, Instagram and Facebook accounts. An active WhatsApp number with no inbound message or comment 24 hours after its latest connect gets an entry in issues, which never changes status. Null for accounts connected before tracking shipped, until their first inbound event or next connect.
|
|
39146
39211
|
*/
|
|
@@ -39416,6 +39481,7 @@ export type GetAccountHealthResponse = ({
|
|
|
39416
39481
|
*/
|
|
39417
39482
|
lastSyncedAt?: (string) | null;
|
|
39418
39483
|
};
|
|
39484
|
+
analyticsOff?: AnalyticsOff;
|
|
39419
39485
|
/**
|
|
39420
39486
|
* Present on WhatsApp, Instagram and Facebook accounts. An active WhatsApp number with no inbound message or comment 24 hours after its latest connect gets an entry in issues, which never changes status. Null for accounts connected before tracking shipped, until their first inbound event or next connect.
|
|
39421
39487
|
*/
|