@zernio/node 0.2.981 → 0.2.982

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 CHANGED
@@ -5110,6 +5110,10 @@ type ConversionEvent = {
5110
5110
  *
5111
5111
  */
5112
5112
  li_fat_id?: string;
5113
+ /**
5114
+ * Pinterest click ID (the `epik` URL param or `_epik` cookie). Sent to Pinterest as `click_id`, not hashed.
5115
+ */
5116
+ epik?: string;
5113
5117
  };
5114
5118
  };
5115
5119
  /**
@@ -11233,6 +11237,10 @@ type TrackingTag = {
11233
11237
  * Unix seconds the tag was created.
11234
11238
  */
11235
11239
  creationTime?: number;
11240
+ /**
11241
+ * Customer data the tag matches automatically, where the platform reports it (Pinterest automatic enhanced match).
11242
+ */
11243
+ automaticMatchingFields?: Array<('em' | 'ph' | 'fn' | 'ln' | 'ge' | 'db' | 'ct' | 'st' | 'zp' | 'country' | 'external_id')>;
11236
11244
  /**
11237
11245
  * Business Manager id that owns the tag, or `null` when the tag lives
11238
11246
  * on a personal (non-BM) ad account. Such tags can't be shared with
@@ -46422,11 +46430,11 @@ type ReplaceAdAudienceCompaniesError = (unknown | {
46422
46430
  type GetConversionsQualityData = {
46423
46431
  query: {
46424
46432
  /**
46425
- * SocialAccount _id (must be a metaads account).
46433
+ * SocialAccount _id (a metaads or pinterestads account).
46426
46434
  */
46427
46435
  accountId: string;
46428
46436
  /**
46429
- * Meta pixel/dataset ID.
46437
+ * Meta pixel/dataset ID, or the numeric Pinterest ad account id.
46430
46438
  */
46431
46439
  destinationId: string;
46432
46440
  };
