@zernio/node 0.2.1495 → 0.2.1497
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 +104 -38
- package/dist/index.d.ts +104 -38
- 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 +105 -39
|
@@ -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
|
};
|
|
@@ -20367,6 +20367,11 @@ export type WebhookPayloadMessage = {
|
|
|
20367
20367
|
* supported). `text` on those messages is the fixed
|
|
20368
20368
|
* `[Unsupported message]` placeholder.
|
|
20369
20369
|
*
|
|
20370
|
+
* Also present with code 131052 when Meta could not download
|
|
20371
|
+
* media the sender attached, except on numbers also using the
|
|
20372
|
+
* WhatsApp Business app. The file is not available, so the sender
|
|
20373
|
+
* has to send it again.
|
|
20374
|
+
*
|
|
20370
20375
|
*/
|
|
20371
20376
|
unsupported?: {
|
|
20372
20377
|
/**
|
|
@@ -24723,7 +24728,7 @@ export type GetBalanceError = ({
|
|
|
24723
24728
|
export type CreateTopupData = {
|
|
24724
24729
|
body: {
|
|
24725
24730
|
/**
|
|
24726
|
-
* 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.
|
|
24727
24732
|
*/
|
|
24728
24733
|
amountCents: number;
|
|
24729
24734
|
/**
|
|
@@ -24753,19 +24758,19 @@ export type CreateTopupData = {
|
|
|
24753
24758
|
export type CreateTopupResponse = ({
|
|
24754
24759
|
topupId: string;
|
|
24755
24760
|
/**
|
|
24756
|
-
*
|
|
24761
|
+
* Charged and credited to your balance once paid.
|
|
24757
24762
|
*/
|
|
24758
24763
|
amountCents: number;
|
|
24759
24764
|
/**
|
|
24760
|
-
*
|
|
24765
|
+
* Always 0: there is no card fee. Kept for older clients.
|
|
24761
24766
|
*/
|
|
24762
24767
|
feeCents: number;
|
|
24763
24768
|
/**
|
|
24764
|
-
* What the card is charged: amountCents
|
|
24769
|
+
* What the card is charged: amountCents. Kept for older clients.
|
|
24765
24770
|
*/
|
|
24766
24771
|
chargedCents: number;
|
|
24767
24772
|
/**
|
|
24768
|
-
*
|
|
24773
|
+
* Always true. Kept for older clients.
|
|
24769
24774
|
*/
|
|
24770
24775
|
feeIsExact: boolean;
|
|
24771
24776
|
status: 'succeeded' | 'processing' | 'requires_action';
|
|
@@ -24854,34 +24859,6 @@ export type ListTopupsError = (ErrorResponse | {
|
|
|
24854
24859
|
required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
|
|
24855
24860
|
});
|
|
24856
24861
|
|
|
24857
|
-
export type GetTopupCardFeeData = {
|
|
24858
|
-
query?: {
|
|
24859
|
-
/**
|
|
24860
|
-
* A saved card of the billing owner's (`pm_...`). Defaults to the default payment method.
|
|
24861
|
-
*/
|
|
24862
|
-
paymentMethodId?: string;
|
|
24863
|
-
};
|
|
24864
|
-
};
|
|
24865
|
-
|
|
24866
|
-
export type GetTopupCardFeeResponse = ({
|
|
24867
|
-
/**
|
|
24868
|
-
* Percentage of the charge, in basis points (315 is 3.15%).
|
|
24869
|
-
*/
|
|
24870
|
-
feeBps: number;
|
|
24871
|
-
/**
|
|
24872
|
-
* Fixed part of the fee, in cents.
|
|
24873
|
-
*/
|
|
24874
|
-
fixedCents: number;
|
|
24875
|
-
/**
|
|
24876
|
-
* True when this is exactly Stripe's rate for the card.
|
|
24877
|
-
*/
|
|
24878
|
-
feeIsExact: boolean;
|
|
24879
|
-
});
|
|
24880
|
-
|
|
24881
|
-
export type GetTopupCardFeeError = (ErrorResponse | {
|
|
24882
|
-
error?: string;
|
|
24883
|
-
});
|
|
24884
|
-
|
|
24885
24862
|
export type GetTopupReceiptData = {
|
|
24886
24863
|
path: {
|
|
24887
24864
|
topupId: string;
|
|
@@ -24979,6 +24956,95 @@ export type GetTopupReceiptError = (ErrorResponse | {
|
|
|
24979
24956
|
error?: string;
|
|
24980
24957
|
});
|
|
24981
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
|
+
|
|
24982
25048
|
export type ConfirmTopupData = {
|
|
24983
25049
|
path: {
|
|
24984
25050
|
topupId: string;
|