@getlatedev/node 0.2.1120 → 0.2.1121

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 CHANGED
@@ -864,7 +864,7 @@ try {
864
864
  | `conversions.getConversionMetrics()` | Get attribution metrics |
865
865
  | `conversions.getConversionsQuality()` | Get Event Match Quality |
866
866
  | `conversions.updateAdConversionGoals()` | Update account conversion goals |
867
- | `conversions.updateConversionAction()` | Set a conversion action primary or secondary |
867
+ | `conversions.updateConversionAction()` | Update a conversion action's settings |
868
868
  | `conversions.updateConversionDestination()` | Update a conversion destination |
869
869
  | `conversions.updateCustomConversionGoal()` | Update a custom conversion goal |
870
870
  | `conversions.deleteConversionDestination()` | Delete a conversion destination |
package/dist/index.d.mts CHANGED
@@ -49559,6 +49559,30 @@ type CreateConversionActionData = {
49559
49559
  * When true, always use defaultValue and ignore any value sent with the event. Defaults to true when defaultValue is set.
49560
49560
  */
49561
49561
  alwaysUseDefaultValue?: boolean;
49562
+ /**
49563
+ * conversion_action.category. Defaults to DEFAULT on create.
49564
+ */
49565
+ category?: 'DEFAULT' | 'PAGE_VIEW' | 'PURCHASE' | 'SIGNUP' | 'DOWNLOAD' | 'ADD_TO_CART' | 'BEGIN_CHECKOUT' | 'SUBSCRIBE_PAID' | 'PHONE_CALL_LEAD' | 'IMPORTED_LEAD' | 'SUBMIT_LEAD_FORM' | 'BOOK_APPOINTMENT' | 'REQUEST_QUOTE' | 'GET_DIRECTIONS' | 'OUTBOUND_CLICK' | 'CONTACT' | 'ENGAGEMENT' | 'STORE_VISIT' | 'STORE_SALE' | 'QUALIFIED_LEAD' | 'CONVERTED_LEAD';
49566
+ /**
49567
+ * ONE_PER_CLICK counts one conversion per ad click (leads); MANY_PER_CLICK counts every one (purchases).
49568
+ */
49569
+ countingType?: 'ONE_PER_CLICK' | 'MANY_PER_CLICK';
49570
+ /**
49571
+ * ISO 4217 currency of defaultValue (value_settings.default_currency_code).
49572
+ */
49573
+ defaultCurrency?: string;
49574
+ /**
49575
+ * Days after an ad click a conversion still counts.
49576
+ */
49577
+ clickThroughLookbackWindowDays?: number;
49578
+ /**
49579
+ * Days after an ad view a view-through conversion still counts.
49580
+ */
49581
+ viewThroughLookbackWindowDays?: number;
49582
+ /**
49583
+ * true = primary (counts toward bidding when its goal is biddable), false = secondary.
49584
+ */
49585
+ primaryForGoal?: boolean;
49562
49586
  };
49563
49587
  };
