@getlatedev/node 0.2.1427 → 0.2.1430
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 +3 -0
- package/dist/index.d.mts +142 -7
- package/dist/index.d.ts +142 -7
- package/dist/index.js +22 -1
- package/dist/index.mjs +22 -1
- package/package.json +1 -1
- package/src/client.ts +6 -0
- package/src/generated/sdk.gen.ts +68 -3
- package/src/generated/types.gen.ts +147 -6
|
@@ -6596,6 +6596,10 @@ export type CreatorPortalCampaign = {
|
|
|
6596
6596
|
contentRules: (string) | null;
|
|
6597
6597
|
startsAt: (string) | null;
|
|
6598
6598
|
endsAt: (string) | null;
|
|
6599
|
+
/**
|
|
6600
|
+
* Posts published before this moment do not count: `startsAt`, else when the campaign went live.
|
|
6601
|
+
*/
|
|
6602
|
+
startedAt: string;
|
|
6599
6603
|
currency: string;
|
|
6600
6604
|
economics: CreatorPortalEconomics;
|
|
6601
6605
|
/**
|
|
@@ -6610,6 +6614,10 @@ export type CreatorPortalCampaign = {
|
|
|
6610
6614
|
* Days each submitted post is tracked for views.
|
|
6611
6615
|
*/
|
|
6612
6616
|
trackingDays: number;
|
|
6617
|
+
/**
|
|
6618
|
+
* How many connected accounts can submit posts. Null means no limit.
|
|
6619
|
+
*/
|
|
6620
|
+
maxAccountsPerParticipant: (number) | null;
|
|
6613
6621
|
};
|
|
6614
6622
|
|
|
6615
6623
|
/**
|
|
@@ -6667,10 +6675,18 @@ export type CreatorPortalParticipant = {
|
|
|
6667
6675
|
* Verified accounts on the campaign's platforms.
|
|
6668
6676
|
*/
|
|
6669
6677
|
accounts: Array<{
|
|
6678
|
+
/**
|
|
6679
|
+
* Pass to `DELETE /public/creator-campaigns/{token}/accounts/{accountId}` to remove the account.
|
|
6680
|
+
*/
|
|
6681
|
+
id: string;
|
|
6670
6682
|
platform: string;
|
|
6671
6683
|
username: string;
|
|
6672
6684
|
displayName: (string) | null;
|
|
6673
6685
|
avatarUrl: (string) | null;
|
|
6686
|
+
/**
|
|
6687
|
+
* False for an account connected past `maxAccountsPerParticipant`: posts from it are refused until another account is removed.
|
|
6688
|
+
*/
|
|
6689
|
+
counts: boolean;
|
|
6674
6690
|
}>;
|
|
6675
6691
|
/**
|
|
6676
6692
|
* The latest 100 submissions.
|
|
@@ -6719,11 +6735,15 @@ export type CreatorPortalPayoutEntry = {
|
|
|
6719
6735
|
|
|
6720
6736
|
export type CreatorPortalPayoutSetup = {
|
|
6721
6737
|
/**
|
|
6722
|
-
* How the campaign pays: treasury means through Zernio, so the creator onboards for payouts.
|
|
6738
|
+
* How the campaign pays: treasury means through Zernio, so the creator onboards for payouts, which they can do from the moment they join. Earnings wait until it is done.
|
|
6723
6739
|
*/
|
|
6724
6740
|
mode: 'none' | 'external' | 'treasury';
|
|
6725
6741
|
status: 'not_started' | 'pending' | 'enabled' | 'not_applicable';
|
|
6726
6742
|
country: (string) | null;
|
|
6743
|
+
/**
|
|
6744
|
+
* The country the request came from, to preselect before payout setup starts. Null once the payout account has a country, and outside treasury mode.
|
|
6745
|
+
*/
|
|
6746
|
+
suggestedCountry: (string) | null;
|
|
6727
6747
|
/**
|
|
6728
6748
|
* Treasury payouts sent to the creator.
|
|
6729
6749
|
*/
|
|
@@ -6735,7 +6755,7 @@ export type CreatorPortalPayoutSetup = {
|
|
|
6735
6755
|
};
|
|
6736
6756
|
|
|
6737
6757
|
/**
|
|
6738
|
-
* How the campaign pays: treasury means through Zernio, so the creator onboards for payouts.
|
|
6758
|
+
* How the campaign pays: treasury means through Zernio, so the creator onboards for payouts, which they can do from the moment they join. Earnings wait until it is done.
|
|
6739
6759
|
*/
|
|
6740
6760
|
export type mode2 = 'none' | 'external' | 'treasury';
|
|
6741
6761
|
|
|
@@ -15797,15 +15817,23 @@ export type TreasuryTopup = {
|
|
|
15797
15817
|
*/
|
|
15798
15818
|
feeCoveredByZernio?: boolean;
|
|
15799
15819
|
/**
|
|
15800
|
-
*
|
|
15820
|
+
* The amount you asked for. A top-up charges the card fee on top of it and credits what Stripe delivers, at least this amount. Older top-ups charged this amount and credited it minus the fee.
|
|
15801
15821
|
*/
|
|
15802
15822
|
amountCents?: number;
|
|
15803
15823
|
/**
|
|
15804
|
-
*
|
|
15824
|
+
* Card fee. Once paid, the fee Stripe took (chargedCents minus netCents). Before, the fee charged on top, or null on an older top-up. 0 when Zernio covers it (`payout_batch`).
|
|
15825
|
+
*/
|
|
15826
|
+
feeCents?: (number) | null;
|
|
15827
|
+
/**
|
|
15828
|
+
* What your card was charged: amountCents plus the card fee charged on top, or amountCents on an older top-up and on a `payout_batch` payment.
|
|
15829
|
+
*/
|
|
15830
|
+
chargedCents?: number;
|
|
15831
|
+
/**
|
|
15832
|
+
* feeCents once the top-up is paid; null before. Kept for older clients: read feeCents.
|
|
15805
15833
|
*/
|
|
15806
15834
|
stripeFeeCents?: (number) | null;
|
|
15807
15835
|
/**
|
|
15808
|
-
* Amount credited to your balance
|
|
15836
|
+
* Amount credited to your balance, what Stripe delivered; null until paid. At least amountCents on a top-up that charged the fee on top, and amountCents on `payout_batch` payments.
|
|
15809
15837
|
*/
|
|
15810
15838
|
netCents?: (number) | null;
|
|
15811
15839
|
/**
|
|
@@ -23611,7 +23639,7 @@ export type GetBalanceError = ({
|
|
|
23611
23639
|
export type CreateTopupData = {
|
|
23612
23640
|
body: {
|
|
23613
23641
|
/**
|
|
23614
|
-
* Amount in cents,
|
|
23642
|
+
* Amount to credit to your balance, in cents: $10 to $100,000. The card fee is charged on top.
|
|
23615
23643
|
*/
|
|
23616
23644
|
amountCents: number;
|
|
23617
23645
|
/**
|
|
@@ -23640,6 +23668,22 @@ export type CreateTopupData = {
|
|
|
23640
23668
|
|
|
23641
23669
|
export type CreateTopupResponse = ({
|
|
23642
23670
|
topupId: string;
|
|
23671
|
+
/**
|
|
23672
|
+
* Credited to your balance once paid: exactly this when feeIsExact, else at least this.
|
|
23673
|
+
*/
|
|
23674
|
+
amountCents: number;
|
|
23675
|
+
/**
|
|
23676
|
+
* Card fee, charged on top of amountCents.
|
|
23677
|
+
*/
|
|
23678
|
+
feeCents: number;
|
|
23679
|
+
/**
|
|
23680
|
+
* What the card is charged: amountCents plus feeCents.
|
|
23681
|
+
*/
|
|
23682
|
+
chargedCents: number;
|
|
23683
|
+
/**
|
|
23684
|
+
* True when feeCents is exactly Stripe's fee for this card. False when it is the region's highest rate, so Stripe may take less and the difference is added to your balance.
|
|
23685
|
+
*/
|
|
23686
|
+
feeIsExact: boolean;
|
|
23643
23687
|
status: 'succeeded' | 'processing' | 'requires_action';
|
|
23644
23688
|
/**
|
|
23645
23689
|
* PaymentIntent client secret for Stripe.js handleNextAction; set only when status is requires_action
|
|
@@ -23726,6 +23770,34 @@ export type ListTopupsError = (ErrorResponse | {
|
|
|
23726
23770
|
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
|
|
23727
23771
|
});
|
|
23728
23772
|
|
|
23773
|
+
export type GetTopupCardFeeData = {
|
|
23774
|
+
query?: {
|
|
23775
|
+
/**
|
|
23776
|
+
* A saved card of the billing owner's (`pm_...`). Defaults to the default payment method.
|
|
23777
|
+
*/
|
|
23778
|
+
paymentMethodId?: string;
|
|
23779
|
+
};
|
|
23780
|
+
};
|
|
23781
|
+
|
|
23782
|
+
export type GetTopupCardFeeResponse = ({
|
|
23783
|
+
/**
|
|
23784
|
+
* Percentage of the charge, in basis points (315 is 3.15%).
|
|
23785
|
+
*/
|
|
23786
|
+
feeBps: number;
|
|
23787
|
+
/**
|
|
23788
|
+
* Fixed part of the fee, in cents.
|
|
23789
|
+
*/
|
|
23790
|
+
fixedCents: number;
|
|
23791
|
+
/**
|
|
23792
|
+
* True when this is exactly Stripe's rate for the card.
|
|
23793
|
+
*/
|
|
23794
|
+
feeIsExact: boolean;
|
|
23795
|
+
});
|
|
23796
|
+
|
|
23797
|
+
export type GetTopupCardFeeError = (ErrorResponse | {
|
|
23798
|
+
error?: string;
|
|
23799
|
+
});
|
|
23800
|
+
|
|
23729
23801
|
export type GetTopupReceiptData = {
|
|
23730
23802
|
path: {
|
|
23731
23803
|
topupId: string;
|
|
@@ -23735,6 +23807,18 @@ export type GetTopupReceiptData = {
|
|
|
23735
23807
|
export type GetTopupReceiptResponse = ({
|
|
23736
23808
|
url: string;
|
|
23737
23809
|
format: 'pdf' | 'page';
|
|
23810
|
+
/**
|
|
23811
|
+
* As in the top-up list.
|
|
23812
|
+
*/
|
|
23813
|
+
amountCents: number;
|
|
23814
|
+
/**
|
|
23815
|
+
* Card fee paid, as in the top-up list.
|
|
23816
|
+
*/
|
|
23817
|
+
feeCents: (number) | null;
|
|
23818
|
+
/**
|
|
23819
|
+
* What the card was charged, the total on the receipt.
|
|
23820
|
+
*/
|
|
23821
|
+
chargedCents: number;
|
|
23738
23822
|
});
|
|
23739
23823
|
|
|
23740
23824
|
export type GetTopupReceiptError = (ErrorResponse | {
|
|
@@ -24416,6 +24500,28 @@ export type SubmitCreatorPostResponse = ({
|
|
|
24416
24500
|
|
|
24417
24501
|
export type SubmitCreatorPostError = (ErrorResponse);
|
|
24418
24502
|
|
|
24503
|
+
export type RemoveCreatorAccountData = {
|
|
24504
|
+
path: {
|
|
24505
|
+
/**
|
|
24506
|
+
* The `id` of one of the participant's `accounts`.
|
|
24507
|
+
*/
|
|
24508
|
+
accountId: string;
|
|
24509
|
+
/**
|
|
24510
|
+
* A participant token or an open invite token. A malformed token answers 404 like an unknown one.
|
|
24511
|
+
*/
|
|
24512
|
+
token: string;
|
|
24513
|
+
};
|
|
24514
|
+
};
|
|
24515
|
+
|
|
24516
|
+
export type RemoveCreatorAccountResponse = ({
|
|
24517
|
+
/**
|
|
24518
|
+
* Always true.
|
|
24519
|
+
*/
|
|
24520
|
+
removed: boolean;
|
|
24521
|
+
});
|
|
24522
|
+
|
|
24523
|
+
export type RemoveCreatorAccountError = (ErrorResponse);
|
|
24524
|
+
|
|
24419
24525
|
export type GetCreatorPayoutsData = {
|
|
24420
24526
|
path: {
|
|
24421
24527
|
/**
|
|
@@ -68322,6 +68428,41 @@ export type RemoveCampaignParticipantResponse = ({
|
|
|
68322
68428
|
|
|
68323
68429
|
export type RemoveCampaignParticipantError = (ErrorResponse);
|
|
68324
68430
|
|
|
68431
|
+
export type MoveCampaignParticipantData = {
|
|
68432
|
+
body: {
|
|
68433
|
+
/**
|
|
68434
|
+
* Campaign to move the participant to. Same owner, not closed.
|
|
68435
|
+
*/
|
|
68436
|
+
targetCampaignId: string;
|
|
68437
|
+
};
|
|
68438
|
+
path: {
|
|
68439
|
+
/**
|
|
68440
|
+
* Campaign the participant is in now.
|
|
68441
|
+
*/
|
|
68442
|
+
campaignId: string;
|
|
68443
|
+
/**
|
|
68444
|
+
* Participant ID.
|
|
68445
|
+
*/
|
|
68446
|
+
participantId: string;
|
|
68447
|
+
};
|
|
68448
|
+
};
|
|
68449
|
+
|
|
68450
|
+
export type MoveCampaignParticipantResponse = ({
|
|
68451
|
+
participant: CampaignParticipant;
|
|
68452
|
+
submissions: {
|
|
68453
|
+
/**
|
|
68454
|
+
* Posts that moved to the target.
|
|
68455
|
+
*/
|
|
68456
|
+
moved: number;
|
|
68457
|
+
/**
|
|
68458
|
+
* Undecided posts rejected in this campaign because they did not fit the target.
|
|
68459
|
+
*/
|
|
68460
|
+
rejected: number;
|
|
68461
|
+
};
|
|
68462
|
+
});
|
|
68463
|
+
|
|
68464
|
+
export type MoveCampaignParticipantError = (ErrorResponse);
|
|
68465
|
+
|
|
68325
68466
|
export type ResendCampaignParticipantInviteData = {
|
|
68326
68467
|
headers?: {
|
|
68327
68468
|
/**
|