@getlatedev/node 0.2.926 → 0.2.927
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 +18 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +6 -0
- package/src/generated/types.gen.ts +18 -0
package/dist/index.d.mts
CHANGED
|
@@ -43980,6 +43980,12 @@ type CreateMessagingAdData = {
|
|
|
43980
43980
|
*/
|
|
43981
43981
|
destinations?: Array<('whatsapp' | 'messenger' | 'instagram_direct')>;
|
|
43982
43982
|
});
|
|
43983
|
+
headers?: {
|
|
43984
|
+
/**
|
|
43985
|
+
* Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
43986
|
+
*/
|
|
43987
|
+
'Idempotency-Key'?: string;
|
|
43988
|
+
};
|
|
43983
43989
|
};
|
|
43984
43990
|
type CreateMessagingAdResponse = ((CtwaSingleResponse | CtwaMultiResponse));
|
|
43985
43991
|
type CreateMessagingAdError = (unknown | {
|
|
@@ -43996,6 +44002,12 @@ type CreateCallAdData = {
|
|
|
43996
44002
|
*/
|
|
43997
44003
|
linkUrl: string;
|
|
43998
44004
|
});
|
|
44005
|
+
headers?: {
|
|
44006
|
+
/**
|
|
44007
|
+
* Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
44008
|
+
*/
|
|
44009
|
+
'Idempotency-Key'?: string;
|
|
44010
|
+
};
|
|
43999
44011
|
};
|
|
44000
44012
|
type CreateCallAdResponse = ((CtwaSingleResponse | CtwaMultiResponse));
|
|
44001
44013
|
type CreateCallAdError = (unknown | {
|
|
@@ -44003,6 +44015,12 @@ type CreateCallAdError = (unknown | {
|
|
|
44003
44015
|
} | ErrorResponse);
|
|
44004
44016
|
type CreateCtwaAdData = {
|
|
44005
44017
|
body: CtwaAdRequestBody;
|
|
44018
|
+
headers?: {
|
|
44019
|
+
/**
|
|
44020
|
+
* Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
44021
|
+
*/
|
|
44022
|
+
'Idempotency-Key'?: string;
|
|
44023
|
+
};
|
|
44006
44024
|
};
|
|
44007
44025
|
type CreateCtwaAdResponse = ((CtwaSingleResponse | CtwaMultiResponse));
|
|
44008
44026
|
type CreateCtwaAdError = (unknown | {
|
package/dist/index.d.ts
CHANGED
|
@@ -43980,6 +43980,12 @@ type CreateMessagingAdData = {
|
|
|
43980
43980
|
*/
|
|
43981
43981
|
destinations?: Array<('whatsapp' | 'messenger' | 'instagram_direct')>;
|
|
43982
43982
|
});
|
|
43983
|
+
headers?: {
|
|
43984
|
+
/**
|
|
43985
|
+
* Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
43986
|
+
*/
|
|
43987
|
+
'Idempotency-Key'?: string;
|
|
43988
|
+
};
|
|
43983
43989
|
};
|
|
43984
43990
|
type CreateMessagingAdResponse = ((CtwaSingleResponse | CtwaMultiResponse));
|
|
43985
43991
|
type CreateMessagingAdError = (unknown | {
|
|
@@ -43996,6 +44002,12 @@ type CreateCallAdData = {
|
|
|
43996
44002
|
*/
|
|
43997
44003
|
linkUrl: string;
|
|
43998
44004
|
});
|
|
44005
|
+
headers?: {
|
|
44006
|
+
/**
|
|
44007
|
+
* Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
44008
|
+
*/
|
|
44009
|
+
'Idempotency-Key'?: string;
|
|
44010
|
+
};
|
|
43999
44011
|
};
|
|
44000
44012
|
type CreateCallAdResponse = ((CtwaSingleResponse | CtwaMultiResponse));
|
|
44001
44013
|
type CreateCallAdError = (unknown | {
|
|
@@ -44003,6 +44015,12 @@ type CreateCallAdError = (unknown | {
|
|
|
44003
44015
|
} | ErrorResponse);
|
|
44004
44016
|
type CreateCtwaAdData = {
|
|
44005
44017
|
body: CtwaAdRequestBody;
|
|
44018
|
+
headers?: {
|
|
44019
|
+
/**
|
|
44020
|
+
* Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
44021
|
+
*/
|
|
44022
|
+
'Idempotency-Key'?: string;
|
|
44023
|
+
};
|
|
44006
44024
|
};
|
|
44007
44025
|
type CreateCtwaAdResponse = ((CtwaSingleResponse | CtwaMultiResponse));
|
|
44008
44026
|
type CreateCtwaAdError = (unknown | {
|
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.927",
|
|
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.927",
|
|
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
|
@@ -11944,6 +11944,8 @@ export const sendWhatsAppConversion = <ThrowOnError extends boolean = false>(opt
|
|
|
11944
11944
|
* a number already paired with the Page (WhatsApp destination only).
|
|
11945
11945
|
* `accountId` is a Facebook, Instagram or Meta ads (business login) connection;
|
|
11946
11946
|
* `pageId` picks the Page when that connection was granted several.
|
|
11947
|
+
*
|
|
11948
|
+
* **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). Keys are scoped to your credential and expire after 24h.
|
|
11947
11949
|
*/
|
|
11948
11950
|
export const createMessagingAd = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateMessagingAdData, ThrowOnError>) => {
|
|
11949
11951
|
return (options?.client ?? client).post<CreateMessagingAdResponse, CreateMessagingAdError, ThrowOnError>({
|
|
@@ -11958,6 +11960,8 @@ export const createMessagingAd = <ThrowOnError extends boolean = false>(options:
|
|
|
11958
11960
|
* via a tel: link. The ad set is destination_type PHONE_CALL optimizing QUALITY_CALL
|
|
11959
11961
|
* and the campaign objective defaults to OUTCOME_LEADS.
|
|
11960
11962
|
* Supports the same single-creative and multi-creative shapes as CTWA.
|
|
11963
|
+
*
|
|
11964
|
+
* **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). Keys are scoped to your credential and expire after 24h.
|
|
11961
11965
|
*/
|
|
11962
11966
|
export const createCallAd = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateCallAdData, ThrowOnError>) => {
|
|
11963
11967
|
return (options?.client ?? client).post<CreateCallAdResponse, CreateCallAdError, ThrowOnError>({
|
|
@@ -11986,6 +11990,8 @@ export const createCallAd = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
11986
11990
|
* `existingPostId`) or `objectStoryId`, either per creative or at the top level. Omit fresh
|
|
11987
11991
|
* media and copy for that creative. Optional `whatsappPhoneNumber` selects
|
|
11988
11992
|
* a number already paired with the Page (WhatsApp destination only).
|
|
11993
|
+
*
|
|
11994
|
+
* **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). Keys are scoped to your credential and expire after 24h.
|
|
11989
11995
|
*/
|
|
11990
11996
|
export const createCtwaAd = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateCtwaAdData, ThrowOnError>) => {
|
|
11991
11997
|
return (options?.client ?? client).post<CreateCtwaAdResponse, CreateCtwaAdError, ThrowOnError>({
|
|
@@ -44824,6 +44824,12 @@ export type CreateMessagingAdData = {
|
|
|
44824
44824
|
*/
|
|
44825
44825
|
destinations?: Array<('whatsapp' | 'messenger' | 'instagram_direct')>;
|
|
44826
44826
|
});
|
|
44827
|
+
headers?: {
|
|
44828
|
+
/**
|
|
44829
|
+
* Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
44830
|
+
*/
|
|
44831
|
+
'Idempotency-Key'?: string;
|
|
44832
|
+
};
|
|
44827
44833
|
};
|
|
44828
44834
|
|
|
44829
44835
|
export type CreateMessagingAdResponse = ((CtwaSingleResponse | CtwaMultiResponse));
|
|
@@ -44843,6 +44849,12 @@ export type CreateCallAdData = {
|
|
|
44843
44849
|
*/
|
|
44844
44850
|
linkUrl: string;
|
|
44845
44851
|
});
|
|
44852
|
+
headers?: {
|
|
44853
|
+
/**
|
|
44854
|
+
* Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
44855
|
+
*/
|
|
44856
|
+
'Idempotency-Key'?: string;
|
|
44857
|
+
};
|
|
44846
44858
|
};
|
|
44847
44859
|
|
|
44848
44860
|
export type CreateCallAdResponse = ((CtwaSingleResponse | CtwaMultiResponse));
|
|
@@ -44853,6 +44865,12 @@ export type CreateCallAdError = (unknown | {
|
|
|
44853
44865
|
|
|
44854
44866
|
export type CreateCtwaAdData = {
|
|
44855
44867
|
body: CtwaAdRequestBody;
|
|
44868
|
+
headers?: {
|
|
44869
|
+
/**
|
|
44870
|
+
* Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
44871
|
+
*/
|
|
44872
|
+
'Idempotency-Key'?: string;
|
|
44873
|
+
};
|
|
44856
44874
|
};
|
|
44857
44875
|
|
|
44858
44876
|
export type CreateCtwaAdResponse = ((CtwaSingleResponse | CtwaMultiResponse));
|