49564
49588
  type CreateConversionActionResponse = ({
@@ -49627,10 +49651,37 @@ type UpdateConversionActionData = {
49627
49651
  * @deprecated
49628
49652
  */
49629
49653
  customerId?: string;
49654
+ name?: string;
49630
49655
  /**
49631
- * true = primary, false = secondary
49656
+ * REMOVED removes the action and must be sent alone; ENABLED restores a removed one.
49657
+ */
49658
+ status?: 'ENABLED' | 'REMOVED';
49659
+ defaultValue?: number;
49660
+ alwaysUseDefaultValue?: boolean;
49661
+ /**
49662
+ * conversion_action.category. Defaults to DEFAULT on create.
49632
49663
  */
49633
- primaryForGoal: boolean;
49664
+ category?: 'DEFAULT' | 'PAGE_VIEW' | 'PURCHASE' | 'SIGNUP' | 'DOWNLOAD' | 'ADD_TO_CART' | 'BEGIN_CHECKOUT' | 'SUBSCRIBE_PAID' | 'PHONE_CALL_LEAD' | 'IMPORTED_LEAD' | 'SUBMIT_LEAD_FORM' | 'BOOK_APPOINTMENT' | 'REQUEST_QUOTE' | 'GET_DIRECTIONS' | 'OUTBOUND_CLICK' | 'CONTACT' | 'ENGAGEMENT' | 'STORE_VISIT' | 'STORE_SALE' | 'QUALIFIED_LEAD' | 'CONVERTED_LEAD';
49665
+ /**
49666
+ * ONE_PER_CLICK counts one conversion per ad click (leads); MANY_PER_CLICK counts every one (purchases).
49667
+ */
49668
+ countingType?: 'ONE_PER_CLICK' | 'MANY_PER_CLICK';
49669
+ /**
49670
+ * ISO 4217 currency of defaultValue (value_settings.default_currency_code).
49671
+ */
49672
+ defaultCurrency?: string;
49673
+ /**
49674
+ * Days after an ad click a conversion still counts.
49675
+ */
49676
+ clickThroughLookbackWindowDays?: number;
49677
+ /**
49678
+ * Days after an ad view a view-through conversion still counts.
49679
+ */
49680
+ viewThroughLookbackWindowDays?: number;
49681
+ /**
49682
+ * true = primary (counts toward bidding when its goal is biddable), false = secondary.
49683
+ */
49684
+ primaryForGoal?: boolean;
49634
49685
  };
49635
49686
  path: {
49636
49687
  /**
@@ -49641,9 +49692,21 @@ type UpdateConversionActionData = {
49641
49692
  };
49642
49693
  type UpdateConversionActionResponse = ({
49643
49694
  customerId?: string;
49695
+ /**
49696
+ * The action id with the fields written, echoed back.
49697
+ */
49644
49698
  action?: {
49645
49699
  id?: string;
49700
+ name?: string;
49701
+ status?: string;
49646
49702
  primaryForGoal?: boolean;
49703
+ category?: string;
49704
+ countingType?: string;
49705
+ defaultValue?: number;
49706
+ defaultCurrency?: string;
49707
+ alwaysUseDefaultValue?: boolean;
49708
+ clickThroughLookbackWindowDays?: number;
49709
+ viewThroughLookbackWindowDays?: number;
49647
49710
  };
49648
49711
  });
49649
49712
  type UpdateConversionActionError = (ErrorResponse | unknown);
package/dist/index.d.ts CHANGED
@@ -49559,6 +49559,30 @@ type CreateConversionActionData = {
49559
49559
  * When true, always use defaultValue and ignore any value sent with the event. Defaults to true when defaultValue is set.
49560
49560
  */
49561
49561
  alwaysUseDefaultValue?: boolean;
49562
+ /**
49563
+ * conversion_action.category. Defaults to DEFAULT on create.
49564
+ */
49565
+ category?: 'DEFAULT' | 'PAGE_VIEW' | 'PURCHASE' | 'SIGNUP' | 'DOWNLOAD' | 'ADD_TO_CART' | 'BEGIN_CHECKOUT' | 'SUBSCRIBE_PAID' | 'PHONE_CALL_LEAD' | 'IMPORTED_LEAD' | 'SUBMIT_LEAD_FORM' | 'BOOK_APPOINTMENT' | 'REQUEST_QUOTE' | 'GET_DIRECTIONS' | 'OUTBOUND_CLICK' | 'CONTACT' | 'ENGAGEMENT' | 'STORE_VISIT' | 'STORE_SALE' | 'QUALIFIED_LEAD' | 'CONVERTED_LEAD';
49566
+ /**
49567
+ * ONE_PER_CLICK counts one conversion per ad click (leads); MANY_PER_CLICK counts every one (purchases).
49568
+ */
49569
+ countingType?: 'ONE_PER_CLICK' | 'MANY_PER_CLICK';
49570
+ /**
49571
+ * ISO 4217 currency of defaultValue (value_settings.default_currency_code).
49572
+ */
49573
+ defaultCurrency?: string;
49574
+ /**
49575
+ * Days after an ad click a conversion still counts.
49576
+ */
49577
+ clickThroughLookbackWindowDays?: number;
49578
+ /**
49579
+ * Days after an ad view a view-through conversion still counts.
49580
+ */
49581
+ viewThroughLookbackWindowDays?: number;
49582
+ /**
49583
+ * true = primary (counts toward bidding when its goal is biddable), false = secondary.
49584
+ */
49585
+ primaryForGoal?: boolean;
49562
49586
  };
49563
49587
  };
