@zernio/node 0.2.1503 → 0.2.1504

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:
@@ -24729,6 +24773,53 @@ export type GetBalanceError = ({
24729
24773
  required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
24730
24774
  });
24731
24775
 
24776
+ export type GetAutoRechargeResponse = (AutoRecharge);
24777
+
24778
+ export type GetAutoRechargeError = ({
24779
+ error?: string;
24780
+ code?: 'insufficient_permissions' | 'unclassified_resource';
24781
+ /**
24782
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
24783
+ */
24784
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
24785
+ } | unknown);
24786
+
24787
+ export type UpdateAutoRechargeData = {
24788
+ body: {
24789
+ /**
24790
+ * Turns auto-recharge on or off. A rule switched off by failed charges stays off until the card is updated.
24791
+ */
24792
+ enabled?: boolean;
24793
+ /**
24794
+ * Recharge when the balance drops below this, in cents. At least $5.
24795
+ */
24796
+ belowCents?: number;
24797
+ /**
24798
+ * Recharge back up to this, in cents. More than $5 above belowCents.
24799
+ */
24800
+ toCents?: number;
24801
+ /**
24802
+ * Most auto-recharge may add per calendar month (UTC), before tax. Null for no limit.
24803
+ */
24804
+ monthlyLimitCents?: (number) | null;
24805
+ /**
24806
+ * Email the billing owner once each time the balance drops below this. Null for no email.
24807
+ */
24808
+ alertBelowCents?: (number) | null;
24809
+ };
24810
+ };
24811
+
24812
+ export type UpdateAutoRechargeResponse = (AutoRecharge);
24813
+
24814
+ export type UpdateAutoRechargeError = (ErrorResponse | {
24815
+ error?: string;
24816
+ code?: 'insufficient_permissions' | 'unclassified_resource';
24817
+ /**
24818
+ * The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
24819
+ */
24820
+ required_group?: 'publishing' | 'engagement' | 'messages' | 'contacts' | 'analytics' | 'ads' | 'telephony' | 'accounts' | 'billing' | 'webhooks' | 'commerce' | 'creator_campaigns' | 'money' | 'calendar' | 'files';
24821
+ } | unknown);
24822
+
24732
24823
  export type CreateTopupData = {
24733
24824
  body: {
24734
24825
  /**