UNPKG

chargebee

Version:

A library for integrating with Chargebee.

1,061 lines (1,060 loc) 36.6 kB
"use strict"; // Generated Zod schemas: Event // Actions: list // Do not edit manually – regenerate via sdk-generator Object.defineProperty(exports, "__esModule", { value: true }); exports.ListEventBodySchema = void 0; const zod_1 = require("zod"); //Event.list const ListEventIdSchema = zod_1.z.object({ is: zod_1.z.string().min(1).optional(), is_not: zod_1.z.string().min(1).optional(), starts_with: zod_1.z.string().min(1).optional(), in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(), }); const ListEventWebhookStatusSchema = zod_1.z.object({ is: zod_1.z .enum([ 'not_configured', 'scheduled', 'succeeded', 're_scheduled', 'failed', 'skipped', 'not_applicable', 'disabled', 'rate_limited', ]) .optional(), is_not: zod_1.z .enum([ 'not_configured', 'scheduled', 'succeeded', 're_scheduled', 'failed', 'skipped', 'not_applicable', 'disabled', 'rate_limited', ]) .optional(), in: zod_1.z .enum([ 'not_configured', 'scheduled', 'succeeded', 're_scheduled', 'failed', 'skipped', 'not_applicable', 'disabled', 'rate_limited', ]) .optional(), not_in: zod_1.z .enum([ 'not_configured', 'scheduled', 'succeeded', 're_scheduled', 'failed', 'skipped', 'not_applicable', 'disabled', 'rate_limited', ]) .optional(), }); const ListEventEventTypeSchema = zod_1.z.object({ is: zod_1.z .enum([ 'coupon_created', 'coupon_updated', 'coupon_deleted', 'coupon_set_created', 'coupon_set_updated', 'coupon_set_deleted', 'coupon_codes_added', 'coupon_codes_deleted', 'coupon_codes_updated', 'customer_created', 'customer_changed', 'customer_deleted', 'customer_moved_out', 'customer_moved_in', 'promotional_credits_added', 'promotional_credits_deducted', 'subscription_created', 'subscription_created_with_backdating', 'subscription_started', 'subscription_trial_end_reminder', 'subscription_activated', 'subscription_activated_with_backdating', 'subscription_changed', 'subscription_trial_extended', 'mrr_updated', 'subscription_changed_with_backdating', 'subscription_cancellation_scheduled', 'subscription_cancellation_reminder', 'subscription_cancelled', 'subscription_canceled_with_backdating', 'subscription_reactivated', 'subscription_reactivated_with_backdating', 'subscription_renewed', 'subscription_items_renewed', 'subscription_scheduled_cancellation_removed', 'subscription_changes_scheduled', 'subscription_scheduled_changes_removed', 'subscription_shipping_address_updated', 'subscription_deleted', 'subscription_paused', 'subscription_pause_scheduled', 'subscription_scheduled_pause_removed', 'subscription_resumed', 'subscription_resumption_scheduled', 'subscription_scheduled_resumption_removed', 'subscription_advance_invoice_schedule_added', 'subscription_advance_invoice_schedule_updated', 'subscription_advance_invoice_schedule_removed', 'pending_invoice_created', 'pending_invoice_updated', 'invoice_generated', 'invoice_generated_with_backdating', 'invoice_updated', 'invoice_deleted', 'credit_note_created', 'credit_note_created_with_backdating', 'credit_note_updated', 'credit_note_deleted', 'payment_schedules_created', 'payment_schedules_updated', 'payment_schedule_scheme_created', 'payment_schedule_scheme_deleted', 'subscription_renewal_reminder', 'add_usages_reminder', 'payment_due_reminder', 'transaction_created', 'transaction_updated', 'transaction_deleted', 'payment_succeeded', 'payment_failed', 'dunning_updated', 'payment_refunded', 'payment_initiated', 'refund_initiated', 'netd_payment_due_reminder', 'authorization_succeeded', 'authorization_voided', 'card_added', 'card_updated', 'card_expiry_reminder', 'card_expired', 'card_deleted', 'payment_source_added', 'payment_source_updated', 'payment_source_deleted', 'payment_source_expiring', 'payment_source_expired', 'payment_source_locally_deleted', 'virtual_bank_account_added', 'virtual_bank_account_updated', 'virtual_bank_account_deleted', 'token_created', 'token_consumed', 'token_expired', 'unbilled_charges_created', 'unbilled_charges_voided', 'unbilled_charges_deleted', 'unbilled_charges_invoiced', 'order_created', 'order_updated', 'order_cancelled', 'order_delivered', 'order_returned', 'order_ready_to_process', 'order_ready_to_ship', 'order_deleted', 'order_resent', 'quote_created', 'quote_updated', 'quote_deleted', 'tax_withheld_recorded', 'tax_withheld_deleted', 'tax_withheld_refunded', 'gift_scheduled', 'gift_unclaimed', 'gift_claimed', 'gift_expired', 'gift_cancelled', 'gift_updated', 'hierarchy_created', 'hierarchy_deleted', 'payment_intent_created', 'payment_intent_updated', 'contract_term_created', 'contract_term_renewed', 'contract_term_terminated', 'contract_term_completed', 'contract_term_cancelled', 'item_family_created', 'item_family_updated', 'item_family_deleted', 'item_created', 'item_updated', 'item_deleted', 'item_price_created', 'item_price_updated', 'item_price_deleted', 'attached_item_created', 'attached_item_updated', 'attached_item_deleted', 'differential_price_created', 'differential_price_updated', 'differential_price_deleted', 'feature_created', 'feature_updated', 'feature_deleted', 'feature_activated', 'feature_reactivated', 'feature_archived', 'item_entitlements_updated', 'entitlement_overrides_updated', 'entitlement_overrides_removed', 'item_entitlements_removed', 'entitlement_overrides_auto_removed', 'subscription_entitlements_created', 'subscription_entitlements_updated', 'business_entity_created', 'business_entity_updated', 'business_entity_deleted', 'customer_business_entity_changed', 'subscription_business_entity_changed', 'purchase_created', 'voucher_created', 'voucher_expired', 'voucher_create_failed', 'product_created', 'product_updated', 'product_deleted', 'variant_created', 'variant_updated', 'variant_deleted', 'item_price_entitlements_updated', 'item_price_entitlements_removed', 'subscription_ramp_created', 'subscription_ramp_deleted', 'subscription_ramp_applied', 'subscription_ramp_drafted', 'subscription_ramp_updated', 'price_variant_created', 'price_variant_updated', 'price_variant_deleted', 'customer_entitlements_updated', 'subscription_moved_in', 'subscription_moved_out', 'subscription_movement_failed', 'omnichannel_subscription_created', 'omnichannel_subscription_item_renewed', 'omnichannel_subscription_item_downgrade_scheduled', 'omnichannel_subscription_item_scheduled_downgrade_removed', 'omnichannel_subscription_item_downgraded', 'omnichannel_subscription_item_expired', 'omnichannel_subscription_item_cancellation_scheduled', 'omnichannel_subscription_item_scheduled_cancellation_removed', 'omnichannel_subscription_item_resubscribed', 'omnichannel_subscription_item_upgraded', 'omnichannel_subscription_item_cancelled', 'omnichannel_subscription_imported', 'omnichannel_subscription_item_grace_period_started', 'omnichannel_subscription_item_grace_period_expired', 'omnichannel_subscription_item_dunning_started', 'omnichannel_subscription_item_dunning_expired', 'rule_created', 'rule_updated', 'rule_deleted', 'record_purchase_failed', 'omnichannel_subscription_item_change_scheduled', 'omnichannel_subscription_item_scheduled_change_removed', 'omnichannel_subscription_item_reactivated', 'sales_order_created', 'sales_order_updated', 'omnichannel_subscription_item_changed', 'omnichannel_subscription_item_paused', 'omnichannel_subscription_item_resumed', 'omnichannel_one_time_order_created', 'omnichannel_one_time_order_item_cancelled', 'usage_file_ingested', 'omnichannel_subscription_item_pause_scheduled', 'omnichannel_subscription_moved_in', 'omnichannel_transaction_created', 'alert_status_changed', 'omnichannel_subscription_item_updated', 'omnichannel_subscription_item_recovered', ]) .optional(), is_not: zod_1.z .enum([ 'coupon_created', 'coupon_updated', 'coupon_deleted', 'coupon_set_created', 'coupon_set_updated', 'coupon_set_deleted', 'coupon_codes_added', 'coupon_codes_deleted', 'coupon_codes_updated', 'customer_created', 'customer_changed', 'customer_deleted', 'customer_moved_out', 'customer_moved_in', 'promotional_credits_added', 'promotional_credits_deducted', 'subscription_created', 'subscription_created_with_backdating', 'subscription_started', 'subscription_trial_end_reminder', 'subscription_activated', 'subscription_activated_with_backdating', 'subscription_changed', 'subscription_trial_extended', 'mrr_updated', 'subscription_changed_with_backdating', 'subscription_cancellation_scheduled', 'subscription_cancellation_reminder', 'subscription_cancelled', 'subscription_canceled_with_backdating', 'subscription_reactivated', 'subscription_reactivated_with_backdating', 'subscription_renewed', 'subscription_items_renewed', 'subscription_scheduled_cancellation_removed', 'subscription_changes_scheduled', 'subscription_scheduled_changes_removed', 'subscription_shipping_address_updated', 'subscription_deleted', 'subscription_paused', 'subscription_pause_scheduled', 'subscription_scheduled_pause_removed', 'subscription_resumed', 'subscription_resumption_scheduled', 'subscription_scheduled_resumption_removed', 'subscription_advance_invoice_schedule_added', 'subscription_advance_invoice_schedule_updated', 'subscription_advance_invoice_schedule_removed', 'pending_invoice_created', 'pending_invoice_updated', 'invoice_generated', 'invoice_generated_with_backdating', 'invoice_updated', 'invoice_deleted', 'credit_note_created', 'credit_note_created_with_backdating', 'credit_note_updated', 'credit_note_deleted', 'payment_schedules_created', 'payment_schedules_updated', 'payment_schedule_scheme_created', 'payment_schedule_scheme_deleted', 'subscription_renewal_reminder', 'add_usages_reminder', 'payment_due_reminder', 'transaction_created', 'transaction_updated', 'transaction_deleted', 'payment_succeeded', 'payment_failed', 'dunning_updated', 'payment_refunded', 'payment_initiated', 'refund_initiated', 'netd_payment_due_reminder', 'authorization_succeeded', 'authorization_voided', 'card_added', 'card_updated', 'card_expiry_reminder', 'card_expired', 'card_deleted', 'payment_source_added', 'payment_source_updated', 'payment_source_deleted', 'payment_source_expiring', 'payment_source_expired', 'payment_source_locally_deleted', 'virtual_bank_account_added', 'virtual_bank_account_updated', 'virtual_bank_account_deleted', 'token_created', 'token_consumed', 'token_expired', 'unbilled_charges_created', 'unbilled_charges_voided', 'unbilled_charges_deleted', 'unbilled_charges_invoiced', 'order_created', 'order_updated', 'order_cancelled', 'order_delivered', 'order_returned', 'order_ready_to_process', 'order_ready_to_ship', 'order_deleted', 'order_resent', 'quote_created', 'quote_updated', 'quote_deleted', 'tax_withheld_recorded', 'tax_withheld_deleted', 'tax_withheld_refunded', 'gift_scheduled', 'gift_unclaimed', 'gift_claimed', 'gift_expired', 'gift_cancelled', 'gift_updated', 'hierarchy_created', 'hierarchy_deleted', 'payment_intent_created', 'payment_intent_updated', 'contract_term_created', 'contract_term_renewed', 'contract_term_terminated', 'contract_term_completed', 'contract_term_cancelled', 'item_family_created', 'item_family_updated', 'item_family_deleted', 'item_created', 'item_updated', 'item_deleted', 'item_price_created', 'item_price_updated', 'item_price_deleted', 'attached_item_created', 'attached_item_updated', 'attached_item_deleted', 'differential_price_created', 'differential_price_updated', 'differential_price_deleted', 'feature_created', 'feature_updated', 'feature_deleted', 'feature_activated', 'feature_reactivated', 'feature_archived', 'item_entitlements_updated', 'entitlement_overrides_updated', 'entitlement_overrides_removed', 'item_entitlements_removed', 'entitlement_overrides_auto_removed', 'subscription_entitlements_created', 'subscription_entitlements_updated', 'business_entity_created', 'business_entity_updated', 'business_entity_deleted', 'customer_business_entity_changed', 'subscription_business_entity_changed', 'purchase_created', 'voucher_created', 'voucher_expired', 'voucher_create_failed', 'product_created', 'product_updated', 'product_deleted', 'variant_created', 'variant_updated', 'variant_deleted', 'item_price_entitlements_updated', 'item_price_entitlements_removed', 'subscription_ramp_created', 'subscription_ramp_deleted', 'subscription_ramp_applied', 'subscription_ramp_drafted', 'subscription_ramp_updated', 'price_variant_created', 'price_variant_updated', 'price_variant_deleted', 'customer_entitlements_updated', 'subscription_moved_in', 'subscription_moved_out', 'subscription_movement_failed', 'omnichannel_subscription_created', 'omnichannel_subscription_item_renewed', 'omnichannel_subscription_item_downgrade_scheduled', 'omnichannel_subscription_item_scheduled_downgrade_removed', 'omnichannel_subscription_item_downgraded', 'omnichannel_subscription_item_expired', 'omnichannel_subscription_item_cancellation_scheduled', 'omnichannel_subscription_item_scheduled_cancellation_removed', 'omnichannel_subscription_item_resubscribed', 'omnichannel_subscription_item_upgraded', 'omnichannel_subscription_item_cancelled', 'omnichannel_subscription_imported', 'omnichannel_subscription_item_grace_period_started', 'omnichannel_subscription_item_grace_period_expired', 'omnichannel_subscription_item_dunning_started', 'omnichannel_subscription_item_dunning_expired', 'rule_created', 'rule_updated', 'rule_deleted', 'record_purchase_failed', 'omnichannel_subscription_item_change_scheduled', 'omnichannel_subscription_item_scheduled_change_removed', 'omnichannel_subscription_item_reactivated', 'sales_order_created', 'sales_order_updated', 'omnichannel_subscription_item_changed', 'omnichannel_subscription_item_paused', 'omnichannel_subscription_item_resumed', 'omnichannel_one_time_order_created', 'omnichannel_one_time_order_item_cancelled', 'usage_file_ingested', 'omnichannel_subscription_item_pause_scheduled', 'omnichannel_subscription_moved_in', 'omnichannel_transaction_created', 'alert_status_changed', 'omnichannel_subscription_item_updated', 'omnichannel_subscription_item_recovered', ]) .optional(), in: zod_1.z .enum([ 'coupon_created', 'coupon_updated', 'coupon_deleted', 'coupon_set_created', 'coupon_set_updated', 'coupon_set_deleted', 'coupon_codes_added', 'coupon_codes_deleted', 'coupon_codes_updated', 'customer_created', 'customer_changed', 'customer_deleted', 'customer_moved_out', 'customer_moved_in', 'promotional_credits_added', 'promotional_credits_deducted', 'subscription_created', 'subscription_created_with_backdating', 'subscription_started', 'subscription_trial_end_reminder', 'subscription_activated', 'subscription_activated_with_backdating', 'subscription_changed', 'subscription_trial_extended', 'mrr_updated', 'subscription_changed_with_backdating', 'subscription_cancellation_scheduled', 'subscription_cancellation_reminder', 'subscription_cancelled', 'subscription_canceled_with_backdating', 'subscription_reactivated', 'subscription_reactivated_with_backdating', 'subscription_renewed', 'subscription_items_renewed', 'subscription_scheduled_cancellation_removed', 'subscription_changes_scheduled', 'subscription_scheduled_changes_removed', 'subscription_shipping_address_updated', 'subscription_deleted', 'subscription_paused', 'subscription_pause_scheduled', 'subscription_scheduled_pause_removed', 'subscription_resumed', 'subscription_resumption_scheduled', 'subscription_scheduled_resumption_removed', 'subscription_advance_invoice_schedule_added', 'subscription_advance_invoice_schedule_updated', 'subscription_advance_invoice_schedule_removed', 'pending_invoice_created', 'pending_invoice_updated', 'invoice_generated', 'invoice_generated_with_backdating', 'invoice_updated', 'invoice_deleted', 'credit_note_created', 'credit_note_created_with_backdating', 'credit_note_updated', 'credit_note_deleted', 'payment_schedules_created', 'payment_schedules_updated', 'payment_schedule_scheme_created', 'payment_schedule_scheme_deleted', 'subscription_renewal_reminder', 'add_usages_reminder', 'payment_due_reminder', 'transaction_created', 'transaction_updated', 'transaction_deleted', 'payment_succeeded', 'payment_failed', 'dunning_updated', 'payment_refunded', 'payment_initiated', 'refund_initiated', 'netd_payment_due_reminder', 'authorization_succeeded', 'authorization_voided', 'card_added', 'card_updated', 'card_expiry_reminder', 'card_expired', 'card_deleted', 'payment_source_added', 'payment_source_updated', 'payment_source_deleted', 'payment_source_expiring', 'payment_source_expired', 'payment_source_locally_deleted', 'virtual_bank_account_added', 'virtual_bank_account_updated', 'virtual_bank_account_deleted', 'token_created', 'token_consumed', 'token_expired', 'unbilled_charges_created', 'unbilled_charges_voided', 'unbilled_charges_deleted', 'unbilled_charges_invoiced', 'order_created', 'order_updated', 'order_cancelled', 'order_delivered', 'order_returned', 'order_ready_to_process', 'order_ready_to_ship', 'order_deleted', 'order_resent', 'quote_created', 'quote_updated', 'quote_deleted', 'tax_withheld_recorded', 'tax_withheld_deleted', 'tax_withheld_refunded', 'gift_scheduled', 'gift_unclaimed', 'gift_claimed', 'gift_expired', 'gift_cancelled', 'gift_updated', 'hierarchy_created', 'hierarchy_deleted', 'payment_intent_created', 'payment_intent_updated', 'contract_term_created', 'contract_term_renewed', 'contract_term_terminated', 'contract_term_completed', 'contract_term_cancelled', 'item_family_created', 'item_family_updated', 'item_family_deleted', 'item_created', 'item_updated', 'item_deleted', 'item_price_created', 'item_price_updated', 'item_price_deleted', 'attached_item_created', 'attached_item_updated', 'attached_item_deleted', 'differential_price_created', 'differential_price_updated', 'differential_price_deleted', 'feature_created', 'feature_updated', 'feature_deleted', 'feature_activated', 'feature_reactivated', 'feature_archived', 'item_entitlements_updated', 'entitlement_overrides_updated', 'entitlement_overrides_removed', 'item_entitlements_removed', 'entitlement_overrides_auto_removed', 'subscription_entitlements_created', 'subscription_entitlements_updated', 'business_entity_created', 'business_entity_updated', 'business_entity_deleted', 'customer_business_entity_changed', 'subscription_business_entity_changed', 'purchase_created', 'voucher_created', 'voucher_expired', 'voucher_create_failed', 'product_created', 'product_updated', 'product_deleted', 'variant_created', 'variant_updated', 'variant_deleted', 'item_price_entitlements_updated', 'item_price_entitlements_removed', 'subscription_ramp_created', 'subscription_ramp_deleted', 'subscription_ramp_applied', 'subscription_ramp_drafted', 'subscription_ramp_updated', 'price_variant_created', 'price_variant_updated', 'price_variant_deleted', 'customer_entitlements_updated', 'subscription_moved_in', 'subscription_moved_out', 'subscription_movement_failed', 'omnichannel_subscription_created', 'omnichannel_subscription_item_renewed', 'omnichannel_subscription_item_downgrade_scheduled', 'omnichannel_subscription_item_scheduled_downgrade_removed', 'omnichannel_subscription_item_downgraded', 'omnichannel_subscription_item_expired', 'omnichannel_subscription_item_cancellation_scheduled', 'omnichannel_subscription_item_scheduled_cancellation_removed', 'omnichannel_subscription_item_resubscribed', 'omnichannel_subscription_item_upgraded', 'omnichannel_subscription_item_cancelled', 'omnichannel_subscription_imported', 'omnichannel_subscription_item_grace_period_started', 'omnichannel_subscription_item_grace_period_expired', 'omnichannel_subscription_item_dunning_started', 'omnichannel_subscription_item_dunning_expired', 'rule_created', 'rule_updated', 'rule_deleted', 'record_purchase_failed', 'omnichannel_subscription_item_change_scheduled', 'omnichannel_subscription_item_scheduled_change_removed', 'omnichannel_subscription_item_reactivated', 'sales_order_created', 'sales_order_updated', 'omnichannel_subscription_item_changed', 'omnichannel_subscription_item_paused', 'omnichannel_subscription_item_resumed', 'omnichannel_one_time_order_created', 'omnichannel_one_time_order_item_cancelled', 'usage_file_ingested', 'omnichannel_subscription_item_pause_scheduled', 'omnichannel_subscription_moved_in', 'omnichannel_transaction_created', 'alert_status_changed', 'omnichannel_subscription_item_updated', 'omnichannel_subscription_item_recovered', ]) .optional(), not_in: zod_1.z .enum([ 'coupon_created', 'coupon_updated', 'coupon_deleted', 'coupon_set_created', 'coupon_set_updated', 'coupon_set_deleted', 'coupon_codes_added', 'coupon_codes_deleted', 'coupon_codes_updated', 'customer_created', 'customer_changed', 'customer_deleted', 'customer_moved_out', 'customer_moved_in', 'promotional_credits_added', 'promotional_credits_deducted', 'subscription_created', 'subscription_created_with_backdating', 'subscription_started', 'subscription_trial_end_reminder', 'subscription_activated', 'subscription_activated_with_backdating', 'subscription_changed', 'subscription_trial_extended', 'mrr_updated', 'subscription_changed_with_backdating', 'subscription_cancellation_scheduled', 'subscription_cancellation_reminder', 'subscription_cancelled', 'subscription_canceled_with_backdating', 'subscription_reactivated', 'subscription_reactivated_with_backdating', 'subscription_renewed', 'subscription_items_renewed', 'subscription_scheduled_cancellation_removed', 'subscription_changes_scheduled', 'subscription_scheduled_changes_removed', 'subscription_shipping_address_updated', 'subscription_deleted', 'subscription_paused', 'subscription_pause_scheduled', 'subscription_scheduled_pause_removed', 'subscription_resumed', 'subscription_resumption_scheduled', 'subscription_scheduled_resumption_removed', 'subscription_advance_invoice_schedule_added', 'subscription_advance_invoice_schedule_updated', 'subscription_advance_invoice_schedule_removed', 'pending_invoice_created', 'pending_invoice_updated', 'invoice_generated', 'invoice_generated_with_backdating', 'invoice_updated', 'invoice_deleted', 'credit_note_created', 'credit_note_created_with_backdating', 'credit_note_updated', 'credit_note_deleted', 'payment_schedules_created', 'payment_schedules_updated', 'payment_schedule_scheme_created', 'payment_schedule_scheme_deleted', 'subscription_renewal_reminder', 'add_usages_reminder', 'payment_due_reminder', 'transaction_created', 'transaction_updated', 'transaction_deleted', 'payment_succeeded', 'payment_failed', 'dunning_updated', 'payment_refunded', 'payment_initiated', 'refund_initiated', 'netd_payment_due_reminder', 'authorization_succeeded', 'authorization_voided', 'card_added', 'card_updated', 'card_expiry_reminder', 'card_expired', 'card_deleted', 'payment_source_added', 'payment_source_updated', 'payment_source_deleted', 'payment_source_expiring', 'payment_source_expired', 'payment_source_locally_deleted', 'virtual_bank_account_added', 'virtual_bank_account_updated', 'virtual_bank_account_deleted', 'token_created', 'token_consumed', 'token_expired', 'unbilled_charges_created', 'unbilled_charges_voided', 'unbilled_charges_deleted', 'unbilled_charges_invoiced', 'order_created', 'order_updated', 'order_cancelled', 'order_delivered', 'order_returned', 'order_ready_to_process', 'order_ready_to_ship', 'order_deleted', 'order_resent', 'quote_created', 'quote_updated', 'quote_deleted', 'tax_withheld_recorded', 'tax_withheld_deleted', 'tax_withheld_refunded', 'gift_scheduled', 'gift_unclaimed', 'gift_claimed', 'gift_expired', 'gift_cancelled', 'gift_updated', 'hierarchy_created', 'hierarchy_deleted', 'payment_intent_created', 'payment_intent_updated', 'contract_term_created', 'contract_term_renewed', 'contract_term_terminated', 'contract_term_completed', 'contract_term_cancelled', 'item_family_created', 'item_family_updated', 'item_family_deleted', 'item_created', 'item_updated', 'item_deleted', 'item_price_created', 'item_price_updated', 'item_price_deleted', 'attached_item_created', 'attached_item_updated', 'attached_item_deleted', 'differential_price_created', 'differential_price_updated', 'differential_price_deleted', 'feature_created', 'feature_updated', 'feature_deleted', 'feature_activated', 'feature_reactivated', 'feature_archived', 'item_entitlements_updated', 'entitlement_overrides_updated', 'entitlement_overrides_removed', 'item_entitlements_removed', 'entitlement_overrides_auto_removed', 'subscription_entitlements_created', 'subscription_entitlements_updated', 'business_entity_created', 'business_entity_updated', 'business_entity_deleted', 'customer_business_entity_changed', 'subscription_business_entity_changed', 'purchase_created', 'voucher_created', 'voucher_expired', 'voucher_create_failed', 'product_created', 'product_updated', 'product_deleted', 'variant_created', 'variant_updated', 'variant_deleted', 'item_price_entitlements_updated', 'item_price_entitlements_removed', 'subscription_ramp_created', 'subscription_ramp_deleted', 'subscription_ramp_applied', 'subscription_ramp_drafted', 'subscription_ramp_updated', 'price_variant_created', 'price_variant_updated', 'price_variant_deleted', 'customer_entitlements_updated', 'subscription_moved_in', 'subscription_moved_out', 'subscription_movement_failed', 'omnichannel_subscription_created', 'omnichannel_subscription_item_renewed', 'omnichannel_subscription_item_downgrade_scheduled', 'omnichannel_subscription_item_scheduled_downgrade_removed', 'omnichannel_subscription_item_downgraded', 'omnichannel_subscription_item_expired', 'omnichannel_subscription_item_cancellation_scheduled', 'omnichannel_subscription_item_scheduled_cancellation_removed', 'omnichannel_subscription_item_resubscribed', 'omnichannel_subscription_item_upgraded', 'omnichannel_subscription_item_cancelled', 'omnichannel_subscription_imported', 'omnichannel_subscription_item_grace_period_started', 'omnichannel_subscription_item_grace_period_expired', 'omnichannel_subscription_item_dunning_started', 'omnichannel_subscription_item_dunning_expired', 'rule_created', 'rule_updated', 'rule_deleted', 'record_purchase_failed', 'omnichannel_subscription_item_change_scheduled', 'omnichannel_subscription_item_scheduled_change_removed', 'omnichannel_subscription_item_reactivated', 'sales_order_created', 'sales_order_updated', 'omnichannel_subscription_item_changed', 'omnichannel_subscription_item_paused', 'omnichannel_subscription_item_resumed', 'omnichannel_one_time_order_created', 'omnichannel_one_time_order_item_cancelled', 'usage_file_ingested', 'omnichannel_subscription_item_pause_scheduled', 'omnichannel_subscription_moved_in', 'omnichannel_transaction_created', 'alert_status_changed', 'omnichannel_subscription_item_updated', 'omnichannel_subscription_item_recovered', ]) .optional(), }); const ListEventSourceSchema = zod_1.z.object({ is: zod_1.z .enum([ 'admin_console', 'api', 'scheduled_job', 'hosted_page', 'portal', 'system', 'none', 'js_api', 'migration', 'bulk_operation', 'external_service', ]) .optional(), is_not: zod_1.z .enum([ 'admin_console', 'api', 'scheduled_job', 'hosted_page', 'portal', 'system', 'none', 'js_api', 'migration', 'bulk_operation', 'external_service', ]) .optional(), in: zod_1.z .enum([ 'admin_console', 'api', 'scheduled_job', 'hosted_page', 'portal', 'system', 'none', 'js_api', 'migration', 'bulk_operation', 'external_service', ]) .optional(), not_in: zod_1.z .enum([ 'admin_console', 'api', 'scheduled_job', 'hosted_page', 'portal', 'system', 'none', 'js_api', 'migration', 'bulk_operation', 'external_service', ]) .optional(), }); const ListEventOccurredAtSchema = zod_1.z.object({ after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(), before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(), on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(), between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(), }); const ListEventSortBySchema = zod_1.z.looseObject({ asc: zod_1.z.enum(['occurred_at']).optional(), desc: zod_1.z.enum(['occurred_at']).optional(), }); const ListEventBodySchema = zod_1.z.looseObject({ limit: zod_1.z.number().int().min(1).max(100).optional(), offset: zod_1.z.string().max(1000).optional(), start_time: zod_1.z.number().int().optional(), end_time: zod_1.z.number().int().optional(), id: ListEventIdSchema.optional(), webhook_status: ListEventWebhookStatusSchema.optional(), event_type: ListEventEventTypeSchema.optional(), source: ListEventSourceSchema.optional(), occurred_at: ListEventOccurredAtSchema.optional(), sort_by: ListEventSortBySchema.optional(), }); exports.ListEventBodySchema = ListEventBodySchema;