array( 'required' => true, 'type' => 'string', 'validate_callback' => function ( $value, $request, $key ) { return ( new Expo() )->isExpoPushToken( $value ); }, ), ); return $schema; } /** * Update subscription. * * @return array */ public function update_subscription_state() { $schema = array( 'enabled' => array( 'required' => true, 'type' => 'integer', 'minimum' => 0, 'maximum' => 1, ), ); return $schema; } }