@zernio/node 0.2.1496 → 0.2.1498
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 +1 -1
- package/dist/index.d.mts +100 -39
- package/dist/index.d.ts +100 -39
- package/dist/index.js +6 -6
- package/dist/index.mjs +6 -6
- package/package.json +1 -1
- package/src/client.ts +2 -2
- package/src/generated/sdk.gen.ts +20 -25
- package/src/generated/types.gen.ts +101 -40
|
@@ -16312,19 +16312,19 @@ export type TreasuryTopup = {
|
|
|
16312
16312
|
campaignId?: (string) | null;
|
|
16313
16313
|
} | null;
|
|
16314
16314
|
/**
|
|
16315
|
-
* True for a `payout_batch` payment: Zernio pays the Stripe processing fee
|
|
16315
|
+
* True for a balance top-up (there is no card fee) and a `payout_batch` payment: Zernio pays the Stripe processing fee, so you are credited the whole charge. False on a top-up made before 2026-11-05.
|
|
16316
16316
|
*/
|
|
16317
16317
|
feeCoveredByZernio?: boolean;
|
|
16318
16318
|
/**
|
|
16319
|
-
* The amount you asked for. A top-up charges
|
|
16319
|
+
* The amount you asked for. A top-up charges exactly this and credits it whole. Top-ups from 2026-11-02 to 2026-11-05 charged a card fee on top and credited what Stripe delivered; older ones charged this amount and credited it minus the fee.
|
|
16320
16320
|
*/
|
|
16321
16321
|
amountCents?: number;
|
|
16322
16322
|
/**
|
|
16323
|
-
* Card fee.
|
|
16323
|
+
* Card fee you paid: 0 when Zernio covers it (feeCoveredByZernio). On an older top-up, the fee Stripe took once paid, the fee charged on top before, or null.
|
|
16324
16324
|
*/
|
|
16325
16325
|
feeCents?: (number) | null;
|
|
16326
16326
|
/**
|
|
16327
|
-
* What your card was charged: amountCents plus the card fee
|
|
16327
|
+
* What your card was charged: amountCents, or amountCents plus the card fee on a top-up from 2026-11-02 to 2026-11-05.
|
|
16328
16328
|
*/
|
|
16329
16329
|
chargedCents?: number;
|
|
16330
16330
|
/**
|
|
@@ -16332,7 +16332,7 @@ export type TreasuryTopup = {
|
|
|
16332
16332
|
*/
|
|
16333
16333
|
stripeFeeCents?: (number) | null;
|
|
16334
16334
|
/**
|
|
16335
|
-
* Amount credited to your balance
|
|
16335
|
+
* Amount credited to your balance; null until paid. amountCents when feeCoveredByZernio; on an older top-up, what Stripe delivered.
|
|
16336
16336
|
*/
|
|
16337
16337
|
netCents?: (number) | null;
|
|
16338
16338
|
/**
|
|
@@ -16342,7 +16342,7 @@ export type TreasuryTopup = {
|
|
|
16342
16342
|
createdAt?: string;
|
|
16343
16343
|
succeededAt?: (string) | null;
|
|
16344
16344
|
/**
|
|
16345
|
-
* A
|
|
16345
|
+
* A Checkout invoice exists for this payment (Checkout payments before 2026-10-29). Every paid payment has a card receipt (getTopupReceipt); a paid top-up has a statement (getTopupStatement).
|
|
16346
16346
|
*/
|
|
16347
16347
|
hasInvoice?: boolean;
|
|
16348
16348
|
};
|
|
@@ -24728,7 +24728,7 @@ export type GetBalanceError = ({
|
|
|
24728
24728
|
export type CreateTopupData = {
|
|
24729
24729
|
body: {
|
|
24730
24730
|
/**
|
|
24731
|
-
* Amount to credit to your balance, in cents: $
|
|
24731
|
+
* Amount to charge and credit to your balance, in cents: $5 to $100,000. No card fee.
|
|
24732
24732
|
*/
|
|
24733
24733
|
amountCents: number;
|
|
24734
24734
|
/**
|
|
@@ -24758,19 +24758,19 @@ export type CreateTopupData = {
|
|
|
24758
24758
|
export type CreateTopupResponse = ({
|
|
24759
24759
|
topupId: string;
|
|
24760
24760
|
/**
|
|
24761
|
-
*
|
|
24761
|
+
* Charged and credited to your balance once paid.
|
|
24762
24762
|
*/
|
|
24763
24763
|
amountCents: number;
|
|
24764
24764
|
/**
|
|
24765
|
-
*
|
|
24765
|
+
* Always 0: there is no card fee. Kept for older clients.
|
|
24766
24766
|
*/
|
|
24767
24767
|
feeCents: number;
|
|
24768
24768
|
/**
|
|
24769
|
-
* What the card is charged: amountCents
|
|
24769
|
+
* What the card is charged: amountCents. Kept for older clients.
|
|
24770
24770
|
*/
|
|
24771
24771
|
chargedCents: number;
|
|
24772
24772
|
/**
|
|
24773
|
-
*
|
|
24773
|
+
* Always true. Kept for older clients.
|
|
24774
24774
|
*/
|
|
24775
24775
|
feeIsExact: boolean;
|
|
24776
24776
|
status: 'succeeded' | 'processing' | 'requires_action';
|
|
@@ -24859,34 +24859,6 @@ export type ListTopupsError = (ErrorResponse | {
|
|
|
24859
24859
|
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
|
|
24860
24860
|
});
|
|
24861
24861
|
|
|
24862
|
-
export type GetTopupCardFeeData = {
|
|
24863
|
-
query?: {
|
|
24864
|
-
/**
|
|
24865
|
-
* A saved card of the billing owner's (`pm_...`). Defaults to the default payment method.
|
|
24866
|
-
*/
|
|
24867
|
-
paymentMethodId?: string;
|
|
24868
|
-
};
|
|
24869
|
-
};
|
|
24870
|
-
|
|
24871
|
-
export type GetTopupCardFeeResponse = ({
|
|
24872
|
-
/**
|
|
24873
|
-
* Percentage of the charge, in basis points (315 is 3.15%).
|
|
24874
|
-
*/
|
|
24875
|
-
feeBps: number;
|
|
24876
|
-
/**
|
|
24877
|
-
* Fixed part of the fee, in cents.
|
|
24878
|
-
*/
|
|
24879
|
-
fixedCents: number;
|
|
24880
|
-
/**
|
|
24881
|
-
* True when this is exactly Stripe's rate for the card.
|
|
24882
|
-
*/
|
|
24883
|
-
feeIsExact: boolean;
|
|
24884
|
-
});
|
|
24885
|
-
|
|
24886
|
-
export type GetTopupCardFeeError = (ErrorResponse | {
|
|
24887
|
-
error?: string;
|
|
24888
|
-
});
|
|
24889
|
-
|
|
24890
24862
|
export type GetTopupReceiptData = {
|
|
24891
24863
|
path: {
|
|
24892
24864
|
topupId: string;
|
|
@@ -24984,6 +24956,95 @@ export type GetTopupReceiptError = (ErrorResponse | {
|
|
|
24984
24956
|
error?: string;
|
|
24985
24957
|
});
|
|
24986
24958
|
|
|
24959
|
+
export type GetTopupStatementData = {
|
|
24960
|
+
path: {
|
|
24961
|
+
topupId: string;
|
|
24962
|
+
};
|
|
24963
|
+
};
|
|
24964
|
+
|
|
24965
|
+
export type GetTopupStatementResponse = ({
|
|
24966
|
+
url: string;
|
|
24967
|
+
format: 'pdf' | 'page';
|
|
24968
|
+
/**
|
|
24969
|
+
* The statement PDF.
|
|
24970
|
+
*/
|
|
24971
|
+
pdfUrl: (string) | null;
|
|
24972
|
+
/**
|
|
24973
|
+
* The statement's Stripe-hosted page.
|
|
24974
|
+
*/
|
|
24975
|
+
pageUrl: (string) | null;
|
|
24976
|
+
/**
|
|
24977
|
+
* Amount added to your balance, as in the top-up list.
|
|
24978
|
+
*/
|
|
24979
|
+
amountCents: number;
|
|
24980
|
+
});
|
|
24981
|
+
|
|
24982
|
+
export type GetTopupStatementError = (ErrorResponse | {
|
|
24983
|
+
/**
|
|
24984
|
+
* Human-readable error message suitable for end-user display.
|
|
24985
|
+
*/
|
|
24986
|
+
error: string;
|
|
24987
|
+
/**
|
|
24988
|
+
* Machine-readable error code. Stable across versions.
|
|
24989
|
+
*/
|
|
24990
|
+
code: 'PAYMENT_REQUIRED';
|
|
24991
|
+
/**
|
|
24992
|
+
* Discriminator for which gate fired.
|
|
24993
|
+
*/
|
|
24994
|
+
reason: 'free_tier_exceeded' | 'twitter_passthrough' | 'enterprise_required' | 'card_verification_required';
|
|
24995
|
+
/**
|
|
24996
|
+
* Link to the relevant documentation page.
|
|
24997
|
+
*/
|
|
24998
|
+
documentation_url?: string;
|
|
24999
|
+
/**
|
|
25000
|
+
* Deep-link to send the end-user to. For
|
|
25001
|
+
* `free_tier_exceeded` and `twitter_passthrough` this opens
|
|
25002
|
+
* the add-payment-method drawer on the Zernio billing page.
|
|
25003
|
+
* For `enterprise_required` this is the Zernio enterprise
|
|
25004
|
+
* contact page.
|
|
25005
|
+
*
|
|
25006
|
+
*/
|
|
25007
|
+
dashboard_url?: string;
|
|
25008
|
+
/**
|
|
25009
|
+
* Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
|
|
25010
|
+
*/
|
|
25011
|
+
details?: {
|
|
25012
|
+
/**
|
|
25013
|
+
* How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
|
|
25014
|
+
*/
|
|
25015
|
+
free_tier_account_limit?: number;
|
|
25016
|
+
/**
|
|
25017
|
+
* How many accounts the team currently has connected. Set when reason=free_tier_exceeded or reason=enterprise_required.
|
|
25018
|
+
*/
|
|
25019
|
+
current_account_count?: number;
|
|
25020
|
+
/**
|
|
25021
|
+
* Whether the team currently has a card on file in Stripe. Set when reason=free_tier_exceeded or reason=twitter_passthrough.
|
|
25022
|
+
*/
|
|
25023
|
+
has_payment_method?: boolean;
|
|
25024
|
+
/**
|
|
25025
|
+
* One-time card verification charge in USD cents, credited to usage. Only set when reason=card_verification_required.
|
|
25026
|
+
*/
|
|
25027
|
+
verification_amount_cents?: number;
|
|
25028
|
+
/**
|
|
25029
|
+
* The negotiated connected-account cap from the
|
|
25030
|
+
* team's enterprise contract. Self-service teams
|
|
25031
|
+
* have no cap and never receive this reason. Only
|
|
25032
|
+
* set when reason=enterprise_required.
|
|
25033
|
+
*
|
|
25034
|
+
*/
|
|
25035
|
+
effective_account_limit?: number;
|
|
25036
|
+
};
|
|
25037
|
+
} | {
|
|
25038
|
+
error?: string;
|
|
25039
|
+
code?: 'insufficient_permissions' | 'unclassified_resource';
|
|
25040
|
+
/**
|
|
25041
|
+
* The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
25042
|
+
*/
|
|
25043
|
+
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
|
|
25044
|
+
} | {
|
|
25045
|
+
error?: string;
|
|
25046
|
+
});
|
|
25047
|
+
|
|
24987
25048
|
export type ConfirmTopupData = {
|
|
24988
25049
|
path: {
|
|
24989
25050
|
topupId: string;
|
|
@@ -36780,7 +36841,7 @@ export type ListLogsData = {
|
|
|
36780
36841
|
*/
|
|
36781
36842
|
accountId?: string;
|
|
36782
36843
|
/**
|
|
36783
|
-
* Filter by action (e.g., post.published, message.sent, account.connected, webhook.delivered)
|
|
36844
|
+
* Filter by action (e.g., post.published, message.sent, message.media_download_failed, account.connected, webhook.delivered)
|
|
36784
36845
|
*/
|
|
36785
36846
|
action?: string;
|
|
36786
36847
|
/**
|