@getlatedev/node 0.2.1330 → 0.2.1332
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/README.md +4 -0
- package/dist/index.d.mts +142 -1
- package/dist/index.d.ts +142 -1
- package/dist/index.js +37 -1
- package/dist/index.mjs +37 -1
- package/package.json +1 -1
- package/src/client.ts +16 -0
- package/src/generated/sdk.gen.ts +60 -1
- package/src/generated/types.gen.ts +142 -0
|
@@ -1802,6 +1802,10 @@ export type AdTracking = {
|
|
|
1802
1802
|
key: string;
|
|
1803
1803
|
value: string;
|
|
1804
1804
|
}>;
|
|
1805
|
+
/**
|
|
1806
|
+
* POST /v1/ads/create on Meta and Google only. Every ad created there carries `zrn=<platform ad id>` on its landing URL so orders and events tied to the landing URL map back to the ad. Meta: `{ key: zrn, value: '{{ad.id}}' }` is appended after your `urlTags`, which are sent unchanged; a `zrn` key you send yourself is kept. Skipped for lead forms, call ads, `existingCreativeId` and app promotion. Google (Display and Search): the ad's `final_url_suffix` becomes the suffix it would inherit (ad group, campaign or account) plus `&zrn={creative}`, so your account and campaign UTMs still apply; if that suffix cannot be read or Google rejects it, the ad is created untagged. Existing ads are never changed. Set `false` to create the ad with no Zernio tag.
|
|
1807
|
+
*/
|
|
1808
|
+
zernioTag?: boolean;
|
|
1805
1809
|
};
|
|
1806
1810
|
|
|
1807
1811
|
/**
|
|
@@ -6687,6 +6691,24 @@ export type quotaScope = 'DEVELOPER' | 'ACCOUNT';
|
|
|
6687
6691
|
*/
|
|
6688
6692
|
export type budgetScope = 'account' | 'user';
|
|
6689
6693
|
|
|
6694
|
+
export type EventDestination = {
|
|
6695
|
+
/**
|
|
6696
|
+
* Event destination ID, used to delete it.
|
|
6697
|
+
*/
|
|
6698
|
+
id?: string;
|
|
6699
|
+
profileId?: string;
|
|
6700
|
+
accountId?: string;
|
|
6701
|
+
/**
|
|
6702
|
+
* Platform destination (pixel, conversion action, rule, ...).
|
|
6703
|
+
*/
|
|
6704
|
+
destinationId?: string;
|
|
6705
|
+
/**
|
|
6706
|
+
* Event names forwarded to this destination; null forwards every event.
|
|
6707
|
+
*/
|
|
6708
|
+
eventNames?: Array<(string)> | null;
|
|
6709
|
+
createdAt?: string;
|
|
6710
|
+
};
|
|
6711
|
+
|
|
6690
6712
|
/**
|
|
6691
6713
|
* A media item on a native (external/synced) post, as carried by post.external.* webhook payloads. Distinct from the richer MediaItem used for Zernio-authored posts: external items are always already-published and limited to image or video. Kept as a separate schema so the generated SDK model does not collide with MediaItem.
|
|
6692
6714
|
*
|
|
@@ -55687,6 +55709,126 @@ export type RemoveCustomConversionGoalResponse = ({
|
|
|
55687
55709
|
|
|
55688
55710
|
export type RemoveCustomConversionGoalError = (ErrorResponse | unknown);
|
|
55689
55711
|
|
|
55712
|
+
export type SendEventsData = {
|
|
55713
|
+
body: {
|
|
55714
|
+
/**
|
|
55715
|
+
* Profile the events belong to. Its saved destinations receive the events.
|
|
55716
|
+
*/
|
|
55717
|
+
profileId: string;
|
|
55718
|
+
events: Array<ConversionEvent>;
|
|
55719
|
+
/**
|
|
55720
|
+
* Send to these destinations instead of the saved ones (every event goes to each).
|
|
55721
|
+
*/
|
|
55722
|
+
destinations?: Array<{
|
|
55723
|
+
/**
|
|
55724
|
+
* Connected ads account ID (metaads, googleads, linkedinads, tiktokads, openaiads, pinterestads or redditads).
|
|
55725
|
+
*/
|
|
55726
|
+
accountId: string;
|
|
55727
|
+
/**
|
|
55728
|
+
* Platform destination, as listed by GET /v1/accounts/{accountId}/conversion-destinations.
|
|
55729
|
+
*/
|
|
55730
|
+
destinationId: string;
|
|
55731
|
+
}>;
|
|
55732
|
+
/**
|
|
55733
|
+
* Batch-level user consent, forwarded to every destination (see POST /v1/ads/conversions).
|
|
55734
|
+
*/
|
|
55735
|
+
consent?: {
|
|
55736
|
+
adUserData?: 'GRANTED' | 'DENIED';
|
|
55737
|
+
adPersonalization?: 'GRANTED' | 'DENIED';
|
|
55738
|
+
};
|
|
55739
|
+
/**
|
|
55740
|
+
* Forwarded as each platform test code (see POST /v1/ads/conversions). Test events are not stored.
|
|
55741
|
+
*/
|
|
55742
|
+
testCode?: string;
|
|
55743
|
+
};
|
|
55744
|
+
};
|
|
55745
|
+
|
|
55746
|
+
export type SendEventsResponse = ({
|
|
55747
|
+
/**
|
|
55748
|
+
* Events in the request.
|
|
55749
|
+
*/
|
|
55750
|
+
eventsReceived?: number;
|
|
55751
|
+
/**
|
|
55752
|
+
* Whether the events were stored for reporting (always false with testCode).
|
|
55753
|
+
*/
|
|
55754
|
+
stored?: boolean;
|
|
55755
|
+
destinations?: Array<{
|
|
55756
|
+
accountId?: string;
|
|
55757
|
+
destinationId?: string;
|
|
55758
|
+
platform?: 'metaads' | 'googleads' | 'linkedinads' | 'tiktokads' | 'openaiads' | 'pinterestads' | 'redditads';
|
|
55759
|
+
/**
|
|
55760
|
+
* Events the platform accepted.
|
|
55761
|
+
*/
|
|
55762
|
+
eventsSent?: number;
|
|
55763
|
+
eventsFailed?: number;
|
|
55764
|
+
failures?: Array<{
|
|
55765
|
+
/**
|
|
55766
|
+
* Index into the events sent to this destination.
|
|
55767
|
+
*/
|
|
55768
|
+
eventIndex?: number;
|
|
55769
|
+
eventId?: string;
|
|
55770
|
+
message?: string;
|
|
55771
|
+
code?: (string | number);
|
|
55772
|
+
}>;
|
|
55773
|
+
/**
|
|
55774
|
+
* Set when the destination could not be reached at all (account disconnected, unsupported platform, platform error).
|
|
55775
|
+
*/
|
|
55776
|
+
error?: string;
|
|
55777
|
+
}>;
|
|
55778
|
+
});
|
|
55779
|
+
|
|
55780
|
+
export type SendEventsError = (ErrorResponse | {
|
|
55781
|
+
error?: string;
|
|
55782
|
+
});
|
|
55783
|
+
|
|
55784
|
+
export type ListEventDestinationsData = {
|
|
55785
|
+
query?: {
|
|
55786
|
+
profileId?: string;
|
|
55787
|
+
};
|
|
55788
|
+
};
|
|
55789
|
+
|
|
55790
|
+
export type ListEventDestinationsResponse = ({
|
|
55791
|
+
destinations?: Array<EventDestination>;
|
|
55792
|
+
});
|
|
55793
|
+
|
|
55794
|
+
export type ListEventDestinationsError = (ErrorResponse | {
|
|
55795
|
+
error?: string;
|
|
55796
|
+
});
|
|
55797
|
+
|
|
55798
|
+
export type CreateEventDestinationData = {
|
|
55799
|
+
body: {
|
|
55800
|
+
profileId: string;
|
|
55801
|
+
/**
|
|
55802
|
+
* Connected ads account ID that owns the destination.
|
|
55803
|
+
*/
|
|
55804
|
+
accountId: string;
|
|
55805
|
+
destinationId: string;
|
|
55806
|
+
eventNames?: Array<(string)>;
|
|
55807
|
+
};
|
|
55808
|
+
};
|
|
55809
|
+
|
|
55810
|
+
export type CreateEventDestinationResponse = ({
|
|
55811
|
+
destination?: EventDestination;
|
|
55812
|
+
});
|
|
55813
|
+
|
|
55814
|
+
export type CreateEventDestinationError = (ErrorResponse | {
|
|
55815
|
+
error?: string;
|
|
55816
|
+
});
|
|
55817
|
+
|
|
55818
|
+
export type DeleteEventDestinationData = {
|
|
55819
|
+
path: {
|
|
55820
|
+
destinationId: string;
|
|
55821
|
+
};
|
|
55822
|
+
};
|
|
55823
|
+
|
|
55824
|
+
export type DeleteEventDestinationResponse = ({
|
|
55825
|
+
deleted?: boolean;
|
|
55826
|
+
});
|
|
55827
|
+
|
|
55828
|
+
export type DeleteEventDestinationError = (ErrorResponse | {
|
|
55829
|
+
error?: string;
|
|
55830
|
+
});
|
|
55831
|
+
|
|
55690
55832
|
export type GetCampaignConversionGoalsData = {
|
|
55691
55833
|
path: {
|
|
55692
55834
|
/**
|