@getlatedev/node 0.2.1449 → 0.2.1451
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 +38 -3
- package/dist/index.d.ts +38 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +12 -0
- package/src/generated/types.gen.ts +39 -2
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.1451",
|
|
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.1451",
|
|
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
|
@@ -12671,6 +12671,18 @@ export const createAdCampaign = <ThrowOnError extends boolean = false>(options:
|
|
|
12671
12671
|
*
|
|
12672
12672
|
* On Meta the check reads the campaign's own `status`, so a delivery status such as `IN_PROCESS` or `WITH_ISSUES` does not force a write.
|
|
12673
12673
|
*
|
|
12674
|
+
* ### Retrying
|
|
12675
|
+
*
|
|
12676
|
+
* Retrying the same request is safe: when the first call already switched the campaign, the live read answers `skipped: 1` and nothing is written twice. A call that timed out on your side may still have completed, so retry it instead of assuming it failed.
|
|
12677
|
+
*
|
|
12678
|
+
* These errors fail the same way on every retry until something changes:
|
|
12679
|
+
*
|
|
12680
|
+
* - `401` `reconnect_required`: the platform no longer accepts the connection's token (on Meta, code 190: expired, revoked, password changed or security checkpoint). Reconnect the account, then retry.
|
|
12681
|
+
* - `422` `ad_account_unusable`: the ad account's status does not allow edits. Resolve it in the platform, then retry.
|
|
12682
|
+
* - `400` `platform_api_error` saying the campaign was deleted or archived (Meta subcodes 1487566 and 3858863): there is nothing left to switch.
|
|
12683
|
+
*
|
|
12684
|
+
* A Meta code 190 with subcode 464 means Meta considers the Facebook user unconfirmed. It answers `400` `platform_api_error` and retrying does not clear it: the user must log in to facebook.com and complete what Meta asks (usually confirming their email or phone), then retry.
|
|
12685
|
+
*
|
|
12674
12686
|
*/
|
|
12675
12687
|
export const updateAdCampaignStatus = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateAdCampaignStatusData, ThrowOnError>) => {
|
|
12676
12688
|
return (options?.client ?? client).put<UpdateAdCampaignStatusResponse, UpdateAdCampaignStatusError, ThrowOnError>({
|
|
@@ -9,7 +9,7 @@ export type AccountCursorPagination = {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export type AccountsListResponse = {
|
|
12
|
-
accounts: Array<
|
|
12
|
+
accounts: Array<ListedAccount>;
|
|
13
13
|
/**
|
|
14
14
|
* Whether user has analytics add-on access
|
|
15
15
|
*/
|
|
@@ -10261,6 +10261,28 @@ export type region = 'US' | 'GB';
|
|
|
10261
10261
|
*/
|
|
10262
10262
|
export type status32 = 'ordering' | 'awaiting_payment' | 'activating' | 'active' | 'suspended' | 'canceled' | 'failed';
|
|
10263
10263
|
|
|
10264
|
+
/**
|
|
10265
|
+
* When inbound messages and comments were first and last seen for the account. Only events matched to this account count. WhatsApp delivery statuses for outbound messages do not count, so the stamps of a number that only sends stay null. The stamps reset on every connect.
|
|
10266
|
+
*/
|
|
10267
|
+
export type InboundActivity = {
|
|
10268
|
+
/**
|
|
10269
|
+
* First inbound message since the latest connect, or since tracking began for an account connected before it. Null when none yet.
|
|
10270
|
+
*/
|
|
10271
|
+
firstMessageAt: (string) | null;
|
|
10272
|
+
/**
|
|
10273
|
+
* Latest inbound message, precise to about one hour. Null when none yet.
|
|
10274
|
+
*/
|
|
10275
|
+
lastMessageAt: (string) | null;
|
|
10276
|
+
/**
|
|
10277
|
+
* First inbound comment since the latest connect, or since tracking began for an account connected before it. Null when none yet.
|
|
10278
|
+
*/
|
|
10279
|
+
firstCommentAt: (string) | null;
|
|
10280
|
+
/**
|
|
10281
|
+
* Latest inbound comment, precise to about one hour. Null when none yet.
|
|
10282
|
+
*/
|
|
10283
|
+
lastCommentAt: (string) | null;
|
|
10284
|
+
};
|
|
10285
|
+
|
|
10264
10286
|
/**
|
|
10265
10287
|
* Click attribution for a conversation that started from a Meta ad or a ref-tagged ig.me / m.me link, as Meta sent it. Absent when the conversation did not come from an attributable click. For the ad name, campaign and ad set, read `adAttribution`.
|
|
10266
10288
|
*
|
|
@@ -11780,6 +11802,13 @@ export type LinkedInPlatformData = {
|
|
|
11780
11802
|
*/
|
|
11781
11803
|
export type duration = 'ONE_DAY' | 'THREE_DAYS' | 'SEVEN_DAYS' | 'FOURTEEN_DAYS';
|
|
11782
11804
|
|
|
11805
|
+
export type ListedAccount = SocialAccount & {
|
|
11806
|
+
/**
|
|
11807
|
+
* Present only on WhatsApp, Instagram and Facebook accounts. All four stamps are null when no inbound event has been seen since the latest connect. Null for an account connected before tracking shipped until its first inbound event or its next connect.
|
|
11808
|
+
*/
|
|
11809
|
+
inboundActivity?: (InboundActivity | null);
|
|
11810
|
+
};
|
|
11811
|
+
|
|
11783
11812
|
/**
|
|
11784
11813
|
* MIME type of the file to upload. Rejected with a 400 (INVALID_FIELD_VALUE on contentType) when it is not one of these values, so generic types such as application/octet-stream are not accepted here.
|
|
11785
11814
|
*/
|
|
@@ -27234,6 +27263,10 @@ export type GetAllAccountsHealthResponse = ({
|
|
|
27234
27263
|
*/
|
|
27235
27264
|
lastSyncedAt?: (string) | null;
|
|
27236
27265
|
};
|
|
27266
|
+
/**
|
|
27267
|
+
* 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.
|
|
27268
|
+
*/
|
|
27269
|
+
inboundActivity?: (InboundActivity | null);
|
|
27237
27270
|
/**
|
|
27238
27271
|
* Observed from Meta's own errors on our sends, not a live probe. It lags reality by one message in each direction.
|
|
27239
27272
|
*
|
|
@@ -27447,6 +27480,10 @@ export type GetAccountHealthResponse = ({
|
|
|
27447
27480
|
*/
|
|
27448
27481
|
lastSyncedAt?: (string) | null;
|
|
27449
27482
|
};
|
|
27483
|
+
/**
|
|
27484
|
+
* 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.
|
|
27485
|
+
*/
|
|
27486
|
+
inboundActivity?: (InboundActivity | null);
|
|
27450
27487
|
/**
|
|
27451
27488
|
* Observed from Meta's own errors on our sends, not a live probe. It lags reality by one message in each direction.
|
|
27452
27489
|
*
|
|
@@ -51467,7 +51504,7 @@ export type UpdateAdCampaignStatusResponse = ({
|
|
|
51467
51504
|
skippedReasons?: Array<(string)>;
|
|
51468
51505
|
});
|
|
51469
51506
|
|
|
51470
|
-
export type UpdateAdCampaignStatusError = (unknown
|
|
51507
|
+
export type UpdateAdCampaignStatusError = (unknown);
|
|
51471
51508
|
|
|
51472
51509
|
export type GetCampaignAdScheduleData = {
|
|
51473
51510
|
path: {
|