@zernio/node 0.2.1503 → 0.2.1505

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.
@@ -3420,6 +3420,50 @@ export type scope = 'full' | 'profiles';
3420
3420
  */
3421
3421
  export type permission = 'read-write' | 'read';
3422
3422
 
3423
+ export type AutoRecharge = {
3424
+ /**
3425
+ * Whether auto-recharge is on. Charges happen only when this is true and disabledReason is null.
3426
+ */
3427
+ enabled: boolean;
3428
+ /**
3429
+ * Recharge when the balance drops below this, in cents.
3430
+ */
3431
+ belowCents: number;
3432
+ /**
3433
+ * Recharge back up to this, in cents. The charge is toCents minus the balance, plus tax.
3434
+ */
3435
+ toCents: number;
3436
+ /**
3437
+ * Most auto-recharge may add per calendar month (UTC), before tax; null for no limit.
3438
+ */
3439
+ monthlyLimitCents: (number) | null;
3440
+ /**
3441
+ * Low-balance email threshold, sent once per drop below it; null for none.
3442
+ */
3443
+ alertBelowCents: (number) | null;
3444
+ /**
3445
+ * `payment_failed` after four failed charges in a row. Updating the card clears it.
3446
+ */
3447
+ disabledReason: ('payment_failed') | null;
3448
+ /**
3449
+ * Failed charges in a row; 0 once one goes through.
3450
+ */
3451
+ retryCount: number;
3452
+ /**
3453
+ * When a declined recharge is tried again; null when none is waiting.
3454
+ */
3455
+ nextRetryAt: (string) | null;
3456
+ /**
3457
+ * Auto-recharge top-ups this calendar month (UTC), paid or being paid, before tax.
3458
+ */
3459
+ monthRechargedCents: number;
3460
+ };
3461
+
3462
+ /**
3463
+ * `payment_failed` after four failed charges in a row. Updating the card clears it.
3464
+ */
3465
+ export type disabledReason = 'payment_failed';
3466
+
3423
3467
  /**
3424
3468
  * Meta bid strategy. Same enum applies at campaign and ad-set level; ad-set value (when set)
3425
3469
  * overrides campaign-level. Cross-field rules:
@@ -24626,6 +24670,10 @@ export type GetBalanceResponse = ({
24626
24670
  * Your balance, including card top-ups paid in the last 7 days (see payoutLockedCents). It goes negative after a dispute or refund of a spent top-up, or when pay-per-use already in flight lands past zero. The next top-up covers it. Transfers are refused while it is negative.
24627
24671
  */
24628
24672
  availableCents?: number;
24673
+ /**
24674
+ * Balance billing only (absent otherwise). Promotional and support credit Zernio added to your balance. Pay-per-use spends it before availableCents. It is never paid out to payees and is not part of availableCents.
24675
+ */
24676
+ promoCents?: number;
24629
24677
  /**
24630
24678
  * Part of availableCents from card top-ups charged in the last 7 days, net of refunds and disputes. Transfers to payees cannot use it yet; a transfer that needs it answers 409 `payout_funds_locked` with the day it can be sent.
24631
24679
  */
@@ -24729,6 +24777,53 @@ export type GetBalanceError = ({
24729
24777
  required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
24730
24778
  });
24731
24779
 
24780
+ export type GetAutoRechargeResponse = (AutoRecharge);
24781
+
24782
+ export type GetAutoRechargeError = ({
24783
+ error?: string;
24784
+ code?: 'insufficient_permissions' | 'unclassified_resource';
24785
+ /**
24786
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
24787
+ */
24788
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
24789
+ } | unknown);
24790
+
24791
+ export type UpdateAutoRechargeData = {
24792
+ body: {
24793
+ /**
24794
+ * Turns auto-recharge on or off. A rule switched off by failed charges stays off until the card is updated.
24795
+ */
24796
+ enabled?: boolean;
24797
+ /**
24798
+ * Recharge when the balance drops below this, in cents. At least $5.
24799
+ */
24800
+ belowCents?: number;
24801
+ /**
24802
+ * Recharge back up to this, in cents. More than $5 above belowCents.
24803
+ */
24804
+ toCents?: number;
24805
+ /**
24806
+ * Most auto-recharge may add per calendar month (UTC), before tax. Null for no limit.
24807
+ */
24808
+ monthlyLimitCents?: (number) | null;
24809
+ /**
24810
+ * Email the billing owner once each time the balance drops below this. Null for no email.
24811
+ */
24812
+ alertBelowCents?: (number) | null;
24813
+ };
24814
+ };
24815
+
24816
+ export type UpdateAutoRechargeResponse = (AutoRecharge);
24817
+
24818
+ export type UpdateAutoRechargeError = (ErrorResponse | {
24819
+ error?: string;
24820
+ code?: 'insufficient_permissions' | 'unclassified_resource';
24821
+ /**
24822
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
24823
+ */
24824
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
24825
+ } | unknown);
24826
+
24732
24827
  export type CreateTopupData = {
24733
24828
  body: {
24734
24829
  /**