Skip to content

v3.0.0 - Push, Sessions, Agent & LiveQuery

Choose a tag to compare

@AdrianCurtin AdrianCurtin released this 09 Jan 02:14
· 69 commits to master since this release

Major Release - Push, Sessions, Agent, LiveQuery & Validation

This major release adds comprehensive push notification features, session management, AI agent integration, LiveQuery client, and model validation utilities.

Push Builder Pattern API

New fluent API for building push notifications:

Parse::Push.new
  .to_channel("news")
  .with_title("Breaking News")
  .with_body("Major event happening now!")
  .with_badge(1)
  .with_sound("alert.caf")
  .with_data(article_id: "12345")
  .schedule(Time.now + 3600)
  .send!

# Class method shortcuts
Parse::Push.to_channel("news").with_alert("Hello!").send!

Silent Push Support (iOS)

Parse::Push.new
  .to_channel("sync")
  .silent!
  .with_data(action: "refresh")
  .send!

Rich Push Support (iOS)

Parse::Push.new
  .to_channel("media")
  .with_title("New Photo")
  .with_image("https://example.com/photo.jpg")
  .with_category("PHOTO_ACTIONS")
  .send!

Installation Channel Management

installation.subscribe("news", "weather")
installation.unsubscribe("sports")
installation.subscribed_to?("news")

Parse::Installation.all_channels
Parse::Installation.subscribers_count("news")

Push Localization & Badge Increment

# Localized alerts
Parse::Push.new
  .with_localized_alerts(en: "Hello!", fr: "Bonjour!", es: "Hola!")
  .send!

# Badge increment
Parse::Push.new.increment_badge.send!
Parse::Push.new.clear_badge.send!

Session Management

session.expired?
session.time_remaining
session.revoke!

Parse::Session.active.all
Parse::Session.for_user(user).all
user.logout_all!
user.active_session_count

AI Agent Integration

New Parse::Agent module for AI-powered database interactions:

agent = Parse::Agent.new
result = agent.ask("How many users signed up this week?")
result = agent.ask("Find all songs with more than 1000 plays")

# Available tools for LLM
Parse::Agent.available_tools

MCP Server Support:

Parse.mcp_server_enabled = true
Parse::Agent.enable_mcp!(port: 3001)

LiveQuery Client

Real-time subscriptions for Parse objects:

# Configure
Parse::LiveQuery.configure(
  server_url: "wss://your-server.com/parse",
  application_id: "your-app-id"
)

# Subscribe to changes
subscription = Song.live_query.where(:plays.gt => 1000).subscribe
subscription.on(:create) { |song| puts "New hit: #{song.title}" }
subscription.on(:update) { |song| puts "Updated: #{song.title}" }
subscription.on(:delete) { |song| puts "Removed: #{song.title}" }

# Unsubscribe
subscription.unsubscribe

Features:

  • Circuit breaker for connection resilience
  • Health monitoring with automatic reconnection
  • Event queue for ordered processing

Email Validation Model

New Parse::Email class for email validation:

email = Parse::Email.new("user@example.com")
email.valid?        # => true
email.domain        # => "example.com"
email.local_part    # => "user"
email.normalized    # => "user@example.com"

Phone Validation Model

New Parse::Phone class for phone number validation:

phone = Parse::Phone.new("+1 (555) 123-4567")
phone.valid?        # => true
phone.e164          # => "+15551234567"
phone.national      # => "(555) 123-4567"
phone.country_code  # => "US"

Saved Audiences & Push Status

# Target saved audiences
Parse::Push.new.to_audience("VIP Users").with_alert("Exclusive!").send!
Parse::Audience.find_by_name("VIP Users")

# Track push status
status = Parse::PushStatus.find(push_id)
status.succeeded?
status.num_sent
status.success_rate

Author: Adrian Curtin
Date: November 2025