🎉 Successfully connected sharded Rubee D1

Your sharded D1 databases returned:

> SELECT * FROM users LIMIT 3;
[ { "shard_binding": "rubee_d2", "rows": [ { "id": 1, "firebase_uid": "uid_123", "email": "test@example.com", "email_verified": 0, "display_name": "Lutchi", "photo_url": "https://example.com/avatar.png", "phone": "+18885551234", "provider_id": null, "providers_json": null, "billing_name": null, "billing_line1": null, "billing_line2": null, "billing_city": null, "billing_state": null, "billing_postal": null, "billing_country": null, "status": "GOT_RESOURCE5", "plan": "100MB_7Days", "packageCode": "P3YTYXBRV", "esimTranNo": null, "iccid": null, "rubee_number": null, "rubee_imei": null, "rubee_lock_key": null, "treasury_account": null, "connect_account": null, "identity_pubkey": null, "identity_privkey_enc": null, "signed_prekey_pub": null, "signed_prekey_sig": null, "signed_prekey_priv_enc": null, "otp_prekeys_json": null, "otp_prekeys_priv_enc": null, "device_keys_json": null, "device_keys_priv_enc": null, "conversation_master_keys_json": null, "created_at": "2025-11-23T17:09:56.308Z", "updated_at": "2025-11-26T18:38:18.375Z", "cost": "1.0", "auto_topup": 0, "user_ip": null, "locationNetworkList": null } ] }, { "shard_binding": "rubee_d3", "rows": [] }, { "shard_binding": "rubee_d4", "rows": [] }, { "shard_binding": "rubee_d5", "rows": [] } ]
POST /user with JSON: { "firebase_uid": "UID_FROM_FIREBASE", "email": "you@example.com", "display_name": "Lutchi", "phone": "+1..." }

GET /app/getUser?uid=UID_FROM_FIREBASE to fetch that user via the directory.

POST /app/message with JSON (text example): { "firebase_uid": "UID_FROM_FIREBASE", "direction": "outbound", "message_type": "text", "body": "hello world", "provider": "bandwidth" } or media: { "firebase_uid": "UID_FROM_FIREBASE", "direction": "outbound", "message_type": "media", "file_url": "https://r2/rubee/file.jpg", "file_mime": "image/jpeg" }

POST /app/ledger and /app/call similarly, then use /app/messages, /app/ledger, and /app/calls to read across shards.

For devices, POST /app/device and GET /app/devices?uid=... to store and list device metadata across shards.

For eSIM webhooks, POST /app/esim_Webhook with your provider payload, and query with /app/esim_Webhook?uid=...&limit=....