@@ -46455,7 +46463,7 @@ type GetConversionsQualityError = (ErrorResponse | {
46455
46463
  type SendConversionsData = {
46456
46464
  body: {
46457
46465
  /**
46458
- * SocialAccount ID (metaads, googleads, linkedinads, tiktokads, or openaiads).
46466
+ * SocialAccount ID (metaads, googleads, linkedinads, tiktokads, openaiads, or pinterestads).
46459
46467
  */
46460
46468
  accountId: string;
46461
46469
  /**
@@ -46463,13 +46471,13 @@ type SendConversionsData = {
46463
46471
  * ID. For Google, the conversion action resource name. For
46464
46472
  * LinkedIn, the conversion rule ID or full
46465
46473
  * `urn:lla:llaPartnerConversion:{id}` URN. For OpenAI Ads, the
46466
- * pixel wire id.
46474
+ * pixel wire id. For Pinterest, the numeric ad account id.
46467
46475
  *
46468
46476
  */
46469
46477
  destinationId: string;
46470
46478
  events: Array<ConversionEvent>;
46471
46479
  /**
46472
- * Meta `test_event_code` passthrough. Ignored by Google, LinkedIn, and OpenAI Ads.
46480
+ * Meta `test_event_code` passthrough. On Pinterest any value sends the batch with `test=true` (validated, not recorded). Ignored by Google, LinkedIn, and OpenAI Ads.
46473
46481
  */
46474
46482
  testCode?: string;
46475
46483
  /**
@@ -46489,7 +46497,7 @@ type SendConversionsData = {
46489
46497
  };
46490
46498
  };
46491
46499
  type SendConversionsResponse = ({
46492
- platform?: 'metaads' | 'googleads' | 'linkedinads' | 'tiktokads' | 'openaiads';
46500
+ platform?: 'metaads' | 'googleads' | 'linkedinads' | 'tiktokads' | 'openaiads' | 'pinterestads';
46493
46501
  /**
46494
46502
  * Events accepted by the platform.
46495
46503
  */
@@ -46921,13 +46929,13 @@ type UpdateCampaignConversionGoalsError = (ErrorResponse | {
46921
46929
  type ListConversionDestinationsData = {
46922
46930
  path: {
46923
46931
  /**
46924
- * SocialAccount ID (metaads, googleads, linkedinads, tiktokads, or openaiads).
46932
+ * SocialAccount ID (metaads, googleads, linkedinads, tiktokads, openaiads, or pinterestads).
46925
46933
  */
46926
46934
  accountId: string;
46927
46935
  };
46928
46936
  };
46929
46937
  type ListConversionDestinationsResponse = ({
46930
- platform?: 'metaads' | 'googleads' | 'linkedinads' | 'tiktokads' | 'openaiads';
46938
+ platform?: 'metaads' | 'googleads' | 'linkedinads' | 'tiktokads' | 'openaiads' | 'pinterestads';
46931
46939
  destinations?: Array<{
46932
46940
  /**
46933
46941
  * Destination identifier. Meta: pixel ID. Google:
@@ -48509,6 +48517,10 @@ type CreateTrackingTagData = {
48509
48517
  * OpenAI Ads only (ignored by Meta). When set, also provisions a standard conversion event setting wired to the new pixel, so `goal: conversions` ad creates on `POST /v1/ads/create` have an event to reference immediately.
48510
48518
  */
48511
48519
  defaultEventType?: 'order_created' | 'lead_created' | 'items_added' | 'contents_viewed' | 'checkout_started' | 'registration_completed' | 'subscription_created' | 'trial_started' | 'appointment_scheduled' | 'page_viewed' | 'app_installed' | 'app_opened';
48520
+ /**
48521
+ * Pinterest only (400 elsewhere). Customer data the new tag matches automatically (automatic enhanced match): `em` email, `ph` phone, `fn`/`ln` name, `ge` gender, `db` date of birth, `ct`/`st`/`zp`/`country` location, `external_id`. Pinterest has one switch for the name and one for the location, so `fn` turns on `ln` too and any location code turns on all four.
48522
+ */
48523
+ automaticMatchingFields?: Array<('em' | 'ph' | 'fn' | 'ln' | 'ge' | 'db' | 'ct' | 'st' | 'zp' | 'country' | 'external_id')>;
48512
48524
  };
48513
48525
  path: {
48514
48526
  /**
package/dist/index.d.ts CHANGED
@@ -5110,6 +5110,10 @@ type ConversionEvent = {
5110
5110
  *
5111
5111
  */
5112
5112
  li_fat_id?: string;
5113
+ /**
5114
+ * Pinterest click ID (the `epik` URL param or `_epik` cookie). Sent to Pinterest as `click_id`, not hashed.
5115
+ */
5116
+ epik?: string;
5113
5117
  };
5114
5118
  };
5115
5119
  /**
@@ -11233,6 +11237,10 @@ type TrackingTag = {
11233
11237
  * Unix seconds the tag was created.
11234
11238
  */
11235
11239
  creationTime?: number;
11240
+ /**
11241
+ * Customer data the tag matches automatically, where the platform reports it (Pinterest automatic enhanced match).
11242
+ */
11243
+ automaticMatchingFields?: Array<('em' | 'ph' | 'fn' | 'ln' | 'ge' | 'db' | 'ct' | 'st' | 'zp' | 'country' | 'external_id')>;
11236
11244
  /**
11237
11245
  * Business Manager id that owns the tag, or `null` when the tag lives
11238
11246
  * on a personal (non-BM) ad account. Such tags can't be shared with
@@ -46422,11 +46430,11 @@ type ReplaceAdAudienceCompaniesError = (unknown | {
46422
46430
  type GetConversionsQualityData = {
46423
46431
  query: {
46424
46432
  /**
46425
- * SocialAccount _id (must be a metaads account).
46433
+ * SocialAccount _id (a metaads or pinterestads account).
46426
46434
  */
46427
46435
  accountId: string;
46428
46436
  /**
46429
- * Meta pixel/dataset ID.
46437
+ * Meta pixel/dataset ID, or the numeric Pinterest ad account id.
46430
46438
  */
46431
46439
  destinationId: string;
46432
46440
  };
@@ -46455,7 +46463,7 @@ type GetConversionsQualityError = (ErrorResponse | {
46455
46463
  type SendConversionsData = {
46456
46464
  body: {
46457
46465
  /**
46458
- * SocialAccount ID (metaads, googleads, linkedinads, tiktokads, or openaiads).
46466
+ * SocialAccount ID (metaads, googleads, linkedinads, tiktokads, openaiads, or pinterestads).
46459
46467
  */
46460
46468
  accountId: string;
46461
46469
  /**
@@ -46463,13 +46471,13 @@ type SendConversionsData = {
46463
46471
  * ID. For Google, the conversion action resource name. For
46464
46472
  * LinkedIn, the conversion rule ID or full
46465
46473
  * `urn:lla:llaPartnerConversion:{id}` URN. For OpenAI Ads, the
46466
- * pixel wire id.
46474
+ * pixel wire id. For Pinterest, the numeric ad account id.
46467
46475
  *
46468
46476
  */
46469
46477
  destinationId: string;
46470
46478
  events: Array<ConversionEvent>;
46471
46479
  /**
46472
- * Meta `test_event_code` passthrough. Ignored by Google, LinkedIn, and OpenAI Ads.
46480
+ * Meta `test_event_code` passthrough. On Pinterest any value sends the batch with `test=true` (validated, not recorded). Ignored by Google, LinkedIn, and OpenAI Ads.
46473
46481
  */
46474
46482
  testCode?: string;
46475
46483
  /**
@@ -46489,7 +46497,7 @@ type SendConversionsData = {
46489
46497
  };
46490
46498
  };
46491
46499
  type SendConversionsResponse = ({
46492
- platform?: 'metaads' | 'googleads' | 'linkedinads' | 'tiktokads' | 'openaiads';
46500
+ platform?: 'metaads' | 'googleads' | 'linkedinads' | 'tiktokads' | 'openaiads' | 'pinterestads';
46493
46501
  /**
46494
46502
  * Events accepted by the platform.
46495
46503
  */
@@ -46921,13 +46929,13 @@ type UpdateCampaignConversionGoalsError = (ErrorResponse | {
46921
46929
  type ListConversionDestinationsData = {
46922
46930
  path: {
46923
46931
  /**
46924
- * SocialAccount ID (metaads, googleads, linkedinads, tiktokads, or openaiads).
46932
+ * SocialAccount ID (metaads, googleads, linkedinads, tiktokads, openaiads, or pinterestads).
46925
46933
  */
46926
46934
  accountId: string;
46927
46935
  };
46928
46936
  };
46929
46937
  type ListConversionDestinationsResponse = ({
46930
- platform?: 'metaads' | 'googleads' | 'linkedinads' | 'tiktokads' | 'openaiads';
46938
+ platform?: 'metaads' | 'googleads' | 'linkedinads' | 'tiktokads' | 'openaiads' | 'pinterestads';
46931
46939
  destinations?: Array<{
46932
46940
  /**
46933
46941
  * Destination identifier. Meta: pixel ID. Google:
@@ -48509,6 +48517,10 @@ type CreateTrackingTagData = {
48509
48517
  * OpenAI Ads only (ignored by Meta). When set, also provisions a standard conversion event setting wired to the new pixel, so `goal: conversions` ad creates on `POST /v1/ads/create` have an event to reference immediately.
48510
48518
  */
48511
48519
  defaultEventType?: 'order_created' | 'lead_created' | 'items_added' | 'contents_viewed' | 'checkout_started' | 'registration_completed' | 'subscription_created' | 'trial_started' | 'appointment_scheduled' | 'page_viewed' | 'app_installed' | 'app_opened';
48520
+ /**
48521
+ * Pinterest only (400 elsewhere). Customer data the new tag matches automatically (automatic enhanced match): `em` email, `ph` phone, `fn`/`ln` name, `ge` gender, `db` date of birth, `ct`/`st`/`zp`/`country` location, `external_id`. Pinterest has one switch for the name and one for the location, so `fn` turns on `ln` too and any location code turns on all four.
48522
+ */
48523
+ automaticMatchingFields?: Array<('em' | 'ph' | 'fn' | 'ln' | 'ge' | 'db' | 'ct' | 'st' | 'zp' | 'country' | 'external_id')>;
48512
48524
  };
48513
48525
  path: {
48514
48526
  /**
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: "@zernio/node",
39
- version: "0.2.981",
39
+ version: "0.2.982",
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: "@zernio/node",
8
- version: "0.2.981",
8
+ version: "0.2.982",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zernio/node",
3
- "version": "0.2.981",
3
+ "version": "0.2.982",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -12372,7 +12372,12 @@ export const replaceAdAudienceCompanies = <ThrowOnError extends boolean = false>
12372
12372
  * Get Event Match Quality
12373
12373
  * Reads Meta Event Match Quality (EMQ) and pixel↔CAPI event coverage for a
12374
12374
  * pixel/dataset, live from Meta's Dataset Quality API. Web events only (a
12375
- * Meta limitation). Meta-only; other platforms return 405. Requires the Ads add-on.
12375
+ * Meta limitation). Other platforms return 405, except Pinterest. Requires the Ads add-on.
12376
+ *
12377
+ * Pinterest (`pinterestads`): `destinationId` is the numeric ad account id. Rows come from
12378
+ * Pinterest's Event Quality Score for Conversions API web events over the last 14 days,
12379
+ * one per event name, with each identifier's coverage in `matchKeys` and
12380
+ * `eventCoveragePercentage` set to the tag/API `event_id` overlap. No `compositeScore`.
12376
12381
  *
12377
12382
  */
12378
12383
  export const getConversionsQuality = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetConversionsQualityData, ThrowOnError>) => {
@@ -12394,6 +12399,7 @@ export const getConversionsQuality = <ThrowOnError extends boolean = false>(opti
12394
12399
  * - LinkedIn (`linkedinads`) via `/rest/conversionEvents`
12395
12400
  * - TikTok (`tiktokads`) via the Offline Events API `/offline/batch/` (OFFLINE conversions only)
12396
12401
  * - OpenAI Ads (`openaiads`) via its Conversions API (a separate host, `bzr.openai.com`)
12402
+ * - Pinterest (`pinterestads`) via `POST /v5/ad_accounts/{id}/events`
12397
12403
  *
12398
12404
  * `destinationId` semantics differ per platform:
12399
12405
  *
@@ -12402,6 +12408,15 @@ export const getConversionsQuality = <ThrowOnError extends boolean = false>(opti
12402
12408
  * - LinkedIn: conversion rule ID or URN, e.g. `104012` or `urn:lla:llaPartnerConversion:104012`
12403
12409
  * - TikTok: Offline Event Set ID, e.g. `7057103914977558530`
12404
12410
  * - OpenAI Ads: pixel wire id (numeric `pixel_id`, distinct from the internal pixel id), as returned by `GET /v1/accounts/{accountId}/conversion-destinations`
12411
+ * - Pinterest: numeric ad account id, e.g. `549755885175` (Pinterest attributes to the ad account, not to a tag)
12412
+ *
12413
+ * Pinterest notes: each event needs an `email`, or `ipAddress` plus `userAgent`; others are
12414
+ * listed in `failures` with code `INVALID_EVENT` and the rest are still sent. `clickIds.epik`
12415
+ * (the `_epik` cookie) is sent as `click_id`. `actionSource` `web` stays `web`, offline
12416
+ * sources become `offline`, and app events need `platformData.action_source` `app_android`
12417
+ * or `app_ios`. Pinterest answers per event, so one bad event does not fail its chunk
12418
+ * (failures carry code `PINTEREST_EVENT_FAILED`). `consent.adUserData: DENIED` sets `opt_out`.
12419
+ * The connected user needs a Business Access role on the ad account (403 otherwise).
12405
12420
  *
12406
12421
  * TikTok notes: this path sends OFFLINE conversions (in-store / CRM / call-center), not web-pixel
12407
12422
  * events. Each event must carry an email or phone (TikTok requires at least one). The connected
@@ -12436,6 +12451,7 @@ export const getConversionsQuality = <ThrowOnError extends boolean = false>(opti
12436
12451
  * - Google: ignored. The conversion action's category determines the event type. Send the standard name closest to your action for documentation, but the platform will not branch on it.
12437
12452
  * - LinkedIn: ignored. The conversion rule's `type` (LEAD, PURCHASE, etc.) is locked to the destination at rule-creation time. Send the standard name for documentation; LinkedIn does not branch on it.
12438
12453
  * - OpenAI Ads: a fixed subset of standard names (Purchase, Lead, AddToCart, ViewContent, InitiateCheckout, CompleteRegistration, Subscribe, StartTrial, Schedule) maps 1:1 onto OpenAI's own event-type enum; any other standard name or custom string is sent as `type: custom` with the name preserved.
12454
+ * - Pinterest: standard names map onto Pinterest's (Purchase = `checkout`, AddToCart = `add_to_cart`, InitiateCheckout = `initiate_checkout`, AddPaymentInfo = `add_payment_info`, Lead = `lead`, CompleteRegistration = `signup`, Subscribe = `subscribe`, ViewContent = `view_content`, Search = `search`, PageView = `page_visit`); any other string is sent as is, so it matches an advertiser defined event of that name.
12439
12455
  *
12440
12456
  */
12441
12457
  export const sendConversions = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SendConversionsData, ThrowOnError>) => {
@@ -12642,8 +12658,8 @@ export const updateCampaignConversionGoals = <ThrowOnError extends boolean = fal
12642
12658
  /**
12643
12659
  * List conversion destinations
12644
12660
  * Returns the list of pixels (Meta), conversion actions (Google),
12645
- * conversion rules (LinkedIn), or pixels (OpenAI Ads) accessible to the
12646
- * connected ads account. Use the returned `id` as `destinationId` when
12661
+ * conversion rules (LinkedIn), pixels (OpenAI Ads) or ad accounts
12662
+ * (Pinterest) accessible to the connected ads account. Use the returned `id` as `destinationId` when
12647
12663
  * posting to `POST /v1/ads/conversions`.
12648
12664
  *
12649
12665
  * For Google and LinkedIn, each destination's `type` reflects the
@@ -13675,8 +13691,9 @@ export const listTrackingTags = <ThrowOnError extends boolean = false>(options:
13675
13691
  *
13676
13692
  * Pinterest (platform `pinterestads`): creates a Pinterest tag on the numeric ad account
13677
13693
  * `adAccountId` (`POST /v5/ad_accounts/{id}/conversion_tags`). Returns the tag with
13678
- * Pinterest's `code` snippet. NOT idempotent and Pinterest has no dry-run and no delete for
13679
- * tags, so never retry blindly: list first.
13694
+ * Pinterest's `code` snippet. `automaticMatchingFields` switches on automatic enhanced match
13695
+ * for those fields. NOT idempotent and Pinterest has no dry-run and no delete for tags (DELETE
13696
+ * on `conversion_tags/{id}` answers 405), so never retry blindly: list first.
13680
13697
  *
13681
13698
  * Google Ads (`googleads`): every Google Ads account has exactly one
13682
13699
  * Google tag (`AW-...`), so this is idempotent. `adAccountId` is the
@@ -13755,9 +13772,10 @@ export const getTrackingTag = <ThrowOnError extends boolean = false>(options: Op
13755
13772
  * `first_party_cookie_disabled`), which sets the tag's first-party tracking. It applies to
13756
13773
  * every ad account using the tag. `empty` answers 400: LinkedIn has no unset state.
13757
13774
  *
13758
- * Pinterest (platform `pinterestads`): 501. Pinterest API v5 only creates, lists and reads
13759
- * tags (no update endpoint); rename a tag or change its enhanced match settings in Pinterest
13760
- * Ads Manager.
13775
+ * Pinterest (platform `pinterestads`): 501. Pinterest API v5 has no endpoint to edit a tag:
13776
+ * its spec lists only POST/GET on `conversion_tags` and GET on `conversion_tags/{id}`, and
13777
+ * PATCH or PUT on `conversion_tags/{id}` answer 405 "Method not allowed". Set enhanced match
13778
+ * at creation (`automaticMatchingFields`) or change it and the name in Pinterest Ads Manager.
13761
13779
  *
13762
13780
  */
13763
13781
  export const updateTrackingTag = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateTrackingTagData, ThrowOnError>) => {
@@ -13943,8 +13961,8 @@ export const removeTrackingTagFromStore = <ThrowOnError extends boolean = false>
13943
13961
  * List conversion events
13944
13962
  * The tag's conversion events, on platforms where each conversion is its own object:
13945
13963
  * Google conversion actions, LinkedIn conversion rules, X web event tags, OpenAI event
13946
- * settings, TikTok pixel events, Meta custom conversions. Platforms where events are just
13947
- * names the site sends (Pinterest) answer 501.
13964
+ * settings, TikTok pixel events, Meta custom conversions, Pinterest advertiser defined
13965
+ * events.
13948
13966
  *
13949
13967
  * OpenAI Ads: the account's conversion event settings whose source is this pixel.
13950
13968
  * `siteEventId` is the event name the site sends (a standard event such as
@@ -13968,6 +13986,13 @@ export const removeTrackingTagFromStore = <ThrowOnError extends boolean = false>
13968
13986
  * Archived (removed) actions are listed with status `REMOVED`; imported (GA4, upload,
13969
13987
  * app) actions are not events of the tag.
13970
13988
  *
13989
+ * Pinterest (platform `pinterestads`): the ad account's advertiser defined events, custom
13990
+ * event names mapped to a standard type (`type`, e.g. `SIGNUP`). They belong to the ad
13991
+ * account, so every tag on it shares them. `id`, `name` and `siteEventId` are all the event
13992
+ * name, which the site sends as `pintrk('track', '<name>')` or the Conversions API sends as
13993
+ * `event_name`. Standard events (`pagevisit`, `checkout`...) need no object and are not
13994
+ * listed.
13995
+ *
13971
13996
  */
13972
13997
  export const listTrackingTagEvents = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListTrackingTagEventsData, ThrowOnError>) => {
13973
13998
  return (options?.client ?? client).get<ListTrackingTagEventsResponse, ListTrackingTagEventsError, ThrowOnError>({
@@ -14025,6 +14050,14 @@ export const listTrackingTagEvents = <ThrowOnError extends boolean = false>(opti
14025
14050
  * are unique per account, so a replay answers 400 (DUPLICATE_NAME) instead of creating a
14026
14051
  * second one.
14027
14052
  *
14053
+ * Pinterest (platform `pinterestads`): creates an advertiser defined event on the tag's ad
14054
+ * account. Fields: `name` (1-100 letters, digits, `_` or `-`, case-insensitive, max 15 per
14055
+ * ad account) and `type` (one of Pinterest's optimizable types: SIGNUP, ADD_TO_CART, LEAD,
14056
+ * CHECKOUT, SUBSCRIBE, ADD_TO_WISHLIST, ADD_PAYMENT_INFO, INITIATE_CHECKOUT, CONTACT,
14057
+ * CUSTOMIZE_PRODUCT, FIND_LOCATION, SCHEDULE, SUBMIT_APPLICATION, START_TRIAL, PAGE_VISIT,
14058
+ * VIEW_CATEGORY, VIEW_CONTENT, SEARCH, WATCH_VIDEO) or `siteEvent`. A duplicate name answers
14059
+ * 400.
14060
+ *
14028
14061
  */
14029
14062
  export const createTrackingTagEvent = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateTrackingTagEventData, ThrowOnError>) => {
14030
14063
  return (options?.client ?? client).post<CreateTrackingTagEventResponse, CreateTrackingTagEventError, ThrowOnError>({
@@ -14052,6 +14085,10 @@ export const createTrackingTagEvent = <ThrowOnError extends boolean = false>(opt
14052
14085
  * answer 404). `enabled: false` archives the action (same as DELETE) and `enabled: true`
14053
14086
  * restores an archived one.
14054
14087
  *
14088
+ * Pinterest (platform `pinterestads`): remaps the event to another `type` or `siteEvent`.
14089
+ * Pinterest identifies the event by its name, so `name` cannot change (400): create the new
14090
+ * name and delete the old one.
14091
+ *
14055
14092
  */
14056
14093
  export const updateTrackingTagEvent = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateTrackingTagEventData, ThrowOnError>) => {
14057
14094
  return (options?.client ?? client).patch<UpdateTrackingTagEventResponse, UpdateTrackingTagEventError, ThrowOnError>({
@@ -14080,6 +14117,9 @@ export const updateTrackingTagEvent = <ThrowOnError extends boolean = false>(opt
14080
14117
  * it with status REMOVED and its history; PATCH with `enabled: true` restores it. Deleting
14081
14118
  * an already archived action succeeds without a call to Google.
14082
14119
  *
14120
+ * Pinterest (platform `pinterestads`): stops Pinterest tracking the event name (`state:
14121
+ * disabled`); Pinterest keeps the event's history.
14122
+ *
14083
14123
  */
14084
14124
  export const deleteTrackingTagEvent = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteTrackingTagEventData, ThrowOnError>) => {
14085
14125
  return (options?.client ?? client).delete<DeleteTrackingTagEventResponse, DeleteTrackingTagEventError, ThrowOnError>({
@@ -3369,6 +3369,10 @@ export type ConversionEvent = {
3369
3369
  *
3370
3370
  */
3371
3371
  li_fat_id?: string;
3372
+ /**
3373
+ * Pinterest click ID (the `epik` URL param or `_epik` cookie). Sent to Pinterest as `click_id`, not hashed.
3374
+ */
3375
+ epik?: string;
3372
3376
  };
3373
3377
  };
3374
3378
  /**
@@ -9768,6 +9772,10 @@ export type TrackingTag = {
9768
9772
  * Unix seconds the tag was created.
9769
9773
  */
9770
9774
  creationTime?: number;
9775
+ /**
9776
+ * Customer data the tag matches automatically, where the platform reports it (Pinterest automatic enhanced match).
9777
+ */
9778
+ automaticMatchingFields?: Array<('em' | 'ph' | 'fn' | 'ln' | 'ge' | 'db' | 'ct' | 'st' | 'zp' | 'country' | 'external_id')>;
9771
9779
  /**
9772
9780
  * Business Manager id that owns the tag, or `null` when the tag lives
9773
9781
  * on a personal (non-BM) ad account. Such tags can't be shared with
@@ -47301,11 +47309,11 @@ export type ReplaceAdAudienceCompaniesError = (unknown | {
47301
47309
  export type GetConversionsQualityData = {
47302
47310
  query: {
47303
47311
  /**
47304
- * SocialAccount _id (must be a metaads account).
47312
+ * SocialAccount _id (a metaads or pinterestads account).
47305
47313
  */
47306
47314
  accountId: string;
47307
47315
  /**
47308
- * Meta pixel/dataset ID.
47316
+ * Meta pixel/dataset ID, or the numeric Pinterest ad account id.
47309
47317
  */
47310
47318
  destinationId: string;
47311
47319
  };
@@ -47337,7 +47345,7 @@ export type GetConversionsQualityError = (ErrorResponse | {
47337
47345
  export type SendConversionsData = {
47338
47346
  body: {
47339
47347
  /**
47340
- * SocialAccount ID (metaads, googleads, linkedinads, tiktokads, or openaiads).
47348
+ * SocialAccount ID (metaads, googleads, linkedinads, tiktokads, openaiads, or pinterestads).
47341
47349
  */
47342
47350
  accountId: string;
47343
47351
  /**
@@ -47345,13 +47353,13 @@ export type SendConversionsData = {
47345
47353
  * ID. For Google, the conversion action resource name. For
47346
47354
  * LinkedIn, the conversion rule ID or full
47347
47355
  * `urn:lla:llaPartnerConversion:{id}` URN. For OpenAI Ads, the
47348
- * pixel wire id.
47356
+ * pixel wire id. For Pinterest, the numeric ad account id.
47349
47357
  *
47350
47358
  */
47351
47359
  destinationId: string;
47352
47360
  events: Array<ConversionEvent>;
47353
47361
  /**
47354
- * Meta `test_event_code` passthrough. Ignored by Google, LinkedIn, and OpenAI Ads.
47362
+ * Meta `test_event_code` passthrough. On Pinterest any value sends the batch with `test=true` (validated, not recorded). Ignored by Google, LinkedIn, and OpenAI Ads.
47355
47363
  */
47356
47364
  testCode?: string;
47357
47365
  /**
@@ -47372,7 +47380,7 @@ export type SendConversionsData = {
47372
47380
  };
47373
47381
 
47374
47382
  export type SendConversionsResponse = ({
47375
- platform?: 'metaads' | 'googleads' | 'linkedinads' | 'tiktokads' | 'openaiads';
47383
+ platform?: 'metaads' | 'googleads' | 'linkedinads' | 'tiktokads' | 'openaiads' | 'pinterestads';
47376
47384
  /**
47377
47385
  * Events accepted by the platform.
47378
47386
  */
@@ -47842,14 +47850,14 @@ export type UpdateCampaignConversionGoalsError = (ErrorResponse | {
47842
47850
  export type ListConversionDestinationsData = {
47843
47851
  path: {
47844
47852
  /**
47845
- * SocialAccount ID (metaads, googleads, linkedinads, tiktokads, or openaiads).
47853
+ * SocialAccount ID (metaads, googleads, linkedinads, tiktokads, openaiads, or pinterestads).
47846
47854
  */
47847
47855
  accountId: string;
47848
47856
  };
47849
47857
  };
47850
47858
 
47851
47859
  export type ListConversionDestinationsResponse = ({
47852
- platform?: 'metaads' | 'googleads' | 'linkedinads' | 'tiktokads' | 'openaiads';
47860
+ platform?: 'metaads' | 'googleads' | 'linkedinads' | 'tiktokads' | 'openaiads' | 'pinterestads';
47853
47861
  destinations?: Array<{
47854
47862
  /**
47855
47863
  * Destination identifier. Meta: pixel ID. Google:
@@ -49646,6 +49654,10 @@ export type CreateTrackingTagData = {
49646
49654
  * OpenAI Ads only (ignored by Meta). When set, also provisions a standard conversion event setting wired to the new pixel, so `goal: conversions` ad creates on `POST /v1/ads/create` have an event to reference immediately.
49647
49655
  */
49648
49656
  defaultEventType?: 'order_created' | 'lead_created' | 'items_added' | 'contents_viewed' | 'checkout_started' | 'registration_completed' | 'subscription_created' | 'trial_started' | 'appointment_scheduled' | 'page_viewed' | 'app_installed' | 'app_opened';
49657
+ /**
49658
+ * Pinterest only (400 elsewhere). Customer data the new tag matches automatically (automatic enhanced match): `em` email, `ph` phone, `fn`/`ln` name, `ge` gender, `db` date of birth, `ct`/`st`/`zp`/`country` location, `external_id`. Pinterest has one switch for the name and one for the location, so `fn` turns on `ln` too and any location code turns on all four.
49659
+ */
49660
+ automaticMatchingFields?: Array<('em' | 'ph' | 'fn' | 'ln' | 'ge' | 'db' | 'ct' | 'st' | 'zp' | 'country' | 'external_id')>;
49649
49661
  };
49650
49662
  path: {
49651
49663
  /**