@getlatedev/node 0.2.1743 → 0.2.1745

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.
@@ -7141,11 +7141,33 @@ export type CampaignMetricRow = {
7141
7141
  adAccountId: string;
7142
7142
  campaignId: string;
7143
7143
  /**
7144
- * Each uploaded result metric summed over the range, by metric key.
7144
+ * Without metrics, each uploaded result metric summed over the range, by metric key.
7145
7145
  */
7146
- results: {
7146
+ results?: {
7147
7147
  [key: string]: (number);
7148
7148
  };
7149
+ /**
7150
+ * With metrics, the campaign name. null before its first sync.
7151
+ */
7152
+ name?: (string) | null;
7153
+ /**
7154
+ * With metrics, the ad account currency every money metric of this campaign is in. Campaigns of different ad accounts are never summed together.
7155
+ */
7156
+ currency?: (string) | null;
7157
+ /**
7158
+ * With metrics, only the asked metrics, summed over every ad of the campaign with rates recomputed from the sums. reach is deduplicated across the range for Meta and TikTok when the platform returns it.
7159
+ */
7160
+ metrics?: (AdMetrics);
7161
+ /**
7162
+ * With granularity=day, one point per day with delivery, each carrying date and the asked metrics.
7163
+ */
7164
+ daily?: Array<(AdMetrics & {
7165
+ date: string;
7166
+ })>;
7167
+ /**
7168
+ * With metrics, when the newest daily row of the campaign was synced.
7169
+ */
7170
+ lastSyncedAt?: (string) | null;
7149
7171
  };
7150
7172
 
7151
7173
  export type CampaignMetricsResponse = {
@@ -7154,6 +7176,10 @@ export type CampaignMetricsResponse = {
7154
7176
  meta: ({
7155
7177
  fromDate: string;
7156
7178
  toDate: string;
7179
+ /**
7180
+ * With metrics, asked campaignIds that are not campaigns the caller can see.
7181
+ */
7182
+ missingIds?: Array<(string)>;
7157
7183
  } & MetricsFreshness);
7158
7184
  };
7159
7185
 
@@ -21541,7 +21567,7 @@ export type contentType3 = 'story' | 'saved_story' | 'spotlight';
21541
21567
 
21542
21568
  export type SocialAccount = {
21543
21569
  _id: string;
21544
- platform: 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'wix' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'redditads' | 'sms' | 'phone' | 'rcs' | 'whopads' | 'applovinads' | 'snapchatads' | 'taboolaads' | 'klaviyo' | 'attentive' | 'impact' | 'awin' | 'google' | 'microsoft' | 'imap' | 'hubspot' | 'salesforce' | 'webflow' | 'googleanalytics' | 'imessage' | 'tiktokshop' | 'microsoftads' | 'line' | 'wechat' | 'googletagmanager' | 'stripe' | 'googlesearchconsole' | 'campaignmanager360' | 'tradedeskads' | 'amazonads' | 'gohighlevel';
21570
+ platform: 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'wix' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'redditads' | 'sms' | 'phone' | 'rcs' | 'whopads' | 'applovinads' | 'snapchatads' | 'taboolaads' | 'klaviyo' | 'attentive' | 'impact' | 'awin' | 'google' | 'microsoft' | 'imap' | 'hubspot' | 'salesforce' | 'webflow' | 'googleanalytics' | 'imessage' | 'tiktokshop' | 'microsoftads' | 'line' | 'wechat' | 'googletagmanager' | 'stripe' | 'googlesearchconsole' | 'campaignmanager360' | 'tradedeskads' | 'tradedeskdsp' | 'amazonads' | 'gohighlevel';
21545
21571
  profileId: (string | Profile);
21546
21572
  username?: string;
21547
21573
  displayName?: string;
@@ -21687,7 +21713,7 @@ export type SocialAccount = {
21687
21713
  };
21688
21714
  };
21689
21715
 
21690
- export type platform18 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'wix' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'redditads' | 'sms' | 'phone' | 'rcs' | 'whopads' | 'applovinads' | 'snapchatads' | 'taboolaads' | 'klaviyo' | 'attentive' | 'impact' | 'awin' | 'google' | 'microsoft' | 'imap' | 'hubspot' | 'salesforce' | 'webflow' | 'googleanalytics' | 'imessage' | 'tiktokshop' | 'microsoftads' | 'line' | 'wechat' | 'googletagmanager' | 'stripe' | 'googlesearchconsole' | 'campaignmanager360' | 'tradedeskads' | 'amazonads' | 'gohighlevel';
21716
+ export type platform18 = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'wix' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'redditads' | 'sms' | 'phone' | 'rcs' | 'whopads' | 'applovinads' | 'snapchatads' | 'taboolaads' | 'klaviyo' | 'attentive' | 'impact' | 'awin' | 'google' | 'microsoft' | 'imap' | 'hubspot' | 'salesforce' | 'webflow' | 'googleanalytics' | 'imessage' | 'tiktokshop' | 'microsoftads' | 'line' | 'wechat' | 'googletagmanager' | 'stripe' | 'googlesearchconsole' | 'campaignmanager360' | 'tradedeskads' | 'tradedeskdsp' | 'amazonads' | 'gohighlevel';
21691
21717
 
21692
21718
  /**
21693
21719
  * TikTok accounts only. The account type TikTok reported when the account was connected.
@@ -32390,7 +32416,7 @@ export type GetAdMetricsError = (ErrorResponse | (ErrorResponse & {
32390
32416
  export type GetCampaignMetricsData = {
32391
32417
  query: {
32392
32418
  /**
32393
- * Comma-separated platform campaign ids.
32419
+ * Comma-separated platform campaign ids. Required with metrics, up to 100.
32394
32420
  */
32395
32421
  campaignId?: string;
32396
32422
  /**
@@ -32401,10 +32427,18 @@ export type GetCampaignMetricsData = {
32401
32427
  * First day, inclusive.
32402
32428
  */
32403
32429
  fromDate: string;
32430
+ /**
32431
+ * day adds one point per day to each campaign. Needs metrics.
32432
+ */
32433
+ granularity?: 'total' | 'day';
32404
32434
  /**
32405
32435
  * Rows per page, 50 by default, 100 at most.
32406
32436
  */
32407
32437
  limit?: number;
32438
+ /**
32439
+ * Comma-separated delivery metrics, as GET /v1/metrics/catalog?entity=campaigns lists them (spend, impressions, reach, clicks, ctr, cpc, cpm, conversions, roas, actions, funnel, video counts...).
32440
+ */
32441
+ metrics?: string;
32408
32442
  /**
32409
32443
  * Last day, inclusive. The range is at most 400 days.
32410
32444
  */
@@ -38398,7 +38432,7 @@ export type GetAllAccountsHealthData = {
38398
38432
  /**
38399
38433
  * Filter by platform
38400
38434
  */
38401
- platform?: 'facebook' | 'instagram' | 'linkedin' | 'twitter' | 'tiktok' | 'youtube' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'wix' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'redditads' | 'microsoftads' | 'whopads' | 'applovinads' | 'snapchatads' | 'taboolaads' | 'klaviyo' | 'attentive' | 'impact' | 'awin' | 'hubspot' | 'salesforce' | 'gohighlevel' | 'webflow' | 'googleanalytics' | 'line' | 'wechat' | 'googletagmanager' | 'googlesearchconsole' | 'stripe' | 'campaignmanager360' | 'tradedeskads' | 'amazonads';
38435
+ platform?: 'facebook' | 'instagram' | 'linkedin' | 'twitter' | 'tiktok' | 'youtube' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp' | 'shopify' | 'wordpress' | 'wix' | 'linkedinads' | 'metaads' | 'pinterestads' | 'tiktokads' | 'xads' | 'googleads' | 'openaiads' | 'redditads' | 'microsoftads' | 'whopads' | 'applovinads' | 'snapchatads' | 'taboolaads' | 'klaviyo' | 'attentive' | 'impact' | 'awin' | 'hubspot' | 'salesforce' | 'gohighlevel' | 'webflow' | 'googleanalytics' | 'line' | 'wechat' | 'googletagmanager' | 'googlesearchconsole' | 'stripe' | 'campaignmanager360' | 'tradedeskads' | 'tradedeskdsp' | 'amazonads';
38402
38436
  /**
38403
38437
  * Filter by profile ID
38404
38438
  */
@@ -45178,6 +45212,110 @@ export type ConnectTradeDeskAdsCredentialsError = (ErrorResponse | {
45178
45212
  };
45179
45213
  } | unknown);
45180
45214
 
45215
+ export type ConnectTradeDeskAdsPartnerData = {
45216
+ body: {
45217
+ /**
45218
+ * Trade Desk Partner ID, a short code such as `ptn1234`. Stored and echoed lowercased.
45219
+ */
45220
+ partnerId: string;
45221
+ /**
45222
+ * API token of a Trade Desk user with API access to the partner.
45223
+ */
45224
+ apiToken: string;
45225
+ /**
45226
+ * Advertiser ids to keep. Left out or empty, a new connection keeps every advertiser and a reconnect keeps its saved selection.
45227
+ */
45228
+ adAccountIds?: Array<(string)>;
45229
+ /**
45230
+ * Optional display name for the account.
45231
+ */
45232
+ name?: string;
45233
+ /**
45234
+ * Your Zernio profile ID
45235
+ */
45236
+ profileId: string;
45237
+ /**
45238
+ * Optional state passthrough for the connect flow.
45239
+ */
45240
+ state?: string;
45241
+ /**
45242
+ * Optional URL to redirect to after a successful connection, echoed back as redirectUrl.
45243
+ */
45244
+ redirect_url?: string;
45245
+ };
45246
+ };
45247
+
45248
+ export type ConnectTradeDeskAdsPartnerResponse = ({
45249
+ accountId?: string;
45250
+ partnerId?: string;
45251
+ accountName?: string;
45252
+ /**
45253
+ * Every advertiser the token reaches under the partner, whatever adAccountIds keeps.
45254
+ */
45255
+ advertisers?: Array<{
45256
+ id?: string;
45257
+ name?: string;
45258
+ }>;
45259
+ redirectUrl?: string;
45260
+ });
45261
+
45262
+ export type ConnectTradeDeskAdsPartnerError = (ErrorResponse | unknown | {
45263
+ /**
45264
+ * Human-readable error message suitable for end-user display.
45265
+ */
45266
+ error: string;
45267
+ /**
45268
+ * Machine-readable error code. Stable across versions.
45269
+ */
45270
+ code: 'PAYMENT_REQUIRED';
45271
+ /**
45272
+ * Discriminator for which gate fired.
45273
+ */
45274
+ reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required' | 'card_verification_required';
45275
+ /**
45276
+ * Link to the relevant documentation page.
45277
+ */
45278
+ documentation_url?: string;
45279
+ /**
45280
+ * Deep-link to send the end-user to. For
45281
+ * `free_tier_exceeded` and `twitter_passthrough` this opens
45282
+ * the add-payment-method drawer on the Zernio billing page.
45283
+ * For `enterprise_required` this is the Zernio enterprise
45284
+ * contact page.
45285
+ *
45286
+ */
45287
+ dashboard_url?: string;
45288
+ /**
45289
+ * Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
45290
+ */
45291
+ details?: {
45292
+ /**
45293
+ * How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
45294
+ */
45295
+ free_tier_account_limit?: number;
45296
+ /**
45297
+ * How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
45298
+ */
45299
+ current_account_count?: number;
45300
+ /**
45301
+ * Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
45302
+ */
45303
+ has_payment_method?: boolean;
45304
+ /**
45305
+ * One-time card verification charge in USD cents, credited to usage. Only set when reason=card_verification_required.
45306
+ */
45307
+ verification_amount_cents?: number;
45308
+ /**
45309
+ * The negotiated connected-account cap from the
45310
+ * team's enterprise contract. Self-service teams
45311
+ * have no cap and never receive this reason. Only
45312
+ * set when reason=enterprise_required.
45313
+ *
45314
+ */
45315
+ effective_account_limit?: number;
45316
+ };
45317
+ });
45318
+
45181
45319
  export type ConnectTaboolaAdsCredentialsData = {
45182
45320
  body: {
45183
45321
  /**