@zernio/node 0.2.979 → 0.2.980
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 +63 -3
- package/dist/index.d.ts +63 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +39 -0
- package/src/generated/types.gen.ts +63 -2
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -13678,6 +13678,14 @@ export const listTrackingTags = <ThrowOnError extends boolean = false>(options:
|
|
|
13678
13678
|
* Pinterest's `code` snippet. NOT idempotent and Pinterest has no dry-run and no delete for
|
|
13679
13679
|
* tags, so never retry blindly: list first.
|
|
13680
13680
|
*
|
|
13681
|
+
* Google Ads (`googleads`): every Google Ads account has exactly one
|
|
13682
|
+
* Google tag (`AW-...`), so this is idempotent. `adAccountId` is the
|
|
13683
|
+
* 10-digit customer id. When the account already tracks conversions
|
|
13684
|
+
* the existing tag is returned (201) and nothing is created. Otherwise
|
|
13685
|
+
* a first WEBPAGE conversion action named `name` (category DEFAULT) is
|
|
13686
|
+
* created, which is what switches Google's conversion tracking on, and
|
|
13687
|
+
* the tag is returned with it as its first event.
|
|
13688
|
+
*
|
|
13681
13689
|
*/
|
|
13682
13690
|
export const createTrackingTag = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateTrackingTagData, ThrowOnError>) => {
|
|
13683
13691
|
return (options?.client ?? client).post<CreateTrackingTagResponse, CreateTrackingTagError, ThrowOnError>({
|
|
@@ -13731,6 +13739,13 @@ export const getTrackingTag = <ThrowOnError extends boolean = false>(options: Op
|
|
|
13731
13739
|
* (`POST`/`PATCH`/`PUT`/`DELETE /v1/conversions/pixels/{id}` answer 405
|
|
13732
13740
|
* "Invalid method"); rename a pixel in OpenAI Ads Manager.
|
|
13733
13741
|
*
|
|
13742
|
+
* Google Ads (`googleads`): the only writable tag setting is
|
|
13743
|
+
* `autoTagging` (the account's gclid auto-tagging, without which the
|
|
13744
|
+
* tag cannot attribute conversions to ad clicks). Google rejects every
|
|
13745
|
+
* write to `conversion_tracking_setting` for our developer token
|
|
13746
|
+
* (`SERVICE_ACCESS_DENIED`), so the tag id and cross-account ownership
|
|
13747
|
+
* stay managed in the Google Ads UI.
|
|
13748
|
+
*
|
|
13734
13749
|
* There is no DELETE: Meta has no API to delete a pixel. To stop using
|
|
13735
13750
|
* one, unshare it from your ad accounts (`DELETE
|
|
13736
13751
|
* .../tracking-tags/{tagId}/shared-accounts`) or disable it in Events
|
|
@@ -13947,6 +13962,12 @@ export const removeTrackingTagFromStore = <ThrowOnError extends boolean = false>
|
|
|
13947
13962
|
* account) and keeps the conversions whose pixel is this one. Archived conversions are
|
|
13948
13963
|
* included with `status: archived`. `urlContains` and `siteEvent` are parsed from Meta's rule.
|
|
13949
13964
|
*
|
|
13965
|
+
* Google Ads (`googleads`): the enabled WEBPAGE conversion actions of the account;
|
|
13966
|
+
* `siteEventId` is the conversion label (the part after `AW-.../` in `send_to`), and
|
|
13967
|
+
* value settings, lookback windows, `primary` and `countingType` are returned.
|
|
13968
|
+
* Archived (removed) actions are listed with status `REMOVED`; imported (GA4, upload,
|
|
13969
|
+
* app) actions are not events of the tag.
|
|
13970
|
+
*
|
|
13950
13971
|
*/
|
|
13951
13972
|
export const listTrackingTagEvents = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListTrackingTagEventsData, ThrowOnError>) => {
|
|
13952
13973
|
return (options?.client ?? client).get<ListTrackingTagEventsResponse, ListTrackingTagEventsError, ThrowOnError>({
|
|
@@ -13994,6 +14015,16 @@ export const listTrackingTagEvents = <ThrowOnError extends boolean = false>(opti
|
|
|
13994
14015
|
* name: an active conversion with the same name on this pixel is returned instead of a
|
|
13995
14016
|
* duplicate. Meta caps custom conversions per ad account; the cap answers 400.
|
|
13996
14017
|
*
|
|
14018
|
+
* Google Ads (`googleads`): creates a WEBPAGE conversion action. `type` is a
|
|
14019
|
+
* ConversionActionCategory (e.g. `PURCHASE`, `SIGNUP`, `DEFAULT`); `siteEvent` maps
|
|
14020
|
+
* page_view, add_to_cart, initiate_checkout and purchase, while view_content, search and
|
|
14021
|
+
* add_payment_info answer 400 (Google has no category for them). Stored fields: name,
|
|
14022
|
+
* type, defaultValue, currency, alwaysUseDefaultValue, clickWindowDays (1 to 90),
|
|
14023
|
+
* viewWindowDays (1 to 30), primary, countingType, enabled. Actions are created enabled
|
|
14024
|
+
* (`enabled: false` answers 400); Google blocks the HIDDEN status on WEBPAGE actions. Names
|
|
14025
|
+
* are unique per account, so a replay answers 400 (DUPLICATE_NAME) instead of creating a
|
|
14026
|
+
* second one.
|
|
14027
|
+
*
|
|
13997
14028
|
*/
|
|
13998
14029
|
export const createTrackingTagEvent = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateTrackingTagEventData, ThrowOnError>) => {
|
|
13999
14030
|
return (options?.client ?? client).post<CreateTrackingTagEventResponse, CreateTrackingTagEventError, ThrowOnError>({
|
|
@@ -14017,6 +14048,10 @@ export const createTrackingTagEvent = <ThrowOnError extends boolean = false>(opt
|
|
|
14017
14048
|
* Meta: only `name` and `defaultValue` can change (Meta's custom conversion update takes
|
|
14018
14049
|
* nothing else); `type`, `siteEvent` and `urlContains` answer 400, create a new event instead.
|
|
14019
14050
|
*
|
|
14051
|
+
* Google Ads (`googleads`): same fields as create, on the account's WEBPAGE actions (others
|
|
14052
|
+
* answer 404). `enabled: false` archives the action (same as DELETE) and `enabled: true`
|
|
14053
|
+
* restores an archived one.
|
|
14054
|
+
*
|
|
14020
14055
|
*/
|
|
14021
14056
|
export const updateTrackingTagEvent = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateTrackingTagEventData, ThrowOnError>) => {
|
|
14022
14057
|
return (options?.client ?? client).patch<UpdateTrackingTagEventResponse, UpdateTrackingTagEventError, ThrowOnError>({
|
|
@@ -14041,6 +14076,10 @@ export const updateTrackingTagEvent = <ThrowOnError extends boolean = false>(opt
|
|
|
14041
14076
|
* Meta: `archived`. Meta's delete archives the custom conversion (it stays readable with
|
|
14042
14077
|
* `status: archived`) and there is no hard delete; deleting an archived one is a no-op.
|
|
14043
14078
|
*
|
|
14079
|
+
* Google Ads (`googleads`): removes the conversion action (state `archived`). Google keeps
|
|
14080
|
+
* it with status REMOVED and its history; PATCH with `enabled: true` restores it. Deleting
|
|
14081
|
+
* an already archived action succeeds without a call to Google.
|
|
14082
|
+
*
|
|
14044
14083
|
*/
|
|
14045
14084
|
export const deleteTrackingTagEvent = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteTrackingTagEventData, ThrowOnError>) => {
|
|
14046
14085
|
return (options?.client ?? client).delete<DeleteTrackingTagEventResponse, DeleteTrackingTagEventError, ThrowOnError>({
|
|
@@ -3131,6 +3131,30 @@ export type ConversionAction = {
|
|
|
3131
3131
|
* true = primary (counts toward bidding when its goal is biddable), false = secondary. Change it with PATCH /v1/ads/conversions/actions/{actionId}.
|
|
3132
3132
|
*/
|
|
3133
3133
|
primaryForGoal?: boolean;
|
|
3134
|
+
/**
|
|
3135
|
+
* Value recorded when the conversion carries none.
|
|
3136
|
+
*/
|
|
3137
|
+
defaultValue?: number;
|
|
3138
|
+
/**
|
|
3139
|
+
* ISO 4217 currency of defaultValue.
|
|
3140
|
+
*/
|
|
3141
|
+
defaultCurrency?: string;
|
|
3142
|
+
/**
|
|
3143
|
+
* true = defaultValue is used even when the conversion sends its own value.
|
|
3144
|
+
*/
|
|
3145
|
+
alwaysUseDefaultValue?: boolean;
|
|
3146
|
+
/**
|
|
3147
|
+
* Google's ConversionActionCountingType: ONE_PER_CLICK or MANY_PER_CLICK.
|
|
3148
|
+
*/
|
|
3149
|
+
countingType?: string;
|
|
3150
|
+
/**
|
|
3151
|
+
* Days after an ad click a conversion is still credited (1 to 90).
|
|
3152
|
+
*/
|
|
3153
|
+
clickThroughLookbackWindowDays?: number;
|
|
3154
|
+
/**
|
|
3155
|
+
* Days after an ad view a conversion is still credited (1 to 30).
|
|
3156
|
+
*/
|
|
3157
|
+
viewThroughLookbackWindowDays?: number;
|
|
3134
3158
|
/**
|
|
3135
3159
|
* The code a customer pastes onto their site. Present for types
|
|
3136
3160
|
* Google generates a snippet for (e.g. WEBPAGE); empty otherwise.
|
|
@@ -9698,11 +9722,11 @@ export type mediaType2 = 'video' | 'photo';
|
|
|
9698
9722
|
*/
|
|
9699
9723
|
export type TrackingTag = {
|
|
9700
9724
|
/**
|
|
9701
|
-
* Platform-native tag id, the `{tagId}` of the per-tag routes. Meta: numeric pixel id, as a string. OpenAI: the pixel resource id.
|
|
9725
|
+
* Platform-native tag id, the `{tagId}` of the per-tag routes. Meta: numeric pixel id, as a string. OpenAI: the pixel resource id. Google Ads: the 10-digit customer id (one Google tag per account).
|
|
9702
9726
|
*/
|
|
9703
9727
|
id: string;
|
|
9704
9728
|
/**
|
|
9705
|
-
* The id the on-site code carries. Equals `id` on Meta; differs on platforms with separate API and site ids (OpenAI `pixel_id`).
|
|
9729
|
+
* The id the on-site code carries. Equals `id` on Meta; differs on platforms with separate API and site ids (OpenAI `pixel_id`, Google `AW-...` conversion id, the manager's under cross-account conversion tracking).
|
|
9706
9730
|
*/
|
|
9707
9731
|
siteTagId?: string;
|
|
9708
9732
|
/**
|
|
@@ -9755,6 +9779,10 @@ export type TrackingTag = {
|
|
|
9755
9779
|
* Ad account id (`act_...`) that owns the tag, when reported.
|
|
9756
9780
|
*/
|
|
9757
9781
|
ownerAdAccountId?: string;
|
|
9782
|
+
/**
|
|
9783
|
+
* Google Ads: whether gclid auto-tagging is on for the ad account (needed to attribute conversions to clicks).
|
|
9784
|
+
*/
|
|
9785
|
+
autoTagging?: boolean;
|
|
9758
9786
|
};
|
|
9759
9787
|
|
|
9760
9788
|
export type platform11 = 'metaads' | 'openaiads' | 'tiktokads' | 'googleads' | 'xads' | 'linkedinads' | 'pinterestads';
|
|
@@ -9782,8 +9810,25 @@ export type TrackingTagDiagnostic = {
|
|
|
9782
9810
|
* Where to fix it in the platform UI (Meta: Events Manager).
|
|
9783
9811
|
*/
|
|
9784
9812
|
actionUrl?: string;
|
|
9813
|
+
/**
|
|
9814
|
+
* Record `defaultValue` even when the conversion sends its own value.
|
|
9815
|
+
*/
|
|
9816
|
+
alwaysUseDefaultValue?: boolean;
|
|
9817
|
+
/**
|
|
9818
|
+
* Primary (counts toward bidding) or secondary (observation only).
|
|
9819
|
+
*/
|
|
9820
|
+
primary?: boolean;
|
|
9821
|
+
/**
|
|
9822
|
+
* `one` = one conversion per ad interaction, `every` = each conversion.
|
|
9823
|
+
*/
|
|
9824
|
+
countingType?: 'one' | 'every';
|
|
9785
9825
|
};
|
|
9786
9826
|
|
|
9827
|
+
/**
|
|
9828
|
+
* `one` = one conversion per ad interaction, `every` = each conversion.
|
|
9829
|
+
*/
|
|
9830
|
+
export type countingType = 'one' | 'every';
|
|
9831
|
+
|
|
9787
9832
|
/**
|
|
9788
9833
|
* A conversion event tied to a tracking tag (Google conversion action, LinkedIn conversion rule, X web event tag, OpenAI event setting, TikTok pixel event, Meta custom conversion).
|
|
9789
9834
|
*/
|
|
@@ -9814,6 +9859,18 @@ export type TrackingTagEvent = {
|
|
|
9814
9859
|
* Fires only on pages whose URL contains this text (case-insensitive).
|
|
9815
9860
|
*/
|
|
9816
9861
|
urlContains?: string;
|
|
9862
|
+
/**
|
|
9863
|
+
* `defaultValue` is recorded even when the conversion sends its own value.
|
|
9864
|
+
*/
|
|
9865
|
+
alwaysUseDefaultValue?: boolean;
|
|
9866
|
+
/**
|
|
9867
|
+
* Primary conversions count toward bidding and the Conversions column; secondary ones are observation only (Google `primary_for_goal`).
|
|
9868
|
+
*/
|
|
9869
|
+
primary?: boolean;
|
|
9870
|
+
/**
|
|
9871
|
+
* `one` counts at most one conversion per ad interaction (leads), `every` counts each (purchases).
|
|
9872
|
+
*/
|
|
9873
|
+
countingType?: 'one' | 'every';
|
|
9817
9874
|
};
|
|
9818
9875
|
|
|
9819
9876
|
/**
|
|
@@ -49627,6 +49684,10 @@ export type UpdateTrackingTagData = {
|
|
|
49627
49684
|
automaticMatchingFields?: Array<('em' | 'ph' | 'fn' | 'ln' | 'ge' | 'db' | 'ct' | 'st' | 'zp' | 'country' | 'external_id')>;
|
|
49628
49685
|
firstPartyCookieStatus?: 'empty' | 'first_party_cookie_disabled' | 'first_party_cookie_enabled';
|
|
49629
49686
|
dataUseSetting?: 'advertising_and_analytics' | 'analytics_only' | 'empty';
|
|
49687
|
+
/**
|
|
49688
|
+
* Google Ads: turn gclid auto-tagging on or off for the ad account.
|
|
49689
|
+
*/
|
|
49690
|
+
autoTagging?: boolean;
|
|
49630
49691
|
};
|
|
49631
49692
|
path: {
|
|
49632
49693
|
accountId: string;
|