@zernio/node 0.2.121 → 0.2.123
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 +8 -0
- package/dist/index.d.mts +409 -22
- package/dist/index.d.ts +409 -22
- package/dist/index.js +56 -0
- package/dist/index.mjs +56 -0
- package/package.json +1 -1
- package/src/client.ts +16 -0
- package/src/generated/sdk.gen.ts +181 -15
- package/src/generated/types.gen.ts +426 -21
|
@@ -790,6 +790,48 @@ export type BusinessCenter = {
|
|
|
790
790
|
advertiserCount?: (number) | null;
|
|
791
791
|
};
|
|
792
792
|
|
|
793
|
+
/**
|
|
794
|
+
* A discoverable conversion destination on an ad platform — a Meta pixel,
|
|
795
|
+
* Google conversion action, or LinkedIn conversion rule. Returned by
|
|
796
|
+
* `listConversionDestinations`, `getConversionDestination`,
|
|
797
|
+
* `createConversionDestination`, and `updateConversionDestination`.
|
|
798
|
+
*
|
|
799
|
+
*/
|
|
800
|
+
export type ConversionDestination = {
|
|
801
|
+
/**
|
|
802
|
+
* Platform-native identifier. Pass back as `destinationId` on event
|
|
803
|
+
* send and as the path segment on CRUD endpoints.
|
|
804
|
+
*
|
|
805
|
+
*/
|
|
806
|
+
id: string;
|
|
807
|
+
name: string;
|
|
808
|
+
/**
|
|
809
|
+
* Present when the platform locks the event type/category to the
|
|
810
|
+
* destination (Google conversion actions, LinkedIn conversion rules).
|
|
811
|
+
* Absent for Meta pixels (which accept any event name per request).
|
|
812
|
+
*
|
|
813
|
+
*/
|
|
814
|
+
type?: string;
|
|
815
|
+
/**
|
|
816
|
+
* For LinkedIn, `inactive` means the rule is soft-deleted (`enabled: false`).
|
|
817
|
+
*
|
|
818
|
+
*/
|
|
819
|
+
status?: 'active' | 'inactive';
|
|
820
|
+
/**
|
|
821
|
+
* Set by adapters whose destinations are scoped to a specific ad
|
|
822
|
+
* account (LinkedIn). Pass back on subsequent CRUD calls to
|
|
823
|
+
* identify the parent ad account.
|
|
824
|
+
*
|
|
825
|
+
*/
|
|
826
|
+
adAccountId?: string;
|
|
827
|
+
};
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* For LinkedIn, `inactive` means the rule is soft-deleted (`enabled: false`).
|
|
831
|
+
*
|
|
832
|
+
*/
|
|
833
|
+
export type status2 = 'active' | 'inactive';
|
|
834
|
+
|
|
793
835
|
/**
|
|
794
836
|
* A single conversion event to relay to the ad platform. All PII fields
|
|
795
837
|
* (email, phone, names) are hashed with SHA-256 server-side using each
|
|
@@ -802,7 +844,12 @@ export type ConversionEvent = {
|
|
|
802
844
|
* Standard event name (Purchase, Lead, CompleteRegistration, AddToCart,
|
|
803
845
|
* InitiateCheckout, AddPaymentInfo, Subscribe, StartTrial, ViewContent,
|
|
804
846
|
* Search, Contact, SubmitApplication, Schedule) or a custom string
|
|
805
|
-
* (only supported on platforms that accept custom events).
|
|
847
|
+
* (only supported on platforms that accept custom events — Meta).
|
|
848
|
+
*
|
|
849
|
+
* Per-platform behavior:
|
|
850
|
+
* - Meta: free-form; standard names match Meta's built-ins.
|
|
851
|
+
* - Google: ignored — the conversion action's category determines the type.
|
|
852
|
+
* - LinkedIn: ignored — the conversion rule's `type` is locked to the destination.
|
|
806
853
|
*
|
|
807
854
|
*/
|
|
808
855
|
eventName: string;
|
|
@@ -812,8 +859,10 @@ export type ConversionEvent = {
|
|
|
812
859
|
eventTime: number;
|
|
813
860
|
/**
|
|
814
861
|
* Unique dedup key. The same eventId must be used on pixel + CAPI
|
|
815
|
-
* to prevent double-counting. Mapped to event_id on Meta
|
|
816
|
-
* transactionId on Google
|
|
862
|
+
* to prevent double-counting. Mapped to event_id on Meta,
|
|
863
|
+
* transactionId on Google, eventId on LinkedIn (LinkedIn deduplicates
|
|
864
|
+
* against Insight Tag events with the same eventId; the Insight Tag
|
|
865
|
+
* event wins when both arrive).
|
|
817
866
|
*
|
|
818
867
|
*/
|
|
819
868
|
eventId: string;
|
|
@@ -846,7 +895,11 @@ export type ConversionEvent = {
|
|
|
846
895
|
*/
|
|
847
896
|
lastName?: string;
|
|
848
897
|
/**
|
|
849
|
-
* Stable customer identifier (e.g. CRM user ID). Hashed
|
|
898
|
+
* Stable customer identifier (e.g. CRM user ID). Hashed
|
|
899
|
+
* server-side for Meta and Google. Sent as plaintext to LinkedIn
|
|
900
|
+
* (LinkedIn's Conversions API spec requires the raw value).
|
|
901
|
+
* Maximum effective list size on LinkedIn is 1.
|
|
902
|
+
*
|
|
850
903
|
*/
|
|
851
904
|
externalId?: string;
|
|
852
905
|
/**
|
|
@@ -885,6 +938,16 @@ export type ConversionEvent = {
|
|
|
885
938
|
* Google iOS 14.5+ web-to-app attribution ID.
|
|
886
939
|
*/
|
|
887
940
|
wbraid?: string;
|
|
941
|
+
/**
|
|
942
|
+
* LinkedIn first-party ad tracking click ID. Captured by
|
|
943
|
+
* parsing `li_fat_id` from landing-page URLs after the
|
|
944
|
+
* advertiser enables enhanced conversion tracking on the
|
|
945
|
+
* LinkedIn Insight Tag. Sent to LinkedIn as the
|
|
946
|
+
* LINKEDIN_FIRST_PARTY_ADS_TRACKING_UUID userId. Opaque
|
|
947
|
+
* token, not hashed.
|
|
948
|
+
*
|
|
949
|
+
*/
|
|
950
|
+
li_fat_id?: string;
|
|
888
951
|
};
|
|
889
952
|
};
|
|
890
953
|
/**
|
|
@@ -1337,7 +1400,7 @@ export type InboxWebhookConversation = {
|
|
|
1337
1400
|
status: 'active' | 'archived';
|
|
1338
1401
|
};
|
|
1339
1402
|
|
|
1340
|
-
export type
|
|
1403
|
+
export type status3 = 'active' | 'archived';
|
|
1341
1404
|
|
|
1342
1405
|
/**
|
|
1343
1406
|
* The message object included in inbox webhook payloads.
|
|
@@ -1867,7 +1930,7 @@ export type PlatformAnalytics = {
|
|
|
1867
1930
|
errorMessage?: (string) | null;
|
|
1868
1931
|
};
|
|
1869
1932
|
|
|
1870
|
-
export type
|
|
1933
|
+
export type status4 = 'published' | 'failed';
|
|
1871
1934
|
|
|
1872
1935
|
/**
|
|
1873
1936
|
* Sync state of analytics for this platform
|
|
@@ -1977,7 +2040,7 @@ export type Post = {
|
|
|
1977
2040
|
updatedAt?: string;
|
|
1978
2041
|
};
|
|
1979
2042
|
|
|
1980
|
-
export type
|
|
2043
|
+
export type status5 = 'draft' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
1981
2044
|
|
|
1982
2045
|
export type visibility = 'public' | 'private' | 'unlisted';
|
|
1983
2046
|
|
|
@@ -2644,7 +2707,7 @@ export type UploadTokenResponse = {
|
|
|
2644
2707
|
status?: 'pending' | 'completed' | 'expired';
|
|
2645
2708
|
};
|
|
2646
2709
|
|
|
2647
|
-
export type
|
|
2710
|
+
export type status6 = 'pending' | 'completed' | 'expired';
|
|
2648
2711
|
|
|
2649
2712
|
export type UploadTokenStatusResponse = {
|
|
2650
2713
|
token?: string;
|
|
@@ -2954,7 +3017,7 @@ export type event = 'account.ads.initial_sync_completed';
|
|
|
2954
3017
|
/**
|
|
2955
3018
|
* Overall outcome of the initial sync.
|
|
2956
3019
|
*/
|
|
2957
|
-
export type
|
|
3020
|
+
export type status7 = 'success' | 'failure';
|
|
2958
3021
|
|
|
2959
3022
|
/**
|
|
2960
3023
|
* Stable category for UX branching. New values may be added; existing ones are
|
|
@@ -3322,6 +3385,32 @@ export type WebhookPayloadMessage = {
|
|
|
3322
3385
|
flowResponseData?: {
|
|
3323
3386
|
[key: string]: unknown;
|
|
3324
3387
|
};
|
|
3388
|
+
/**
|
|
3389
|
+
* Instagram only. Populated when an IG user replies to one of the
|
|
3390
|
+
* account's stories (Meta `messaging_story_replies`). Mutually
|
|
3391
|
+
* exclusive in practice with `isStoryMention`.
|
|
3392
|
+
*
|
|
3393
|
+
*/
|
|
3394
|
+
storyReply?: {
|
|
3395
|
+
/**
|
|
3396
|
+
* The Instagram story ID the user replied to.
|
|
3397
|
+
*/
|
|
3398
|
+
storyId: string;
|
|
3399
|
+
/**
|
|
3400
|
+
* Meta CDN URL for the story media. Expires approximately
|
|
3401
|
+
* 24 hours after the story posted; consumers must fetch
|
|
3402
|
+
* promptly or treat 404s as expected.
|
|
3403
|
+
*
|
|
3404
|
+
*/
|
|
3405
|
+
storyUrl?: string;
|
|
3406
|
+
};
|
|
3407
|
+
/**
|
|
3408
|
+
* Instagram only. True when the message was generated by an IG
|
|
3409
|
+
* user mentioning the account in their own story (`story_mention`
|
|
3410
|
+
* attachment type). Mutually exclusive in practice with `storyReply`.
|
|
3411
|
+
*
|
|
3412
|
+
*/
|
|
3413
|
+
isStoryMention?: boolean;
|
|
3325
3414
|
/**
|
|
3326
3415
|
* WhatsApp only. Click-to-WhatsApp (CTWA) ad attribution. Present
|
|
3327
3416
|
* only on the FIRST inbound message after a user reaches the
|
|
@@ -8878,7 +8967,7 @@ export type CreateWebhookSettingsData = {
|
|
|
8878
8967
|
/**
|
|
8879
8968
|
* Events to subscribe to (at least one required)
|
|
8880
8969
|
*/
|
|
8881
|
-
events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'comment.received' | 'review.new' | 'review.updated')>;
|
|
8970
|
+
events: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'comment.received' | 'review.new' | 'review.updated')>;
|
|
8882
8971
|
/**
|
|
8883
8972
|
* Enable or disable webhook delivery. Defaults to `true` when omitted.
|
|
8884
8973
|
*/
|
|
@@ -8922,7 +9011,7 @@ export type UpdateWebhookSettingsData = {
|
|
|
8922
9011
|
/**
|
|
8923
9012
|
* Events to subscribe to. Must contain at least one event if provided.
|
|
8924
9013
|
*/
|
|
8925
|
-
events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'comment.received' | 'review.new' | 'review.updated')>;
|
|
9014
|
+
events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'post.cancelled' | 'post.recycled' | 'account.connected' | 'account.disconnected' | 'account.ads.initial_sync_completed' | 'message.received' | 'message.sent' | 'message.edited' | 'message.deleted' | 'message.delivered' | 'message.read' | 'message.failed' | 'comment.received' | 'review.new' | 'review.updated')>;
|
|
8926
9015
|
/**
|
|
8927
9016
|
* Enable or disable webhook delivery
|
|
8928
9017
|
*/
|
|
@@ -14600,23 +14689,26 @@ export type AddUsersToAdAudienceError = (unknown | {
|
|
|
14600
14689
|
export type SendConversionsData = {
|
|
14601
14690
|
body: {
|
|
14602
14691
|
/**
|
|
14603
|
-
* SocialAccount ID (metaads or
|
|
14692
|
+
* SocialAccount ID (metaads, googleads, or linkedinads).
|
|
14604
14693
|
*/
|
|
14605
14694
|
accountId: string;
|
|
14606
14695
|
/**
|
|
14607
14696
|
* Platform destination identifier. For Meta, the pixel/dataset
|
|
14608
|
-
* ID. For Google, the conversion action resource name.
|
|
14697
|
+
* ID. For Google, the conversion action resource name. For
|
|
14698
|
+
* LinkedIn, the conversion rule ID or full
|
|
14699
|
+
* `urn:lla:llaPartnerConversion:{id}` URN.
|
|
14609
14700
|
*
|
|
14610
14701
|
*/
|
|
14611
14702
|
destinationId: string;
|
|
14612
14703
|
events: Array<ConversionEvent>;
|
|
14613
14704
|
/**
|
|
14614
|
-
* Meta `test_event_code` passthrough. Ignored by Google.
|
|
14705
|
+
* Meta `test_event_code` passthrough. Ignored by Google and LinkedIn.
|
|
14615
14706
|
*/
|
|
14616
14707
|
testCode?: string;
|
|
14617
14708
|
/**
|
|
14618
14709
|
* Batch-level user consent. Required by Google for EEA/UK
|
|
14619
|
-
* events under the Feb 2026 restrictions. Ignored by Meta
|
|
14710
|
+
* events under the Feb 2026 restrictions. Ignored by Meta
|
|
14711
|
+
* and LinkedIn.
|
|
14620
14712
|
*
|
|
14621
14713
|
*/
|
|
14622
14714
|
consent?: {
|
|
@@ -14627,7 +14719,7 @@ export type SendConversionsData = {
|
|
|
14627
14719
|
};
|
|
14628
14720
|
|
|
14629
14721
|
export type SendConversionsResponse = ({
|
|
14630
|
-
platform?: 'metaads' | 'googleads';
|
|
14722
|
+
platform?: 'metaads' | 'googleads' | 'linkedinads';
|
|
14631
14723
|
/**
|
|
14632
14724
|
* Events accepted by the platform.
|
|
14633
14725
|
*/
|
|
@@ -14649,7 +14741,10 @@ export type SendConversionsResponse = ({
|
|
|
14649
14741
|
code?: (string | number);
|
|
14650
14742
|
}>;
|
|
14651
14743
|
/**
|
|
14652
|
-
* Platform trace ID
|
|
14744
|
+
* Platform trace ID for debugging. fbtrace_id for Meta,
|
|
14745
|
+
* requestId for Google. Absent for LinkedIn (LinkedIn's
|
|
14746
|
+
* conversionEvents endpoint does not surface a trace ID).
|
|
14747
|
+
*
|
|
14653
14748
|
*/
|
|
14654
14749
|
traceId?: string;
|
|
14655
14750
|
});
|
|
@@ -14661,29 +14756,38 @@ export type SendConversionsError = (unknown | {
|
|
|
14661
14756
|
export type ListConversionDestinationsData = {
|
|
14662
14757
|
path: {
|
|
14663
14758
|
/**
|
|
14664
|
-
* SocialAccount ID (metaads or
|
|
14759
|
+
* SocialAccount ID (metaads, googleads, or linkedinads).
|
|
14665
14760
|
*/
|
|
14666
14761
|
accountId: string;
|
|
14667
14762
|
};
|
|
14668
14763
|
};
|
|
14669
14764
|
|
|
14670
14765
|
export type ListConversionDestinationsResponse = ({
|
|
14671
|
-
platform?: 'metaads' | 'googleads';
|
|
14766
|
+
platform?: 'metaads' | 'googleads' | 'linkedinads';
|
|
14672
14767
|
destinations?: Array<{
|
|
14673
14768
|
/**
|
|
14674
14769
|
* Destination identifier. Meta: pixel ID. Google:
|
|
14675
|
-
* conversion action resource name.
|
|
14770
|
+
* conversion action resource name. LinkedIn:
|
|
14771
|
+
* numeric conversion rule ID.
|
|
14676
14772
|
*
|
|
14677
14773
|
*/
|
|
14678
14774
|
id?: string;
|
|
14679
14775
|
name?: string;
|
|
14680
14776
|
/**
|
|
14681
14777
|
* Present when the platform locks event type to the
|
|
14682
|
-
* destination (Google conversion actions
|
|
14778
|
+
* destination (Google conversion actions, LinkedIn
|
|
14779
|
+
* conversion rules).
|
|
14683
14780
|
*
|
|
14684
14781
|
*/
|
|
14685
14782
|
type?: string;
|
|
14686
14783
|
status?: 'active' | 'inactive';
|
|
14784
|
+
/**
|
|
14785
|
+
* Set by adapters whose destinations are scoped to a
|
|
14786
|
+
* specific ad account (LinkedIn). Pass back on
|
|
14787
|
+
* subsequent CRUD calls.
|
|
14788
|
+
*
|
|
14789
|
+
*/
|
|
14790
|
+
adAccountId?: string;
|
|
14687
14791
|
}>;
|
|
14688
14792
|
});
|
|
14689
14793
|
|
|
@@ -14691,6 +14795,307 @@ export type ListConversionDestinationsError = (unknown | {
|
|
|
14691
14795
|
error?: string;
|
|
14692
14796
|
});
|
|
14693
14797
|
|
|
14798
|
+
export type CreateConversionDestinationData = {
|
|
14799
|
+
body: {
|
|
14800
|
+
/**
|
|
14801
|
+
* Sponsored ad account ID. Numeric (e.g. "5123456") or
|
|
14802
|
+
* full `urn:li:sponsoredAccount:{id}` URN.
|
|
14803
|
+
*
|
|
14804
|
+
*/
|
|
14805
|
+
adAccountId: string;
|
|
14806
|
+
name: string;
|
|
14807
|
+
/**
|
|
14808
|
+
* Either a unified standard event name (e.g. "Purchase",
|
|
14809
|
+
* "Lead", "AddToCart") or a LinkedIn rule type enum value
|
|
14810
|
+
* (e.g. "PURCHASE", "QUALIFIED_LEAD"). The API maps
|
|
14811
|
+
* standard names to LinkedIn enum values automatically.
|
|
14812
|
+
*
|
|
14813
|
+
*/
|
|
14814
|
+
type: string;
|
|
14815
|
+
attributionType?: 'LAST_TOUCH_BY_CAMPAIGN' | 'LAST_TOUCH_BY_CONVERSION';
|
|
14816
|
+
/**
|
|
14817
|
+
* Default 30. 365 only allowed for LEAD, PURCHASE,
|
|
14818
|
+
* ADD_TO_CART, QUALIFIED_LEAD, SUBMIT_APPLICATION rule
|
|
14819
|
+
* types — the API rejects other combinations locally.
|
|
14820
|
+
*
|
|
14821
|
+
*/
|
|
14822
|
+
postClickAttributionWindowSize?: 1 | 7 | 30 | 90 | 365;
|
|
14823
|
+
/**
|
|
14824
|
+
* Default 7. Same 365-day-window type restriction applies
|
|
14825
|
+
* as `postClickAttributionWindowSize`.
|
|
14826
|
+
*
|
|
14827
|
+
*/
|
|
14828
|
+
viewThroughAttributionWindowSize?: 1 | 7 | 30 | 90 | 365;
|
|
14829
|
+
/**
|
|
14830
|
+
* DYNAMIC (default) uses the per-event `value` from
|
|
14831
|
+
* `sendConversions`. FIXED uses the rule's `value` field.
|
|
14832
|
+
* NO_VALUE drops monetary value entirely.
|
|
14833
|
+
*
|
|
14834
|
+
*/
|
|
14835
|
+
valueType?: 'DYNAMIC' | 'FIXED' | 'NO_VALUE';
|
|
14836
|
+
/**
|
|
14837
|
+
* Static conversion value. Used when `valueType=FIXED`.
|
|
14838
|
+
* The currency should match the ad account's currency.
|
|
14839
|
+
*
|
|
14840
|
+
*/
|
|
14841
|
+
value?: {
|
|
14842
|
+
/**
|
|
14843
|
+
* ISO 4217 (e.g. "USD").
|
|
14844
|
+
*/
|
|
14845
|
+
currencyCode: string;
|
|
14846
|
+
/**
|
|
14847
|
+
* Decimal string (e.g. "49.99").
|
|
14848
|
+
*/
|
|
14849
|
+
amount: string;
|
|
14850
|
+
};
|
|
14851
|
+
/**
|
|
14852
|
+
* Controls campaign association at rule-creation time:
|
|
14853
|
+
* - ALL_CAMPAIGNS: associate the rule with every active,
|
|
14854
|
+
* paused, and draft campaign in the ad account
|
|
14855
|
+
* - OBJECTIVE_BASED: associate only campaigns whose
|
|
14856
|
+
* objective matches the rule's type
|
|
14857
|
+
* - NONE: don't auto-associate. Manage associations via
|
|
14858
|
+
* the `/associations` endpoints below.
|
|
14859
|
+
* Note: auto-association runs once at create time; new
|
|
14860
|
+
* campaigns added after the rule still need explicit
|
|
14861
|
+
* association.
|
|
14862
|
+
*
|
|
14863
|
+
*/
|
|
14864
|
+
autoAssociationType?: 'ALL_CAMPAIGNS' | 'OBJECTIVE_BASED' | 'NONE';
|
|
14865
|
+
};
|
|
14866
|
+
path: {
|
|
14867
|
+
/**
|
|
14868
|
+
* SocialAccount ID (linkedinads).
|
|
14869
|
+
*/
|
|
14870
|
+
accountId: string;
|
|
14871
|
+
};
|
|
14872
|
+
};
|
|
14873
|
+
|
|
14874
|
+
export type CreateConversionDestinationResponse = ({
|
|
14875
|
+
platform?: 'linkedinads';
|
|
14876
|
+
destination?: ConversionDestination;
|
|
14877
|
+
});
|
|
14878
|
+
|
|
14879
|
+
export type CreateConversionDestinationError = (unknown | {
|
|
14880
|
+
error?: string;
|
|
14881
|
+
});
|
|
14882
|
+
|
|
14883
|
+
export type GetConversionDestinationData = {
|
|
14884
|
+
path: {
|
|
14885
|
+
accountId: string;
|
|
14886
|
+
destinationId: string;
|
|
14887
|
+
};
|
|
14888
|
+
query: {
|
|
14889
|
+
/**
|
|
14890
|
+
* Numeric ID or full `urn:li:sponsoredAccount:{id}` URN.
|
|
14891
|
+
*/
|
|
14892
|
+
adAccountId: string;
|
|
14893
|
+
};
|
|
14894
|
+
};
|
|
14895
|
+
|
|
14896
|
+
export type GetConversionDestinationResponse = ({
|
|
14897
|
+
platform?: 'linkedinads';
|
|
14898
|
+
destination?: ConversionDestination;
|
|
14899
|
+
});
|
|
14900
|
+
|
|
14901
|
+
export type GetConversionDestinationError = (unknown | {
|
|
14902
|
+
error?: string;
|
|
14903
|
+
});
|
|
14904
|
+
|
|
14905
|
+
export type UpdateConversionDestinationData = {
|
|
14906
|
+
body: {
|
|
14907
|
+
adAccountId: string;
|
|
14908
|
+
name?: string;
|
|
14909
|
+
/**
|
|
14910
|
+
* Setting `false` is equivalent to calling DELETE — the
|
|
14911
|
+
* rule will appear as `inactive` afterwards.
|
|
14912
|
+
*
|
|
14913
|
+
*/
|
|
14914
|
+
enabled?: boolean;
|
|
14915
|
+
attributionType?: 'LAST_TOUCH_BY_CAMPAIGN' | 'LAST_TOUCH_BY_CONVERSION';
|
|
14916
|
+
/**
|
|
14917
|
+
* 365 only allowed for LEAD, PURCHASE, ADD_TO_CART,
|
|
14918
|
+
* QUALIFIED_LEAD, SUBMIT_APPLICATION rule types.
|
|
14919
|
+
*
|
|
14920
|
+
*/
|
|
14921
|
+
postClickAttributionWindowSize?: 1 | 7 | 30 | 90 | 365;
|
|
14922
|
+
/**
|
|
14923
|
+
* 365 only allowed for LEAD, PURCHASE, ADD_TO_CART,
|
|
14924
|
+
* QUALIFIED_LEAD, SUBMIT_APPLICATION rule types.
|
|
14925
|
+
*
|
|
14926
|
+
*/
|
|
14927
|
+
viewThroughAttributionWindowSize?: 1 | 7 | 30 | 90 | 365;
|
|
14928
|
+
valueType?: 'DYNAMIC' | 'FIXED' | 'NO_VALUE';
|
|
14929
|
+
/**
|
|
14930
|
+
* Used when `valueType=FIXED`.
|
|
14931
|
+
*/
|
|
14932
|
+
value?: {
|
|
14933
|
+
/**
|
|
14934
|
+
* ISO 4217.
|
|
14935
|
+
*/
|
|
14936
|
+
currencyCode?: string;
|
|
14937
|
+
/**
|
|
14938
|
+
* Decimal string (e.g. "49.99").
|
|
14939
|
+
*/
|
|
14940
|
+
amount?: string;
|
|
14941
|
+
};
|
|
14942
|
+
};
|
|
14943
|
+
path: {
|
|
14944
|
+
accountId: string;
|
|
14945
|
+
destinationId: string;
|
|
14946
|
+
};
|
|
14947
|
+
};
|
|
14948
|
+
|
|
14949
|
+
export type UpdateConversionDestinationResponse = ({
|
|
14950
|
+
platform?: 'linkedinads';
|
|
14951
|
+
destination?: ConversionDestination;
|
|
14952
|
+
});
|
|
14953
|
+
|
|
14954
|
+
export type UpdateConversionDestinationError = (unknown | {
|
|
14955
|
+
error?: string;
|
|
14956
|
+
});
|
|
14957
|
+
|
|
14958
|
+
export type DeleteConversionDestinationData = {
|
|
14959
|
+
path: {
|
|
14960
|
+
accountId: string;
|
|
14961
|
+
destinationId: string;
|
|
14962
|
+
};
|
|
14963
|
+
query?: {
|
|
14964
|
+
/**
|
|
14965
|
+
* Required as query OR in JSON body.
|
|
14966
|
+
*/
|
|
14967
|
+
adAccountId?: string;
|
|
14968
|
+
};
|
|
14969
|
+
};
|
|
14970
|
+
|
|
14971
|
+
export type DeleteConversionDestinationResponse = (void);
|
|
14972
|
+
|
|
14973
|
+
export type DeleteConversionDestinationError = (unknown | {
|
|
14974
|
+
error?: string;
|
|
14975
|
+
});
|
|
14976
|
+
|
|
14977
|
+
export type ListConversionAssociationsData = {
|
|
14978
|
+
path: {
|
|
14979
|
+
accountId: string;
|
|
14980
|
+
destinationId: string;
|
|
14981
|
+
};
|
|
14982
|
+
query: {
|
|
14983
|
+
adAccountId: string;
|
|
14984
|
+
};
|
|
14985
|
+
};
|
|
14986
|
+
|
|
14987
|
+
export type ListConversionAssociationsResponse = ({
|
|
14988
|
+
platform?: 'linkedinads';
|
|
14989
|
+
associations?: Array<{
|
|
14990
|
+
campaignId?: string;
|
|
14991
|
+
conversionId?: string;
|
|
14992
|
+
/**
|
|
14993
|
+
* Epoch ms.
|
|
14994
|
+
*/
|
|
14995
|
+
associatedAt?: number;
|
|
14996
|
+
}>;
|
|
14997
|
+
});
|
|
14998
|
+
|
|
14999
|
+
export type ListConversionAssociationsError = (unknown | {
|
|
15000
|
+
error?: string;
|
|
15001
|
+
});
|
|
15002
|
+
|
|
15003
|
+
export type AddConversionAssociationsData = {
|
|
15004
|
+
body: {
|
|
15005
|
+
adAccountId: string;
|
|
15006
|
+
campaignIds: Array<(string)>;
|
|
15007
|
+
};
|
|
15008
|
+
path: {
|
|
15009
|
+
accountId: string;
|
|
15010
|
+
destinationId: string;
|
|
15011
|
+
};
|
|
15012
|
+
};
|
|
15013
|
+
|
|
15014
|
+
export type AddConversionAssociationsResponse = ({
|
|
15015
|
+
platform?: 'linkedinads';
|
|
15016
|
+
/**
|
|
15017
|
+
* Numeric campaign IDs that were successfully associated.
|
|
15018
|
+
*/
|
|
15019
|
+
succeeded?: Array<(string)>;
|
|
15020
|
+
failed?: Array<{
|
|
15021
|
+
campaignId?: string;
|
|
15022
|
+
reason?: string;
|
|
15023
|
+
}>;
|
|
15024
|
+
});
|
|
15025
|
+
|
|
15026
|
+
export type AddConversionAssociationsError = (unknown | {
|
|
15027
|
+
error?: string;
|
|
15028
|
+
});
|
|
15029
|
+
|
|
15030
|
+
export type RemoveConversionAssociationsData = {
|
|
15031
|
+
body?: {
|
|
15032
|
+
adAccountId?: string;
|
|
15033
|
+
campaignIds?: Array<(string)>;
|
|
15034
|
+
};
|
|
15035
|
+
path: {
|
|
15036
|
+
accountId: string;
|
|
15037
|
+
destinationId: string;
|
|
15038
|
+
};
|
|
15039
|
+
query?: {
|
|
15040
|
+
adAccountId?: string;
|
|
15041
|
+
/**
|
|
15042
|
+
* Comma-separated list.
|
|
15043
|
+
*/
|
|
15044
|
+
campaignIds?: string;
|
|
15045
|
+
};
|
|
15046
|
+
};
|
|
15047
|
+
|
|
15048
|
+
export type RemoveConversionAssociationsResponse = ({
|
|
15049
|
+
platform?: 'linkedinads';
|
|
15050
|
+
/**
|
|
15051
|
+
* Numeric campaign IDs that were successfully removed.
|
|
15052
|
+
*/
|
|
15053
|
+
succeeded?: Array<(string)>;
|
|
15054
|
+
failed?: Array<{
|
|
15055
|
+
campaignId?: string;
|
|
15056
|
+
reason?: string;
|
|
15057
|
+
}>;
|
|
15058
|
+
});
|
|
15059
|
+
|
|
15060
|
+
export type RemoveConversionAssociationsError = (unknown | {
|
|
15061
|
+
error?: string;
|
|
15062
|
+
});
|
|
15063
|
+
|
|
15064
|
+
export type GetConversionMetricsData = {
|
|
15065
|
+
path: {
|
|
15066
|
+
accountId: string;
|
|
15067
|
+
destinationId: string;
|
|
15068
|
+
};
|
|
15069
|
+
query: {
|
|
15070
|
+
adAccountId: string;
|
|
15071
|
+
endDate?: string;
|
|
15072
|
+
granularity?: 'ALL' | 'DAILY' | 'MONTHLY' | 'YEARLY';
|
|
15073
|
+
startDate: string;
|
|
15074
|
+
};
|
|
15075
|
+
};
|
|
15076
|
+
|
|
15077
|
+
export type GetConversionMetricsResponse = ({
|
|
15078
|
+
platform?: 'linkedinads';
|
|
15079
|
+
granularity?: 'ALL' | 'DAILY' | 'MONTHLY' | 'YEARLY';
|
|
15080
|
+
rows?: Array<{
|
|
15081
|
+
/**
|
|
15082
|
+
* YYYY-MM-DD
|
|
15083
|
+
*/
|
|
15084
|
+
start?: string;
|
|
15085
|
+
/**
|
|
15086
|
+
* YYYY-MM-DD (inclusive)
|
|
15087
|
+
*/
|
|
15088
|
+
end?: string;
|
|
15089
|
+
metrics?: {
|
|
15090
|
+
[key: string]: (number | string);
|
|
15091
|
+
};
|
|
15092
|
+
}>;
|
|
15093
|
+
});
|
|
15094
|
+
|
|
15095
|
+
export type GetConversionMetricsError = (unknown | {
|
|
15096
|
+
error?: string;
|
|
15097
|
+
});
|
|
15098
|
+
|
|
14694
15099
|
export type SendWhatsAppConversionData = {
|
|
14695
15100
|
body: {
|
|
14696
15101
|
/**
|