@zernio/node 0.2.518 → 0.2.519
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 +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +672 -655
- package/dist/index.mjs +672 -655
- package/package.json +1 -1
- package/src/client.ts +688 -659
- package/src/generated/types.gen.ts +16 -1
package/dist/index.d.mts
CHANGED
|
@@ -47,6 +47,12 @@ interface ClientOptions {
|
|
|
47
47
|
*/
|
|
48
48
|
declare class Zernio {
|
|
49
49
|
private _options;
|
|
50
|
+
/**
|
|
51
|
+
* HTTP client owned by this instance. Every namespace method below is bound
|
|
52
|
+
* to it, so two Zernio instances in the same process never see each other's
|
|
53
|
+
* credentials.
|
|
54
|
+
*/
|
|
55
|
+
private _client;
|
|
50
56
|
/**
|
|
51
57
|
* API key used for authentication.
|
|
52
58
|
*/
|
|
@@ -55,6 +61,13 @@ declare class Zernio {
|
|
|
55
61
|
* Base URL for API requests.
|
|
56
62
|
*/
|
|
57
63
|
baseURL: string;
|
|
64
|
+
/**
|
|
65
|
+
* Routes a generated operation through this instance's client, preserving the
|
|
66
|
+
* operation's own signature. Reads `_client` when the method is called, not
|
|
67
|
+
* when it is bound, because class fields initialize before the constructor
|
|
68
|
+
* body runs.
|
|
69
|
+
*/
|
|
70
|
+
private _bind;
|
|
58
71
|
/**
|
|
59
72
|
* validate API
|
|
60
73
|
*/
|
|
@@ -2785,6 +2798,15 @@ type ConversionEvent = {
|
|
|
2785
2798
|
* Meta advanced matching (ge). 'f' or 'm'; hashed server-side. Meta only.
|
|
2786
2799
|
*/
|
|
2787
2800
|
gender?: string;
|
|
2801
|
+
/**
|
|
2802
|
+
* Meta lead ID from a Lead Ad submission, as a string. Required
|
|
2803
|
+
* for Conversion Leads CRM events: send it with
|
|
2804
|
+
* `actionSource: 'crm'` and
|
|
2805
|
+
* `platformData: { event_source: 'crm', lead_event_source: '<CRM name>' }`.
|
|
2806
|
+
* Forwarded unhashed to Meta's `user_data.lead_id`. Meta only.
|
|
2807
|
+
*
|
|
2808
|
+
*/
|
|
2809
|
+
leadId?: string;
|
|
2788
2810
|
/**
|
|
2789
2811
|
* Platform click identifiers captured from the originating ad click.
|
|
2790
2812
|
*/
|
|
@@ -2840,7 +2862,13 @@ type ConversionEvent = {
|
|
|
2840
2862
|
*/
|
|
2841
2863
|
actionSource?: 'web' | 'app' | 'offline' | 'crm' | 'phone_call' | 'system_generated';
|
|
2842
2864
|
/**
|
|
2843
|
-
* Escape hatch for platform-specific fields we haven't normalized.
|
|
2865
|
+
* Escape hatch for platform-specific fields we haven't normalized.
|
|
2866
|
+
* On Meta, keys are shallow-merged into `custom_data` only: fields
|
|
2867
|
+
* Zernio already builds (`value`, `currency`, `contents`,
|
|
2868
|
+
* `num_items`) always win on collision, and `user_data` (hashed
|
|
2869
|
+
* match keys) is never touched. Use first-class fields (e.g.
|
|
2870
|
+
* `user.leadId`) for anything that must reach `user_data`.
|
|
2871
|
+
*
|
|
2844
2872
|
*/
|
|
2845
2873
|
platformData?: {
|
|
2846
2874
|
[key: string]: unknown;
|
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,12 @@ interface ClientOptions {
|
|
|
47
47
|
*/
|
|
48
48
|
declare class Zernio {
|
|
49
49
|
private _options;
|
|
50
|
+
/**
|
|
51
|
+
* HTTP client owned by this instance. Every namespace method below is bound
|
|
52
|
+
* to it, so two Zernio instances in the same process never see each other's
|
|
53
|
+
* credentials.
|
|
54
|
+
*/
|
|
55
|
+
private _client;
|
|
50
56
|
/**
|
|
51
57
|
* API key used for authentication.
|
|
52
58
|
*/
|
|
@@ -55,6 +61,13 @@ declare class Zernio {
|
|
|
55
61
|
* Base URL for API requests.
|
|
56
62
|
*/
|
|
57
63
|
baseURL: string;
|
|
64
|
+
/**
|
|
65
|
+
* Routes a generated operation through this instance's client, preserving the
|
|
66
|
+
* operation's own signature. Reads `_client` when the method is called, not
|
|
67
|
+
* when it is bound, because class fields initialize before the constructor
|
|
68
|
+
* body runs.
|
|
69
|
+
*/
|
|
70
|
+
private _bind;
|
|
58
71
|
/**
|
|
59
72
|
* validate API
|
|
60
73
|
*/
|
|
@@ -2785,6 +2798,15 @@ type ConversionEvent = {
|
|
|
2785
2798
|
* Meta advanced matching (ge). 'f' or 'm'; hashed server-side. Meta only.
|
|
2786
2799
|
*/
|
|
2787
2800
|
gender?: string;
|
|
2801
|
+
/**
|
|
2802
|
+
* Meta lead ID from a Lead Ad submission, as a string. Required
|
|
2803
|
+
* for Conversion Leads CRM events: send it with
|
|
2804
|
+
* `actionSource: 'crm'` and
|
|
2805
|
+
* `platformData: { event_source: 'crm', lead_event_source: '<CRM name>' }`.
|
|
2806
|
+
* Forwarded unhashed to Meta's `user_data.lead_id`. Meta only.
|
|
2807
|
+
*
|
|
2808
|
+
*/
|
|
2809
|
+
leadId?: string;
|
|
2788
2810
|
/**
|
|
2789
2811
|
* Platform click identifiers captured from the originating ad click.
|
|
2790
2812
|
*/
|
|
@@ -2840,7 +2862,13 @@ type ConversionEvent = {
|
|
|
2840
2862
|
*/
|
|
2841
2863
|
actionSource?: 'web' | 'app' | 'offline' | 'crm' | 'phone_call' | 'system_generated';
|
|
2842
2864
|
/**
|
|
2843
|
-
* Escape hatch for platform-specific fields we haven't normalized.
|
|
2865
|
+
* Escape hatch for platform-specific fields we haven't normalized.
|
|
2866
|
+
* On Meta, keys are shallow-merged into `custom_data` only: fields
|
|
2867
|
+
* Zernio already builds (`value`, `currency`, `contents`,
|
|
2868
|
+
* `num_items`) always win on collision, and `user_data` (hashed
|
|
2869
|
+
* match keys) is never touched. Use first-class fields (e.g.
|
|
2870
|
+
* `user.leadId`) for anything that must reach `user_data`.
|
|
2871
|
+
*
|
|
2844
2872
|
*/
|
|
2845
2873
|
platformData?: {
|
|
2846
2874
|
[key: string]: unknown;
|