@getlatedev/node 0.2.1412 → 0.2.1414
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 +192 -10
- package/dist/index.d.ts +192 -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 +197 -9
|
@@ -4423,6 +4423,10 @@ export type CampaignReport = {
|
|
|
4423
4423
|
* Latest view counts.
|
|
4424
4424
|
*/
|
|
4425
4425
|
total: number;
|
|
4426
|
+
/**
|
|
4427
|
+
* Views from ads, on YouTube and X posts.
|
|
4428
|
+
*/
|
|
4429
|
+
paid: number;
|
|
4426
4430
|
};
|
|
4427
4431
|
/**
|
|
4428
4432
|
* The campaign engagement types summed over the same submissions.
|
|
@@ -4455,6 +4459,15 @@ export type CampaignReport = {
|
|
|
4455
4459
|
}>;
|
|
4456
4460
|
};
|
|
4457
4461
|
|
|
4462
|
+
export type CampaignResultMetric = {
|
|
4463
|
+
key: string;
|
|
4464
|
+
label: string;
|
|
4465
|
+
kind: 'count' | 'money';
|
|
4466
|
+
currency: (string) | null;
|
|
4467
|
+
};
|
|
4468
|
+
|
|
4469
|
+
export type kind4 = 'count' | 'money';
|
|
4470
|
+
|
|
4458
4471
|
export type CampaignSettlement = {
|
|
4459
4472
|
/**
|
|
4460
4473
|
* The ledger settlement entry.
|
|
@@ -4529,6 +4542,14 @@ export type CampaignSubmission = {
|
|
|
4529
4542
|
* 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.
|
|
4530
4543
|
*/
|
|
4531
4544
|
engagementsLatest: (number) | null;
|
|
4545
|
+
/**
|
|
4546
|
+
* Views from ads the creator ran: YouTube views from the advertising traffic source, X impressions beyond the organic ones. Null on other platforms and before the first read. On an organic-only campaign `viewsEligible` is the latest views minus these.
|
|
4547
|
+
*/
|
|
4548
|
+
viewsPaid: (number) | null;
|
|
4549
|
+
/**
|
|
4550
|
+
* When `viewsPaid` was last read. YouTube refreshes every 6 hours and reports ad views up to 2 days late; X about once a day while the post is under 30 days old.
|
|
4551
|
+
*/
|
|
4552
|
+
paidViewsReadAt: (string) | null;
|
|
4532
4553
|
lastAccruedViews: number;
|
|
4533
4554
|
accruedCents: number;
|
|
4534
4555
|
approvedCents: number;
|
|
@@ -4618,12 +4639,12 @@ export type CampaignSubmissionDetail = CampaignSubmission & {
|
|
|
4618
4639
|
};
|
|
4619
4640
|
|
|
4620
4641
|
export type CampaignSubmissionFlag = {
|
|
4621
|
-
code: 'duplicate_media' | 'duplicate_post' | 'view_spike' | 'linked_accounts' | 'cross_operator' | 'unreachable' | 'post_deleted' | 'account_restricted' | 'low_authenticity' | 'x_read_cap';
|
|
4642
|
+
code: 'duplicate_media' | 'duplicate_post' | 'view_spike' | 'linked_accounts' | 'cross_operator' | 'unreachable' | 'post_deleted' | 'account_restricted' | 'low_authenticity' | 'x_read_cap' | 'paid_views' | 'organic_unverified';
|
|
4622
4643
|
detail: string;
|
|
4623
4644
|
raisedAt: string;
|
|
4624
4645
|
};
|
|
4625
4646
|
|
|
4626
|
-
export type code = 'duplicate_media' | 'duplicate_post' | 'view_spike' | 'linked_accounts' | 'cross_operator' | 'unreachable' | 'post_deleted' | 'account_restricted' | 'low_authenticity' | 'x_read_cap';
|
|
4647
|
+
export type code = 'duplicate_media' | 'duplicate_post' | 'view_spike' | 'linked_accounts' | 'cross_operator' | 'unreachable' | 'post_deleted' | 'account_restricted' | 'low_authenticity' | 'x_read_cap' | 'paid_views' | 'organic_unverified';
|
|
4627
4648
|
|
|
4628
4649
|
/**
|
|
4629
4650
|
* Actions taken on the matched comment itself (comment trigger only; ignored on the
|
|
@@ -6496,6 +6517,10 @@ export type CreatorCampaignEconomicsCpm = {
|
|
|
6496
6517
|
* 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.
|
|
6497
6518
|
*/
|
|
6498
6519
|
engagementTypes?: Array<('likes' | 'comments' | 'shares' | 'saves')>;
|
|
6520
|
+
/**
|
|
6521
|
+
* Count only organic views: views from ads the creator ran do not earn. Every campaign platform must be YouTube or X, which report ad views per post, or the request answers 400. A post earns nothing until its ad views were first read.
|
|
6522
|
+
*/
|
|
6523
|
+
organicViewsOnly?: boolean;
|
|
6499
6524
|
ratePer1kCents: number;
|
|
6500
6525
|
/**
|
|
6501
6526
|
* The count a post must reach before it earns, in the campaign metric (views or engagements).
|
|
@@ -6521,6 +6546,10 @@ export type CreatorCampaignEconomicsPool = {
|
|
|
6521
6546
|
type: 'pool';
|
|
6522
6547
|
budgetCents: number;
|
|
6523
6548
|
minViewsToQualify: number;
|
|
6549
|
+
/**
|
|
6550
|
+
* Count only organic views: views from ads the creator ran do not earn. Every campaign platform must be YouTube or X, which report ad views per post, or the request answers 400. A post earns nothing until its ad views were first read.
|
|
6551
|
+
*/
|
|
6552
|
+
organicViewsOnly?: boolean;
|
|
6524
6553
|
};
|
|
6525
6554
|
|
|
6526
6555
|
/**
|
|
@@ -6574,6 +6603,10 @@ export type CreatorPortalEconomics = {
|
|
|
6574
6603
|
* The engagements that count. Missing means all four.
|
|
6575
6604
|
*/
|
|
6576
6605
|
engagementTypes?: Array<('likes' | 'comments' | 'shares' | 'saves')>;
|
|
6606
|
+
/**
|
|
6607
|
+
* Only organic views count; views from ads do not.
|
|
6608
|
+
*/
|
|
6609
|
+
organicViewsOnly?: boolean;
|
|
6577
6610
|
ratePer1kCents: number;
|
|
6578
6611
|
minViewsToEarn: number;
|
|
6579
6612
|
maxPayoutPerClipCents?: number;
|
|
@@ -6585,6 +6618,10 @@ export type CreatorPortalEconomics = {
|
|
|
6585
6618
|
type: 'pool';
|
|
6586
6619
|
poolCents: number;
|
|
6587
6620
|
minViewsToQualify: number;
|
|
6621
|
+
/**
|
|
6622
|
+
* Only organic views count; views from ads do not.
|
|
6623
|
+
*/
|
|
6624
|
+
organicViewsOnly?: boolean;
|
|
6588
6625
|
};
|
|
6589
6626
|
|
|
6590
6627
|
export type type10 = 'cpm';
|
|
@@ -6594,7 +6631,7 @@ export type CreatorPortalInvite = {
|
|
|
6594
6631
|
campaign: CreatorPortalCampaign;
|
|
6595
6632
|
};
|
|
6596
6633
|
|
|
6597
|
-
export type
|
|
6634
|
+
export type kind5 = 'invite';
|
|
6598
6635
|
|
|
6599
6636
|
export type CreatorPortalParticipant = {
|
|
6600
6637
|
kind: 'participant';
|
|
@@ -6640,7 +6677,7 @@ export type CreatorPortalParticipant = {
|
|
|
6640
6677
|
payouts: CreatorPortalPayoutSetup;
|
|
6641
6678
|
};
|
|
6642
6679
|
|
|
6643
|
-
export type
|
|
6680
|
+
export type kind6 = 'participant';
|
|
6644
6681
|
|
|
6645
6682
|
export type CreatorPortalPayoutEntry = {
|
|
6646
6683
|
id: string;
|
|
@@ -6698,6 +6735,10 @@ export type CreatorPortalSubmission = {
|
|
|
6698
6735
|
* The campaign engagement types summed at the latest read. Null until the post is read.
|
|
6699
6736
|
*/
|
|
6700
6737
|
engagements: (number) | null;
|
|
6738
|
+
/**
|
|
6739
|
+
* Views that came from ads the creator ran, on YouTube and X. Null where the platform does not report them or before the first read.
|
|
6740
|
+
*/
|
|
6741
|
+
viewsFromAds: (number) | null;
|
|
6701
6742
|
earnedCents: number;
|
|
6702
6743
|
rejectReason: (string) | null;
|
|
6703
6744
|
/**
|
|
@@ -8665,7 +8706,7 @@ export type FileItem = {
|
|
|
8665
8706
|
trashed: boolean;
|
|
8666
8707
|
};
|
|
8667
8708
|
|
|
8668
|
-
export type
|
|
8709
|
+
export type kind7 = 'file' | 'folder';
|
|
8669
8710
|
|
|
8670
8711
|
export type FilePickerSession = {
|
|
8671
8712
|
/**
|
|
@@ -10015,7 +10056,7 @@ export type ImessageSenderLifecycle = {
|
|
|
10015
10056
|
createdAt?: string;
|
|
10016
10057
|
};
|
|
10017
10058
|
|
|
10018
|
-
export type
|
|
10059
|
+
export type kind8 = 'phone' | 'email';
|
|
10019
10060
|
|
|
10020
10061
|
export type region = 'US' | 'GB';
|
|
10021
10062
|
|
|
@@ -10969,7 +11010,7 @@ export type InstagramVideoFallback = {
|
|
|
10969
11010
|
};
|
|
10970
11011
|
};
|
|
10971
11012
|
|
|
10972
|
-
export type
|
|
11013
|
+
export type kind9 = 'instagram_video_reuploaded' | 'instagram_video_rehosted_copy';
|
|
10973
11014
|
|
|
10974
11015
|
/**
|
|
10975
11016
|
* A Google Search keyword: a bare string (BROAD match), or an object naming the match type.
|
|
@@ -15477,7 +15518,7 @@ export type platform15 = 'metaads' | 'openaiads' | 'tiktokads' | 'googleads' | '
|
|
|
15477
15518
|
/**
|
|
15478
15519
|
* Platform-native flavor of the tag (Meta: `pixel`).
|
|
15479
15520
|
*/
|
|
15480
|
-
export type
|
|
15521
|
+
export type kind10 = 'pixel' | 'tag' | 'insight_tag';
|
|
15481
15522
|
|
|
15482
15523
|
/**
|
|
15483
15524
|
* One health check the platform runs on a tracking tag.
|
|
@@ -18084,6 +18125,10 @@ export type WebhookPayloadCampaignSubmission = {
|
|
|
18084
18125
|
* The campaign engagement types summed at the latest read. An engagements campaign earns on this count.
|
|
18085
18126
|
*/
|
|
18086
18127
|
engagementsLatest: (number) | null;
|
|
18128
|
+
/**
|
|
18129
|
+
* Views from ads, on YouTube and X. Null elsewhere or before the first read.
|
|
18130
|
+
*/
|
|
18131
|
+
viewsPaid: (number) | null;
|
|
18087
18132
|
flags: Array<{
|
|
18088
18133
|
code: string;
|
|
18089
18134
|
detail: string;
|
|
@@ -50652,6 +50697,149 @@ export type ListAdRuleRunsError = (ErrorResponse | {
|
|
|
50652
50697
|
error?: string;
|
|
50653
50698
|
});
|
|
50654
50699
|
|
|
50700
|
+
export type UploadCampaignResultsData = {
|
|
50701
|
+
body: {
|
|
50702
|
+
rows: Array<{
|
|
50703
|
+
/**
|
|
50704
|
+
* The day, at most 400 days ago.
|
|
50705
|
+
*/
|
|
50706
|
+
date: string;
|
|
50707
|
+
/**
|
|
50708
|
+
* The platform campaign id.
|
|
50709
|
+
*/
|
|
50710
|
+
campaignId?: string;
|
|
50711
|
+
/**
|
|
50712
|
+
* The `utm_campaign` value on the campaign's ads.
|
|
50713
|
+
*/
|
|
50714
|
+
utmCampaign?: string;
|
|
50715
|
+
/**
|
|
50716
|
+
* The campaign's name, matched case-insensitively.
|
|
50717
|
+
*/
|
|
50718
|
+
campaignName?: string;
|
|
50719
|
+
/**
|
|
50720
|
+
* Platform ad account id. Narrows matching to one ad account.
|
|
50721
|
+
*/
|
|
50722
|
+
adAccountId?: string;
|
|
50723
|
+
/**
|
|
50724
|
+
* Metric key (snake_case, up to 40 characters) to a non-negative number. 1 to 20 per row.
|
|
50725
|
+
*/
|
|
50726
|
+
values: {
|
|
50727
|
+
[key: string]: (number);
|
|
50728
|
+
};
|
|
50729
|
+
}>;
|
|
50730
|
+
};
|
|
50731
|
+
headers?: {
|
|
50732
|
+
/**
|
|
50733
|
+
* A retry with the same key and body replays the first response instead of uploading twice.
|
|
50734
|
+
*/
|
|
50735
|
+
'Idempotency-Key'?: string;
|
|
50736
|
+
};
|
|
50737
|
+
};
|
|
50738
|
+
|
|
50739
|
+
export type UploadCampaignResultsResponse = ({
|
|
50740
|
+
uploadId: string;
|
|
50741
|
+
rows: number;
|
|
50742
|
+
status: 'queued';
|
|
50743
|
+
});
|
|
50744
|
+
|
|
50745
|
+
export type UploadCampaignResultsError = (ErrorResponse | unknown);
|
|
50746
|
+
|
|
50747
|
+
export type ListCampaignResultsData = {
|
|
50748
|
+
query: {
|
|
50749
|
+
/**
|
|
50750
|
+
* Comma-separated platform campaign ids, at most 500. Omit for all campaigns.
|
|
50751
|
+
*/
|
|
50752
|
+
campaignIds?: string;
|
|
50753
|
+
/**
|
|
50754
|
+
* `nextCursor` from the previous page.
|
|
50755
|
+
*/
|
|
50756
|
+
cursor?: string;
|
|
50757
|
+
fromDate: string;
|
|
50758
|
+
/**
|
|
50759
|
+
* Campaigns per page.
|
|
50760
|
+
*/
|
|
50761
|
+
limit?: number;
|
|
50762
|
+
/**
|
|
50763
|
+
* Inclusive. At most 400 days after `fromDate`.
|
|
50764
|
+
*/
|
|
50765
|
+
toDate: string;
|
|
50766
|
+
};
|
|
50767
|
+
};
|
|
50768
|
+
|
|
50769
|
+
export type ListCampaignResultsResponse = ({
|
|
50770
|
+
fromDate: string;
|
|
50771
|
+
toDate: string;
|
|
50772
|
+
campaigns: Array<{
|
|
50773
|
+
platform: string;
|
|
50774
|
+
adAccountId: string;
|
|
50775
|
+
campaignId: string;
|
|
50776
|
+
values: {
|
|
50777
|
+
[key: string]: (number);
|
|
50778
|
+
};
|
|
50779
|
+
}>;
|
|
50780
|
+
nextCursor: (string) | null;
|
|
50781
|
+
});
|
|
50782
|
+
|
|
50783
|
+
export type ListCampaignResultsError = (ErrorResponse);
|
|
50784
|
+
|
|
50785
|
+
export type GetCampaignResultsUploadData = {
|
|
50786
|
+
path: {
|
|
50787
|
+
uploadId: string;
|
|
50788
|
+
};
|
|
50789
|
+
};
|
|
50790
|
+
|
|
50791
|
+
export type GetCampaignResultsUploadResponse = ({
|
|
50792
|
+
uploadId: string;
|
|
50793
|
+
status: 'queued' | 'done' | 'failed';
|
|
50794
|
+
source: 'api' | 'csv' | 'hubspot';
|
|
50795
|
+
rowsReceived: number;
|
|
50796
|
+
rowsMatched: number;
|
|
50797
|
+
rowsUnmatched: number;
|
|
50798
|
+
unmatched: Array<{
|
|
50799
|
+
/**
|
|
50800
|
+
* The row's position in the request.
|
|
50801
|
+
*/
|
|
50802
|
+
index?: number;
|
|
50803
|
+
/**
|
|
50804
|
+
* The campaign id, UTM or name the row gave.
|
|
50805
|
+
*/
|
|
50806
|
+
campaign?: string;
|
|
50807
|
+
reason?: 'no_campaign' | 'ambiguous';
|
|
50808
|
+
}>;
|
|
50809
|
+
createdAt: string;
|
|
50810
|
+
completedAt: (string) | null;
|
|
50811
|
+
});
|
|
50812
|
+
|
|
50813
|
+
export type GetCampaignResultsUploadError = (ErrorResponse | {
|
|
50814
|
+
error?: string;
|
|
50815
|
+
});
|
|
50816
|
+
|
|
50817
|
+
export type ListCampaignResultMetricsResponse = ({
|
|
50818
|
+
metrics: Array<CampaignResultMetric>;
|
|
50819
|
+
});
|
|
50820
|
+
|
|
50821
|
+
export type ListCampaignResultMetricsError = (ErrorResponse);
|
|
50822
|
+
|
|
50823
|
+
export type SetCampaignResultMetricData = {
|
|
50824
|
+
body: {
|
|
50825
|
+
label: string;
|
|
50826
|
+
kind: 'count' | 'money';
|
|
50827
|
+
/**
|
|
50828
|
+
* ISO 4217, money metrics only.
|
|
50829
|
+
*/
|
|
50830
|
+
currency?: (string) | null;
|
|
50831
|
+
};
|
|
50832
|
+
path: {
|
|
50833
|
+
key: string;
|
|
50834
|
+
};
|
|
50835
|
+
};
|
|
50836
|
+
|
|
50837
|
+
export type SetCampaignResultMetricResponse = ({
|
|
50838
|
+
metric: CampaignResultMetric;
|
|
50839
|
+
});
|
|
50840
|
+
|
|
50841
|
+
export type SetCampaignResultMetricError = (ErrorResponse);
|
|
50842
|
+
|
|
50655
50843
|
export type ListAdCampaignsData = {
|
|
50656
50844
|
query?: {
|
|
50657
50845
|
/**
|
|
@@ -68260,7 +68448,7 @@ export type ListCampaignSubmissionsData = {
|
|
|
68260
68448
|
campaignId: string;
|
|
68261
68449
|
};
|
|
68262
68450
|
query?: {
|
|
68263
|
-
flag?: 'duplicate_media' | 'duplicate_post' | 'view_spike' | 'linked_accounts' | 'cross_operator' | 'unreachable' | 'post_deleted' | 'account_restricted' | 'low_authenticity' | 'x_read_cap';
|
|
68451
|
+
flag?: 'duplicate_media' | 'duplicate_post' | 'view_spike' | 'linked_accounts' | 'cross_operator' | 'unreachable' | 'post_deleted' | 'account_restricted' | 'low_authenticity' | 'x_read_cap' | 'paid_views' | 'organic_unverified';
|
|
68264
68452
|
limit?: number;
|
|
68265
68453
|
maxScore?: number;
|
|
68266
68454
|
minScore?: number;
|