49564
49588
  type CreateConversionActionResponse = ({
@@ -49627,10 +49651,37 @@ type UpdateConversionActionData = {
49627
49651
  * @deprecated
49628
49652
  */
49629
49653
  customerId?: string;
49654
+ name?: string;
49630
49655
  /**
49631
- * true = primary, false = secondary
49656
+ * REMOVED removes the action and must be sent alone; ENABLED restores a removed one.
49657
+ */
49658
+ status?: 'ENABLED' | 'REMOVED';
49659
+ defaultValue?: number;
49660
+ alwaysUseDefaultValue?: boolean;
49661
+ /**
49662
+ * conversion_action.category. Defaults to DEFAULT on create.
49632
49663
  */
49633
- primaryForGoal: boolean;
49664
+ category?: 'DEFAULT' | 'PAGE_VIEW' | 'PURCHASE' | 'SIGNUP' | 'DOWNLOAD' | 'ADD_TO_CART' | 'BEGIN_CHECKOUT' | 'SUBSCRIBE_PAID' | 'PHONE_CALL_LEAD' | 'IMPORTED_LEAD' | 'SUBMIT_LEAD_FORM' | 'BOOK_APPOINTMENT' | 'REQUEST_QUOTE' | 'GET_DIRECTIONS' | 'OUTBOUND_CLICK' | 'CONTACT' | 'ENGAGEMENT' | 'STORE_VISIT' | 'STORE_SALE' | 'QUALIFIED_LEAD' | 'CONVERTED_LEAD';
49665
+ /**
49666
+ * ONE_PER_CLICK counts one conversion per ad click (leads); MANY_PER_CLICK counts every one (purchases).
49667
+ */
49668
+ countingType?: 'ONE_PER_CLICK' | 'MANY_PER_CLICK';
49669
+ /**
49670
+ * ISO 4217 currency of defaultValue (value_settings.default_currency_code).
49671
+ */
49672
+ defaultCurrency?: string;
49673
+ /**
49674
+ * Days after an ad click a conversion still counts.
49675
+ */
49676
+ clickThroughLookbackWindowDays?: number;
49677
+ /**
49678
+ * Days after an ad view a view-through conversion still counts.
49679
+ */
49680
+ viewThroughLookbackWindowDays?: number;
49681
+ /**
49682
+ * true = primary (counts toward bidding when its goal is biddable), false = secondary.
49683
+ */
49684
+ primaryForGoal?: boolean;
49634
49685
  };
49635
49686
  path: {
49636
49687
  /**
@@ -49641,9 +49692,21 @@ type UpdateConversionActionData = {
49641
49692
  };
49642
49693
  type UpdateConversionActionResponse = ({
49643
49694
  customerId?: string;
49695
+ /**
49696
+ * The action id with the fields written, echoed back.
49697
+ */
49644
49698
  action?: {
49645
49699
  id?: string;
49700
+ name?: string;
49701
+ status?: string;
49646
49702
  primaryForGoal?: boolean;
49703
+ category?: string;
49704
+ countingType?: string;
49705
+ defaultValue?: number;
49706
+ defaultCurrency?: string;
49707
+ alwaysUseDefaultValue?: boolean;
49708
+ clickThroughLookbackWindowDays?: number;
49709
+ viewThroughLookbackWindowDays?: number;
49647
49710
  };
49648
49711
  });
49649
49712
  type UpdateConversionActionError = (ErrorResponse | unknown);
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: "@getlatedev/node",
39
- version: "0.2.1120",
39
+ version: "0.2.1121",
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: "@getlatedev/node",
8
- version: "0.2.1120",
8
+ version: "0.2.1121",
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": "@getlatedev/node",
3
- "version": "0.2.1120",
3
+ "version": "0.2.1121",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -13247,10 +13247,19 @@ export const updateAdConversionGoals = <ThrowOnError extends boolean = false>(op
13247
13247
  };
13248
13248
 
13249
13249
  /**
13250
- * Set a conversion action primary or secondary
13251
- * Sets `primary_for_goal` on a Google Ads conversion action. A primary action counts
13252
- * toward its goal's bidding and the Conversions column; a secondary one is
13253
- * observation-only (All conversions).
13250
+ * Update a conversion action's settings
13251
+ * Updates a Google Ads conversion action in one mutate, each field sent written on its own
13252
+ * update mask leaf so omitted fields keep their value. Send at least one field.
13253
+ *
13254
+ * `primaryForGoal` sets `primary_for_goal`: a primary action counts toward its goal's
13255
+ * bidding and the Conversions column; a secondary one is observation-only (All
13256
+ * conversions). `countingType`, `category`, the value settings (`defaultValue`,
13257
+ * `defaultCurrency`, `alwaysUseDefaultValue`) and the click-through / view-through
13258
+ * lookback windows map to the same-named conversion_action fields.
13259
+ *
13260
+ * `status: REMOVED` removes the action (Google keeps it, with its history, as REMOVED) and
13261
+ * must be sent alone; `status: ENABLED` restores a removed action. Google refuses HIDDEN
13262
+ * on website actions, so it is not offered.
13254
13263
  */
13255
13264
  export const updateConversionAction = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateConversionActionData, ThrowOnError>) => {
13256
13265
  return (options?.client ?? client).patch<UpdateConversionActionResponse, UpdateConversionActionError, ThrowOnError>({
@@ -50515,6 +50515,30 @@ export type CreateConversionActionData = {
50515
50515
  * When true, always use defaultValue and ignore any value sent with the event. Defaults to true when defaultValue is set.
50516
50516
  */
50517
50517
  alwaysUseDefaultValue?: boolean;
50518
+ /**
50519
+ * conversion_action.category. Defaults to DEFAULT on create.
50520
+ */
50521
+ category?: 'DEFAULT' | 'PAGE_VIEW' | 'PURCHASE' | 'SIGNUP' | 'DOWNLOAD' | 'ADD_TO_CART' | 'BEGIN_CHECKOUT' | 'SUBSCRIBE_PAID' | 'PHONE_CALL_LEAD' | 'IMPORTED_LEAD' | 'SUBMIT_LEAD_FORM' | 'BOOK_APPOINTMENT' | 'REQUEST_QUOTE' | 'GET_DIRECTIONS' | 'OUTBOUND_CLICK' | 'CONTACT' | 'ENGAGEMENT' | 'STORE_VISIT' | 'STORE_SALE' | 'QUALIFIED_LEAD' | 'CONVERTED_LEAD';
50522
+ /**
50523
+ * ONE_PER_CLICK counts one conversion per ad click (leads); MANY_PER_CLICK counts every one (purchases).
50524
+ */
50525
+ countingType?: 'ONE_PER_CLICK' | 'MANY_PER_CLICK';
50526
+ /**
50527
+ * ISO 4217 currency of defaultValue (value_settings.default_currency_code).
50528
+ */
50529
+ defaultCurrency?: string;
50530
+ /**
50531
+ * Days after an ad click a conversion still counts.
50532
+ */
50533
+ clickThroughLookbackWindowDays?: number;
50534
+ /**
50535
+ * Days after an ad view a view-through conversion still counts.
50536
+ */
50537
+ viewThroughLookbackWindowDays?: number;
50538
+ /**
50539
+ * true = primary (counts toward bidding when its goal is biddable), false = secondary.
50540
+ */
50541
+ primaryForGoal?: boolean;
50518
50542
  };
50519
50543
  };
50520
50544
 
@@ -50592,10 +50616,37 @@ export type UpdateConversionActionData = {
50592
50616
  * @deprecated
50593
50617
  */
50594
50618
  customerId?: string;
50619
+ name?: string;
50595
50620
  /**
50596
- * true = primary, false = secondary
50621
+ * REMOVED removes the action and must be sent alone; ENABLED restores a removed one.
50622
+ */
50623
+ status?: 'ENABLED' | 'REMOVED';
50624
+ defaultValue?: number;
50625
+ alwaysUseDefaultValue?: boolean;
50626
+ /**
50627
+ * conversion_action.category. Defaults to DEFAULT on create.
50597
50628
  */
50598
- primaryForGoal: boolean;
50629
+ category?: 'DEFAULT' | 'PAGE_VIEW' | 'PURCHASE' | 'SIGNUP' | 'DOWNLOAD' | 'ADD_TO_CART' | 'BEGIN_CHECKOUT' | 'SUBSCRIBE_PAID' | 'PHONE_CALL_LEAD' | 'IMPORTED_LEAD' | 'SUBMIT_LEAD_FORM' | 'BOOK_APPOINTMENT' | 'REQUEST_QUOTE' | 'GET_DIRECTIONS' | 'OUTBOUND_CLICK' | 'CONTACT' | 'ENGAGEMENT' | 'STORE_VISIT' | 'STORE_SALE' | 'QUALIFIED_LEAD' | 'CONVERTED_LEAD';
50630
+ /**
50631
+ * ONE_PER_CLICK counts one conversion per ad click (leads); MANY_PER_CLICK counts every one (purchases).
50632
+ */
50633
+ countingType?: 'ONE_PER_CLICK' | 'MANY_PER_CLICK';
50634
+ /**
50635
+ * ISO 4217 currency of defaultValue (value_settings.default_currency_code).
50636
+ */
50637
+ defaultCurrency?: string;
50638
+ /**
50639
+ * Days after an ad click a conversion still counts.
50640
+ */
50641
+ clickThroughLookbackWindowDays?: number;
50642
+ /**
50643
+ * Days after an ad view a view-through conversion still counts.
50644
+ */
50645
+ viewThroughLookbackWindowDays?: number;
50646
+ /**
50647
+ * true = primary (counts toward bidding when its goal is biddable), false = secondary.
50648
+ */
50649
+ primaryForGoal?: boolean;
50599
50650
  };
50600
50651
  path: {
50601
50652
  /**
@@ -50607,9 +50658,21 @@ export type UpdateConversionActionData = {
50607
50658
 
50608
50659
  export type UpdateConversionActionResponse = ({
50609
50660
  customerId?: string;
50661
+ /**
50662
+ * The action id with the fields written, echoed back.
50663
+ */
50610
50664
  action?: {
50611
50665
  id?: string;
50666
+ name?: string;
50667
+ status?: string;
50612
50668
  primaryForGoal?: boolean;
50669
+ category?: string;
50670
+ countingType?: string;
50671
+ defaultValue?: number;
50672
+ defaultCurrency?: string;
50673
+ alwaysUseDefaultValue?: boolean;
50674
+ clickThroughLookbackWindowDays?: number;
50675
+ viewThroughLookbackWindowDays?: number;
50613
50676
  };
50614
50677
  });
50615
50678