@getlatedev/node 0.2.1329 → 0.2.1331
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 +138 -1
- package/dist/index.d.ts +138 -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 +64 -4
- package/src/generated/types.gen.ts +138 -0
|
@@ -6687,6 +6687,24 @@ export type quotaScope = 'DEVELOPER' | 'ACCOUNT';
|
|
|
6687
6687
|
*/
|
|
6688
6688
|
export type budgetScope = 'account' | 'user';
|
|
6689
6689
|
|
|
6690
|
+
export type EventDestination = {
|
|
6691
|
+
/**
|
|
6692
|
+
* Event destination ID, used to delete it.
|
|
6693
|
+
*/
|
|
6694
|
+
id?: string;
|
|
6695
|
+
profileId?: string;
|
|
6696
|
+
accountId?: string;
|
|
6697
|
+
/**
|
|
6698
|
+
* Platform destination (pixel, conversion action, rule, ...).
|
|
6699
|
+
*/
|
|
6700
|
+
destinationId?: string;
|
|
6701
|
+
/**
|
|
6702
|
+
* Event names forwarded to this destination; null forwards every event.
|
|
6703
|
+
*/
|
|
6704
|
+
eventNames?: Array<(string)> | null;
|
|
6705
|
+
createdAt?: string;
|
|
6706
|
+
};
|
|
6707
|
+
|
|
6690
6708
|
/**
|
|
6691
6709
|
* 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
6710
|
*
|
|
@@ -55687,6 +55705,126 @@ export type RemoveCustomConversionGoalResponse = ({
|
|
|
55687
55705
|
|
|
55688
55706
|
export type RemoveCustomConversionGoalError = (ErrorResponse | unknown);
|
|
55689
55707
|
|
|
55708
|
+
export type SendEventsData = {
|
|
55709
|
+
body: {
|
|
55710
|
+
/**
|
|
55711
|
+
* Profile the events belong to. Its saved destinations receive the events.
|
|
55712
|
+
*/
|
|
55713
|
+
profileId: string;
|
|
55714
|
+
events: Array<ConversionEvent>;
|
|
55715
|
+
/**
|
|
55716
|
+
* Send to these destinations instead of the saved ones (every event goes to each).
|
|
55717
|
+
*/
|
|
55718
|
+
destinations?: Array<{
|
|
55719
|
+
/**
|
|
55720
|
+
* Connected ads account ID (metaads, googleads, linkedinads, tiktokads, openaiads, pinterestads or redditads).
|
|
55721
|
+
*/
|
|
55722
|
+
accountId: string;
|
|
55723
|
+
/**
|
|
55724
|
+
* Platform destination, as listed by GET /v1/accounts/{accountId}/conversion-destinations.
|
|
55725
|
+
*/
|
|
55726
|
+
destinationId: string;
|
|
55727
|
+
}>;
|
|
55728
|
+
/**
|
|
55729
|
+
* Batch-level user consent, forwarded to every destination (see POST /v1/ads/conversions).
|
|
55730
|
+
*/
|
|
55731
|
+
consent?: {
|
|
55732
|
+
adUserData?: 'GRANTED' | 'DENIED';
|
|
55733
|
+
adPersonalization?: 'GRANTED' | 'DENIED';
|
|
55734
|
+
};
|
|
55735
|
+
/**
|
|
55736
|
+
* Forwarded as each platform test code (see POST /v1/ads/conversions). Test events are not stored.
|
|
55737
|
+
*/
|
|
55738
|
+
testCode?: string;
|
|
55739
|
+
};
|
|
55740
|
+
};
|
|
55741
|
+
|
|
55742
|
+
export type SendEventsResponse = ({
|
|
55743
|
+
/**
|
|
55744
|
+
* Events in the request.
|
|
55745
|
+
*/
|
|
55746
|
+
eventsReceived?: number;
|
|
55747
|
+
/**
|
|
55748
|
+
* Whether the events were stored for reporting (always false with testCode).
|
|
55749
|
+
*/
|
|
55750
|
+
stored?: boolean;
|
|
55751
|
+
destinations?: Array<{
|
|
55752
|
+
accountId?: string;
|
|
55753
|
+
destinationId?: string;
|
|
55754
|
+
platform?: 'metaads' | 'googleads' | 'linkedinads' | 'tiktokads' | 'openaiads' | 'pinterestads' | 'redditads';
|
|
55755
|
+
/**
|
|
55756
|
+
* Events the platform accepted.
|
|
55757
|
+
*/
|
|
55758
|
+
eventsSent?: number;
|
|
55759
|
+
eventsFailed?: number;
|
|
55760
|
+
failures?: Array<{
|
|
55761
|
+
/**
|
|
55762
|
+
* Index into the events sent to this destination.
|
|
55763
|
+
*/
|
|
55764
|
+
eventIndex?: number;
|
|
55765
|
+
eventId?: string;
|
|
55766
|
+
message?: string;
|
|
55767
|
+
code?: (string | number);
|
|
55768
|
+
}>;
|
|
55769
|
+
/**
|
|
55770
|
+
* Set when the destination could not be reached at all (account disconnected, unsupported platform, platform error).
|
|
55771
|
+
*/
|
|
55772
|
+
error?: string;
|
|
55773
|
+
}>;
|
|
55774
|
+
});
|
|
55775
|
+
|
|
55776
|
+
export type SendEventsError = (ErrorResponse | {
|
|
55777
|
+
error?: string;
|
|
55778
|
+
});
|
|
55779
|
+
|
|
55780
|
+
export type ListEventDestinationsData = {
|
|
55781
|
+
query?: {
|
|
55782
|
+
profileId?: string;
|
|
55783
|
+
};
|
|
55784
|
+
};
|
|
55785
|
+
|
|
55786
|
+
export type ListEventDestinationsResponse = ({
|
|
55787
|
+
destinations?: Array<EventDestination>;
|
|
55788
|
+
});
|
|
55789
|
+
|
|
55790
|
+
export type ListEventDestinationsError = (ErrorResponse | {
|
|
55791
|
+
error?: string;
|
|
55792
|
+
});
|
|
55793
|
+
|
|
55794
|
+
export type CreateEventDestinationData = {
|
|
55795
|
+
body: {
|
|
55796
|
+
profileId: string;
|
|
55797
|
+
/**
|
|
55798
|
+
* Connected ads account ID that owns the destination.
|
|
55799
|
+
*/
|
|
55800
|
+
accountId: string;
|
|
55801
|
+
destinationId: string;
|
|
55802
|
+
eventNames?: Array<(string)>;
|
|
55803
|
+
};
|
|
55804
|
+
};
|
|
55805
|
+
|
|
55806
|
+
export type CreateEventDestinationResponse = ({
|
|
55807
|
+
destination?: EventDestination;
|
|
55808
|
+
});
|
|
55809
|
+
|
|
55810
|
+
export type CreateEventDestinationError = (ErrorResponse | {
|
|
55811
|
+
error?: string;
|
|
55812
|
+
});
|
|
55813
|
+
|
|
55814
|
+
export type DeleteEventDestinationData = {
|
|
55815
|
+
path: {
|
|
55816
|
+
destinationId: string;
|
|
55817
|
+
};
|
|
55818
|
+
};
|
|
55819
|
+
|
|
55820
|
+
export type DeleteEventDestinationResponse = ({
|
|
55821
|
+
deleted?: boolean;
|
|
55822
|
+
});
|
|
55823
|
+
|
|
55824
|
+
export type DeleteEventDestinationError = (ErrorResponse | {
|
|
55825
|
+
error?: string;
|
|
55826
|
+
});
|
|
55827
|
+
|
|
55690
55828
|
export type GetCampaignConversionGoalsData = {
|
|
55691
55829
|
path: {
|
|
55692
55830
|
/**
|