@getlatedev/node 0.2.258 → 0.2.260
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 +1 -1
- package/dist/index.d.mts +59 -19
- package/dist/index.d.ts +59 -19
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +19 -4
- package/src/generated/types.gen.ts +59 -19
package/README.md
CHANGED
|
@@ -382,7 +382,7 @@ try {
|
|
|
382
382
|
| `ads.listFormLeads()` | List leads for a single form |
|
|
383
383
|
| `ads.listLeadForms()` | List Lead Gen (Instant) forms |
|
|
384
384
|
| `ads.listLeads()` | List submitted leads (cross-form CRM view) |
|
|
385
|
-
| `ads.createConversionDestination()` | Create a conversion destination (LinkedIn) |
|
|
385
|
+
| `ads.createConversionDestination()` | Create a conversion destination (LinkedIn, Google Ads) |
|
|
386
386
|
| `ads.createCtwaAd()` | Create Click-to-WhatsApp ad(s) |
|
|
387
387
|
| `ads.createLeadForm()` | Create a Lead Gen (Instant) form |
|
|
388
388
|
| `ads.createStandaloneAd()` | Create standalone ad |
|
package/dist/index.d.mts
CHANGED
|
@@ -15347,7 +15347,7 @@ type GetWhatsAppNumberKycFormResponse = ({
|
|
|
15347
15347
|
localTo?: (string) | null;
|
|
15348
15348
|
}>;
|
|
15349
15349
|
/**
|
|
15350
|
-
* Present when this account already has an approved verification for the country that can be reused (skip the form).
|
|
15350
|
+
* Present when this account already has an approved verification for the country that can be reused (skip the form). `fromPhoneNumber`/`details` mirror the newest option; `options` lists ALL approved verifications (agencies hold one per end client) — pass the chosen option's `fromPhoneNumber` as `reuseFrom` on POST.
|
|
15351
15351
|
*/
|
|
15352
15352
|
reusable?: {
|
|
15353
15353
|
available?: boolean;
|
|
@@ -15359,6 +15359,16 @@ type GetWhatsAppNumberKycFormResponse = ({
|
|
|
15359
15359
|
label?: string;
|
|
15360
15360
|
value?: string;
|
|
15361
15361
|
}>;
|
|
15362
|
+
/**
|
|
15363
|
+
* One entry per distinct approved verification, newest first.
|
|
15364
|
+
*/
|
|
15365
|
+
options?: Array<{
|
|
15366
|
+
fromPhoneNumber?: string;
|
|
15367
|
+
details?: Array<{
|
|
15368
|
+
label?: string;
|
|
15369
|
+
value?: string;
|
|
15370
|
+
}>;
|
|
15371
|
+
}>;
|
|
15362
15372
|
} | null;
|
|
15363
15373
|
});
|
|
15364
15374
|
type GetWhatsAppNumberKycFormError = (unknown | {
|
|
@@ -15376,6 +15386,10 @@ type SubmitWhatsAppNumberKycData = {
|
|
|
15376
15386
|
* Reuse a prior approved verification for this country (skips document/field collection; places the order immediately).
|
|
15377
15387
|
*/
|
|
15378
15388
|
reuse?: boolean;
|
|
15389
|
+
/**
|
|
15390
|
+
* Which approved verification to reuse when several exist: the phone number it was originally approved for (GET reusable.options[].fromPhoneNumber). Omitted = newest. No match = 409.
|
|
15391
|
+
*/
|
|
15392
|
+
reuseFrom?: string;
|
|
15379
15393
|
/**
|
|
15380
15394
|
* End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement.
|
|
15381
15395
|
*/
|
|
@@ -20462,44 +20476,54 @@ type ListConversionDestinationsError = (unknown | {
|
|
|
20462
20476
|
type CreateConversionDestinationData = {
|
|
20463
20477
|
body: {
|
|
20464
20478
|
/**
|
|
20465
|
-
*
|
|
20466
|
-
* full `urn:li:sponsoredAccount:{id}` URN.
|
|
20479
|
+
* Ad account ID. For LinkedIn: numeric (e.g. "5123456") or
|
|
20480
|
+
* full `urn:li:sponsoredAccount:{id}` URN. For Google: numeric
|
|
20481
|
+
* customer ID (e.g. "1234567890") or `customers/{id}` form.
|
|
20467
20482
|
*
|
|
20468
20483
|
*/
|
|
20469
20484
|
adAccountId: string;
|
|
20470
20485
|
name: string;
|
|
20471
20486
|
/**
|
|
20472
|
-
*
|
|
20473
|
-
* "Lead", "AddToCart") or a LinkedIn rule
|
|
20474
|
-
* (e.g. "PURCHASE", "QUALIFIED_LEAD").
|
|
20475
|
-
*
|
|
20487
|
+
* Conversion type. For LinkedIn: a unified standard event name
|
|
20488
|
+
* (e.g. "Purchase", "Lead", "AddToCart") or a LinkedIn rule
|
|
20489
|
+
* type enum (e.g. "PURCHASE", "QUALIFIED_LEAD"). For Google:
|
|
20490
|
+
* a unified standard event name (Purchase, Subscribe,
|
|
20491
|
+
* CompleteRegistration, Lead, Schedule) or a Google
|
|
20492
|
+
* ConversionActionCategory enum value directly (e.g.
|
|
20493
|
+
* "PURCHASE", "SUBSCRIBE_PAID", "SIGNUP", "IMPORTED_LEAD",
|
|
20494
|
+
* "BOOK_APPOINTMENT"). Unknown values pass through to the
|
|
20495
|
+
* platform.
|
|
20476
20496
|
*
|
|
20477
20497
|
*/
|
|
20478
20498
|
type: string;
|
|
20499
|
+
/**
|
|
20500
|
+
* LinkedIn only.
|
|
20501
|
+
*/
|
|
20479
20502
|
attributionType?: 'LAST_TOUCH_BY_CAMPAIGN' | 'LAST_TOUCH_BY_CONVERSION';
|
|
20480
20503
|
/**
|
|
20481
|
-
* Default 30. 365 only allowed for LEAD,
|
|
20482
|
-
* ADD_TO_CART, QUALIFIED_LEAD, SUBMIT_APPLICATION
|
|
20483
|
-
* types
|
|
20504
|
+
* LinkedIn only. Default 30. 365 only allowed for LEAD,
|
|
20505
|
+
* PURCHASE, ADD_TO_CART, QUALIFIED_LEAD, SUBMIT_APPLICATION
|
|
20506
|
+
* rule types; the API rejects other combinations locally.
|
|
20484
20507
|
*
|
|
20485
20508
|
*/
|
|
20486
20509
|
postClickAttributionWindowSize?: 1 | 7 | 30 | 90 | 365;
|
|
20487
20510
|
/**
|
|
20488
|
-
* Default 7. Same 365-day-window type
|
|
20489
|
-
* as `postClickAttributionWindowSize`.
|
|
20511
|
+
* LinkedIn only. Default 7. Same 365-day-window type
|
|
20512
|
+
* restriction applies as `postClickAttributionWindowSize`.
|
|
20490
20513
|
*
|
|
20491
20514
|
*/
|
|
20492
20515
|
viewThroughAttributionWindowSize?: 1 | 7 | 30 | 90 | 365;
|
|
20493
20516
|
/**
|
|
20494
|
-
* DYNAMIC (default) uses the per-event `value`
|
|
20495
|
-
* `sendConversions`. FIXED uses the rule's `value` field.
|
|
20517
|
+
* LinkedIn only. DYNAMIC (default) uses the per-event `value`
|
|
20518
|
+
* from `sendConversions`. FIXED uses the rule's `value` field.
|
|
20496
20519
|
* NO_VALUE drops monetary value entirely.
|
|
20497
20520
|
*
|
|
20498
20521
|
*/
|
|
20499
20522
|
valueType?: 'DYNAMIC' | 'FIXED' | 'NO_VALUE';
|
|
20500
20523
|
/**
|
|
20501
|
-
* Static conversion value. Used when
|
|
20502
|
-
* The currency should match the ad
|
|
20524
|
+
* LinkedIn only. Static conversion value. Used when
|
|
20525
|
+
* `valueType=FIXED`. The currency should match the ad
|
|
20526
|
+
* account's currency.
|
|
20503
20527
|
*
|
|
20504
20528
|
*/
|
|
20505
20529
|
value?: {
|
|
@@ -20513,7 +20537,8 @@ type CreateConversionDestinationData = {
|
|
|
20513
20537
|
amount: string;
|
|
20514
20538
|
};
|
|
20515
20539
|
/**
|
|
20516
|
-
* Controls campaign association at rule-creation
|
|
20540
|
+
* LinkedIn only. Controls campaign association at rule-creation
|
|
20541
|
+
* time:
|
|
20517
20542
|
* - ALL_CAMPAIGNS: associate the rule with every active,
|
|
20518
20543
|
* paused, and draft campaign in the ad account
|
|
20519
20544
|
* - OBJECTIVE_BASED: associate only campaigns whose
|
|
@@ -20526,16 +20551,31 @@ type CreateConversionDestinationData = {
|
|
|
20526
20551
|
*
|
|
20527
20552
|
*/
|
|
20528
20553
|
autoAssociationType?: 'ALL_CAMPAIGNS' | 'OBJECTIVE_BASED' | 'NONE';
|
|
20554
|
+
/**
|
|
20555
|
+
* Google Ads only. Whether to count multiple conversions from
|
|
20556
|
+
* the same click (MANY_PER_CLICK) or at most one
|
|
20557
|
+
* (ONE_PER_CLICK). Defaults to MANY_PER_CLICK if omitted.
|
|
20558
|
+
*
|
|
20559
|
+
*/
|
|
20560
|
+
countingType?: 'MANY_PER_CLICK' | 'ONE_PER_CLICK';
|
|
20561
|
+
/**
|
|
20562
|
+
* Google Ads only. When true, the conversion action is marked
|
|
20563
|
+
* as primary and immediately influences Smart Bidding. Defaults
|
|
20564
|
+
* to false (secondary, record-only) to avoid unintentionally
|
|
20565
|
+
* steering the customer's campaigns on creation.
|
|
20566
|
+
*
|
|
20567
|
+
*/
|
|
20568
|
+
primaryForGoal?: boolean;
|
|
20529
20569
|
};
|
|
20530
20570
|
path: {
|
|
20531
20571
|
/**
|
|
20532
|
-
* SocialAccount ID (linkedinads).
|
|
20572
|
+
* SocialAccount ID (linkedinads or googleads).
|
|
20533
20573
|
*/
|
|
20534
20574
|
accountId: string;
|
|
20535
20575
|
};
|
|
20536
20576
|
};
|
|
20537
20577
|
type CreateConversionDestinationResponse = ({
|
|
20538
|
-
platform?: 'linkedinads';
|
|
20578
|
+
platform?: 'linkedinads' | 'googleads';
|
|
20539
20579
|
destination?: ConversionDestination;
|
|
20540
20580
|
});
|
|
20541
20581
|
type CreateConversionDestinationError = (unknown | {
|
package/dist/index.d.ts
CHANGED
|
@@ -15347,7 +15347,7 @@ type GetWhatsAppNumberKycFormResponse = ({
|
|
|
15347
15347
|
localTo?: (string) | null;
|
|
15348
15348
|
}>;
|
|
15349
15349
|
/**
|
|
15350
|
-
* Present when this account already has an approved verification for the country that can be reused (skip the form).
|
|
15350
|
+
* Present when this account already has an approved verification for the country that can be reused (skip the form). `fromPhoneNumber`/`details` mirror the newest option; `options` lists ALL approved verifications (agencies hold one per end client) — pass the chosen option's `fromPhoneNumber` as `reuseFrom` on POST.
|
|
15351
15351
|
*/
|
|
15352
15352
|
reusable?: {
|
|
15353
15353
|
available?: boolean;
|
|
@@ -15359,6 +15359,16 @@ type GetWhatsAppNumberKycFormResponse = ({
|
|
|
15359
15359
|
label?: string;
|
|
15360
15360
|
value?: string;
|
|
15361
15361
|
}>;
|
|
15362
|
+
/**
|
|
15363
|
+
* One entry per distinct approved verification, newest first.
|
|
15364
|
+
*/
|
|
15365
|
+
options?: Array<{
|
|
15366
|
+
fromPhoneNumber?: string;
|
|
15367
|
+
details?: Array<{
|
|
15368
|
+
label?: string;
|
|
15369
|
+
value?: string;
|
|
15370
|
+
}>;
|
|
15371
|
+
}>;
|
|
15362
15372
|
} | null;
|
|
15363
15373
|
});
|
|
15364
15374
|
type GetWhatsAppNumberKycFormError = (unknown | {
|
|
@@ -15376,6 +15386,10 @@ type SubmitWhatsAppNumberKycData = {
|
|
|
15376
15386
|
* Reuse a prior approved verification for this country (skips document/field collection; places the order immediately).
|
|
15377
15387
|
*/
|
|
15378
15388
|
reuse?: boolean;
|
|
15389
|
+
/**
|
|
15390
|
+
* Which approved verification to reuse when several exist: the phone number it was originally approved for (GET reusable.options[].fromPhoneNumber). Omitted = newest. No match = 409.
|
|
15391
|
+
*/
|
|
15392
|
+
reuseFrom?: string;
|
|
15379
15393
|
/**
|
|
15380
15394
|
* End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement.
|
|
15381
15395
|
*/
|
|
@@ -20462,44 +20476,54 @@ type ListConversionDestinationsError = (unknown | {
|
|
|
20462
20476
|
type CreateConversionDestinationData = {
|
|
20463
20477
|
body: {
|
|
20464
20478
|
/**
|
|
20465
|
-
*
|
|
20466
|
-
* full `urn:li:sponsoredAccount:{id}` URN.
|
|
20479
|
+
* Ad account ID. For LinkedIn: numeric (e.g. "5123456") or
|
|
20480
|
+
* full `urn:li:sponsoredAccount:{id}` URN. For Google: numeric
|
|
20481
|
+
* customer ID (e.g. "1234567890") or `customers/{id}` form.
|
|
20467
20482
|
*
|
|
20468
20483
|
*/
|
|
20469
20484
|
adAccountId: string;
|
|
20470
20485
|
name: string;
|
|
20471
20486
|
/**
|
|
20472
|
-
*
|
|
20473
|
-
* "Lead", "AddToCart") or a LinkedIn rule
|
|
20474
|
-
* (e.g. "PURCHASE", "QUALIFIED_LEAD").
|
|
20475
|
-
*
|
|
20487
|
+
* Conversion type. For LinkedIn: a unified standard event name
|
|
20488
|
+
* (e.g. "Purchase", "Lead", "AddToCart") or a LinkedIn rule
|
|
20489
|
+
* type enum (e.g. "PURCHASE", "QUALIFIED_LEAD"). For Google:
|
|
20490
|
+
* a unified standard event name (Purchase, Subscribe,
|
|
20491
|
+
* CompleteRegistration, Lead, Schedule) or a Google
|
|
20492
|
+
* ConversionActionCategory enum value directly (e.g.
|
|
20493
|
+
* "PURCHASE", "SUBSCRIBE_PAID", "SIGNUP", "IMPORTED_LEAD",
|
|
20494
|
+
* "BOOK_APPOINTMENT"). Unknown values pass through to the
|
|
20495
|
+
* platform.
|
|
20476
20496
|
*
|
|
20477
20497
|
*/
|
|
20478
20498
|
type: string;
|
|
20499
|
+
/**
|
|
20500
|
+
* LinkedIn only.
|
|
20501
|
+
*/
|
|
20479
20502
|
attributionType?: 'LAST_TOUCH_BY_CAMPAIGN' | 'LAST_TOUCH_BY_CONVERSION';
|
|
20480
20503
|
/**
|
|
20481
|
-
* Default 30. 365 only allowed for LEAD,
|
|
20482
|
-
* ADD_TO_CART, QUALIFIED_LEAD, SUBMIT_APPLICATION
|
|
20483
|
-
* types
|
|
20504
|
+
* LinkedIn only. Default 30. 365 only allowed for LEAD,
|
|
20505
|
+
* PURCHASE, ADD_TO_CART, QUALIFIED_LEAD, SUBMIT_APPLICATION
|
|
20506
|
+
* rule types; the API rejects other combinations locally.
|
|
20484
20507
|
*
|
|
20485
20508
|
*/
|
|
20486
20509
|
postClickAttributionWindowSize?: 1 | 7 | 30 | 90 | 365;
|
|
20487
20510
|
/**
|
|
20488
|
-
* Default 7. Same 365-day-window type
|
|
20489
|
-
* as `postClickAttributionWindowSize`.
|
|
20511
|
+
* LinkedIn only. Default 7. Same 365-day-window type
|
|
20512
|
+
* restriction applies as `postClickAttributionWindowSize`.
|
|
20490
20513
|
*
|
|
20491
20514
|
*/
|
|
20492
20515
|
viewThroughAttributionWindowSize?: 1 | 7 | 30 | 90 | 365;
|
|
20493
20516
|
/**
|
|
20494
|
-
* DYNAMIC (default) uses the per-event `value`
|
|
20495
|
-
* `sendConversions`. FIXED uses the rule's `value` field.
|
|
20517
|
+
* LinkedIn only. DYNAMIC (default) uses the per-event `value`
|
|
20518
|
+
* from `sendConversions`. FIXED uses the rule's `value` field.
|
|
20496
20519
|
* NO_VALUE drops monetary value entirely.
|
|
20497
20520
|
*
|
|
20498
20521
|
*/
|
|
20499
20522
|
valueType?: 'DYNAMIC' | 'FIXED' | 'NO_VALUE';
|
|
20500
20523
|
/**
|
|
20501
|
-
* Static conversion value. Used when
|
|
20502
|
-
* The currency should match the ad
|
|
20524
|
+
* LinkedIn only. Static conversion value. Used when
|
|
20525
|
+
* `valueType=FIXED`. The currency should match the ad
|
|
20526
|
+
* account's currency.
|
|
20503
20527
|
*
|
|
20504
20528
|
*/
|
|
20505
20529
|
value?: {
|
|
@@ -20513,7 +20537,8 @@ type CreateConversionDestinationData = {
|
|
|
20513
20537
|
amount: string;
|
|
20514
20538
|
};
|
|
20515
20539
|
/**
|
|
20516
|
-
* Controls campaign association at rule-creation
|
|
20540
|
+
* LinkedIn only. Controls campaign association at rule-creation
|
|
20541
|
+
* time:
|
|
20517
20542
|
* - ALL_CAMPAIGNS: associate the rule with every active,
|
|
20518
20543
|
* paused, and draft campaign in the ad account
|
|
20519
20544
|
* - OBJECTIVE_BASED: associate only campaigns whose
|
|
@@ -20526,16 +20551,31 @@ type CreateConversionDestinationData = {
|
|
|
20526
20551
|
*
|
|
20527
20552
|
*/
|
|
20528
20553
|
autoAssociationType?: 'ALL_CAMPAIGNS' | 'OBJECTIVE_BASED' | 'NONE';
|
|
20554
|
+
/**
|
|
20555
|
+
* Google Ads only. Whether to count multiple conversions from
|
|
20556
|
+
* the same click (MANY_PER_CLICK) or at most one
|
|
20557
|
+
* (ONE_PER_CLICK). Defaults to MANY_PER_CLICK if omitted.
|
|
20558
|
+
*
|
|
20559
|
+
*/
|
|
20560
|
+
countingType?: 'MANY_PER_CLICK' | 'ONE_PER_CLICK';
|
|
20561
|
+
/**
|
|
20562
|
+
* Google Ads only. When true, the conversion action is marked
|
|
20563
|
+
* as primary and immediately influences Smart Bidding. Defaults
|
|
20564
|
+
* to false (secondary, record-only) to avoid unintentionally
|
|
20565
|
+
* steering the customer's campaigns on creation.
|
|
20566
|
+
*
|
|
20567
|
+
*/
|
|
20568
|
+
primaryForGoal?: boolean;
|
|
20529
20569
|
};
|
|
20530
20570
|
path: {
|
|
20531
20571
|
/**
|
|
20532
|
-
* SocialAccount ID (linkedinads).
|
|
20572
|
+
* SocialAccount ID (linkedinads or googleads).
|
|
20533
20573
|
*/
|
|
20534
20574
|
accountId: string;
|
|
20535
20575
|
};
|
|
20536
20576
|
};
|
|
20537
20577
|
type CreateConversionDestinationResponse = ({
|
|
20538
|
-
platform?: 'linkedinads';
|
|
20578
|
+
platform?: 'linkedinads' | 'googleads';
|
|
20539
20579
|
destination?: ConversionDestination;
|
|
20540
20580
|
});
|
|
20541
20581
|
type CreateConversionDestinationError = (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.
|
|
39
|
+
version: "0.2.260",
|
|
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.
|
|
8
|
+
version: "0.2.260",
|
|
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
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -5324,11 +5324,15 @@ export const listConversionDestinations = <ThrowOnError extends boolean = false>
|
|
|
5324
5324
|
};
|
|
5325
5325
|
|
|
5326
5326
|
/**
|
|
5327
|
-
* Create a conversion destination (LinkedIn)
|
|
5328
|
-
* Create a new conversion
|
|
5329
|
-
*
|
|
5327
|
+
* Create a conversion destination (LinkedIn, Google Ads)
|
|
5328
|
+
* Create a new conversion destination on the platform. Supported for
|
|
5329
|
+
* LinkedIn (conversion rule) and Google Ads (conversion action). Meta
|
|
5330
|
+
* manages destinations in its own UI and returns 405.
|
|
5330
5331
|
*
|
|
5331
|
-
*
|
|
5332
|
+
* **WARNING: creation is NOT idempotent.** A retry creates a second
|
|
5333
|
+
* destination. Deduplicate before retrying.
|
|
5334
|
+
*
|
|
5335
|
+
* **LinkedIn:** the rule is created with `conversionMethod=CONVERSIONS_API`
|
|
5332
5336
|
* and (by default) auto-associated with all of the ad account's campaigns
|
|
5333
5337
|
* via `autoAssociationType=ALL_CAMPAIGNS`. Pass `autoAssociationType: NONE`
|
|
5334
5338
|
* to opt out and manage associations explicitly via the associations
|
|
@@ -5338,6 +5342,17 @@ export const listConversionDestinations = <ThrowOnError extends boolean = false>
|
|
|
5338
5342
|
* `PURCHASE`, `ADD_TO_CART`, `QUALIFIED_LEAD`, and `LEAD` rule types;
|
|
5339
5343
|
* the API rejects other combinations locally.
|
|
5340
5344
|
*
|
|
5345
|
+
* **Google Ads:** the conversion action is created with
|
|
5346
|
+
* `type=UPLOAD_CLICKS` (required for API-uploaded offline conversions,
|
|
5347
|
+
* immutable after creation). The `type` field carries the Google
|
|
5348
|
+
* `ConversionActionCategory` enum value, e.g. `PURCHASE`,
|
|
5349
|
+
* `SUBSCRIBE_PAID`, `SIGNUP`, `IMPORTED_LEAD`, `BOOK_APPOINTMENT`.
|
|
5350
|
+
* Unified standard event names (e.g. `Purchase`, `Subscribe`,
|
|
5351
|
+
* `CompleteRegistration`, `Lead`, `Schedule`) are resolved to their
|
|
5352
|
+
* Google category equivalents automatically. The action defaults to
|
|
5353
|
+
* secondary (non-primary) to avoid immediately steering Smart Bidding;
|
|
5354
|
+
* pass `primaryForGoal: true` to opt in.
|
|
5355
|
+
*
|
|
5341
5356
|
*/
|
|
5342
5357
|
export const createConversionDestination = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateConversionDestinationData, ThrowOnError>) => {
|
|
5343
5358
|
return (options?.client ?? client).post<CreateConversionDestinationResponse, CreateConversionDestinationError, ThrowOnError>({
|
|
@@ -15526,7 +15526,7 @@ export type GetWhatsAppNumberKycFormResponse = ({
|
|
|
15526
15526
|
localTo?: (string) | null;
|
|
15527
15527
|
}>;
|
|
15528
15528
|
/**
|
|
15529
|
-
* Present when this account already has an approved verification for the country that can be reused (skip the form).
|
|
15529
|
+
* Present when this account already has an approved verification for the country that can be reused (skip the form). `fromPhoneNumber`/`details` mirror the newest option; `options` lists ALL approved verifications (agencies hold one per end client) — pass the chosen option's `fromPhoneNumber` as `reuseFrom` on POST.
|
|
15530
15530
|
*/
|
|
15531
15531
|
reusable?: {
|
|
15532
15532
|
available?: boolean;
|
|
@@ -15538,6 +15538,16 @@ export type GetWhatsAppNumberKycFormResponse = ({
|
|
|
15538
15538
|
label?: string;
|
|
15539
15539
|
value?: string;
|
|
15540
15540
|
}>;
|
|
15541
|
+
/**
|
|
15542
|
+
* One entry per distinct approved verification, newest first.
|
|
15543
|
+
*/
|
|
15544
|
+
options?: Array<{
|
|
15545
|
+
fromPhoneNumber?: string;
|
|
15546
|
+
details?: Array<{
|
|
15547
|
+
label?: string;
|
|
15548
|
+
value?: string;
|
|
15549
|
+
}>;
|
|
15550
|
+
}>;
|
|
15541
15551
|
} | null;
|
|
15542
15552
|
});
|
|
15543
15553
|
|
|
@@ -15557,6 +15567,10 @@ export type SubmitWhatsAppNumberKycData = {
|
|
|
15557
15567
|
* Reuse a prior approved verification for this country (skips document/field collection; places the order immediately).
|
|
15558
15568
|
*/
|
|
15559
15569
|
reuse?: boolean;
|
|
15570
|
+
/**
|
|
15571
|
+
* Which approved verification to reuse when several exist: the phone number it was originally approved for (GET reusable.options[].fromPhoneNumber). Omitted = newest. No match = 409.
|
|
15572
|
+
*/
|
|
15573
|
+
reuseFrom?: string;
|
|
15560
15574
|
/**
|
|
15561
15575
|
* End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement.
|
|
15562
15576
|
*/
|
|
@@ -21032,44 +21046,54 @@ export type ListConversionDestinationsError = (unknown | {
|
|
|
21032
21046
|
export type CreateConversionDestinationData = {
|
|
21033
21047
|
body: {
|
|
21034
21048
|
/**
|
|
21035
|
-
*
|
|
21036
|
-
* full `urn:li:sponsoredAccount:{id}` URN.
|
|
21049
|
+
* Ad account ID. For LinkedIn: numeric (e.g. "5123456") or
|
|
21050
|
+
* full `urn:li:sponsoredAccount:{id}` URN. For Google: numeric
|
|
21051
|
+
* customer ID (e.g. "1234567890") or `customers/{id}` form.
|
|
21037
21052
|
*
|
|
21038
21053
|
*/
|
|
21039
21054
|
adAccountId: string;
|
|
21040
21055
|
name: string;
|
|
21041
21056
|
/**
|
|
21042
|
-
*
|
|
21043
|
-
* "Lead", "AddToCart") or a LinkedIn rule
|
|
21044
|
-
* (e.g. "PURCHASE", "QUALIFIED_LEAD").
|
|
21045
|
-
*
|
|
21057
|
+
* Conversion type. For LinkedIn: a unified standard event name
|
|
21058
|
+
* (e.g. "Purchase", "Lead", "AddToCart") or a LinkedIn rule
|
|
21059
|
+
* type enum (e.g. "PURCHASE", "QUALIFIED_LEAD"). For Google:
|
|
21060
|
+
* a unified standard event name (Purchase, Subscribe,
|
|
21061
|
+
* CompleteRegistration, Lead, Schedule) or a Google
|
|
21062
|
+
* ConversionActionCategory enum value directly (e.g.
|
|
21063
|
+
* "PURCHASE", "SUBSCRIBE_PAID", "SIGNUP", "IMPORTED_LEAD",
|
|
21064
|
+
* "BOOK_APPOINTMENT"). Unknown values pass through to the
|
|
21065
|
+
* platform.
|
|
21046
21066
|
*
|
|
21047
21067
|
*/
|
|
21048
21068
|
type: string;
|
|
21069
|
+
/**
|
|
21070
|
+
* LinkedIn only.
|
|
21071
|
+
*/
|
|
21049
21072
|
attributionType?: 'LAST_TOUCH_BY_CAMPAIGN' | 'LAST_TOUCH_BY_CONVERSION';
|
|
21050
21073
|
/**
|
|
21051
|
-
* Default 30. 365 only allowed for LEAD,
|
|
21052
|
-
* ADD_TO_CART, QUALIFIED_LEAD, SUBMIT_APPLICATION
|
|
21053
|
-
* types
|
|
21074
|
+
* LinkedIn only. Default 30. 365 only allowed for LEAD,
|
|
21075
|
+
* PURCHASE, ADD_TO_CART, QUALIFIED_LEAD, SUBMIT_APPLICATION
|
|
21076
|
+
* rule types; the API rejects other combinations locally.
|
|
21054
21077
|
*
|
|
21055
21078
|
*/
|
|
21056
21079
|
postClickAttributionWindowSize?: 1 | 7 | 30 | 90 | 365;
|
|
21057
21080
|
/**
|
|
21058
|
-
* Default 7. Same 365-day-window type
|
|
21059
|
-
* as `postClickAttributionWindowSize`.
|
|
21081
|
+
* LinkedIn only. Default 7. Same 365-day-window type
|
|
21082
|
+
* restriction applies as `postClickAttributionWindowSize`.
|
|
21060
21083
|
*
|
|
21061
21084
|
*/
|
|
21062
21085
|
viewThroughAttributionWindowSize?: 1 | 7 | 30 | 90 | 365;
|
|
21063
21086
|
/**
|
|
21064
|
-
* DYNAMIC (default) uses the per-event `value`
|
|
21065
|
-
* `sendConversions`. FIXED uses the rule's `value` field.
|
|
21087
|
+
* LinkedIn only. DYNAMIC (default) uses the per-event `value`
|
|
21088
|
+
* from `sendConversions`. FIXED uses the rule's `value` field.
|
|
21066
21089
|
* NO_VALUE drops monetary value entirely.
|
|
21067
21090
|
*
|
|
21068
21091
|
*/
|
|
21069
21092
|
valueType?: 'DYNAMIC' | 'FIXED' | 'NO_VALUE';
|
|
21070
21093
|
/**
|
|
21071
|
-
* Static conversion value. Used when
|
|
21072
|
-
* The currency should match the ad
|
|
21094
|
+
* LinkedIn only. Static conversion value. Used when
|
|
21095
|
+
* `valueType=FIXED`. The currency should match the ad
|
|
21096
|
+
* account's currency.
|
|
21073
21097
|
*
|
|
21074
21098
|
*/
|
|
21075
21099
|
value?: {
|
|
@@ -21083,7 +21107,8 @@ export type CreateConversionDestinationData = {
|
|
|
21083
21107
|
amount: string;
|
|
21084
21108
|
};
|
|
21085
21109
|
/**
|
|
21086
|
-
* Controls campaign association at rule-creation
|
|
21110
|
+
* LinkedIn only. Controls campaign association at rule-creation
|
|
21111
|
+
* time:
|
|
21087
21112
|
* - ALL_CAMPAIGNS: associate the rule with every active,
|
|
21088
21113
|
* paused, and draft campaign in the ad account
|
|
21089
21114
|
* - OBJECTIVE_BASED: associate only campaigns whose
|
|
@@ -21096,17 +21121,32 @@ export type CreateConversionDestinationData = {
|
|
|
21096
21121
|
*
|
|
21097
21122
|
*/
|
|
21098
21123
|
autoAssociationType?: 'ALL_CAMPAIGNS' | 'OBJECTIVE_BASED' | 'NONE';
|
|
21124
|
+
/**
|
|
21125
|
+
* Google Ads only. Whether to count multiple conversions from
|
|
21126
|
+
* the same click (MANY_PER_CLICK) or at most one
|
|
21127
|
+
* (ONE_PER_CLICK). Defaults to MANY_PER_CLICK if omitted.
|
|
21128
|
+
*
|
|
21129
|
+
*/
|
|
21130
|
+
countingType?: 'MANY_PER_CLICK' | 'ONE_PER_CLICK';
|
|
21131
|
+
/**
|
|
21132
|
+
* Google Ads only. When true, the conversion action is marked
|
|
21133
|
+
* as primary and immediately influences Smart Bidding. Defaults
|
|
21134
|
+
* to false (secondary, record-only) to avoid unintentionally
|
|
21135
|
+
* steering the customer's campaigns on creation.
|
|
21136
|
+
*
|
|
21137
|
+
*/
|
|
21138
|
+
primaryForGoal?: boolean;
|
|
21099
21139
|
};
|
|
21100
21140
|
path: {
|
|
21101
21141
|
/**
|
|
21102
|
-
* SocialAccount ID (linkedinads).
|
|
21142
|
+
* SocialAccount ID (linkedinads or googleads).
|
|
21103
21143
|
*/
|
|
21104
21144
|
accountId: string;
|
|
21105
21145
|
};
|
|
21106
21146
|
};
|
|
21107
21147
|
|
|
21108
21148
|
export type CreateConversionDestinationResponse = ({
|
|
21109
|
-
platform?: 'linkedinads';
|
|
21149
|
+
platform?: 'linkedinads' | 'googleads';
|
|
21110
21150
|
destination?: ConversionDestination;
|
|
21111
21151
|
});
|
|
21112
21152
|
|