@getlatedev/node 0.2.1411 → 0.2.1413
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 +9 -0
- package/dist/index.d.mts +199 -10
- package/dist/index.d.ts +199 -10
- package/dist/index.js +41 -1
- package/dist/index.mjs +41 -1
- package/package.json +1 -1
- package/src/client.ts +16 -0
- package/src/generated/sdk.gen.ts +69 -1
- package/src/generated/types.gen.ts +205 -9
|
@@ -4424,6 +4424,10 @@ export type CampaignReport = {
|
|
|
4424
4424
|
*/
|
|
4425
4425
|
total: number;
|
|
4426
4426
|
};
|
|
4427
|
+
/**
|
|
4428
|
+
* The campaign engagement types summed over the same submissions.
|
|
4429
|
+
*/
|
|
4430
|
+
engagements: number;
|
|
4427
4431
|
submissions: CampaignSubmissionCounts;
|
|
4428
4432
|
/**
|
|
4429
4433
|
* Top 10 participants by payable, settling and settled cents.
|
|
@@ -4451,6 +4455,15 @@ export type CampaignReport = {
|
|
|
4451
4455
|
}>;
|
|
4452
4456
|
};
|
|
4453
4457
|
|
|
4458
|
+
export type CampaignResultMetric = {
|
|
4459
|
+
key: string;
|
|
4460
|
+
label: string;
|
|
4461
|
+
kind: 'count' | 'money';
|
|
4462
|
+
currency: (string) | null;
|
|
4463
|
+
};
|
|
4464
|
+
|
|
4465
|
+
export type kind4 = 'count' | 'money';
|
|
4466
|
+
|
|
4454
4467
|
export type CampaignSettlement = {
|
|
4455
4468
|
/**
|
|
4456
4469
|
* The ledger settlement entry.
|
|
@@ -4521,6 +4534,10 @@ export type CampaignSubmission = {
|
|
|
4521
4534
|
* Views that count toward earnings: every view the platform reports for the post, including those before submission, read at the tracking window end at the latest: once the window completes or is cancelled, the last read at or before its end is final and this value stops moving.
|
|
4522
4535
|
*/
|
|
4523
4536
|
viewsEligible: (number) | null;
|
|
4537
|
+
/**
|
|
4538
|
+
* The campaign engagement types summed at the latest read (all four on a views campaign), frozen at the tracking window end like `viewsEligible`. An `engagements` campaign earns on this count.
|
|
4539
|
+
*/
|
|
4540
|
+
engagementsLatest: (number) | null;
|
|
4524
4541
|
lastAccruedViews: number;
|
|
4525
4542
|
accruedCents: number;
|
|
4526
4543
|
approvedCents: number;
|
|
@@ -6471,7 +6488,7 @@ export type CreatorCampaignCaps = {
|
|
|
6471
6488
|
*
|
|
6472
6489
|
* Every type carries `budgetCents`, the most the campaign can pay out in total. Once earnings reach it, the campaign stops accruing and `creator_campaign.budget_exhausted` fires.
|
|
6473
6490
|
*
|
|
6474
|
-
* - `cpm`: `ratePer1kCents` per 1,000
|
|
6491
|
+
* - `cpm`: `ratePer1kCents` per 1,000 of the counted `metric` (views by default), earned once a post reaches `minViewsToEarn` of it, capped per post by `maxPayoutPerClipCents`.
|
|
6475
6492
|
* - `per_post`: `perApprovedPostCents` for each approved post, at most `maxPostsPerParticipant` per participant.
|
|
6476
6493
|
* - `pool`: `budgetCents` is split at close among approved posts by eligible views; a post needs `minViewsToQualify` views to share.
|
|
6477
6494
|
*
|
|
@@ -6480,12 +6497,28 @@ export type CreatorCampaignEconomics = CreatorCampaignEconomicsCpm | CreatorCamp
|
|
|
6480
6497
|
|
|
6481
6498
|
export type CreatorCampaignEconomicsCpm = {
|
|
6482
6499
|
type: 'cpm';
|
|
6500
|
+
/**
|
|
6501
|
+
* What the rate pays on. `engagements` counts the `engagementTypes` as each platform reports them, and `minViewsToEarn` then applies to engagements. Fixed once the campaign leaves draft.
|
|
6502
|
+
*/
|
|
6503
|
+
metric?: 'views' | 'engagements';
|
|
6504
|
+
/**
|
|
6505
|
+
* With `metric: engagements`, the engagements that count. Missing means all four, and sending it on a views campaign answers 400. YouTube reports likes and comments only, Facebook and Threads have no saves, and Pinterest reports saves only.
|
|
6506
|
+
*/
|
|
6507
|
+
engagementTypes?: Array<('likes' | 'comments' | 'shares' | 'saves')>;
|
|
6483
6508
|
ratePer1kCents: number;
|
|
6509
|
+
/**
|
|
6510
|
+
* The count a post must reach before it earns, in the campaign metric (views or engagements).
|
|
6511
|
+
*/
|
|
6484
6512
|
minViewsToEarn: number;
|
|
6485
6513
|
maxPayoutPerClipCents?: number;
|
|
6486
6514
|
budgetCents: number;
|
|
6487
6515
|
};
|
|
6488
6516
|
|
|
6517
|
+
/**
|
|
6518
|
+
* What the rate pays on. `engagements` counts the `engagementTypes` as each platform reports them, and `minViewsToEarn` then applies to engagements. Fixed once the campaign leaves draft.
|
|
6519
|
+
*/
|
|
6520
|
+
export type metric2 = 'views' | 'engagements';
|
|
6521
|
+
|
|
6489
6522
|
export type CreatorCampaignEconomicsPerPost = {
|
|
6490
6523
|
type: 'per_post';
|
|
6491
6524
|
perApprovedPostCents: number;
|
|
@@ -6542,6 +6575,14 @@ export type CreatorPortalCampaign = {
|
|
|
6542
6575
|
*/
|
|
6543
6576
|
export type CreatorPortalEconomics = {
|
|
6544
6577
|
type: 'cpm';
|
|
6578
|
+
/**
|
|
6579
|
+
* What the rate pays on. Missing means views.
|
|
6580
|
+
*/
|
|
6581
|
+
metric?: 'views' | 'engagements';
|
|
6582
|
+
/**
|
|
6583
|
+
* The engagements that count. Missing means all four.
|
|
6584
|
+
*/
|
|
6585
|
+
engagementTypes?: Array<('likes' | 'comments' | 'shares' | 'saves')>;
|
|
6545
6586
|
ratePer1kCents: number;
|
|
6546
6587
|
minViewsToEarn: number;
|
|
6547
6588
|
maxPayoutPerClipCents?: number;
|
|
@@ -6562,7 +6603,7 @@ export type CreatorPortalInvite = {
|
|
|
6562
6603
|
campaign: CreatorPortalCampaign;
|
|
6563
6604
|
};
|
|
6564
6605
|
|
|
6565
|
-
export type
|
|
6606
|
+
export type kind5 = 'invite';
|
|
6566
6607
|
|
|
6567
6608
|
export type CreatorPortalParticipant = {
|
|
6568
6609
|
kind: 'participant';
|
|
@@ -6608,7 +6649,7 @@ export type CreatorPortalParticipant = {
|
|
|
6608
6649
|
payouts: CreatorPortalPayoutSetup;
|
|
6609
6650
|
};
|
|
6610
6651
|
|
|
6611
|
-
export type
|
|
6652
|
+
export type kind6 = 'participant';
|
|
6612
6653
|
|
|
6613
6654
|
export type CreatorPortalPayoutEntry = {
|
|
6614
6655
|
id: string;
|
|
@@ -6662,6 +6703,10 @@ export type CreatorPortalSubmission = {
|
|
|
6662
6703
|
* Latest view count read for the post.
|
|
6663
6704
|
*/
|
|
6664
6705
|
views: number;
|
|
6706
|
+
/**
|
|
6707
|
+
* The campaign engagement types summed at the latest read. Null until the post is read.
|
|
6708
|
+
*/
|
|
6709
|
+
engagements: (number) | null;
|
|
6665
6710
|
earnedCents: number;
|
|
6666
6711
|
rejectReason: (string) | null;
|
|
6667
6712
|
/**
|
|
@@ -8629,7 +8674,7 @@ export type FileItem = {
|
|
|
8629
8674
|
trashed: boolean;
|
|
8630
8675
|
};
|
|
8631
8676
|
|
|
8632
|
-
export type
|
|
8677
|
+
export type kind7 = 'file' | 'folder';
|
|
8633
8678
|
|
|
8634
8679
|
export type FilePickerSession = {
|
|
8635
8680
|
/**
|
|
@@ -9979,7 +10024,7 @@ export type ImessageSenderLifecycle = {
|
|
|
9979
10024
|
createdAt?: string;
|
|
9980
10025
|
};
|
|
9981
10026
|
|
|
9982
|
-
export type
|
|
10027
|
+
export type kind8 = 'phone' | 'email';
|
|
9983
10028
|
|
|
9984
10029
|
export type region = 'US' | 'GB';
|
|
9985
10030
|
|
|
@@ -10596,7 +10641,7 @@ export type InstagramDemographicsResponse = {
|
|
|
10596
10641
|
note?: string;
|
|
10597
10642
|
};
|
|
10598
10643
|
|
|
10599
|
-
export type
|
|
10644
|
+
export type metric3 = 'follower_demographics' | 'engaged_audience_demographics';
|
|
10600
10645
|
|
|
10601
10646
|
/**
|
|
10602
10647
|
* The timeframe used for demographic data
|
|
@@ -10933,7 +10978,7 @@ export type InstagramVideoFallback = {
|
|
|
10933
10978
|
};
|
|
10934
10979
|
};
|
|
10935
10980
|
|
|
10936
|
-
export type
|
|
10981
|
+
export type kind9 = 'instagram_video_reuploaded' | 'instagram_video_rehosted_copy';
|
|
10937
10982
|
|
|
10938
10983
|
/**
|
|
10939
10984
|
* A Google Search keyword: a bare string (BROAD match), or an object naming the match type.
|
|
@@ -15441,7 +15486,7 @@ export type platform15 = 'metaads' | 'openaiads' | 'tiktokads' | 'googleads' | '
|
|
|
15441
15486
|
/**
|
|
15442
15487
|
* Platform-native flavor of the tag (Meta: `pixel`).
|
|
15443
15488
|
*/
|
|
15444
|
-
export type
|
|
15489
|
+
export type kind10 = 'pixel' | 'tag' | 'insight_tag';
|
|
15445
15490
|
|
|
15446
15491
|
/**
|
|
15447
15492
|
* One health check the platform runs on a tracking tag.
|
|
@@ -18040,6 +18085,14 @@ export type WebhookPayloadCampaignSubmission = {
|
|
|
18040
18085
|
platformPostUrl: (string) | null;
|
|
18041
18086
|
status: string;
|
|
18042
18087
|
viewsAtSubmission: (number) | null;
|
|
18088
|
+
/**
|
|
18089
|
+
* Views that count toward earnings at the latest read.
|
|
18090
|
+
*/
|
|
18091
|
+
viewsEligible: (number) | null;
|
|
18092
|
+
/**
|
|
18093
|
+
* The campaign engagement types summed at the latest read. An engagements campaign earns on this count.
|
|
18094
|
+
*/
|
|
18095
|
+
engagementsLatest: (number) | null;
|
|
18043
18096
|
flags: Array<{
|
|
18044
18097
|
code: string;
|
|
18045
18098
|
detail: string;
|
|
@@ -50608,6 +50661,149 @@ export type ListAdRuleRunsError = (ErrorResponse | {
|
|
|
50608
50661
|
error?: string;
|
|
50609
50662
|
});
|
|
50610
50663
|
|
|
50664
|
+
export type UploadCampaignResultsData = {
|
|
50665
|
+
body: {
|
|
50666
|
+
rows: Array<{
|
|
50667
|
+
/**
|
|
50668
|
+
* The day, at most 400 days ago.
|
|
50669
|
+
*/
|
|
50670
|
+
date: string;
|
|
50671
|
+
/**
|
|
50672
|
+
* The platform campaign id.
|
|
50673
|
+
*/
|
|
50674
|
+
campaignId?: string;
|
|
50675
|
+
/**
|
|
50676
|
+
* The `utm_campaign` value on the campaign's ads.
|
|
50677
|
+
*/
|
|
50678
|
+
utmCampaign?: string;
|
|
50679
|
+
/**
|
|
50680
|
+
* The campaign's name, matched case-insensitively.
|
|
50681
|
+
*/
|
|
50682
|
+
campaignName?: string;
|
|
50683
|
+
/**
|
|
50684
|
+
* Platform ad account id. Narrows matching to one ad account.
|
|
50685
|
+
*/
|
|
50686
|
+
adAccountId?: string;
|
|
50687
|
+
/**
|
|
50688
|
+
* Metric key (snake_case, up to 40 characters) to a non-negative number. 1 to 20 per row.
|
|
50689
|
+
*/
|
|
50690
|
+
values: {
|
|
50691
|
+
[key: string]: (number);
|
|
50692
|
+
};
|
|
50693
|
+
}>;
|
|
50694
|
+
};
|
|
50695
|
+
headers?: {
|
|
50696
|
+
/**
|
|
50697
|
+
* A retry with the same key and body replays the first response instead of uploading twice.
|
|
50698
|
+
*/
|
|
50699
|
+
'Idempotency-Key'?: string;
|
|
50700
|
+
};
|
|
50701
|
+
};
|
|
50702
|
+
|
|
50703
|
+
export type UploadCampaignResultsResponse = ({
|
|
50704
|
+
uploadId: string;
|
|
50705
|
+
rows: number;
|
|
50706
|
+
status: 'queued';
|
|
50707
|
+
});
|
|
50708
|
+
|
|
50709
|
+
export type UploadCampaignResultsError = (ErrorResponse | unknown);
|
|
50710
|
+
|
|
50711
|
+
export type ListCampaignResultsData = {
|
|
50712
|
+
query: {
|
|
50713
|
+
/**
|
|
50714
|
+
* Comma-separated platform campaign ids, at most 500. Omit for all campaigns.
|
|
50715
|
+
*/
|
|
50716
|
+
campaignIds?: string;
|
|
50717
|
+
/**
|
|
50718
|
+
* `nextCursor` from the previous page.
|
|
50719
|
+
*/
|
|
50720
|
+
cursor?: string;
|
|
50721
|
+
fromDate: string;
|
|
50722
|
+
/**
|
|
50723
|
+
* Campaigns per page.
|
|
50724
|
+
*/
|
|
50725
|
+
limit?: number;
|
|
50726
|
+
/**
|
|
50727
|
+
* Inclusive. At most 400 days after `fromDate`.
|
|
50728
|
+
*/
|
|
50729
|
+
toDate: string;
|
|
50730
|
+
};
|
|
50731
|
+
};
|
|
50732
|
+
|
|
50733
|
+
export type ListCampaignResultsResponse = ({
|
|
50734
|
+
fromDate: string;
|
|
50735
|
+
toDate: string;
|
|
50736
|
+
campaigns: Array<{
|
|
50737
|
+
platform: string;
|
|
50738
|
+
adAccountId: string;
|
|
50739
|
+
campaignId: string;
|
|
50740
|
+
values: {
|
|
50741
|
+
[key: string]: (number);
|
|
50742
|
+
};
|
|
50743
|
+
}>;
|
|
50744
|
+
nextCursor: (string) | null;
|
|
50745
|
+
});
|
|
50746
|
+
|
|
50747
|
+
export type ListCampaignResultsError = (ErrorResponse);
|
|
50748
|
+
|
|
50749
|
+
export type GetCampaignResultsUploadData = {
|
|
50750
|
+
path: {
|
|
50751
|
+
uploadId: string;
|
|
50752
|
+
};
|
|
50753
|
+
};
|
|
50754
|
+
|
|
50755
|
+
export type GetCampaignResultsUploadResponse = ({
|
|
50756
|
+
uploadId: string;
|
|
50757
|
+
status: 'queued' | 'done' | 'failed';
|
|
50758
|
+
source: 'api' | 'csv' | 'hubspot';
|
|
50759
|
+
rowsReceived: number;
|
|
50760
|
+
rowsMatched: number;
|
|
50761
|
+
rowsUnmatched: number;
|
|
50762
|
+
unmatched: Array<{
|
|
50763
|
+
/**
|
|
50764
|
+
* The row's position in the request.
|
|
50765
|
+
*/
|
|
50766
|
+
index?: number;
|
|
50767
|
+
/**
|
|
50768
|
+
* The campaign id, UTM or name the row gave.
|
|
50769
|
+
*/
|
|
50770
|
+
campaign?: string;
|
|
50771
|
+
reason?: 'no_campaign' | 'ambiguous';
|
|
50772
|
+
}>;
|
|
50773
|
+
createdAt: string;
|
|
50774
|
+
completedAt: (string) | null;
|
|
50775
|
+
});
|
|
50776
|
+
|
|
50777
|
+
export type GetCampaignResultsUploadError = (ErrorResponse | {
|
|
50778
|
+
error?: string;
|
|
50779
|
+
});
|
|
50780
|
+
|
|
50781
|
+
export type ListCampaignResultMetricsResponse = ({
|
|
50782
|
+
metrics: Array<CampaignResultMetric>;
|
|
50783
|
+
});
|
|
50784
|
+
|
|
50785
|
+
export type ListCampaignResultMetricsError = (ErrorResponse);
|
|
50786
|
+
|
|
50787
|
+
export type SetCampaignResultMetricData = {
|
|
50788
|
+
body: {
|
|
50789
|
+
label: string;
|
|
50790
|
+
kind: 'count' | 'money';
|
|
50791
|
+
/**
|
|
50792
|
+
* ISO 4217, money metrics only.
|
|
50793
|
+
*/
|
|
50794
|
+
currency?: (string) | null;
|
|
50795
|
+
};
|
|
50796
|
+
path: {
|
|
50797
|
+
key: string;
|
|
50798
|
+
};
|
|
50799
|
+
};
|
|
50800
|
+
|
|
50801
|
+
export type SetCampaignResultMetricResponse = ({
|
|
50802
|
+
metric: CampaignResultMetric;
|
|
50803
|
+
});
|
|
50804
|
+
|
|
50805
|
+
export type SetCampaignResultMetricError = (ErrorResponse);
|
|
50806
|
+
|
|
50611
50807
|
export type ListAdCampaignsData = {
|
|
50612
50808
|
query?: {
|
|
50613
50809
|
/**
|
|
@@ -68231,7 +68427,7 @@ export type ListCampaignSubmissionsData = {
|
|
|
68231
68427
|
/**
|
|
68232
68428
|
* What to sort by. Posts with no value to sort by (not read yet, not scored) come last in either direction.
|
|
68233
68429
|
*/
|
|
68234
|
-
sort?: 'submittedAt' | 'viewsEligible' | 'earnedCents' | 'authenticityScore';
|
|
68430
|
+
sort?: 'submittedAt' | 'viewsEligible' | 'engagementsLatest' | 'earnedCents' | 'authenticityScore';
|
|
68235
68431
|
status?: 'received' | 'tracking' | 'pending_review' | 'approved' | 'rejected' | 'expired' | 'withdrawn';
|
|
68236
68432
|
};
|
|
68237
68433
|
};
|